Framework Init
Run only after the user explicitly requests initialization. Never inherit invocation from another workflow skill.
Scaffold the workflow framework in a fresh repo. Templates live next to this skill in templates/. The folder a task sits in IS its status — there is no board file.
Detect:
workflow/AGENTS.mdexists → already initialized, route to/workflow:framework-doctorfor a health check. Doctor owns every re-run concern (refreshing drifted shipped files, backfilling missingtags:, contract drift); this skill only ever scaffolds a repo that has no framework. A legacy markdown board (docs/board.mdorworkflow/board.md) exists → stop and tell the user to migrate it to status folders by hand first (the automated migrator was retired); don't scaffold a second system over it.Create
workflow/:- status folders
draft/,ready/,in-progress/,blocked/,done/, plusreports/— each with a.gitkeep(git doesn't track empty dirs; the folders must exist formvand the validator) TEMPLATE.mdfromtemplates/TEMPLATE.mdstatusfromtemplates/status, thenchmod +x workflow/status— the board view is./workflow/status, and./workflow/status --next-idis where task ids come from (derived from files, worktrees, and git history; there is no counter file)
- status folders
Write the contract
workflow/AGENTS.mdfromtemplates/AGENTS.md, pre-filled by inspecting the repo — project one-liner from the README, validation commands frompackage.jsonscripts / Makefile / existing CI, verify skills and doc leaves from what exists under.claude/skills/anddocs/. Confirm the guesses with one question round (AskUserQuestion on Claude; plain chat questions on Codex): validation commands, verify mapping, decision log yes/no — defaults from the inspection.Docs skeleton (only what's missing, only if the user opted in during the question round):
docs/style.mdstub (one job per file, cross-link don't duplicate, no execution logs), emptydocs/areas/anddocs/spec/with a one-line README each. Content stays the repo's job.Route the repo instructions: add a
## Work trackingsection to the rootAGENTS.md(create it, plus aCLAUDE.mdcontaining@AGENTS.md, if missing — but follow the repo's existing pattern, e.g.AGENTS.mdas a symlink toCLAUDE.md):## Work tracking Managed by the `workflow` plugin. Tasks are files in `workflow/<status>/` (draft, ready, in-progress, blocked, done) — the folder IS the status; moving a task is `git mv`. Board view: `./workflow/status`. Repo contract: `workflow/AGENTS.md`. Commands: `/workflow:groom`, `/workflow:work`, `/workflow:batch-work`, `/workflow:status`, `/workflow:framework-doctor`.Validate: run
python3 <plugin>/skills/framework-doctor/scripts/validate_workflow.py(resolve via${CLAUDE_PLUGIN_ROOT}or relative to this skill file). Must pass — an empty board is valid.Commit everything as one commit:
workflow: initialize framework.
Codex: invoke as use $framework-init; identical flow.