@polymorphism-tech/morph-spec 4.10.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.
- package/README.md +2 -2
- package/claude-plugin.json +1 -1
- package/docs/CHEATSHEET.md +1 -1
- package/docs/QUICKSTART.md +1 -1
- package/framework/CLAUDE.md +5 -69
- package/framework/agents/backend/api-designer.md +3 -0
- package/framework/agents/backend/dotnet-senior.md +3 -0
- package/framework/agents/backend/ef-modeler.md +2 -0
- package/framework/agents/backend/hangfire-orchestrator.md +2 -0
- package/framework/agents/backend/ms-agent-expert.md +2 -0
- package/framework/agents/frontend/blazor-builder.md +2 -0
- package/framework/agents/frontend/nextjs-expert.md +2 -0
- package/framework/agents/infrastructure/azure-architect.md +2 -0
- package/framework/agents/infrastructure/azure-deploy-specialist.md +2 -0
- package/framework/agents/infrastructure/bicep-architect.md +2 -0
- package/framework/agents/infrastructure/container-specialist.md +2 -0
- package/framework/agents/infrastructure/devops-engineer.md +3 -0
- package/framework/agents/infrastructure/infra-architect.md +3 -0
- package/framework/agents/integrations/asaas-financial.md +2 -0
- package/framework/agents/integrations/azure-identity.md +2 -0
- package/framework/agents/integrations/clerk-auth.md +3 -0
- package/framework/agents/integrations/hangfire-integration.md +2 -0
- package/framework/agents/integrations/resend-email.md +2 -0
- package/framework/commands/morph-apply.md +151 -161
- package/framework/commands/morph-archive.md +28 -28
- package/framework/commands/morph-infra.md +79 -79
- package/framework/commands/morph-preflight.md +92 -56
- package/framework/commands/morph-proposal.md +94 -70
- package/framework/commands/morph-status.md +31 -31
- package/framework/commands/morph-troubleshoot.md +63 -60
- package/framework/rules/csharp-standards.md +3 -0
- package/framework/rules/frontend-standards.md +2 -0
- package/framework/rules/infrastructure-standards.md +3 -0
- package/framework/rules/morph-workflow.md +57 -2
- package/framework/rules/nextjs-standards.md +2 -0
- package/framework/rules/testing-standards.md +3 -0
- package/framework/skills/level-0-meta/morph-brainstorming/SKILL.md +54 -49
- package/framework/skills/level-0-meta/morph-checklist/SKILL.md +42 -19
- package/framework/skills/level-0-meta/morph-code-review/SKILL.md +8 -5
- package/framework/skills/level-0-meta/morph-code-review-nextjs/SKILL.md +7 -5
- package/framework/skills/level-0-meta/morph-frontend-review/SKILL.md +139 -136
- package/framework/skills/level-0-meta/morph-init/SKILL.md +42 -13
- package/framework/skills/level-0-meta/morph-post-implementation/SKILL.md +130 -130
- package/framework/skills/level-0-meta/morph-replicate/SKILL.md +95 -87
- package/framework/skills/level-0-meta/morph-simulation-checklist/SKILL.md +24 -0
- package/framework/skills/level-0-meta/morph-tool-usage-guide/SKILL.md +42 -41
- package/framework/skills/level-0-meta/morph-verification-before-completion/SKILL.md +22 -11
- package/framework/skills/level-1-workflows/morph-phase-clarify/SKILL.md +123 -114
- package/framework/skills/level-1-workflows/morph-phase-codebase-analysis/SKILL.md +120 -102
- package/framework/skills/level-1-workflows/morph-phase-design/SKILL.md +206 -214
- package/framework/skills/level-1-workflows/morph-phase-implement/.morph/logs/activity.json +38 -0
- package/framework/skills/level-1-workflows/morph-phase-implement/SKILL.md +241 -360
- package/framework/skills/level-1-workflows/morph-phase-plan/SKILL.md +107 -115
- package/framework/skills/level-1-workflows/morph-phase-setup/SKILL.md +135 -135
- package/framework/skills/level-1-workflows/morph-phase-tasks/.morph/logs/activity.json +14 -0
- package/framework/skills/level-1-workflows/morph-phase-tasks/SKILL.md +143 -139
- package/framework/skills/level-1-workflows/morph-phase-uiux/SKILL.md +168 -165
- package/framework/skills/level-1-workflows/morph-scope-escalation/SKILL.md +57 -8
- package/package.json +3 -3
- package/src/commands/project/doctor.js +7 -2
- package/src/commands/project/update.js +4 -4
- package/src/lib/stack-filter.js +58 -0
- package/src/scripts/setup-infra.js +53 -18
- package/src/utils/agents-installer.js +19 -5
- package/src/utils/claude-md-injector.js +90 -0
- package/src/utils/hooks-installer.js +1 -4
- package/src/utils/skills-installer.js +67 -7
- package/CLAUDE.md +0 -98
- package/framework/memory/patterns-learned.md +0 -766
- package/framework/skills/level-0-meta/morph-terminal-title/SKILL.md +0 -61
- package/framework/skills/level-0-meta/morph-terminal-title/scripts/set_title.sh +0 -65
|
@@ -1,231 +1,221 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: Implement the specified feature following the task breakdown from the MORPH-SPEC workflow. Orchestrates task execution with state tracking, checkpoints, agent dispatch, and verification.
|
|
3
3
|
argument-hint: <feature-name>
|
|
4
|
-
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent, AskUserQuestion
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# /morph-apply — Feature Implementation
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Implement the feature by executing its task breakdown, tracking progress through the morph-spec state machine, and producing a recap at the end.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Usage
|
|
12
12
|
|
|
13
13
|
```
|
|
14
14
|
/morph-apply {feature-name}
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Recommended Tools
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
> **Ref:** `framework/skills/level-0-meta/morph-tool-usage-guide/SKILL.md` for complete guide.
|
|
20
|
+
> **Ref:** `framework/standards/integration/mcp/mcp-tools.md` for MCP reference.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
| Action | Tool | Alternative |
|
|
23
|
+
|--------|------|-------------|
|
|
24
|
+
| Read spec, tasks, contracts | **Read** all outputs | — |
|
|
25
|
+
| Detect architecture style | **Bash** `cat .morph/config/config.json \| grep architecture` | — |
|
|
26
|
+
| Agent dispatch config | **Bash** `npx morph-spec dispatch-agents $ARGUMENTS implement` | — |
|
|
27
|
+
| Parallel task execution | **Agent** subagent per task group | Sequential fallback |
|
|
28
|
+
| Look up implementation patterns | **Context7 MCP** `query_docs()` | **WebSearch** |
|
|
29
|
+
| Track progress | **Bash** `npx morph-spec state get $ARGUMENTS` | — |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Pre-flight Validation
|
|
34
|
+
|
|
35
|
+
Before writing any code, verify all prior phases are complete. This gate prevents implementation from starting with missing specs, unapproved designs, or incomplete task breakdowns.
|
|
36
|
+
|
|
37
|
+
### 1. Check state and approvals
|
|
22
38
|
|
|
23
39
|
```bash
|
|
24
|
-
|
|
25
|
-
npx morph-spec
|
|
40
|
+
npx morph-spec state get $ARGUMENTS
|
|
41
|
+
npx morph-spec approval-status $ARGUMENTS
|
|
42
|
+
npx morph-spec validate-feature $ARGUMENTS
|
|
26
43
|
```
|
|
27
44
|
|
|
28
|
-
**
|
|
45
|
+
**All three must pass.** If any fails:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Feature is not ready for implementation.
|
|
49
|
+
Run /morph-proposal $ARGUMENTS to complete planning phases.
|
|
50
|
+
(Resumes automatically from the current phase.)
|
|
51
|
+
```
|
|
29
52
|
|
|
30
|
-
|
|
31
|
-
- [ ] Output `proposal` criado
|
|
32
|
-
- [ ] Agentes detectados e registrados
|
|
53
|
+
Do NOT proceed until all phases are complete and all gates approved.
|
|
33
54
|
|
|
34
|
-
2.
|
|
35
|
-
- [ ] Phase passou por "setup"
|
|
36
|
-
- [ ] Contexto carregado
|
|
55
|
+
### 2. Load context in PARALLEL
|
|
37
56
|
|
|
38
|
-
|
|
39
|
-
- [ ] Se `uiux-designer` está nos activeAgents → outputs ui-* devem existir
|
|
40
|
-
- [ ] Se NÃO tem uiux-designer → pode pular
|
|
57
|
+
Read all prerequisite files in a single parallel call — every file listed here matters for implementation quality:
|
|
41
58
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
59
|
+
```
|
|
60
|
+
Read: .morph/features/$ARGUMENTS/1-design/spec.md (→ functional requirements, API contracts)
|
|
61
|
+
+ Read: .morph/features/$ARGUMENTS/1-design/contracts.cs (or contracts.ts / contracts-vsa.cs → C# interfaces)
|
|
62
|
+
+ Read: .morph/features/$ARGUMENTS/1-design/decisions.md (→ ADRs, architectural choices)
|
|
63
|
+
+ Read: .morph/features/$ARGUMENTS/3-plan/plan.md (→ TDD structure, execution strategy)
|
|
64
|
+
+ Read: .morph/features/$ARGUMENTS/4-tasks/tasks.md (→ task breakdown with T### IDs)
|
|
65
|
+
+ Read: .morph/config/config.json (→ architecture.style for VSA routing)
|
|
66
|
+
```
|
|
46
67
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
68
|
+
**For VSA projects** (`architecture.style: "vertical-slice"`), also read:
|
|
69
|
+
```
|
|
70
|
+
Read: framework/standards/architecture/vertical-slice/vertical-slice.md
|
|
71
|
+
```
|
|
72
|
+
This contains the 9 VSA implementation rules (Handler+Validator+Endpoint per feature folder, no cross-feature imports, etc.).
|
|
50
73
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
74
|
+
Also read relevant standards:
|
|
75
|
+
- `framework/standards/` — coding standards for the detected stack
|
|
76
|
+
- `.morph/context/` — project-specific patterns and conventions
|
|
54
77
|
|
|
55
|
-
|
|
56
|
-
- [ ] Output `tasks` criado
|
|
57
|
-
- [ ] `tasks.json` tem array de tasks
|
|
58
|
-
- [ ] `tasks.total` > 0 no state
|
|
78
|
+
### 3. Detect architecture style
|
|
59
79
|
|
|
60
|
-
|
|
80
|
+
```bash
|
|
81
|
+
cat .morph/config/config.json | grep -A3 '"architecture"'
|
|
61
82
|
```
|
|
62
|
-
❌ ERRO: Fase {X} não foi concluída!
|
|
63
83
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
84
|
+
- **`"vertical-slice"`** → follow VSA implementation patterns from `framework/standards/architecture/vertical-slice/vertical-slice.md`. Each task is a complete slice (Handler + Validator + Endpoint in one folder).
|
|
85
|
+
- **Otherwise** → follow DDD/Clean Architecture patterns. Tasks map to domain layers.
|
|
86
|
+
|
|
87
|
+
### 4. Get agent dispatch config
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npx morph-spec dispatch-agents $ARGUMENTS implement --table
|
|
67
91
|
```
|
|
68
92
|
|
|
69
|
-
|
|
93
|
+
This shows which agents are active for implementation and how tasks can be grouped. If agent teams are enabled and tasks have no dependencies between groups, consider dispatching parallel agents:
|
|
70
94
|
|
|
71
|
-
|
|
95
|
+
```bash
|
|
96
|
+
npx morph-spec dispatch-agents $ARGUMENTS implement
|
|
97
|
+
```
|
|
72
98
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
- [ ] `contracts.cs` define as interfaces
|
|
99
|
+
The JSON output includes `shouldDispatch`, `agents[]`, and `taskGroups` for multi-agent coordination.
|
|
100
|
+
|
|
101
|
+
---
|
|
77
102
|
|
|
78
103
|
## Workflow
|
|
79
104
|
|
|
80
|
-
1
|
|
81
|
-
- Leia `.morph/features/{feature}/1-design/spec.md`
|
|
82
|
-
- Leia `.morph/features/{feature}/3-plan/plan.md`
|
|
83
|
-
- Leia `.morph/features/{feature}/4-tasks/tasks.md`
|
|
84
|
-
- Leia `.morph/features/{feature}/1-design/contracts.cs`
|
|
85
|
-
- Leia framework/standards/ e .morph/context/ para padrões
|
|
86
|
-
|
|
87
|
-
2. **Inicialize state tracking**:
|
|
88
|
-
```bash
|
|
89
|
-
# Atualizar fase para implement
|
|
90
|
-
npx morph-spec state set {feature} phase implement
|
|
91
|
-
npx morph-spec state set {feature} status in_progress
|
|
92
|
-
|
|
93
|
-
# Definir total de tasks (baseado em tasks.json)
|
|
94
|
-
npx morph-spec state set {feature} tasks.total {N}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
3. **Execute tasks em ordem**:
|
|
98
|
-
- Marque task como in progress: `npx morph-spec task start {feature} {task-id}`
|
|
99
|
-
- Implemente seguindo os padrões e contracts.cs
|
|
100
|
-
- Complete task: `npx morph-spec task done {feature} {task-id}`
|
|
101
|
-
- **Validators run automatically** on task-done. If validation fails:
|
|
102
|
-
- Read the error messages and fix violations
|
|
103
|
-
- Re-run `task done` — do NOT use `--skip-validation` unless user authorizes
|
|
104
|
-
- Framework auto-manages checkpoints (every 3 tasks, includes validation summary)
|
|
105
|
-
|
|
106
|
-
4. **Phase advancement**:
|
|
107
|
-
```bash
|
|
108
|
-
# Advance to next phase (validates → advances → shows next steps)
|
|
109
|
-
npx morph-spec phase advance {feature}
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
5. **Marcar outputs criados**:
|
|
113
|
-
Sempre que gerar um arquivo de output:
|
|
114
|
-
```bash
|
|
115
|
-
npx morph-spec state mark-output {feature} spec
|
|
116
|
-
npx morph-spec state mark-output {feature} contracts
|
|
117
|
-
npx morph-spec state mark-output {feature} tasks
|
|
118
|
-
# etc.
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
6. **Ao finalizar**:
|
|
122
|
-
- Generate recap automatically: `npx morph-spec generate recap {feature}`
|
|
123
|
-
- Atualize state: `npx morph-spec state set {feature} status done`
|
|
124
|
-
- Marque recap: `npx morph-spec state mark-output {feature} recap`
|
|
125
|
-
- Liste arquivos criados/modificados
|
|
126
|
-
- Calcule custo real vs estimado
|
|
127
|
-
|
|
128
|
-
## Padrões Obrigatórios
|
|
129
|
-
|
|
130
|
-
Siga sempre (priorize context/ se houver):
|
|
131
|
-
- `framework/standards/coding.md` - Padrões base do MORPH
|
|
132
|
-
- `.morph/context/coding.md` - Padrões específicos do projeto
|
|
133
|
-
- `.morph/context/architecture.md` - Estrutura de projeto
|
|
134
|
-
- `.morph/context/azure.md` - Recursos e custos
|
|
105
|
+
### Step 1: Advance to implement phase
|
|
135
106
|
|
|
136
|
-
|
|
107
|
+
```bash
|
|
108
|
+
npx morph-spec phase advance $ARGUMENTS
|
|
109
|
+
```
|
|
137
110
|
|
|
138
|
-
|
|
111
|
+
This validates phase eligibility and emits a SKILL DISPATCH block listing required skills for implementation (verification-before-completion, morph-checklist, etc.).
|
|
139
112
|
|
|
140
|
-
|
|
113
|
+
### Step 2: Initialize state tracking
|
|
141
114
|
|
|
142
|
-
|
|
115
|
+
```bash
|
|
116
|
+
npx morph-spec state set $ARGUMENTS tasks.total {N}
|
|
117
|
+
```
|
|
143
118
|
|
|
144
|
-
|
|
145
|
-
- [ ] `Azure.Identity` especificado explicitamente no `.csproj`
|
|
146
|
-
- [ ] Build passa sem erros (`dotnet build`)
|
|
119
|
+
Where `{N}` is the number of tasks in tasks.md (e.g., 6 for T001-T006).
|
|
147
120
|
|
|
148
|
-
###
|
|
121
|
+
### Step 3: Execute tasks in order
|
|
149
122
|
|
|
150
|
-
|
|
151
|
-
- [ ] Migration criada para todas as mudanças de schema
|
|
152
|
-
- [ ] Migration script revisado (`dotnet ef migrations script --idempotent`)
|
|
123
|
+
For each task in the breakdown, follow this cycle:
|
|
153
124
|
|
|
154
|
-
|
|
125
|
+
```bash
|
|
126
|
+
# 1. Start the task (activates task-tracking guard)
|
|
127
|
+
npx morph-spec task start $ARGUMENTS {task-id}
|
|
155
128
|
|
|
156
|
-
|
|
157
|
-
-
|
|
129
|
+
# 2. Implement the task
|
|
130
|
+
# - Follow spec.md and contracts
|
|
131
|
+
# - Follow coding standards from framework/standards/ and .morph/context/
|
|
132
|
+
# - For VSA: create all slice files in one folder (Handler + Validator + Endpoint)
|
|
133
|
+
# - For DDD: implement in the correct domain layer
|
|
158
134
|
|
|
159
|
-
|
|
135
|
+
# 3. Verify before completing — run validate-feature or check your work
|
|
136
|
+
# matches the spec and contracts before marking done
|
|
160
137
|
|
|
161
|
-
|
|
162
|
-
-
|
|
163
|
-
|
|
138
|
+
# 4. Complete the task (triggers Tier-4 validators automatically)
|
|
139
|
+
npx morph-spec task done $ARGUMENTS {task-id}
|
|
140
|
+
```
|
|
164
141
|
|
|
165
|
-
|
|
142
|
+
**If validation fails on `task done`:**
|
|
143
|
+
- Read the error messages carefully
|
|
144
|
+
- Fix the violations in your code
|
|
145
|
+
- Re-run `task done` — do NOT use `--skip-validation` unless the user explicitly authorizes it
|
|
146
|
+
- After 3 consecutive failures, escalate to the user
|
|
166
147
|
|
|
167
|
-
|
|
168
|
-
-
|
|
169
|
-
- [ ] Connection strings em Key Vault (não hardcoded)
|
|
170
|
-
- [ ] Managed Identity habilitada nos recursos
|
|
148
|
+
**Parallel execution (agent teams):**
|
|
149
|
+
If `dispatch-agents` identified parallelizable task groups and agent teams are enabled, dispatch independent tasks to separate agents. Each agent still calls `task start` and `task done` for its assigned task.
|
|
171
150
|
|
|
172
|
-
###
|
|
151
|
+
### Step 4: Checkpoint every 3 tasks
|
|
173
152
|
|
|
174
|
-
|
|
175
|
-
- [ ] HTTPS enforçado
|
|
176
|
-
- [ ] CORS configurado corretamente
|
|
153
|
+
After every 3 completed tasks, save a checkpoint:
|
|
177
154
|
|
|
178
|
-
|
|
155
|
+
```bash
|
|
156
|
+
npx morph-spec checkpoint-save $ARGUMENTS "after-T003"
|
|
157
|
+
npx morph-spec state get $ARGUMENTS
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Checkpoints validate architecture compliance, check package versions, scan for security issues, and save a restorable snapshot. The cadence is every 3 tasks — for 6 tasks: checkpoint after T003 and T006. For 10 tasks: after T003, T006, T009, and at completion.
|
|
161
|
+
|
|
162
|
+
After each checkpoint, check progress:
|
|
179
163
|
|
|
180
164
|
```bash
|
|
181
|
-
|
|
182
|
-
|
|
165
|
+
npx morph-spec state list
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Step 5: Finalize implementation
|
|
183
169
|
|
|
184
|
-
|
|
185
|
-
dotnet ef migrations has-pending-model-changes \
|
|
186
|
-
--project src/Infrastructure \
|
|
187
|
-
--startup-project src/Web
|
|
170
|
+
After all tasks are complete:
|
|
188
171
|
|
|
189
|
-
|
|
190
|
-
|
|
172
|
+
```bash
|
|
173
|
+
# Final validation
|
|
174
|
+
npx morph-spec validate-feature $ARGUMENTS
|
|
175
|
+
|
|
176
|
+
# Generate recap (auto-marks 'recap' output in state)
|
|
177
|
+
npx morph-spec generate recap $ARGUMENTS
|
|
191
178
|
|
|
192
|
-
#
|
|
193
|
-
|
|
179
|
+
# Verify final state
|
|
180
|
+
npx morph-spec state get $ARGUMENTS
|
|
194
181
|
|
|
195
|
-
#
|
|
196
|
-
|
|
182
|
+
# Advance to next phase
|
|
183
|
+
npx morph-spec phase advance $ARGUMENTS
|
|
197
184
|
```
|
|
198
185
|
|
|
199
|
-
###
|
|
186
|
+
### Step 6: Post-implementation review
|
|
200
187
|
|
|
201
|
-
|
|
202
|
-
❌ BLOQUEADO: Não faça deploy até resolver!
|
|
188
|
+
After implementation, present a summary to the user:
|
|
203
189
|
|
|
204
|
-
|
|
205
|
-
|
|
190
|
+
1. Total tasks completed (X/Y)
|
|
191
|
+
2. Files created/modified
|
|
192
|
+
3. Validation results
|
|
193
|
+
4. Any deviations from spec
|
|
206
194
|
|
|
207
|
-
|
|
195
|
+
For Azure projects, remind the user: "Run `/morph-preflight` before deploying to validate packages, migrations, Docker, and secrets."
|
|
208
196
|
|
|
209
|
-
|
|
210
|
-
- [ ] Código compila
|
|
211
|
-
- [ ] Segue padrões de nomenclatura
|
|
212
|
-
- [ ] Testes unitários (se aplicável)
|
|
213
|
-
- [ ] Sem hardcoded secrets
|
|
197
|
+
---
|
|
214
198
|
|
|
215
|
-
## Output
|
|
199
|
+
## Task Output Format
|
|
216
200
|
|
|
217
|
-
|
|
218
|
-
1. Task completada
|
|
219
|
-
2. Arquivos criados/modificados
|
|
220
|
-
3. Próxima task
|
|
221
|
-
4. Progresso geral (X/Y tasks) - usar `npx morph-spec state get {feature}`
|
|
201
|
+
After each task completion, show:
|
|
222
202
|
|
|
223
|
-
Ao final de cada checkpoint:
|
|
224
|
-
```bash
|
|
225
|
-
npx morph-spec state list
|
|
226
203
|
```
|
|
204
|
+
Task {task-id} complete (X/Y tasks done)
|
|
205
|
+
Files: [list of created/modified files]
|
|
206
|
+
Next: {next-task-id} — {next-task-title}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Anti-patterns
|
|
227
212
|
|
|
228
|
-
|
|
213
|
+
- Using `state set phase` instead of `phase advance` — phase advance validates eligibility first
|
|
214
|
+
- Skipping `task start` before implementing — the task-tracking guard will warn
|
|
215
|
+
- Using `--skip-validation` without user authorization
|
|
216
|
+
- Implementing without reading spec.md and contracts first
|
|
217
|
+
- Writing code before `phase advance` to implement — the hook will block writes
|
|
218
|
+
- Skipping checkpoints — they catch integration issues early
|
|
229
219
|
|
|
230
220
|
---
|
|
231
221
|
|
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: Archive a completed feature by moving from features/ to archive/ and updating state
|
|
3
3
|
argument-hint: <feature-name>
|
|
4
4
|
allowed-tools: Read, Write, Edit, Bash
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Archive MORPH Feature
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Archive a completed feature, moving it from `features/` to `archive/`.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Prerequisites
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
- [ ] Feature
|
|
15
|
-
- [ ]
|
|
16
|
-
- [ ] `recap.md`
|
|
17
|
-
- [ ]
|
|
13
|
+
Verify before archiving:
|
|
14
|
+
- [ ] Feature exists in `.morph/features/{feature}/`
|
|
15
|
+
- [ ] All tasks are complete
|
|
16
|
+
- [ ] `recap.md` is filled in
|
|
17
|
+
- [ ] Code is in production (or staging)
|
|
18
18
|
|
|
19
19
|
## Workflow
|
|
20
20
|
|
|
21
|
-
1. **
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
21
|
+
1. **Validate completion**:
|
|
22
|
+
- Read `.morph/features/{feature}/4-tasks/tasks.md`
|
|
23
|
+
- Verify all tasks are completed
|
|
24
|
+
- Confirm with user before archiving
|
|
25
25
|
|
|
26
|
-
2. **Complete
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
26
|
+
2. **Complete the recap**:
|
|
27
|
+
- Update `.morph/features/{feature}/5-implement/recap.md`
|
|
28
|
+
- Fill in final metrics
|
|
29
|
+
- Document lessons learned
|
|
30
30
|
|
|
31
|
-
3. **
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
31
|
+
3. **Extract specs**:
|
|
32
|
+
- If the feature defines permanent behavior
|
|
33
|
+
- Copy relevant spec to `.morph/specs/`
|
|
34
|
+
- This becomes the "current truth" of the system
|
|
35
35
|
|
|
36
|
-
4. **
|
|
36
|
+
4. **Move to archive**:
|
|
37
37
|
```
|
|
38
38
|
.morph/features/{feature}/ → .morph/archive/{feature}/
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
5. **
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
41
|
+
5. **Update project metrics**:
|
|
42
|
+
- Increment feature counter
|
|
43
|
+
- Update total cost
|
|
44
|
+
- Update total time
|
|
45
45
|
|
|
46
46
|
## Output
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
Present archival summary:
|
|
49
49
|
|
|
50
50
|
```
|
|
51
51
|
╔════════════════════════════════════════════╗
|
|
@@ -72,9 +72,9 @@ Apresente resumo do arquivamento:
|
|
|
72
72
|
╚════════════════════════════════════════════╝
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
## Specs
|
|
75
|
+
## Extracted Specs
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
If specs were extracted:
|
|
78
78
|
```
|
|
79
79
|
Specs extracted to .morph/specs/:
|
|
80
80
|
- {domain}/spec.md - {description}
|