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.
Files changed (55) hide show
  1. package/README.ja.md +3 -3
  2. package/README.md +3 -3
  3. package/bin/musubi-dashboard.js +22 -13
  4. package/bin/musubi-design.js +3 -3
  5. package/bin/musubi-gaps.js +9 -9
  6. package/bin/musubi-init.js +14 -1310
  7. package/bin/musubi-requirements.js +1 -1
  8. package/bin/musubi-tasks.js +5 -5
  9. package/bin/musubi-trace.js +23 -23
  10. package/bin/musubi-upgrade.js +7 -2
  11. package/bin/musubi.js +1 -1
  12. package/package.json +2 -2
  13. package/src/analyzers/gap-detector.js +3 -3
  14. package/src/analyzers/traceability.js +17 -17
  15. package/src/cli/dashboard-cli.js +54 -60
  16. package/src/cli/init-generators.js +464 -0
  17. package/src/cli/init-helpers.js +884 -0
  18. package/src/constitutional/checker.js +67 -65
  19. package/src/constitutional/ci-reporter.js +50 -43
  20. package/src/constitutional/index.js +2 -2
  21. package/src/constitutional/phase-minus-one.js +22 -25
  22. package/src/constitutional/steering-sync.js +28 -39
  23. package/src/dashboard/index.js +2 -2
  24. package/src/dashboard/sprint-planner.js +17 -19
  25. package/src/dashboard/sprint-reporter.js +46 -37
  26. package/src/dashboard/transition-recorder.js +12 -18
  27. package/src/dashboard/workflow-dashboard.js +27 -38
  28. package/src/enterprise/error-recovery.js +109 -49
  29. package/src/enterprise/experiment-report.js +62 -36
  30. package/src/enterprise/index.js +5 -5
  31. package/src/enterprise/rollback-manager.js +28 -29
  32. package/src/enterprise/tech-article.js +41 -35
  33. package/src/generators/design.js +3 -3
  34. package/src/generators/requirements.js +5 -3
  35. package/src/generators/tasks.js +2 -2
  36. package/src/integrations/platforms.js +1 -1
  37. package/src/templates/agents/claude-code/CLAUDE.md +1 -1
  38. package/src/templates/agents/claude-code/skills/design-reviewer/SKILL.md +132 -113
  39. package/src/templates/agents/claude-code/skills/requirements-reviewer/SKILL.md +85 -56
  40. package/src/templates/agents/codex/AGENTS.md +2 -2
  41. package/src/templates/agents/cursor/AGENTS.md +2 -2
  42. package/src/templates/agents/gemini-cli/GEMINI.md +2 -2
  43. package/src/templates/agents/github-copilot/AGENTS.md +2 -2
  44. package/src/templates/agents/github-copilot/commands/sdd-requirements.prompt.md +23 -4
  45. package/src/templates/agents/qwen-code/QWEN.md +2 -2
  46. package/src/templates/agents/shared/AGENTS.md +1 -1
  47. package/src/templates/agents/windsurf/AGENTS.md +2 -2
  48. package/src/templates/skills/browser-agent.md +1 -1
  49. package/src/traceability/extractor.js +21 -20
  50. package/src/traceability/gap-detector.js +19 -17
  51. package/src/traceability/index.js +2 -2
  52. package/src/traceability/matrix-storage.js +20 -22
  53. package/src/validators/constitution.js +5 -2
  54. package/src/validators/critic-system.js +6 -6
  55. package/src/validators/traceability-validator.js +3 -3
@@ -159,15 +159,15 @@ Legend: (Importance, Difficulty) - H=High, M=Medium, L=Low
159
159
 
160
160
  #### 4.1.3 ATAM Analysis Checklist
161
161
 
