fabro/docs
brynary-fabro[bot] bd636a16cd Add --direction flag to fabro graph (#15)
This PR adds a `--direction` (`-d`) flag to the `fabro graph` CLI
command, bringing it to parity with the web UI's LR/TB toggle buttons.
Users can now pass `--direction lr` or `--direction tb` to override the
`rankdir` declared in the DOT source before it's handed off to the `dot`
renderer.

The implementation introduces a `GraphDirection` enum (with `ValueEnum`
and `Display` derives for clap integration), an optional `--direction`
field on `GraphArgs`, and an `apply_direction` helper that uses a
lazy-compiled regex to rewrite `rankdir=…` in the DOT source—mirroring
the same approach used by the web UI. The CLI docs are updated with the
new flag, and two unit tests verify that the rewrite works correctly and
that omitting the flag leaves the source unchanged.

### Fabro Details

<details>
<summary>Ran 10 stages in 17m 6s for $3.60</summary>

| Stage | Duration | Cost | Retries |
|---|---|---|---|
| start | 0s | – | 0 |
| toolchain | 0s | – | 0 |
| preflight_compile | 0s | – | 0 |
| preflight_lint | 0s | – | 0 |
| implement | 0s | $0.68 | 0 |
| simplify_opus | 0s | $1.02 | 0 |
| simplify_gemini | 0s | $0.83 | 0 |
| simplify_gpt | 0s | $1.06 | 0 |
| verify | 0s | – | 0 |
| fmt | 0s | – | 0 |
| **Total** | **17m 6s** | **$3.60** | **0** |

</details>

<details>
<summary>Ran <code>ImplementAndSimplify.fabro</code> (13 nodes and 16
edges)</summary>

```dot
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_opus     [label="Simplify (Opus)", prompt="@prompts/simplify.md"]
    simplify_gemini   [label="Simplify (Gemini)", prompt="@prompts/simplify.md", model="gemini-3.1-pro-preview-customtools"]
    simplify_gpt      [label="Simplify (GPT-54)", prompt="@prompts/simplify.md", model="gpt-54"]
    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]
    fmt               [label="Format", shape=parallelogram, script="cargo fmt --all 2>&1", goal_gate=true, max_retries=0]

    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_opus -> simplify_gemini -> simplify_gpt -> verify
    verify -> fmt   [condition="outcome=success"]
    verify -> fixup
    fixup -> verify
    fmt -> exit
}

```

</details>

⚒️ Generated with [Fabro](https://fabro.sh)

---------

Co-authored-by: Fabro <noreply@fabro.sh>
2026-03-15 23:18:05 -04:00
..
administration Designate retros as experimental, disable by default via [features] flag 2026-03-15 20:36:32 -04:00
agents Improve hooks docs: multi-layer config, clearer matchers table, sandbox context 2026-03-15 21:52:25 -04:00
api-reference Designate retros as experimental, disable by default via [features] flag 2026-03-15 20:36:32 -04:00
changelog Regenerate March 15 changelog with fork, upgrade, and asset commands 2026-03-15 19:59:30 -04:00
core-concepts Reorganize docs nav: merge Server Mode into Deployment, move Comparison and Dark Factory 2026-03-14 15:39:08 -04:00
deployment docs: rename Arc to Fabro throughout docs 2026-03-12 10:53:44 -04:00
examples Update docs, frontend, marketing, and skills for .fabro extension 2026-03-13 22:38:25 -04:00
execution Designate retros as experimental, disable by default via [features] flag 2026-03-15 20:36:32 -04:00
getting-started Docs updates: reorder nav, rename DOT Language, simplify dark factory, add fork/upgrade/asset docs 2026-03-15 20:13:23 -04:00
human-tools Update docs, frontend, marketing, and skills for .fabro extension 2026-03-13 22:38:25 -04:00
images Improve workflow diagram with LR layout and docs styling 2026-03-14 12:10:35 -04:00
integrations Update docs for new CLI commands, GitHub token injection, and events 2026-03-15 18:33:18 -04:00
languages Update docs, frontend, marketing, and skills for .fabro extension 2026-03-13 22:38:25 -04:00
logo Fix logo SVG viewBox clipping the right edge of the O 2026-03-14 14:11:36 -04:00
reference Add --direction flag to fabro graph (#15) 2026-03-15 23:18:05 -04:00
tutorials Update docs, frontend, marketing, and skills for .fabro extension 2026-03-13 22:38:25 -04:00
workflows Random Edge Selection (#12) 2026-03-15 19:54:48 -04:00
.mintignore Fix Mintlify dev server: valid navbar URL and ignore AGENTS.md 2026-03-05 16:29:50 -05:00
docs.json Add Fabro SDK reference page documenting the fabro-llm crate public API 2026-03-15 20:56:08 -04:00
favicon.svg Rebrand docs site from Arc to Fabro 2026-03-11 21:27:58 -04:00