@polymorphism-tech/morph-spec 9.8.0 → 10.1.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/CLAUDE.md +12 -10
- package/README.md +4 -4
- package/bin/morph-spec.js +40 -43
- package/claude-plugin.json +1 -1
- package/docs/CHEATSHEET.md +28 -36
- package/docs/QUICKSTART.md +31 -191
- package/framework/CLAUDE.md +24 -30
- package/framework/MORPH.md +47 -123
- package/framework/agents.json +6 -374
- package/framework/commands/morph-apply.md +1 -1
- package/framework/commands/morph-archive.md +4 -3
- package/framework/commands/morph-hotfix.md +8 -30
- package/framework/commands/morph-infra.md +2 -2
- package/framework/commands/morph-media.md +10 -9
- package/framework/commands/morph-preflight.md +3 -3
- package/framework/commands/morph-review.md +15 -0
- package/framework/commands/morph-status.md +1 -1
- package/framework/docs/CLI.md +84 -95
- package/framework/evals/review-checklist.md +45 -53
- package/framework/hooks/README.md +4 -4
- package/framework/hooks/claude-code/core/README.md +1 -1
- package/framework/hooks/claude-code/core/denylist.json +4 -4
- package/framework/hooks/claude-code/core/gate-guard.js +9 -0
- package/framework/hooks/claude-code/core/masked-exit.js +49 -0
- package/framework/hooks/claude-code/core/state-sync.js +4 -1
- package/framework/hooks/claude-code/core/telemetry-log.js +1 -2
- package/framework/hooks/claude-code/core/test-budget.js +10 -70
- package/framework/hooks/claude-code/core/validate-completion.js +11 -24
- package/framework/hooks/claude-code/core/worktree-context.js +5 -22
- package/framework/hooks/claude-code/core/worktree-create.js +6 -45
- package/framework/hooks/claude-code/core/worktree-env-inject.js +2 -10
- package/framework/hooks/shared/e2e-check.js +0 -0
- package/framework/hooks/shared/gate-event.js +2 -2
- package/framework/hooks/shared/graph-refresh.js +20 -3
- package/framework/hooks/shared/heavy-command.js +32 -1
- package/framework/hooks/shared/heavy-config.js +1 -1
- package/framework/hooks/shared/next-step.js +63 -24
- package/framework/hooks/shared/phase-utils.js +6 -9
- package/framework/hooks/shared/report-progress.js +86 -0
- package/framework/hooks/shared/state-reader.js +3 -2
- package/framework/hooks/statusline.js +332 -0
- package/framework/mcp/registry.json +4 -4
- package/framework/phases.json +32 -10
- package/framework/rules/ai-agents-standards.md +10 -2
- package/framework/rules/csharp-standards.md +4 -0
- package/framework/rules/data-standards.md +1 -1
- package/framework/rules/ef-standards.md +20 -0
- package/framework/rules/frontend-standards.md +1 -1
- package/framework/rules/hangfire-standards.md +1 -1
- package/framework/rules/implement-report.md +25 -0
- package/framework/rules/infrastructure-standards.md +2 -0
- package/framework/rules/neon-auth-standards.md +1 -1
- package/framework/rules/neon-standards.md +3 -3
- package/framework/rules/nextjs-standards.md +7 -0
- package/framework/rules/plan-grammar.md +53 -0
- package/framework/rules/ui-design.md +27 -0
- package/framework/schemas/config.schema.json +11 -18
- package/framework/schemas/feature.schema.json +7 -1
- package/framework/skills/core/create-umbraco-lp/SKILL.md +1 -1
- package/framework/skills/core/create-umbraco-lp/references/umbraco-lp-patterns.md +1 -1
- package/framework/skills/core/migrate-lp-to-umbraco/SKILL.md +2 -2
- package/framework/skills/core/morph-apply/SKILL.md +39 -166
- package/framework/skills/core/morph-apply/references/debugging.md +8 -0
- package/framework/skills/core/morph-apply/references/hotfix.md +42 -0
- package/framework/skills/core/morph-apply/references/machine.md +29 -0
- package/framework/skills/core/{morph-media/SKILL.md → morph-apply/references/media.md} +11 -74
- package/framework/skills/core/morph-apply/references/review.md +65 -0
- package/framework/skills/core/morph-plan/SKILL.md +49 -109
- package/framework/skills/core/morph-plan/references/critique.md +43 -0
- package/framework/skills/core/morph-plan/references/interview.md +37 -0
- package/framework/skills/core/morph-uiux/SKILL.md +47 -64
- package/framework/skills/core/morph-uiux/surfaces.json +32 -0
- package/framework/standards/STANDARDS.json +51 -28
- package/framework/standards/STANDARDS.meta.json +16 -19
- package/framework/standards/ai-agents/agent-session.md +2 -3
- package/framework/standards/ai-agents/context-providers.md +2 -2
- package/framework/standards/ai-agents/durable-workflows-hitl.md +2 -2
- package/framework/standards/ai-agents/providers/model-registry.md +2 -2
- package/framework/standards/ai-agents/rag-custom-pgvector.md +7 -6
- package/framework/standards/ai-agents/setup.md +1 -1
- package/framework/standards/ai-agents/tool-adapters.md +2 -2
- package/framework/standards/architecture/stack-baseline.md +70 -0
- package/framework/standards/backend/database/postgresql/database.md +22 -1
- package/framework/standards/backend/dotnet/vsa-handler-patterns.md +33 -1
- package/framework/standards/backend/integrations/hangfire/hangfire-jobs.md +2 -1
- package/framework/standards/backend/integrations/neon-auth/neon-auth.md +12 -13
- package/framework/standards/frontend/design-system/ai-image-generation.md +51 -12
- package/framework/standards/frontend/design-system/ai-video-generation.md +50 -4
- package/framework/standards/frontend/design-system/art-direction.md +2 -2
- package/framework/standards/frontend/scroll-driven/frame-scrub.md +12 -2
- package/framework/standards/frontend/scroll-driven/scroll-components.md +76 -4
- package/framework/standards/infrastructure/docker/local-compose-isolation.md +2 -2
- package/framework/standards/infrastructure/neon/neon-pgvector.md +62 -20
- package/framework/standards/infrastructure/neon/neon-platform.md +61 -0
- package/framework/standards/infrastructure/neon/neon-setup.md +14 -13
- package/framework/standards/integration/mcp/mcp-tools.md +20 -20
- package/framework/templates/REGISTRY.json +1 -2
- package/framework/templates/context/ARCHITECTURE.md +1 -1
- package/framework/templates/docs/plan.md +15 -12
- package/framework/templates/docs/ui-mockups.md +17 -105
- package/framework/templates/infrastructure/docker/docker-compose.template.yml +1 -1
- package/package.json +1 -1
- package/src/commands/e2e/e2e.js +88 -23
- package/src/commands/graph/diff.js +74 -0
- package/src/commands/graph/status.js +1 -1
- package/src/commands/observability/cost.js +2 -4
- package/src/commands/observability/telemetry.js +1 -1
- package/src/commands/project/doctor.js +23 -39
- package/src/commands/project/fleet.js +5 -6
- package/src/commands/project/init.js +63 -36
- package/src/commands/project/stack-scan.js +3 -42
- package/src/commands/project/stack-set.js +26 -0
- package/src/commands/project/status.js +12 -13
- package/src/commands/project/update.js +39 -3
- package/src/commands/project/worktree.js +3 -14
- package/src/commands/state/advance.js +17 -17
- package/src/commands/state/approve.js +0 -6
- package/src/commands/state/archive.js +27 -1
- package/src/commands/state/auto-approval.js +2 -2
- package/src/commands/state/create.js +1 -6
- package/src/commands/state/gate-check.js +38 -31
- package/src/commands/state/gate-decision.js +3 -2
- package/src/commands/state/next.js +1 -0
- package/src/commands/state/recap.js +67 -0
- package/src/commands/state/report-check.js +36 -178
- package/src/commands/validation/plan-check.js +16 -11
- package/src/commands/validation/validate-feature.js +3 -3
- package/src/commands/validation/verify.js +3 -6
- package/src/core/paths/output-schema.js +3 -3
- package/src/core/state/state-manager.js +2 -4
- package/src/dashboard/app/components/CommandPalette.jsx +2 -5
- package/src/dashboard/app/components/GatePauses.jsx +116 -0
- package/src/dashboard/app/components/SessionMap.jsx +77 -0
- package/src/dashboard/app/pages/Activity.jsx +4 -0
- package/src/dashboard/app/pages/AgentMap.jsx +1 -2
- package/src/dashboard/app/pages/FeatureDetail.jsx +129 -186
- package/src/dashboard/app/pages/Features.jsx +7 -7
- package/src/dashboard/app/pages/PhasePipeline.jsx +1 -1
- package/src/dashboard/app/pages/Portfolio.jsx +40 -5
- package/src/dashboard/scanner/activity-scanner.js +29 -0
- package/src/dashboard/scanner/agents-scanner.js +11 -14
- package/src/dashboard/scanner/features-scanner.js +45 -24
- package/src/dashboard/scanner/project-api.js +11 -2
- package/src/dashboard/scanner/skills-scanner.js +11 -1
- package/src/lib/detectors/index.js +1 -1
- package/src/lib/e2e/applicability.js +3 -1
- package/src/lib/git/tree-state.js +1 -16
- package/src/lib/graph/diff-tree.js +127 -0
- package/src/lib/graph/graphify-runtime.js +12 -5
- package/src/lib/installers/memory-installer.js +3 -3
- package/src/lib/installers/rules-installer.js +57 -0
- package/src/lib/installers/stack-assets.js +17 -0
- package/src/lib/installers/stack-sync.js +219 -0
- package/src/lib/plan/checks.js +61 -109
- package/src/lib/plan/critique.js +28 -0
- package/src/lib/plan/media.js +42 -0
- package/src/lib/plan/plan-html.js +125 -0
- package/src/lib/plan/plan-parser.js +34 -45
- package/src/lib/recap/piper.js +36 -0
- package/src/lib/recap/recap.js +232 -0
- package/src/lib/review-reports.js +28 -4
- package/src/lib/risk-detector.js +90 -11
- package/src/lib/specs/screen-checklist.js +33 -48
- package/src/lib/stack/dotnet-build-ignores.js +8 -9
- package/src/lib/telemetry/metrics.js +27 -29
- package/src/lib/validators/reuse/reuse-validator.js +1 -9
- package/src/lib/validators/verify-runner.js +0 -7
- package/src/lib/worktree/fleet-scanner.js +7 -20
- package/src/lib/worktree/worktree-audit.js +0 -37
- package/src/scripts/setup-infra.js +15 -50
- package/src/utils/agents-installer.js +27 -201
- package/src/utils/hooks-installer.js +11 -95
- package/framework/hooks/claude-code/core/warn-bash-source-write.js +0 -23
- package/framework/hooks/claude-code/statusline.py +0 -699
- package/framework/hooks/claude-code/statusline.sh +0 -11
- package/framework/hooks/shared/agent-reap.js +0 -74
- package/framework/hooks/shared/slice-progress.js +0 -110
- package/framework/skills/core/morph-hotfix/SKILL.md +0 -133
- package/framework/skills/core/morph-machine/SKILL.md +0 -46
- package/framework/skills/core/morph-review/SKILL.md +0 -129
- package/framework/skills/core/morph-standards/SKILL.md +0 -52
- package/framework/standards/PROVENANCE.json +0 -119
- package/framework/standards/infrastructure/neon/neon-pgrag.md +0 -243
- package/src/commands/project/worktree-reap.js +0 -34
- package/src/commands/state/handoff.js +0 -65
- package/src/commands/validation/mutate.js +0 -263
- package/src/commands/validation/scout-check.js +0 -28
- package/src/lib/generators/handoff-generator.js +0 -172
- package/src/lib/mutation/adapters.js +0 -79
- package/src/lib/mutation/commands.js +0 -61
- package/src/lib/mutation/dotnet-introspection.js +0 -281
- package/src/lib/mutation/manifest.js +0 -144
- package/src/lib/mutation/plan.js +0 -44
- package/src/lib/mutation/report.js +0 -68
- package/src/lib/mutation/runner.js +0 -301
- package/src/lib/mutation/schemata.js +0 -60
- package/src/lib/mutation/snapshot.js +0 -65
- package/src/lib/mutation/subset.js +0 -109
- package/src/lib/mutation/trx.js +0 -50
- package/src/lib/scout/scout-check.js +0 -293
- package/src/lib/validators/traceability-check.js +0 -103
- package/src/lib/worktree/agent-reaper.js +0 -247
package/docs/QUICKSTART.md
CHANGED
|
@@ -1,82 +1,47 @@
|
|
|
1
1
|
# morph-spec Quick Start
|
|
2
2
|
|
|
3
|
+
One page: install, run `doctor`, paste the issue, open the PR.
|
|
4
|
+
|
|
3
5
|
## Install
|
|
4
6
|
|
|
5
7
|
```bash
|
|
6
8
|
npm install -g @polymorphism-tech/morph-spec@latest --prefer-online
|
|
7
9
|
```
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
---
|
|
11
|
+
If `morph-spec` is not found on Windows, open a new terminal window.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Set up the project
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
From the project root:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
morph-spec init
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
`init` does the following:
|
|
22
|
-
- Auto-detects your stack (.NET, Next.js, Node.js, monorepo)
|
|
23
|
-
- Creates `.morph/` with framework files, standards, and templates
|
|
24
|
-
- Creates `.morph/context/` with inferred project context
|
|
25
|
-
- Installs `.claude/skills/`, `.claude/agents/`, `.claude/rules/`
|
|
26
|
-
- Writes `.claude/settings.local.json` with the fail-open Claude Code hooks (see `docs/ARCHITECTURE.md`)
|
|
27
|
-
- Copies `CLAUDE.md` with runtime instructions
|
|
28
|
-
|
|
29
|
-
Verify the installation:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
19
|
morph-spec doctor
|
|
33
20
|
```
|
|
34
21
|
|
|
35
|
-
|
|
22
|
+
`init` installs the harness into `.morph/` and `.claude/`. `doctor` is your first debugging step: it reports version mismatches, missing files and hook problems.
|
|
36
23
|
|
|
37
|
-
##
|
|
24
|
+
## Paste the issue
|
|
38
25
|
|
|
39
|
-
Open
|
|
26
|
+
Open the project in Claude Code and paste the link:
|
|
40
27
|
|
|
41
28
|
```
|
|
42
|
-
/morph-
|
|
29
|
+
/morph-plan https://github.com/your-org/your-repo/issues/123
|
|
43
30
|
```
|
|
44
31
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
The proposal pipeline runs the `proposal` and `plan` phases (plus the optional `uiux` phase), with an approval gate at each:
|
|
48
|
-
|
|
49
|
-
### Proposal (Gate 1)
|
|
32
|
+
A free-text request works too: `/morph-plan user-notifications`, then describe what you want.
|
|
50
33
|
|
|
51
|
-
Claude
|
|
34
|
+
Claude reads the issue, checks it against the code and opens with a thesis: "asks for X; the code shows Y; I propose Z". There is no process question. How much it asks depends on what is at stake:
|
|
52
35
|
|
|
53
|
-
|
|
36
|
+
| The request is | What happens |
|
|
37
|
+
|---|---|
|
|
38
|
+
| clear and matches the code | a one-line thesis, then it moves on |
|
|
39
|
+
| missing something, or contradicts the code | up to 3 challenges, each with evidence |
|
|
40
|
+
| unclear about the outcome, or high risk | a full interview with you |
|
|
54
41
|
|
|
55
|
-
|
|
56
|
-
- `design-system.md` — colors, typography, spacing
|
|
57
|
-
- `mockups.md` — ASCII wireframes
|
|
58
|
-
- `components.md` — component specs
|
|
59
|
-
- `flows.md` — user flows and edge cases
|
|
42
|
+
The result is `2-plan/plan.md`: the problem, the outcome sought, what is out of scope, and the scenarios `C1..Cn` that define done. Read `## Padrões assumidos` at the end: to veto a default, tell Claude its number before implementing.
|
|
60
43
|
|
|
61
|
-
You approve the
|
|
62
|
-
|
|
63
|
-
### Plan (Gate 2)
|
|
64
|
-
|
|
65
|
-
Claude produces, under `2-plan/`:
|
|
66
|
-
- `usecases/UC-*.md` — the behavior, with postconditions observable in a test
|
|
67
|
-
- `spec.md` — architecture, contracts and the `## Contrato de implementação` section (standards, runtime verification)
|
|
68
|
-
- `tasks.json` — ordered task breakdown (`T001`, `T002`, …)
|
|
69
|
-
- `decisions.md` — architectural decision records (optional)
|
|
70
|
-
|
|
71
|
-
Claude identifies ambiguities in the spec and resolves them with you before finalizing. You review and approve the use cases, spec and task list together.
|
|
72
|
-
|
|
73
|
-
At this point, planning is complete:
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
✅ Planning complete — run /morph-apply my-feature to implement
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
---
|
|
44
|
+
You approve the gates yourself. If you have a question about the issue, ask the person who wrote it.
|
|
80
45
|
|
|
81
46
|
## Implement
|
|
82
47
|
|
|
@@ -84,169 +49,44 @@ At this point, planning is complete:
|
|
|
84
49
|
/morph-apply my-feature
|
|
85
50
|
```
|
|
86
51
|
|
|
87
|
-
Claude
|
|
88
|
-
- Records task progress in `tasks.json`, writing the mutable `status`/`outputs`/`notes` fields
|
|
89
|
-
- Runs the validators relevant to your stack after each task (e.g. `architecture`/`packages`/`contract-compliance` for .NET, `nextjs-component`/`css`/`design-system` for Next.js) via `morph-spec verify`
|
|
90
|
-
- Closes each task when `verify` is green and every `doneCriteria` has the evidence that proves it — red triggers an autonomous correction loop, not a pause
|
|
91
|
-
- Generates `3-implement/recap.md` on completion, then Gate 3 review (`4-review/`)
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## During development
|
|
96
|
-
|
|
97
|
-
Check feature state:
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
morph-spec status my-feature
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
Approve the current gate and scaffold the next phase folder in one step:
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
morph-spec advance my-feature
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Task progress is recorded in `tasks.json` — Claude writes the mutable `status`/`outputs`/`notes` fields directly, and there is no separate CLI command for marking a task done.
|
|
110
|
-
|
|
111
|
-
Run validators at any time:
|
|
52
|
+
Claude implements the whole plan in one session, tracks each scenario in `3-implement/report.md`, runs `verify`, and dispatches the Gate 3 reviewers in fresh context. If a discovery makes the outcome sought false, it stops and asks you.
|
|
112
53
|
|
|
113
|
-
|
|
114
|
-
morph-spec validate # all validators
|
|
115
|
-
morph-spec validate architecture # specific validator
|
|
116
|
-
morph-spec validate packages
|
|
117
|
-
```
|
|
54
|
+
## Open the PR
|
|
118
55
|
|
|
119
|
-
|
|
56
|
+
When Gate 3 passes, Claude asks how to integrate. You can also run it yourself:
|
|
120
57
|
|
|
121
58
|
```bash
|
|
122
|
-
morph-spec
|
|
123
|
-
morph-spec verify my-feature T001 # scoped to one task
|
|
59
|
+
morph-spec finish my-feature --pr
|
|
124
60
|
```
|
|
125
61
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
## Work-type routing
|
|
129
|
-
|
|
130
|
-
Not every change needs the full pipeline walked above. Every feature is born with a **work type** that dimensions its pipeline:
|
|
62
|
+
`finish` archives the feature, pushes `morph/my-feature` and opens the PR.
|
|
131
63
|
|
|
132
|
-
|
|
64
|
+
## Along the way
|
|
133
65
|
|
|
134
66
|
```bash
|
|
135
|
-
|
|
136
|
-
morph-spec
|
|
137
|
-
#
|
|
138
|
-
morph-spec create my-fix --type bug --description "what broke"
|
|
139
|
-
# chore: skips straight to implement (Gates 1/2 stamped by policy)
|
|
140
|
-
morph-spec create my-chore --type chore --description "the tidy-up"
|
|
141
|
-
# hotfix: scout → surgical fix → test loop; Gate 3 always pauses for a human
|
|
142
|
-
morph-spec create my-hotfix --type hotfix --description "the incident"
|
|
67
|
+
morph-spec next my-feature # what happens next, read from disk
|
|
68
|
+
morph-spec status my-feature # phase, gates and progress
|
|
69
|
+
morph-spec fleet # every active feature
|
|
143
70
|
```
|
|
144
71
|
|
|
145
|
-
|
|
72
|
+
Picked up a session mid-feature? Run `/morph-apply my-feature`. It resumes from `3-implement/report.md`.
|
|
146
73
|
|
|
147
|
-
|
|
148
|
-
morph-spec create my-feature --request "produção caiu, corrigir urgente"
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Change the type later if it turns out to be wrong (blocked after Gate 3):
|
|
152
|
-
|
|
153
|
-
```bash
|
|
154
|
-
morph-spec retype my-feature hotfix --reason "escalated to production incident"
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
Production incidents run through the dedicated `/morph-hotfix my-feature` slash command instead of `/morph-proposal`.
|
|
158
|
-
|
|
159
|
-
---
|
|
160
|
-
|
|
161
|
-
## Parallel development with worktrees
|
|
162
|
-
|
|
163
|
-
Independent features can be developed in parallel, each isolated in its own git worktree — one feature, one worktree, one Claude Code instance:
|
|
164
|
-
|
|
165
|
-
```bash
|
|
166
|
-
morph-spec create my-feature --description "what & why" --worktree # birth the feature already isolated
|
|
167
|
-
# or, for an existing feature:
|
|
168
|
-
morph-spec worktree setup my-feature # creates worktrees/my-feature/ on branch morph/my-feature
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
Open the new worktree directory in its own Claude Code instance and work normally — a SessionStart hook injects the worktree's feature identity into context automatically. When the feature is done (Gate 3 approved), close it in one step:
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
morph-spec finish my-feature --merge # archive + merge --no-ff into the default branch (local), tear down the worktree
|
|
175
|
-
# or, to open a PR instead of merging locally:
|
|
176
|
-
morph-spec finish my-feature --pr # archive + push morph/my-feature + gh pr create (keeps the branch the PR needs)
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
`finish` archives the feature (committing the move inside `morph/my-feature`) *and* integrates *and* tears down the worktree in one step — it replaces the old `worktree finish` + separate `archive`. The same command closes features developed **without** a worktree (they're born on `morph/{feature}` too).
|
|
180
|
-
|
|
181
|
-
List every active worktree with its phase and gate status:
|
|
182
|
-
|
|
183
|
-
```bash
|
|
184
|
-
morph-spec worktree list
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
---
|
|
188
|
-
|
|
189
|
-
## Multiple features
|
|
190
|
-
|
|
191
|
-
You can have multiple features in progress simultaneously. Each has its own directory under `.morph/features/`, with its own committed `feature.json`:
|
|
192
|
-
|
|
193
|
-
```
|
|
194
|
-
.morph/features/
|
|
195
|
-
├── user-notifications/
|
|
196
|
-
│ ├── feature.json
|
|
197
|
-
│ ├── 0-proposal/
|
|
198
|
-
│ └── 2-plan/
|
|
199
|
-
└── payment-flow/
|
|
200
|
-
├── feature.json
|
|
201
|
-
└── 0-proposal/
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
See every active feature — root and worktrees — with phase, gates, and activity:
|
|
205
|
-
|
|
206
|
-
```bash
|
|
207
|
-
morph-spec fleet
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
---
|
|
74
|
+
Not everything needs the full flow. `/morph-plan` routes by work type: `feature` and `bug` run the whole flow, `chore` writes a short plan and goes straight to implementation. For a production incident, use `/morph-hotfix my-feature`: Gate 3 always stops for a human.
|
|
211
75
|
|
|
212
76
|
## Keeping up to date
|
|
213
77
|
|
|
214
|
-
When a new version of `@polymorphism-tech/morph-spec` is published:
|
|
215
|
-
|
|
216
78
|
```bash
|
|
217
|
-
# Update the CLI (--prefer-online bypasses the ~5 min local packument cache)
|
|
218
79
|
npm install -g @polymorphism-tech/morph-spec@latest --prefer-online
|
|
219
|
-
|
|
220
|
-
# Update framework files in your project
|
|
221
80
|
morph-spec update
|
|
222
|
-
|
|
223
|
-
# Verify
|
|
224
81
|
morph-spec doctor
|
|
225
82
|
```
|
|
226
83
|
|
|
227
|
-
`morph-spec update` re-syncs `.morph/framework/`, `.claude/skills/`, `.claude/agents/`, `.claude/rules/`, and `CLAUDE.md`. It does not touch your config, context, or feature outputs.
|
|
228
|
-
|
|
229
|
-
---
|
|
230
|
-
|
|
231
|
-
## Tips
|
|
232
|
-
|
|
233
|
-
**Use `/morph-proposal` even for small features.** The proposal phase catches scope creep, identifies the right agents, and generates contracts early — before implementation makes it expensive to change direction.
|
|
234
|
-
|
|
235
|
-
**Approve explicitly at each gate.** The design gate exists to prevent implementing the wrong thing. If something in `spec.md` or `contracts.cs` looks off, say so before approving.
|
|
236
|
-
|
|
237
|
-
**ADRs belong in `decisions.md`.** When Claude makes an architectural choice, it documents it there. Read it after Design completes. Decisions drive the validators that run during implementation.
|
|
238
|
-
|
|
239
|
-
**`morph-spec doctor` is your first debugging step.** If something is behaving unexpectedly, doctor will surface version mismatches, missing files, and hook configuration issues.
|
|
240
|
-
|
|
241
|
-
---
|
|
242
|
-
|
|
243
84
|
## Next steps
|
|
244
85
|
|
|
245
86
|
- [CHEATSHEET.md](CHEATSHEET.md) — command reference
|
|
246
|
-
-
|
|
87
|
+
- `.morph/framework/CLI.md` — every command in detail
|
|
247
88
|
- [CHANGELOG.md](../CHANGELOG.md) — release history
|
|
248
|
-
- `.morph/framework/standards/` — all coding and architecture standards
|
|
249
89
|
|
|
250
90
|
---
|
|
251
91
|
|
|
252
|
-
*morph-spec
|
|
92
|
+
*morph-spec v10.1.1 by Polymorphism Tech*
|
package/framework/CLAUDE.md
CHANGED
|
@@ -4,47 +4,41 @@
|
|
|
4
4
|
|
|
5
5
|
## Início de cada sessão
|
|
6
6
|
|
|
7
|
-
1. Leia `.morph/framework/MORPH.md` uma vez (de novo após `/compact`)
|
|
8
|
-
2. O SessionStart injeta a feature ativa e `▶ próximo:`; sem ele, `morph-spec next <f>`. Estado autoritativo: `.morph/features/{f}/feature.json`
|
|
9
|
-
3. Feature em andamento → faça o que o `next` manda,
|
|
7
|
+
1. Leia `.morph/framework/MORPH.md` uma vez (de novo após `/compact`).
|
|
8
|
+
2. O SessionStart injeta a feature ativa e `▶ próximo:`; sem ele, `morph-spec next <f>`. Estado autoritativo: `.morph/features/{f}/feature.json` — só pela CLI.
|
|
9
|
+
3. Feature em andamento → faça o que o `next` manda, sem esperar instrução. Nenhuma → pergunte qual.
|
|
10
10
|
|
|
11
11
|
## Regras
|
|
12
12
|
|
|
13
|
-
- Perguntas
|
|
14
|
-
- A pergunta de gate nomeia a feature ("Gate do plano — Plano de {
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
13
|
+
- Perguntas só por `AskUserQuestion`; na entrevista do plano, uma por chamada. Headless: texto numerado com a recomendada e gate pausado.
|
|
14
|
+
- A pergunta de gate nomeia a feature ("Gate do plano — Plano de {f} aprovado?"): é por ela que o hook `state-sync` grava a aprovação.
|
|
15
|
+
- "Não li" ou "não entendi" depois de uma saída longa → refaça do zero, sem supor que a anterior foi lida: até 5 passos numerados, uma frase cada, o primeiro sendo o que mudou para o usuário.
|
|
16
|
+
- Plano aprovado congela: fato errado → `## Errata` no fim; escopo mudou → `unapprove`.
|
|
17
|
+
- SessionStart avisou claim de outra sessão na feature → confirme antes de `finish`/`archive`/`delete`.
|
|
18
18
|
|
|
19
19
|
## CLI do loop
|
|
20
20
|
|
|
21
|
-
Prefixo `morph-spec`;
|
|
21
|
+
Prefixo `morph-spec`; detalhe em `.morph/framework/CLI.md`.
|
|
22
22
|
|
|
23
23
|
| Comando | Para quê |
|
|
24
24
|
|---|---|
|
|
25
|
-
| `create <f> --
|
|
26
|
-
| `next <f>` | o próximo passo,
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `plan-check <f>` | valida `plan.md`, grava `checks.json`, imprime as ondas |
|
|
30
|
-
| `gate-check <f> <gate>` | decide a pausa pelos sinais do disco |
|
|
31
|
-
| `approve <f> <gate> --mode auto` / `advance <f>` | aprova (advance também abre a próxima fase) |
|
|
25
|
+
| `create <f> --request '…' [--worktree]` | nasce a feature |
|
|
26
|
+
| `next <f>` | o próximo passo, do disco |
|
|
27
|
+
| `plan-check <f>` | valida o plano, grava `checks.json` |
|
|
28
|
+
| `gate-check <f> <gate>` / `approve` / `advance` | decide e aprova gates |
|
|
32
29
|
| `verify <f> [--ci]` | build + testes + validadores + e2e, sem filtro |
|
|
33
|
-
| `report-check <f> [
|
|
34
|
-
| `
|
|
35
|
-
| `finish <f> --pr\|--merge` | encerra;
|
|
36
|
-
| `standards --find "<tema>"`
|
|
37
|
-
| `heavy
|
|
38
|
-
| `worktree setup\|provision\|link\|remove\|list
|
|
39
|
-
| `graph affected\|explain <sym>` | blast radius; sem grafo,
|
|
30
|
+
| `report-check <f> [--before-eval]` | estado dos relatórios do Gate 3 |
|
|
31
|
+
| `e2e up\|status\|reset\|down <f>` | stack da feature |
|
|
32
|
+
| `finish <f> --pr\|--merge` | encerra; grava o recap animado no archive |
|
|
33
|
+
| `standards --find "<tema>"` | digest do standard |
|
|
34
|
+
| `heavy run -- <cmd>` | build/teste pesado na fila |
|
|
35
|
+
| `worktree setup\|provision\|link\|remove\|list` | ciclo da worktree; `remove` é a única remoção segura |
|
|
36
|
+
| `graph affected\|explain <sym>` | blast radius; sem grafo, grep |
|
|
37
|
+
| `graph diff [--base <ref>]` | árvore de chamadas do que mudou; recusa grafo velho |
|
|
40
38
|
|
|
41
|
-
##
|
|
39
|
+
## Gate 3 (sub-agents)
|
|
42
40
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
## Personas (em `.claude/agents/`)
|
|
46
|
-
|
|
47
|
-
Despache fatias com `subagent_type: "morph-{id}"` — a persona, gerada de `agents.json`, é o system prompt. Tipo não registrado: `general-purpose` com o `persona` colado, registrado no relatório da fatia. Nunca edite `.claude/agents/morph-*.md` à mão (`morph-spec doctor` acusa o drift).
|
|
41
|
+
`morph-verifier`, `morph-reviewer`, `morph-security` em `.claude/agents/`, gerados de `agents.json` — nunca edite à mão. Com a crítica do plano (`Plan` nativo, `morph-plan`), são os únicos sub-agents do fluxo; o resto é feito nesta sessão. Do Gate 3, leia o relatório que gravam, não a mensagem final.
|
|
48
42
|
|
|
49
43
|
<!-- morph-agents:start -->
|
|
50
44
|
_Lista derivada na instalação. Bloco vazio → `morph-spec setup-infra --reinstall`._
|
|
@@ -52,4 +46,4 @@ _Lista derivada na instalação. Bloco vazio → `morph-spec setup-infra --reins
|
|
|
52
46
|
|
|
53
47
|
## Precedência de skills
|
|
54
48
|
|
|
55
|
-
|
|
49
|
+
`morph-*` vence o equivalente genérico; `using-git-worktrees` → `morph-spec worktree setup|provision`.
|