@polymorphism-tech/morph-spec 4.8.12 → 4.8.14

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 (27) hide show
  1. package/README.md +379 -379
  2. package/bin/{task-manager.cjs → task-manager.js} +47 -158
  3. package/claude-plugin.json +14 -14
  4. package/docs/CHEATSHEET.md +203 -203
  5. package/docs/QUICKSTART.md +1 -1
  6. package/framework/agents.json +111 -24
  7. package/framework/hooks/README.md +202 -202
  8. package/framework/hooks/claude-code/pre-tool-use/enforce-phase-writes.js +6 -0
  9. package/framework/hooks/claude-code/session-start/inject-morph-context.js +7 -0
  10. package/framework/hooks/claude-code/statusline.py +6 -0
  11. package/framework/hooks/claude-code/stop/validate-completion.js +21 -2
  12. package/framework/hooks/shared/phase-utils.js +3 -0
  13. package/framework/skills/level-0-meta/tool-usage-guide/SKILL.md +55 -0
  14. package/framework/skills/level-1-workflows/phase-clarify/SKILL.md +1 -1
  15. package/framework/skills/level-1-workflows/phase-codebase-analysis/SKILL.md +1 -1
  16. package/framework/skills/level-1-workflows/phase-design/SKILL.md +57 -1
  17. package/framework/skills/level-1-workflows/phase-implement/SKILL.md +23 -1
  18. package/framework/skills/level-1-workflows/phase-setup/SKILL.md +1 -1
  19. package/framework/skills/level-1-workflows/phase-tasks/SKILL.md +25 -2
  20. package/framework/skills/level-1-workflows/phase-uiux/SKILL.md +1 -1
  21. package/package.json +87 -87
  22. package/src/commands/state/advance-phase.js +32 -13
  23. package/src/commands/tasks/task.js +2 -2
  24. package/src/core/paths/output-schema.js +1 -0
  25. package/src/lib/detectors/design-system-detector.js +5 -4
  26. package/src/lib/tasks/task-parser.js +94 -0
  27. package/src/lib/validators/content/content-validator.js +34 -106
