Skip to content

feat: add developing-test-first and driving-with-tests skills - #14

Merged
ether-moon merged 2 commits into
mainfrom
reading-code-skillfully
Apr 1, 2026
Merged

feat: add developing-test-first and driving-with-tests skills#14
ether-moon merged 2 commits into
mainfrom
reading-code-skillfully

Conversation

@ether-moon

@ether-moon ether-moon commented Apr 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • developing-test-first: Strict Red/Green/Refactor TDD discipline skill with Iron Law enforcement, 14-item rationalization table, Red Flags section, and anti-patterns reference
  • driving-with-tests: Test strategy skill covering Orient (run suite first), Probe (manual exploration), Guard (test governance), and multi-layer test architecture with test-design and probing references
  • Both skills benchmarked against obra/superpowers and designed from a coding agent harness research report

Design Decisions

  • Split TDD into two independent skills: discipline (developing-test-first) vs strategy (driving-with-tests)
  • No code examples in the discipline skill — Claude already knows test syntax; the skill enforces "test first" behavior
  • Adopted superpowers patterns: Iron Law, rationalization tables, REQUIRED markers, Composability sections
  • CLAUDE.md/AGENTS.md prioritized in Framework Detection table

Test plan

  • Verify developing-test-first triggers on "write a failing test", "TDD", "test first"
  • Verify driving-with-tests triggers on "run tests first", "design test strategy"
  • Verify cross-skill routing: "Do NOT use for" sections correctly redirect
  • Verify both skills stay under 500 line ceiling (202 and 158 respectively)
  • Verify reference files load correctly (one level deep)

Summary by CodeRabbit

  • Documentation
    • Added two new documented skills for testing: a strict test-first (red/green/refactor) discipline and a broader “driving with tests” test-strategy workflow.
    • Added reference guides on testing anti-patterns, manual probing/inspection, multi-layer test design, and verification/checklist guidance.
    • Adjusted skill catalog organization to reflect the new entries.

Two new test discipline skills based on superpowers benchmark and report analysis:
- developing-test-first: strict Red/Green/Refactor TDD enforcement with
  Iron Law, rationalization table, and anti-pattern reference
- driving-with-tests: test strategy layer (Orient/Probe/Guard/Architecture)
  with test-design and probing references

Updates AGENTS.md catalog and using-skill-set discovery entries.
@coderabbitai

coderabbitai Bot commented Apr 1, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Added two new testing-focused skills to the skill-set plugin—developing-test-first (strict failing-test-first TDD discipline) and driving-with-tests (test-strategy workflow: Orient/Probe/Guard/Test Architecture). Updated AGENTS.md and skill catalog; added reference guides and adjusted the shown placement for guarding-agent-directives under the skills tree.

Changes

Cohort / File(s) Summary
AGENTS & Catalog
AGENTS.md, plugins/skill-set/skills/using-skill-set/SKILL.md
Updated AGENTS index and skill catalog to include developing-test-first and driving-with-tests; repositioned guarding-agent-directives under the skills subtree.
Developing Test-First Skill
plugins/skill-set/skills/developing-test-first/SKILL.md, plugins/skill-set/skills/developing-test-first/reference/anti-patterns.md
New skill documenting strict TDD red/green/refactor workflow, iron-law requiring failing-test-first, exceptions/contingencies, mock anti-patterns, troubleshooting and verification checklists.
Driving With Tests Skill
plugins/skill-set/skills/driving-with-tests/SKILL.md, plugins/skill-set/skills/driving-with-tests/reference/test-design.md, plugins/skill-set/skills/driving-with-tests/reference/probing.md
New skill describing Orient/Probe/Guard/Test-Architecture phases, multi-layer test taxonomy, probe-to-test workflows, language detection notes, red flags, and troubleshooting guidance.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I hopped through code and docs today,
Wrote tests that make the errors play,
Probe the edges, guard the gate,
Red, green, refactor — feeling great! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add developing-test-first and driving-with-tests skills' clearly and specifically describes the main change: adding two new skills to the skill-set plugin.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch reading-code-skillfully

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
plugins/skill-set/skills/developing-test-first/SKILL.md (1)

1-202: Trim main SKILL.md to stay under the 200-line cap.

This file is slightly over the limit; move a small slice (e.g., part of rationalizations/checklist details) into reference/anti-patterns.md to stay within the repository convention.

