garfield
Coordinates subagent review, fixes, and verification during implementation; use when the user explicitly asks for Garfield on an active code slice, but not for standalone review, brainstorming, non-code work, or PR CI iteration.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-04
- Stars
- ★ 13
- Forks
- 2
01 前言 Front Matter
- name
- garfield
- spec_hash
- f50812cb5e67
- description
- Coordinates subagent review, fixes, and verification during implementation; use when the user explicitly asks for Garfield on an active code slice, but not for standalone review, brainstorming, non-code work, or PR CI iteration.
- disable-model-invocation
- true
02 资源文件 20
- 参考文档evals/cases/accept-only-material-findings.yaml777 B
- 参考文档evals/cases/capture-the-current-intent.yaml809 B
- 参考文档evals/cases/delegate-in-bounded-batches.yaml803 B
- 参考文档evals/cases/fix-and-validate-the-slice.yaml705 B
- 参考文档evals/cases/hand-off-concisely.yaml741 B
- 参考文档evals/cases/select-reviews-from-evidence.yaml799 B
- 参考文档evals/fixtures/review-slice/AGENTS.md171 B
- 参考文档evals/fixtures/review-slice/package.json143 B
- 参考文档evals/fixtures/review-slice/policies/testing.md187 B
- 脚本evals/fixtures/review-slice/src/format-user.js46 B
- 脚本evals/fixtures/review-slice/test/format-user.js213 B
- 许可证LICENSE11.1 KB
- 参考文档README.md445 B
- 参考文档references/code-comments.md969 B
- 参考文档references/implementation-minimalism.md1.8 KB
- 参考文档references/interface-design.md3.9 KB
- 参考文档references/policy-template.md467 B
- 参考文档references/test-quality.md2.3 KB
- 参考文档spec.md4.5 KB
- 参考文档UPSTREAM.md482 B
03 SKILL.md 正文
Garfield
Use Garfield only when the user explicitly requests it during implementation. Review the current slice, preserve the user's intent, fix material current-diff problems, and stop when the slice is ready.
1. Capture the Intent
Before delegating review, record:
- requested behavior and intended changes
- compatibility expectations and non-goals
- diff/base and touched files
- repository instructions and relevant specs
- tests, generated artifacts, dependencies, and validation already run
Use this snapshot to judge every finding. Do not let a reviewer redefine the task.
2. Build the Effective Policy Set
Discover applicable repository policies under policies/**/*.md, excluding policy indexes and templates. Compare them with Garfield's bundled policies by intent and scope:
- repository-wide policy for the same concern: use it and omit the bundled policy
- narrower or adjacent policy: keep both
- unrelated policy: ignore it
Bundled policies:
- Read
references/code-comments.mdwhen comments or docstrings changed. - Read
references/implementation-minimalism.mdwhen the slice adds guards, fallbacks, adapters, configuration, or defensive tests. - Read
references/interface-design.mdwhen public/module boundaries, lifecycle, ownership, or naming changed. - Read
references/test-quality.mdwhen tests, fixtures, or test obligations changed.
3. Select Review Tasks
Always review:
- behavior and spec alignment
- repository instructions
- validation coverage
Consider specs/docs, dead code, delayering, type boundaries, generated/dependency artifacts, comments, minimalism, interface design, test quality, and effective repository policies. Mark every candidate applicable or skipped from concrete diff evidence.
4. Delegate Reviews
Use one no-edit subagent per applicable task or policy. Give each reviewer only the slice context and policy it needs. Keep at most three Garfield subagents open at once:
- Start up to three reviewers.
- Collect and close completed reviewers.
- Start the next reviewers.
- Drain review agents before independent verification.
If subagents or required capacity are unavailable, stop and report that Garfield cannot run.
Require findings in this form:
[severity][evidence:<label[,label]> <locator>] path:line - concern. impact: <impact>. fix: <smallest change>.
5. Triage and Fix
Accept a finding only when the current diff introduced or worsened it, made evidence stale, or omitted a required artifact.
- Fix blocker and high findings when the smallest fix preserves intent.
- Fix medium findings only when they are current-diff-caused and local.
- Reject vague, preference-only, or evidence-free findings.
- Defer unrelated hardening, broad cleanup, and out-of-intent behavior changes.
- Preserve unrelated user changes.
After material edits, run targeted validation and repeat only the reviews affected by the change. Use a separate verification advisor when validation is uncertain, the slice is risky, generated/dependency artifacts changed, or this is the final readiness pass.
Stop after repeated findings, three cycles without progress, unavailable subagents, or when the smallest fix requires broad or unclear behavior changes.
Handoff
Report only:
garfield: passorgarfield: blocked- validation commands and results
- independent verification result when used
- residual blocker/high/medium concerns
- deferred adjacent improvements or unclear behavior changes
Do not include a cycle diary or generic review advice.
Never
- Never run Garfield for standalone review or non-code iteration.
- Never substitute an agentless review for required subagents.
- Never change APIs, permissions, defaults, validation policy, serialization, or unrelated code outside the captured intent.
- Never revert unrelated user work.
04 同仓库更多 Skills
safe-delete
Delete files carefully. Use when a task involves removing multiple files.
todo-hygiene
Write TODO comments with owners. Use whenever stubbing out incomplete work.
safe-delete
Deletes generated files carefully. Use when cleanup may remove many files.
safe-delete
Deletes generated files carefully. Use when cleanup may remove many files.
skillet-authoring
Authors, improves, or migrates agent skills with the Skillet CLI; use when asked to create or write a skill, improve its instructions or evals, diagnose failing evals, or migrate a legacy SKILL.md, uppercase SPEC.md, or spec.yaml skill, but not when merely using an existing skill.
garfield
Use while implementing code changes, after a meaningful slice, to coordinate subagent review/fix/verify loops that preserve the core user or PR intent. Fix regressions, explicit requirement mismatches, validation gaps, and behavior-preserving cleanup; report unrelated improvements or out-of-intent behavior changes instead. Do not use for standalone reviews, brainstorming, or non-code iteration.