@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.
- package/CLAUDE.md +21 -0
- package/README.md +2 -2
- package/bin/morph-spec.js +44 -55
- package/bin/task-manager.js +133 -20
- package/bin/validate.js +67 -33
- package/claude-plugin.json +1 -1
- package/docs/CHEATSHEET.md +201 -203
- package/docs/QUICKSTART.md +2 -2
- package/framework/CLAUDE.md +99 -77
- package/framework/agents.json +734 -182
- package/framework/commands/commit.md +166 -0
- package/framework/commands/morph-apply.md +13 -2
- package/framework/commands/morph-archive.md +8 -2
- package/framework/commands/morph-infra.md +6 -0
- package/framework/commands/morph-preflight.md +6 -0
- package/framework/commands/morph-proposal.md +56 -7
- package/framework/commands/morph-status.md +6 -0
- package/framework/commands/morph-troubleshoot.md +6 -0
- package/framework/hooks/claude-code/notification/approval-reminder.js +3 -2
- package/framework/hooks/claude-code/post-tool-use/context-refresh.js +1 -1
- package/framework/hooks/claude-code/post-tool-use/dispatch.js +155 -32
- package/framework/hooks/claude-code/post-tool-use/skill-reminder.js +78 -0
- package/framework/hooks/claude-code/post-tool-use/validator-feedback.js +8 -17
- package/framework/hooks/claude-code/pre-compact/save-morph-context.js +16 -3
- package/framework/hooks/claude-code/pre-tool-use/enforce-phase-writes.js +4 -3
- package/framework/hooks/claude-code/pre-tool-use/protect-spec-files.js +4 -3
- package/framework/hooks/claude-code/pre-tool-use/task-tracking-guard.js +60 -0
- package/framework/hooks/claude-code/session-start/inject-morph-context.js +124 -2
- package/framework/hooks/claude-code/session-start/post-compact-restore.js +41 -0
- package/framework/hooks/claude-code/statusline.py +76 -30
- package/framework/hooks/claude-code/stop/validate-completion.js +2 -15
- package/framework/hooks/claude-code/user-prompt/enrich-prompt.js +23 -5
- package/framework/hooks/claude-code/user-prompt/set-terminal-title.js +14 -6
- package/framework/hooks/shared/activity-logger.js +0 -24
- package/framework/hooks/shared/compact-restore.js +100 -0
- package/framework/hooks/shared/dispatch-helpers.js +116 -0
- package/framework/hooks/shared/phase-utils.js +12 -5
- package/framework/hooks/shared/skill-reminder-helpers.js +79 -0
- package/framework/hooks/shared/stale-task-reset.js +57 -0
- package/framework/hooks/shared/state-reader.js +29 -5
- package/framework/hooks/shared/worktree-helpers.js +53 -0
- package/framework/phases.json +69 -14
- package/framework/rules/morph-workflow.md +88 -86
- package/framework/skills/level-0-meta/mcp-registry.json +86 -51
- package/framework/skills/level-0-meta/{brainstorming → morph-brainstorming}/SKILL.md +14 -17
- package/framework/skills/level-0-meta/morph-checklist/SKILL.md +2 -2
- package/framework/skills/level-0-meta/{code-review → morph-code-review}/SKILL.md +2 -2
- package/framework/skills/level-0-meta/{code-review-nextjs → morph-code-review-nextjs}/SKILL.md +163 -163
- package/framework/skills/level-0-meta/{frontend-review → morph-frontend-review}/SKILL.md +9 -9
- package/framework/skills/level-0-meta/morph-init/SKILL.md +77 -12
- package/framework/skills/level-0-meta/{post-implementation → morph-post-implementation}/SKILL.md +62 -15
- package/framework/skills/level-0-meta/morph-replicate/SKILL.md +5 -5
- package/framework/skills/level-0-meta/morph-replicate/references/blazor-html-mapping.md +1 -1
- package/framework/skills/level-0-meta/{simulation-checklist → morph-simulation-checklist}/SKILL.md +1 -1
- package/framework/skills/level-0-meta/{terminal-title → morph-terminal-title}/SKILL.md +2 -2
- package/framework/skills/level-0-meta/{tool-usage-guide → morph-tool-usage-guide}/SKILL.md +3 -4
- package/framework/skills/level-0-meta/{tool-usage-guide → morph-tool-usage-guide}/references/tools-per-phase.md +7 -7
- package/framework/skills/level-0-meta/{verification-before-completion → morph-verification-before-completion}/SKILL.md +2 -2
- package/framework/skills/level-0-meta/{verification-before-completion → morph-verification-before-completion}/scripts/check-phase-outputs.mjs +2 -2
- package/framework/skills/level-1-workflows/morph-phase-clarify/SKILL.md +238 -0
- package/framework/skills/level-1-workflows/{phase-codebase-analysis → morph-phase-codebase-analysis}/SKILL.md +3 -3
- package/framework/skills/level-1-workflows/morph-phase-design/SKILL.md +507 -0
- package/framework/skills/level-1-workflows/{phase-implement → morph-phase-implement}/SKILL.md +168 -27
- package/framework/skills/level-1-workflows/morph-phase-implement/prompts/code-quality-reviewer-prompt.md +50 -0
- package/framework/skills/level-1-workflows/morph-phase-implement/prompts/implementer-prompt.md +45 -0
- package/framework/skills/level-1-workflows/morph-phase-implement/prompts/spec-reviewer-prompt.md +47 -0
- package/framework/skills/level-1-workflows/morph-phase-plan/SKILL.md +254 -0
- package/framework/skills/level-1-workflows/{phase-setup → morph-phase-setup}/SKILL.md +50 -3
- package/framework/skills/level-1-workflows/{phase-tasks → morph-phase-tasks}/SKILL.md +48 -11
- package/framework/skills/level-1-workflows/{phase-tasks → morph-phase-tasks}/scripts/validate-tasks.mjs +3 -3
- package/framework/skills/level-1-workflows/{phase-uiux → morph-phase-uiux}/SKILL.md +46 -11
- package/framework/skills/level-1-workflows/morph-scope-escalation/SKILL.md +97 -0
- package/framework/standards/STANDARDS.json +640 -88
- package/framework/standards/infrastructure/vercel/vercel-database.md +106 -0
- package/framework/standards/integration/mcp/mcp-tools.md +25 -7
- package/framework/templates/REGISTRY.json +1825 -1909
- package/framework/templates/context/CONTEXT-FEATURE.md +276 -276
- package/framework/templates/docs/onboarding.md +3 -7
- package/package.json +2 -7
- package/src/commands/agents/dispatch-agents.js +104 -6
- package/src/commands/mcp/mcp-setup.js +39 -2
- package/src/commands/phase/phase-reset.js +74 -0
- package/src/commands/project/doctor.js +34 -51
- package/src/commands/project/init.js +1 -1
- package/src/commands/project/status.js +2 -2
- package/src/commands/project/update.js +381 -365
- package/src/commands/project/worktree.js +154 -0
- package/src/commands/scope/escalate.js +215 -0
- package/src/commands/state/advance-phase.js +132 -68
- package/src/commands/state/approve.js +2 -2
- package/src/commands/state/index.js +7 -8
- package/src/commands/state/phase-runner.js +1 -1
- package/src/commands/state/state.js +61 -6
- package/src/commands/task/expand.js +100 -0
- package/src/commands/tasks/task.js +78 -99
- package/src/commands/templates/template-render.js +93 -173
- package/src/commands/trust/trust.js +26 -21
- package/src/core/paths/output-schema.js +19 -3
- package/src/core/state/phase-state-machine.js +7 -4
- package/src/core/state/state-manager.js +32 -57
- package/src/core/workflows/workflow-detector.js +9 -87
- package/src/lib/detectors/claude-config-detector.js +93 -347
- package/src/lib/detectors/design-system-detector.js +189 -189
- package/src/lib/detectors/index.js +155 -57
- package/src/lib/generators/context-generator.js +2 -2
- package/src/lib/installers/mcp-installer.js +37 -5
- package/src/lib/phase-chain/phase-validator.js +336 -0
- package/src/lib/scope/impact-analyzer.js +106 -0
- package/src/lib/stack/stack-profile.js +88 -0
- package/src/lib/tasks/task-classifier.js +16 -0
- package/src/lib/tasks/task-parser.js +1 -1
- package/src/lib/tasks/test-runner.js +77 -0
- package/src/lib/trust/trust-manager.js +32 -144
- package/src/lib/validators/shared/emit-validator-dispatch.js +64 -0
- package/src/lib/validators/spec-validator.js +58 -4
- package/src/lib/validators/validation-runner.js +23 -11
- package/src/scripts/setup-infra.js +255 -224
- package/src/utils/agents-installer.js +34 -14
- package/src/utils/banner.js +1 -1
- package/src/utils/claude-settings-manager.js +1 -1
- package/src/utils/file-copier.js +1 -1
- package/src/utils/hooks-installer.js +272 -8
- package/framework/hooks/dev/check-sync-health.js +0 -117
- package/framework/hooks/dev/guard-version-numbers.js +0 -57
- package/framework/hooks/dev/sync-standards-registry.js +0 -60
- package/framework/hooks/dev/sync-template-registry.js +0 -60
- package/framework/hooks/dev/validate-skill-format.js +0 -70
- package/framework/hooks/dev/validate-standard-format.js +0 -73
- package/framework/skills/level-1-workflows/phase-clarify/SKILL.md +0 -190
- package/framework/skills/level-1-workflows/phase-design/SKILL.md +0 -366
- package/framework/templates/meta-prompts/hops/hop-retry.md +0 -78
- package/framework/templates/meta-prompts/hops/hop-validation.md +0 -97
- package/framework/templates/meta-prompts/hops/hop-wrapper.md +0 -36
- package/framework/workflows/configs/design-impl.json +0 -49
- package/framework/workflows/configs/express.json +0 -45
- package/framework/workflows/configs/fast-track.json +0 -42
- package/framework/workflows/configs/full-morph.json +0 -79
- package/framework/workflows/configs/fusion.json +0 -39
- package/framework/workflows/configs/long-running.json +0 -33
- package/framework/workflows/configs/spec-only.json +0 -43
- package/framework/workflows/configs/ui-refresh.json +0 -49
- package/framework/workflows/configs/zero-touch.json +0 -82
- package/src/commands/project/index.js +0 -8
- package/src/commands/project/monitor.js +0 -295
- package/src/commands/project/tutorial.js +0 -115
- package/src/commands/state/validate-phase.js +0 -238
- package/src/commands/templates/generate-contracts.js +0 -445
- package/src/core/index.js +0 -10
- package/src/core/orchestrator.js +0 -171
- package/src/core/registry/command-registry.js +0 -28
- package/src/core/registry/index.js +0 -8
- package/src/core/registry/validator-registry.js +0 -204
- package/src/core/state/index.js +0 -8
- package/src/core/templates/index.js +0 -9
- package/src/core/templates/template-data-sources.js +0 -325
- package/src/core/templates/template-validator.js +0 -296
- package/src/core/workflows/index.js +0 -7
- package/src/generator/config-generator.js +0 -206
- package/src/generator/templates/config.json.template +0 -40
- package/src/generator/templates/project.md.template +0 -67
- package/src/lib/agents/micro-agent-factory.js +0 -161
- package/src/lib/analysis/complexity-analyzer.js +0 -441
- package/src/lib/analysis/index.js +0 -7
- package/src/lib/analytics/analytics-engine.js +0 -345
- package/src/lib/checkpoints/checkpoint-hooks.js +0 -298
- package/src/lib/checkpoints/index.js +0 -7
- package/src/lib/context/context-bundler.js +0 -241
- package/src/lib/context/context-optimizer.js +0 -212
- package/src/lib/context/context-tracker.js +0 -273
- package/src/lib/context/core-four-tracker.js +0 -201
- package/src/lib/context/mcp-optimizer.js +0 -200
- package/src/lib/detectors/config-detector.js +0 -223
- package/src/lib/detectors/standards-generator.js +0 -335
- package/src/lib/detectors/structure-detector.js +0 -275
- package/src/lib/execution/fusion-executor.js +0 -304
- package/src/lib/execution/parallel-executor.js +0 -270
- package/src/lib/hooks/stop-hook-executor.js +0 -286
- package/src/lib/hops/hop-composer.js +0 -221
- package/src/lib/monitor/agent-resolver.js +0 -144
- package/src/lib/monitor/renderer.js +0 -230
- package/src/lib/orchestration/index.js +0 -7
- package/src/lib/orchestration/team-orchestrator.js +0 -404
- package/src/lib/phase-chain/eligibility-checker.js +0 -243
- package/src/lib/threads/thread-coordinator.js +0 -238
- package/src/lib/threads/thread-manager.js +0 -317
- package/src/lib/tracking/artifact-trail.js +0 -202
- package/src/sanitizer/context-sanitizer.js +0 -221
- package/src/sanitizer/patterns.js +0 -163
- package/src/scanner/project-scanner.js +0 -242
- package/src/ui/diff-display.js +0 -91
- package/src/ui/interactive-wizard.js +0 -96
- package/src/ui/user-review.js +0 -211
- package/src/ui/wizard-questions.js +0 -188
- package/src/utils/color-utils.js +0 -70
- package/src/utils/process-handler.js +0 -97
- package/src/writer/file-writer.js +0 -86
- /package/framework/skills/level-0-meta/{brainstorming → morph-brainstorming}/references/proposal-example.md +0 -0
- /package/framework/skills/level-0-meta/{code-review → morph-code-review}/references/review-example.md +0 -0
- /package/framework/skills/level-0-meta/{code-review → morph-code-review}/references/review-guidelines.md +0 -0
- /package/framework/skills/level-0-meta/{code-review → morph-code-review}/scripts/scan-csharp.mjs +0 -0
- /package/framework/skills/level-0-meta/{code-review-nextjs → morph-code-review-nextjs}/references/review-example-nextjs.md +0 -0
- /package/framework/skills/level-0-meta/{code-review-nextjs → morph-code-review-nextjs}/scripts/scan-nextjs.mjs +0 -0
- /package/framework/skills/level-0-meta/{frontend-review → morph-frontend-review}/scripts/scan-accessibility.mjs +0 -0
- /package/framework/skills/level-0-meta/{post-implementation → morph-post-implementation}/scripts/detect-dev-server.mjs +0 -0
- /package/framework/skills/level-0-meta/{post-implementation → morph-post-implementation}/scripts/detect-stack.mjs +0 -0
- /package/framework/skills/level-0-meta/{terminal-title → morph-terminal-title}/scripts/set_title.sh +0 -0
- /package/framework/skills/level-1-workflows/{phase-clarify → morph-phase-clarify}/references/clarifications-example.md +0 -0
- /package/framework/skills/level-1-workflows/{phase-design → morph-phase-design}/references/architecture-analysis-guide.md +0 -0
- /package/framework/skills/level-1-workflows/{phase-design → morph-phase-design}/references/spec-authoring-guide.md +0 -0
- /package/framework/skills/level-1-workflows/{phase-design → morph-phase-design}/references/spec-example.md +0 -0
- /package/framework/skills/level-1-workflows/{phase-implement → morph-phase-implement}/references/recap-example.md +0 -0
- /package/framework/skills/level-1-workflows/{phase-implement → morph-phase-implement}/references/vsa-implementation-guide.md +0 -0
- /package/framework/skills/level-1-workflows/{phase-tasks → morph-phase-tasks}/references/task-planning-patterns.md +0 -0
- /package/framework/skills/level-1-workflows/{phase-tasks → morph-phase-tasks}/references/tasks-example.md +0 -0
|
@@ -1,224 +1,255 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* setup-infra.js
|
|
3
|
-
*
|
|
4
|
-
* Headless infrastructure setup for MORPH-SPEC.
|
|
5
|
-
* Extracted from init.js (steps 1-10) so it can be called by the
|
|
6
|
-
* /morph-init Claude Code skill via `morph-spec setup-infra` without
|
|
7
|
-
* interactive prompts or stack detection.
|
|
8
|
-
*
|
|
9
|
-
* Usage:
|
|
10
|
-
* import { setupInfra } from './setup-infra.js';
|
|
11
|
-
* await setupInfra('/path/to/project');
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
import { join, dirname } from 'path';
|
|
15
|
-
import { fileURLToPath } from 'url';
|
|
16
|
-
import { execSync } from 'child_process';
|
|
17
|
-
import {
|
|
18
|
-
copyDirectory,
|
|
19
|
-
copyFile,
|
|
20
|
-
pathExists,
|
|
21
|
-
writeJson,
|
|
22
|
-
ensureDir,
|
|
23
|
-
writeFile,
|
|
24
|
-
updateGitignore
|
|
25
|
-
} from '../utils/file-copier.js';
|
|
26
|
-
import { saveProjectMorphVersion, getInstalledCLIVersion } from '../utils/version-checker.js';
|
|
27
|
-
import { installClaudeHooks, installGlobalStatusline } from '../utils/claude-settings-manager.js';
|
|
28
|
-
import { installSkills } from '../utils/skills-installer.js';
|
|
29
|
-
import { installAgents, installDomainAgents } from '../utils/agents-installer.js';
|
|
30
|
-
|
|
31
|
-
const FRAMEWORK_DIR = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'framework');
|
|
32
|
-
|
|
33
|
-
const REQUIRED_PLUGINS = [
|
|
34
|
-
'superpowers@claude-plugins-official',
|
|
35
|
-
'context7@claude-plugins-official',
|
|
36
|
-
];
|
|
37
|
-
|
|
38
|
-
async function installRequiredPlugins(log, exec) {
|
|
39
|
-
log('Step 0: Installing required Claude Code plugins...');
|
|
40
|
-
for (const plugin of REQUIRED_PLUGINS) {
|
|
41
|
-
try {
|
|
42
|
-
exec(`claude plugin install ${plugin}`, { stdio: 'inherit' });
|
|
43
|
-
log(` ✓ ${plugin}`);
|
|
44
|
-
} catch {
|
|
45
|
-
log(` ⚠ Failed to install ${plugin} — install manually: claude plugin install ${plugin}`);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Installs MORPH-SPEC infrastructure into the target project directory.
|
|
52
|
-
* Headless — no prompts, no spinner (suppressed when MORPH_QUIET=1), no stack detection.
|
|
53
|
-
*
|
|
54
|
-
* @param {string} targetPath - Absolute path to the target project directory
|
|
55
|
-
*/
|
|
56
|
-
export async function setupInfra(targetPath, { _exec = execSync } = {}) {
|
|
57
|
-
const quiet = process.env.MORPH_QUIET === '1';
|
|
58
|
-
|
|
59
|
-
function log(msg) {
|
|
60
|
-
if (!quiet) process.stdout.write(msg + '\n');
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// --- 0. Install required Claude Code plugins ---
|
|
64
|
-
await installRequiredPlugins(log, _exec);
|
|
65
|
-
|
|
66
|
-
// --- 1. Copy CLAUDE.md (backup existing non-MORPH CLAUDE.md) ---
|
|
67
|
-
log('Step 1: Copying CLAUDE.md...');
|
|
68
|
-
const claudeMdSrc = join(FRAMEWORK_DIR, 'CLAUDE.md');
|
|
69
|
-
const claudeMdDest = join(targetPath, 'CLAUDE.md');
|
|
70
|
-
|
|
71
|
-
if (await pathExists(claudeMdDest)) {
|
|
72
|
-
const { readFile } = await import('../utils/file-copier.js');
|
|
73
|
-
const existingContent = await readFile(claudeMdDest);
|
|
74
|
-
if (!existingContent.includes('MORPH-SPEC')) {
|
|
75
|
-
await copyFile(claudeMdDest, `${claudeMdDest}.backup`);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
await copyFile(claudeMdSrc, claudeMdDest);
|
|
79
|
-
|
|
80
|
-
// --- 2. Create .morph directory structure ---
|
|
81
|
-
log('Step 2: Creating .morph structure...');
|
|
82
|
-
const morphPath = join(targetPath, '.morph');
|
|
83
|
-
const configDir = join(morphPath, 'config');
|
|
84
|
-
const frameworkDestDir = join(morphPath, 'framework');
|
|
85
|
-
const contextDir = join(morphPath, 'context');
|
|
86
|
-
const featuresDir = join(morphPath, 'features');
|
|
87
|
-
const checkpointsDir = join(morphPath, 'checkpoints');
|
|
88
|
-
const memoryDir = join(morphPath, 'memory');
|
|
89
|
-
const archiveDir = join(morphPath, 'archive');
|
|
90
|
-
|
|
91
|
-
await ensureDir(configDir);
|
|
92
|
-
await ensureDir(frameworkDestDir);
|
|
93
|
-
await ensureDir(contextDir);
|
|
94
|
-
await ensureDir(featuresDir);
|
|
95
|
-
await ensureDir(checkpointsDir);
|
|
96
|
-
await ensureDir(memoryDir);
|
|
97
|
-
await ensureDir(archiveDir);
|
|
98
|
-
|
|
99
|
-
// --- 3. Write minimal config.json (only if not exists) ---
|
|
100
|
-
log('Step 3: Writing config.json...');
|
|
101
|
-
const configPath = join(configDir, 'config.json');
|
|
102
|
-
if (!(await pathExists(configPath))) {
|
|
103
|
-
const dirName = targetPath.split(/[\/]/).pop();
|
|
104
|
-
const config = {
|
|
105
|
-
framework: 'global',
|
|
106
|
-
frameworkVersion: getInstalledCLIVersion(),
|
|
107
|
-
project: {
|
|
108
|
-
name: dirName
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
await writeJson(configPath, config);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// --- 4. Write placeholder context/README.md (only if not exists) ---
|
|
115
|
-
log('Step 4: Writing context/README.md...');
|
|
116
|
-
const contextReadmePath = join(contextDir, 'README.md');
|
|
117
|
-
if (!(await pathExists(contextReadmePath))) {
|
|
118
|
-
const dirName = targetPath.split(/[\/]/).pop();
|
|
119
|
-
const readmeContent = `# ${dirName} — Project Context\n\nRun /morph
|
|
120
|
-
await writeFile(contextReadmePath, readmeContent);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// --- 5. Copy framework/templates → .morph/framework/templates ---
|
|
124
|
-
log('Step 5: Copying framework templates...');
|
|
125
|
-
const frameworkTemplatesSrc = join(FRAMEWORK_DIR, 'templates');
|
|
126
|
-
const templatesDest = join(frameworkDestDir, 'templates');
|
|
127
|
-
if (await pathExists(frameworkTemplatesSrc)) {
|
|
128
|
-
await copyDirectory(frameworkTemplatesSrc, templatesDest);
|
|
129
|
-
} else {
|
|
130
|
-
await ensureDir(templatesDest);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// --- 6. Copy framework/standards → .morph/framework/standards ---
|
|
134
|
-
log('Step 6: Copying framework standards...');
|
|
135
|
-
const frameworkStandardsSrc = join(FRAMEWORK_DIR, 'standards');
|
|
136
|
-
const frameworkStandardsDest = join(frameworkDestDir, 'standards');
|
|
137
|
-
if (await pathExists(frameworkStandardsSrc)) {
|
|
138
|
-
await copyDirectory(frameworkStandardsSrc, frameworkStandardsDest);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// --- 7. Copy framework/hooks → .morph/framework/hooks ---
|
|
142
|
-
log('Step 7: Copying hooks...');
|
|
143
|
-
const hooksSrc = join(FRAMEWORK_DIR, 'hooks');
|
|
144
|
-
const hooksDest = join(frameworkDestDir, 'hooks');
|
|
145
|
-
if (await pathExists(hooksSrc)) {
|
|
146
|
-
await copyDirectory(hooksSrc, hooksDest);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// --- 8. Copy framework/agents.json → .morph/framework/agents.json ---
|
|
150
|
-
log('Step 8: Copying agents.json...');
|
|
151
|
-
const agentsSrc = join(FRAMEWORK_DIR, 'agents.json');
|
|
152
|
-
const agentsDest = join(frameworkDestDir, 'agents.json');
|
|
153
|
-
if (await pathExists(agentsSrc)) {
|
|
154
|
-
await copyFile(agentsSrc, agentsDest);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
// --- 9. Copy framework/commands → .claude/commands ---
|
|
158
|
-
log('Step 9: Setting up Claude Code integration...');
|
|
159
|
-
const claudeDest = join(targetPath, '.claude');
|
|
160
|
-
const commandsSrc = join(FRAMEWORK_DIR, 'commands');
|
|
161
|
-
const commandsDest = join(claudeDest, 'commands');
|
|
162
|
-
if (await pathExists(commandsSrc)) {
|
|
163
|
-
await copyDirectory(commandsSrc, commandsDest);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// --- 10. Copy framework/rules → .claude/rules ---
|
|
167
|
-
log('Step 10: Installing path-scoped rules...');
|
|
168
|
-
const rulesSrc = join(FRAMEWORK_DIR, 'rules');
|
|
169
|
-
const rulesDest = join(claudeDest, 'rules');
|
|
170
|
-
if (await pathExists(rulesSrc)) {
|
|
171
|
-
await copyDirectory(rulesSrc, rulesDest);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// --- 11. installSkills ---
|
|
175
|
-
log('Step 11: Installing skills...');
|
|
176
|
-
await installSkills(targetPath);
|
|
177
|
-
|
|
178
|
-
// --- 12. installAgents ---
|
|
179
|
-
log('Step 12: Installing agents...');
|
|
180
|
-
const agentCounts = await installAgents(targetPath, FRAMEWORK_DIR, { projectStack: null });
|
|
181
|
-
|
|
182
|
-
// --- 13. installDomainAgents ---
|
|
183
|
-
log('Step 13: Installing domain agents...');
|
|
184
|
-
const domainCounts = await installDomainAgents(targetPath, FRAMEWORK_DIR);
|
|
185
|
-
|
|
186
|
-
// --- 14. Copy framework/CLAUDE.md → .claude/CLAUDE.md ---
|
|
187
|
-
log('Step 14: Installing .claude/CLAUDE.md...');
|
|
188
|
-
const runtimeClaudeMdDest = join(claudeDest, 'CLAUDE.md');
|
|
189
|
-
if (await pathExists(claudeMdSrc)) {
|
|
190
|
-
await copyFile(claudeMdSrc, runtimeClaudeMdDest);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
// --- 15. installGlobalStatusline (non-critical) ---
|
|
194
|
-
log('Step 15: Installing global statusline...');
|
|
195
|
-
const HOOKS_SRC = join(FRAMEWORK_DIR, 'hooks', 'claude-code');
|
|
196
|
-
try {
|
|
197
|
-
await installGlobalStatusline(HOOKS_SRC);
|
|
198
|
-
} catch {
|
|
199
|
-
// Non-critical — global ~/.claude may not be writable
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// --- 16. installClaudeHooks ---
|
|
203
|
-
log('Step 16: Installing Claude Code hooks...');
|
|
204
|
-
await installClaudeHooks(targetPath);
|
|
205
|
-
|
|
206
|
-
// ---
|
|
207
|
-
log('Step
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
log('
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
1
|
+
/**
|
|
2
|
+
* setup-infra.js
|
|
3
|
+
*
|
|
4
|
+
* Headless infrastructure setup for MORPH-SPEC.
|
|
5
|
+
* Extracted from init.js (steps 1-10) so it can be called by the
|
|
6
|
+
* /morph-init Claude Code skill via `morph-spec setup-infra` without
|
|
7
|
+
* interactive prompts or stack detection.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* import { setupInfra } from './setup-infra.js';
|
|
11
|
+
* await setupInfra('/path/to/project');
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { join, dirname } from 'path';
|
|
15
|
+
import { fileURLToPath } from 'url';
|
|
16
|
+
import { execSync } from 'child_process';
|
|
17
|
+
import {
|
|
18
|
+
copyDirectory,
|
|
19
|
+
copyFile,
|
|
20
|
+
pathExists,
|
|
21
|
+
writeJson,
|
|
22
|
+
ensureDir,
|
|
23
|
+
writeFile,
|
|
24
|
+
updateGitignore
|
|
25
|
+
} from '../utils/file-copier.js';
|
|
26
|
+
import { saveProjectMorphVersion, getInstalledCLIVersion } from '../utils/version-checker.js';
|
|
27
|
+
import { installClaudeHooks, installGlobalStatusline, installVSCodeTerminalSettings, installShellIntegration } from '../utils/claude-settings-manager.js';
|
|
28
|
+
import { installSkills } from '../utils/skills-installer.js';
|
|
29
|
+
import { installAgents, installDomainAgents } from '../utils/agents-installer.js';
|
|
30
|
+
|
|
31
|
+
const FRAMEWORK_DIR = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'framework');
|
|
32
|
+
|
|
33
|
+
const REQUIRED_PLUGINS = [
|
|
34
|
+
'superpowers@claude-plugins-official',
|
|
35
|
+
'context7@claude-plugins-official',
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
async function installRequiredPlugins(log, exec) {
|
|
39
|
+
log('Step 0: Installing required Claude Code plugins...');
|
|
40
|
+
for (const plugin of REQUIRED_PLUGINS) {
|
|
41
|
+
try {
|
|
42
|
+
exec(`claude plugin install ${plugin}`, { stdio: 'inherit' });
|
|
43
|
+
log(` ✓ ${plugin}`);
|
|
44
|
+
} catch {
|
|
45
|
+
log(` ⚠ Failed to install ${plugin} — install manually: claude plugin install ${plugin}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Installs MORPH-SPEC infrastructure into the target project directory.
|
|
52
|
+
* Headless — no prompts, no spinner (suppressed when MORPH_QUIET=1), no stack detection.
|
|
53
|
+
*
|
|
54
|
+
* @param {string} targetPath - Absolute path to the target project directory
|
|
55
|
+
*/
|
|
56
|
+
export async function setupInfra(targetPath, { _exec = execSync } = {}) {
|
|
57
|
+
const quiet = process.env.MORPH_QUIET === '1';
|
|
58
|
+
|
|
59
|
+
function log(msg) {
|
|
60
|
+
if (!quiet) process.stdout.write(msg + '\n');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// --- 0. Install required Claude Code plugins ---
|
|
64
|
+
await installRequiredPlugins(log, _exec);
|
|
65
|
+
|
|
66
|
+
// --- 1. Copy CLAUDE.md (backup existing non-MORPH CLAUDE.md) ---
|
|
67
|
+
log('Step 1: Copying CLAUDE.md...');
|
|
68
|
+
const claudeMdSrc = join(FRAMEWORK_DIR, 'CLAUDE.md');
|
|
69
|
+
const claudeMdDest = join(targetPath, 'CLAUDE.md');
|
|
70
|
+
|
|
71
|
+
if (await pathExists(claudeMdDest)) {
|
|
72
|
+
const { readFile } = await import('../utils/file-copier.js');
|
|
73
|
+
const existingContent = await readFile(claudeMdDest);
|
|
74
|
+
if (!existingContent.includes('MORPH-SPEC')) {
|
|
75
|
+
await copyFile(claudeMdDest, `${claudeMdDest}.backup`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
await copyFile(claudeMdSrc, claudeMdDest);
|
|
79
|
+
|
|
80
|
+
// --- 2. Create .morph directory structure ---
|
|
81
|
+
log('Step 2: Creating .morph structure...');
|
|
82
|
+
const morphPath = join(targetPath, '.morph');
|
|
83
|
+
const configDir = join(morphPath, 'config');
|
|
84
|
+
const frameworkDestDir = join(morphPath, 'framework');
|
|
85
|
+
const contextDir = join(morphPath, 'context');
|
|
86
|
+
const featuresDir = join(morphPath, 'features');
|
|
87
|
+
const checkpointsDir = join(morphPath, 'checkpoints');
|
|
88
|
+
const memoryDir = join(morphPath, 'memory');
|
|
89
|
+
const archiveDir = join(morphPath, 'archive');
|
|
90
|
+
|
|
91
|
+
await ensureDir(configDir);
|
|
92
|
+
await ensureDir(frameworkDestDir);
|
|
93
|
+
await ensureDir(contextDir);
|
|
94
|
+
await ensureDir(featuresDir);
|
|
95
|
+
await ensureDir(checkpointsDir);
|
|
96
|
+
await ensureDir(memoryDir);
|
|
97
|
+
await ensureDir(archiveDir);
|
|
98
|
+
|
|
99
|
+
// --- 3. Write minimal config.json (only if not exists) ---
|
|
100
|
+
log('Step 3: Writing config.json...');
|
|
101
|
+
const configPath = join(configDir, 'config.json');
|
|
102
|
+
if (!(await pathExists(configPath))) {
|
|
103
|
+
const dirName = targetPath.split(/[\/]/).pop();
|
|
104
|
+
const config = {
|
|
105
|
+
framework: 'global',
|
|
106
|
+
frameworkVersion: getInstalledCLIVersion(),
|
|
107
|
+
project: {
|
|
108
|
+
name: dirName
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
await writeJson(configPath, config);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// --- 4. Write placeholder context/README.md (only if not exists) ---
|
|
115
|
+
log('Step 4: Writing context/README.md...');
|
|
116
|
+
const contextReadmePath = join(contextDir, 'README.md');
|
|
117
|
+
if (!(await pathExists(contextReadmePath))) {
|
|
118
|
+
const dirName = targetPath.split(/[\/]/).pop();
|
|
119
|
+
const readmeContent = `# ${dirName} — Project Context\n\nRun /morph:init to generate project context.\n`;
|
|
120
|
+
await writeFile(contextReadmePath, readmeContent);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// --- 5. Copy framework/templates → .morph/framework/templates ---
|
|
124
|
+
log('Step 5: Copying framework templates...');
|
|
125
|
+
const frameworkTemplatesSrc = join(FRAMEWORK_DIR, 'templates');
|
|
126
|
+
const templatesDest = join(frameworkDestDir, 'templates');
|
|
127
|
+
if (await pathExists(frameworkTemplatesSrc)) {
|
|
128
|
+
await copyDirectory(frameworkTemplatesSrc, templatesDest);
|
|
129
|
+
} else {
|
|
130
|
+
await ensureDir(templatesDest);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// --- 6. Copy framework/standards → .morph/framework/standards ---
|
|
134
|
+
log('Step 6: Copying framework standards...');
|
|
135
|
+
const frameworkStandardsSrc = join(FRAMEWORK_DIR, 'standards');
|
|
136
|
+
const frameworkStandardsDest = join(frameworkDestDir, 'standards');
|
|
137
|
+
if (await pathExists(frameworkStandardsSrc)) {
|
|
138
|
+
await copyDirectory(frameworkStandardsSrc, frameworkStandardsDest);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// --- 7. Copy framework/hooks → .morph/framework/hooks ---
|
|
142
|
+
log('Step 7: Copying hooks...');
|
|
143
|
+
const hooksSrc = join(FRAMEWORK_DIR, 'hooks');
|
|
144
|
+
const hooksDest = join(frameworkDestDir, 'hooks');
|
|
145
|
+
if (await pathExists(hooksSrc)) {
|
|
146
|
+
await copyDirectory(hooksSrc, hooksDest);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// --- 8. Copy framework/agents.json → .morph/framework/agents.json ---
|
|
150
|
+
log('Step 8: Copying agents.json...');
|
|
151
|
+
const agentsSrc = join(FRAMEWORK_DIR, 'agents.json');
|
|
152
|
+
const agentsDest = join(frameworkDestDir, 'agents.json');
|
|
153
|
+
if (await pathExists(agentsSrc)) {
|
|
154
|
+
await copyFile(agentsSrc, agentsDest);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// --- 9. Copy framework/commands → .claude/commands ---
|
|
158
|
+
log('Step 9: Setting up Claude Code integration...');
|
|
159
|
+
const claudeDest = join(targetPath, '.claude');
|
|
160
|
+
const commandsSrc = join(FRAMEWORK_DIR, 'commands');
|
|
161
|
+
const commandsDest = join(claudeDest, 'commands');
|
|
162
|
+
if (await pathExists(commandsSrc)) {
|
|
163
|
+
await copyDirectory(commandsSrc, commandsDest);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// --- 10. Copy framework/rules → .claude/rules ---
|
|
167
|
+
log('Step 10: Installing path-scoped rules...');
|
|
168
|
+
const rulesSrc = join(FRAMEWORK_DIR, 'rules');
|
|
169
|
+
const rulesDest = join(claudeDest, 'rules');
|
|
170
|
+
if (await pathExists(rulesSrc)) {
|
|
171
|
+
await copyDirectory(rulesSrc, rulesDest);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// --- 11. installSkills ---
|
|
175
|
+
log('Step 11: Installing skills...');
|
|
176
|
+
await installSkills(targetPath);
|
|
177
|
+
|
|
178
|
+
// --- 12. installAgents ---
|
|
179
|
+
log('Step 12: Installing agents...');
|
|
180
|
+
const agentCounts = await installAgents(targetPath, FRAMEWORK_DIR, { projectStack: null });
|
|
181
|
+
|
|
182
|
+
// --- 13. installDomainAgents ---
|
|
183
|
+
log('Step 13: Installing domain agents...');
|
|
184
|
+
const domainCounts = await installDomainAgents(targetPath, FRAMEWORK_DIR);
|
|
185
|
+
|
|
186
|
+
// --- 14. Copy framework/CLAUDE.md → .claude/CLAUDE.md ---
|
|
187
|
+
log('Step 14: Installing .claude/CLAUDE.md...');
|
|
188
|
+
const runtimeClaudeMdDest = join(claudeDest, 'CLAUDE.md');
|
|
189
|
+
if (await pathExists(claudeMdSrc)) {
|
|
190
|
+
await copyFile(claudeMdSrc, runtimeClaudeMdDest);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// --- 15. installGlobalStatusline (non-critical) ---
|
|
194
|
+
log('Step 15: Installing global statusline...');
|
|
195
|
+
const HOOKS_SRC = join(FRAMEWORK_DIR, 'hooks', 'claude-code');
|
|
196
|
+
try {
|
|
197
|
+
await installGlobalStatusline(HOOKS_SRC);
|
|
198
|
+
} catch {
|
|
199
|
+
// Non-critical — global ~/.claude may not be writable
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// --- 16. installClaudeHooks ---
|
|
203
|
+
log('Step 16: Installing Claude Code hooks...');
|
|
204
|
+
await installClaudeHooks(targetPath);
|
|
205
|
+
|
|
206
|
+
// --- 16a. installShellIntegration (non-critical) ---
|
|
207
|
+
log('Step 16a: Installing shell integration...');
|
|
208
|
+
try {
|
|
209
|
+
await installShellIntegration();
|
|
210
|
+
} catch {
|
|
211
|
+
// Non-critical — shell profile may not be writable
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// --- 16b. installVSCodeTerminalSettings (non-critical) ---
|
|
215
|
+
log('Step 16b: Configuring VS Code terminal settings...');
|
|
216
|
+
try {
|
|
217
|
+
await installVSCodeTerminalSettings();
|
|
218
|
+
} catch {
|
|
219
|
+
// Non-critical — VS Code settings may not be present
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// --- 17. saveProjectMorphVersion ---
|
|
223
|
+
log('Step 17: Saving version info...');
|
|
224
|
+
const cliVersion = getInstalledCLIVersion();
|
|
225
|
+
await saveProjectMorphVersion(targetPath, cliVersion);
|
|
226
|
+
|
|
227
|
+
// --- 18. updateGitignore ---
|
|
228
|
+
log('Step 18: Updating .gitignore...');
|
|
229
|
+
await updateGitignore(targetPath);
|
|
230
|
+
|
|
231
|
+
// --- 19. Initialize state.json (only if not exists) ---
|
|
232
|
+
log('Step 19: Initializing state.json...');
|
|
233
|
+
const statePath = join(morphPath, 'state.json');
|
|
234
|
+
if (!(await pathExists(statePath))) {
|
|
235
|
+
const dirName = targetPath.split(/[\/\\]/).pop();
|
|
236
|
+
const now = new Date().toISOString();
|
|
237
|
+
await writeJson(statePath, {
|
|
238
|
+
version: '5.0.0',
|
|
239
|
+
project: { name: dirName, type: 'unknown', createdAt: now, updatedAt: now },
|
|
240
|
+
features: {},
|
|
241
|
+
threads: {},
|
|
242
|
+
metadata: { totalFeatures: 0, completedFeatures: 0, totalTimeSpent: 0, lastUpdated: now }
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
log('setup-infra: complete.');
|
|
247
|
+
|
|
248
|
+
return {
|
|
249
|
+
agents: {
|
|
250
|
+
tier1: agentCounts?.tier1 ?? 0,
|
|
251
|
+
tier2: agentCounts?.tier2 ?? 0,
|
|
252
|
+
specialists: domainCounts?.specialists ?? 0,
|
|
253
|
+
},
|
|
254
|
+
};
|
|
255
|
+
}
|
|
@@ -39,7 +39,9 @@ export async function installAgents(projectDir, frameworkDir = 'framework', opti
|
|
|
39
39
|
|
|
40
40
|
const DOTNET_STACKS = ['dotnet', 'blazor', 'dotnet-api', 'fullstack'];
|
|
41
41
|
const eligible = agents.filter(a => {
|
|
42
|
-
if (a.tier !== 1 && a.tier !== 2) return false;
|
|
42
|
+
if (a.tier !== 1 && a.tier !== 2 && a.tier !== 4) return false;
|
|
43
|
+
// Tier 4 validators must have a teammate with spawn_prompt
|
|
44
|
+
if (a.tier === 4 && !a.teammate?.spawn_prompt) return false;
|
|
43
45
|
// Skip dotnet-senior for non-.NET projects
|
|
44
46
|
if (a.id === 'dotnet-senior' && projectStack && !DOTNET_STACKS.includes(projectStack)) {
|
|
45
47
|
return false;
|
|
@@ -49,9 +51,11 @@ export async function installAgents(projectDir, frameworkDir = 'framework', opti
|
|
|
49
51
|
|
|
50
52
|
let tier1 = 0;
|
|
51
53
|
let tier2 = 0;
|
|
54
|
+
let tier4 = 0;
|
|
52
55
|
for (const agent of eligible) {
|
|
53
56
|
const slug = agent.id ?? agent.name?.toLowerCase().replace(/\s+/g, '-');
|
|
54
|
-
const
|
|
57
|
+
const prefix = agent.tier === 4 ? 'morph-validator-' : 'morph-';
|
|
58
|
+
const filename = `${prefix}${slug}.md`;
|
|
55
59
|
const targetPath = join(targetDir, filename);
|
|
56
60
|
|
|
57
61
|
const description = buildDescription(agent);
|
|
@@ -63,8 +67,9 @@ export async function installAgents(projectDir, frameworkDir = 'framework', opti
|
|
|
63
67
|
|
|
64
68
|
if (agent.tier === 1) tier1++;
|
|
65
69
|
else if (agent.tier === 2) tier2++;
|
|
70
|
+
else if (agent.tier === 4) tier4++;
|
|
66
71
|
}
|
|
67
|
-
return { tier1, tier2 };
|
|
72
|
+
return { tier1, tier2, tier4 };
|
|
68
73
|
}
|
|
69
74
|
|
|
70
75
|
/**
|
|
@@ -78,16 +83,23 @@ const TIER_DEFAULTS = {
|
|
|
78
83
|
model: 'inherit',
|
|
79
84
|
tools: 'Read, Grep, Glob, Bash, Task',
|
|
80
85
|
maxTurns: 30,
|
|
81
|
-
skills: ['morph
|
|
86
|
+
skills: ['morph:checklist'],
|
|
82
87
|
memory: 'project',
|
|
83
88
|
},
|
|
84
89
|
2: {
|
|
85
90
|
model: 'inherit',
|
|
86
91
|
tools: 'Read, Grep, Glob, Bash',
|
|
87
92
|
maxTurns: 20,
|
|
88
|
-
skills: ['morph
|
|
93
|
+
skills: ['morph:checklist'],
|
|
89
94
|
memory: 'local',
|
|
90
95
|
},
|
|
96
|
+
4: {
|
|
97
|
+
model: 'haiku',
|
|
98
|
+
tools: 'Read, Glob, Grep',
|
|
99
|
+
maxTurns: 10,
|
|
100
|
+
skills: [],
|
|
101
|
+
memory: 'project',
|
|
102
|
+
},
|
|
91
103
|
};
|
|
92
104
|
|
|
93
105
|
/**
|
|
@@ -101,19 +113,27 @@ const TIER_DEFAULTS = {
|
|
|
101
113
|
function buildFrontmatter(agent, description) {
|
|
102
114
|
const defaults = TIER_DEFAULTS[agent.tier] ?? TIER_DEFAULTS[2];
|
|
103
115
|
const name = agent.title ?? agent.name;
|
|
104
|
-
const skillsList = defaults.skills.map(s => ` - ${s}`).join('\n');
|
|
105
116
|
|
|
106
|
-
|
|
117
|
+
// Allow per-agent tool overrides (e.g., morph-spec-validator needs Bash for npm test)
|
|
118
|
+
const tools = agent.teammate?.tools ?? defaults.tools;
|
|
119
|
+
// Allow per-agent maxTurns override
|
|
120
|
+
const maxTurns = agent.teammate?.maxTurns ?? defaults.maxTurns;
|
|
121
|
+
|
|
122
|
+
const lines = [
|
|
107
123
|
`name: ${name}`,
|
|
108
124
|
`description: ${description}`,
|
|
109
125
|
`model: ${defaults.model}`,
|
|
110
|
-
`tools: ${
|
|
111
|
-
`maxTurns: ${
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
''
|
|
116
|
-
|
|
126
|
+
`tools: ${tools}`,
|
|
127
|
+
`maxTurns: ${maxTurns}`,
|
|
128
|
+
];
|
|
129
|
+
|
|
130
|
+
if (defaults.skills.length > 0) {
|
|
131
|
+
const skillsList = defaults.skills.map(s => ` - ${s}`).join('\n');
|
|
132
|
+
lines.push(`skills:`, skillsList);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
lines.push(`memory: ${defaults.memory}`, '');
|
|
136
|
+
return lines.join('\n');
|
|
117
137
|
}
|
|
118
138
|
|
|
119
139
|
function buildDescription(agent) {
|
package/src/utils/banner.js
CHANGED
|
@@ -45,7 +45,7 @@ export function printInstallBanner({ version, nodeVersion, results = [] }) {
|
|
|
45
45
|
'',
|
|
46
46
|
sep('Next'),
|
|
47
47
|
` ${chalk.cyan('1.')} Open your project in Claude Code`,
|
|
48
|
-
` ${chalk.cyan('2.')} Run ${chalk.bold.white('/morph
|
|
48
|
+
` ${chalk.cyan('2.')} Run ${chalk.bold.white('/morph:init')}`,
|
|
49
49
|
'',
|
|
50
50
|
].join('\n'));
|
|
51
51
|
}
|
|
@@ -17,7 +17,7 @@ const MORPH_MANAGED_KEY = '_morph_managed';
|
|
|
17
17
|
// Re-export from hooks-installer (v2 registry-based)
|
|
18
18
|
// ============================================================================
|
|
19
19
|
|
|
20
|
-
export { installClaudeHooks, installGlobalStatusline, getHooksVersion } from './hooks-installer.js';
|
|
20
|
+
export { installClaudeHooks, installGlobalStatusline, installVSCodeTerminalSettings, installShellIntegration, getHooksVersion } from './hooks-installer.js';
|
|
21
21
|
export { installAgents } from './agents-installer.js';
|
|
22
22
|
|
|
23
23
|
// ============================================================================
|