mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-12 23:02:41 +00:00
parent
9bcedd847a
commit
2b90dbea79
3 changed files with 51 additions and 0 deletions
34
graph.fabro
Normal file
34
graph.fabro
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
digraph ImplementAndSimplify {
|
||||
graph [
|
||||
goal="Implement and simplify",
|
||||
model_stylesheet="
|
||||
* { backend: api; model: claude-opus-4-6;}
|
||||
"
|
||||
]
|
||||
rankdir=LR
|
||||
|
||||
start [shape=Mdiamond, label="Start"]
|
||||
exit [shape=Msquare, label="Exit"]
|
||||
|
||||
toolchain [label="Toolchain", shape=parallelogram, script="command -v cargo >/dev/null || { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && sudo ln -sf $HOME/.cargo/bin/* /usr/local/bin/; }; cargo --version 2>&1", max_retries=0]
|
||||
preflight_compile [label="Preflight Compile", shape=parallelogram, script="cargo check 2>&1", max_retries=0]
|
||||
preflight_lint [label="Preflight Lint", shape=parallelogram, script="cargo clippy -- -D warnings 2>&1", max_retries=0]
|
||||
fix_lints [label="Fix Lints", prompt="The preflight lint step failed. Read the build output from context and fix all clippy lint warnings.", max_visits=3]
|
||||
implement [label="Implement", prompt="Read the plan file referenced in the goal and implement every step. Make all the code changes described in the plan."]
|
||||
simplify [label="Simplify", prompt="@prompts/simplify.md"]
|
||||
verify [label="Verify", shape=parallelogram, script="cargo clippy -- -D warnings 2>&1 && cargo test 2>&1", goal_gate=true, retry_target="fixup"]
|
||||
fixup [label="Fixup", prompt="The verify step failed. Read the build output from context and fix all clippy lint warnings and test failures.", max_visits=3]
|
||||
|
||||
start -> toolchain
|
||||
toolchain -> preflight_compile [condition="outcome=success"]
|
||||
toolchain -> exit
|
||||
preflight_compile -> preflight_lint [condition="outcome=success"]
|
||||
preflight_compile -> exit
|
||||
preflight_lint -> implement [condition="outcome=success"]
|
||||
preflight_lint -> fix_lints
|
||||
fix_lints -> preflight_lint
|
||||
implement -> simplify -> verify
|
||||
verify -> exit [condition="outcome=success"]
|
||||
verify -> fixup
|
||||
fixup -> verify
|
||||
}
|
||||
12
manifest.json
Normal file
12
manifest.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"run_id": "01KKS6FZ8NX3ETDF525W0HRVA8",
|
||||
"workflow_name": "ImplementAndSimplify",
|
||||
"goal": "# Plan: Improve `fabro ps` output\n\n## Context\n\n`fabro ps` currently prints a plain-text table with no color, no row limit, and no duration/cost info. Other CLI commands (`logs`, `validate`, `graph`, `run`, `rewind`) already use `Styles` for colored output. The data to enrich the display (duration, cost) is already available in `conclusion.json` but isn't surfaced by `ps`.\n\n## Changes\n\n### 1. Add `--limit` / `--all` flags to `RunsListArgs`\n\n**File:** `lib/crates/fabro-workflows/src/cli/runs.rs` (~line 65)\n\n- Add `--limit N` arg (default 10) and `--all` flag\n- `--all` overrides limit to show everything\n- Apply limit via `.take(limit)` after filtering in `list_command`\n- Print footer like `\"Showing 10 of 42 run(s). Use --all to see all.\"`\n\n### 2. Add color to `list_command`\n\n**File:** `lib/crates/fabro-workflows/src/cli/runs.rs` (~line 337)\n\n- Change signature: `list_command(args, styles: &Styles)`\n- Color the STATUS column by status:\n - `success` / `partial_success` -> `bold_green`\n - `fail` -> `bold_red`\n - `running` -> `bold_cyan`\n - `unknown` -> `dim`\n- Bold the header row\n- Dim the separator line\n- Dim the labels column\n\n### 3. Wire `Styles` into `Ps` handler\n\n**File:** `lib/crates/fabro-cli/src/main.rs` (~line 600)\n\n- Create `Styles::detect_stdout()` (like `logs` command) and pass to `list_command`\n\n### 4. Add duration and cost columns\n\n**File:** `lib/crates/fabro-workflows/src/cli/runs.rs`\n\n- Add `duration_ms: Option<u64>` and `total_cost: Option<f64>` fields to `RunInfo`\n- Populate from `Conclusion` in `scan_runs()` (already loaded in `read_status`)\n - Refactor `read_status` to return the full conclusion data (or a small struct with status, end_time, duration_ms, total_cost)\n- Add DURATION and COST columns to the table output\n- Use existing `progress::format_duration_short` for duration, `cli::format_cost` for cost\n- Show `\"-\"` when not available (running/unknown)\n\n### 5. Format start time as relative\n\n- Show `\"2m ago\"`, `\"3h ago\"`, `\"5d ago\"` instead of raw RFC 3339 timestamps\n- Keep full timestamp in `--json` output\n\n## Files to modify\n\n1. `lib/crates/fabro-workflows/src/cli/runs.rs` — bulk of changes\n2. `lib/crates/fabro-cli/src/main.rs` — pass `Styles` to `list_command`\n\n## Existing code to reuse\n\n- `fabro_util::terminal::Styles` (`lib/crates/fabro-util/src/terminal.rs`)\n- `progress::format_duration_short` (`lib/crates/fabro-workflows/src/cli/progress.rs:65`)\n- `cli::format_cost` (`lib/crates/fabro-workflows/src/cli/mod.rs:246`)\n\n## Verification\n\n- `cargo build -p fabro-cli`\n- `cargo test -p fabro-workflows`\n- `cargo clippy --workspace -- -D warnings`\n- Manual: `fabro ps`, `fabro ps --all`, `fabro ps --limit 5`, `fabro ps --json`\n",
|
||||
"start_time": "2026-03-15T16:50:35.605738Z",
|
||||
"node_count": 10,
|
||||
"edge_count": 13,
|
||||
"run_branch": "fabro/run/01KKS6FZ8NX3ETDF525W0HRVA8",
|
||||
"base_sha": "891a6db29bf35007d664b08e511dc52fc62fa879",
|
||||
"base_branch": "main",
|
||||
"workflow_slug": "implement"
|
||||
}
|
||||
5
sandbox.json
Normal file
5
sandbox.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"provider": "daytona",
|
||||
"working_directory": "/home/daytona/workspace",
|
||||
"identifier": "fabro-01KKS6FZ8NX3ETDF525W0HRVA8"
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue