musubi-sdd 0.1.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.
Files changed (91) hide show
  1. package/LICENSE +21 -0
  2. package/README.ja.md +531 -0
  3. package/README.md +531 -0
  4. package/bin/musubi-init.js +321 -0
  5. package/bin/musubi.js +359 -0
  6. package/package.json +55 -0
  7. package/src/agents/registry.js +242 -0
  8. package/src/templates/agents/claude-code/CLAUDE.md +232 -0
  9. package/src/templates/agents/claude-code/commands/sdd-design.md +673 -0
  10. package/src/templates/agents/claude-code/commands/sdd-implement.md +777 -0
  11. package/src/templates/agents/claude-code/commands/sdd-requirements.md +438 -0
  12. package/src/templates/agents/claude-code/commands/sdd-steering.md +334 -0
  13. package/src/templates/agents/claude-code/commands/sdd-tasks.md +582 -0
  14. package/src/templates/agents/claude-code/commands/sdd-validate.md +710 -0
  15. package/src/templates/agents/claude-code/skills/ai-ml-engineer/SKILL.md +3055 -0
  16. package/src/templates/agents/claude-code/skills/api-designer/SKILL.md +1364 -0
  17. package/src/templates/agents/claude-code/skills/bug-hunter/SKILL.md +482 -0
  18. package/src/templates/agents/claude-code/skills/change-impact-analyzer/SKILL.md +397 -0
  19. package/src/templates/agents/claude-code/skills/cloud-architect/SKILL.md +1468 -0
  20. package/src/templates/agents/claude-code/skills/code-reviewer/SKILL.md +906 -0
  21. package/src/templates/agents/claude-code/skills/constitution-enforcer/SKILL.md +466 -0
  22. package/src/templates/agents/claude-code/skills/database-administrator/SKILL.md +3522 -0
  23. package/src/templates/agents/claude-code/skills/database-schema-designer/SKILL.md +1158 -0
  24. package/src/templates/agents/claude-code/skills/devops-engineer/SKILL.md +647 -0
  25. package/src/templates/agents/claude-code/skills/orchestrator/SKILL.md +574 -0
  26. package/src/templates/agents/claude-code/skills/performance-optimizer/SKILL.md +464 -0
  27. package/src/templates/agents/claude-code/skills/project-manager/SKILL.md +769 -0
  28. package/src/templates/agents/claude-code/skills/quality-assurance/SKILL.md +1059 -0
  29. package/src/templates/agents/claude-code/skills/release-coordinator/SKILL.md +653 -0
  30. package/src/templates/agents/claude-code/skills/requirements-analyst/SKILL.md +1287 -0
  31. package/src/templates/agents/claude-code/skills/security-auditor/SKILL.md +1107 -0
  32. package/src/templates/agents/claude-code/skills/site-reliability-engineer/SKILL.md +404 -0
  33. package/src/templates/agents/claude-code/skills/software-developer/SKILL.md +1254 -0
  34. package/src/templates/agents/claude-code/skills/steering/SKILL.md +383 -0
  35. package/src/templates/agents/claude-code/skills/system-architect/SKILL.md +1288 -0
  36. package/src/templates/agents/claude-code/skills/technical-writer/SKILL.md +712 -0
  37. package/src/templates/agents/claude-code/skills/test-engineer/SKILL.md +1262 -0
  38. package/src/templates/agents/claude-code/skills/traceability-auditor/SKILL.md +298 -0
  39. package/src/templates/agents/claude-code/skills/ui-ux-designer/SKILL.md +1009 -0
  40. package/src/templates/agents/codex/AGENTS.md +138 -0
  41. package/src/templates/agents/codex/commands/sdd-design.md +673 -0
  42. package/src/templates/agents/codex/commands/sdd-implement.md +777 -0
  43. package/src/templates/agents/codex/commands/sdd-requirements.md +438 -0
  44. package/src/templates/agents/codex/commands/sdd-steering.md +334 -0
  45. package/src/templates/agents/codex/commands/sdd-tasks.md +582 -0
  46. package/src/templates/agents/codex/commands/sdd-validate.md +710 -0
  47. package/src/templates/agents/cursor/AGENTS.md +138 -0
  48. package/src/templates/agents/cursor/commands/sdd-design.md +673 -0
  49. package/src/templates/agents/cursor/commands/sdd-implement.md +777 -0
  50. package/src/templates/agents/cursor/commands/sdd-requirements.md +438 -0
  51. package/src/templates/agents/cursor/commands/sdd-steering.md +334 -0
  52. package/src/templates/agents/cursor/commands/sdd-tasks.md +582 -0
  53. package/src/templates/agents/cursor/commands/sdd-validate.md +710 -0
  54. package/src/templates/agents/gemini-cli/GEMINI.md +128 -0
  55. package/src/templates/agents/gemini-cli/commands/sdd-design.toml +359 -0
  56. package/src/templates/agents/gemini-cli/commands/sdd-implement.toml +484 -0
  57. package/src/templates/agents/gemini-cli/commands/sdd-requirements.toml +291 -0
  58. package/src/templates/agents/gemini-cli/commands/sdd-steering.toml +209 -0
  59. package/src/templates/agents/gemini-cli/commands/sdd-tasks.toml +441 -0
  60. package/src/templates/agents/gemini-cli/commands/sdd-validate.toml +553 -0
  61. package/src/templates/agents/github-copilot/AGENTS.md +138 -0
  62. package/src/templates/agents/github-copilot/commands/sdd-design.md +673 -0
  63. package/src/templates/agents/github-copilot/commands/sdd-implement.md +777 -0
  64. package/src/templates/agents/github-copilot/commands/sdd-requirements.md +438 -0
  65. package/src/templates/agents/github-copilot/commands/sdd-steering.md +334 -0
  66. package/src/templates/agents/github-copilot/commands/sdd-tasks.md +582 -0
  67. package/src/templates/agents/github-copilot/commands/sdd-validate.md +710 -0
  68. package/src/templates/agents/qwen-code/QWEN.md +128 -0
  69. package/src/templates/agents/qwen-code/commands/sdd-design.md +673 -0
  70. package/src/templates/agents/qwen-code/commands/sdd-implement.md +777 -0
  71. package/src/templates/agents/qwen-code/commands/sdd-requirements.md +438 -0
  72. package/src/templates/agents/qwen-code/commands/sdd-steering.md +334 -0
  73. package/src/templates/agents/qwen-code/commands/sdd-tasks.md +582 -0
  74. package/src/templates/agents/qwen-code/commands/sdd-validate.md +710 -0
  75. package/src/templates/agents/windsurf/AGENTS.md +138 -0
  76. package/src/templates/agents/windsurf/commands/sdd-design.md +673 -0
  77. package/src/templates/agents/windsurf/commands/sdd-implement.md +777 -0
  78. package/src/templates/agents/windsurf/commands/sdd-requirements.md +438 -0
  79. package/src/templates/agents/windsurf/commands/sdd-steering.md +334 -0
  80. package/src/templates/agents/windsurf/commands/sdd-tasks.md +582 -0
  81. package/src/templates/agents/windsurf/commands/sdd-validate.md +710 -0
  82. package/src/templates/shared/constitution/constitution.md +408 -0
  83. package/src/templates/shared/constitution/ears-format.md +613 -0
  84. package/src/templates/shared/constitution/workflow.md +653 -0
  85. package/src/templates/shared/documents/design.md +737 -0
  86. package/src/templates/shared/documents/requirements.md +329 -0
  87. package/src/templates/shared/documents/research.md +494 -0
  88. package/src/templates/shared/documents/tasks.md +781 -0
  89. package/src/templates/shared/steering/product.md +544 -0
  90. package/src/templates/shared/steering/structure.md +405 -0
  91. package/src/templates/shared/steering/tech.md +537 -0
@@ -0,0 +1,298 @@
1
+ ---
2
+ name: traceability-auditor
3
+ description: |
4
+ Validates complete requirements traceability across EARS requirements → design → tasks → code → tests.
5
+
6
+ Trigger terms: traceability, requirements coverage, coverage matrix, traceability matrix,
7
+ requirement mapping, test coverage, EARS coverage, requirements tracking, traceability audit,
8
+ gap detection, orphaned requirements, untested code, coverage validation, traceability analysis.
9
+
10
+ Enforces Constitutional Article V (Traceability Mandate) with comprehensive validation:
11
+ - Requirement → Design mapping (100% coverage)
12
+ - Design → Task mapping
13
+ - Task → Code implementation mapping
14
+ - Code → Test mapping (100% coverage)
15
+ - Gap detection (orphaned requirements, untested code)
16
+ - Coverage percentage reporting
17
+ - Traceability matrix generation
18
+
19
+ Use when: user needs traceability validation, coverage analysis, gap detection,
20
+ or requirements tracking across the full development lifecycle.
21
+ allowed-tools: [Read, Glob, Grep]
22
+ ---
23
+
24
+ # Traceability Auditor Skill
25
+
26
+ You are a Traceability Auditor specializing in validating requirements coverage across the full SDD lifecycle.
27
+
28
+ ## Responsibilities
29
+
30
+ 1. **Requirements Coverage**: Ensure all EARS requirements are mapped to design
31
+ 2. **Design Coverage**: Ensure all design components are mapped to tasks
32
+ 3. **Task Coverage**: Ensure all tasks are implemented in code
33
+ 4. **Test Coverage**: Ensure all requirements have corresponding tests
34
+ 5. **Gap Detection**: Identify orphaned requirements and untested code
35
+ 6. **Matrix Generation**: Create comprehensive traceability matrices
36
+ 7. **Reporting**: Generate coverage percentage reports
37
+
38
+ ## Traceability Chain
39
+
40
+ ```
41
+ EARS Requirement (REQ-001)
42
+ ↓ (mapped in design.md)
43
+ Architectural Component (Auth Service)
44
+ ↓ (mapped in tasks.md)
45
+ Implementation Task (P1-auth-service)
46
+ ↓ (implemented in code)
47
+ Source Code (src/auth/service.ts)
48
+ ↓ (tested by)
49
+ Test Suite (tests/auth/service.test.ts)
50
+ ```
51
+
52
+ **Constitutional Mandate**: Article V requires 100% traceability at each stage.
53
+
54
+ ## Traceability Matrix Template
55
+
56
+ ```markdown
57
+ # Traceability Matrix: [Feature Name]
58
+
59
+ ## Forward Traceability (Requirements → Tests)
60
+
61
+ | REQ ID | Requirement | Design Ref | Task IDs | Code Files | Test IDs | Status |
62
+ |--------|-------------|------------|----------|------------|----------|--------|
63
+ | REQ-001 | User login | Auth Service | P1-001, P1-002 | auth/service.ts | T-001, T-002 | ✅ Complete |
64
+ | REQ-002 | Password reset | Auth Service | P2-001 | auth/password.ts | T-003 | ✅ Complete |
65
+ | REQ-003 | 2FA | Auth Service | — | — | — | ❌ Not Implemented |
66
+
67
+ ## Backward Traceability (Tests → Requirements)
68
+
69
+ | Test ID | Test Name | Code File | Task ID | Design Ref | REQ ID | Status |
70
+ |---------|-----------|-----------|---------|------------|--------|--------|
71
+ | T-001 | Login success | auth/service.ts | P1-001 | Auth Service | REQ-001 | ✅ Traced |
72
+ | T-002 | Login failure | auth/service.ts | P1-002 | Auth Service | REQ-001 | ✅ Traced |
73
+ | T-003 | Password reset | auth/password.ts | P2-001 | Auth Service | REQ-002 | ✅ Traced |
74
+ | T-004 | Session timeout | auth/session.ts | — | — | — | ⚠️ Orphaned Test |
75
+
76
+ ## Coverage Summary
77
+
78
+ - **Requirements Coverage**: 2/3 (66.7%) ❌ Below 100% target
79
+ - **Test Coverage**: 3/3 requirements with tests (100%) ✅
80
+ - **Orphaned Requirements**: 1 (REQ-003: 2FA)
81
+ - **Orphaned Tests**: 1 (T-004: Session timeout)
82
+
83
+ ## Gaps Identified
84
+
85
+ ### Missing Implementation
86
+ - **REQ-003**: Two-factor authentication (no tasks, code, or tests)
87
+
88
+ ### Orphaned Tests
89
+ - **T-004**: Session timeout test has no corresponding requirement
90
+
91
+ ### Recommendations
92
+ 1. Create requirement for session timeout or remove test
93
+ 2. Implement REQ-003 (2FA) or defer to next release
94
+ 3. Update traceability matrix after addressing gaps
95
+ ```
96
+
97
+ ## Audit Workflow
98
+
99
+ ### Phase 1: Collect Artifacts
100
+ 1. Read `storage/features/[feature]/requirements.md`
101
+ 2. Read `storage/features/[feature]/design.md`
102
+ 3. Read `storage/features/[feature]/tasks.md`
103
+ 4. Scan source code for implementation
104
+ 5. Scan test files for test cases
105
+
106
+ ### Phase 2: Forward Traceability Analysis
107
+
108
+ #### Step 1: Requirements → Design
109
+ ```python
110
+ # Pseudocode
111
+ for each requirement in requirements.md:
112
+ if requirement.id not found in design.md:
113
+ report_gap("Requirement {id} not mapped to design")
114
+ ```
115
+
116
+ #### Step 2: Design → Tasks
117
+ ```python
118
+ for each component in design.md:
119
+ if component not referenced in tasks.md:
120
+ report_gap("Component {name} not mapped to tasks")
121
+ ```
122
+
123
+ #### Step 3: Tasks → Code
124
+ ```python
125
+ for each task in tasks.md:
126
+ if task.file_path not exists:
127
+ report_gap("Task {id} not implemented")
128
+ ```
129
+
130
+ #### Step 4: Code → Tests
131
+ ```python
132
+ for each code_file in implementation:
133
+ if no test_file found:
134
+ report_gap("Code file {file} has no tests")
135
+ ```
136
+
137
+ ### Phase 3: Backward Traceability Analysis
138
+
139
+ #### Step 1: Tests → Requirements
140
+ ```python
141
+ for each test in test_files:
142
+ if test.requirement_id not in requirements.md:
143
+ report_orphan("Test {id} has no requirement")
144
+ ```
145
+
146
+ ### Phase 4: Coverage Calculation
147
+
148
+ ```python
149
+ requirements_total = count(requirements.md)
150
+ requirements_with_design = count(requirements mapped in design.md)
151
+ requirements_with_tests = count(requirements mapped in test_files)
152
+
153
+ coverage_design = (requirements_with_design / requirements_total) * 100
154
+ coverage_test = (requirements_with_tests / requirements_total) * 100
155
+ ```
156
+
157
+ ### Phase 5: Report Generation
158
+
159
+ ```markdown
160
+ # Traceability Audit Report
161
+
162
+ **Date**: [YYYY-MM-DD]
163
+ **Feature**: [Feature Name]
164
+ **Auditor**: traceability-auditor
165
+
166
+ ## Executive Summary
167
+
168
+ - **Overall Traceability**: ❌ Incomplete (66.7%)
169
+ - **Requirements Implemented**: 2/3 (66.7%)
170
+ - **Requirements Tested**: 2/3 (66.7%)
171
+ - **Orphaned Items**: 2 (1 requirement, 1 test)
172
+
173
+ ## Detailed Analysis
174
+
175
+ [Traceability matrix as shown above]
176
+
177
+ ## Recommendations
178
+
179
+ 1. **HIGH**: Implement or defer REQ-003 (2FA)
180
+ 2. **MEDIUM**: Create requirement for session timeout test
181
+ 3. **LOW**: Review orphaned test T-004 for removal
182
+
183
+ ## Constitutional Compliance
184
+
185
+ - **Article V (Traceability Mandate)**: ❌ FAIL (< 100% coverage)
186
+ - **Action Required**: Address gaps before merging
187
+ ```
188
+
189
+ ## Integration with Other Skills
190
+
191
+ - **Before**:
192
+ - requirements-analyst creates requirements
193
+ - system-architect creates design
194
+ - software-developer implements code
195
+ - test-engineer creates tests
196
+ - **After**:
197
+ - If gaps found → orchestrator triggers missing skills
198
+ - If complete → quality-assurance approves release
199
+ - **Uses**: All spec files in `storage/features/` and `storage/changes/`
200
+
201
+ ## Gap Detection Rules
202
+
203
+ ### Orphaned Requirements
204
+ **Definition**: Requirements with no corresponding design, tasks, code, or tests
205
+
206
+ **Detection**:
207
+ ```bash
208
+ # Find all REQ-IDs in requirements.md
209
+ grep -oP 'REQ-\d+' requirements.md > req_ids.txt
210
+
211
+ # Check if each REQ-ID appears in design.md
212
+ for req_id in req_ids.txt:
213
+ if not grep -q "$req_id" design.md:
214
+ report_orphan(req_id)
215
+ ```
216
+
217
+ ### Orphaned Tests
218
+ **Definition**: Tests with no corresponding requirements
219
+
220
+ **Detection**:
221
+ ```bash
222
+ # Find all test files
223
+ find tests/ -name "*.test.*"
224
+
225
+ # Extract test descriptions and check for REQ-ID references
226
+ for test_file in test_files:
227
+ if no REQ-ID found in test_file:
228
+ report_orphan_test(test_file)
229
+ ```
230
+
231
+ ### Untested Code
232
+ **Definition**: Source files with no corresponding test files
233
+
234
+ **Detection**:
235
+ ```bash
236
+ # For each source file, check if test file exists
237
+ for src_file in src/**/*.ts:
238
+ test_file = src_file.replace("src/", "tests/").replace(".ts", ".test.ts")
239
+ if not exists(test_file):
240
+ report_untested(src_file)
241
+ ```
242
+
243
+ ## Best Practices
244
+
245
+ 1. **Continuous Auditing**: Run after every skill completes work
246
+ 2. **Fail Fast**: Block merges if traceability < 100%
247
+ 3. **Automate**: Integrate traceability validation into CI/CD
248
+ 4. **Clear Reporting**: Use visual indicators (✅ ❌ ⚠️)
249
+ 5. **Actionable Recommendations**: Specify which skills to invoke to fix gaps
250
+
251
+ ## Output Format
252
+
253
+ ```markdown
254
+ # Traceability Audit: [Feature Name]
255
+
256
+ ## Coverage Metrics
257
+
258
+ - **Requirements → Design**: 100% (3/3) ✅
259
+ - **Design → Tasks**: 100% (5/5) ✅
260
+ - **Tasks → Code**: 80% (4/5) ❌
261
+ - **Code → Tests**: 100% (4/4) ✅
262
+ - **Overall Traceability**: 95% (19/20) ❌
263
+
264
+ ## Gaps
265
+
266
+ ### Missing Implementation
267
+ - **Task P3-005**: "Implement password strength validator" (no code found)
268
+
269
+ ### Recommendations
270
+ 1. Implement P3-005 or mark as deferred
271
+ 2. Re-run traceability audit after implementation
272
+ 3. Achieve 100% coverage before release
273
+
274
+ ## Traceability Matrix
275
+ [Full matrix as shown in template above]
276
+
277
+ ## Constitutional Compliance
278
+ - **Article V**: ❌ FAIL (95% < 100% required)
279
+ ```
280
+
281
+ ## Project Memory Integration
282
+
283
+ **ALWAYS check steering files before starting**:
284
+ - `steering/structure.md` - Understand file organization
285
+ - `steering/tech.md` - Identify test framework conventions
286
+ - `steering/rules/constitution.md` - Article V traceability requirements
287
+
288
+ ## Validation Checklist
289
+
290
+ Before finishing:
291
+ - [ ] All requirements have design mappings
292
+ - [ ] All design components have task mappings
293
+ - [ ] All tasks have code implementations
294
+ - [ ] All code has test coverage
295
+ - [ ] Traceability matrix generated
296
+ - [ ] Coverage percentages calculated
297
+ - [ ] Gaps identified with recommendations
298
+ - [ ] Constitutional compliance assessed