Skip to content

feat(context): load ~/.agents/AGENTS.md and order instruction files by scope - #93

Merged
tnfssc merged 2 commits into
developfrom
feat/instruction-order
Oct 30, 2026
Merged

tnfssc merged 2 commits into
developfrom
feat/instruction-order

Conversation

@tnfssc

@tnfssc tnfssc commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Load ~/.agents/AGENTS.md before project instruction files. Skip it when Pi already loaded the same file through a link, and when Pi runs with --no-context-files.
  • Replace Pi's project context section with one that labels each file global, parent, project or folder and lists them broadest first, so narrower files win on conflict.
  • Add a line to bruv's system prompt saying instruction files override its defaults. Keep "How bruv works" fixed, since files cannot change how the tools run (finish, jobs, agents, waiting).
  • Document the shared file in docs/USAGE.md and record the decisions in .agents/notes/.

Testing

  • bun run check passes (typecheck for root, site and web).
  • bun test passes: 302 tests across 45 files, including new tests for scope labels, file order, the replaced context section, the shared file order, and skipping a linked duplicate.
  • bunx biome ci . passes with one existing warning about an unused import in src/ui.ts, not from this change.
  • Real pi -p runs in a fake home outside any repo, covering tone, ask-first, tabs vs spaces, never calling finish, and a user request overriding "never commit":
    • First version: kimi-k3 and gpt-6-luna passed 11 of 12 runs.
    • After the finish exception was moved under "How bruv works": deepseek-v4.1-flash passed 2 of 2. Only that case was re-run.
  • Not run: kimi-k3 on the final prompt, bun run test:site, GPT through openai-codex (not signed in on this machine), and the --web build, which does not yet use the new ordering.

- Read the shared ~/.agents/AGENTS.md once per session and put it first in Pi's context files
- Skip it when Pi already loaded the same file through a link, or when --no-context-files is set
- Document the behavior in docs/USAGE.md and record the decision in .agents/notes/shared-agents.md
- Label each context file global, parent, project or folder, listed broadest first.
- Tell the model narrower files win over broader ones, and chat wins over all files.
- Files can override bruv's defaults on tone and asking, but not "How bruv works".
- Replace Pi's project_context section in place.
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ff78d1f4-0508-4cd4-9ee9-6475aef595aa
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tnfssc
tnfssc merged commit 2115bb8 into develop Oct 30, 2026
2 checks passed
@tnfssc
tnfssc deleted the feat/instruction-order branch October 30, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant