docs: agent-compose.yaml design spec (TASK-098)#228
Conversation
docs/design-docs/agent-compose.md
Outdated
|
|
||
| --- | ||
|
|
||
| ## Drift Detection |
There was a problem hiding this comment.
Add a Why section here - asking because I don't understand why its required.
The application is getting heavy on features, we should be able to spell out real use cases where I would want automatic drift detection and resolution in the application.
If we abandon drift detection / resolution, it simplifies this feature quite a bit, as we don't need to store any state in the application.
|
Updated the spec based on @tiwillia's feedback and additional direction: server-side drift tracking is removed entirely. The revised model is terraform-style: the YAML file is the source of truth, and |
|
|
||
| ## CLI Architecture — Import as a Client-Side Tool | ||
|
|
||
| `boss import` is implemented entirely in the CLI. It does not call a single monolithic server endpoint. Instead, it: |
There was a problem hiding this comment.
I can imagine some use cases that will require this to be supported in the server as well (like adding this capability to the MCP server) but +1 to move forward, this is simple and easy to expand upon in its current state.
Portable team blueprint format for exporting/importing agent hierarchies. Covers: YAML schema, sync import semantics, drift detection, CLI + UI surface, and 3-phase implementation plan. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…edback Key changes: - Import repositioned as CLI tool calling existing endpoints (not a monolithic POST /spaces/import). Server exposes primitives; CLI orchestrates the import plan (terraform model). - Remove server-side drift tracking (fleet_config_hash, drift endpoints). Diff is computed client-side by comparing local YAML to fetched server state — same as kubectl apply / terraform apply. - Import UI modal uses same client-side diff approach. - Add --restart-changed flag (replaces --restart-drifted) for immediately respawning agents whose config changed after import. - Address reviewer comment (tiwillia): remove server-side state tracking, keep import/export simple with no new server concepts. - Security section retained: command allowlist, YAML bomb protection, prompt injection notes, prune+live-session safety, auth. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
P0: - Remove false "persona sandboxing" claim; replace with accurate statement that prompts are stored as-is, operators must review before importing from untrusted sources - Dry-run now shows full persona prompt diffs (not just one-line summary); malicious prompts are visible before apply P1: - shared_contracts: explicit delivery mechanism documented (prepended to ignition text before personas + initial_prompt) - Composition order rule: shared_contracts → persona(s) → initial_prompt - Persona ID namespace: global namespace documented as known tradeoff; guidance to use unique IDs (e.g. project-prefixed) - Server-side YAML bomb guard: enforced independently of CLI, covers UI upload path (1MB / 100 agents) - repos URL validation: HTTPS-only, RFC 1918 + link-local blocked, DNS pre-check before passing to ambient runner - work_dir validation: absolute path required, .. rejected after Clean, BOSS_WORK_DIR_PREFIX configurable allowed prefix - Post-import state: "N agents created, none running yet" + Spawn all action (CLI: --spawn-after-import; UI: button in success modal) - Phase ordering fixed: export + import core ship together (Phase 1); --prune and --restart-changed move to Phase 2 P2: - UI diff XSS: all YAML-sourced content rendered as plain text, no innerHTML of user-controlled strings - Export URL credential scrubbing: userinfo stripped from repo_url - agent description field added to schema table - Round-trip fidelity: export always includes all fields explicitly (even defaults) to prevent phantom diffs on re-import - Space creation edge case: offer to create if missing, or error with --no-create-space flag P3: - Frontend YAML parser dependency noted (js-yaml or equivalent) - --yes CI/CD safety note: prompt injection risk documented - Command allowlist location: BOSS_COMMAND_ALLOWLIST env var - Concurrent import: 409 treated as already-done, safe to continue - --restart-changed uses pre-apply diff to avoid concurrent-change races Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
e88e1cb to
599cc8a
Compare
Summary
Design spec for
agent-compose.yaml— a portable team blueprint file for exporting and importing agent hierarchies between spaces/environments.Key design decisions:
kubectl applystyle): create new agents, update existing configs, leave unmentioned agents alone (opt-in--prune)fleet_config_hashper agent; show "out of sync" badge + "Sync fleet" button when config diverges from last importDesign discussion summary
Test plan
Closes TASK-098 (design phase)
🤖 Generated with Claude Code