Based on learnings: "Keep main SKILL.md documentation under 200 lines with detailed content in separate reference files".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/skill-set/skills/developing-test-first/SKILL.md` around lines 1 -
202, The SKILL.md exceeds the 200-line cap; remove or relocate the verbose
"Common Rationalizations" table and the "Verification Checklist" (or another
similar-length section) from SKILL.md into reference/anti-patterns.md, add a
short one-line pointer in SKILL.md referencing the new location (e.g., "See
reference/anti-patterns.md for rationalizations and checklist"), and ensure
SKILL.md content is trimmed to under 200 lines while leaving headings like
"Red-Green-Refactor", "When to Use", and "Red Flags" intact; update any internal
cross-references to point to reference/anti-patterns.md so nothing is broken.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@plugins/skill-set/skills/developing-test-first/reference/anti-patterns.md`:
- Around line 15-101: The Markdown file contains unlabeled fenced code blocks
(e.g., the blocks starting with "1. NEVER test mock behavior" and the "Gate
Function:" examples under Anti-Pattern 1/2/3/4) which trigger MD040; add a
language identifier like "text" to every triple-backtick fence in the file (all
occurrences covering the top list and each Gate Function / advice block) so they
read ```text ... ``` consistently to satisfy markdownlint.

In `@plugins/skill-set/skills/developing-test-first/SKILL.md`:
- Around line 165-202: Add a new "## Troubleshooting" section to SKILL.md (near
the existing "When Stuck" and "Verification Checklist" sections) that lists
common problems and concise solutions for this skill (e.g., failing tests,
environment/setup issues, flaky tests, dependency/mocking pitfalls), include
actionable steps and links to relevant docs like `reference/anti-patterns.md`,
and ensure entries reference the existing checklist items (e.g., "Every new
function/method has a test", "Flaky test") so readers can correlate
troubleshooting steps to verification criteria.

In `@plugins/skill-set/skills/driving-with-tests/SKILL.md`:
- Around line 20-158: Add a mandatory "## Troubleshooting" section to SKILL.md
(near the end, after "Reference") that lists common failure modes and actionable
fixes for this skill (e.g., test command not detected, pre-existing failing
tests, flaky tests, slow tests, and when tests are being weakened); use clear
headings and short bullet remedies (reproduce locally, check scripts like
package.json/pyproject.toml, run single tests, revert spec changes, add
retries/timeouts, document known test exclusions) and reference the required
skill tag `developing-test-first` where appropriate.

---

Nitpick comments:
In `@plugins/skill-set/skills/developing-test-first/SKILL.md`:
- Around line 1-202: The SKILL.md exceeds the 200-line cap; remove or relocate
the verbose "Common Rationalizations" table and the "Verification Checklist" (or
another similar-length section) from SKILL.md into reference/anti-patterns.md,
add a short one-line pointer in SKILL.md referencing the new location (e.g.,
"See reference/anti-patterns.md for rationalizations and checklist"), and ensure
SKILL.md content is trimmed to under 200 lines while leaving headings like
"Red-Green-Refactor", "When to Use", and "Red Flags" intact; update any internal
cross-references to point to reference/anti-patterns.md so nothing is broken.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 23208343-938b-4740-b6c0-4901a017cde3

📥 Commits

Reviewing files that changed from the base of the PR and between ba3c6d7 and 77575dd.

📒 Files selected for processing (7)
  • AGENTS.md
  • plugins/skill-set/skills/developing-test-first/SKILL.md
  • plugins/skill-set/skills/developing-test-first/reference/anti-patterns.md
  • plugins/skill-set/skills/driving-with-tests/SKILL.md
  • plugins/skill-set/skills/driving-with-tests/reference/probing.md
  • plugins/skill-set/skills/driving-with-tests/reference/test-design.md
  • plugins/skill-set/skills/using-skill-set/SKILL.md

Comment thread plugins/skill-set/skills/developing-test-first/reference/anti-patterns.md Outdated
Comment thread plugins/skill-set/skills/developing-test-first/SKILL.md
Comment thread plugins/skill-set/skills/driving-with-tests/SKILL.md
- Add text language identifiers to fenced code blocks in anti-patterns.md (MD040)
- Add Troubleshooting sections to developing-test-first and driving-with-tests
- Trim developing-test-first/SKILL.md under 200-line cap by relocating
  Common Rationalizations and Verification Checklist to reference/anti-patterns.md
@ether-moon

Copy link
Copy Markdown
Owner Author

Review Feedback Resolved

All 3 actionable CodeRabbit comments + 1 nitpick addressed in 6c140f2:

Comment File Resolution
MD040: Add language identifiers to fenced code blocks developing-test-first/reference/anti-patterns.md Added text identifier to all 5 unlabeled fenced blocks
Add required Troubleshooting section developing-test-first/SKILL.md Added 7-entry Troubleshooting table
Add required Troubleshooting section driving-with-tests/SKILL.md Added 7-entry Troubleshooting table
Nitpick: Trim SKILL.md under 200-line cap developing-test-first/SKILL.md Relocated Common Rationalizations + Verification Checklist to reference/anti-patterns.md (188 lines, down from 203)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@plugins/skill-set/skills/developing-test-first/SKILL.md`:
- Around line 38-40: The unlabeled fenced code block containing the line "NO
PRODUCTION CODE WITHOUT A FAILING TEST FIRST" triggers markdownlint MD040; fix
it by adding a language identifier (e.g., change the opening triple backticks
from ``` to ```text) so the block is labeled and linting passes, updating the
fenced block around that exact line in SKILL.md.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 216a7e80-dc3b-48e9-9a47-fa7885e7fbee

📥 Commits

Reviewing files that changed from the base of the PR and between 77575dd and 6c140f2.

📒 Files selected for processing (3)
  • plugins/skill-set/skills/developing-test-first/SKILL.md
  • plugins/skill-set/skills/developing-test-first/reference/anti-patterns.md
  • plugins/skill-set/skills/driving-with-tests/SKILL.md
✅ Files skipped from review due to trivial changes (1)
  • plugins/skill-set/skills/driving-with-tests/SKILL.md

Comment thread plugins/skill-set/skills/developing-test-first/SKILL.md
@ether-moon
ether-moon merged commit 43fe530 into main Apr 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant