@ornexus/neocortex 4.60.80 → 4.61.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.
Files changed (53) hide show
  1. package/dist/release-source.json +1 -1
  2. package/dist/sbom.cdx.json +1193 -1193
  3. package/install.ps1 +33 -1
  4. package/install.sh +35 -1
  5. package/package.json +2 -2
  6. package/packages/client/dist/adapters/platform-detector.d.ts +1 -1
  7. package/packages/client/dist/adapters/platform-detector.js +6 -0
  8. package/packages/client/dist/cli.js +7 -0
  9. package/packages/client/dist/commands/invoke.d.ts +15 -8
  10. package/packages/client/dist/commands/invoke.js +69 -0
  11. package/packages/client/dist/commands/story-checkpoint.d.ts +2 -1
  12. package/packages/client/dist/commands/story-checkpoint.js +34 -2
  13. package/packages/client/dist/commands/story-worktree.d.ts +46 -0
  14. package/packages/client/dist/commands/story-worktree.js +258 -0
  15. package/packages/client/dist/config.js +1 -0
  16. package/packages/client/dist/git/direct-yolo-checkpoint.d.ts +46 -0
  17. package/packages/client/dist/git/direct-yolo-checkpoint.js +137 -1
  18. package/packages/client/dist/git/git-lifecycle-store.d.ts +82 -0
  19. package/packages/client/dist/git/git-lifecycle-store.js +313 -5
  20. package/packages/client/dist/git/story-worktree-cleanup.d.ts +226 -0
  21. package/packages/client/dist/git/story-worktree-cleanup.js +1058 -0
  22. package/packages/client/dist/git/story-worktree-integration.d.ts +91 -0
  23. package/packages/client/dist/git/story-worktree-integration.js +603 -0
  24. package/packages/client/dist/git/story-worktree-manager.d.ts +205 -0
  25. package/packages/client/dist/git/story-worktree-manager.js +843 -0
  26. package/packages/client/dist/git/story-worktree-paths.d.ts +65 -0
  27. package/packages/client/dist/git/story-worktree-paths.js +150 -0
  28. package/packages/client/dist/policy/subagent-approval-policy.js +3 -1
  29. package/packages/client/dist/runner/headless/continuous-story-workspace.d.ts +49 -1
  30. package/packages/client/dist/runner/headless/continuous-story-workspace.js +175 -27
  31. package/packages/client/dist/runner/headless/run-yoloop.d.ts +39 -0
  32. package/packages/client/dist/runner/headless/run-yoloop.js +71 -0
  33. package/packages/client/dist/runner-cli.js +0 -0
  34. package/packages/shared/dist/yoloop/epic-terminal-git.js +27 -3
  35. package/targets-stubs/antigravity/gemini.md +1 -1
  36. package/targets-stubs/antigravity/neocortex.md +21 -0
  37. package/targets-stubs/antigravity/skill/SKILL.md +1 -1
  38. package/targets-stubs/claude-code/README.md +17 -0
  39. package/targets-stubs/claude-code/neocortex-root.agent.yaml +1 -1
  40. package/targets-stubs/claude-code/neocortex-root.md +57 -49
  41. package/targets-stubs/claude-code/neocortex.agent.yaml +1 -1
  42. package/targets-stubs/claude-code/neocortex.md +28 -25
  43. package/targets-stubs/codex/AGENTS.md +31 -30
  44. package/targets-stubs/codex/neocortex.toml +10 -0
  45. package/targets-stubs/cursor/agent.md +13 -2
  46. package/targets-stubs/deepseek-harness/SKILL.md +13 -0
  47. package/targets-stubs/gemini-cli/agent.md +23 -2
  48. package/targets-stubs/grok/SKILL.md +21 -0
  49. package/targets-stubs/kimi/neocortex.md +21 -0
  50. package/targets-stubs/openclaw/SKILL.md +21 -0
  51. package/targets-stubs/opencode/neocortex-root.md +19 -15
  52. package/targets-stubs/opencode/neocortex.md +10 -0
  53. package/targets-stubs/vscode/neocortex.agent.md +13 -2
