mindsystem-cc 3.12.0 → 3.13.1
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.
- package/agents/ms-consolidator.md +4 -4
- package/agents/ms-executor.md +19 -351
- package/agents/ms-flutter-code-quality.md +7 -6
- package/agents/ms-mock-generator.md +51 -138
- package/agents/ms-plan-checker.md +170 -175
- package/agents/ms-plan-writer.md +120 -115
- package/agents/ms-verifier.md +22 -18
- package/commands/ms/check-phase.md +3 -3
- package/commands/ms/execute-phase.md +8 -6
- package/commands/ms/plan-phase.md +4 -3
- package/commands/ms/verify-work.md +7 -7
- package/mindsystem/references/goal-backward.md +10 -25
- package/mindsystem/references/mock-patterns.md +149 -240
- package/mindsystem/references/plan-format.md +326 -247
- package/mindsystem/references/scope-estimation.md +29 -24
- package/mindsystem/references/tdd-execution.md +70 -0
- package/mindsystem/references/tdd.md +53 -194
- package/mindsystem/templates/UAT.md +16 -16
- package/mindsystem/templates/phase-prompt.md +51 -367
- package/mindsystem/templates/roadmap.md +1 -1
- package/mindsystem/templates/verification-report.md +2 -2
- package/mindsystem/workflows/adhoc.md +16 -21
- package/mindsystem/workflows/execute-phase.md +71 -49
- package/mindsystem/workflows/execute-plan.md +183 -1054
- package/mindsystem/workflows/plan-phase.md +47 -38
- package/mindsystem/workflows/verify-phase.md +16 -20
- package/mindsystem/workflows/verify-work.md +54 -67
- package/package.json +1 -1
- package/scripts/update-state.sh +59 -0
- package/scripts/validate-execution-order.sh +102 -0
- package/skills/flutter-code-quality/SKILL.md +4 -3
- package/mindsystem/templates/summary.md +0 -293
- package/mindsystem/workflows/generate-mocks.md +0 -261
|
@@ -32,10 +32,10 @@ Why 50% not 80%?
|
|
|
32
32
|
| Task Complexity | Tasks/Plan | Context/Task | Total |
|
|
33
33
|
|-----------------|------------|--------------|-------|
|
|
34
34
|
| Simple (CRUD, config) | 3 | ~10-15% | ~30-45% |
|
|
35
|
-
| Complex (auth, payments) | 2 | ~
|
|
35
|
+
| Complex (auth, payments) | 2-3 | ~15-25% | ~40-50% |
|
|
36
36
|
| Very complex (migrations, refactors) | 1-2 | ~30-40% | ~30-50% |
|
|
37
37
|
|
|
38
|
-
**
|
|
38
|
+
**Default to 3 tasks for simple-medium work, 2 for complex.** Executor overhead reduction creates headroom for the third task.
|
|
39
39
|
</task_rule>
|
|
40
40
|
|
|
41
41
|
<tdd_plans>
|
|
@@ -108,24 +108,23 @@ Plan 03: Visualization components
|
|
|
108
108
|
</splitting_strategies>
|
|
109
109
|
|
|
110
110
|
<dependency_awareness>
|
|
111
|
-
**
|
|
111
|
+
**Dependencies centralized in EXECUTION-ORDER.md.**
|
|
112
112
|
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
# Dependent plan (later wave)
|
|
120
|
-
depends_on: ["03-01"]
|
|
121
|
-
files_modified: [src/integration/stripe.ts]
|
|
113
|
+
```markdown
|
|
114
|
+
## Wave 1 (parallel)
|
|
115
|
+
- 03-01-PLAN.md — User feature
|
|
116
|
+
- 03-02-PLAN.md — Product feature
|
|
122
117
|
|
|
118
|
+
## Wave 2
|
|
119
|
+
- 03-03-PLAN.md — Integration (after: 01, 02)
|
|
123
120
|
```
|
|
124
121
|
|
|
122
|
+
Plans declare files in `**Files:**` lines within `## Changes` subsections. EXECUTION-ORDER.md tracks wave groups and dependencies.
|
|
123
|
+
|
|
125
124
|
**Wave assignment rules:**
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
- Shared
|
|
125
|
+
- No dependencies + no file conflicts with other Wave 1 plans → Wave 1 (parallel)
|
|
126
|
+
- Depends on earlier plan → later wave (runs after dependency completes)
|
|
127
|
+
- Shared files with sibling plan → sequential (by plan number)
|
|
129
128
|
|
|
130
129
|
**SUMMARY references:**
|
|
131
130
|
- Only reference prior SUMMARY if genuinely needed (imported types, decisions affecting this plan)
|
|
@@ -134,17 +133,21 @@ files_modified: [src/integration/stripe.ts]
|
|
|
134
133
|
</dependency_awareness>
|
|
135
134
|
|
|
136
135
|
<file_ownership>
|
|
137
|
-
**Exclusive file ownership prevents conflicts
|
|
136
|
+
**Exclusive file ownership prevents conflicts.**
|
|
138
137
|
|
|
139
|
-
|
|
140
|
-
# Plan 01 frontmatter
|
|
141
|
-
files_modified: [src/models/user.ts, src/api/users.ts, src/components/UserList.tsx]
|
|
138
|
+
File ownership is determined from `**Files:**` lines in each plan's `## Changes` section and validated in EXECUTION-ORDER.md wave assignments.
|
|
142
139
|
|
|
143
|
-
|
|
144
|
-
|
|
140
|
+
```markdown
|
|
141
|
+
# Plan 01 Changes
|
|
142
|
+
### 1. Create User model
|
|
143
|
+
**Files:** `src/models/user.ts`, `src/api/users.ts`, `src/components/UserList.tsx`
|
|
144
|
+
|
|
145
|
+
# Plan 02 Changes
|
|
146
|
+
### 1. Create Product model
|
|
147
|
+
**Files:** `src/models/product.ts`, `src/api/products.ts`, `src/components/ProductList.tsx`
|
|
145
148
|
```
|
|
146
149
|
|
|
147
|
-
No overlap → can run parallel.
|
|
150
|
+
No overlap → can run parallel (same wave in EXECUTION-ORDER.md).
|
|
148
151
|
|
|
149
152
|
**If file appears in multiple plans:** Later plan depends on earlier (by plan number).
|
|
150
153
|
**If file cannot be split:** Plans must be sequential for that file.
|
|
@@ -202,6 +205,8 @@ Waves: [01, 02, 03] (all parallel)
|
|
|
202
205
|
|
|
203
206
|
**2 tasks:** Simple ~30%, Medium ~50%, Complex ~80% (split)
|
|
204
207
|
**3 tasks:** Simple ~45%, Medium ~75% (risky), Complex 120% (impossible)
|
|
208
|
+
|
|
209
|
+
**Executor overhead:** ~2,400 tokens (down from ~6,900 in previous versions), freeing ~4,500 tokens per plan for code quality.
|
|
205
210
|
</estimating_context>
|
|
206
211
|
|
|
207
212
|
<summary>
|
|
@@ -215,9 +220,9 @@ Waves: [01, 02, 03] (all parallel)
|
|
|
215
220
|
**The rules:**
|
|
216
221
|
- If in doubt, split. Quality over consolidation.
|
|
217
222
|
- Vertical slices over horizontal layers.
|
|
218
|
-
-
|
|
223
|
+
- Dependencies centralized in EXECUTION-ORDER.md.
|
|
219
224
|
- Autonomous plans get parallel execution.
|
|
220
225
|
|
|
221
|
-
**Commit rule:** Each plan produces 3-4 commits total (2-3
|
|
226
|
+
**Commit rule:** Each plan produces 3-4 commits total (2-3 change commits + 1 docs commit).
|
|
222
227
|
</summary>
|
|
223
228
|
</scope_estimation>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<tdd_execution>
|
|
2
|
+
|
|
3
|
+
## RED-GREEN-REFACTOR Cycle
|
|
4
|
+
|
|
5
|
+
Lazy-loaded by executor when plan metadata says `**Type:** tdd`.
|
|
6
|
+
|
|
7
|
+
### RED — Write failing test
|
|
8
|
+
|
|
9
|
+
1. Create test file following project conventions
|
|
10
|
+
2. Write test describing expected behavior (from plan's behavior specification)
|
|
11
|
+
3. Run test — MUST fail (if passes, feature exists or test is wrong — investigate)
|
|
12
|
+
4. Commit: `test({phase}-{plan}): add failing test for [feature]`
|
|
13
|
+
|
|
14
|
+
### GREEN — Implement to pass
|
|
15
|
+
|
|
16
|
+
1. Write minimal code to make test pass — no cleverness, no optimization
|
|
17
|
+
2. Run test — MUST pass
|
|
18
|
+
3. Commit: `feat({phase}-{plan}): implement [feature]`
|
|
19
|
+
|
|
20
|
+
### REFACTOR (if needed)
|
|
21
|
+
|
|
22
|
+
1. Clean up implementation if obvious improvements exist
|
|
23
|
+
2. Run tests — MUST still pass
|
|
24
|
+
3. Commit only if changes made: `refactor({phase}-{plan}): clean up [feature]`
|
|
25
|
+
|
|
26
|
+
Result: Each TDD plan produces 2-3 atomic commits (test/feat/refactor).
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Test Framework Setup
|
|
31
|
+
|
|
32
|
+
When no test framework is configured, set it up as part of the RED phase:
|
|
33
|
+
|
|
34
|
+
| Project | Framework | Install |
|
|
35
|
+
|---------|-----------|---------|
|
|
36
|
+
| Node.js | Jest | `npm install -D jest @types/jest ts-jest` |
|
|
37
|
+
| Node.js (Vite) | Vitest | `npm install -D vitest` |
|
|
38
|
+
| Python | pytest | `pip install pytest` |
|
|
39
|
+
| Go | testing | Built-in |
|
|
40
|
+
| Rust | cargo test | Built-in |
|
|
41
|
+
| Flutter/Dart | flutter_test | Built-in |
|
|
42
|
+
|
|
43
|
+
Detect project type from package.json / requirements.txt / go.mod / pubspec.yaml. Create config if needed. Verify with empty test run.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Commit Pattern
|
|
48
|
+
|
|
49
|
+
TDD plans use dedicated commit types per phase:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
test(08-02): add failing test for email validation
|
|
53
|
+
feat(08-02): implement email validation
|
|
54
|
+
refactor(08-02): extract regex to constant # optional
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Comparison: Standard plans produce 1 commit per task. TDD plans produce 2-3 commits for single feature.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Error Handling
|
|
62
|
+
|
|
63
|
+
| Situation | Action |
|
|
64
|
+
|-----------|--------|
|
|
65
|
+
| Test doesn't fail in RED | Feature may exist or test is wrong — investigate before proceeding |
|
|
66
|
+
| Test doesn't pass in GREEN | Debug implementation, keep iterating until green |
|
|
67
|
+
| Tests fail in REFACTOR | Undo refactor — commit was premature, refactor in smaller steps |
|
|
68
|
+
| Unrelated tests break | Stop and investigate — may indicate coupling issue |
|
|
69
|
+
|
|
70
|
+
</tdd_execution>
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
# TDD Reference for Plan Writers
|
|
2
|
+
|
|
2
3
|
TDD is about design quality, not coverage metrics. The red-green-refactor cycle forces you to think about behavior before implementation, producing cleaner interfaces and more testable code.
|
|
3
4
|
|
|
4
5
|
**Principle:** If you can describe the behavior as `expect(fn(input)).toBe(output)` before writing `fn`, TDD improves the result.
|
|
5
6
|
|
|
6
|
-
**Key insight:** TDD work is fundamentally heavier than standard tasks—it requires 2-3 execution cycles (RED
|
|
7
|
-
|
|
7
|
+
**Key insight:** TDD work is fundamentally heavier than standard tasks — it requires 2-3 execution cycles (RED -> GREEN -> REFACTOR), each with file reads, test runs, and potential debugging. TDD features get dedicated plans to ensure full context is available throughout the cycle.
|
|
8
|
+
|
|
9
|
+
---
|
|
8
10
|
|
|
9
|
-
<when_to_use_tdd>
|
|
10
11
|
## When TDD Improves Quality
|
|
11
12
|
|
|
12
13
|
**TDD candidates (create a TDD plan):**
|
|
@@ -18,7 +19,7 @@ TDD is about design quality, not coverage metrics. The red-green-refactor cycle
|
|
|
18
19
|
- State machines and workflows
|
|
19
20
|
- Utility functions with clear specifications
|
|
20
21
|
|
|
21
|
-
**Skip TDD (use standard plan
|
|
22
|
+
**Skip TDD (use standard plan):**
|
|
22
23
|
- UI layout, styling, visual components
|
|
23
24
|
- Configuration changes
|
|
24
25
|
- Glue code connecting existing components
|
|
@@ -27,92 +28,65 @@ TDD is about design quality, not coverage metrics. The red-green-refactor cycle
|
|
|
27
28
|
- Exploratory prototyping
|
|
28
29
|
|
|
29
30
|
**Heuristic:** Can you write `expect(fn(input)).toBe(output)` before writing `fn`?
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
- Yes: Create a TDD plan
|
|
32
|
+
- No: Use standard plan, add tests after if needed
|
|
33
|
+
|
|
34
|
+
---
|
|
33
35
|
|
|
34
|
-
<tdd_plan_structure>
|
|
35
36
|
## TDD Plan Structure
|
|
36
37
|
|
|
37
|
-
Each TDD plan implements **one feature** through the full RED-GREEN-REFACTOR cycle.
|
|
38
|
+
Each TDD plan implements **one feature** through the full RED-GREEN-REFACTOR cycle. Use the same pure markdown format as all other plans:
|
|
38
39
|
|
|
39
40
|
```markdown
|
|
40
|
-
|
|
41
|
-
phase: XX-name
|
|
42
|
-
plan: NN
|
|
43
|
-
type: tdd
|
|
44
|
-
---
|
|
41
|
+
# Plan NN: Feature name
|
|
45
42
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<behavior>
|
|
62
|
-
[Expected behavior in testable terms]
|
|
63
|
-
Cases: input → expected output
|
|
64
|
-
</behavior>
|
|
65
|
-
<implementation>[How to implement once tests pass]</implementation>
|
|
66
|
-
</feature>
|
|
67
|
-
|
|
68
|
-
<verification>
|
|
69
|
-
[Test command that proves feature works]
|
|
70
|
-
</verification>
|
|
71
|
-
|
|
72
|
-
<success_criteria>
|
|
73
|
-
- Failing test written and committed
|
|
74
|
-
- Implementation passes test
|
|
75
|
-
- Refactor complete (if needed)
|
|
76
|
-
- All 2-3 commits present
|
|
77
|
-
</success_criteria>
|
|
78
|
-
|
|
79
|
-
<output>
|
|
80
|
-
After completion, create SUMMARY.md with:
|
|
81
|
-
- RED: What test was written, why it failed
|
|
82
|
-
- GREEN: What implementation made it pass
|
|
83
|
-
- REFACTOR: What cleanup was done (if any)
|
|
84
|
-
- Commits: List of commits produced
|
|
85
|
-
</output>
|
|
86
|
-
```
|
|
43
|
+
**Subsystem:** validation | **Type:** tdd
|
|
44
|
+
|
|
45
|
+
## Context
|
|
46
|
+
Why TDD benefits this feature. Clear inputs/outputs that make test-first
|
|
47
|
+
design valuable. Reference any prior work.
|
|
48
|
+
|
|
49
|
+
## Changes
|
|
50
|
+
|
|
51
|
+
### 1. RED — Write failing tests
|
|
52
|
+
**Files:** `src/lib/__tests__/validate-email.test.ts`
|
|
53
|
+
|
|
54
|
+
Test cases:
|
|
55
|
+
- Valid: `user@example.com`, `name+tag@domain.co.uk` -> returns true
|
|
56
|
+
- Invalid: `@domain.com`, `user@`, empty string -> returns false
|
|
57
|
+
- Edge: very long local part (>64 chars) -> returns false
|
|
87
58
|
|
|
88
|
-
|
|
89
|
-
|
|
59
|
+
Import `validateEmail` from `src/lib/validate-email.ts` (does not exist yet).
|
|
60
|
+
Run tests — all must fail with import/function error.
|
|
90
61
|
|
|
91
|
-
|
|
92
|
-
|
|
62
|
+
### 2. GREEN — Implement minimal validation
|
|
63
|
+
**Files:** `src/lib/validate-email.ts`
|
|
93
64
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
3. Run test - it MUST fail
|
|
98
|
-
4. If test passes: feature exists or test is wrong. Investigate.
|
|
99
|
-
5. Commit: `test({phase}-{plan}): add failing test for [feature]`
|
|
65
|
+
Export `validateEmail(email: string): boolean`. Use regex matching RFC 5322
|
|
66
|
+
simplified pattern. Handle null/undefined input by returning false. No
|
|
67
|
+
optimization — just make tests pass.
|
|
100
68
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
2. No cleverness, no optimization - just make it work
|
|
104
|
-
3. Run test - it MUST pass
|
|
105
|
-
4. Commit: `feat({phase}-{plan}): implement [feature]`
|
|
69
|
+
### 3. REFACTOR — Extract regex constant
|
|
70
|
+
**Files:** `src/lib/validate-email.ts`
|
|
106
71
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
3. Only commit if changes made: `refactor({phase}-{plan}): clean up [feature]`
|
|
72
|
+
Extract regex to `EMAIL_REGEX` constant at module level. Add JSDoc with
|
|
73
|
+
examples. Run tests — all must still pass. Only commit if changes improve
|
|
74
|
+
readability.
|
|
111
75
|
|
|
112
|
-
|
|
113
|
-
|
|
76
|
+
## Verification
|
|
77
|
+
- `npm test -- --grep "validate-email"` passes all cases
|
|
78
|
+
- Import works from other modules without errors
|
|
79
|
+
|
|
80
|
+
## Must-Haves
|
|
81
|
+
- [ ] Valid email addresses return true
|
|
82
|
+
- [ ] Invalid email addresses return false
|
|
83
|
+
- [ ] Edge cases (length limits, null input) handled correctly
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**One feature per TDD plan.** If features are trivial enough to batch, they're trivial enough to skip TDD — use a standard plan and add tests after.
|
|
87
|
+
|
|
88
|
+
---
|
|
114
89
|
|
|
115
|
-
<test_quality>
|
|
116
90
|
## Good Tests vs Bad Tests
|
|
117
91
|
|
|
118
92
|
**Test behavior, not implementation:**
|
|
@@ -131,123 +105,9 @@ After completion, create SUMMARY.md with:
|
|
|
131
105
|
**No implementation details:**
|
|
132
106
|
- Good: Test public API, observable behavior
|
|
133
107
|
- Bad: Mock internals, test private methods, assert on internal state
|
|
134
|
-
</test_quality>
|
|
135
|
-
|
|
136
|
-
<framework_setup>
|
|
137
|
-
## Test Framework Setup (If None Exists)
|
|
138
|
-
|
|
139
|
-
When executing a TDD plan but no test framework is configured, set it up as part of the RED phase:
|
|
140
|
-
|
|
141
|
-
**1. Detect project type:**
|
|
142
|
-
```bash
|
|
143
|
-
# JavaScript/TypeScript
|
|
144
|
-
if [ -f package.json ]; then echo "node"; fi
|
|
145
|
-
|
|
146
|
-
# Python
|
|
147
|
-
if [ -f requirements.txt ] || [ -f pyproject.toml ]; then echo "python"; fi
|
|
148
|
-
|
|
149
|
-
# Go
|
|
150
|
-
if [ -f go.mod ]; then echo "go"; fi
|
|
151
|
-
|
|
152
|
-
# Rust
|
|
153
|
-
if [ -f Cargo.toml ]; then echo "rust"; fi
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
**2. Install minimal framework:**
|
|
157
|
-
| Project | Framework | Install |
|
|
158
|
-
|---------|-----------|---------|
|
|
159
|
-
| Node.js | Jest | `npm install -D jest @types/jest ts-jest` |
|
|
160
|
-
| Node.js (Vite) | Vitest | `npm install -D vitest` |
|
|
161
|
-
| Python | pytest | `pip install pytest` |
|
|
162
|
-
| Go | testing | Built-in |
|
|
163
|
-
| Rust | cargo test | Built-in |
|
|
164
|
-
|
|
165
|
-
**3. Create config if needed:**
|
|
166
|
-
- Jest: `jest.config.js` with ts-jest preset
|
|
167
|
-
- Vitest: `vitest.config.ts` with test globals
|
|
168
|
-
- pytest: `pytest.ini` or `pyproject.toml` section
|
|
169
|
-
|
|
170
|
-
**4. Verify setup:**
|
|
171
|
-
```bash
|
|
172
|
-
# Run empty test suite - should pass with 0 tests
|
|
173
|
-
npm test # Node
|
|
174
|
-
pytest # Python
|
|
175
|
-
go test ./... # Go
|
|
176
|
-
cargo test # Rust
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
**5. Create first test file:**
|
|
180
|
-
Follow project conventions for test location:
|
|
181
|
-
- `*.test.ts` / `*.spec.ts` next to source
|
|
182
|
-
- `__tests__/` directory
|
|
183
|
-
- `tests/` directory at root
|
|
184
|
-
|
|
185
|
-
Framework setup is a one-time cost included in the first TDD plan's RED phase.
|
|
186
|
-
</framework_setup>
|
|
187
|
-
|
|
188
|
-
<error_handling>
|
|
189
|
-
## Error Handling
|
|
190
|
-
|
|
191
|
-
**Test doesn't fail in RED phase:**
|
|
192
|
-
- Feature may already exist - investigate
|
|
193
|
-
- Test may be wrong (not testing what you think)
|
|
194
|
-
- Fix before proceeding
|
|
195
|
-
|
|
196
|
-
**Test doesn't pass in GREEN phase:**
|
|
197
|
-
- Debug implementation
|
|
198
|
-
- Don't skip to refactor
|
|
199
|
-
- Keep iterating until green
|
|
200
|
-
|
|
201
|
-
**Tests fail in REFACTOR phase:**
|
|
202
|
-
- Undo refactor
|
|
203
|
-
- Commit was premature
|
|
204
|
-
- Refactor in smaller steps
|
|
205
|
-
|
|
206
|
-
**Unrelated tests break:**
|
|
207
|
-
- Stop and investigate
|
|
208
|
-
- May indicate coupling issue
|
|
209
|
-
- Fix before proceeding
|
|
210
|
-
</error_handling>
|
|
211
|
-
|
|
212
|
-
<commit_pattern>
|
|
213
|
-
## Commit Pattern for TDD Plans
|
|
214
|
-
|
|
215
|
-
TDD plans produce 2-3 atomic commits (one per phase):
|
|
216
108
|
|
|
217
|
-
|
|
218
|
-
test(08-02): add failing test for email validation
|
|
219
|
-
|
|
220
|
-
- Tests valid email formats accepted
|
|
221
|
-
- Tests invalid formats rejected
|
|
222
|
-
- Tests empty input handling
|
|
223
|
-
|
|
224
|
-
feat(08-02): implement email validation
|
|
225
|
-
|
|
226
|
-
- Regex pattern matches RFC 5322
|
|
227
|
-
- Returns boolean for validity
|
|
228
|
-
- Handles edge cases (empty, null)
|
|
229
|
-
|
|
230
|
-
refactor(08-02): extract regex to constant (optional)
|
|
231
|
-
|
|
232
|
-
- Moved pattern to EMAIL_REGEX constant
|
|
233
|
-
- No behavior changes
|
|
234
|
-
- Tests still pass
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
**Comparison with standard plans:**
|
|
238
|
-
- Standard plans: 1 commit per task, 2-4 commits per plan
|
|
239
|
-
- TDD plans: 2-3 commits for single feature
|
|
240
|
-
|
|
241
|
-
Both follow same format: `{type}({phase}-{plan}): {description}`
|
|
242
|
-
|
|
243
|
-
**Benefits:**
|
|
244
|
-
- Each commit independently revertable
|
|
245
|
-
- Git bisect works at commit level
|
|
246
|
-
- Clear history showing TDD discipline
|
|
247
|
-
- Consistent with overall commit strategy
|
|
248
|
-
</commit_pattern>
|
|
109
|
+
---
|
|
249
110
|
|
|
250
|
-
<context_budget>
|
|
251
111
|
## Context Budget
|
|
252
112
|
|
|
253
113
|
TDD plans target **~40% context usage** (lower than standard plans' ~50%).
|
|
@@ -260,4 +120,3 @@ Why lower:
|
|
|
260
120
|
Each phase involves reading files, running commands, analyzing output. The back-and-forth is inherently heavier than linear task execution.
|
|
261
121
|
|
|
262
122
|
Single feature focus ensures full quality throughout the cycle.
|
|
263
|
-
</context_budget>
|
|
@@ -14,7 +14,7 @@ source: [list of SUMMARY.md files tested]
|
|
|
14
14
|
started: [ISO timestamp]
|
|
15
15
|
updated: [ISO timestamp]
|
|
16
16
|
current_batch: [N]
|
|
17
|
-
|
|
17
|
+
mocked_files: []
|
|
18
18
|
pre_work_stash: [stash name or null]
|
|
19
19
|
---
|
|
20
20
|
|
|
@@ -138,7 +138,7 @@ mock_type: empty_response
|
|
|
138
138
|
- `started`: IMMUTABLE - set on creation
|
|
139
139
|
- `updated`: OVERWRITE - update on every change
|
|
140
140
|
- `current_batch`: OVERWRITE - current batch number
|
|
141
|
-
- `
|
|
141
|
+
- `mocked_files`: OVERWRITE - list of files with inline mocks, or empty array
|
|
142
142
|
- `pre_work_stash`: OVERWRITE - user's pre-existing work stash or null
|
|
143
143
|
|
|
144
144
|
**Progress:**
|
|
@@ -196,23 +196,22 @@ mock_type: empty_response
|
|
|
196
196
|
<mock_lifecycle>
|
|
197
197
|
|
|
198
198
|
**When batch needs mocks:**
|
|
199
|
-
1.
|
|
200
|
-
2.
|
|
201
|
-
3.
|
|
199
|
+
1. Edit service methods inline (hardcoded return values)
|
|
200
|
+
2. Record files in `mocked_files` frontmatter
|
|
201
|
+
3. User hot reloads, testing proceeds
|
|
202
202
|
|
|
203
203
|
**When fix needed:**
|
|
204
|
-
1. `git stash push -m "mocks-batch-N"
|
|
205
|
-
2.
|
|
206
|
-
3.
|
|
207
|
-
4.
|
|
208
|
-
5. Clear `mock_stash` if no conflicts
|
|
204
|
+
1. `git stash push -m "mocks-batch-N" -- <mocked_files>`
|
|
205
|
+
2. Fix applied, committed
|
|
206
|
+
3. `git stash pop` to restore mocks
|
|
207
|
+
4. If conflict: take fix version, remove file from `mocked_files`
|
|
209
208
|
|
|
210
209
|
**On batch transition (different mock_type):**
|
|
211
|
-
1.
|
|
212
|
-
2.
|
|
210
|
+
1. Revert old mocks: `git checkout -- <mocked_files>`
|
|
211
|
+
2. Clear `mocked_files`, apply new inline mocks
|
|
213
212
|
|
|
214
213
|
**On session complete:**
|
|
215
|
-
1.
|
|
214
|
+
1. Revert all mocks: `git checkout -- <mocked_files>`
|
|
216
215
|
2. Restore pre_work_stash if exists
|
|
217
216
|
|
|
218
217
|
</mock_lifecycle>
|
|
@@ -225,8 +224,9 @@ On `/ms:verify-work` with existing UAT.md:
|
|
|
225
224
|
- "complete" → offer to re-run or view results
|
|
226
225
|
- "testing" or "fixing" → resume
|
|
227
226
|
|
|
228
|
-
2. Check `
|
|
229
|
-
- If
|
|
227
|
+
2. Check `mocked_files`:
|
|
228
|
+
- If non-empty, verify mocks still present via `git diff --name-only`
|
|
229
|
+
- If mocks lost, regenerate for current batch
|
|
230
230
|
|
|
231
231
|
3. Check `current_batch`:
|
|
232
232
|
- Resume from that batch
|
|
@@ -262,7 +262,7 @@ source: 04-01-SUMMARY.md, 04-02-SUMMARY.md
|
|
|
262
262
|
started: 2025-01-15T10:30:00Z
|
|
263
263
|
updated: 2025-01-15T11:15:00Z
|
|
264
264
|
current_batch: 2
|
|
265
|
-
|
|
265
|
+
mocked_files: [src/services/auth_service.dart, src/services/api_service.dart]
|
|
266
266
|
pre_work_stash: null
|
|
267
267
|
---
|
|
268
268
|
|