with one click
lead-edit
// Directly implement a narrow code change on the current branch, then verify it with one correctness-and-fit reviewer before updating specs and reporting completion.
// Directly implement a narrow code change on the current branch, then verify it with one correctness-and-fit reviewer before updating specs and reporting completion.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | lead-edit |
| description | Direct-edit primitive for narrow changes routed by lead-implement or explicit user request; lead edits current branch, verifies, reviews once, updates specs, and reports. |
Target: user request
ws/infra.read(name: "impl-playbook") before editing.ws/mental_models.find or ws/mental_models.status; read returned paths.mental-model/<domain>/index.md before mental-model/<domain>/<sub>.md.## AI Context.ws:lead-write-code if scope becomes multi-file with new public API or cross-module new pattern.ws:lead-update-spec on the edit range before reporting.<start-commit> with git rev-parse HEAD.ws/mental_models.find(query: <target or domain>) or ws/mental_models.status(domain: <domain>); read returned docs, ancestors first.ws/infra.read(name: "impl-playbook").Edit directly per target and impl-playbook. Commit logical checkpoints with CLAUDE.md commit rules.
Apply judge: review-scope. If lead-only review is selected, record the rationale and proceed to cleanup.
ws/agents.register(name: "reviewer", prompts: ["code-reviewer", "code-review-correctness", "code-review-fit"]).ws/path.generate(kind: "review", stems: ["direct"]); store <review-path>.Diff range: <start-commit>..HEAD
Scope: direct-edit - <brief scope description>
Review for correctness and fit.
Review focus:
- <2-4 changed invariants, bug paths, or local fit risks>
Ignore broad style or unrelated architecture unless directly broken by the diff.
Write full findings to: <review-path>
Return only: [clean|non-clean]: <one-line summary>
ws/agents.result(name: "reviewer", timeout_seconds: 600) only if async result lacks usable summary.[clean], proceed to cleanup.[non-clean], read <review-path> and classify findings:
Re-review. Updated diff: <start-commit>..HEAD
Rejected findings: <list with reasons>
Focus only on prior findings and touched follow-up changes.
For each rejected finding: respond [accepted] or [maintained: <brief reason>].
[clean] or 2 cycles; then proceed to cleanup.Delete <review-path>.
Invoke ws:lead-update-spec with <start-commit>..HEAD.
Output completion report.
Soft judgment. Direct edit uses one reviewer by default. Lead-only review is allowed for mechanical, low-risk edits with rationale. When calling a reviewer, provide 2-4 focus bullets.
Edit complete.
Commit range: <start-commit>..HEAD
Test status: pass | fail | skipped
Review: clean | non-clean (<one-line summary>)
Spec: <N entries added, M 🚧 stripped> | no changes
<if issues remain after cap:> Open issues: <list>
Edit optimizes for session-context preservation during code changes. The lead keeps implementation context; a fresh reviewer supplies uncommitted judgment; the relay cap bounds negotiation. When a rule is ambiguous, apply whichever interpretation keeps the lead's context continuous through the change.