Compare commits

..

2 Commits

Author SHA1 Message Date
f27371be7a feat(fleet): enhancer role + two-agent floor (orchestrator + enhancer) (#614)
Some checks failed
ci/woodpecker/push/ci Pipeline was canceled
ci/woodpecker/pr/ci Pipeline was canceled
From Jason's north-star (docs/fleet/north-star.md, #613): every fleet has a
two-agent floor — orchestrator + enhancer minimum. Builds on #612's init-R5.

- Presets (general/coding/research/hybrid): add enhancer (claude, class:
  enhancer, persistent_persona) as a core always-on agent. minimal/local-canary
  unchanged.
- fleet.ts: countEnhancers helper; init guarantee extended — non-minimal
  profiles must yield exactly 1 orchestrator AND >=1 enhancer (hard-fail);
  removeAgentFromRoster refuses to drop the sole enhancer (symmetric with the
  sole-orchestrator guard) so the floor holds at runtime, not just init.
- framework/fleet/roles/enhancer.md: the enhancer mandate (monitor -> analyze ->
  plan -> upgrade tools/skills/harness WITH orchestrator -> file Mosaic Stack
  bug reports) + boundaries (does NOT code or review).

Verified: 155 fleet tests green (countEnhancers; sole-enhancer remove guard;
remove-allows-when-another; init two-agent-floor; every-non-minimal-preset-has-
enhancer; updated preset rosters). tsc/eslint/prettier/sanitize clean. TDD on
the init guarantee + remove protection.

Stacked on #612 (feat/fleet-polish-bundle); rebases clean onto main after #612.

Refs #614, #613

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EsgTQzV5YUGk1JtCLP4B83
2026-06-22 03:03:11 -05:00
eb32df6cc5 fix(fleet): boot-survival symmetry — disable-on-remove + add-enable + init-R5 (#611)
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful
Codex symmetry-gap finding. Three fixes completing add/remove boot-survival
symmetry:

1. disable-on-remove (BUG, TDD): fleet remove stopped + deleted roster/env/
   heartbeat but never disabled the systemd unit, so a removed-but-enabled
   mosaic-agent@NAME.service could resurrect on reboot pointing at deleted
   config. Add buildSystemdDisableCommand + disable in remove (best-effort,
   gated on !--keep-files).
2. add-enable: fleet add now enables the new agent's unit for boot-survival
   (best-effort, independent of --start).
3. init-R5 guarantee: fleet init --write now fails hard when a non-minimal
   profile lacks exactly one orchestrator (was a soft warning); the sanctioned
   no-orchestrator 'minimal' preset is still allowed.

Verified: 4 new tests (disable builder; remove-invokes-disable; add-invokes-
enable; init general → exactly 1 orchestrator) + 147 existing fleet tests green
(151 total); tsc/eslint/prettier clean.

Refs #611

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EsgTQzV5YUGk1JtCLP4B83
2026-06-22 02:44:39 -05:00

Diff Content Not Available