Skip to content

fleet:request — Partnership protocol: VIBE_SESSION_CONTRACT + FLEET_SESSION_REPORT + budget-aware planning #2

@sahajamoth

Description

@sahajamoth

Federation Request from Fleet v0.8.1

Fleet proposes a bidirectional session contract so vibe can orchestrate Fleet-enabled Claude Code sessions with full cost visibility, task-level reporting, and budget-aware planning.

Problem

Today vibe treats each Claude Code session as a black box — it sends a prompt and gets back aggregate total_cost_usd and num_turns. When Fleet orchestrates internally (captain → crews → officers), vibe has no visibility into the 5+ subagent dispatches, the plan structure, or per-task costs.

Proposal

1. VIBE_SESSION_CONTRACT (vibe → Fleet)

Vibe injects budget and context into Claude Code sessions:

<!-- VIBE_SESSION_CONTRACT
job_id: VB-20260404-042
pipeline: feature
stage: implement
budget:
  ceiling_usd: 5.00
  max_tool_calls: 200
  max_turns: 60
  max_crew_dispatches: 3
  intensity: thorough
  hard_ceiling: false
context:
  prior_stages:
    - stage: plan
      summary: "Identified 3 files, 2 crews needed"
      cost_usd: 0.85
-->

2. FLEET_SESSION_REPORT (Fleet → vibe)

Fleet produces structured session reports with per-task cost breakdown:

<!-- FLEET_SESSION_REPORT
job_id: VB-20260404-042
execution:
  status: completed
  total_cost_usd: 3.87
  total_tool_calls: 156
fleet_activity:
  tasks_created: 4
  tasks_completed: 4
  crew_dispatches: 2
  officer_dispatches: 3
  tasks:
    - id: TASK-20260404-001
      crew: api
      cost_usd: 1.85
      commits: ["def5678"]
  follow_ups:
    - title: "Redis connection pooling"
      priority: medium
budget_utilization:
  cost_pct: 77.4
  recommendation: within_budget
-->

3. Budget-aware planning

New CLI flags: --digs, --intensity, --budget. Budget flows down (vibe → Fleet → crews), actuals flow up (crews → Fleet → vibe). Self-calibrating profiles from historical data.

Implementation ask (vibe side)

Component Change
worker.py Inject VIBE_SESSION_CONTRACT into prompts, parse FLEET_SESSION_REPORT from results
features.py Sync Fleet task IDs with vibe sprint tasks, auto-promote follow-ups
CLI --budget, --intensity, --digs flags on vibe run
vibe.yaml fleet: config section (enabled, budget_protocol, task_sync)

Fleet side (already implemented in v0.8.1)

  • report-persister.sh hook persists FLEET_REPORT to .fleet/tasks/{id}/
  • fleet_task_id links crew output to task records
  • /fleet task command (list, show, cost, follow-ups, blame)
  • Captain creates task records in Phase 1, reads them in Phase 4

Full spec: https://github.com/sahajamoth/fleet/blob/master/.fleet/federation/outbox/2026-04-04-vibe-partnership-protocol.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions