skill.spec.yml remains the only grammar tree.
Import Fields
Import Roles
Choosing the right role tells the harness — and future readers — how to treat the imported content.reference — branch-specific material
reference — branch-specific material
Reference documents loaded only when a particular route, rule, or recipe is active. Connect via
used_by or requires.imports.procedure — step-by-step guidance
procedure — step-by-step guidance
Procedure documents describe how to execute a task path. Connect them to a recipe that uses
load_import steps, or via used_by.example — worked examples
example — worked examples
Worked examples of correct behavior. On-demand only; connect to a code block or recipe that references them.
skill — another skill document
skill — another skill document
A full skill document loaded as active guidance. Useful for skills that hand off to or compose with another skill’s prose without merging its spec structure.
Load Modes
Sections
section narrows an import to a single named heading and its child content until the next heading at the same or higher level.
section is absent, the whole file is the import body.
Nested Imports
requires.imports is the only v0 nesting mechanism. It forms a directed acyclic graph of import ids. All imports live in the main spec’s top-level imports map; nesting is declared as references between those ids, not as declarations inside imported Markdown.
When a harness loads an import:
- Resolve the import id in the current spec’s
importsmap. - Load every id in
requires.importsfirst, in listed order (topological). - Then load the requested import.
- Skip duplicate loads during one decision run.
a.md, references/b.md, ../shared/c.md) resolve relative to the directory containing skill.spec.yml, even when b is loaded because a requires it.
Cycles are invalid. The following will fail skillspec validate:
Path Resolution
Import paths resolve relative to the directory containingskill.spec.yml. That rule applies to all imports, including nested ones.
skill/skill.spec.yml:
~home directory expansion- Environment variable substitution (
$VAR,${VAR}) - Shell command substitution
- Markdown links as import paths
- Absolute paths (harness-specific behavior only)
- URLs (harness-specific behavior only)
../ are allowed so a skill can import plugin-level shared guidance. Harnesses may still apply package-root or sandbox policy before reading the file.
Validating Imports
- Declared import paths resolve to existing files
- Declared sections exist in those files
- Explicit nesting is consistent (no cycles, all ids exist)
- Dependency-first load order is satisfiable
Example: Import Graph
The following is the conformance fixture for imports, fromconformance/valid/imports.skill.spec.yml:
shared_policy uses load: always — it is loaded at startup with no used_by required. task_reference is on_demand and declares used_by pointing at the local route, satisfying the reference closure requirement.
Resources vs. Imports
The decision betweenimports and resources determines whether a file becomes active guidance or preserved provenance.
A source file, fixture, evidence document, or script that supports code provenance but should not appear in the agent’s context window belongs in
resources. A shared policy document, procedure guide, or branch-specific reference that the agent must read during a run belongs in imports.