agentleFS
AvivK5498AvivK5498/The-Claude-Protocol/skills/subagents-discipline/SKILL.md

subagents-discipline

Skill348 starsChanged 11 months agoMITView on GitHub

Invoke at the start of any implementation task to enforce verification-first development

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 1

    1. websublime/mister-anderson★ 312% same

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 13 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Core principle: Test the FEATURE, not just the component you built.

    line 8
  2. Distinctive:

    Before writing code that touches external data (API, database, file, config):

    line 16
  3. Distinctive:

    Fetch/read the ACTUAL data: - run the command, see the output

    line 18
  4. Distinctive:

    Note exact field names, types, formats: - not what docs say, what you SEE

    line 19
  5. Distinctive:

    Code against what you observed: - not what you assumed

    line 20
  6. Distinctive:

    Only then claim done

    line 55
  7. Distinctive:

    Before claiming you can't fully test:

    line 59
  8. Distinctive:

    Every completion must include evidence.

    line 71
  9. Distinctive:

    If you genuinely cannot test end-to-end (long-running job, external service, no browser tools):

    line 86
  10. Distinctive:

    No browser/UI automation tools available

    line 106
  11. Very specific:

    If your BEAD_ID contains a dot (e.g., BD-001.2), you're implementing part of a larger feature:

    line 115
  12. Distinctive:

    When you catch yourself thinking:

    line 139
  13. Distinctive:

    When you're about to say:

    line 145
  14. Distinctive:

    Test the feature like a user would use it.

    line 158

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

Implementation Discipline

Core principle: Test the FEATURE, not just the component you built.


Three Rules

Rule 1: Look Before You Code

Before writing code that touches external data (API, database, file, config):

  1. Fetch/read the ACTUAL data - run the command, see the output
  2. Note exact field names, types, formats - not what docs say, what you SEE
  3. Code against what you observed - not what you assumed

This catches: field name mismatches, wrong data shapes, missing fields, format differences.

WITHOUT looking first:
  Assumed: column is "reference_images"
  Reality: column is "reference_image_url"
  Result:  Query fails

WITH looking first:
  Ran: SELECT column_name FROM information_schema.columns WHERE table_name = 'assets';
  Saw: reference_image_url
  Coded against: reference_image_url
  Result: Works

Rule 2: Test Both Levels

Component test catches: logic bugs, edge cases, type errors Feature test catches: integration bugs, auth issues, data flow problems

Both are required. Component test alone is NOT sufficient.

You builtComponent testFeature test
API endpointcurl returns 200UI calls API, displays result
Database changeMigration runsApp reads/writes correctly
Frontend componentRenders, no errorsUser can see and interact
Full-stack featureEach piece works aloneEnd-to-end flow works

The pattern:

  1. Build the thing
  2. Component test - verify your piece works in isolation
  3. Feature test - verify the integrated feature works end-to-end
  4. Only then claim done

Rule 3: Use Your Tools

Before claiming you can't fully test:

  1. Check what MCP servers you have access to - list available tools
  2. If any tool can help verify the feature works, use it
  3. Be resourceful - browser automation, database inspection, API testing tools

"I couldn't test the feature" is only valid after exhausting available options.


DEMO Block (Required)

Every completion must include evidence. Code reviewer will verify this.

DEMO:
  COMPONENT:
    Command: [what you ran to test the component]
    Result: [what you observed]

  FEATURE:
    Steps: [how you tested the integrated feature]
    Result: [what you observed - screenshot, output, etc.]

When Full Feature Test Isn't Possible

If you genuinely cannot test end-to-end (long-running job, external service, no browser tools):

DEMO:
  COMPONENT:
    Command: curl localhost:3008/api/endpoint
    Result: 200, returns expected data

  FEATURE: PARTIAL
    Verified: [what you could test]
    Needs human check: [what still needs verification]
    Why: [specific reason - no browser MCP, takes 10+ minutes, requires external service]

Not acceptable reasons for PARTIAL:

  • "Server wasn't running" → start it
  • "Didn't have test data" → create it
  • "Would take too long" → if < 2 minutes, do it

Acceptable reasons:

  • No browser/UI automation tools available
  • External API with rate limits or costs
  • Job takes > 5 minutes to complete
  • Requires production data that can't be mocked

For Epic Children

If your BEAD_ID contains a dot (e.g., BD-001.2), you're implementing part of a larger feature:

  1. Check for design doc: bd show {EPIC_ID} --json | jq -r '.[0].design'
  2. Read it if it exists - this is your contract
  3. Match it exactly - same field names, same types, same shapes

Design docs ensure all pieces fit together. If you deviate, integration fails.


Completion Checklist

Before marking done:

  • Looked at actual data/interfaces before coding (not assumed)
  • Component test passes (your piece works in isolation)
  • Feature test passes OR documented as PARTIAL with valid reason
  • DEMO block included with evidence
  • Used available tools to test (checked MCP servers, used what helps)

Red Flags - Stop and Verify

When you catch yourself thinking:

  • "This should work..." → run it and see
  • "I assume the field is..." → look at the actual data
  • "I'll test it later..." → test it now
  • "It's too simple to break..." → verify anyway

When you're about to say:

  • "Done!" / "Fixed!" / "Should work now!" → show the DEMO first

The Bottom Line

Component test passing ≠ feature works
Curl returning 200 ≠ UI displays correctly
TypeScript compiles ≠ user can use it

Test the feature like a user would use it. Then show evidence. Then claim done.

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.