From 0b244b7fc80d5df9f45c4c19f64fa24d3351bb9b Mon Sep 17 00:00:00 2001 From: Sven Date: Mon, 2 Mar 2026 05:46:35 +0100 Subject: [PATCH] feat(skills): enhance TDD skill with native format and MAXSIM integration Add context: fork frontmatter for Claude Code native forked context support. Expand the Integration with MAXSIM section with context loading, STATE.md hooks, commit protocol, and artifact reference documentation. Co-Authored-By: Claude Opus 4.6 --- templates/skills/tdd/SKILL.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/templates/skills/tdd/SKILL.md b/templates/skills/tdd/SKILL.md index 4b7daad..1970705 100644 --- a/templates/skills/tdd/SKILL.md +++ b/templates/skills/tdd/SKILL.md @@ -1,6 +1,7 @@ --- name: tdd description: Use when implementing any feature or bug fix — requires writing a failing test before any implementation code +context: fork --- # Test-Driven Development (TDD) @@ -112,7 +113,35 @@ Cannot check all boxes? You skipped TDD. Start over. ## Integration with MAXSIM +### Context Loading + +When running within a MAXSIM project, load project context: + +```bash +node ~/.claude/maxsim/bin/maxsim-tools.cjs skill-context tdd +``` + +This returns: current phase, active plan, artifact paths, and recent decisions. Use this to: +- Reference the current plan's `` blocks when writing tests +- Know which phase you are implementing within +- Check for existing test patterns in the project + +### STATE.md Hooks + +Track TDD metrics in STATE.md via the tools router: +- After each RED→GREEN→REFACTOR cycle, the executor records the cycle in the plan's task completion +- TDD violations (production code before test) are recorded as deviations +- Cycle count is tracked per task for velocity metrics + +### Commit Protocol + In MAXSIM plan execution, tasks marked `tdd="true"` follow this cycle with per-step commits: - **RED commit:** `test({phase}-{plan}): add failing test for [feature]` - **GREEN commit:** `feat({phase}-{plan}): implement [feature]` - **REFACTOR commit (if changes made):** `refactor({phase}-{plan}): clean up [feature]` + +### Artifact References + +- Check `.planning/phases/{current}/PLAN.md` for task-specific test requirements +- Reference `.planning/phases/{current}/RESEARCH.md` for test patterns discovered during research +- Test results feed into SUMMARY.md documentation