@polymorphism-tech/morph-spec 4.8.4 → 4.8.6

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 CHANGED
@@ -3,7 +3,7 @@
3
3
  > Spec-driven development framework for multi-stack projects. Turns feature requests into implementation-ready code through structured, AI-orchestrated phases.
4
4
 
5
5
  **Package:** `@polymorphism-tech/morph-spec`
6
- **Version:** 4.8.4
6
+ **Version:** 4.8.6
7
7
  **Requires:** Node.js 18+, Claude Code
8
8
 
9
9
  ---
@@ -376,4 +376,4 @@ Code generated by morph-spec (contracts, templates, implementation output) belon
376
376
 
377
377
  ---
378
378
 
379
- *morph-spec v4.8.4 by [Polymorphism Tech](https://polymorphism.tech)*
379
+ *morph-spec v4.8.6 by [Polymorphism Tech](https://polymorphism.tech)*
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "morph-spec",
3
- "version": "4.8.4",
3
+ "version": "4.8.6",
4
4
  "displayName": "MORPH-SPEC Framework",
5
5
  "description": "Spec-driven development with 38 agents and 8-phase workflow for .NET/Blazor/Next.js/Azure",
6
6
  "publisher": "polymorphism-tech",
@@ -200,4 +200,4 @@ These files are never edited directly. Use CLI commands or `morph-spec update` i
200
200
 
201
201
  ---
202
202
 
203
- *morph-spec v4.8.4 by Polymorphism Tech*
203
+ *morph-spec v4.8.6 by Polymorphism Tech*
@@ -203,4 +203,4 @@ morph-spec doctor
203
203
 
204
204
  ---
205
205
 
206
- *morph-spec v4.8.4 by Polymorphism Tech*
206
+ *morph-spec v4.8.6 by Polymorphism Tech*
@@ -7,7 +7,7 @@
7
7
  * Scope: Framework codebase only (dev hook)
8
8
  *
9
9
  * Blocks Write/Edit to files that contain hardcoded version patterns
10
- * like "MORPH-SPEC v4.8.4". Version should only be in package.json.
10
+ * like "MORPH-SPEC v4.8.6". Version should only be in package.json.
11
11
  *
12
12
  * Checked extensions: .md, .cs, .css, .js (covers templates + source)
13
13
  * Exceptions: CHANGELOG.md, node_modules/, test/, package.json, package-lock.json
@@ -14,12 +14,33 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
14
14
 
15
15
  # morph-init — LLM-Powered Project Initialization
16
16
 
17
- > Run once after `npm install -g @polymorphism-tech/morph-spec`.
17
+ > Run once after `npm install @polymorphism-tech/morph-spec`.
18
18
  > Re-run as `/morph-init refresh` when your project evolves.
19
19
 
20
20
  ---
21
21
 
22
- ## Step 0 — Required Plugins
22
+ ## Step 0 — Resolve CLI
23
+
24
+ Before running any `morph-spec` command, detect how to invoke the CLI:
25
+
26
+ ```bash
27
+ # Try local first (project dependency), then global
28
+ npx morph-spec --version
29
+ ```
30
+
31
+ - If `npx morph-spec --version` succeeds → use `npx morph-spec` as the CLI prefix for all commands.
32
+ - If it fails → try `morph-spec --version` (global install). If that works → use `morph-spec`.
33
+ - If both fail → **STOP** and show:
34
+ ```
35
+ morph-spec CLI not found. Install it first:
36
+ npm install @polymorphism-tech/morph-spec
37
+ ```
38
+
39
+ Use the resolved CLI prefix (e.g. `npx morph-spec`) for ALL bash commands in the following steps.
40
+
41
+ ---
42
+
43
+ ## Step 1 — Required Plugins
23
44
 
24
45
  Check for required Claude Code plugins: **superpowers** and **context7**.
25
46
 
@@ -30,8 +51,8 @@ Read `~/.claude/plugins/installed_plugins.json` and check for:
30
51
  For each missing plugin, run:
31
52
 
32
53
  ```bash
33
- morph-spec install-plugin superpowers
34
- morph-spec install-plugin context7
54
+ npx morph-spec install-plugin superpowers
55
+ npx morph-spec install-plugin context7
35
56
  ```
36
57
 
37
58
  **If the command succeeds:** `✓ {plugin} installed. Restart Claude Code after /morph-init completes.`
@@ -53,25 +74,30 @@ Both `superpowers` and `context7` are required. Do not continue if either is mis
53
74
 
54
75
  ---
55
76
 
56
- ## Step 1 — Infrastructure
77
+ ## Step 2 — Infrastructure
57
78
 
58
79
  Check if `.morph/` exists in the current directory.
59
80
 
60
81
  **If MISSING:**
61
82
  ```bash
62
- morph-spec setup-infra
83
+ npx morph-spec setup-infra
63
84
  ```
64
85
  Output confirms: `✓ MORPH-SPEC infrastructure installed.`
65
86
 
66
- **If EXISTS and argument is `refresh`:** Continue — will overwrite context and config.
87
+ **If EXISTS and argument is `refresh`:**
88
+ Re-run setup-infra to update framework files, then continue with context/config refresh:
89
+ ```bash
90
+ npx morph-spec setup-infra
91
+ ```
67
92
 
68
93
  **If EXISTS and no argument:**
69
94
  Ask: *"MORPH already initialized. Refresh context and config? (y/n)"*
95
+ If `y` → re-run `npx morph-spec setup-infra` then continue.
70
96
  If `n` → STOP.
71
97
 
72
98
  ---
73
99
 
74
- ## Step 2 — Analyze Project
100
+ ## Step 3 — Analyze Project
75
101
 
76
102
  Gather evidence to build a stack map. Run these in parallel:
77
103
 
@@ -104,7 +130,7 @@ backendPath: src/backend (if monorepo)
104
130
 
105
131
  ---
106
132
 
107
- ## Step 3 — Ask Targeted Questions
133
+ ## Step 4 — Ask Targeted Questions
108
134
 
109
135
  **Rule: only ask what cannot be inferred with ≥90% confidence from files.**
110
136
 
@@ -120,7 +146,7 @@ Do **not** ask about technology already confirmed by file evidence.
120
146
 
121
147
  ---
122
148
 
123
- ## Step 4 — Generate `context/README.md`
149
+ ## Step 5 — Generate `context/README.md`
124
150
 
125
151
  Write `.morph/context/README.md`:
126
152
 
@@ -148,7 +174,7 @@ Write `.morph/context/README.md`:
148
174
 
149
175
  ---
150
176
 
151
- ## Step 5 — Update `config.json`
177
+ ## Step 6 — Update `config.json`
152
178
 
153
179
  Read `.morph/config/config.json` and merge into `project`:
154
180
 
@@ -171,14 +197,14 @@ Read `.morph/config/config.json` and merge into `project`:
171
197
 
172
198
  ---
173
199
 
174
- ## Step 6 — Configure MCPs
200
+ ## Step 7 — Configure MCPs
175
201
 
176
202
  For each detected integration with an available MCP:
177
203
 
178
204
  **Supabase detected:**
179
205
  > *"Configure Supabase MCP now? I'll need `SUPABASE_URL` and `SERVICE_ROLE_KEY`."*
180
206
  - YES → collect credentials → add to `.claude/settings.local.json` under `mcpServers`
181
- - NO → show snippet + `morph-spec mcp setup supabase`
207
+ - NO → show snippet + `npx morph-spec mcp setup supabase`
182
208
 
183
209
  **GitHub:**
184
210
  > *"Configure GitHub MCP? I'll need a `GITHUB_PERSONAL_ACCESS_TOKEN`."*
@@ -188,7 +214,7 @@ Only offer Figma, Docker, Azure if explicitly detected in `.env.example`.
188
214
 
189
215
  ---
190
216
 
191
- ## Step 7 — Final Output
217
+ ## Step 8 — Final Output
192
218
 
193
219
  Before printing the summary, check `~/.claude/settings.local.json` for `env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS`. If set to `"1"`, mark Agent Teams as enabled; otherwise show the warning.
194
220
 
@@ -4,7 +4,7 @@ description: MORPH-SPEC Phase 3 (Clarify). Reviews spec.md for ambiguities, gene
4
4
  argument-hint: "[feature-name]"
5
5
  user-invocable: false
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
- cliVersion: "4.8.4"
7
+ cliVersion: "4.8.6"
8
8
  ---
9
9
 
10
10
  # MORPH Clarify - FASE 3
@@ -3,7 +3,7 @@ name: phase-codebase-analysis
3
3
  description: MORPH-SPEC Design sub-phase that analyzes existing codebase and database schema, producing schema-analysis.md with real column names, types, relationships, and field mismatches. Use at the start of Design phase before generating contracts.cs to prevent incorrect field names or types.
4
4
  user-invocable: false
5
5
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
6
- cliVersion: "4.8.4"
6
+ cliVersion: "4.8.6"
7
7
  ---
8
8
 
9
9
  # MORPH Codebase Analysis - Sub-fase de DESIGN
@@ -4,7 +4,7 @@ description: MORPH-SPEC Phase 2 (Design). Analyzes codebase/schema, then produce
4
4
  argument-hint: "[feature-name]"
5
5
  user-invocable: false
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
- cliVersion: "4.8.4"
7
+ cliVersion: "4.8.6"
8
8
  ---
9
9
 
10
10
  # MORPH Design - FASE 2
@@ -6,7 +6,7 @@ disable-model-invocation: true
6
6
  context: fork
7
7
  agent: general-purpose
8
8
  user-invocable: false
9
- cliVersion: "4.8.4"
9
+ cliVersion: "4.8.6"
10
10
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
11
11
  ---
12
12
 
@@ -4,7 +4,7 @@ description: MORPH-SPEC Phase 1 (Setup). Reads project context, detects tech sta
4
4
  argument-hint: "[feature-name]"
5
5
  user-invocable: false
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
- cliVersion: "4.8.4"
7
+ cliVersion: "4.8.6"
8
8
  ---
9
9
 
10
10
  # MORPH Setup - FASE 1
@@ -5,7 +5,7 @@ argument-hint: "[feature-name]"
5
5
  disable-model-invocation: true
6
6
  user-invocable: false
7
7
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
8
- cliVersion: "4.8.4"
8
+ cliVersion: "4.8.6"
9
9
  ---
10
10
 
11
11
  # MORPH Tasks - FASE 4
@@ -4,7 +4,7 @@ description: MORPH-SPEC Phase 1.5 (UI/UX). Creates design-system.md, mockups.md,
4
4
  argument-hint: "[feature-name]"
5
5
  user-invocable: false
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
- cliVersion: "4.8.4"
7
+ cliVersion: "4.8.6"
8
8
  ---
9
9
 
10
10
  # MORPH UI/UX Design - FASE 1.5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polymorphism-tech/morph-spec",
3
- "version": "4.8.4",
3
+ "version": "4.8.6",
4
4
  "description": "MORPH-SPEC: AI-First development framework with validation pipeline and multi-stack support",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -4,6 +4,7 @@ import { fileURLToPath } from 'url';
4
4
  import { homedir } from 'os';
5
5
  import { mkdir, copyFile } from 'fs/promises';
6
6
  import { existsSync } from 'fs';
7
+ import { installGlobalStatusline } from '../utils/hooks-installer.js';
7
8
 
8
9
  const __dirname = dirname(fileURLToPath(import.meta.url));
9
10
  const FRAMEWORK_DIR = join(__dirname, '..', '..', 'framework');
@@ -28,7 +29,18 @@ export async function installGlobalSkill(claudeDir = join(homedir(), '.claude'))
28
29
 
29
30
  // Run as postinstall script
30
31
  if (process.argv[1] === fileURLToPath(import.meta.url)) {
31
- installGlobalSkill()
32
- .then(() => console.log('✓ morph-init skill installed to ~/.claude/skills/'))
33
- .catch(e => console.warn('Could not install morph-init skill globally:', e.message));
32
+ const HOOKS_SRC = join(FRAMEWORK_DIR, 'hooks', 'claude-code');
33
+
34
+ await Promise.allSettled([
35
+ installGlobalSkill()
36
+ .then(() => console.log('✓ morph-init skill installed to ~/.claude/skills/')),
37
+ installGlobalStatusline(HOOKS_SRC)
38
+ .then(() => console.log('✓ statusline installed to ~/.claude/')),
39
+ ]).then(results => {
40
+ for (const r of results) {
41
+ if (r.status === 'rejected') {
42
+ console.warn(' postinstall warning:', r.reason?.message || r.reason);
43
+ }
44
+ }
45
+ });
34
46
  }