@event4u/agent-config 8.9.0 → 8.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +41 -0
  3. package/README.md +5 -5
  4. package/dist/agent-src/commands/cost/report.md +13 -3
  5. package/dist/agent-src/commands/tests/create.md +28 -6
  6. package/dist/agent-src/commands/work.md +33 -0
  7. package/dist/agent-src/commands/worktree/cleanup.md +78 -0
  8. package/dist/agent-src/commands/worktree/create.md +62 -0
  9. package/dist/agent-src/commands/worktree/status.md +63 -0
  10. package/dist/agent-src/commands/worktree/verify.md +70 -0
  11. package/dist/agent-src/commands/worktree.md +85 -0
  12. package/dist/agent-src/contexts/execution/orchestration-telemetry.md +47 -34
  13. package/dist/agent-src/rules/design-fidelity.md +40 -0
  14. package/dist/agent-src/rules/spreadsheet-source-quality.md +61 -0
  15. package/dist/agent-src/skills/accessibility-auditor/evals/evals.json +15 -0
  16. package/dist/agent-src/skills/analysis-skill-router/evals/evals.json +13 -0
  17. package/dist/agent-src/skills/api-testing/SKILL.md +15 -1
  18. package/dist/agent-src/skills/character-consistency/evals/evals.json +16 -0
  19. package/dist/agent-src/skills/command-routing/evals/evals.json +14 -0
  20. package/dist/agent-src/skills/dashboard-design/evals/evals.json +16 -0
  21. package/dist/agent-src/skills/dcf-modeling/evals/evals.json +20 -0
  22. package/dist/agent-src/skills/decision-record/evals/evals.json +20 -0
  23. package/dist/agent-src/skills/design-intelligence/evals/evals.json +14 -0
  24. package/dist/agent-src/skills/design-review/SKILL.md +6 -0
  25. package/dist/agent-src/skills/design-system-capture/SKILL.md +21 -0
  26. package/dist/agent-src/skills/design-system-capture/evals/evals.json +15 -0
  27. package/dist/agent-src/skills/developer-like-execution/evals/evals.json +16 -0
  28. package/dist/agent-src/skills/doc-coauthoring/SKILL.md +27 -0
  29. package/dist/agent-src/skills/doc-coauthoring/evals/evals.json +16 -0
  30. package/dist/agent-src/skills/editorial-calendar/evals/domain-truth.json +16 -0
  31. package/dist/agent-src/skills/editorial-calendar/evals/evals.json +16 -0
  32. package/dist/agent-src/skills/estimate-ticket/evals/evals.json +16 -0
  33. package/dist/agent-src/skills/existing-ui-audit/SKILL.md +30 -0
  34. package/dist/agent-src/skills/existing-ui-audit/evals/triggers.json +47 -0
  35. package/dist/agent-src/skills/fe-design/SKILL.md +36 -5
  36. package/dist/agent-src/skills/fe-design/evals/triggers.json +47 -0
  37. package/dist/agent-src/skills/forecasting/evals/evals.json +20 -0
  38. package/dist/agent-src/skills/fundraising-narrative/evals/domain-truth.json +16 -0
  39. package/dist/agent-src/skills/fundraising-narrative/evals/evals.json +16 -0
  40. package/dist/agent-src/skills/html-deck/SKILL.md +27 -0
  41. package/dist/agent-src/skills/iconography/SKILL.md +24 -0
  42. package/dist/agent-src/skills/incident-commander/evals/domain-truth.json +16 -0
  43. package/dist/agent-src/skills/incident-commander/evals/evals.json +20 -0
  44. package/dist/agent-src/skills/launch-readiness/evals/evals.json +21 -0
  45. package/dist/agent-src/skills/logging-monitoring/evals/evals.json +16 -0
  46. package/dist/agent-src/skills/messaging-architecture/evals/domain-truth.json +16 -0
  47. package/dist/agent-src/skills/messaging-architecture/evals/evals.json +16 -0
  48. package/dist/agent-src/skills/perf-feedback-craft/evals/evals.json +16 -0
  49. package/dist/agent-src/skills/pest-testing/SKILL.md +1 -1
  50. package/dist/agent-src/skills/playwright-testing/SKILL.md +16 -0
  51. package/dist/agent-src/skills/prompt-engineering-patterns/evals/evals.json +16 -0
  52. package/dist/agent-src/skills/refine-prompt/evals/evals.json +16 -0
  53. package/dist/agent-src/skills/refine-ticket/evals/evals.json +16 -0
  54. package/dist/agent-src/skills/release-comms/evals/evals.json +16 -0
  55. package/dist/agent-src/skills/rice-prioritization/evals/evals.json +20 -0
  56. package/dist/agent-src/skills/runway-cognition/evals/evals.json +20 -0
  57. package/dist/agent-src/skills/scenario-modeling/evals/evals.json +20 -0
  58. package/dist/agent-src/skills/spreadsheet-authoring/SKILL.md +98 -0
  59. package/dist/agent-src/skills/spreadsheet-authoring/evals/triggers.json +47 -0
  60. package/dist/agent-src/skills/systematic-debugging/evals/evals.json +20 -0
  61. package/dist/agent-src/skills/test-case-discovery/SKILL.md +118 -0
  62. package/dist/agent-src/skills/test-case-discovery/evals/triggers.json +52 -0
  63. package/dist/agent-src/skills/test-driven-development/SKILL.md +32 -6
  64. package/dist/agent-src/skills/test-driven-development/evals/evals.json +16 -0
  65. package/dist/agent-src/skills/testing-anti-patterns/SKILL.md +7 -6
  66. package/dist/agent-src/skills/threat-modeling/evals/evals.json +21 -0
  67. package/dist/agent-src/skills/typography-system/evals/evals.json +14 -0
  68. package/dist/agent-src/skills/unit-economics-modeling/evals/evals.json +24 -0
  69. package/dist/agent-src/skills/verify-completion-evidence/evals/evals.json +16 -0
  70. package/dist/agent-src/skills/vision-articulation/evals/evals.json +16 -0
  71. package/dist/agent-src/skills/voice-and-tone-design/evals/evals.json +16 -0
  72. package/dist/agent-src/skills/worktree-lifecycle/SKILL.md +180 -0
  73. package/dist/agent-src/skills/worktree-lifecycle/evals/triggers.json +52 -0
  74. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  75. package/dist/discovery/deprecation-report.md +1 -1
  76. package/dist/discovery/discovery-manifest.json +249 -32
  77. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  78. package/dist/discovery/discovery-manifest.summary.md +6 -6
  79. package/dist/discovery/orphan-report.md +1 -1
  80. package/dist/discovery/packs.json +22 -13
  81. package/dist/discovery/trust-report.md +4 -4
  82. package/dist/discovery/workspaces.json +22 -11
  83. package/dist/mcp/registry-manifest.json +2 -2
  84. package/dist/router.json +1 -1
  85. package/docs/CLAIMS.md +3 -3
  86. package/docs/architecture.md +3 -3
  87. package/docs/catalog.md +19 -8
  88. package/docs/command-flows.md +6 -1
  89. package/docs/contracts/CHANGELOG-conventions.md +6 -0
  90. package/docs/contracts/design-artifact-lifecycle.md +93 -0
  91. package/docs/contracts/design-artifact-verification.md +30 -1
  92. package/docs/contracts/release-pr-gating.md +26 -0
  93. package/docs/contracts/release-sizing.md +85 -0
  94. package/docs/contracts/surface-agent-contracts.md +153 -0
  95. package/docs/decisions/ADR-115-command-cluster-consolidation-phase-4.md +1 -1
  96. package/docs/distribution/consumer-matrix.md +96 -0
  97. package/docs/featured-skills.md +2 -2
  98. package/docs/getting-started-by-role.md +1 -1
  99. package/docs/getting-started.md +2 -2
  100. package/docs/governance-advantage.md +1 -1
  101. package/docs/proof.md +4 -4
  102. package/docs/release-runbook.md +3 -0
  103. package/docs/self-review-gate.md +51 -0
  104. package/package.json +1 -1
  105. package/src/scripts/_lib/orchestration_record.ts +13 -0
  106. package/src/scripts/_lib/orchestration_savings.ts +52 -0
  107. package/src/scripts/check_release_adjacent_health.ts +121 -0
  108. package/src/scripts/check_rule_invariants.ts +275 -0
  109. package/src/scripts/consumer_matrix.ts +353 -0
  110. package/src/scripts/generate_index.ts +3 -2
  111. package/src/scripts/lint_changelog_rollback.ts +293 -0
  112. package/src/scripts/orchestration_record.ts +16 -0
  113. package/src/scripts/orchestration_savings_report.ts +36 -3
  114. package/src/scripts/second_brain_retrieval.ts +44 -2
  115. package/src/scripts/self_review_gate.test.ts +65 -0
  116. package/src/scripts/self_review_gate.ts +272 -0
  117. package/src/scripts/trigger_eval_grandfather.json +223 -224