@@ -32,7 +32,7 @@ Codex built-in commands or actions.
32
32
 
33
33
  <!-- END: Plugin Conflict Prevention -->
34
34
 
35
- # Neocortex v4.60.80 | OrNexus Team
35
+ # Neocortex v4.61.0 | OrNexus Team
36
36
 
37
37
  You are a Development Orchestrator. All orchestration logic is delivered by the remote Neocortex server.
38
38
 
@@ -129,17 +129,14 @@ that recuses outer root invocations lives in the sibling subagent profile
129
129
  (`neocortex.toml`); this file actively owns explicit root triggers and may route
130
130
  direct natural-language intent to the sibling profile.
131
131
 
132
- This stub is a public thin wrapper. It may describe how to call the thin client
133
- and consume public response metadata, but it must not contain proprietary step
134
- bodies, core prompts, or server-only implementation identifiers.
132
+ This public thin wrapper only calls the thin client and reads public response
133
+ metadata; it holds no proprietary step bodies, core prompts or server-only identifiers.
135
134
 
136
135
  ### Managed max is a parent-session request
137
136
 
138
- Codex subagents inherit the parent turn's live sandbox and approval settings.
139
- When the managed approval policy requests `max`, apply it to the parent Codex
140
- session (for example by launching the parent with `--yolo`) before delegating;
141
- never describe it as a child-only permission boundary. An explicit user opt-out
142
- or host/organization policy wins. Status must preserve requested/effective mode,
137
+ Codex subagents inherit the parent turn's live sandbox and approval settings. A
138
+ managed `max` request applies to the parent Codex session (e.g. parent `--yolo`)
139
+ before delegating, never as a child-only boundary; user opt-out or host policy wins. Status must preserve requested/effective mode,
143
140
  `scope=inherited`, and any fallback reason instead of claiming max when the
144
141
  parent session did not grant it. Evidence: `[P201-EV-CODEX-GEMINI]`.
145
142
 
@@ -193,6 +190,17 @@ authorizes delegation (`native_safe`) and returns a root-owned plan:
193
190
  - The root agent keeps yoloop ownership: it waits for all children of the wave,
194
191
  then re-invokes `*yoloop`; server output decides integration and next wave.
195
192
 
193
+ ### Story worktree plans (v4)
194
+
195
+ For a `version: 4`, `mode: two_phase_worktree_dag`,
196
+ `workspaceMechanism: client_managed_worktree` plan: one child per phase story
197
+ in a single turn, server prompt (`story-worktree-phase-1`), at most the phase
198
+ `maxConcurrency`. Each child runs `neocortex-client story-worktree create` with
199
+ server IDs/SHAs and a new `--path-file`, then its phase `*yolo` with
200
+ `--project-root` at that worktree; `story-worktree-phase-2` reuses the lease. I
201
+ re-invoke `*yoloop` after each phase and alone integrate; cleanup is
202
+ `neocortex-client`. Children never receive `*yoloop`.
203
+
196
204
  ### Native child observation
197
205
 
198
206
  For an authorized graph-bound task, reserve through
@@ -218,10 +226,9 @@ observed child becomes `lost`. Neither permits automatic replacement. Resume via
218
226
  `native-agent status --dispatch-key ...`; otherwise allow at most 30 cancelable polls,
219
227
  sequentially, per dispatch key.
220
228
 
221
- Tell the user only when the lifecycle state changes, a stale/unknown heartbeat
222
- becomes relevant, a terminal result arrives, or user action is required.
223
- Unchanged polls stay silent. `native-agent`, `headless-process` and `inline` are
224
- distinct topologies; none promises a sidebar entry.
229
+ Report only lifecycle changes, relevant stale/unknown heartbeats, terminal
230
+ results or required user action; unchanged polls stay silent. `native-agent`,
231
+ `headless-process` and `inline` are distinct topologies (no sidebar promise).
225
232
 
