From cloverleaf
Run the Documenter agent on a task in the `implementing` state (full pipeline only). Dispatches a subagent to add doc-only commits to the feature branch, then advances implementing → documenting → review. Usage — /cloverleaf-document <TASK-ID>.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cloverleaf:cloverleaf-documentThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
0. Ensure you are on `main`. State is authoritative on main. Run:
Ensure you are on main. State is authoritative on main. Run:
cd <repo_root>
current=$(git rev-parse --abbrev-ref HEAD)
if [ "$current" != "main" ]; then git checkout main; fi
If main has uncommitted changes, stop and report — the user must clean up first.
Capture the TASK-ID argument.
Load the task:
cloverleaf-cli load-task <repo_root> <TASK-ID>
Verify status === "implementing". Verify risk_class === "high". If either check fails, report and stop.
Confirm feature branch exists: git rev-parse --verify cloverleaf/<TASK-ID>. If missing, report the discrepancy and stop.
Compute the diff (without checking out):
git diff main..cloverleaf/<TASK-ID>
Capture the output for the subagent.
Dispatch the Documenter subagent via the Task tool:
subagent_type: general-purposemodel: sonnet$(cloverleaf-cli plugin-root)/prompts/documenter.md with substitutions:
{{task}} → full task JSON (pretty-printed){{diff}} → diff output{{branch}} → cloverleaf/<TASK-ID>{{base_branch}} → main{{repo_root}} → absolute pathParse the subagent's response. Expect JSON of the form {"commits_added": N, "files_changed": [...], "summary": "..."}.
On failure to parse or response with invalid shape: report the response and stop without advancing state.
Advance state:
cloverleaf-cli advance-status <repo_root> <TASK-ID> documenting agent
cloverleaf-cli advance-status <repo_root> <TASK-ID> review agent
Commit state changes:
cd <repo_root>
git add .cloverleaf/
git commit -m "cloverleaf: <TASK-ID> documented → review"
Report:
<commits_added> doc commit(s) added. State → review."<comma-separated files_changed>."/cloverleaf-review <TASK-ID>."advance-status call fails, stop and report.Provides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
npx claudepluginhub cloverleaf-org/cloverleaf --plugin cloverleaf