musubix 1.0.0 → 1.0.2

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.
@@ -0,0 +1,241 @@
1
+ # MUSUBIX Change Archive Command
2
+
3
+ Archive a completed change proposal.
4
+
5
+ ---
6
+
7
+ ## Instructions for AI Agent
8
+
9
+ You are executing the `musubix change archive [change-name]` command to archive a completed change.
10
+
11
+ ### Command Format
12
+
13
+ ```bash
14
+ npx musubix change archive add-2fa
15
+ npx musubix change archive migrate-to-graphql
16
+ ```
17
+
18
+ ### Your Task
19
+
20
+ Archive the change proposal and implementation, update documentation, and clean up.
21
+
22
+ ---
23
+
24
+ ## Process
25
+
26
+ ### 1. Verify Change Completion
27
+
28
+ **Read Implementation Report**:
29
+
30
+ ```bash
31
+ storage/changes/{{CHANGE_NAME}}-implementation.md
32
+ ```
33
+
34
+ **Verify Status**:
35
+
36
+ - [ ] Implementation report exists
37
+ - [ ] All requirements implemented
38
+ - [ ] Tests passing
39
+ - [ ] Feature flag enabled (or deprecated feature removed)
40
+
41
+ **If Not Complete**:
42
+
43
+ ```markdown
44
+ ⚠️ **Change not ready for archival**
45
+
46
+ Status Check:
47
+ - [ ] Implementation complete
48
+ - [ ] Tests passing
49
+ - [ ] Deployed
50
+ - [ ] Stable period passed
51
+
52
+ Please complete all steps before archiving.
53
+ ```
54
+
55
+ ---
56
+
57
+ ### 2. Collect Final Metrics
58
+
59
+ ```markdown
60
+ ## Final Metrics: {{CHANGE_NAME}}
61
+
62
+ ### Test Results
63
+
64
+ - Unit Tests: XX passed
65
+ - Integration Tests: XX passed
66
+ - Coverage: XX%
67
+
68
+ ### Code Quality
69
+
70
+ - Lint: ✅ No errors
71
+ - TypeScript: ✅ No errors
72
+
73
+ ### Traceability
74
+
75
+ - Requirements Coverage: 100%
76
+ - Design Coverage: 100%
77
+ - Test Coverage: XX%
78
+ ```
79
+
80
+ ---
81
+
82
+ ### 3. Archive Documents
83
+
84
+ Move change documents to archive:
85
+
86
+ ```bash
87
+ # Create archive directory
88
+ mkdir -p storage/archive/changes/{{CHANGE_NAME}}
89
+
90
+ # Move change documents
91
+ mv storage/changes/{{CHANGE_NAME}}-proposal.md storage/archive/changes/{{CHANGE_NAME}}/
92
+ mv storage/changes/{{CHANGE_NAME}}-implementation.md storage/archive/changes/{{CHANGE_NAME}}/
93
+ ```
94
+
95
+ ---
96
+
97
+ ### 4. Update Main Documentation
98
+
99
+ **Update Traceability Matrix**:
100
+
101
+ Add entries to `storage/traceability/`:
102
+
103
+ ```markdown
104
+ ## Change: {{CHANGE_NAME}}
105
+
106
+ **Archived**: {{DATE}}
107
+
108
+ | Requirement | Design | Task | Code | Test |
109
+ |-------------|--------|------|------|------|
110
+ | REQ-XXX-NEW-001 | DES-XXX-001 | TSK-XXX-001 | service.ts | service.test.ts |
111
+ ```
112
+
113
+ **Update CHANGELOG.md**:
114
+
115
+ ```markdown
116
+ ## [1.x.x] - {{DATE}}
117
+
118
+ ### Added
119
+ - {{Feature description}} (CHG-{{CHANGE}}-001)
120
+
121
+ ### Changed
122
+ - {{Modified feature}} (CHG-{{CHANGE}}-001)
123
+
124
+ ### Removed
125
+ - {{Deprecated feature}} (CHG-{{CHANGE}}-001)
126
+ ```
127
+
128
+ ---
129
+
130
+ ### 5. Remove Feature Flags (if applicable)
131
+
132
+ If feature flag was used:
133
+
134
+ ```typescript
135
+ // packages/core/src/config/feature-flags.ts
136
+
137
+ // REMOVE:
138
+ // enable_{{feature}}: {
139
+ // enabled: true,
140
+ // description: '{{CHANGE_DESCRIPTION}}',
141
+ // },
142
+
143
+ // Update code to remove flag checks
144
+ ```
145
+
146
+ ---
147
+
148
+ ### 6. Generate Archive Summary
149
+
150
+ **Output**: `storage/archive/changes/{{CHANGE_NAME}}/SUMMARY.md`
151
+
152
+ ```markdown
153
+ # Change Archive Summary: {{CHANGE_NAME}}
154
+
155
+ **Document ID**: CHG-{{CHANGE}}-001
156
+ **Archived**: {{DATE}}
157
+ **Duration**: X weeks
158
+
159
+ ## Overview
160
+
161
+ **Change Type**: Feature / Enhancement / Refactor
162
+ **Packages Affected**: packages/core/, packages/mcp-server/
163
+
164
+ ## Final State
165
+
166
+ ### Requirements
167
+
168
+ | ID | Title | Status |
169
+ |----|-------|--------|
170
+ | REQ-XXX-NEW-001 | [New Feature] | Implemented |
171
+ | REQ-XXX-001 | [Modified Feature] | Updated |
172
+
173
+ ### Files Changed
174
+
175
+ **Created**: X files
176
+ **Modified**: X files
177
+ **Deleted**: X files
178
+
179
+ ### Test Coverage
180
+
181
+ - Before: XX%
182
+ - After: XX%
183
+
184
+ ## Documents Archived
185
+
186
+ 1. {{CHANGE_NAME}}-proposal.md
187
+ 2. {{CHANGE_NAME}}-implementation.md
188
+ 3. SUMMARY.md (this file)
189
+
190
+ ## Lessons Learned
191
+
192
+ 1. [Lesson 1]
193
+ 2. [Lesson 2]
194
+
195
+ ## Related Changes
196
+
197
+ - CHG-XXX-001: [Related change]
198
+ ```
199
+
200
+ ---
201
+
202
+ ### 7. Clean Up
203
+
204
+ ```bash
205
+ # Remove any temporary files
206
+ rm -rf storage/changes/{{CHANGE_NAME}}-*.tmp
207
+
208
+ # Verify archive is complete
209
+ ls storage/archive/changes/{{CHANGE_NAME}}/
210
+ # Expected:
211
+ # - {{CHANGE_NAME}}-proposal.md
212
+ # - {{CHANGE_NAME}}-implementation.md
213
+ # - SUMMARY.md
214
+
215
+ # Git commit
216
+ git add storage/archive/changes/{{CHANGE_NAME}}/
217
+ git add storage/traceability/
218
+ git add CHANGELOG.md
219
+ git commit -m "chore: archive change CHG-{{CHANGE}}-001"
220
+ ```
221
+
222
+ ---
223
+
224
+ ### 8. Final Verification
225
+
226
+ ```bash
227
+ # Ensure no orphaned references
228
+ grep -r "CHG-{{CHANGE}}-001" packages/
229
+ # Should only find documentation references
230
+
231
+ # Ensure tests still pass
232
+ npm test
233
+
234
+ # Ensure build succeeds
235
+ npm run build
236
+ ```
237
+
238
+ ---
239
+
240
+ **MUSUBIX**: https://github.com/nahisaho/MUSUBIX
241
+ **Version**: 1.0.0
@@ -0,0 +1,269 @@
1
+ # MUSUBIX Change Init Command
2
+
3
+ Initialize a change proposal for brownfield projects (existing codebase).
4
+
5
+ ---
6
+
7
+ ## Instructions for AI Agent
8
+
9
+ You are executing the `musubix change init [change-name]` command to create a change proposal for an existing codebase.
10
+
11
+ ### Command Format
12
+
13
+ ```bash
14
+ npx musubix change init add-2fa
15
+ npx musubix change init migrate-to-graphql
16
+ npx musubix change init refactor-auth-service
17
+ ```
18
+
19
+ ### Your Task
20
+
21
+ Generate a change proposal specification that documents what will be added, modified, or removed in the existing MUSUBIX system.
22
+
23
+ ---
24
+
25
+ ## Process
26
+
27
+ ### 1. Read Steering Context (Article VI)
28
+
29
+ **IMPORTANT**: Before starting, read steering files:
30
+
31
+ ```bash
32
+ steering/product.ja.md # Current product context
33
+ steering/structure.ja.md # Existing architecture
34
+ steering/tech.ja.md # Current technology stack
35
+ ```
36
+
37
+ ---
38
+
39
+ ### 2. Analyze Existing System
40
+
41
+ **Research Current Implementation**:
42
+
43
+ ```bash
44
+ # Search for related code
45
+ grep -r "{{related-feature}}" packages/
46
+
47
+ # Find existing requirements
48
+ ls storage/specs/REQ-*.md
49
+
50
+ # Check existing design documents
51
+ ls storage/specs/DES-*.md
52
+ ```
53
+
54
+ **Document Current State**:
55
+
56
+ - What exists now?
57
+ - What packages are affected?
58
+ - What dependencies exist?
59
+ - What tests cover this area?
60
+
61
+ ---
62
+
63
+ ### 3. Gather Change Requirements
64
+
65
+ **Ask User**:
66
+
67
+ - Why is this change needed?
68
+ - What problem does it solve?
69
+ - What must NOT change (backward compatibility)?
70
+ - What is the timeline?
71
+
72
+ **Impact Analysis**:
73
+
74
+ - [ ] packages/core/ components
75
+ - [ ] packages/mcp-server/ tools
76
+ - [ ] packages/yata-client/ integration
77
+ - [ ] CLI commands
78
+ - [ ] Tests
79
+ - [ ] Documentation
80
+
81
+ ---
82
+
83
+ ### 4. Generate Change Proposal
84
+
85
+ **Output**: `storage/changes/{{CHANGE_NAME}}-proposal.md`
86
+
87
+ ```markdown
88
+ # Change Proposal: {{CHANGE_NAME}}
89
+
90
+ **Document ID**: CHG-{{CHANGE}}-001
91
+ **Version**: 1.0.0
92
+ **Date**: {{DATE}}
93
+ **Status**: Proposed
94
+
95
+ ## Summary
96
+
97
+ **Change Type**: Feature / Enhancement / Refactor / Bug Fix
98
+ **Affected Packages**: packages/core/, packages/mcp-server/
99
+ **Risk Level**: Low / Medium / High
100
+
101
+ ## Motivation
102
+
103
+ **Problem Statement**:
104
+ [Why is this change needed?]
105
+
106
+ **Business Value**:
107
+ [What value does this provide?]
108
+
109
+ ## Current State
110
+
111
+ ### Existing Implementation
112
+
113
+ | Component | Location | Description |
114
+ |-----------|----------|-------------|
115
+ | AuthService | packages/core/src/auth/ | Current auth implementation |
116
+
117
+ ### Existing Tests
118
+
119
+ | Test File | Coverage |
120
+ |-----------|----------|
121
+ | auth.test.ts | 85% |
122
+
123
+ ## Proposed Changes
124
+
125
+ ### ADDED Requirements
126
+
127
+ #### REQ-{{COMPONENT}}-NEW-001: [New Feature]
128
+
129
+ > [EARS statement]
130
+
131
+ **Priority**: P1
132
+ **Acceptance Criteria**:
133
+ - [ ] [Criterion 1]
134
+
135
+ ### MODIFIED Requirements
136
+
137
+ #### REQ-{{COMPONENT}}-001: [Modified Feature]
138
+
139
+ **Current**:
140
+ > [Current EARS statement]
141
+
142
+ **Proposed**:
143
+ > [New EARS statement]
144
+
145
+ **Change Reason**: [Why modify?]
146
+
147
+ ### REMOVED Requirements
148
+
149
+ #### REQ-{{COMPONENT}}-OLD-001: [Deprecated Feature]
150
+
151
+ **Reason**: [Why remove?]
152
+ **Migration Path**: [How to migrate?]
153
+
154
+ ## Impact Analysis
155
+
156
+ ### Affected Components
157
+
158
+ | Package | Component | Impact |
159
+ |---------|-----------|--------|
160
+ | core | auth/service.ts | Modified |
161
+ | mcp-server | tools/auth-tools.ts | Modified |
162
+
163
+ ### Breaking Changes
164
+
165
+ - [ ] CLI API changes
166
+ - [ ] MCP tool changes
167
+ - [ ] Type changes
168
+
169
+ ### Migration Requirements
170
+
171
+ 1. [Migration step 1]
172
+ 2. [Migration step 2]
173
+
174
+ ## Implementation Plan
175
+
176
+ ### Phase 1: Preparation
177
+
178
+ - [ ] Create feature branch
179
+ - [ ] Write tests for new requirements
180
+ - [ ] Update documentation
181
+
182
+ ### Phase 2: Implementation
183
+
184
+ - [ ] Implement changes
185
+ - [ ] Update affected components
186
+ - [ ] Add feature flag (if needed)
187
+
188
+ ### Phase 3: Validation
189
+
190
+ - [ ] Run all tests
191
+ - [ ] Validate traceability
192
+ - [ ] Code review
193
+
194
+ ## Rollback Plan
195
+
196
+ 1. Revert feature flag
197
+ 2. Deploy previous version
198
+ 3. Restore database (if needed)
199
+
200
+ ## Approval
201
+
202
+ | Role | Name | Date | Status |
203
+ |------|------|------|--------|
204
+ | Architect | | | Pending |
205
+ | Lead Dev | | | Pending |
206
+ ```
207
+
208
+ ---
209
+
210
+ ### 5. Delta Specification
211
+
212
+ For modifications, create delta spec:
213
+
214
+ ```markdown
215
+ ## Delta Specification
216
+
217
+ ### packages/core/src/auth/service.ts
218
+
219
+ **Change Type**: Modified
220
+
221
+ **Current Implementation**:
222
+ \`\`\`typescript
223
+ export class AuthService {
224
+ async login(email: string, password: string): Promise<Session> {
225
+ // Current implementation
226
+ }
227
+ }
228
+ \`\`\`
229
+
230
+ **Proposed Implementation**:
231
+ \`\`\`typescript
232
+ export class AuthService {
233
+ async login(email: string, password: string, mfaCode?: string): Promise<Session> {
234
+ // New implementation with MFA support
235
+ if (this.config.mfaEnabled && !mfaCode) {
236
+ throw new MFARequiredError();
237
+ }
238
+ }
239
+ }
240
+ \`\`\`
241
+
242
+ **Breaking Change**: Yes - New optional parameter
243
+ **Migration**: Update all callers to handle MFARequiredError
244
+ ```
245
+
246
+ ---
247
+
248
+ ### 6. Traceability
249
+
250
+ Link to existing documents:
251
+
252
+ ```markdown
253
+ ## Traceability
254
+
255
+ ### Related Requirements
256
+ - REQ-AUTH-001: User authentication (MODIFIED)
257
+ - REQ-AUTH-NEW-001: MFA support (ADDED)
258
+
259
+ ### Related Design
260
+ - DES-AUTH-001: Authentication design (UPDATE REQUIRED)
261
+
262
+ ### Related Tasks
263
+ - TSK-AUTH-001: Implement MFA (NEW)
264
+ ```
265
+
266
+ ---
267
+
268
+ **MUSUBIX**: https://github.com/nahisaho/MUSUBIX
269
+ **Version**: 1.0.0