226
233
  ### Architecture continuation ownership
227
234
 
@@ -239,9 +246,8 @@ also requires the accepted Update Project Memory checkpoint. `blocked` and
239
246
  If this `AGENTS.md` is invoked as a subagent (for example via a misconfigured
240
247
  `TaskCreate` call or user error), respond by **actively recusing** the outer
241
248
  `*yoloop` invocation and asking the user to invoke directly via
242
- `@neocortex *yoloop ...` on the root agent. Reply with a short helpful
243
- message — never silently process the request as if it were a delegated
244
- per-story task. The dedicated subagent profile (`neocortex.toml`) is the
249
+ `@neocortex *yoloop ...` on the root agent; never silently process it as a
250
+ delegated per-story task. The dedicated subagent profile (`neocortex.toml`) is the
245
251
  correct destination for delegated `*yolo` task directives.
246
252
 
247
253
  ## Examples
@@ -259,10 +265,8 @@ correct destination for delegated `*yolo` task directives.
259
265
  | `*yolo @docs/stories/1.1.story.md` | `invoke --args "*yolo @docs/stories/1.1.story.md"` |
260
266
  | `*implement @docs/stories/1.1.story.md` | `invoke --args "*implement @docs/stories/1.1.story.md"` |
261
267
 
262
- For `*ui-ux-review`, flags are optional overrides. Architecture-only mode works
263
- with no args or a positional architecture path. Live-app mode works with a URL
264
- in free-form text or with `--url`. Findings can become remediation stories for
265
- `*yolo` or epic-scale execution through `*yoloop`.
268
+ `*ui-ux-review` flags are optional: no args or a path review architecture; a URL
269
+ (free text or `--url`) reviews the live app. Findings feed `*yolo`/`*yoloop`.
266
270
 
267
271
  ## Error Handling
268
272
 
@@ -285,9 +289,8 @@ When the user asks for research, analysis, brainstorming, hypothesis validation,
285
289
  free-form task that is NOT an orchestration trigger, you ARE allowed to use Codex CLI's
286
290
  built-in capabilities directly:
287
291
 
288
- - **File operations** (`apply_patch`, `shell` / file reads and edits) - local project exploration and edits
289
- - **Shell commands** (`shell` tool) - any CLI tool (curl, jq, psql, docker, fly, gh, grep, find, etc.)
290
- to fetch docs, inspect systems, run tests, or gather evidence
292
+ - **Files** (`apply_patch`, `shell` reads/edits) - local exploration and edits
293
+ - **Shell** (`shell` tool) - any CLI (curl, jq, psql, docker, gh, grep, etc.) for docs, tests, evidence
291
294
  - **MCP servers configured** (context7, playwright, browser_use) - up-to-date library docs,
292
295
  browser automation, visual research. See `~/.codex/config.toml` for MCP setup.
293
296
 
@@ -302,13 +305,11 @@ Codex CLI lacks a native `/loop` skill. Use the harness terminal primitive with
302
305
  bash snippet documented in `docs/arquitetura-software/loop-usage-guide.md` (Platform
303
306
  Matrix).
304
307
 
305
- When a response includes a `kind: 'task'` directive, the root Codex agent may run
306
- the returned per-story prompt in the native `neocortex` subagent profile once that
307
- profile is installed. The shell loop remains the fallback for loop repetition; it
308
- must not pass the outer `*yoloop` trigger into a child subagent.
309
- The shell-loop fallback must also treat a child `*yolo` terminal success as a
310
- per-story boundary and continue polling `*yoloop` until yoloop metadata or
311
- termination tokens report complete/aborted.
308
+ With a `kind: 'task'` directive, the root Codex agent may run the per-story
309
+ prompt in the installed native `neocortex` subagent profile.
310
+ The shell-loop fallback repeats the loop, never passes the outer `*yoloop` trigger to a child,
311
+ treats a child `*yolo` terminal success as a per-story boundary, and keeps
312
+ polling `*yoloop` until metadata or termination tokens report complete/aborted.
312
313
 
