devflow-kit 3.12.1 → 3.13.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 (75) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/agents/architect.md +10 -9
  3. package/dist/agents/code.md +6 -6
  4. package/dist/agents/design.md +7 -7
  5. package/dist/agents/harden.md +6 -8
  6. package/dist/agents/review.md +5 -6
  7. package/dist/cli/commands/init-seed.js +5 -1
  8. package/dist/cli/commands/init.js +27 -19
  9. package/dist/cli/commands/tdd.js +230 -0
  10. package/dist/cli/commands/uninstall.js +2 -2
  11. package/dist/cli.js +2 -0
  12. package/dist/commands/implement.md +1 -1
  13. package/dist/commands/plan.md +23 -61
  14. package/dist/compliance-off/commands/implement.md +1 -1
  15. package/dist/compliance-off/commands/plan.md +23 -61
  16. package/dist/compliance-off/skills/git/references/tracker/github/ensure-pr-ready.md +1 -0
  17. package/dist/compliance-off/skills/git/references/tracker/jira/ensure-pr-ready.md +1 -0
  18. package/dist/compliance-off/skills/git/references/tracker/linear/ensure-pr-ready.md +1 -0
  19. package/dist/compliance-tdd-off/agents/triage.md +173 -0
  20. package/dist/core/assets.js +40 -33
  21. package/dist/core/curation-variants.js +191 -76
  22. package/dist/core/feature-switch.js +3 -2
  23. package/dist/core/installed-variants.js +45 -14
  24. package/dist/core/manifest.js +3 -0
  25. package/dist/core/mds-variants.js +13 -6
  26. package/dist/core/plugins.js +38 -9
  27. package/dist/curation-compliance-off/commands/implement.md +1 -1
  28. package/dist/curation-compliance-off/commands/plan.md +23 -61
  29. package/dist/curation-compliance-tdd-off/agents/triage.md +170 -0
  30. package/dist/curation-off/agents/architect.md +10 -9
  31. package/dist/curation-off/agents/code.md +6 -6
  32. package/dist/curation-off/agents/design.md +7 -7
  33. package/dist/curation-off/agents/harden.md +6 -8
  34. package/dist/curation-off/agents/review.md +5 -6
  35. package/dist/curation-off/commands/implement.md +1 -1
  36. package/dist/curation-off/commands/plan.md +23 -61
  37. package/dist/curation-tdd-off/agents/code.md +173 -0
  38. package/dist/curation-tdd-off/agents/triage.md +171 -0
  39. package/dist/skills/git/references/tracker/github/ensure-pr-ready.md +1 -0
  40. package/dist/skills/git/references/tracker/jira/ensure-pr-ready.md +1 -0
  41. package/dist/skills/git/references/tracker/linear/ensure-pr-ready.md +1 -0
  42. package/dist/targets/claude-code/agent-type-owner.js +20 -15
  43. package/dist/targets/claude-code/curation-install.js +120 -99
  44. package/dist/targets/claude-code/installer.js +26 -29
  45. package/dist/targets/claude-code/shipped-set.js +2 -3
  46. package/dist/tdd-off/agents/code.md +176 -0
  47. package/dist/tdd-off/agents/triage.md +174 -0
  48. package/dist/variant-axes.json +54 -27
  49. package/package.json +1 -1
  50. package/src/assets/agents/_partials/_design.mds +7 -7
  51. package/src/assets/agents/architect.mds +3 -2
  52. package/src/assets/agents/code.mds +19 -7
  53. package/src/assets/agents/harden.mds +6 -8
  54. package/src/assets/agents/plan.md +63 -0
  55. package/src/assets/agents/review.mds +5 -6
  56. package/src/assets/agents/triage.mds +4 -0
  57. package/src/assets/commands/implement.mds +1 -1
  58. package/src/assets/commands/plan.mds +22 -68
  59. package/src/assets/mds/git/_ops_steps.mds +1 -0
  60. package/src/assets/skills/agent-references/references/commands/plan-levels.md +3 -3
  61. package/src/assets/skills/agent-references/references/synthesize/planning.md +9 -9
  62. package/src/assets/skills/design-review/SKILL.md +9 -12
  63. package/src/assets/skills/design-review/references/anti-patterns.md +4 -1
  64. package/src/assets/skills/gap-analysis/SKILL.md +2 -2
  65. package/src/assets/skills/git/references/patterns.md +3 -0
  66. package/src/assets/skills/patterns/SKILL.md +2 -4
  67. package/src/assets/skills/quality-gates/SKILL.md +2 -2
  68. package/src/assets/skills/quality-gates/references/patterns.md +3 -3
  69. package/src/assets/skills/quality-gates/references/report-template.md +2 -2
  70. package/src/assets/skills/quality-gates/references/violations.md +5 -5
  71. package/src/assets/skills/test-driven-development/SKILL.md +5 -5
  72. package/src/assets/skills/test-driven-development/references/rationalization-prevention.md +1 -1
  73. package/src/assets/skills/testing/SKILL.md +9 -9
  74. package/src/assets/skills/testing/references/report-template.md +1 -1
  75. package/src/assets/skills/testing/references/violations.md +1 -1
