Enhance agent documentation and implement Mission Control dashboard#1
Enhance agent documentation and implement Mission Control dashboard#1Szowesgad wants to merge 8 commits into
Conversation
Rename and expand operator guidelines: move .vibecrafted/GUIDELINES.md to AGENTS.md at repo root and add loctree/AICX-oriented operator doctrine and agent-op guidelines. Update .gitignore to reflect the new AGENTS.md location, keep .vibecrafted as local scratch, and add additional ignore patterns (.junie, *.txt). Bump workspace package version in Cargo.toml from 0.1.0 to 0.2.1. Add new planning doc docs/plans/PLAN_23_AGENT_OPERATOR_DASHBOARD.md describing the Mission Control/TUI dashboard roadmap and dispatch waves.
Introduce a Mission Control aggregation and dashboard across the TUI and FFI surface. Adds a new tui-agent/src/mission_control.rs module that scans artifact meta.json files and the control-plane snapshot to build a typed MissionControlState (wave atlas, active dispatches, per-agent/skill stats, fleet health, failure board, action queue, and data-quality signals) with tests and deterministic build_at entrypoint. Update TUI (app.rs, lib.rs) to add a Mission Control tab, cached mission state, artifact-root resolution, navigation, tab labels, refresh logic, and a mission panel count constant. Expose a shell-friendly snapshot via uniffi in shell-agent/ffi/src/lib.rs (FFI enums/records and load_mission_control_snapshot[_at] functions) converting internal types to FFI records so external surfaces can render the same dashboard view.
…+ gate hygiene Close out PLAN_22 + PLAN_23 by sealing the in-flight Mission Control finishing pass and unblocking the `make gates` quality gate that ground-truth verification of the plan demands. - Wire polarize intents into the Mission Control aggregation: `MissionControlState::build_with_intents` / `build_at_with_intents` thread `&[PolarizeIntent]` through to the action queue so the dashboard's "what to press next" list surfaces doctrine/abort prisms with band-correct priority. The legacy `build` / `build_at` entrypoints stay intact as zero-intent convenience wrappers. - App refresh now hydrates Mission Control with the cached polarize intents, removing the prior split-brain between the polarize panel and the action queue. - Enter on the Mission Control action queue panel jumps to Controls *and* preselects the matching deep action via the new `deep_action_index_for_primary_mission_queue_item` / `preselect_controls_from_mission_queue` pair. Operator gets a one-keystroke handoff instead of "Controls opens, pick something". - `state_contract.rs` locks the new behavior with `mission_queue_preselects_matching_deep_action_for_controls_handoff`, plus the existing seven-panel focus / aggregation / failure-board / malformed-input contracts continue to hold. - Make `tests/skill_launcher.rs` layout-tolerant: honor `VIBECRAFTED_SKILLS_ROOT`, fall back to a sibling `vibecrafted/skills/` next to the workspace, then a legacy colocated `skills/` for monorepo checkouts. Exclude the `vc-operator` skill directory the same way `foundations` is excluded — it is the orchestrator doctrine charter this workspace implements, intentionally not a launchable CATALOG entry. - Re-format the touched modules so `cargo fmt --all --check` is green; pre-existing drift was masking the actual failure under noisier diffs. Quality gates after the pack: - `make gates` (fmt-check + clippy -D warnings + workspace tests) PASSED - `cargo check --workspace --all-features` PASSED - `cargo check --workspace --no-default-features` PASSED Authored-By: claude <agents@vetcoders.io>
Extract skill root resolution logic from the catalog test into helpers: skill_root_candidates, has_skill_entries, and resolve_skill_root, and introduce a SkillRootResolution enum. The test now matches on Found vs Missing: when found it computes the existing skill set and asserts parity with CATALOG; when missing it asserts candidate list is non-empty and prints checked paths for diagnostics. This simplifies the test, improves readability, and centralizes candidate selection and existence checks.
…onl bridge + tray rendering - add SpawnUpdate IPC payload and events.jsonl bridge for vibecrafted control-plane spawn events - render spawn lifecycle in tray status, recent runs, and completion notifications - document vc-mux retirement evidence and convergence boundary Authored-By: codex <agents@vetcoders.io>
There was a problem hiding this comment.
Code Review
This pull request introduces a new "Mission Control" dashboard tab to the tui-agent cockpit, providing a comprehensive seven-panel grid layout that aggregates active dispatches, wave progress, agent/skill statistics, fleet health, and recent failures. It also exposes this state via UniFFI for cross-surface parity with the macOS shell. The review feedback highlights critical compilation issues due to the use of unstable Rust let_chains syntax, a logical bug in the data-quality capping calculation, and some redundant variable calculations in the UI rendering code.
| if name.len() == 8 | ||
| && name.bytes().all(|b| b.is_ascii_digit()) | ||
| && let Ok(date) = NaiveDate::parse_from_str(name, "%Y%m%d") | ||
| { | ||
| return date >= *window_floor; | ||
| } |
There was a problem hiding this comment.
The use of let chains (e.g., && let Ok(date) = ...) is an unstable feature in Rust (let_chains). This will cause compilation failures on stable Rust compilers. It is highly recommended to rewrite this using standard nested if let statements to ensure compatibility with stable Rust.
if name.len() == 8 && name.bytes().all(|b| b.is_ascii_digit()) {
if let Ok(date) = NaiveDate::parse_from_str(name, "%Y%m%d") {
return date >= *window_floor;
}
}| if let Some(model) = record.meta.model.as_deref() | ||
| && !model.is_empty() | ||
| && model != "unknown" | ||
| { | ||
| bucket.model_known += 1; | ||
| } |
There was a problem hiding this comment.
| if quality.scanned_meta_files >= META_SCAN_CAP { | ||
| quality.capped = true; | ||
| } |
There was a problem hiding this comment.
Setting quality.capped based solely on quality.scanned_meta_files can lead to incorrect reporting. If the directory walk reached the META_SCAN_CAP limit but some files failed to read or parse, quality.scanned_meta_files will be less than META_SCAN_CAP, causing quality.capped to remain false even though the scan was indeed capped. Checking quality.scanned_meta_files + quality.parse_failures provides an accurate check of whether the scan reached the cap.
| if quality.scanned_meta_files >= META_SCAN_CAP { | |
| quality.capped = true; | |
| } | |
| if quality.scanned_meta_files + quality.parse_failures >= META_SCAN_CAP { | |
| quality.capped = true; | |
| } |
| let model_pct = (row.model_known_rate * 100.0).round() as i32; | ||
| let success_pct = (row.success_rate * 100.0).round() as i32; | ||
| out.push(Line::from(format!( | ||
| "{:<9} {:>4} {:>4} {:>4} {:>6} {:>4}%", | ||
| truncate(&row.agent, 9), | ||
| row.total_runs, | ||
| row.completed, | ||
| row.failed, | ||
| avg, | ||
| model_pct, | ||
| ))); | ||
| let _ = success_pct; |
There was a problem hiding this comment.
The variable success_pct is calculated but never used in the format string or displayed in the table. Removing this redundant calculation and its warning silencer (let _ = success_pct;) cleans up the code and improves maintainability.
let model_pct = (row.model_known_rate * 100.0).round() as i32;
out.push(Line::from(format!(
"{:<9} {:>4} {:>4} {:>4} {:>6} {:>4}%",
truncate(&row.agent, 9),
row.total_runs,
row.completed,
row.failed,
avg,
model_pct,
)));There was a problem hiding this comment.
Pull request overview
This PR adds a new “Mission Control” dashboard surface (aggregation + TUI tab + FFI snapshot) and updates operator documentation/planning, alongside a workspace version bump.
Changes:
- Implement Mission Control aggregation over control-plane state + artifact
*.meta.json, with new tests and deterministic build entrypoints. - Add a Mission Control tab to the TUI (layout, navigation, refresh/caching, panel focus) and expose the same snapshot via UniFFI for shell surfaces.
- Add PLAN_23 dashboard implementation plan + expand/rename agent/operator doctrine docs; bump workspace version.
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tui-agent/src/mission_control.rs | New Mission Control state aggregation (meta.json scan, stats, wave atlas, failures, action queue, data quality) + unit tests |
| tui-agent/src/ui.rs | Render Mission Control tab (7 panels) and footer hint text |
| tui-agent/src/app.rs | Add Mission Control tab, cached mission state, focus navigation, artifact-root resolution, and Controls handoff helpers |
| tui-agent/src/lib.rs | Export Mission Control module and re-export its public types |
| tui-agent/tests/state_contract.rs | Extend app/test fixtures and add Mission Control behavior/navigation contracts |
| tui-agent/tests/skill_launcher.rs | Refactor skills-root resolution to support extracted workspaces and exclude vc-operator |
| shell-agent/ffi/src/lib.rs | Add UniFFI records/enums + snapshot loader for Mission Control parity across shell surfaces |
| docs/plans/PLAN_23_AGENT_OPERATOR_DASHBOARD.md | New implementation plan for the Agent-Operator dashboard (Mission Control) |
| AGENTS.md | New/expanded operator doctrine and cross-repo pointers |
| .gitignore | Update ignore patterns to reflect AGENTS.md move and local scratch behavior |
| Cargo.toml | Workspace version bump to 0.2.1 |
| Cargo.lock | Lockfile update reflecting workspace version bump |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| eta_label, | ||
| }); | ||
| } | ||
| out.sort_by(|left, right| left.age_label.cmp(&right.age_label)); |
| age_label: snapshot | ||
| .updated_at | ||
| .as_deref() | ||
| .and_then(parse_rfc3339) | ||
| .map(|ts| relative_age(ts, now)) | ||
| .unwrap_or_else(|| "age unknown".to_string()), | ||
| source_path: snapshot | ||
| .latest_report | ||
| .as_deref() | ||
| .map(PathBuf::from) | ||
| .or_else(|| snapshot.root.as_deref().map(PathBuf::from)), | ||
| }); | ||
| } | ||
|
|
||
| failures.sort_by(|left, right| left.age_label.cmp(&right.age_label)); | ||
| failures.truncate(20); | ||
| failures |
| match record.meta.exit_code { | ||
| Some(0) => entry.completed += 1, | ||
| Some(code) if code != 0 => entry.failed += 1, | ||
| _ => {} | ||
| } | ||
| match record.meta.status.as_deref().map(str::to_ascii_lowercase) { | ||
| Some(ref status) if status.contains("fail") || status.contains("error") => { | ||
| entry.failed += 1; | ||
| } | ||
| Some(ref status) if status.contains("complete") || status.contains("done") => { | ||
| entry.completed += 1; | ||
| } | ||
| _ => {} |
| // If the directory walk produced more than the cap before the take | ||
| // applied above, mark the data-quality flag so the operator sees | ||
| // load-shed truth instead of a "5000 runs" claim. | ||
| if quality.scanned_meta_files >= META_SCAN_CAP { | ||
| quality.capped = true; |
| /// Treat the cap as a load-shed marker rather than a hard truth — the | ||
| /// `data_quality.scanned_meta_files == capped` signal warns the operator. |
| "Active dispatches", | ||
| vec![ | ||
| format!("{} running", mission.active_dispatches.len()), | ||
| format!("{} stalled queue items", mission.action_queue.len()), |
| let model_pct = (row.model_known_rate * 100.0).round() as i32; | ||
| let success_pct = (row.success_rate * 100.0).round() as i32; | ||
| out.push(Line::from(format!( | ||
| "{:<9} {:>4} {:>4} {:>4} {:>6} {:>4}%", | ||
| truncate(&row.agent, 9), | ||
| row.total_runs, | ||
| row.completed, | ||
| row.failed, | ||
| avg, | ||
| model_pct, | ||
| ))); | ||
| let _ = success_pct; | ||
| } |
| /// without doing IO inside the draw path. The artifact root is | ||
| /// resolved once via `mission_control::default_artifact_root()`. | ||
| pub mission_control: MissionControlState, | ||
| /// Selected panel index inside the Mission Control tab (0..7). |
…-tui - Rename short binary `vc-operator` → `vc-tui` (src/bin/vc-tui.rs) - Update CLI usage string, tray launch probe, app-bundle Makefile copy - README/AGENTS.md workspace identity + Cargo.toml repository URL → vc-tui - `archived_by` runtime marker → "vc-tui" - Crate `vibecrafted-operator` preserved (per AGENTS.md anti-pattern) - Skill/agent `/vc-operator` untouched — stays the orchestration doctrine charter; rename frees the name from the TUI product surface Authored-By: claude <agents@vetcoders.io>
…e foundation skills - Add vc-audit + vc-skillaunch to launcher CATALOG (real workflows) - Exclude vc-aicx/vc-loctree/vc-prview/vc-screenscribe from the drift test — foundation/tool-wrapper skills, not standalone launchables - Greens catalog_covers_existing_vibecrafted_skill_directories Authored-By: claude <agents@vetcoders.io>
Refactors Makefile help output to use structured `printf` output with ANSI color constants, improving readability and alignment of command descriptions. Authored-By: codex <agents@vetcoders.io> session_id: 019e90db-cdfe-7ad2-ab53-d62bef636222 time: Thu Jun 4 14:08:52 MDT 2026 runtime: iterm2
This pull request introduces significant documentation and planning updates to support the development of the Agent-Operator Dashboard, as well as minor versioning and dependency changes. The most important changes are the addition of a comprehensive dashboard implementation plan, formalization of Loctree/AICX/Vibecrafted operational doctrine, and workspace version bump.
Documentation and Planning Updates:
docs/plans/PLAN_23_AGENT_OPERATOR_DASHBOARD.md, outlining the dashboard's purpose, architecture, panel layout, data sources, phased development plan (Waves 0–D), and acceptance criteria. This plan will guide the dashboard's development as a new tab in the terminal UI, providing real-time fleet, agent, and skill statistics.AGENTS.md(formerly.vibecrafted/GUIDELINES.md), specifying best practices for codebase navigation, operational rules for using structural tools, and backlog recording for tool gaps.AGENTS.mddocumenting the cross-repo Agent-Operator doctrine, linking to canonical skill and plan documents and clarifying the operator's workflow and conventions.Project Configuration:
Cargo.tomlfrom0.1.0to0.2.1to reflect ongoing development and planned feature additions.Dependency and Integration Prep:
shell-agent/ffi/src/lib.rsto import new modules fromvibecrafted_operator, preparing for integration with dashboard configuration and state management.