musubi-sdd 6.2.2 → 6.3.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.ja.md +3 -3
- package/README.md +3 -3
- package/bin/musubi-dashboard.js +22 -13
- package/bin/musubi-design.js +3 -3
- package/bin/musubi-gaps.js +9 -9
- package/bin/musubi-init.js +14 -1310
- package/bin/musubi-requirements.js +1 -1
- package/bin/musubi-tasks.js +5 -5
- package/bin/musubi-trace.js +23 -23
- package/bin/musubi-upgrade.js +7 -2
- package/bin/musubi.js +1 -1
- package/package.json +2 -2
- package/src/analyzers/gap-detector.js +3 -3
- package/src/analyzers/traceability.js +17 -17
- package/src/cli/dashboard-cli.js +54 -60
- package/src/cli/init-generators.js +464 -0
- package/src/cli/init-helpers.js +884 -0
- package/src/constitutional/checker.js +67 -65
- package/src/constitutional/ci-reporter.js +50 -43
- package/src/constitutional/index.js +2 -2
- package/src/constitutional/phase-minus-one.js +22 -25
- package/src/constitutional/steering-sync.js +28 -39
- package/src/dashboard/index.js +2 -2
- package/src/dashboard/sprint-planner.js +17 -19
- package/src/dashboard/sprint-reporter.js +46 -37
- package/src/dashboard/transition-recorder.js +12 -18
- package/src/dashboard/workflow-dashboard.js +27 -38
- package/src/enterprise/error-recovery.js +109 -49
- package/src/enterprise/experiment-report.js +62 -36
- package/src/enterprise/index.js +5 -5
- package/src/enterprise/rollback-manager.js +28 -29
- package/src/enterprise/tech-article.js +41 -35
- package/src/generators/design.js +3 -3
- package/src/generators/requirements.js +5 -3
- package/src/generators/tasks.js +2 -2
- package/src/integrations/platforms.js +1 -1
- package/src/templates/agents/claude-code/CLAUDE.md +1 -1
- package/src/templates/agents/claude-code/skills/design-reviewer/SKILL.md +132 -113
- package/src/templates/agents/claude-code/skills/requirements-reviewer/SKILL.md +85 -56
- package/src/templates/agents/codex/AGENTS.md +2 -2
- package/src/templates/agents/cursor/AGENTS.md +2 -2
- package/src/templates/agents/gemini-cli/GEMINI.md +2 -2
- package/src/templates/agents/github-copilot/AGENTS.md +2 -2
- package/src/templates/agents/github-copilot/commands/sdd-requirements.prompt.md +23 -4
- package/src/templates/agents/qwen-code/QWEN.md +2 -2
- package/src/templates/agents/shared/AGENTS.md +1 -1
- package/src/templates/agents/windsurf/AGENTS.md +2 -2
- package/src/templates/skills/browser-agent.md +1 -1
- package/src/traceability/extractor.js +21 -20
- package/src/traceability/gap-detector.js +19 -17
- package/src/traceability/index.js +2 -2
- package/src/traceability/matrix-storage.js +20 -22
- package/src/validators/constitution.js +5 -2
- package/src/validators/critic-system.js +6 -6
- package/src/validators/traceability-validator.js +3 -3
|
@@ -161,13 +161,13 @@ Fagan Inspection is a formal, structured review process designed to identify def
|
|
|
161
161
|
|
|
162
162
|
#### 4.1.2 Inspection Roles
|
|
163
163
|
|
|
164
|
-
| Role
|
|
165
|
-
|
|
164
|
+
| Role | Responsibility |
|
|
165
|
+
| ------------- | ----------------------------------------------------------------- |
|
|
166
166
|
| **Moderator** | Facilitates inspection, ensures process is followed, manages time |
|
|
167
|
-
| **Author**
|
|
168
|
-
| **Reader**
|
|
169
|
-
| **Recorder**
|
|
170
|
-
| **Inspector** | Reviews document, identifies defects
|
|
167
|
+
| **Author** | Created the document, answers questions, performs rework |
|
|
168
|
+
| **Reader** | Paraphrases requirements during meeting |
|
|
169
|
+
| **Recorder** | Documents all defects, issues, and decisions |
|
|
170
|
+
| **Inspector** | Reviews document, identifies defects |
|
|
171
171
|
|
|
172
172
|
### 4.2 Perspective-Based Reading (PBR)
|
|
173
173
|
|
|
@@ -279,14 +279,14 @@ PBR assigns specific perspectives to reviewers to ensure comprehensive coverage.
|
|
|
279
279
|
|
|
280
280
|
### 5.1 Defect Types
|
|
281
281
|
|
|
282
|
-
| Type
|
|
283
|
-
|
|
284
|
-
| **Missing**
|
|
285
|
-
| **Incorrect**
|
|
286
|
-
| **Ambiguous**
|
|
287
|
-
| **Conflicting** | Contradicts another requirement
|
|
288
|
-
| **Redundant**
|
|
289
|
-
| **Untestable**
|
|
282
|
+
| Type | Description | Example |
|
|
283
|
+
| --------------- | -------------------------------------------- | ----------------------------------- |
|
|
284
|
+
| **Missing** | Required information is absent | No error handling specified |
|
|
285
|
+
| **Incorrect** | Information is factually wrong | Contradicts business rules |
|
|
286
|
+
| **Ambiguous** | Information can be interpreted multiple ways | "System shall respond quickly" |
|
|
287
|
+
| **Conflicting** | Contradicts another requirement | REQ-001 vs REQ-023 |
|
|
288
|
+
| **Redundant** | Unnecessarily duplicated | Same requirement in multiple places |
|
|
289
|
+
| **Untestable** | Cannot be verified | "System shall be user-friendly" |
|
|
290
290
|
|
|
291
291
|
### 5.2 Severity Levels
|
|
292
292
|
|
|
@@ -335,6 +335,7 @@ PBR assigns specific perspectives to reviewers to ensure comprehensive coverage.
|
|
|
335
335
|
When reviewing EARS-formatted requirements:
|
|
336
336
|
|
|
337
337
|
### 6.1 Ubiquitous Requirements
|
|
338
|
+
|
|
338
339
|
```
|
|
339
340
|
Pattern: "The <system> shall <action>."
|
|
340
341
|
Checklist:
|
|
@@ -345,6 +346,7 @@ Checklist:
|
|
|
345
346
|
```
|
|
346
347
|
|
|
347
348
|
### 6.2 Event-Driven Requirements
|
|
349
|
+
|
|
348
350
|
```
|
|
349
351
|
Pattern: "When <trigger>, the <system> shall <action>."
|
|
350
352
|
Checklist:
|
|
@@ -355,6 +357,7 @@ Checklist:
|
|
|
355
357
|
```
|
|
356
358
|
|
|
357
359
|
### 6.3 State-Driven Requirements
|
|
360
|
+
|
|
358
361
|
```
|
|
359
362
|
Pattern: "While <state>, the <system> shall <action>."
|
|
360
363
|
Checklist:
|
|
@@ -365,6 +368,7 @@ Checklist:
|
|
|
365
368
|
```
|
|
366
369
|
|
|
367
370
|
### 6.4 Unwanted Behavior Requirements
|
|
371
|
+
|
|
368
372
|
```
|
|
369
373
|
Pattern: "If <condition>, then the <system> shall <action>."
|
|
370
374
|
Checklist:
|
|
@@ -375,6 +379,7 @@ Checklist:
|
|
|
375
379
|
```
|
|
376
380
|
|
|
377
381
|
### 6.5 Optional Feature Requirements
|
|
382
|
+
|
|
378
383
|
```
|
|
379
384
|
Pattern: "Where <feature enabled>, the <system> shall <action>."
|
|
380
385
|
Checklist:
|
|
@@ -469,6 +474,7 @@ d) 修正済みドキュメント出力
|
|
|
469
474
|
# Requirements Review - Defect Log
|
|
470
475
|
|
|
471
476
|
## Document Information
|
|
477
|
+
|
|
472
478
|
- **Document**: [Document Name]
|
|
473
479
|
- **Version**: [Version]
|
|
474
480
|
- **Review Date**: [Date]
|
|
@@ -478,7 +484,7 @@ d) 修正済みドキュメント出力
|
|
|
478
484
|
## Defect Summary
|
|
479
485
|
|
|
480
486
|
| Severity | Count | Resolved | Remaining |
|
|
481
|
-
|
|
487
|
+
| -------- | ----- | -------- | --------- |
|
|
482
488
|
| Critical | X | X | X |
|
|
483
489
|
| Major | X | X | X |
|
|
484
490
|
| Minor | X | X | X |
|
|
@@ -487,6 +493,7 @@ d) 修正済みドキュメント出力
|
|
|
487
493
|
## Detailed Defects
|
|
488
494
|
|
|
489
495
|
### DEF-001: [Title]
|
|
496
|
+
|
|
490
497
|
- **Requirement ID**: REQ-XXX
|
|
491
498
|
- **Section**: X.X.X
|
|
492
499
|
- **Severity**: Critical/Major/Minor
|
|
@@ -498,6 +505,7 @@ d) 修正済みドキュメント出力
|
|
|
498
505
|
- **Status**: Open/Resolved
|
|
499
506
|
|
|
500
507
|
### DEF-002: [Title]
|
|
508
|
+
|
|
501
509
|
...
|
|
502
510
|
```
|
|
503
511
|
|
|
@@ -507,6 +515,7 @@ d) 修正済みドキュメント出力
|
|
|
507
515
|
# Perspective-Based Requirements Review Report
|
|
508
516
|
|
|
509
517
|
## Document: [Name]
|
|
518
|
+
|
|
510
519
|
## Review Date: [Date]
|
|
511
520
|
|
|
512
521
|
---
|
|
@@ -514,11 +523,13 @@ d) 修正済みドキュメント出力
|
|
|
514
523
|
## 👤 User Perspective Review
|
|
515
524
|
|
|
516
525
|
### Findings
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
|
526
|
+
|
|
527
|
+
| ID | Issue | Severity | Recommendation |
|
|
528
|
+
| --- | ----- | -------- | -------------- |
|
|
529
|
+
| U-1 | ... | ... | ... |
|
|
520
530
|
|
|
521
531
|
### Coverage Assessment
|
|
532
|
+
|
|
522
533
|
- User scenarios: X% covered
|
|
523
534
|
- User tasks: X% complete
|
|
524
535
|
- Error handling from user view: X/X items
|
|
@@ -528,11 +539,13 @@ d) 修正済みドキュメント出力
|
|
|
528
539
|
## 💻 Developer Perspective Review
|
|
529
540
|
|
|
530
541
|
### Findings
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
|
542
|
+
|
|
543
|
+
| ID | Issue | Severity | Recommendation |
|
|
544
|
+
| --- | ----- | -------- | -------------- |
|
|
545
|
+
| D-1 | ... | ... | ... |
|
|
534
546
|
|
|
535
547
|
### Technical Feasibility
|
|
548
|
+
|
|
536
549
|
- Implementation clarity: X/10
|
|
537
550
|
- Edge cases specified: X%
|
|
538
551
|
- API specifications: Complete/Partial/Missing
|
|
@@ -542,11 +555,13 @@ d) 修正済みドキュメント出力
|
|
|
542
555
|
## 🧪 Tester Perspective Review
|
|
543
556
|
|
|
544
557
|
### Findings
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
|
558
|
+
|
|
559
|
+
| ID | Issue | Severity | Recommendation |
|
|
560
|
+
| --- | ----- | -------- | -------------- |
|
|
561
|
+
| T-1 | ... | ... | ... |
|
|
548
562
|
|
|
549
563
|
### Testability Assessment
|
|
564
|
+
|
|
550
565
|
- Testable requirements: X%
|
|
551
566
|
- Acceptance criteria quality: X/10
|
|
552
567
|
- Test derivability: High/Medium/Low
|
|
@@ -556,11 +571,13 @@ d) 修正済みドキュメント出力
|
|
|
556
571
|
## 🏗️ Architect Perspective Review
|
|
557
572
|
|
|
558
573
|
### Findings
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
|
574
|
+
|
|
575
|
+
| ID | Issue | Severity | Recommendation |
|
|
576
|
+
| --- | ----- | -------- | -------------- |
|
|
577
|
+
| A-1 | ... | ... | ... |
|
|
562
578
|
|
|
563
579
|
### Architectural Alignment
|
|
580
|
+
|
|
564
581
|
- System boundary clarity: X/10
|
|
565
582
|
- NFR completeness: X%
|
|
566
583
|
- Integration requirements: Complete/Partial/Missing
|
|
@@ -570,11 +587,13 @@ d) 修正済みドキュメント出力
|
|
|
570
587
|
## 🔒 Security Perspective Review
|
|
571
588
|
|
|
572
589
|
### Findings
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
|
590
|
+
|
|
591
|
+
| ID | Issue | Severity | Recommendation |
|
|
592
|
+
| --- | ----- | -------- | -------------- |
|
|
593
|
+
| S-1 | ... | ... | ... |
|
|
576
594
|
|
|
577
595
|
### Security Assessment
|
|
596
|
+
|
|
578
597
|
- Authentication requirements: Complete/Partial/Missing
|
|
579
598
|
- Authorization requirements: Complete/Partial/Missing
|
|
580
599
|
- Data protection: Adequate/Insufficient
|
|
@@ -587,12 +606,14 @@ d) 修正済みドキュメント出力
|
|
|
587
606
|
# Requirements Review Metrics
|
|
588
607
|
|
|
589
608
|
## Process Metrics
|
|
609
|
+
|
|
590
610
|
- **Preparation Time**: X hours
|
|
591
611
|
- **Meeting Time**: X hours
|
|
592
612
|
- **Documents Reviewed**: X pages/sections
|
|
593
613
|
- **Review Rate**: X requirements/hour
|
|
594
614
|
|
|
595
615
|
## Defect Metrics
|
|
616
|
+
|
|
596
617
|
- **Total Defects Found**: X
|
|
597
618
|
- **Defect Density**: X defects/requirement
|
|
598
619
|
- **Defect Distribution**:
|
|
@@ -604,6 +625,7 @@ d) 修正済みドキュメント出力
|
|
|
604
625
|
- Untestable: X%
|
|
605
626
|
|
|
606
627
|
## Perspective Coverage
|
|
628
|
+
|
|
607
629
|
- User: X%
|
|
608
630
|
- Developer: X%
|
|
609
631
|
- Tester: X%
|
|
@@ -611,6 +633,7 @@ d) 修正済みドキュメント出力
|
|
|
611
633
|
- Security: X%
|
|
612
634
|
|
|
613
635
|
## Quality Gate Result
|
|
636
|
+
|
|
614
637
|
- [ ] All Critical defects resolved
|
|
615
638
|
- [ ] Major defects < threshold (X%)
|
|
616
639
|
- [ ] Testability score ≥ X
|
|
@@ -669,7 +692,7 @@ stages:
|
|
|
669
692
|
requirements:
|
|
670
693
|
skills: [requirements-analyst]
|
|
671
694
|
quality-gate: requirements-review
|
|
672
|
-
|
|
695
|
+
|
|
673
696
|
requirements-review:
|
|
674
697
|
skills: [requirements-reviewer]
|
|
675
698
|
criteria:
|
|
@@ -830,14 +853,16 @@ Requirements Reviewer AIはレビュー結果をユーザーに提示し、ユ
|
|
|
830
853
|
## 📋 Requirements Review Results
|
|
831
854
|
|
|
832
855
|
### Summary
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
|
836
|
-
|
|
|
837
|
-
|
|
|
838
|
-
|
|
|
856
|
+
|
|
857
|
+
| Severity | Count | Status |
|
|
858
|
+
| ------------- | ----- | ------------------------ |
|
|
859
|
+
| 🔴 Critical | 2 | Must fix before design |
|
|
860
|
+
| 🟠 Major | 5 | Should fix before design |
|
|
861
|
+
| 🟡 Minor | 3 | Should fix, can proceed |
|
|
862
|
+
| 🟢 Suggestion | 4 | Consider for improvement |
|
|
839
863
|
|
|
840
864
|
### Quality Gate: ❌ FAILED
|
|
865
|
+
|
|
841
866
|
- Critical issues must be resolved before proceeding
|
|
842
867
|
|
|
843
868
|
---
|
|
@@ -845,20 +870,24 @@ Requirements Reviewer AIはレビュー結果をユーザーに提示し、ユ
|
|
|
845
870
|
### 🔴 Critical Issues
|
|
846
871
|
|
|
847
872
|
#### DEF-001: Missing Performance Requirement
|
|
873
|
+
|
|
848
874
|
**Location**: Section 3.2, Line 45
|
|
849
875
|
**Type**: Missing
|
|
850
876
|
**Requirement**: REQ-FUNC-012
|
|
851
877
|
|
|
852
878
|
**Current Text:**
|
|
879
|
+
|
|
853
880
|
> "The system shall process user requests."
|
|
854
881
|
|
|
855
882
|
**Issue:**
|
|
856
883
|
Performance criteria not specified. Cannot verify implementation meets expectations.
|
|
857
884
|
|
|
858
885
|
**Recommendation:**
|
|
886
|
+
|
|
859
887
|
> "The system shall process user requests within 500ms for 95th percentile under normal load (up to 500 concurrent users)."
|
|
860
888
|
|
|
861
889
|
**Your Decision:**
|
|
890
|
+
|
|
862
891
|
- [ ] Accept recommendation
|
|
863
892
|
- [ ] Modify (specify your changes)
|
|
864
893
|
- [ ] Reject (provide reason)
|
|
@@ -943,27 +972,27 @@ console.log(correctionResult.updatedQualityGate);
|
|
|
943
972
|
|
|
944
973
|
### Changes Applied
|
|
945
974
|
|
|
946
|
-
| Defect ID | Action
|
|
947
|
-
|
|
948
|
-
| DEF-001
|
|
949
|
-
| DEF-002
|
|
950
|
-
| DEF-004
|
|
975
|
+
| Defect ID | Action | Original | Corrected |
|
|
976
|
+
| --------- | -------- | ----------------------- | ------------------------- |
|
|
977
|
+
| DEF-001 | Accepted | "process user requests" | "process within 500ms..." |
|
|
978
|
+
| DEF-002 | Modified | "shall be fast" | "Custom: within 200ms..." |
|
|
979
|
+
| DEF-004 | Accepted | (missing) | Added REQ-SEC-015 |
|
|
951
980
|
|
|
952
981
|
### Rejected Findings
|
|
953
982
|
|
|
954
|
-
| Defect ID | Reason
|
|
955
|
-
|
|
956
|
-
| DEF-003
|
|
957
|
-
| DEF-005
|
|
983
|
+
| Defect ID | Reason |
|
|
984
|
+
| --------- | ----------------------------------- |
|
|
985
|
+
| DEF-003 | Intentionally vague for flexibility |
|
|
986
|
+
| DEF-005 | Will be addressed in Phase 2 |
|
|
958
987
|
|
|
959
988
|
### Updated Quality Gate
|
|
960
989
|
|
|
961
|
-
| Criterion
|
|
962
|
-
|
|
963
|
-
| Critical Issues
|
|
964
|
-
| Major Issues
|
|
965
|
-
| EARS Compliance
|
|
966
|
-
| Testability Score | 60%
|
|
990
|
+
| Criterion | Before | After |
|
|
991
|
+
| ----------------- | ------ | ----- |
|
|
992
|
+
| Critical Issues | 2 | 0 ✅ |
|
|
993
|
+
| Major Issues | 5 | 1 |
|
|
994
|
+
| EARS Compliance | 45% | 85% |
|
|
995
|
+
| Testability Score | 60% | 90% |
|
|
967
996
|
|
|
968
997
|
**Status**: ✅ PASSED (Ready for Design Phase)
|
|
969
998
|
|
|
@@ -991,7 +1020,7 @@ This skill ensures compliance with Article 3 (Quality Assurance) of the MUSUBI C
|
|
|
991
1020
|
|
|
992
1021
|
## Version History
|
|
993
1022
|
|
|
994
|
-
| Version | Date
|
|
995
|
-
|
|
996
|
-
| 1.0.0
|
|
997
|
-
| 1.1.0
|
|
1023
|
+
| Version | Date | Changes |
|
|
1024
|
+
| ------- | ---------- | ----------------------------------------------------- |
|
|
1025
|
+
| 1.0.0 | 2025-12-27 | Initial release with Fagan Inspection and PBR support |
|
|
1026
|
+
| 1.1.0 | 2025-12-27 | Added interactive review and correction workflow |
|
|
@@ -233,8 +233,8 @@ const analysis = await generator.analyze();
|
|
|
233
233
|
|
|
234
234
|
## Learn More
|
|
235
235
|
|
|
236
|
-
- [MUSUBI Documentation](https://github.com/nahisaho/
|
|
237
|
-
- [CLI Reference](https://github.com/nahisaho/
|
|
236
|
+
- [MUSUBI Documentation](https://github.com/nahisaho/MUSUBI)
|
|
237
|
+
- [CLI Reference](https://github.com/nahisaho/MUSUBI#cli-commands) - Detailed CLI options
|
|
238
238
|
- [Constitutional Governance](steering/rules/constitution.md)
|
|
239
239
|
- [8-Stage SDD Workflow](steering/rules/workflow.md)
|
|
240
240
|
|
|
@@ -233,8 +233,8 @@ const analysis = await generator.analyze();
|
|
|
233
233
|
|
|
234
234
|
## Learn More
|
|
235
235
|
|
|
236
|
-
- [MUSUBI Documentation](https://github.com/nahisaho/
|
|
237
|
-
- [CLI Reference](https://github.com/nahisaho/
|
|
236
|
+
- [MUSUBI Documentation](https://github.com/nahisaho/MUSUBI)
|
|
237
|
+
- [CLI Reference](https://github.com/nahisaho/MUSUBI#cli-commands) - Detailed CLI options
|
|
238
238
|
- [Constitutional Governance](steering/rules/constitution.md)
|
|
239
239
|
- [8-Stage SDD Workflow](steering/rules/workflow.md)
|
|
240
240
|
|
|
@@ -222,8 +222,8 @@ const analysis = await generator.analyze();
|
|
|
222
222
|
|
|
223
223
|
## Learn More
|
|
224
224
|
|
|
225
|
-
- [MUSUBI Documentation](https://github.com/nahisaho/
|
|
226
|
-
- [CLI Reference](https://github.com/nahisaho/
|
|
225
|
+
- [MUSUBI Documentation](https://github.com/nahisaho/MUSUBI)
|
|
226
|
+
- [CLI Reference](https://github.com/nahisaho/MUSUBI#cli-commands) - Detailed CLI options
|
|
227
227
|
- [Constitutional Governance](steering/rules/constitution.md)
|
|
228
228
|
- [8-Stage SDD Workflow](steering/rules/workflow.md)
|
|
229
229
|
|
|
@@ -277,8 +277,8 @@ npx musubi-gui start
|
|
|
277
277
|
|
|
278
278
|
## Learn More
|
|
279
279
|
|
|
280
|
-
- [MUSUBI Documentation](https://github.com/nahisaho/
|
|
281
|
-
- [CLI Reference](https://github.com/nahisaho/
|
|
280
|
+
- [MUSUBI Documentation](https://github.com/nahisaho/MUSUBI)
|
|
281
|
+
- [CLI Reference](https://github.com/nahisaho/MUSUBI#cli-commands) - Detailed CLI options
|
|
282
282
|
- [Constitutional Governance](steering/rules/constitution.md)
|
|
283
283
|
- [8-Stage SDD Workflow](steering/rules/workflow.md)
|
|
284
284
|
|
|
@@ -67,36 +67,47 @@ steering/tech.md # Technology stack
|
|
|
67
67
|
**Question Sequence** (Ask ONE at a time, wait for answer before next):
|
|
68
68
|
|
|
69
69
|
**Turn 1**: Start with the WHY question
|
|
70
|
+
|
|
70
71
|
```
|
|
71
72
|
この機能で解決したい『本当の課題』は何ですか?
|
|
72
73
|
```
|
|
74
|
+
|
|
73
75
|
→ STOP HERE. Wait for user response.
|
|
74
76
|
|
|
75
77
|
**Turn 2**: Based on answer, ask WHO question
|
|
78
|
+
|
|
76
79
|
```
|
|
77
80
|
この機能を最も必要としているのは誰ですか?
|
|
78
81
|
```
|
|
82
|
+
|
|
79
83
|
→ STOP HERE. Wait for user response.
|
|
80
84
|
|
|
81
85
|
**Turn 3**: Ask WHAT-IF question
|
|
86
|
+
|
|
82
87
|
```
|
|
83
88
|
もしこの機能が完璧に動作したら、何が変わりますか?
|
|
84
89
|
```
|
|
90
|
+
|
|
85
91
|
→ STOP HERE. Wait for user response.
|
|
86
92
|
|
|
87
93
|
**Turn 4**: Ask CONSTRAINT question
|
|
94
|
+
|
|
88
95
|
```
|
|
89
96
|
この機能で『絶対にやってはいけないこと』はありますか?
|
|
90
97
|
```
|
|
98
|
+
|
|
91
99
|
→ STOP HERE. Wait for user response.
|
|
92
100
|
|
|
93
101
|
**Turn 5**: Ask SUCCESS CRITERIA question
|
|
102
|
+
|
|
94
103
|
```
|
|
95
104
|
この機能が『成功した』と言えるのはどんな状態ですか?
|
|
96
105
|
```
|
|
106
|
+
|
|
97
107
|
→ STOP HERE. Wait for user response.
|
|
98
108
|
|
|
99
109
|
**After 5+ turns**: Summarize and confirm
|
|
110
|
+
|
|
100
111
|
```
|
|
101
112
|
ここまでの理解を確認させてください:
|
|
102
113
|
[Summary]
|
|
@@ -106,22 +117,25 @@ steering/tech.md # Technology stack
|
|
|
106
117
|
#### Example Dialogue Flow
|
|
107
118
|
|
|
108
119
|
**AI Turn 1**:
|
|
120
|
+
|
|
109
121
|
> まず、この機能について教えてください。
|
|
110
|
-
>
|
|
122
|
+
>
|
|
111
123
|
> **この機能で解決したい『本当の課題』は何ですか?**
|
|
112
124
|
|
|
113
125
|
**User**: "CSVから社員データをインポートしたい"
|
|
114
126
|
|
|
115
127
|
**AI Turn 2**:
|
|
128
|
+
|
|
116
129
|
> なるほど、社員データのCSVインポートですね。
|
|
117
|
-
>
|
|
130
|
+
>
|
|
118
131
|
> **このインポート機能を最も必要としているのは誰ですか?**(人事部?IT管理者?)
|
|
119
132
|
|
|
120
133
|
**User**: "人事部です"
|
|
121
134
|
|
|
122
135
|
**AI Turn 3**:
|
|
136
|
+
|
|
123
137
|
> 人事部の方が使うのですね。
|
|
124
|
-
>
|
|
138
|
+
>
|
|
125
139
|
> **もしこの機能が完璧に動作したら、人事部の業務はどう変わりますか?**
|
|
126
140
|
|
|
127
141
|
...(continues one question at a time)
|
|
@@ -167,6 +181,7 @@ steering/tech.md # Technology stack
|
|
|
167
181
|
| External | Any third-party APIs or services? |
|
|
168
182
|
|
|
169
183
|
**MECE Completeness Check**:
|
|
184
|
+
|
|
170
185
|
- [ ] All user types covered?
|
|
171
186
|
- [ ] All states (normal, edge, error) covered?
|
|
172
187
|
- [ ] All data flows covered?
|
|
@@ -226,18 +241,21 @@ Use template from `templates/requirements.md`:
|
|
|
226
241
|
## MECE Coverage Summary
|
|
227
242
|
|
|
228
243
|
### User Journey Coverage
|
|
244
|
+
|
|
229
245
|
- [ ] Before: Entry/Discovery
|
|
230
246
|
- [ ] During: Core Flow
|
|
231
247
|
- [ ] After: Completion
|
|
232
248
|
- [ ] Error: Exception Handling
|
|
233
249
|
|
|
234
250
|
### Data Lifecycle Coverage
|
|
251
|
+
|
|
235
252
|
- [ ] Create
|
|
236
253
|
- [ ] Read
|
|
237
254
|
- [ ] Update
|
|
238
255
|
- [ ] Delete
|
|
239
256
|
|
|
240
257
|
### Cross-Cutting Concerns
|
|
258
|
+
|
|
241
259
|
- [ ] Security
|
|
242
260
|
- [ ] Performance
|
|
243
261
|
- [ ] Reliability
|
|
@@ -587,7 +605,7 @@ Present summary to user:
|
|
|
587
605
|
- **表面的要求**: ユーザーがログインできること
|
|
588
606
|
- **真の目的**: SOC2準拠でセキュアな顧客データ保護
|
|
589
607
|
- **成功基準**: ログイン成功率99%以上、不正アクセスゼロ
|
|
590
|
-
|
|
608
|
+
この理解で正しいですか?」
|
|
591
609
|
|
|
592
610
|
3. **MECE Analysis**:
|
|
593
611
|
- User Journey: Login → Session → Logout → Error handling
|
|
@@ -690,6 +708,7 @@ If `storage/specs/{{feature-name}}-requirements.md` exists:
|
|
|
690
708
|
---
|
|
691
709
|
|
|
692
710
|
**Output Directory Summary**:
|
|
711
|
+
|
|
693
712
|
- Requirements documents: `storage/specs/{{feature-name}}-requirements.md`
|
|
694
713
|
- Japanese version: `storage/specs/{{feature-name}}-requirements.ja.md`
|
|
695
714
|
|
|
@@ -222,8 +222,8 @@ const analysis = await generator.analyze();
|
|
|
222
222
|
|
|
223
223
|
## Learn More
|
|
224
224
|
|
|
225
|
-
- [MUSUBI Documentation](https://github.com/nahisaho/
|
|
226
|
-
- [CLI Reference](https://github.com/nahisaho/
|
|
225
|
+
- [MUSUBI Documentation](https://github.com/nahisaho/MUSUBI)
|
|
226
|
+
- [CLI Reference](https://github.com/nahisaho/MUSUBI#cli-commands) - Detailed CLI options
|
|
227
227
|
- [Constitutional Governance](steering/rules/constitution.md)
|
|
228
228
|
- [8-Stage SDD Workflow](steering/rules/workflow.md)
|
|
229
229
|
|
|
@@ -233,8 +233,8 @@ const analysis = await generator.analyze();
|
|
|
233
233
|
|
|
234
234
|
## Learn More
|
|
235
235
|
|
|
236
|
-
- [MUSUBI Documentation](https://github.com/nahisaho/
|
|
237
|
-
- [CLI Reference](https://github.com/nahisaho/
|
|
236
|
+
- [MUSUBI Documentation](https://github.com/nahisaho/MUSUBI)
|
|
237
|
+
- [CLI Reference](https://github.com/nahisaho/MUSUBI#cli-commands) - Detailed CLI options
|
|
238
238
|
- [Constitutional Governance](steering/rules/constitution.md)
|
|
239
239
|
- [8-Stage SDD Workflow](steering/rules/workflow.md)
|
|
240
240
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TraceabilityExtractor Implementation
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Extracts requirement ID patterns from code, tests, commits, and documents.
|
|
5
|
-
*
|
|
5
|
+
*
|
|
6
6
|
* Requirement: IMP-6.2-004-01
|
|
7
7
|
* Design: Section 5.1
|
|
8
8
|
*/
|
|
@@ -18,10 +18,10 @@ const execAsync = promisify(exec);
|
|
|
18
18
|
* Requirement ID patterns
|
|
19
19
|
*/
|
|
20
20
|
const REQ_PATTERNS = [
|
|
21
|
-
/REQ-[A-Z0-9]+-\d{3}/g,
|
|
22
|
-
/IMP-\d+\.\d+-\d{3}(?:-\d{2})?/g,
|
|
23
|
-
/FEAT-\d{3}/g,
|
|
24
|
-
/TASK-\d{3}/g,
|
|
21
|
+
/REQ-[A-Z0-9]+-\d{3}/g, // REQ-XXX-NNN
|
|
22
|
+
/IMP-\d+\.\d+-\d{3}(?:-\d{2})?/g, // IMP-6.2-001 or IMP-6.2-001-01
|
|
23
|
+
/FEAT-\d{3}/g, // FEAT-001
|
|
24
|
+
/TASK-\d{3}/g, // TASK-001
|
|
25
25
|
];
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -34,12 +34,12 @@ const DEFAULT_CONFIG = {
|
|
|
34
34
|
includePatterns: ['*.js', '*.ts', '*.tsx', '*.jsx', '*.md'],
|
|
35
35
|
excludePatterns: ['node_modules/**', '*.test.js', '*.spec.js'],
|
|
36
36
|
scanCommits: false,
|
|
37
|
-
maxCommits: 100
|
|
37
|
+
maxCommits: 100,
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* TraceabilityExtractor
|
|
42
|
-
*
|
|
42
|
+
*
|
|
43
43
|
* Extracts requirement references from various sources.
|
|
44
44
|
*/
|
|
45
45
|
class TraceabilityExtractor {
|
|
@@ -60,7 +60,7 @@ class TraceabilityExtractor {
|
|
|
60
60
|
try {
|
|
61
61
|
await fs.access(filePath);
|
|
62
62
|
const content = await fs.readFile(filePath, 'utf-8');
|
|
63
|
-
|
|
63
|
+
|
|
64
64
|
return this.extractFromContent(content, filePath, sourceType);
|
|
65
65
|
} catch {
|
|
66
66
|
return [];
|
|
@@ -85,7 +85,7 @@ class TraceabilityExtractor {
|
|
|
85
85
|
for (const pattern of REQ_PATTERNS) {
|
|
86
86
|
// Reset regex state
|
|
87
87
|
pattern.lastIndex = 0;
|
|
88
|
-
|
|
88
|
+
|
|
89
89
|
let match;
|
|
90
90
|
while ((match = pattern.exec(line)) !== null) {
|
|
91
91
|
refs.push({
|
|
@@ -94,7 +94,7 @@ class TraceabilityExtractor {
|
|
|
94
94
|
filePath,
|
|
95
95
|
lineNumber: lineNum + 1,
|
|
96
96
|
context: line.trim().substring(0, 100),
|
|
97
|
-
foundAt: now
|
|
97
|
+
foundAt: now,
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
}
|
|
@@ -117,14 +117,17 @@ class TraceabilityExtractor {
|
|
|
117
117
|
`git log -${maxCommits} --format="%H|%s|%ad|%ae" --date=short`
|
|
118
118
|
);
|
|
119
119
|
|
|
120
|
-
const lines = stdout
|
|
120
|
+
const lines = stdout
|
|
121
|
+
.trim()
|
|
122
|
+
.split('\n')
|
|
123
|
+
.filter(l => l.length > 0);
|
|
121
124
|
|
|
122
125
|
for (const line of lines) {
|
|
123
126
|
const [hash, message] = line.split('|');
|
|
124
127
|
|
|
125
128
|
for (const pattern of REQ_PATTERNS) {
|
|
126
129
|
pattern.lastIndex = 0;
|
|
127
|
-
|
|
130
|
+
|
|
128
131
|
let match;
|
|
129
132
|
while ((match = pattern.exec(message)) !== null) {
|
|
130
133
|
refs.push({
|
|
@@ -133,7 +136,7 @@ class TraceabilityExtractor {
|
|
|
133
136
|
commitHash: hash,
|
|
134
137
|
commitMessage: message,
|
|
135
138
|
context: message,
|
|
136
|
-
foundAt: now
|
|
139
|
+
foundAt: now,
|
|
137
140
|
});
|
|
138
141
|
}
|
|
139
142
|
}
|
|
@@ -164,7 +167,7 @@ class TraceabilityExtractor {
|
|
|
164
167
|
if (stat.isDirectory()) {
|
|
165
168
|
// Skip excluded directories
|
|
166
169
|
if (this.isExcluded(entry)) continue;
|
|
167
|
-
|
|
170
|
+
|
|
168
171
|
const subRefs = await this.scanDirectory(fullPath, sourceType);
|
|
169
172
|
refs.push(...subRefs);
|
|
170
173
|
} else if (stat.isFile() && this.shouldInclude(entry)) {
|
|
@@ -263,7 +266,7 @@ class TraceabilityExtractor {
|
|
|
263
266
|
*/
|
|
264
267
|
isExcluded(name) {
|
|
265
268
|
const excludePatterns = this.config.excludePatterns || [];
|
|
266
|
-
|
|
269
|
+
|
|
267
270
|
for (const pattern of excludePatterns) {
|
|
268
271
|
if (pattern.includes('**')) {
|
|
269
272
|
// Glob pattern with directory
|
|
@@ -283,10 +286,8 @@ class TraceabilityExtractor {
|
|
|
283
286
|
*/
|
|
284
287
|
matchPattern(filename, pattern) {
|
|
285
288
|
// Convert glob pattern to regex
|
|
286
|
-
const regexPattern = pattern
|
|
287
|
-
|
|
288
|
-
.replace(/\*/g, '.*');
|
|
289
|
-
|
|
289
|
+
const regexPattern = pattern.replace(/\./g, '\\.').replace(/\*/g, '.*');
|
|
290
|
+
|
|
290
291
|
return new RegExp(`^${regexPattern}$`).test(filename);
|
|
291
292
|
}
|
|
292
293
|
}
|