@@ -79,7 +79,7 @@ for (let i = 0; i <= array.length; i++) { // Should be < not <=
79
79
 
80
80
  **Checklist**:
81
81
  - [ ] Happy path works correctly
82
- - [ ] Edge cases handled (null, empty, boundary values)
82
+ - [ ] Named edge cases handled (null, empty, boundary values)
83
83
  - [ ] Error cases handled gracefully
84
84
  - [ ] No race conditions in concurrent code
85
85
  - [ ] No infinite loops or recursion without base case
@@ -204,7 +204,7 @@ it('creates user', async () => {
204
204
  expect(mockDb.insert).toHaveBeenCalled(); // Only checks mock was called
205
205
  });
206
206
 
207
- // BAD: Missing edge case tests
207
+ // BAD: No test for a named edge case (division by zero)
208
208
  describe('divide', () => {
209
209
  it('divides numbers', () => {
210
210
  expect(divide(10, 2)).toBe(5);
@@ -215,9 +215,9 @@ describe('divide', () => {
215
215
 
216
216
  **Checklist**:
217
217
  - [ ] New code has corresponding tests
218
- - [ ] Tests cover happy path
219
- - [ ] Tests cover error cases
220
- - [ ] Tests cover edge cases
218
+ - [ ] Tests cover each acceptance-criterion behaviour
219
+ - [ ] Tests cover each trust-boundary, data-loss, security and fail-closed path
220
+ - [ ] Edge-case tests exist only for named cases
221
221
  - [ ] Tests are not brittle (test behavior, not implementation)
222
222
  - [ ] Tests would fail if code breaks
223
223
 
@@ -19,7 +19,7 @@ activation:
19
19
 
20
20
  # Test-Driven Development
21
21
 
22
- Use the RED-GREEN-REFACTOR cycle for all implementation work. Tests define the design. Code satisfies the tests. Refactoring improves the design without changing behavior.
22
+ Use the RED-GREEN-REFACTOR cycle for all implementation work. Refactoring improves the design without changing behavior.
23
23
 
24
24
  ## Iron Law
25
25
 
@@ -43,7 +43,7 @@ Write a test that describes the behavior you want. Run it. Watch it fail. The fa
43
43
 
44
44
  Write the simplest production code that makes the failing test pass. Hardcode first if that is simplest; generalize when the next test forces it. No code for later, no optimizing, no cleanup.
45
45
 
46
- **Checkpoint:** All affected tests pass. If any test fails, fix it before moving on.
46
+ **Checkpoint:** All affected tests pass.
47
47
 
48
48
  ### Step 3: REFACTOR — Improve Without Changing Behavior
49
49
 
@@ -78,12 +78,12 @@ An excuse to skip the test-first step is a rationalization: reject it. `referenc
78
78
 
79
79
  ## What to Test
80
80
 
81
- Follow the project's test layout and conventions, and import the module under test, not its internal helpers.
81
+ Follow the project's test layout, and import the module under test, not its helpers.
82
82
 
83
83
  | Test | Don't Test |
84
84
  |------|------------|
85
85
  | Public API behavior | Private implementation details |
86
- | Error conditions and edge cases | Framework internals |
86
+ | Trust-boundary, data-loss, security and fail-closed paths; named edge cases | Framework internals |
87
87
  | Integration points (boundaries) | Third-party library correctness |
88
88
  | State transitions | Getter/setter plumbing (unless non-trivial) |
89
89
 
@@ -98,7 +98,7 @@ When you skip TDD, state the reason from this list: "Skipping TDD because: [reas
98
98
 
99
99
  ## By Mode
100
100
 
101
- - **IMPLEMENT**: write the failing test before production code, one behavior at a time. The Code agent preloads this skill.
101
+ - **IMPLEMENT**: write the failing test before production code, one behavior at a time.
102
102
  - **DEBUG**: write a test that reproduces the bug first, then fix.
103
103
  - **PLAN**: the plan has a test strategy and orders test files first.
104
104
  - **RESOLVE**: the Code agent (issue-fix mode) writes a failing-then-passing regression test for every fix.
@@ -7,7 +7,7 @@ The excuses table, the mid-work red flags, a test-first example, and detailed co
7
7
  | Excuse | Why It Feels Right | Why It's Wrong | Correct Action |
8
8
  |--------|-------------------|----------------|----------------|
9
9
  | "I'll write tests after" | Need to see the shape first | Tests ARE the shape — they define the interface before implementation exists | Write the test first |
10
- | "Too simple to test" | It's just a getter/setter | Getters break, defaults change, edge cases hide in "simple" code | Write it — takes 30 seconds |
10
+ | "Too simple to test" | It's just a getter/setter | Getters break and defaults change; code with an acceptance-criterion behaviour always gets its test | Test that behaviour — takes 30 seconds |
11
11
  | "I'll refactor later" | Just get it working now | "Later" never comes; technical debt compounds silently | Refactor now in Step 3 |
12
12
  | "Test is too hard to write" or "the test setup is too complex" | Mocking is painful | Hard-to-test code = bad design, and complex setup = too much coupling; the test is telling you the interface is wrong | Simplify the interface first |
13
13
  | "Need to see the whole picture" or "the architecture first" | Can't test what I haven't designed or structured yet | TDD IS design; each test reveals the next piece of the interface, and tests DEFINE the architecture | Let the tests drive the design and structure |
@@ -30,7 +30,7 @@ activation:
30
30
  |-------|---------|
31
31
  | Pyramid | Many unit → fewer integration → fewest E2E |
32
32
  | Trophy | Integration tests give best ROI for UI-heavy code |
33
- | Google | 70% unit / 20% integration / 10% E2E; avoid E2E excess |
33
+ | Google | 70% unit / 20% integration / 10% E2E |
34
34
 
35
35
  ## Test Doubles Taxonomy
36
36
 
@@ -89,8 +89,8 @@ Quarantine flaky tests immediately — a suite that sometimes passes is worse th
89
89
  | Severity | Criteria |
90
90
  |----------|----------|
91
91
  | **CRITICAL** | Tests don't verify behavior; critical paths untested; everything mocked |
92
- | **HIGH** | Missing error paths; flaky tests; slow (>10s); setup >10 lines |
93
- | **MEDIUM** | Missing edge cases; weak assertions; unclear AAA structure |
92
+ | **HIGH** | Untested trust-boundary, data-loss, security or fail-closed path; flaky tests; slow (>10s); setup >10 lines |
93
+ | **MEDIUM** | Named edge case with no test; weak assertions; unclear AAA structure |
94
94
  | **LOW** | Organization; naming clarity |
95
95
 
96
96
  ## Test Suite Safety
@@ -103,17 +103,17 @@ Quarantine flaky tests immediately — a suite that sometimes passes is worse th
103
103
 
104
104
  | Reference | Contents |
105
105
  |-----------|----------|
106
- | `references/sources.md` | Full bibliography (20 sources) |
107
- | `references/violations.md` | Extended violations with citations |
106
+ | `references/sources.md` | Bibliography (20 sources) |
107
+ | `references/violations.md` | Violations with citations |
108
108
  | `references/patterns.md` | Correct patterns with citations |
109
- | `references/detection.md` | Bash commands for automated detection |
110
- | `references/report-template.md` | Report format for documenting issues |
109
+ | `references/detection.md` | Detection commands |
110
+ | `references/report-template.md` | Report format |
111
111
 
112
112
  ## Quality Gates
113
113
 
114
- - [ ] Setup <10 lines; use fakes over mocks for complex dependencies
114
+ - [ ] Setup <10 lines
115
115
  - [ ] Each new assertion would fail, not error, with the change reverted: its RED run counts, else a bad input or a temporary uncommitted revert of your own edit, never a stash
116
- - [ ] All branches covered: happy path + errors + edge cases
116
+ - [ ] A test for each acceptance-criterion behaviour; an edge-case test only for a named case
117
117
  - [ ] Test names describe expected behavior
118
118
  - [ ] Tests follow Arrange-Act-Assert structure
119
119
  - [ ] No flaky patterns
@@ -55,7 +55,7 @@ Use this template when reporting test design issues.
55
55
  |----------|---------|---------|
56
56
  | **CRITICAL** | Fundamental design flaws | Complex setup >10 lines, repetitive boilerplate >3 times, mock objects >5 methods, testing private methods |
57
57
  | **HIGH** | Maintenance complications | Difficult mocking >20 lines, implementation testing, environment manipulation, database seeding |
58
- | **MEDIUM** | Reduced clarity | Test helper abuse, inconsistent assertion patterns, missing edge case coverage |
58
+ | **MEDIUM** | Reduced clarity | Test helper abuse, inconsistent assertion patterns, a named edge case with no test |
59
59
  | **LOW** | Minor improvements | Organization, naming clarity |
60
60
 
61
61
  ---
@@ -175,7 +175,7 @@ it('marks order as paid', async () => {
175
175
 
176
176
  ## Coverage Violations [4]
177
177
 
178
- ### Missing Edge Cases [4]
178
+ ### Missing Named Edge Cases [4]
179
179
 
180
180
  Google SWE Book: happy-path-only tests provide false confidence [4]:
181
181