refactor: AGENTS.md is the single source of truth for all runtimes

- Create ~/.config/mosaic/AGENTS.md as the canonical universal agent config
- Runtime adapters (CLAUDE.md, opencode/AGENTS.md, codex/instructions.md) are
  now thin pointers that say "READ ~/.config/mosaic/AGENTS.md"
- mosaic claude: injects AGENTS.md via --append-system-prompt
- mosaic opencode/codex: copies AGENTS.md to runtime config path before launch
- mosaic-link-runtime-assets: pushes thin pointers for direct launch fallback

AGENTS.md is runtime-agnostic. All runtimes get the same standards.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jason Woltje
2026-02-19 13:24:12 -06:00
parent 0b7b823911
commit 3f2ba89db2
8 changed files with 723 additions and 679 deletions

View File

@@ -2,18 +2,10 @@
## MANDATORY — Read Before Any Response
BEFORE responding to any user message, READ these files in order:
BEFORE responding to any user message, READ `~/.config/mosaic/AGENTS.md`.
1. `~/.config/mosaic/SOUL.md` (identity and behavioral contract)
2. `~/.config/mosaic/STANDARDS.md` (machine-wide standards)
3. Project-local `AGENTS.md` (project operations and workflows)
That file is the universal agent configuration. It contains the full load order,
development standards, skills, and workflows. Do NOT respond until you have loaded it.
Do NOT respond to the user until you have loaded all three.
This file is a Codex adapter layer. It does not replace project guidance.
## Runtime Behavior
- Favor repo lifecycle scripts under `scripts/agent/` for start/end rituals.
- Keep instructions and quality gates aligned with Mosaic standards.
- Use `~/.config/mosaic/skills/` for domain expertise when available.
This file (`~/.codex/instructions.md`) exists only as a fallback for direct `codex` launches.
For full injection, use `mosaic codex` instead.