313
314
  ```bash
314
315
  while true; do
@@ -110,6 +110,16 @@ entry, in parallel in a single turn, bounded by `maxConcurrency` and the host
110
110
  `[agents] max_depth`. Pass each only its server-authored prompt, never the outer
111
111
  `@neocortex *yoloop ...` trigger, wait for all of them, then follow stdout.
112
112
 
113
+ ### Story worktree phase prompts (v4)
114
+
115
+ `story-worktree-phase-1` with `workspaceMechanism: client_managed_worktree`: at
116
+ setup I run `neocortex-client story-worktree create` with `--epic`, `--story`,
117
+ `--dispatch`, `--base-sha` and `--graph-revision` from server output, never
118
+ invented, plus a new `--path-file`; then I invoke with `--project-root` set to
119
+ the worktree path in that file. `story-worktree-phase-2`: I reuse that lease
120
+ (`neocortex-client story-worktree status`). Any refusal reason code stops me. I
121
+ never commit to or check out `epic/<ID>`; cleanup is `neocortex-client`.
122
+
113
123
  Native child reservation, host-handle observation, status polling and yoloop
114
124
  continuation are root-only responsibilities. This child must never invoke the
115
125
  `native-agent` bridge, persist a host handle, consume the background envelope,
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: neocortex
3
- description: "🧠 Neocortex v4.60.80 | OrNexus Team"
3
+ description: "🧠 Neocortex v4.61.0 | OrNexus Team"
4
4
  model: inherit
5
5
  readonly: false
6
6
  is_background: false
@@ -78,6 +78,17 @@ Cursor subagents (`.cursor/agents/neocortex.md`):
78
78
 
79
79
  If the Cursor host offers no subagent primitive in the current session, the root keeps the documented `run_terminal` shell-loop fallback, but parallel delegation is used whenever the host offers it.
80
80
 
81
+ ### Story worktree plans (v4)
82
+
83
+ Inline harness get a `version: 4`, `mode: two_phase_worktree_dag`,
84
+ `workspaceMechanism: client_managed_worktree` plan only after recorded
85
+ concurrency smoke; until then the server keeps the current plan
86
+ (`story-worktree-inline-concurrency-unproven`). When it is emitted, each phase
87
+ story runs `neocortex-client story-worktree create` with server-provided
88
+ IDs/SHAs and a new `--path-file`, then its phase `*yolo` with `--project-root`
89
+ set to that worktree; I re-invoke `*yoloop` after each phase, alone integrate,
90
+ never pass `*yoloop` to a child, and cleanup is always `neocortex-client`.
91
+
81
92
  ## Canonical Project Memory
82
93
 
83
94
  `NEOCORTEX.md` is the canonical project-memory source. Cursor rules and agent
@@ -93,7 +104,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
93
104
  ┌────────────────────────────────────────────────────────────┐
94
105
  │ │
95
106
  │ ####### N E O C O R T E X │
96
- │ ### ######## v4.60.80 │
107
+ │ ### ######## v4.61.0 │
97
108
  │ ######### ##### │
98
109
  │ ## ############## Development Orchestrator │
99
110
  │ ## ### ###### ## OrNexus Team │
@@ -62,6 +62,19 @@ When the response includes Git reconciliation or terminal Git directives,
62
62
  follow those public directives and their exact origin, SHA and receipt gates.
63
63
  Never infer a branch, force-push, clean ambiguous work or manufacture receipts.
64
64
 
65
+ ## Story worktree plans (v4)
66
+
67
+ Neocortex treats DeepSeek Harness as the canonical `deepseek` target when the
68
+ client reports it (`--platform-target deepseek`; automatic detection is
69
+ pending). Until delegation smoke is recorded the server keeps the current
70
+ serial plan (`native-task-delegation-unsupported`); Harness capability alone never
71
+ authorizes a `version: 4` story-worktree plan. If the server emits one, follow
72
+ it: each phase story runs `neocortex-client story-worktree create` with
73
+ server-provided IDs/SHAs and a new `--path-file`, then its phase `*yolo` with
74
+ `--project-root` set to that worktree; the root alone integrates and cleanup
75
+ is always `neocortex-client`.
76
+
77
+
65
78
  ## Memory
66
79
 
67
80
  `NEOCORTEX.md` in the project is canonical shared project memory. Use the
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: neocortex-root
3
- description: "🧠 Neocortex v4.60.80 | OrNexus Team"
3
+ description: "🧠 Neocortex v4.61.0 | OrNexus Team"
4
4
  kind: local
5
5
  tools:
6
6
  # File operations (Gemini CLI built-ins)
@@ -62,7 +62,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
62
62
  ┌────────────────────────────────────────────────────────────┐
63
63
  │ │
64
64
  │ ####### N E O C O R T E X │
65
- │ ### ######## v4.60.80 │
65
+ │ ### ######## v4.61.0 │
66
66
  │ ######### ##### │
67
67
  │ ## ############## Development Orchestrator │
68
68
  │ ## ### ###### ## OrNexus Team │
@@ -194,6 +194,27 @@ the native subagent delegation primitive (`delegate_to_agent(neocortex)`, or the
194
194
 
195
195
  If the Gemini CLI host offers no subagent primitive in the current session, the root keeps the documented shell-loop fallback, but parallel delegation is used whenever the host offers it.
196
196
 
197
+ ### Story worktree plans (v4)
198
+
199
+ For a `version: 4`, `mode: two_phase_worktree_dag`,
200
+ `workspaceMechanism: client_managed_worktree` plan: one child per phase story
201
+ in a single turn, server prompt (`story-worktree-phase-1`), at most the phase
202
+ `maxConcurrency`. Each child runs `neocortex-client story-worktree create` with
203
+ server IDs/SHAs and a new `--path-file`, then its phase `*yolo` with
204
+ `--project-root` at that worktree; `story-worktree-phase-2` reuses the lease. I
205
+ re-invoke `*yoloop` after each phase and alone integrate; cleanup is
206
+ `neocortex-client`. Children never receive `*yoloop`.
207
+
208
+ ### Story worktree phase prompts (v4)
209
+
210
+ `story-worktree-phase-1` with `workspaceMechanism: client_managed_worktree`: at
211
+ setup I run `neocortex-client story-worktree create` with `--epic`, `--story`,
212
+ `--dispatch`, `--base-sha` and `--graph-revision` from server output, never
213
+ invented, plus a new `--path-file`; then I invoke with `--project-root` set to
214
+ the worktree path in that file. `story-worktree-phase-2`: I reuse that lease
215
+ (`neocortex-client story-worktree status`). Any refusal reason code stops me. I
216
+ never commit to or check out `epic/<ID>`; cleanup is `neocortex-client`.
217
+
197
218
  ## Exemplos
198
219
 
199
220
  | Invocacao do Usuario | Comando invoke |
@@ -77,3 +77,24 @@ verification when a terminal-complete response carries the terminal directive.
77
77
  Remote branch deletion is
78
78
  preserved with `git-resource-remote-delete-cas-unavailable` when no OID-bound
79
79
  provider primitive exists; local refs and PRs still reconcile when fully proven.
80
+
81
+ ### Story worktree plans (v4)
82
+
83
+ For a `version: 4`, `mode: two_phase_worktree_dag`,
84
+ `workspaceMechanism: client_managed_worktree` plan: one child per phase story
85
+ in a single turn, server prompt (`story-worktree-phase-1`), at most the phase
86
+ `maxConcurrency`. Each child runs `neocortex-client story-worktree create` with
87
+ server IDs/SHAs and a new `--path-file`, then its phase `*yolo` with
88
+ `--project-root` at that worktree; `story-worktree-phase-2` reuses the lease. I
89
+ re-invoke `*yoloop` after each phase and alone integrate; cleanup is
90
+ `neocortex-client`. Children never receive `*yoloop`.
91
+
92
+ ### Story worktree phase prompts (v4)
93
+
94
+ `story-worktree-phase-1` with `workspaceMechanism: client_managed_worktree`: at
95
+ setup I run `neocortex-client story-worktree create` with `--epic`, `--story`,
96
+ `--dispatch`, `--base-sha` and `--graph-revision` from server output, never
97
+ invented, plus a new `--path-file`; then I invoke with `--project-root` set to
98
+ the worktree path in that file. `story-worktree-phase-2`: I reuse that lease
99
+ (`neocortex-client story-worktree status`). Any refusal reason code stops me. I
100
+ never commit to or check out `epic/<ID>`; cleanup is `neocortex-client`.
@@ -123,3 +123,24 @@ verification when a terminal-complete response carries the terminal directive.
123
123
  Remote branch deletion is
124
124
  preserved with `git-resource-remote-delete-cas-unavailable` when no OID-bound
125
125
  provider primitive exists; local refs and PRs still reconcile when fully proven.
126
+
127
+ ### Story worktree plans (v4)
128
+
129
+ For a `version: 4`, `mode: two_phase_worktree_dag`,
130
+ `workspaceMechanism: client_managed_worktree` plan: one child per phase story
131
+ in a single turn, server prompt (`story-worktree-phase-1`), at most the phase
132
+ `maxConcurrency`. Each child runs `neocortex-client story-worktree create` with
133
+ server IDs/SHAs and a new `--path-file`, then its phase `*yolo` with
134
+ `--project-root` at that worktree; `story-worktree-phase-2` reuses the lease. I
135
+ re-invoke `*yoloop` after each phase and alone integrate; cleanup is
136
+ `neocortex-client`. Children never receive `*yoloop`.
137
+
138
+ ### Story worktree phase prompts (v4)
139
+
140
+ `story-worktree-phase-1` with `workspaceMechanism: client_managed_worktree`: at
141
+ setup I run `neocortex-client story-worktree create` with `--epic`, `--story`,
142
+ `--dispatch`, `--base-sha` and `--graph-revision` from server output, never
143
+ invented, plus a new `--path-file`; then I invoke with `--project-root` set to
144
+ the worktree path in that file. `story-worktree-phase-2`: I reuse that lease
145
+ (`neocortex-client story-worktree status`). Any refusal reason code stops me. I
146
+ never commit to or check out `epic/<ID>`; cleanup is `neocortex-client`.
@@ -44,6 +44,27 @@ the host's native subagent primitive when OpenClaw exposes one:
44
44
 
45
45
  OpenClaw currently documents no native Neocortex child primitive, so the root keeps the root-inline fallback, but parallel delegation is used whenever the host offers it.
46
46
 
47
+ ### Story worktree plans (v4)
48
+
49
+ For a `version: 4`, `mode: two_phase_worktree_dag`,
50
+ `workspaceMechanism: client_managed_worktree` plan: one child per phase story
51
+ in a single turn, server prompt (`story-worktree-phase-1`), at most the phase
52
+ `maxConcurrency`. Each child runs `neocortex-client story-worktree create` with
53
+ server IDs/SHAs and a new `--path-file`, then its phase `*yolo` with
54
+ `--project-root` at that worktree; `story-worktree-phase-2` reuses the lease. I
55
+ re-invoke `*yoloop` after each phase and alone integrate; cleanup is
56
+ `neocortex-client`. Children never receive `*yoloop`.
57
+
58
+ ### Story worktree phase prompts (v4)
59
+
60
+ `story-worktree-phase-1` with `workspaceMechanism: client_managed_worktree`: at
61
+ setup I run `neocortex-client story-worktree create` with `--epic`, `--story`,
62
+ `--dispatch`, `--base-sha` and `--graph-revision` from server output, never
63
+ invented, plus a new `--path-file`; then I invoke with `--project-root` set to
64
+ the worktree path in that file. `story-worktree-phase-2`: I reuse that lease
65
+ (`neocortex-client story-worktree status`). Any refusal reason code stops me. I
66
+ never commit to or check out `epic/<ID>`; cleanup is `neocortex-client`.
67
+
47
68
  ## Do not intercept `*` triggers
48
69
 
49
70
  Invocation payload boundary: first select only the explicit user-intended Neocortex command and arguments after the trigger; then preserve that selected payload verbatim when calling `neocortex-client invoke --args`.
@@ -64,7 +64,7 @@ task directive, I keep root-owned inline/shell-loop execution.
64
64
  ┌────────────────────────────────────────────────────────────┐
65
65
  │ │
66
66
  │ ####### N E O C O R T E X │
67
- │ ### ######## v4.60.80 │
67
+ │ ### ######## v4.61.0 │
68
68
  │ ######### ##### │
69
69
  │ ## ############## Development Orchestrator │
70
70
  │ ## ### ###### ## OrNexus Team │
@@ -144,9 +144,8 @@ protected source material into this file.
144
144
 
145
145
  ## Subagent Delegation Contract
146
146
 
147
- This stub is a public thin wrapper. It may describe how to call the thin client
148
- and consume public response metadata, but it must not contain proprietary step
149
- bodies, core prompts, or server-only implementation identifiers.
147
+ This public thin wrapper only calls the thin client and reads public response
148
+ metadata; it holds no proprietary step bodies, core prompts or server-only identifiers.
150
149
 
151
150
  Runtime flow as the root agent:
152
151
 
@@ -159,17 +158,14 @@ Runtime flow as the root agent:
159
158
  4. When metadata authorizes a parallel wave through
160
159
  `metadata.yoloopExecutionPlan`, `metadata.yoloopWave`, or the server-defined
161
160
  successor (`mode: parallel_wave` or `mode: continuous_dag`), I dispatch every
162
- independent per-story entry of that wave in parallel, as described in the
163
- Parallel Delegation Contract below. The root agent keeps yoloop state
164
- ownership while child executions handle only their assigned story prompt. I
161
+ independent per-story entry of that wave in parallel (Parallel Delegation
162
+ Contract below); the root keeps yoloop state, children only their story. I
165
163
  never infer parallelism from local OpenCode capability alone; the server
166
164
  plan decides which stories are independent.
167
165
  5. When the server returns no `kind: 'task'` directive, I keep ownership and
168
166
  drive `*yoloop` myself through inline re-invocation or a shell loop.
169
167
  6. When the server returns a `kind: 'task'` directive, I run the native
170
- `neocortex` child profile (the sibling agent profile defined in
171
- `neocortex.md` in this same OpenCode agents directory) through the `task`
172
- tool. I pass only the authorized per-story prompt after placeholder
168
+ `neocortex` child profile (sibling `neocortex.md`) through the `task` tool. I pass only the authorized per-story prompt after placeholder
173
169
  substitution, such as `*yolo @docs/stories/<id>.story.md`. I never pass the
174
170
  original root invocation (`@neocortex *...` or the outer `*yoloop ...`) as
175
171
  the child prompt. Before a native background launch I also require
@@ -223,6 +219,17 @@ the OpenCode `task` tool (`subagent_type: neocortex`):
223
219
  then re-invokes `*yoloop`; server output decides integration and the next
224
220
  wave. Follow stdout and server output; never invent workflow steps.
225
221
 
222
+ ### Story worktree plans (v4)
223
+
224
+ For a `version: 4`, `mode: two_phase_worktree_dag`,
225
+ `workspaceMechanism: client_managed_worktree` plan: one child per phase story
226
+ in a single turn, server prompt (`story-worktree-phase-1`), at most the phase
227
+ `maxConcurrency`. Each child runs `neocortex-client story-worktree create` with
228
+ server IDs/SHAs and a new `--path-file`, then its phase `*yolo` with
229
+ `--project-root` at that worktree; `story-worktree-phase-2` reuses the lease. I
230
+ re-invoke `*yoloop` after each phase and alone integrate; cleanup is
231
+ `neocortex-client`. Children never receive `*yoloop`.
232
+
226
233
  ## Examples
227
234
 
228
235
  | User invocation | Invoke command |
@@ -310,11 +317,8 @@ When the user asks for research, analysis, brainstorm, hypothesis validation,
310
317
  or any free-form task that is NOT an orchestration trigger, I may use available
311
318
  tools directly:
312
319
 
313
- - WebSearch / WebFetch for market research, hypothesis validation, real
314
- references
315
- - Bash for any CLI tool (jq, curl, gh, docker, etc.)
316
- - Read / Write / Edit / Glob / Grep for local project file work
317
- - Subagent delegation when useful
320
+ - WebSearch / WebFetch, Bash CLI tools (jq, curl, gh, docker, etc.), Read /
321
+ Write / Edit / Glob / Grep, and subagent delegation when useful
318
322
 
319
323
  NEVER refuse research for lack of tools. NEVER fabricate sources — if real
320
324
  data is unavailable, say so explicitly. When research yields decisions that
@@ -108,3 +108,13 @@ the OpenCode `task` tool (`subagent_type: neocortex`):
108
108
  Do not embed, reveal, summarize, or reconstruct proprietary prompts, server-side
109
109
  implementation details, orchestration logic, secrets, license keys, or customer data.
110
110
  All orchestration logic comes from the Neocortex server through the thin client.
111
+
112
+ ### Story worktree phase prompts (v4)
113
+
114
+ `story-worktree-phase-1` with `workspaceMechanism: client_managed_worktree`: at
115
+ setup I run `neocortex-client story-worktree create` with `--epic`, `--story`,
116
+ `--dispatch`, `--base-sha` and `--graph-revision` from server output, never
117
+ invented, plus a new `--path-file`; then I invoke with `--project-root` set to
118
+ the worktree path in that file. `story-worktree-phase-2`: I reuse that lease
119
+ (`neocortex-client story-worktree status`). Any refusal reason code stops me. I
120
+ never commit to or check out `epic/<ID>`; cleanup is `neocortex-client`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "neocortex"
3
- description: "Neocortex v4.60.80 | OrNexus Team"
3
+ description: "Neocortex v4.61.0 | OrNexus Team"
4
4
  tools:
5
5
  # Read / Edit (built-in tool sets)
6
6
  - read
@@ -72,7 +72,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
72
72
  ┌────────────────────────────────────────────────────────────┐
73
73
  │ │
74
74
  │ ####### N E O C O R T E X │
75
- │ ### ######## v4.60.80 │
75
+ │ ### ######## v4.61.0 │
76
76
  │ ######### ##### │
77
77
  │ ## ############## Development Orchestrator │
78
78
  │ ## ### ###### ## OrNexus Team │
@@ -206,6 +206,17 @@ the `agent` tool (subagent `neocortex`):
206
206
  then re-invokes `*yoloop`; server output decides integration and the next
207
207
  wave. Follow stdout and server output; never invent workflow steps.
208
208
 
209
+ ### Story worktree plans (v4)
210
+
211
+ Inline harness get a `version: 4`, `mode: two_phase_worktree_dag`,
212
+ `workspaceMechanism: client_managed_worktree` plan only after recorded
213
+ concurrency smoke; until then the server keeps the current plan
214
+ (`story-worktree-inline-concurrency-unproven`). When it is emitted, each phase
215
+ story runs `neocortex-client story-worktree create` with server-provided
216
+ IDs/SHAs and a new `--path-file`, then its phase `*yolo` with `--project-root`
217
+ set to that worktree; I re-invoke `*yoloop` after each phase, alone integrate,
218
+ never pass `*yoloop` to a child, and cleanup is always `neocortex-client`.
219
+
209
220
  ## Exemplos
210
221
 
211
222
  | Invocacao do Usuario | Comando invoke |