Moves all Mosaic framework runtime files from the separate bootstrap repo into the monorepo as canonical source. The @mosaic/mosaic npm package now ships the complete framework — bin scripts, runtime configs, tools, and templates — enabling standalone installation via npm install. Structure: packages/mosaic/framework/ ├── bin/ 28 CLI scripts (mosaic, mosaic-doctor, mosaic-sync-skills, etc.) ├── runtime/ Runtime adapters (claude, codex, opencode, pi, mcp) ├── tools/ Shell tooling (git, prdy, orchestrator, quality, etc.) ├── templates/ Agent and repo templates ├── defaults/ Default identity files (AGENTS.md, STANDARDS.md, SOUL.md, etc.) ├── install.sh Legacy bash installer └── remote-install.sh One-liner remote installer Key files with Pi support and recent fixes: - bin/mosaic: launch_pi() with skills-local loop - bin/mosaic-doctor: --fix auto-wiring for all 4 harnesses - bin/mosaic-sync-skills: Pi as 4th link target, symlink-aware find - bin/mosaic-link-runtime-assets: Pi settings.json patching - bin/mosaic-migrate-local-skills: Pi skill roots, symlink find - runtime/pi/RUNTIME.md + mosaic-extension.ts Package ships 251 framework files in the npm tarball (278KB compressed).
2.4 KiB
2.4 KiB
Mosaic Universal Agent Standards
This file is the canonical standards contract for agent sessions on this machine.
Master/slave model:
- Master:
~/.config/mosaic(this framework) - Slave: each repo bootstrapped via
mosaic-bootstrap-repo
Execution Model
- Load this file first.
- Load project-local
AGENTS.mdnext. - Respect repository-specific tooling and workflows.
- Use lifecycle scripts when available (
scripts/agent/*.sh). - Use shared tools/guides from
~/.config/mosaicas canonical references.
Non-Negotiables
- Data files are authoritative; generated views are derived artifacts.
- Pull before edits when collaborating in shared repos.
- Run validation checks before claiming completion.
- Apply quality tools from
~/.config/mosaic/tools/when relevant (review, QA, git workflow). - For project-level mechanical enforcement templates, use
~/.config/mosaic/tools/quality/via~/.config/mosaic/bin/mosaic-quality-apply. - For runtime-agnostic delegation/orchestration, use
~/.config/mosaic/tools/orchestrator-matrix/with repo-local.mosaic/orchestrator/state. - Avoid hardcoded secrets and token leakage in remotes/commits.
- Do not perform destructive git/file actions without explicit instruction.
- Browser automation (Playwright, Cypress, Puppeteer) MUST run in headless mode. Never launch a visible browser — it collides with the user's display and active session.
Session Lifecycle Contract
- Start:
scripts/agent/session-start.sh - Priority scan:
scripts/agent/critical.sh - End:
scripts/agent/session-end.sh - Limitation logging helper:
scripts/agent/log-limitation.sh "Title"
If a repo does not expose these scripts, run equivalent local workflow commands and document deviations.
Multi-Agent Safety
- Coordinate through git pull/rebase discipline.
- Do not auto-resolve data conflicts in shared state files.
- Keep commits scoped to a single logical change set.
Prompting Contract
All runtime adapters should inject:
~/.config/mosaic/STANDARDS.md- project
AGENTS.md
before task execution.
Runtime-compatible guides and tools are hosted at:
~/.config/mosaic/guides/~/.config/mosaic/tools/~/.config/mosaic/profiles/(runtime-neutral domain/workflow/stack presets)~/.config/mosaic/runtime/(runtime-specific overlays)~/.config/mosaic/skills-local/(local private skills shared across runtimes)