@ornexus/neocortex 4.61.4 → 4.61.6

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 (254) hide show
  1. package/dist/release-source.json +1 -1
  2. package/dist/sbom.cdx.json +1193 -1193
  3. package/install.ps1 +1 -1
  4. package/install.sh +1 -1
  5. package/package.json +2 -2
  6. package/packages/client/dist/adapters/adapter-registry.js +1 -108
  7. package/packages/client/dist/adapters/antigravity-adapter.js +2 -77
  8. package/packages/client/dist/adapters/claude-code-adapter.js +3 -79
  9. package/packages/client/dist/adapters/codex-adapter.js +2 -80
  10. package/packages/client/dist/adapters/cursor-adapter.js +4 -115
  11. package/packages/client/dist/adapters/gemini-adapter.js +2 -71
  12. package/packages/client/dist/adapters/grok-adapter.js +2 -42
  13. package/packages/client/dist/adapters/index.js +1 -22
  14. package/packages/client/dist/adapters/platform-detector.js +1 -220
  15. package/packages/client/dist/adapters/target-adapter.js +0 -12
  16. package/packages/client/dist/adapters/vscode-adapter.js +2 -72
  17. package/packages/client/dist/agent/refresh-stubs.js +2 -443
  18. package/packages/client/dist/agent/update-agent-yaml.js +1 -102
  19. package/packages/client/dist/agent/update-description.js +1 -260
  20. package/packages/client/dist/cache/crypto-utils.js +1 -78
  21. package/packages/client/dist/cache/encrypted-cache.js +1 -338
  22. package/packages/client/dist/cache/in-memory-asset-cache.js +1 -73
  23. package/packages/client/dist/cache/index.js +1 -13
  24. package/packages/client/dist/cache/protected-pi-boundary.js +1 -44
  25. package/packages/client/dist/checkpoint/checkpoint-client-reader.js +2 -127
  26. package/packages/client/dist/checkpoint/index.js +1 -11
  27. package/packages/client/dist/checkpoint/shared-checkpoint-types.js +1 -32
  28. package/packages/client/dist/cli.js +5 -364
  29. package/packages/client/dist/commands/activate.js +8 -394
  30. package/packages/client/dist/commands/architecture-answers.js +7 -274
  31. package/packages/client/dist/commands/architecture-memory-terminal.js +4 -253
  32. package/packages/client/dist/commands/architecture-non-ui-continuation.js +1 -100
  33. package/packages/client/dist/commands/architecture-root-binding.js +1 -51
  34. package/packages/client/dist/commands/cache-status.js +2 -112
  35. package/packages/client/dist/commands/config.js +1 -88
  36. package/packages/client/dist/commands/doctor.js +2 -635
  37. package/packages/client/dist/commands/invoke.js +148 -7822
  38. package/packages/client/dist/commands/legacy-epic-terminal.js +1 -71
  39. package/packages/client/dist/commands/legacy-story-branch.js +1 -96
  40. package/packages/client/dist/commands/legacy-story-pr.js +1 -276
  41. package/packages/client/dist/commands/mutation-qa-checkpoint.js +5 -285
  42. package/packages/client/dist/commands/mutation-qa-gate.js +1 -54
  43. package/packages/client/dist/commands/mutation-qa-git.js +1 -41
  44. package/packages/client/dist/commands/mutation-qa-policy.js +1 -102
  45. package/packages/client/dist/commands/mutation-qa-run.js +3 -219
  46. package/packages/client/dist/commands/mutation-qa-verdict.js +1 -149
  47. package/packages/client/dist/commands/mutation-qa.js +1 -220
  48. package/packages/client/dist/commands/native-agent.js +2 -136
  49. package/packages/client/dist/commands/planning-diagnosis.js +1 -43
  50. package/packages/client/dist/commands/planning-generation.js +1 -53
  51. package/packages/client/dist/commands/planning-memory.js +1 -40
  52. package/packages/client/dist/commands/planning-research.js +1 -42
  53. package/packages/client/dist/commands/private-session.js +1 -75
  54. package/packages/client/dist/commands/property-qa.js +1 -139
  55. package/packages/client/dist/commands/qa-control.js +1 -16
  56. package/packages/client/dist/commands/qa-scan-browser-launch.js +1 -55
  57. package/packages/client/dist/commands/qa-scan-browser-route.js +1 -28
  58. package/packages/client/dist/commands/qa-scan-capture.js +5 -663
  59. package/packages/client/dist/commands/qa-scan-discovery.js +3 -376
  60. package/packages/client/dist/commands/qa-scan-review.js +5 -826
  61. package/packages/client/dist/commands/qa-synthetic-backend-capture.js +1 -266
  62. package/packages/client/dist/commands/qa-synthetic-backend-review.js +1 -297
  63. package/packages/client/dist/commands/qa-synthetic-backend.js +2 -340
  64. package/packages/client/dist/commands/qa-synthetic-broker-port.js +1 -85
  65. package/packages/client/dist/commands/qa-synthetic-browser.js +1 -39
  66. package/packages/client/dist/commands/refactor-characterization.js +21 -671
  67. package/packages/client/dist/commands/refactor-commit.js +13 -399
  68. package/packages/client/dist/commands/refactor-control.js +3 -142
  69. package/packages/client/dist/commands/refactor-cpp-assertions.js +3 -93
  70. package/packages/client/dist/commands/refactor-review.js +5 -283
  71. package/packages/client/dist/commands/refactor-root.js +7 -588
  72. package/packages/client/dist/commands/refresh-memory.js +3 -174
  73. package/packages/client/dist/commands/shared-architecture-non-ui.js +1 -24
  74. package/packages/client/dist/commands/story-checkpoint.d.ts +5 -1
  75. package/packages/client/dist/commands/story-checkpoint.js +1 -203
  76. package/packages/client/dist/commands/story-worktree.js +5 -258
  77. package/packages/client/dist/config/host-auth-broker.js +1 -60
  78. package/packages/client/dist/config/host-auth-reference.js +1 -93
  79. package/packages/client/dist/config/profile-directory.js +1 -13
  80. package/packages/client/dist/config/resolver-selection.js +1 -278
  81. package/packages/client/dist/config/secure-config.js +12 -281
  82. package/packages/client/dist/config.js +2 -224
  83. package/packages/client/dist/constants.js +1 -25
  84. package/packages/client/dist/context/context-collector.js +2 -222
  85. package/packages/client/dist/context/context-sanitizer.js +1 -145
  86. package/packages/client/dist/continuity/autonomous-governance.js +1 -285
  87. package/packages/client/dist/continuity/continuity-client-state-store.js +1 -1587
  88. package/packages/client/dist/continuity/invoke-hooks.js +1 -129
  89. package/packages/client/dist/continuity/migrations/001-initial-schema.js +2 -12
  90. package/packages/client/dist/continuity/migrations/002-processing-output-summary-indexes.js +2 -12
  91. package/packages/client/dist/continuity/migrations/003-headless-execution-attempts.js +2 -12
  92. package/packages/client/dist/continuity/migrations/004-outbox-delivery-state.js +2 -12
  93. package/packages/client/dist/continuity/migrations/005-bounded-headless-queue.js +2 -12
  94. package/packages/client/dist/continuity/migrations/006-native-agent-dispatches.js +2 -10
  95. package/packages/client/dist/continuity/native-agent-store.js +1 -69
  96. package/packages/client/dist/continuity/native-agent-types.js +1 -105
  97. package/packages/client/dist/continuity/outbox.js +1 -117
  98. package/packages/client/dist/continuity/runner-bootstrap-policy.js +1 -172
  99. package/packages/client/dist/continuity/sqlite-store.js +81 -2612
  100. package/packages/client/dist/effects/invoke-effect-gateways.js +1 -62
  101. package/packages/client/dist/errors/error-messages.js +2 -258
  102. package/packages/client/dist/errors/frontmatter-diagnostics.js +1 -125
  103. package/packages/client/dist/evidence/collector.js +1 -347
  104. package/packages/client/dist/evidence/index.js +1 -1
  105. package/packages/client/dist/evidence/types.js +0 -2
  106. package/packages/client/dist/fs/atomic-state-replace.js +1 -152
  107. package/packages/client/dist/generated/command-registry.generated.js +1 -4076
  108. package/packages/client/dist/generated/public-projections.generated.js +1 -149
  109. package/packages/client/dist/git/direct-yolo-c01-retry.js +4 -138
  110. package/packages/client/dist/git/direct-yolo-checkpoint.d.ts +70 -0
  111. package/packages/client/dist/git/direct-yolo-checkpoint.js +4 -1592
  112. package/packages/client/dist/git/epic-operational-state.js +2 -672
  113. package/packages/client/dist/git/git-lifecycle-step-ids.js +1 -14
  114. package/packages/client/dist/git/git-lifecycle-store.d.ts +22 -0
  115. package/packages/client/dist/git/git-lifecycle-store.js +8 -2500
  116. package/packages/client/dist/git/legacy-story-branch-checkpoint.js +9 -259
  117. package/packages/client/dist/git/legacy-story-branch-setup.js +4 -348
  118. package/packages/client/dist/git/legacy-story-pr.js +70 -3538
  119. package/packages/client/dist/git/neocortex-trailers.js +2 -53
  120. package/packages/client/dist/git/secure-filesystem-boundary.js +5 -182
  121. package/packages/client/dist/git/story-worktree-cleanup.js +4 -1058
  122. package/packages/client/dist/git/story-worktree-integration.d.ts +62 -0
  123. package/packages/client/dist/git/story-worktree-integration.js +3 -603
  124. package/packages/client/dist/git/story-worktree-manager.js +3 -843
  125. package/packages/client/dist/git/story-worktree-paths.js +1 -150
  126. package/packages/client/dist/git/story-write-set-extension.d.ts +44 -0
  127. package/packages/client/dist/git/story-write-set-extension.js +1 -0
  128. package/packages/client/dist/graph-retrieval/pre-command-hook.js +1 -284
  129. package/packages/client/dist/graph-retrieval/shared-graph-retrieval-contract.js +1 -237
  130. package/packages/client/dist/i18n/first-run.js +2 -60
  131. package/packages/client/dist/index.js +1 -50
  132. package/packages/client/dist/invocation/invoke-input.js +1 -24
  133. package/packages/client/dist/license/host-auth-recovery.js +1 -401
  134. package/packages/client/dist/license/index.js +1 -5
  135. package/packages/client/dist/license/license-client.js +1 -337
  136. package/packages/client/dist/machine/fingerprint.js +2 -163
  137. package/packages/client/dist/machine/index.js +1 -5
  138. package/packages/client/dist/memory/project-memory-path-scope.js +1 -62
  139. package/packages/client/dist/memory/project-memory-writer.js +41 -1117
  140. package/packages/client/dist/memory/shared-project-memory-types.js +2 -259
  141. package/packages/client/dist/migrations/epic-lifecycle-backfill.js +3 -1060
  142. package/packages/client/dist/migrations/project-identity-capability.js +1 -50
  143. package/packages/client/dist/migrations/project-identity.js +7 -493
  144. package/packages/client/dist/migrations/state-json.js +4 -393
  145. package/packages/client/dist/policy/architecture-policy.js +2 -184
  146. package/packages/client/dist/policy/index.js +1 -7
  147. package/packages/client/dist/policy/shared-policy-types.js +0 -38
  148. package/packages/client/dist/policy/subagent-approval-policy.js +1 -57
  149. package/packages/client/dist/private-execution/clean-baseline.js +2 -279
  150. package/packages/client/dist/private-execution/codex-executor.js +4 -574
  151. package/packages/client/dist/private-execution/codex-host-runtime.js +1 -137
  152. package/packages/client/dist/private-execution/codex-lifecycle-guard.js +1 -97
  153. package/packages/client/dist/private-execution/codex-scoped-permissions.js +1 -128
  154. package/packages/client/dist/private-execution/delivery.js +13 -410
  155. package/packages/client/dist/private-execution/diagnosis-root-review.js +2 -294
  156. package/packages/client/dist/private-execution/frozen-handoff.js +6 -19
  157. package/packages/client/dist/private-execution/implementation-validation.js +2 -106
  158. package/packages/client/dist/private-execution/isolated-admission.js +23 -1432
  159. package/packages/client/dist/private-execution/isolated-session.js +5 -725
  160. package/packages/client/dist/private-execution/isolated-workspace.js +1 -122
  161. package/packages/client/dist/private-execution/pact-consumer-runtime.js +3 -409
  162. package/packages/client/dist/private-execution/pact-test-source.js +1 -258
  163. package/packages/client/dist/private-execution/pact-toolchain.js +3 -290
  164. package/packages/client/dist/private-execution/pact-write-set.js +1 -172
  165. package/packages/client/dist/private-execution/planning-diagnosis-checkpoint.js +5 -406
  166. package/packages/client/dist/private-execution/planning-generation-checkpoint.js +5 -462
  167. package/packages/client/dist/private-execution/planning-memory-checkpoint.js +3 -139
  168. package/packages/client/dist/private-execution/planning-research-checkpoint.js +4 -325
  169. package/packages/client/dist/private-execution/private-report-store.js +1 -42
  170. package/packages/client/dist/private-execution/property-test-candidate.js +1 -103
  171. package/packages/client/dist/private-execution/property-test-choices.js +3 -147
  172. package/packages/client/dist/private-execution/property-test-plan.js +7 -271
  173. package/packages/client/dist/private-execution/property-test-review.js +4 -258
  174. package/packages/client/dist/private-execution/property-test-runtime.js +9 -372
  175. package/packages/client/dist/private-execution/property-test-source.js +1 -139
  176. package/packages/client/dist/private-execution/root-checkpoint.js +1 -80
  177. package/packages/client/dist/private-execution/root-memory-git-evidence.js +3 -135
  178. package/packages/client/dist/private-execution/root-memory-recovery.js +1 -93
  179. package/packages/client/dist/private-execution/root-memory-request.js +1 -29
  180. package/packages/client/dist/private-execution/root-memory-scope.js +1 -178
  181. package/packages/client/dist/private-execution/root-memory-writer.js +1 -102
  182. package/packages/client/dist/private-execution/session-lease.js +1 -63
  183. package/packages/client/dist/private-execution/shared-private-admission-types.js +1 -50
  184. package/packages/client/dist/private-execution/shared-project-validation.js +1 -66
  185. package/packages/client/dist/private-execution/shared-root-memory-types.js +1 -61
  186. package/packages/client/dist/private-execution/ux-source-validation.js +1 -372
  187. package/packages/client/dist/private-execution/ux-write-set.js +2 -191
  188. package/packages/client/dist/registry/registry-reconciliation.js +1 -234
  189. package/packages/client/dist/resilience/circuit-breaker.js +1 -170
  190. package/packages/client/dist/resilience/degradation-manager.js +1 -164
  191. package/packages/client/dist/resilience/freshness-indicator.js +1 -100
  192. package/packages/client/dist/resilience/index.js +1 -8
  193. package/packages/client/dist/resilience/recovery-detector.js +1 -74
  194. package/packages/client/dist/resolvers/asset-resolver.js +0 -13
  195. package/packages/client/dist/resolvers/local-resolver.js +8 -255
  196. package/packages/client/dist/resolvers/remote-resolver.js +1 -233
  197. package/packages/client/dist/runner/binary.js +1 -404
  198. package/packages/client/dist/runner/cli.js +17 -1571
  199. package/packages/client/dist/runner/epic-background-dispatcher.js +1 -124
  200. package/packages/client/dist/runner/headless/adapters.js +1 -49
  201. package/packages/client/dist/runner/headless/background-root.js +1 -85
  202. package/packages/client/dist/runner/headless/claude-code-adapter.js +1 -79
  203. package/packages/client/dist/runner/headless/continuous-story-workspace.js +11 -1776
  204. package/packages/client/dist/runner/headless/epic-git-reconciliation-inventory.js +1 -69
  205. package/packages/client/dist/runner/headless/epic-merge-candidate-qa.js +2 -111
  206. package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.js +10 -1464
  207. package/packages/client/dist/runner/headless/epic-terminal-git-runner.js +2 -357
  208. package/packages/client/dist/runner/headless/fake-adapter.js +1 -62
  209. package/packages/client/dist/runner/headless/managed-environment-cleanup.js +1 -274
  210. package/packages/client/dist/runner/headless/managed-profile.js +1 -149
  211. package/packages/client/dist/runner/headless/opencode-adapter.js +2 -145
  212. package/packages/client/dist/runner/headless/prepared-story-bundle.js +1 -43
  213. package/packages/client/dist/runner/headless/resolver.js +1 -231
  214. package/packages/client/dist/runner/headless/run-yolo.js +1 -886
  215. package/packages/client/dist/runner/headless/run-yoloop.js +2 -2657
  216. package/packages/client/dist/runner/headless/types.js +2 -575
  217. package/packages/client/dist/runner/host-capacity.js +1 -59
  218. package/packages/client/dist/runner/local-console.js +13 -396
  219. package/packages/client/dist/runner/portal-sync-worker.js +1 -1487
  220. package/packages/client/dist/runner/project-identity.js +1 -106
  221. package/packages/client/dist/runner/scheduler.js +7 -995
  222. package/packages/client/dist/runner-cli.js +2 -18
  223. package/packages/client/dist/state/invocation-shape.js +1 -13
  224. package/packages/client/dist/state/project-state-snapshot.js +1 -1754
  225. package/packages/client/dist/state/state-json-repair.js +3 -785
  226. package/packages/client/dist/state/structural-dag-projection.js +1 -118
  227. package/packages/client/dist/telemetry/index.js +1 -5
  228. package/packages/client/dist/telemetry/offline-queue.js +1 -131
  229. package/packages/client/dist/tier/index.js +1 -5
  230. package/packages/client/dist/tier/tier-aware-client.js +1 -405
  231. package/packages/client/dist/types/index.js +1 -38
  232. package/packages/client/dist/version.js +1 -27
  233. package/packages/client/dist/yolo/change-evidence-collector.d.ts +10 -0
  234. package/packages/client/dist/yolo/change-evidence-collector.js +1 -245
  235. package/packages/client/dist/yolo/invoke-envelope-capability.js +1 -65
  236. package/packages/client/dist/yolo/spec-envelope-collector.js +5 -184
  237. package/packages/client/dist/yoloop/discovery-hook.js +2 -300
  238. package/packages/client/dist/yoloop/index.js +1 -8
  239. package/packages/client/dist/yoloop/invoke-hooks.js +12 -669
  240. package/packages/client/dist/yoloop/shared-discover-epics.js +1 -1007
  241. package/packages/client/dist/yoloop/shared-yoloop-types.js +1 -33
  242. package/packages/client/dist/yoloop/target-normalization.js +1 -180
  243. package/packages/client/dist/yoloop/yoloop-client-state-store.js +1 -1920
  244. package/targets-stubs/antigravity/gemini.md +1 -1
  245. package/targets-stubs/antigravity/skill/SKILL.md +1 -1
  246. package/targets-stubs/claude-code/neocortex-root.agent.yaml +1 -1
  247. package/targets-stubs/claude-code/neocortex-root.md +2 -2
  248. package/targets-stubs/claude-code/neocortex.agent.yaml +1 -1
  249. package/targets-stubs/claude-code/neocortex.md +2 -2
  250. package/targets-stubs/codex/AGENTS.md +1 -1
  251. package/targets-stubs/cursor/agent.md +2 -2
  252. package/targets-stubs/gemini-cli/agent.md +2 -2
  253. package/targets-stubs/opencode/neocortex-root.md +1 -1
  254. package/targets-stubs/vscode/neocortex.agent.md +2 -2