@@ -1,203 +1,203 @@
1
- # morph-spec Cheat Sheet
2
-
3
- ## Setup
4
-
5
- ```bash
6
- npm install -g @polymorphism-tech/morph-spec # install globally
7
- morph-spec init # initialize project
8
- morph-spec init --wizard # interactive wizard
9
- morph-spec init --force # overwrite existing
10
- morph-spec update # sync framework files
11
- morph-spec doctor # health check
12
- morph-spec --version
13
- ```
14
-
15
- ---
16
-
17
- ## Phase workflow
18
-
19
- ```
20
- proposal → setup → [uiux] → design → clarify → tasks → implement → [sync]
21
- ```
22
-
23
- Phases in brackets are optional.
24
-
25
- | Phase | Directory | Output files | Gate |
26
- |-------|-----------|--------------|------|
27
- | proposal | `0-proposal/` | `proposal.md` | ✅ Approval |
28
- | setup | *(no output)* | context loaded | — |
29
- | uiux *(optional)* | `2-ui/` | `design-system.md`, `mockups.md`, `components.md`, `flows.md` | ✅ Approval |
30
- | design | `1-design/` | `spec.md`, `contracts.cs`, `decisions.md` | ✅ Approval |
31
- | clarify | `1-design/` | spec updated | — |
32
- | tasks | `3-tasks/` | `tasks.md` | ✅ Approval |
33
- | implement | `4-implement/` | code + `recap.md` | — |
34
- | sync *(optional)* | `.morph/context/` | standards updated | — |
35
-
36
- ---
37
-
38
- ## Slash commands (Claude Code)
39
-
40
- | Command | Description |
41
- |---------|-------------|
42
- | `/morph-proposal {feature}` | Full spec pipeline — phases 0–4 with approval gates |
43
- | `/morph-apply {feature}` | Implement approved feature — phase 5 |
44
- | `/morph-status` | Project-wide feature status dashboard |
45
- | `/morph-preflight` | Pre-implementation validation (7 checks) |
46
-
47
- ---
48
-
49
- ## CLI — project management
50
-
51
- ```bash
52
- morph-spec init [--force] [--skip-mcp]
53
- morph-spec update [--templates] [--standards]
54
- morph-spec doctor
55
- ```
56
-
57
- ---
58
-
59
- ## CLI — feature workflow
60
-
61
- ```bash
62
- morph-spec state list # all features
63
- morph-spec state get {feature} [--json] # feature detail
64
- morph-spec state set {feature} {key} {value} # update property
65
- morph-spec phase advance {feature} # advance to next phase
66
- morph-spec status {feature} [--json] [--verbose]
67
- morph-spec task done {feature} # mark task complete
68
- morph-spec task start {feature} # start next task
69
- morph-spec task next {feature} # preview next task
70
- ```
71
-
72
- ---
73
-
74
- ## CLI — validation
75
-
76
- ```bash
77
- morph-spec validate # all validators
78
- morph-spec validate architecture
79
- morph-spec validate packages
80
- morph-spec validate contrast [--wcag-aaa]
81
- morph-spec validate-feature {feature} [--phase {phase}] [--json]
82
- ```
83
-
84
- ---
85
-
86
- ## CLI — utilities
87
-
88
- ```bash
89
- morph-spec generate recap {feature} # auto-generate recap.md
90
- morph-spec template render {id} {output} {vars-json}
91
- morph-spec trust status [feature]
92
- morph-spec trust set {feature} {level} [reason]
93
- morph-spec mcp setup [name] [--list] [--auto]
94
- ```
95
-
96
- ---
97
-
98
- ## State — mark-output
99
-
100
- ```bash
101
- morph-spec state mark-output {feature} proposal
102
- morph-spec state mark-output {feature} spec
103
- morph-spec state mark-output {feature} contracts
104
- morph-spec state mark-output {feature} decisions
105
- morph-spec state mark-output {feature} tasks
106
- morph-spec state mark-output {feature} recap
107
-
108
- # UI outputs (camelCase or kebab-case both work)
109
- morph-spec state mark-output {feature} uiDesignSystem
110
- morph-spec state mark-output {feature} uiMockups
111
- morph-spec state mark-output {feature} uiComponents
112
- morph-spec state mark-output {feature} uiFlows
113
- ```
114
-
115
- ---
116
-
117
- ## State — agents
118
-
119
- ```bash
120
- morph-spec state add-agent {feature} {agent-id}
121
- morph-spec state remove-agent {feature} {agent-id}
122
- ```
123
-
124
- ---
125
-
126
- ## Checkpoints
127
-
128
- ```bash
129
- morph-spec checkpoint-save {feature}
130
- morph-spec checkpoint-restore {feature}
131
- morph-spec checkpoint-list {feature}
132
- ```
133
-
134
- ---
135
-
136
- ## Approvals
137
-
138
- ```bash
139
- morph-spec approve {feature} {gate} # approve a gate
140
- morph-spec approval-status {feature} # show gate status
141
- ```
142
-
143
- ---
144
-
145
- ## Directory structure
146
-
147
- ```
148
- .morph/
149
- ├── config/
150
- │ └── config.json # project config (editable)
151
- ├── framework/ # READ-ONLY
152
- │ ├── agents.json # 38 agents, 4 tiers
153
- │ ├── standards/ # 82 standards across 11 categories
154
- │ └── templates/ # code and IaC templates
155
- ├── context/ # project context (editable)
156
- │ ├── README.md
157
- │ └── standards.md
158
- ├── features/
159
- │ └── {feature}/
160
- │ ├── 0-proposal/proposal.md
161
- │ ├── 1-design/spec.md, contracts.cs, decisions.md
162
- │ ├── 2-ui/design-system.md, mockups.md, components.md, flows.md
163
- │ ├── 3-tasks/tasks.md
164
- │ └── 4-implement/recap.md
165
- ├── checkpoints/
166
- ├── logs/
167
- └── state.json # READ-ONLY — CLI managed
168
-
169
- .claude/
170
- ├── commands/ # slash commands
171
- ├── skills/ # framework skills (SKILL.md per dir)
172
- ├── agents/ # native subagents (38)
173
- │ ├── morph-{id}.md # tier 1-2 agents
174
- │ └── morph-domain-{name}.md # tier 3 domain agents
175
- ├── rules/ # path-scoped rules (6 files)
176
- └── settings.local.json # hooks (11)
177
- ```
178
-
179
- ---
180
-
181
- ## Protected files
182
-
183
- These files are never edited directly. Use CLI commands or `morph-spec update` instead:
184
-
185
- | Path | Protected by |
186
- |------|-------------|
187
- | `.morph/state.json` | `permissions.deny` |
188
- | `.morph/framework/**` | `permissions.deny` |
189
- | Approved spec/contracts | `protect-spec-files.js` hook |
190
-
191
- ---
192
-
193
- ## Links
194
-
195
- - [QUICKSTART.md](QUICKSTART.md) — step-by-step guide
196
- - [ARCHITECTURE.md](ARCHITECTURE.md) — system design
197
- - [CHANGELOG.md](../CHANGELOG.md) — release history
198
- - [npm](https://www.npmjs.com/package/@polymorphism-tech/morph-spec)
199
- - support@polymorphism.com.br
200
-
201
- ---
202
-
203
- *morph-spec v4.8.12 by Polymorphism Tech*
1
+ # morph-spec Cheat Sheet
2
+
3
+ ## Setup
4
+
5
+ ```bash
6
+ npm install -g @polymorphism-tech/morph-spec # install globally
7
+ morph-spec init # initialize project
8
+ morph-spec init --wizard # interactive wizard
9
+ morph-spec init --force # overwrite existing
10
+ morph-spec update # sync framework files
11
+ morph-spec doctor # health check
12
+ morph-spec --version
13
+ ```
14
+
15
+ ---
16
+
17
+ ## Phase workflow
18
+
19
+ ```
20
+ proposal → setup → [uiux] → design → clarify → tasks → implement → [sync]
21
+ ```
22
+
23
+ Phases in brackets are optional.
24
+
25
+ | Phase | Directory | Output files | Gate |
26
+ |-------|-----------|--------------|------|
27
+ | proposal | `0-proposal/` | `proposal.md` | ✅ Approval |
28
+ | setup | *(no output)* | context loaded | — |
29
+ | uiux *(optional)* | `2-ui/` | `design-system.md`, `mockups.md`, `components.md`, `flows.md` | ✅ Approval |
30
+ | design | `1-design/` | `spec.md`, `contracts.cs`, `decisions.md` | ✅ Approval |
31
+ | clarify | `1-design/` | spec updated | — |
32
+ | tasks | `3-tasks/` | `tasks.md` | ✅ Approval |
33
+ | implement | `4-implement/` | code + `recap.md` | — |
34
+ | sync *(optional)* | `.morph/context/` | standards updated | — |
35
+
36
+ ---
37
+
38
+ ## Slash commands (Claude Code)
39
+
40
+ | Command | Description |
41
+ |---------|-------------|
42
+ | `/morph-proposal {feature}` | Full spec pipeline — phases 0–4 with approval gates |
43
+ | `/morph-apply {feature}` | Implement approved feature — phase 5 |
44
+ | `/morph-status` | Project-wide feature status dashboard |
45
+ | `/morph-preflight` | Pre-implementation validation (7 checks) |
46
+
47
+ ---
48
+
49
+ ## CLI — project management
50
+
51
+ ```bash
52
+ morph-spec init [--force] [--skip-mcp]
53
+ morph-spec update [--templates] [--standards]
54
+ morph-spec doctor
55
+ ```
56
+
57
+ ---
58
+
59
+ ## CLI — feature workflow
60
+
61
+ ```bash
62
+ morph-spec state list # all features
63
+ morph-spec state get {feature} [--json] # feature detail
64
+ morph-spec state set {feature} {key} {value} # update property
65
+ morph-spec phase advance {feature} # advance to next phase
66
+ morph-spec status {feature} [--json] [--verbose]
67
+ morph-spec task done {feature} # mark task complete
68
+ morph-spec task start {feature} # start next task
69
+ morph-spec task next {feature} # preview next task
70
+ ```
71
+
72
+ ---
73
+
74
+ ## CLI — validation
75
+
76
+ ```bash
77
+ morph-spec validate # all validators
78
+ morph-spec validate architecture
79
+ morph-spec validate packages
80
+ morph-spec validate contrast [--wcag-aaa]
81
+ morph-spec validate-feature {feature} [--phase {phase}] [--json]
82
+ ```
83
+
84
+ ---
85
+
86
+ ## CLI — utilities
87
+
88
+ ```bash
89
+ morph-spec generate recap {feature} # auto-generate recap.md
90
+ morph-spec template render {id} {output} {vars-json}
91
+ morph-spec trust status [feature]
92
+ morph-spec trust set {feature} {level} [reason]
93
+ morph-spec mcp setup [name] [--list] [--auto]
94
+ ```
95
+
96
+ ---
97
+
98
+ ## State — mark-output
99
+
100
+ ```bash
101
+ morph-spec state mark-output {feature} proposal
102
+ morph-spec state mark-output {feature} spec
103
+ morph-spec state mark-output {feature} contracts
104
+ morph-spec state mark-output {feature} decisions
105
+ morph-spec state mark-output {feature} tasks
106
+ morph-spec state mark-output {feature} recap
107
+
108
+ # UI outputs (camelCase or kebab-case both work)
109
+ morph-spec state mark-output {feature} uiDesignSystem
110
+ morph-spec state mark-output {feature} uiMockups
111
+ morph-spec state mark-output {feature} uiComponents
112
+ morph-spec state mark-output {feature} uiFlows
113
+ ```
114
+
115
+ ---
116
+
117
+ ## State — agents
118
+
119
+ ```bash
120
+ morph-spec state add-agent {feature} {agent-id}
121
+ morph-spec state remove-agent {feature} {agent-id}
122
+ ```
123
+
124
+ ---
125
+
126
+ ## Checkpoints
127
+
128
+ ```bash
129
+ morph-spec checkpoint-save {feature}
130
+ morph-spec checkpoint-restore {feature}
131
+ morph-spec checkpoint-list {feature}
132
+ ```
133
+
134
+ ---
135
+
136
+ ## Approvals
137
+
138
+ ```bash
139
+ morph-spec approve {feature} {gate} # approve a gate
140
+ morph-spec approval-status {feature} # show gate status
141
+ ```
142
+
143
+ ---
144
+
145
+ ## Directory structure
146
+
147
+ ```
148
+ .morph/
149
+ ├── config/
150
+ │ └── config.json # project config (editable)
151
+ ├── framework/ # READ-ONLY
152
+ │ ├── agents.json # 38 agents, 4 tiers
153
+ │ ├── standards/ # 82 standards across 11 categories
154
+ │ └── templates/ # code and IaC templates
155
+ ├── context/ # project context (editable)
156
+ │ ├── README.md
157
+ │ └── standards.md
158
+ ├── features/
159
+ │ └── {feature}/
160
+ │ ├── 0-proposal/proposal.md
161
+ │ ├── 1-design/spec.md, contracts.cs, decisions.md
162
+ │ ├── 2-ui/design-system.md, mockups.md, components.md, flows.md
163
+ │ ├── 3-tasks/tasks.md
164
+ │ └── 4-implement/recap.md
165
+ ├── checkpoints/
166
+ ├── logs/
167
+ └── state.json # READ-ONLY — CLI managed
168
+
169
+ .claude/
170
+ ├── commands/ # slash commands
171
+ ├── skills/ # framework skills (SKILL.md per dir)
172
+ ├── agents/ # native subagents (38)
173
+ │ ├── morph-{id}.md # tier 1-2 agents
174
+ │ └── morph-domain-{name}.md # tier 3 domain agents
175
+ ├── rules/ # path-scoped rules (6 files)
176
+ └── settings.local.json # hooks (11)
177
+ ```
178
+
179
+ ---
180
+
181
+ ## Protected files
182
+
183
+ These files are never edited directly. Use CLI commands or `morph-spec update` instead:
184
+
185
+ | Path | Protected by |
186
+ |------|-------------|
187
+ | `.morph/state.json` | `permissions.deny` |
188
+ | `.morph/framework/**` | `permissions.deny` |
189
+ | Approved spec/contracts | `protect-spec-files.js` hook |
190
+
191
+ ---
192
+
193
+ ## Links
194
+
195
+ - [QUICKSTART.md](QUICKSTART.md) — step-by-step guide
196
+ - [ARCHITECTURE.md](ARCHITECTURE.md) — system design
197
+ - [CHANGELOG.md](../CHANGELOG.md) — release history
198
+ - [npm](https://www.npmjs.com/package/@polymorphism-tech/morph-spec)
199
+ - support@polymorphism.com.br
200
+
201
+ ---
202
+
203
+ *morph-spec v4.8.14 by Polymorphism Tech*
@@ -203,4 +203,4 @@ morph-spec doctor
203
203
 
204
204
  ---
205
205
 
206
- *morph-spec v4.8.12 by Polymorphism Tech*
206
+ *morph-spec v4.8.14 by Polymorphism Tech*