162
- | Quality Attribute | Key Questions |
163
- |-------------------|---------------|
164
- | **Performance** | Response time targets? Throughput requirements? Resource constraints? |
165
- | **Security** | Authentication method? Authorization model? Data protection? Audit requirements? |
166
- | **Availability** | Uptime SLA? Recovery time objective (RTO)? Recovery point objective (RPO)? |
167
- | **Modifiability** | Change scenarios? Extension points? Impact of changes? |
168
- | **Testability** | Component isolation? Mock capabilities? Test coverage goals? |
169
- | **Usability** | User workflow complexity? Error recovery? Learning curve? |
170
- | **Scalability** | Horizontal/vertical scaling? Load distribution? State management? |
162
+ | Quality Attribute | Key Questions |
163
+ | ----------------- | -------------------------------------------------------------------------------- |
164
+ | **Performance** | Response time targets? Throughput requirements? Resource constraints? |
165
+ | **Security** | Authentication method? Authorization model? Data protection? Audit requirements? |
166
+ | **Availability** | Uptime SLA? Recovery time objective (RTO)? Recovery point objective (RPO)? |
167
+ | **Modifiability** | Change scenarios? Extension points? Impact of changes? |
168
+ | **Testability** | Component isolation? Mock capabilities? Test coverage goals? |
169
+ | **Usability** | User workflow complexity? Error recovery? Learning curve? |
170
+ | **Scalability** | Horizontal/vertical scaling? Load distribution? State management? |
171
171
 
172
172
  ---
173
173
 
@@ -365,13 +365,13 @@ Legend: (Importance, Difficulty) - H=High, M=Medium, L=Low
365
365
 
366
366
  #### 4.3.2 Pattern Checklist
367
367
 
368
- | Check Item | Questions |
369
- |------------|-----------|
368
+ | Check Item | Questions |
369
+ | ------------------- | -------------------------------------------------------------------- |
370
370
  | **Appropriateness** | Is the pattern solving a real problem? Is simpler solution possible? |
371
- | **Implementation** | Is the pattern correctly implemented? Are all participants present? |
372
- | **Context Fit** | Does the pattern fit the technology stack and team experience? |
373
- | **Testability** | Does the pattern improve or hinder testability? |
374
- | **Performance** | Are there performance implications (e.g., Observer overhead)? |
371
+ | **Implementation** | Is the pattern correctly implemented? Are all participants present? |
372
+ | **Context Fit** | Does the pattern fit the technology stack and team experience? |
373
+ | **Testability** | Does the pattern improve or hinder testability? |
374
+ | **Performance** | Are there performance implications (e.g., Observer overhead)? |
375
375
 
376
376
  ---
377
377
 
@@ -455,12 +455,12 @@ Legend: (Importance, Difficulty) - H=High, M=Medium, L=Low
455
455
 
456
456
  #### 4.4.3 Metrics
457
457
 
458
- | Metric | Description | Target |
459
- |--------|-------------|--------|
460
- | **Afferent Coupling (Ca)** | Number of classes that depend on this class | Lower is better |
461
- | **Efferent Coupling (Ce)** | Number of classes this class depends on | Lower is better |
462
- | **Instability (I)** | Ce / (Ca + Ce) | 0 = stable, 1 = unstable |
463
- | **LCOM** | Lack of Cohesion of Methods | Lower is better |
458
+ | Metric | Description | Target |
459
+ | -------------------------- | ------------------------------------------- | ------------------------ |
460
+ | **Afferent Coupling (Ca)** | Number of classes that depend on this class | Lower is better |
461
+ | **Efferent Coupling (Ce)** | Number of classes this class depends on | Lower is better |
462
+ | **Instability (I)** | Ce / (Ca + Ce) | 0 = stable, 1 = unstable |
463
+ | **LCOM** | Lack of Cohesion of Methods | Lower is better |
464
464
 
465
465
  ---
466
466
 
@@ -560,24 +560,24 @@ Legend: (Importance, Difficulty) - H=High, M=Medium, L=Low
560
560
 
561
561
  ### 5.1 Defect Types
562
562
 
