fabro/docs
brynary-fabro[bot] d29c1d817e
Wire up missing hook invocations (#19)
This PR wires up three `HookEvent` variants—`StageRetrying`,
`ParallelStart`, and `ParallelComplete`—that were defined in the enum
and documented but never actually invoked by the engine. `StageRetrying`
hooks now fire at both retry sites in `execute_with_retry` (error-retry
and explicit-Retry-status paths) immediately before the backoff sleep.
`ParallelStart` and `ParallelComplete` hooks fire in the parallel
handler after their corresponding event emissions, using a new
`EngineServices::run_hooks()` convenience method since the handler
doesn't have direct access to the engine's hook method.

The two remaining unwired events, `SandboxReady` and `SandboxCleanup`,
are marked as reserved with doc comments on the enum variants and
annotated in the docs table, since wiring them requires sandbox
lifecycle changes outside the engine's scope. A small
`HookContext::set_node()` helper is introduced to reduce repeated field
assignment across all hook call sites, and existing
`StageStart`/`StageComplete` hook calls are refactored to use it.

### Fabro Details

<details>
<summary>Ran 10 stages in 25m 6s for $5.60</summary>

| Stage | Duration | Cost | Retries |
|---|---|---|---|
| start | 0s | – | 0 |
| toolchain | 0s | – | 0 |
| preflight_compile | 0s | – | 0 |
| preflight_lint | 0s | – | 0 |
| implement | 0s | $1.04 | 0 |
| simplify_opus | 0s | $1.51 | 0 |
| simplify_gemini | 0s | $1.44 | 0 |
| simplify_gpt | 0s | $1.62 | 0 |
| verify | 0s | – | 0 |
| fmt | 0s | – | 0 |
| **Total** | **25m 6s** | **$5.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 -q --workspace 2>&1", max_retries=0]
    preflight_lint    [label="Preflight Lint", shape=parallelogram, script="cargo clippy -q --workspace -- -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. Use red/green TDD."]
    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 -q --workspace -- -D warnings 2>&1 && cargo nextest run --cargo-quiet --workspace --status-level fail 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-16 21:38:53 -04:00
..
administration Update roadmap and standardize on Graphviz terminology 2026-03-16 20:01:33 -04:00
agents Wire up missing hook invocations (#19) 2026-03-16 21:38:53 -04:00
api-reference Update roadmap and standardize on Graphviz terminology 2026-03-16 20:01:33 -04:00
changelog Add March 16 changelog and update March 15 with new entries 2026-03-16 19:03:47 -04:00
core-concepts Update roadmap and standardize on Graphviz terminology 2026-03-16 20:01:33 -04:00
deployment docs: rename Arc to Fabro throughout docs 2026-03-12 10:53:44 -04:00
examples Add REPL Handoff example workflow to docs 2026-03-16 12:13:05 -04:00
execution Update roadmap and standardize on Graphviz terminology 2026-03-16 20:01:33 -04:00
getting-started Update roadmap and standardize on Graphviz terminology 2026-03-16 20:01:33 -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 Docs: add auto-merge config, auto-merge to GitHub features, turn-level retries 2026-03-16 19:06:15 -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 Update roadmap and standardize on Graphviz terminology 2026-03-16 20:01:33 -04:00
tutorials Update roadmap and standardize on Graphviz terminology 2026-03-16 20:01:33 -04:00
workflows Update roadmap and standardize on Graphviz terminology 2026-03-16 20:01:33 -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 March 16 changelog and update March 15 with new entries 2026-03-16 19:03:47 -04:00
favicon.svg Rebrand docs site from Arc to Fabro 2026-03-11 21:27:58 -04:00