# Spec-Viewer Dashboard

The dashboard turns everything under `.forge/` into a browsable, self-contained HTML site — the spec inventory, per-change status, the [enforced gate](/harness/overview) state, and the attributed [session timeline](/harness/timeline) — with no Node, no network, and no external assets.

## Commands

```sh
forge docs build [--out <dir>] [--publish] [--cwd <dir>]
forge docs serve [--addr <host:port>] [--cwd <dir>]
```

The dashboard is generated in pure Go (Markdown rendered with goldmark). The output is **self-contained and offline**: no Node toolchain, no network calls, no external stylesheets or fonts.

## What it renders

- **The spec inventory** plus the reproducible **100-point quality score**.
- **Per-change cards**, each showing:
  - the task rollup (done / in-progress / blocked / backlog),
  - the [spend budget](/harness/budget),
  - the [verify circuit-breaker](/harness/circuit-breaker) state (OPEN shown in red),
  - the attributed [session timeline](/harness/timeline).
- **Per-item detail pages** — one per spec, one per change, and one for the constitution — with rendered Markdown (GFM tables, headings), a back-link, and the change's budget/breaker chips plus its timeline.

## `build` output

```sh
forge docs build            # writes to .forge/site by default
forge docs build --out dist
```

`build` writes, under `--out` (default `.forge/site`):

```text
index.html
spec-<slug>.html
change-<slug>.html
constitution.html
```

With `--publish`, it also writes a Pages-ready `public/index.html`.

## `serve` runs the interactive panel

```sh
forge docs serve --addr localhost:4000
```

`serve` does **not** host the static pages above. It runs the embedded
[web control panel](/features/web-ui) — a Svelte app served by the binary that
reads `.forge/` live and can also **act** on it (run verify, archive, clear a
tripped gate, waive a finding). It binds `127.0.0.1:4321` by default.

::: info Two different outputs
`build` produces the **read-only, publishable** HTML above. `serve` runs the
**interactive** panel. They render the same `.forge/` state but are not the same
artifact — see [The Web Control Panel](/features/web-ui).
:::

::: tip Publish to Pages
`forge docs build --publish` produces a `public/index.html` ready to drop into a static host or GitHub Pages pipeline — still fully offline and self-contained.
:::

## Also in the TUI

The same project status is surfaced read-only inside the interactive TUI. Run `forge` with no arguments:

```text
forge  →  Welcome  →  "View project status"
```

::: info One source of truth
The dashboard and the TUI both render the same `.forge/` state — the same timeline, the same breaker and budget chips — so the browser view and the terminal view never disagree.
:::

## Next steps

- [The forge CLI](/reference/cli) — the full `forge docs` and `forge panel` synopsis.
- [The session timeline](/harness/timeline) — the attributed events the cards render.
- [Spend Budget](/harness/budget) — the budget chip each change card surfaces.
- [The circuit-breaker](/harness/circuit-breaker) — the breaker state shown in red when OPEN.
- [Team Collaboration](/features/team) — how the committed `.forge/` state gets shared.
