@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
@@ -0,0 +1,166 @@
1
+ ---
2
+ allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*), Bash(git diff:*), Bash(git log:*)
3
+ argument-hint: [message] | --no-verify | --amend
4
+ description: Create well-formatted commits with conventional commit format and emoji
5
+ ---
6
+
7
+ # Smart Git Commit
8
+
9
+ Create well-formatted commit: $ARGUMENTS
10
+
11
+ ## Current Repository State
12
+
13
+ - Git status: !git status --porcelain
14
+ - Current branch: !git branch --show-current
15
+ - Staged changes: !git diff --cached --stat
16
+ - Unstaged changes: !git diff --stat
17
+ - Recent commits: !git log --oneline -5
18
+
19
+ ## What This Command Does
20
+
21
+ 1. Unless specified with --no-verify, automatically runs pre-commit checks:
22
+ - pnpm lint to ensure code quality
23
+ - pnpm build to verify the build succeeds
24
+ - pnpm generate:docs to update documentation
25
+ 2. Checks which files are staged with git status
26
+ 3. If 0 files are staged, automatically adds all modified and new files with git add
27
+ 4. Performs a git diff to understand what changes are being committed
28
+ 5. Analyzes the diff to determine if multiple distinct logical changes are present
29
+ 6. If multiple distinct changes are detected, suggests breaking the commit into multiple smaller commits
30
+ 7. For each commit (or the single commit if not split), creates a commit message using emoji conventional commit format
31
+
32
+ ## Best Practices for Commits
33
+
34
+ - **Verify before committing**: Ensure code is linted, builds correctly, and documentation is updated
35
+ - **Atomic commits**: Each commit should contain related changes that serve a single purpose
36
+ - **Split large changes**: If changes touch multiple concerns, split them into separate commits
37
+ - **Conventional commit format**: Use the format <type>: <description> where type is one of:
38
+ - feat: A new feature
39
+ - fix: A bug fix
40
+ - docs: Documentation changes
41
+ - style: Code style changes (formatting, etc)
42
+ - refactor: Code changes that neither fix bugs nor add features
43
+ - perf: Performance improvements
44
+ - test: Adding or fixing tests
45
+ - chore: Changes to the build process, tools, etc.
46
+ - **Present tense, imperative mood**: Write commit messages as commands (e.g., "add feature" not "added feature")
47
+ - **Concise first line**: Keep the first line under 72 characters
48
+ - **Emoji**: Each commit type is paired with an appropriate emoji:
49
+ - ✨ feat: New feature
50
+ - 🐛 fix: Bug fix
51
+ - 📝 docs: Documentation
52
+ - 💄 style: Formatting/style
53
+ - ♻️ refactor: Code refactoring
54
+ - ⚡️ perf: Performance improvements
55
+ - ✅ test: Tests
56
+ - 🔧 chore: Tooling, configuration
57
+ - 🚀 ci: CI/CD improvements
58
+ - 🗑️ revert: Reverting changes
59
+ - 🧪 test: Add a failing test
60
+ - 🚨 fix: Fix compiler/linter warnings
61
+ - 🔒️ fix: Fix security issues
62
+ - 👥 chore: Add or update contributors
63
+ - 🚚 refactor: Move or rename resources
64
+ - 🏗️ refactor: Make architectural changes
65
+ - 🔀 chore: Merge branches
66
+ - 📦️ chore: Add or update compiled files or packages
67
+ - ➕ chore: Add a dependency
68
+ - ➖ chore: Remove a dependency
69
+ - 🌱 chore: Add or update seed files
70
+ - 🧑‍💻 chore: Improve developer experience
71
+ - 🧵 feat: Add or update code related to multithreading or concurrency
72
+ - 🔍️ feat: Improve SEO
73
+ - 🏷️ feat: Add or update types
74
+ - 💬 feat: Add or update text and literals
75
+ - 🌐 feat: Internationalization and localization
76
+ - 👔 feat: Add or update business logic
77
+ - 📱 feat: Work on responsive design
78
+ - 🚸 feat: Improve user experience / usability
79
+ - 🩹 fix: Simple fix for a non-critical issue
80
+ - 🥅 fix: Catch errors
81
+ - 👽️ fix: Update code due to external API changes
82
+ - 🔥 fix: Remove code or files
83
+ - 🎨 style: Improve structure/format of the code
84
+ - 🚑️ fix: Critical hotfix
85
+ - 🎉 chore: Begin a project
86
+ - 🔖 chore: Release/Version tags
87
+ - 🚧 wip: Work in progress
88
+ - 💚 fix: Fix CI build
89
+ - 📌 chore: Pin dependencies to specific versions
90
+ - 👷 ci: Add or update CI build system
91
+ - 📈 feat: Add or update analytics or tracking code
92
+ - ✏️ fix: Fix typos
93
+ - ⏪️ revert: Revert changes
94
+ - 📄 chore: Add or update license
95
+ - 💥 feat: Introduce breaking changes
96
+ - 🍱 assets: Add or update assets
97
+ - ♿️ feat: Improve accessibility
98
+ - 💡 docs: Add or update comments in source code
99
+ - 🗃️ db: Perform database related changes
100
+ - 🔊 feat: Add or update logs
101
+ - 🔇 fix: Remove logs
102
+ - 🤡 test: Mock things
103
+ - 🥚 feat: Add or update an easter egg
104
+ - 🙈 chore: Add or update .gitignore file
105
+ - 📸 test: Add or update snapshots
106
+ - ⚗️ experiment: Perform experiments
107
+ - 🚩 feat: Add, update, or remove feature flags
108
+ - 💫 ui: Add or update animations and transitions
109
+ - ⚰️ refactor: Remove dead code
110
+ - 🦺 feat: Add or update code related to validation
111
+ - ✈️ feat: Improve offline support
112
+
113
+ ## Guidelines for Splitting Commits
114
+
115
+ When analyzing the diff, consider splitting commits based on these criteria:
116
+
117
+ 1. **Different concerns**: Changes to unrelated parts of the codebase
118
+ 2. **Different types of changes**: Mixing features, fixes, refactoring, etc.
119
+ 3. **File patterns**: Changes to different types of files (e.g., source code vs documentation)
120
+ 4. **Logical grouping**: Changes that would be easier to understand or review separately
121
+ 5. **Size**: Very large changes that would be clearer if broken down
122
+
123
+ ## Examples
124
+
125
+ Good commit messages:
126
+ - ✨ feat: add user authentication system
127
+ - 🐛 fix: resolve memory leak in rendering process
128
+ - 📝 docs: update API documentation with new endpoints
129
+ - ♻️ refactor: simplify error handling logic in parser
130
+ - 🚨 fix: resolve linter warnings in component files
131
+ - 🧑‍💻 chore: improve developer tooling setup process
132
+ - 👔 feat: implement business logic for transaction validation
133
+ - 🩹 fix: address minor styling inconsistency in header
134
+ - 🚑️ fix: patch critical security vulnerability in auth flow
135
+ - 🎨 style: reorganize component structure for better readability
136
+ - 🔥 fix: remove deprecated legacy code
137
+ - 🦺 feat: add input validation for user registration form
138
+ - 💚 fix: resolve failing CI pipeline tests
139
+ - 📈 feat: implement analytics tracking for user engagement
140
+ - 🔒️ fix: strengthen authentication password requirements
141
+ - ♿️ feat: improve form accessibility for screen readers
142
+
143
+ Example of splitting commits:
144
+ - First commit: ✨ feat: add new solc version type definitions
145
+ - Second commit: 📝 docs: update documentation for new solc versions
146
+ - Third commit: 🔧 chore: update package.json dependencies
147
+ - Fourth commit: 🏷️ feat: add type definitions for new API endpoints
148
+ - Fifth commit: 🧵 feat: improve concurrency handling in worker threads
149
+ - Sixth commit: 🚨 fix: resolve linting issues in new code
150
+ - Seventh commit: ✅ test: add unit tests for new solc version features
151
+ - Eighth commit: 🔒️ fix: update dependencies with security vulnerabilities
152
+
153
+ ## Command Options
154
+
155
+ - --no-verify: Skip running the pre-commit checks (lint, build, generate:docs)
156
+
157
+ ## Important Notes
158
+
159
+ - By default, pre-commit checks (pnpm lint, pnpm build, pnpm generate:docs) will run to ensure code quality
160
+ - If these checks fail, you'll be asked if you want to proceed with the commit anyway or fix the issues first
161
+ - If specific files are already staged, the command will only commit those files
162
+ - If no files are staged, it will automatically stage all modified and new files
163
+ - The commit message will be constructed based on the changes detected
164
+ - Before committing, the command will review the diff to identify if multiple commits would be more appropriate
165
+ - If suggesting multiple commits, it will help you stage and commit the changes separately
166
+ - Always reviews the commit diff to ensure the message matches the changes
@@ -1,3 +1,9 @@
1
+ ---
2
+ description: Implementa a feature especificada seguindo as tasks definidas na FASE 5 do workflow MORPH
3
+ argument-hint: <feature-name>
4
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
5
+ ---
6
+
1
7
  # Apply MORPH Feature Implementation - FASE 5