563
- | Type | Description | Example |
564
- |------|-------------|---------|
565
- | **Architectural Risk** | Design decision with potential negative impact | Single point of failure |
566
- | **SOLID Violation** | Violation of SOLID principles | God class, tight coupling |
567
- | **Pattern Misuse** | Incorrect or unnecessary pattern application | Singleton abuse |
568
- | **Security Flaw** | Security vulnerability in design | Missing authorization |
569
- | **Performance Issue** | Design causing potential performance problems | N+1 query pattern |
570
- | **Maintainability Issue** | Design hindering future changes | High coupling |
571
- | **Missing Design** | Required design element not present | No error handling strategy |
563
+ | Type | Description | Example |
564
+ | ------------------------- | ---------------------------------------------- | -------------------------- |
565
+ | **Architectural Risk** | Design decision with potential negative impact | Single point of failure |
566
+ | **SOLID Violation** | Violation of SOLID principles | God class, tight coupling |
567
+ | **Pattern Misuse** | Incorrect or unnecessary pattern application | Singleton abuse |
568
+ | **Security Flaw** | Security vulnerability in design | Missing authorization |
569
+ | **Performance Issue** | Design causing potential performance problems | N+1 query pattern |
570
+ | **Maintainability Issue** | Design hindering future changes | High coupling |
571
+ | **Missing Design** | Required design element not present | No error handling strategy |
572
572
 
573
573
  ### 5.2 Severity Levels
574
574
 
575
- | Level | Description | Action Required |
576
- |-------|-------------|-----------------|
577
- | 🔴 **Critical** | Fundamental architectural flaw | Must fix before implementation |
578
- | 🟠 **Major** | Significant design issue | Should fix before implementation |
579
- | 🟡 **Minor** | Design improvement opportunity | Fix during implementation |
580
- | 🟢 **Suggestion** | Best practice recommendation | Consider for future |
575
+ | Level | Description | Action Required |
576
+ | ----------------- | ------------------------------ | -------------------------------- |
577
+ | 🔴 **Critical** | Fundamental architectural flaw | Must fix before implementation |
578
+ | 🟠 **Major** | Significant design issue | Should fix before implementation |
579
+ | 🟡 **Minor** | Design improvement opportunity | Fix during implementation |
580
+ | 🟢 **Suggestion** | Best practice recommendation | Consider for future |
581
581
 
582
582
  ---
583
583
 
@@ -617,15 +617,15 @@ Legend: (Importance, Difficulty) - H=High, M=Medium, L=Low
617
617
 
618
618
  ## 7. ADR Review Checklist
619
619
 
620
- | Check Item | Questions |
621
- |------------|-----------|
622
- | **Title** | Is the decision clearly named? |
623
- | **Status** | Is the status (proposed/accepted/deprecated) clear? |
624
- | **Context** | Is the problem/situation well explained? |
625
- | **Decision** | Is the decision clearly stated? |
626
- | **Alternatives** | Were alternatives considered and documented? |
627
- | **Consequences** | Are positive AND negative consequences listed? |
628
- | **Compliance** | Does the decision align with architecture principles? |
620
+ | Check Item | Questions |
621
+ | ---------------- | ----------------------------------------------------- |
622
+ | **Title** | Is the decision clearly named? |
623
+ | **Status** | Is the status (proposed/accepted/deprecated) clear? |
624
+ | **Context** | Is the problem/situation well explained? |
625
+ | **Decision** | Is the decision clearly stated? |
626
+ | **Alternatives** | Were alternatives considered and documented? |
627
+ | **Consequences** | Are positive AND negative consequences listed? |
628
+ | **Compliance** | Does the decision align with architecture principles? |
629
629
 
630
630
  ---
631
631
 
@@ -712,6 +712,7 @@ d) 修正提案付きドキュメント
712
712
  # Design Review Report
713
713
 
714
714
  ## Document Information
715
+
715
716
  - **Document**: [Document Name]
716
717
  - **Version**: [Version]
717
718
  - **Review Date**: [Date]
@@ -720,55 +721,63 @@ d) 修正提案付きドキュメント
720
721
 
721
722
  ## Executive Summary
722
723
 
723
- | Category | Issues Found | Critical | Major | Minor |
724
- |----------|--------------|----------|-------|-------|
725
- | ATAM/Architecture | X | X | X | X |
726
- | SOLID Principles | X | X | X | X |
727
- | Design Patterns | X | X | X | X |
728
- | Coupling/Cohesion | X | X | X | X |
729
- | Error Handling | X | X | X | X |
730
- | Security | X | X | X | X |
731
- | **Total** | **X** | **X** | **X** | **X** |
724
+ | Category | Issues Found | Critical | Major | Minor |
725
+ | ----------------- | ------------ | -------- | ----- | ----- |
726
+ | ATAM/Architecture | X | X | X | X |
727
+ | SOLID Principles | X | X | X | X |
728
+ | Design Patterns | X | X | X | X |
729
+ | Coupling/Cohesion | X | X | X | X |
730
+ | Error Handling | X | X | X | X |
731
+ | Security | X | X | X | X |
732
+ | **Total** | **X** | **X** | **X** | **X** |
732
733
 
733
734
  ## Quality Gate Result
734
735
 
735
736
  **Status**: ✅ PASSED / ❌ FAILED
736
737
 
737
- | Criterion | Status | Notes |
738
- |-----------|--------|-------|
739
- | No Critical Issues | ✅/❌ | |
740
- | SOLID Compliance | ✅/❌ | |
741
- | Security Requirements | ✅/❌ | |
742
- | Error Handling Strategy | ✅/❌ | |
738
+ | Criterion | Status | Notes |
739
+ | ----------------------- | ------ | ----- |
740
+ | No Critical Issues | ✅/❌ | |
741
+ | SOLID Compliance | ✅/❌ | |
742
+ | Security Requirements | ✅/❌ | |
743
+ | Error Handling Strategy | ✅/❌ | |
743
744
 
744
745
  ## Detailed Findings
745
746
 
746
747
  ### ATAM Analysis
747
748
 
748
749
  #### Quality Attribute Utility Tree
750
+
749
751
  ...
750
752
 
751
753
  #### Sensitivity Points
754
+
752
755
  ...
753
756
 
754
757
  #### Tradeoff Points
758
+
755
759
  ...
756
760
 
757
761
  ### SOLID Principles Review
758
762
 
759
763
  #### SRP Compliance
764
+
760
765
  ...
761
766
 
762
767
  ### Design Pattern Assessment
768
+
763
769
  ...
764
770
 
765
771
  ### Coupling & Cohesion Analysis
772
+
766
773
  ...
767
774
 
768
775
  ### Error Handling Review
776
+
769
777
  ...
770
778
 
771
779
  ### Security Review
780
+
772
781
  ...
773
782
 
774
783
  ## Recommendations
@@ -778,9 +787,9 @@ d) 修正提案付きドキュメント
778
787
 
779
788
  ## Action Items
780
789
 
