Agent writes code-review annotations directly in your source; you audit in your IDE — delete what you don't want, keep what you approve — then agent executes in batch.
Instead of describing "which file, which line, what to change" in a chat window, let the agent write proposals next to the code itself:
// @anno-propose: extract token refresh into auth.tryRefresh()
// @anno-risk: medium — affects 3 call sites
// @anno-note: duplicated in middleware/auth.ts and handler/login.ts
func refreshToken(ctx context.Context) error {You open your IDE, see all proposals at a glance, delete the ones you don't want, edit descriptions if needed — then run:
/anno-apply
Agent executes only what's left, removes annotations, and writes ANNOCHANGELOG.md.
- Review in your IDE — syntax highlighting, go-to-definition, git diff. Not a chat box.
- Agent does the work — default is "accept". You only delete what's wrong.
- Line-level precision — every proposal sits exactly where the change happens.
- Risk-aware — every annotation tagged low / medium / high, so you see impact before executing.
- Traceable —
ANNOCHANGELOG.mdrecords every applied and skipped change.
git clone https://github.com/zlj-zz/code-annotations.git ~/projects/code-annotations
ln -sfn ~/projects/code-annotations ~/.agents/skills/code-annotations/anno-review "refactor the auth module to reduce duplication"
Agent scans the codebase, inserts @anno-propose annotations at specific locations, and presents a summary:
12 proposals across 5 files. High risk: 3. Review then /anno-apply.
Open your IDE. Every proposal is a 3-line annotation next to the target code:
// @anno-propose: add rate limiting middleware
// @anno-risk: low — isolated change, no API impact
// @anno-note: use existing rate-limit package in shared/- This looks good → leave it
- This is wrong → delete all 3 lines
- Needs adjustment → edit the description
/anno-apply
Agent executes approved proposals, strips annotations, and writes ANNOCHANGELOG.md:
## 2026-01-15 14:30 — anno-apply
| Status | File | Proposal |
|--------|------|----------|
| ✅ done | auth.ts | extract token refresh |
| ✅ done | api.ts | add rate limiting |
| ⏭️ skipped | db.ts | add composite index (user removed) |
| ❌ failed | config.ts | migrate secrets (merge conflict) || Command | What | Writes log? |
|---|---|---|
/anno-review <task> |
Agent scans code, inserts proposals | No |
/anno-apply |
Execute approved, strip annotations, write log | Yes |
/anno-clear |
Remove all annotations without executing | No |
// @anno-propose: <one-line description>
// @anno-risk: low | medium | high
// @anno-note: <optional context — why, alternatives, related files>
| Field | Purpose |
|---|---|
@anno-propose |
What to do. One sentence. |
@anno-risk |
Impact: cosmetic (low), logic change (medium), API/schema (high) |
@anno-note |
Extra context for the reviewer. Optional. |
Language-aware comment prefix: // for TS/JS/Go/Rust, # for Python/Ruby, -- for SQL, <!-- --> for HTML.
| Mode | Behavior |
|---|---|
| Plan | /anno-review works, /anno-apply blocked |
| Auto | Both work |
| Manual | Each apply step confirmed |
- Agent writes, human decides — reverse the direction of annotations. Agent does the heavy lifting.
- Default is "accept" — delete what you don't want. No need to mark "approved".
- Proposals, not commands — annotations are suggestions. User has final say.
- Strip + log — source stays clean;
ANNOCHANGELOG.mdkeeps history.
code-annotations/
├── SKILL.md # skill entry
├── README.md / README.zh.md # docs
├── assets/
│ └── annochangelog.template.md
├── commands/ # slash command definitions
│ ├── anno-review.md
│ ├── anno-apply.md
│ └── anno-clear.md
└── LICENSE