2
8
 
3
9
  Implemente a feature especificada seguindo as tasks definidas.
@@ -42,7 +48,11 @@ npx morph-spec state get {feature-name}
42
48
  - [ ] Phase passou por "clarify"
43
49
  - [ ] Spec atualizado com clarificações
44
50
 
45
- 6. **FASE 4 (Tasks):**
51
+ 6. **FASE 4 (Plan):**
52
+ - [ ] Output `plan` criado
53
+ - [ ] Plano de implementação aprovado
54
+
55
+ 7. **FASE 5 (Tasks):**
46
56
  - [ ] Output `tasks` criado
47
57
  - [ ] `tasks.json` tem array de tasks
48
58
  - [ ] `tasks.total` > 0 no state
@@ -69,7 +79,8 @@ Para completar as fases de planejamento, execute:
69
79
 
70
80
  1. **Carregue o contexto**:
71
81
  - Leia `.morph/features/{feature}/1-design/spec.md`
72
- - Leia `.morph/features/{feature}/3-tasks/tasks.md`
82
+ - Leia `.morph/features/{feature}/3-plan/plan.md`
83
+ - Leia `.morph/features/{feature}/4-tasks/tasks.md`
73
84
  - Leia `.morph/features/{feature}/1-design/contracts.cs`
74
85
  - Leia framework/standards/ e .morph/context/ para padrões
