refactor(agent): the grounding harness is imported, not mirrored - #448
Merged
Conversation
FleetCrown half of the mirror retirement (fleet AI-engine plan, Phase 2). src/lib/agent/core was the CANONICAL copy of the harness, mirrored byte-for-byte into OrangeCat and policed by scripts/test/agent-core-drift.ts plus scripts/sync-agent-core.ts. Its own README called the duplication "deliberate and temporary" and named extraction to a package as the exit. ai-kit v0.6.2 is that exit; OrangeCat's twin PR (#846, merged) deletes the other side. Fourteen imports across nine files collapse from three deep paths to one subpath import. The sync script, the drift check and the npm script that ran it are deleted rather than kept green: with a single copy there is nothing left to drift, and a gate with no possible failure mode is noise wearing a uniform. ai-kit also moves v0.2.1 -> v0.6.2 (still the ai-ration name in the old lock entry); the three root imports this repo uses (chain, fair-share, limits) are unchanged surfaces across that jump, which typecheck confirms. The packaged copy differs from the deleted canonical by two mechanical deltas, both made where the code now lives: .js extensions on relative imports (pure ESM) and two null-guards under ai-kit's noUncheckedIndexedAccess. tsc clean; 124/124 unit test files pass (one fewer than before: the drift check no longer exists to run). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FleetCrown half of the mirror retirement (fleet AI-engine plan, Phase 2).
src/lib/agent/corewas the CANONICAL copy of the grounding harness, mirrored byte-for-byte into OrangeCat and policed byscripts/test/agent-core-drift.tsplusscripts/sync-agent-core.ts. Its own README called the duplication "deliberate and temporary" and named extraction to a package as the exit. ai-kit v0.6.2 is that exit; OrangeCat's twin PR (bitbaum/orangecat#846) is already merged and deployed.What changes
@/lib/agent/core/{facts,contract,verify}) to one subpath import:ai-kit/grounding.src/lib/agent/core/,scripts/sync-agent-core.ts,scripts/test/agent-core-drift.ts, and thesync:agent-corenpm script are deleted, not kept green: with a single copy there is nothing left to drift, and a gate with no possible failure mode is noise wearing a uniform.v0.2.1 → v0.6.2(the old lock entry still carried the ai-ration name). The three root imports this repo uses (chain, fair-share, limits) are unchanged surfaces across that jump — typecheck confirms.Fidelity of the packaged copy
The packaged harness differs from the deleted canonical by two mechanical deltas, both made where the code now lives:
.jsextensions on relative imports (pure ESM) and two null-guards under ai-kit'snoUncheckedIndexedAccess. Behavior is covered by ai-kit's own grounding tests plus the dual-loader test (both mutation-proved).Verification
tsc clean; 124/124 unit test files pass (one fewer file than before: the drift check no longer exists to run).
🤖 Generated with Claude Code
https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn