docs: add agent guidance files and templates
This commit is contained in:
25
.claude/skills/fix-review/SKILL.md
Normal file
25
.claude/skills/fix-review/SKILL.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
description: Fix only accepted findings from a diff review. Use after review-diff returns blockers or warnings that the user accepts.
|
||||
disable-model-invocation: true
|
||||
---
|
||||
|
||||
Fix only the accepted review findings.
|
||||
|
||||
Rules:
|
||||
|
||||
- Do not rewrite the solution.
|
||||
- Do not expand scope.
|
||||
- Do not address subjective style comments unless accepted by the user.
|
||||
- Preserve the original plan unless the user explicitly approved a change.
|
||||
- Add or update tests only when needed to cover the accepted finding.
|
||||
- Run relevant verification commands again.
|
||||
|
||||
Final report:
|
||||
|
||||
## Fixes applied
|
||||
|
||||
## Files changed since review
|
||||
|
||||
## Commands run
|
||||
|
||||
## Remaining risks
|
||||
30
.claude/skills/implement-plan/SKILL.md
Normal file
30
.claude/skills/implement-plan/SKILL.md
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
description: Implement an approved plan with minimal scope, tests, and verification. Use after the user approves a plan.
|
||||
disable-model-invocation: true
|
||||
---
|
||||
|
||||
Implement the approved plan.
|
||||
|
||||
Rules:
|
||||
|
||||
- Follow the approved plan exactly.
|
||||
- Keep the diff minimal.
|
||||
- Do not refactor unrelated code.
|
||||
- Do not change behavior outside the task scope.
|
||||
- Add or update tests for changed behavior.
|
||||
- Run the verification commands from the plan or task brief.
|
||||
- Fix failures caused by your changes.
|
||||
- Stop and explain before expanding scope.
|
||||
- If a verification command is unavailable, explain why.
|
||||
|
||||
Final report:
|
||||
|
||||
## Summary
|
||||
|
||||
## Files changed
|
||||
|
||||
## Tests added or updated
|
||||
|
||||
## Commands run
|
||||
|
||||
## Remaining risks
|
||||
37
.claude/skills/plan-task/SKILL.md
Normal file
37
.claude/skills/plan-task/SKILL.md
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
description: Plan a coding task before editing. Use for non-trivial implementation, bug fixing, refactoring, or unfamiliar code. Produces a concise plan and waits for approval.
|
||||
disable-model-invocation: true
|
||||
disallowed-tools: Write Edit MultiEdit
|
||||
---
|
||||
|
||||
You are planning a coding task.
|
||||
|
||||
Read the task brief provided by the user. If a `.agent/tasks/<task-id>/brief.md` file is mentioned, read it first.
|
||||
|
||||
Workflow:
|
||||
|
||||
1. Explore the relevant code in read-only mode.
|
||||
2. Do not edit files.
|
||||
3. Classify the task as Fast, Standard, or Cautious.
|
||||
4. Produce a concise implementation plan.
|
||||
5. Stop and wait for user approval before implementation.
|
||||
|
||||
The plan must include:
|
||||
|
||||
- task classification;
|
||||
- assumptions;
|
||||
- files inspected;
|
||||
- files likely to change;
|
||||
- files that should not change;
|
||||
- implementation steps;
|
||||
- tests to add or update;
|
||||
- verification commands;
|
||||
- risks and ambiguities;
|
||||
- stopping conditions.
|
||||
|
||||
Constraints:
|
||||
|
||||
- Keep the scope minimal.
|
||||
- Do not refactor unrelated code.
|
||||
- Prefer the safest minimal default for ambiguities.
|
||||
- If no code change is needed, explain with evidence.
|
||||
56
.claude/skills/review-diff/SKILL.md
Normal file
56
.claude/skills/review-diff/SKILL.md
Normal file
@@ -0,0 +1,56 @@
|
||||
---
|
||||
description: Review the current git diff against the task brief and approved plan in a fresh read-only context. Use before finalizing Standard or Cautious tasks.
|
||||
disable-model-invocation: true
|
||||
context: fork
|
||||
disallowed-tools: Write Edit MultiEdit
|
||||
---
|
||||
|
||||
Review the current diff against the task brief and approved plan.
|
||||
|
||||
Use the live git state below as the source of truth.
|
||||
|
||||
## Current branch
|
||||
|
||||
!`git branch --show-current || true`
|
||||
|
||||
## Git status
|
||||
|
||||
!`git status --short || true`
|
||||
|
||||
## Diff stat
|
||||
|
||||
!`git diff --stat HEAD || true`
|
||||
|
||||
## Diff
|
||||
|
||||
!`git diff HEAD || true`
|
||||
|
||||
## Instructions
|
||||
|
||||
Look for:
|
||||
|
||||
- missing requirements;
|
||||
- bugs;
|
||||
- missing edge cases;
|
||||
- missing tests;
|
||||
- regressions;
|
||||
- security risks;
|
||||
- data consistency risks;
|
||||
- concurrency or idempotency risks;
|
||||
- unrelated changes.
|
||||
|
||||
Do not comment on subjective style preferences unless they affect correctness or maintainability.
|
||||
|
||||
Return exactly:
|
||||
|
||||
## Blockers
|
||||
|
||||
## Warnings
|
||||
|
||||
## Suggested tests
|
||||
|
||||
## Out-of-scope changes
|
||||
|
||||
## Verdict
|
||||
|
||||
Use `approve` or `request changes` for the verdict.
|
||||
Reference in New Issue
Block a user