@lamentis/naome 1.1.1 → 1.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/Cargo.lock +2 -2
- package/Cargo.toml +1 -1
- package/LICENSE +180 -21
- package/README.md +49 -6
- package/bin/naome-node.js +44 -4
- package/bin/naome.js +54 -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 +36 -0
- package/crates/naome-cli/src/install_bridge.rs +83 -0
- package/crates/naome-cli/src/main.rs +57 -341
- package/crates/naome-cli/src/prompt_commands.rs +68 -0
- package/crates/naome-cli/src/quality_commands.rs +141 -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/harness_health/integrity.rs +96 -0
- package/crates/naome-core/src/harness_health.rs +14 -126
- package/crates/naome-core/src/install_plan.rs +3 -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 +13 -0
- package/crates/naome-core/src/quality/adapters.rs +178 -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 +72 -0
- package/crates/naome-core/src/quality/config.rs +109 -0
- package/crates/naome-core/src/quality/mod.rs +90 -0
- package/crates/naome-core/src/quality/scanner/repo_paths.rs +103 -0
- package/crates/naome-core/src/quality/scanner.rs +367 -0
- package/crates/naome-core/src/quality/types.rs +289 -0
- package/crates/naome-core/src/route.rs +292 -17
- 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 +176 -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/harness_health.rs +3 -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 +425 -0
- package/crates/naome-core/tests/route.rs +221 -4
- package/crates/naome-core/tests/task_state.rs +3 -0
- 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/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/native/darwin-arm64/naome +0 -0
- package/native/linux-x64/naome +0 -0
- package/package.json +2 -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 +34 -63
- package/templates/naome-root/.naome/manifest.json +20 -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/task-contract.schema.json +93 -11
- package/templates/naome-root/.naome/upgrade-state.json +1 -1
- package/templates/naome-root/.naome/verification.json +37 -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 +4 -3
- package/templates/naome-root/docs/naome/repository-quality.md +43 -0
- package/templates/naome-root/docs/naome/testing.md +12 -0
- package/crates/naome-core/src/task_state.rs +0 -2210
|
@@ -9,18 +9,17 @@ const nativeBinaryRelativePath = process.platform === "win32" ? ".naome/bin/naom
|
|
|
9
9
|
const nativeBinaryName = process.platform === "win32" ? "naome.exe" : "naome";
|
|
10
10
|
|
|
11
11
|
const expectedMachineOwnedIntegrity = Object.freeze({
|
|
12
|
-
"
|
|
13
|
-
".naome/package.json": "sha256:8005a3491db7d92f36ac66369861589f9c47123d3a7c71e643fc2c06168cd45a",
|
|
14
|
-
".naome/bin/naome.js": "sha256:7894690ad47700a9a5e7ecb5a94ba42c1a12e2637d2c9f41f0023b1bd8bd22b6",
|
|
12
|
+
".naome/bin/check-harness-health.js": "sha256:dc4de52b79c69600b9ba47b924e2c2b8de61a2cbfab6d1ccc0f1924d963db657",
|
|
15
13
|
".naome/bin/check-task-state.js": "sha256:43c02868072d0d13499aefba2e9a5ec9517d59539fd19ff0f11e3e4623a51b44",
|
|
16
|
-
".naome/bin/
|
|
17
|
-
".naome/
|
|
18
|
-
"
|
|
14
|
+
".naome/bin/naome.js": "sha256:5675f729be6da3cbda1d8b9e0b36821cc98409aae95dff0603ed9161a5eb3b38",
|
|
15
|
+
".naome/package.json": "sha256:8005a3491db7d92f36ac66369861589f9c47123d3a7c71e643fc2c06168cd45a",
|
|
16
|
+
".naome/task-contract.schema.json": "sha256:1b3b62350328d0d6d660e36d1d1baaa2b88718530db774f9ab2a9e2fcba369c8",
|
|
17
|
+
"AGENTS.md": "sha256:9192ea81f90bb19f8043513c49b5da9e9598ee694da8356f345e7ccbca0e28df",
|
|
18
|
+
"docs/naome/agent-workflow.md": "sha256:802eb34cf268fc9c5e7aefc28192efef4bf60302d30b3f78e5a61b876ce8a098",
|
|
19
|
+
"docs/naome/execution.md": "sha256:bfc5d55838942ec8e3d790b59e3c634ff5bf6a2298265cef3dca9788a097eafb",
|
|
19
20
|
"docs/naome/first-run.md": "sha256:a1dd0bd17ec9d71955a473cd2c4a615538e89a7d81e8f4e1015a50ab9efe3558",
|
|
20
|
-
"docs/naome/
|
|
21
|
-
"docs/naome/
|
|
22
|
-
"docs/naome/upgrade.md": "sha256:2c60f0441bbd98bd528d109b30a7ded4b0ad55d61ffb9f52edac9e93b7999cb1",
|
|
23
|
-
".naome/bin/naome-rust": "sha256:cc754ae59477577dfc0130cc21c286beaf3f19e2852278bb8f1e8724277eb44b"
|
|
21
|
+
"docs/naome/index.md": "sha256:7d917f1fa368874653bb458384bd9d0b221529e19644028a3143db3d3c144213",
|
|
22
|
+
"docs/naome/upgrade.md": "sha256:2c60f0441bbd98bd528d109b30a7ded4b0ad55d61ffb9f52edac9e93b7999cb1"
|
|
24
23
|
});
|
|
25
24
|
|
|
26
25
|
function main(argv) {
|
|
@@ -27,7 +27,7 @@ function main(argv) {
|
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
if (
|
|
30
|
+
if (["status", "next", "intent", "route", "explain", "quality", "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
|
|
|
@@ -384,6 +358,13 @@ function printHelp() {
|
|
|
384
358
|
console.log(" naome route --prompt <text> [--execute] [--json]");
|
|
385
359
|
console.log(" naome explain --prompt-file <path> [--json]");
|
|
386
360
|
console.log(" naome explain --prompt <text> [--json]");
|
|
361
|
+
console.log(" naome quality init [--json]");
|
|
362
|
+
console.log(" naome quality check --changed [--json]");
|
|
363
|
+
console.log(" naome quality report [--json]");
|
|
364
|
+
console.log(" naome cleanup plan [--json]");
|
|
365
|
+
console.log(" naome cleanup route --path <path> [--json]");
|
|
366
|
+
console.log(" naome refresh-integrity [--json]");
|
|
367
|
+
console.log(" naome workflow search-profile|check-search|phases|processes|mutations [--json]");
|
|
387
368
|
console.log(" naome install");
|
|
388
369
|
console.log(" naome sync");
|
|
389
370
|
console.log(" naome commit -m \"type(scope): message\"");
|
|
@@ -399,24 +380,14 @@ function installOrSync(command, args) {
|
|
|
399
380
|
const root = findHarnessRoot(process.cwd()) || process.cwd();
|
|
400
381
|
const packageRoot = sourcePackageRoot(root);
|
|
401
382
|
if (packageRoot) {
|
|
402
|
-
const
|
|
403
|
-
verifyNativeBinary(nativeBinary);
|
|
404
|
-
const result = spawnSync(nativeBinary, [
|
|
383
|
+
const result = spawnNative(root, [
|
|
405
384
|
command,
|
|
406
385
|
"--package-root",
|
|
407
386
|
packageRoot,
|
|
408
387
|
"--installer-js",
|
|
409
388
|
join(packageRoot, "bin", "naome-node.js"),
|
|
410
389
|
...args
|
|
411
|
-
], {
|
|
412
|
-
cwd: root,
|
|
413
|
-
encoding: "utf8",
|
|
414
|
-
env: {
|
|
415
|
-
...process.env,
|
|
416
|
-
NAOME_NODE_BIN: process.execPath
|
|
417
|
-
},
|
|
418
|
-
stdio: "inherit"
|
|
419
|
-
});
|
|
390
|
+
], { stdio: "inherit" });
|
|
420
391
|
process.exit(result.status === null ? 1 : result.status);
|
|
421
392
|
}
|
|
422
393
|
|
|
@@ -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:5675f729be6da3cbda1d8b9e0b36821cc98409aae95dff0603ed9161a5eb3b38",
|
|
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:7d917f1fa368874653bb458384bd9d0b221529e19644028a3143db3d3c144213",
|
|
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,13 @@
|
|
|
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-quality-baseline.json",
|
|
26
41
|
"docs/naome/architecture.md",
|
|
27
42
|
"docs/naome/decisions.md",
|
|
28
43
|
"docs/naome/repo-profile.md",
|
|
44
|
+
"docs/naome/repository-quality.md",
|
|
29
45
|
"docs/naome/security.md",
|
|
30
46
|
"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
|
-
}
|
|
47
|
+
]
|
|
46
48
|
}
|
|
@@ -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
|
+
}
|
|
@@ -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,43 @@
|
|
|
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-quality-baseline.json"
|
|
52
|
+
],
|
|
53
|
+
"lastVerified": null
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"phases": [
|
|
57
|
+
{
|
|
58
|
+
"id": "shape-health",
|
|
59
|
+
"order": 10,
|
|
60
|
+
"checkIds": [
|
|
61
|
+
"naome-harness-health",
|
|
62
|
+
"naome-task-state"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"id": "quality",
|
|
67
|
+
"order": 20,
|
|
68
|
+
"checkIds": [
|
|
69
|
+
"repository-quality-check"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "diff-check",
|
|
74
|
+
"order": 60,
|
|
75
|
+
"checkIds": [
|
|
76
|
+
"diff-check"
|
|
77
|
+
]
|
|
41
78
|
}
|
|
42
79
|
],
|
|
43
80
|
"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
|
|
@@ -11,6 +11,11 @@ Use this workflow after first-run intake is complete.
|
|
|
11
11
|
`canCreateTask` fields instead of inventing routing or final-response text.
|
|
12
12
|
If route returns a `taskRoot` different from the current directory, continue
|
|
13
13
|
the task from that path and leave the original worktree untouched.
|
|
14
|
+
When preparing the route prompt file, prepend a fenced `naome-intent-v2`
|
|
15
|
+
JSON envelope that states `workflowAction`, `taskIntent`, and `risk` using
|
|
16
|
+
canonical NAOME schema constants such as `commit_request`,
|
|
17
|
+
`task_revision`, and `credential_context`. Keep the original user text below
|
|
18
|
+
it. Do not derive workflow actions from natural-language keywords.
|
|
14
19
|
3. Use `node .naome/bin/naome.js explain --prompt-file <path> --json` only when
|
|
15
20
|
debugging why a policy won.
|
|
16
21
|
4. Run `node .naome/bin/naome.js status --json` when reporting state without
|
|
@@ -38,11 +43,14 @@ Use this workflow after first-run intake is complete.
|
|
|
38
43
|
11. Restate the task in concrete terms.
|
|
39
44
|
12. Read `.naomeignore`.
|
|
40
45
|
13. Exclude every path matched by `.naomeignore` from context gathering.
|
|
41
|
-
14.
|
|
46
|
+
14. For broad searches, use `node .naome/bin/naome.js workflow search-profile`
|
|
47
|
+
or equivalent excludes for `.git`, `.naome/archive`, dependencies, build
|
|
48
|
+
outputs, caches, and `.naomeignore` paths.
|
|
49
|
+
15. Read only the `requiredContext` returned by route/status plus the smallest
|
|
42
50
|
task-relevant NAOME docs.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
51
|
+
16. Inspect the existing code or docs before proposing changes.
|
|
52
|
+
17. Read `testing.md` and `.naome/verification.json`.
|
|
53
|
+
18. Identify the required proof before claiming success.
|
|
46
54
|
|
|
47
55
|
## Instruction Boundaries
|
|
48
56
|
|
|
@@ -66,25 +74,30 @@ Use this workflow after first-run intake is complete.
|
|
|
66
74
|
- Update NAOME docs only when the change reveals durable project knowledge.
|
|
67
75
|
- Use `node .naome/bin/check-task-state.js --progress` for in-flight task
|
|
68
76
|
validation. Use the normal task-state check only after setting `complete`.
|
|
77
|
+
Scope changes outside `allowedPaths` require human review before continuing.
|
|
69
78
|
|
|
70
79
|
## Before Completion
|
|
71
80
|
|
|
72
81
|
1. Identify changed files.
|
|
73
82
|
2. Match them against `.naome/verification.json`.
|
|
74
83
|
3. Run the required checks when available.
|
|
75
|
-
4. Record proof in `.naome/task-state.json`,
|
|
76
|
-
|
|
84
|
+
4. Record proof in `.naome/task-state.json`, using compact `proofPathSets` and
|
|
85
|
+
`proofBatches` when several checks share the same evidence or timestamp.
|
|
86
|
+
Include every changed in-scope path reported by git in expanded proof
|
|
87
|
+
evidence.
|
|
77
88
|
5. Do not list `.naome/task-state.json` as task scope or proof evidence.
|
|
78
|
-
6.
|
|
79
|
-
|
|
80
|
-
|
|
89
|
+
6. Stop tracked long-running processes or mark them explicitly allowed in
|
|
90
|
+
`.naome/processes.json`.
|
|
91
|
+
7. Set task state to `complete`.
|
|
92
|
+
8. Run `node .naome/bin/check-task-state.js`.
|
|
93
|
+
9. If the task-state check prints a next-task admission notice, do not repeat
|
|
81
94
|
internal baseline options in the final response. Use the machine-generated
|
|
82
95
|
`userMessage` from route/status and mention `humanOptions` only when that
|
|
83
96
|
array is non-empty.
|
|
84
|
-
|
|
97
|
+
10. If no rule matches or the task check fails, report the gap and ask for human
|
|
85
98
|
review before claiming completion.
|
|
86
|
-
|
|
87
|
-
|
|
99
|
+
11. Report changed files, exact commands, results, and remaining risk.
|
|
100
|
+
12. Only ask the user for options when intent blocks, the user explicitly asks
|
|
88
101
|
to review/revise/cancel, or automatic baselining fails.
|
|
89
102
|
|
|
90
103
|
## Commit And Push
|