Top-level agents/ was an arbitrary flat layout from the skeleton commit, with no substantive reason behind it. Mirroring AILang's convention (skills/<name>/agents/<agent>.md) is strictly better: it makes the "no orphan agents" rule structurally true — you cannot place an agent file outside a skill — and it keeps the skill/agent binding visible at first glance. Claude Code's user-level discovery is unaffected: install.sh now symlinks ~/.claude/agents/<name> to skills/<name>/agents/ for each skill that has an agents/ subdirectory. The .claude/ registry stays flat; the source tree stays nested. The two checklists previously living in agents/README.md are folded into skills/README.md.
skills/
One subdirectory per skill, each containing a SKILL.md plus
the agent files that skill dispatches under agents/. Agents
live with their dispatching skill, not in a parallel top-level
directory — this is what makes the "no orphan agents" rule
structurally true rather than only documented.
The skeleton commit ships this directory empty. The actual
skill bodies and agents are migrated from AILang's in-tree
~/dev/ailang/skills/ and generalised against the profile
schema (../docs/profile-schema.md) and the agent template
(../docs/agent-template.md) in iteration 1.
Expected layout after migration:
skills/
├── brainstorm/
│ ├── SKILL.md
│ └── agents/
│ └── grounding-check.md
├── planner/
│ ├── SKILL.md
│ └── agents/
│ └── plan-recon.md
├── implement/
│ ├── SKILL.md
│ └── agents/
│ ├── implement-orchestrator.md
│ ├── implementer.md
│ ├── spec-reviewer.md
│ ├── quality-reviewer.md
│ └── tester.md
├── audit/
│ ├── SKILL.md
│ └── agents/
│ ├── architect.md
│ └── bencher.md
├── debug/
│ ├── SKILL.md
│ └── agents/
│ └── debugger.md
├── fieldtest/
│ ├── SKILL.md
│ └── agents/
│ └── fieldtester.md
└── docwriter/
├── SKILL.md
└── agents/
└── docwriter.md
install.sh symlinks each skill's directory into
~/.claude/skills/<name> and each skill's agents/
subdirectory into ~/.claude/agents/<name>, so Claude Code's
flat user-level discovery still finds everything while the
source tree keeps the structural binding.
Migration checklist per skill
- Strip project-specific paths (
docs/specs,docs/plans,design/INDEX.md,crates/,bench/). - Strip project-specific commands (
cargo build,bench/check.py). - Replace literals with profile-slot references in prose.
- Strip project vocabulary (
AILang,Form A,.ail.json,Boss); use the profile's vocabulary slots. - Strip project-specific contracts (honesty-rule,
feature-acceptance). These belong in the project's own
CLAUDE.md, not the plugin. - Verify the body still reads coherently for a generic project — would it make sense in a Python web service? A TypeScript library?
Migration checklist per agent
- Drop the
ailang-prefix from thename:frontmatter field. The skill path is the disambiguator. - Replace hardcoded standing-reading paths
(
design/INDEX.md, etc.) with a reference to the profile'sstanding_readingsection. - Replace project-specific Iron Law clauses with the universal
discipline constants; project-specific clauses go to the
project's own
CLAUDE.md. - Verify the body still reads coherently for a generic project (see the per-skill checklist above).
- Confirm the
tools:frontmatter list matches the agent template's role-based conventions (read-only review vs implementation vs orchestrator). - Confirm the agent does not have
Agentin its tools list (no nested subagent dispatch).