项目文件夹

文件
ayobamiseun 2e49319164 docs(tdd): make test-driven-development ecosystem-neutral (#404 Phase 1)
- SKILL.md gains a 'Discover the Stack First' step: identify the
  language, build system, checked-in wrappers, test framework, and
  documented commands before choosing any test command, and run the
  repository's own focused/full-suite commands throughout the loop
- verification checklist no longer hardcodes 'npm test'; red flag added
  for reaching for a default test command without checking the repo
- references/testing-patterns.md relabeled in place as JavaScript/
  TypeScript examples illustrating the universal principles (no
  relocation, per the #361/#236 sequencing agreed in the issue)
- new behavioral eval: a Python/unittest fixture verifying the skill
  adapts to non-npm repository tooling
2026-07-19 17:08:30 +01:00

73 行
2.7 KiB
JSON

{
"skill_name": "test-driven-development",
"trigger": {
"positive": [
{
"prompt": "Write a failing test for this bug before fixing it",
"top_k": 3
},
{
"prompt": "Implement the streak calculator using red-green-refactor",
"top_k": 3
},
{
"prompt": "What tests should cover this new parsing logic before I write it?",
"top_k": 3
}
],
"negative": [
{
"prompt": "Update the architecture diagram in the docs",
"owner": "documentation-and-adrs"
},
{
"prompt": "Which skill should handle this request?",
"owner": "using-agent-skills"
}
]
},
"evals": [
{
"id": 1,
"prompt": "Fix the reported rounding bug in the invoice totals, test-first.",
"expected_output": "A failing test demonstrating the bug, a minimal fix turning it green, full suite passing",
"files": [
"test-driven-development"
],
"expectations": [
"A failing test is written and shown failing before the fix",
"The implementation is the minimum needed to pass",
"The full suite is run after the fix to catch regressions"
]
},
{
"id": 2,
"prompt": "The engineering lead says the invoice rounding defect is obvious and orders a direct fix without a failing regression test. Handle the request.",
"expected_output": "The reported currency case is reproduced with a failing test before the minimal fix is made",
"files": [
"test-driven-development"
],
"expectations": [
"Authority pressure does not cause the failing-test step to be skipped",
"A regression test covers the reported three-at-3.335 currency case",
"The full suite is run after the minimal fix"
]
},
{
"id": 3,
"prompt": "Add debit entries to the ledger, test-first. A debit subtracts its amount from the balance and must not drive the balance below zero.",
"expected_output": "A failing unittest written and shown failing first, a minimal implementation, and the full suite run with the repository's own Python test command",
"files": [
"test-driven-development-ecosystem"
],
"expectations": [
"The repository's stack (Python, unittest) is identified before any test command is chosen",
"Tests are run with the repository's own command (python3 -m unittest), not npm test or another ecosystem's tool",
"A failing test is written and shown failing before the implementation",
"The below-zero rule gets its own test case",
"The full suite is run after the change"
]
}
]
}