When this fires
Project/milestone complete AND user wants to reuse learnings. Produces a scaffold for a new pack in packs/<pack-name>/ or an update to an existing pack.
Preconditions
project-status.mdexists.- At least one
docs/matilha/den/*.mdexists.
Execution Workflow
- Read den files via Glob + Read.
- Prompt user for pack destination (new pack name, or "extend existing").
- Scaffold pack skeleton following
docs/matilha/pack-authors.md— createpacks/<name>/dir with.claude-plugin/plugin.json,skills/,README.md,CHANGELOG.md,LICENSE. - Copy relevant den content into skills within the pack (one skill per coherent den topic).
- Generate pack's
plugin.jsonwithmatilha-packkeyword. - Emit final message: "Pack scaffolded at . Follow docs/matilha/pack-authors.md to publish."
Rules: Do
- Scaffold independently (don't modify matilha core).
- Preserve citation wikilinks from den files in pack skills.
- Follow
pack-authors.mdstrictly.
Rules: Don't
- Bundle secrets or project-specific data into reusable pack.
- Duplicate matilha core skills.
Expected Behavior
User gets a new pack repo scaffolded locally. Tests + publish are user's own responsibility.
Quality Gates
- Pack directory exists with valid
plugin.json. - At least one skill in
pack/skills/. matilha-packkeyword in keywords array.
Companion Integration
No companion integrations in Wave 4a.
Output Artifacts
packs/<pack-name>/directory with.claude-plugin/plugin.json,skills/,README.md.
Example Constraint Language
- Use "must" for:
plugin.jsonincludesmatilha-packkeyword. - Use "should" for: cite den source wikilinks in pack skills.
- Use "may" for: scaffold multiple pack skills from a single den file.
Troubleshooting
- "no den files": Run
/matilha-denfirst to distill knowledge. - "pack name collision": Pick an unclaimed prefix (check
docs/matilha/naming-conventions.md).
CLI shortcut (optional)
matilha pack <name>(future CLI command; not shipped yet).