@lamentis/naome 1.0.1 → 1.1.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/README.md +8 -1
- package/bin/naome-node.js +121 -4
- package/bin/naome.js +198 -3
- package/crates/naome-cli/Cargo.toml +1 -1
- package/crates/naome-cli/src/main.rs +110 -13
- package/crates/naome-core/Cargo.toml +1 -1
- package/crates/naome-core/src/decision.rs +82 -11
- package/crates/naome-core/src/git.rs +12 -1
- package/crates/naome-core/src/harness_health.rs +3 -1
- package/crates/naome-core/src/install_plan.rs +8 -3
- package/crates/naome-core/src/intent.rs +914 -0
- package/crates/naome-core/src/journal.rs +169 -0
- package/crates/naome-core/src/lib.rs +10 -1
- package/crates/naome-core/src/models.rs +63 -4
- package/crates/naome-core/src/route.rs +1000 -0
- package/crates/naome-core/src/task_state.rs +326 -21
- package/crates/naome-core/tests/decision.rs +8 -6
- package/crates/naome-core/tests/install_plan.rs +12 -3
- package/crates/naome-core/tests/intent.rs +826 -0
- package/crates/naome-core/tests/route.rs +1108 -0
- package/crates/naome-core/tests/task_state.rs +63 -4
- package/native/darwin-arm64/naome +0 -0
- package/native/linux-x64/naome +0 -0
- package/package.json +1 -1
- package/templates/naome-root/.naome/bin/check-harness-health.js +7 -6
- package/templates/naome-root/.naome/bin/check-task-state.js +7 -6
- package/templates/naome-root/.naome/bin/naome.js +143 -13
- package/templates/naome-root/.naome/manifest.json +8 -7
- package/templates/naome-root/.naome/upgrade-state.json +1 -1
- package/templates/naome-root/AGENTS.md +30 -5
- package/templates/naome-root/docs/naome/agent-workflow.md +45 -24
- package/templates/naome-root/docs/naome/execution.md +55 -51
- package/templates/naome-root/docs/naome/index.md +10 -3
|
@@ -6,17 +6,8 @@ Use this protocol before starting or completing normal feature work.
|
|
|
6
6
|
|
|
7
7
|
Read `.naome/task-state.json` before accepting a new user task.
|
|
8
8
|
|
|
9
|
-
Before accepting feature work, run
|
|
10
|
-
|
|
11
|
-
```sh
|
|
12
|
-
node .naome/bin/check-harness-health.js
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Then run:
|
|
16
|
-
|
|
17
|
-
```sh
|
|
18
|
-
node .naome/bin/check-task-state.js --admission
|
|
19
|
-
```
|
|
9
|
+
Before accepting feature work, run `node .naome/bin/check-harness-health.js`,
|
|
10
|
+
then `node .naome/bin/check-task-state.js --admission`.
|
|
20
11
|
|
|
21
12
|
You may start new feature work only when harness health and admission both pass.
|
|
22
13
|
If health fails, ask the user to choose `repair_harness`,
|
|
@@ -31,36 +22,53 @@ Also read `.naome/upgrade-state.json`. If upgrade status is
|
|
|
31
22
|
`needs_agent_upgrade`, do not start feature work. Finish `upgrade.md` first.
|
|
32
23
|
|
|
33
24
|
Task Control validates the real git diff. After installing or upgrading NAOME,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
25
|
+
normal feature work waits until setup is baselined. Admission also fails for
|
|
26
|
+
previous-task, setup, upgrade, or other unowned changes in the git diff.
|
|
27
|
+
|
|
28
|
+
Prompt intent routing is machine policy, not agent guesswork. When a user asks
|
|
29
|
+
for work while task/setup/unowned diff exists, run
|
|
30
|
+
`node .naome/bin/naome.js route --prompt-file <path> --execute --json`.
|
|
31
|
+
Follow `policyAction`, `userMessage`, `humanOptions`, `requiredContext`, and
|
|
32
|
+
`canCreateTask`. If route returns `taskRoot` different from the current
|
|
33
|
+
directory, continue the task from that path and leave the original worktree
|
|
34
|
+
untouched. Route performs valid automatic baselines, can create isolated task
|
|
35
|
+
worktrees around unrelated user edits, and reruns admission when policy allows,
|
|
36
|
+
so agents do not ask for internal baseline decisions on normal auto paths.
|
|
37
|
+
Pure deterministic harness refresh diffs are baselined in the current worktree
|
|
38
|
+
before new task creation; they do not create isolated repair-loop worktrees.
|
|
39
|
+
|
|
40
|
+
When admission fails because the git diff is dirty, run route before presenting
|
|
41
|
+
choices. Surface human choices only when route returns non-empty
|
|
42
|
+
`humanOptions`; examples are harness repair, completed task, install, upgrade,
|
|
43
|
+
review, revise, cancel, or manual baseline decisions.
|
|
44
|
+
|
|
45
|
+
For unowned user changes, NAOME does not offer a generic commit-or-clear action.
|
|
46
|
+
Route may create an isolated task worktree for a new task while leaving those
|
|
47
|
+
edits untouched. If the prompt asks to commit or clear unowned changes, NAOME
|
|
48
|
+
blocks deprecated generic options instead of mutating the repository. If the
|
|
49
|
+
user explicitly asks to commit their current changes, route may run the
|
|
50
|
+
configured user-diff quality gate. The gate uses the committed verification
|
|
51
|
+
profile, requires quality coverage for every changed path, reruns checks until
|
|
52
|
+
the diff stabilizes, rejects new or missing changed paths, and rechecks the
|
|
53
|
+
final diff before committing only the evaluated path set. If any required check
|
|
54
|
+
fails, no commit is created. Agents must not translate any blocker into plain
|
|
55
|
+
`git add`, raw `git commit`, IDE commit, or hook bypass commands.
|
|
56
|
+
|
|
57
|
+
When the dirty diff is a deterministic harness refresh plus unrelated user
|
|
58
|
+
edits, repair intent may baseline only the harness refresh. It must not stage,
|
|
59
|
+
clear, or commit unrelated user paths.
|
|
60
|
+
|
|
61
|
+
Do not commit NAOME install or upgrade changes unless route returns an automatic
|
|
62
|
+
setup baseline policy or the user explicitly chooses a manual setup baseline.
|
|
63
|
+
Commit only NAOME install or upgrade files.
|
|
52
64
|
|
|
53
65
|
If `status` is `planning`, `implementing`, `revising`, `verifying`,
|
|
54
66
|
`needs_human_review`, or `blocked`, do not start the new task. Explain the
|
|
55
67
|
active blocker, list the exact human options from `blocker.humanOptions`, and
|
|
56
68
|
ask the user to resolve it first.
|
|
57
69
|
|
|
58
|
-
Allowed meta-actions while blocked:
|
|
59
|
-
|
|
60
|
-
- show the blocker
|
|
61
|
-
- approve a listed human option
|
|
62
|
-
- request a smaller diff
|
|
63
|
-
- cancel or mark the active task blocked
|
|
70
|
+
Allowed meta-actions while blocked: show the blocker, approve a listed human
|
|
71
|
+
option, request a smaller diff, or cancel/mark the active task blocked.
|
|
64
72
|
|
|
65
73
|
## Revisions
|
|
66
74
|
|
|
@@ -106,11 +114,8 @@ NAOME control state, not task work.
|
|
|
106
114
|
|
|
107
115
|
## Progress Check
|
|
108
116
|
|
|
109
|
-
While a task is `planning`, `implementing`, `revising`, or `verifying`, use
|
|
110
|
-
|
|
111
|
-
```sh
|
|
112
|
-
node .naome/bin/check-task-state.js --progress
|
|
113
|
-
```
|
|
117
|
+
While a task is `planning`, `implementing`, `revising`, or `verifying`, use
|
|
118
|
+
`node .naome/bin/check-task-state.js --progress`.
|
|
114
119
|
|
|
115
120
|
This validates the active task shape, admission record, check IDs, existing
|
|
116
121
|
proof entries, and current diff scope without requiring completion proof. Use
|
|
@@ -156,17 +161,11 @@ between `activeTask.admission.gitHead` and current `HEAD`. The checker uses
|
|
|
156
161
|
that historical task diff after the working tree is clean, so completed task
|
|
157
162
|
state can stay committed without requiring the deleted file to exist.
|
|
158
163
|
|
|
159
|
-
If the check passes but prints a next-task admission notice,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
- `
|
|
163
|
-
|
|
164
|
-
task-state diff.
|
|
165
|
-
- `review_task_diff`: summarize the completed task diff and wait.
|
|
166
|
-
- `request_task_changes`: keep the task open for follow-up changes.
|
|
167
|
-
- `cancel_task_changes`: leave the diff unresolved and do not start new work.
|
|
168
|
-
|
|
169
|
-
Do not start another feature task until one option is resolved.
|
|
164
|
+
If the check passes but prints a next-task admission notice, keep the final
|
|
165
|
+
handoff short: say the task is complete and verified, and use NAOME route/status
|
|
166
|
+
`userMessage` for the next step. Do not list internal baseline options unless
|
|
167
|
+
route returns non-empty `humanOptions`, automatic baselining fails, or the user
|
|
168
|
+
explicitly asks to review, revise, cancel, or commit manually.
|
|
170
169
|
|
|
171
170
|
## Git Reconciliation
|
|
172
171
|
|
|
@@ -182,6 +181,11 @@ commits or pushes outside NAOME, do not assume the harness is broken:
|
|
|
182
181
|
The installed git hooks run commit and push gates, but hooks are guardrails, not
|
|
183
182
|
the source of truth. Checks must still recover from manual Git operations.
|
|
184
183
|
|
|
184
|
+
Completed task history is also written to the local-only
|
|
185
|
+
`.naome/task-journal.jsonl` when NAOME commit/route baselines a task or when
|
|
186
|
+
route reconciles a clean externally committed completed task. The journal is
|
|
187
|
+
machine-owned working memory and should stay out of project commits.
|
|
188
|
+
|
|
185
189
|
## Prompt Records
|
|
186
190
|
|
|
187
191
|
`request` is a compact working summary. `userPrompt.text` is the exact user
|
|
@@ -33,6 +33,8 @@ for the current step.
|
|
|
33
33
|
|
|
34
34
|
Do not load every NAOME document by default. Start from this index, then open the
|
|
35
35
|
smallest set of files needed for the task.
|
|
36
|
+
Do not search for generic root `ARCHITECTURE.md` or `docs/index.md` files unless
|
|
37
|
+
this repository's NAOME docs explicitly reference them.
|
|
36
38
|
|
|
37
39
|
## Proof Rule
|
|
38
40
|
|
|
@@ -42,9 +44,14 @@ report the exact command and result.
|
|
|
42
44
|
|
|
43
45
|
## Task Control Rule
|
|
44
46
|
|
|
45
|
-
Use `naome
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
Use `naome route --prompt-file <path> --execute --json` or
|
|
48
|
+
`node .naome/bin/naome.js route --prompt-file <path> --execute --json` for
|
|
49
|
+
natural-language work requests. Route returns the deterministic next decision,
|
|
50
|
+
human-facing `userMessage`, `humanOptions`, and `requiredContext`. Use
|
|
51
|
+
`naome explain --prompt-file <path> --json` only for debugging why a policy won.
|
|
52
|
+
Use `naome status` or `node .naome/bin/naome.js status` to report state without
|
|
53
|
+
routing a request. Use `execution.md` and `.naome/task-state.json` before
|
|
54
|
+
starting new work and before claiming completion. First run
|
|
48
55
|
`node .naome/bin/check-harness-health.js`, then run
|
|
49
56
|
`node .naome/bin/check-task-state.js --admission` before accepting feature work.
|
|
50
57
|
If either check fails, do not accept a new feature task until the user resolves
|