@polymorphism-tech/morph-spec 4.8.14 → 4.8.16

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 (72) hide show
  1. package/README.md +2 -2
  2. package/bin/morph-spec.js +23 -2
  3. package/bin/task-manager.js +202 -14
  4. package/claude-plugin.json +1 -1
  5. package/docs/CHEATSHEET.md +1 -1
  6. package/docs/QUICKSTART.md +1 -1
  7. package/framework/agents.json +113 -116
  8. package/framework/hooks/claude-code/post-tool-use/dispatch.js +48 -2
  9. package/framework/hooks/claude-code/post-tool-use/validator-feedback.js +151 -0
  10. package/framework/hooks/claude-code/pre-tool-use/enforce-phase-writes.js +6 -0
  11. package/framework/hooks/claude-code/pre-tool-use/protect-spec-files.js +6 -0
  12. package/framework/hooks/claude-code/session-start/inject-morph-context.js +27 -0
  13. package/framework/hooks/claude-code/stop/validate-completion.js +17 -2
  14. package/framework/hooks/claude-code/teammate-idle/teammate-idle.js +87 -0
  15. package/framework/hooks/claude-code/user-prompt/set-terminal-title.js +58 -0
  16. package/framework/hooks/shared/phase-utils.js +1 -1
  17. package/framework/hooks/shared/state-reader.js +1 -0
  18. package/framework/skills/README.md +1 -0
  19. package/framework/skills/level-0-meta/brainstorming/SKILL.md +2 -0
  20. package/framework/skills/level-0-meta/code-review/SKILL.md +16 -0
  21. package/framework/skills/level-0-meta/code-review/references/review-guidelines.md +100 -0
  22. package/framework/skills/level-0-meta/code-review/scripts/scan-csharp.mjs +36 -6
  23. package/framework/skills/level-0-meta/code-review-nextjs/SKILL.md +16 -0
  24. package/framework/skills/level-0-meta/code-review-nextjs/scripts/scan-nextjs.mjs +189 -0
  25. package/framework/skills/level-0-meta/frontend-review/SKILL.md +359 -0
  26. package/framework/skills/level-0-meta/frontend-review/scripts/scan-accessibility.mjs +376 -0
  27. package/framework/skills/level-0-meta/morph-checklist/SKILL.md +1 -1
  28. package/framework/skills/level-0-meta/morph-init/SKILL.md +3 -2
  29. package/framework/skills/level-0-meta/morph-replicate/SKILL.md +10 -8
  30. package/framework/skills/level-0-meta/morph-replicate/references/blazor-html-mapping.md +70 -0
  31. package/framework/skills/level-0-meta/post-implementation/SKILL.md +315 -0
  32. package/framework/skills/level-0-meta/post-implementation/scripts/detect-dev-server.mjs +153 -0
  33. package/framework/skills/level-0-meta/post-implementation/scripts/detect-stack.mjs +234 -0
  34. package/framework/skills/level-0-meta/terminal-title/SKILL.md +61 -0
  35. package/framework/skills/level-0-meta/terminal-title/scripts/set_title.sh +65 -0
  36. package/framework/skills/level-0-meta/tool-usage-guide/SKILL.md +13 -206
  37. package/framework/skills/level-0-meta/tool-usage-guide/references/tools-per-phase.md +213 -0
  38. package/framework/skills/level-0-meta/verification-before-completion/SKILL.md +2 -0
  39. package/framework/skills/level-1-workflows/phase-clarify/SKILL.md +4 -7
  40. package/framework/skills/level-1-workflows/phase-codebase-analysis/SKILL.md +1 -1
  41. package/framework/skills/level-1-workflows/phase-design/SKILL.md +16 -110
  42. package/framework/skills/level-1-workflows/phase-design/references/architecture-analysis-guide.md +89 -0
  43. package/framework/skills/level-1-workflows/phase-design/references/spec-authoring-guide.md +55 -0
  44. package/framework/skills/level-1-workflows/phase-implement/SKILL.md +153 -118
  45. package/framework/skills/level-1-workflows/phase-implement/references/vsa-implementation-guide.md +92 -0
  46. package/framework/skills/level-1-workflows/phase-setup/SKILL.md +1 -2
  47. package/framework/skills/level-1-workflows/phase-tasks/SKILL.md +11 -158
  48. package/framework/skills/level-1-workflows/phase-tasks/references/task-planning-patterns.md +172 -0
  49. package/framework/skills/level-1-workflows/phase-uiux/SKILL.md +42 -3
  50. package/framework/squad-templates/backend-only.json +14 -1
  51. package/framework/squad-templates/frontend-only.json +14 -1
  52. package/framework/squad-templates/full-stack.json +25 -8
  53. package/framework/standards/STANDARDS.json +631 -86
  54. package/framework/standards/frontend/design-system/aesthetic-direction.md +213 -0
  55. package/framework/templates/project/validate.js +122 -0
  56. package/framework/workflows/configs/zero-touch.json +7 -0
  57. package/package.json +1 -1
  58. package/src/commands/agents/dispatch-agents.js +53 -10
  59. package/src/commands/state/advance-phase.js +56 -0
  60. package/src/commands/state/index.js +2 -1
  61. package/src/commands/state/phase-runner.js +215 -0
  62. package/src/commands/tasks/task.js +23 -2
  63. package/src/core/paths/output-schema.js +1 -1
  64. package/src/lib/generators/recap-generator.js +16 -0
  65. package/src/lib/orchestration/team-orchestrator.js +171 -89
  66. package/src/lib/phase-chain/eligibility-checker.js +243 -0
  67. package/src/lib/standards/digest-builder.js +231 -0
  68. package/src/lib/validators/blazor/blazor-concurrency-analyzer.js +39 -0
  69. package/src/lib/validators/nextjs/next-component-validator.js +2 -0
  70. package/src/lib/validators/validation-runner.js +2 -2
  71. package/src/utils/file-copier.js +2 -0
  72. package/src/utils/hooks-installer.js +31 -7