@@ -1,259 +1,2 @@
1
- /**
2
- * P130.06: Client-side SSoT-Shadow mirror for project memory targets.
3
- *
4
- * The published client tarball must not import the workspace-only shared package
5
- * at runtime. Keep this file in sync with `packages/shared/src/project-memory-*`
6
- * and enforce drift through the P130.06 release tests.
7
- */
8
- function projectFileRefs(...paths) {
9
- return paths.map((path) => ({ scope: 'project', path }));
10
- }
11
- export const CANONICAL_PROJECT_MEMORY_SOURCE = 'NEOCORTEX.md';
12
- const MANDATORY_SEMANTIC_SYMLINK = {
13
- canonicalSource: CANONICAL_PROJECT_MEMORY_SOURCE,
14
- semanticFileRequired: true,
15
- symlinkBacked: true,
16
- wrapperAllowed: false,
17
- includeFallbackAllowed: false,
18
- requiresWrapperPreservation: false,
19
- fallbackIsCompatibilityRemediation: true,
20
- policy: 'mandatory-semantic-symlink',
21
- notes: 'Semantic platform memory file must resolve to NEOCORTEX.md through a symlink; do not replace it with an unrelated wrapper or copied frontmatter.',
22
- };
23
- const SYMLINK_BACKED_WRAPPER = {
24
- canonicalSource: CANONICAL_PROJECT_MEMORY_SOURCE,
25
- semanticFileRequired: true,
26
- symlinkBacked: true,
27
- wrapperAllowed: true,
28
- includeFallbackAllowed: false,
29
- requiresWrapperPreservation: true,
30
- fallbackIsCompatibilityRemediation: true,
31
- policy: 'symlink-backed-wrapper',
32
- notes: 'Platform wrapper/frontmatter is allowed only when the semantic memory payload remains symlink-backed by NEOCORTEX.md.',
33
- };
34
- const SAFE_INCLUDE_FALLBACK = {
35
- canonicalSource: CANONICAL_PROJECT_MEMORY_SOURCE,
36
- semanticFileRequired: true,
37
- symlinkBacked: true,
38
- wrapperAllowed: true,
39
- includeFallbackAllowed: true,
40
- requiresWrapperPreservation: true,
41
- fallbackIsCompatibilityRemediation: true,
42
- policy: 'safe-include-fallback',
43
- notes: 'Use a safe include/import only for platforms that cannot consume symlinks directly; the include must resolve back to NEOCORTEX.md.',
44
- };
45
- function bidirectionalReference(requirement) {
46
- return {
47
- canonicalSource: CANONICAL_PROJECT_MEMORY_SOURCE,
48
- resolvesVia: requirement.policy,
49
- feedbackTrigger: '*update-memory',
50
- guidance: 'Treat NEOCORTEX.md as canonical project memory; consult it before platform-specific memory, and run *update-memory when durable project context changes should flow back to the canonical source.',
51
- };
52
- }
53
- export const PROJECT_MEMORY_TARGET_IDS = [
54
- 'claude-code',
55
- 'codex',
56
- 'grok',
57
- 'gemini-cli',
58
- 'antigravity',
59
- 'vscode',
60
- 'cursor',
61
- 'opencode',
62
- 'openclaw',
63
- 'kimi',
64
- 'github-copilot-cli',
65
- ];
66
- export const PROJECT_MEMORY_TARGETS = {
67
- canonical: {
68
- targetId: 'canonical',
69
- platformName: 'Neocortex Canonical Memory',
70
- canonicalSource: CANONICAL_PROJECT_MEMORY_SOURCE,
71
- primaryFile: CANONICAL_PROJECT_MEMORY_SOURCE,
72
- secondaryFiles: projectFileRefs('AGENTS.md', 'CLAUDE.md', 'GEMINI.md'),
73
- ownedBlockName: 'NEOCORTEX-MEMORY',
74
- templateKind: 'neocortex-md',
75
- budget: { maxLines: 220, maxBytes: 18_000 },
76
- linkRequirement: MANDATORY_SEMANTIC_SYMLINK,
77
- bidirectionalReference: bidirectionalReference(MANDATORY_SEMANTIC_SYMLINK),
78
- requiresWrapperPreservation: false,
79
- notes: 'Canonical compact project memory source for platform symlinks and wrappers. Store only summaries, indexes, and links to architecture docs here.',
80
- },
81
- 'claude-code': {
82
- targetId: 'claude-code',
83
- platformName: 'Claude Code',
84
- canonicalSource: CANONICAL_PROJECT_MEMORY_SOURCE,
85
- primaryFile: 'CLAUDE.md',
86
- // .claude/agents/ is the subagent discovery directory; a memory wrapper there
87
- // shadows the real `neocortex` agent, so CLAUDE.md is the only wrapper.
88
- secondaryFiles: projectFileRefs(),
89
- ownedBlockName: 'NEOCORTEX-MEMORY',
90
- templateKind: 'claude-md',
91
- budget: { maxLines: 320, maxBytes: 28_000 },
92
- linkRequirement: MANDATORY_SEMANTIC_SYMLINK,
93
- bidirectionalReference: bidirectionalReference(MANDATORY_SEMANTIC_SYMLINK),
94
- requiresWrapperPreservation: false,
95
- notes: 'Claude Code project memory. Resolve to NEOCORTEX.md; keep root content concise and link deeper docs with @path references.',
96
- },
97
- codex: {
98
- targetId: 'codex',
99
- platformName: 'Codex CLI',
100
- canonicalSource: CANONICAL_PROJECT_MEMORY_SOURCE,
101
- primaryFile: 'AGENTS.md',
102
- secondaryFiles: projectFileRefs('.codex/agents/neocortex.toml'),
103
- ownedBlockName: 'NEOCORTEX-MEMORY',
104
- templateKind: 'agents-md',
105
- budget: { maxLines: 220, maxBytes: 18_000 },
106
- linkRequirement: MANDATORY_SEMANTIC_SYMLINK,
107
- bidirectionalReference: bidirectionalReference(MANDATORY_SEMANTIC_SYMLINK),
108
- requiresWrapperPreservation: true,
109
- notes: 'Codex root instructions. Uppercase AGENTS.md is required on case-sensitive filesystems.',
110
- },
111
- grok: {
112
- targetId: 'grok',
113
- platformName: 'Grok Build',
114
- canonicalSource: CANONICAL_PROJECT_MEMORY_SOURCE,
115
- primaryFile: 'AGENTS.md',
116
- secondaryFiles: projectFileRefs('.grok/skills/neocortex/SKILL.md'),
117
- ownedBlockName: 'NEOCORTEX-MEMORY',
118
- templateKind: 'agents-md',
119
- budget: { maxLines: 220, maxBytes: 18_000 },
120
- linkRequirement: MANDATORY_SEMANTIC_SYMLINK,
121
- bidirectionalReference: bidirectionalReference(MANDATORY_SEMANTIC_SYMLINK),
122
- requiresWrapperPreservation: true,
123
- notes: 'Grok Build reads AGENTS.md and the project-local Neocortex Skill; both resolve to canonical NEOCORTEX.md context.',
124
- },
125
- 'gemini-cli': {
126
- targetId: 'gemini-cli',
127
- platformName: 'Gemini CLI',
128
- canonicalSource: CANONICAL_PROJECT_MEMORY_SOURCE,
129
- primaryFile: 'GEMINI.md',
130
- // .gemini/agents/neocortex.md is the native subagent written by the installer;
131
- // GEMINI.md is the only memory wrapper.
132
- secondaryFiles: projectFileRefs(),
133
- ownedBlockName: 'NEOCORTEX-MEMORY',
134
- templateKind: 'gemini-md',
135
- budget: { maxLines: 260, maxBytes: 22_000 },
136
- linkRequirement: MANDATORY_SEMANTIC_SYMLINK,
137
- bidirectionalReference: bidirectionalReference(MANDATORY_SEMANTIC_SYMLINK),
138
- requiresWrapperPreservation: false,
139
- notes: 'Gemini CLI context file. Prefer shallow @file.md imports for detailed architecture docs.',
140
- },
141
- antigravity: {
142
- targetId: 'antigravity',
143
- platformName: 'Antigravity',
144
- canonicalSource: CANONICAL_PROJECT_MEMORY_SOURCE,
145
- primaryFile: 'GEMINI.md',
146
- // .gemini/agents/neocortex.md is the native subagent written by the installer;
147
- // GEMINI.md is the only memory wrapper.
148
- secondaryFiles: projectFileRefs(),
149
- ownedBlockName: 'NEOCORTEX-MEMORY',
150
- templateKind: 'gemini-md',
151
- budget: { maxLines: 260, maxBytes: 22_000 },
152
- linkRequirement: MANDATORY_SEMANTIC_SYMLINK,
153
- bidirectionalReference: bidirectionalReference(MANDATORY_SEMANTIC_SYMLINK),
154
- requiresWrapperPreservation: false,
155
- notes: 'Antigravity currently shares GEMINI.md behavior with the Gemini target stubs.',
156
- },
157
- vscode: {
158
- targetId: 'vscode',
159
- platformName: 'VS Code / GitHub Copilot',
160
- canonicalSource: CANONICAL_PROJECT_MEMORY_SOURCE,
161
- primaryFile: '.github/copilot-instructions.md',
162
- secondaryFiles: projectFileRefs('.github/instructions/neocortex.instructions.md', '.github/agents/neocortex.agent.md'),
163
- ownedBlockName: 'NEOCORTEX-MEMORY',
164
- templateKind: 'copilot-instructions',
165
- budget: { maxLines: 180, maxBytes: 14_000 },
166
- linkRequirement: SYMLINK_BACKED_WRAPPER,
167
- bidirectionalReference: bidirectionalReference(SYMLINK_BACKED_WRAPPER),
168
- requiresWrapperPreservation: true,
169
- notes: 'VS Code and GitHub Copilot always-on repository instructions.',
170
- },
171
- cursor: {
172
- targetId: 'cursor',
173
- platformName: 'Cursor',
174
- canonicalSource: CANONICAL_PROJECT_MEMORY_SOURCE,
175
- primaryFile: '.cursor/rules/neocortex.mdc',
176
- secondaryFiles: projectFileRefs('AGENTS.md'),
177
- ownedBlockName: 'NEOCORTEX-MEMORY',
178
- templateKind: 'cursor-rule',
179
- budget: { maxLines: 180, maxBytes: 14_000 },
180
- linkRequirement: SYMLINK_BACKED_WRAPPER,
181
- bidirectionalReference: bidirectionalReference(SYMLINK_BACKED_WRAPPER),
182
- requiresWrapperPreservation: true,
183
- notes: 'Cursor rule memory. Use AGENTS.md as compatibility fallback when Cursor rules are absent.',
184
- },
185
- opencode: {
186
- targetId: 'opencode',
187
- platformName: 'OpenCode',
188
- canonicalSource: CANONICAL_PROJECT_MEMORY_SOURCE,
189
- primaryFile: 'AGENTS.md',
190
- secondaryFiles: projectFileRefs('.opencode/AGENTS.md', '.opencode/agents/neocortex-root.md', '.opencode/agents/neocortex.md', '.agent/skills/neocortex/SKILL.md'),
191
- ownedBlockName: 'NEOCORTEX-MEMORY',
192
- templateKind: 'agents-md',
193
- budget: { maxLines: 220, maxBytes: 18_000 },
194
- linkRequirement: MANDATORY_SEMANTIC_SYMLINK,
195
- bidirectionalReference: bidirectionalReference(MANDATORY_SEMANTIC_SYMLINK),
196
- requiresWrapperPreservation: true,
197
- notes: 'OpenCode agent memory. It consumes AGENTS.md-compatible instructions and must resolve to canonical NEOCORTEX.md.',
198
- },
199
- openclaw: {
200
- targetId: 'openclaw',
201
- platformName: 'OpenClaw',
202
- canonicalSource: CANONICAL_PROJECT_MEMORY_SOURCE,
203
- primaryFile: '.openclaw/skills/neocortex/SKILL.md',
204
- secondaryFiles: [{ scope: 'user', path: '.openclaw/skills/neocortex/SKILL.md' }],
205
- ownedBlockName: 'NEOCORTEX-MEMORY',
206
- templateKind: 'agents-md',
207
- budget: { maxLines: 220, maxBytes: 18_000 },
208
- linkRequirement: SAFE_INCLUDE_FALLBACK,
209
- bidirectionalReference: bidirectionalReference(SAFE_INCLUDE_FALLBACK),
210
- requiresWrapperPreservation: true,
211
- notes: 'OpenClaw Skill thin-client memory entrypoint. Use the project Skill path when --create-project is requested; do not mutate ~/.openclaw/openclaw.json, and keep memory content public-safe.',
212
- },
213
- kimi: {
214
- targetId: 'kimi',
215
- platformName: 'Kimi',
216
- canonicalSource: CANONICAL_PROJECT_MEMORY_SOURCE,
217
- primaryFile: 'KIMI.md',
218
- secondaryFiles: projectFileRefs('AGENTS.md', '.kimi/skills/neocortex/SKILL.md'),
219
- ownedBlockName: 'NEOCORTEX-MEMORY',
220
- templateKind: 'agents-md',
221
- budget: { maxLines: 220, maxBytes: 18_000 },
222
- linkRequirement: SAFE_INCLUDE_FALLBACK,
223
- bidirectionalReference: bidirectionalReference(SAFE_INCLUDE_FALLBACK),
224
- requiresWrapperPreservation: true,
225
- notes: 'Kimi memory entrypoint. Prefer a symlink to NEOCORTEX.md; use a compact include only if the host cannot follow symlinks.',
226
- },
227
- 'github-copilot-cli': {
228
- targetId: 'github-copilot-cli',
229
- platformName: 'GitHub Copilot CLI / gh alias',
230
- canonicalSource: CANONICAL_PROJECT_MEMORY_SOURCE,
231
- primaryFile: '.github/copilot-instructions.md',
232
- secondaryFiles: projectFileRefs('AGENTS.md'),
233
- ownedBlockName: 'NEOCORTEX-MEMORY',
234
- templateKind: 'copilot-instructions',
235
- budget: { maxLines: 180, maxBytes: 14_000 },
236
- linkRequirement: SAFE_INCLUDE_FALLBACK,
237
- bidirectionalReference: bidirectionalReference(SAFE_INCLUDE_FALLBACK),
238
- requiresWrapperPreservation: true,
239
- notes: 'GitHub Copilot CLI or gh alias instructions. Resolve compact memory back to NEOCORTEX.md without copying private prompt bodies.',
240
- },
241
- };
242
- export function getProjectMemoryTarget(targetId) {
243
- return PROJECT_MEMORY_TARGETS[targetId];
244
- }
245
- export function isProjectMemoryTargetId(value) {
246
- return value === 'canonical' || PROJECT_MEMORY_TARGET_IDS.includes(value);
247
- }
248
- export function listProjectMemoryTargets() {
249
- return PROJECT_MEMORY_TARGET_IDS.map((targetId) => PROJECT_MEMORY_TARGETS[targetId]);
250
- }
251
- export function renderArchitectureReferenceTable(references) {
252
- const escapeCell = (value) => value.replace(/\|/g, '\\|').replace(/\n/g, ' ');
253
- const rows = references.map((reference) => `| ${escapeCell(reference.path)} | ${escapeCell(reference.title)} | ${escapeCell(reference.purpose)} | ${escapeCell(reference.suggestedUsage)} |`);
254
- return [
255
- '| Path | Title | Purpose | Suggested Usage |',
256
- '| --- | --- | --- | --- |',
257
- ...rows,
258
- ].join('\n');
259
- }
1
+ function i(...t){return t.map(a=>({scope:"project",path:a}))}const e="NEOCORTEX.md",r={canonicalSource:e,semanticFileRequired:!0,symlinkBacked:!0,wrapperAllowed:!1,includeFallbackAllowed:!1,requiresWrapperPreservation:!1,fallbackIsCompatibilityRemediation:!0,policy:"mandatory-semantic-symlink",notes:"Semantic platform memory file must resolve to NEOCORTEX.md through a symlink; do not replace it with an unrelated wrapper or copied frontmatter."},l={canonicalSource:e,semanticFileRequired:!0,symlinkBacked:!0,wrapperAllowed:!0,includeFallbackAllowed:!1,requiresWrapperPreservation:!0,fallbackIsCompatibilityRemediation:!0,policy:"symlink-backed-wrapper",notes:"Platform wrapper/frontmatter is allowed only when the semantic memory payload remains symlink-backed by NEOCORTEX.md."},c={canonicalSource:e,semanticFileRequired:!0,symlinkBacked:!0,wrapperAllowed:!0,includeFallbackAllowed:!0,requiresWrapperPreservation:!0,fallbackIsCompatibilityRemediation:!0,policy:"safe-include-fallback",notes:"Use a safe include/import only for platforms that cannot consume symlinks directly; the include must resolve back to NEOCORTEX.md."};function o(t){return{canonicalSource:e,resolvesVia:t.policy,feedbackTrigger:"*update-memory",guidance:"Treat NEOCORTEX.md as canonical project memory; consult it before platform-specific memory, and run *update-memory when durable project context changes should flow back to the canonical source."}}const s=["claude-code","codex","grok","gemini-cli","antigravity","vscode","cursor","opencode","openclaw","kimi","github-copilot-cli"],m={canonical:{targetId:"canonical",platformName:"Neocortex Canonical Memory",canonicalSource:e,primaryFile:e,secondaryFiles:i("AGENTS.md","CLAUDE.md","GEMINI.md"),ownedBlockName:"NEOCORTEX-MEMORY",templateKind:"neocortex-md",budget:{maxLines:220,maxBytes:18e3},linkRequirement:r,bidirectionalReference:o(r),requiresWrapperPreservation:!1,notes:"Canonical compact project memory source for platform symlinks and wrappers. Store only summaries, indexes, and links to architecture docs here."},"claude-code":{targetId:"claude-code",platformName:"Claude Code",canonicalSource:e,primaryFile:"CLAUDE.md",secondaryFiles:i(),ownedBlockName:"NEOCORTEX-MEMORY",templateKind:"claude-md",budget:{maxLines:320,maxBytes:28e3},linkRequirement:r,bidirectionalReference:o(r),requiresWrapperPreservation:!1,notes:"Claude Code project memory. Resolve to NEOCORTEX.md; keep root content concise and link deeper docs with @path references."},codex:{targetId:"codex",platformName:"Codex CLI",canonicalSource:e,primaryFile:"AGENTS.md",secondaryFiles:i(".codex/agents/neocortex.toml"),ownedBlockName:"NEOCORTEX-MEMORY",templateKind:"agents-md",budget:{maxLines:220,maxBytes:18e3},linkRequirement:r,bidirectionalReference:o(r),requiresWrapperPreservation:!0,notes:"Codex root instructions. Uppercase AGENTS.md is required on case-sensitive filesystems."},grok:{targetId:"grok",platformName:"Grok Build",canonicalSource:e,primaryFile:"AGENTS.md",secondaryFiles:i(".grok/skills/neocortex/SKILL.md"),ownedBlockName:"NEOCORTEX-MEMORY",templateKind:"agents-md",budget:{maxLines:220,maxBytes:18e3},linkRequirement:r,bidirectionalReference:o(r),requiresWrapperPreservation:!0,notes:"Grok Build reads AGENTS.md and the project-local Neocortex Skill; both resolve to canonical NEOCORTEX.md context."},"gemini-cli":{targetId:"gemini-cli",platformName:"Gemini CLI",canonicalSource:e,primaryFile:"GEMINI.md",secondaryFiles:i(),ownedBlockName:"NEOCORTEX-MEMORY",templateKind:"gemini-md",budget:{maxLines:260,maxBytes:22e3},linkRequirement:r,bidirectionalReference:o(r),requiresWrapperPreservation:!1,notes:"Gemini CLI context file. Prefer shallow @file.md imports for detailed architecture docs."},antigravity:{targetId:"antigravity",platformName:"Antigravity",canonicalSource:e,primaryFile:"GEMINI.md",secondaryFiles:i(),ownedBlockName:"NEOCORTEX-MEMORY",templateKind:"gemini-md",budget:{maxLines:260,maxBytes:22e3},linkRequirement:r,bidirectionalReference:o(r),requiresWrapperPreservation:!1,notes:"Antigravity currently shares GEMINI.md behavior with the Gemini target stubs."},vscode:{targetId:"vscode",platformName:"VS Code / GitHub Copilot",canonicalSource:e,primaryFile:".github/copilot-instructions.md",secondaryFiles:i(".github/instructions/neocortex.instructions.md",".github/agents/neocortex.agent.md"),ownedBlockName:"NEOCORTEX-MEMORY",templateKind:"copilot-instructions",budget:{maxLines:180,maxBytes:14e3},linkRequirement:l,bidirectionalReference:o(l),requiresWrapperPreservation:!0,notes:"VS Code and GitHub Copilot always-on repository instructions."},cursor:{targetId:"cursor",platformName:"Cursor",canonicalSource:e,primaryFile:".cursor/rules/neocortex.mdc",secondaryFiles:i("AGENTS.md"),ownedBlockName:"NEOCORTEX-MEMORY",templateKind:"cursor-rule",budget:{maxLines:180,maxBytes:14e3},linkRequirement:l,bidirectionalReference:o(l),requiresWrapperPreservation:!0,notes:"Cursor rule memory. Use AGENTS.md as compatibility fallback when Cursor rules are absent."},opencode:{targetId:"opencode",platformName:"OpenCode",canonicalSource:e,primaryFile:"AGENTS.md",secondaryFiles:i(".opencode/AGENTS.md",".opencode/agents/neocortex-root.md",".opencode/agents/neocortex.md",".agent/skills/neocortex/SKILL.md"),ownedBlockName:"NEOCORTEX-MEMORY",templateKind:"agents-md",budget:{maxLines:220,maxBytes:18e3},linkRequirement:r,bidirectionalReference:o(r),requiresWrapperPreservation:!0,notes:"OpenCode agent memory. It consumes AGENTS.md-compatible instructions and must resolve to canonical NEOCORTEX.md."},openclaw:{targetId:"openclaw",platformName:"OpenClaw",canonicalSource:e,primaryFile:".openclaw/skills/neocortex/SKILL.md",secondaryFiles:[{scope:"user",path:".openclaw/skills/neocortex/SKILL.md"}],ownedBlockName:"NEOCORTEX-MEMORY",templateKind:"agents-md",budget:{maxLines:220,maxBytes:18e3},linkRequirement:c,bidirectionalReference:o(c),requiresWrapperPreservation:!0,notes:"OpenClaw Skill thin-client memory entrypoint. Use the project Skill path when --create-project is requested; do not mutate ~/.openclaw/openclaw.json, and keep memory content public-safe."},kimi:{targetId:"kimi",platformName:"Kimi",canonicalSource:e,primaryFile:"KIMI.md",secondaryFiles:i("AGENTS.md",".kimi/skills/neocortex/SKILL.md"),ownedBlockName:"NEOCORTEX-MEMORY",templateKind:"agents-md",budget:{maxLines:220,maxBytes:18e3},linkRequirement:c,bidirectionalReference:o(c),requiresWrapperPreservation:!0,notes:"Kimi memory entrypoint. Prefer a symlink to NEOCORTEX.md; use a compact include only if the host cannot follow symlinks."},"github-copilot-cli":{targetId:"github-copilot-cli",platformName:"GitHub Copilot CLI / gh alias",canonicalSource:e,primaryFile:".github/copilot-instructions.md",secondaryFiles:i("AGENTS.md"),ownedBlockName:"NEOCORTEX-MEMORY",templateKind:"copilot-instructions",budget:{maxLines:180,maxBytes:14e3},linkRequirement:c,bidirectionalReference:o(c),requiresWrapperPreservation:!0,notes:"GitHub Copilot CLI or gh alias instructions. Resolve compact memory back to NEOCORTEX.md without copying private prompt bodies."}};function p(t){return m[t]}function u(t){return t==="canonical"||s.includes(t)}function y(){return s.map(t=>m[t])}function E(t){const a=n=>n.replace(/\|/g,"\\|").replace(/\n/g," ");return["| Path | Title | Purpose | Suggested Usage |","| --- | --- | --- | --- |",...t.map(n=>`| ${a(n.path)} | ${a(n.title)} | ${a(n.purpose)} | ${a(n.suggestedUsage)} |`)].join(`
2
+ `)}export{e as CANONICAL_PROJECT_MEMORY_SOURCE,m as PROJECT_MEMORY_TARGETS,s as PROJECT_MEMORY_TARGET_IDS,p as getProjectMemoryTarget,u as isProjectMemoryTargetId,y as listProjectMemoryTargets,E as renderArchitectureReferenceTable};