agentleFS
curie-engcurie-eng/curie/.claude/skills/implement/SKILL.md

implement

Skill53 starsChanged 4 months agoApache-2.0View on GitHub

Implement a ticket or feature with proportional planning, test first behavior changes, independent review when available, and verification through the real affected surface.

192 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup-ts-deep-modules, ask-matt and 10 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.
  • liufeng1976Skill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 53 projects that use this

  • GoogleSkill

    ask-matt

    Ask which skill or flow fits your situation. A router over the skills in this repo.

    Also in 109 projects that use this

  • AWSSkill

    to-questionnaire

    Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

    Also in 107 projects that use this

  • richard12511Skill

    claude-handoff

    Hand the current conversation off to a fresh background agent that picks up the work immediately.

    Also in 51 projects that use this

  • GoogleSkill

    to-tickets

    Break a plan, spec, or the current conversation into a set of tracer-bullet tickets, each declaring its blocking edges, published to the configured tracker — edges as text in one file per ticket locally, or native blocking links on a real tracker.

    Also in 198 projects that use this

  • RoentekSkill

    loop-me

    Grill me about specs for the workflows I want to build, within this workspace.

    Also in 58 projects that use this

  • +1 more from google

The file

Show its rules and text

We split this skill into the rules it gives an agent

28 rules. 0 are common, 22 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 177 edited versions we read keep these.

  • 22

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this as the default entry point for a ticket with clear acceptance criteria.

    line 16
  2. Distinctive:

    Use the lightest process that can prove the requested behavior.

    line 17
  3. Distinctive:

    Use the active environment for implementation.

    line 23
  4. Distinctive:

    If another independent provider is available locally, use it for a read only plan or diff review.

    line 26
  5. Distinctive:

    Never install, configure, authenticate, or invoke a provider solely to satisfy this workflow.

    line 32
  6. Distinctive:

    Read the ticket and its linked requirements.

    line 39
  7. Distinctive:

    Read the repository instructions and the relevant architecture or component docs.

    line 40
  8. Very specific:

    Check for an existing branch or worktree for the ticket.

    line 41
  9. Distinctive:

    Never commit directly to either release train.

    line 58
  10. Distinctive:

    Run the focused existing tests, type checks, and lint for the affected area.

    line 60
  11. Very specific:

    Keep a small state file inside the worktree at .projects/plans/<branch-name>.state.json, beside the plan when there is one.

    line 65
  12. Very specific:

    Update it at each stage boundary, including open_findings as reviews produce findings and fixes clear them.

    line 104
  13. Very specific:

    When a blocker or an unresolvable ambiguity appears after triage, set status to blocked, record the open question, surface it, and stop.

    line 123
  14. Distinctive:

    Keep edits within the ticket's acceptance criteria.

    line 176
  15. Distinctive:

    Keep the roles separate, whether they are separate agents or one session working in order:

    line 181
  16. Distinctive:

    Default to no spike. Evaluate this gate only on the build path, after the plan and any plan review, and before the first test is written.

    line 229
  17. Distinctive:

    Run a spike only when all four of these hold:

    line 233
  18. Distinctive:

    If that claim is false, the plan, scope, a dependency, or the architecture materially changes.

    line 236
  19. Distinctive:

    If a failed assumption would not change an implementation decision, do not spike.

    line 243
  20. Distinctive:

    Treat the economics as a high bar, not a calculation.

    line 244
  21. Distinctive:

    Run at most two throwaway spikes in one run without explicit user approval.

    line 262
  22. Distinctive:

    Every finding must confirm, revise, or reject the plan.

    line 266
  23. Distinctive:

    Every behavior changing change receives a code review and a scope review after the affected tests pass.

    line 275
  24. Distinctive:

    Add a security review for authorization, secrets, payments, personally identifiable information, or tenant boundaries.

    line 294
  25. Distinctive:

    Before completion, run the full affected test suite plus the relevant type check and lint.

    line 304
  26. Very specific:

    When the pull request this run will open uses a GitHub closing keyword (Closes, Fixes, Resolves, and their past-tense forms) on an issue …

    line 310
  27. Very specific:

    If the diff does not implement an AC, the PR uses Ref and leaves the issue open.

    line 322
  28. Distinctive:

    Stop for the same reason when the run itself stops converging: repeated fix and review rounds without the review stage closing, an agent or …

    line 336

