agentleFS
gurinderugurinderu/craft/skills/develop/SKILL.md

develop

Skill1 starsChanged 39 days agoMITView on GitHub

Run a change end to end up to a pull request with craft's tools — read the project's declared roles and rules first and let them take any phase they cover but the final full review (theirs runs beside craft's), recall project memory for the touched paths, make the change, loop review → triage → fix — the first round over the branch diff, each next light, over the fixed delta — until a round brings no open Medium-or-higher finding (at most 4 rounds, then stop and tell the human), run one full craft:review, record the cycle, and open the PR only after that. Needs Claude Code's Workflow tool (not in Codex, OpenCode or a subagent): main session only. Use when asked to implement a feature or fix and open a PR, or take a change from request to PR. Triggers: implement this and open a PR, develop X end to end, take this to a PR, do the whole cycle. Not for working existing findings only (addressing-findings), a one-off review (the review workflows), or how to plan, test or debug (bring the project's own process).

  • Commits and pushes

32 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use scope, sync and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • YuriNachosSkill

    scope

    Configure claude-scope status line widgets for Claude Code. Use when user wants to customize widgets, change theme, reorder elements, or modify display style.

    Also in 6 projects that use this

  • MicrosoftSkill

    sync

    Sync the current session branch with its upstream branch, or publish the current session branch to a remote. Use when the user asks to sync a branch, pull latest changes, rebase onto upstream, push current branch, publish branch, or set upstream.

    Also in 6 projects that use this

  • nicolasestremSkill

    document

    Create focused documentation for specific components or features

    Also in 5 projects that use this

  • kt057Skill

    check

    lint, typecheck, test を一括実行して結果をサマリーする

    Also in 6 projects that use this

  • Harut8Skill

    architect

    Also in 9 projects that use this

  • AnthropicSkill

    debug

    Structured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod", "something broke after the deploy", or when behavior diverges from expected and the cause isn't obvious.

    Also in 9 projects that use this

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 27 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before anything else, find what the project already declares for each phase.

    line 40
  2. Distinctive:

    Read, without changing anything:

    line 49
  3. Distinctive:

    Keep the recalled records verbatim with their ids: subagents get them in their brief (they cannot recall themselves).

    line 76
  4. Very specific:

    No backend → one line memory: no backend available — <why> and continue.

    line 79
  5. Very specific:

    Add priorDecisions: [...] only for records the store may not hold yet — rejections just read from PR threads, or a decision from this loop …

    line 129
  6. Very specific:

    Only after the loop converged, and once.

    line 222
  7. Very specific:

    When the cycle ends — converged with a clean full review, capped at round 4, or stopped without a verdict — file one record of it in …

    line 239
  8. Distinctive:

    Only after phase 5 ended clean — or on the human's explicit word when the loop did not converge.

    line 259
  9. Distinctive:

    Follow the project's PR rules (title form, body sections, what must be linked, who opens it, draft or not).

    line 260

“Common” is measured: kept by at least 6 in 10 of the 27 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Develop — the cycle up to a PR

One change, from the request to an opened PR, run with craft's own tools: project memory, the review engines, triage and the fix loop. The skill owns the order of phases and when each ends. It does not own how to plan, test or debug — that is the project's own process, or the craft topic skill that already exists for it.

Where it runs

In the main session. The review engines are Workflow-tool scripts, and a subagent launched with the Agent tool has no Workflow tool — so never hand this skill, or a phase that launches an engine, to a subagent. Subagents may still do bulky work inside a phase (a coding role, the fix groups of a triage plan) — never the triage itself, which is the craft:triage-findings workflow. A session started with claude --agent <role> is a main session with that role's prompt: when the role's tools list is empty or names Workflow and Skill, it runs this cycle itself.

In Claude Code, craft's SessionStart hook says this at the start of a session in a repo that declares its own agents (.claude/agents/*.md) or work rules (an AGENTS.md / CLAUDE.md that names the process: pull request, PR, code review, reviewer, review loop, before merging): the repo's roles and rules win on every step they cover, except the final full review, where they run beside craft's full craft:review and never replace it; whichever declared role develops there runs this cycle with craft's tools, and a role running as a subagent hands the review loop back to the main session. It is silent in other repos and on a resumed session; CRAFT_ROLE_HOOK=0 in the environment, or a line craft-role-hook: off in AGENTS.md / CLAUDE.md, switches it off. In the same repos it speaks again at the moment of work: on a message asking for work on findings or PR comments it names craft:addressing-findings, and on one asking for a review it names craft:review and this skill, both run in the main session; either way the main session puts the recalled records into each subagent's brief and records every rejected or deferred finding a subagent reports, and it gets a ready line for the brief; a subagent started in that session hears that the review loop is the main session's.

The rule over every phase: the project's process comes first

Before anything else, find what the project already declares for each phase. A declared role or rule takes its phase; craft runs a phase only where the project declared nothing. A declared rule that conflicts with a default below wins (its review order, its gate command, its PR form, its reviewer). Never skip a declared step because craft has its own. One exception: the final full review (phase 5). A declared reviewer or rule for the last review runs beside craft's full craft:review, never instead of it.

Phase 1 — Consumer roles

Read, without changing anything:

  • .claude/agents/*.md and .opencode/agents/* (or .opencode/agent/*) — roles the project declares: a coder / implementer, a reviewer, a verifier, a gate runner.
  • AGENTS.md / CLAUDE.md (root and nested ones on the touched paths) — rules on how work is done, branch and worktree rules, the gate command, the review order, commit and PR form, what needs the human's word.

Then print one line per phase, before starting phase 2:

develop: roles — 1 roles: craft (read) · 2 recall: craft:memory · 3 work: <role or rule | craft session>
         · 4 review loop: <role/rule | craft:review> · 5 full review: craft:review [+ <role/rule>]
         · 6 record: craft · 7 PR: <rule | craft default>

Each slot names the file the role or rule came from (.claude/agents/reviewer.md, AGENTS.md §Git). Nothing declared → say craft. Two declarations that disagree on one phase → ask the human which holds; do not pick.

Phase 2 — Recall

Invoke the craft:memory skill: recall(<topic of the change>, <each path the change will touch>) — the paths you expect to touch now, and again for any new path once the diff exists. It prints memory backend: X (why). An active decision on a path is context for the work (do not redo what was rejected for a stated reason; if the code it relied on changed, say so). An active question is something still open there — name it to the human if the change would answer it. Keep the recalled records verbatim with their ids: subagents get them in their brief (they cannot recall themselves).

No backend → one line memory: no backend available — <why> and continue.

Phase 3 — Work

The change itself, on the branch the project's rules call for (its worktree rule, its branch naming). Through the project's declared coding role when there is one — its brief carries the request, the recalled records and the project's rules; otherwise in this session. How to plan, test-first or debug is the project's own process; where craft already has a topic skill for the language or the problem (craft:rust-testing, craft:debugging, craft:refactoring, …), use it — this skill adds none.

Finish the phase with the project's gate green (its declared command), the work committed on the branch, and the tree clean: a review engine reviews uncommitted changes instead of the branch when the tree is dirty.

Phase 4 — Review loop until convergence

The review here is the project's declared reviewer or review rule when there is one. Otherwise it is the craft:review workflow, whatever the stack of the branch diff: it reviews Rust, Nix and SQL under their profiles and other source under its general lenses, in one run, with one verdict and one report.

Once each engine run of this cycle has ended (completed, failed or stopped — not while you may still resume it), fold its real cost into the records it filed: sh "<this skill's base directory>/../../integrations/shared/craft-cli.sh" runs enrich-cost --run-id <wf_…>, with the run id the Workflow completion names. Best-effort: if it fails, say so in one line and go on.

The loop is light by default. The first round reviews the whole branch diff; every later round reviews only the delta the fixes changed, together with the findings that delta touched — not the whole diff again — and at depth: 'light': the diff-scoped lenses once, Medium and above verified (and a weak assertion naming its regression), with extraLenses: [] so a light round does not run the repository's own reviewers over a delta. Full depth runs only in round 1 and in phase 5, where the whole diff is reviewed once more. Only on the human's word ("full rounds") does every round review the whole branch diff. Before each round, note git rev-parse HEAD — the commit that round reviews.

The engine's argument for each round, as an object (never a string):

Roundcraft:review
1{ base: <trunk>, fresh: true, fullEvery: 0 }
2 and later, light{ base: <trunk>, fullEvery: 0, depth: 'light', extraLenses: [] }
2 and later, full rounds{ base: <trunk>, fresh: true }
  • craft:review keeps the loop's memory itself: fresh on round 1 starts a new chain (an older run on this branch is not this cycle's round), and each later round chains to the one before it, scans the fix commits only (fullEvery: 0 turns off its periodic whole-diff rescan) and checks every finding the previous round left open again — whether it was fixed, is still there, or came back; depth: 'light' does not skip that check. Its light row holds only when the findings are this loop's previous round: it chains to the newest earlier run on the branch, whatever made the findings. Findings from elsewhere (a human's PR review) take craft:addressing-findings step 7's arguments: the commit that review was made on as base, with fresh: true.
  • Add priorDecisions: [...] only for records the store may not hold yet — rejections just read from PR threads, or a decision from this loop whose write failed — verbatim, each with its kind, title and scope. The engine recalls the project's active decisions, questions and project rules for the diff's paths itself on every launch.
  • craft:review also takes depth and extraLenses (the loop's later light rounds set depth: 'light' and extraLenses: [], as the table says: a light pass with extraLenses absent would discover and run the repository's own reviewers over each delta; the human may name them). Round 1 and full rounds leave extraLenses at its default. depth: 'light' is a cheaper pass: one round of the diff-scoped lenses only (no negative-space or invariants lens; tests and intent still run whenever the diff changes production code, reconciler and failure-windows on controller code, compat on a public contract path), no completeness critic, and only Medium and above verified (plus a Low/Info finding two or more lenses reported with a must-fix harm claimed, and a weak assertion naming its regression, whose verifier is asked whether the change's promise is unmet); its verdict says light pass and its report names what it skipped. The default, depth: 'full', is the whole review. The engine accepts only depth: 'light'; any other value runs full. Deciding that a "quick" or "light" request means depth: 'light' is the job of the skill or hook that launches it, not the engine's. extraLenses runs the repository's own reviewing agents as lenses in the same run, their findings verified and counted with the rest: on a light pass with the argument absent, the engine finds them itself among the .claude/agents of the project the session runs in, only when repo is absent or names that project or one of its worktrees; on a foreign repo discovery is skipped and the report says so (agents that review and have no edit tool; each is told to stay read-only; the report says when there is none); a full review runs them only when named. extraLenses: ['<agent>', ...] names them at either depth; extraLenses: [] turns them off. A named agent that does not exist or fails is a coverage gap in the report, and the run still completes; on an empty or docs-only diff it is listed as not needed. A discovered agent that cannot run is reported as such and is no coverage gap.

One round is:

  1. Review — launch the engine with the round's argument above.
  2. Triage — every report, whatever its size, → the craft:triage-findings workflow, launched by this session (never a subagent), with report = the round's review report written to a file in the session's temporary directory (it lives only in the session; the workflow's pr gather reads only a PR's threads), plus pr whenever a PR exists, and prBase = the output of git merge-base origin/<trunk> <reviewed head> (the commit the branch forks from: only there is a finding shown not to be this branch's; passed only when the reviewed head is a branch diverging from trunk, together with base = the reviewed head's SHA, and left out on trunk; without it each such finding comes back as needs-decision), and, when the round's review ran with repo (a branch in its own worktree), the same repo, so triage reads the checkout that was reviewed, not the session's own. This session then writes every disposition to memory and files the workflow's issues before any fixer starts (craft:addressing-findings, "Who triages"). Then, once per round, the recurring-findings check that step 3 no longer reaches (addressing-findings' step 0): run "$CRAFT_BIN" runs recurring --path <path> … for the paths the round's findings touch, resolving CRAFT_BIN with sh "<this skill's base directory>/../../integrations/shared/craft-cli.sh" --ensure --print-path first (stop this check and report a failed resolution; a non-zero exit of runs recurring — an unreadable store — is reported to the human with its stderr, never as no group). It needs no Node (under Git Bash the script caches craft.exe; not observed on a Windows host); only on native Windows without sh, fall back to node "<this skill's base directory>/../../integrations/shared/craft-bin.mjs" ensure. Show each group, and offer the author a lesson per group — recorded only on their yes (addressing-findings, "Recurring findings").
  3. Address — craft:addressing-findings, entered at its step 5 with step 2's plan in hand (its "Entered with a plan already made"): no second recall, triage or memory write — step 2 did them. It fixes the accepted ones and verifies them (steps 5 and 6); a disposition that changes while fixing is recorded then, once. Stop it there: its re-review (step 7) is this loop's next round, and its PR-thread replies (step 8) have no PR yet. Gate green and commit again before the next round.

A finding marked as going against a project-memory record (craft:review's Contradicts project memory section) is a defect: fix it, or change the record with the human's word — never reject it as a doubt. A line there marked not confirmed is the exception: a doubt to check (verify it before fixing), not a certain defect; in craft:review with comment it is also listed under Doubtful, the record named first.

Count the rounds, and stop on one of these — nothing else ends the loop:

  • Converged — the round's review returned a verdict and no finding of Medium severity or higher is open: none raised by this round, and none carried open from an earlier round. Open means not set aside by a decision or deferred question in memory, nor covered by a project rule (the report's High rejected by a human / Rejected before / Known and deferred / Covered by project rules) — a Medium+ finding raised again after its fix holds the loop like a new one. Low findings never hold the loop. A delta or light round never says Approve — a clean one says Warning and names that cap — so convergence reads the open Medium+ count, not the verdict word. → go to phase 5.
  • Round 4 ended without converging — stop. Tell the human what is left: each open Medium+ finding (title, file, severity, why it is still open) and the rounds' verdicts. No PR without the human's word.
  • A round without a verdict — the engine returned INCOMPLETE, died, or is not available — is not convergence and does not count as a clean round. Say what did not run. Retry the review once if the cause is transient (the retry is the same round); still no verdict → stop as above and tell the human. An INCOMPLETE that says the harness's permission check refused a command is no transient: show the human the refused command and the Bash(<binary> review:*) rule it names, which should let the run go on (not yet observed under auto mode); once they have added it, continue with run=<the run directory it names> — the same round, its steps so far kept; never add the rule yourself. A craft engine that died with at workflow.js:<line>:<column>: node "<this skill's base directory>/../../integrations/shared/engine-source-map.mjs" <engine> workflow.js:<line>:<column> gives the place in the plugin's source (or, for an engine without a map, the line of workflows/<engine>.js) — quote it when you report the failure.

A declared reviewer that reports no severities cannot show convergence by itself: ask it for severities on its findings, or treat each of its findings as Medium.

Print one line per round: develop: round <n>/4 (<whole diff | delta since <sha>>) — <engine> verdict <V>, open Medium+: <k> (<titles>).

Phase 5 — Full review

Only after the loop converged, and once. Always, for every diff, the craft:review workflow over the whole branch diff with { base: <trunk>, strict: true, fresh: true } — no delta, no path: the harsh maintainability bar over every profile (fresh: without it the run would chain to the loop and scan the last delta only). For a diff that touches Rust, the craft:rust-audit workflow, { base: <trunk> }, may run beside it (it reviews the Rust crates only); it never replaces the craft:review run. The project's declared reviewer (or its rule for the last review before a PR), when there is one, runs beside it over the same diff — in addition, never instead. Both verdicts count: a Medium+ finding from either side stays open.

Findings from the full review go through craft:addressing-findings like a loop round. An open Medium+ finding here reopens phase 4 within the same 4-round budget (the rounds already spent count); the reopened rounds are light ones — their delta starts at the HEAD the full review reviewed — and after it converges again the full review runs once more. A full review without a verdict is handled as in phase 4.

Phase 6 — Record the cycle

When the cycle ends — converged with a clean full review, capped at round 4, or stopped without a verdict — file one record of it in craft's run store, from the reviewed repository on the branch:

sh "<this skill's base directory>/../../integrations/shared/craft-cli.sh" runs develop-cycle <<'JSON'
{"mode": "light", "outcome": "converged",
 "rounds": [{"engine": "craft:review", "scope": "full", "verdict": "Warning", "mediumPlus": 2},
            {"engine": "craft:review", "scope": "delta", "verdict": "Warning", "mediumPlus": 0}],
 "fullReviews": [{"afterRound": 2, "engine": "craft:review", "verdict": "Approve", "mediumPlus": 0}]}
JSON

mode is light or full; outcome is converged, capped or no-verdict; each round's scope is full (the whole branch diff) or delta, its mediumPlus the open Medium+ count after it (null for a round without a verdict); a declared reviewer is named as the engine. It prints the file it wrote; a refusal names the field that does not fit — fix it and file again. A failure to file is named in one line and changes nothing else.

Phase 7 — PR

Only after phase 5 ended clean — or on the human's explicit word when the loop did not converge. Follow the project's PR rules (title form, body sections, what must be linked, who opens it, draft or not); none declared → title in the repository's commit style, body naming what changed, the loop's rounds and verdicts, the full review's verdict, and each finding left open with why. The project's rules on pushing and opening PRs (and on asking first) apply unchanged.

Once gh pr create has opened the PR, craft's hook asks GitHub for the PR's head and base and looks in the run store for a finished, full craft:review run of that head and the PR's whole change (not delta, light, path-scoped, dirty, partial, nested, INCOMPLETE or PARTIAL COVERAGE, over the PR's base); a craft:rust-audit run does not count. It says when there is none, naming the branch's last run, or when it could not check — even when the project's declared reviewer also ran in phase 5. That line goes to the human as it is, with the offer to run the review; a declared reviewer's verdict does not answer it.

Boundaries

  • Working an existing set of findings, without the rest of the cycle → craft:addressing-findings.
  • A single review of a diff → the review workflows directly.
  • A review posting to an open PR (comment) posts defects only; its doubtful findings go to the human first → craft:addressing-findings.
  • Recording or recalling a single fact → craft:memory.
  • Planning, test-first, debugging method, verification discipline → the project's own process; craft does not ship one.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.