Commit Graph

12 Commits

Author SHA1 Message Date
Jason Woltje
8de2f7439a fix: make credentials.json authoritative for Woodpecker, auto-sync to .env
- Woodpecker tokens from credentials.json now always override env vars,
  preventing stale .bashrc or env leakage from silently winning
- After loading, credentials are synced to ~/.woodpecker/<instance>.env
  so the wp CLI wrapper stays current automatically
- Sync only writes when values differ to avoid unnecessary disk I/O

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:03:29 -06:00
b1403703b1 feat: add prdy-status command and PRD status injection into system prompt
- Add prdy-status.sh for quick one-liner PRD health check (short/json output)
- Inject PRD section count and assumption count into agent system prompt
  so the agent knows PRD state at session start without running validate
- Add status subcommand to mosaic prdy routing and help text

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 18:33:33 -06:00
Jason Woltje
abead17e0e feat: add multi-runtime support (coord run, prdy --codex) and next-task capsule
- coord/prdy subcommands now accept --claude/--codex runtime flags
- New `mosaic coord run` generates continuation context and launches
  selected runtime, replacing manual copy/paste workflow
- Next-task capsule (.mosaic/orchestrator/next-task.json) provides
  machine-readable execution context for deterministic session launches
- Codex strict orchestrator profile added to runtime/codex/RUNTIME.md
- Orchestrator protocol updated with between-session run flow
- New smoke-test.sh for orchestration behavior verification

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 18:27:09 -06:00
Jason Woltje
fbf74c2736 fix: strip .git suffix in repo detection (POSIX ERE non-greedy bug)
POSIX ERE doesn't support non-greedy +? quantifier, so the pattern
([^/]+?)(\.git)?$ matched .git as part of the repo name instead of
stripping it. Split into two sed passes: strip .git first, then
extract owner/repo.

Fixes wp_detect_repo() and init-project.sh CICD_REPO_NAME.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 13:08:47 -06:00
Jason Woltje
364d6c2278 fix: use Woodpecker v3 numeric repo IDs in API calls
Woodpecker v3 requires numeric repo IDs in API endpoints, not
owner/repo path segments. The old paths hit the SPA frontend
catch-all and return HTML, which downstream tools misinterpret
as auth failure (401).

- Add tools/woodpecker/_lib.sh with wp_resolve_repo_id() helper
  that calls /api/repos/lookup/{owner}/{repo} to get numeric ID
- Update all 3 pipeline scripts to resolve repo ID before API calls

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 12:54:03 -06:00
Jason Woltje
93efbcdafe fix: align codex mission resume and uppercase guide refs 2026-02-23 12:29:37 -06:00
Jason Woltje
def9c2fd7a feat: add Woodpecker multi-instance credential support
Add named instance support matching the existing cloudflare pattern:
- credentials.sh: woodpecker-<name> loads .woodpecker.<name>.{url,token}
- credentials.sh: bare woodpecker resolves via .woodpecker.default or
  WOODPECKER_INSTANCE env, with legacy flat-key fallback
- All 3 pipeline tools accept -a <instance> flag to select instance

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 11:40:51 -06:00
Jason Woltje
405bc4c797 fix: show mission context when no active session in coord status
Previously `mosaic coord status` only said "No active session" with no
indication of whether a mission existed. Now shows mission name, status,
milestones/tasks progress, and actionable next steps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 11:08:16 -06:00
Jason Woltje
c9bf578396 feat: add mosaic prdy command for PRD creation and validation
Adds `mosaic prdy {init|update|validate}` subcommand:
- init: launches yolo Claude session with PRD-focused system prompt
- update: launches session to modify existing docs/PRD.md
- validate: bash-only completeness checker (15 checks against PRD guide)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 11:04:35 -06:00
e5c4bf25b3 feat: add Cloudflare DNS tool suite with multi-instance support
- zone-list, record-list, record-create, record-update, record-delete
- Named instance support (-a flag) with configurable default
- Zone name-to-ID auto-resolution in shared _lib.sh
- Updated credentials loader with cloudflare/cloudflare-<name> services
- TOOLS.md and INFRASTRUCTURE.md guide documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 21:31:52 -06:00
5ba531e2d0 feat: r0 coordinator tooling for orchestrator protocol
Implements the manual coordinator workflow for multi-session agent
orchestration. Agents stop after one milestone (confirmed limitation);
these tools let the human coordinator check status, generate continuation
prompts, and chain sessions together.

New:
- tools/orchestrator/ — 5 scripts + shared library (_lib.sh)
  - mission-init.sh: initialize mission with milestones and state files
  - mission-status.sh: dashboard showing milestones, tasks, sessions
  - session-status.sh: check if agent is running/stale/dead
  - continue-prompt.sh: generate paste-ready continuation prompt
  - session-resume.sh: crash recovery with dirty state detection
- guides/ORCHESTRATOR-PROTOCOL.md: agent-facing mission lifecycle guide
- templates/docs/: mission manifest, scratchpad, continuation templates
- templates/repo/.mosaic/orchestrator/mission.json: state file template

Modified:
- bin/mosaic: add 'coord' subcommand + resume advisory on launch
- AGENTS.md: conditional loading for protocol guide + rule 37
- bin/mosaic-doctor: checks for new coordinator files
- session hooks: mission detection on start, cleanup on end

Usage: mosaic coord init|mission|status|continue|resume

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:22:50 -06:00
a8e580e1a3 feat: rename rails/ to tools/ and add service tool suites (#4)
Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
2026-02-22 17:52:23 +00:00