“Common” is measured: kept by at least 6 in 10 of the 177 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

Implement

Usage: /implement [ticket URL, ID, or description]

Use this as the default entry point for a ticket with clear acceptance criteria. Use the lightest process that can prove the requested behavior. Stop and ask for direction when the ticket cannot be read, its acceptance criteria are materially ambiguous, or implementation would require a decision outside the ticket.

Portable provider policy

Use the active environment for implementation. Do not require a particular agent, model, CLI, plugin, or hosted service.

If another independent provider is available locally, use it for a read only plan or diff review. Claude, Codex, and OpenCode are examples, not requirements. Keep execution with one provider and use another only to challenge the plan or completed diff. When no independent provider is available, use a fresh reviewer context in the active environment and state that the review was single provider.

Never install, configure, authenticate, or invoke a provider solely to satisfy this workflow. Never depend on home directory paths, custom profiles, personal hooks, metrics, queues, databases, background jobs, private credentials, or machine local helper scripts. Repository instructions and available tools are authoritative.

Setup

  1. Read the ticket and its linked requirements. Do not infer scope from an ID alone.
  2. Read the repository instructions and the relevant architecture or component docs.
  3. Check for an existing branch or worktree for the ticket. If one exists, read .projects/plans/<branch-name>.state.json inside it and resume from the stage it records rather than repeating finished work. See Run state below. Otherwise select the target release train before creating work:

    WorkBase and PR target
    General bug, security fix, or shared changemain
    v0.7 feature or a bug unique to unreleased v0.7 worknext

    Fetch the chosen base and create the worktree from its remote tip:

    git fetch origin <base>
    git worktree add <path> -b task/<short-description> "$(git rev-parse origin/<base>)"

    Never commit directly to either release train. If the ticket does not make the target clear, stop and ask.

  4. Run the focused existing tests, type checks, and lint for the affected area. Stop on a relevant baseline failure. Record unrelated failures without widening scope.

Run state

Keep a small state file inside the worktree at .projects/plans/<branch-name>.state.json, beside the plan when there is one. .projects/ is git ignored, so it never reaches a commit.

{
  "branch": "task/short-description",
  "ticket": "<id or null>",
  "path": "direct | quick | build",
  "stage": "setup | triage | plan | de risk | build | review | done check | finish",
  "status": "in progress | blocked | done",
  "open_findings": ["<review finding not yet fixed>"],
  "e2e": {
    "decision": {
      "boundary": "<cheapest executable boundary that proves the changed contract>",
      "reason": "<failure mode this boundary observes>",
      "ci": "<current-head CI URL for proof CI produces, or null>"
    },
    "evidence": [
      {
        "boundary": "<selected executable boundary>",
        "criterion": "<the acceptance criterion this observation proves>",
        "command": "<exact command as run>",
        "commit": "<candidate commit the run observed>",
        "artifact": "<image tag, chart release, bundle ref, or trace id, or null>",
        "mode": "fake | live",
        "outcome": "pass | fail | blocked",
        "observed": "<the literal assertion, output line, or value observed, not a restatement of outcome>",
        "negative": "<shared control corpus reference for the mechanism, or a second independent path>",
        "teardown": "<what was torn down, or why it was left running>",
        "blocker": "<what stopped this run, or null>",
        "skip_reason": "<why required proof is missing, or null>"
      }
    ]
  },
  "updated": "<ISO8601 UTC>"
}

Update it at each stage boundary, including open_findings as reviews produce findings and fixes clear them. A run gets interrupted: a session ends, a context fills, a day passes. Without this file the next run either repeats finished stages or skips an unfinished one, and outstanding findings that lived only in a lost context are lost with it. A direct path change finishes with nothing to resume, so the file is optional there.