75
86
 
@@ -1,3 +1,9 @@
1
+ ---
2
+ description: Arquiva uma feature concluída movendo de features/ para archive/ e atualizando o state
3
+ argument-hint: <feature-name>
4
+ allowed-tools: Read, Write, Edit, Bash
5
+ ---
6
+
1
7
  # Archive MORPH Feature
2
8
 
3
9
  Arquive uma feature concluída, movendo-a de `features/` para `archive/`.
@@ -13,12 +19,12 @@ Verifique antes de arquivar:
13
19
  ## Workflow
14
20
 
15
21
  1. **Valide a conclusão**:
16
- - Leia `.morph/features/{feature}/3-tasks/tasks.md`
22
+ - Leia `.morph/features/{feature}/4-tasks/tasks.md`
17
23
  - Verifique que todas tasks estão completadas
18
24
  - Confirme com o usuário se pode arquivar
19
25
 
20
26
  2. **Complete o recap**:
21
- - Atualize `.morph/features/{feature}/4-implement/recap.md`
27
+ - Atualize `.morph/features/{feature}/5-implement/recap.md`
22
28
  - Preencha métricas finais
23
29
  - Documente lições aprendidas
24
30
 
@@ -1,3 +1,9 @@
1
+ ---
2
+ description: Gerencia infraestrutura Azure com Bicep templates — provisiona, atualiza e monitora recursos cloud
3
+ argument-hint: [up|down|plan|status]
4
+ allowed-tools: Read, Write, Edit, Bash, Glob
5
+ ---
6
+
1
7
  # /morph-infra - Infrastructure Management
2
8
 
3
9
  Gerencia infraestrutura Azure usando Bicep templates.
@@ -1,3 +1,9 @@
1
+ ---
2
+ description: Valida readiness do projeto antes do deploy Azure — verifica specs, contratos, testes, e infraestrutura
3
+ argument-hint: [feature-name]
4
+ allowed-tools: Read, Bash, Glob, Grep
5
+ ---
6
+
1
7
  # Pre-Flight Check for Azure Deployment
2
8
 
3
9
  Validates project readiness before deploying to Azure.
