一键导入
一键导入
| name | subagents-discipline |
| description | Core engineering principles for implementation tasks |
Before implementing anything, read the bead comments for context:
bd show {BEAD_ID}
bd comments {BEAD_ID}
The orchestrator's dispatch prompt is automatically logged as a DISPATCH comment on the bead. This contains:
Use this context. Don't re-investigate. The comments contain everything you need to implement confidently.
If no dispatch or context comments exist, ask the orchestrator to provide context before proceeding.
Before writing code that touches external data (API, database, file, config):
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
Principle: Optimize for the fastest way to verify your work actually works.
| You built | Fast verification | Slower alternative |
|---|---|---|
| API endpoint | curl the endpoint, check response | Write integration test |
| Database change | Run migration, query the result | Write migration test |
| Frontend component | Load in browser, interact with it | Write component test |
| CLI tool | Run the command, check output | Write unit test |
| Config change | Restart service, verify behavior | N/A — just verify |
Two strategies:
User Journey Tests — Test actual behavior as a user experiences it:
# API: curl with real data
curl -X POST localhost:3000/api/users -d '{"name":"test"}' -H "Content-Type: application/json"
# CLI: run the command
bd create "Test" -d "Testing" && bd list
# Error case: curl with invalid auth
curl -X POST localhost:3000/api/users -H "Authorization: Bearer invalid"
Component Tests — Supplement for regression prevention when fast verification isn't possible:
"Close the Loop" principle: Run the actual thing. Verify it works. Check error cases.
Good: "Curled endpoint with invalid auth, got 401 as expected" Bad: "Wrote tests, they compile"
Before claiming you can't fully test:
If you deviated from the orchestrator's suggestion, found a better path, or made a choice future maintainers might question:
bd comment {BEAD_ID} "APPROACH: Used X instead of Y because Z"
When to log:
Skip if the code is self-explanatory. This is not enforced.
If your BEAD_ID contains a dot (e.g., BD-001.2), you're implementing part of a larger feature:
bd show {EPIC_ID} --json | jq -r '.[0].design'When you catch yourself thinking:
Bootstrap lean multi-agent orchestration with beads task tracking. Use for projects needing agent delegation without heavy MCP overhead.
Bootstrap lean multi-agent orchestration with beads task tracking. Use for projects needing agent delegation without heavy MCP overhead.
Invoke at the start of any implementation task to enforce verification-first development
React and Next.js performance optimization patterns. Use BEFORE implementing any React code to ensure best practices are followed.