@lamentis/naome 1.1.2 → 1.2.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/Cargo.lock +2 -2
- package/Cargo.toml +1 -1
- package/LICENSE +180 -21
- package/README.md +49 -6
- package/bin/naome-node.js +2 -1579
- package/bin/naome.js +68 -16
- package/crates/naome-cli/Cargo.toml +1 -1
- package/crates/naome-cli/src/check_commands.rs +135 -0
- package/crates/naome-cli/src/cli_args.rs +5 -0
- package/crates/naome-cli/src/dispatcher.rs +37 -0
- package/crates/naome-cli/src/install_bridge.rs +83 -0
- package/crates/naome-cli/src/main.rs +60 -341
- package/crates/naome-cli/src/prompt_commands.rs +68 -0
- package/crates/naome-cli/src/quality_commands.rs +229 -0
- package/crates/naome-cli/src/simple_commands.rs +53 -0
- package/crates/naome-cli/src/workflow_commands.rs +153 -0
- package/crates/naome-core/Cargo.toml +1 -1
- package/crates/naome-core/src/decision/checks.rs +64 -0
- package/crates/naome-core/src/decision/idle.rs +67 -0
- package/crates/naome-core/src/decision/json.rs +36 -0
- package/crates/naome-core/src/decision/states.rs +165 -0
- package/crates/naome-core/src/decision.rs +131 -353
- package/crates/naome-core/src/harness_health/integrity.rs +96 -0
- package/crates/naome-core/src/harness_health.rs +14 -126
- package/crates/naome-core/src/install_plan.rs +5 -0
- package/crates/naome-core/src/intent/classifier.rs +171 -0
- package/crates/naome-core/src/intent/envelope.rs +108 -0
- package/crates/naome-core/src/intent/legacy.rs +138 -0
- package/crates/naome-core/src/intent/legacy_response.rs +76 -0
- package/crates/naome-core/src/intent/model.rs +71 -0
- package/crates/naome-core/src/intent/patterns.rs +170 -0
- package/crates/naome-core/src/intent/resolver.rs +162 -0
- package/crates/naome-core/src/intent/resolver_active.rs +17 -0
- package/crates/naome-core/src/intent/resolver_baseline.rs +55 -0
- package/crates/naome-core/src/intent/resolver_catalog.rs +167 -0
- package/crates/naome-core/src/intent/resolver_policy.rs +72 -0
- package/crates/naome-core/src/intent/resolver_shared.rs +55 -0
- package/crates/naome-core/src/intent/risk.rs +40 -0
- package/crates/naome-core/src/intent/segment.rs +170 -0
- package/crates/naome-core/src/intent.rs +64 -879
- package/crates/naome-core/src/journal.rs +9 -20
- package/crates/naome-core/src/lib.rs +15 -0
- package/crates/naome-core/src/paths.rs +3 -1
- package/crates/naome-core/src/quality/adapter_support.rs +89 -0
- package/crates/naome-core/src/quality/adapters.rs +131 -0
- package/crates/naome-core/src/quality/baseline.rs +75 -0
- package/crates/naome-core/src/quality/checks/duplicate_blocks.rs +175 -0
- package/crates/naome-core/src/quality/checks/near_duplicates.rs +130 -0
- package/crates/naome-core/src/quality/checks.rs +228 -0
- package/crates/naome-core/src/quality/cleanup.rs +84 -0
- package/crates/naome-core/src/quality/config.rs +102 -0
- package/crates/naome-core/src/quality/config_support.rs +24 -0
- package/crates/naome-core/src/quality/mod.rs +108 -0
- package/crates/naome-core/src/quality/scanner/repo_paths.rs +103 -0
- package/crates/naome-core/src/quality/scanner.rs +379 -0
- package/crates/naome-core/src/quality/structure/adapters.rs +84 -0
- package/crates/naome-core/src/quality/structure/checks/basic.rs +153 -0
- package/crates/naome-core/src/quality/structure/checks/directory.rs +144 -0
- package/crates/naome-core/src/quality/structure/checks/pairing.rs +63 -0
- package/crates/naome-core/src/quality/structure/checks.rs +124 -0
- package/crates/naome-core/src/quality/structure/classify/roles.rs +188 -0
- package/crates/naome-core/src/quality/structure/classify.rs +94 -0
- package/crates/naome-core/src/quality/structure/config.rs +89 -0
- package/crates/naome-core/src/quality/structure/defaults.rs +107 -0
- package/crates/naome-core/src/quality/structure/mod.rs +77 -0
- package/crates/naome-core/src/quality/structure/model.rs +124 -0
- package/crates/naome-core/src/quality/types.rs +292 -0
- package/crates/naome-core/src/route/builtin_checks.rs +155 -0
- package/crates/naome-core/src/route/builtin_context.rs +73 -0
- package/crates/naome-core/src/route/builtin_integrity.rs +49 -0
- package/crates/naome-core/src/route/builtin_require.rs +40 -0
- package/crates/naome-core/src/route/context.rs +180 -0
- package/crates/naome-core/src/route/execution.rs +96 -0
- package/crates/naome-core/src/route/execution_baselines.rs +146 -0
- package/crates/naome-core/src/route/execution_support.rs +57 -0
- package/crates/naome-core/src/route/execution_tasks.rs +71 -0
- package/crates/naome-core/src/route/git_ops.rs +72 -0
- package/crates/naome-core/src/route/quality_gate.rs +73 -0
- package/crates/naome-core/src/route/quality_gate_config.rs +126 -0
- package/crates/naome-core/src/route/quality_gate_snapshot.rs +69 -0
- package/crates/naome-core/src/route/worktree.rs +75 -0
- package/crates/naome-core/src/route/worktree_files.rs +32 -0
- package/crates/naome-core/src/route/worktree_plan.rs +131 -0
- package/crates/naome-core/src/route.rs +44 -1155
- package/crates/naome-core/src/task_state/admission.rs +63 -0
- package/crates/naome-core/src/task_state/admission_proof.rs +72 -0
- package/crates/naome-core/src/task_state/api.rs +130 -0
- package/crates/naome-core/src/task_state/commit_gate.rs +138 -0
- package/crates/naome-core/src/task_state/compact_proof.rs +160 -0
- package/crates/naome-core/src/task_state/completed_refresh.rs +89 -0
- package/crates/naome-core/src/task_state/completion.rs +72 -0
- package/crates/naome-core/src/task_state/deleted_paths.rs +47 -0
- package/crates/naome-core/src/task_state/diff.rs +95 -0
- package/crates/naome-core/src/task_state/evidence.rs +154 -0
- package/crates/naome-core/src/task_state/git_io.rs +86 -0
- package/crates/naome-core/src/task_state/git_parse.rs +86 -0
- package/crates/naome-core/src/task_state/git_refs.rs +37 -0
- package/crates/naome-core/src/task_state/human_review_state.rs +31 -0
- package/crates/naome-core/src/task_state/mod.rs +38 -0
- package/crates/naome-core/src/task_state/process_guard.rs +40 -0
- package/crates/naome-core/src/task_state/progress.rs +123 -0
- package/crates/naome-core/src/task_state/proof.rs +139 -0
- package/crates/naome-core/src/task_state/proof_entry.rs +66 -0
- package/crates/naome-core/src/task_state/proof_model.rs +70 -0
- package/crates/naome-core/src/task_state/proof_sources.rs +76 -0
- package/crates/naome-core/src/task_state/push_gate.rs +49 -0
- package/crates/naome-core/src/task_state/reconcile.rs +7 -0
- package/crates/naome-core/src/task_state/repair.rs +168 -0
- package/crates/naome-core/src/task_state/shape.rs +117 -0
- package/crates/naome-core/src/task_state/task_diff_api.rs +170 -0
- package/crates/naome-core/src/task_state/task_records.rs +131 -0
- package/crates/naome-core/src/task_state/task_references.rs +126 -0
- package/crates/naome-core/src/task_state/types.rs +87 -0
- package/crates/naome-core/src/task_state/util.rs +137 -0
- package/crates/naome-core/src/verification/render.rs +122 -0
- package/crates/naome-core/src/verification.rs +177 -58
- package/crates/naome-core/src/verification_contract.rs +49 -21
- package/crates/naome-core/src/workflow/integrity.rs +123 -0
- package/crates/naome-core/src/workflow/integrity_normalize.rs +7 -0
- package/crates/naome-core/src/workflow/integrity_support.rs +110 -0
- package/crates/naome-core/src/workflow/mod.rs +18 -0
- package/crates/naome-core/src/workflow/mutation.rs +68 -0
- package/crates/naome-core/src/workflow/output.rs +111 -0
- package/crates/naome-core/src/workflow/phase_inference.rs +73 -0
- package/crates/naome-core/src/workflow/phases.rs +169 -0
- package/crates/naome-core/src/workflow/policy.rs +156 -0
- package/crates/naome-core/src/workflow/processes.rs +91 -0
- package/crates/naome-core/src/workflow/types.rs +42 -0
- package/crates/naome-core/tests/decision.rs +24 -118
- package/crates/naome-core/tests/harness_health.rs +5 -0
- package/crates/naome-core/tests/intent.rs +97 -792
- package/crates/naome-core/tests/intent_support/mod.rs +133 -0
- package/crates/naome-core/tests/intent_v2.rs +90 -0
- package/crates/naome-core/tests/quality.rs +319 -0
- package/crates/naome-core/tests/quality_structure.rs +116 -0
- package/crates/naome-core/tests/quality_structure_adapters.rs +98 -0
- package/crates/naome-core/tests/quality_structure_policy.rs +125 -0
- package/crates/naome-core/tests/quality_structure_support/mod.rs +249 -0
- package/crates/naome-core/tests/repo_support/mod.rs +16 -0
- package/crates/naome-core/tests/repo_support/repo.rs +113 -0
- package/crates/naome-core/tests/repo_support/repo_factories.rs +99 -0
- package/crates/naome-core/tests/repo_support/repo_helpers.rs +123 -0
- package/crates/naome-core/tests/repo_support/routes.rs +81 -0
- package/crates/naome-core/tests/repo_support/verification.rs +168 -0
- package/crates/naome-core/tests/repo_support/verification_values.rs +135 -0
- package/crates/naome-core/tests/route.rs +1 -1476
- package/crates/naome-core/tests/route_baseline.rs +86 -0
- package/crates/naome-core/tests/route_completion.rs +141 -0
- package/crates/naome-core/tests/route_harness_refresh.rs +135 -0
- package/crates/naome-core/tests/route_user_diff.rs +198 -0
- package/crates/naome-core/tests/route_worktree.rs +54 -0
- package/crates/naome-core/tests/task_state.rs +60 -429
- package/crates/naome-core/tests/task_state_compact.rs +110 -0
- package/crates/naome-core/tests/task_state_compact_support/mod.rs +5 -0
- package/crates/naome-core/tests/task_state_compact_support/repo.rs +130 -0
- package/crates/naome-core/tests/task_state_compact_support/states.rs +151 -0
- package/crates/naome-core/tests/task_state_support/mod.rs +163 -0
- package/crates/naome-core/tests/task_state_support/states.rs +84 -0
- package/crates/naome-core/tests/verification.rs +4 -45
- package/crates/naome-core/tests/verification_contract.rs +22 -78
- package/crates/naome-core/tests/workflow_integrity.rs +85 -0
- package/crates/naome-core/tests/workflow_policy.rs +139 -0
- package/crates/naome-core/tests/workflow_support/mod.rs +194 -0
- package/installer/agents.js +90 -0
- package/installer/context.js +67 -0
- package/installer/filesystem.js +166 -0
- package/installer/flows.js +84 -0
- package/installer/git-boundary.js +170 -0
- package/installer/git-hook-content.js +36 -0
- package/installer/git-hooks.js +134 -0
- package/installer/git-local.js +2 -0
- package/installer/git-shared.js +35 -0
- package/installer/harness-file-ops.js +140 -0
- package/installer/harness-files.js +56 -0
- package/installer/harness-verification.js +123 -0
- package/installer/install-plan.js +66 -0
- package/installer/main.js +25 -0
- package/installer/manifest-state.js +167 -0
- package/installer/native-build.js +24 -0
- package/installer/native-format.js +6 -0
- package/installer/native.js +162 -0
- package/installer/output.js +131 -0
- package/installer/version.js +32 -0
- package/native/darwin-arm64/naome +0 -0
- package/native/linux-x64/naome +0 -0
- package/package.json +3 -2
- package/templates/naome-root/.naome/bin/check-harness-health.js +66 -85
- package/templates/naome-root/.naome/bin/check-task-state.js +9 -10
- package/templates/naome-root/.naome/bin/naome.js +51 -76
- package/templates/naome-root/.naome/manifest.json +22 -18
- package/templates/naome-root/.naome/repository-quality-baseline.json +5 -0
- package/templates/naome-root/.naome/repository-quality.json +24 -0
- package/templates/naome-root/.naome/repository-structure.json +90 -0
- package/templates/naome-root/.naome/task-contract.schema.json +93 -11
- package/templates/naome-root/.naome/upgrade-state.json +1 -1
- package/templates/naome-root/.naome/verification.json +38 -0
- package/templates/naome-root/AGENTS.md +3 -0
- package/templates/naome-root/docs/naome/agent-workflow.md +25 -12
- package/templates/naome-root/docs/naome/execution.md +25 -21
- package/templates/naome-root/docs/naome/index.md +5 -3
- package/templates/naome-root/docs/naome/repository-quality.md +46 -0
- package/templates/naome-root/docs/naome/repository-structure.md +51 -0
- package/templates/naome-root/docs/naome/testing.md +13 -0
- package/crates/naome-core/src/task_state.rs +0 -2210
|
@@ -27,7 +27,7 @@ function main(argv) {
|
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
if (
|
|
30
|
+
if (["status", "next", "intent", "route", "explain", "quality", "structure", "cleanup", "refresh-integrity", "workflow"].includes(command)) {
|
|
31
31
|
runNativeDecisionCommand(command, args);
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
@@ -46,20 +46,25 @@ function runNativeDecisionCommand(command, args) {
|
|
|
46
46
|
fail("NAOME harness root not found. Run this inside a repository with .naome/task-state.json.");
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
const
|
|
50
|
-
|
|
49
|
+
const result = spawnNative(root, [command, ...args], { stdio: "inherit" });
|
|
50
|
+
|
|
51
|
+
process.exit(result.status === null ? 1 : result.status);
|
|
52
|
+
}
|
|
51
53
|
|
|
52
|
-
|
|
54
|
+
function spawnNative(root, args, options = {}) {
|
|
55
|
+
const nativeBinary = resolveNativeDecisionBinary(root);
|
|
56
|
+
if (!isUsableNativeBinary(nativeBinary, root)) {
|
|
57
|
+
fail("NAOME native decision binary failed integrity or compatibility checks.");
|
|
58
|
+
}
|
|
59
|
+
return spawnSync(nativeBinary, args, {
|
|
53
60
|
cwd: root,
|
|
54
61
|
encoding: "utf8",
|
|
55
62
|
env: {
|
|
56
63
|
...process.env,
|
|
57
64
|
NAOME_NODE_BIN: process.execPath
|
|
58
65
|
},
|
|
59
|
-
|
|
66
|
+
...options
|
|
60
67
|
});
|
|
61
|
-
|
|
62
|
-
process.exit(result.status === null ? 1 : result.status);
|
|
63
68
|
}
|
|
64
69
|
|
|
65
70
|
function resolveNativeDecisionBinary(root) {
|
|
@@ -115,30 +120,22 @@ function buildSourceNativeBinary(root) {
|
|
|
115
120
|
return null;
|
|
116
121
|
}
|
|
117
122
|
|
|
118
|
-
const
|
|
123
|
+
const sourcePath = (...parts) => join(root, "packages", "naome", ...parts);
|
|
124
|
+
const manifestPath = sourcePath("Cargo.toml");
|
|
119
125
|
if (!existsSync(manifestPath)) {
|
|
120
126
|
return null;
|
|
121
127
|
}
|
|
122
128
|
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
encoding: "utf8",
|
|
126
|
-
stdio: "ignore"
|
|
127
|
-
});
|
|
129
|
+
const buildArgs = ["build", "--release", "--manifest-path", manifestPath, "-p", "naome-cli"];
|
|
130
|
+
const result = spawnSync("cargo", buildArgs, { cwd: root, encoding: "utf8", stdio: "ignore" });
|
|
128
131
|
if (result.status !== 0) {
|
|
129
132
|
return null;
|
|
130
133
|
}
|
|
131
134
|
|
|
132
|
-
const builtPath =
|
|
135
|
+
const builtPath = sourcePath("target", "release", nativeBinaryName);
|
|
133
136
|
return existsSync(builtPath) ? builtPath : null;
|
|
134
137
|
}
|
|
135
138
|
|
|
136
|
-
function verifyNativeBinary(nativeBinary) {
|
|
137
|
-
if (!isUsableNativeBinary(nativeBinary, findHarnessRoot(process.cwd()) || process.cwd())) {
|
|
138
|
-
fail("NAOME native decision binary failed integrity or compatibility checks.");
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
139
|
function commit(args) {
|
|
143
140
|
const root = findHarnessRoot(process.cwd());
|
|
144
141
|
if (!root) {
|
|
@@ -179,16 +176,7 @@ function commitBaseline(root, message, options = {}) {
|
|
|
179
176
|
}
|
|
180
177
|
|
|
181
178
|
function readTaskCommitPaths(root) {
|
|
182
|
-
const
|
|
183
|
-
verifyNativeBinary(nativeBinary);
|
|
184
|
-
const result = spawnSync(nativeBinary, ["commit-paths", "--json"], {
|
|
185
|
-
cwd: root,
|
|
186
|
-
encoding: "utf8",
|
|
187
|
-
env: {
|
|
188
|
-
...process.env,
|
|
189
|
-
NAOME_NODE_BIN: process.execPath
|
|
190
|
-
}
|
|
191
|
-
});
|
|
179
|
+
const result = spawnNative(root, ["commit-paths", "--json"]);
|
|
192
180
|
if (result.status !== 0) {
|
|
193
181
|
fail(`Cannot determine NAOME task commit paths: ${result.stderr.trim() || result.stdout.trim()}`);
|
|
194
182
|
}
|
|
@@ -205,8 +193,6 @@ function readTaskCommitPaths(root) {
|
|
|
205
193
|
}
|
|
206
194
|
|
|
207
195
|
function writeTaskJournal(root, outcome, commitInfo) {
|
|
208
|
-
const nativeBinary = resolveNativeDecisionBinary(root);
|
|
209
|
-
verifyNativeBinary(nativeBinary);
|
|
210
196
|
const args = [
|
|
211
197
|
"journal-task",
|
|
212
198
|
"--outcome",
|
|
@@ -220,14 +206,7 @@ function writeTaskJournal(root, outcome, commitInfo) {
|
|
|
220
206
|
args.push("--commit-after", commitInfo.after);
|
|
221
207
|
}
|
|
222
208
|
|
|
223
|
-
const result =
|
|
224
|
-
cwd: root,
|
|
225
|
-
encoding: "utf8",
|
|
226
|
-
env: {
|
|
227
|
-
...process.env,
|
|
228
|
-
NAOME_NODE_BIN: process.execPath
|
|
229
|
-
}
|
|
230
|
-
});
|
|
209
|
+
const result = spawnNative(root, args);
|
|
231
210
|
if (result.status !== 0) {
|
|
232
211
|
fail(`Cannot write NAOME task journal: ${result.stderr.trim() || result.stdout.trim()}`);
|
|
233
212
|
}
|
|
@@ -261,16 +240,7 @@ function defaultSetupCommitMessage(decision) {
|
|
|
261
240
|
}
|
|
262
241
|
|
|
263
242
|
function readDecision(root) {
|
|
264
|
-
const
|
|
265
|
-
verifyNativeBinary(nativeBinary);
|
|
266
|
-
const result = spawnSync(nativeBinary, ["status", "--json"], {
|
|
267
|
-
cwd: root,
|
|
268
|
-
encoding: "utf8",
|
|
269
|
-
env: {
|
|
270
|
-
...process.env,
|
|
271
|
-
NAOME_NODE_BIN: process.execPath
|
|
272
|
-
}
|
|
273
|
-
});
|
|
243
|
+
const result = spawnNative(root, ["status", "--json"]);
|
|
274
244
|
|
|
275
245
|
if (result.status !== 0) {
|
|
276
246
|
fail(`Cannot read NAOME status: ${result.stderr.trim() || result.stdout.trim()}`);
|
|
@@ -358,10 +328,14 @@ function gitHead(root) {
|
|
|
358
328
|
}
|
|
359
329
|
|
|
360
330
|
function findHarnessRoot(startPath) {
|
|
331
|
+
return findAncestorWithMarker(startPath, [".naome", "task-state.json"]);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
function findAncestorWithMarker(startPath, markerParts) {
|
|
361
335
|
let current = resolve(startPath);
|
|
362
336
|
|
|
363
337
|
while (true) {
|
|
364
|
-
if (existsSync(join(current,
|
|
338
|
+
if (existsSync(join(current, ...markerParts))) {
|
|
365
339
|
return current;
|
|
366
340
|
}
|
|
367
341
|
|
|
@@ -375,19 +349,30 @@ function findHarnessRoot(startPath) {
|
|
|
375
349
|
}
|
|
376
350
|
|
|
377
351
|
function printHelp() {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
352
|
+
const commands = [
|
|
353
|
+
"naome status [--json]",
|
|
354
|
+
"naome next [--json]",
|
|
355
|
+
"naome intent --prompt-file <path> [--json]",
|
|
356
|
+
"naome intent --prompt <text> [--json]",
|
|
357
|
+
"naome route --prompt-file <path> [--execute] [--json]",
|
|
358
|
+
"naome route --prompt <text> [--execute] [--json]",
|
|
359
|
+
"naome explain --prompt-file <path> [--json]",
|
|
360
|
+
"naome explain --prompt <text> [--json]",
|
|
361
|
+
"naome quality init [--json]",
|
|
362
|
+
"naome quality check --changed [--json]",
|
|
363
|
+
"naome quality report [--json]",
|
|
364
|
+
"naome structure report [--json]",
|
|
365
|
+
"naome structure explain --path <path> [--json]",
|
|
366
|
+
"naome cleanup plan [--json]",
|
|
367
|
+
"naome cleanup route --path <path> [--json]",
|
|
368
|
+
"naome refresh-integrity [--json]",
|
|
369
|
+
"naome workflow search-profile|check-search|phases|processes|mutations [--json]",
|
|
370
|
+
"naome install",
|
|
371
|
+
"naome sync",
|
|
372
|
+
"naome commit -m \"type(scope): message\"",
|
|
373
|
+
"node .naome/bin/naome.js commit -m \"type(scope): message\""
|
|
374
|
+
];
|
|
375
|
+
console.log(["Usage:", ...commands.map((command) => ` ${command}`)].join("\n"));
|
|
391
376
|
}
|
|
392
377
|
|
|
393
378
|
function fail(message) {
|
|
@@ -399,24 +384,14 @@ function installOrSync(command, args) {
|
|
|
399
384
|
const root = findHarnessRoot(process.cwd()) || process.cwd();
|
|
400
385
|
const packageRoot = sourcePackageRoot(root);
|
|
401
386
|
if (packageRoot) {
|
|
402
|
-
const
|
|
403
|
-
verifyNativeBinary(nativeBinary);
|
|
404
|
-
const result = spawnSync(nativeBinary, [
|
|
387
|
+
const result = spawnNative(root, [
|
|
405
388
|
command,
|
|
406
389
|
"--package-root",
|
|
407
390
|
packageRoot,
|
|
408
391
|
"--installer-js",
|
|
409
392
|
join(packageRoot, "bin", "naome-node.js"),
|
|
410
393
|
...args
|
|
411
|
-
], {
|
|
412
|
-
cwd: root,
|
|
413
|
-
encoding: "utf8",
|
|
414
|
-
env: {
|
|
415
|
-
...process.env,
|
|
416
|
-
NAOME_NODE_BIN: process.execPath
|
|
417
|
-
},
|
|
418
|
-
stdio: "inherit"
|
|
419
|
-
});
|
|
394
|
+
], { stdio: "inherit" });
|
|
420
395
|
process.exit(result.status === null ? 1 : result.status);
|
|
421
396
|
}
|
|
422
397
|
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"harnessVersion": "1.1.1",
|
|
4
|
-
"profile": "standard",
|
|
2
|
+
"harnessVersion": "1.2.0",
|
|
5
3
|
"installedAt": null,
|
|
4
|
+
"integrity": {
|
|
5
|
+
".naome/bin/check-harness-health.js": "sha256:dc4de52b79c69600b9ba47b924e2c2b8de61a2cbfab6d1ccc0f1924d963db657",
|
|
6
|
+
".naome/bin/check-task-state.js": "sha256:43c02868072d0d13499aefba2e9a5ec9517d59539fd19ff0f11e3e4623a51b44",
|
|
7
|
+
".naome/bin/naome.js": "sha256:87eabd690bf55f0b0195446db46fa7c19bfa17395d31c2f34a9ef9339d2229e2",
|
|
8
|
+
".naome/package.json": "sha256:8005a3491db7d92f36ac66369861589f9c47123d3a7c71e643fc2c06168cd45a",
|
|
9
|
+
".naome/task-contract.schema.json": "sha256:1b3b62350328d0d6d660e36d1d1baaa2b88718530db774f9ab2a9e2fcba369c8",
|
|
10
|
+
"AGENTS.md": "sha256:9192ea81f90bb19f8043513c49b5da9e9598ee694da8356f345e7ccbca0e28df",
|
|
11
|
+
"docs/naome/agent-workflow.md": "sha256:802eb34cf268fc9c5e7aefc28192efef4bf60302d30b3f78e5a61b876ce8a098",
|
|
12
|
+
"docs/naome/execution.md": "sha256:bfc5d55838942ec8e3d790b59e3c634ff5bf6a2298265cef3dca9788a097eafb",
|
|
13
|
+
"docs/naome/first-run.md": "sha256:a1dd0bd17ec9d71955a473cd2c4a615538e89a7d81e8f4e1015a50ab9efe3558",
|
|
14
|
+
"docs/naome/index.md": "sha256:a674102cc801702dc77102afb59be0f5ab189dc638caf0bef358b9d6087d0742",
|
|
15
|
+
"docs/naome/upgrade.md": "sha256:2c60f0441bbd98bd528d109b30a7ded4b0ad55d61ffb9f52edac9e93b7999cb1"
|
|
16
|
+
},
|
|
6
17
|
"machineOwned": [
|
|
7
18
|
"AGENTS.md",
|
|
8
19
|
".naome/package.json",
|
|
@@ -16,6 +27,8 @@
|
|
|
16
27
|
"docs/naome/execution.md",
|
|
17
28
|
"docs/naome/upgrade.md"
|
|
18
29
|
],
|
|
30
|
+
"name": "naome",
|
|
31
|
+
"profile": "standard",
|
|
19
32
|
"projectOwned": [
|
|
20
33
|
".naomeignore",
|
|
21
34
|
".naome/init-state.json",
|
|
@@ -23,24 +36,15 @@
|
|
|
23
36
|
".naome/task-state.json",
|
|
24
37
|
".naome/upgrade-state.json",
|
|
25
38
|
".naome/verification.json",
|
|
39
|
+
".naome/repository-quality.json",
|
|
40
|
+
".naome/repository-structure.json",
|
|
41
|
+
".naome/repository-quality-baseline.json",
|
|
26
42
|
"docs/naome/architecture.md",
|
|
27
43
|
"docs/naome/decisions.md",
|
|
28
44
|
"docs/naome/repo-profile.md",
|
|
45
|
+
"docs/naome/repository-quality.md",
|
|
46
|
+
"docs/naome/repository-structure.md",
|
|
29
47
|
"docs/naome/security.md",
|
|
30
48
|
"docs/naome/testing.md"
|
|
31
|
-
]
|
|
32
|
-
"integrity": {
|
|
33
|
-
"AGENTS.md": "sha256:84ce882fa6798a144c8c74673d4304fc6bf235b1cc417f7649eea9f7461775de",
|
|
34
|
-
".naome/package.json": "sha256:8005a3491db7d92f36ac66369861589f9c47123d3a7c71e643fc2c06168cd45a",
|
|
35
|
-
".naome/bin/naome.js": "sha256:7894690ad47700a9a5e7ecb5a94ba42c1a12e2637d2c9f41f0023b1bd8bd22b6",
|
|
36
|
-
".naome/bin/check-task-state.js": "sha256:43c02868072d0d13499aefba2e9a5ec9517d59539fd19ff0f11e3e4623a51b44",
|
|
37
|
-
".naome/bin/check-harness-health.js": "sha256:dce2a380022dd63d86bd762869debafbc635ab3d7e8fae985e2d429d8ee437ad",
|
|
38
|
-
".naome/task-contract.schema.json": "sha256:c806416d4944eaed6dc48b3760fd0dd5b9b5a7c9ab895697fe36b54c41c1332f",
|
|
39
|
-
"docs/naome/index.md": "sha256:d04691b25ed377c2a3aa2c56965d0db276539aeadcfdd2a2ec1be7ff7706dd6f",
|
|
40
|
-
"docs/naome/first-run.md": "sha256:a1dd0bd17ec9d71955a473cd2c4a615538e89a7d81e8f4e1015a50ab9efe3558",
|
|
41
|
-
"docs/naome/agent-workflow.md": "sha256:43ba8a6814068e1b932b12a392de70b39841dc82df0acdaac459d6714c501b9d",
|
|
42
|
-
"docs/naome/execution.md": "sha256:ad66611b2878d1ba8fe05ddc4cfe9de7fd41de172a0de8295c36227a2700631a",
|
|
43
|
-
"docs/naome/upgrade.md": "sha256:2c60f0441bbd98bd528d109b30a7ded4b0ad55d61ffb9f52edac9e93b7999cb1",
|
|
44
|
-
".naome/bin/naome-rust": "sha256:cc754ae59477577dfc0130cc21c286beaf3f19e2852278bb8f1e8724277eb44b"
|
|
45
|
-
}
|
|
49
|
+
]
|
|
46
50
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "naome.repository-quality.v1",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"status": "ready",
|
|
5
|
+
"limits": {
|
|
6
|
+
"maxFileLines": 450,
|
|
7
|
+
"maxNewFileLines": 300,
|
|
8
|
+
"maxDiffAddedLines": 180,
|
|
9
|
+
"maxFunctionLines": 100,
|
|
10
|
+
"maxTopLevelSymbols": 30,
|
|
11
|
+
"duplicateBlockLines": 10,
|
|
12
|
+
"nearDuplicateSimilarity": 0.9
|
|
13
|
+
},
|
|
14
|
+
"enabledAdapters": [],
|
|
15
|
+
"disabledChecks": [],
|
|
16
|
+
"ignoredPaths": [],
|
|
17
|
+
"generatedPaths": [
|
|
18
|
+
"**/*.min.js",
|
|
19
|
+
"**/*.map",
|
|
20
|
+
"**/dist/**",
|
|
21
|
+
"**/build/**"
|
|
22
|
+
],
|
|
23
|
+
"pathRules": []
|
|
24
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "naome.repository-structure.v1",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"status": "ready",
|
|
5
|
+
"enabledAdapters": [],
|
|
6
|
+
"sourceRoots": [
|
|
7
|
+
"src/**",
|
|
8
|
+
"app/**",
|
|
9
|
+
"apps/*/src/**",
|
|
10
|
+
"packages/*/src/**",
|
|
11
|
+
"crates/*/src/**",
|
|
12
|
+
"**/src/**",
|
|
13
|
+
"lib/**"
|
|
14
|
+
],
|
|
15
|
+
"testRoots": [
|
|
16
|
+
"test/**",
|
|
17
|
+
"tests/**",
|
|
18
|
+
"__tests__/**",
|
|
19
|
+
"packages/*/test/**",
|
|
20
|
+
"packages/*/tests/**",
|
|
21
|
+
"crates/*/tests/**",
|
|
22
|
+
"**/tests/**",
|
|
23
|
+
"scripts/*.test.js"
|
|
24
|
+
],
|
|
25
|
+
"docsRoots": [
|
|
26
|
+
"docs/**",
|
|
27
|
+
"doc/**"
|
|
28
|
+
],
|
|
29
|
+
"generatedRoots": [
|
|
30
|
+
"**/generated/**",
|
|
31
|
+
"**/__generated__/**",
|
|
32
|
+
"**/codegen/**",
|
|
33
|
+
"**/*.generated.*"
|
|
34
|
+
],
|
|
35
|
+
"artifactRoots": [
|
|
36
|
+
"dist/**",
|
|
37
|
+
"build/**",
|
|
38
|
+
"coverage/**",
|
|
39
|
+
".next/**",
|
|
40
|
+
"target/**",
|
|
41
|
+
"**/dist/**",
|
|
42
|
+
"**/build/**"
|
|
43
|
+
],
|
|
44
|
+
"moduleRoots": [
|
|
45
|
+
"src/**",
|
|
46
|
+
"app/**",
|
|
47
|
+
"packages/*/src/**",
|
|
48
|
+
"crates/*/src/**",
|
|
49
|
+
"**/src/**"
|
|
50
|
+
],
|
|
51
|
+
"allowedRootFiles": [
|
|
52
|
+
"README.md",
|
|
53
|
+
"LICENSE",
|
|
54
|
+
"NOTICE",
|
|
55
|
+
"CHANGELOG.md",
|
|
56
|
+
"CONTRIBUTING.md",
|
|
57
|
+
"SECURITY.md",
|
|
58
|
+
"AGENTS.md",
|
|
59
|
+
"package.json",
|
|
60
|
+
"Cargo.toml",
|
|
61
|
+
"pyproject.toml",
|
|
62
|
+
"go.mod",
|
|
63
|
+
"go.sum",
|
|
64
|
+
"Makefile",
|
|
65
|
+
".gitignore",
|
|
66
|
+
".naomeignore"
|
|
67
|
+
],
|
|
68
|
+
"directoryRoleRules": [],
|
|
69
|
+
"layerRules": [],
|
|
70
|
+
"ignoredPaths": [
|
|
71
|
+
".git/**",
|
|
72
|
+
"node_modules/**",
|
|
73
|
+
"vendor/**",
|
|
74
|
+
"target/**",
|
|
75
|
+
"**/target/**",
|
|
76
|
+
"dist/**",
|
|
77
|
+
"build/**",
|
|
78
|
+
"coverage/**",
|
|
79
|
+
".next/**"
|
|
80
|
+
],
|
|
81
|
+
"disabledChecks": [],
|
|
82
|
+
"changedCodePolicy": "block",
|
|
83
|
+
"debtPolicy": "report",
|
|
84
|
+
"limits": {
|
|
85
|
+
"maxDirectoryFiles": 40,
|
|
86
|
+
"maxPathDepth": 10,
|
|
87
|
+
"maxDirectoryRoles": 2,
|
|
88
|
+
"maxDumpingGroundFiles": 12
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "naome.task-state.
|
|
3
|
+
"$id": "naome.task-state.v2",
|
|
4
4
|
"title": "NAOME Task State",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"required": ["schema", "version", "status", "activeTask", "blocker", "updatedAt"],
|
|
8
8
|
"properties": {
|
|
9
|
-
"schema": { "
|
|
10
|
-
"version": { "
|
|
9
|
+
"schema": { "enum": ["naome.task-state.v1", "naome.task-state.v2"] },
|
|
10
|
+
"version": { "enum": [1, 2] },
|
|
11
11
|
"status": {
|
|
12
12
|
"enum": ["idle", "planning", "implementing", "revising", "verifying", "needs_human_review", "blocked", "complete"]
|
|
13
13
|
},
|
|
@@ -30,11 +30,29 @@
|
|
|
30
30
|
]
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
|
+
"oneOf": [
|
|
34
|
+
{
|
|
35
|
+
"properties": {
|
|
36
|
+
"schema": { "const": "naome.task-state.v1" },
|
|
37
|
+
"version": { "const": 1 }
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"properties": {
|
|
42
|
+
"schema": { "const": "naome.task-state.v2" },
|
|
43
|
+
"version": { "const": 2 }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
],
|
|
33
47
|
"$defs": {
|
|
34
48
|
"activeTask": {
|
|
35
49
|
"type": "object",
|
|
36
50
|
"additionalProperties": false,
|
|
37
|
-
"required": ["id", "request", "userPrompt", "admission", "allowedPaths", "declaredChangeTypes", "requiredCheckIds", "
|
|
51
|
+
"required": ["id", "request", "userPrompt", "admission", "allowedPaths", "declaredChangeTypes", "requiredCheckIds", "humanReview"],
|
|
52
|
+
"anyOf": [
|
|
53
|
+
{ "required": ["proofResults"] },
|
|
54
|
+
{ "required": ["proofBatches"] }
|
|
55
|
+
],
|
|
38
56
|
"properties": {
|
|
39
57
|
"id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
|
|
40
58
|
"request": { "type": "string", "minLength": 1 },
|
|
@@ -58,6 +76,14 @@
|
|
|
58
76
|
"type": "array",
|
|
59
77
|
"items": { "$ref": "#/$defs/proofResult" }
|
|
60
78
|
},
|
|
79
|
+
"proofPathSets": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": { "$ref": "#/$defs/evidenceArray" }
|
|
82
|
+
},
|
|
83
|
+
"proofBatches": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": { "$ref": "#/$defs/proofBatch" }
|
|
86
|
+
},
|
|
61
87
|
"revisions": {
|
|
62
88
|
"type": "array",
|
|
63
89
|
"items": { "$ref": "#/$defs/revision" }
|
|
@@ -109,17 +135,73 @@
|
|
|
109
135
|
"cwd": { "type": "string", "minLength": 1 },
|
|
110
136
|
"exitCode": { "type": "integer" },
|
|
111
137
|
"checkedAt": { "type": "string", "format": "date-time" },
|
|
112
|
-
"evidence": {
|
|
138
|
+
"evidence": { "$ref": "#/$defs/evidenceArray" },
|
|
139
|
+
"outputSummary": { "$ref": "#/$defs/outputSummary" }
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"proofBatch": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"additionalProperties": false,
|
|
145
|
+
"required": ["checkedAt", "proofs"],
|
|
146
|
+
"properties": {
|
|
147
|
+
"checkedAt": { "type": "string", "format": "date-time" },
|
|
148
|
+
"command": { "type": "string", "minLength": 1 },
|
|
149
|
+
"cwd": { "type": "string", "minLength": 1 },
|
|
150
|
+
"evidencePathSet": { "type": "string", "minLength": 1 },
|
|
151
|
+
"proofs": {
|
|
152
|
+
"type": "array",
|
|
153
|
+
"items": { "$ref": "#/$defs/compactProofResult" }
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"compactProofResult": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"additionalProperties": false,
|
|
160
|
+
"required": ["checkId", "exitCode"],
|
|
161
|
+
"properties": {
|
|
162
|
+
"checkId": { "type": "string", "minLength": 1 },
|
|
163
|
+
"command": { "type": "string", "minLength": 1 },
|
|
164
|
+
"cwd": { "type": "string", "minLength": 1 },
|
|
165
|
+
"exitCode": { "type": "integer" },
|
|
166
|
+
"checkedAt": { "type": "string", "format": "date-time" },
|
|
167
|
+
"evidence": { "$ref": "#/$defs/evidenceArray" },
|
|
168
|
+
"evidencePathSet": { "type": "string", "minLength": 1 },
|
|
169
|
+
"outputSummary": { "$ref": "#/$defs/outputSummary" }
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"outputSummary": {
|
|
173
|
+
"type": "object",
|
|
174
|
+
"additionalProperties": false,
|
|
175
|
+
"required": ["command", "cwd", "exitCode", "truncated", "relevantLines", "affectedPaths"],
|
|
176
|
+
"properties": {
|
|
177
|
+
"command": { "type": "string", "minLength": 1 },
|
|
178
|
+
"cwd": { "type": "string", "minLength": 1 },
|
|
179
|
+
"exitCode": { "type": "integer" },
|
|
180
|
+
"truncated": { "type": "boolean" },
|
|
181
|
+
"omittedLineCount": { "type": "integer", "minimum": 0 },
|
|
182
|
+
"relevantLines": {
|
|
113
183
|
"type": "array",
|
|
114
|
-
"items": {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
184
|
+
"items": { "type": "string" }
|
|
185
|
+
},
|
|
186
|
+
"affectedPaths": {
|
|
187
|
+
"type": "array",
|
|
188
|
+
"items": { "type": "string", "minLength": 1 }
|
|
189
|
+
},
|
|
190
|
+
"artifacts": {
|
|
191
|
+
"type": "array",
|
|
192
|
+
"items": { "type": "string", "minLength": 1 }
|
|
120
193
|
}
|
|
121
194
|
}
|
|
122
195
|
},
|
|
196
|
+
"evidenceArray": {
|
|
197
|
+
"type": "array",
|
|
198
|
+
"items": {
|
|
199
|
+
"anyOf": [
|
|
200
|
+
{ "type": "string", "minLength": 1 },
|
|
201
|
+
{ "$ref": "#/$defs/evidenceEntry" }
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
},
|
|
123
205
|
"evidenceEntry": {
|
|
124
206
|
"type": "object",
|
|
125
207
|
"additionalProperties": false,
|
|
@@ -38,6 +38,44 @@
|
|
|
38
38
|
".naome/task-contract.schema.json"
|
|
39
39
|
],
|
|
40
40
|
"lastVerified": null
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "repository-quality-check",
|
|
44
|
+
"command": "node .naome/bin/naome.js quality check --changed",
|
|
45
|
+
"cwd": ".",
|
|
46
|
+
"purpose": "Validate changed files against deterministic NAOME repository quality rules.",
|
|
47
|
+
"cost": "fast",
|
|
48
|
+
"source": "NAOME built-in",
|
|
49
|
+
"evidence": [
|
|
50
|
+
".naome/repository-quality.json",
|
|
51
|
+
".naome/repository-structure.json",
|
|
52
|
+
".naome/repository-quality-baseline.json"
|
|
53
|
+
],
|
|
54
|
+
"lastVerified": null
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"phases": [
|
|
58
|
+
{
|
|
59
|
+
"id": "shape-health",
|
|
60
|
+
"order": 10,
|
|
61
|
+
"checkIds": [
|
|
62
|
+
"naome-harness-health",
|
|
63
|
+
"naome-task-state"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": "quality",
|
|
68
|
+
"order": 20,
|
|
69
|
+
"checkIds": [
|
|
70
|
+
"repository-quality-check"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"id": "diff-check",
|
|
75
|
+
"order": 60,
|
|
76
|
+
"checkIds": [
|
|
77
|
+
"diff-check"
|
|
78
|
+
]
|
|
41
79
|
}
|
|
42
80
|
],
|
|
43
81
|
"changeTypes": [],
|
|
@@ -69,6 +69,9 @@ This repository uses NAOME as its coding-agent harness.
|
|
|
69
69
|
previous-task, or other unowned changes.
|
|
70
70
|
- Treat `.naomeignore` as a hard read boundary. Do not inspect ignored paths
|
|
71
71
|
unless the user first removes the path from `.naomeignore`.
|
|
72
|
+
- Use `naome workflow search-profile` or equivalent excludes for broad searches;
|
|
73
|
+
hidden searches must exclude `.git`, `.naome/archive`, dependencies, build
|
|
74
|
+
outputs, caches, and `.naomeignore` paths.
|
|
72
75
|
- Use `docs/naome/testing.md` and `.naome/verification.json` before claiming
|
|
73
76
|
completion.
|
|
74
77
|
- Before claiming completion, run the narrowest meaningful verification that can
|