@@ -42,9 +42,9 @@
42
42
  "team_role": "lead"
43
43
  },
44
44
  "standards": [
45
- "core/coding.md",
46
- "core/architecture.md",
47
- "backend/dotnet/program-cs-checklist.md"
45
+ { "id": "core-coding", "scope": "all", "priority": "required" },
46
+ { "id": "core-architecture", "scope": "all", "priority": "required" },
47
+ { "id": "backend-dotnet-program-cs-checklist", "scope": "implement", "priority": "required" }
48
48
  ],
49
49
  "teammate": {
50
50
  "role": "Team Lead (Delegate Mode)",
@@ -87,12 +87,12 @@
87
87
  ]
88
88
  },
89
89
  "standards": [
90
- "core/coding.md",
91
- "core/architecture.md",
92
- "ai-agents/setup.md",
93
- "ai-agents/workflows.md",
94
- "ai-agents/production.md",
95
- "ai-agents/blazor-ui.md"
90
+ { "id": "core-coding", "scope": "all", "priority": "required" },
91
+ { "id": "core-architecture", "scope": "all", "priority": "required" },
92
+ { "id": "ai-agents-setup", "scope": "all", "priority": "required" },
93
+ { "id": "ai-agents-workflows", "scope": "design", "priority": "required" },
94
+ { "id": "ai-agents-production", "scope": "implement", "priority": "required" },
95
+ { "id": "ai-agents-blazor-ui", "scope": "implement", "priority": "reference" }
96
96
  ],
97
97
  "teammate": {
98
98
  "role": "AI Architect",
@@ -129,8 +129,8 @@
129
129
  ]
130
130
  },
131
131
  "standards": [
132
- "core/coding.md",
133
- "core/architecture.md"
132
+ { "id": "core-coding", "scope": "all", "priority": "required" },
133
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
134
134
  ],
