@polymorphism-tech/morph-spec 4.9.0 → 4.10.1

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 (164) hide show
  1. package/README.md +2 -2
  2. package/bin/morph-spec.js +30 -0
  3. package/bin/task-manager.js +34 -22
  4. package/claude-plugin.json +1 -1
  5. package/docs/CHEATSHEET.md +1 -1
  6. package/docs/QUICKSTART.md +1 -1
  7. package/framework/CLAUDE.md +35 -98
  8. package/framework/agents/backend/api-designer.md +3 -0
  9. package/framework/agents/backend/dotnet-senior.md +3 -0
  10. package/framework/agents/backend/ef-modeler.md +2 -0
  11. package/framework/agents/backend/hangfire-orchestrator.md +2 -0
  12. package/framework/agents/backend/ms-agent-expert.md +2 -0
  13. package/framework/agents/frontend/blazor-builder.md +2 -0
  14. package/framework/agents/frontend/nextjs-expert.md +2 -0
  15. package/framework/agents/infrastructure/azure-architect.md +2 -0
  16. package/framework/agents/infrastructure/azure-deploy-specialist.md +2 -0
  17. package/framework/agents/infrastructure/bicep-architect.md +2 -0
  18. package/framework/agents/infrastructure/container-specialist.md +2 -0
  19. package/framework/agents/infrastructure/devops-engineer.md +3 -0
  20. package/framework/agents/infrastructure/infra-architect.md +3 -0
  21. package/framework/agents/integrations/asaas-financial.md +2 -0
  22. package/framework/agents/integrations/azure-identity.md +2 -0
  23. package/framework/agents/integrations/clerk-auth.md +3 -0
  24. package/framework/agents/integrations/hangfire-integration.md +2 -0
  25. package/framework/agents/integrations/resend-email.md +2 -0
  26. package/framework/agents.json +37 -7
  27. package/framework/commands/commit.md +166 -0
  28. package/framework/commands/morph-apply.md +156 -155
  29. package/framework/commands/morph-archive.md +33 -27
  30. package/framework/commands/morph-infra.md +83 -77
  31. package/framework/commands/morph-preflight.md +97 -55
  32. package/framework/commands/morph-proposal.md +131 -58
  33. package/framework/commands/morph-status.md +36 -30
  34. package/framework/commands/morph-troubleshoot.md +68 -59
  35. package/framework/hooks/claude-code/notification/approval-reminder.js +3 -2
  36. package/framework/hooks/claude-code/post-tool-use/dispatch.js +154 -31
  37. package/framework/hooks/claude-code/post-tool-use/skill-reminder.js +7 -84
  38. package/framework/hooks/claude-code/post-tool-use/validator-feedback.js +8 -17
  39. package/framework/hooks/claude-code/pre-compact/save-morph-context.js +16 -3
  40. package/framework/hooks/claude-code/pre-tool-use/enforce-phase-writes.js +4 -3
  41. package/framework/hooks/claude-code/pre-tool-use/protect-spec-files.js +3 -2
  42. package/framework/hooks/claude-code/pre-tool-use/task-tracking-guard.js +60 -0
  43. package/framework/hooks/claude-code/session-start/inject-morph-context.js +55 -2
  44. package/framework/hooks/claude-code/session-start/post-compact-restore.js +41 -0
  45. package/framework/hooks/claude-code/stop/validate-completion.js +2 -15
  46. package/framework/hooks/claude-code/user-prompt/enrich-prompt.js +23 -5
  47. package/framework/hooks/shared/compact-restore.js +100 -0
  48. package/framework/hooks/shared/dispatch-helpers.js +116 -0
  49. package/framework/hooks/shared/phase-utils.js +9 -5
  50. package/framework/hooks/shared/state-reader.js +27 -3
  51. package/framework/phases.json +30 -7
  52. package/framework/rules/csharp-standards.md +3 -0
  53. package/framework/rules/frontend-standards.md +2 -0
  54. package/framework/rules/infrastructure-standards.md +3 -0
  55. package/framework/rules/morph-workflow.md +143 -86
  56. package/framework/rules/nextjs-standards.md +2 -0
  57. package/framework/rules/testing-standards.md +3 -0
  58. package/framework/skills/level-0-meta/mcp-registry.json +86 -51
  59. package/framework/skills/level-0-meta/morph-brainstorming/SKILL.md +139 -0
  60. package/framework/skills/level-0-meta/morph-checklist/SKILL.md +42 -19
  61. package/framework/skills/level-0-meta/{code-review → morph-code-review}/SKILL.md +8 -5
  62. package/framework/skills/level-0-meta/{code-review-nextjs → morph-code-review-nextjs}/SKILL.md +8 -6
  63. package/framework/skills/level-0-meta/morph-frontend-review/SKILL.md +362 -0
  64. package/framework/skills/level-0-meta/morph-init/SKILL.md +114 -20
  65. package/framework/skills/level-0-meta/morph-post-implementation/SKILL.md +362 -0
  66. package/framework/skills/level-0-meta/morph-replicate/SKILL.md +95 -87
  67. package/framework/skills/level-0-meta/{simulation-checklist → morph-simulation-checklist}/SKILL.md +24 -0
  68. package/framework/skills/level-0-meta/{tool-usage-guide → morph-tool-usage-guide}/SKILL.md +43 -43
  69. package/framework/skills/level-0-meta/{tool-usage-guide → morph-tool-usage-guide}/references/tools-per-phase.md +1 -2
  70. package/framework/skills/level-0-meta/{verification-before-completion → morph-verification-before-completion}/SKILL.md +23 -12
  71. package/framework/skills/level-0-meta/{verification-before-completion → morph-verification-before-completion}/scripts/check-phase-outputs.mjs +2 -2
  72. package/framework/skills/level-1-workflows/morph-phase-clarify/SKILL.md +247 -0
  73. package/framework/skills/level-1-workflows/morph-phase-codebase-analysis/SKILL.md +270 -0
  74. package/framework/skills/level-1-workflows/morph-phase-design/SKILL.md +499 -0
  75. package/framework/skills/level-1-workflows/morph-phase-implement/.morph/logs/activity.json +38 -0
  76. package/framework/skills/level-1-workflows/morph-phase-implement/SKILL.md +472 -0
  77. package/framework/skills/level-1-workflows/morph-phase-implement/prompts/code-quality-reviewer-prompt.md +50 -0
  78. package/framework/skills/level-1-workflows/morph-phase-implement/prompts/implementer-prompt.md +45 -0
  79. package/framework/skills/level-1-workflows/morph-phase-implement/prompts/spec-reviewer-prompt.md +47 -0
  80. package/framework/skills/level-1-workflows/morph-phase-plan/SKILL.md +246 -0
  81. package/framework/skills/level-1-workflows/morph-phase-setup/SKILL.md +238 -0
  82. package/framework/skills/level-1-workflows/morph-phase-tasks/.morph/logs/activity.json +14 -0
  83. package/framework/skills/level-1-workflows/morph-phase-tasks/SKILL.md +312 -0
  84. package/framework/skills/level-1-workflows/{phase-tasks → morph-phase-tasks}/scripts/validate-tasks.mjs +3 -3
  85. package/framework/skills/level-1-workflows/morph-phase-uiux/SKILL.md +324 -0
  86. package/framework/skills/level-1-workflows/morph-scope-escalation/SKILL.md +146 -0
  87. package/framework/standards/integration/mcp/mcp-tools.md +25 -7
  88. package/framework/templates/docs/onboarding.md +2 -2
  89. package/package.json +3 -4
  90. package/src/commands/agents/dispatch-agents.js +50 -3
  91. package/src/commands/mcp/mcp-setup.js +39 -2
  92. package/src/commands/phase/phase-reset.js +74 -0
  93. package/src/commands/project/doctor.js +26 -7
  94. package/src/commands/project/update.js +4 -4
  95. package/src/commands/scope/escalate.js +215 -0
  96. package/src/commands/state/advance-phase.js +27 -53
  97. package/src/commands/state/state.js +1 -1
  98. package/src/commands/task/expand.js +100 -0
  99. package/src/core/paths/output-schema.js +4 -3
  100. package/src/core/state/phase-state-machine.js +7 -4
  101. package/src/core/state/state-manager.js +4 -3
  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 +22 -16
  108. package/src/lib/scope/impact-analyzer.js +106 -0
  109. package/src/lib/stack-filter.js +58 -0
  110. package/src/lib/tasks/task-parser.js +1 -1
  111. package/src/lib/validators/shared/emit-validator-dispatch.js +64 -0
  112. package/src/scripts/setup-infra.js +68 -18
  113. package/src/utils/agents-installer.js +51 -17
  114. package/src/utils/claude-md-injector.js +90 -0
  115. package/src/utils/file-copier.js +0 -1
  116. package/src/utils/hooks-installer.js +16 -5
  117. package/src/utils/skills-installer.js +67 -7
  118. package/CLAUDE.md +0 -98
  119. package/framework/memory/patterns-learned.md +0 -766
  120. package/framework/skills/level-0-meta/brainstorming/SKILL.md +0 -137
  121. package/framework/skills/level-0-meta/frontend-review/SKILL.md +0 -359
  122. package/framework/skills/level-0-meta/post-implementation/SKILL.md +0 -362
  123. package/framework/skills/level-0-meta/terminal-title/SKILL.md +0 -61
  124. package/framework/skills/level-0-meta/terminal-title/scripts/set_title.sh +0 -65
  125. package/framework/skills/level-1-workflows/phase-clarify/SKILL.md +0 -216
  126. package/framework/skills/level-1-workflows/phase-codebase-analysis/SKILL.md +0 -252
  127. package/framework/skills/level-1-workflows/phase-design/SKILL.md +0 -383
  128. package/framework/skills/level-1-workflows/phase-implement/SKILL.md +0 -492
  129. package/framework/skills/level-1-workflows/phase-setup/SKILL.md +0 -195
  130. package/framework/skills/level-1-workflows/phase-tasks/SKILL.md +0 -271
  131. package/framework/skills/level-1-workflows/phase-uiux/SKILL.md +0 -286
  132. package/src/commands/project/index.js +0 -8
  133. package/src/core/index.js +0 -10
  134. package/src/core/state/index.js +0 -8
  135. package/src/core/templates/index.js +0 -9
  136. package/src/core/templates/template-data-sources.js +0 -325
  137. package/src/core/workflows/index.js +0 -7
  138. package/src/lib/detectors/config-detector.js +0 -223
  139. package/src/lib/detectors/standards-generator.js +0 -335
  140. package/src/lib/detectors/structure-detector.js +0 -275
  141. package/src/lib/monitor/agent-resolver.js +0 -144
  142. package/src/lib/monitor/renderer.js +0 -230
  143. package/src/lib/orchestration/index.js +0 -7
  144. package/src/lib/orchestration/team-orchestrator.js +0 -404
  145. package/src/sanitizer/context-sanitizer.js +0 -221
  146. package/src/sanitizer/patterns.js +0 -163
  147. package/src/writer/file-writer.js +0 -86
  148. /package/framework/skills/level-0-meta/{brainstorming → morph-brainstorming}/references/proposal-example.md +0 -0
  149. /package/framework/skills/level-0-meta/{code-review → morph-code-review}/references/review-example.md +0 -0
  150. /package/framework/skills/level-0-meta/{code-review → morph-code-review}/references/review-guidelines.md +0 -0
  151. /package/framework/skills/level-0-meta/{code-review → morph-code-review}/scripts/scan-csharp.mjs +0 -0
  152. /package/framework/skills/level-0-meta/{code-review-nextjs → morph-code-review-nextjs}/references/review-example-nextjs.md +0 -0
  153. /package/framework/skills/level-0-meta/{code-review-nextjs → morph-code-review-nextjs}/scripts/scan-nextjs.mjs +0 -0
  154. /package/framework/skills/level-0-meta/{frontend-review → morph-frontend-review}/scripts/scan-accessibility.mjs +0 -0
  155. /package/framework/skills/level-0-meta/{post-implementation → morph-post-implementation}/scripts/detect-dev-server.mjs +0 -0
  156. /package/framework/skills/level-0-meta/{post-implementation → morph-post-implementation}/scripts/detect-stack.mjs +0 -0
  157. /package/framework/skills/level-1-workflows/{phase-clarify → morph-phase-clarify}/references/clarifications-example.md +0 -0
  158. /package/framework/skills/level-1-workflows/{phase-design → morph-phase-design}/references/architecture-analysis-guide.md +0 -0
  159. /package/framework/skills/level-1-workflows/{phase-design → morph-phase-design}/references/spec-authoring-guide.md +0 -0
  160. /package/framework/skills/level-1-workflows/{phase-design → morph-phase-design}/references/spec-example.md +0 -0
  161. /package/framework/skills/level-1-workflows/{phase-implement → morph-phase-implement}/references/recap-example.md +0 -0
  162. /package/framework/skills/level-1-workflows/{phase-implement → morph-phase-implement}/references/vsa-implementation-guide.md +0 -0
  163. /package/framework/skills/level-1-workflows/{phase-tasks → morph-phase-tasks}/references/task-planning-patterns.md +0 -0
  164. /package/framework/skills/level-1-workflows/{phase-tasks → morph-phase-tasks}/references/tasks-example.md +0 -0