Record the cheapest boundary and its failure mode at triage. Read current-head CI tier results from CI rather than copying them into run state or the PR body. Record what was actually run locally. Require additional local, live or external proof only where CI cannot produce it, with the exact command, candidate commit, mode and observed outcome. Reference one shared negative-control corpus per mechanism instead of copying controls at each tier or criterion; use a second independent path when no negative is constructible. Fill artifact when a run produces an identifiable image, release, bundle or trace, and teardown when its owned resources are released. Missing required proof records a blocked outcome, its blocker and skip reason; a CI URL without a passing current-head result does not establish proof.

When a blocker or an unresolvable ambiguity appears after triage, set status to blocked, record the open question, surface it, and stop. The resume check in Setup picks the run up from there.

Triage

Classify from the work, not from a requested process size.

PathUse whenMinimum proof
DirectMechanical, non behavioral changeFocused validation and review of the diff
QuickSmall, single stream behavior change with clear criteriaFailing test, implementation, focused suite, code and scope review
BuildMultiple streams, architecture, security, deployment, or unclear interactionsWritten plan, separate test and implementation contexts, reviews, and real surface verification, which is required by default

Promote a direct or quick change when its real scope exceeds the selected path. Do not add a planning artifact for a trivial mechanical change. If a quick change turns up an assumption that qualifies for the de risk gate below, promote it to build before its first edit. If that assumption only appears after an edit, stop and either escalate or restart as a build path change; do not carry those edits forward.

Choose the cheapest executable boundary that proves the changed contract, per AGENTS.md. A higher tier needs a failure mode the lower tier cannot see. Read CI tier results from CI; record what ran locally and require additional local, live or external proof only where CI cannot produce it. A change with no runtime behavior records that reason once and runs the validators appropriate to the changed artifact. File type alone does not grant that exemption.

The path set is runner MCP catalog projection, unscoped PreToolUse, in-process platform MCP tools, workspace publication, and built-in coding-tool session capability. A behavior-bearing change that reaches any of those reaches both live-provider and external-integration. Those proof requirements apply on that path. External-integration proof can be satisfied by a CLI-driven cluster run: curie cluster message starts a turn with no Slack app, and an operator principal (curie cluster approvals <agent> --mint-operator-principal <USER>, then CURIE_APPROVAL_PRINCIPAL_TOKEN and --resolve/--reject) resolves the approval, provided the route binds approvers.users explicitly. Require a real Slack click only where the Slack transport is itself the component under test, which today means the two-release Socket Mode ownership behavior and, until publication approvals carry a route, workspace publication. "No model routing change" is not a valid n/a reason. Fake-model kind, skill ladder, and helper-only tests remain useful and are not sufficient for those acceptance criteria. Leave the required-tier item open when the evidence is missing; do not claim missing proof passed. This rule does not pull the live e2e ladder onto unrelated pull requests.

Build rules

For a behavior change, write or update the test first and confirm it fails for the intended reason. The test writer and implementer use separate fresh contexts when the environment supports delegation. Otherwise keep the same separation in order: write the test, run it red, then implement.

Keep edits within the ticket's acceptance criteria. Do not weaken tests, add compatibility paths merely to preserve a caller, or replace a real integration with an internal mock. Use mocks only for external or slow dependencies. Review every caller when a return type or contract changes.

Keep the roles separate, whether they are separate agents or one session working in order:

  1. The test writer touches test paths only, never production source.
  2. The implementer touches its own stream's source, never the tests, and never its own review findings.
  3. A reviewer reads and reports, and never edits.
  4. A fix addresses one finding area. Do not batch unrelated findings into a single pass, and do not let a fix widen into a refactor.

For a build path, write a short plan that identifies behavior sites, affected files, test strategy, edge cases, and observable done conditions before implementation. Have an independent available provider review the plan when the change is architectural or crosses a contract boundary.

Where the plan quotes source excerpts, confirm each one still resolves on the fresh base before implementation starts, with a read only search per excerpt. An excerpt that no longer matches means the plan was written against code that has moved or never existed. Send those back to be relocated rather than handing the implementer a stale target or quietly dropping the block.

Prior intent

On the build path, before implementing, find out what the code you are about to change was there for. Blame the target line ranges, take the recent touching commits, and read the tickets or issues they reference. Record what you find in the plan so the implementer builds with it and the reviewer can check the change against it.

The failure this prevents is silent. A change can satisfy every one of its own acceptance criteria while undoing an earlier deliberate decision. Nothing in the current ticket describes that decision, so no other step in this workflow would catch it.

Context discipline

Where the environment supports delegation, every brief tells its agent to return under about three hundred words and to write anything longer to a file and return the path. An agent's report stays in the caller's context and is re read on every later turn, so a long report is paid for again on each one. This governs where output goes and never what an agent checks or builds.

The same rule binds the caller. Send test suite output, diffs, reviews, and log sweeps to a file and read back a count or a tail. Do not read a large artifact into the caller's own context in order to check it.

De risk gate

Default to no spike. Evaluate this gate only on the build path, after the plan and any plan review, and before the first test is written. A direct or quick change never runs a spike.

Run a spike only when all four of these hold:

  1. The plan depends on a specific claim that has not been observed.
  2. If that claim is false, the plan, scope, a dependency, or the architecture materially changes.
  3. Documentation, source, existing tests, and prior observed evidence cannot settle the claim confidently.
  4. A bounded experiment is materially cheaper than discovering the false claim during implementation.

If a failed assumption would not change an implementation decision, do not spike. Treat the economics as a high bar, not a calculation. There should be a plausible chance the assumption is wrong, failure should cost about a day of work or invalidate a whole stream, the probe should fit inside thirty minutes, and the avoided waste should clearly exceed the probe cost. Do not compute a numeric probability.

Choose one of two kinds:

  1. Tracer, preferred whenever the experiment can safely be the first narrow production slice. It is kept production code and follows the normal test first, review, and verification rules. Run that slice alone: write its test, implement it, and harvest its observable result before releasing any remaining stream.
  2. Throwaway, allowed only when execution is required and the evidence cannot come from a safe production slice. Brief exactly one uncertainty, one observable pass or fail result, a scope limited to that question, a cap of thirty minutes, and a written finding. Run it outside the committed tree, never commit it, harvest the evidence, then delete it. Code existing is not a finding.

Run at most two throwaway spikes in one run without explicit user approval. If a spike does not settle its question inside the cap, stop it and either halt or escalate. Do not let it drift into implementation.

Every finding must confirm, revise, or reject the plan. When a finding materially changes the plan, revise the plan and repeat whichever plan review applied to it. A throwaway must settle before any test for the change is written. After a tracer, no remaining stream proceeds until a revised plan clears that same review. When a finding exposes unclear acceptance criteria or product behavior, stop and ask. A spike gathers technical evidence and never makes a product decision.

Review and verification

Every behavior changing change receives a code review and a scope review after the affected tests pass. Reviewers are read only. Route findings back to the executor, then rerun the relevant checks.

Those two reviews are not waivable. No instruction in a task prompt, no time pressure, and no session setting skips them on a change that alters behavior. If an instruction appears to waive one, run it anyway and record in the summary that the instruction was overridden and why. Proof of the changed contract is required on the same terms. Everything else in this workflow is proportional to the change and may legitimately not run.

Each reviewer writes its full findings to .projects/plans/<branch-name>.findings.<reviewer>.md and returns only a routing index: how many findings, in which areas, touching which files. Fixes read the detail back out of that file. A review is not complete until its findings file exists, and that holds when the count is zero. A review whose only record is the claim that it passed leaves nothing to check, and a skipped review looks exactly the same from the outside.

Add a security review for authorization, secrets, payments, personally identifiable information, or tenant boundaries. Verify the changed contract through its selected real boundary; read CI proof from CI and record local observations as they happen. Static checks alone never prove a runtime acceptance criterion, and neither does a fake-tier pass on a criterion about a real provider. Each meaningful acceptance criterion carries positive proof, with one shared negative-control corpus per mechanism or a second independent path where no negative is constructible, per Evidence per acceptance criterion in AGENTS.md.

Before completion, run the full affected test suite plus the relevant type check and lint. Check sibling paths when the change touches a known seam or guard. Demonstrate that a new or modified guard rejects violating input through its real consumer path.