135
135
  "teammate": null
136
136
  },
@@ -179,10 +179,10 @@
179
179
  "team_role": "domain_leader"
180
180
  },
181
181
  "standards": [
182
- "core/coding.md",
183
- "core/architecture.md",
184
- "backend/dotnet/core.md",
185
- "backend/dotnet/program-cs-checklist.md"
182
+ { "id": "core-coding", "scope": "all", "priority": "required" },
183
+ { "id": "core-architecture", "scope": "all", "priority": "required" },
184
+ { "id": "backend-dotnet-core", "scope": "implement", "priority": "required" },
185
+ { "id": "backend-dotnet-program-cs-checklist", "scope": "implement", "priority": "required" }
186
186
  ],
187
187
  "teammate": {
188
188
  "role": "Backend Squad Leader",
@@ -228,8 +228,8 @@
228
228
  "team_role": "domain_leader"
229
229
  },
230
230
  "standards": [
231
- "core/coding.md",
232
- "core/architecture.md"
231
+ { "id": "core-coding", "scope": "all", "priority": "required" },
232
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
233
233
  ],
234
234
  "teammate": {
235
235
  "role": "Infrastructure Squad Leader",
@@ -280,9 +280,9 @@
280
280
  ]
281
281
  },
282
282
  "standards": [
283
- "core/coding.md",
284
- "core/architecture.md",
285
- "azure.md"
283
+ { "id": "core-coding", "scope": "all", "priority": "required" },
284
+ { "id": "core-architecture", "scope": "all", "priority": "required" },
285
+ { "id": "infrastructure-azure-azure", "scope": "all", "priority": "required" }
286
286
  ],
287
287
  "teammate": {
288
288
  "role": "Infrastructure Squad Leader",
@@ -338,10 +338,9 @@
338
338
  ]
339
339
  },
340
340
  "standards": [
341
- "frontend/blazor/fluent-ui.md",
342
- "mudblazor-blazor.md",
343
- "frontend/design-system/naming.md",
344
- "frontend/design-system/animations.md"
341
+ { "id": "frontend-blazor-fluent-ui", "scope": "uiux", "priority": "required" },
342
+ { "id": "frontend-design-system-naming", "scope": "all", "priority": "required" },
343
+ { "id": "frontend-design-system-animations", "scope": "all", "priority": "required" }
345
344
  ],
346
345
  "teammate": {
347
346
  "role": "UI/UX Squad Leader (FASE 1.5)",
@@ -388,9 +387,9 @@
388
387
  ]
389
388
  },
390
389
  "standards": [
391
- "core/coding.md",
392
- "backend/database/ef-core.md",
393
- "backend/dotnet/core.md"
390
+ { "id": "core-coding", "scope": "all", "priority": "required" },
391
+ { "id": "backend-database-ef-core", "scope": "all", "priority": "required" },
392
+ { "id": "backend-dotnet-core", "scope": "implement", "priority": "required" }
394
393
  ],
395
394
  "teammate": {
396
395
  "role": "Data Persistence Specialist",
@@ -441,8 +440,8 @@
441
440
  ]
442
441
  },
443
442
  "standards": [
444
- "core/coding.md",
445
- "core/architecture.md"
443
+ { "id": "core-coding", "scope": "all", "priority": "required" },
444
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
446
445
  ],
447
446
  "teammate": {
448
447
  "role": "Event-Driven Architecture Specialist",
@@ -471,8 +470,7 @@
471
470
  ],
472
471
  "always_active": false,
473
472
  "validators": [
474
- "architecture",
475
- "api-design"
473
+ "architecture"
476
474
  ],
477
475
  "relationships": {
478
476
  "reports_to": "dotnet-senior",
@@ -491,8 +489,8 @@
491
489
  ]
492
490
  },
493
491
  "standards": [
494
- "core/coding.md",
495
- "core/architecture.md"
492
+ { "id": "core-coding", "scope": "all", "priority": "required" },
493
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
496
494
  ],
497
495
  "teammate": {
498
496
  "role": "API Design Specialist",
@@ -537,8 +535,8 @@
537
535
  ]
538
536
  },
539
537
  "standards": [
540
- "core/coding.md",
541
- "core/architecture.md"
538
+ { "id": "core-coding", "scope": "all", "priority": "required" },
539
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
542
540
  ],
543
541
  "teammate": {
544
542
  "role": "NoSQL & Cache Specialist",
@@ -586,14 +584,14 @@
586
584
  "team_role": "domain_leader"
587
585
  },
588
586
  "standards": [
589
- "core/coding.md",
590
- "core/architecture.md",
591
- "architecture/ddd/complexity-levels.md",
592
- "architecture/ddd/aggregates.md",
593
- "architecture/ddd/entities.md",
594
- "architecture/ddd/value-objects.md",
595
- "architecture/ddd/bounded-contexts.md",
596
- "architecture/ddd/ubiquitous-language.md"
587
+ { "id": "core-coding", "scope": "all", "priority": "required" },
588
+ { "id": "core-architecture", "scope": "all", "priority": "required" },
589
+ { "id": "architecture-ddd-complexity-levels", "scope": "design", "priority": "required" },
590
+ { "id": "architecture-ddd-aggregates", "scope": "design", "priority": "required" },
591
+ { "id": "architecture-ddd-entities", "scope": "design", "priority": "required" },
592
+ { "id": "architecture-ddd-value-objects", "scope": "design", "priority": "required" },
593
+ { "id": "architecture-ddd-bounded-contexts", "scope": "design", "priority": "required" },
594
+ { "id": "architecture-ddd-ubiquitous-language", "scope": "design", "priority": "required" }
597
595
  ],
598
596
  "active_phases": [
599
597
  "design",
@@ -641,8 +639,8 @@
641
639
  ]
642
640
  },
643
641
  "standards": [
644
- "core/coding.md",
645
- "core/architecture.md"
642
+ { "id": "core-coding", "scope": "all", "priority": "required" },
643
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
646
644
  ],
647
645
  "teammate": {
648
646
  "role": "Background Jobs Specialist",
@@ -689,11 +687,11 @@
689
687
  ]
690
688
  },
691
689
  "standards": [
692
- "core/coding.md",
693
- "ai-agents/setup.md",
694
- "ai-agents/workflows.md",
695
- "ai-agents/production.md",
696
- "ai-agents/blazor-ui.md"
690
+ { "id": "core-coding", "scope": "all", "priority": "required" },
691
+ { "id": "ai-agents-setup", "scope": "all", "priority": "required" },
692
+ { "id": "ai-agents-workflows", "scope": "design", "priority": "required" },
693
+ { "id": "ai-agents-production", "scope": "implement", "priority": "required" },
694
+ { "id": "ai-agents-blazor-ui", "scope": "implement", "priority": "reference" }
697
695
  ],
698
696
  "teammate": {
699
697
  "role": "Microsoft Agent Framework Expert",
@@ -738,8 +736,8 @@
738
736
  ]
739
737
  },
740
738
  "standards": [
741
- "core/coding.md",
742
- "core/architecture.md"
739
+ { "id": "core-coding", "scope": "all", "priority": "required" },
740
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
743
741
  ],
744
742
  "teammate": {
745
743
  "role": "Supabase & PostgreSQL Specialist",
@@ -783,9 +781,9 @@
783
781
  ]
784
782
  },
785
783
  "standards": [
786
- "core/coding.md",
787
- "ai-agents/setup.md",
788
- "ai-agents/workflows.md"
784
+ { "id": "core-coding", "scope": "all", "priority": "required" },
785
+ { "id": "ai-agents-setup", "scope": "all", "priority": "required" },
786
+ { "id": "ai-agents-workflows", "scope": "design", "priority": "required" }
789
787
  ],
