@polymorphism-tech/morph-spec 11.1.0 → 11.2.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/README.md +1 -1
- package/bin/morph-spec.js +9 -19
- package/docs/CHEATSHEET.md +3 -3
- package/docs/QUICKSTART.md +1 -1
- package/framework/CLAUDE.md +2 -0
- package/framework/MORPH.md +7 -2
- package/framework/agents.json +3 -3
- package/framework/docs/CLI.md +14 -12
- package/framework/evals/review-checklist.md +9 -16
- package/framework/hooks/README.md +15 -9
- package/framework/hooks/claude-code/core/README.md +2 -2
- package/framework/hooks/claude-code/core/chain.js +9 -25
- package/framework/hooks/claude-code/core/comment-guard.js +3 -9
- package/framework/hooks/claude-code/core/conventional-commit.js +3 -3
- package/framework/hooks/claude-code/core/graph-refresh-kick.js +4 -4
- package/framework/hooks/claude-code/core/masked-exit.js +4 -3
- package/framework/hooks/claude-code/core/pre-bash-denylist.js +2 -2
- package/framework/hooks/claude-code/core/protect-spec-files.js +2 -4
- package/framework/hooks/claude-code/core/stack-changed.js +5 -4
- package/framework/hooks/claude-code/core/validate-completion.js +15 -12
- package/framework/hooks/shared/contract.js +22 -1
- package/framework/hooks/shared/git-paths.js +6 -0
- package/framework/hooks/shared/graph-freshness.js +3 -3
- package/framework/hooks/shared/graph-refresh.js +5 -10
- package/framework/hooks/shared/hook-response.js +1 -18
- package/framework/hooks/shared/payload-utils.js +12 -1
- package/framework/hooks/shared/phase-utils.js +4 -52
- package/framework/hooks/shared/report-progress.js +1 -1
- package/framework/mcp/registry.json +1 -17
- package/framework/rules/dotnet-templates.md +32 -33
- package/framework/rules/infrastructure-standards.md +9 -9
- package/framework/rules/neon-standards.md +4 -4
- package/framework/rules/nextjs-templates.md +10 -11
- package/framework/rules/ui-design.md +2 -2
- package/framework/schemas/config.schema.json +4 -0
- package/framework/skills/core/create-umbraco-lp/SKILL.md +1 -1
- package/framework/skills/core/migrate-lp-to-umbraco/SKILL.md +1 -1
- package/framework/skills/core/morph-apply/SKILL.md +5 -4
- package/framework/skills/core/morph-plan/SKILL.md +1 -1
- package/framework/skills/core/morph-uiux/SKILL.md +5 -5
- package/framework/standards/integration/mcp/mcp-tools.md +2 -2
- package/framework/templates/REGISTRY.json +1 -75
- package/framework/templates/docs/plan.md +1 -1
- package/framework/templates/dotnet/ai-kit/tests/Morph.AiKit.Tests/Morph.AiKit.Tests.csproj +1 -1
- package/framework/templates/infrastructure/docker/docker-compose.template.yml +15 -16
- package/package.json +6 -15
- package/src/commands/graph/build.js +2 -2
- package/src/commands/mcp/mcp-setup.js +6 -4
- package/src/commands/project/doctor.js +42 -126
- package/src/commands/project/env.js +2 -1
- package/src/commands/project/init.js +28 -170
- package/src/commands/project/stack-set.js +3 -1
- package/src/commands/project/update.js +50 -154
- package/src/commands/scaffold/scaffold.js +21 -4
- package/src/commands/validation/check.js +12 -10
- package/src/commands/validation/prove-red.js +61 -22
- package/src/core/paths/output-schema.js +8 -37
- package/src/core/templates/template-registry.js +8 -43
- package/src/core/templates/template-renderer.js +3 -200
- package/src/lib/ai/ai-checks.js +1 -1
- package/src/lib/ai/ai-project-scan.js +1 -1
- package/src/lib/ai/code-audit.js +2 -2
- package/src/lib/check/signals.js +25 -7
- package/src/lib/contract/defaults.js +2 -2
- package/src/lib/detectors/claude-config-detector.js +0 -52
- package/src/lib/detectors/index.js +5 -30
- package/src/lib/diff/diff-lines.js +3 -3
- package/src/lib/generators/scaffold-generator.js +5 -17
- package/src/lib/git/default-branch.js +5 -48
- package/src/lib/graph/graph-health.js +1 -1
- package/src/lib/graph/graphifyignore.js +3 -4
- package/src/lib/graph/sanitize.js +2 -2
- package/src/lib/installers/effects.js +0 -13
- package/src/lib/installers/mcp-installer.js +5 -17
- package/src/lib/installers/memory-installer.js +5 -8
- package/src/lib/installers/stack-assets.js +33 -7
- package/src/lib/installers/stack-sync.js +4 -4
- package/src/lib/plan/checks.js +1 -1
- package/src/lib/plan/media.js +3 -3
- package/src/lib/plan/plan-parser.js +1 -1
- package/src/lib/review-reports.js +8 -14
- package/src/lib/scan/worktree-dirs.js +1 -3
- package/src/lib/specs/adr-index.js +4 -4
- package/src/lib/specs/revocations.js +3 -3
- package/src/lib/stack/stack-scan.js +3 -3
- package/src/lib/standards/registry.js +1 -1
- package/src/lib/standards/verified-against.js +2 -2
- package/src/lib/tests-audit/audit.js +2 -2
- package/src/scripts/global-install.js +41 -19
- package/src/scripts/setup-infra.js +57 -165
- package/src/utils/agents-installer.js +8 -30
- package/src/utils/claude-settings-manager.js +29 -27
- package/src/utils/hooks-installer.js +30 -44
- package/src/utils/version-checker.js +2 -31
- package/CLAUDE.md +0 -118
- package/framework/commands/create-umbraco-lp.md +0 -37
- package/framework/commands/migrate-lp-to-umbraco.md +0 -35
- package/framework/commands/morph-apply.md +0 -14
- package/framework/hooks/shared/spawn-command.js +0 -23
- package/framework/templates/CLAUDE.md.core.guide.md +0 -29
- package/framework/templates/CLAUDE.md.core.template +0 -22
- package/framework/templates/context/ARCHITECTURE.md +0 -106
- package/src/commands/context/context-refresh.js +0 -63
- package/src/lib/generators/architecture-scanner.js +0 -543
- package/src/lib/generators/settings-generator.js +0 -97
- package/src/lib/graph/god-nodes.js +0 -65
|
@@ -3,13 +3,15 @@ import { readFile } from 'fs/promises';
|
|
|
3
3
|
import { existsSync } from 'fs';
|
|
4
4
|
import { homedir } from 'os';
|
|
5
5
|
import { realEffects } from '../lib/installers/effects.js';
|
|
6
|
+
import { SHELL_TOOLS } from '../../framework/hooks/shared/payload-utils.js';
|
|
6
7
|
|
|
7
|
-
const HOOKS_VERSION = '4.
|
|
8
|
+
const HOOKS_VERSION = '4.1.0';
|
|
8
9
|
|
|
10
|
+
const SHELL_MATCHER = [...SHELL_TOOLS].join('|');
|
|
9
11
|
|
|
10
12
|
// `Edit(path)` only: an Edit rule also covers Write, while a `Write(path)` rule
|
|
11
13
|
// matches nothing and makes Claude Code warn on every session start.
|
|
12
|
-
const MORPH_DENY = [
|
|
14
|
+
export const MORPH_DENY = [
|
|
13
15
|
'Edit(.morph/framework/**)',
|
|
14
16
|
'Edit(.claude/CLAUDE.md)',
|
|
15
17
|
'Edit(.claude/rules/**)',
|
|
@@ -17,15 +19,13 @@ const MORPH_DENY = [
|
|
|
17
19
|
'Edit(.claude/skills/**)',
|
|
18
20
|
];
|
|
19
21
|
|
|
20
|
-
const MORPH_ALLOW = [
|
|
22
|
+
export const MORPH_ALLOW = [
|
|
21
23
|
'Edit(.morph/features/**)',
|
|
22
24
|
'Edit(.morph/context/**)',
|
|
23
25
|
'Bash(mkdir:.morph/**)',
|
|
24
26
|
'Bash(ls:.morph/**)',
|
|
25
27
|
];
|
|
26
28
|
|
|
27
|
-
const MORPH_PERMISSIONS = MORPH_DENY;
|
|
28
|
-
|
|
29
29
|
// A multi-hook group is ONE `core/chain.js` command whose `args` list the hooks in
|
|
30
30
|
// run order (block-first-wins). `args` stays separate from `command`: getHookSubpath()
|
|
31
31
|
// would capture inlined args into the quoted path. `timeout` is in SECONDS.
|
|
@@ -41,7 +41,7 @@ const MORPH_HOOKS = [
|
|
|
41
41
|
|
|
42
42
|
{
|
|
43
43
|
event: 'PreToolUse',
|
|
44
|
-
matcher:
|
|
44
|
+
matcher: SHELL_MATCHER,
|
|
45
45
|
hooks: [{
|
|
46
46
|
type: 'command',
|
|
47
47
|
command: 'node framework/hooks/claude-code/core/chain.js',
|
|
@@ -49,7 +49,6 @@ const MORPH_HOOKS = [
|
|
|
49
49
|
}]
|
|
50
50
|
},
|
|
51
51
|
|
|
52
|
-
// comment-guard must be the last Write|Edit link: a block ends the chain.
|
|
53
52
|
{
|
|
54
53
|
event: 'PostToolUse',
|
|
55
54
|
matcher: 'Write|Edit',
|
|
@@ -62,7 +61,7 @@ const MORPH_HOOKS = [
|
|
|
62
61
|
// masked-exit last: it reads the command every other link already let through.
|
|
63
62
|
{
|
|
64
63
|
event: 'PostToolUse',
|
|
65
|
-
matcher:
|
|
64
|
+
matcher: SHELL_MATCHER,
|
|
66
65
|
hooks: [{
|
|
67
66
|
type: 'command',
|
|
68
67
|
command: 'node framework/hooks/claude-code/core/chain.js',
|
|
@@ -83,7 +82,7 @@ const MORPH_HOOKS = [
|
|
|
83
82
|
|
|
84
83
|
/**
|
|
85
84
|
* Idempotent merge of the MORPH-SPEC hooks into `.claude/settings.local.json`.
|
|
86
|
-
* @returns {Promise<{ installed: number
|
|
85
|
+
* @returns {Promise<{ installed: number }>}
|
|
87
86
|
*/
|
|
88
87
|
export async function installClaudeHooks(targetPath, { fx = realEffects() } = {}) {
|
|
89
88
|
const claudeDir = join(targetPath, '.claude');
|
|
@@ -100,9 +99,6 @@ export async function installClaudeHooks(targetPath, { fx = realEffects() } = {}
|
|
|
100
99
|
|
|
101
100
|
settings.hooks = settings.hooks || {};
|
|
102
101
|
|
|
103
|
-
const managed = settings._morph_managed || {};
|
|
104
|
-
const alreadyCurrent = managed.hooks_version === HOOKS_VERSION;
|
|
105
|
-
|
|
106
102
|
removeMorphHooks(settings);
|
|
107
103
|
|
|
108
104
|
let installed = 0;
|
|
@@ -123,8 +119,7 @@ export async function installClaudeHooks(targetPath, { fx = realEffects() } = {}
|
|
|
123
119
|
return {
|
|
124
120
|
type: h.type,
|
|
125
121
|
command,
|
|
126
|
-
...(h.timeout !== undefined ? { timeout: h.timeout } : {})
|
|
127
|
-
...(h.async ? { async: true } : {})
|
|
122
|
+
...(h.timeout !== undefined ? { timeout: h.timeout } : {})
|
|
128
123
|
};
|
|
129
124
|
});
|
|
130
125
|
|
|
@@ -136,29 +131,13 @@ export async function installClaudeHooks(targetPath, { fx = realEffects() } = {}
|
|
|
136
131
|
settings.permissions.deny = settings.permissions.deny || [];
|
|
137
132
|
settings.permissions.allow = settings.permissions.allow || [];
|
|
138
133
|
|
|
139
|
-
|
|
140
|
-
// unless named here.
|
|
141
|
-
const STALE_DENY = [
|
|
142
|
-
'Write(.morph/state.json)',
|
|
143
|
-
'Edit(.morph/state.json)',
|
|
144
|
-
'Write(.morph/framework/**)',
|
|
145
|
-
'Write(.claude/CLAUDE.md)',
|
|
146
|
-
'Write(.claude/rules/**)',
|
|
147
|
-
'Write(.claude/agents/morph-*)',
|
|
148
|
-
'Write(.claude/skills/**)',
|
|
149
|
-
];
|
|
150
|
-
settings.permissions.deny = settings.permissions.deny.filter(
|
|
151
|
-
p => !MORPH_DENY.includes(p) && !STALE_DENY.includes(p)
|
|
152
|
-
);
|
|
134
|
+
settings.permissions.deny = settings.permissions.deny.filter(p => !MORPH_DENY.includes(p));
|
|
153
135
|
for (const perm of MORPH_DENY) {
|
|
154
136
|
settings.permissions.deny.push(perm);
|
|
155
137
|
}
|
|
156
138
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
'Write(.morph/features/**)',
|
|
160
|
-
'Write(.morph/context/**)',
|
|
161
|
-
];
|
|
139
|
+
// An entry that left MORPH_ALLOW would survive forever in an existing install unless named here.
|
|
140
|
+
const STALE_ALLOW = ['Edit(.morph/state.json)'];
|
|
162
141
|
settings.permissions.allow = settings.permissions.allow.filter(
|
|
163
142
|
p => !MORPH_ALLOW.includes(p) && !STALE_ALLOW.includes(p)
|
|
164
143
|
);
|
|
@@ -168,11 +147,7 @@ export async function installClaudeHooks(targetPath, { fx = realEffects() } = {}
|
|
|
168
147
|
|
|
169
148
|
settings['$schema'] = 'https://json.schemastore.org/claude-code-settings.json';
|
|
170
149
|
|
|
171
|
-
settings
|
|
172
|
-
...settings.env,
|
|
173
|
-
MORPH_SPEC_ACTIVE: 'true',
|
|
174
|
-
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: '1',
|
|
175
|
-
};
|
|
150
|
+
dropLegacySettings(settings);
|
|
176
151
|
|
|
177
152
|
if (!settings.attribution) {
|
|
178
153
|
settings.attribution = {
|
|
@@ -181,19 +156,30 @@ export async function installClaudeHooks(targetPath, { fx = realEffects() } = {}
|
|
|
181
156
|
};
|
|
182
157
|
}
|
|
183
158
|
|
|
184
|
-
if (!settings.plansDirectory) {
|
|
185
|
-
settings.plansDirectory = '.morph/plans';
|
|
186
|
-
}
|
|
187
|
-
|
|
188
159
|
settings._morph_managed = settings._morph_managed || {};
|
|
189
160
|
settings._morph_managed.hooks_version = HOOKS_VERSION;
|
|
190
|
-
settings._morph_managed.hooks_installed = [...new Set(MORPH_HOOKS.map(h => h.event))];
|
|
191
161
|
settings._morph_managed.generated_at = new Date().toISOString();
|
|
192
162
|
|
|
193
163
|
fx.ensureDir(claudeDir);
|
|
194
164
|
|
|
195
165
|
fx.writeFile(settingsPath, JSON.stringify(settings, null, 2) + '\n');
|
|
196
|
-
return { installed
|
|
166
|
+
return { installed };
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const LEGACY_ENV = { MORPH_SPEC_ACTIVE: 'true', CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: '1' };
|
|
170
|
+
const LEGACY_PLANS_DIRECTORY = '.morph/plans';
|
|
171
|
+
|
|
172
|
+
// Only the exact values an older install wrote: the same key with another value is the user's.
|
|
173
|
+
function dropLegacySettings(settings) {
|
|
174
|
+
const env = settings.env;
|
|
175
|
+
if (env && typeof env === 'object') {
|
|
176
|
+
for (const [name, value] of Object.entries(LEGACY_ENV)) {
|
|
177
|
+
if (env[name] === value) delete env[name];
|
|
178
|
+
}
|
|
179
|
+
if (Object.keys(env).length === 0) delete settings.env;
|
|
180
|
+
}
|
|
181
|
+
if (settings.plansDirectory === LEGACY_PLANS_DIRECTORY) delete settings.plansDirectory;
|
|
182
|
+
delete settings._morph_managed?.hooks_installed;
|
|
197
183
|
}
|
|
198
184
|
|
|
199
185
|
/**
|
|
@@ -16,7 +16,7 @@ export function getInstalledCLIVersion() {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
async function getLatestNPMVersion(packageName = '@polymorphism-tech/morph-spec') {
|
|
20
20
|
try {
|
|
21
21
|
const response = await fetch(`https://registry.npmjs.org/${packageName}/latest`);
|
|
22
22
|
if (!response.ok) return null;
|
|
@@ -97,36 +97,7 @@ export function majorJump(installedVersion, targetVersion, { limit = MAJOR_JUMP_
|
|
|
97
97
|
return { refuse: false, reason: null, jump };
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
export
|
|
101
|
-
if (process.env.npm_execpath && process.env.npm_execpath.includes('npx')) {
|
|
102
|
-
return 'npx';
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
const isGlobal = process.env.npm_config_global === 'true' ||
|
|
106
|
-
process.execPath.includes('node_modules');
|
|
107
|
-
|
|
108
|
-
if (isGlobal) {
|
|
109
|
-
return 'global';
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
return 'unknown';
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export function getUpdateInstructions(method) {
|
|
116
|
-
switch (method) {
|
|
117
|
-
case 'global':
|
|
118
|
-
return [
|
|
119
|
-
'npm install -g @polymorphism-tech/morph-spec@latest --prefer-online',
|
|
120
|
-
'morph-spec update'
|
|
121
|
-
];
|
|
122
|
-
case 'npx':
|
|
123
|
-
default:
|
|
124
|
-
return [
|
|
125
|
-
'npm install -g @polymorphism-tech/morph-spec@latest --prefer-online',
|
|
126
|
-
'morph-spec update'
|
|
127
|
-
];
|
|
128
|
-
}
|
|
129
|
-
}
|
|
100
|
+
export const CLI_UPDATE_COMMAND = 'npm install -g @polymorphism-tech/morph-spec@latest --prefer-online';
|
|
130
101
|
|
|
131
102
|
export async function checkCLIOutdated() {
|
|
132
103
|
const current = getInstalledCLIVersion();
|
package/CLAUDE.md
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
This file provides guidance to Claude Code when working with code in **this repository** (the morph-spec CLI source).
|
|
4
|
-
|
|
5
|
-
## What This Is
|
|
6
|
-
|
|
7
|
-
morph-spec is a harness CLI (`@polymorphism-tech/morph-spec`) that makes Claude Code write code well: a plan with scenarios `C1..Cn`, a red proof per scenario, review personas in fresh context, and a `## Resultado` an orchestrator reads. The CLI installs the harness (contract, skills, rules, personas, hooks) and owns the deterministic steps (`plan-check`, `prove-red`, `check`); Claude Code runs the flow from `framework/MORPH.md` and the core skills. It never orchestrates: worktrees, the Claude call and the PR belong to whoever runs it.
|
|
8
|
-
|
|
9
|
-
This repo is the **framework source code** — not a project that uses morph-spec.
|
|
10
|
-
|
|
11
|
-
**Do not run the morph-spec workflow here.** No `init`, `plan-check`, `prove-red`, `check` or `context refresh`, and no `/morph-plan` or `/morph-apply` as a process, even if a prompt starts with one: confirm first. Work here is ordinary: a normal branch, `npm test`, `npm run generate:check`, a PR. `framework/skills/` and `framework/CLAUDE.md` are source to edit, not instructions to follow. `/.morph/` is gitignored: this repo keeps no morph-spec state.
|
|
12
|
-
|
|
13
|
-
## Build & Test Commands
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
# Dev loop: only the test files the current change can reach (vs the merge-base with main)
|
|
17
|
-
npm run test:changed # add -- --list to see the selection and why
|
|
18
|
-
|
|
19
|
-
# Run all tests (files in parallel, cpus-1 at a time; ~6 min on a 16-core Windows box, bound by process/git contention)
|
|
20
|
-
# Not a step before a PR or release: the PR runs test:changed and the tag runs the whole wall before publishing
|
|
21
|
-
npm test
|
|
22
|
-
|
|
23
|
-
# A subtree or file (still parallel); --test-concurrency=1 to debug serially
|
|
24
|
-
node scripts/run-tests.mjs test/commands/check.test.js
|
|
25
|
-
|
|
26
|
-
# Coverage
|
|
27
|
-
npm run test:coverage
|
|
28
|
-
|
|
29
|
-
# Generate JSDoc API docs
|
|
30
|
-
npm run docs
|
|
31
|
-
|
|
32
|
-
# Regenerate derived reference files from output-schema.js
|
|
33
|
-
npm run generate
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
No build step — pure ESM JavaScript, runs directly via Node.js 22+.
|
|
37
|
-
|
|
38
|
-
## Architecture
|
|
39
|
-
|
|
40
|
-
### Module Layout
|
|
41
|
-
|
|
42
|
-
- **`bin/morph-spec.js`** — Commander.js CLI entry point: install/inspect commands (`init`, `update`, `setup-infra`, `doctor`, `standards`, `graph`, `stack-*`) and the deterministic steps of the loop (`plan-check`, `prove-red`, `check`, `env`).
|
|
43
|
-
- **`src/commands/`** — CLI command handlers by domain (project/, validation/, graph/, scaffold/, mcp/, context/, standards/).
|
|
44
|
-
- **`src/core/`** — `paths/output-schema.js` (**single source of truth** for the feature files: `plan`, `checks`, `implementReport`, the review reports, the `1-design/` docs) and `templates/` (Handlebars registry and renderer).
|
|
45
|
-
- **`src/lib/`** — `contract/` (scan → defaults → merge → apply of `.morph/config/config.json`, and `ports.js` for the branch-hash ports), `check/` (signals and attempts), `plan/` (the one `plan.md` parser and `checks.json` builder), `review-reports.js` (the one reader of the persona reports), `diff/`, `graph/`, `stack/`, `installers/`, `generators/`, `ai/` (`doctor --ai`), `stack-filter.js`.
|
|
46
|
-
- **`src/utils/`** — installers (agents, skills, hooks, claude-settings), logger, file-copier, version-checker.
|
|
47
|
-
- **`framework/`** — what `init` installs into target projects (read-only at runtime):
|
|
48
|
-
- `MORPH.md` — the NLH charter (≤ 8k chars, `resident-size` canary); `CLAUDE.md` — injected into the target's `.claude/CLAUDE.md` (≤ 3k chars)
|
|
49
|
-
- `agents.json` — the 3 review personas; `.claude/agents/morph-*.md` are generated from it
|
|
50
|
-
- `skills/core/` — `morph-plan`, `morph-apply`, `morph-uiux` (+ the Umbraco ones), listed in MORPH.md
|
|
51
|
-
- `rules/` — path-scoped stack rules (`paths:` + `stacks:`), no always-on rule
|
|
52
|
-
- `hooks/claude-code/core/` — fail-open guardrails; `hooks/shared/` — what hooks and `src/` both read
|
|
53
|
-
- `standards/` + `STANDARDS.json`, `templates/` + `REGISTRY.json`, `mcp/registry.json`, `schemas/`, `evals/review-checklist.md`
|
|
54
|
-
- `docs/CLI.md` — the CLI reference, one `###` per command, installed as `.morph/framework/CLI.md`
|
|
55
|
-
|
|
56
|
-
### Key Architectural Patterns
|
|
57
|
-
|
|
58
|
-
**NLH (Natural Language Harness):** behavior lives in `framework/MORPH.md` and the skills. JS hooks are silent guardrails, never orchestrators.
|
|
59
|
-
|
|
60
|
-
**The contract:** `.morph/config/config.json` (`project.stack`/`tags`, `tests[]` with `tier`, `risk` globs, `limits`), shape in `framework/schemas/config.schema.json`. `init` writes it from a scan and is idempotent (`_generated` fingerprints keep hand edits). Every hook and validation command starts from `contractExists()`: no contract, no-op (hooks) or exit 2.
|
|
61
|
-
|
|
62
|
-
**The feature is the branch:** `.morph/features/<slugOfBranch>/` (`framework/hooks/shared/feature-slug.js`). No state file, no phases, no gates: `plan.md` freezes once `checks.json` exists, progress is `3-implement/report.md` (`pendente`/`feito`/`bloqueado` per `Cn`), and `check --report` writes `## Resultado` (`pronto` | `precisa-humano` with the signals).
|
|
63
|
-
|
|
64
|
-
**Fail-open hooks:** every hook returns `null` on any error or without a contract. Hooks never throw and never write project state.
|
|
65
|
-
|
|
66
|
-
**Stack-aware filtering:** assets declare `stacks:` in frontmatter (or `stack` in `agents.json`); `getProjectTags` unites `project.stack`, `project.tags` and `integrations`, and only matching assets install.
|
|
67
|
-
|
|
68
|
-
**Review:** `agents.json` has the 3 read-only roles — `verifier` (runs each `Cn`), `reviewer` (plan.md + diff), `security` (sensitive diffs) — dispatched once, in fresh context, by the session that implemented. Their reports in `4-review/` feed the `sem-revisao`/`revisao-fix`/`nao-provado` signals of `check --report`.
|
|
69
|
-
|
|
70
|
-
## Testing Conventions
|
|
71
|
-
|
|
72
|
-
- **Framework:** Node.js native `node:test` — no Jest or Mocha
|
|
73
|
-
- **Concurrency:** files run in parallel (`scripts/run-tests.mjs`) — `node --test` gives each file its own process, so `process.chdir()` stays inside the file. A test never writes a tracked file of this repo: a script under test reads its root from `MORPH_REPO_ROOT`, and the test points it at `copyTrackedRepo()` (`test/helpers/repo-copy.js`, a temp git repo with the tracked files). The runner fails if a run changes the tracked tree. Each file has a 10-minute `--test-timeout` (it bounds the whole file under process isolation): a hang fails by name. A test that imports a hook sets `MORPH_HOOK_CHAINED=1` first, or the hook's `runStandalone` waits on stdin, which `node --test` never closes
|
|
74
|
-
- **Subprocesses:** drive the CLI through `test/helpers/cli.js` (`runCli`, no shell) and git through `test/helpers/git.js` (`git(cwd, ...args)`) — `execSync('git …')` pays a cmd.exe per call on Windows. Hooks that export `run(payload)` can be called in-process (see `test/hooks/loop-detect.test.js`); keep one spawn per hook for the standalone wiring
|
|
75
|
-
- **Temp dirs:** `createTempDir()` / `cleanupTempDir()` from `test/helpers/test-utils.js`
|
|
76
|
-
- **Home:** a suite that runs `setupInfra`/`updateCommand`/`initCommand` calls `isolateHome()` (test-utils) at the top — the installers write `~/.claude/settings.json` through `os.homedir()`. Canary: `test/meta/home-isolation.test.js`
|
|
77
|
-
- **Mock state:** `createMockState(overrides)` and `createStateFile(tempDir, state)` from test-utils
|
|
78
|
-
|
|
79
|
-
## Code Conventions
|
|
80
|
-
|
|
81
|
-
- **ESM only** — `import`/`export`, package.json `"type": "module"`
|
|
82
|
-
- **Output type normalization** — `normalizeOutputType()` auto-converts kebab-case to camelCase
|
|
83
|
-
- **Template helpers** — Handlebars v2.0: pascalCase, camelCase, snakeCase, kebabCase, pluralize, plus comparison/logic helpers
|
|
84
|
-
- **CLI structure** — Commands are thin wrappers; business logic in `src/core/` or `src/lib/`
|
|
85
|
-
- **Comentários** — o padrão é nenhum: nome, tipo e teste explicam o código. Só o porquê que o código não mostra (invariante, ordem que importa, quirk externo com link), em até 3 linhas. Sem história de processo (issue, PR, feature, "medido na 8.x") no código: isso vai no commit e na memória. JSDoc só em export que outro módulo consome e cujo contrato o nome não diz. **Não imite a densidade dos arquivos existentes**: boa parte do código legado deste repo é mais comentada do que esta regra. O hook `comment-guard` roda aqui também (`.claude/settings.json`)
|
|
86
|
-
|
|
87
|
-
## Framework Development Guardrails
|
|
88
|
-
|
|
89
|
-
When modifying framework components, verify the full scope of related files.
|
|
90
|
-
|
|
91
|
-
### Dependency Matrix
|
|
92
|
-
|
|
93
|
-
A matriz "mexeu em X → verifique Y" mora em `.claude/rules/matrix-*.md`, uma rule por área com `paths:`: o Claude Code a carrega só quando a sessão toca um arquivo daquela área. Linha nova entra na rule da área do arquivo-chave (a coluna da esquerda); área nova é rule nova, com seus `paths:`.
|
|
94
|
-
|
|
95
|
-
| Rule | Área |
|
|
96
|
-
| --- | --- |
|
|
97
|
-
| `.claude/rules/matrix-agents.md` | Personas (`agents.json`) e o installer delas |
|
|
98
|
-
| `.claude/rules/matrix-standards.md` | Standards, registro e seções |
|
|
99
|
-
| `.claude/rules/matrix-hooks.md` | Hooks e comment-guard |
|
|
100
|
-
| `.claude/rules/matrix-charter.md` | Carta NLH, skills e docs instaláveis |
|
|
101
|
-
| `.claude/rules/matrix-templates-ai.md` | Templates, ai-kit e CI |
|
|
102
|
-
| `.claude/rules/matrix-plan-review.md` | Plano, progresso, feature pelo branch e relatórios de revisão |
|
|
103
|
-
| `.claude/rules/matrix-check.md` | `check`, sinais e portas pelo branch |
|
|
104
|
-
| `.claude/rules/matrix-graph.md` | Grafo de codebase |
|
|
105
|
-
| `.claude/rules/matrix-platform.md` | MCP, installers e contrato |
|
|
106
|
-
|
|
107
|
-
### Test Coverage
|
|
108
|
-
|
|
109
|
-
Every `src/**/*.js` file should have a corresponding `test/**/*.test.js`.
|
|
110
|
-
|
|
111
|
-
## Framework vs Runtime Distinction
|
|
112
|
-
|
|
113
|
-
- **This repo** = the CLI source (installer)
|
|
114
|
-
- **`framework/`** = files installed into target projects via `morph-spec init`
|
|
115
|
-
- **`framework/CLAUDE.md`** = injected into target's `.claude/CLAUDE.md` (not for this repo)
|
|
116
|
-
- **`framework/MORPH.md`** = the NLH charter — every behavioral change lands here, not in JS hooks
|
|
117
|
-
|
|
118
|
-
When editing `framework/` files, you're changing what gets installed in user projects, not runtime behavior of the CLI itself.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Cria uma nova landing page ponta-a-ponta a partir do template MORPH Umbraco genérico: coleta decisões, scaffolda com new-lp, sobe e valida, customiza branding e módulos.
|
|
3
|
-
argument-hint: [nome-do-projeto]
|
|
4
|
-
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Skill
|
|
5
|
-
stacks:
|
|
6
|
-
- umbraco
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# /create-umbraco-lp — Nova LP Umbraco
|
|
10
|
-
|
|
11
|
-
Cria um projeto de landing page novo a partir do template canônico `MORPH_Umbraco_LP_Template`.
|
|
12
|
-
|
|
13
|
-
**Implementação:** este slash command é um atalho. O agente deve invocar `Skill(create-umbraco-lp)` com o nome do projeto (se fornecido). A skill coleta decisões do usuário uma pergunta por vez, scaffolda via `new-lp.ps1` / `new-lp.sh`, valida o boot (Delivery API + Ping de leads) e apresenta o checklist de entrega.
|
|
14
|
-
|
|
15
|
-
## Argumentos
|
|
16
|
-
|
|
17
|
-
`[nome-do-projeto]` — nome do projeto/LP (opcional; se não fornecido, a skill pergunta).
|
|
18
|
-
|
|
19
|
-
## Pré-requisitos
|
|
20
|
-
|
|
21
|
-
- `gh` autenticado (ou credencial git) com acesso ao repositório **privado** `polymorphism-tech/MORPH_Umbraco_LP_Template` (branch `master`).
|
|
22
|
-
- .NET 10 SDK instalado (`dotnet --version` deve retornar `10.x`).
|
|
23
|
-
- Node.js 20+ e npm instalados.
|
|
24
|
-
- PowerShell 7+ (Windows) ou bash (Linux/macOS) para os scripts.
|
|
25
|
-
|
|
26
|
-
## Anti-padrões
|
|
27
|
-
|
|
28
|
-
- Não editar `backend/uSync/v17/` manualmente durante o setup — deixar o uSync importar no primeiro boot.
|
|
29
|
-
- Não commitar `.env` ou `frontend/.env.local` — contêm credenciais e secrets.
|
|
30
|
-
- Não reutilizar `UMBRACO_GLOBAL_ID` de outro projeto — o script gera um UUID único por execução.
|
|
31
|
-
|
|
32
|
-
## Referências
|
|
33
|
-
|
|
34
|
-
- `.claude/skills/create-umbraco-lp/SKILL.md`
|
|
35
|
-
- `references/umbraco-lp-patterns.md` (dentro da skill `create-umbraco-lp`)
|
|
36
|
-
|
|
37
|
-
**Projeto:** $ARGUMENTS
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Migra uma LP existente (React/Vite, Next.js estático ou HTML) para o template Umbraco-headless MORPH entregando a LP EXATAMENTE igual à origem (mesmo CSS, imagens, fontes e comportamento) + Umbraco — obtenção automática do template, lift-and-rewire verbatim de cada seção para módulo editável, conexão do formulário ao backend de leads e gate de paridade determinístico. Repo-agnóstica.
|
|
3
|
-
argument-hint: <projeto>
|
|
4
|
-
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent, AskUserQuestion, Skill
|
|
5
|
-
stacks:
|
|
6
|
-
- umbraco
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# /migrate-lp-to-umbraco — Migração de LP para Umbraco Headless
|
|
10
|
-
|
|
11
|
-
Migra a LP de origem para o template `MORPH_Umbraco_LP_Template` de forma reproduzível, entregando a LP **exatamente igual** à origem com o Umbraco por cima.
|
|
12
|
-
|
|
13
|
-
**Implementação:** este slash command é um atalho. O agente deve invocar `Skill(migrate-lp-to-umbraco)` com o nome do projeto como argumento. A skill é **repo-agnóstica** — obtém o template sozinha e funciona mesmo sem template ou origem pré-baixados.
|
|
14
|
-
|
|
15
|
-
## Argumentos
|
|
16
|
-
|
|
17
|
-
`{projeto}` — nome do projeto em kebab-case (ex.: `reserva-das-flores`, `lp-imobiliaria`).
|
|
18
|
-
|
|
19
|
-
## Fluxo resumido
|
|
20
|
-
|
|
21
|
-
0. **Obter o template** — clone/cache de `polymorphism-tech/MORPH_Umbraco_LP_Template` (privado, branch `master`) via `gh repo clone` (fallback git HTTPS/SSH). Sempre garantido antes de qualquer passo.
|
|
22
|
-
1. **Analisar a origem (capturar para um lift)** — inventariar seções, markup/classes exatos, CSS/tema verbatim, assets byte-a-byte (com `sha256`), fontes e comportamentos. Origem por código-fonte local ou só URL (scrape). Produzir `docs/origem-inventario.md`.
|
|
23
|
-
2. **Mapear para módulos** — cada seção vira um módulo via **lift verbatim** (default) — reuso direto do template só quando o render já bate com a origem. Produzir `docs/mapeamento-modulos.md`.
|
|
24
|
-
3. **Scaffold via new-lp** — cópia fresca do template para o diretório do projeto, `git init`, `scripts/new-lp.sh`/`.ps1` com `--lead-integration`, smoke-boot com `docker compose up --build`.
|
|
25
|
-
4. **Lift verbatim** — copiar markup/CSS/classes/assets de cada seção verbatim para o componente do módulo, trocando só os literais por leitura do backoffice; uSync `.config`, `SeedContentHandler` idempotente, `globals.css` com o tema portado, registro em `moduleRegistry.ts`.
|
|
26
|
-
5. **Conectar formulário** — selecionar sink (`ghl`/`prospectpro`/`webhook`) no backoffice via nó `leadsConfig`; nunca colocar token em código ou env.
|
|
27
|
-
6. **Gate de paridade** — checks determinísticos (DOM+classes, estilo computado, checksum de assets, comportamento) como bloqueio + screenshot diff como corroboração secundária. A skill scaffolda `parity.spec.ts` e `compare-sections.mjs`.
|
|
28
|
-
|
|
29
|
-
## Referências
|
|
30
|
-
|
|
31
|
-
- `.claude/skills/migrate-lp-to-umbraco/SKILL.md` — playbook completo (passos 0-6, gate de paridade)
|
|
32
|
-
- `polymorphism-tech/MORPH_Umbraco_LP_Template` — template canônico (privado, branch `master`), obtido no passo 0
|
|
33
|
-
- `MORPH_Umbraco_LP_Template/scripts/new-lp.sh` / `new-lp.ps1` — scaffold
|
|
34
|
-
|
|
35
|
-
**Projeto:** $ARGUMENTS
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Implementa o plano validado inteiro nesta sessão, prova com o check, roda a revisão em contexto novo e grava o resultado.
|
|
3
|
-
argument-hint: [feature]
|
|
4
|
-
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent, AskUserQuestion, Skill
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# /morph-apply
|
|
8
|
-
|
|
9
|
-
Atalho: invoque `Skill(morph-apply)`. A feature é a pasta do branch atual (ou o argumento).
|
|
10
|
-
|
|
11
|
-
Pré-requisito: `.morph/features/{feature}/2-plan/plan.md` e `2-plan/checks.json` (gravado por
|
|
12
|
-
`morph-spec plan-check`). Faltando, rode `/morph-plan`.
|
|
13
|
-
|
|
14
|
-
**Feature:** $ARGUMENTS
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { existsSync } from 'fs';
|
|
2
|
-
import { join } from 'path';
|
|
3
|
-
|
|
4
|
-
const NEEDS_CMD_SHIM = /^(npm|npx|pnpm|yarn)$/;
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* On win32 `npx`/`npm`/… are `.cmd` shims: ENOENT without a shell, EINVAL as `.cmd`
|
|
8
|
-
* with `shell: false`. Playwright runs from its own JS entry, so it needs no shell.
|
|
9
|
-
*/
|
|
10
|
-
export function resolveSpawn(file, args = [], {
|
|
11
|
-
cwd = process.cwd(),
|
|
12
|
-
platform = process.platform,
|
|
13
|
-
exists = existsSync,
|
|
14
|
-
execPath = process.execPath,
|
|
15
|
-
} = {}) {
|
|
16
|
-
if (platform !== 'win32' || !NEEDS_CMD_SHIM.test(file)) return { file, args, shell: false };
|
|
17
|
-
|
|
18
|
-
if (file === 'npx' && args[0] === 'playwright') {
|
|
19
|
-
const cli = join(cwd, 'node_modules', '@playwright', 'test', 'cli.js');
|
|
20
|
-
if (exists(cli)) return { file: execPath, args: [cli, ...args.slice(1)], shell: false };
|
|
21
|
-
}
|
|
22
|
-
return { file: `${file}.cmd`, args, shell: true };
|
|
23
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Guia de uso — CLAUDE.md.core.template
|
|
2
|
-
|
|
3
|
-
Este template é o ponto de entrada do harness para um projeto morph-spec.
|
|
4
|
-
Preencha cada campo uma vez, no setup. Não modifique a estrutura.
|
|
5
|
-
|
|
6
|
-
## Campos
|
|
7
|
-
|
|
8
|
-
**Nome do Projeto** — nome curto e identificável do sistema.
|
|
9
|
-
|
|
10
|
-
**Domínio** — 1-2 frases. O que o sistema faz, para quem, e qual o principal constraint (ex: multi-tenant, LGPD, tempo real).
|
|
11
|
-
|
|
12
|
-
**Stack** — não alterar. O harness assume o stack padrão. Se o projeto desvia (ex: Blazor em vez de Next.js), edite e documente o desvio aqui.
|
|
13
|
-
|
|
14
|
-
**Harness** — não alterar. Esta seção instrui o modelo a:
|
|
15
|
-
1. Ler `MORPH.md` ao iniciar a sessão
|
|
16
|
-
2. Tomar a feature pela pasta do branch atual (`.morph/features/<slug-do-branch>/`)
|
|
17
|
-
3. Assumir o papel correspondente sem aguardar instrução
|
|
18
|
-
|
|
19
|
-
**Standards do projeto** — opcional. Apenas se algum standard específico do projeto desvia do default do stack. Default já injetado pelo morph-plan.
|
|
20
|
-
|
|
21
|
-
**Slash commands** — não alterar. Os dois entry points oficiais.
|
|
22
|
-
|
|
23
|
-
## Regras
|
|
24
|
-
|
|
25
|
-
- Mantenha < 60 linhas — conteúdo acima não cabe em contexto comprimido.
|
|
26
|
-
- Não adicione regras condicionais (sem "se dotnet, então...").
|
|
27
|
-
- Não inline conteúdo de standards — aponte por ID, nunca copie.
|
|
28
|
-
- Não adicione campo "Feature ativa" estático — a feature é a do branch.
|
|
29
|
-
- Este arquivo pertence ao projeto. Versione no git.
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# [Nome do Projeto]
|
|
2
|
-
|
|
3
|
-
[1-2 frases sobre o domínio do sistema, quem usa, qual o principal constraint.]
|
|
4
|
-
|
|
5
|
-
## Stack
|
|
6
|
-
|
|
7
|
-
VSA + .NET 10 + EF Core + Neon (Postgres) + Microsoft Agent Framework + Next.js (App Router) + Tailwind + Framer Motion + Shadcn + Hangfire (quando necessário).
|
|
8
|
-
|
|
9
|
-
Padrões proibidos por padrão: `Guid.NewGuid()` (use `Guid.CreateVersion7()`), classes não-sealed sem justificativa, exceptions como fluxo de controle, camada de Service/Manager entre handler e dados, repository genérico (`IRepository<T>`/`IUnitOfWork`), SQL cru sem justificativa. Acesso a dados: `ApplicationDbContext` direto no slice (`DbSet<T>` já é repository, `DbContext` já é unit of work); para concorrência ou SQL específico, store dedicado hand-written com justificativa em `plan.md` (`## Decisões`).
|
|
10
|
-
|
|
11
|
-
## Harness
|
|
12
|
-
|
|
13
|
-
morph-spec NLH — leia `.morph/framework/MORPH.md` ao iniciar cada sessão. Em seguida, leia `.morph/state.json` para identificar a feature ativa e a fase atual; assuma o papel correspondente (Orchestrator/Specialist/Evaluator) e continue o trabalho.
|
|
14
|
-
|
|
15
|
-
## Standards do projeto
|
|
16
|
-
|
|
17
|
-
[Liste de 3 a 6 IDs de `.morph/framework/standards/STANDARDS.json` específicos deste projeto, se algum desviar do default. Caso contrário, deixe vazio — os defaults do stack já são aplicados pelo morph-plan.]
|
|
18
|
-
|
|
19
|
-
## Slash commands
|
|
20
|
-
|
|
21
|
-
- `/morph-plan {feature}` — entrevista, `plan.md`, `plan-check` e gate do plano
|
|
22
|
-
- `/morph-apply {feature}` — fatias do plano, `verify` e review (Gate 3)
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
# {{projectName}} — Architecture Context
|
|
2
|
-
|
|
3
|
-
> Auto-generated by `morph-spec context refresh`
|
|
4
|
-
|
|
5
|
-
{{#if hasDotnet}}
|
|
6
|
-
## .NET Entities ({{entityCount}})
|
|
7
|
-
|
|
8
|
-
| Entity | Type | Path |
|
|
9
|
-
|--------|------|------|
|
|
10
|
-
{{#each entities}}
|
|
11
|
-
| `{{name}}` | {{type}} | `{{path}}` |
|
|
12
|
-
{{/each}}
|
|
13
|
-
|
|
14
|
-
## API Endpoints ({{endpointCount}})
|
|
15
|
-
|
|
16
|
-
| Endpoint | Method | Route | Path |
|
|
17
|
-
|----------|--------|-------|------|
|
|
18
|
-
{{#each endpoints}}
|
|
19
|
-
| `{{name}}` | {{method}} | `{{route}}` | `{{path}}` |
|
|
20
|
-
{{/each}}
|
|
21
|
-
{{/if}}
|
|
22
|
-
|
|
23
|
-
{{#if hasNextjs}}
|
|
24
|
-
## Next.js Pages ({{pageCount}})
|
|
25
|
-
|
|
26
|
-
| Route | Path |
|
|
27
|
-
|-------|------|
|
|
28
|
-
{{#each pages}}
|
|
29
|
-
| `{{route}}` | `{{path}}` |
|
|
30
|
-
{{/each}}
|
|
31
|
-
|
|
32
|
-
{{#if layouts.length}}
|
|
33
|
-
### Layouts
|
|
34
|
-
|
|
35
|
-
{{#each layouts}}
|
|
36
|
-
- `{{path}}`
|
|
37
|
-
{{/each}}
|
|
38
|
-
{{/if}}
|
|
39
|
-
|
|
40
|
-
{{#if componentCount}}
|
|
41
|
-
## Components ({{componentCount}})
|
|
42
|
-
|
|
43
|
-
| Component | Path |
|
|
44
|
-
|-----------|------|
|
|
45
|
-
{{#each components}}
|
|
46
|
-
| `{{name}}` | `{{path}}` |
|
|
47
|
-
{{/each}}
|
|
48
|
-
{{/if}}
|
|
49
|
-
{{/if}}
|
|
50
|
-
|
|
51
|
-
{{#if hasIntegrations}}
|
|
52
|
-
## Integrations
|
|
53
|
-
|
|
54
|
-
| Service | Type | Configured |
|
|
55
|
-
|---------|------|------------|
|
|
56
|
-
{{#each integrations}}
|
|
57
|
-
| {{name}} | {{type}} | {{#if configured}}Yes{{else}}No{{/if}} |
|
|
58
|
-
{{/each}}
|
|
59
|
-
{{/if}}
|
|
60
|
-
|
|
61
|
-
{{#if hasTables}}
|
|
62
|
-
## Database Tables ({{tableCount}})
|
|
63
|
-
|
|
64
|
-
| Table | Source Migration |
|
|
65
|
-
|-------|----------------|
|
|
66
|
-
{{#each tables}}
|
|
67
|
-
| `{{table}}` | `{{migration}}` |
|
|
68
|
-
{{/each}}
|
|
69
|
-
{{/if}}
|
|
70
|
-
|
|
71
|
-
{{#if hasDotnetPackages}}
|
|
72
|
-
## .NET Packages
|
|
73
|
-
|
|
74
|
-
{{#each dotnetPackages}}
|
|
75
|
-
- `{{name}}` {{version}}
|
|
76
|
-
{{/each}}
|
|
77
|
-
{{/if}}
|
|
78
|
-
|
|
79
|
-
{{#if hasNpmPackages}}
|
|
80
|
-
## NPM Packages
|
|
81
|
-
|
|
82
|
-
{{#each npmPackages}}
|
|
83
|
-
- `{{name}}` {{version}}
|
|
84
|
-
{{/each}}
|
|
85
|
-
{{/if}}
|
|
86
|
-
{{#if hasGraph}}
|
|
87
|
-
## Centralidade (grafo de codebase)
|
|
88
|
-
|
|
89
|
-
Símbolos com mais conexões depois do saneamento — o que quebra mais se mudar.
|
|
90
|
-
Detalhe de um símbolo: `morph-spec graph explain <nome>` (sem grafo, símbolo ausente ou ambíguo: `grep -rn <nome>`).
|
|
91
|
-
|
|
92
|
-
| Símbolo | Arquivo | Grau |
|
|
93
|
-
|---------|---------|------|
|
|
94
|
-
{{#each godNodes}}
|
|
95
|
-
| `{{label}}` | `{{source_file}}` | {{degree}} |
|
|
96
|
-
{{/each}}
|
|
97
|
-
{{#if hasLabeledCommunities}}
|
|
98
|
-
|
|
99
|
-
### Comunidades
|
|
100
|
-
|
|
101
|
-
{{#each communities}}
|
|
102
|
-
- **{{label}}** ({{size}} nós)
|
|
103
|
-
{{/each}}
|
|
104
|
-
{{/if}}
|
|
105
|
-
{{/if}}
|
|
106
|
-
|