@ornexus/neocortex 4.60.78 → 4.60.80
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 -1206
- package/install.ps1 +1 -1
- package/install.sh +1 -1
- package/package.json +2 -2
- package/packages/client/dist/adapters/adapter-registry.js +108 -1
- package/packages/client/dist/adapters/antigravity-adapter.js +77 -2
- package/packages/client/dist/adapters/claude-code-adapter.js +79 -3
- package/packages/client/dist/adapters/codex-adapter.js +80 -2
- package/packages/client/dist/adapters/cursor-adapter.js +115 -4
- package/packages/client/dist/adapters/gemini-adapter.js +71 -2
- package/packages/client/dist/adapters/grok-adapter.js +42 -2
- package/packages/client/dist/adapters/index.js +22 -1
- package/packages/client/dist/adapters/platform-detector.js +214 -1
- package/packages/client/dist/adapters/target-adapter.js +12 -0
- package/packages/client/dist/adapters/vscode-adapter.js +72 -2
- package/packages/client/dist/agent/refresh-stubs.js +443 -2
- package/packages/client/dist/agent/update-agent-yaml.js +102 -1
- package/packages/client/dist/agent/update-description.js +260 -1
- package/packages/client/dist/cache/crypto-utils.js +78 -1
- package/packages/client/dist/cache/encrypted-cache.js +338 -1
- package/packages/client/dist/cache/in-memory-asset-cache.js +73 -1
- package/packages/client/dist/cache/index.js +13 -1
- package/packages/client/dist/cache/protected-pi-boundary.js +44 -1
- package/packages/client/dist/checkpoint/checkpoint-client-reader.js +127 -2
- package/packages/client/dist/checkpoint/index.js +11 -1
- package/packages/client/dist/checkpoint/shared-checkpoint-types.js +32 -1
- package/packages/client/dist/cli.js +358 -5
- package/packages/client/dist/commands/activate.js +394 -8
- package/packages/client/dist/commands/architecture-answers.js +274 -7
- package/packages/client/dist/commands/architecture-memory-terminal.js +253 -4
- package/packages/client/dist/commands/architecture-non-ui-continuation.js +100 -1
- package/packages/client/dist/commands/architecture-root-binding.js +51 -1
- package/packages/client/dist/commands/cache-status.js +112 -2
- package/packages/client/dist/commands/config.js +88 -1
- package/packages/client/dist/commands/doctor.js +635 -2
- package/packages/client/dist/commands/invoke.js +7712 -143
- package/packages/client/dist/commands/legacy-epic-terminal.js +71 -1
- package/packages/client/dist/commands/legacy-story-branch.js +96 -1
- package/packages/client/dist/commands/legacy-story-pr.js +276 -1
- package/packages/client/dist/commands/mutation-qa-checkpoint.js +285 -5
- package/packages/client/dist/commands/mutation-qa-gate.js +54 -1
- package/packages/client/dist/commands/mutation-qa-git.js +41 -1
- package/packages/client/dist/commands/mutation-qa-policy.js +102 -1
- package/packages/client/dist/commands/mutation-qa-run.js +219 -3
- package/packages/client/dist/commands/mutation-qa-verdict.js +149 -1
- package/packages/client/dist/commands/mutation-qa.js +220 -1
- package/packages/client/dist/commands/native-agent.js +136 -2
- package/packages/client/dist/commands/planning-diagnosis.js +43 -1
- package/packages/client/dist/commands/planning-generation.js +53 -1
- package/packages/client/dist/commands/planning-memory.js +40 -1
- package/packages/client/dist/commands/planning-research.js +42 -1
- package/packages/client/dist/commands/private-session.js +75 -1
- package/packages/client/dist/commands/property-qa.js +139 -1
- package/packages/client/dist/commands/qa-control.js +16 -1
- package/packages/client/dist/commands/qa-scan-browser-launch.js +55 -1
- package/packages/client/dist/commands/qa-scan-browser-route.js +28 -1
- package/packages/client/dist/commands/qa-scan-capture.js +663 -5
- package/packages/client/dist/commands/qa-scan-discovery.js +376 -3
- package/packages/client/dist/commands/qa-scan-review.js +826 -5
- package/packages/client/dist/commands/qa-synthetic-backend-capture.js +266 -1
- package/packages/client/dist/commands/qa-synthetic-backend-review.js +297 -1
- package/packages/client/dist/commands/qa-synthetic-backend.js +340 -2
- package/packages/client/dist/commands/qa-synthetic-broker-port.js +85 -1
- package/packages/client/dist/commands/qa-synthetic-browser.js +39 -1
- package/packages/client/dist/commands/refactor-characterization.js +671 -21
- package/packages/client/dist/commands/refactor-commit.js +399 -13
- package/packages/client/dist/commands/refactor-control.js +142 -3
- package/packages/client/dist/commands/refactor-cpp-assertions.js +93 -3
- package/packages/client/dist/commands/refactor-review.js +283 -5
- package/packages/client/dist/commands/refactor-root.js +588 -7
- package/packages/client/dist/commands/refresh-memory.d.ts +3 -1
- package/packages/client/dist/commands/refresh-memory.js +174 -3
- package/packages/client/dist/commands/shared-architecture-non-ui.js +24 -1
- package/packages/client/dist/commands/story-checkpoint.js +171 -1
- package/packages/client/dist/config/host-auth-broker.js +60 -1
- package/packages/client/dist/config/host-auth-reference.js +93 -1
- package/packages/client/dist/config/profile-directory.js +13 -1
- package/packages/client/dist/config/resolver-selection.js +278 -1
- package/packages/client/dist/config/secure-config.js +281 -12
- package/packages/client/dist/config.js +223 -2
- package/packages/client/dist/constants.js +25 -1
- package/packages/client/dist/context/context-collector.js +222 -2
- package/packages/client/dist/context/context-sanitizer.js +145 -1
- package/packages/client/dist/continuity/autonomous-governance.js +285 -1
- package/packages/client/dist/continuity/continuity-client-state-store.js +1587 -1
- package/packages/client/dist/continuity/invoke-hooks.js +129 -1
- package/packages/client/dist/continuity/migrations/001-initial-schema.js +12 -2
- package/packages/client/dist/continuity/migrations/002-processing-output-summary-indexes.js +12 -2
- package/packages/client/dist/continuity/migrations/003-headless-execution-attempts.js +12 -2
- package/packages/client/dist/continuity/migrations/004-outbox-delivery-state.js +12 -2
- package/packages/client/dist/continuity/migrations/005-bounded-headless-queue.js +12 -2
- package/packages/client/dist/continuity/migrations/006-native-agent-dispatches.js +10 -2
- package/packages/client/dist/continuity/native-agent-store.js +69 -1
- package/packages/client/dist/continuity/native-agent-types.js +105 -1
- package/packages/client/dist/continuity/outbox.js +117 -1
- package/packages/client/dist/continuity/runner-bootstrap-policy.js +172 -1
- package/packages/client/dist/continuity/sqlite-store.js +2612 -81
- package/packages/client/dist/effects/invoke-effect-gateways.js +62 -1
- package/packages/client/dist/errors/error-messages.js +258 -2
- package/packages/client/dist/errors/frontmatter-diagnostics.js +125 -1
- package/packages/client/dist/evidence/collector.js +347 -1
- package/packages/client/dist/evidence/index.js +1 -1
- package/packages/client/dist/evidence/types.js +2 -0
- package/packages/client/dist/fs/atomic-state-replace.js +152 -1
- package/packages/client/dist/generated/command-registry.generated.js +4076 -1
- package/packages/client/dist/generated/public-projections.generated.js +149 -1
- package/packages/client/dist/git/direct-yolo-c01-retry.js +138 -4
- package/packages/client/dist/git/direct-yolo-checkpoint.js +1456 -4
- package/packages/client/dist/git/epic-operational-state.js +672 -2
- package/packages/client/dist/git/git-lifecycle-step-ids.js +14 -1
- package/packages/client/dist/git/git-lifecycle-store.js +2188 -10
- package/packages/client/dist/git/legacy-story-branch-checkpoint.js +259 -9
- package/packages/client/dist/git/legacy-story-branch-setup.js +348 -4
- package/packages/client/dist/git/legacy-story-pr.js +3538 -70
- package/packages/client/dist/git/neocortex-trailers.d.ts +26 -0
- package/packages/client/dist/git/neocortex-trailers.js +53 -0
- package/packages/client/dist/git/secure-filesystem-boundary.js +182 -5
- package/packages/client/dist/graph-retrieval/pre-command-hook.js +284 -1
- package/packages/client/dist/graph-retrieval/shared-graph-retrieval-contract.js +237 -1
- package/packages/client/dist/i18n/first-run.js +60 -2
- package/packages/client/dist/index.js +50 -1
- package/packages/client/dist/invocation/invoke-input.js +24 -1
- package/packages/client/dist/license/host-auth-recovery.js +401 -1
- package/packages/client/dist/license/index.js +5 -1
- package/packages/client/dist/license/license-client.js +337 -1
- package/packages/client/dist/machine/fingerprint.js +163 -2
- package/packages/client/dist/machine/index.js +5 -1
- package/packages/client/dist/memory/project-memory-path-scope.js +62 -1
- package/packages/client/dist/memory/project-memory-writer.d.ts +16 -1
- package/packages/client/dist/memory/project-memory-writer.js +1117 -41
- package/packages/client/dist/memory/shared-project-memory-types.js +259 -2
- package/packages/client/dist/migrations/epic-lifecycle-backfill.js +1060 -3
- package/packages/client/dist/migrations/project-identity-capability.js +50 -1
- package/packages/client/dist/migrations/project-identity.js +493 -7
- package/packages/client/dist/migrations/state-json.js +393 -4
- package/packages/client/dist/policy/architecture-policy.js +184 -2
- package/packages/client/dist/policy/index.js +7 -1
- package/packages/client/dist/policy/shared-policy-types.js +38 -0
- package/packages/client/dist/policy/subagent-approval-policy.js +55 -1
- package/packages/client/dist/private-execution/clean-baseline.js +279 -2
- package/packages/client/dist/private-execution/codex-executor.js +574 -4
- package/packages/client/dist/private-execution/codex-host-runtime.js +137 -1
- package/packages/client/dist/private-execution/codex-lifecycle-guard.js +97 -1
- package/packages/client/dist/private-execution/codex-scoped-permissions.js +128 -1
- package/packages/client/dist/private-execution/delivery.js +410 -13
- package/packages/client/dist/private-execution/diagnosis-root-review.js +294 -2
- package/packages/client/dist/private-execution/frozen-handoff.js +19 -6
- package/packages/client/dist/private-execution/implementation-validation.js +106 -2
- package/packages/client/dist/private-execution/isolated-admission.js +1432 -23
- package/packages/client/dist/private-execution/isolated-session.js +725 -5
- package/packages/client/dist/private-execution/isolated-workspace.js +122 -1
- package/packages/client/dist/private-execution/pact-consumer-runtime.js +409 -3
- package/packages/client/dist/private-execution/pact-test-source.js +258 -1
- package/packages/client/dist/private-execution/pact-toolchain.js +290 -3
- package/packages/client/dist/private-execution/pact-write-set.js +172 -1
- package/packages/client/dist/private-execution/planning-diagnosis-checkpoint.js +406 -5
- package/packages/client/dist/private-execution/planning-generation-checkpoint.js +462 -5
- package/packages/client/dist/private-execution/planning-memory-checkpoint.js +139 -3
- package/packages/client/dist/private-execution/planning-research-checkpoint.js +325 -4
- package/packages/client/dist/private-execution/private-report-store.js +42 -1
- package/packages/client/dist/private-execution/property-test-candidate.js +103 -1
- package/packages/client/dist/private-execution/property-test-choices.js +147 -3
- package/packages/client/dist/private-execution/property-test-plan.js +271 -7
- package/packages/client/dist/private-execution/property-test-review.js +258 -4
- package/packages/client/dist/private-execution/property-test-runtime.js +372 -9
- package/packages/client/dist/private-execution/property-test-source.js +139 -1
- package/packages/client/dist/private-execution/root-checkpoint.js +80 -1
- package/packages/client/dist/private-execution/root-memory-git-evidence.js +135 -3
- package/packages/client/dist/private-execution/root-memory-recovery.js +93 -1
- package/packages/client/dist/private-execution/root-memory-request.js +29 -1
- package/packages/client/dist/private-execution/root-memory-scope.js +178 -1
- package/packages/client/dist/private-execution/root-memory-writer.js +102 -1
- package/packages/client/dist/private-execution/session-lease.js +63 -1
- package/packages/client/dist/private-execution/shared-private-admission-types.js +50 -1
- package/packages/client/dist/private-execution/shared-project-validation.js +66 -1
- package/packages/client/dist/private-execution/shared-root-memory-types.js +61 -1
- package/packages/client/dist/private-execution/ux-source-validation.js +372 -1
- package/packages/client/dist/private-execution/ux-write-set.js +191 -2
- package/packages/client/dist/registry/registry-reconciliation.js +234 -1
- package/packages/client/dist/resilience/circuit-breaker.js +170 -1
- package/packages/client/dist/resilience/degradation-manager.js +164 -1
- package/packages/client/dist/resilience/freshness-indicator.js +100 -1
- package/packages/client/dist/resilience/index.js +8 -1
- package/packages/client/dist/resilience/recovery-detector.js +74 -1
- package/packages/client/dist/resolvers/asset-resolver.js +13 -0
- package/packages/client/dist/resolvers/local-resolver.js +255 -8
- package/packages/client/dist/resolvers/remote-resolver.js +233 -1
- package/packages/client/dist/runner/binary.js +404 -1
- package/packages/client/dist/runner/cli.js +1571 -17
- package/packages/client/dist/runner/epic-background-dispatcher.js +124 -1
- package/packages/client/dist/runner/headless/adapters.js +49 -1
- package/packages/client/dist/runner/headless/background-root.js +85 -1
- package/packages/client/dist/runner/headless/claude-code-adapter.js +79 -1
- package/packages/client/dist/runner/headless/continuous-story-workspace.js +1628 -11
- package/packages/client/dist/runner/headless/epic-git-reconciliation-inventory.js +69 -1
- package/packages/client/dist/runner/headless/epic-merge-candidate-qa.js +111 -2
- package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.js +1464 -10
- package/packages/client/dist/runner/headless/epic-terminal-git-runner.js +357 -2
- package/packages/client/dist/runner/headless/fake-adapter.js +62 -1
- package/packages/client/dist/runner/headless/managed-environment-cleanup.js +274 -1
- package/packages/client/dist/runner/headless/managed-profile.js +149 -1
- package/packages/client/dist/runner/headless/opencode-adapter.js +145 -2
- package/packages/client/dist/runner/headless/prepared-story-bundle.js +43 -1
- package/packages/client/dist/runner/headless/resolver.js +231 -1
- package/packages/client/dist/runner/headless/run-yolo.js +886 -1
- package/packages/client/dist/runner/headless/run-yoloop.js +2586 -2
- package/packages/client/dist/runner/headless/types.js +575 -2
- package/packages/client/dist/runner/host-capacity.js +59 -1
- package/packages/client/dist/runner/local-console.js +396 -13
- package/packages/client/dist/runner/portal-sync-worker.js +1487 -1
- package/packages/client/dist/runner/project-identity.js +106 -1
- package/packages/client/dist/runner/scheduler.js +995 -7
- package/packages/client/dist/runner-cli.js +18 -2
- package/packages/client/dist/state/invocation-shape.js +13 -1
- package/packages/client/dist/state/project-state-snapshot.js +1751 -1
- package/packages/client/dist/state/state-json-repair.js +785 -3
- package/packages/client/dist/state/structural-dag-projection.js +118 -1
- package/packages/client/dist/telemetry/index.js +5 -1
- package/packages/client/dist/telemetry/offline-queue.js +131 -1
- package/packages/client/dist/tier/index.js +5 -1
- package/packages/client/dist/tier/tier-aware-client.js +405 -1
- package/packages/client/dist/types/index.js +38 -1
- package/packages/client/dist/version.js +27 -1
- package/packages/client/dist/yolo/change-evidence-collector.d.ts +1 -1
- package/packages/client/dist/yolo/change-evidence-collector.js +245 -1
- package/packages/client/dist/yolo/invoke-envelope-capability.js +62 -1
- package/packages/client/dist/yolo/spec-envelope-collector.js +184 -5
- package/packages/client/dist/yoloop/discovery-hook.js +300 -2
- package/packages/client/dist/yoloop/index.js +8 -1
- package/packages/client/dist/yoloop/invoke-hooks.js +669 -12
- package/packages/client/dist/yoloop/shared-discover-epics.js +1007 -1
- package/packages/client/dist/yoloop/shared-yoloop-types.js +33 -1
- package/packages/client/dist/yoloop/target-normalization.js +180 -1
- package/packages/client/dist/yoloop/yoloop-client-state-store.js +1920 -1
- package/packages/shared/dist/yoloop/epic-terminal-git.js +12 -0
- package/targets-stubs/antigravity/gemini.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.agent.yaml +1 -1
- package/targets-stubs/claude-code/neocortex.md +2 -2
- package/targets-stubs/codex/AGENTS.md +1 -1
- package/targets-stubs/cursor/agent.md +2 -2
- package/targets-stubs/gemini-cli/agent.md +2 -2
- package/targets-stubs/opencode/neocortex-root.md +1 -1
- package/targets-stubs/vscode/neocortex.agent.md +2 -2
|
@@ -1,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
|
+
}
|