@@ -0,0 +1,20 @@
1
+ {
2
+ "skill": "scenario-modeling",
3
+ "_calibration": "Behavioural fixture (road-to-skill-eval-coverage Phase 2, default-surface). Deterministic assertions on a real output property where reliable; rubric pins the qualitative core as a known-limit (pass ratified in PR review, not a hidden judge). finding_floor n is a conservative floor, not a calibrated per-host number.",
4
+ "scenarios": [
5
+ {
6
+ "id": "base-upside-downside",
7
+ "prompt": "Model base / upside / downside for our annual plan off a $6.3M commit.",
8
+ "assertions": [
9
+ {
10
+ "kind": "contains",
11
+ "value": "downside"
12
+ },
13
+ {
14
+ "kind": "rubric",
15
+ "criterion": "Downside names a concrete HEADWIND (not base×0.8), upside names a tailwind, and reads optionality — not just ±20% on base."
16
+ }
17
+ ]
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,98 @@
1
+ ---
2
+ model_tier: high
3
+ name: spreadsheet-authoring
4
+ description: "Use when building or editing a spreadsheet or model — formulas over hardcoded values, read-back after writes, official-source data, pivot-first charts. Triggers on 'spreadsheet', 'build a model'."
5
+ domain: process
6
+ workspaces:
7
+ - finance
8
+ packs:
9
+ - finance-basic
10
+ trust:
11
+ level: professional
12
+ install:
13
+ removable: true
14
+ execution:
15
+ type: manual
16
+ ---
17
+
18
+ # spreadsheet-authoring
19
+
20
+ > The spreadsheet surface's correctness floor (per
21
+ > [`surface-agent-contracts`](../../../docs/contracts/surface-agent-contracts.md)):
22
+ > a spreadsheet's **truth source is the formula read-back**, not a plausible
23
+ > table of numbers. A cell that holds a hardcoded computed value is a latent
24
+ > lie — it silently goes stale the moment an input changes.
25
+
26
+ ## When to use
27
+
28
+ - Building or editing a spreadsheet / financial model (SaaS, ops, budget, forecast).
29
+ - Charting raw tabular data.
30
+ - Entering web-sourced or financial figures into cells.
31
+
32
+ Do NOT use for: per-customer unit-economics *reasoning* (route to
33
+ `unit-economics-modeling`), runway *shape* (route to `runway-cognition`), or a
34
+ prose document/table (that is the document surface, `doc-coauthoring`).
35
+
36
+ ## Procedure
37
+
38
+ 1. **Detect the surface + capability.** Confirm a spreadsheet is the right
39
+ surface (not a prose table). Confirm native spreadsheet tooling is available;
40
+ if not, see § Capability-aware degradation.
41
+ 2. **Formulas over hardcoded values.** Any computed cell holds a **formula**
42
+ (`=SUM(...)`, `=B2*C2`), never the typed-in result. Hardcoding a computed
43
+ value is the cardinal spreadsheet defect — it does not recalculate.
44
+ 3. **Read back after every write.** After writing a formula, read the cell back
45
+ and confirm no formula error (`#REF!`, `#DIV/0!`, `#VALUE!`). The read-back is
46
+ the spreadsheet's verification truth source.
47
+ 4. **Source-comment web-sourced cells.** Any figure taken from the web carries a
48
+ cell comment with its source. Financial figures follow the
49
+ [`spreadsheet-source-quality`](../../rules/spreadsheet-source-quality.md) rule
50
+ (official sources first; aggregators need permission + unofficial marking).
51
+ 5. **Expand ranges on structural edits.** After inserting a row/column inside a
52
+ formula's range, expand the range (or use a whole-column / table reference) so
53
+ the new data is included — verified by read-back.
54
+ 6. **Pivot-first charting.** Chart from a pivot/aggregate of raw data, not
55
+ directly from hundreds of raw transactional rows.
56
+ 7. **Bulk range operations over manual cell loops.** Prefer a single range
57
+ formula / fill over hand-editing cells one by one.
58
+
59
+ ## Capability-aware degradation
60
+
61
+ - **Native tooling present** → write + read back formulas directly.
62
+ - **Only exported files + a parser present** → operate on the exported file;
63
+ state that formulas were written into the export, and what the target app will
64
+ recompute on open.
65
+ - **Neither** → do NOT pretend formulas were written or read back. Say plainly
66
+ what cannot be verified on this host, and deliver the formula definitions +
67
+ the layout as a durable plan the user applies in their spreadsheet app.
68
+
69
+ ## Output format
70
+
71
+ 1. **The spreadsheet / model** — cells carrying formulas (not baked values),
72
+ source comments on sourced cells, pivots feeding charts.
73
+ 2. **`assumptions.md`** — every input value, sourced or marked `assumption`;
74
+ the official-vs-unofficial status of each financial figure.
75
+ 3. **`verification-note.md`** — which cells were read back, any formula errors
76
+ found + fixed, and — on a degraded host — exactly what could not be verified.
77
+
78
+ ## Gotcha
79
+
80
+ - Hardcoding a computed value instead of a formula is the #1 spreadsheet defect:
81
+ it looks right today and is silently wrong after the next input change.
82
+ - A formula range not expanded after a row insert silently drops the new row
83
+ from every downstream total.
84
+ - Charting straight off a raw transactional table (no pivot) produces an
85
+ unreadable chart and hides the data's real shape.
86
+ - An aggregator/news figure entered as if it were official financial data is a
87
+ sourcing defect even when the number happens to be right — see
88
+ `spreadsheet-source-quality`.
89
+ - On a host without spreadsheet tooling, claiming "formulas written + verified"
90
+ is a fabricated verification (never do it — degrade honestly).
91
+
92
+ ## Do NOT
93
+
94
+ - Do NOT write a computed value where a formula belongs.
95
+ - Do NOT enter a financial figure from an aggregator/news/social source as
96
+ official without the user's explicit permission + a cell-level unofficial mark.
97
+ - Do NOT claim a formula was read back / verified on a host that cannot open the
98
+ spreadsheet — say what could not be verified instead.
@@ -0,0 +1,47 @@
1
+ {
2
+ "skill": "spreadsheet-authoring",
3
+ "last_eval": "2026-07-10",
4
+ "description": "5 should-trigger + 5 should-not-trigger queries for the spreadsheet surface floor (road-to-surface-specific-agent-contracts Phase 2). Should-trigger covers building/editing a spreadsheet or model, entering formulas or sourced/financial figures, and charting raw data. Should-not-trigger covers near-miss neighbours whose vocabulary overlaps but belong to a different surface/skill: unit-economics reasoning, runway shape, a prose document, a slide deck, and backend work.",
5
+ "queries": [
6
+ {
7
+ "q": "build a 3-statement financial model in a spreadsheet",
8
+ "trigger": true
9
+ },
10
+ {
11
+ "q": "add a formula to sum the revenue column and total it",
12
+ "trigger": true
13
+ },
14
+ {
15
+ "q": "chart this raw sales transaction data",
16
+ "trigger": true
17
+ },
18
+ {
19
+ "q": "enter the revenue figures from the company's 10-K into the sheet",
20
+ "trigger": true
21
+ },
22
+ {
23
+ "q": "create a budget spreadsheet with monthly categories",
24
+ "trigger": true
25
+ },
26
+ {
27
+ "q": "what is our LTV to CAC ratio and is it healthy?",
28
+ "trigger": false
29
+ },
30
+ {
31
+ "q": "how long is our cash runway?",
32
+ "trigger": false
33
+ },
34
+ {
35
+ "q": "write a PRD for the new onboarding feature",
36
+ "trigger": false
37
+ },
38
+ {
39
+ "q": "turn these results into a slide deck",
40
+ "trigger": false
41
+ },
42
+ {
43
+ "q": "add a database index on the orders table",
44
+ "trigger": false
45
+ }
46
+ ]
47
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "skill": "systematic-debugging",
3
+ "_calibration": "Behavioural fixture (road-to-skill-eval-coverage Phase 2, default-surface). Deterministic assertions on a real output property where reliable; rubric pins the qualitative core as a known-limit (pass ratified in PR review, not a hidden judge). finding_floor n is a conservative floor, not a calibrated per-host number.",
4
+ "scenarios": [
5
+ {
6
+ "id": "debug-flaky-test",
7
+ "prompt": "A test passes locally but fails in CI intermittently. Walk me through debugging it.",
8
+ "assertions": [
9
+ {
10
+ "kind": "contains",
11
+ "value": "hypothesis"
12
+ },
13
+ {
14
+ "kind": "rubric",
15
+ "criterion": "Forms a hypothesis, isolates one variable, and runs one-test-one-fix-one-rerun rather than shotgun edits."
16
+ }
17
+ ]
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,118 @@
1
+ ---
2
+ model_tier: medium
3
+ name: test-case-discovery
4
+ description: "Use BEFORE writing any test — enumerate cases per behavior (happy / boundary / error / abuse), prioritize by likelihood × impact, cross-check via subagent — even if the user just says 'add tests'."
5
+ domain: quality
6
+ workspaces:
7
+ - engineering
8
+ packs:
9
+ - engineering-base
10
+ ---
11
+
12
+ # test-case-discovery
13
+
14
+ AI-written test suites default to **too few tests, mostly happy path**. This skill is the discovery step that runs *before* the first test is written: enumerate what could break, pick the most important cases, then hand the list to [`test-driven-development`](../test-driven-development/SKILL.md) or the stack skill. The goal is **breadth AND quality** — happy path AND boundaries AND error paths — with a hard cap so the output is never a pile of trivial tests.
15
+
16
+ This is the **before** layer. Assertion quality is [`testing-anti-patterns`](../testing-anti-patterns/SKILL.md); after-the-fact coverage review is [`judge-test-coverage`](../judge-test-coverage/SKILL.md).
17
+
18
+ ## When to use
19
+
20
+ - About to write tests for new or changed behavior — the `test-driven-development` RED phase and `/tests create` route here as a mandatory first step.
21
+ - A test task arrives as "add tests" / "write tests for this branch" with no case list.
22
+ - Reviewing a plan whose testing section only names the happy path.
23
+
24
+ Do NOT use when:
25
+
26
+ - The diff is trivial (< 10 lines, pure rename/refactor, no new behavior) — write 1 happy + 1 boundary case and move on; no matrix.
27
+ - The problem is assertion quality (overfit, tautology, mock-the-mock) → [`testing-anti-patterns`](../testing-anti-patterns/SKILL.md).
28
+ - A test is failing for non-obvious reasons → [`systematic-debugging`](../systematic-debugging/SKILL.md).
29
+ - The tests already exist and the question is "are they enough?" → [`judge-test-coverage`](../judge-test-coverage/SKILL.md).
30
+
31
+ ## The Iron Law
32
+
33
+ ```
34
+ NO TEST IS WRITTEN BEFORE THE CASE LIST EXISTS.
35
+ ENUMERATE → PRIORITIZE → THEN WRITE. NEVER HAPPY-PATH-ONLY.
36
+ FLOOR PER BEHAVIOR: 1 HAPPY + 1 BOUNDARY + 1 ERROR (+1 ABUSE ON SECURITY PATHS).
37
+ CAP PER BEHAVIOR: 5–8 CASES — EACH MUST FAIL FOR A DISTINCT REASON.
38
+ ```
39
+
40
+ ## Procedure — the five-step funnel
41
+
42
+ ### 1. Behavior inventory (30 seconds)
43
+
44
+ List the 1–3 **distinct observable behaviors** the change introduces or modifies — one sentence each: *"When X happens, the system should do Y."* Each behavior gets its own case list. If you cannot state a behavior in one sentence, split it.
45
+
46
+ ### 2. Dimension scan (per behavior)
47
+
48
+ Walk the dimensions below; mark **3–5 as HIGH** (most likely to occur × highest impact when wrong). Skip dimensions the behavior structurally cannot hit — but say so, don't silently omit.
49
+
50
+ - **Input validity** — null/undefined, empty string/array, zero, negative, max bounds/overflow, type mismatch, malformed format, Unicode/whitespace, off-by-one.
51
+ - **State** — missing prerequisites, invalid state transitions, idempotency/double-submit, duplicates and ordering.
52
+ - **Collaborator failure** — timeout, 4xx/5xx, partial or malformed response, thrown exceptions, empty result sets.
53
+ - **Concurrency & time** — races, retries, timezone/DST, clock skew (only when the surface touches them).
54
+ - **Security surface** (authz / tenant / data access) — missing/expired credentials, not-owner, cross-tenant, privilege escalation, injection payload. On data-returning endpoints the three negative tests from `broken-access-control` (unauthenticated → 401, not-owner → 403/404, cross-tenant → 403/404) are the floor, not optional extras.
55
+
56
+ ### 3. Case synthesis
57
+
58
+ Generate ≥ 1 concrete case per HIGH dimension, plus the happy path. Enforce the floor: **1 happy + 1 boundary + 1 error per behavior, +1 abuse case when the behavior is security-relevant.** Name each case like a test (`it rejects an expired token`), not like a category ("error handling").
59
+
60
+ ### 4. Subagent cross-check (gated, with mandatory fallback)
61
+
62
+ Widen the list with a second pair of eyes:
63
+
64
+ - **Subagent path** — when the host supports subagent spawn and subagents are enabled (`subagents.enabled`, `subagents.auto` ≠ off): spawn **one** subagent with an adversarial lens — *"Behavior: {sentence}. Case list so far: {list}. As a security researcher / SRE / chaos engineer: which non-obvious failure mode or abuse vector is missing?"* On security-critical surfaces a **second** subagent with a different lens is allowed; more is waste. Merge only novel cases.
65
+ - **Degraded path (mandatory when no subagent runs)** — a self-review pass with an explicit lens shift: re-walk step 2 asking *"what breaks in production? what would an attacker try?"* and emit the same output shape (1–2 additional cases, or explicitly "none found").
66
+
67
+ Unavailability of subagents never skips this step — it only switches the path.
68
+
69
+ ### 5. Prioritize and cap
70
+
71
+ If a behavior collected more than 8 cases: rank by likelihood × blast radius, keep the top 5–8. Quality gate: **each surviving case must be able to fail for a distinct reason** (different code path / exception / assertion). The same assertion fed two interchangeable input values is ONE case — use a data provider, not a second test. Record dropped cases in one line each so the discovery work is not lost.
72
+
73
+ Then hand the list to [`test-driven-development`](../test-driven-development/SKILL.md) — every case runs its own RED → GREEN cycle — or to the stack skill ([`pest-testing`](../pest-testing/SKILL.md), [`api-testing`](../api-testing/SKILL.md), [`playwright-testing`](../playwright-testing/SKILL.md)).
74
+
75
+ ## Output format
76
+
77
+ 1. The **case matrix** per behavior — case name → category (happy / boundary / error / abuse) → one-line why — in the reply or as a comment block atop the test file.
78
+ 2. The **floor check**, stated explicitly: `floor met: happy ✓ boundary ✓ error ✓ (abuse: n/a — no security surface)`.
79
+ 3. The **cross-check result**: which path ran (subagent + lens, or degraded self-review) and which cases it added — or explicitly "none".
80
+ 4. **Dropped/deferred cases** with a one-line reason each.
81
+
82
+ ## Gotcha
83
+
84
+ - Line coverage lies — 100 % of lines with happy-path inputs still misses every boundary. Count **cases**, not lines.
85
+ - The floor is per **behavior**, not per file — one boundary test in a 5-behavior file does not clear four other behaviors.
86
+ - Enumeration is not an implementation license: the cap and [`testing-anti-patterns`](../testing-anti-patterns/SKILL.md) Anti-Pattern 6 still apply — 6 meaningful tests beat 20 trivial ones.
87
+ - "No subagent available" is not "skip step 4" — the degraded self-review is mandatory and cheap.
88
+ - A case list written *after* the tests is decoration — the funnel runs before the first RED.
89
+
90
+ ## Do NOT
91
+
92
+ - Do NOT write the first test before the case list exists.
93
+ - Do NOT stop after the happy-path case — the floor is 1 happy + 1 boundary + 1 error per behavior.
94
+ - Do NOT pad the list with cases that fail for the same reason — data providers cover value variations.
95
+ - Do NOT skip the step-4 cross-check because subagents are unavailable — run the degraded self-review.
96
+ - Do NOT run the full funnel on trivial diffs — 1 happy + 1 boundary suffices there.
97
+ - Do NOT drop enumerated cases silently — record them with a reason.
98
+
99
+ ## Auto-trigger keywords
100
+
101
+ - test case discovery
102
+ - what to test
103
+ - test coverage plan
104
+ - edge cases
105
+ - boundary cases
106
+ - happy path only
107
+ - broad test coverage
108
+ - case matrix
109
+ - negative tests
110
+
111
+ ## See also
112
+
113
+ - [`test-driven-development`](../test-driven-development/SKILL.md) — consumes the case list; one RED → GREEN cycle per case.
114
+ - [`testing-anti-patterns`](../testing-anti-patterns/SKILL.md) — assertion-quality floor (overfit, tautology, gaming the green).
115
+ - [`judge-test-coverage`](../judge-test-coverage/SKILL.md) — after-the-fact coverage review.
116
+ - [`pest-testing`](../pest-testing/SKILL.md) · [`api-testing`](../api-testing/SKILL.md) · [`playwright-testing`](../playwright-testing/SKILL.md) — stack-specific execution.
117
+ - Rule `senior-engineering-discipline` — the Iron-Law floor this procedure operationalizes.
118
+ - Rule `broken-access-control` — the three negative tests on data-returning endpoints.
@@ -0,0 +1,52 @@
1
+ {
2
+ "skill": "test-case-discovery",
3
+ "last_eval": "2026-07-10",
4
+ "description": "5 should-trigger + 5 should-not-trigger queries. Should-trigger covers DE + EN phrasings for pre-write test-case enumeration (what to test, edge cases, coverage breadth). Should-not-trigger covers near-miss neighbours: assertion quality (testing-anti-patterns), after-the-fact coverage review (judge-test-coverage), failing-test diagnosis (systematic-debugging), stack-specific execution.",
5
+ "queries": [
6
+ {
7
+ "q": "what should we test here — I don't want happy-path-only coverage",
8
+ "trigger": true
9
+ },
10
+ {
11
+ "q": "enumerate the edge cases for this endpoint before we write the tests",
12
+ "trigger": true
13
+ },
14
+ {
15
+ "q": "welche Testfälle brauchen wir für dieses Feature — auch Grenzfälle und Fehlerpfade?",
16
+ "trigger": true
17
+ },
18
+ {
19
+ "q": "build a case matrix for this behavior — happy, boundary, error, abuse",
20
+ "trigger": true
21
+ },
22
+ {
23
+ "q": "ask a subagent what else we could test so coverage is broad",
24
+ "trigger": true
25
+ },
26
+ {
27
+ "q": "this assertion looks tautological — is the test overfit?",
28
+ "trigger": false,
29
+ "note": "assertion quality → testing-anti-patterns"
30
+ },
31
+ {
32
+ "q": "are the tests on this finished diff enough?",
33
+ "trigger": false,
34
+ "note": "after-the-fact coverage review → judge-test-coverage"
35
+ },
36
+ {
37
+ "q": "this Pest test keeps failing and I don't understand why",
38
+ "trigger": false,
39
+ "note": "failing-test diagnosis → systematic-debugging"
40
+ },
41
+ {
42
+ "q": "how do I mock Http in a Laravel feature test?",
43
+ "trigger": false,
44
+ "note": "stack-specific execution → pest-testing"
45
+ },
46
+ {
47
+ "q": "schreib die Playwright-Specs für den Login-Flow, die Fälle stehen schon im Ticket",
48
+ "trigger": false,
49
+ "note": "case list already exists → playwright-testing executes it"
50
+ }
51
+ ]
52
+ }
@@ -92,7 +92,25 @@ State in one sentence: *"When X happens, the system should do Y."*
92
92
  If you cannot state it in one sentence, the scope is too big — split into
93
93
  multiple tests, each covering one sentence.
94
94
 
95
- ### 2. Write the failing test first
95
+ ### 2. Enumerate the cases — discovery before writing (MANDATORY)
96
+
97
+ Before the first test is written, run the
98
+ [`test-case-discovery`](../test-case-discovery/SKILL.md) funnel for the
99
+ behavior: dimension scan → case synthesis → optional subagent cross-check →
100
+ prioritization. Do not proceed to step 3 with fewer than the floor:
101
+
102
+ * **1 happy + 1 boundary + 1 error case per behavior** (+1 abuse case on
103
+ security-relevant paths).
104
+ * Cap at 5–8 cases per behavior; each must be able to fail for a
105
+ **distinct** reason.
106
+ * Trivial change (< 10 lines, pure refactor, no new behavior) → skip the
107
+ funnel; 1 happy + 1 boundary case suffices.
108
+
109
+ Each case from the list then gets its own RED → GREEN cycle (steps 3–6).
110
+ A behavior whose only test is the happy path is **not done** — it is the
111
+ first item of an unfinished case list.
112
+
113
+ ### 3. Write the failing test first
96
114
 
97
115
  Write the smallest test that expresses the sentence from step 1.
98
116
 
@@ -101,7 +119,7 @@ Write the smallest test that expresses the sentence from step 1.
101
119
  * Real code paths, not mocks — mock only at I/O boundaries (HTTP, DB, time).
102
120
  * Use a descriptive name: `it_rejects_empty_email`, not `test_email_1`.
103
121
 
104
- ### 3. Run the test and watch it fail
122
+ ### 4. Run the test and watch it fail
105
123
 
106
124
  Execute the single test (targeted, not the full suite):
107
125
 
@@ -120,7 +138,7 @@ Required observations **before proceeding**:
120
138
  * If the test passes immediately → it does not test what you think. Fix
121
139
  the test, do not start writing production code.
122
140
 
123
- ### 4. Write minimum code to pass
141
+ ### 5. Write minimum code to pass
124
142
 
125
143
  Add **just enough** production code to make the test green. No extra
126
144
  features, no unrelated refactoring, no "while I'm here" cleanups.
@@ -129,7 +147,7 @@ If you feel the urge to add a parameter, edge case, or helper not covered
129
147
  by the current test — stop. That belongs in the next RED step, not this
130
148
  GREEN step.
131
149
 
132
- ### 5. Run again and watch it pass
150
+ ### 6. Run again and watch it pass
133
151
 
134
152
  Re-run the same targeted command. Required:
135
153
 
@@ -137,7 +155,7 @@ Re-run the same targeted command. Required:
137
155
  * No previously green tests have turned red.
138
156
  * Test output is clean (no new warnings, deprecations, or noise).
139
157
 
140
- ### 6. Refactor (only if green)
158
+ ### 7. Refactor (only if green)
141
159
 
142
160
  With all tests green, you may:
143
161
 
@@ -148,7 +166,7 @@ With all tests green, you may:
148
166
  Do **not** add new behavior during refactor — that needs its own failing
149
167
  test first. Re-run tests after the refactor to confirm still-green.
150
168
 
151
- ### 7. Repeat for the next behavior
169
+ ### 8. Repeat for the next behavior
152
170
 
153
171
  Back to step 1 with the next single-sentence behavior.
154
172
 
@@ -260,6 +278,8 @@ wait for their own failing tests.
260
278
 
261
279
  * Do NOT write or modify production code before the failing test exists
262
280
  and has been observed to fail
281
+ * Do NOT stop after the happy-path test — work through the enumerated
282
+ case list from step 2 (boundary, error, abuse where relevant)
263
283
  * Do NOT accept a test that never failed as evidence the code works
264
284
  * Do NOT bundle refactors into the GREEN step
265
285
  * Do NOT silence a flaky test — diagnose it, or delete it
@@ -274,6 +294,8 @@ wait for their own failing tests.
274
294
 
275
295
  ## When to hand over to another skill
276
296
 
297
+ * Enumerating what to test before writing (case matrix, dimension scan,
298
+ subagent cross-check) → [`test-case-discovery`](../test-case-discovery/SKILL.md)
277
299
  * Project type-checker / linter / formatter (PHPStan, ECS, Rector for PHP — tsc / eslint / prettier for TS — ruff / mypy for Python) → [`quality-tools`](../quality-tools/SKILL.md)
278
300
  * Full Pest conventions and Laravel test helpers → [`pest-testing`](../pest-testing/SKILL.md)
279
301
  * Running tests inside Docker → [`tests-execute`](../tests-execute/SKILL.md)
@@ -285,6 +307,10 @@ wait for their own failing tests.
285
307
  Before marking TDD work complete:
286
308
 
287
309
  * [ ] Every new behavior has a test
310
+ * [ ] The case list from step 2 exists and meets the floor (1 happy +
311
+ 1 boundary + 1 error per behavior; abuse case on security paths)
312
+ * [ ] Every enumerated case is either tested or recorded as dropped with
313
+ a one-line reason — no behavior ships happy-path-only
288
314
  * [ ] Each test was observed to fail first, with a matching failure message
289
315
  * [ ] The minimum code was written to turn each RED into GREEN
290
316
  * [ ] All targeted tests pass
@@ -0,0 +1,16 @@
1
+ {
2
+ "skill": "test-driven-development",
3
+ "_calibration": "Behavioural fixture (road-to-skill-eval-coverage Phase 2, default-surface). Deterministic assertions on a real output property where reliable; rubric pins the qualitative core as a known-limit (pass ratified in PR review, not a hidden judge). finding_floor n is a conservative floor, not a calibrated per-host number.",
4
+ "scenarios": [
5
+ {
6
+ "id": "tdd-new-validator",
7
+ "prompt": "TDD a password-strength validator (min length, mixed case, a digit).",
8
+ "assertions": [
9
+ {
10
+ "kind": "rubric",
11
+ "criterion": "Writes a failing test FIRST (red), then the minimal code (green), then refactors — and covers boundary + negative cases, not only the happy path."
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
@@ -31,6 +31,7 @@ still test-after-the-fact.
31
31
  Do NOT use when:
32
32
 
33
33
  - You need to *write* tests (no anti-pattern present yet) — route to [`pest-testing`](../pest-testing/SKILL.md) or [`test-driven-development`](../test-driven-development/SKILL.md).
34
+ - You need to *enumerate* what to test before writing (case matrix, edge-case discovery) — route to [`test-case-discovery`](../test-case-discovery/SKILL.md).
34
35
  - The test failure is a real bug — route to [`systematic-debugging`](../systematic-debugging/SKILL.md).
35
36
  - You need overall coverage assessment of a finished diff — route to [`judge-test-coverage`](../judge-test-coverage/SKILL.md).
36
37
 
@@ -130,7 +131,7 @@ Gate: a feature is not complete until a failing-then-passing test cycle ran for
130
131
 
131
132
  ### Anti-Pattern 6 — Overfit / tautological assertions & unrealistic test data
132
133
 
133
- Symptom: the test passes only for one crafted input and proves nothing about the general rule — a hardcoded expected value the code always emits, a narrow regex pinned to a fixed date/id, or an assertion restating the seed. AI-written tests reach the same coverage as human tests but ~4× worse fault detection (weak-oracle): they execute the path, then assert something too weak to catch a bug. Same shape as mocking-the-mock — asserting on your own construction, not the system's behavior.
134
+ Symptom: the test passes only for one crafted input and proves nothing about the general rule — a hardcoded expected value the code will always emit, a narrow regex pinned to a fixed date/id, or an assertion that restates the seed. AI-written tests reach the same coverage as human tests but ~4× worse fault detection (the weak-oracle problem): they execute the path and then assert something too weak to catch a bug. Same shape as mocking-the-mock — asserting on your own construction rather than the system's behavior.
134
135
 
135
136
  Gate:
136
137
 
@@ -141,7 +142,7 @@ BEFORE writing an assertion:
141
142
  STOP — derive the expected from the input, and add cases that vary it.
142
143
  ```
143
144
 
144
- Test-data realism — seeders/factories emit random data; the test derives its expectation from that data, never a hardcoded literal:
145
+ Test-data realism — seeders/factories emit random data; the test derives its expectation from that data, never from a hardcoded literal:
145
146
 
146
147
  ```js
147
148
  // ❌ WRONG — hardcoded expectation, single happy case
@@ -160,11 +161,11 @@ expect((await api.get('/users/abc')).status).toBe(400) // error: invalid
160
161
  expect([403, 404]).toContain((await api.get(`/users/${otherTenantUser.id}`)).status) // abuse: tenant isolation (404 hides existence)
161
162
  ```
162
163
 
163
- Deriving from seeded data is necessary but **not sufficient** — a test that only reads back the exact fields it seeded is still overfit (a code mutation survives it). A real test also exercises boundary (empty / null / max / Unicode), error (missing / invalid), and, on security-sensitive paths, an abuse case (IDOR, injection string, XSS payload). Coverage of *cases*, not just lines.
164
+ Deriving from seeded data is necessary but **not sufficient** — a test that only reads back the exact fields it seeded is still overfit (a mutation in the code survives it). A real test also exercises boundary (empty / null / max / Unicode), error (missing / invalid), and, on security-sensitive paths, an abuse case (IDOR, injection string, XSS payload). Coverage of *cases*, not just lines.
164
165
 
165
166
  ### Anti-Pattern 7 — Gaming the green (test-integrity)
166
167
 
167
- Symptom: a test fails, and the "fix" edits the *test* instead of the code — `.skip` / `it.skip` / `xfail` / `@Disabled` on the failing case, deleting the failing assertion, loosening `toBe(x)` to `toBeTruthy()`, or rewriting `expected` to whatever the (possibly buggy) code now emits. The suite goes green while the behavior stays broken — worst outcome, because green now *hides* the bug. The automation-bias trap: under pressure to finish, optimize the signal (green) instead of the target (correct behavior).
168
+ Symptom: a test fails, and the "fix" edits the *test* instead of the code — `.skip` / `it.skip` / `xfail` / `@Disabled` on the failing case, deleting the failing assertion, loosening `toBe(x)` to `toBeTruthy()`, or rewriting the `expected` value to whatever the (possibly buggy) code now emits. The suite goes green while the behavior stays broken — the worst outcome, because green now *hides* the bug. This is the automation-bias trap: under pressure to finish, the agent optimizes the signal (green) instead of the target (correct behavior).
168
169
 
169
170
  Gate:
170
171
 
@@ -184,7 +185,7 @@ Backstop grep — skip/xfail added to chase green (a hit in a diff that also "fi
184
185
  rg -n '\b(it|test|describe)\.skip\b|\.only\b|xit\(|xdescribe\(|@pytest\.mark\.(skip|xfail)|@Disabled|->markTestSkipped\(' .
185
186
  ```
186
187
 
187
- Test-surface instance of the `autonomous-execution` N=3 / allowlist-growth antipattern (bulk `skip`/`xfail` to force green = the tool is wrong, not the content) and the `verify-before-complete` floor (green must be *earned*, not manufactured).
188
+ This is the test-surface instance of the `autonomous-execution` N=3 / allowlist-growth antipattern (bulk `skip`/`xfail` to force green counts as the tool being wrong, not the content) and the `verify-before-complete` floor (green must be *earned*, not manufactured).
188
189
 
189
190
  ## Output format
190
191
 
@@ -227,7 +228,7 @@ Test-surface instance of the `autonomous-execution` N=3 / allowlist-growth antip
227
228
 
228
229
  ## Provenance
229
230
 
230
- - Adopted from: an external reference (MIT, © 2025 an external reference).
231
+ - Adopted from: an external reference (internal provenance, redacted).
231
232
  - Cross-linked: [`pest-testing`](../pest-testing/SKILL.md), [`test-driven-development`](../test-driven-development/SKILL.md), [`judge-test-coverage`](../judge-test-coverage/SKILL.md).
232
233
  - Provenance registry: `agents/settings/contexts/skills-provenance.yml` (entry: `testing-anti-patterns`).
233
234
  - Iron-Law floor: `verify-before-complete`, `skill-quality`, `senior-engineering-discipline`.
@@ -0,0 +1,21 @@
1
+ {
2
+ "skill": "threat-modeling",
3
+ "_calibration": "Behavioural fixture (road-to-skill-eval-coverage Phase 2, default-surface). Deterministic assertions on a real output property where reliable; rubric pins the qualitative core as a known-limit (pass ratified in PR review, not a hidden judge). finding_floor n is a conservative floor, not a calibrated per-host number.",
4
+ "scenarios": [
5
+ {
6
+ "id": "threat-model-upload",
7
+ "prompt": "Threat-model a new file-upload endpoint that accepts user files.",
8
+ "assertions": [
9
+ {
10
+ "kind": "finding_floor",
11
+ "n": 3,
12
+ "pattern": "(?m)^\\s*[-*+]\\s+"
13
+ },
14
+ {
15
+ "kind": "rubric",
16
+ "criterion": "Enumerates concrete abuse cases (path traversal, SSRF via URL fetch, malicious file, authz bypass) and the missing control per case — not generic 'validate input'."
17
+ }
18
+ ]
19
+ }
20
+ ]
21
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "skill": "typography-system",
3
+ "_calibration": "Behavioural fixtures (road-to-skill-eval-coverage Phase 2, rich set). Deterministic `contains` asserts the line-height output the skill produces; the rubric checks the scale is a computed modular scale (from the given ratio), not arbitrary px — the whole point of the skill.",
4
+ "scenarios": [
5
+ {
6
+ "id": "modular-scale-from-ratio",
7
+ "prompt": "Build a type scale from a 16px base and a 1.25 modular ratio: give the step sizes, line-heights, and weights for body, h3, h2, h1.",
8
+ "assertions": [
9
+ { "kind": "contains", "value": "line-height" },
10
+ { "kind": "rubric", "criterion": "The step sizes are the 1.25 modular scale off 16px (≈16/20/25/31px), i.e. computed from the ratio, not arbitrary round numbers; each step carries a line-height and weight." }
11
+ ]
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "skill": "unit-economics-modeling",
3
+ "_calibration": "Behavioural fixture (road-to-skill-eval-coverage Phase 2, default-surface). Deterministic assertions on a real output property where reliable; rubric pins the qualitative core as a known-limit (pass ratified in PR review, not a hidden judge). finding_floor n is a conservative floor, not a calibrated per-host number.",
4
+ "scenarios": [
5
+ {
6
+ "id": "saas-unit-economics",
7
+ "prompt": "SaaS: ARPA $500/mo, gross margin 80%, monthly churn 2%, fully-loaded CAC $2000. Are we unit-economic?",
8
+ "assertions": [
9
+ {
10
+ "kind": "contains",
11
+ "value": "LTV"
12
+ },
13
+ {
14
+ "kind": "contains",
15
+ "value": "CAC"
16
+ },
17
+ {
18
+ "kind": "rubric",
19
+ "criterion": "Computes LTV=ARPA·GM/churn (=20000), CAC payback=CAC/(ARPA·GM) (=5mo), and LTV:CAC (=10) with the SaaS formulas; states the payback + ratio, not one number."
20
+ }
21
+ ]
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "skill": "verify-completion-evidence",
3
+ "_calibration": "Behavioural fixture (road-to-skill-eval-coverage Phase 2, default-surface). Deterministic assertions on a real output property where reliable; rubric pins the qualitative core as a known-limit (pass ratified in PR review, not a hidden judge). finding_floor n is a conservative floor, not a calibrated per-host number.",
4
+ "scenarios": [
5
+ {
6
+ "id": "is-this-done",
7
+ "prompt": "I think the feature is done — the code looks right. Can we close it?",
8
+ "assertions": [
9
+ {
10
+ "kind": "rubric",
11
+ "criterion": "Refuses to claim done without fresh verification evidence (a run/test), not an eyeball of the code — names the exact command that would prove it."
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "skill": "vision-articulation",
3
+ "_calibration": "Behavioural fixture (road-to-skill-eval-coverage Phase 2, default-surface). Deterministic assertions on a real output property where reliable; rubric pins the qualitative core as a known-limit (pass ratified in PR review, not a hidden judge). finding_floor n is a conservative floor, not a calibrated per-host number.",
4
+ "scenarios": [
5
+ {
6
+ "id": "articulate-vision",
7
+ "prompt": "Articulate our product vision.",
8
+ "assertions": [
9
+ {
10
+ "kind": "rubric",
11
+ "criterion": "States the bet in one sentence, why-now/why-us with evidence, and a counter-case — not an unopposed aspiration."
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }