musubix 3.3.4 → 3.3.6

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.
Files changed (92) hide show
  1. package/.github/AGENTS.md +949 -0
  2. package/.github/prompts/sdd-change-apply.prompt.md +283 -0
  3. package/.github/prompts/sdd-change-archive.prompt.md +241 -0
  4. package/.github/prompts/sdd-change-init.prompt.md +269 -0
  5. package/.github/prompts/sdd-design.prompt.md +250 -0
  6. package/.github/prompts/sdd-implement.prompt.md +387 -0
  7. package/.github/prompts/sdd-requirements.prompt.md +193 -0
  8. package/.github/prompts/sdd-review.prompt.md +155 -0
  9. package/.github/prompts/sdd-security.prompt.md +228 -0
  10. package/.github/prompts/sdd-steering.prompt.md +269 -0
  11. package/.github/prompts/sdd-tasks.prompt.md +255 -0
  12. package/.github/prompts/sdd-test.prompt.md +230 -0
  13. package/.github/prompts/sdd-validate.prompt.md +304 -0
  14. package/.github/skills/musubix-adr-generation/SKILL.md +209 -0
  15. package/.github/skills/musubix-best-practices/SKILL.md +315 -0
  16. package/.github/skills/musubix-c4-design/SKILL.md +162 -0
  17. package/.github/skills/musubix-code-generation/SKILL.md +237 -0
  18. package/.github/skills/musubix-domain-inference/SKILL.md +196 -0
  19. package/.github/skills/musubix-ears-validation/SKILL.md +161 -0
  20. package/.github/skills/musubix-sdd-workflow/SKILL.md +217 -0
  21. package/.github/skills/musubix-technical-writing/SKILL.md +444 -0
  22. package/.github/skills/musubix-test-generation/SKILL.md +212 -0
  23. package/.github/skills/musubix-traceability/SKILL.md +141 -0
  24. package/AGENTS.md +1065 -0
  25. package/LICENSE +21 -0
  26. package/README.ja.md +296 -0
  27. package/README.md +305 -50
  28. package/bin/musubix-mcp.js +15 -0
  29. package/bin/musubix.js +9 -1
  30. package/docs/API-REFERENCE.md +1425 -0
  31. package/docs/GITHUB-ACTIONS-NPM-SETUP.md +132 -0
  32. package/docs/INSTALL-GUIDE.ja.md +459 -0
  33. package/docs/INSTALL-GUIDE.md +459 -0
  34. package/docs/MIGRATION-v3.0.md +324 -0
  35. package/docs/MUSUBI-enhancement_roadmap_20260105.md +651 -0
  36. package/docs/MUSUBIX-v3.0-User-Guide.md +1357 -0
  37. package/docs/MUSUBIXv2.2.0-Manual-outline.md +136 -0
  38. package/docs/MUSUBIXv2.2.0-Manual.md +3123 -0
  39. package/docs/MUSUBIXv2.3.5-Refactering.md +1310 -0
  40. package/docs/MUSUBIv1.6.1-enhancement_roadmap_20260105.md +291 -0
  41. package/docs/MUSUBIv2.2.0-USERGUIDE.md +2079 -0
  42. package/docs/ROADMAP-v1.5.md +116 -0
  43. package/docs/SwarmCoding.md +1284 -0
  44. package/docs/Test-prompt.md +105 -0
  45. package/docs/USER-GUIDE-v1.8.0.md +2371 -0
  46. package/docs/USER-GUIDE.ja.md +2147 -0
  47. package/docs/USER-GUIDE.md +3022 -0
  48. package/docs/YATA-GLOBAL-GUIDE.ja.md +750 -0
  49. package/docs/YATA-GLOBAL-GUIDE.md +595 -0
  50. package/docs/YATA-LOCAL-GUIDE.ja.md +989 -0
  51. package/docs/YATA-LOCAL-GUIDE.md +730 -0
  52. package/docs/adr/0001-real-time-pattern-learning-architecture-for-v1-5-0.md +75 -0
  53. package/docs/adr/0002-pattern-sharing-protocol-for-cross-team-collaborat.md +79 -0
  54. package/docs/adr/0003-owl-2-rl-implementation-strategy-for-advanced-infe.md +90 -0
  55. package/docs/enterprise-knowledge-management.md +1737 -0
  56. package/docs/evolution-from-musubi-to-musubix.md +2170 -0
  57. package/docs/getting-started-with-sdd.md +1602 -0
  58. package/docs/moodle-refactering-codegraph-musubix.md +391 -0
  59. package/docs/moodle-refactering-codegraph.md +278 -0
  60. package/docs/overview/MUSUBIX-CodeGraph.md +322 -0
  61. package/docs/overview/MUSUBIX-Core.md +671 -0
  62. package/docs/overview/MUSUBIX-Decisions.md +494 -0
  63. package/docs/overview/MUSUBIX-FormalVerify.md +566 -0
  64. package/docs/overview/MUSUBIX-Knowledge.md +1231 -0
  65. package/docs/overview/MUSUBIX-Learning.md +837 -0
  66. package/docs/overview/MUSUBIX-MCP-Server.md +535 -0
  67. package/docs/overview/MUSUBIX-Overview.md +264 -0
  68. package/docs/overview/MUSUBIX-Phase1-Complete.md +271 -0
  69. package/docs/overview/MUSUBIX-Phase2-Complete.md +310 -0
  70. package/docs/overview/MUSUBIX-Policy.md +477 -0
  71. package/docs/overview/MUSUBIX-Roadmap-v2.md +399 -0
  72. package/docs/overview/MUSUBIX-Security-Plan.md +939 -0
  73. package/docs/overview/MUSUBIX-Security-v2.1.md +668 -0
  74. package/docs/overview/MUSUBIX-Security.md +891 -0
  75. package/docs/overview/MUSUBIX-YATA.md +666 -0
  76. package/docs/overview/MUSUBIX-v2.2.0-Advanced-Learning.md +513 -0
  77. package/docs/overview/Neuro-SymbolicAI.md +159 -0
  78. package/docs/packages/knowledge.md +594 -0
  79. package/docs/qiita-linux-kernel-knowledge-graph.md +596 -0
  80. package/package.json +55 -51
  81. package/scripts/generate-quality-gate-report.ts +106 -0
  82. package/scripts/postinstall.js +94 -0
  83. package/steering/.musubi-version +1 -0
  84. package/steering/product.ja.md +572 -0
  85. package/steering/project.yml +66 -0
  86. package/steering/rules/constitution.md +491 -0
  87. package/steering/structure.ja.md +503 -0
  88. package/steering/tech.ja.md +208 -0
  89. package/dist/index.d.ts +0 -25
  90. package/dist/index.d.ts.map +0 -1
  91. package/dist/index.js +0 -74
  92. package/dist/index.js.map +0 -1
@@ -0,0 +1,283 @@
1
+ # MUSUBIX Change Apply Command
2
+
3
+ Apply a change proposal to the codebase.
4
+
5
+ ---
6
+
7
+ ## Instructions for AI Agent
8
+
9
+ You are executing the `musubix change apply [change-name]` command to implement an approved change proposal.
10
+
11
+ ### Command Format
12
+
13
+ ```bash
14
+ npx musubix change apply add-2fa
15
+ npx musubix change apply migrate-to-graphql
16
+ ```
17
+
18
+ ### Your Task
19
+
20
+ Implement the changes defined in the change proposal, following constitutional governance.
21
+
22
+ ---
23
+
24
+ ## Process
25
+
26
+ ### 1. Read Change Proposal
27
+
28
+ **IMPORTANT**: Read the approved change proposal first:
29
+
30
+ ```bash
31
+ storage/changes/{{CHANGE_NAME}}-proposal.md
32
+ ```
33
+
34
+ **Extract**:
35
+
36
+ - ADDED requirements
37
+ - MODIFIED requirements
38
+ - REMOVED requirements
39
+ - Implementation plan
40
+
41
+ **Verify Approval**:
42
+
43
+ - Status must be "Approved" (not "Proposed")
44
+ - If not approved, abort and notify user
45
+
46
+ ---
47
+
48
+ ### 2. Read Steering Context (Article VI)
49
+
50
+ ```bash
51
+ steering/product.ja.md
52
+ steering/structure.ja.md
53
+ steering/tech.ja.md
54
+ ```
55
+
56
+ ---
57
+
58
+ ### 3. Execute Implementation Plan
59
+
60
+ Follow the phases defined in the change proposal:
61
+
62
+ #### Phase 1: Preparation
63
+
64
+ ```bash
65
+ # Create feature branch
66
+ git checkout -b feature/{{CHANGE_NAME}}
67
+
68
+ # Create implementation tracking document
69
+ touch storage/changes/{{CHANGE_NAME}}-implementation.md
70
+ ```
71
+
72
+ #### Phase 2: Update Requirements
73
+
74
+ For ADDED requirements:
75
+ - Create new requirement files in `storage/specs/`
76
+
77
+ For MODIFIED requirements:
78
+ - Update existing requirement files
79
+ - Mark version change
80
+
81
+ For REMOVED requirements:
82
+ - Archive to `storage/archive/`
83
+ - Update traceability
84
+
85
+ #### Phase 3: Update Design
86
+
87
+ - Update `storage/specs/DES-*.md` files
88
+ - Add new ADRs for significant changes
89
+
90
+ #### Phase 4: Implement Code
91
+
92
+ Follow Test-First (Article III):
93
+
94
+ 1. **Write Tests (RED)**
95
+ ```typescript
96
+ // packages/core/__tests__/unit/{{feature}}.test.ts
97
+ describe('REQ-{{COMPONENT}}-NEW-001: [New Feature]', () => {
98
+ it('should [new behavior]', () => {
99
+ // Test new functionality
100
+ });
101
+ });
102
+ ```
103
+
104
+ 2. **Implement (GREEN)**
105
+ ```typescript
106
+ // packages/core/src/{{feature}}/service.ts
107
+ // Minimal implementation to pass tests
108
+ ```
109
+
110
+ 3. **Refactor (BLUE)**
111
+ - Improve design
112
+ - Ensure tests still pass
113
+
114
+ ---
115
+
116
+ ### 4. Feature Flag (Optional)
117
+
118
+ For gradual rollout:
119
+
120
+ ```typescript
121
+ // packages/core/src/config/feature-flags.ts
122
+
123
+ export const FEATURE_FLAGS = {
124
+ enable_{{feature}}: {
125
+ enabled: false, // Start disabled
126
+ description: '{{CHANGE_DESCRIPTION}}',
127
+ },
128
+ } as const;
129
+ ```
130
+
131
+ ```typescript
132
+ // Usage in code
133
+ import { FEATURE_FLAGS } from '../config/feature-flags.js';
134
+
135
+ if (FEATURE_FLAGS.enable_{{feature}}.enabled) {
136
+ // New implementation
137
+ } else {
138
+ // Old implementation
139
+ }
140
+ ```
141
+
142
+ ---
143
+
144
+ ### 5. Update CLI (Article II)
145
+
146
+ If CLI changes:
147
+
148
+ ```typescript
149
+ // packages/core/src/cli/commands/{{feature}}.ts
150
+
151
+ export function register{{Feature}}Command(program: Command): void {
152
+ program
153
+ .command('{{feature}}')
154
+ .description('{{New/Updated description}}')
155
+ .option('--new-option', 'New option from change')
156
+ .action(async (options) => {
157
+ // Updated implementation
158
+ });
159
+ }
160
+ ```
161
+
162
+ ---
163
+
164
+ ### 6. Update MCP Tools
165
+
166
+ If MCP tools change:
167
+
168
+ ```typescript
169
+ // packages/mcp-server/src/tools/{{feature}}-tools.ts
170
+
171
+ export const {{feature}}Tool: ToolDefinition = {
172
+ name: 'sdd_{{feature}}',
173
+ description: '{{Updated description}}',
174
+ inputSchema: {
175
+ type: 'object',
176
+ properties: {
177
+ // Updated schema
178
+ newProperty: {
179
+ type: 'string',
180
+ description: 'New property from change',
181
+ },
182
+ },
183
+ },
184
+ handler: async (args) => {
185
+ // Updated implementation
186
+ },
187
+ };
188
+ ```
189
+
190
+ ---
191
+
192
+ ### 7. Generate Implementation Report
193
+
194
+ **Output**: `storage/changes/{{CHANGE_NAME}}-implementation.md`
195
+
196
+ ```markdown
197
+ # Implementation Report: {{CHANGE_NAME}}
198
+
199
+ **Date**: {{DATE}}
200
+ **Status**: In Progress / Completed
201
+
202
+ ## Summary
203
+
204
+ | Item | Status |
205
+ |------|--------|
206
+ | Requirements Updated | ✅ |
207
+ | Design Updated | ✅ |
208
+ | Tests Written | ✅ |
209
+ | Code Implemented | ✅ |
210
+ | Documentation Updated | ⏳ |
211
+
212
+ ## Changes Made
213
+
214
+ ### Files Created
215
+
216
+ - `packages/core/src/{{feature}}/new-module.ts`
217
+ - `packages/core/__tests__/unit/new-module.test.ts`
218
+
219
+ ### Files Modified
220
+
221
+ - `packages/core/src/{{feature}}/service.ts`
222
+ - `packages/mcp-server/src/tools/{{feature}}-tools.ts`
223
+
224
+ ### Files Deleted
225
+
226
+ - `packages/core/src/{{feature}}/deprecated.ts`
227
+
228
+ ## Test Results
229
+
230
+ \`\`\`
231
+ npm test
232
+
233
+ ✓ packages/core/__tests__/unit/{{feature}}.test.ts (10 tests)
234
+ ✓ packages/core/__tests__/integration/{{feature}}.integration.test.ts (5 tests)
235
+
236
+ Test Suites: 2 passed
237
+ Tests: 15 passed
238
+ Coverage: 87%
239
+ \`\`\`
240
+
241
+ ## Traceability Verification
242
+
243
+ | Requirement | Design | Code | Test |
244
+ |-------------|--------|------|------|
245
+ | REQ-XXX-NEW-001 | DES-XXX-001 | ✅ | ✅ |
246
+ | REQ-XXX-001 (mod) | DES-XXX-001 | ✅ | ✅ |
247
+
248
+ ## Deployment Notes
249
+
250
+ 1. Run migrations (if any)
251
+ 2. Enable feature flag
252
+ 3. Monitor metrics
253
+
254
+ ## Rollback Instructions
255
+
256
+ 1. Disable feature flag
257
+ 2. Revert to previous release
258
+ ```
259
+
260
+ ---
261
+
262
+ ### 8. Validation
263
+
264
+ Run all validations:
265
+
266
+ ```bash
267
+ # Tests
268
+ npm test
269
+
270
+ # Type check
271
+ npm run typecheck
272
+
273
+ # Lint
274
+ npm run lint
275
+
276
+ # Traceability
277
+ npx musubix trace validate
278
+ ```
279
+
280
+ ---
281
+
282
+ **MUSUBIX**: https://github.com/nahisaho/MUSUBIX
283
+ **Version**: 1.0.0
@@ -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