@ornexus/neocortex 4.66.19 → 4.66.20
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 +1194 -1194
- package/install.ps1 +1 -1
- package/install.sh +1 -1
- package/package.json +3 -2
- package/packages/client/dist/runner/headless/run-yoloop.d.ts +1 -6
- package/packages/client/dist/runner/headless/run-yoloop.js +4 -4
- package/packages/shared/dist/yoloop/execution-plan-v4-contract.js +332 -0
- package/targets-stubs/antigravity/gemini.md +1 -1
- package/targets-stubs/antigravity/neocortex.md +1 -1
- 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-sentinel.md +1 -1
- package/targets-stubs/claude-code/neocortex.agent.yaml +1 -1
- package/targets-stubs/claude-code/neocortex.md +2 -2
- package/targets-stubs/codex/AGENTS.md +1 -1
- package/targets-stubs/codex/neocortex.toml +1 -1
- package/targets-stubs/cursor/agent.md +2 -2
- package/targets-stubs/deepseek-harness/SKILL.md +1 -1
- package/targets-stubs/gemini-cli/agent.md +2 -2
- package/targets-stubs/gemini-cli/agents/neocortex.md +2 -2
- package/targets-stubs/grok/SKILL.md +1 -1
- package/targets-stubs/kimi/neocortex.md +1 -1
- package/targets-stubs/openclaw/SKILL.md +1 -1
- package/targets-stubs/opencode/neocortex-root.md +2 -2
- package/targets-stubs/opencode/neocortex.md +2 -2
- package/targets-stubs/vscode/neocortex.agent.md +2 -2
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public structural contract for a v4 yoloop plan.
|
|
3
|
+
* The server supplies its exact step lists without publishing them in this module.
|
|
4
|
+
*/
|
|
5
|
+
/** Actor expected to execute the plan. */
|
|
6
|
+
export const YOLOOP_EXECUTION_PLAN_EXECUTORS = Object.freeze([
|
|
7
|
+
'root_agent',
|
|
8
|
+
'root_agent_with_child_tasks',
|
|
9
|
+
'manual_operator',
|
|
10
|
+
]);
|
|
11
|
+
/** Whether the server has authorized the plan as executable. */
|
|
12
|
+
export const YOLOOP_EXECUTION_PLAN_AUTHORIZATIONS = Object.freeze([
|
|
13
|
+
'server_authorized',
|
|
14
|
+
'not_authorized',
|
|
15
|
+
]);
|
|
16
|
+
/** Whether child task delegation is required, allowed, or forbidden. */
|
|
17
|
+
export const YOLOOP_CHILD_TASK_DELEGATION_POLICIES = Object.freeze([
|
|
18
|
+
'not_required',
|
|
19
|
+
'allowed',
|
|
20
|
+
'forbidden',
|
|
21
|
+
]);
|
|
22
|
+
export const YOLOOP_EXECUTION_PLAN_V4_MODE = 'two_phase_worktree_dag';
|
|
23
|
+
/** How each story worktree is materialized for the child. */
|
|
24
|
+
export const YOLOOP_WORKSPACE_MECHANISMS = Object.freeze([
|
|
25
|
+
'native_subagent_worktree',
|
|
26
|
+
'client_managed_worktree',
|
|
27
|
+
]);
|
|
28
|
+
export const YOLOOP_V4_PHASE_IDS = Object.freeze(['phase-1-prepare', 'phase-2-finalize']);
|
|
29
|
+
/** Phase 1 runs in parallel for every story and stops after implementation. */
|
|
30
|
+
/** P225.03: closed child prompt suffix per v4 phase. */
|
|
31
|
+
export const YOLOOP_V4_PHASE_PROMPT_SUFFIXES = Object.freeze({
|
|
32
|
+
'phase-1-prepare': 'story-worktree-phase-1',
|
|
33
|
+
'phase-2-finalize': 'story-worktree-phase-2',
|
|
34
|
+
});
|
|
35
|
+
/** Closed per-story, per-phase child prompt; never the outer `*yoloop` trigger. */
|
|
36
|
+
export function yoloopV4PhasePrompt(storyId, phase) {
|
|
37
|
+
return `*yolo @docs/stories/${storyId}.story.md ${YOLOOP_V4_PHASE_PROMPT_SUFFIXES[phase]}`;
|
|
38
|
+
}
|
|
39
|
+
/** Public scheduler status of one v4 node. */
|
|
40
|
+
export const YOLOOP_V4_NODE_PHASE_STATUSES = Object.freeze([
|
|
41
|
+
'phase-1',
|
|
42
|
+
'phase-1-complete',
|
|
43
|
+
'released',
|
|
44
|
+
'reopened',
|
|
45
|
+
'integrated',
|
|
46
|
+
]);
|
|
47
|
+
/** P230.03: grammar of the opaque `worktreeRef` (same as the client lease). */
|
|
48
|
+
export const YOLOOP_V4_WORKTREE_REF_PATTERN = /^wt\/[0-9a-f]{8}$/;
|
|
49
|
+
/** Public clients validate step identifier shape. The server binds its exact lists. */
|
|
50
|
+
export function isYoloopV4PublicStepId(value) {
|
|
51
|
+
return typeof value === 'string' && /^step-[a-z0-9-]{1,64}$/.test(value);
|
|
52
|
+
}
|
|
53
|
+
function isYoloopV4PublicStepList(value) {
|
|
54
|
+
return Array.isArray(value) && value.length > 0 && value.length <= 32
|
|
55
|
+
&& value.every(isYoloopV4PublicStepId) && new Set(value).size === value.length;
|
|
56
|
+
}
|
|
57
|
+
const publicV4StepPolicy = {
|
|
58
|
+
phaseOne: isYoloopV4PublicStepList,
|
|
59
|
+
phaseTwo: isYoloopV4PublicStepList,
|
|
60
|
+
barrier: isYoloopV4PublicStepId,
|
|
61
|
+
};
|
|
62
|
+
export const YOLOOP_V4_PLAN_REASON_CODES = Object.freeze([
|
|
63
|
+
'plan-v4-shape-invalid',
|
|
64
|
+
'plan-v4-version-invalid',
|
|
65
|
+
'plan-v4-story-ids-invalid',
|
|
66
|
+
'plan-v4-workspace-mechanism-invalid',
|
|
67
|
+
'plan-v4-phase-order-invalid',
|
|
68
|
+
'plan-v4-spec-barrier-invalid',
|
|
69
|
+
'plan-v4-integration-order-invalid',
|
|
70
|
+
'plan-v4-integration-owner-invalid',
|
|
71
|
+
'plan-v4-integration-concurrency-invalid',
|
|
72
|
+
'plan-v4-outer-yoloop-forbidden',
|
|
73
|
+
'plan-v4-child-workspace-invalid',
|
|
74
|
+
'plan-v4-isolation-policy-invalid',
|
|
75
|
+
'plan-v4-prompt-template-invalid',
|
|
76
|
+
'plan-v4-node-invalid',
|
|
77
|
+
'plan-v4-unknown-field',
|
|
78
|
+
'plan-v4-unsafe-value',
|
|
79
|
+
]);
|
|
80
|
+
const V4_STORY_ID = /^[A-Za-z0-9][A-Za-z0-9._-]{0,79}$/;
|
|
81
|
+
const V4_SHA256 = /^[a-f0-9]{64}$/;
|
|
82
|
+
const V4_BRANCH = /^[A-Za-z0-9][A-Za-z0-9._/-]{0,119}$/;
|
|
83
|
+
const V4_URL_LIKE = /[A-Za-z][A-Za-z0-9+.-]*:\/\//;
|
|
84
|
+
const V4_ABSOLUTE_PATH_LIKE = /^(?:\/|~[\\/]|[A-Za-z]:[\\/]|\\\\)/;
|
|
85
|
+
const V4_PLAN_KEYS = new Set([
|
|
86
|
+
'version', 'mode', 'executor', 'authorization', 'storyIds', 'promptTemplates', 'executionBranch',
|
|
87
|
+
'graphRevision', 'dependencyBasis', 'workspaceMechanism', 'phases', 'specBarrier', 'integrationOrder',
|
|
88
|
+
'isolationPolicy', 'skippedStories', 'nodes', 'childSpecContexts',
|
|
89
|
+
]);
|
|
90
|
+
const V4_NODE_KEYS = new Set([
|
|
91
|
+
'storyId', 'phaseStatus', 'executionBranch', 'baseSha', 'temporaryBranch', 'dependencies', 'promptTemplate',
|
|
92
|
+
'worktreeRef',
|
|
93
|
+
]);
|
|
94
|
+
const V4_GIT_SHA = /^(?:[a-f0-9]{40}|[a-f0-9]{64})$/;
|
|
95
|
+
const V4_PHASE_KEYS = new Set(['id', 'stepIds', 'storyIds', 'maxConcurrency']);
|
|
96
|
+
const V4_BARRIER_KEYS = new Set(['stepId', 'scope', 'storyIds']);
|
|
97
|
+
const V4_POLICY_KEYS = new Set([
|
|
98
|
+
'rootOwnsLoop', 'rootOwnedScheduling', 'childPromptKind', 'childTaskDelegation', 'allowOuterYoloopInChild',
|
|
99
|
+
'allowMetaTaskPromptInChild', 'childWorkspace', 'integrationOwner', 'maxIntegrationConcurrency', 'maxDepth',
|
|
100
|
+
'childDelegationMaxDepth',
|
|
101
|
+
]);
|
|
102
|
+
const V4_DEPENDENCY_BASIS_KEYS = new Set([
|
|
103
|
+
'scope', 'epicId', 'epicQueue', 'currentEpicIndex', 'source', 'storyIds', 'dependencyRefs', 'contractRefs',
|
|
104
|
+
'sharedSurfaceRefs',
|
|
105
|
+
]);
|
|
106
|
+
function v4HasOnlyKeys(value, allowed) {
|
|
107
|
+
return value === undefined || Object.keys(value).every((key) => allowed.has(key));
|
|
108
|
+
}
|
|
109
|
+
/** True when any nested string (or key) looks like a URL or an absolute path. */
|
|
110
|
+
function v4HasUnsafeString(value, depth = 0) {
|
|
111
|
+
if (depth > 6)
|
|
112
|
+
return true;
|
|
113
|
+
if (typeof value === 'string')
|
|
114
|
+
return V4_URL_LIKE.test(value) || V4_ABSOLUTE_PATH_LIKE.test(value);
|
|
115
|
+
if (Array.isArray(value))
|
|
116
|
+
return value.some((item) => v4HasUnsafeString(item, depth + 1));
|
|
117
|
+
if (value !== null && typeof value === 'object') {
|
|
118
|
+
return Object.entries(value).some(([key, item]) => v4HasUnsafeString(key, depth + 1) || v4HasUnsafeString(item, depth + 1));
|
|
119
|
+
}
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
function v4IsValidBranch(value) {
|
|
123
|
+
return typeof value === 'string' && V4_BRANCH.test(value) && !value.includes('..') && !value.endsWith('/')
|
|
124
|
+
&& !value.endsWith('.lock') && value.split('/').every((segment) => segment !== '' && !segment.startsWith('.'));
|
|
125
|
+
}
|
|
126
|
+
function v4Record(value) {
|
|
127
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value)
|
|
128
|
+
? value
|
|
129
|
+
: undefined;
|
|
130
|
+
}
|
|
131
|
+
function v4StoryIds(value) {
|
|
132
|
+
if (!Array.isArray(value) || value.some((id) => typeof id !== 'string' || !V4_STORY_ID.test(id)))
|
|
133
|
+
return undefined;
|
|
134
|
+
return new Set(value).size === value.length ? value : undefined;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* P228.02: a `frontier` barrier needs the plan nodes to prove closure; every
|
|
138
|
+
* dependency of a member that is a non-integrated plan story must be a member.
|
|
139
|
+
*/
|
|
140
|
+
function v4FrontierBarrierValid(barrierStories, storyIds, nodes) {
|
|
141
|
+
if (!barrierStories || barrierStories.length === 0 || !storyIds)
|
|
142
|
+
return false;
|
|
143
|
+
if (!barrierStories.every((id) => storyIds.includes(id)) || !Array.isArray(nodes))
|
|
144
|
+
return false;
|
|
145
|
+
const byId = new Map();
|
|
146
|
+
for (const node of nodes) {
|
|
147
|
+
const record = v4Record(node);
|
|
148
|
+
if (!record || typeof record.storyId !== 'string')
|
|
149
|
+
return false;
|
|
150
|
+
byId.set(record.storyId, record);
|
|
151
|
+
}
|
|
152
|
+
const members = new Set(barrierStories);
|
|
153
|
+
return barrierStories.every((storyId) => {
|
|
154
|
+
const dependencies = byId.get(storyId)?.dependencies;
|
|
155
|
+
if (!Array.isArray(dependencies))
|
|
156
|
+
return false;
|
|
157
|
+
return dependencies.every((id) => typeof id === 'string' && (!storyIds.includes(id) || members.has(id)
|
|
158
|
+
|| byId.get(id)?.phaseStatus === 'integrated'));
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
function v4SameSet(left, right) {
|
|
162
|
+
if (left.length !== right.length)
|
|
163
|
+
return false;
|
|
164
|
+
const expected = new Set(right);
|
|
165
|
+
return left.every((value) => expected.has(value));
|
|
166
|
+
}
|
|
167
|
+
function v4SameList(left, right) {
|
|
168
|
+
return Array.isArray(left) && left.length === right.length && left.every((value, index) => value === right[index]);
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Pure, total validator for v4 plans. Enforces a closed key set, no URL or
|
|
172
|
+
* absolute-path values, exact phases (every story in phase 1), the C04 spec
|
|
173
|
+
* barrier, an integration order covering every story exactly once and the
|
|
174
|
+
* root-only integration policy. Topological soundness of `integrationOrder`
|
|
175
|
+
* against the dependency graph is the emitter's responsibility (P225.02/.03).
|
|
176
|
+
*/
|
|
177
|
+
export function validateYoloopExecutionPlanV4Structure(plan, stepPolicy = publicV4StepPolicy) {
|
|
178
|
+
const reasons = new Set();
|
|
179
|
+
const record = v4Record(plan);
|
|
180
|
+
if (!record) {
|
|
181
|
+
return Object.freeze({ valid: false, reasonCodes: Object.freeze(['plan-v4-shape-invalid']) });
|
|
182
|
+
}
|
|
183
|
+
if (record.version !== 4 || record.mode !== YOLOOP_EXECUTION_PLAN_V4_MODE)
|
|
184
|
+
reasons.add('plan-v4-version-invalid');
|
|
185
|
+
if (v4HasUnsafeString(record))
|
|
186
|
+
reasons.add('plan-v4-unsafe-value');
|
|
187
|
+
const nestedPhases = Array.isArray(record.phases) ? record.phases.map(v4Record) : [];
|
|
188
|
+
if (!v4HasOnlyKeys(record, V4_PLAN_KEYS)
|
|
189
|
+
|| nestedPhases.some((phase) => !v4HasOnlyKeys(phase, V4_PHASE_KEYS))
|
|
190
|
+
|| !v4HasOnlyKeys(v4Record(record.specBarrier), V4_BARRIER_KEYS)
|
|
191
|
+
|| !v4HasOnlyKeys(v4Record(record.isolationPolicy), V4_POLICY_KEYS)
|
|
192
|
+
|| !v4HasOnlyKeys(v4Record(record.dependencyBasis), V4_DEPENDENCY_BASIS_KEYS)) {
|
|
193
|
+
reasons.add('plan-v4-unknown-field');
|
|
194
|
+
}
|
|
195
|
+
const storyIds = v4StoryIds(record.storyIds);
|
|
196
|
+
if (!storyIds || storyIds.length === 0)
|
|
197
|
+
reasons.add('plan-v4-story-ids-invalid');
|
|
198
|
+
if (!v4IsValidBranch(record.executionBranch)
|
|
199
|
+
|| typeof record.graphRevision !== 'string' || !V4_SHA256.test(record.graphRevision)
|
|
200
|
+
|| !v4Record(record.dependencyBasis)
|
|
201
|
+
|| !YOLOOP_EXECUTION_PLAN_EXECUTORS.includes(record.executor)
|
|
202
|
+
|| !YOLOOP_EXECUTION_PLAN_AUTHORIZATIONS.includes(record.authorization)) {
|
|
203
|
+
reasons.add('plan-v4-shape-invalid');
|
|
204
|
+
}
|
|
205
|
+
if (!YOLOOP_WORKSPACE_MECHANISMS.includes(record.workspaceMechanism)) {
|
|
206
|
+
reasons.add('plan-v4-workspace-mechanism-invalid');
|
|
207
|
+
}
|
|
208
|
+
const phases = Array.isArray(record.phases) ? record.phases.map(v4Record) : undefined;
|
|
209
|
+
const phaseOne = phases?.[0];
|
|
210
|
+
const phaseTwo = phases?.[1];
|
|
211
|
+
const phaseConcurrencyValid = [phaseOne, phaseTwo].every((phase) => Number.isSafeInteger(phase?.maxConcurrency) && phase?.maxConcurrency >= 1);
|
|
212
|
+
// Every story runs phase 1; phase 2 holds the currently released subset.
|
|
213
|
+
const phaseOneStories = v4StoryIds(phaseOne?.storyIds);
|
|
214
|
+
const phaseTwoStories = v4StoryIds(phaseTwo?.storyIds);
|
|
215
|
+
const phaseStoriesValid = phaseOneStories !== undefined && phaseTwoStories !== undefined
|
|
216
|
+
&& (storyIds === undefined
|
|
217
|
+
|| (v4SameSet(phaseOneStories, storyIds) && phaseTwoStories.every((id) => storyIds.includes(id))));
|
|
218
|
+
if (!phases || phases.length !== 2 || phaseOne?.id !== 'phase-1-prepare' || phaseTwo?.id !== 'phase-2-finalize'
|
|
219
|
+
|| !stepPolicy.phaseOne(phaseOne.stepIds) || !stepPolicy.phaseTwo(phaseTwo.stepIds)
|
|
220
|
+
|| !phaseConcurrencyValid || !phaseStoriesValid) {
|
|
221
|
+
reasons.add('plan-v4-phase-order-invalid');
|
|
222
|
+
}
|
|
223
|
+
const barrier = v4Record(record.specBarrier);
|
|
224
|
+
const barrierStories = v4StoryIds(barrier?.storyIds);
|
|
225
|
+
// P228.02 (CON-P228.02-PLAN-V4-SCOPE): `epic` keeps the exact-set rule;
|
|
226
|
+
// `frontier` is a non-empty subset closed under unintegrated dependencies.
|
|
227
|
+
const barrierScopeValid = barrier?.scope === 'epic'
|
|
228
|
+
? storyIds === undefined || (barrierStories !== undefined && v4SameSet(barrierStories, storyIds))
|
|
229
|
+
: barrier?.scope === 'frontier'
|
|
230
|
+
? v4FrontierBarrierValid(barrierStories, storyIds, record.nodes)
|
|
231
|
+
: false;
|
|
232
|
+
if (!barrier || !stepPolicy.barrier(barrier.stepId) || !barrierStories || !barrierScopeValid) {
|
|
233
|
+
reasons.add('plan-v4-spec-barrier-invalid');
|
|
234
|
+
}
|
|
235
|
+
const integrationOrder = v4StoryIds(record.integrationOrder);
|
|
236
|
+
if (!integrationOrder || (storyIds !== undefined && !v4SameSet(integrationOrder, storyIds))) {
|
|
237
|
+
reasons.add('plan-v4-integration-order-invalid');
|
|
238
|
+
}
|
|
239
|
+
const policy = v4Record(record.isolationPolicy);
|
|
240
|
+
if (!policy) {
|
|
241
|
+
reasons.add('plan-v4-isolation-policy-invalid');
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
if (policy.integrationOwner !== 'root_agent')
|
|
245
|
+
reasons.add('plan-v4-integration-owner-invalid');
|
|
246
|
+
if (policy.maxIntegrationConcurrency !== 1)
|
|
247
|
+
reasons.add('plan-v4-integration-concurrency-invalid');
|
|
248
|
+
if (policy.allowOuterYoloopInChild !== false || policy.allowMetaTaskPromptInChild !== false) {
|
|
249
|
+
reasons.add('plan-v4-outer-yoloop-forbidden');
|
|
250
|
+
}
|
|
251
|
+
if (policy.childWorkspace !== 'story_worktree')
|
|
252
|
+
reasons.add('plan-v4-child-workspace-invalid');
|
|
253
|
+
if (policy.rootOwnsLoop !== true || policy.rootOwnedScheduling !== 'two_phase_worktree_dag_allowed'
|
|
254
|
+
|| policy.childPromptKind !== 'per_story_worktree_phase_only'
|
|
255
|
+
|| !YOLOOP_CHILD_TASK_DELEGATION_POLICIES.includes(policy.childTaskDelegation)
|
|
256
|
+
|| (policy.maxDepth !== undefined && policy.maxDepth !== 1)
|
|
257
|
+
|| (policy.childDelegationMaxDepth !== undefined && policy.childDelegationMaxDepth !== 3)) {
|
|
258
|
+
reasons.add('plan-v4-isolation-policy-invalid');
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
if (record.promptTemplates !== undefined && (!Array.isArray(record.promptTemplates)
|
|
262
|
+
|| record.promptTemplates.some((template) => typeof template !== 'string'
|
|
263
|
+
|| !template.startsWith('*yolo @') || /\*yoloop\b/i.test(template)))) {
|
|
264
|
+
reasons.add('plan-v4-prompt-template-invalid');
|
|
265
|
+
}
|
|
266
|
+
if (record.nodes !== undefined && (!v4NodesValid(record.nodes, storyIds, record.executionBranch)
|
|
267
|
+
|| !v4PromptsMatchNodes(record.promptTemplates, record.nodes))) {
|
|
268
|
+
reasons.add('plan-v4-node-invalid');
|
|
269
|
+
}
|
|
270
|
+
if (record.childSpecContexts !== undefined && (!Array.isArray(record.childSpecContexts)
|
|
271
|
+
|| record.childSpecContexts.some((context) => {
|
|
272
|
+
const item = v4Record(context);
|
|
273
|
+
return !item || item.schemaVersion !== 1 || typeof item.storyId !== 'string'
|
|
274
|
+
|| (storyIds !== undefined && !storyIds.includes(item.storyId));
|
|
275
|
+
})
|
|
276
|
+
|| new Set(record.childSpecContexts.map((context) => v4Record(context)?.storyId)).size
|
|
277
|
+
!== record.childSpecContexts.length)) {
|
|
278
|
+
reasons.add('plan-v4-node-invalid');
|
|
279
|
+
}
|
|
280
|
+
const reasonCodes = Object.freeze([...reasons].sort());
|
|
281
|
+
return Object.freeze({ valid: reasonCodes.length === 0, reasonCodes });
|
|
282
|
+
}
|
|
283
|
+
/** Nodes: closed keys, one per story, same execution branch, distinct temporary branches, closed prompts. */
|
|
284
|
+
function v4NodesValid(value, storyIds, executionBranch) {
|
|
285
|
+
if (!Array.isArray(value))
|
|
286
|
+
return false;
|
|
287
|
+
const nodes = value.map(v4Record);
|
|
288
|
+
if (nodes.some((node) => !node || !v4HasOnlyKeys(node, V4_NODE_KEYS)))
|
|
289
|
+
return false;
|
|
290
|
+
const nodeIds = v4StoryIds(nodes.map((node) => node.storyId));
|
|
291
|
+
if (!nodeIds || (storyIds !== undefined && !v4SameSet(nodeIds, storyIds)))
|
|
292
|
+
return false;
|
|
293
|
+
const temporaryBranches = new Set();
|
|
294
|
+
for (const node of nodes) {
|
|
295
|
+
const storyId = node.storyId;
|
|
296
|
+
if (!YOLOOP_V4_NODE_PHASE_STATUSES.includes(node.phaseStatus))
|
|
297
|
+
return false;
|
|
298
|
+
if (node.executionBranch !== executionBranch || !v4IsValidBranch(node.executionBranch))
|
|
299
|
+
return false;
|
|
300
|
+
if (typeof node.baseSha !== 'string' || !V4_GIT_SHA.test(node.baseSha))
|
|
301
|
+
return false;
|
|
302
|
+
if (!v4IsValidBranch(node.temporaryBranch) || node.temporaryBranch === executionBranch
|
|
303
|
+
|| temporaryBranches.has(node.temporaryBranch))
|
|
304
|
+
return false;
|
|
305
|
+
temporaryBranches.add(node.temporaryBranch);
|
|
306
|
+
const dependencies = v4StoryIds(node.dependencies);
|
|
307
|
+
if (!dependencies || dependencies.includes(storyId))
|
|
308
|
+
return false;
|
|
309
|
+
// P230.03: an opaque reference only; any other shape (a path) fails closed.
|
|
310
|
+
if (node.worktreeRef !== undefined
|
|
311
|
+
&& (typeof node.worktreeRef !== 'string' || !YOLOOP_V4_WORKTREE_REF_PATTERN.test(node.worktreeRef)))
|
|
312
|
+
return false;
|
|
313
|
+
// The prompt phase must match the node status; non-dispatchable nodes carry none.
|
|
314
|
+
const expectedPhase = node.phaseStatus === 'phase-1'
|
|
315
|
+
? 'phase-1-prepare'
|
|
316
|
+
: node.phaseStatus === 'released' || node.phaseStatus === 'reopened' ? 'phase-2-finalize' : undefined;
|
|
317
|
+
if (node.promptTemplate !== undefined
|
|
318
|
+
&& (expectedPhase === undefined || node.promptTemplate !== yoloopV4PhasePrompt(storyId, expectedPhase)))
|
|
319
|
+
return false;
|
|
320
|
+
}
|
|
321
|
+
return true;
|
|
322
|
+
}
|
|
323
|
+
/** With nodes present, top-level prompts are exactly the node prompts in node order. */
|
|
324
|
+
function v4PromptsMatchNodes(promptTemplates, nodes) {
|
|
325
|
+
if (!Array.isArray(nodes))
|
|
326
|
+
return true;
|
|
327
|
+
const expected = nodes.flatMap((node) => {
|
|
328
|
+
const prompt = v4Record(node)?.promptTemplate;
|
|
329
|
+
return typeof prompt === 'string' ? [prompt] : [];
|
|
330
|
+
});
|
|
331
|
+
return v4SameList(promptTemplates ?? [], expected);
|
|
332
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.20 | OrNexus Team — Development orchestrator candidate (native-needs-validation)."
|
|
4
4
|
status: native-needs-validation
|
|
5
5
|
source: https://antigravity.google/docs/subagents
|
|
6
6
|
tools:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex-root
|
|
3
|
-
description: "🧠 Neocortex Root Agent v4.66.
|
|
3
|
+
description: "🧠 Neocortex Root Agent v4.66.20 | OrNexus Team"
|
|
4
4
|
model: opus
|
|
5
5
|
color: blue
|
|
6
6
|
tools:
|
|
@@ -113,7 +113,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
113
113
|
┌────────────────────────────────────────────────────────────┐
|
|
114
114
|
│ │
|
|
115
115
|
│ ####### N E O C O R T E X │
|
|
116
|
-
│ ### ######## v4.66.
|
|
116
|
+
│ ### ######## v4.66.20 │
|
|
117
117
|
│ ######### ##### │
|
|
118
118
|
│ ## ############## Development Orchestrator │
|
|
119
119
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -102,7 +102,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
102
102
|
┌────────────────────────────────────────────────────────────┐
|
|
103
103
|
│ │
|
|
104
104
|
│ ####### N E O C O R T E X │
|
|
105
|
-
│ ### ######## v4.66.
|
|
105
|
+
│ ### ######## v4.66.20 │
|
|
106
106
|
│ ######### ##### │
|
|
107
107
|
│ ## ############## Development Orchestrator │
|
|
108
108
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.20 | OrNexus Team"
|
|
4
4
|
model: opus
|
|
5
5
|
color: blue
|
|
6
6
|
permissionMode: bypassPermissions
|
|
@@ -113,7 +113,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
113
113
|
┌────────────────────────────────────────────────────────────┐
|
|
114
114
|
│ │
|
|
115
115
|
│ ####### N E O C O R T E X │
|
|
116
|
-
│ ### ######## v4.66.
|
|
116
|
+
│ ### ######## v4.66.20 │
|
|
117
117
|
│ ######### ##### │
|
|
118
118
|
│ ## ############## Development Orchestrator │
|
|
119
119
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -28,7 +28,7 @@ returned instructions.
|
|
|
28
28
|
|
|
29
29
|
<!-- END: Plugin Conflict Prevention -->
|
|
30
30
|
|
|
31
|
-
# Neocortex v4.66.
|
|
31
|
+
# Neocortex v4.66.20 | OrNexus Team
|
|
32
32
|
|
|
33
33
|
You are a Development Orchestrator. All orchestration logic is delivered by the remote Neocortex server.
|
|
34
34
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Codex custom agent reference:
|
|
2
2
|
# https://developers.openai.com/codex/subagents
|
|
3
3
|
name = "neocortex"
|
|
4
|
-
description = "🧠 Neocortex v4.66.
|
|
4
|
+
description = "🧠 Neocortex v4.66.20 | OrNexus Team — Development orchestrator for direct @neocortex requests."
|
|
5
5
|
# [P201-EV-CODEX-GEMINI] Approval and sandbox keys are intentionally omitted.
|
|
6
6
|
# Codex reapplies the parent turn's live sandbox/approval settings, including
|
|
7
7
|
# --yolo, when spawning this profile. This profile must not claim child-only max.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.20 | OrNexus Team"
|
|
4
4
|
model: inherit
|
|
5
5
|
readonly: false
|
|
6
6
|
is_background: false
|
|
@@ -115,7 +115,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
115
115
|
┌────────────────────────────────────────────────────────────┐
|
|
116
116
|
│ │
|
|
117
117
|
│ ####### N E O C O R T E X │
|
|
118
|
-
│ ### ######## v4.66.
|
|
118
|
+
│ ### ######## v4.66.20 │
|
|
119
119
|
│ ######### ##### │
|
|
120
120
|
│ ## ############## Development Orchestrator │
|
|
121
121
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.20 | OrNexus Team — Route explicit Neocortex *commands through the public thin client in DeepSeek Harness."
|
|
4
4
|
user-invocable: true
|
|
5
5
|
disable-model-invocation: false
|
|
6
6
|
---
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex-root
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.20 | OrNexus Team"
|
|
4
4
|
kind: local
|
|
5
5
|
tools:
|
|
6
6
|
# File operations (Gemini CLI built-ins)
|
|
@@ -73,7 +73,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
73
73
|
┌────────────────────────────────────────────────────────────┐
|
|
74
74
|
│ │
|
|
75
75
|
│ ####### N E O C O R T E X │
|
|
76
|
-
│ ### ######## v4.66.
|
|
76
|
+
│ ### ######## v4.66.20 │
|
|
77
77
|
│ ######### ##### │
|
|
78
78
|
│ ## ############## Development Orchestrator │
|
|
79
79
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.20 | OrNexus Team"
|
|
4
4
|
kind: local
|
|
5
5
|
tools:
|
|
6
6
|
# File operations (Gemini CLI built-ins)
|
|
@@ -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.66.
|
|
75
|
+
│ ### ######## v4.66.20 │
|
|
76
76
|
│ ######### ##### │
|
|
77
77
|
│ ## ############## Development Orchestrator │
|
|
78
78
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.20 | OrNexus Team — Run development orchestration commands through the public thin client."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Neocortex for Grok Build
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.20 | OrNexus Team — Development orchestrator candidate (native-needs-validation)."
|
|
4
4
|
status: native-needs-validation
|
|
5
5
|
source: https://www.kimi.com/code/docs/en/kimi-code-cli/customization/agents.html
|
|
6
6
|
model_preference: primary
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.20 | OrNexus Team — Run Neocortex commands through the public thin client in OpenClaw."
|
|
4
4
|
status: skill-fallback
|
|
5
5
|
user-invocable: true
|
|
6
6
|
---
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex-root
|
|
3
|
-
description: "🧠 Neocortex Root Agent v4.66.
|
|
3
|
+
description: "🧠 Neocortex Root Agent v4.66.20 (Pro) | OrNexus Team — Development orchestrator for *yoloop."
|
|
4
4
|
mode: primary
|
|
5
5
|
color: "#00B4FF"
|
|
6
6
|
permission:
|
|
@@ -74,7 +74,7 @@ user's own `*yolo @docs/stories/<id>.story.md` is never refused.
|
|
|
74
74
|
┌────────────────────────────────────────────────────────────┐
|
|
75
75
|
│ │
|
|
76
76
|
│ ####### N E O C O R T E X │
|
|
77
|
-
│ ### ######## v4.66.
|
|
77
|
+
│ ### ######## v4.66.20 │
|
|
78
78
|
│ ######### ##### │
|
|
79
79
|
│ ## ############## Development Orchestrator │
|
|
80
80
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v4.66.
|
|
3
|
+
description: "🧠 Neocortex v4.66.20 (Pro) | OrNexus Team — Development orchestrator for *yoloop."
|
|
4
4
|
mode: primary
|
|
5
5
|
color: "#00B4FF"
|
|
6
6
|
permission:
|
|
@@ -73,7 +73,7 @@ user's own `*yolo @docs/stories/<id>.story.md` is never refused.
|
|
|
73
73
|
┌────────────────────────────────────────────────────────────┐
|
|
74
74
|
│ │
|
|
75
75
|
│ ####### N E O C O R T E X │
|
|
76
|
-
│ ### ######## v4.66.
|
|
76
|
+
│ ### ######## v4.66.20 │
|
|
77
77
|
│ ######### ##### │
|
|
78
78
|
│ ## ############## Development Orchestrator │
|
|
79
79
|
│ ## ### ###### ## OrNexus Team │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "neocortex"
|
|
3
|
-
description: "Neocortex v4.66.
|
|
3
|
+
description: "Neocortex v4.66.20 | OrNexus Team"
|
|
4
4
|
tools:
|
|
5
5
|
# Read / Edit (built-in tool sets)
|
|
6
6
|
- read
|
|
@@ -82,7 +82,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
82
82
|
┌────────────────────────────────────────────────────────────┐
|
|
83
83
|
│ │
|
|
84
84
|
│ ####### N E O C O R T E X │
|
|
85
|
-
│ ### ######## v4.66.
|
|
85
|
+
│ ### ######## v4.66.20 │
|
|
86
86
|
│ ######### ##### │
|
|
87
87
|
│ ## ############## Development Orchestrator │
|
|
88
88
|
│ ## ### ###### ## OrNexus Team │
|