790
788
  "teammate": {
791
789
  "role": "Vector Search & RAG Specialist",
@@ -824,8 +822,8 @@
824
822
  ]
825
823
  },
826
824
  "standards": [
827
- "core/coding.md",
828
- "ai-agents/workflows.md"
825
+ { "id": "core-coding", "scope": "all", "priority": "required" },
826
+ { "id": "ai-agents-workflows", "scope": "all", "priority": "required" }
829
827
  ],
830
828
  "teammate": {
831
829
  "role": "Context & Token Optimization Specialist",
@@ -869,8 +867,8 @@
869
867
  ]
870
868
  },
871
869
  "standards": [
872
- "core/coding.md",
873
- "core/architecture.md"
870
+ { "id": "core-coding", "scope": "all", "priority": "required" },
871
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
874
872
  ],
875
873
  "teammate": {
876
874
  "role": "Payment Integration Specialist",
@@ -920,8 +918,8 @@
920
918
  ]
921
919
  },
922
920
  "standards": [
923
- "core/coding.md",
924
- "core/architecture.md"
921
+ { "id": "core-coding", "scope": "all", "priority": "required" },
922
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
925
923
  ],
926
924
  "teammate": {
927
925
  "role": "Auth SaaS Integration Specialist",
@@ -969,8 +967,8 @@
969
967
  ]
970
968
  },
971
969
  "standards": [
972
- "core/coding.md",
973
- "core/architecture.md"
970
+ { "id": "core-coding", "scope": "all", "priority": "required" },
971
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
974
972
  ],
975
973
  "teammate": {
976
974
  "role": "Email Integration Specialist",
@@ -1024,13 +1022,12 @@
1024
1022
  ]
1025
1023
  },
1026
1024
  "standards": [
1027
- "core/coding.md",
1028
- "frontend/blazor/lifecycle.md",
1029
- "frontend/blazor/state.md",
1030
- "frontend/blazor/pitfalls.md",
1031
- "backend/database/ef-core.md",
1032
- "frontend/blazor/fluent-ui.md",
1033
- "mudblazor-blazor.md"
1025
+ { "id": "core-coding", "scope": "all", "priority": "required" },
1026
+ { "id": "frontend-blazor-lifecycle", "scope": "all", "priority": "required" },
1027
+ { "id": "frontend-blazor-state", "scope": "all", "priority": "required" },
1028
+ { "id": "frontend-blazor-pitfalls", "scope": "all", "priority": "required" },
1029
+ { "id": "backend-database-ef-core", "scope": "implement", "priority": "reference" },
1030
+ { "id": "frontend-blazor-fluent-ui", "scope": "all", "priority": "required" }
1034
1031
  ],
1035
1032
  "teammate": {
1036
1033
  "role": "Blazor Development Specialist",
@@ -1081,17 +1078,17 @@
1081
1078
  ]
1082
1079
  },
1083
1080
  "standards": [
1084
- "core/coding.md",
1085
- "core/architecture.md",
1086
- "frontend/nextjs/naming-conventions.md",
1087
- "frontend/nextjs/project-structure.md",
1088
- "frontend/nextjs/app-router.md",
1089
- "frontend/nextjs/components.md",
1090
- "frontend/nextjs/data-fetching.md",
1091
- "frontend/nextjs/forms.md",
1092
- "frontend/nextjs/state-management.md",
1093
- "frontend/nextjs/testing.md",
1094
- "frontend/nextjs/nextjs-patterns.md"
1081
+ { "id": "core-coding", "scope": "all", "priority": "required" },
1082
+ { "id": "core-architecture", "scope": "all", "priority": "required" },
1083
+ { "id": "frontend-nextjs-naming-conventions", "scope": "all", "priority": "required" },
1084
+ { "id": "frontend-nextjs-project-structure", "scope": "all", "priority": "required" },
1085
+ { "id": "frontend-nextjs-app-router", "scope": "all", "priority": "required" },
1086
+ { "id": "frontend-nextjs-components", "scope": "all", "priority": "required" },
1087
+ { "id": "frontend-nextjs-data-fetching", "scope": "implement", "priority": "required" },
1088
+ { "id": "frontend-nextjs-forms", "scope": "implement", "priority": "required" },
1089
+ { "id": "frontend-nextjs-state-management", "scope": "implement", "priority": "required" },
1090
+ { "id": "frontend-nextjs-testing", "scope": "implement", "priority": "reference" },
1091
+ { "id": "frontend-nextjs-nextjs-patterns", "scope": "all", "priority": "required" }
1095
1092
  ],
1096
1093
  "teammate": {
1097
1094
  "role": "Next.js Development Specialist",
@@ -1134,8 +1131,8 @@
1134
1131
  ]
1135
1132
  },
1136
1133
  "standards": [
1137
- "frontend/design-system/naming.md",
1138
- "frontend/design-system/animations.md"
1134
+ { "id": "frontend-design-system-naming", "scope": "all", "priority": "required" },
1135
+ { "id": "frontend-design-system-animations", "scope": "all", "priority": "required" }
1139
1136
  ],
1140
1137
  "teammate": {
1141
1138
  "role": "CSS & Design System Specialist",
@@ -1178,9 +1175,9 @@
1178
1175
  ]
1179
1176
  },
1180
1177
  "standards": [
1181
- "core/coding.md",
1182
- "core/architecture.md",
1183
- "azure.md"
1178
+ { "id": "core-coding", "scope": "all", "priority": "required" },
1179
+ { "id": "core-architecture", "scope": "all", "priority": "required" },
1180
+ { "id": "infrastructure-azure-azure", "scope": "all", "priority": "required" }
1184
1181
  ],
1185
1182
  "teammate": {
1186
1183
  "role": "Infrastructure as Code Specialist",
@@ -1222,8 +1219,8 @@
1222
1219
  ]
1223
1220
  },
1224
1221
  "standards": [
1225
- "core/coding.md",
1226
- "core/architecture.md"
1222
+ { "id": "core-coding", "scope": "all", "priority": "required" },
1223
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
1227
1224
  ],
1228
1225
  "teammate": {
1229
1226
  "role": "CI/CD Specialist",
@@ -1264,8 +1261,8 @@
1264
1261
  ]
1265
1262
  },
1266
1263
  "standards": [
1267
- "core/coding.md",
1268
- "core/architecture.md"
1264
+ { "id": "core-coding", "scope": "all", "priority": "required" },
1265
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
1269
1266
  ],
1270
1267
  "teammate": {
1271
1268
  "role": "Containerization Specialist",
@@ -1309,8 +1306,8 @@
1309
1306
  ]
1310
1307
  },
1311
1308
  "standards": [
1312
- "core/coding.md",
1313
- "core/architecture.md"
1309
+ { "id": "core-coding", "scope": "all", "priority": "required" },
1310
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
1314
1311
  ],
1315
1312
  "teammate": {
1316
1313
  "role": "Observability Specialist",
@@ -1355,8 +1352,8 @@
1355
1352
  ]
1356
1353
  },
1357
1354
  "standards": [
1358
- "core/coding.md",
1359
- "core/architecture.md"
1355
+ { "id": "core-coding", "scope": "all", "priority": "required" },
1356
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
1360
1357
  ],
1361
1358
  "teammate": {
1362
1359
  "role": "Microsoft Identity Specialist",
@@ -1402,8 +1399,8 @@
1402
1399
  ]
1403
1400
  },
1404
1401
  "standards": [
1405
- "core/coding.md",
1406
- "core/architecture.md"
1402
+ { "id": "core-coding", "scope": "all", "priority": "required" },
1403
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
1407
1404
  ],
1408
1405
  "teammate": {
1409
1406
  "role": "Testing Specialist",
@@ -1447,8 +1444,8 @@
1447
1444
  ]
1448
1445
  },
1449
1446
  "standards": [
1450
- "core/coding.md",
1451
- "core/architecture.md"
1447
+ { "id": "core-coding", "scope": "all", "priority": "required" },
1448
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
1452
1449
  ],
1453
1450
  "teammate": {
1454
1451
  "role": "Code Quality Analyst",
@@ -1488,8 +1485,8 @@
1488
1485
  ]
1489
1486
  },
1490
1487
  "standards": [
1491
- "core/coding.md",
1492
- "core/architecture.md"
1488
+ { "id": "core-coding", "scope": "all", "priority": "required" },
1489
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
1493
1490
  ],
1494
1491
  "teammate": {
1495
1492
  "role": "Troubleshooting Expert (Escalation)",
@@ -1533,8 +1530,8 @@
1533
1530
  ]
1534
1531
  },
1535
1532
  "standards": [
1536
- "core/coding.md",
1537
- "core/architecture.md"
1533
+ { "id": "core-coding", "scope": "all", "priority": "required" },
1534
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
1538
1535
  ],
1539
1536
  "teammate": {
1540
1537
  "role": "Load Testing Specialist",
@@ -1574,8 +1571,8 @@
1574
1571
  ]
1575
1572
  },
1576
1573
  "standards": [
1577
- "core/coding.md",
1578
- "core/architecture.md"
1574
+ { "id": "core-coding", "scope": "all", "priority": "required" },
1575
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
1579
1576
  ],
1580
1577
  "teammate": {
1581
1578
  "role": "Documentation Specialist (Post-FASE 5)",
@@ -1609,8 +1606,8 @@
1609
1606
  "implement"
1610
1607
  ],
1611
1608
  "standards": [
1612
- "core/coding.md",
1613
- "architecture/vertical-slice/vertical-slice.md"
1609
+ { "id": "core-coding", "scope": "all", "priority": "required" },
1610
+ { "id": "architecture-vertical-slice-vertical-slice", "scope": "all", "priority": "required" }
1614
1611
  ],
1615
1612
  "teammate": {
1616
1613
  "role": "VSA Architecture Specialist",
@@ -1650,8 +1647,8 @@
1650
1647
  "team_role": "validator"
1651
1648
  },
1652
1649
  "standards": [
1653
- "core/coding.md",
1654
- "core/architecture.md"
1650
+ { "id": "core-coding", "scope": "all", "priority": "required" },
1651
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
1655
1652
  ],
1656
1653
  "teammate": null,
1657
1654
  "hook_behavior": {
@@ -1694,8 +1691,8 @@
1694
1691
  "team_role": "validator"
1695
1692
  },
1696
1693
  "standards": [
1697
- "core/coding.md",
1698
- "core/architecture.md"
1694
+ { "id": "core-coding", "scope": "all", "priority": "required" },
1695
+ { "id": "core-architecture", "scope": "all", "priority": "required" }
1699
1696
  ],
1700
1697
  "teammate": null,
1701
1698
  "hook_behavior": {
@@ -1736,7 +1733,7 @@
1736
1733
  "team_role": "validator"
1737
1734
  },
1738
1735
  "standards": [
1739
- "core/coding.md"
1736
+ { "id": "core-coding", "scope": "all", "priority": "required" }
1740
1737
  ],
1741
1738
  "teammate": null,
1742
1739
  "hook_behavior": {
@@ -1776,8 +1773,8 @@
1776
1773
  "team_role": "validator"
1777
1774
  },
1778
1775
  "standards": [
1779
- "frontend/design-system/naming.md",
1780
- "frontend/design-system/animations.md"
1776
+ { "id": "frontend-design-system-naming", "scope": "all", "priority": "required" },
1777
+ { "id": "frontend-design-system-animations", "scope": "all", "priority": "required" }
1781
1778
  ],
