Metadata-Version: 2.4
Name: asb-schema
Version: 0.3.0
Summary: LinkML schemas for the ASB Standard — Cards, Capsules, Skill Bundles, Skill Collections
Author: AgenticScienceBuilder contributors
License-Expression: Apache-2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: linkml>=1.7
Requires-Dist: linkml-runtime>=1.7
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Dynamic: license-file

# asb-schema

LinkML schemas for the ASB Standard — Cards, Capsules, Skill Bundles, and the
release-time Skill Collections used by the `asb-skill-collections` repo.

Renamed from `scitask-schema` in v0.2.0 (Wave 1 of the 2026-05-24 ASB-Skills
release design). For background, see
[`docs/superpowers/specs/2026-05-24-asb-skills-release-design.md`](../docs/superpowers/specs/2026-05-24-asb-skills-release-design.md)
in the parent repo.

## Layout

```
src/asb_schema/
├── asb.yaml                            # top schema, imports the five below
├── asb_card.yaml                       # ASBTaskCard
├── asb_capsule.yaml                    # capsule wrapper
├── asb_skill_bundle.yaml               # SkillBundle + ASBSkill + ASBTool + MergeAuditRecord + ToolAffordance
├── asb_skill_collection.yaml           # SkillCollection (release unit)
├── asb_skill_collection_registry.yaml  # SkillCollectionRegistry (catalogue root)
├── context.jsonld                      # generated JSON-LD @context
└── *.schema.json                       # generated JSON Schema (run `make generate`)
```

## Validating a collection manifest

A released `collection.yaml` is a `SkillCollection`; validate it closed, so an
undeclared key is an error:

```bash
SCHEMA=$(python -c "from importlib.resources import files; print(files('asb_schema') / 'asb_skill_collection.yaml')")
linkml-validate --schema "$SCHEMA" --target-class SkillCollection collections/<slug>/v<N>/collection.yaml
```

`asb_skill_bundle.yaml` is the schema of a per-capsule skill bundle, not of a
collection manifest. v0.3.0 declares the ten keys released manifests carry beyond
the fifteen v0.2 slots (`@context`, `@type`, `@id`, `lead_curators`,
`skills_count`, `tools_count`, `workflows_count`, `domain_topics`, `roles`,
`zenodo_doi`); all ten are optional and the six required slots are unchanged.

## Regenerating

```bash
bash generate.sh
```

## Migration from `scitask_schema`

Use `asb_schema.compat.legacy_schema_name("scitask_card")` ->
`"asb_card"` (emits `DeprecationWarning`). The shim is removed in the next
minor release.

## Tests

```bash
python -m pytest tests/ -v
```
