agentleFS
dgeniodgenio/contextweaver/.github/copilot-instructions.md

contextweaver

Copilot instructions9 starsChanged 5 months agoApache-2.0View on GitHub

AGENTS.md is the single source of truth for shared rules, conventions, and module layout. This file contains review-critical rules that must be visible in GitHub and Copilot-specific guidance. Do not treat this file as a standalone reference. - Review code and agent docs together. When a PR changes behavior that agent-facing docs describe (pipeline stages, public API, conventions, module layout), review the code change and the doc update as a unit. If the PR has no doc update, flag it.…

The file

We split this copilot-instructions.md into the rules it gives an agent

8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Review code and agent docs together: When a PR changes behavior that agent-facing docs describe (pipeline stages, public API, conventions, …

    line 9
  2. Very specific:

    Check docs/agent-context/invariants.md before proposing structural changes.

    line 16
  3. Very specific:

    Do not invent conventions: All conventions must be grounded in AGENTS.md, docs/agent-context/, or verifiable repository evidence.

    line 17
  4. Very specific:

    Use authoritative commands: Run make ci (not make test alone) as the validation gate.

    line 20
  5. Distinctive:

    Surface contradictions: If you find conflicting guidance between docs, or between docs and code, flag the contradiction explicitly.

    line 22
  6. Very specific:

    No print() in library code: Use hooks or logging. __main__.py (CLI) is exempt.

    line 29
  7. Very specific:

    No business logic in __init__.py: Only re-exports allowed.

    line 30
  8. Very specific:

    Never weaken defaults. See .github/instructions/sensitivity.instructions.md.

    line 48

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

contextweaver — Copilot Instructions

AGENTS.md is the single source of truth for shared rules, conventions, and module layout. This file contains review-critical rules that must be visible in GitHub and Copilot-specific guidance. Do not treat this file as a standalone reference.

Review-Critical Rules

  • Review code and agent docs together. When a PR changes behavior that agent-facing docs describe (pipeline stages, public API, conventions, module layout), review the code change and the doc update as a unit. If the PR has no doc update, flag it.
  • PRs that change any of these must trigger doc review: workflows, invariants, architecture intent, review rules, path-specific conventions, or the module map. Expect a corresponding update to AGENTS.md or docs/agent-context/.
  • Invariants take priority over cleanup, simplification, or local refactors. Check docs/agent-context/invariants.md before proposing structural changes.
  • Do not invent conventions. All conventions must be grounded in AGENTS.md, docs/agent-context/, or verifiable repository evidence. If you cannot find a rule, it does not exist — do not assume one.
  • Use authoritative commands. Run make ci (not make test alone) as the validation gate. See AGENTS.md for the full command reference.
  • Surface contradictions. If you find conflicting guidance between docs, or between docs and code, flag the contradiction explicitly. Do not silently pick one side.

Hard Rules (auto-reject)

These cause automatic rejection in review. No exceptions.

  1. No print() in library code. Use hooks or logging. __main__.py (CLI) is exempt.
  2. No business logic in __init__.py. Only re-exports allowed.

Copilot-Specific Guidance

Understand system-level intent before making changes. contextweaver has deliberate architectural boundaries (async context vs sync routing, protocol-based stores, 8-stage pipeline, complementary serialization layers). Changes that are locally correct but violate these boundaries will be rejected. Before modifying code, check:

  • AGENTS.md → module map, conventions, "things that must not be simplified"
  • docs/agent-context/architecture.md → design boundaries and tradeoffs
  • docs/agent-context/invariants.md → hard constraints and forbidden shortcuts

Architecture (minimal orientation)

  • Context Engine — async-first, 8-stage pipeline. See AGENTS.md for the stage list.
  • Routing Engine — sync-only, pure computation. Do not make async.
  • Sensitivity enforcement (context/sensitivity.py) — security-grade code. Never weaken defaults. See .github/instructions/sensitivity.instructions.md.
  • Minimal core runtime deps. Core install: tiktoken, PyYAML, rank-bm25. Heavy or runtime-specific packages live under optional extras ([otel], [retrieval], [fastmcp], [langchain]) and use guarded imports. New core deps require broad ecosystem use + small wheel + a default the library would otherwise approximate.

Canonical References

TopicFile
Shared rules, conventions, module mapAGENTS.md
Architecture detail and tradeoffsdocs/agent-context/architecture.md
Hard constraints and forbidden shortcutsdocs/agent-context/invariants.md
Authoritative commands and workflowsdocs/agent-context/workflows.md
Recurring lessonsdocs/agent-context/lessons-learned.md
Review checklistdocs/agent-context/review-checklist.md
Core concepts glossarydocs/concepts.md
Full pipeline and module detaildocs/architecture.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.