All launch paths (claude, codex, opencode, yolo variants) now write a
session.lock before exec'ing, so `mosaic coord status` can detect
running agent sessions. Stale locks from dead sessions are cleaned up
automatically on next launch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mission context was buried at the end of a 21K char system prompt and the
agent ignored it. Two fixes:
1. Mission block now emits FIRST in build_runtime_prompt() so it's the most
prominent instruction the agent sees
2. When an active mission exists and no user prompt is given, auto-inject
an initial user message triggering the agent to read mission state files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The session-start hook approach didn't work — Claude Code's TUI
overwrites stdout before the agent sees it, and the hook only fires
when the agent calls it as a tool.
Instead, inject mission context directly into the composed system
prompt via build_runtime_prompt(). When mission.json is active in
CWD, the agent gets mission name, ID, milestone progress, and
mandatory first-action instructions in its initial context.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Detects and cleans up files that are now centralized:
- SOUL.md: removed (now global at ~/.config/mosaic/SOUL.md)
- CLAUDE.md: replaced with thin pointer to global AGENTS.md
- AGENTS.md: stale load-order sections stripped, project content preserved
Supports --dry-run, --all (scan ~/src/*), and per-project paths.
Creates .mosaic-bak backups before any modification.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 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>
SOUL.md injection happens via ~/.claude/CLAUDE.md directive (pushed by
mosaic-link-runtime-assets), not CLI flags. The launcher now just does
pre-flight checks and launches the runtime directly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- install.sh: detects shell profile (zsh/bash/profile), adds PATH entry if missing
- install.ps1: adds to User PATH via SetEnvironmentVariable if missing
- Both are idempotent — show "already in PATH ✓" on re-run
- mosaic/mosaic.ps1: accept "help" and "version" as bare subcommands
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SOUL.md.template with {{PLACEHOLDERS}} for interactive generation
- Add mosaic-init (bash + PS1) for interactive SOUL.md creation with flag overrides
- Add mosaic launcher (bash + PS1) — unified CLI for claude/opencode/codex with SOUL.md injection
- Add codex runtime adapter (runtime/codex/instructions.md)
- Update runtime adapters (claude, opencode) with SOUL.md read directive
- Update mosaic-link-runtime-assets to push codex adapter to ~/.codex/
- Update installers to prompt for mosaic init when SOUL.md is missing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- remote-install.sh: POSIX one-liner (curl | sh), downloads archive to tmpdir
- remote-install.ps1: Windows one-liner (irm | iex), fully native PowerShell
- install.ps1: Native Windows installer calling all .ps1 post-install scripts
- bin/mosaic-link-runtime-assets.ps1: Syncs runtime config files
- bin/mosaic-sync-skills.ps1: Clones skills, links via directory junctions
- bin/mosaic-migrate-local-skills.ps1: Migrates local skills to junctions
- bin/mosaic-doctor.ps1: Health audit for Windows environments
Directory junctions used instead of symlinks (no elevation required).
All junction operations fall back to file copy on failure.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>