Repository navigation
feat(core): render CodeMode catalog deltas from structured snapshots - #38183
Merged
Merged
Conversation
rekram1-node
force-pushed
the
codemode-catalog-diffs
branch
2 times, most recently
from
July 22, 2026 15:02
445af9c to
bb017e9
Compare
rekram1-node
force-pushed
the
codemode-catalog-diffs
branch
from
July 23, 2026 21:41
bb017e9 to
12c5984
Compare
# Conflicts: # packages/codemode/src/tool-runtime.ts # packages/core/src/codemode/instructions.ts # packages/core/test/codemode/instructions.test.ts
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.
Follow-up to #38003, part of the CodeMode catalog work (#36196).
What changed
Moves Code Mode catalog prompting out of
@opencode-ai/codemodeso core owns all model-facing instruction text, and upgrades thecore/codemodeinstruction source from whole-string replacement to skill-style semantic deltas.codemode package
Runtime.instructions(),DiscoveryOptions, and all catalog prose/budgeting;preparenow returns only structured{ catalog, searchIndex }CodeMode.searchSignatureandCodeMode.toolExpression(path)so hosts can render exact callable forms — signature construction stays codemode-ownedcore
CodeModeCatalogmodule (src/codemode/catalog.ts): owns the ported round-robin token budgeting (default 2000), full instruction rendering, andupdate()semantic diffing viaInstructions.diffByKeyCodeMode.materializereturns a structuredcataloginstead of a rendered string;ExecuteTool.instructionsbecomesExecuteTool.catalogCodeModeInstructionsstores the sorted structured snapshot with a typed codec, so mid-conversation changes render as tool-level deltas:tools.ns["dashed-name"]), changed signatures as superseding lines./effect/app-nodeafter upstream moved it to@opencode-ai/util/effect/app-node, breaking core typecheckNotes
packages/core/test/codemode/catalog.test.ts, not droppedTesting
packages/core: typecheck clean, 1417 pass (1 pre-existing environmental failure inplugin.test.ts)packages/codemode: typecheck clean, 1022 pass