mindsystem-cc 3.17.1 → 3.18.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/agents/ms-debugger.md +3 -3
- package/agents/ms-researcher.md +13 -13
- package/commands/ms/complete-milestone.md +47 -54
- package/mindsystem/references/routing/next-phase-routing.md +1 -1
- package/mindsystem/templates/milestone-archive.md +3 -3
- package/mindsystem/templates/research-subagent-prompt.md +2 -2
- package/mindsystem/templates/research.md +7 -7
- package/mindsystem/workflows/complete-milestone.md +52 -227
- package/package.json +1 -1
- package/scripts/archive-milestone-files.sh +68 -0
- package/scripts/archive-milestone-phases.sh +138 -0
- package/scripts/gather-milestone-stats.sh +179 -0
- package/scripts/ms-lookup/ms_lookup/backends/context7.py +17 -5
- package/scripts/ms-lookup/ms_lookup/backends/perplexity.py +17 -3
- package/scripts/ms-lookup-wrapper.sh +1 -1
- package/scripts/validate-execution-order.sh +4 -5
- package/scripts/cleanup-phase-artifacts.sh +0 -68
package/agents/ms-debugger.md
CHANGED
|
@@ -615,7 +615,7 @@ The cost of insufficient verification: bug returns, user frustration, emergency
|
|
|
615
615
|
**2. Library/framework behavior doesn't match expectations**
|
|
616
616
|
- Using library correctly but it's not working
|
|
617
617
|
- Documentation contradicts behavior
|
|
618
|
-
- **Action:** Check official docs (
|
|
618
|
+
- **Action:** Check official docs (`ms-lookup docs`), GitHub issues
|
|
619
619
|
|
|
620
620
|
**3. Domain knowledge gaps**
|
|
621
621
|
- Debugging auth: need to understand OAuth flow
|
|
@@ -657,7 +657,7 @@ The cost of insufficient verification: bug returns, user frustration, emergency
|
|
|
657
657
|
- Include version: `"react 18 useEffect behavior"`
|
|
658
658
|
- Add "github issue" for known bugs
|
|
659
659
|
|
|
660
|
-
|
|
660
|
+
**`ms-lookup docs`:**
|
|
661
661
|
- For API reference, library concepts, function signatures
|
|
662
662
|
|
|
663
663
|
**GitHub Issues:**
|
|
@@ -687,7 +687,7 @@ Is this an error message I don't recognize?
|
|
|
687
687
|
└─ NO ↓
|
|
688
688
|
|
|
689
689
|
Is this library/framework behavior I don't understand?
|
|
690
|
-
├─ YES → Check docs (
|
|
690
|
+
├─ YES → Check docs (`ms-lookup docs` or official docs)
|
|
691
691
|
└─ NO ↓
|
|
692
692
|
|
|
693
693
|
Is this code I/my team wrote?
|
package/agents/ms-researcher.md
CHANGED
|
@@ -59,9 +59,9 @@ Claude's training data is 6-18 months stale. Treat pre-existing knowledge as hyp
|
|
|
59
59
|
- Wrong (Claude misremembered or hallucinated)
|
|
60
60
|
|
|
61
61
|
**The discipline:**
|
|
62
|
-
1. **Verify before asserting** - Don't state library capabilities without checking
|
|
62
|
+
1. **Verify before asserting** - Don't state library capabilities without checking `ms-lookup docs` or official docs
|
|
63
63
|
2. **Date your knowledge** - "As of my training" is a warning flag, not a confidence marker
|
|
64
|
-
3. **Prefer current sources** -
|
|
64
|
+
3. **Prefer current sources** - `ms-lookup docs` and official docs trump training data
|
|
65
65
|
4. **Flag uncertainty** - LOW confidence when only training data supports a claim
|
|
66
66
|
|
|
67
67
|
## Honest Reporting
|
|
@@ -197,7 +197,7 @@ When researching "best library for X":
|
|
|
197
197
|
|
|
198
198
|
The CLI is at `~/.claude/mindsystem/scripts/ms-lookup-wrapper.sh`.
|
|
199
199
|
|
|
200
|
-
### Library Documentation
|
|
200
|
+
### Library Documentation
|
|
201
201
|
|
|
202
202
|
```bash
|
|
203
203
|
~/.claude/mindsystem/scripts/ms-lookup-wrapper.sh docs <library> "<query>"
|
|
@@ -213,7 +213,7 @@ Example:
|
|
|
213
213
|
|
|
214
214
|
**Response format:** JSON with results array containing title, content, source_url, tokens.
|
|
215
215
|
|
|
216
|
-
### Deep Research
|
|
216
|
+
### Deep Research
|
|
217
217
|
|
|
218
218
|
```bash
|
|
219
219
|
~/.claude/mindsystem/scripts/ms-lookup-wrapper.sh deep "<query>"
|
|
@@ -255,7 +255,7 @@ WebSearch("[technology] vs [alternative] {current_year}")
|
|
|
255
255
|
|
|
256
256
|
**Always include current year** in queries for freshness.
|
|
257
257
|
|
|
258
|
-
**Why WebSearch over
|
|
258
|
+
**Why WebSearch over `ms-lookup deep`:** WebSearch is free. `ms-lookup deep` costs money per query — reserve it for high-value questions, not discovery.
|
|
259
259
|
|
|
260
260
|
## Token Limit Strategy (for ms-lookup)
|
|
261
261
|
|
|
@@ -264,7 +264,7 @@ WebSearch("[technology] vs [alternative] {current_year}")
|
|
|
264
264
|
**Rationale:**
|
|
265
265
|
- The 50% rule: Research must complete before hitting 100k tokens
|
|
266
266
|
- At 2000 tokens/query, you can make ~50 queries
|
|
267
|
-
-
|
|
267
|
+
- `ms-lookup docs` returns results ranked by relevance — first 3-4 snippets are most important
|
|
268
268
|
- Query flexibility > per-query comprehensiveness
|
|
269
269
|
|
|
270
270
|
**When to increase (`--max-tokens 4000-6000`):**
|
|
@@ -296,15 +296,15 @@ WebSearch("[technology] vs [alternative] {current_year}")
|
|
|
296
296
|
|
|
297
297
|
| Level | Sources | Use |
|
|
298
298
|
|-------|---------|-----|
|
|
299
|
-
| HIGH |
|
|
299
|
+
| HIGH | `ms-lookup docs`, official documentation, official releases | State as fact |
|
|
300
300
|
| MEDIUM | WebSearch verified with official source, multiple credible sources agree | State with attribution |
|
|
301
301
|
| LOW | WebSearch only, single source, unverified | Flag as needing validation |
|
|
302
302
|
|
|
303
303
|
## Source Prioritization
|
|
304
304
|
|
|
305
|
-
**1.
|
|
306
|
-
- Current, authoritative documentation
|
|
307
|
-
-
|
|
305
|
+
**1. `ms-lookup docs` (highest priority)**
|
|
306
|
+
- Current, authoritative library documentation
|
|
307
|
+
- Version-aware, sourced from official docs
|
|
308
308
|
- Trust completely for API/feature questions
|
|
309
309
|
|
|
310
310
|
**2. Official Documentation**
|
|
@@ -526,7 +526,7 @@ Based on research question, identify what needs investigating:
|
|
|
526
526
|
|
|
527
527
|
For each domain, follow tool strategy in order:
|
|
528
528
|
|
|
529
|
-
1.
|
|
529
|
+
1. **`ms-lookup docs` First** - Query library documentation
|
|
530
530
|
2. **Official Docs** - WebFetch for gaps
|
|
531
531
|
3. **WebSearch** - Ecosystem discovery with year
|
|
532
532
|
4. **Verification** - Cross-reference all findings
|
|
@@ -626,7 +626,7 @@ When research cannot proceed:
|
|
|
626
626
|
Research is complete when:
|
|
627
627
|
|
|
628
628
|
- [ ] Research question answered with actionable findings
|
|
629
|
-
- [ ] Source hierarchy followed (
|
|
629
|
+
- [ ] Source hierarchy followed (`ms-lookup docs` → Official → WebSearch)
|
|
630
630
|
- [ ] All findings have confidence levels
|
|
631
631
|
- [ ] Verification protocol checklist passed
|
|
632
632
|
- [ ] Output file(s) created in correct format
|
|
@@ -636,7 +636,7 @@ Research is complete when:
|
|
|
636
636
|
Research quality indicators:
|
|
637
637
|
|
|
638
638
|
- **Specific, not vague:** "Three.js r160 with @react-three/fiber 8.15" not "use Three.js"
|
|
639
|
-
- **Verified, not assumed:** Findings cite
|
|
639
|
+
- **Verified, not assumed:** Findings cite `ms-lookup docs` or official docs
|
|
640
640
|
- **Honest about gaps:** LOW confidence items flagged, unknowns admitted
|
|
641
641
|
- **Actionable:** Developer could start work based on this research
|
|
642
642
|
- **Current:** Year included in searches, publication dates checked
|
|
@@ -62,96 +62,89 @@ Output: Milestone archived (roadmap + requirements), PROJECT.md evolved, git tag
|
|
|
62
62
|
✓ Milestone audit passed. Proceeding with completion.
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
1. **Verify readiness:**
|
|
66
|
-
|
|
67
|
-
- Check all phases in milestone have completed plans (SUMMARY.md exists)
|
|
68
|
-
- Present milestone scope and stats
|
|
69
|
-
- Wait for confirmation
|
|
70
|
-
|
|
71
|
-
1.5. **Clean up raw artifacts:**
|
|
72
|
-
|
|
73
|
-
Delete remaining raw artifacts from phase directories. Knowledge files are already current from phase-level consolidation in execute-phase.
|
|
65
|
+
1. **Verify readiness and gather stats:**
|
|
74
66
|
|
|
75
67
|
```bash
|
|
76
|
-
~/.claude/mindsystem/scripts/
|
|
68
|
+
~/.claude/mindsystem/scripts/gather-milestone-stats.sh $PHASE_START $PHASE_END
|
|
77
69
|
```
|
|
78
70
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
- Count phases, plans, tasks
|
|
82
|
-
- Calculate git range, file changes, LOC
|
|
83
|
-
- Extract timeline from git log
|
|
84
|
-
- Present summary, confirm
|
|
71
|
+
- If NOT READY: stop and report incomplete plans
|
|
72
|
+
- If READY: present readiness + stats summary, proceed
|
|
85
73
|
|
|
86
|
-
|
|
74
|
+
2. **Extract accomplishments:**
|
|
87
75
|
|
|
88
76
|
- Read all phase SUMMARY.md files in milestone range
|
|
89
77
|
- Extract 4-6 key accomplishments
|
|
90
|
-
- Present for approval
|
|
91
78
|
|
|
92
|
-
|
|
79
|
+
3. **Create MILESTONES.md entry:**
|
|
80
|
+
|
|
81
|
+
- Create or update `.planning/MILESTONES.md` using `templates/milestone.md`
|
|
82
|
+
- Prepend new entry (reverse chronological order)
|
|
83
|
+
|
|
84
|
+
4. **Update PROJECT.md:**
|
|
85
|
+
|
|
86
|
+
- Full evolution review (What This Is, Core Value, Requirements audit, Key Decisions, Context)
|
|
87
|
+
- Move all shipped requirements to Validated
|
|
88
|
+
- Update "Last updated" footer
|
|
89
|
+
|
|
90
|
+
5. **Archive milestone:**
|
|
93
91
|
|
|
94
92
|
- Create `.planning/milestones/v{{version}}/` directory
|
|
95
|
-
- Create `.planning/milestones/v{{version}}/ROADMAP.md`
|
|
96
|
-
-
|
|
97
|
-
- Fill milestone-archive.md template
|
|
98
|
-
- Update ROADMAP.md to one-line summary with link
|
|
93
|
+
- Create `.planning/milestones/v{{version}}/ROADMAP.md` from template
|
|
94
|
+
- Delete ROADMAP.md
|
|
99
95
|
|
|
100
|
-
|
|
96
|
+
6. **Archive requirements:**
|
|
101
97
|
|
|
102
98
|
- Create `.planning/milestones/v{{version}}/REQUIREMENTS.md`
|
|
103
|
-
- Mark all
|
|
104
|
-
-
|
|
105
|
-
|
|
99
|
+
- Mark all requirements as complete with outcomes
|
|
100
|
+
- Delete `.planning/REQUIREMENTS.md`
|
|
101
|
+
|
|
102
|
+
7. **Archive milestone files:**
|
|
106
103
|
|
|
107
|
-
|
|
104
|
+
```bash
|
|
105
|
+
~/.claude/mindsystem/scripts/archive-milestone-files.sh v{{version}}
|
|
106
|
+
```
|
|
108
107
|
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
8. **Archive and cleanup phases:**
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
~/.claude/mindsystem/scripts/archive-milestone-phases.sh $PHASE_START $PHASE_END v{{version}}
|
|
112
|
+
```
|
|
111
113
|
|
|
112
|
-
|
|
114
|
+
9. **Update STATE.md:**
|
|
113
115
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- Archive previous content in `<details>` (if v1.1+)
|
|
116
|
+
- Update project reference with current core value and next focus
|
|
117
|
+
- Reset current position for next milestone
|
|
117
118
|
|
|
118
|
-
|
|
119
|
+
10. **Commit and tag:**
|
|
119
120
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
- Stage: MILESTONES.md, PROJECT.md, STATE.md, archive files, deletions
|
|
122
|
+
- Commit: `chore: archive v{{version}} milestone`
|
|
123
|
+
- Tag: `git tag -a v{{version}} -m "[milestone summary]"`
|
|
124
|
+
- Ask about pushing tag
|
|
124
125
|
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
11. **Offer next steps:**
|
|
127
|
+
- `/ms:new-milestone` — discover goals and update PROJECT.md
|
|
127
128
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
- Format: `Last Command: ms:complete-milestone $ARGUMENTS | YYYY-MM-DD HH:MM`
|
|
129
|
+
12. **Update last command:**
|
|
130
|
+
- Format: `Last Command: ms:complete-milestone $ARGUMENTS | YYYY-MM-DD HH:MM`
|
|
131
131
|
|
|
132
132
|
</process>
|
|
133
133
|
|
|
134
134
|
<success_criteria>
|
|
135
135
|
|
|
136
|
-
-
|
|
136
|
+
- PROJECT.md full evolution review completed (What This Is, Core Value, Requirements, Key Decisions, Context)
|
|
137
|
+
- All shipped requirements moved to Validated in PROJECT.md
|
|
138
|
+
- Key Decisions updated with outcomes
|
|
137
139
|
- Milestone archived to `.planning/milestones/v{{version}}/ROADMAP.md`
|
|
138
140
|
- Requirements archived to `.planning/milestones/v{{version}}/REQUIREMENTS.md`
|
|
139
|
-
- Research archived to `.planning/milestones/v{{version}}/research/` (if existed)
|
|
140
141
|
- `.planning/REQUIREMENTS.md` deleted (fresh for next milestone)
|
|
141
|
-
- ROADMAP.md collapsed to one-line entry
|
|
142
|
-
- PROJECT.md updated with current state
|
|
143
142
|
- Git tag v{{version}} created
|
|
144
|
-
- Commit successful
|
|
145
|
-
- User knows next steps (/ms:new-milestone)
|
|
146
143
|
</success_criteria>
|
|
147
144
|
|
|
148
145
|
<critical_rules>
|
|
149
146
|
|
|
150
|
-
- **Load workflow first:** Read complete-milestone.md before executing
|
|
151
147
|
- **Verify completion:** All phases must have SUMMARY.md files
|
|
152
|
-
- **User confirmation:** Wait for approval at verification gates
|
|
153
148
|
- **Archive before deleting:** Always create archive files (ROADMAP, REQUIREMENTS) before updating/deleting originals
|
|
154
149
|
- **One-line summary:** Collapsed milestone in ROADMAP.md should be single line with link
|
|
155
|
-
- **Context efficiency:** Archive keeps ROADMAP.md and REQUIREMENTS.md constant size per milestone
|
|
156
|
-
- **Fresh requirements:** Next milestone starts with `/ms:create-roadmap`, not reusing old file
|
|
157
150
|
</critical_rules>
|
|
@@ -66,9 +66,9 @@ ELSE:
|
|
|
66
66
|
|
|
67
67
|
| Pre-work | Status | Topics/Focus |
|
|
68
68
|
|----------|--------|--------------|
|
|
69
|
-
| Research | Likely | {research topics} |
|
|
70
69
|
| Discuss | Likely | {discuss topics} |
|
|
71
70
|
| Design | Likely | {design focus} |
|
|
71
|
+
| Research | Likely | {research topics} |
|
|
72
72
|
|
|
73
73
|
{If all Unlikely: "No pre-work flagged — ready to plan directly."}
|
|
74
74
|
|
|
@@ -89,7 +89,7 @@ Plans:
|
|
|
89
89
|
|
|
90
90
|
---
|
|
91
91
|
|
|
92
|
-
_For current project status, see .planning/
|
|
92
|
+
_For current project status, see .planning/PROJECT.md_
|
|
93
93
|
|
|
94
94
|
---
|
|
95
95
|
|
|
@@ -117,7 +117,7 @@ _For current project status, see .planning/ROADMAP.md_
|
|
|
117
117
|
|
|
118
118
|
**After archiving:**
|
|
119
119
|
|
|
120
|
-
-
|
|
121
|
-
- Update PROJECT.md
|
|
120
|
+
- Delete ROADMAP.md (fresh one created for next milestone via `/ms:create-roadmap`)
|
|
121
|
+
- Update PROJECT.md with full evolution review
|
|
122
122
|
- Continue phase numbering in next milestone (never restart at 01)
|
|
123
123
|
</guidelines>
|
|
@@ -22,7 +22,7 @@ Templates for the 3 parallel agents spawned by `/ms:research-phase`. The orchest
|
|
|
22
22
|
## Template 1: External Docs (ms-researcher)
|
|
23
23
|
|
|
24
24
|
**Focus:** Library documentation, APIs, verified code examples
|
|
25
|
-
**Tools emphasized:** ms-lookup docs
|
|
25
|
+
**Tools emphasized:** ms-lookup docs, ms-lookup deep, WebSearch, WebFetch
|
|
26
26
|
**Returns:** Structured findings (not files)
|
|
27
27
|
|
|
28
28
|
```markdown
|
|
@@ -118,7 +118,7 @@ The agent's built-in `<what_to_scan>` section handles the systematic scan checkl
|
|
|
118
118
|
## Template 3: Best Practices (ms-researcher)
|
|
119
119
|
|
|
120
120
|
**Focus:** Community consensus, pitfalls, SOTA
|
|
121
|
-
**Tools emphasized:** ms-lookup deep
|
|
121
|
+
**Tools emphasized:** ms-lookup deep, WebSearch
|
|
122
122
|
**Returns:** Structured findings (not files)
|
|
123
123
|
|
|
124
124
|
```markdown
|
|
@@ -72,7 +72,7 @@ src/
|
|
|
72
72
|
**When to use:** [conditions]
|
|
73
73
|
**Example:**
|
|
74
74
|
```typescript
|
|
75
|
-
// [code example from
|
|
75
|
+
// [code example from official docs]
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
### Pattern 2: [Pattern Name]
|
|
@@ -131,19 +131,19 @@ Verified patterns from official sources:
|
|
|
131
131
|
|
|
132
132
|
### [Common Operation 1]
|
|
133
133
|
```typescript
|
|
134
|
-
// Source: [
|
|
134
|
+
// Source: [official docs URL]
|
|
135
135
|
[code]
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
### [Common Operation 2]
|
|
139
139
|
```typescript
|
|
140
|
-
// Source: [
|
|
140
|
+
// Source: [official docs URL]
|
|
141
141
|
[code]
|
|
142
142
|
```
|
|
143
143
|
|
|
144
144
|
### [Common Operation 3]
|
|
145
145
|
```typescript
|
|
146
|
-
// Source: [
|
|
146
|
+
// Source: [official docs URL]
|
|
147
147
|
[code]
|
|
148
148
|
```
|
|
149
149
|
</code_examples>
|
|
@@ -185,7 +185,7 @@ Things that couldn't be fully resolved:
|
|
|
185
185
|
## Sources
|
|
186
186
|
|
|
187
187
|
### Primary (HIGH confidence)
|
|
188
|
-
- [
|
|
188
|
+
- [ms-lookup docs library] - [topics fetched]
|
|
189
189
|
- [Official docs URL] - [what was checked]
|
|
190
190
|
|
|
191
191
|
### Secondary (MEDIUM confidence)
|
|
@@ -479,10 +479,10 @@ function useVehicleControls(rigidBodyRef) {
|
|
|
479
479
|
- Pitfalls: Performance, physics, feel
|
|
480
480
|
|
|
481
481
|
**Confidence breakdown:**
|
|
482
|
-
- Standard stack: HIGH - verified with
|
|
482
|
+
- Standard stack: HIGH - verified with ms-lookup docs, widely used
|
|
483
483
|
- Architecture: HIGH - from official examples
|
|
484
484
|
- Pitfalls: HIGH - documented in discourse, verified in docs
|
|
485
|
-
- Code examples: HIGH - from
|
|
485
|
+
- Code examples: HIGH - from ms-lookup docs/official sources
|
|
486
486
|
|
|
487
487
|
**Research date:** 2026-01-20
|
|
488
488
|
**Valid until:** 2026-02-20 (30 days - R3F ecosystem stable)
|