Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ Canonical, reviewable documentation for the StructuPath Herdr Suite, published a

The product surface is organized by workflow readiness:

- **Explore / Swarm** is the ready first workflow: bounded parallel candidates, reviewable worktrees, and operator-selected harvest.
- **Explore / Swarm** is the ready first workflow: bounded parallel candidates, reviewable worktrees, operator-selected harvest, and explicit GitHub draft PR handoff with validation summaries.
- **Deliver / Conductor** is an attended Stage 3 lifecycle: task-bound roles, exact-SHA gates, operator approval receipts, single-local-ref apply, and archival stand-down on exactly Herdr 0.7.5.
- **Browser** provides Chromium launch, external attach, shared sessions, and agent-browser recording. **Guard** provides text policy and an optional fail-open harness reporter.
- **Browser** provides Chromium launch, external attach, shared sessions, agent-browser recording, and repeatable desktop/mobile QA. **Guard** provides text policy and an optional fail-open harness reporter.

The four plugins can be installed together, but they do not form one automatic runtime pipeline.

## Local Console

With Node.js 20 or newer, run `npm run console -- --demo` for a labeled fixture dashboard. For real projects, use `npm run console -- --config /absolute/private/console.json`; add `--check` to print a snapshot and exit. The server binds to `127.0.0.1:4317` by default.

Console reads explicit project paths and optional saved Swarm, Conductor, Guard, and Browser QA observations. It shows tool health, Git state, evidence freshness, and copyable next commands. It has no mutating controls. The public website serves documentation, not a remote controller; Console is a local app, not a fifth plugin. See the [Console guide](https://herdr.structupath.ai/docs/console/) for configuration and evidence limits.

## Source and publishing contract

- Author documentation in `docs-src/`.
Expand All @@ -35,6 +41,19 @@ python3 scripts/build_docs.py
python3 scripts/build_docs.py --check
python3 scripts/check_docs.py
python3 -m py_compile scripts/build_docs.py scripts/check_docs.py
npm run validate
```

`npm run validate` also checks Console syntax and runs its real-Git adapter and HTTP boundary tests.

For repeatable browser checks, serve this checkout with `python3 -m http.server 4381 --bind 127.0.0.1`, then use the Browser QA runner from its trusted checkout:

```bash
node /trusted/herdr-browser/bin/qa.mjs run \
--config docs-src/site-qa.json --repo . \
--output /private/new-site-qa-run --json
```

The saved scenario checks landing-to-Console navigation and all plugin guides at desktop and mobile viewport sizes. Commit changes before collecting evidence intended to identify a clean candidate. Output must be outside the repository in a new directory with an existing parent; review screenshots separately for layout. See the [Browser guide](https://herdr.structupath.ai/docs/browser/) for prerequisites and evidence limits.

See [`docs/pages-cutover.md`](docs/pages-cutover.md) for the source-of-truth and publishing contract.
93 changes: 93 additions & 0 deletions console/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Herdr Console

A dependency-free local read-only application, separate from the public suite
website. Node 20+ and Git are required. Run from the suite checkout:

```sh
npm run console -- --demo
# Or select actual repositories and observation files:
npm run console -- --config /absolute/private/console.json
```

Open the exact `http://127.0.0.1:4317` address printed by the server. Use
`--port 4320` if needed. Stop with Ctrl+C. `--check` prints a JSON snapshot and
exits without opening a server. No install/build step or paid service is needed.

`example.json` selects this checkout. Copy and edit it in a private location.
Paths resolve relative to the configuration file. Select 1–20 Git worktree roots:

```json
{
"schemaVersion": 1,
"herdrBinary": "/absolute/path/to/herdr",
"projects": [{
"id": "app",
"name": "My application",
"path": "/absolute/project",
"swarmManifest": "/private/run-workspace.json",
"conductorStatus": "/private/conductor-status.json",
"guardAudit": "/private/audit.jsonl",
"qaReport": "/private/qa-run/result.json",
"pullRequestStatus": "/private/pr-status.tsv"
}]
}
```

All fields except `id`, `name`, `path`, and the top-level version/projects are
optional. Do not commit private configuration, reports, or screenshots. The
Console reads only explicit paths, does not discover runs recursively, and
does not invoke plugin actions. Readiness probes are version commands, not an
installation or authenticated live-workflow check. Source versions come from
the suite's pinned `data/plugins.json`; Conductor requires exactly Herdr 0.7.5.

## Observation contracts

- **Git:** current branch, commit, worktree count, and changed-file count. An
unborn repository or unavailable path displays an error, not an empty success.
- **Swarm:** existing run manifest, matched to the configured repository root.
Slot status is recorded metadata, not proof of live agent activity.
- **Conductor:** save JSON from its existing `scripts/stage1-runtime.mjs status`
in the correct Herdr workspace/repository. The Console matches its physical
Git repository key and displays the saved lifecycle and worker statuses. It
never derives authority from a partial journal. Refresh status before acting.
- **Guard:** counts from one configured audit JSONL file. Raw command text,
messages, and matched lines are omitted. Counts do not prove enforcement.
- **Browser QA:** the new Browser runner's `result.json`, schemaVersion 1 and
kind `herdr-browser-qa`. A current result must match clean HEAD and report a
clean, unchanged checkout. Screenshot/diagnostic files stay in the runner's
private output directory; this server does not serve arbitrary artifacts.
Relaxed error policies are labeled explicitly. Contradictory success reports
are unavailable; a genuine failed or interrupted run still displays failure.
- **GitHub handoff:** save Swarm `scripts/harvest-step.sh pr-status <slot>` output
to the configured TSV file. The single `ci_status` JSON record supplies the
PR URL and CI summary. Reported commit must match the configured clean HEAD
for current status. This can intentionally be stale when reviewing a slot
from the base worktree. Refresh through Swarm for new GitHub information.

Each observed file shows its modification time. Refresh re-reads observations
with a five-second cache, never polls or mutates the plugins. Missing,
unrecognized, oversized, foreign, or malformed inputs show as unavailable.
Observation files must be regular, non-symlink files of at most 2 MiB; one Guard
file may contain at most 10,000 entries. These are cooperative local summaries,
not authenticated attestations. Copy buttons only copy existing commands.

The server binds only to IPv4 loopback, checks Host/Origin, requires a custom
header for the data endpoint, serves only exact asset routes, and permits only
GET. Do not reverse-proxy or expose it publicly. It trusts the local OS user,
selected executable, configured repositories, and their parent directories.

## Build and verify

```sh
npm run build
npm test
# With the demo server above running and herdr-browser checked out beside this repo:
node ../herdr-browser/bin/qa.mjs run --config console/scenarios/console.json \
--repo . --output /private/new-console-qa-run --json
```

The output directory must not exist, its parent must exist, and it must be
outside the tested repository. The saved scenario exercises project filtering,
evidence display, and command controls at desktop and mobile sizes. Demo QA
proves that interface against synthetic observations; real-Git and HTTP tests
cover the data adapter and read-only server boundaries separately.
6 changes: 6 additions & 0 deletions console/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"schemaVersion": 1,
"projects": [
{ "id": "suite", "name": "Herdr Suite", "path": ".." }
]
}
Loading