Merged
Conversation
Replace monolithic AGENTS.md and copilot-instructions.md with a layered documentation architecture. Canonical shared layer (docs/agent-context/): - architecture.md: module boundaries, design traps, planned modules - workflows.md: dev commands, CI, code style, testing, PR conventions - invariants.md: 12 hard rules, forbidden patterns, safe/unsafe table - lessons-learned.md: 5 recurring mistake patterns, promotion criteria - review-checklist.md: definition-of-done checklist by category Projection layers: - .github/copilot-instructions.md: thin review-oriented wrapper - .github/instructions/chainweaver.instructions.md: scoped design traps - .github/instructions/tests.instructions.md: scoped test conventions - .claude/CLAUDE.md: Claude operational entrypoint and router AGENTS.md rewritten as primary entrypoint with 12 invariants, vocabulary table, executor/flow semantics, documentation map, and update policy.
There was a problem hiding this comment.
Pull request overview
This PR replaces the monolithic agent instruction files (AGENTS.md and .github/copilot-instructions.md) with a layered, cross-referenced documentation architecture designed for AI coding agents. It establishes a canonical shared layer in docs/agent-context/ (5 files covering architecture, workflows, invariants, lessons learned, and review checklists), projection layers for specific tools (Copilot scoped instructions, Claude entrypoint), and rewrites the two existing files as thinner wrappers that reference the canonical layer.
Changes:
- Added 5 canonical shared documentation files in
docs/agent-context/covering architecture boundaries, development workflows, hard invariants/forbidden patterns, recurring mistake patterns, and a definition-of-done review checklist. - Added 3 projection layer files (
.github/instructions/chainweaver.instructions.md,.github/instructions/tests.instructions.md,.claude/CLAUDE.md) scoped to specific file paths or tools. - Rewrote
AGENTS.md(expanded to 12 invariants, added vocabulary table, executor/flow semantics, documentation map) and.github/copilot-instructions.md(condensed to a thin review-oriented wrapper).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
docs/agent-context/architecture.md |
New canonical reference for module boundaries, design traps, planned modules, and Weaver Stack guardrail |
docs/agent-context/workflows.md |
New canonical reference for dev commands, CI, code style, testing, PR/git conventions, and doc governance triggers |
docs/agent-context/invariants.md |
New canonical reference for 12 hard rules, forbidden patterns table, and safe/unsafe simplifications |
docs/agent-context/lessons-learned.md |
New failure-capture workflow with 5 recurring mistake patterns and promotion criteria |
docs/agent-context/review-checklist.md |
New definition-of-done checklist organized by category |
AGENTS.md |
Rewritten as primary entrypoint with expanded invariants, vocabulary, executor semantics, doc map, and update policy |
.github/copilot-instructions.md |
Reduced to thin review-oriented wrapper pointing to canonical docs |
.github/instructions/chainweaver.instructions.md |
New scoped design-trap reminders for chainweaver/** |
.github/instructions/tests.instructions.md |
New scoped test boundary and framework rules for tests/** |
.claude/CLAUDE.md |
New Claude operational entrypoint and router |
You can also share your feedback on Copilot code review. Take the survey.
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.
Summary
Replaces the monolithic
AGENTS.mdandcopilot-instructions.mdwith a layered, cross-referenced documentation architecture designed for AI coding agents.What changed
Canonical shared layer (
docs/agent-context/) — 5 new files:architecture.md— module boundaries, design traps, planned modules, Weaver Stack guardrailworkflows.md— dev commands, CI, code style, testing, PR/git conventions, new-module checklist, doc governance triggersinvariants.md— 12 hard rules (detailed), forbidden patterns table, safe/unsafe simplificationslessons-learned.md— failure-capture workflow, 5 recurring mistake patterns, promotion criteriareview-checklist.md— definition-of-done checklist organized by category (CI, correctness, testing, API, architecture, docs, vocabulary, PR hygiene)Projection layers — 3 new files:
.github/instructions/chainweaver.instructions.md— scoped design-trap reminders forchainweaver/**.github/instructions/tests.instructions.md— scoped test boundary + framework rules fortests/**.claude/CLAUDE.md— Claude operational entrypoint and routerRewritten files — 2 modified:
AGENTS.md— primary entrypoint with 12 invariants (was 10), vocabulary table, executor/flow semantics (§5), documentation map (§9), update policy (§10).github/copilot-instructions.md— reduced from ~90 lines to ~45-line thin review-oriented wrapper with doc-map pointer tableWhy
The previous documentation had content duplicated between
AGENTS.mdandcopilot-instructions.md, stale references (e.g., mypy not yet landed), vocabulary inconsistencies ("chains" vs "flows"), and no structured home for invariants, lessons learned, or review checklists. This rewrite:Testing performed
All four validation commands pass locally:
No source code was modified — this is a documentation-only change.
AI agent instruction files reviewed/changed
All 5 agent instruction files in this PR are the change:
AGENTS.md(rewritten).github/copilot-instructions.md(rewritten).github/instructions/chainweaver.instructions.md(new).github/instructions/tests.instructions.md(new).claude/CLAUDE.md(new)Cross-references between all 10 files have been verified for consistency.