mindsystem-cc 3.19.0 → 3.21.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/README.md +5 -6
- package/agents/ms-designer.md +5 -2
- package/agents/ms-mockup-designer.md +1 -1
- package/agents/ms-plan-writer.md +8 -1
- package/agents/ms-product-researcher.md +69 -0
- package/agents/ms-research-synthesizer.md +1 -1
- package/agents/ms-researcher.md +8 -8
- package/agents/ms-roadmapper.md +9 -13
- package/bin/install.js +68 -5
- package/commands/ms/add-phase.md +30 -18
- package/commands/ms/adhoc.md +1 -1
- package/commands/ms/audit-milestone.md +12 -12
- package/commands/ms/complete-milestone.md +25 -22
- package/commands/ms/config.md +202 -0
- package/commands/ms/design-phase.md +34 -29
- package/commands/ms/discuss-phase.md +26 -22
- package/commands/ms/doctor.md +22 -202
- package/commands/ms/execute-phase.md +18 -7
- package/commands/ms/help.md +46 -39
- package/commands/ms/insert-phase.md +29 -17
- package/commands/ms/new-milestone.md +42 -19
- package/commands/ms/new-project.md +88 -103
- package/commands/ms/plan-milestone-gaps.md +4 -5
- package/commands/ms/plan-phase.md +5 -3
- package/commands/ms/progress.md +2 -4
- package/commands/ms/research-phase.md +7 -12
- package/commands/ms/research-project.md +12 -12
- package/mindsystem/references/continuation-format.md +3 -3
- package/mindsystem/references/plan-format.md +11 -1
- package/mindsystem/references/principles.md +1 -1
- package/mindsystem/references/questioning.md +50 -8
- package/mindsystem/references/routing/audit-result-routing.md +12 -11
- package/mindsystem/references/routing/between-milestones-routing.md +2 -2
- package/mindsystem/references/routing/milestone-complete-routing.md +1 -1
- package/mindsystem/references/routing/next-phase-routing.md +4 -2
- package/mindsystem/templates/context.md +7 -6
- package/mindsystem/templates/milestone-archive.md +5 -5
- package/mindsystem/templates/milestone-context.md +1 -1
- package/mindsystem/templates/milestone.md +9 -9
- package/mindsystem/templates/project.md +70 -64
- package/mindsystem/templates/research-subagent-prompt.md +3 -3
- package/mindsystem/templates/roadmap-milestone.md +14 -14
- package/mindsystem/templates/roadmap.md +9 -7
- package/mindsystem/workflows/adhoc.md +1 -1
- package/mindsystem/workflows/complete-milestone.md +66 -107
- package/mindsystem/workflows/discuss-phase.md +137 -65
- package/mindsystem/workflows/doctor-fixes.md +273 -0
- package/mindsystem/workflows/execute-phase.md +7 -3
- package/mindsystem/workflows/execute-plan.md +6 -5
- package/mindsystem/workflows/map-codebase.md +2 -2
- package/mindsystem/workflows/mockup-generation.md +1 -1
- package/mindsystem/workflows/plan-phase.md +28 -3
- package/mindsystem/workflows/transition.md +20 -25
- package/mindsystem/workflows/verify-work.md +1 -1
- package/package.json +1 -1
- package/scripts/__pycache__/ms-tools.cpython-314.pyc +0 -0
- package/scripts/__pycache__/test_ms_tools.cpython-314-pytest-9.0.2.pyc +0 -0
- package/scripts/fixtures/scan-context/.planning/ROADMAP.md +16 -0
- package/scripts/fixtures/scan-context/.planning/adhoc/20260220-fix-token-SUMMARY.md +12 -0
- package/scripts/fixtures/scan-context/.planning/config.json +3 -0
- package/scripts/fixtures/scan-context/.planning/debug/resolved/token-bug.md +11 -0
- package/scripts/fixtures/scan-context/.planning/knowledge/auth.md +11 -0
- package/scripts/fixtures/scan-context/.planning/phases/02-infra/02-1-SUMMARY.md +20 -0
- package/scripts/fixtures/scan-context/.planning/phases/04-setup/04-1-SUMMARY.md +21 -0
- package/scripts/fixtures/scan-context/.planning/phases/05-auth/05-1-SUMMARY.md +28 -0
- package/scripts/fixtures/scan-context/.planning/todos/done/setup-db.md +10 -0
- package/scripts/fixtures/scan-context/.planning/todos/pending/add-logout.md +10 -0
- package/scripts/fixtures/scan-context/expected-output.json +257 -0
- package/scripts/ms-tools.py +2139 -0
- package/scripts/test_ms_tools.py +836 -0
- package/commands/ms/list-phase-assumptions.md +0 -56
- package/mindsystem/workflows/list-phase-assumptions.md +0 -178
- package/scripts/__pycache__/compare_mockups.cpython-314.pyc +0 -0
- package/scripts/archive-milestone-files.sh +0 -68
- package/scripts/archive-milestone-phases.sh +0 -138
- package/scripts/doctor-scan.sh +0 -379
- package/scripts/gather-milestone-stats.sh +0 -179
- package/scripts/generate-adhoc-patch.sh +0 -79
- package/scripts/generate-phase-patch.sh +0 -169
- package/scripts/scan-artifact-subsystems.sh +0 -55
- package/scripts/scan-planning-context.py +0 -839
- package/scripts/update-state.sh +0 -59
- package/scripts/validate-execution-order.sh +0 -104
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ms:list-phase-assumptions
|
|
3
|
-
description: Surface Claude's assumptions about a phase approach before planning
|
|
4
|
-
argument-hint: "[phase]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Bash
|
|
8
|
-
- Grep
|
|
9
|
-
- Glob
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
<objective>
|
|
13
|
-
Analyze a phase and present Claude's assumptions about technical approach, implementation order, scope boundaries, risk areas, and dependencies.
|
|
14
|
-
|
|
15
|
-
Purpose: Help users see what Claude thinks BEFORE planning begins - enabling course correction early when assumptions are wrong.
|
|
16
|
-
Output: Conversational output only (no file creation) - ends with "What do you think?" prompt
|
|
17
|
-
</objective>
|
|
18
|
-
|
|
19
|
-
<execution_context>
|
|
20
|
-
@~/.claude/mindsystem/workflows/list-phase-assumptions.md
|
|
21
|
-
</execution_context>
|
|
22
|
-
|
|
23
|
-
<context>
|
|
24
|
-
Phase number: $ARGUMENTS (required)
|
|
25
|
-
|
|
26
|
-
**Normalize phase number:**
|
|
27
|
-
```bash
|
|
28
|
-
PHASE_ARG="$ARGUMENTS"
|
|
29
|
-
PHASE=$(printf "%02d" "$PHASE_ARG" 2>/dev/null || echo "$PHASE_ARG")
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
**Load project state first:**
|
|
33
|
-
@.planning/STATE.md
|
|
34
|
-
|
|
35
|
-
**Load roadmap:**
|
|
36
|
-
@.planning/ROADMAP.md
|
|
37
|
-
</context>
|
|
38
|
-
|
|
39
|
-
<process>
|
|
40
|
-
1. Validate phase number argument (error if missing or invalid)
|
|
41
|
-
2. Check if phase exists in roadmap
|
|
42
|
-
3. Follow list-phase-assumptions.md workflow:
|
|
43
|
-
- Analyze roadmap description
|
|
44
|
-
- Surface assumptions about: technical approach, implementation order, scope, risks, dependencies
|
|
45
|
-
- Present assumptions clearly
|
|
46
|
-
- Prompt "What do you think?"
|
|
47
|
-
4. Gather feedback and offer next steps
|
|
48
|
-
</process>
|
|
49
|
-
|
|
50
|
-
<success_criteria>
|
|
51
|
-
|
|
52
|
-
- Phase validated against roadmap
|
|
53
|
-
- Assumptions surfaced across five areas
|
|
54
|
-
- User prompted for feedback
|
|
55
|
-
- User knows next steps (discuss context, plan phase, or correct assumptions)
|
|
56
|
-
</success_criteria>
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
<purpose>
|
|
2
|
-
Surface Claude's assumptions about a phase before planning, enabling users to correct misconceptions early.
|
|
3
|
-
|
|
4
|
-
Key difference from discuss-phase: This is ANALYSIS of what Claude thinks, not INTAKE of what user knows. No file output - purely conversational to prompt discussion.
|
|
5
|
-
</purpose>
|
|
6
|
-
|
|
7
|
-
<process>
|
|
8
|
-
|
|
9
|
-
<step name="validate_phase" priority="first">
|
|
10
|
-
Phase number: $ARGUMENTS (required)
|
|
11
|
-
|
|
12
|
-
**If argument missing:**
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
Error: Phase number required.
|
|
16
|
-
|
|
17
|
-
Usage: /ms:list-phase-assumptions [phase-number]
|
|
18
|
-
Example: /ms:list-phase-assumptions 3
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Exit workflow.
|
|
22
|
-
|
|
23
|
-
**If argument provided:**
|
|
24
|
-
Validate phase exists in roadmap:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
cat .planning/ROADMAP.md | grep -i "Phase ${PHASE}"
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
**If phase not found:**
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
Error: Phase ${PHASE} not found in roadmap.
|
|
34
|
-
|
|
35
|
-
Available phases:
|
|
36
|
-
[list phases from roadmap]
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Exit workflow.
|
|
40
|
-
|
|
41
|
-
**If phase found:**
|
|
42
|
-
Parse phase details from roadmap:
|
|
43
|
-
|
|
44
|
-
- Phase number
|
|
45
|
-
- Phase name
|
|
46
|
-
- Phase description/goal
|
|
47
|
-
- Any scope details mentioned
|
|
48
|
-
|
|
49
|
-
Continue to analyze_phase.
|
|
50
|
-
</step>
|
|
51
|
-
|
|
52
|
-
<step name="analyze_phase">
|
|
53
|
-
Based on roadmap description and project context, identify assumptions across five areas:
|
|
54
|
-
|
|
55
|
-
**1. Technical Approach:**
|
|
56
|
-
What libraries, frameworks, patterns, or tools would Claude use?
|
|
57
|
-
- "I'd use X library because..."
|
|
58
|
-
- "I'd follow Y pattern because..."
|
|
59
|
-
- "I'd structure this as Z because..."
|
|
60
|
-
|
|
61
|
-
**2. Implementation Order:**
|
|
62
|
-
What would Claude build first, second, third?
|
|
63
|
-
- "I'd start with X because it's foundational"
|
|
64
|
-
- "Then Y because it depends on X"
|
|
65
|
-
- "Finally Z because..."
|
|
66
|
-
|
|
67
|
-
**3. Scope Boundaries:**
|
|
68
|
-
What's included vs excluded in Claude's interpretation?
|
|
69
|
-
- "This phase includes: A, B, C"
|
|
70
|
-
- "This phase does NOT include: D, E, F"
|
|
71
|
-
- "Boundary ambiguities: G could go either way"
|
|
72
|
-
|
|
73
|
-
**4. Risk Areas:**
|
|
74
|
-
Where does Claude expect complexity or challenges?
|
|
75
|
-
- "The tricky part is X because..."
|
|
76
|
-
- "Potential issues: Y, Z"
|
|
77
|
-
- "I'd watch out for..."
|
|
78
|
-
|
|
79
|
-
**5. Dependencies:**
|
|
80
|
-
What does Claude assume exists or needs to be in place?
|
|
81
|
-
- "This assumes X from previous phases"
|
|
82
|
-
- "External dependencies: Y, Z"
|
|
83
|
-
- "This will be consumed by..."
|
|
84
|
-
|
|
85
|
-
Be honest about uncertainty. Mark assumptions with confidence levels:
|
|
86
|
-
- "Fairly confident: ..." (clear from roadmap)
|
|
87
|
-
- "Assuming: ..." (reasonable inference)
|
|
88
|
-
- "Unclear: ..." (could go multiple ways)
|
|
89
|
-
</step>
|
|
90
|
-
|
|
91
|
-
<step name="present_assumptions">
|
|
92
|
-
Present assumptions in a clear, scannable format:
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
## My Assumptions for Phase ${PHASE}: ${PHASE_NAME}
|
|
96
|
-
|
|
97
|
-
### Technical Approach
|
|
98
|
-
[List assumptions about how to implement]
|
|
99
|
-
|
|
100
|
-
### Implementation Order
|
|
101
|
-
[List assumptions about sequencing]
|
|
102
|
-
|
|
103
|
-
### Scope Boundaries
|
|
104
|
-
**In scope:** [what's included]
|
|
105
|
-
**Out of scope:** [what's excluded]
|
|
106
|
-
**Ambiguous:** [what could go either way]
|
|
107
|
-
|
|
108
|
-
### Risk Areas
|
|
109
|
-
[List anticipated challenges]
|
|
110
|
-
|
|
111
|
-
### Dependencies
|
|
112
|
-
**From prior phases:** [what's needed]
|
|
113
|
-
**External:** [third-party needs]
|
|
114
|
-
**Feeds into:** [what future phases need from this]
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
**What do you think?**
|
|
119
|
-
|
|
120
|
-
Are these assumptions accurate? Let me know:
|
|
121
|
-
- What I got right
|
|
122
|
-
- What I got wrong
|
|
123
|
-
- What I'm missing
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Wait for user response.
|
|
127
|
-
</step>
|
|
128
|
-
|
|
129
|
-
<step name="gather_feedback">
|
|
130
|
-
**If user provides corrections:**
|
|
131
|
-
|
|
132
|
-
Acknowledge the corrections:
|
|
133
|
-
|
|
134
|
-
```
|
|
135
|
-
Got it. Key corrections:
|
|
136
|
-
- [correction 1]
|
|
137
|
-
- [correction 2]
|
|
138
|
-
|
|
139
|
-
This changes my understanding significantly. [Summarize new understanding]
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
**If user confirms assumptions:**
|
|
143
|
-
|
|
144
|
-
```
|
|
145
|
-
Great, assumptions validated.
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Continue to offer_next.
|
|
149
|
-
</step>
|
|
150
|
-
|
|
151
|
-
<step name="offer_next">
|
|
152
|
-
Present next steps:
|
|
153
|
-
|
|
154
|
-
```
|
|
155
|
-
What's next?
|
|
156
|
-
1. Discuss context (/ms:discuss-phase ${PHASE}) - Let me ask you questions to build comprehensive context
|
|
157
|
-
2. Plan this phase (/ms:plan-phase ${PHASE}) - Create detailed execution plans
|
|
158
|
-
3. Re-examine assumptions - I'll analyze again with your corrections
|
|
159
|
-
4. Done for now
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
Wait for user selection.
|
|
163
|
-
|
|
164
|
-
If "Discuss context": Note that CONTEXT.md will incorporate any corrections discussed here
|
|
165
|
-
If "Plan this phase": Proceed knowing assumptions are understood
|
|
166
|
-
If "Re-examine": Return to analyze_phase with updated understanding
|
|
167
|
-
</step>
|
|
168
|
-
|
|
169
|
-
</process>
|
|
170
|
-
|
|
171
|
-
<success_criteria>
|
|
172
|
-
- Phase number validated against roadmap
|
|
173
|
-
- Assumptions surfaced across five areas: technical approach, implementation order, scope, risks, dependencies
|
|
174
|
-
- Confidence levels marked where appropriate
|
|
175
|
-
- "What do you think?" prompt presented
|
|
176
|
-
- User feedback acknowledged
|
|
177
|
-
- Clear next steps offered
|
|
178
|
-
</success_criteria>
|
|
Binary file
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
#
|
|
3
|
-
# archive-milestone-files.sh
|
|
4
|
-
# Moves optional milestone files (audit, context, research) to the
|
|
5
|
-
# milestone archive directory. Skips silently if files don't exist.
|
|
6
|
-
#
|
|
7
|
-
# Usage: ./scripts/archive-milestone-files.sh <version>
|
|
8
|
-
# Example: ./scripts/archive-milestone-files.sh v1.0
|
|
9
|
-
|
|
10
|
-
set -e
|
|
11
|
-
|
|
12
|
-
# --- Validation ---
|
|
13
|
-
if [ -z "$1" ]; then
|
|
14
|
-
echo "Error: Version argument required"
|
|
15
|
-
echo "Usage: $0 <version>"
|
|
16
|
-
exit 1
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
VERSION="$1"
|
|
20
|
-
|
|
21
|
-
# --- Find .planning from git root ---
|
|
22
|
-
GIT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
|
|
23
|
-
if [ -z "$GIT_ROOT" ]; then
|
|
24
|
-
echo "Error: Not in a git repository"
|
|
25
|
-
exit 1
|
|
26
|
-
fi
|
|
27
|
-
|
|
28
|
-
PLANNING_DIR="$GIT_ROOT/.planning"
|
|
29
|
-
MILESTONE_DIR="$PLANNING_DIR/milestones/$VERSION"
|
|
30
|
-
|
|
31
|
-
if [ ! -d "$MILESTONE_DIR" ]; then
|
|
32
|
-
echo "Error: Milestone directory not found at $MILESTONE_DIR"
|
|
33
|
-
echo "Run archive_milestone step first to create it"
|
|
34
|
-
exit 1
|
|
35
|
-
fi
|
|
36
|
-
|
|
37
|
-
# --- Move files ---
|
|
38
|
-
ARCHIVED=0
|
|
39
|
-
|
|
40
|
-
# Milestone audit
|
|
41
|
-
if [ -f "$PLANNING_DIR/${VERSION}-MILESTONE-AUDIT.md" ]; then
|
|
42
|
-
mv "$PLANNING_DIR/${VERSION}-MILESTONE-AUDIT.md" "$MILESTONE_DIR/MILESTONE-AUDIT.md"
|
|
43
|
-
echo "Archived: ${VERSION}-MILESTONE-AUDIT.md → MILESTONE-AUDIT.md"
|
|
44
|
-
ARCHIVED=$((ARCHIVED + 1))
|
|
45
|
-
fi
|
|
46
|
-
|
|
47
|
-
# Milestone context
|
|
48
|
-
if [ -f "$PLANNING_DIR/MILESTONE-CONTEXT.md" ]; then
|
|
49
|
-
mv "$PLANNING_DIR/MILESTONE-CONTEXT.md" "$MILESTONE_DIR/CONTEXT.md"
|
|
50
|
-
echo "Archived: MILESTONE-CONTEXT.md → CONTEXT.md"
|
|
51
|
-
ARCHIVED=$((ARCHIVED + 1))
|
|
52
|
-
fi
|
|
53
|
-
|
|
54
|
-
# Research directory
|
|
55
|
-
if [ -d "$PLANNING_DIR/research" ]; then
|
|
56
|
-
mv "$PLANNING_DIR/research" "$MILESTONE_DIR/research"
|
|
57
|
-
echo "Archived: research/ → research/"
|
|
58
|
-
ARCHIVED=$((ARCHIVED + 1))
|
|
59
|
-
fi
|
|
60
|
-
|
|
61
|
-
if [ "$ARCHIVED" -eq 0 ]; then
|
|
62
|
-
echo "No optional files to archive (audit, context, research all absent)"
|
|
63
|
-
else
|
|
64
|
-
echo ""
|
|
65
|
-
echo "Archived $ARCHIVED item(s) to milestones/$VERSION/"
|
|
66
|
-
fi
|
|
67
|
-
|
|
68
|
-
exit 0
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
#
|
|
3
|
-
# archive-milestone-phases.sh
|
|
4
|
-
# Consolidates phase summaries, deletes raw artifacts, and moves phase
|
|
5
|
-
# directories to the milestone archive.
|
|
6
|
-
#
|
|
7
|
-
# Usage: ./scripts/archive-milestone-phases.sh <start_phase> <end_phase> <version>
|
|
8
|
-
# Example: ./scripts/archive-milestone-phases.sh 1 6 v1.0
|
|
9
|
-
|
|
10
|
-
set -e
|
|
11
|
-
|
|
12
|
-
# --- Validation ---
|
|
13
|
-
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
|
|
14
|
-
echo "Error: Three arguments required"
|
|
15
|
-
echo "Usage: $0 <start_phase> <end_phase> <version>"
|
|
16
|
-
exit 1
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
START="$1"
|
|
20
|
-
END="$2"
|
|
21
|
-
VERSION="$3"
|
|
22
|
-
|
|
23
|
-
if ! [[ "$START" =~ ^[0-9]+$ ]] || ! [[ "$END" =~ ^[0-9]+$ ]]; then
|
|
24
|
-
echo "Error: start_phase and end_phase must be numeric"
|
|
25
|
-
echo "Usage: $0 <start_phase> <end_phase> <version>"
|
|
26
|
-
exit 1
|
|
27
|
-
fi
|
|
28
|
-
|
|
29
|
-
if [ "$START" -gt "$END" ]; then
|
|
30
|
-
echo "Error: Start phase ($START) cannot exceed end phase ($END)"
|
|
31
|
-
exit 1
|
|
32
|
-
fi
|
|
33
|
-
|
|
34
|
-
# --- Find .planning from git root ---
|
|
35
|
-
GIT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
|
|
36
|
-
if [ -z "$GIT_ROOT" ]; then
|
|
37
|
-
echo "Error: Not in a git repository"
|
|
38
|
-
exit 1
|
|
39
|
-
fi
|
|
40
|
-
|
|
41
|
-
PHASES_DIR="$GIT_ROOT/.planning/phases"
|
|
42
|
-
if [ ! -d "$PHASES_DIR" ]; then
|
|
43
|
-
echo "Error: Phases directory not found at $PHASES_DIR"
|
|
44
|
-
exit 1
|
|
45
|
-
fi
|
|
46
|
-
|
|
47
|
-
MILESTONE_DIR="$GIT_ROOT/.planning/milestones/$VERSION"
|
|
48
|
-
if [ ! -d "$MILESTONE_DIR" ]; then
|
|
49
|
-
echo "Error: Milestone directory not found at $MILESTONE_DIR"
|
|
50
|
-
echo "Run archive_milestone step first to create it"
|
|
51
|
-
exit 1
|
|
52
|
-
fi
|
|
53
|
-
|
|
54
|
-
# --- Helper: check if phase number is in range (supports decimals like 02.1) ---
|
|
55
|
-
in_range() {
|
|
56
|
-
local phase_num="$1"
|
|
57
|
-
echo "$phase_num" | awk -v s="$START" -v e="$END" '{
|
|
58
|
-
# Strip leading zeros for comparison
|
|
59
|
-
val = $1 + 0
|
|
60
|
-
if (val >= s && val <= e + 0.999) exit 0
|
|
61
|
-
else exit 1
|
|
62
|
-
}'
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
# --- Stage 1: Consolidate summaries ---
|
|
66
|
-
SUMMARIES_FILE="$MILESTONE_DIR/PHASE-SUMMARIES.md"
|
|
67
|
-
SUMMARY_COUNT=0
|
|
68
|
-
|
|
69
|
-
echo "# Phase Summaries: $VERSION" > "$SUMMARIES_FILE"
|
|
70
|
-
echo "" >> "$SUMMARIES_FILE"
|
|
71
|
-
|
|
72
|
-
for dir in "$PHASES_DIR"/*/; do
|
|
73
|
-
[ -d "$dir" ] || continue
|
|
74
|
-
dirname=$(basename "$dir")
|
|
75
|
-
phase_num="${dirname%%-*}"
|
|
76
|
-
phase_name="${dirname#*-}"
|
|
77
|
-
|
|
78
|
-
if in_range "$phase_num"; then
|
|
79
|
-
has_summaries=false
|
|
80
|
-
for f in "$dir"/*-SUMMARY.md; do
|
|
81
|
-
[ -f "$f" ] || continue
|
|
82
|
-
if [ "$has_summaries" = false ]; then
|
|
83
|
-
echo "## Phase $phase_num: $phase_name" >> "$SUMMARIES_FILE"
|
|
84
|
-
echo "" >> "$SUMMARIES_FILE"
|
|
85
|
-
has_summaries=true
|
|
86
|
-
fi
|
|
87
|
-
plan_file=$(basename "$f")
|
|
88
|
-
plan_id="${plan_file%-SUMMARY.md}"
|
|
89
|
-
echo "### $plan_id" >> "$SUMMARIES_FILE"
|
|
90
|
-
echo "" >> "$SUMMARIES_FILE"
|
|
91
|
-
cat "$f" >> "$SUMMARIES_FILE"
|
|
92
|
-
echo "" >> "$SUMMARIES_FILE"
|
|
93
|
-
SUMMARY_COUNT=$((SUMMARY_COUNT + 1))
|
|
94
|
-
done
|
|
95
|
-
fi
|
|
96
|
-
done
|
|
97
|
-
|
|
98
|
-
echo "Stage 1: Consolidated $SUMMARY_COUNT summaries to PHASE-SUMMARIES.md"
|
|
99
|
-
|
|
100
|
-
# --- Stage 2: Delete artifacts ---
|
|
101
|
-
DELETED=0
|
|
102
|
-
for dir in "$PHASES_DIR"/*/; do
|
|
103
|
-
[ -d "$dir" ] || continue
|
|
104
|
-
dirname=$(basename "$dir")
|
|
105
|
-
phase_num="${dirname%%-*}"
|
|
106
|
-
|
|
107
|
-
if in_range "$phase_num"; then
|
|
108
|
-
for f in "$dir"/*-CONTEXT.md "$dir"/*-DESIGN.md "$dir"/*-RESEARCH.md \
|
|
109
|
-
"$dir"/*-SUMMARY.md "$dir"/*-UAT.md "$dir"/*-VERIFICATION.md \
|
|
110
|
-
"$dir"/*-EXECUTION-ORDER.md; do
|
|
111
|
-
if [ -f "$f" ]; then
|
|
112
|
-
rm -f "$f"
|
|
113
|
-
DELETED=$((DELETED + 1))
|
|
114
|
-
fi
|
|
115
|
-
done
|
|
116
|
-
fi
|
|
117
|
-
done
|
|
118
|
-
|
|
119
|
-
echo "Stage 2: Deleted $DELETED artifact files"
|
|
120
|
-
|
|
121
|
-
# --- Stage 3: Move phase directories ---
|
|
122
|
-
mkdir -p "$MILESTONE_DIR/phases"
|
|
123
|
-
MOVED=0
|
|
124
|
-
for dir in "$PHASES_DIR"/*/; do
|
|
125
|
-
[ -d "$dir" ] || continue
|
|
126
|
-
dirname=$(basename "$dir")
|
|
127
|
-
phase_num="${dirname%%-*}"
|
|
128
|
-
|
|
129
|
-
if in_range "$phase_num"; then
|
|
130
|
-
mv "$dir" "$MILESTONE_DIR/phases/$dirname"
|
|
131
|
-
MOVED=$((MOVED + 1))
|
|
132
|
-
fi
|
|
133
|
-
done
|
|
134
|
-
|
|
135
|
-
echo "Stage 3: Moved $MOVED phase directories to milestones/$VERSION/phases/"
|
|
136
|
-
echo ""
|
|
137
|
-
echo "Archive complete: $SUMMARY_COUNT summaries, $DELETED artifacts deleted, $MOVED dirs moved"
|
|
138
|
-
exit 0
|