@polymorphism-tech/morph-spec 4.8.19 → 4.10.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 (214) hide show
  1. package/CLAUDE.md +21 -0
  2. package/README.md +2 -2
  3. package/bin/morph-spec.js +44 -55
  4. package/bin/task-manager.js +133 -20
  5. package/bin/validate.js +67 -33
  6. package/claude-plugin.json +1 -1
  7. package/docs/CHEATSHEET.md +201 -203
  8. package/docs/QUICKSTART.md +2 -2
  9. package/framework/CLAUDE.md +99 -77
  10. package/framework/agents.json +734 -182
  11. package/framework/commands/commit.md +166 -0
  12. package/framework/commands/morph-apply.md +13 -2
  13. package/framework/commands/morph-archive.md +8 -2
  14. package/framework/commands/morph-infra.md +6 -0
  15. package/framework/commands/morph-preflight.md +6 -0
  16. package/framework/commands/morph-proposal.md +56 -7
  17. package/framework/commands/morph-status.md +6 -0
  18. package/framework/commands/morph-troubleshoot.md +6 -0
  19. package/framework/hooks/claude-code/notification/approval-reminder.js +3 -2
  20. package/framework/hooks/claude-code/post-tool-use/context-refresh.js +1 -1
  21. package/framework/hooks/claude-code/post-tool-use/dispatch.js +155 -32
  22. package/framework/hooks/claude-code/post-tool-use/skill-reminder.js +78 -0
  23. package/framework/hooks/claude-code/post-tool-use/validator-feedback.js +8 -17
  24. package/framework/hooks/claude-code/pre-compact/save-morph-context.js +16 -3
  25. package/framework/hooks/claude-code/pre-tool-use/enforce-phase-writes.js +4 -3
  26. package/framework/hooks/claude-code/pre-tool-use/protect-spec-files.js +4 -3
  27. package/framework/hooks/claude-code/pre-tool-use/task-tracking-guard.js +60 -0
  28. package/framework/hooks/claude-code/session-start/inject-morph-context.js +124 -2
  29. package/framework/hooks/claude-code/session-start/post-compact-restore.js +41 -0
  30. package/framework/hooks/claude-code/statusline.py +76 -30
  31. package/framework/hooks/claude-code/stop/validate-completion.js +2 -15
  32. package/framework/hooks/claude-code/user-prompt/enrich-prompt.js +23 -5
  33. package/framework/hooks/claude-code/user-prompt/set-terminal-title.js +14 -6
  34. package/framework/hooks/shared/activity-logger.js +0 -24
  35. package/framework/hooks/shared/compact-restore.js +100 -0
  36. package/framework/hooks/shared/dispatch-helpers.js +116 -0
  37. package/framework/hooks/shared/phase-utils.js +12 -5
  38. package/framework/hooks/shared/skill-reminder-helpers.js +79 -0
  39. package/framework/hooks/shared/stale-task-reset.js +57 -0
  40. package/framework/hooks/shared/state-reader.js +29 -5
  41. package/framework/hooks/shared/worktree-helpers.js +53 -0
  42. package/framework/phases.json +69 -14
  43. package/framework/rules/morph-workflow.md +88 -86
  44. package/framework/skills/level-0-meta/mcp-registry.json +86 -51
  45. package/framework/skills/level-0-meta/{brainstorming → morph-brainstorming}/SKILL.md +14 -17
  46. package/framework/skills/level-0-meta/morph-checklist/SKILL.md +2 -2
  47. package/framework/skills/level-0-meta/{code-review → morph-code-review}/SKILL.md +2 -2
  48. package/framework/skills/level-0-meta/{code-review-nextjs → morph-code-review-nextjs}/SKILL.md +163 -163
  49. package/framework/skills/level-0-meta/{frontend-review → morph-frontend-review}/SKILL.md +9 -9
  50. package/framework/skills/level-0-meta/morph-init/SKILL.md +77 -12
  51. package/framework/skills/level-0-meta/{post-implementation → morph-post-implementation}/SKILL.md +62 -15
  52. package/framework/skills/level-0-meta/morph-replicate/SKILL.md +5 -5
  53. package/framework/skills/level-0-meta/morph-replicate/references/blazor-html-mapping.md +1 -1
  54. package/framework/skills/level-0-meta/{simulation-checklist → morph-simulation-checklist}/SKILL.md +1 -1
  55. package/framework/skills/level-0-meta/{terminal-title → morph-terminal-title}/SKILL.md +2 -2
  56. package/framework/skills/level-0-meta/{tool-usage-guide → morph-tool-usage-guide}/SKILL.md +3 -4
  57. package/framework/skills/level-0-meta/{tool-usage-guide → morph-tool-usage-guide}/references/tools-per-phase.md +7 -7
  58. package/framework/skills/level-0-meta/{verification-before-completion → morph-verification-before-completion}/SKILL.md +2 -2
  59. package/framework/skills/level-0-meta/{verification-before-completion → morph-verification-before-completion}/scripts/check-phase-outputs.mjs +2 -2
  60. package/framework/skills/level-1-workflows/morph-phase-clarify/SKILL.md +238 -0
  61. package/framework/skills/level-1-workflows/{phase-codebase-analysis → morph-phase-codebase-analysis}/SKILL.md +3 -3
  62. package/framework/skills/level-1-workflows/morph-phase-design/SKILL.md +507 -0
  63. package/framework/skills/level-1-workflows/{phase-implement → morph-phase-implement}/SKILL.md +168 -27
  64. package/framework/skills/level-1-workflows/morph-phase-implement/prompts/code-quality-reviewer-prompt.md +50 -0
  65. package/framework/skills/level-1-workflows/morph-phase-implement/prompts/implementer-prompt.md +45 -0
  66. package/framework/skills/level-1-workflows/morph-phase-implement/prompts/spec-reviewer-prompt.md +47 -0
  67. package/framework/skills/level-1-workflows/morph-phase-plan/SKILL.md +254 -0
  68. package/framework/skills/level-1-workflows/{phase-setup → morph-phase-setup}/SKILL.md +50 -3
  69. package/framework/skills/level-1-workflows/{phase-tasks → morph-phase-tasks}/SKILL.md +48 -11
  70. package/framework/skills/level-1-workflows/{phase-tasks → morph-phase-tasks}/scripts/validate-tasks.mjs +3 -3
  71. package/framework/skills/level-1-workflows/{phase-uiux → morph-phase-uiux}/SKILL.md +46 -11
  72. package/framework/skills/level-1-workflows/morph-scope-escalation/SKILL.md +97 -0
  73. package/framework/standards/STANDARDS.json +640 -88
  74. package/framework/standards/infrastructure/vercel/vercel-database.md +106 -0
  75. package/framework/standards/integration/mcp/mcp-tools.md +25 -7
  76. package/framework/templates/REGISTRY.json +1825 -1909
  77. package/framework/templates/context/CONTEXT-FEATURE.md +276 -276
  78. package/framework/templates/docs/onboarding.md +3 -7
  79. package/package.json +2 -7
  80. package/src/commands/agents/dispatch-agents.js +104 -6
  81. package/src/commands/mcp/mcp-setup.js +39 -2
  82. package/src/commands/phase/phase-reset.js +74 -0
  83. package/src/commands/project/doctor.js +34 -51
  84. package/src/commands/project/init.js +1 -1
  85. package/src/commands/project/status.js +2 -2
  86. package/src/commands/project/update.js +381 -365
  87. package/src/commands/project/worktree.js +154 -0
  88. package/src/commands/scope/escalate.js +215 -0
  89. package/src/commands/state/advance-phase.js +132 -68
  90. package/src/commands/state/approve.js +2 -2
  91. package/src/commands/state/index.js +7 -8
  92. package/src/commands/state/phase-runner.js +1 -1
  93. package/src/commands/state/state.js +61 -6
  94. package/src/commands/task/expand.js +100 -0
  95. package/src/commands/tasks/task.js +78 -99
  96. package/src/commands/templates/template-render.js +93 -173
  97. package/src/commands/trust/trust.js +26 -21
  98. package/src/core/paths/output-schema.js +19 -3
  99. package/src/core/state/phase-state-machine.js +7 -4
  100. package/src/core/state/state-manager.js +32 -57
  101. package/src/core/workflows/workflow-detector.js +9 -87
  102. package/src/lib/detectors/claude-config-detector.js +93 -347
  103. package/src/lib/detectors/design-system-detector.js +189 -189
  104. package/src/lib/detectors/index.js +155 -57
  105. package/src/lib/generators/context-generator.js +2 -2
  106. package/src/lib/installers/mcp-installer.js +37 -5
  107. package/src/lib/phase-chain/phase-validator.js +336 -0
  108. package/src/lib/scope/impact-analyzer.js +106 -0
  109. package/src/lib/stack/stack-profile.js +88 -0
  110. package/src/lib/tasks/task-classifier.js +16 -0
  111. package/src/lib/tasks/task-parser.js +1 -1
  112. package/src/lib/tasks/test-runner.js +77 -0
  113. package/src/lib/trust/trust-manager.js +32 -144
  114. package/src/lib/validators/shared/emit-validator-dispatch.js +64 -0
  115. package/src/lib/validators/spec-validator.js +58 -4
  116. package/src/lib/validators/validation-runner.js +23 -11
  117. package/src/scripts/setup-infra.js +255 -224
  118. package/src/utils/agents-installer.js +34 -14
  119. package/src/utils/banner.js +1 -1
  120. package/src/utils/claude-settings-manager.js +1 -1
  121. package/src/utils/file-copier.js +1 -1
  122. package/src/utils/hooks-installer.js +272 -8
  123. package/framework/hooks/dev/check-sync-health.js +0 -117
  124. package/framework/hooks/dev/guard-version-numbers.js +0 -57
  125. package/framework/hooks/dev/sync-standards-registry.js +0 -60
  126. package/framework/hooks/dev/sync-template-registry.js +0 -60
  127. package/framework/hooks/dev/validate-skill-format.js +0 -70
  128. package/framework/hooks/dev/validate-standard-format.js +0 -73
  129. package/framework/skills/level-1-workflows/phase-clarify/SKILL.md +0 -190
  130. package/framework/skills/level-1-workflows/phase-design/SKILL.md +0 -366
  131. package/framework/templates/meta-prompts/hops/hop-retry.md +0 -78
  132. package/framework/templates/meta-prompts/hops/hop-validation.md +0 -97
  133. package/framework/templates/meta-prompts/hops/hop-wrapper.md +0 -36
  134. package/framework/workflows/configs/design-impl.json +0 -49
  135. package/framework/workflows/configs/express.json +0 -45
  136. package/framework/workflows/configs/fast-track.json +0 -42
  137. package/framework/workflows/configs/full-morph.json +0 -79
  138. package/framework/workflows/configs/fusion.json +0 -39
  139. package/framework/workflows/configs/long-running.json +0 -33
  140. package/framework/workflows/configs/spec-only.json +0 -43
  141. package/framework/workflows/configs/ui-refresh.json +0 -49
  142. package/framework/workflows/configs/zero-touch.json +0 -82
  143. package/src/commands/project/index.js +0 -8
  144. package/src/commands/project/monitor.js +0 -295
  145. package/src/commands/project/tutorial.js +0 -115
  146. package/src/commands/state/validate-phase.js +0 -238
  147. package/src/commands/templates/generate-contracts.js +0 -445
  148. package/src/core/index.js +0 -10
  149. package/src/core/orchestrator.js +0 -171
  150. package/src/core/registry/command-registry.js +0 -28
  151. package/src/core/registry/index.js +0 -8
  152. package/src/core/registry/validator-registry.js +0 -204
  153. package/src/core/state/index.js +0 -8
  154. package/src/core/templates/index.js +0 -9
  155. package/src/core/templates/template-data-sources.js +0 -325
  156. package/src/core/templates/template-validator.js +0 -296
  157. package/src/core/workflows/index.js +0 -7
  158. package/src/generator/config-generator.js +0 -206
  159. package/src/generator/templates/config.json.template +0 -40
  160. package/src/generator/templates/project.md.template +0 -67
  161. package/src/lib/agents/micro-agent-factory.js +0 -161
  162. package/src/lib/analysis/complexity-analyzer.js +0 -441
  163. package/src/lib/analysis/index.js +0 -7
  164. package/src/lib/analytics/analytics-engine.js +0 -345
  165. package/src/lib/checkpoints/checkpoint-hooks.js +0 -298
  166. package/src/lib/checkpoints/index.js +0 -7
  167. package/src/lib/context/context-bundler.js +0 -241
  168. package/src/lib/context/context-optimizer.js +0 -212
  169. package/src/lib/context/context-tracker.js +0 -273
  170. package/src/lib/context/core-four-tracker.js +0 -201
  171. package/src/lib/context/mcp-optimizer.js +0 -200
  172. package/src/lib/detectors/config-detector.js +0 -223
  173. package/src/lib/detectors/standards-generator.js +0 -335
  174. package/src/lib/detectors/structure-detector.js +0 -275
  175. package/src/lib/execution/fusion-executor.js +0 -304
  176. package/src/lib/execution/parallel-executor.js +0 -270
  177. package/src/lib/hooks/stop-hook-executor.js +0 -286
  178. package/src/lib/hops/hop-composer.js +0 -221
  179. package/src/lib/monitor/agent-resolver.js +0 -144
  180. package/src/lib/monitor/renderer.js +0 -230
  181. package/src/lib/orchestration/index.js +0 -7
  182. package/src/lib/orchestration/team-orchestrator.js +0 -404
  183. package/src/lib/phase-chain/eligibility-checker.js +0 -243
  184. package/src/lib/threads/thread-coordinator.js +0 -238
  185. package/src/lib/threads/thread-manager.js +0 -317
  186. package/src/lib/tracking/artifact-trail.js +0 -202
  187. package/src/sanitizer/context-sanitizer.js +0 -221
  188. package/src/sanitizer/patterns.js +0 -163
  189. package/src/scanner/project-scanner.js +0 -242
  190. package/src/ui/diff-display.js +0 -91
  191. package/src/ui/interactive-wizard.js +0 -96
  192. package/src/ui/user-review.js +0 -211
  193. package/src/ui/wizard-questions.js +0 -188
  194. package/src/utils/color-utils.js +0 -70
  195. package/src/utils/process-handler.js +0 -97
  196. package/src/writer/file-writer.js +0 -86
  197. /package/framework/skills/level-0-meta/{brainstorming → morph-brainstorming}/references/proposal-example.md +0 -0
  198. /package/framework/skills/level-0-meta/{code-review → morph-code-review}/references/review-example.md +0 -0
  199. /package/framework/skills/level-0-meta/{code-review → morph-code-review}/references/review-guidelines.md +0 -0
  200. /package/framework/skills/level-0-meta/{code-review → morph-code-review}/scripts/scan-csharp.mjs +0 -0
  201. /package/framework/skills/level-0-meta/{code-review-nextjs → morph-code-review-nextjs}/references/review-example-nextjs.md +0 -0
  202. /package/framework/skills/level-0-meta/{code-review-nextjs → morph-code-review-nextjs}/scripts/scan-nextjs.mjs +0 -0
  203. /package/framework/skills/level-0-meta/{frontend-review → morph-frontend-review}/scripts/scan-accessibility.mjs +0 -0
  204. /package/framework/skills/level-0-meta/{post-implementation → morph-post-implementation}/scripts/detect-dev-server.mjs +0 -0
  205. /package/framework/skills/level-0-meta/{post-implementation → morph-post-implementation}/scripts/detect-stack.mjs +0 -0
  206. /package/framework/skills/level-0-meta/{terminal-title → morph-terminal-title}/scripts/set_title.sh +0 -0
  207. /package/framework/skills/level-1-workflows/{phase-clarify → morph-phase-clarify}/references/clarifications-example.md +0 -0
  208. /package/framework/skills/level-1-workflows/{phase-design → morph-phase-design}/references/architecture-analysis-guide.md +0 -0
  209. /package/framework/skills/level-1-workflows/{phase-design → morph-phase-design}/references/spec-authoring-guide.md +0 -0
  210. /package/framework/skills/level-1-workflows/{phase-design → morph-phase-design}/references/spec-example.md +0 -0
  211. /package/framework/skills/level-1-workflows/{phase-implement → morph-phase-implement}/references/recap-example.md +0 -0
  212. /package/framework/skills/level-1-workflows/{phase-implement → morph-phase-implement}/references/vsa-implementation-guide.md +0 -0
  213. /package/framework/skills/level-1-workflows/{phase-tasks → morph-phase-tasks}/references/task-planning-patterns.md +0 -0
  214. /package/framework/skills/level-1-workflows/{phase-tasks → morph-phase-tasks}/references/tasks-example.md +0 -0
@@ -1,78 +0,0 @@
1
- # HOP Retry — Attempt {{RETRY_COUNT}}/{{MAX_RETRIES}}
2
-
3
- You are retrying a previously failed task. This HOP provides failure context and adjusted guidance.
4
-
5
- ## Retry Context
6
- - Feature: {{FEATURE_NAME}}
7
- - Agent: {{AGENT_ID}}
8
- - Attempt: {{RETRY_COUNT}} of {{MAX_RETRIES}}
9
- - Original task: {{TASK_ID}}
10
-
11
- ## Previous Failure Analysis
12
-
13
- ### What Failed
14
- {{FAILURE_DESCRIPTION}}
15
-
16
- ### Error Details
17
- ```
18
- {{ERROR_DETAILS}}
19
- ```
20
-
21
- ### What Was Tried
22
- {{PREVIOUS_ATTEMPTS}}
23
-
24
- ## Adjusted Approach for This Attempt
25
-
26
- {{#if RETRY_COUNT == 1}}
27
- ### First Retry: Minor Adjustments
28
- - Review the error message carefully
29
- - Check standards compliance (most common cause)
30
- - Verify file paths and imports
31
- - Try the same approach with the specific error fixed
32
- {{/if}}
33
-
34
- {{#if RETRY_COUNT == 2}}
35
- ### Second Retry: Alternative Approach
36
- - The direct approach failed twice — try an alternative
37
- - Simplify: can you achieve the goal with less complexity?
38
- - Check if dependencies are available (imports, packages)
39
- - Consider a different implementation pattern
40
- {{/if}}
41
-
42
- {{#if RETRY_COUNT == 3}}
43
- ### Final Retry: Escalation-Ready
44
- - This is the last automated attempt
45
- - Try the simplest possible implementation
46
- - If this fails, provide detailed diagnostic info for human escalation
47
- - Document exactly why each approach failed
48
- {{/if}}
49
-
50
- ## Original Task
51
- {{ORIGINAL_TASK_DESCRIPTION}}
52
-
53
- ## Constraints (Unchanged)
54
- {{CONSTRAINTS}}
55
-
56
- ## How to Report
57
-
58
- If this attempt succeeds:
59
- ```
60
- RETRY SUCCESS
61
- Attempt: {{RETRY_COUNT}}
62
- Fixed: [what you changed from previous attempt]
63
- Files: [created/modified]
64
- ```
65
-
66
- If this attempt fails:
67
- ```
68
- RETRY FAILED
69
- Attempt: {{RETRY_COUNT}}
70
- Error: [exact error message]
71
- Root cause hypothesis: [your analysis]
72
- Escalation needed: [what human decision is required]
73
- ```
74
-
75
- {{#if RETRY_COUNT >= MAX_RETRIES}}
76
- ## ⚠️ Final Attempt
77
- If this attempt fails, the task will be escalated to the user. Provide maximum diagnostic detail.
78
- {{/if}}
@@ -1,97 +0,0 @@
1
- # HOP Validation — {{VALIDATION_TYPE}}
2
-
3
- You are a **Validation Agent** running a focused review of work produced by another agent.
4
-
5
- ## Validation Identity
6
- - Validator Type: {{VALIDATION_TYPE}}
7
- - Reviewing Agent: {{REVIEWED_AGENT}}
8
- - Feature: {{FEATURE_NAME}}
9
- - Checkpoint: {{CHECKPOINT_NUM}}
10
-
11
- ## What to Validate
12
-
13
- ### Files Under Review
14
- {{FILES_TO_REVIEW}}
15
-
16
- ### Validation Criteria
17
- {{VALIDATION_CRITERIA}}
18
-
19
- ## Validation Checklist
20
-
21
- {{#if IS_ARCHITECTURE}}
22
- ### Architecture Validation
23
- - [ ] No DbContext injected directly in Blazor components (use IDbContextFactory)
24
- - [ ] Services registered in correct DI order
25
- - [ ] No async void (except event handlers)
26
- - [ ] Clean Architecture layers respected (no domain depending on infrastructure)
27
- - [ ] No circular dependencies between services
28
- - [ ] Repository pattern used for data access
29
- {{/if}}
30
-
31
- {{#if IS_SECURITY}}
32
- ### Security Validation
33
- - [ ] No hardcoded secrets, passwords, API keys, or connection strings
34
- - [ ] All user inputs validated (FluentValidation or data annotations)
35
- - [ ] SQL queries use parameterization (no string interpolation in queries)
36
- - [ ] No XSS vulnerabilities (no raw HTML rendering of user input)
37
- - [ ] Authentication required on protected endpoints
38
- - [ ] Authorization checks in place (not just authentication)
39
- - [ ] Sensitive data not logged
40
- {{/if}}
41
-
42
- {{#if IS_DESIGN_SYSTEM}}
43
- ### Design System Validation
44
- - [ ] Only CSS variables used (no hardcoded hex colors)
45
- - [ ] Spacing in multiples of 4px (4, 8, 12, 16, 24, 32, 48, 64)
46
- - [ ] Typography uses design tokens (`var(--font-size-*)`)
47
- - [ ] Components use design system components (Fluent UI / MudBlazor / shadcn)
48
- - [ ] No inline styles (unless required for dynamic values)
49
- - [ ] Responsive breakpoints used correctly
50
- {{/if}}
51
-
52
- {{#if IS_PACKAGES}}
53
- ### Package Validation
54
- - [ ] No duplicate package references in .csproj
55
- - [ ] No version conflicts (NU1605/NU1608 warnings)
56
- - [ ] Azure.Identity explicitly specified (not transitively assumed)
57
- - [ ] All packages compatible with .NET 10
58
- - [ ] No deprecated packages used
59
- {{/if}}
60
-
61
- ## Output Format
62
-
63
- Provide a structured validation report:
64
-
65
- ```
66
- VALIDATION REPORT
67
- Type: {{VALIDATION_TYPE}}
68
- Feature: {{FEATURE_NAME}}
69
- Checkpoint: {{CHECKPOINT_NUM}}
70
- Status: [PASSED | FAILED | WARNING]
71
-
72
- Errors (block progress):
73
- - [list each error with file:line reference]
74
-
75
- Warnings (non-blocking):
76
- - [list each warning with recommendation]
77
-
78
- Passed Checks:
79
- - [list checks that passed]
80
-
81
- Files Reviewed: X
82
- Issues Found: Y errors, Z warnings
83
- ```
84
-
85
- ## Severity Levels
86
-
87
- | Severity | Meaning | Blocks Progress? |
88
- |----------|---------|-----------------|
89
- | `error` | Violates critical standard | ✅ Yes |
90
- | `warning` | Suboptimal but functional | ⚠️ No |
91
- | `info` | Suggestion for improvement | ℹ️ No |
92
-
93
- ## Escalation
94
- If you find errors that require design decisions (not just fixes), flag with:
95
- ```
96
- ESCALATION NEEDED: [description of decision required]
97
- ```
@@ -1,36 +0,0 @@
1
- # HOP Wrapper — {{HOP_NAME}}
2
-
3
- This is a **Higher-Order Prompt (HOP)** that wraps another prompt with additional context and constraints.
4
-
5
- ## Wrapped Prompt
6
- {{INNER_PROMPT}}
7
-
8
- ## Additional Context Injected by HOP
9
-
10
- ### Feature Context
11
- - Feature: {{FEATURE_NAME}}
12
- - Phase: {{PHASE}}
13
- - Agent: {{AGENT_ID}}
14
-
15
- ### Standards Override
16
- {{#if STANDARDS_OVERRIDE}}
17
- For this execution, prioritize these standards over defaults:
18
- {{STANDARDS_OVERRIDE}}
19
- {{/if}}
20
-
21
- ### Pre-Execution Checklist
22
- Before executing the wrapped prompt, verify:
23
- {{PRE_CONDITIONS}}
24
-
25
- ### Post-Execution Checklist
26
- After executing the wrapped prompt, verify:
27
- {{POST_CONDITIONS}}
28
-
29
- ## HOP Metadata
30
- - HOP Type: wrapper
31
- - Version: {{HOP_VERSION}}
32
- - Created: {{DATE}}
33
- - Applied to: {{AGENT_ID}}
34
-
35
- ## Execution Note
36
- The agent receiving this HOP should execute the inner prompt with the additional context above applied throughout their work. The pre/post checklists are mandatory checkpoints.
@@ -1,49 +0,0 @@
1
- {
2
- "id": "design-impl",
3
- "name": "Design Implementation (Prototype → Code)",
4
- "description": "Convert HTML prototype or mockups to functional code",
5
- "criteria": {
6
- "hasPrototype": true,
7
- "prototypeFormats": ["html", "figma", "mockups", "screenshots"]
8
- },
9
- "keywords": [
10
- "prototipo",
11
- "prototype",
12
- "figma",
13
- "html para",
14
- "html to",
15
- "convert html",
16
- "converter design",
17
- "convert design",
18
- "replicar",
19
- "replicate",
20
- "from design",
21
- "from mockup",
22
- "mockup",
23
- "screenshot",
24
- "wireframe"
25
- ],
26
- "phases": {
27
- "run": ["prototype-analysis", "tasks", "implement"],
28
- "skip": ["proposal", "setup", "uiux", "design", "clarify", "sync"],
29
- "combined": {
30
- "prototype-analysis": ["proposal", "design"]
31
- }
32
- },
33
- "pausePoints": [
34
- {
35
- "phase": "prototype-analysis",
36
- "question": "Confirm HTML → CSS mapping?"
37
- },
38
- {
39
- "phase": "tasks",
40
- "question": "Approve screen implementation list?"
41
- }
42
- ],
43
- "outputs": {
44
- "required": ["recap.md"],
45
- "optional": ["design-system.css"],
46
- "skip": ["proposal.md", "spec.md", "contracts.cs"]
47
- },
48
- "priority": 1
49
- }
@@ -1,45 +0,0 @@
1
- {
2
- "id": "express",
3
- "name": "Express (Backend Focus)",
4
- "description": "Streamlined workflow for backend changes - skips UI/UX and Clarify phases",
5
- "criteria": {
6
- "maxFiles": 20,
7
- "maxLines": 500,
8
- "maxComponents": 0,
9
- "noInfrastructure": false,
10
- "noArchitecturalDecisions": false
11
- },
12
- "keywords": [
13
- "api",
14
- "endpoint",
15
- "service",
16
- "repository",
17
- "migration",
18
- "background job",
19
- "integration",
20
- "backend",
21
- "data",
22
- "queue",
23
- "webhook"
24
- ],
25
- "phases": {
26
- "run": ["proposal", "setup", "design", "tasks", "implement"],
27
- "skip": ["uiux", "clarify", "sync"],
28
- "combined": {}
29
- },
30
- "pausePoints": [
31
- {
32
- "phase": "design",
33
- "question": "Approve spec and contracts before task breakdown?"
34
- },
35
- {
36
- "phase": "tasks",
37
- "question": "Approve task breakdown before implementation?"
38
- }
39
- ],
40
- "outputs": {
41
- "required": ["proposal", "spec", "contracts", "tasks"],
42
- "optional": ["schema-analysis", "decisions", "recap"]
43
- },
44
- "priority": 3
45
- }
@@ -1,42 +0,0 @@
1
- {
2
- "id": "fast-track",
3
- "name": "Fast Track (Trivial)",
4
- "description": "Quick fixes, small bugs, CSS tweaks - minimal overhead",
5
- "criteria": {
6
- "maxFiles": 3,
7
- "maxLines": 50,
8
- "maxComponents": 0,
9
- "noInfrastructure": true,
10
- "noArchitecturalDecisions": true
11
- },
12
- "keywords": [
13
- "bug",
14
- "fix",
15
- "corrigir",
16
- "ajustar",
17
- "hotfix",
18
- "edge case",
19
- "cor",
20
- "css",
21
- "typo",
22
- "correction"
23
- ],
24
- "phases": {
25
- "run": ["quick-analysis", "implement"],
26
- "skip": ["proposal", "setup", "uiux", "design", "clarify", "tasks", "sync"],
27
- "combined": {
28
- "quick-analysis": ["proposal", "setup", "design"]
29
- }
30
- },
31
- "pausePoints": [
32
- {
33
- "phase": "quick-analysis",
34
- "question": "Approve or adjust solution?"
35
- }
36
- ],
37
- "outputs": {
38
- "required": [],
39
- "optional": ["commit-message"]
40
- },
41
- "priority": 1
42
- }
@@ -1,79 +0,0 @@
1
- {
2
- "id": "full-morph",
3
- "name": "Full MORPH (High Complexity)",
4
- "description": "Complete system features - all phases mandatory, strategic decisions",
5
- "criteria": {
6
- "minFiles": 10,
7
- "minLines": 500,
8
- "minComponents": 3,
9
- "infrastructure": true,
10
- "architecturalDecisions": true
11
- },
12
- "keywords": [
13
- "sistema",
14
- "system",
15
- "autenticação",
16
- "authentication",
17
- "integração",
18
- "integration",
19
- "integrate",
20
- "pattern",
21
- "cqrs",
22
- "subsistema",
23
- "subsystem",
24
- "architecture",
25
- "infraestrutura",
26
- "infrastructure",
27
- "complete",
28
- "completo",
29
- "complex",
30
- "complexo",
31
- "full",
32
- "entire"
33
- ],
34
- "phases": {
35
- "run": ["context", "proposal", "setup", "uiux", "design", "clarify", "tasks", "implement", "sync"],
36
- "skip": [],
37
- "combined": {}
38
- },
39
- "pausePoints": [
40
- {
41
- "phase": "proposal",
42
- "question": "Approve proposal? (3 items: 1 action + 1 question + 1 suggestion)"
43
- },
44
- {
45
- "phase": "uiux",
46
- "question": "Approve wireframes/UI design system?",
47
- "condition": "hasUIAgents"
48
- },
49
- {
50
- "phase": "design",
51
- "question": "Approve complete spec + contracts + decisions?"
52
- },
53
- {
54
- "phase": "tasks",
55
- "question": "Approve task breakdown with dependencies?"
56
- },
57
- {
58
- "phase": "sync",
59
- "question": "Approve promotion of decisions to project standards?"
60
- }
61
- ],
62
- "outputs": {
63
- "required": [
64
- "proposal.md",
65
- "ui-design-system.md",
66
- "ui-mockups.md",
67
- "ui-components.md",
68
- "ui-flows.md",
69
- "spec.md",
70
- "contracts.cs",
71
- "tasks.json",
72
- "decisions.md",
73
- "recap.md"
74
- ],
75
- "optional": [],
76
- "skip": []
77
- },
78
- "priority": 3
79
- }
@@ -1,39 +0,0 @@
1
- {
2
- "id": "fusion",
3
- "name": "Fusion Workflow (F-Thread)",
4
- "description": "Run N agents in parallel, aggregate results using best-of-n or consensus strategy",
5
- "priority": 3,
6
- "keywords": [
7
- "uncertainty", "uncertain", "critical decision", "compare approaches",
8
- "best approach", "prototype", "explore options", "which is better",
9
- "not sure how", "multiple solutions", "benchmark", "evaluate options",
10
- "decision point", "architecture decision"
11
- ],
12
- "criteria": {
13
- "minFiles": 1,
14
- "maxFiles": 20
15
- },
16
- "phases": {
17
- "run": ["proposal", "design", "implement", "sync"],
18
- "skip": ["setup", "uiux", "clarify", "tasks"]
19
- },
20
- "threadType": "fusion",
21
- "execution": {
22
- "agentCount": 3,
23
- "strategy": "best-of-n",
24
- "aggregation": {
25
- "best-of-n": {
26
- "scoringCriteria": ["completeness", "checkpoint_compliance", "code_quality"],
27
- "selectTop": 1
28
- },
29
- "consensus": {
30
- "mergeOverlapping": true
31
- },
32
- "manual-select": {
33
- "presentAll": true,
34
- "requireUserChoice": true
35
- }
36
- }
37
- },
38
- "outputs": ["proposal.md", "decisions.md", "fusion-results.md"]
39
- }
@@ -1,33 +0,0 @@
1
- {
2
- "id": "long-running",
3
- "name": "Long-Running Workflow (L-Thread)",
4
- "description": "Autonomous implementation with stop hooks every 30 minutes for validation",
5
- "priority": 3,
6
- "keywords": [
7
- "autonomous", "large scope", "full system", "end to end", "e2e",
8
- "complete implementation", "no interruption", "long running", "unattended",
9
- "extended", "batch", "automated", "hands-off", "without interruption"
10
- ],
11
- "criteria": {
12
- "minFiles": 10
13
- },
14
- "phases": {
15
- "run": ["proposal", "design", "tasks", "implement", "sync"],
16
- "skip": ["setup", "uiux", "clarify"]
17
- },
18
- "threadType": "long-running",
19
- "execution": {
20
- "stopHooks": {
21
- "enabled": true,
22
- "intervalMinutes": 30,
23
- "maxRetries": 5,
24
- "hooks": ["validate-and-continue", "validate-checkpoints"],
25
- "onFailure": "provide-feedback-and-continue"
26
- },
27
- "checkpoints": {
28
- "frequency": 3,
29
- "blockOnFailure": true
30
- }
31
- },
32
- "outputs": ["proposal.md", "spec.md", "tasks.json", "decisions.md", "recap.md"]
33
- }
@@ -1,43 +0,0 @@
1
- {
2
- "id": "spec-only",
3
- "name": "Spec Only (Documentation)",
4
- "description": "Documentation-driven workflow - produces specs and plans without implementation",
5
- "criteria": {
6
- "maxFiles": 0,
7
- "maxLines": 0,
8
- "maxComponents": 0,
9
- "noInfrastructure": false,
10
- "noArchitecturalDecisions": false
11
- },
12
- "keywords": [
13
- "spec",
14
- "specification",
15
- "document",
16
- "plan",
17
- "architecture",
18
- "design",
19
- "rfc",
20
- "proposal",
21
- "planning"
22
- ],
23
- "phases": {
24
- "run": ["proposal", "setup", "uiux", "design", "clarify", "tasks"],
25
- "skip": ["implement", "sync"],
26
- "combined": {}
27
- },
28
- "pausePoints": [
29
- {
30
- "phase": "design",
31
- "question": "Approve technical specification?"
32
- },
33
- {
34
- "phase": "tasks",
35
- "question": "Approve task breakdown? (Implementation will not be executed)"
36
- }
37
- ],
38
- "outputs": {
39
- "required": ["proposal", "spec", "contracts", "decisions", "tasks"],
40
- "optional": ["schema-analysis", "clarifications", "ui-design-system", "ui-mockups"]
41
- },
42
- "priority": 5
43
- }
@@ -1,49 +0,0 @@
1
- {
2
- "id": "ui-refresh",
3
- "name": "UI Refresh (Visual Redesign)",
4
- "description": "Visual changes only - no business logic modifications",
5
- "criteria": {
6
- "hasExistingPages": true,
7
- "onlyVisualChanges": true,
8
- "noBusinessLogic": true,
9
- "noInfrastructure": true
10
- },
11
- "keywords": [
12
- "redesign",
13
- "redesenhar",
14
- "bonito",
15
- "estetica",
16
- "aesthetic",
17
- "modernizar",
18
- "modernize",
19
- "restyling",
20
- "refresh visual",
21
- "refresh ui",
22
- "make prettier",
23
- "look better"
24
- ],
25
- "phases": {
26
- "run": ["visual-analysis", "design-system", "implement"],
27
- "skip": ["proposal", "setup", "uiux", "clarify", "tasks", "sync"],
28
- "combined": {
29
- "visual-analysis": ["proposal", "design"],
30
- "design-system": ["uiux"]
31
- }
32
- },
33
- "pausePoints": [
34
- {
35
- "phase": "visual-analysis",
36
- "question": "Choose aesthetic direction?"
37
- },
38
- {
39
- "phase": "design-system",
40
- "question": "Approve CSS components checklist?"
41
- }
42
- ],
43
- "outputs": {
44
- "required": ["design-refresh-checklist.md", "design-system.css", "recap.md"],
45
- "optional": [],
46
- "skip": ["proposal.md", "spec.md", "contracts.cs", "tasks.json"]
47
- },
48
- "priority": 2
49
- }
@@ -1,82 +0,0 @@
1
- {
2
- "id": "zero-touch",
3
- "name": "Zero-Touch Execution",
4
- "description": "Fully autonomous execution with auto-approval gates. Requires maximum trust level (>95% checkpoint pass rate).",
5
- "version": "3.0.0",
6
-
7
- "eligibility": {
8
- "trustLevel": "maximum",
9
- "minCheckpoints": 10,
10
- "minPassRate": 0.95,
11
- "requiredPhases": ["proposal", "design", "tasks"],
12
- "blockedIfHas": ["manual_override_pending", "escalation_required"]
13
- },
14
-
15
- "autoApproval": {
16
- "design": true,
17
- "tasks": true,
18
- "proposal": true,
19
- "enabled": true,
20
- "auditLog": true
21
- },
22
-
23
- "autoCommit": {
24
- "enabled": true,
25
- "convention": "conventional-commits",
26
- "signOff": "morph-spec-agent",
27
- "requirePassingCheckpoints": true
28
- },
29
-
30
- "rollback": {
31
- "enabled": true,
32
- "onCheckpointFailure": true,
33
- "strategy": "git-revert",
34
- "maxRollbackDepth": 3
35
- },
36
-
37
- "escalation": {
38
- "triggers": [
39
- "checkpoint_failed_3_times",
40
- "architecture_error",
41
- "security_error",
42
- "circular_dependency_detected",
43
- "out_of_scope_change"
44
- ],
45
- "action": "pause_and_notify"
46
- },
47
-
48
- "phases": {
49
- "run": ["proposal", "design", "clarify", "tasks", "implement", "sync"],
50
- "skip": ["uiux"],
51
- "pauses": []
52
- },
53
-
54
- "monitoring": {
55
- "checkpointFrequency": 3,
56
- "stopHooks": {
57
- "enabled": true,
58
- "interval": 30,
59
- "hooks": ["validate-and-continue", "validate-checkpoints"]
60
- },
61
- "analyticsTracking": true
62
- },
63
-
64
- "restrictions": {
65
- "maxFilesPerSession": 50,
66
- "noInfraChanges": false,
67
- "noDatabaseMigrations": false,
68
- "requireHumanForBreakingChanges": true,
69
- "requireHumanForSchemaChanges": false
70
- },
71
-
72
- "phaseChain": {
73
- "enabled": true,
74
- "pauseOn": ["blocked_tasks", "escalation_required", "low_pass_rate"],
75
- "continueOn": ["missing_optional_outputs"],
76
- "maxAutoPhases": 6
77
- },
78
-
79
- "keywords": ["zero-touch", "autonomous", "fully automated", "hands-off", "auto-pilot"],
80
-
81
- "priority": 5
82
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Project-Level Commands
3
- */
4
- export { initCommand } from './init.js';
5
- export { doctorCommand } from './doctor.js';
6
- export { updateCommand } from './update.js';
7
- export { tutorialCommand } from './tutorial.js';
8
- export { monitorCommand } from './monitor.js';