test-driven-development
Skill1.3k starsChanged 7 months agoMITView on GitHub
Use when the user explicitly requests strict or test-first TDD, or when the current conversation already contains an explicit `TDD Route: strict` decision from another Aegis workflow.
191 other projects use a version of this, 117 of them edited.
Trending
More talk lately.about the whole repository
Most recently taken up by
- NousResearch/hermes-agentedited, first seen Nov 13, 2026
- andreymudri/fleetmatestheir own version, first seen Oct 5, 2026
- Jacobinwwey/notemdprotheir own version, first seen Oct 5, 2026
- crbnos/carbontheir own version, first seen Oct 4, 2026
- L-X-T/ng-agentic-skillsedited, first seen Oct 4, 2026
- GuillemRoca/agent-skills-androidtheir own version, first seen Oct 3, 2026
Who's talking about GanyuanRan/Aegis
- hashgraph-online/awesome-codex-plugins“Add Aegis - agentic skills framework and software development methodology”GitHub · May 7, 2026 · 2 reactions
- sudosubin/agents.nix“agent-skills.github.ganyuanran.aegis: 2.10.7 → 2.12.1”GitHub · Oct 3, 2026
- ProSkillsMD/proskills“[Candidate] ganyuanran/aegis/skills/communicating-concisely - communicating-concisely”GitHub · Oct 2, 2026
- ProSkillsMD/proskills“[Candidate] ganyuanran/aegis/skills/brainstorming - brainstorming”GitHub · Oct 2, 2026
- ProSkillsMD/proskills“[Candidate] ganyuanran/aegis/skills/anti-entropy-governance - anti-entropy-governance”GitHub · Oct 2, 2026
The biggest 5 of 15 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 15
Talked about on GitHub (15 times).
On GitHub · 15
- May 7, 2026Add Aegis - agentic skills framework and software development methodology — hashgraph-online/awesome-codex-plugins2 reactions · 2 comments
- Oct 3, 2026agent-skills.github.ganyuanran.aegis: 2.10.7 → 2.12.1 — sudosubin/agents.nix0 reactions
- Oct 2, 2026[Candidate] ganyuanran/aegis/skills/communicating-concisely - communicating-concisely — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 2, 2026[Candidate] ganyuanran/aegis/skills/brainstorming - brainstorming — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 2, 2026[Candidate] ganyuanran/aegis/skills/anti-entropy-governance - anti-entropy-governance — ProSkillsMD/proskills0 reactions · 1 comment
10 more on GitHub
- Sep 30, 20260.1.22 在 DSH 0.2.0(会话格式 v4)下写入被拒:每轮对话结束抛未捕获的 promise rejection(附最小修复) — TelosmaYLX/dsh-session-notify0 reactions · 1 comment
- Sep 27, 2026agent-skills.github.ganyuanran.aegis: init at 2.10.7 — sudosubin/agents.nix0 reactions
- Sep 14, 2026Weekly discovery: new DeepSeek Harness ecosystem candidates — fendouai/awesome-deepseek-harness0 reactions · 1 comment
- Aug 29, 2026Misclassifies missing Git executable as plugin repository failure — dshplugin/dsh-plugin-hub0 reactions · 1 comment
- Aug 24, 2026fix: use explicit HTTPS URLs for GitHub plugin installs — dshplugin/dsh-plugin-hub0 reactions · 3 comments
- Aug 22, 2026[Audit] aegis — SoberReport-AI/DeepGuard0 reactions · 19 comments
- Jun 15, 2026weekly sync — 2026-06-15 — norbert-pap/claudebert0 reactions
- May 25, 2026Add Aegis — composio-community/awesome-claude-plugins0 reactions
- May 25, 2026Add Aegis — filipecalegario/awesome-vibe-coding0 reactions
- May 25, 2026Add skill: GanyuanRan/Aegis — VoltAgent/awesome-agent-skills0 reactions
Used with
Projects with it also use diagnosing-superpowers, api-and-interface-design 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.
obraSkilldiagnosing-superpowers
Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.
Also in 6 projects that use this
LLl0k0laDSkillapi-and-interface-design
Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.
Also in 32 projects that use this
MorningStar0709Skillworkflow-runner
Run an agency-orchestrator style YAML workflow inside the current Trae conversation by simulating or coordinating multiple roles. Use when the user provides a `.yaml` or `.yml` workflow, asks for multi-role collaboration, says things like “用多个角色一起评审这个 PRD”“多角色协作”“先生成工作流再执行”“让产品经理、架构师、QA 一起看一下”, or wants roles such as product manager, architect, reviewer, or QA to work together. Supports layered execution, role prompting, variable interpolation, document-backed inputs, and parallel steps only when the current environment has a clear subagent mapping. Do not use for ordinary implementation plans, simple code changes, or tasks already covered by `writing-plans`, `executing-plans`, `subagent-driven-development`, or single-purpose review/debug skills.
Also in 5 projects that use this
LLl0k0laDSkillusing-agent-skills
Use when starting a session or when you need to discover which skill applies to the current task. This is the meta-skill that governs how all other skills are discovered and invoked.
Also in 25 projects that use this
MorningStar0709Skillchinese-git-workflow
Configure Git for domestic platforms and manage branching strategies suitable for Chinese teams. Use when the user asks to configure remotes, set up SSH, or manage Git workflows for Gitee, Coding, Jihu GitLab, or CNB, including requests like "配置国内 Git", "设置 Gitee 远程仓库", "推荐适合小团队的 Git 流程".
Also in 4 projects that use this
vinvcnSkillconstraint-driven-development
把一个项目的质量线确立为书面契约,并阻止 agent 悄悄降低它。通过访谈确定用户在意哪些维度,当用户心里没有数字时提供合理的默认阈值,把一切记录进 CONSTRAINTS.md,并盯住 diff 中质量线被削弱的迹象——新增的 @ts-ignore 或 eslint-disable 抑制注释、被跳过或删除的测试、被剥掉的断言、未实现的 stub、被调低的阈值。当没有任何质量线被写下来时使用;当用户说 "set up constraints" 或 "define our standards" 时;当用户希望把他们在意的维度——无障碍性、Web 性能、覆盖率——设置成被强制执行的约束时;当 agent 为了变绿不断静默检查或跳过测试时;当你需要一个覆盖率或性能阈值却不知道该选什么数字时;或者当 agent 写下的代码超出任何人会读的体量时。
Also in 4 projects that use this
- +5 more from LLl0k0laD
Other versions191 projects use a version of this.
Word for word · 0
None found.
Edited · 117
- obra/superpowers★ 314k36% same
- NousResearch/hermes-agent★ 267k11% same
- jnMetaCode/superpowers-zh★ 8.3k20% same
- openai/plugins★ 7.3k39% same
- microsoft/FluidFramework★ 4.9k34% same
- NeoLabHQ/context-engineering-kit★ 1.7k20% same
- coco-research/coco★ 43736% same
- Ibrahim-3d/orchestrator-supaconductor★ 38035% same
- aivrar/portable-hermes-agent★ 23211% same
- graniet/kheish★ 22111% same
107 more not listed
Wrote their own version · 74
- addyosmani/agent-skills★ 101ksame name
- cloudflare/computer★ 9.5ksame name
- mikeyobrien/ralph-orchestrator★ 3.2ksame name
- crbnos/carbon★ 2.7ksame name
- taracodlabs/aiden★ 846same name
- taichuy/1flowbase★ 267same name
- KbWen/agentic-os★ 206same name
- shashankswe2020-ux/whoop-mcp★ 165same name
- ravila4/claude-adhd-skills★ 155same name
- intent-driven-dev/intent-driven-template★ 148same name
64 more not listed
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 repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- anti-entropy-governanceSkill
- brainstormingSkill
- communicating-conciselySkill
- dispatching-parallel-agentsSkill
- establishing-project-contextSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- first-principles-reviewSkill
- goal-framingSkill
- long-task-continuationSkill
- receiving-code-reviewSkill
- recording-architecture-decisionsSkill
- requesting-code-reviewSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- ui-ux-governanceSkill
- update-aegisSkill
- using-aegisSkill
- using-git-worktreesSkill
- verification-before-completionSkill
- writing-plansSkill
- writing-skillsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
27 rules. 1 is common, 16 are distinctive, and 10 are very specific to this project.
1
Common
Most of the 177 edited versions we read keep these.
16
Distinctive
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 29
If you didn't watch the test fail, you don't know if it tests the right thing.
- Distinctive: line 41
Only enter this skill after one of these explicit entry signals exists:
- Distinctive: line 54
Before source edits, decide:
- Very specific: line 73
Use light for tiny low-risk edits with an obvious readback or command check.
- Very specific: line 74
Use skipped for read-only, docs-only, generated, throwaway, comment-only, or environment-bound work where TDD does not fit.
- Very specific: line 85
If this skill was loaded anyway without an explicit TDD request or a visible TDD Route: strict marker, exit instead of improvising an …
- Very specific: line 89
Keep Aegis Visibility task-specific: explain the route decision and the regression boundary, not a generic claim that TDD was used.
- Distinctive: line 97
Before writing tests or production code, stop and route to brainstorming or writing-plans if the current request has any medium- or …
- Distinctive: line 116
Before strict RED/GREEN enters production code edits, make the code-change decision visible.
- Very specific: line 138
If the decision is no-change, do not write tests or production code for a non-change.
- Distinctive: line 146
Before strict TDD on non-trivial work, record the planned complexity budget so RED/GREEN does not silently normalize a wrong or overloaded …
- Very specific: line 157
Use using-aegis/references/complexity-governance.md for shared artifact classes, pressure signals, and the meaning of planned governance.
- Distinctive: line 162
Before production code edits, check whether the intended source edit would add logic to an overloaded or wrong owner.
- Very specific: line 165
Use using-aegis/references/complexity-governance.md for shared pressure signals and the meaning of over-budget.
- Very specific: line 183
If the decision is pause for plan update, stop TDD and return to writing-plans or brainstorming with the evidence.
- Distinctive: line 186
If the predicted result is that this slice would push a maintained artifact over budget and the slice does not also govern that overrun, do …
- Very specific: line 190
When the target edit file is over-budget or mixed-purpose, classify edit intent before production source edits.
- Very specific: line 197
When a medium- or high-complexity task needs project records, use configured Aegis workspace support lazily.
- Distinctive: line 221
Do not promote reusable project facts, decisions, specs, or plans into those directories unless the workflow needs them and no existing …
- Distinctive: line 270
If a new feature changes user-observable behavior, prefer one minimal end-to-end or integration test for the main path before narrower unit …
- Distinctive: line 274
Add unit tests for core rules, boundary conditions, and error branches
- Distinctive: line 285
Test fails (not errors)
- Distinctive: line 295
Write simplest code to pass the test.
- Distinctive: line 329
Don't add features, refactor other code, or "improve" beyond the test.
- Distinctive: line 359
Keep tests green. Don't add behavior.
- Distinctive: line 377
If the current environment cannot run automated tests, state the blocker and provide reproducible manual verification steps.
- Distinctive: line 470
Don't know how to test → write wished-for API first.
“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.
Files
Execute
→ False-positive entry on a native-direct-skill host? → Exit immediately unless the user explicitly asked for TDD or the conversation already contains TDD Route: strict.
In off mode, do not start RED / GREEN / REFACTOR from generic bugfix, contract, shared-module, or risky-code wording alone.
Hand control back to using-aegis, systematic-debugging, writing-plans, or the fast path with verification.
→ Implementing a feature or bugfix under TDD Route strict? → No production code without a failing test first.
Gate: medium/high complexity? → route to brainstorming or writing-plans first.
Mode: default off disables automatic TDD, not completion verification; auto chooses strict/light/skipped by risk.
Change Necessity: before strict RED/GREEN enters production edits, confirm the slice really needs a code change.
Cycle: RED (write test → watch it fail) → GREEN (minimal code → watch it pass) → REFACTOR (clean up → keep green)
Regression: shared module → related tests. contract change → producer + consumer. core logic → old + new tests.
Ripple signal hit → cover producer+consumer or real user path before claiming green.
GREEN proves the currently expressed behavior slice only.
GREEN does not by itself prove parent-task acceptance, business-value completion, or final completion.
→ Done when: chosen TDD Route is recorded, strict-route tests pass, TDD preflight gate passed when applicable, pre-edit complexity risk was checked for non-trivial source edits, and verification-before-completion has fresh evidence.
Test-Driven Development (TDD)
Overview
Under TDD Route: strict, write the test first. Watch it fail. Write minimal
code to pass.
If you didn't watch the test fail, you don't know if it tests the right thing.
TDD Mode has two values: off and auto. The default off mode disables
automatic TDD routing but never disables verification-before-completion.
auto lets Aegis choose a TDD Route by task risk.
On native-direct-skill hosts, automatic entry must stay anchored to literal
conversation markers such as TDD Route: strict, strict TDD, test-first,
or RED / GREEN / REFACTOR, not generic risky-implementation wording.
When to Use
Only enter this skill after one of these explicit entry signals exists:
- the user explicitly asks for strict TDD, test-first development, or RED / GREEN / REFACTOR
- the current conversation already contains
TDD Route: strictfrom another Aegis workflow
Typical strict-route shapes once entry is already justified: new features, bug fixes, refactoring, behavior or logic changes, interface/data contract changes, cross-module or shared-module changes, and core logic refactors.
Exceptions (ask your human partner): throwaway prototypes, generated code, config files, pure docs cleanup, read-only diagnosis, comment-only changes.
TDD Mode and Route
Before source edits, decide:
Aegis Visibility:
- Why this TDD route is strict, light, or skipped:
- What RED/GREEN proves:
- What still needs verification:
TDD Route:
- Mode: auto | off
- Decision: strict | light | skipped
- Strict authority: explicit user/project request | recorded auto decision | not applicable
- Test posture: diagnostic reproduction | post-change regression | strict RED test
- Reason:
- Verification:In auto, use strict for behavior, bugfix, contract, shared/core, producer /
consumer, persistence, permission, migration, or meaningful regression risk.
Use light for tiny low-risk edits with an obvious readback or command check.
Use skipped for read-only, docs-only, generated, throwaway, comment-only, or
environment-bound work where TDD does not fit.
In off, do not automatically require TDD, create a strict route, or infer one
from risk alone. Explicit user/project TDD requests still apply; risky work may
still need regression coverage and verification-before-completion before any
completion claim.
For plan or execution review, Mode: off / Decision: skipped is the normal
record unless an explicit user/project strict request overrides it. That record
does not load this skill or turn a diagnostic reproduction into RED. An
approved plan does not supply strict authority by itself.
If this skill was loaded anyway without an explicit TDD request or a visible
TDD Route: strict marker, exit instead of improvising an automatic strict
route from risk words alone.
Keep Aegis Visibility task-specific: explain the route decision and the
regression boundary, not a generic claim that TDD was used.
Preflight Gate
TDD is the implementation discipline for an approved behavior or atomic task. It is not a substitute for task routing, product clarification, or planning.
Before writing tests or production code, stop and route to brainstorming or writing-plans if the current request has any medium- or high-complexity signal:
- multiple files, modules, pages, screens, services, or owners
- user-visible flows such as navigation, onboarding, checkout, lifecycle, or recovery paths
- state transitions, routing rules, API or data contracts, compatibility boundaries, migrations, permissions, or persistence
- more than one acceptance path or manual/visual verification requirement
- unclear product behavior, competing constraints, or long-running execution
For these tasks, require a baseline read-set, plan, and atomic tasks before TDD. High-complexity or ambiguous tasks also need a spec/design review before planning. Only proceed directly with TDD for low-complexity work whose intent, owner, compatibility boundary, verification path, and slice goal / success evidence are already clear.
Change Necessity
Before strict RED/GREEN enters production code edits, make the code-change
decision visible. Any new source-code path needs this check before RED/GREEN
normalizes it as work to implement. This is the "should code change at all?"
check; it is not a new artifact and does not belong in the using-aegis hot
path.
This is behavior-triggered, not prompt-triggered. If strict TDD is about to add
any new source-code path or enter production source edits, expose a natural
readback even when the user did not ask for it. A tiny helper, small guard, new
branch, fallback, adapter, or owner is not exempt. Example: "Code necessity
check: a non-code path is insufficient because <reason>; the minimum change
boundary is <owner/files>, so the decision is code-change."
Change Necessity:
- User-visible need:
- No-change / non-code option:
- Why code change is necessary:
- Minimum change boundary:
- Decision: no-change | docs/config-only | code-change | needs-clarificationIf the decision is no-change, do not write tests or production code for a
non-change. If the decision is docs/config-only, route to that narrower
surface and verify it. If the decision is needs-clarification, pause before
RED/GREEN. If the decision is code-change, carry the minimum boundary into
TDD Route, RED, and regression scope.
Complexity Budget
Before strict TDD on non-trivial work, record the planned complexity budget so RED/GREEN does not silently normalize a wrong or overloaded owner.
Complexity Budget:
- Artifact class:
- Current pressure:
- Projected post-change pressure:
- Planned governance:Use using-aegis/references/complexity-governance.md for shared artifact
classes, pressure signals, and the meaning of planned governance.
Pre-Edit Complexity Check
Before production code edits, check whether the intended source edit would add logic to an overloaded or wrong owner. Tiny edits can keep this to one line.
Use using-aegis/references/complexity-governance.md for shared pressure
signals and the meaning of over-budget.
Pre-Edit Complexity Check:
- Target edit file:
- Existing pressure signal:
- Owner fit:
- Safer edit boundary:
- Decision: edit-in-place | extract helper | add owner file | split task | pause for plan update
Pre-Edit Owner-Fit Decision:
- Edit intent: wiring-only | move-out / extract-first | local-fix-without-new-responsibility | new-responsibility | emergency / compatibility patch
- Owner fit:
- Safer edit boundary:
- Decision: edit-in-place | extract helper | add owner file | split task | pause for plan updateIf the decision is pause for plan update, stop TDD and return to
writing-plans or brainstorming with the evidence.
If the predicted result is that this slice would push a maintained artifact over budget and the slice does not also govern that overrun, do not continue with RED/GREEN as if the task were safely scoped. Pause and update the plan.
When the target edit file is over-budget or mixed-purpose, classify edit intent
before production source edits. new-responsibility must not be added in place
by default. wiring-only, move-out / extract-first, and
local-fix-without-new-responsibility may proceed only when they do not add a
new responsibility and the verification boundary is clear. emergency /
compatibility patch requires residual risk and a retirement trigger.
When a medium- or high-complexity task needs project records, use configured Aegis workspace support
lazily. Prefer the installed Aegis workspace helper
(python <aegis-workspace-helper> init --root <target-project-root>) when it
is available. If the task needs a process trail under work/, prefer
python <aegis-workspace-helper> new-work --root <target-project-root> ...
so the intent, checkpoint, drift, and evidence paths are indexed and
structurally checkable:
docs/aegis/
README.md
INDEX.md
BASELINE-GOVERNANCE.md
adr/
baseline/
specs/
plans/
work/YYYY-MM-DD-<task-slug>/
10-intent.md
20-checkpoint.md
90-evidence.md
99-reflection.mdDo not promote reusable project facts, decisions, specs, or plans into those directories unless the workflow needs them and no existing project authority already owns them.
Red-Green-Refactor
RED - Write Failing Test
State: input | output | boundary | acceptance criteria. Check existing test coverage first. Write one minimal test showing what should happen. A minimal test anchors the next behavior slice; it does not by itself define whole-task completeness unless the parent acceptance is already fully pinned.
<Good>
```typescript
test('retries failed operations 3 times', async () => {
let attempts = 0;
const operation = () => {
attempts++;
if (attempts < 3) throw new Error('fail');
return 'success';
};const result = await retryOperation(operation);
expect(result).toBe('success'); expect(attempts).toBe(3); });
Clear name, tests real behavior, one thing
</Good>
<Bad>
```typescript
test('retry works', async () => {
const mock = jest.fn()
.mockRejectedValueOnce(new Error())
.mockRejectedValueOnce(new Error())
.mockResolvedValueOnce('success');
await retryOperation(mock);
expect(mock).toHaveBeenCalledTimes(3);
});Vague name, tests mock not code
</Bad>
Requirements:
- One behavior
- Clear name
- Real code (no mocks unless unavoidable)
- If a new feature changes user-observable behavior, prefer one minimal end-to-end or integration test for the main path before narrower unit tests
- For user-visible work, cover the main journey and the highest-risk experience or operational floor before treating unit tests as sufficient
- Add unit tests for core rules, boundary conditions, and error branches
Verify RED - Watch It Fail
MANDATORY. Never skip.
npm test path/to/test.test.tsConfirm:
- Test fails (not errors)
- Failure message is expected
- Fails because feature missing (not typos)
Test passes? You're testing existing behavior. Fix test.
Test errors? Fix error, re-run until it fails correctly.
GREEN - Minimal Code
Write simplest code to pass the test.
<Good>
```typescript
async function retryOperation<T>(fn: () => Promise<T>): Promise<T> {
for (let i = 0; i < 3; i++) {
try {
return await fn();
} catch (e) {
if (i === 2) throw e;
}
}
throw new Error('unreachable');
}
```
Just enough to pass
</Good><Bad>
```typescript
async function retryOperation<T>(
fn: () => Promise<T>,
options?: {
maxRetries?: number;
backoff?: 'linear' | 'exponential';
onRetry?: (attempt: number) => void;
}
): Promise<T> {
// YAGNI
}
```
Over-engineered
</Bad>Don't add features, refactor other code, or "improve" beyond the test.
Fix the real owner of the behavior. Do not add a new fallback, adapter, or branch unless the debugging or design workflow identifies why it is necessary and what old path retires.
Verify GREEN - Watch It Pass
MANDATORY.
npm test path/to/test.test.tsConfirm:
- Test passes
- Other tests still pass
- Output pristine (no errors, warnings)
Test fails? Fix code, not test.
Other tests fail? Fix now.
REFACTOR - Clean Up
After green only:
- Remove duplication
- Improve names
- Extract helpers
Keep tests green. Don't add behavior.
Repeat
Next failing test for next feature.
Regression Scope
At minimum, run the target test you just changed or added. Broaden regression based on impact:
- Shared module change -> related module tests
- Interface or data contract change -> producer and consumer tests
- Cross-module behavior change -> integration or end-to-end path
- Core logic refactor -> old behavior regression tests plus new behavior tests
- Ripple Signal Triage fired -> producer+consumer or real user path that proves the downstream effect remains bounded
If the current environment cannot run automated tests, state the blocker and provide reproducible manual verification steps.
Good Tests
| Quality | Good | Bad |
| Minimal | One thing. "and" in name? Split it. | test('validates email and domain and whitespace') |
| Clear | Name describes behavior | test('test1') |
| Shows intent | Demonstrates desired API | Obscures what code should do |
Strict-Route Red Flags - STOP and Start Over
These red flags apply only after this skill has validly entered under
TDD Route: strict. Do not project them onto debugging or regression work
whose route is light or skipped.
- Code before test
- Test after implementation
- Test passes immediately
- Can't explain why test failed
- Tests added "later"
- Rationalizing "just this once"
- "I already manually tested it"
- "Tests after achieve the same purpose"
- "It's about spirit not ritual"
- "Keep as reference" or "adapt existing code"
- "Already spent X hours, deleting is wasteful"
- "TDD is dogmatic, I'm being pragmatic"
- "This is different because..."
All of these mean: Delete code. Start over with TDD.
Example: Bug Fix
Bug: Empty email accepted
RED
test('rejects empty email', async () => {
const result = await submitForm({ email: '' });
expect(result.error).toBe('Email required');
});Verify RED
$ npm test
FAIL: expected 'Email required', got undefinedGREEN
function submitForm(data: FormData) {
if (!data.email?.trim()) {
return { error: 'Email required' };
}
// ...
}Verify GREEN
$ npm test
PASSREFACTOR Extract validation for multiple fields if needed.
Strict-Route Verification Checklist
- Defined input, output, boundaries, compatibility, acceptance criteria
- Every new function/method has a test that failed first
- All tests pass, output pristine
- Regression: shared/contract/core changes ran related tests
- Ripple signal hit: downstream or real user path covered
- If automation blocked → blocker + manual steps documented
- GREEN treated as local behavior proof only, not final completion
- If
TaskIntentDraft, parent plan/spec, orSlice Cardexists, covered and uncovered scope are explicit before any done claim
Can't check all boxes? Start over.
Exploration and Emergency Exceptions
Exploratory spikes are allowed only as throwaway learning. When the spike ends, convert confirmed behavior into tests before formal implementation.
Emergency hotfixes may prioritize the smallest safe repair when delay is more dangerous than incomplete TDD. Record the reason, keep the change narrow, and add the missing regression test in the same slice or the next nearest slice.
When Stuck
Don't know how to test → write wished-for API first. Test too complicated → simplify design. Must mock everything → reduce coupling.
Debugging Integration
Bug found? Start with systematic-debugging: reproduce, trace the owner, and
choose the smallest proof that supports the diagnosis. Under recorded
TDD Route: strict, the reproduction becomes the required failing test before
production edits. With TDD Mode: off and no strict route, use diagnostic
reproduction and targeted post-change regression as fit the repair; do not
start RED / GREEN by inference.
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
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.