@@ -1,86 +1,143 @@
1
- # MORPH-SPEC Workflow Rules
2
-
3
- > Always-active rules for all MORPH-SPEC managed projects.
4
-
5
- ---
6
-
7
- ## Spec-First Mandate
8
-
9
- **NEVER skip to code without a specification.** Every feature must progress through phases:
10
-
11
- 1. **Proposal** — User story + acceptance criteria (`0-proposal/proposal.md`)
12
- 2. **Design** — Technical spec + C# contracts + decisions (`1-design/`)
13
- 3. **Tasks** — Atomic task list (`3-tasks/tasks.md`)
14
- 4. **Implement** Code + recap (`4-implement/recap.md`)
15
-
16
- UI-heavy features also include **UI/UX** phase (`2-ui/`) between Design and Tasks.
17
-
18
- ---
19
-
20
- ## Phase Commands
21
-
22
- | Command | Purpose |
23
- |---------|---------|
24
- | `/morph-proposal {feature}` | Full spec pipeline (phases 1–4, pauses for approval) |
25
- | `/morph-apply {feature}` | Implement feature (phase 5) |
26
- | `/morph-status` | Feature dashboard |
27
-
28
- ---
29
-
30
- ## Output Paths
31
-
32
- All outputs go in `.morph/features/{feature}/`:
33
-
34
- | Phase | Path |
35
- |-------|------|
36
- | Proposal | `0-proposal/proposal.md` |
37
- | Spec | `1-design/spec.md` |
38
- | Contracts | `1-design/contracts.cs` |
39
- | Decisions | `1-design/decisions.md` |
40
- | UI Design | `2-ui/design-system.md`, `mockups.md`, `components.md`, `flows.md` |
41
- | Tasks | `3-tasks/tasks.md` |
42
- | Recap | `4-implement/recap.md` |
43
-
44
- ---
45
-
46
- ## Checkpoints
47
-
48
- Run a checkpoint every 3 completed tasks:
49
- - Validate architecture compliance
50
- - Check package versions
51
- - Scan for security issues
52
- - Verify design system adherence (UI features)
53
-
54
- ---
55
-
56
- ## Approval Gates
57
-
58
- **Design Gate:** Before moving from Design → Tasks, spec must be approved.
59
- **Implementation Gate:** Before starting implementation, task list must be approved.
60
-
61
- Check approval status: `morph-spec approval-status {feature}`
62
-
63
- ---
64
-
65
- ## Protected Files
66
-
67
- **NEVER directly edit:**
68
- - `.morph/state.json` Managed by CLI only
69
- - `.morph/framework/**` Read-only framework content
70
-
71
- ---
72
-
73
- ## Test File Policy
74
-
75
- When a test fails, always follow this order:
76
-
77
- 1. **Analyze first** — determine if the IMPLEMENTATION is wrong or the TEST SPEC is wrong
78
- 2. **Fix implementation first** — the test is the spec; trust it by default
79
- 3. **Only modify a test file if the test expectation itself is incorrect** — wrong expected value, wrong behavior modeled
80
- 4. **Before modifying any test file, explain WHY the test spec is wrong** — what the correct behavior is and why the test doesn't model it
81
-
82
- Do not modify test files to make a failing test pass when the implementation is the actual problem.
83
-
84
- ---
85
-
86
- *MORPH-SPEC by Polymorphism Tech*
1
+ ---
2
+ stacks:
3
+ - "*"
4
+ ---
5
+
6
+ # MORPH-SPEC Workflow Rules
7
+
8
+ > Always-active rules for all MORPH-SPEC managed projects.
9
+
10
+ ---
11
+
12
+ ## Spec-First Mandate
13
+
14
+ **NEVER skip to code without a specification.** Every feature must progress through phases:
15
+
16
+ 1. **Proposal** User story + acceptance criteria (`0-proposal/proposal.md`)
17
+ 2. **Design** — Technical spec + C# contracts + decisions (`1-design/`)
18
+ 3. **Plan** — Detailed implementation plan (`3-plan/plan.md`)
19
+ 4. **Tasks** — Atomic task list (`4-tasks/tasks.md`)
20
+ 5. **Implement** — Code + recap (`5-implement/recap.md`)
21
+
22
+ UI-heavy features also include **UI/UX** phase (`2-ui/`) between Design and Tasks.
23
+
24
+ ---
25
+
26
+ ## Phase Sequence
27
+
28
+ ```
29
+ proposal → setup → [uiux] → design → clarify → plan → tasks → implement → [sync]
30
+ ```
31
+
32
+ Use `morph-spec status {feature}` to see current phase and pending approval gates.
33
+
34
+ ---
35
+
36
+ ## Phase Commands
37
+
38
+ | Command | Purpose |
39
+ |---------|---------|
40
+ | `/morph-proposal {feature}` | Full spec pipeline (phases 1-4, pauses for approval) |
41
+ | `/morph-apply {feature}` | Implement feature (phase 5) |
42
+ | `/morph-status` | Feature dashboard |
43
+
44
+ ---
45
+
46
+ ## State & Outputs
47
+
48
+ | Path | Notes |
49
+ |------|-------|
50
+ | `.morph/state.json` | **READ-ONLY** use `morph-spec` CLI to update |
51
+ | `.morph/features/{feature}/{phase}/` | Feature outputs organized by phase |
52
+ | `.morph/framework/` | **READ-ONLY** framework files managed by morph-spec |
53
+ | `.morph/config/config.json` | Project configuration (editable) |
54
+
55
+ ### mark-output types
56
+
57
+ Use `morph-spec state mark-output <feature> <type>` with one of these exact type names:
58
+
59
+ | Type | Phase | kebab alias |
60
+ |------|-------|-------------|
61
+ | `proposal` | proposal | — |
62
+ | `schemaAnalysis` | design | `schema-analysis` |
63
+ | `spec` | design | — |
64
+ | `contracts` | design | — |
65
+ | `contractsVsa` | design | `contracts-vsa` |
66
+ | `decisions` | design | — |
67
+ | `clarifications` | clarify | — |
68
+ | `plan` | plan | |
69
+ | `tasks` | tasks | — |
70
+ | `uiDesignSystem` | uiux | `ui-design-system` |
71
+ | `uiMockups` | uiux | `ui-mockups` |
72
+ | `uiComponents` | uiux | `ui-components` |
73
+ | `uiFlows` | uiux | `ui-flows` |
74
+ | `recap` | implement | — |
75
+
76
+ ---
77
+
78
+ ## Output Paths
79
+
80
+ All outputs go in `.morph/features/{feature}/`:
81
+
82
+ | Phase | Path |
83
+ |-------|------|
84
+ | Proposal | `0-proposal/proposal.md` |
85
+ | Spec | `1-design/spec.md` |
86
+ | Contracts | `1-design/contracts.cs` |
87
+ | Decisions | `1-design/decisions.md` |
88
+ | UI Design | `2-ui/design-system.md`, `mockups.md`, `components.md`, `flows.md` |
89
+ | Plan | `3-plan/plan.md` |
90
+ | Tasks | `4-tasks/tasks.md` |
91
+ | Recap | `5-implement/recap.md` |
92
+
93
+ ---
94
+
95
+ ## Checkpoints
96
+
97
+ Run a checkpoint every 3 completed tasks:
98
+ - Validate architecture compliance
99
+ - Check package versions
100
+ - Scan for security issues
101
+ - Verify design system adherence (UI features)
102
+
103
+ ---
104
+
105
+ ## Approval Gates
106
+
107
+ **Design Gate:** Before moving from Design → Plan, spec must be approved.
108
+ **Plan Gate:** Before moving from Plan → Tasks, plan must be approved.
109
+ **Implementation Gate:** Before starting implementation, task list must be approved.
110
+
111
+ Check approval status: `morph-spec approval-status {feature}`
112
+
113
+ ---
114
+
115
+ ## Protected Files
116
+
117
+ **NEVER directly edit:**
118
+ - `.morph/state.json` — Managed by CLI only
119
+ - `.morph/framework/**` — Read-only framework content
120
+
121
+ ---
122
+
123
+ ## Test File Policy
124
+
125
+ When a test fails, always follow this order:
126
+
127
+ 1. **Analyze first** — determine if the IMPLEMENTATION is wrong or the TEST SPEC is wrong
128
+ 2. **Fix implementation first** — the test is the spec; trust it by default
129
+ 3. **Only modify a test file if the test expectation itself is incorrect** — wrong expected value, wrong behavior modeled
130
+ 4. **Before modifying any test file, explain WHY the test spec is wrong** — what the correct behavior is and why the test doesn't model it
131
+
132
+ Do not modify test files to make a failing test pass when the implementation is the actual problem.
133
+
134
+ ---
135
+
136
+ ## Context Window Tip
137
+
138
+ When using 3+ MCPs, add `"experimental": { "mcpCliMode": true }` to `.claude/settings.json`.
139
+ MCP tools load on-demand instead of all at startup — keeps context clean for actual work.
140
+
141
+ ---
142
+
143
+ *MORPH-SPEC by Polymorphism Tech*
@@ -2,6 +2,8 @@
2
2
  paths:
3
3
  - "**/*.tsx"
4
4
  - "**/*.ts"
5
+ stacks:
6
+ - nextjs
5
7
  ---
6
8
 
7
9
  # Next.js Standards
@@ -4,6 +4,9 @@ paths:
4
4
  - "**/*.test.*"
5
5
  - "**/*.spec.*"
6
6
  - "**/*Tests.cs"
7
+ stacks:
8
+ - dotnet
9
+ - blazor
7
10
  ---
8
11
 
9
12
  # Testing Standards
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.0",
2
+ "version": "4.0.0",
3
3
  "description": "Centralized MCP registry with phase relevance and install configuration for morph-spec workflows",
4
4
  "mcps": {
5
5
  "context7": {
@@ -8,8 +8,16 @@
8
8
  "detection": "enabledPlugins includes context7 or mcpServers includes context7",
9
9
  "fallback": "WebSearch + WebFetch for library documentation",
10
10
  "usage": "Library documentation lookups, API reference, implementation patterns",
11
+ "healthCheck": {
12
+ "toolPattern": "context7",
13
+ "testCall": "Call resolve-library-id with libraryName 'react' and query 'react hooks'",
14
+ "testParams": { "libraryName": "react", "query": "react hooks" },
15
+ "successIndicator": "Returns a library ID (e.g., /facebook/react)",
16
+ "failureHint": "Context7 MCP not responding. Check that @upstash/context7-mcp is installed and the MCP server is running. Try restarting Claude Code."
17
+ },
11
18
  "install": {
12
19
  "autoInstall": true,
20
+ "transport": "stdio",
13
21
  "config": {
14
22
  "command": "cmd",
15
23
  "args": ["/c", "npx", "-y", "@upstash/context7-mcp@latest"]
@@ -27,8 +35,16 @@
27
35
  "detection": "mcpServers includes playwright",
28
36
  "fallback": "WebFetch for read-only page content, manual testing",
29
37
  "usage": "UI preview, smoke testing, page inspection, responsive testing, screenshot capture",
38
+ "healthCheck": {
39
+ "toolPattern": "playwright",
40
+ "testCall": "Call browser_navigate with url 'about:blank'",
41
+ "testParams": { "url": "about:blank" },
42
+ "successIndicator": "Page navigates successfully (no error thrown)",
43
+ "failureHint": "Playwright MCP not responding. Ensure @playwright/mcp is installed and browser binaries are available. Run 'npx playwright install' if needed."
44
+ },
30
45
  "install": {
31
46
  "autoInstall": true,
47
+ "transport": "stdio",
32
48
  "config": {
33
49
  "command": "cmd",
34
50
  "args": ["/c", "npx", "-y", "@playwright/mcp@latest"]
@@ -46,34 +62,25 @@
46
62
  "detection": "mcpServers includes supabase",
47
63
  "fallback": "Grep query files + Read type definitions for schema inference",
48
64
  "usage": "Schema analysis, migrations, RLS policies, data operations",
65
+ "healthCheck": {
66
+ "toolPattern": "supabase",
67
+ "testCall": "Call list_tables with no parameters",
68
+ "testParams": {},
69
+ "successIndicator": "Returns a list of tables (even if empty)",
70
+ "failureHint": "Supabase MCP not responding. If using remote mode, re-authenticate via /mcp in Claude Code. If using local mode, verify SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY in .claude/settings.local.json."
71
+ },
49
72
  "install": {
50
73
  "autoInstall": false,
74
+ "transport": "http",
51
75
  "config": {
52
- "command": "cmd",
53
- "args": ["/c", "npx", "-y", "@supabase/mcp-server-supabase"],
54
- "env": {
55
- "SUPABASE_URL": "",
56
- "SUPABASE_SERVICE_ROLE_KEY": ""
57
- }
76
+ "type": "http",
77
+ "url": "https://mcp.supabase.com/mcp"
58
78
  },
59
- "credentials": [
60
- {
61
- "name": "Supabase Project URL",
62
- "envVar": "SUPABASE_URL",
63
- "secret": false,
64
- "helpUrl": "https://supabase.com/dashboard/project/_/settings/api"
65
- },
66
- {
67
- "name": "Service Role Key",
68
- "envVar": "SUPABASE_SERVICE_ROLE_KEY",
69
- "secret": true,
70
- "helpUrl": "https://supabase.com/dashboard/project/_/settings/api"
71
- }
72
- ],
79
+ "credentials": [],
73
80
  "prerequisites": [],
74
81
  "stackRelevance": ["nextjs-supabase", "supabase", "nextjs"],
75
- "warnings": ["NEVER connect to PRODUCTION databases. Use local/dev environment only."],
76
- "setupGuide": null
82
+ "warnings": ["Uses OAuth — you will be prompted to authenticate via browser when first connecting.", "NEVER connect to PRODUCTION databases. Use local/dev environment only."],
83
+ "setupGuide": "Run: claude mcp add --transport http supabase https://mcp.supabase.com/mcp"
77
84
  }
78
85
  },
79
86
  "github": {
@@ -82,11 +89,19 @@
82
89
  "detection": "mcpServers includes github",
83
90
  "fallback": "Bash `gh` CLI commands",
84
91
  "usage": "Repo metadata, code search, issue creation, PR management",
92
+ "healthCheck": {
93
+ "toolPattern": "github",
94
+ "testCall": "Call any read-only GitHub tool (e.g., search_repositories or get_repo) to verify connectivity",
95
+ "testParams": {},
96
+ "successIndicator": "Returns repository data or search results without auth errors",
97
+ "failureHint": "GitHub MCP not responding. If using Docker, ensure Docker Desktop is running. Verify GITHUB_PERSONAL_ACCESS_TOKEN env var is set. Ensure the token has not expired and has the required scopes (repo, read:org)."
98
+ },
85
99
  "install": {
86
100
  "autoInstall": false,
101
+ "transport": "stdio",
87
102
  "config": {
88
- "command": "cmd",
89
- "args": ["/c", "npx", "-y", "@modelcontextprotocol/server-github"],
103
+ "command": "docker",
104
+ "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"],
90
105
  "env": {
91
106
  "GITHUB_PERSONAL_ACCESS_TOKEN": ""
92
107
  }
@@ -99,39 +114,43 @@
99
114
  "helpUrl": "https://github.com/settings/tokens"
100
115
  }
101
116
  ],
102
- "prerequisites": [],
117
+ "prerequisites": [
118
+ {
119
+ "name": "Docker",
120
+ "checkCommand": "docker --version",
121
+ "installUrl": "https://docs.docker.com/get-docker/"
122
+ }
123
+ ],
103
124
  "stackRelevance": ["*"],
104
125
  "warnings": [],
105
- "setupGuide": null
126
+ "setupGuide": "Official GitHub MCP Server (github/github-mcp-server). Requires Docker."
106
127
  }
107
128
  },
108
- "figma": {
109
- "phases": ["uiux"],
110
- "tools": ["get_file"],
111
- "detection": "mcpServers includes figma",
112
- "fallback": "Read CSS/SCSS files for existing design tokens",
113
- "usage": "Design token extraction, component specs, color/typography from Figma files",
129
+ "vercel": {
130
+ "phases": ["implement"],
131
+ "tools": ["search_docs", "list_projects", "get_deployments", "get_deployment_logs", "manage_env_vars"],
132
+ "detection": "mcpServers includes vercel",
133
+ "fallback": "Bash `vercel` CLI commands",
134
+ "usage": "Deployment monitoring, project management, environment variables, log analysis",
135
+ "healthCheck": {
136
+ "toolPattern": "vercel",
137
+ "testCall": "Call search_docs with a query to verify connectivity",
138
+ "testParams": { "query": "deployments" },
139
+ "successIndicator": "Returns documentation search results without auth errors",
140
+ "failureHint": "Vercel MCP not responding. Re-authenticate via /mcp in Claude Code. Ensure you have authorized the Vercel OAuth connection."
141
+ },
114
142
  "install": {
115
143
  "autoInstall": false,
144
+ "transport": "http",
116
145
  "config": {
117
- "command": "cmd",
118
- "args": ["/c", "npx", "-y", "@anthropic/mcp-server-figma"],
119
- "env": {
120
- "FIGMA_ACCESS_TOKEN": ""
121
- }
146
+ "type": "http",
147
+ "url": "https://mcp.vercel.com"
122
148
  },
123
- "credentials": [
124
- {
125
- "name": "Figma Access Token",
126
- "envVar": "FIGMA_ACCESS_TOKEN",
127
- "secret": true,
128
- "helpUrl": "https://www.figma.com/developers/api#access-tokens"
129
- }
130
- ],
149
+ "credentials": [],
131
150
  "prerequisites": [],
132
- "stackRelevance": ["blazor", "nextjs", "react", "vue"],
133
- "warnings": [],
134
- "setupGuide": null
151
+ "stackRelevance": ["nextjs", "nextjs-supabase", "vercel"],
152
+ "warnings": ["Uses OAuth — you will be prompted to authenticate via browser when first connecting."],
153
+ "setupGuide": "Run: claude mcp add --transport http vercel https://mcp.vercel.com"
135
154
  }
136
155
  },
137
156
  "docker": {
@@ -140,8 +159,16 @@
140
159
  "detection": "mcpServers includes docker",
141
160
  "fallback": "Bash `docker` CLI commands",
142
161
  "usage": "Container management, build and run containers",
162
+ "healthCheck": {
163
+ "toolPattern": "docker",
164
+ "testCall": "Call any read-only Docker tool to verify Docker daemon connectivity",
165
+ "testParams": {},
166
+ "successIndicator": "Tool responds without connection errors (Docker daemon is reachable)",
167
+ "failureHint": "Docker MCP not responding. Ensure Docker Desktop is running and the Docker daemon is accessible. Run 'docker info' to verify."
168
+ },
143
169
  "install": {
144
170
  "autoInstall": false,
171
+ "transport": "stdio",
145
172
  "config": {
146
173
  "command": "cmd",
147
174
  "args": ["/c", "npx", "-y", "@modelcontextprotocol/server-docker"]
@@ -165,8 +192,16 @@
165
192
  "detection": "mcpServers includes azure",
166
193
  "fallback": "Bash `az` CLI commands",
167
194
  "usage": "Cloud resource management, deployment",
195
+ "healthCheck": {
196
+ "toolPattern": "azure",
197
+ "testCall": "Call any read-only Azure tool to verify credentials and connectivity",
198
+ "testParams": {},
199
+ "successIndicator": "Tool responds without authentication or subscription errors",
200
+ "failureHint": "Azure MCP not responding. Verify AZURE_SUBSCRIPTION_ID in .claude/settings.local.json and ensure 'az login' has been run. Check that Azure CLI is installed with 'az --version'."
201
+ },
168
202
  "install": {
169
203
  "autoInstall": false,
204
+ "transport": "stdio",
170
205
  "config": {
171
206
  "command": "cmd",
172
207
  "args": ["/c", "npx", "-y", "@azure/mcp-server"],
@@ -198,10 +233,10 @@
198
233
  "phaseMatrix": {
199
234
  "proposal": ["context7"],
200
235
  "setup": ["github"],
201
- "uiux": ["playwright", "figma", "context7"],
236
+ "uiux": ["playwright", "context7"],
202
237
  "design": ["supabase", "context7", "github"],
203
238
  "clarify": ["context7", "github"],
204
239
  "tasks": ["context7", "github"],
205
- "implement": ["supabase", "context7", "playwright", "github", "docker", "azure"]
240
+ "implement": ["supabase", "context7", "playwright", "github", "vercel", "docker", "azure"]
206
241
  }
207
242
  }
@@ -0,0 +1,139 @@
1
+ ---
2
+ name: morph:brainstorming
3
+ description: Morph-spec-aware brainstorming that loads project context, explores multiple design approaches, asks clarifying questions, and produces proposal.md or decisions.md. Use before designing a feature, when facing architectural decisions with multiple valid approaches, or when a feature needs requirements exploration before committing to a direction.
4
+ user-invocable: true
5
+ argument-hint: "[feature-name or topic]"
6
+ allowed-tools: Read, Bash, Glob, Grep, AskUserQuestion
7
+ ---
8
+
9
+ # Brainstorming — MORPH-SPEC Integrated
10
+
11
+ > Explore context, ask questions, generate multiple approaches, and produce a design document before committing to implementation.
12
+ >
13
+ > **Example:** `references/proposal-example.md` — filled-in proposal.md showing expected quality.
14
+
15
+ ## When to Use
16
+
17
+ - **Phase 0 (Proposal):** Explore the feature request before writing `proposal.md`
18
+ - **Phase 2 (Design):** Explore architectural alternatives before writing `spec.md`
19
+ - **Any phase:** When facing a decision with multiple valid approaches
20
+
21
+ ## Recommended Tools
22
+
23
+ | Action | Tool | Alternative |
24
+ |--------|------|-------------|
25
+ | Load feature state | **Bash** `npx morph-spec state get $ARGUMENTS` | — |
26
+ | Read project config | **Read** `.morph/config/config.json` | — |
27
+ | Scan existing code | **Glob** / **Grep** | — |
28
+ | Research libraries | **Context7 MCP** `query_docs()` | **WebSearch** |
29
+ | Ask clarifying questions | **AskUserQuestion** (never plain text) | — |
30
+ | Render proposal template | **Bash** `npx morph-spec template render docs/proposal ...` | — |
31
+
32
+ ---
33
+
34
+ ## Workflow
35
+
36
+ ### Step 1: Explore Context
37
+
38
+ Gather information before generating ideas. This step is what makes morph-aware brainstorming different from generic brainstorming — it grounds your thinking in the actual project state and constraints.
39
+
40
+ 1. **Read state** — `npx morph-spec state get $ARGUMENTS` → current phase, active agents, existing outputs, task history
41
+ 2. **Read config** — `.morph/config/config.json` → stack, architecture style (VSA vs standard), project name, integrations
42
+ 3. **Check architecture** — `cat .morph/config/config.json | grep -A3 architecture` → determines which agents and patterns apply
43
+ 4. **Read existing outputs** — proposal.md, spec.md, decisions.md (if they exist from prior work)
44
+ 5. **Check active agents** — `npx morph-spec dispatch-agents $ARGUMENTS design --table` → which specialists are available
45
+ 6. **Scan codebase** — use Glob/Grep to understand existing patterns, domain models, and service boundaries relevant to the feature
46
+ 7. **Check MCP tools** — if Context7, GitHub, or other MCPs are available, use them for research
47
+
48
+ ### Step 2: Ask Clarifying Questions
49
+
50
+ Use `AskUserQuestion` to collect responses — **NEVER list questions as plain text**.
51
+
52
+ - Maximum 4 questions per call. If you need 5+, make sequential calls (Q1-Q4, then Q5).
53
+ - Each question needs 2-4 representative options (the user can type a free response via "Other").
54
+ - **Wait for the tool response before proceeding to Step 3.**
55
+
56
+ Starter questions to adapt to the feature context:
57
+
58
+ | Header (<=12 chars) | Question | Suggested Options |
59
+ |--------------------|----------|------------------|
60
+ | `Scope` | What's the minimum viable version of this feature? | Basic MVP / Full version / Open-ended |
61
+ | `Constraints` | Any performance, budget, or timeline constraints? | No constraints / Performance-critical / Budget-limited |
62
+ | `Integration` | Does this need to integrate with existing features/systems? | Yes, integrates with X / Isolated feature / TBD |
63
+ | `Users` | Who are the primary users? | End-users / Admins / Internal system |
64
+ | `Success` | How will we know this feature works correctly? | Defined metrics / Acceptance tests / User feedback |
65
+
66
+ > Adapt the options to the actual feature context — these are starting points, not a fixed template.
67
+
68
+ ### Step 3: Generate 2-3 Approaches
69
+
70
+ For each approach, document:
71
+
72
+ ```markdown
73
+ ## Approach A: {Name}
74
+
75
+ **Description:** {1-2 sentences}
76
+
77
+ **Pros:**
78
+ - Pro 1
79
+ - Pro 2
80
+
81
+ **Cons:**
82
+ - Con 1
83
+ - Con 2
84
+
85
+ **Complexity:** Low / Medium / High
86
+ **Estimated Tasks:** ~N
87
+ **Key Dependencies:** {list}
88
+ ```
89
+
90
+ ### Step 4: Recommend and Document
91
+
92
+ 1. **Recommend** the best approach with clear reasoning
93
+ 2. **Write output** to the appropriate location based on the current phase:
94
+
95
+ **Phase 0 (Proposal):**
96
+ ```bash
97
+ npx morph-spec template render docs/proposal ".morph/features/$ARGUMENTS/0-proposal/proposal.md" '{"FEATURE_NAME":"...", "DATE":"..."}'
98
+ ```
99
+ Then edit the rendered file to add the brainstorming results.
100
+
101
+ **Phase 2 (Design):**
102
+ Write the decision as an ADR (Architecture Decision Record) in `.morph/features/$ARGUMENTS/1-design/decisions.md`.
103
+
104
+ 3. **Update state** (mandatory — do not skip):
105
+ ```bash
106
+ npx morph-spec state mark-output $ARGUMENTS proposal # Phase 0
107
+ npx morph-spec state mark-output $ARGUMENTS decisions # Phase 2
108
+ ```
109
+ Then verify the output was recorded:
110
+ ```bash
111
+ npx morph-spec state get $ARGUMENTS
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Integration with Superpowers
117
+
118
+ > Available when the `superpowers` plugin is installed.
119
+
120
+ This skill replaces `superpowers:brainstorming` within morph-spec workflows. It adds:
121
+ - Automatic context loading from `.morph/` state and config
122
+ - Template rendering for outputs (proposal.md, decisions.md)
123
+ - State tracking via `morph-spec state mark-output`
124
+ - MCP integration for research (Context7, GitHub)
125
+
126
+ For brainstorming **outside** morph-spec workflows, the original `superpowers:brainstorming` skill remains available.
127
+
128
+ ---
129
+
130
+ ## Anti-patterns
131
+
132
+ - Skipping brainstorming for features with multiple valid approaches — exploring alternatives prevents tunnel vision
133
+ - Committing to an approach without documenting alternatives — future decisions need context on what was considered
134
+ - Brainstorming without loading project context first — leads to approaches that don't fit the existing architecture
135
+ - Writing code before completing the brainstorming output — premature implementation before agreement
136
+
137
+ ---
138
+
139
+ *MORPH-SPEC by Polymorphism Tech*