Skip to content

Fleet Panel: Fleet Profiles CRUD #356

Description

@jeonghun-jj-lee

Important

Approach

Implement Fleet Profile CRUD in the Fleet Panel — list profiles from TOML files,
create new profiles via an inline form, edit/duplicate/delete existing ones. Profiles
are stored as individual TOML files under ~/.amico/ops/fleet/profiles/. The panel
watches the directory for external changes.


Acceptance Criteria

  • Profiles section in the Fleet Panel lists all profiles from
    ~/.amico/ops/fleet/profiles/*.toml
  • Each profile row shows: name (bold) + model/variant (muted) + overflow menu
  • Overflow menu: Edit, Duplicate, Delete actions
  • "+" button at section header opens the create form
  • Create form (inline in the panel): fields for name, base, model, variant,
    task_type, skills (comma-separated or multi-select), gates, permissions
  • On save: generates slug from name (kebab-case), writes <slug>.toml to the
    profiles directory
  • Slug uniqueness: rejects creation if slug already exists (shows error inline)
  • Edit form: pre-fills current values; save overwrites the TOML file
  • Duplicate: copies profile with "-copy" suffix on name/slug
  • Delete: removes the TOML file (with confirmation prompt)
  • File watcher: profiles directory watched via fs.watch; panel updates on
    external TOML file additions/removals/edits (e.g. manual edits)
  • Round-trip: create → close panel → reopen → profile still there with all
    fields intact (TOML serialization preserves all fields)

Testing Decisions

  • Unit test: fleet_profiles.test.ts — TOML serialization round-trip (write → read →
    compare); slug generation from various names; uniqueness rejection
  • Unit test: form validation — required fields (name, model), slug format
  • Integration test: file watcher — write a TOML externally → verify postMessage update
    reaches the webview

Key Decisions

Decision Rationale
One TOML file per profile Human-readable, git-friendly, consistent with fleet record storage
Slug from name (kebab-case) Filesystem-safe, URL-safe, deterministic
Inline form (not modal/dialog) Panel is narrow; inline keeps context visible

Data Contract

Fleet Profile TOML (~/.amico/ops/fleet/profiles/<slug>.toml):

schema = 1
name = "researcher-opus"
base = "pulse-designer"
model = "anthropic.claude-opus-4-6-v1"
variant = ""
task_type = "interactive"
skills = ["transmon", "atoms", "bosonic"]
gates = []

[permissions]
bash = "allow"
file_write = "allow"

Constraints & Invariants

  • Profile directory created on first write if absent (mkdir -p)
  • TOML writes are atomic (write tmp → rename)
  • Profile schema version = 1; future schema changes are additive (new fields optional)

Source

Part of #350
Blocked by #352
ADR 0007: docs/adr/0007-fleet-panel-and-profile-ui.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

afkImplementable without human interactionenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions