@ornexus/neocortex 4.61.6 → 4.64.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/dist/release-source.json +1 -1
- package/dist/sbom.cdx.json +1193 -1193
- package/install.ps1 +31 -34
- package/install.sh +28 -5
- package/package.json +6 -4
- package/packages/client/dist/agent/refresh-stubs.d.ts +6 -0
- package/packages/client/dist/agent/refresh-stubs.js +2 -2
- package/packages/client/dist/agent/update-description.d.ts +8 -1
- package/packages/client/dist/agent/update-description.js +2 -1
- package/packages/client/dist/commands/invoke.d.ts +24 -0
- package/packages/client/dist/commands/invoke.js +73 -73
- package/packages/client/dist/commands/refresh-memory.d.ts +10 -0
- package/packages/client/dist/commands/refresh-memory.js +5 -3
- package/packages/client/dist/errors/frontmatter-diagnostics.d.ts +10 -1
- package/packages/client/dist/errors/frontmatter-diagnostics.js +1 -1
- package/packages/client/dist/git/direct-yolo-checkpoint.d.ts +110 -10
- package/packages/client/dist/git/direct-yolo-checkpoint.js +3 -4
- package/packages/client/dist/git/git-lifecycle-store.d.ts +96 -2
- package/packages/client/dist/git/git-lifecycle-store.js +8 -7
- package/packages/client/dist/git/legacy-branch-mode-conversion.d.ts +58 -0
- package/packages/client/dist/git/legacy-branch-mode-conversion.js +4 -0
- package/packages/client/dist/git/release-gate-env.d.ts +23 -0
- package/packages/client/dist/git/release-gate-env.js +1 -0
- package/packages/client/dist/git/secure-filesystem-boundary.d.ts +24 -0
- package/packages/client/dist/git/secure-filesystem-boundary.js +20 -9
- package/packages/client/dist/git/state-json-field-merge.d.ts +76 -0
- package/packages/client/dist/git/state-json-field-merge.js +2 -0
- package/packages/client/dist/git/story-worktree-cleanup.d.ts +22 -1
- package/packages/client/dist/git/story-worktree-cleanup.js +4 -4
- package/packages/client/dist/git/story-worktree-integration.d.ts +48 -0
- package/packages/client/dist/git/story-worktree-integration.js +3 -3
- package/packages/client/dist/git/story-worktree-manager.d.ts +57 -0
- package/packages/client/dist/git/story-worktree-manager.js +3 -3
- package/packages/client/dist/git/story-worktree-paths.d.ts +23 -1
- package/packages/client/dist/git/story-worktree-paths.js +1 -1
- package/packages/client/dist/git/story-write-set-extension.d.ts +3 -0
- package/packages/client/dist/git/story-write-set-extension.js +1 -1
- package/packages/client/dist/private-execution/root-memory-writer.js +1 -1
- package/packages/client/dist/runner/headless/child-env.d.ts +92 -0
- package/packages/client/dist/runner/headless/child-env.js +1 -0
- package/packages/client/dist/runner/headless/continuous-story-workspace.js +11 -11
- package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.d.ts +31 -0
- package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.js +10 -10
- package/packages/client/dist/runner/headless/run-yolo.d.ts +15 -0
- package/packages/client/dist/runner/headless/run-yolo.js +1 -1
- package/packages/client/dist/runner/headless/run-yoloop.d.ts +55 -0
- package/packages/client/dist/runner/headless/run-yoloop.js +2 -2
- package/packages/client/dist/runner/headless/types.d.ts +9 -1
- package/packages/client/dist/runner/headless/types.js +2 -2
- package/packages/client/dist/state/project-state-snapshot.js +1 -1
- package/packages/client/dist/state/state-json-repair.d.ts +23 -0
- package/packages/client/dist/state/state-json-repair.js +4 -3
- package/packages/client/dist/yolo/change-evidence-collector.js +1 -1
- package/packages/client/dist/yolo/invoke-envelope-capability.d.ts +2 -0
- package/packages/client/dist/yolo/invoke-envelope-capability.js +1 -1
- package/packages/client/dist/yolo/project-manifest-projection-collector.d.ts +28 -0
- package/packages/client/dist/yolo/project-manifest-projection-collector.js +1 -0
- package/packages/client/dist/yolo/spec-envelope-collector.d.ts +9 -0
- package/packages/client/dist/yolo/spec-envelope-collector.js +3 -3
- package/packages/client/dist/yoloop/discovery-hook.d.ts +2 -0
- package/packages/client/dist/yoloop/discovery-hook.js +2 -2
- package/packages/client/dist/yoloop/invoke-hooks.d.ts +17 -0
- package/packages/client/dist/yoloop/invoke-hooks.js +14 -10
- package/packages/client/dist/yoloop/legacy-story-scope.d.ts +23 -0
- package/packages/client/dist/yoloop/legacy-story-scope.js +1 -0
- package/packages/client/dist/yoloop/legacy-yoloop-adoption.d.ts +69 -0
- package/packages/client/dist/yoloop/legacy-yoloop-adoption.js +1 -0
- package/packages/client/dist/yoloop/shared-discover-epics.d.ts +62 -1
- package/packages/client/dist/yoloop/shared-discover-epics.js +1 -1
- package/packages/client/dist/yoloop/yoloop-client-state-store.d.ts +23 -0
- package/packages/client/dist/yoloop/yoloop-client-state-store.js +1 -1
- package/packages/client/dist/yoloop/yoloop-start-origin-binding.d.ts +92 -0
- package/packages/client/dist/yoloop/yoloop-start-origin-binding.js +1 -0
- package/packages/shared/dist/compatibility/index.js +6 -0
- package/packages/shared/dist/frontmatter-context-contract.js +164 -52
- package/packages/shared/dist/project-manifest-projection.js +202 -0
- package/packages/shared/dist/project-validation-commands.js +14 -6
- package/packages/shared/dist/release-gate-env-contract.js +129 -0
- package/packages/shared/dist/yolo/spec-envelope-rules.js +85 -0
- package/packages/shared/dist/yolo/spec-envelope.js +33 -7
- package/packages/shared/dist/yoloop/branch-unit.js +119 -3
- package/packages/shared/dist/yoloop/epic-terminal-git.js +98 -6
- package/packages/shared/dist/yoloop/story-write-scope.js +212 -0
- package/targets-stubs/antigravity/gemini.md +1 -1
- package/targets-stubs/antigravity/install-antigravity.sh +13 -4
- package/targets-stubs/antigravity/skill/SKILL.md +1 -1
- package/targets-stubs/claude-code/neocortex-root.agent.yaml +1 -1
- package/targets-stubs/claude-code/neocortex-root.md +2 -2
- package/targets-stubs/claude-code/neocortex.agent.yaml +1 -1
- package/targets-stubs/claude-code/neocortex.md +5 -5
- package/targets-stubs/codex/AGENTS.md +1 -1
- package/targets-stubs/codex/install-codex.sh +12 -4
- package/targets-stubs/cursor/agent.md +2 -2
- package/targets-stubs/gemini-cli/agent.md +2 -2
- package/targets-stubs/lib/managed-config-merge.js +459 -5
- package/targets-stubs/lib/managed-profile.sh +54 -7
- package/targets-stubs/opencode/neocortex-root.md +1 -1
- package/targets-stubs/vscode/install-vscode.sh +21 -0
- package/targets-stubs/vscode/neocortex.agent.md +2 -2
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Story P226.05 (P226-CON-WRITESET) -- shared story write-scope semantics.
|
|
3
|
+
*
|
|
4
|
+
* One pure, deterministic module owns how a story write-set is expanded and
|
|
5
|
+
* matched. The direct checkpoint, the Git lifecycle store and `*create-epic`
|
|
6
|
+
* materialization delegate here so the three decisions are identical.
|
|
7
|
+
*
|
|
8
|
+
* Grammar (closed subset, fail-closed): exact relative path, directory scope
|
|
9
|
+
* ending in `/`, and globs where `*` matches within one segment and a segment
|
|
10
|
+
* equal to `**` matches zero or more whole segments (at most 8 segments).
|
|
11
|
+
* Braces, negation, traversal, absolute paths and drive letters are refused
|
|
12
|
+
* with stable reason codes; brackets and `?` are refused inside globs and
|
|
13
|
+
* matched literally in exact/directory scopes. Matching never compiles a RegExp from
|
|
14
|
+
* the scope and runs in O(segments * path segments). Directory and glob scopes
|
|
15
|
+
* never cover governance paths (`.neocortex/`, `.claude/`, `.git*`,
|
|
16
|
+
* `docs/stories/`); those need an exact scope.
|
|
17
|
+
*/
|
|
18
|
+
export const STORY_WRITE_SCOPE_MAX_LENGTH = 1024;
|
|
19
|
+
export const STORY_WRITE_SCOPE_MAX_GLOB_SEGMENTS = 8;
|
|
20
|
+
const STORY_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/;
|
|
21
|
+
// eslint-disable-next-line no-control-regex
|
|
22
|
+
const CONTROL_CHAR_PATTERN = /[\u0000-\u001f\u007f]/;
|
|
23
|
+
/** The five story control files, in canonical order (WS-01). */
|
|
24
|
+
export function storyControlFiles(storyId) {
|
|
25
|
+
if (!isSafeStoryId(storyId))
|
|
26
|
+
return [];
|
|
27
|
+
return [
|
|
28
|
+
'.neocortex/state.json',
|
|
29
|
+
`docs/stories/${storyId}.story.md`,
|
|
30
|
+
`.neocortex/stories/${storyId}/qa-gate-result.json`,
|
|
31
|
+
`.neocortex/stories/${storyId}/validation-evidence.md`,
|
|
32
|
+
`.neocortex/stories/${storyId}/review.md`,
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
/** Validate one write scope against the closed grammar (WS-03). */
|
|
36
|
+
export function validateStoryWriteScope(scope) {
|
|
37
|
+
if (typeof scope !== 'string' || scope.length === 0)
|
|
38
|
+
return fail('story-write-scope-empty');
|
|
39
|
+
if (scope.length > STORY_WRITE_SCOPE_MAX_LENGTH)
|
|
40
|
+
return fail('story-write-scope-too-long');
|
|
41
|
+
if (CONTROL_CHAR_PATTERN.test(scope) || scope.includes('\\'))
|
|
42
|
+
return fail('story-write-scope-invalid-char');
|
|
43
|
+
if (scope.startsWith('/'))
|
|
44
|
+
return fail('story-write-scope-absolute');
|
|
45
|
+
if (scope.startsWith('-'))
|
|
46
|
+
return fail('story-write-scope-leading-dash');
|
|
47
|
+
if (/^[A-Za-z]:/.test(scope))
|
|
48
|
+
return fail('story-write-scope-drive-letter');
|
|
49
|
+
const body = scope.endsWith('/') ? scope.slice(0, -1) : scope;
|
|
50
|
+
const segments = body.split('/');
|
|
51
|
+
if (segments.some((segment) => segment === '' || segment === '.' || segment === '..')) {
|
|
52
|
+
return fail('story-write-scope-traversal');
|
|
53
|
+
}
|
|
54
|
+
if (segments[0].toLowerCase() === '.git')
|
|
55
|
+
return fail('story-write-scope-git-dir');
|
|
56
|
+
if (scope.includes('{') || scope.includes('}'))
|
|
57
|
+
return fail('story-write-scope-brace');
|
|
58
|
+
if (scope.includes('!'))
|
|
59
|
+
return fail('story-write-scope-negation');
|
|
60
|
+
if (!isGlob(scope))
|
|
61
|
+
return { ok: true };
|
|
62
|
+
// Character classes and `?` are glob syntax outside the supported subset.
|
|
63
|
+
// Exact and directory scopes match them literally (e.g. `app/[id]/page.tsx`),
|
|
64
|
+
// which cannot widen the scope; inside a glob they fail closed.
|
|
65
|
+
if (scope.includes('[') || scope.includes(']'))
|
|
66
|
+
return fail('story-write-scope-bracket');
|
|
67
|
+
if (scope.includes('?'))
|
|
68
|
+
return fail('story-write-scope-wildcard-invalid');
|
|
69
|
+
if (segments.some((segment) => segment.includes('**') && segment !== '**')) {
|
|
70
|
+
return fail('story-write-scope-wildcard-invalid');
|
|
71
|
+
}
|
|
72
|
+
if (segments.length > STORY_WRITE_SCOPE_MAX_GLOB_SEGMENTS)
|
|
73
|
+
return fail('story-write-scope-too-many-segments');
|
|
74
|
+
return { ok: true };
|
|
75
|
+
}
|
|
76
|
+
/** Whether `scope` (exact, `dir/` or bounded glob) covers repository `path` (WS-04). */
|
|
77
|
+
export function storyWriteScopeCovers(scope, path) {
|
|
78
|
+
if (!validateStoryWriteScope(scope).ok || !isSafeRepositoryPath(path))
|
|
79
|
+
return false;
|
|
80
|
+
if (scope === path)
|
|
81
|
+
return true;
|
|
82
|
+
// Governance surfaces are authorized only by an exact scope: a directory or
|
|
83
|
+
// glob never reaches them. Own-story control files come from the exact
|
|
84
|
+
// expansion (P226.05 F3; mirrors the write-set extension path rule).
|
|
85
|
+
if (isGovernancePath(path))
|
|
86
|
+
return false;
|
|
87
|
+
if (scope.endsWith('/') && !isGlob(scope))
|
|
88
|
+
return path.startsWith(scope);
|
|
89
|
+
if (!isGlob(scope) || path.includes('*'))
|
|
90
|
+
return false;
|
|
91
|
+
// A directory glob (`src/*/`) covers at least one entry below the directory.
|
|
92
|
+
const scopeSegments = collapseGlobstars((scope.endsWith('/') ? `${scope}*/**` : scope).split('/'));
|
|
93
|
+
return matchSegments(scopeSegments, path.split('/'));
|
|
94
|
+
}
|
|
95
|
+
/** Paths a non-exact scope never covers: `.neocortex/`, `.claude/`, `.git*` and `docs/stories/`. */
|
|
96
|
+
export function isStoryWriteScopeGovernancePath(path) {
|
|
97
|
+
return isGovernancePath(path);
|
|
98
|
+
}
|
|
99
|
+
/** Whether any scope in `scopes` covers `path`. */
|
|
100
|
+
export function storyWriteSetCovers(scopes, path) {
|
|
101
|
+
return scopes.some((scope) => storyWriteScopeCovers(scope, path));
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Aggregate coverage over authored scopes plus the exact control files of the
|
|
105
|
+
* given stories. Used where an epic-level `allowedWriteSet` is the union of
|
|
106
|
+
* authored write-sets, so stories that omit their control files stay covered
|
|
107
|
+
* without changing the persisted `allowedWriteSet` digest.
|
|
108
|
+
*/
|
|
109
|
+
export function storyWriteSetCoversWithControlFiles(scopes, storyIds, path) {
|
|
110
|
+
return storyWriteSetCovers(scopes, path) || storyIds.some((storyId) => storyControlFiles(storyId).includes(path));
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Expand authored refs with the five control files exactly once, deduplicated
|
|
114
|
+
* and sorted (WS-02). Any invalid ref fails the whole expansion closed.
|
|
115
|
+
*/
|
|
116
|
+
export function expandStoryWriteScope(storyId, refs) {
|
|
117
|
+
if (!isSafeStoryId(storyId))
|
|
118
|
+
return fail('story-write-scope-story-id-invalid');
|
|
119
|
+
const normalized = [];
|
|
120
|
+
for (const ref of refs) {
|
|
121
|
+
const value = typeof ref === 'string' ? stripDotSlash(ref) : ref;
|
|
122
|
+
const validation = validateStoryWriteScope(value);
|
|
123
|
+
if (!validation.ok)
|
|
124
|
+
return validation;
|
|
125
|
+
normalized.push(value);
|
|
126
|
+
}
|
|
127
|
+
const scopes = [...new Set([...normalized, ...storyControlFiles(storyId)])].sort(compareCodeUnits);
|
|
128
|
+
return { ok: true, scopes: Object.freeze(scopes) };
|
|
129
|
+
}
|
|
130
|
+
/** Consecutive `**` segments are equivalent to one. */
|
|
131
|
+
function collapseGlobstars(segments) {
|
|
132
|
+
return segments.filter((segment, index) => segment !== '**' || segments[index - 1] !== '**');
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Segment matcher as a bottom-up dynamic program over (scope index, path
|
|
136
|
+
* index): O(S * P) segment comparisons, no recursion and no backtracking
|
|
137
|
+
* blow-up for pathological `**` scopes (P226.05 F1).
|
|
138
|
+
*/
|
|
139
|
+
function matchSegments(scope, path) {
|
|
140
|
+
const width = path.length + 1;
|
|
141
|
+
// next[pi] = whether scope[si+1..] matches path[pi..]
|
|
142
|
+
let next = new Array(width).fill(false);
|
|
143
|
+
next[path.length] = true;
|
|
144
|
+
for (let si = scope.length - 1; si >= 0; si -= 1) {
|
|
145
|
+
const segment = scope[si];
|
|
146
|
+
const current = new Array(width).fill(false);
|
|
147
|
+
if (segment === '**') {
|
|
148
|
+
// `**` matches zero or more segments: current[pi] = OR_{k>=pi} next[k].
|
|
149
|
+
let any = false;
|
|
150
|
+
for (let pi = path.length; pi >= 0; pi -= 1) {
|
|
151
|
+
any = any || next[pi];
|
|
152
|
+
current[pi] = any;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
for (let pi = 0; pi < path.length; pi += 1) {
|
|
157
|
+
current[pi] = next[pi + 1] && matchSegment(segment, path[pi]);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
next = current;
|
|
161
|
+
}
|
|
162
|
+
return next[0];
|
|
163
|
+
}
|
|
164
|
+
/** `*` matches zero or more characters inside one segment. */
|
|
165
|
+
function matchSegment(pattern, value) {
|
|
166
|
+
const parts = pattern.split('*');
|
|
167
|
+
if (parts.length === 1)
|
|
168
|
+
return pattern === value;
|
|
169
|
+
const first = parts[0];
|
|
170
|
+
const last = parts[parts.length - 1];
|
|
171
|
+
if (value.length < first.length + last.length || !value.startsWith(first) || !value.endsWith(last))
|
|
172
|
+
return false;
|
|
173
|
+
let cursor = first.length;
|
|
174
|
+
const end = value.length - last.length;
|
|
175
|
+
for (const middle of parts.slice(1, -1)) {
|
|
176
|
+
const found = value.indexOf(middle, cursor);
|
|
177
|
+
if (found < 0 || found + middle.length > end)
|
|
178
|
+
return false;
|
|
179
|
+
cursor = found + middle.length;
|
|
180
|
+
}
|
|
181
|
+
return cursor <= end;
|
|
182
|
+
}
|
|
183
|
+
function isGlob(scope) {
|
|
184
|
+
return scope.includes('*');
|
|
185
|
+
}
|
|
186
|
+
function isSafeRepositoryPath(path) {
|
|
187
|
+
if (typeof path !== 'string' || path.length === 0 || path.length > STORY_WRITE_SCOPE_MAX_LENGTH)
|
|
188
|
+
return false;
|
|
189
|
+
if (CONTROL_CHAR_PATTERN.test(path) || path.includes('\\') || path.startsWith('/') || path.startsWith('-')
|
|
190
|
+
|| /^[A-Za-z]:/.test(path))
|
|
191
|
+
return false;
|
|
192
|
+
const segments = path.split('/');
|
|
193
|
+
return !segments.some((segment) => segment === '' || segment === '.' || segment === '..')
|
|
194
|
+
&& segments[0].toLowerCase() !== '.git';
|
|
195
|
+
}
|
|
196
|
+
function isGovernancePath(path) {
|
|
197
|
+
const lower = path.toLowerCase();
|
|
198
|
+
const first = lower.split('/')[0];
|
|
199
|
+
return first === '.neocortex' || first === '.claude' || first.startsWith('.git') || lower.startsWith('docs/stories/');
|
|
200
|
+
}
|
|
201
|
+
function isSafeStoryId(storyId) {
|
|
202
|
+
return typeof storyId === 'string' && STORY_ID_PATTERN.test(storyId) && !storyId.includes('..');
|
|
203
|
+
}
|
|
204
|
+
function stripDotSlash(value) {
|
|
205
|
+
return value.startsWith('./') ? value.slice(2) : value;
|
|
206
|
+
}
|
|
207
|
+
function compareCodeUnits(left, right) {
|
|
208
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
209
|
+
}
|
|
210
|
+
function fail(reasonCode) {
|
|
211
|
+
return { ok: false, reasonCode };
|
|
212
|
+
}
|
|
@@ -33,13 +33,22 @@ install_antigravity() {
|
|
|
33
33
|
echo "[ANTIGRAVITY] Installing Neocortex for Google Antigravity (thin-client mode)..."
|
|
34
34
|
echo "[ANTIGRAVITY] WARNING: Antigravity is in public preview - APIs may change"
|
|
35
35
|
|
|
36
|
+
# P226.13: a global install passes $HOME as the destination; never create
|
|
37
|
+
# the project .agent/skills folder there. Existing folders are kept.
|
|
38
|
+
local global_destination=false
|
|
39
|
+
if neocortex_is_global_destination "$dest_dir"; then
|
|
40
|
+
global_destination=true
|
|
41
|
+
fi
|
|
42
|
+
|
|
36
43
|
# Create destination directories
|
|
37
|
-
mkdir -p "$
|
|
38
|
-
"$gemini_home/antigravity" \
|
|
44
|
+
mkdir -p "$gemini_home/antigravity" \
|
|
39
45
|
"$gemini_home/config/agents"
|
|
46
|
+
if [ "$global_destination" != true ]; then
|
|
47
|
+
mkdir -p "$dest_dir/.agent/skills/neocortex"
|
|
48
|
+
fi
|
|
40
49
|
|
|
41
|
-
# 1. Copy SKILL.md stub
|
|
42
|
-
if [ -f "$ag_target/skill/SKILL.md" ]; then
|
|
50
|
+
# 1. Copy SKILL.md stub (project installs only)
|
|
51
|
+
if [ "$global_destination" != true ] && [ -f "$ag_target/skill/SKILL.md" ]; then
|
|
43
52
|
neocortex_managed_profile "$source_dir" "$ag_target/skill/SKILL.md" "$dest_dir/.agent/skills/neocortex/SKILL.md" "$dest_dir" "project-antigravity-skill"
|
|
44
53
|
neocortex_managed_report "[ANTIGRAVITY]" ".agent/skills/neocortex/SKILL.md (skill stub)"
|
|
45
54
|
fi
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex-root
|
|
3
|
-
description: "🧠 Neocortex Root Agent v4.
|
|
3
|
+
description: "🧠 Neocortex Root Agent v4.64.0 | OrNexus Team"
|
|
4
4
|
model: opus
|
|
5
5
|
color: blue
|
|
6
6
|
tools:
|
|
@@ -108,7 +108,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
108
108
|
┌────────────────────────────────────────────────────────────┐
|
|
109
109
|
│ │
|
|
110
110
|
│ ####### N E O C O R T E X │
|
|
111
|
-
│ ### ######## v4.
|
|
111
|
+
│ ### ######## v4.64.0 │
|
|
112
112
|
│ ######### ##### │
|
|
113
113
|
│ ## ############## Development Orchestrator │
|
|
114
114
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.
|
|
3
|
+
description: "🧠 Neocortex v4.64.0 | OrNexus Team"
|
|
4
4
|
model: opus
|
|
5
5
|
color: blue
|
|
6
6
|
permissionMode: bypassPermissions
|
|
@@ -106,7 +106,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
106
106
|
┌────────────────────────────────────────────────────────────┐
|
|
107
107
|
│ │
|
|
108
108
|
│ ####### N E O C O R T E X │
|
|
109
|
-
│ ### ######## v4.
|
|
109
|
+
│ ### ######## v4.64.0 │
|
|
110
110
|
│ ######### ##### │
|
|
111
111
|
│ ## ############## Development Orchestrator │
|
|
112
112
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -223,7 +223,8 @@ authorizes delegation (`native_safe`) and returns a root-owned plan:
|
|
|
223
223
|
- Each child gets only its server-authored prompt, e.g.
|
|
224
224
|
`*yolo @docs/stories/<id>.story.md` or the `... branchless-preparation`
|
|
225
225
|
variant. Never pass the outer `@neocortex *yoloop ...` or any root invocation.
|
|
226
|
-
- Serial plans keep one child at a time. Children may delegate further
|
|
226
|
+
- Serial plans keep one child at a time. Children may delegate further:
|
|
227
|
+
max 1 child level below root, 3 levels total; children never run `*yoloop`.
|
|
227
228
|
- The root agent keeps yoloop ownership: it waits for all children of the wave,
|
|
228
229
|
then re-invokes `*yoloop`; server output decides integration and the next
|
|
229
230
|
wave. Never invent workflow steps.
|
|
@@ -363,8 +364,7 @@ Agent (correct):
|
|
|
363
364
|
4. Child executions complete; agent re-invokes the loop with the next iteration.
|
|
364
365
|
5. Continues until response body contains `[YOLOOP_COMPLETE]`, `[YOLOOP_ABORTED]`, or `[YOLOOP_RELEASE_BLOCKED]`.
|
|
365
366
|
|
|
366
|
-
Agent (INCORRECT, pre-P122): reads the body as plain text and sits idle.
|
|
367
|
-
correct path is mandatory whenever the recognition signals are present.
|
|
367
|
+
Agent (INCORRECT, pre-P122): reads the body as plain text and sits idle.
|
|
368
368
|
|
|
369
369
|
## Regras
|
|
370
370
|
|
|
@@ -32,7 +32,7 @@ Codex built-in commands or actions.
|
|
|
32
32
|
|
|
33
33
|
<!-- END: Plugin Conflict Prevention -->
|
|
34
34
|
|
|
35
|
-
# Neocortex v4.
|
|
35
|
+
# Neocortex v4.64.0 | OrNexus Team
|
|
36
36
|
|
|
37
37
|
You are a Development Orchestrator. All orchestration logic is delivered by the remote Neocortex server.
|
|
38
38
|
|
|
@@ -6,7 +6,12 @@ install_codex() {
|
|
|
6
6
|
local source_dir="${1:?SOURCE_DIR required}"
|
|
7
7
|
local dest_dir="${2:?DEST_DIR required}"
|
|
8
8
|
local codex_target="$source_dir/targets-stubs/codex"
|
|
9
|
-
|
|
9
|
+
# P227.14: CODEX_HOME counts only when absolute (same rule as the client
|
|
10
|
+
# refresh), so every writer resolves the same file and the same base.
|
|
11
|
+
local codex_home="$HOME/.codex"
|
|
12
|
+
case "${CODEX_HOME:-}" in
|
|
13
|
+
/*) codex_home="$CODEX_HOME" ;;
|
|
14
|
+
esac
|
|
10
15
|
. "$source_dir/targets-stubs/lib/managed-profile.sh"
|
|
11
16
|
|
|
12
17
|
if [ ! -d "$codex_target" ]; then
|
|
@@ -34,16 +39,19 @@ install_codex() {
|
|
|
34
39
|
neocortex_managed_report "[CODEX]" "AGENTS.md (project root)"
|
|
35
40
|
fi
|
|
36
41
|
|
|
37
|
-
# 2. Copy AGENTS.md stub to global
|
|
42
|
+
# 2. Copy AGENTS.md stub to global. P227.14: canonical ids
|
|
43
|
+
# profile-codex-root / profile-codex-neocortex live in one base (the
|
|
44
|
+
# resolved Codex base); a stale HOME manifest entry for the same file is
|
|
45
|
+
# adopted or retired by identical hash inside neocortex_managed_profile.
|
|
38
46
|
if [ -f "$codex_target/AGENTS.md" ]; then
|
|
39
|
-
neocortex_managed_profile "$source_dir" "$codex_target/AGENTS.md" "$codex_home/AGENTS.md" "$codex_base" "profile-codex-root" || failures=$((failures + 1))
|
|
47
|
+
neocortex_managed_profile "$source_dir" "$codex_target/AGENTS.md" "$codex_home/AGENTS.md" "$codex_base" "profile-codex-root" platform || failures=$((failures + 1))
|
|
40
48
|
neocortex_managed_report "[CODEX]" "$codex_home/AGENTS.md (global)"
|
|
41
49
|
fi
|
|
42
50
|
|
|
43
51
|
# 3. Install native Codex subagent for isolated task directives.
|
|
44
52
|
# Codex custom agent reference: https://developers.openai.com/codex/subagents
|
|
45
53
|
if [ -f "$codex_target/neocortex.toml" ]; then
|
|
46
|
-
neocortex_managed_profile "$source_dir" "$codex_target/neocortex.toml" "$codex_home/agents/neocortex.toml" "$codex_base" "profile-codex-neocortex" || failures=$((failures + 1))
|
|
54
|
+
neocortex_managed_profile "$source_dir" "$codex_target/neocortex.toml" "$codex_home/agents/neocortex.toml" "$codex_base" "profile-codex-neocortex" platform || failures=$((failures + 1))
|
|
47
55
|
neocortex_managed_report "[CODEX]" "$codex_home/agents/neocortex.toml (global subagent)"
|
|
48
56
|
|
|
49
57
|
if [ "$project_install" = true ] && [ -d "$dest_dir" ] && [ "$dest_dir/.codex/agents/neocortex.toml" != "$codex_home/agents/neocortex.toml" ]; then
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.
|
|
3
|
+
description: "🧠 Neocortex v4.64.0 | OrNexus Team"
|
|
4
4
|
model: inherit
|
|
5
5
|
readonly: false
|
|
6
6
|
is_background: false
|
|
@@ -104,7 +104,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
104
104
|
┌────────────────────────────────────────────────────────────┐
|
|
105
105
|
│ │
|
|
106
106
|
│ ####### N E O C O R T E X │
|
|
107
|
-
│ ### ######## v4.
|
|
107
|
+
│ ### ######## v4.64.0 │
|
|
108
108
|
│ ######### ##### │
|
|
109
109
|
│ ## ############## Development Orchestrator │
|
|
110
110
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex-root
|
|
3
|
-
description: "🧠 Neocortex v4.
|
|
3
|
+
description: "🧠 Neocortex v4.64.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.
|
|
65
|
+
│ ### ######## v4.64.0 │
|
|
66
66
|
│ ######### ##### │
|
|
67
67
|
│ ## ############## Development Orchestrator │
|
|
68
68
|
│ ## ### ###### ## OrNexus Team │
|