P0, release-blocker, and sre-bot-e2e-demo Closes

When the pull request this run will open uses a GitHub closing keyword (Closes, Fixes, Resolves, and their past-tense forms) on an issue labeled P0, release-blocker, or sre-bot-e2e-demo, the review stage adds one extra read-only spec-vs-impl pass. That pass's only job is: each issue acceptance criterion is visible in the product diff, not only in verification prose or the Fix pin selector. Scope review already asks whether each hunk traces to an AC; this pass asks the converse, whether each AC is in the diff.

A string or refusal-text test cannot be the sole pin for a routing, catalog, or live-trace AC. The documented insufficient pin is #2209, which closed #2202 with a message-only Fix pin on the record-miss copy; #2248 reopened the routing AC.

If the diff does not implement an AC, the PR uses Ref and leaves the issue open.

Ordinary bugfixes that close neither of those labels are unchanged: the existing code review, scope review, and Fix pin rules still apply, and this extra pass does not run.

Stop and escalate

Hand the decision back rather than pressing on when reviews cannot converge after three rounds, when implementation reveals an approach the plan did not cover, when real surface verification shows the shape is wrong, or when a choice needs authority the ticket does not carry.

Stop for the same reason when the run itself stops converging: repeated fix and review rounds without the review stage closing, an agent or a spawn count far past what the change warrants, or a context that keeps hitting its limit. A run that reports it is not converging is a successful outcome; a run that keeps spending is not. Neither stop ever skips a review or weakens a gate.

Done check

Work through this list before presenting the diff, and report it as the filled list itself, each item checked or marked not applicable with one line of evidence. Prose that covers similar ground does not satisfy it. The filled list is the artifact, and an item nobody had to answer for is an item nobody checked.

  1. Failing tests were written and seen to fail before any implementation code
  2. The test writer and the implementer worked in separate contexts
  3. Code review passed, with its findings file on disk
  4. Scope review passed, with its findings file on disk, and every non trivial hunk traces to an acceptance criterion, a mechanical exception, or an out of scope note in the pull request
  5. Every broadened return type or changed contract had its callers checked
  6. Sibling paths enumerated, and each one covered by this change, routed through a shared helper, or filed as a follow up issue with its number
  7. Every new or changed guard was seen rejecting violating input through its real consumer path, by running it rather than by reading it
  8. Security review passed, where the change touches that surface
  9. The real affected surface was exercised, where the change reaches one
  10. The cheapest boundary proving the changed contract is named, with a failure mode the lower tier cannot see if a higher tier is selected
  11. Current-head CI proof is read from CI; local checks actually run and any additional local, live or external proof CI cannot produce are recorded
  12. Every meaningful acceptance criterion has positive proof, with one shared negative-control corpus per mechanism or a second independent path where no negative is constructible
  13. The change does not undo an earlier deliberate decision, per Prior intent
  14. Full affected test suite, type check, and lint pass on the final code
  15. If this PR closes a P0, release-blocker, or sre-bot-e2e-demo issue, spec-vs-impl confirmed each issue AC against the diff, not only the verification prose or the Fix pin selector. Ordinary bugfixes that close neither label mark this n/a.

A quick path change marks the failing tests, separate contexts, and prior intent items not applicable. A direct path change applies only the suite and lint items. The two review items are never not applicable on a change that alters behavior. On a quick or build path they are never not applicable. Missing, failed or blocked proof of the changed contract leaves its item open; CI proof is read from CI.

Route a failed item back into the stage that owns it. Do not present the diff with an item still open. Missing required proof is a blocker: report the selected boundary, the command or CI run, and what stopped it. An absent per-tier row is not a completion blocker.

Finish

Confirm that the final diff satisfies every acceptance criterion and that validation evidence reflects the final code. Present the diff and verification results. Open the PR against the selected release train. For a general fix merged to main, create or request the follow up PR that merges main forward into next; do not normally cherry pick the fix. Follow the repository's commit, push, pull request, and ticket status rules. Do not create a pull request or publish changes without the authority required by those rules.

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.