1782
1779
  "teammate": null,
1783
1780
  "hook_behavior": {
@@ -1819,9 +1816,9 @@
1819
1816
  "team_role": "validator"
1820
1817
  },
1821
1818
  "standards": [
1822
- "frontend/blazor/lifecycle.md",
1823
- "frontend/blazor/pitfalls.md",
1824
- "frontend/blazor/state.md"
1819
+ { "id": "frontend-blazor-lifecycle", "scope": "all", "priority": "required" },
1820
+ { "id": "frontend-blazor-pitfalls", "scope": "all", "priority": "required" },
1821
+ { "id": "frontend-blazor-state", "scope": "all", "priority": "required" }
1825
1822
  ],
1826
1823
  "teammate": null,
1827
1824
  "hook_behavior": {
@@ -14,9 +14,11 @@
14
14
  */
15
15
 
16
16
  import { execSync } from 'child_process';
17
+ import { readFileSync, existsSync } from 'fs';
18
+ import { resolve } from 'path';
17
19
  import { readStdin } from '../../shared/stdin-reader.js';
18
20
  import { stateExists, getFeature } from '../../shared/state-reader.js';
19
- import { pass } from '../../shared/hook-response.js';
21
+ import { pass, injectContext } from '../../shared/hook-response.js';
20
22
 
21
23
  try {
22
24
  if (!stateExists()) pass();
@@ -59,7 +61,8 @@ function dispatch(command) {
59
61
  // morph-spec phase advance <feature>
60
62
  const phaseAdvanceMatch = command.match(/morph-spec\s+phase\s+advance\s+(\S+)/);
61
63
  if (phaseAdvanceMatch) {
62
- // Phase advancement hooks are handled internally by advance-phase.js
64
+ const [, featureName] = phaseAdvanceMatch;
65
+ evaluatePhaseChain(featureName);
63
66
  pass();
64
67
  }
65
68
 
@@ -74,6 +77,49 @@ function dispatch(command) {
74
77
  pass();
75
78
  }
76
79
 
80
+ /**
81
+ * Evaluate whether the phase chain should auto-continue after a phase advance.
82
+ * Injects a `morph-spec phase run` instruction when the workflow has phaseChain.enabled.
83
+ * Silently passes when workflow doesn't support chaining or feature is not found.
84
+ *
85
+ * @param {string} featureName
86
+ */
87
+ function evaluatePhaseChain(featureName) {
88
+ try {
89
+ const feature = getFeature(featureName);
90
+ if (!feature) return;
91
+
92
+ const workflowId = feature.workflow;
93
+ if (!workflowId || workflowId === 'auto') return;
94
+
95
+ // Load workflow config to check phaseChain.enabled
96
+ const configPath = resolve(
97
+ process.cwd(),
98
+ `.morph/framework/workflows/configs/${workflowId}.json`
99
+ );
100
+ if (!existsSync(configPath)) return;
101
+
102
+ let workflowConfig;
103
+ try {
104
+ workflowConfig = JSON.parse(readFileSync(configPath, 'utf8'));
105
+ } catch {
106
+ return;
107
+ }
108
+
109
+ if (!workflowConfig?.phaseChain?.enabled) return;
110
+
111
+ // Inject instruction to continue the phase chain
112
+ injectContext(
113
+ `Phase advance complete. Continue the phase chain:\n` +
114
+ ` morph-spec phase run ${featureName}\n\n` +
115
+ `The phase runner will check eligibility and auto-advance if all gates pass. ` +
116
+ `It will pause automatically on blocked tasks, low pass rate, or trust gates.`
117
+ );
118
+ } catch {
119
+ // Non-blocking — fail silently
120
+ }
121
+ }
122
+
77
123
  function run(cmd) {
78
124
  try {
79
125
  execSync(cmd, { stdio: 'pipe', cwd: process.cwd(), timeout: 30000 });