mindsystem-cc 3.0.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.
- package/LICENSE +21 -0
- package/README.md +501 -0
- package/agents/ms-codebase-mapper.md +739 -0
- package/agents/ms-debugger.md +1184 -0
- package/agents/ms-designer.md +414 -0
- package/agents/ms-executor.md +760 -0
- package/agents/ms-integration-checker.md +423 -0
- package/agents/ms-milestone-auditor.md +448 -0
- package/agents/ms-mock-generator.md +182 -0
- package/agents/ms-plan-checker.md +746 -0
- package/agents/ms-research-synthesizer.md +248 -0
- package/agents/ms-researcher.md +962 -0
- package/agents/ms-roadmapper.md +606 -0
- package/agents/ms-verifier.md +779 -0
- package/agents/ms-verify-fixer.md +124 -0
- package/bin/install.js +296 -0
- package/commands/ms/add-phase.md +207 -0
- package/commands/ms/add-todo.md +182 -0
- package/commands/ms/audit-milestone.md +318 -0
- package/commands/ms/check-phase.md +162 -0
- package/commands/ms/check-todos.md +217 -0
- package/commands/ms/complete-milestone.md +137 -0
- package/commands/ms/create-roadmap.md +273 -0
- package/commands/ms/debug.md +149 -0
- package/commands/ms/define-requirements.md +121 -0
- package/commands/ms/design-phase.md +341 -0
- package/commands/ms/discuss-milestone.md +48 -0
- package/commands/ms/discuss-phase.md +60 -0
- package/commands/ms/do-work.md +90 -0
- package/commands/ms/execute-phase.md +289 -0
- package/commands/ms/help.md +623 -0
- package/commands/ms/insert-phase.md +227 -0
- package/commands/ms/list-phase-assumptions.md +50 -0
- package/commands/ms/map-codebase.md +71 -0
- package/commands/ms/new-milestone.md +193 -0
- package/commands/ms/new-project.md +338 -0
- package/commands/ms/pause-work.md +123 -0
- package/commands/ms/plan-milestone-gaps.md +285 -0
- package/commands/ms/plan-phase.md +105 -0
- package/commands/ms/progress.md +370 -0
- package/commands/ms/remove-phase.md +338 -0
- package/commands/ms/research-phase.md +175 -0
- package/commands/ms/research-project.md +339 -0
- package/commands/ms/resume-work.md +40 -0
- package/commands/ms/review-design.md +484 -0
- package/commands/ms/simplify-flutter.md +193 -0
- package/commands/ms/update.md +159 -0
- package/commands/ms/verify-work.md +92 -0
- package/commands/ms/whats-new.md +124 -0
- package/mindsystem/references/checkpoints.md +788 -0
- package/mindsystem/references/continuation-format.md +255 -0
- package/mindsystem/references/debugging/debugging-mindset.md +11 -0
- package/mindsystem/references/debugging/hypothesis-testing.md +11 -0
- package/mindsystem/references/debugging/investigation-techniques.md +11 -0
- package/mindsystem/references/debugging/verification-patterns.md +11 -0
- package/mindsystem/references/debugging/when-to-research.md +11 -0
- package/mindsystem/references/git-integration.md +254 -0
- package/mindsystem/references/goal-backward.md +286 -0
- package/mindsystem/references/mock-patterns.md +294 -0
- package/mindsystem/references/plan-format.md +473 -0
- package/mindsystem/references/principles.md +73 -0
- package/mindsystem/references/questioning.md +140 -0
- package/mindsystem/references/research-pitfalls.md +233 -0
- package/mindsystem/references/scope-estimation.md +256 -0
- package/mindsystem/references/tdd.md +263 -0
- package/mindsystem/references/verification-patterns.md +595 -0
- package/mindsystem/templates/DEBUG.md +159 -0
- package/mindsystem/templates/UAT.md +403 -0
- package/mindsystem/templates/adhoc-summary.md +153 -0
- package/mindsystem/templates/codebase/architecture.md +255 -0
- package/mindsystem/templates/codebase/concerns.md +310 -0
- package/mindsystem/templates/codebase/conventions.md +307 -0
- package/mindsystem/templates/codebase/integrations.md +280 -0
- package/mindsystem/templates/codebase/stack.md +186 -0
- package/mindsystem/templates/codebase/structure.md +285 -0
- package/mindsystem/templates/codebase/testing.md +480 -0
- package/mindsystem/templates/config.json +26 -0
- package/mindsystem/templates/context.md +140 -0
- package/mindsystem/templates/continue-here.md +78 -0
- package/mindsystem/templates/debug-subagent-prompt.md +91 -0
- package/mindsystem/templates/design-iteration.md +208 -0
- package/mindsystem/templates/design.md +417 -0
- package/mindsystem/templates/discovery.md +146 -0
- package/mindsystem/templates/milestone-archive.md +123 -0
- package/mindsystem/templates/milestone-context.md +93 -0
- package/mindsystem/templates/milestone.md +115 -0
- package/mindsystem/templates/phase-prompt.md +574 -0
- package/mindsystem/templates/project.md +184 -0
- package/mindsystem/templates/requirements.md +231 -0
- package/mindsystem/templates/research-project/ARCHITECTURE.md +204 -0
- package/mindsystem/templates/research-project/FEATURES.md +147 -0
- package/mindsystem/templates/research-project/PITFALLS.md +200 -0
- package/mindsystem/templates/research-project/STACK.md +120 -0
- package/mindsystem/templates/research-project/SUMMARY.md +170 -0
- package/mindsystem/templates/research-subagent-prompt.md +92 -0
- package/mindsystem/templates/research.md +529 -0
- package/mindsystem/templates/roadmap.md +214 -0
- package/mindsystem/templates/state.md +224 -0
- package/mindsystem/templates/summary.md +269 -0
- package/mindsystem/templates/user-setup.md +323 -0
- package/mindsystem/templates/verification-report.md +322 -0
- package/mindsystem/workflows/complete-milestone.md +759 -0
- package/mindsystem/workflows/create-milestone.md +203 -0
- package/mindsystem/workflows/debug.md +14 -0
- package/mindsystem/workflows/define-requirements.md +330 -0
- package/mindsystem/workflows/diagnose-issues.md +241 -0
- package/mindsystem/workflows/discovery-phase.md +293 -0
- package/mindsystem/workflows/discuss-milestone.md +310 -0
- package/mindsystem/workflows/discuss-phase.md +237 -0
- package/mindsystem/workflows/do-work.md +359 -0
- package/mindsystem/workflows/execute-phase.md +644 -0
- package/mindsystem/workflows/execute-plan.md +1828 -0
- package/mindsystem/workflows/generate-mocks.md +187 -0
- package/mindsystem/workflows/list-phase-assumptions.md +178 -0
- package/mindsystem/workflows/map-codebase.md +289 -0
- package/mindsystem/workflows/plan-phase.md +876 -0
- package/mindsystem/workflows/research-phase.md +17 -0
- package/mindsystem/workflows/research-project.md +23 -0
- package/mindsystem/workflows/resume-project.md +311 -0
- package/mindsystem/workflows/transition.md +564 -0
- package/mindsystem/workflows/verify-phase.md +629 -0
- package/mindsystem/workflows/verify-work.md +823 -0
- package/package.json +32 -0
- package/scripts/generate-phase-patch.sh +169 -0
- package/scripts/ms-lookup/README.md +112 -0
- package/scripts/ms-lookup/ms_lookup/__init__.py +3 -0
- package/scripts/ms-lookup/ms_lookup/__main__.py +6 -0
- package/scripts/ms-lookup/ms_lookup/backends/__init__.py +6 -0
- package/scripts/ms-lookup/ms_lookup/backends/context7.py +219 -0
- package/scripts/ms-lookup/ms_lookup/backends/perplexity.py +145 -0
- package/scripts/ms-lookup/ms_lookup/cache.py +48 -0
- package/scripts/ms-lookup/ms_lookup/cli.py +219 -0
- package/scripts/ms-lookup/ms_lookup/config.py +23 -0
- package/scripts/ms-lookup/ms_lookup/errors.py +24 -0
- package/scripts/ms-lookup/ms_lookup/output.py +49 -0
- package/scripts/ms-lookup/ms_lookup/tokens.py +56 -0
- package/scripts/ms-lookup/pyproject.toml +17 -0
- package/scripts/ms-lookup/uv.lock +207 -0
- package/scripts/ms-lookup-wrapper.sh +21 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# Research Pitfalls Reference
|
|
2
|
+
|
|
3
|
+
## DEPRECATED
|
|
4
|
+
|
|
5
|
+
**This reference has been consolidated into the ms-researcher agent.**
|
|
6
|
+
|
|
7
|
+
The verification protocols and pitfall patterns now live in:
|
|
8
|
+
- `agents/ms-researcher.md` (section: `<verification_protocol>`)
|
|
9
|
+
|
|
10
|
+
The content below is preserved for reference but is no longer the primary source.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
*Deprecated: 2026-01-15*
|
|
15
|
+
*Replaced by: agents/ms-researcher.md*
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
<research_pitfalls>
|
|
20
|
+
|
|
21
|
+
<purpose>
|
|
22
|
+
This document catalogs research mistakes discovered in production use, providing specific patterns to avoid and verification strategies to prevent recurrence.
|
|
23
|
+
</purpose>
|
|
24
|
+
|
|
25
|
+
<known_pitfalls>
|
|
26
|
+
|
|
27
|
+
<pitfall_config_scope>
|
|
28
|
+
**What**: Assuming global configuration means no project-scoping exists
|
|
29
|
+
**Example**: Concluding "MCP servers are configured GLOBALLY only" while missing project-scoped `.mcp.json`
|
|
30
|
+
**Why it happens**: Not explicitly checking all known configuration patterns
|
|
31
|
+
**Prevention**:
|
|
32
|
+
```xml
|
|
33
|
+
<verification_checklist>
|
|
34
|
+
**CRITICAL**: Verify ALL configuration scopes:
|
|
35
|
+
- User/global scope - System-wide configuration
|
|
36
|
+
- Project scope - Project-level configuration files
|
|
37
|
+
- Local scope - Project-specific user overrides
|
|
38
|
+
- Workspace scope - IDE/tool workspace settings
|
|
39
|
+
- Environment scope - Environment variables
|
|
40
|
+
</verification_checklist>
|
|
41
|
+
```
|
|
42
|
+
</pitfall_config_scope>
|
|
43
|
+
|
|
44
|
+
<pitfall_search_vagueness>
|
|
45
|
+
**What**: Asking researchers to "search for documentation" without specifying where
|
|
46
|
+
**Example**: "Research MCP documentation" -> finds outdated community blog instead of official docs
|
|
47
|
+
**Why it happens**: Vague research instructions don't specify exact sources
|
|
48
|
+
**Prevention**:
|
|
49
|
+
```xml
|
|
50
|
+
<sources>
|
|
51
|
+
Official sources (use WebFetch):
|
|
52
|
+
- https://exact-url-to-official-docs
|
|
53
|
+
- https://exact-url-to-api-reference
|
|
54
|
+
|
|
55
|
+
Search queries (use WebSearch):
|
|
56
|
+
- "specific search query {current_year}"
|
|
57
|
+
- "another specific query {current_year}"
|
|
58
|
+
</sources>
|
|
59
|
+
```
|
|
60
|
+
</pitfall_search_vagueness>
|
|
61
|
+
|
|
62
|
+
<pitfall_deprecated_features>
|
|
63
|
+
**What**: Finding archived/old documentation and concluding feature doesn't exist
|
|
64
|
+
**Example**: Finding 2022 docs saying "feature not supported" when current version added it
|
|
65
|
+
**Why it happens**: Not checking multiple sources or recent updates
|
|
66
|
+
**Prevention**:
|
|
67
|
+
```xml
|
|
68
|
+
<verification_checklist>
|
|
69
|
+
- Check current official documentation
|
|
70
|
+
- Review changelog/release notes for recent updates
|
|
71
|
+
- Verify version numbers and publication dates
|
|
72
|
+
- Cross-reference multiple authoritative sources
|
|
73
|
+
</verification_checklist>
|
|
74
|
+
```
|
|
75
|
+
</pitfall_deprecated_features>
|
|
76
|
+
|
|
77
|
+
<pitfall_tool_variations>
|
|
78
|
+
**What**: Conflating capabilities across different tools/environments
|
|
79
|
+
**Example**: "Claude Desktop supports X" does not mean "Claude Code supports X"
|
|
80
|
+
**Why it happens**: Not explicitly checking each environment separately
|
|
81
|
+
**Prevention**:
|
|
82
|
+
```xml
|
|
83
|
+
<verification_checklist>
|
|
84
|
+
- Claude Desktop capabilities
|
|
85
|
+
- Claude Code capabilities
|
|
86
|
+
- VS Code extension capabilities
|
|
87
|
+
- API/SDK capabilities
|
|
88
|
+
Document which environment supports which features
|
|
89
|
+
</verification_checklist>
|
|
90
|
+
```
|
|
91
|
+
</pitfall_tool_variations>
|
|
92
|
+
|
|
93
|
+
<pitfall_negative_claims>
|
|
94
|
+
**What**: Making definitive "X is not possible" statements without official source verification
|
|
95
|
+
**Example**: "Folder-scoped MCP configuration is not supported" (missing `.mcp.json`)
|
|
96
|
+
**Why it happens**: Drawing conclusions from absence of evidence rather than evidence of absence
|
|
97
|
+
**Prevention**:
|
|
98
|
+
```xml
|
|
99
|
+
<critical_claims_audit>
|
|
100
|
+
For any "X is not possible" or "Y is the only way" statement:
|
|
101
|
+
- [ ] Is this verified by official documentation stating it explicitly?
|
|
102
|
+
- [ ] Have I checked for recent updates that might change this?
|
|
103
|
+
- [ ] Have I verified all possible approaches/mechanisms?
|
|
104
|
+
- [ ] Am I confusing "I didn't find it" with "it doesn't exist"?
|
|
105
|
+
</critical_claims_audit>
|
|
106
|
+
```
|
|
107
|
+
</pitfall_negative_claims>
|
|
108
|
+
|
|
109
|
+
<pitfall_missing_enumeration>
|
|
110
|
+
**What**: Investigating open-ended scope without enumerating known possibilities first
|
|
111
|
+
**Example**: "Research configuration options" instead of listing specific options to verify
|
|
112
|
+
**Why it happens**: Not creating explicit checklist of items to investigate
|
|
113
|
+
**Prevention**:
|
|
114
|
+
```xml
|
|
115
|
+
<verification_checklist>
|
|
116
|
+
Enumerate ALL known options FIRST:
|
|
117
|
+
- Option 1: [specific item]
|
|
118
|
+
- Option 2: [specific item]
|
|
119
|
+
- Option 3: [specific item]
|
|
120
|
+
- Check for additional unlisted options
|
|
121
|
+
|
|
122
|
+
For each option above, document:
|
|
123
|
+
- Existence (confirmed/not found/unclear)
|
|
124
|
+
- Official source URL
|
|
125
|
+
- Current status (active/deprecated/beta)
|
|
126
|
+
</verification_checklist>
|
|
127
|
+
```
|
|
128
|
+
</pitfall_missing_enumeration>
|
|
129
|
+
|
|
130
|
+
<pitfall_single_source>
|
|
131
|
+
**What**: Relying on a single source for critical claims
|
|
132
|
+
**Example**: Using only Stack Overflow answer from 2021 for current best practices
|
|
133
|
+
**Why it happens**: Not cross-referencing multiple authoritative sources
|
|
134
|
+
**Prevention**:
|
|
135
|
+
```xml
|
|
136
|
+
<source_verification>
|
|
137
|
+
For critical claims, require multiple sources:
|
|
138
|
+
- [ ] Official documentation (primary)
|
|
139
|
+
- [ ] Release notes/changelog (for currency)
|
|
140
|
+
- [ ] Additional authoritative source (for verification)
|
|
141
|
+
- [ ] Contradiction check (ensure sources agree)
|
|
142
|
+
</source_verification>
|
|
143
|
+
```
|
|
144
|
+
</pitfall_single_source>
|
|
145
|
+
|
|
146
|
+
<pitfall_assumed_completeness>
|
|
147
|
+
**What**: Assuming search results are complete and authoritative
|
|
148
|
+
**Example**: First Google result is outdated but assumed current
|
|
149
|
+
**Why it happens**: Not verifying publication dates and source authority
|
|
150
|
+
**Prevention**:
|
|
151
|
+
```xml
|
|
152
|
+
<source_verification>
|
|
153
|
+
For each source consulted:
|
|
154
|
+
- [ ] Publication/update date verified (prefer recent/current)
|
|
155
|
+
- [ ] Source authority confirmed (official docs, not blogs)
|
|
156
|
+
- [ ] Version relevance checked (matches current version)
|
|
157
|
+
- [ ] Multiple search queries tried (not just one)
|
|
158
|
+
</source_verification>
|
|
159
|
+
```
|
|
160
|
+
</pitfall_assumed_completeness>
|
|
161
|
+
</known_pitfalls>
|
|
162
|
+
|
|
163
|
+
<red_flags>
|
|
164
|
+
|
|
165
|
+
<red_flag_zero_not_found>
|
|
166
|
+
**Warning**: Every investigation succeeds perfectly
|
|
167
|
+
**Problem**: Real research encounters dead ends, ambiguity, and unknowns
|
|
168
|
+
**Action**: Expect honest reporting of limitations, contradictions, and gaps
|
|
169
|
+
</red_flag_zero_not_found>
|
|
170
|
+
|
|
171
|
+
<red_flag_no_confidence>
|
|
172
|
+
**Warning**: All findings presented as equally certain
|
|
173
|
+
**Problem**: Can't distinguish verified facts from educated guesses
|
|
174
|
+
**Action**: Require confidence levels (High/Medium/Low) for key findings
|
|
175
|
+
</red_flag_no_confidence>
|
|
176
|
+
|
|
177
|
+
<red_flag_missing_urls>
|
|
178
|
+
**Warning**: "According to documentation..." without specific URL
|
|
179
|
+
**Problem**: Can't verify claims or check for updates
|
|
180
|
+
**Action**: Require actual URLs for all official documentation claims
|
|
181
|
+
</red_flag_missing_urls>
|
|
182
|
+
|
|
183
|
+
<red_flag_no_evidence>
|
|
184
|
+
**Warning**: "X cannot do Y" or "Z is the only way" without citation
|
|
185
|
+
**Problem**: Strong claims require strong evidence
|
|
186
|
+
**Action**: Flag for verification against official sources
|
|
187
|
+
</red_flag_no_evidence>
|
|
188
|
+
|
|
189
|
+
<red_flag_incomplete_enum>
|
|
190
|
+
**Warning**: Verification checklist lists 4 items, output covers 2
|
|
191
|
+
**Problem**: Systematic gaps in coverage
|
|
192
|
+
**Action**: Ensure all enumerated items addressed or marked "not found"
|
|
193
|
+
</red_flag_incomplete_enum>
|
|
194
|
+
</red_flags>
|
|
195
|
+
|
|
196
|
+
<continuous_improvement>
|
|
197
|
+
|
|
198
|
+
When research gaps occur:
|
|
199
|
+
|
|
200
|
+
1. **Document the gap**
|
|
201
|
+
- What was missed or incorrect?
|
|
202
|
+
- What was the actual correct information?
|
|
203
|
+
- What was the impact?
|
|
204
|
+
|
|
205
|
+
2. **Root cause analysis**
|
|
206
|
+
- Why wasn't it caught?
|
|
207
|
+
- Which verification step would have prevented it?
|
|
208
|
+
- What pattern does this reveal?
|
|
209
|
+
|
|
210
|
+
3. **Update this document**
|
|
211
|
+
- Add new pitfall entry
|
|
212
|
+
- Update relevant checklists
|
|
213
|
+
- Share lesson learned
|
|
214
|
+
</continuous_improvement>
|
|
215
|
+
|
|
216
|
+
<quick_reference>
|
|
217
|
+
|
|
218
|
+
Before submitting research, verify:
|
|
219
|
+
|
|
220
|
+
- [ ] All enumerated items investigated (not just some)
|
|
221
|
+
- [ ] Negative claims verified with official docs
|
|
222
|
+
- [ ] Multiple sources cross-referenced for critical claims
|
|
223
|
+
- [ ] URLs provided for all official documentation
|
|
224
|
+
- [ ] Publication dates checked (prefer recent/current)
|
|
225
|
+
- [ ] Tool/environment-specific variations documented
|
|
226
|
+
- [ ] Confidence levels assigned honestly
|
|
227
|
+
- [ ] Assumptions distinguished from verified facts
|
|
228
|
+
- [ ] "What might I have missed?" review completed
|
|
229
|
+
|
|
230
|
+
**Living Document**: Update after each significant research gap
|
|
231
|
+
**Lessons From**: MCP configuration research gap (missed `.mcp.json`)
|
|
232
|
+
</quick_reference>
|
|
233
|
+
</research_pitfalls>
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
<scope_estimation>
|
|
2
|
+
Plans must maintain consistent quality from first task to last. This requires understanding quality degradation and splitting aggressively.
|
|
3
|
+
|
|
4
|
+
<quality_insight>
|
|
5
|
+
Claude degrades when it *perceives* context pressure and enters "completion mode."
|
|
6
|
+
|
|
7
|
+
| Context Usage | Quality | Claude's State |
|
|
8
|
+
|---------------|---------|----------------|
|
|
9
|
+
| 0-30% | PEAK | Thorough, comprehensive |
|
|
10
|
+
| 30-50% | GOOD | Confident, solid work |
|
|
11
|
+
| 50-70% | DEGRADING | Efficiency mode begins |
|
|
12
|
+
| 70%+ | POOR | Rushed, minimal |
|
|
13
|
+
|
|
14
|
+
**The 40-50% inflection point:** Claude sees context mounting and thinks "I'd better conserve now." Result: "I'll complete the remaining tasks more concisely" = quality crash.
|
|
15
|
+
|
|
16
|
+
**The rule:** Stop BEFORE quality degrades, not at context limit.
|
|
17
|
+
</quality_insight>
|
|
18
|
+
|
|
19
|
+
<context_target>
|
|
20
|
+
**Plans should complete within ~50% of context usage.**
|
|
21
|
+
|
|
22
|
+
Why 50% not 80%?
|
|
23
|
+
- No context anxiety possible
|
|
24
|
+
- Quality maintained start to finish
|
|
25
|
+
- Room for unexpected complexity
|
|
26
|
+
- If you target 80%, you've already spent 40% in degradation mode
|
|
27
|
+
</context_target>
|
|
28
|
+
|
|
29
|
+
<task_rule>
|
|
30
|
+
**Each plan: 2-3 tasks maximum. Stay under 50% context.**
|
|
31
|
+
|
|
32
|
+
| Task Complexity | Tasks/Plan | Context/Task | Total |
|
|
33
|
+
|-----------------|------------|--------------|-------|
|
|
34
|
+
| Simple (CRUD, config) | 3 | ~10-15% | ~30-45% |
|
|
35
|
+
| Complex (auth, payments) | 2 | ~20-30% | ~40-50% |
|
|
36
|
+
| Very complex (migrations, refactors) | 1-2 | ~30-40% | ~30-50% |
|
|
37
|
+
|
|
38
|
+
**When in doubt: Default to 2 tasks.** Better to have an extra plan than degraded quality.
|
|
39
|
+
</task_rule>
|
|
40
|
+
|
|
41
|
+
<tdd_plans>
|
|
42
|
+
**TDD features get their own plans. Target ~40% context.**
|
|
43
|
+
|
|
44
|
+
TDD requires 2-3 execution cycles (RED → GREEN → REFACTOR), each with file reads, test runs, and potential debugging. This is fundamentally heavier than linear task execution.
|
|
45
|
+
|
|
46
|
+
| TDD Feature Complexity | Context Usage |
|
|
47
|
+
|------------------------|---------------|
|
|
48
|
+
| Simple utility function | ~25-30% |
|
|
49
|
+
| Business logic with edge cases | ~35-40% |
|
|
50
|
+
| Complex algorithm | ~40-50% |
|
|
51
|
+
|
|
52
|
+
**One feature per TDD plan.** If features are trivial enough to batch, they're trivial enough to skip TDD.
|
|
53
|
+
|
|
54
|
+
**Why TDD plans are separate:**
|
|
55
|
+
- TDD consumes 40-50% context for a single feature
|
|
56
|
+
- Dedicated plans ensure full quality throughout RED-GREEN-REFACTOR
|
|
57
|
+
- Each TDD feature gets fresh context, peak quality
|
|
58
|
+
|
|
59
|
+
See `~/.claude/mindsystem/references/tdd.md` for TDD plan structure.
|
|
60
|
+
</tdd_plans>
|
|
61
|
+
|
|
62
|
+
<split_signals>
|
|
63
|
+
|
|
64
|
+
<always_split>
|
|
65
|
+
- **More than 3 tasks** - Even if tasks seem small
|
|
66
|
+
- **Multiple subsystems** - DB + API + UI = separate plans
|
|
67
|
+
- **Any task with >5 file modifications** - Split by file groups
|
|
68
|
+
- **Checkpoint + implementation work** - Checkpoints in one plan, implementation after in separate plan
|
|
69
|
+
- **Discovery + implementation** - DISCOVERY.md in one plan, implementation in another
|
|
70
|
+
</always_split>
|
|
71
|
+
|
|
72
|
+
<consider_splitting>
|
|
73
|
+
- Estimated >5 files modified total
|
|
74
|
+
- Complex domains (auth, payments, data modeling)
|
|
75
|
+
- Any uncertainty about approach
|
|
76
|
+
- Natural semantic boundaries (Setup -> Core -> Features)
|
|
77
|
+
</consider_splitting>
|
|
78
|
+
</split_signals>
|
|
79
|
+
|
|
80
|
+
<splitting_strategies>
|
|
81
|
+
**Vertical slices (default):** Group by feature, not by layer.
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
PREFER: Plan 01 = User (model + API + UI)
|
|
85
|
+
Plan 02 = Product (model + API + UI)
|
|
86
|
+
Plan 03 = Order (model + API + UI)
|
|
87
|
+
|
|
88
|
+
AVOID: Plan 01 = All models
|
|
89
|
+
Plan 02 = All APIs (depends on 01)
|
|
90
|
+
Plan 03 = All UIs (depends on 02)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Vertical slices maximize parallelism: [01, 02, 03] run simultaneously.
|
|
94
|
+
Horizontal layers force sequential execution: 01 → 02 → 03.
|
|
95
|
+
|
|
96
|
+
**By dependency:** Only when genuine dependencies exist.
|
|
97
|
+
```
|
|
98
|
+
Plan 01: Auth foundation (middleware, JWT utils)
|
|
99
|
+
Plan 02: Protected features (uses auth from 01)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**By complexity:** When one slice is much heavier.
|
|
103
|
+
```
|
|
104
|
+
Plan 01: Dashboard layout shell
|
|
105
|
+
Plan 02: Data fetching and state
|
|
106
|
+
Plan 03: Visualization components
|
|
107
|
+
```
|
|
108
|
+
</splitting_strategies>
|
|
109
|
+
|
|
110
|
+
<dependency_awareness>
|
|
111
|
+
**Plans declare dependencies explicitly via frontmatter.**
|
|
112
|
+
|
|
113
|
+
```yaml
|
|
114
|
+
# Independent plan (Wave 1 candidate)
|
|
115
|
+
depends_on: []
|
|
116
|
+
files_modified: [src/features/user/model.ts, src/features/user/api.ts]
|
|
117
|
+
autonomous: true
|
|
118
|
+
|
|
119
|
+
# Dependent plan (later wave)
|
|
120
|
+
depends_on: ["03-01"]
|
|
121
|
+
files_modified: [src/integration/stripe.ts]
|
|
122
|
+
autonomous: true
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Wave assignment rules:**
|
|
126
|
+
- `depends_on: []` + no file conflicts → Wave 1 (parallel)
|
|
127
|
+
- `depends_on: ["XX"]` → runs after plan XX completes
|
|
128
|
+
- Shared `files_modified` with sibling → sequential (by plan number)
|
|
129
|
+
|
|
130
|
+
**SUMMARY references:**
|
|
131
|
+
- Only reference prior SUMMARY if genuinely needed (imported types, decisions affecting this plan)
|
|
132
|
+
- Independent plans need NO prior SUMMARY references
|
|
133
|
+
- Reflexive chaining (02 refs 01, 03 refs 02) is an anti-pattern
|
|
134
|
+
</dependency_awareness>
|
|
135
|
+
|
|
136
|
+
<file_ownership>
|
|
137
|
+
**Exclusive file ownership prevents conflicts:**
|
|
138
|
+
|
|
139
|
+
```yaml
|
|
140
|
+
# Plan 01 frontmatter
|
|
141
|
+
files_modified: [src/models/user.ts, src/api/users.ts, src/components/UserList.tsx]
|
|
142
|
+
|
|
143
|
+
# Plan 02 frontmatter
|
|
144
|
+
files_modified: [src/models/product.ts, src/api/products.ts, src/components/ProductList.tsx]
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
No overlap → can run parallel.
|
|
148
|
+
|
|
149
|
+
**If file appears in multiple plans:** Later plan depends on earlier (by plan number).
|
|
150
|
+
**If file cannot be split:** Plans must be sequential for that file.
|
|
151
|
+
</file_ownership>
|
|
152
|
+
|
|
153
|
+
<anti_patterns>
|
|
154
|
+
**Bad - Comprehensive plan:**
|
|
155
|
+
```
|
|
156
|
+
Plan: "Complete Authentication System"
|
|
157
|
+
Tasks: 8 (models, migrations, API, JWT, middleware, hashing, login form, register form)
|
|
158
|
+
Result: Task 1-3 good, Task 4-5 degrading, Task 6-8 rushed
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**Good - Atomic plans:**
|
|
162
|
+
```
|
|
163
|
+
Plan 1: "Auth Database Models" (2 tasks)
|
|
164
|
+
Plan 2: "Auth API Core" (3 tasks)
|
|
165
|
+
Plan 3: "Auth API Protection" (2 tasks)
|
|
166
|
+
Plan 4: "Auth UI Components" (2 tasks)
|
|
167
|
+
Each: 30-40% context, peak quality, atomic commits
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Bad - Horizontal layers (sequential):**
|
|
171
|
+
```
|
|
172
|
+
Plan 01: Create User model, Product model, Order model
|
|
173
|
+
Plan 02: Create /api/users, /api/products, /api/orders
|
|
174
|
+
Plan 03: Create UserList UI, ProductList UI, OrderList UI
|
|
175
|
+
```
|
|
176
|
+
Result: 02 depends on 01, 03 depends on 02
|
|
177
|
+
Waves: [01] → [02] → [03] (fully sequential)
|
|
178
|
+
|
|
179
|
+
**Good - Vertical slices (parallel):**
|
|
180
|
+
```
|
|
181
|
+
Plan 01: User feature (model + API + UI)
|
|
182
|
+
Plan 02: Product feature (model + API + UI)
|
|
183
|
+
Plan 03: Order feature (model + API + UI)
|
|
184
|
+
```
|
|
185
|
+
Result: Each plan self-contained, no file overlap
|
|
186
|
+
Waves: [01, 02, 03] (all parallel)
|
|
187
|
+
</anti_patterns>
|
|
188
|
+
|
|
189
|
+
<estimating_context>
|
|
190
|
+
| Files Modified | Context Impact |
|
|
191
|
+
|----------------|----------------|
|
|
192
|
+
| 0-3 files | ~10-15% (small) |
|
|
193
|
+
| 4-6 files | ~20-30% (medium) |
|
|
194
|
+
| 7+ files | ~40%+ (large - split) |
|
|
195
|
+
|
|
196
|
+
| Complexity | Context/Task |
|
|
197
|
+
|------------|--------------|
|
|
198
|
+
| Simple CRUD | ~15% |
|
|
199
|
+
| Business logic | ~25% |
|
|
200
|
+
| Complex algorithms | ~40% |
|
|
201
|
+
| Domain modeling | ~35% |
|
|
202
|
+
|
|
203
|
+
**2 tasks:** Simple ~30%, Medium ~50%, Complex ~80% (split)
|
|
204
|
+
**3 tasks:** Simple ~45%, Medium ~75% (risky), Complex 120% (impossible)
|
|
205
|
+
</estimating_context>
|
|
206
|
+
|
|
207
|
+
<depth_calibration>
|
|
208
|
+
**Depth controls compression tolerance, not artificial inflation.**
|
|
209
|
+
|
|
210
|
+
| Depth | Typical Phases | Typical Plans/Phase | Tasks/Plan |
|
|
211
|
+
|-------|----------------|---------------------|------------|
|
|
212
|
+
| Quick | 3-5 | 1-3 | 2-3 |
|
|
213
|
+
| Standard | 5-8 | 3-5 | 2-3 |
|
|
214
|
+
| Comprehensive | 8-12 | 5-10 | 2-3 |
|
|
215
|
+
|
|
216
|
+
Tasks/plan is CONSTANT at 2-3. The 50% context rule applies universally.
|
|
217
|
+
|
|
218
|
+
**Key principle:** Derive from actual work. Depth determines how aggressively you combine things, not a target to hit.
|
|
219
|
+
|
|
220
|
+
- Comprehensive auth = 8 plans (because auth genuinely has 8 concerns)
|
|
221
|
+
- Comprehensive "add favicon" = 1 plan (because that's all it is)
|
|
222
|
+
|
|
223
|
+
Don't pad small work to hit a number. Don't compress complex work to look efficient.
|
|
224
|
+
|
|
225
|
+
**Comprehensive depth example:**
|
|
226
|
+
Auth system at comprehensive depth = 8 plans (not 3 big ones):
|
|
227
|
+
- 01: DB models (2 tasks)
|
|
228
|
+
- 02: Password hashing (2 tasks)
|
|
229
|
+
- 03: JWT generation (2 tasks)
|
|
230
|
+
- 04: JWT validation middleware (2 tasks)
|
|
231
|
+
- 05: Login endpoint (2 tasks)
|
|
232
|
+
- 06: Register endpoint (2 tasks)
|
|
233
|
+
- 07: Protected route patterns (2 tasks)
|
|
234
|
+
- 08: Auth UI components (3 tasks)
|
|
235
|
+
|
|
236
|
+
Each plan: fresh context, peak quality. More plans = more thoroughness, same quality per plan.
|
|
237
|
+
</depth_calibration>
|
|
238
|
+
|
|
239
|
+
<summary>
|
|
240
|
+
**2-3 tasks, 50% context target:**
|
|
241
|
+
- All tasks: Peak quality
|
|
242
|
+
- Git: Atomic per-task commits
|
|
243
|
+
- Parallel by default: Fresh context per subagent
|
|
244
|
+
|
|
245
|
+
**The principle:** Aggressive atomicity. More plans, smaller scope, consistent quality.
|
|
246
|
+
|
|
247
|
+
**The rules:**
|
|
248
|
+
- If in doubt, split. Quality over consolidation.
|
|
249
|
+
- Depth increases plan COUNT, never plan SIZE.
|
|
250
|
+
- Vertical slices over horizontal layers.
|
|
251
|
+
- Explicit dependencies via `depends_on` frontmatter.
|
|
252
|
+
- Autonomous plans get parallel execution.
|
|
253
|
+
|
|
254
|
+
**Commit rule:** Each plan produces 3-4 commits total (2-3 task commits + 1 docs commit).
|
|
255
|
+
</summary>
|
|
256
|
+
</scope_estimation>
|