feat: preserve workspace instruction and skill intent - #1799
Merged
Conversation
Resolve workspace instructions through the active local or remote filesystem. Honor source-level implicit invocation policies without changing explicit skill access.
limityan
force-pushed
the
yanzhn/declarative-context-compat
branch
from
July 27, 2026 09:21
2fa92f3 to
bc59c25
Compare
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.
Problem
BitFun already discovers workspace instruction files and external Skill roots, but two source-owned semantics were lost on the production path:
AGENTS.override.mdprecedence was not preserved.This PR implements only contracts that current competitors expose: Codex project instruction precedence, Codex Skill invocation policy, and Claude Skill invocation controls.
Changes
Workspace Instructions owner
WorkspaceFileSystemfor both local and Remote workspaces.AGENTS.override.mdselects that candidate even when empty;AGENTS.mdis not reintroduced.CLAUDE.mdas an independent existing source in the established order.WorkspaceInstructions.Skill invocation-intent owner
disable-model-invocation, including its documented Boolean aliases.agents/openai.yamlonly forpolicy.allow_implicit_invocationand merge restrictions monotonically; a permissive declaration cannot relax an existing restriction./skills, mode configuration, and existing UI contracts unchanged.Boundaries
Verification
cargo check --workspacecargo test -p bitfun-agent-runtime --test skill_contracts(17 passed)cargo test -p bitfun-services-core workspace_instruction -- --nocapture(2 passed)cargo test -p bitfun-services-core --features workspace-runtime --test workspace_instruction_contracts(1 passed)bitfun-corelocal/Remote Codex policy tests (2 passed)bitfun-coreRemote and resolved-empty PromptBuilder tests (2 passed)cargo test -p bitfun-core instruction --lib(7 passed)node scripts/check-core-boundaries.mjspnpm run check:repo-hygienegit diff --checkContext-isolated adversarial review rounds found and closed Boolean compatibility, empty-override precedence, PromptBuilder owner ambiguity, eager Remote IO, transient-failure cache pollution, missing Remote-provider cache pollution, and DeepReview policy revalidation gaps. The final review was repeated after rebasing to
e528e859and found no P0/P1/P2 issues.