Add path-scoped Copilot instructions for context/ and routing/#146
Merged
Add path-scoped Copilot instructions for context/ and routing/#146
Conversation
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.
Summary
The two largest subsystems — context engine (11 modules) and routing engine (9 modules) — lacked agent-facing guidance scoped to their directories. Agents editing
manager.pyorgraph.pyhad no subsystem-specific invariants to follow, risking broken pipeline ordering, firewall bypasses, or invalid graph states.Changes
.github/instructions/context.instructions.md(applyTo: src/contextweaver/context/**)tool_resulttext never reaches prompt; artifact handle format;artifact_refalways populatedmanager.pyflagged at ~876 lines with decomposition refs ([refactor] Decompose context/manager.py to meet ≤300-line module guideline #73, [context] Extract manager.py to stay within 300-line module limit #69); discourages new methods until decomposedsensitivity.instructions.md.github/instructions/routing.instructions.md(applyTo: src/contextweaver/routing/**)ChoiceGraph._validate()invariants documented (root exists, children resolve, no cycles, all items reachable)add_edge()— must not be bypassedTreeBuilder3-strategy priority order (namespace → Jaccard clustering → alphabetical) with fallback conditions(-score, id)sort key must not change;confidence_gapboundsgenerate_sample_catalogseed=42 is a contract — demos and tests depend on itChoiceCardschema prohibition; sync-only routing; no cross-engine importsBoth files are ≤100 lines, documentation-only, and grounded in actual code.
Checklist
make cipasses locally (fmt + lint + type + test + example + demo)CHANGELOG.mdupdated under## [Unreleased]Notes for reviewers
Instruction files are loaded automatically by VS Code Copilot when editing files under the targeted paths — no tooling changes required. Content is derived directly from
manager.pydocstring,graph.py._validate(),router.py.route(),tree.py.build(), andcatalog.py.generate_sample_catalog()— reviewers should cross-check those sources if any rule seems off.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.