781
- | ID | Action | Owner | Due Date | Status |
782
- |----|--------|-------|----------|--------|
783
- | 1 | ... | ... | ... | Open |
790
+ | ID | Action | Owner | Due Date | Status |
791
+ | --- | ------ | ----- | -------- | ------ |
792
+ | 1 | ... | ... | ... | Open |
784
793
  ```
785
794
 
786
795
  ---
@@ -892,25 +901,28 @@ Design Reviewer AIはレビュー結果をユーザーに提示し、ユーザ
892
901
  ## 📋 Design Review Results
893
902
 
894
903
  ### Summary
895
- | Category | Critical | Major | Minor | Suggestion |
896
- |----------|----------|-------|-------|------------|
897
- | SOLID | 1 | 2 | 0 | 1 |
898
- | Patterns | 0 | 1 | 2 | 0 |
899
- | Coupling | 1 | 0 | 1 | 0 |
900
- | Security | 2 | 1 | 0 | 1 |
901
- | Error Handling | 0 | 2 | 0 | 0 |
902
- | **Total** | **4** | **6** | **3** | **2** |
904
+
905
+ | Category | Critical | Major | Minor | Suggestion |
906
+ | -------------- | -------- | ----- | ----- | ---------- |
907
+ | SOLID | 1 | 2 | 0 | 1 |
908
+ | Patterns | 0 | 1 | 2 | 0 |
909
+ | Coupling | 1 | 0 | 1 | 0 |
910
+ | Security | 2 | 1 | 0 | 1 |
911
+ | Error Handling | 0 | 2 | 0 | 0 |
912
+ | **Total** | **4** | **6** | **3** | **2** |
903
913
 
904
914
  ### SOLID Compliance Matrix
905
- | Principle | Status | Issues |
906
- |-----------|--------|--------|
907
- | Single Responsibility | | DES-001 |
908
- | Open/Closed | | - |
909
- | Liskov Substitution | ✅ | - |
910
- | Interface Segregation | ⚠️ | DES-005 |
911
- | Dependency Inversion | | DES-008 |
915
+
916
+ | Principle | Status | Issues |
917
+ | --------------------- | ------ | ------- |
918
+ | Single Responsibility | | DES-001 |
919
+ | Open/Closed | ✅ | - |
920
+ | Liskov Substitution | | - |
921
+ | Interface Segregation | ⚠️ | DES-005 |
922
+ | Dependency Inversion | ❌ | DES-008 |
912
923
 
913
924
  ### Quality Gate: ❌ FAILED
925
+
914
926
  - 4 critical issues must be resolved before implementation
915
927
 
916
928
  ---
@@ -918,12 +930,14 @@ Design Reviewer AIはレビュー結果をユーザーに提示し、ユーザ
918
930
  ### 🔴 Critical Issues
919
931
 
920
932
  #### DES-001: SRP Violation in UserManager Class
933
+
921
934
  **Location**: Section 4.2 - Component Design
922
935
  **Category**: SOLID (SRP)
923
936
  **Severity**: Critical
924
937
 
925
938
  **Current Design:**
926
939
  ```
940
+
927
941
  UserManager
928
942
  ├── authenticateUser()
929
943
  ├── registerUser()
@@ -931,6 +945,7 @@ UserManager
931
945
  ├── generateReport()
932
946
  ├── updateUserPreferences()
933
947
  └── backupUserData()
948
+
934
949
  ```
935
950
 
936
951
  **Issue:**
@@ -939,12 +954,14 @@ UserManager class has 6+ unrelated responsibilities. This violates SRP and creat
939
954
  **Recommendation:**
940
955
  Split into focused classes:
941
956
  ```
942
- AuthenticationService → authenticateUser()
943
- UserRegistrationService registerUser()
944
- NotificationService sendNotificationEmail()
945
- ReportingService generateReport()
946
- UserPreferenceService updateUserPreferences()
947
- BackupService backupUserData()
957
+
958
+ AuthenticationService authenticateUser()
959
+ UserRegistrationService registerUser()
960
+ NotificationService sendNotificationEmail()
961
+ ReportingService generateReport()
962
+ UserPreferenceService updateUserPreferences()
963
+ BackupService → backupUserData()
964
+
948
965
  ```
949
966
 
950
967
  **Your Decision:**
@@ -968,10 +985,12 @@ No input validation or sanitization design documented. Risk of injection attacks
968
985
  **Recommendation:**
969
986
  Add input validation layer:
970
987
  ```
988
+
971
989
  1. Define validation schema for each endpoint
972
990
  2. Implement sanitization before processing
973
991
  3. Return structured error responses for invalid input
974
992
  4. Log validation failures for security monitoring
993
+
975
994
  ```
976
995
 
977
996
  **Your Decision:**
@@ -1064,44 +1083,44 @@ console.log(correctionResult.updatedQualityGate);
1064
1083
 
1065
1084
  ### Changes Applied
1066
1085
 
1067
- | Issue ID | Category | Action | Summary |
1068
- |----------|----------|--------|---------|
1069
- | DES-001 | SOLID/SRP | Accepted | Split UserManager into 6 services |
1070
- | DES-002 | Security | Modified | Added custom validation layer |
1071
- | DES-008 | SOLID/DIP | Accepted | Introduced interfaces for dependencies |
1086
+ | Issue ID | Category | Action | Summary |
1087
+ | -------- | --------- | -------- | -------------------------------------- |
1088
+ | DES-001 | SOLID/SRP | Accepted | Split UserManager into 6 services |
1089
+ | DES-002 | Security | Modified | Added custom validation layer |
1090
+ | DES-008 | SOLID/DIP | Accepted | Introduced interfaces for dependencies |
1072
1091
 
1073
1092
  ### ADRs Created
1074
1093
 
1075
- | ADR ID | Issue | Decision |
1076
- |--------|-------|----------|
1094
+ | ADR ID | Issue | Decision |
1095
+ | ------- | ------- | ------------------------------------- |
1077
1096
  | ADR-015 | DES-005 | ISP violation accepted for simplicity |
1078
- | ADR-016 | DES-007 | Synchronous design chosen over async |
1097
+ | ADR-016 | DES-007 | Synchronous design chosen over async |
1079
1098
 
1080
1099
  ### Rejected Findings
1081
1100
 
1082
- | Issue ID | Category | Justification | ADR |
1083
- |----------|----------|---------------|-----|
1084
- | DES-005 | SOLID/ISP | Simplicity preferred | ADR-015 |
1085
- | DES-007 | Patterns | Performance reasons | ADR-016 |
1101
+ | Issue ID | Category | Justification | ADR |
1102
+ | -------- | --------- | -------------------- | ------- |
1103
+ | DES-005 | SOLID/ISP | Simplicity preferred | ADR-015 |
1104
+ | DES-007 | Patterns | Performance reasons | ADR-016 |
1086
1105
 
1087
1106
  ### Updated SOLID Compliance
1088
1107
 
1089
- | Principle | Before | After |
1090
- |-----------|--------|-------|
1091
- | Single Responsibility | ❌ | ✅ |
1092
- | Open/Closed | ✅ | ✅ |
1093
- | Liskov Substitution | ✅ | ✅ |
1094
- | Interface Segregation | ⚠️ | ⚠️ (ADR-015) |
1095
- | Dependency Inversion | ❌ | ✅ |
1108
+ | Principle | Before | After |
1109
+ | --------------------- | ------ | ------------ |
1110
+ | Single Responsibility | ❌ | ✅ |
1111
+ | Open/Closed | ✅ | ✅ |
1112
+ | Liskov Substitution | ✅ | ✅ |
1113
+ | Interface Segregation | ⚠️ | ⚠️ (ADR-015) |
1114
+ | Dependency Inversion | ❌ | ✅ |
1096
1115
 
1097
1116
  ### Updated Quality Gate
1098
1117
 
1099
- | Criterion | Before | After |
1100
- |-----------|--------|-------|
1101
- | Critical Issues | 4 | 0 ✅ |
1102
- | Major Issues | 6 | 2 |
1103
- | Security Score | 45% | 90% |
1104
- | SOLID Compliance | 60% | 95% |
1118
+ | Criterion | Before | After |
1119
+ | ---------------- | ------ | ----- |
1120
+ | Critical Issues | 4 | 0 ✅ |
1121
+ | Major Issues | 6 | 2 |
1122
+ | Security Score | 45% | 90% |
1123
+ | SOLID Compliance | 60% | 95% |
1105
1124
 
1106
1125
  **Status**: ✅ PASSED (Ready for Implementation Phase)
1107
1126
 
@@ -1129,7 +1148,7 @@ This skill ensures compliance with:
1129
1148
 
1130
1149
  ## Version History
1131
1150
 
1132
- | Version | Date | Changes |
1133
- |---------|------|---------|
1134
- | 1.0.0 | 2025-12-27 | Initial release with ATAM, SOLID, patterns, and security review |
1135
- | 1.1.0 | 2025-12-27 | Added interactive review and correction workflow |
1151
+ | Version | Date | Changes |
1152
+ | ------- | ---------- | --------------------------------------------------------------- |
1153
+ | 1.0.0 | 2025-12-27 | Initial release with ATAM, SOLID, patterns, and security review |
1154
+ | 1.1.0 | 2025-12-27 | Added interactive review and correction workflow |