feat(fleet): system-type profiles (H2) #660
Reference in New Issue
Block a user
Delete Branch "feat/h2-system-profiles"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
H2 — System-type profiles (declarative roster + topology)
Implements North Star goal H2: a declarative mapping from a system type to a persona roster + org topology, plus a loader/validator and a
mosaic fleet profileCLI. Profiles are DATA (yaml seeded like roles), so an operator declares a system type and gets the matching roster from the baseline library with no code change (NS-9 / AC-NS-6).Profile yaml schema
The full schema lives commented in
software-delivery.yaml.5 baseline profiles
Loader / validator
packages/mosaic/src/commands/fleet-profiles.ts—loadProfiles/loadProfile/parseProfile/validateProfile. Resolves<mosaicHome>/fleet/profiles/*.yamlvia the same MOSAIC_HOME helper as the rest of fleet code (tests use a dir-override param).listPersonaClasses()derives the set of valid classes from the role library by unioning three signals: inline`class: X`markers (handles the newline-wrappedsupport-agentmarker),LIBRARY.mdindex rows, and role filenames — so marker-less engineering personas (planner,decomposition) resolve. Validation rejects unknownlead/floor/roster.class/reports_to, duplicate ids, and areports_tonot present in the roster.CLI
mosaic fleet profile list [--json]andmosaic fleet profile show <id> [--json]. Invalid profiles / unknown ids exit non-zero with a readable message.Library-drift validation test
fleet-profiles.spec.tsincludes the key guard: every class referenced by every baseline profile resolves against the real committed role library — so roster/library drift fails CI. Also covers parse defaults, list/show shape, and unknown-class / unknown-reports_to rejection via a temp dir.Deviation
The task spec asked for
lead: orchestratoron software-delivery, butorchestratorhas no role file orclass:marker —roles/planner.mdstates "the planner role IS the existing orchestrator class". To keep every referenced class resolvable (the hard validation requirement), software-delivery usesplanneras lead and[planner, enhancer]as floor. Documented inline in the yaml.Gates
typecheck ✓ · lint ✓ · prettier ✓ · vitest 585 passed (incl. 16 new profile tests) ✓ · CLI smoke-tested from
dist/cli.js.🤖 Generated with Claude Code