@@ -1,3 +1,9 @@
1
+ ---
2
+ description: MORPH Spec Pipeline — cria ou retoma o planejamento de uma feature pelas fases 0→4 com pausas obrigatórias de aprovação
3
+ argument-hint: <feature-name>
4
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
5
+ ---
6
+
1
7
  # MORPH Spec Pipeline
2
8
 
3
9
  Crie ou retome o planejamento de uma feature, guiando automaticamente pelas fases 0→4 com pausas obrigatórias.
@@ -37,7 +43,8 @@ npx morph-spec state get {feature-name}
37
43
  .morph/features/{feature-name}/
38
44
  ├── 0-proposal/proposal.md
39
45
  ├── 1-design/spec.md (iniciar)
40
- └── 3-tasks/tasks.md (iniciar)
46
+ └── 4-tasks/tasks.md (iniciar)
47
+
41
48
  ```
42
49
 
43
50
  5. **Preencha `proposal.md`** baseado em `framework/templates/proposal.md`
@@ -55,11 +62,17 @@ npx morph-spec state get {feature-name}
55
62
 
56
63
  Apresente: resumo da proposta, agentes ativados, custo estimado, 3 itens de pausa.
57
64
 
65
+ Após o usuário aprovar:
66
+ ```bash
67
+ npx morph-spec approve {feature-name} proposal
68
+ npx morph-spec phase advance {feature-name}
69
+ ```
70
+
58
71
  ---
59
72
 
60
73
  ## 3. Após Aprovação do Proposal → FASE 1: SETUP (auto, sem pausa)
61
74
 
62
- **Ler:** `.claude/skills/level-1-workflows/phase-setup.md` para instruções detalhadas.
75
+ Use o skill `morph-phase-setup` para instruções detalhadas.
63
76
 
64
77
  Resumo: carregar contexto do projeto, confirmar stack, listar agentes ativos, atualizar state.
65
78
 
@@ -70,14 +83,20 @@ Resumo: carregar contexto do projeto, confirmar stack, listar agentes ativos, at
70
83
  ## 4. FASE 1.5: UI/UX (condicional)
71
84
 
72
85
  Verificar se `uiux-designer` está nos `activeAgents`:
73
- - **Se SIM:** Ler `.claude/skills/level-1-workflows/phase-uiux.md` e executar. **PAUSA OBRIGATORIA** após gerar deliverables UI.
86
+ - **Se SIM:** Use o skill `morph-phase-uiux` e executar. **PAUSA OBRIGATORIA** após gerar deliverables UI.
74
87
  - **Se NÃO:** Pular para FASE 2.
75
88
 
89
+ Após o usuário aprovar:
90
+ ```bash
91
+ npx morph-spec approve {feature-name} uiux
92
+ npx morph-spec phase advance {feature-name}
93
+ ```
94
+
76
95
  ---
77
96
 
78
97
  ## 5. FASE 2: DESIGN
79
98
 
80
- **Ler:** `.claude/skills/level-1-workflows/phase-design.md` para instruções detalhadas.
99
+ Use o skill `morph-phase-design` para instruções detalhadas.
81
100
 
82
101
  Resumo: gerar spec.md, contracts.cs, decisions.md com ADRs, estimar custos.
83
102
 
@@ -85,11 +104,17 @@ Resumo: gerar spec.md, contracts.cs, decisions.md com ADRs, estimar custos.
85
104
 
86
105
  Apresente: spec, contracts, decisions, custos. 3 itens de pausa (aprovar, ajustar escopo, modificar contracts).
87
106
 
107
+ Após o usuário aprovar:
108
+ ```bash
109
+ npx morph-spec approve {feature-name} design
110
+ npx morph-spec phase advance {feature-name}
111
+ ```
112
+
88
113
  ---
89
114
 
90
115
  ## 6. Após Aprovação do Design → FASE 3: CLARIFY (interativo)
91
116
 
92
- **Ler:** `.claude/skills/level-1-workflows/phase-clarify.md` para instruções detalhadas.
117
+ Use o skill `morph-phase-clarify` para instruções detalhadas.
93
118
 
94
119
  Resumo: identificar ambiguidades, gerar 3-7 perguntas, aguardar respostas, atualizar spec com clarificações e edge cases.
95
120
 
@@ -97,9 +122,27 @@ Resumo: identificar ambiguidades, gerar 3-7 perguntas, aguardar respostas, atual
97
122
 
98
123
  ---
99
124
 
100
- ## 7. FASE 4: TASKS
125
+ ## 6.5. FASE 4: PLAN
126
+
127
+ Use o skill `morph-phase-plan` para instruções detalhadas.
101
128
 
102
- **Ler:** `.claude/skills/level-1-workflows/phase-tasks.md` para instruções detalhadas.
129
+ Resumo: gerar plano de implementação detalhado com paths exatos, código TDD, e estratégia de execução context-aware.
130
+
131
+ ### PAUSA OBRIGATORIA
132
+
133
+ Apresente: plano de implementação com estratégia recomendada. 3 itens de pausa (aprovar plano, ajustar estratégia, modificar plano).
134
+
135
+ Após o usuário aprovar:
136
+ ```bash
137
+ npx morph-spec approve {feature-name} plan
138
+ npx morph-spec phase advance {feature-name}
139
+ ```
140
+
141
+ ---
142
+
143
+ ## 7. FASE 5: TASKS
144
+
145
+ Use o skill `morph-phase-tasks` para instruções detalhadas.
103
146
 
104
147
  Resumo: quebrar spec em tasks T001-TXXX, definir dependências, checkpoints, estimativas.
105
148
 
@@ -107,6 +150,12 @@ Resumo: quebrar spec em tasks T001-TXXX, definir dependências, checkpoints, est
107
150
 
108
151
  Apresente: breakdown de tasks, ordem de execução, estimativa total. 3 itens de pausa (aprovar, repriorizar, adicionar/remover).
109
152
 
153
+ Após o usuário aprovar:
154
+ ```bash
155
+ npx morph-spec approve {feature-name} tasks
156
+ npx morph-spec phase advance {feature-name}
157
+ ```
158
+
110
159
  ---
111
160
 
112
161
  ## 8. Planejamento Completo
@@ -1,3 +1,9 @@
1
+ ---
2
+ description: Mostra o status atual do projeto MORPH e todas as features em desenvolvimento com suas fases e aprovações
3
+ argument-hint: [feature-name]
4
+ allowed-tools: Read, Bash
5
+ ---
6
+
1
7
  # MORPH Project Status
2
8
 
3
9
  Mostre o status atual do projeto MORPH e features em desenvolvimento.
@@ -1,3 +1,9 @@
1
+ ---
2
+ description: Busca soluções para erros e problemas comuns no desenvolvimento .NET/Blazor/Azure com análise root-cause
3
+ argument-hint: "[error-message]"
4
+ allowed-tools: Read, Bash, Glob, Grep
5
+ ---
6
+
1
7
  # Troubleshoot - Buscar Soluções para Erros
2
8
 
3
9
  Busca soluções para erros e problemas comuns no desenvolvimento .NET/Blazor/Azure.
@@ -10,7 +10,7 @@
10
10
  * Fail-open: exits 0 on any error.
11
11
  */
12
12
 
13
- import { stateExists, getActiveFeature, getPendingGates } from '../../shared/state-reader.js';
13
+ import { stateExists, getActiveFeature, getPendingGates, derivePhaseForFeature } from '../../shared/state-reader.js';
14
14
  import { injectContext, pass } from '../../shared/hook-response.js';
15
15
  import { logHookActivity } from '../../shared/activity-logger.js';
16
16
 
@@ -36,7 +36,8 @@ try {
36
36
  implement: ['design', 'tasks']
37
37
  };
38
38
 
39
- const relevantGates = phaseGateRelevance[feature.phase] || [];
39
+ const currentPhase = feature.phase || derivePhaseForFeature(name);
40
+ const relevantGates = phaseGateRelevance[currentPhase] || [];
40
41
  const pendingRelevant = pending.filter(g => relevantGates.includes(g));
41
42
 
42
43
  if (pendingRelevant.length === 0) pass();
@@ -102,7 +102,7 @@ function isContextInitialized() {
102
102
  const contextPath = join(process.cwd(), '.morph/context/README.md');
103
103
  if (!existsSync(contextPath)) return false;
104
104
  const content = readFileSync(contextPath, 'utf-8');
105
- return !content.includes('Run /morph-init to generate');
105
+ return !content.includes('Run /morph:init to generate');
106
106
  } catch {
107
107
  return false;
108
108
  }