diff --git a/.agents/skills/loopwright-code-review/SKILL.md b/.agents/skills/loopwright-code-review/SKILL.md index 0b90b09..0eb2b71 100644 --- a/.agents/skills/loopwright-code-review/SKILL.md +++ b/.agents/skills/loopwright-code-review/SKILL.md @@ -61,7 +61,7 @@ Evaluate every changed file against these five Loopwright-specific axes: - **Deterministic error codes**: Every failure path must emit its canonical typed error code (`TASKPACK_MANIFEST_INVALID`, `GITHUB_APP_CONFIG_INVALID`, `DECISION_POLICY_INVALID`, etc.) with actionable diagnostic context and zero swallowed exceptions. 5. **Test, Documentation, & Closure Parity**: - Verify unit and negative-path tests cover new schemas, boundary limits, duplicate keys, symlink rejection, and error codes. - - Verify documentation updates obey `loopwright-docs` (`npm run lint:docs` and `npm run site`), keep the 13 public `docs/` pages free of links to `development.md` or `contribute/**`, and keep `.github/workflows/` under least-privilege `permissions` and strictly protected against untrusted taskpack/sandbox writes. + - Verify documentation updates obey `loopwright-docs` (`npm run lint:docs` and `npm run site`), keep the 15 public `docs/` pages free of links to `development.md` or `contribute/**`, and keep `.github/workflows/` under least-privilege `permissions` and strictly protected against untrusted taskpack/sandbox writes. - Verify capability closure claims in `@loopwright/cli` (`loopwright closure --verify-failures`) honestly separate local/fixture verification from `blocked_external` live qualification. ### 4. Check hard repository invariants (`.opencodereview/rule.json`) diff --git a/.agents/skills/loopwright-docs/SKILL.md b/.agents/skills/loopwright-docs/SKILL.md index 84523f8..ff562cb 100644 --- a/.agents/skills/loopwright-docs/SKILL.md +++ b/.agents/skills/loopwright-docs/SKILL.md @@ -29,7 +29,7 @@ Activate this skill whenever: 1. Read [`docs/README.md`](../../../docs/README.md) and [`references/page-map.md`](references/page-map.md) to identify the single page that owns the concept, contract, or operational procedure. 2. State each normative fact once on its owning page; link to that page from every other guide or walkthrough. -3. Verify whether the target page is one of the **13 public site pages** (across 4 groups: `Getting Started`, `Operations`, `Walkthroughs`, `Configuration`) or one of the **12 repository-only pages** (`docs/development.md` and `docs/contribute/**/*.md`, including `docs/contribute/adr/*.md`). +3. Verify whether the target page is one of the **15 public site pages** (across 4 groups: `Getting Started`, `Operations`, `Walkthroughs`, `Configuration`) or one of the **12 repository-only pages** (`docs/development.md` and `docs/contribute/**/*.md`, including `docs/contribute/adr/*.md`). ### Step 2: Author with human-first decomposition (`conventions.md`) @@ -48,14 +48,14 @@ Follow every rule in [`references/conventions.md`](references/conventions.md): - Use active voice (`Controller rejects stale leases`, not `Stale leases are rejected by the controller`) and imperative step headings (`Step 1: Generate draft configs`). - Eliminate all banned AI filler words and self-referential page narration (`seamlessly`, `delve`, `tapestry`, `leverage`, `utilize`, `cutting-edge`, `empower`, `it is worth noting`, `in order to`, `this page describes`, `this document describes`, `comprehensive guide`). 3. **Follow the 1:1:1 naming rule, page shape, heading, paragraph, table, and reading footer caps**: - - **1:1:1 alignment for all 13 public pages**: Every public page must reside at `docs//.md` across the 4 groups (`docs/getting-started/`, `docs/operations/`, `docs/walkthroughs/`, `docs/configuration/`), and its `site/data/navigation.yaml` label, `# H1` title, and `docs/README.md` `## All pages` label must match character for character. + - **1:1:1 alignment for all 15 public pages**: Every public page must reside at `docs//.md` across the 4 groups (`docs/getting-started/`, `docs/operations/`, `docs/walkthroughs/`, `docs/configuration/`), and its `site/data/navigation.yaml` label, `# H1` title, and `docs/README.md` `## All pages` label must match character for character. - Start with `# ` matching `docs/README.md` `## All pages` character for character. - Write 1–3 intro paragraphs (`<= 5` lines and `<= 500` chars per prose paragraph) before `## Contents`. - Keep `## Contents` synchronized in exact order with all subsequent `## ` H2 headings. - Keep each page to `<= 10` `##` sections (excluding `## Contents`) and within its line cap (`<= 200` lines for `docs/getting-started/architecture.md`, `<= 220` lines for `docs/contribute/adr/*.md`, and `<= 400` lines for all other non-index `docs/**/*.md` pages). - Keep every `##` / `###` / `####` heading to `<= 4` words and `<= 32` characters (`Step N: ` allows `<= 4` words after the colon and `<= 38` total characters), with zero articles (`a`, `an`, `the`) and zero interrogative words (`what`, `where`, `when`, `how`, `which`, `why`, `who`, `whose`, `whom`). Name complete YAML schema sections directly after their resource `kind` (`## Taskpack`, `## TaskContract`, `## TrustedRegistry`, `## ControllerConfig`, `## DecisionPolicy`, `## GitHubAppConfig`). - Keep every table column header to `1–3` words and `<= 24` characters without articles (`a`, `an`, `the`), demonstratives (`this`, `that`, `these`, `those`), or interrogatives; keep uniform column counts across all rows and keep every table cell `<= 180` characters. - - End every non-index page with a `\n---\n` reading footer: `**See also** — [Title](path.md) (short description) · ...` (required on all 25 pages) and `**Next** → [Title](path.md) — short description` (required on all 13 public site pages). + - End every non-index page with a `\n---\n` reading footer: `**See also** — [Title](path.md) (short description) · ...` (required on all 27 pages) and `**Next** → [Title](path.md) — short description` (required on all 15 public site pages). ### Step 3: Align `docs/README.md` and `site/data/navigation.yaml` @@ -80,10 +80,10 @@ npm run site # Build Hugo site, export Markdown/llms.t 1. **`specs/` are engineering records, never user docs**: - Design rationale, rejected alternatives, benchmark methodology, and historical task breakdowns belong in `specs/`. - Never rewrite files under `specs/` as user documentation, and never copy raw specification walls of text into `docs/`. User guides state the active operational contract and link to `specs/` only from `docs/README.md` or contributor guides when needed. -2. **Public site (`13` pages) vs. repository-only `Contribute` (`12` pages) vs. static `llms.txt` references**: +2. **Public site (`15` pages) vs. repository-only `Contribute` (`12` pages) vs. static `llms.txt` references**: - `docs/development.md` and `docs/contribute/**/*.md` (including `docs/contribute/adr/*.md`) remain in repository `docs/` (and in `docs/README.md`) for contributors and coding agents, but are excluded from `site/` (`site/hugo.toml`, `site/data/navigation.yaml`, `site/public/llms.txt`). - - `docs/references/bootstrap-interview.md` is excluded from HTML site navigation (`site/data/navigation.yaml` stays at `13` public HTML pages across `4` groups) and exported as static Markdown at `/references/bootstrap-interview.md` alongside `llms.txt` (`scripts/site.mjs` rewrites its relative `docs/` links). - - **Hard link boundary**: None of the 13 public `docs/` pages may link to `development.md` or `contribute/**` (directly or via relative path), because those targets do not exist on the published Hugo site. Repository-only pages may link to each other and to any public page. + - `docs/references/bootstrap-interview.md` is excluded from HTML site navigation (`site/data/navigation.yaml` stays at `15` public HTML pages across `4` groups) and exported as static Markdown at `/references/bootstrap-interview.md` alongside `llms.txt` (`scripts/site.mjs` rewrites its relative `docs/` links). + - **Hard link boundary**: None of the 15 public `docs/` pages may link to `development.md` or `contribute/**` (directly or via relative path), because those targets do not exist on the published Hugo site. Repository-only pages may link to each other and to any public page. 3. **Keep the front door small (`docs/getting-started/architecture.md <= 200` lines)**: - `docs/getting-started/architecture.md` introduces Loopwright's four-stage execution chain (**1. Admit**, **2. Execute**, **3. Verify**, **4. Publish & Remember**), the `architecture-flow.svg` diagram with its hidden Mermaid comment, core vocabulary, and links to deep public configuration pages. 4. **Evidence and unknown-outcome honesty**: @@ -101,11 +101,13 @@ npm run site # Build Hugo site, export Markdown/llms.t | Zero-secret OAuth coding agent operation (`loopwright step`), `--role-model` routing, and local overlay application | [Coding Agents](../../../docs/operations/coding-agents.md) | | End-to-end `.loopwright/taskpack.yaml` onboarding and prompt migration walkthrough | [Declarative Taskpack](../../../docs/walkthroughs/declarative-taskpack.md) | | End-to-end out-of-repo `TrustedRegistry`, `ControllerConfig`, relationship topology SVG, and CLI governance | [Managed Controller](../../../docs/walkthroughs/managed-controller.md) | +| End-to-end evolutionary campaign setup (`EVOLVE-BLOCK`, `runner relay\|worker`, `loopwright evolve`, bundle export) | [Evolutionary Campaigns](../../../docs/walkthroughs/evolutionary-campaigns.md) | | Complete `Taskpack` (`.loopwright/taskpack.yaml`) field and enum reference | [Taskpack](../../../docs/configuration/taskpack.md) | | `TaskContract`, `VerificationProfile`, `AttemptReceipt`, and schema bounds | [Task Contract](../../../docs/configuration/task-contract.md) | | Bounded controller loop, `ControllerConfig`, `TrustedRegistry`, and repair retries | [Controller and Registry](../../../docs/configuration/controller-and-registry.md) | | Native OS sandboxes (`macos-seatbelt`, `linux-bwrap`, `linux-landlock`), Docker, and `spec.sandbox` | [Sandbox Backends](../../../docs/configuration/sandbox-backends.md) | | System-One decision routing, `decisions.yaml`, `spec.decisions`, and 3-zone policy | [Decision Routing](../../../docs/configuration/decision-routing.md) | +| Complete `EvolutionCampaign` (`campaign.yaml`) schema, islands, `teamEvolution`, and `evolution-bundle.v1` contract | [Evolution Campaign](../../../docs/configuration/evolution-campaign.md) | | Canonical RFC 8785 JCS hashing, SHA-256 digests, and domain separation (repo-only) | [Identity](../../../docs/contribute/identity.md) | | Independent verification hooks, HMAC `gate.v1` tokens, and receipt authority (repo-only) | [Evidence](../../../docs/contribute/evidence.md) | | SQLite WAL state store, lease fencing, monotonic clock guards, and recovery (repo-only) | [State](../../../docs/contribute/state.md) | @@ -122,20 +124,20 @@ npm run site # Build Hugo site, export Markdown/llms.t | Artifact | Pinned To | Verification Gate | | --- | --- | --- | -| `docs/README.md` `## All pages` | All 25 `docs/**/*.md` files and their exact `# H1` titles | `npm run lint:docs` (`scripts/check-docs.mjs`) | +| `docs/README.md` `## All pages` | All 27 `docs/**/*.md` files and their exact `# H1` titles | `npm run lint:docs` (`scripts/check-docs.mjs`) | | `docs/README.md` `## Module map` | Nine module IDs, guides, specs, code paths, and skill consumers | `npm run lint:docs` (`scripts/check-docs.mjs`) | | Each page's `## Contents` | Subsequent `## ` H2 headings in exact document order | `npm run lint:docs` (`scripts/check-docs.mjs`) | -| Public `docs/` links (`13` pages) | Zero links to `development.md` or `contribute/**` | `npm run lint:docs` and `npm run site` | -| `site/data/navigation.yaml` | The 13 public `docs//.md` pages with exact 1:1:1 group/filename/label/`# H1` parity | `npm run lint:docs` and `npm run site` | -| `site/public/llms.txt` | Generated from the 13 public pages during `npm run site` | `npm run site` (`scripts/site.mjs`) | +| Public `docs/` links (`15` pages) | Zero links to `development.md` or `contribute/**` | `npm run lint:docs` and `npm run site` | +| `site/data/navigation.yaml` | The 15 public `docs//.md` pages with exact 1:1:1 group/filename/label/`# H1` parity | `npm run lint:docs` and `npm run site` | +| `site/public/llms.txt` | Generated from the 15 public pages during `npm run site` | `npm run site` (`scripts/site.mjs`) | ## Pre-Finish Checklist - [ ] `node scripts/check-docs.mjs` passes with `0 error(s)`. -- [ ] `npm run site` passes with `0 broken link(s)` and exports all 13 public pages. +- [ ] `npm run site` passes with `0 broken link(s)` and exports all 15 public pages. - [ ] Every public page satisfies 1:1:1 parity: `docs//.md`, `navigation.yaml` label === `# H1` title === `docs/README.md` `## All pages` label. - [ ] `docs/getting-started/architecture.md` is `<= 200` lines and embeds `architecture-flow.svg` plus its hidden Mermaid comment. - [ ] All configuration blocks use complete two-space Pretty YAML with Kubernetes-aligned top-level header envelopes (`metadata: { name }` on `Taskpack` and `TrustedRegistry`; `apiVersion` + `kind` + `spec` only on `ControllerConfig`, `TaskContract`, `GitHubAppConfig`, and `DecisionPolicy`; or GitHub Actions `name`, `on`, `jobs` — zero bare `spec:` fragments), `Optional`-only inline `#` comments without `: `, `hex: ` placeholders, `<= 20`-word Micro bullets, and uniform 2D enum tables. -- [ ] Every non-index `docs/**/*.md` page ends with `\n---\n\n**See also** — [Title](path.md) (desc) · ...` (and `**Next** → [Title](path.md) — desc` on all 13 public pages). +- [ ] Every non-index `docs/**/*.md` page ends with `\n---\n\n**See also** — [Title](path.md) (desc) · ...` (and `**Next** → [Title](path.md) — desc` on all 15 public pages). - [ ] Zero public pages link to `development.md` or `contribute/**`. - [ ] Zero banned AI filler words, zero interrogative headings or table headers, and zero paragraphs over `5` lines or `500` characters. diff --git a/.agents/skills/loopwright-docs/references/conventions.md b/.agents/skills/loopwright-docs/references/conventions.md index 38e887d..0cfd2e6 100644 --- a/.agents/skills/loopwright-docs/references/conventions.md +++ b/.agents/skills/loopwright-docs/references/conventions.md @@ -101,7 +101,7 @@ stating the component role, safety boundary, and operator entry point. ### 1:1:1 Group Directory, Filename Slug, Sidebar Label, and `# H1` Title Rule -Every public documentation page (all 13 pages published to `site/`) must obey strict **1:1:1 alignment**: +Every public documentation page (all 15 pages published to `site/`) must obey strict **1:1:1 alignment**: 1. **Group directory matches navigation group**: Public pages reside inside one of the 4 group-matching directories under `docs/`: - `Getting Started` → `docs/getting-started/` @@ -117,7 +117,7 @@ Every public documentation page (all 13 pages published to `site/`) must obey st 1. **Trailing `\n---\n` separator**: Every non-index `docs/**/*.md` page must end with a `\n---\n` horizontal rule followed by `**See also** — `. 2. **Descriptive `See also` items**: Separate multiple items with ` · ` (middle dot). Every item must include a Markdown link `[Title](target.md)` followed by a parenthetical description `(short phrase explaining why to read it)`. -3. **Descriptive `Next` pointer**: Every public `site/` page (all 13 pages) must include a `**Next** → [Title](target.md) — ` line after `**See also**`. Whenever `**Next**` appears on any repository-only page, it must follow the same `**Next** → [Title](target.md) — ` format. +3. **Descriptive `Next` pointer**: Every public `site/` page (all 15 pages) must include a `**Next** → [Title](target.md) — ` line after `**See also**`. Whenever `**Next**` appears on any repository-only page, it must follow the same `**Next** → [Title](target.md) — ` format. ### Enforced Page Shape Caps @@ -226,4 +226,4 @@ flowchart LR - **Raw HTML ban in prose**: Outside fenced code blocks and HTML comments, the only permitted raw HTML tag in `docs/**/*.md` is an attribute-free `
` or `
`. - **Relative links**: Use relative repository paths (`../operations/cli.md`, `./task-contract.md#schema-bounds`) for internal links so both repository readers and `scripts/site.mjs` resolve them deterministically. -- **Public vs. Contributor link boundary**: The 13 public pages published to `site/` must never link to `docs/development.md` or `docs/contribute/**`. +- **Public vs. Contributor link boundary**: The 15 public pages published to `site/` must never link to `docs/development.md` or `docs/contribute/**`. diff --git a/.agents/skills/loopwright-docs/references/page-map.md b/.agents/skills/loopwright-docs/references/page-map.md index 3f278c2..272ad51 100644 --- a/.agents/skills/loopwright-docs/references/page-map.md +++ b/.agents/skills/loopwright-docs/references/page-map.md @@ -2,16 +2,16 @@ One page owns each technical fact or operational workflow. When multiple pages touch a subject, the owning page states the normative contract and every other page links to it. -## Public Site (`13` Pages Across `4` Groups) vs. Repository-Only (`12` Pages) +## Public Site (`15` Pages Across `4` Groups) vs. Repository-Only (`12` Pages) -Loopwright maintains **25** Markdown pages under `docs/` (plus the index `docs/README.md`): +Loopwright maintains **27** Markdown pages under `docs/` (plus the index `docs/README.md`): -- **13 Public Pages (`Site Published: yes`)**: Built into the Hugo static site (`site/public/`) across 4 clean groups (`Getting Started`, `Operations`, `Walkthroughs`, `Configuration`), listed in `site/data/navigation.yaml`, and exported to `site/public/llms.txt`. +- **15 Public Pages (`Site Published: yes`)**: Built into the Hugo static site (`site/public/`) across 4 clean groups (`Getting Started`, `Operations`, `Walkthroughs`, `Configuration`), listed in `site/data/navigation.yaml`, and exported to `site/public/llms.txt`. - **12 Repository-Only Pages (`Site Published: no (repo-only)`)**: `docs/development.md`, `docs/contribute/{internals,identity,evidence,state,pi-adapter,runner-taskpack,memory,github-app-internals,closure-matrix}.md`, and `docs/contribute/adr/{0001-local-state-authority,0002-isolated-pi-sdk}.md` remain in repository `docs/` and in `docs/README.md` (`## All pages`) for repository contributors and coding agents, but are excluded from `site/hugo.toml`, `site/data/navigation.yaml`, and `site/public/llms.txt`. - **Static `llms.txt` Reference (`Site Published: static Markdown`)**: `docs/references/bootstrap-interview.md` is excluded from HTML site navigation (`site/data/navigation.yaml`) and exported directly to `/references/bootstrap-interview.md` alongside `llms.txt` with rewritten Markdown export links. -- **Hard Link Boundary**: None of the 13 public pages may link to `development.md` or `contribute/**`. +- **Hard Link Boundary**: None of the 15 public pages may link to `development.md` or `contribute/**`. -## Canonical 25-Page Inventory +## Canonical 27-Page Inventory Every public page (`Site Published: yes`) follows strict **1:1:1 alignment**: `docs//.md`, with `Exact # H1 Title === docs/README.md Label === navigation.yaml Label`. @@ -25,11 +25,13 @@ Every public page (`Site Published: yes`) follows strict **1:1:1 alignment**: `d | `operations/coding-agents.md` | Operations | `yes` | `Coding Agents` | `Coding Agents` | `<= 400` | Host coding agent operators | `@loopwright/controller`, `@loopwright/cli`, `@loopwright/taskpack`; `specs/2026-11-14-delegated-role-stepping-and-multi-model-routing.md` | | `walkthroughs/declarative-taskpack.md` | Walkthroughs | `yes` | `Declarative Taskpack` | `Declarative Taskpack` | `<= 400` | Repo maintainers | `@loopwright/taskpack`, `@loopwright/github-app`, `@loopwright/taskpack-runner` | | `walkthroughs/managed-controller.md` | Walkthroughs | `yes` | `Managed Controller` | `Managed Controller` | `<= 400` | Platform & CLI operators | `@loopwright/controller`, `@loopwright/cli`, `@loopwright/core` | +| `walkthroughs/evolutionary-campaigns.md` | Walkthroughs | `yes` | `Evolutionary Campaigns` | `Evolutionary Campaigns` | `<= 400` | Kernel & optimization engineers | `@loopwright/evolution`, `@loopwright/hardware-runner`, `@loopwright/cli` | | `configuration/taskpack.md` | Configuration | `yes` | `Taskpack` | `Taskpack` | `<= 400` | Repo maintainers | `@loopwright/taskpack`; `specs/2026-11-20-decouple-taskpack-and-cas-blob-pointers.md` | | `configuration/task-contract.md` | Configuration | `yes` | `Task Contract` | `Task Contract` | `<= 400` | Integrators & engineers | `@loopwright/core`; `specs/2026-11-05-task-contracts-and-evidence.md` | | `configuration/controller-and-registry.md` | Configuration | `yes` | `Controller and Registry` | `Controller and Registry` | `<= 400` | Controller & CLI operators | `@loopwright/controller`; `specs/2026-11-06-bounded-controller-and-trusted-config.md` | | `configuration/sandbox-backends.md` | Configuration | `yes` | `Sandbox Backends` | `Sandbox Backends` | `<= 400` | Platform & security engineers | `@loopwright/agent-pi`, `@loopwright/taskpack`; `specs/2026-11-11-native-os-sandbox-execution-backends.md` | | `configuration/decision-routing.md` | Configuration | `yes` | `Decision Routing` | `Decision Routing` | `<= 400` | Triage & policy operators | `@loopwright/decisions`; `specs/2026-11-11-jev-decision-routing-and-controlled-benchmark.md` | +| `configuration/evolution-campaign.md` | Configuration | `yes` | `Evolution Campaign` | `Evolution Campaign` | `<= 400` | Kernel & optimization engineers | `@loopwright/evolution`; `specs/2026-11-23-evolutionary-campaigns-pareto-archive-and-bundle-export.md` | | `development.md` | Contribute (Repo-Only) | `no (repo-only)` | `Development and Verification` | *(excluded from `site/`)* | `<= 400` | Repository contributors | Root workspace, `scripts/`, `.agents/skills/` | | `contribute/internals.md` | Contribute (Repo-Only) | `no (repo-only)` | `Workspace Internals and Boundaries` | *(excluded from `site/`)* | `<= 400` | Repository contributors | All workspace packages, `.opencodereview/rule.json` | | `contribute/identity.md` | Contribute (Repo-Only) | `no (repo-only)` | `Canonical Identity and Digests` | *(excluded from `site/`)* | `<= 400` | Security & core engineers | `@loopwright/core`; `specs/2026-11-05-task-contracts-and-evidence.md` | @@ -46,10 +48,10 @@ Every public page (`Site Published: yes`) follows strict **1:1:1 alignment**: `d ## Per-Page Scope & Boundary Rules ### `docs/README.md` (Shared Index) -- **Owns**: `## Reading paths`, `## Module map` (all 9 module IDs: `contracts`, `state`, `pi-adapter`, `controller`, `taskpacks`, `memory`, `github-app`, `decisions`, `development`), `## Specs`, and `## All pages` (all 25 pages grouped under `### Getting Started`, `### Operations`, `### Walkthroughs`, `### Configuration`, and `### Contribute`). +- **Owns**: `## Reading paths`, `## Module map` (all 9 module IDs: `contracts`, `state`, `pi-adapter`, `controller`, `taskpacks`, `memory`, `github-app`, `decisions`, `development`), `## Specs`, and `## All pages` (all 27 pages grouped under `### Getting Started`, `### Operations`, `### Walkthroughs`, `### Configuration`, and `### Contribute`). - **Must not absorb**: Narrative explanations or configuration snippets. -### Public `site/` Pages (`13` Pages Across `4` Groups) +### Public `site/` Pages (`15` Pages Across `4` Groups) - **`docs/getting-started/architecture.md` (`<= 200` lines)**: 4-stage execution lifecycle (**1. Admit**, **2. Execute**, **3. Verify**, **4. Publish & Remember**), side-by-side comparison of the two operating modes (`Declarative Taskpack` vs. `Managed Controller`), `architecture-flow.svg` + hidden Mermaid flowgraph comment, canonical runtime baseline, and routing links to public configuration pages. - **`docs/getting-started/installation.md` (`<= 400` lines)**: Choosing between zero-install GitHub Action (`uses: gpustack/loopwright@main`), laptop CLI installation from `npmjs.com` (`@gpustack/loopwright` via `npm` or `pnpm --ignore-scripts`), GitHub Release tarballs, source checkouts (`npm link`), and `llms.txt` interactive bootstrap prompts. - **`docs/operations/github-action.md` (`<= 400` lines)**: Reusable `action.yml` workflow integration in consumer repositories, all 17 Action inputs and 6 outputs, required GitHub token permissions, secret environment bindings, and Pretty YAML consumer workflow examples. @@ -58,11 +60,13 @@ Every public page (`Site Published: yes`) follows strict **1:1:1 alignment**: `d - **`docs/operations/coding-agents.md` (`<= 400` lines)**: Zero-secret operation from OAuth/subscription coding agents (`loopwright step next | submit | cancel`), portable `loopwright-step` skill installation, `StepYield` confinement and lease fencing, multi-role `spec.roles` + `--role-model` routing, and applying `candidate.files.json` from `loopwright inspect` to the local checkout branch. - **`docs/walkthroughs/declarative-taskpack.md` (`<= 400` lines)**: End-to-end walkthrough of Loopwright's simple automated mode (`.loopwright/taskpack.yaml` + GitHub Action/App + `llms.txt` prompt migration). - **`docs/walkthroughs/managed-controller.md` (`<= 400` lines)**: End-to-end walkthrough of Loopwright's fine-grained governance mode, including the `managed-controller-relations.svg` containment and cross-reference relationship topology (`ControllerConfig` embedding `TaskContract` and referencing `TrustedRegistry` `metadata.name` + SHA-256 + `${ENV}`), `loopwright init`, `check`, `run`, `inspect`, and `reconcile`. +- **`docs/walkthroughs/evolutionary-campaigns.md` (`<= 400` lines)**: End-to-end walkthrough of Loopwright's evolutionary campaign mode (`EVOLVE-BLOCK` spans, `evolve-block-guard.v1`, hardware `target.matrix` + `benchmark-gate.v1`, outbound `runner relay|worker`, and `loopwright evolve check|run|resume|status|inspect|export`). - **`docs/configuration/taskpack.md` (`<= 400` lines)**: Complete `Taskpack` (`.loopwright/taskpack.yaml`) Pretty YAML schema (`metadata.name`), automatic compilation model, and field-by-field reference tables. - **`docs/configuration/task-contract.md` (`<= 400` lines)**: Complete `TaskContract` (`apiVersion` + `kind` + `spec`), `VerificationProfile`, and `AttemptReceipt` YAML schemas, field constraints, and enum tables (`roles[].thinking`, `roles[].tools`, `steps[].kind`, `budgets.enforcement.*`, `allowedEvidenceLevels`). - **`docs/configuration/controller-and-registry.md` (`<= 400` lines)**: Complete `ControllerConfig` (`controller.draft.yaml`, `spec.registry.name`), `TrustedRegistry` (`registry.draft.yaml`, `metadata.name`), handler implementations, `${NAME}` environment variable interpolation (`environmentBindings`), and bounded repair controls. - **`docs/configuration/sandbox-backends.md` (`<= 400` lines)**: Native OS and container sandbox execution backends (`macos-seatbelt`, `linux-bwrap`, `linux-landlock`, `docker`, `direct-dedicated`), `spec.sandbox` YAML configuration, and capability matrix. - **`docs/configuration/decision-routing.md` (`<= 400` lines)**: Complete `DecisionPolicy` (`decisions.yaml`, `apiVersion` + `kind` + `spec`) and `spec.decisions` YAML schemas, all 7 provider kinds, disclosure policies, Startlux options, and 3-zone confidence routing (`act`, `confirm`, `escalate`). +- **`docs/configuration/evolution-campaign.md` (`<= 400` lines)**: Complete `EvolutionCampaign` (`campaign.yaml`, `metadata.name`) Pretty YAML schema, `stages`, `population` islands and `nicheAxes`, `sampling`, `objectives`, `budgets`, plateau `teamEvolution`, and `evolution-bundle.v1` export contract. ### Repository-Only `Contribute` Pages (`12` Pages) - **`docs/development.md` & `docs/contribute/internals.md` (`<= 400` lines each)**: Workspace build/test/lint/site commands, package dependency order, `.agents/skills/*` routing, and `.opencodereview/rule.json` invariants. diff --git a/.agents/skills/loopwright-overview/SKILL.md b/.agents/skills/loopwright-overview/SKILL.md index b26953b..0adf874 100644 --- a/.agents/skills/loopwright-overview/SKILL.md +++ b/.agents/skills/loopwright-overview/SKILL.md @@ -48,7 +48,7 @@ Loopwright uses deterministic two-space Pretty YAML (YAML 1.2 core schema, rejec | `.loopwright/suite.yaml` | `kind: TaskpackSuite` (`metadata.name` + `spec.domains[]`, `spec.stages[]` readiness probes) | `@loopwright/taskpack`, `@loopwright/github-app`, `@loopwright/cli` — [Taskpack](../../../docs/configuration/taskpack.md#taskpacksuite), [GitHub Action](../../../docs/operations/github-action.md), [CLI](../../../docs/operations/cli.md#suite-commands) | | `github-app.yaml` | `kind: GitHubAppConfig` (`apiVersion`, `kind`, `spec`; `loadGitHubAppConfig`) | `@loopwright/github-app` — [GitHub App](../../../docs/operations/github-app.md) | | `decisions.yaml` | `kind: DecisionPolicy` (`apiVersion`, `kind`, `spec`; `loadDecisionPolicyFile`) | `@loopwright/decisions` — [Decision Routing](../../../docs/configuration/decision-routing.md) | -| `campaign.yaml` | `kind: EvolutionCampaign` (`metadata.name` + `spec.taskpack`, `spec.targetCellId`, `spec.stages`, `spec.population`, `spec.sampling`, `spec.teamEvolution?`, `spec.objectives`, `spec.budgets`, `spec.export?`) | `@loopwright/evolution`, `@loopwright/cli` — [Task Contract](../../../docs/configuration/task-contract.md#evolutioncampaign), [CLI](../../../docs/operations/cli.md#evolution-campaigns) | +| `campaign.yaml` | `kind: EvolutionCampaign` (`metadata.name` + `spec.taskpack`, `spec.targetCellId`, `spec.stages`, `spec.population`, `spec.sampling`, `spec.teamEvolution?`, `spec.objectives`, `spec.budgets`, `spec.export?`) | `@loopwright/evolution`, `@loopwright/cli` — [Evolutionary Campaigns](../../../docs/walkthroughs/evolutionary-campaigns.md), [Evolution Campaign](../../../docs/configuration/evolution-campaign.md), [CLI](../../../docs/operations/cli.md#evolution-campaigns) | | `examples/task.yaml` | `kind: TaskContract` (`apiVersion`, `kind`, `spec`; `loopwright check` / `loopwright run`) | `@loopwright/core`, `@loopwright/cli` — [Task Contract](../../../docs/configuration/task-contract.md) | ## Module Map & Skill Routing diff --git a/README.md b/README.md index 90a6411..045f4e2 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Read the [architecture overview](./docs/getting-started/architecture.md) and [do - **Declarative taskpacks & suites**: Define repository scope, triggers, compact step handoffs, conditional rules, baseline alignment (`baselineAlignment`), and multi-domain `TaskpackSuite` manifests (`.loopwright/suite.yaml`) in YAML. See [Declarative Taskpack](./docs/walkthroughs/declarative-taskpack.md) and [Taskpack](./docs/configuration/taskpack.md). - **Run diagnostics (`RunEval`)**: Export deterministic tool-repeat, ping-pong, repair-convergence, and per-role/per-step breakdowns via `loopwright inspect` and `Run Health` step summaries. See [CLI](./docs/operations/cli.md). - **Hardware benchmark gates**: Bind hardware `target.matrix` cells to host-owned `benchmark-gate.v1` slots and run outbound-only `@loopwright/hardware-runner` workers (`loopwright runner relay|worker`). See [Task Contract](./docs/configuration/task-contract.md) and [CLI](./docs/operations/cli.md). -- **Evolutionary campaigns**: Run bounded island and MAP-Elites optimization (`@loopwright/evolution`, `loopwright evolve`) with `evolve-block-guard.v1`, plateau `teamEvolution`, and signed `evolution-bundle.v1` exports. See [Task Contract](./docs/configuration/task-contract.md#evolutioncampaign) and [CLI](./docs/operations/cli.md#evolution-campaigns). +- **Evolutionary campaigns**: Run bounded island and MAP-Elites optimization (`@loopwright/evolution`, `loopwright evolve`) with `evolve-block-guard.v1`, plateau `teamEvolution`, and signed `evolution-bundle.v1` exports. See [Evolutionary Campaigns](./docs/walkthroughs/evolutionary-campaigns.md), [Evolution Campaign](./docs/configuration/evolution-campaign.md), and [CLI](./docs/operations/cli.md#evolution-campaigns). - **Reviewed memory**: Content-addressed proposals apply separately after review. See [memory](./docs/contribute/memory.md). - **Capability closure**: Inspect local evidence and external prerequisites with the [closure matrix](./docs/contribute/closure-matrix.md). diff --git a/docs/README.md b/docs/README.md index 5d5daba..a284261 100644 --- a/docs/README.md +++ b/docs/README.md @@ -5,6 +5,7 @@ - [Installation](getting-started/installation.md) and [Architecture](getting-started/architecture.md) - [Declarative Taskpack](walkthroughs/declarative-taskpack.md), [Taskpack](configuration/taskpack.md), and [GitHub Action](operations/github-action.md) - [Managed Controller](walkthroughs/managed-controller.md), [Task Contract](configuration/task-contract.md), and [Controller and Registry](configuration/controller-and-registry.md) +- [Evolutionary Campaigns](walkthroughs/evolutionary-campaigns.md) and [Evolution Campaign](configuration/evolution-campaign.md) - [GitHub App](operations/github-app.md), [CLI](operations/cli.md), and [Coding Agents](operations/coding-agents.md) - [Sandbox Backends](configuration/sandbox-backends.md) and [Decision Routing](configuration/decision-routing.md) - [Bootstrap Interview Reference](references/bootstrap-interview.md) for interactive agent onboarding @@ -50,7 +51,7 @@ - ID: controller - Use for: compile trusted configuration and coordinate bounded runs - Aliases: controller -- Guides: [getting-started/installation.md](getting-started/installation.md), [walkthroughs/managed-controller.md](walkthroughs/managed-controller.md), [configuration/controller-and-registry.md](configuration/controller-and-registry.md), [operations/cli.md](operations/cli.md), [operations/coding-agents.md](operations/coding-agents.md), [contribute/closure-matrix.md](contribute/closure-matrix.md) +- Guides: [getting-started/installation.md](getting-started/installation.md), [walkthroughs/managed-controller.md](walkthroughs/managed-controller.md), [walkthroughs/evolutionary-campaigns.md](walkthroughs/evolutionary-campaigns.md), [configuration/controller-and-registry.md](configuration/controller-and-registry.md), [configuration/evolution-campaign.md](configuration/evolution-campaign.md), [operations/cli.md](operations/cli.md), [operations/coding-agents.md](operations/coding-agents.md), [contribute/closure-matrix.md](contribute/closure-matrix.md) - Specs: [Specification](../specs/2026-11-06-bounded-controller-and-trusted-config.md), [Delegated Stepping](../specs/2026-11-14-delegated-role-stepping-and-multi-model-routing.md), [Multi-Domain Suites, Handoffs, and RunEval](../specs/2026-11-21-multi-domain-suite-handoff-and-run-eval.md), [Hardware Execution and Remote Runner](../specs/2026-11-21-hardware-execution-benchmark-gate-and-remote-runner.md), [Evolutionary Campaigns, Pareto Archive, and Bundle Export](../specs/2026-11-23-evolutionary-campaigns-pareto-archive-and-bundle-export.md) - Code: [controller](../packages/controller/), [hardware-runner](../packages/hardware-runner/), [evolution](../packages/evolution/), [cli](../packages/cli/) - Related: [contracts](#contracts-and-evidence), [state](#persistent-state-store) @@ -163,6 +164,7 @@ | --- | --- | | [Declarative Taskpack](walkthroughs/declarative-taskpack.md) | Author or migrate a single-file repository taskpack | | [Managed Controller](walkthroughs/managed-controller.md) | Configure out-of-repo registries, contracts, and CLI runs | +| [Evolutionary Campaigns](walkthroughs/evolutionary-campaigns.md) | Run bounded island optimization with hardware gates and bundle export | ### Configuration @@ -173,6 +175,7 @@ | [Controller and Registry](configuration/controller-and-registry.md) | Configure approved handlers, profiles, credentials, and controls | | [Sandbox Backends](configuration/sandbox-backends.md) | Select OS or container sandboxes and required capabilities | | [Decision Routing](configuration/decision-routing.md) | Configure advisory routing policies, providers, and thresholds | +| [Evolution Campaign](configuration/evolution-campaign.md) | Configure stages, islands, objectives, budgets, teamEvolution, and export | ### Contribute diff --git a/docs/configuration/evolution-campaign.md b/docs/configuration/evolution-campaign.md new file mode 100644 index 0000000..0b11063 --- /dev/null +++ b/docs/configuration/evolution-campaign.md @@ -0,0 +1,164 @@ +# Evolution Campaign + +`EvolutionCampaign` (`<= 64 KiB`) defines a bounded multi-generation search over a repository `Taskpack`, an isolated `campaign.sqlite` Pareto archive, and signed `evolution-bundle.v1` exports. Loopwright binds each candidate to an isolated child `LocalRunStore` and never lets models self-certify hardware results. + +For an end-to-end setup walkthrough, follow [Evolutionary Campaigns](../walkthroughs/evolutionary-campaigns.md). For `TaskContract` hardware target cells and threshold rules, see [Task Contract](task-contract.md#hardware-target-cells). + +## Contents + +- [EvolutionCampaign](#evolutioncampaign) +- [Stages and population](#stages-and-population) +- [Sampling and objectives](#sampling-and-objectives) +- [Plateau team evolution](#plateau-team-evolution) +- [Bundle export contract](#bundle-export-contract) + +## EvolutionCampaign + +```yaml +apiVersion: loopwright.dev/v1alpha1 +kind: EvolutionCampaign +metadata: + name: flash-decode-sm90a +spec: + taskpack: .loopwright/taskpack.yaml + targetCellId: cuda-h100-whole + tracks: [triton, cute, cuda_raw] # Optional + stages: # Optional + mode: specialist-then-portfolio # Optional + specialistBuckets: + - id: bs1-isl4k + heldOutWorkloadId: decode-bs1-4k + - id: bs16-isl8k + heldOutWorkloadId: decode-bs16-8k + portfolioHeldOutWorkloadId: decode-portfolio-holdout + population: + islands: 4 + migrationIntervalGenerations: 8 + maxMigrationElites: 1 + nicheAxes: + - id: bound_pipeline + kind: enum + values: [hbm, l2, smem_lds_ub, tensor_cube, vector_valu] + - id: occupancy_band + kind: numeric_bins + edges: [0, 25, 50, 75, 100] + sampling: + noveltyDecayLambda: 1.0 + mutationWeights: + diff_tune: 0.5 + full_rewrite: 0.3 + crossover: 0.2 + modelBandit: ucb1 # Optional + maxCrossoversPerPrompt: 2 + teamEvolution: # Optional + enabled: true + supervisorRoleId: supervisor + allowedArchetypeRoles: [probe-readonly, mutator-sandboxed, reviewer] + stallGenerations: 4 # Optional + minHypervolumeDelta: 0.001 # Optional + triggerOnRunEvalPathology: true # Optional + trialGenerations: 2 # Optional + maxTeamSize: 3 # Optional + maxTeamSteps: 4 # Optional + objectives: + - metric: latency_us_p50 + direction: minimize + - metric: goodput_rps + direction: maximize + budgets: + maxGenerations: 40 + maxEvaluations: 160 + maxConcurrentEvaluations: 4 + targetRooflineHeadroom: 1.08 # Optional + scratchpadIntervalGenerations: 5 # Optional + export: # Optional + format: oci-layout # Optional + outputDir: .loopwright-out/bundles/flash-decode-sm90a +``` + +## Stages and population + +Campaigns optimize either one target workload (`single-target`) or bucket-specialized kernels merged into a verified dispatcher (`specialist-then-portfolio`): + +- **Taskpack and cell binding**: `spec.taskpack` must point to a repository taskpack whose `target.matrix` declares `spec.targetCellId`. +- **Holdout isolation**: In `specialist-then-portfolio`, `portfolioHeldOutWorkloadId` must differ from every specialist bucket `heldOutWorkloadId` and never enters specialist prompts. +- **Ring-topology islands**: Islands maintain independent MAP-Elites archives and migrate rank-1 elites clockwise every `migrationIntervalGenerations`. +- **Niche projection**: Each `nicheAxes[]` entry maps a metric or hardware diagnostic key into discrete MAP-Elites cells. + +| Field path | Required | Bounds and defaults | Behavior | +| --- | --- | --- | --- | +| `spec.taskpack` | Yes | Relative repo path | Taskpack manifest compiled for every child run | +| `spec.targetCellId` | Yes | Identifier (`1..64`) | Hardware cell ID matched against `taskpack` `target.matrix` | +| `spec.heldOutWorkloadId` | No | Identifier (`1..64`) | Optional workload override for `single-target` mode | +| `spec.tracks` | No | `1..32` unique IDs | Candidate implementation tracks (`triton`, `cute`, `cuda_raw`) | +| `spec.stages.mode` | No | `single-target` (default) \| `specialist-then-portfolio` | Selects single workload search or specialist plus portfolio synthesis | +| `stages.specialistBuckets` | No | `1..64` `{ id, heldOutWorkloadId }` | Required when `mode` is `specialist-then-portfolio` | +| `stages.portfolioHeldOutWorkloadId` | No | Identifier (`1..64`) | Holdout workload certifying final portfolio dispatch | +| `spec.population.islands` | Yes | Integer (`1..16`) | Number of isolated ring-topology evolution islands | +| `population.migrationIntervalGenerations` | Yes | Integer (`1..1024`) | Generation cadence between clockwise elite migrations | +| `population.maxMigrationElites` | Yes | Integer (`0..16`) | Maximum rank-1 elites migrated per island step | +| `population.nicheAxes[]` | Yes | `1..4` axes (`enum` \| `numeric_bins`) | `enum`: `1..32` values; `numeric_bins`: `2..32` sorted edges; optional `field` | + +## Sampling and objectives + +Loopwright selects parents with novelty decay, screens clones before hardware dispatch, and ranks passing candidates via NSGA-II: + +- **Pre-dispatch novelty gate**: Normalized token-shingle clones (`Jaccard === 1.0`) fail fast with `NOVELTY_CLONE_REJECTED` and zero hardware calls. +- **Advisory System-One nodes**: Optional novelty, strategy, and cascade nodes (`@loopwright/decisions`) advise sampling and never certify verification. +- **Preemption accounting**: Hardware `BENCHMARK_PREEMPTED` outcomes never consume `maxEvaluations` and never poison bandit rewards. +- **Roofline early stop**: Optional `targetRooflineHeadroom` stops search once observed hardware headroom reaches the declared bound. + +| Field path | Required | Bounds and defaults | Behavior | +| --- | --- | --- | --- | +| `sampling.noveltyDecayLambda` | Yes | Finite number in `(0, 100]` | Exponential decay weighting parent offspring counts | +| `sampling.mutationWeights` | Yes | `diff_tune`, `full_rewrite`, `crossover` in `[0, 1000]` | Deterministic per-slot operator selection (sum `> 0`) | +| `sampling.modelBandit` | No | `deterministic-round-robin` (default) \| `ucb1` | Model pool routing across declared `taskpack` models | +| `sampling.maxCrossoversPerPrompt` | Yes | Integer (`0..4`) | Maximum staged parent JSON snapshots per child prompt | +| `spec.objectives[]` | Yes | `1..8` unique `{ metric, direction }` | `minimize` or `maximize` metrics for NSGA-II Pareto ranking | +| `budgets.maxGenerations` | Yes | Integer (`1..10000`) | Maximum campaign generations across active stages | +| `budgets.maxEvaluations` | Yes | Integer (`1..100000`) | Hard ceiling on non-preempted child evaluations | +| `budgets.maxConcurrentEvaluations` | Yes | Integer (`1..64`, `<= maxEvaluations`) | Parallel child evaluation slots per generation | +| `budgets.targetRooflineHeadroom` | No | Finite number (`>= 1.0`) | Optional Roofline headroom early-stop target | +| `budgets.scratchpadIntervalGenerations` | No | Integer (`1..32`, default `5`) | Generation interval for read-only scratchpad synthesis | + +## Plateau team evolution + +Optional `spec.teamEvolution` invokes a read-only supervisor role only when an island stalls or hits `RunEval` loop pathology: + +- **Archetype capability ceiling**: Supervisor `TeamPatch` outputs may only recompose roles within `allowedArchetypeRoles` tool and network ceilings. +- **Zero-mutation supervisor**: The supervisor runs in an isolated read-only `LocalRunStore` (`no_change` verified) with zero repo write tools. +- **Trial rollback safety**: Trial teams auto-rollback to the incumbent after `trialGenerations` without Pareto or niche gain; malformed patches keep the incumbent active. + +| Field path | Required | Bounds and defaults | Behavior | +| --- | --- | --- | --- | +| `teamEvolution.enabled` | Yes | Boolean | Enables plateau and pathology supervisor turns | +| `teamEvolution.supervisorRoleId` | Yes | Identifier (`1..64`) | Read-only supervisor role identifier | +| `teamEvolution.allowedArchetypeRoles` | Yes | `1..16` role IDs | Declared archetype roles bounding synthesized teams | +| `teamEvolution.stallGenerations` | No | Integer (`1..32`, default `4`) | Consecutive low-gain generations before supervisor trigger | +| `teamEvolution.minHypervolumeDelta` | No | Number (`>= 0`, default `0.001`) | Minimum hypervolume gain required to reset stall counter | +| `teamEvolution.triggerOnRunEvalPathology` | No | Boolean (default `true`) | Triggers supervisor on repeated `RunEval` tool-loop pathology | +| `teamEvolution.trialGenerations` | No | Integer (`1..8`, default `2`) | Trial evaluation window before automatic incumbent rollback | +| `teamEvolution.maxTeamSize` | No | Integer (`1..4`, default `4`) | Maximum roles permitted in a synthesized `TeamPatch` | +| `teamEvolution.maxTeamSteps` | No | Integer (`1..6`, default `6`) | Maximum DAG steps permitted in a synthesized `TeamPatch` | + +## Bundle export contract + +Optional `spec.export` (or `loopwright evolve export`) writes deterministic, content-addressed `evolution-bundle.v1` directories or OCI 1.1 layouts: + +- **Fail-closed receipt verification**: Export refuses missing HMAC secrets, tampered CAS blobs, incompatible hardware provenance, or unopted `synthetic_fixture` receipts (`EXPORT_UNVERIFIED_FORBIDDEN`). +- **Atomic staging**: Bundles stage into a sibling non-symlink directory and rename atomically; existing destinations fail with `EVOLUTION_CONFLICT` unless `--overwrite` is passed. + +| Field or member | Value or format | Role | +| --- | --- | --- | +| `spec.export.format` | `dir` (default) \| `oci-layout` | Plain directory or OCI 1.1 image layout (`oci-layout` + `index.json`) | +| `spec.export.outputDir` | Relative path | Target directory for auto-export upon completion | +| `manifest.json` | `kind: EvolutionBundle`, `version: 1` | Hardware `compatibility`, `paretoSummary`, `lineage`, and member SHA-256 digests | +| `dispatch-manifest.json` | `version: 1`, `fallback: baseline` | Bucket routing rules (`dimensionBounds`, `dtypes`, `alignmentBytes`, `blobDigest`, `entrypoint`) | +| `receipts/.verdict.json` | Signed `benchmark_verdict` JSON | Verbatim HMAC-signed hardware verdict receipts per exported individual | +| `blobs/sha256/` | Verified Stage A CAS blobs | Compiled `.cubin`, `.so`, `.o`, or `.ptx` artifacts referenced by dispatch rules | + +--- + +**See also** — [Evolutionary Campaigns](../walkthroughs/evolutionary-campaigns.md) (end-to-end setup and `loopwright evolve` walkthrough) · [Task Contract](task-contract.md#hardware-target-cells) (hardware target cells, thresholds, and provenance) · [CLI](../operations/cli.md#evolution-campaigns) (`runner` and `evolve` subcommands) + +**Next** → [Evolutionary Campaigns](../walkthroughs/evolutionary-campaigns.md) — mark `EVOLVE-BLOCK` spans, run a hardware relay, and export signed bundles. diff --git a/docs/configuration/task-contract.md b/docs/configuration/task-contract.md index 0d72b4c..42fa4f0 100644 --- a/docs/configuration/task-contract.md +++ b/docs/configuration/task-contract.md @@ -10,7 +10,6 @@ - [Roles and steps](#roles-and-steps) - [Budgets and enforcement](#budgets-and-enforcement) - [Acceptance and evidence](#acceptance-and-evidence) -- [EvolutionCampaign](#evolutioncampaign) ## TaskContract @@ -290,89 +289,8 @@ Each `spec.target.matrix[]` cell accepts an optional `hardware` block alongside - **Hardware provenance**: Passing `hardware_execution` `Evidence` requires `hardwareProvenance` (`targetCellId`, `probeKind: 'physical' | 'synthetic_fixture'`, `vendor`, `deviceModel`, `accelerator`, `isolationMode`, `deviceCount`, `driverVersion`, `runtimeVersion`, `topology?`, `workloadDigest`, `clockLockMode: 'locked' | 'unlocked' | 'unknown'`). - **Independent core check**: `evaluateAcceptance` enforces `bucketScope` across `bucketMetrics`, requires `probeKind: 'physical'` unless `allowSyntheticHardwareProbe` is `true`, and blocks mismatches (`hardware_provenance_mismatch`, `metric_threshold_failed`). -## EvolutionCampaign - -`EvolutionCampaign` (`<= 64 KiB`) coordinates bounded multi-generation search over an isolated `campaign.sqlite` archive and child `LocalRunStore` runs. - -```yaml -apiVersion: loopwright.dev/v1alpha1 -kind: EvolutionCampaign -metadata: - name: flash-decode-sm90a -spec: - taskpack: .loopwright/taskpack.yaml - targetCellId: cuda-h100-whole - tracks: [triton, cute, cuda_raw] # Optional 1..32 track IDs - stages: # Optional (defaults to single-target) - mode: specialist-then-portfolio # Optional single-target or specialist-then-portfolio - specialistBuckets: - - id: bs1-isl4k - heldOutWorkloadId: decode-bs1-4k - - id: bs16-isl8k - heldOutWorkloadId: decode-bs16-8k - portfolioHeldOutWorkloadId: decode-portfolio-holdout - population: - islands: 4 - migrationIntervalGenerations: 8 - maxMigrationElites: 1 - nicheAxes: - - id: bound_pipeline - kind: enum - values: [hbm, l2, smem_lds_ub, tensor_cube, vector_valu] - - id: occupancy_band - kind: numeric_bins - edges: [0, 25, 50, 75, 100] - sampling: - noveltyDecayLambda: 1.0 - mutationWeights: - diff_tune: 0.5 - full_rewrite: 0.3 - crossover: 0.2 - modelBandit: ucb1 # Optional deterministic-round-robin or ucb1 - maxCrossoversPerPrompt: 2 - teamEvolution: # Optional plateau-triggered bounded role synthesis - enabled: true - supervisorRoleId: supervisor - allowedArchetypeRoles: [probe-readonly, mutator-sandboxed, reviewer] - stallGenerations: 4 # Optional (1..32) - minHypervolumeDelta: 0.001 # Optional (>= 0) - triggerOnRunEvalPathology: true # Optional (defaults to true) - trialGenerations: 2 # Optional (1..8) - maxTeamSize: 3 # Optional (1..4) - maxTeamSteps: 4 # Optional (1..6) - objectives: - - metric: latency_us_p50 - direction: minimize - - metric: goodput_rps - direction: maximize - budgets: - maxGenerations: 40 - maxEvaluations: 160 - maxConcurrentEvaluations: 4 - targetRooflineHeadroom: 1.08 # Optional early-stop ratio >= 1.0 - scratchpadIntervalGenerations: 5 # Optional (1..32) - export: # Optional auto-export on completion - format: oci-layout # Optional dir or oci-layout - outputDir: .loopwright-out/bundles/flash-decode-sm90a -``` - -| Field path | Required | Bounds and defaults | Behavior | -| --- | --- | --- | --- | -| `spec.heldOutWorkloadId` | No | Identifier (`1..64` chars) | Single-target holdout workload ID override | -| `spec.tracks` | No | `1..32` unique IDs | Candidate implementation tracks (`cuda_raw`, `cute`, `triton`) | -| `spec.stages` | No | `single-target` (default) or `specialist-then-portfolio` | `specialistBuckets` (`1..64`) + `portfolioHeldOutWorkloadId` | -| `spec.population` | Yes | `islands` `1..16`, `migrationIntervalGenerations` `1..1024`, `maxMigrationElites` `0..16` | Ring-topology island archive and migration cadence | -| `population.nicheAxes[]` | Yes | `1..4` axes (`enum` `1..32` values or `numeric_bins` `2..32` edges) | Optional `field` maps metric/diagnostic key into MAP-Elites cell | -| `spec.sampling` | Yes | `noveltyDecayLambda` `(0, 100]`, `modelBandit` `deterministic-round-robin` (default) \| `ucb1`, `maxCrossoversPerPrompt` `0..4` | Parent selection, novelty decay, and model bandit routing | -| `sampling.mutationWeights` | Yes | `diff_tune`, `full_rewrite`, `crossover` in `[0, 1000]` (sum `> 0`) | Deterministic per-slot mutation operator weights | -| `spec.teamEvolution` | No | `enabled`, `supervisorRoleId`, `allowedArchetypeRoles` (`1..16`), `maxTeamSize` `1..4` (`4`), `maxTeamSteps` `1..6` (`6`) | Read-only plateau supervisor bounded by archetype envelopes | -| `teamEvolution` triggers | No | `stallGenerations` `1..32` (`4`), `minHypervolumeDelta` `>= 0` (`0.001`), `triggerOnRunEvalPathology` (`true`), `trialGenerations` `1..8` (`2`) | Plateau/pathology trigger thresholds and trial rollback window | -| `spec.objectives[]` | Yes | `1..8` unique metrics (`minimize` \| `maximize`) | Multi-objective NSGA-II Pareto frontier and scalar fitness | -| `spec.budgets` | Yes | `maxGenerations` `1..10000`, `maxEvaluations` `1..100000`, `maxConcurrentEvaluations` `1..64`, `scratchpadIntervalGenerations` `1..32` (`5`) | Hard caps (`maxConcurrent <= maxEvaluations`) and `targetRooflineHeadroom` `>= 1.0` | -| `spec.export` | No | `format` `dir` (default) \| `oci-layout`, relative `outputDir` | Auto-exports signed `evolution-bundle.v1` upon completion | - --- -**See also** — [Managed Controller](../walkthroughs/managed-controller.md) (end-to-end CLI setup and relationship diagram) · [Taskpack](taskpack.md) (single-file automated mode) +**See also** — [Managed Controller](../walkthroughs/managed-controller.md) (end-to-end CLI setup and relationship diagram) · [Taskpack](taskpack.md) (single-file automated mode) · [Evolution Campaign](evolution-campaign.md) (multi-generation search, islands, and bundle export schema) **Next** → [Controller and Registry](controller-and-registry.md) — bind `TaskContract` roles, steps, and credentials in `TrustedRegistry` and `ControllerConfig`. diff --git a/docs/contribute/internals.md b/docs/contribute/internals.md index 027df8d..95fd493 100644 --- a/docs/contribute/internals.md +++ b/docs/contribute/internals.md @@ -32,7 +32,7 @@ This bypasses `.gitattributes` filters and preserves Git blob bytes. ## Architecture decisions -The public site contains 13 pages; [Development](../development.md) and this guide remain repository-only. Run `npm run lint:docs`, `node scripts/check-docs.mjs --report`, and `npm run site` after documentation changes. +The public site contains 15 pages; [Development](../development.md) and this guide remain repository-only. Run `npm run lint:docs`, `node scripts/check-docs.mjs --report`, and `npm run site` after documentation changes. YAML-first configuration uses `yaml` with the strict 1.2 core schema. Repository issue and PR templates live under `.github/`; the six `.agents/skills/loopwright-*` guides cover overview, docs, step driving, code review, issue and PR preparation, and releases. diff --git a/docs/getting-started/architecture.md b/docs/getting-started/architecture.md index a7eb0e0..6af2a56 100644 --- a/docs/getting-started/architecture.md +++ b/docs/getting-started/architecture.md @@ -49,7 +49,7 @@ Every Loopwright document uses `apiVersion: loopwright.dev/v1alpha1` across decl | Managed mode | `TaskContract` | `apiVersion`, `kind`, `spec` | [Task Contract](../configuration/task-contract.md) | | Shared policy | `spec.sandbox` | Nested under `Taskpack.spec` | [Sandbox Backends](../configuration/sandbox-backends.md) | | Shared policy | `DecisionPolicy` | `apiVersion`, `kind`, `spec` | [Decision Routing](../configuration/decision-routing.md) | -| Evolution mode | `EvolutionCampaign` | `apiVersion`, `kind`, `metadata.name`, `spec` | [Task Contract](../configuration/task-contract.md#evolutioncampaign) | +| Evolution mode | `EvolutionCampaign` | `apiVersion`, `kind`, `metadata.name`, `spec` | [Evolution Campaign](../configuration/evolution-campaign.md) | | Entry points | Action or `GitHubAppConfig` | Workflow or `apiVersion`, `kind`, `spec` | [GitHub Action](../operations/github-action.md) · [GitHub App](../operations/github-app.md) | ## Runtime baseline diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index f08da57..b94f883 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -119,8 +119,14 @@ Read https://docs.gpustack.ai/loopwright/llms.txt and its Bootstrap Interview Re Read https://docs.gpustack.ai/loopwright/llms.txt and its Bootstrap Interview Reference (https://docs.gpustack.ai/loopwright/references/bootstrap-interview.md). Inspect this repository first WITHOUT editing any files yet, then interview me one question at a time with repository-grounded defaults to align on writable/protected scope, budgets, verification checks, and role bindings. Wait for my approval on the design summary before computing local Loopwright handler and graph SHA-256 digests, writing out-of-repo registry.yaml and controller.yaml, and validating with loopwright check. ``` +### Evolution prompt + +```text +Read https://docs.gpustack.ai/loopwright/llms.txt and its Bootstrap Interview Reference (https://docs.gpustack.ai/loopwright/references/bootstrap-interview.md). Inspect this repository first WITHOUT editing any files yet, then follow Evolutionary campaign mode (Mode 3) to interview me one question at a time with repository-grounded defaults on EVOLVE-BLOCK guarded files, target hardware cell and Stage A static audit limits, held-out benchmark-gate.v1 workloads and runner relay/worker topology, objectives, island/niche budgets, optional teamEvolution, and bundle export. Wait for my approval on the design summary before generating .loopwright/taskpack.yaml and .loopwright/campaign.yaml and validating with loopwright evolve check. +``` + --- -**See also** — [Coding Agents](../operations/coding-agents.md) (drive zero-secret `loopwright step` loops from OAuth agents) · [Declarative Taskpack](../walkthroughs/declarative-taskpack.md) (simple automated repository mode) · [Managed Controller](../walkthroughs/managed-controller.md) (fine-grained registry and contract mode) +**See also** — [Coding Agents](../operations/coding-agents.md) (drive zero-secret `loopwright step` loops from OAuth agents) · [Declarative Taskpack](../walkthroughs/declarative-taskpack.md) (simple automated repository mode) · [Managed Controller](../walkthroughs/managed-controller.md) (fine-grained registry and contract mode) · [Evolutionary Campaigns](../walkthroughs/evolutionary-campaigns.md) (multi-generation evolutionary optimization) **Next** → [Declarative Taskpack](../walkthroughs/declarative-taskpack.md) — author or migrate a `.loopwright/taskpack.yaml` workflow. diff --git a/docs/references/bootstrap-interview.md b/docs/references/bootstrap-interview.md index eddaa96..2d22e7c 100644 --- a/docs/references/bootstrap-interview.md +++ b/docs/references/bootstrap-interview.md @@ -12,6 +12,7 @@ Use this protocol when a maintainer asks a coding agent to initialize or migrate - [Stage 5: Summary gate](#stage-5-summary-gate) - [Stage 6: Tiered qualification](#stage-6-tiered-qualification) - [Managed Controller mode](#managed-controller-mode) +- [Evolutionary campaign mode](#evolutionary-campaign-mode) ## Interview rules @@ -21,15 +22,15 @@ Follow five rules throughout the bootstrap session: 2. **One question at once**: Ask one focused question per turn and wait for the reply before continuing. 3. **Propose a default**: Include one `(Recommended)` option grounded in repository evidence on every question. 4. **Defer all writes**: Never write or modify repository or controller files before Stage 5 summary approval. -5. **Select operating mode**: Confirm Mode 1 (Declarative Taskpack) or Mode 2 (Managed Controller) in Stage 1. +5. **Select operating mode**: Confirm Mode 1 (Declarative Taskpack), Mode 2 (Managed Controller), or Mode 3 (Evolutionary Campaign) in Stage 1. ## Stage 1: Inventory -Scan existing sync scripts, Dockerfiles, dependency manifests (`go.mod`, `package.json`, `pyproject.toml`), Helm charts, version tables, and `.github/workflows/` files before asking questions. +Scan existing sync scripts, Dockerfiles, dependency manifests (`go.mod`, `package.json`, `pyproject.toml`), Helm charts, version tables, kernel or benchmark build scripts, and `.github/workflows/` files before asking questions. ### Operating mode selection -Confirm whether the repository needs Mode 1 (`.loopwright/taskpack.yaml` or a multi-domain `TaskpackSuite` under `.auto-sync/suite.yaml` with Action or App) or Mode 2 (out-of-repo `TrustedRegistry` and `ControllerConfig`). When Mode 2 applies, jump to [Managed Controller mode](#managed-controller-mode) after Stage 1. +Confirm whether the repository needs Mode 1 (`.loopwright/taskpack.yaml` or a multi-domain `TaskpackSuite` under `.auto-sync/suite.yaml` with Action or App), Mode 2 (out-of-repo `TrustedRegistry` and `ControllerConfig`), or Mode 3 (bounded multi-generation optimization via `EvolutionCampaign`, `evolve-block-guard.v1`, and `loopwright evolve`). Jump to [Managed Controller mode](#managed-controller-mode) for Mode 2, or [Evolutionary campaign mode](#evolutionary-campaign-mode) for Mode 3, after Stage 1. ### Modular domain decomposition @@ -281,6 +282,17 @@ When Stage 1 selects Mode 2, keep `registry.yaml` and `controller.yaml` outside 5. Write `TrustedRegistry` (`registry.yaml`), compute its SHA-256, and bind it in `ControllerConfig` (`controller.yaml`) with embedded `TaskContract`. 6. Qualify locally with `loopwright check --config ... --registry ... --registry-sha256 ... --json` before running `loopwright run` or `loopwright step`. +## Evolutionary campaign mode + +When Stage 1 selects Mode 3, keep campaign state (`--state`) strictly outside `--repo` and bind every mutable region to `evolve-block-guard.v1`: + +1. Fetch the Mode 3 Markdown guides linked from `llms.txt` (`Evolutionary Campaigns`, `Evolution Campaign`, `Taskpack`, and `CLI`) before authoring schemas. +2. Confirm guarded `EVOLVE-BLOCK` source files (`allowedBlockIds`, `maxBlockBytes`), hardware `target.matrix` cell (`accelerator`, `isolationMode`, `driverConstraint`, Stage A static audit bounds), and held-out `benchmark-gate.v1` workloads plus `runner relay|worker` topology one question at a time. +3. Confirm search `stages` (`single-target` or `specialist-then-portfolio`), `population` islands and `nicheAxes`, multi-objective `objectives`, `budgets`, optional read-only `teamEvolution`, `export` format (`dir` or `oci-layout`), and required secrets (`LOOPWRIGHT_PROVIDER_TOKEN`, `LOOPWRIGHT_BENCHMARK_GATE_URL`, `LOOPWRIGHT_GATE_SIGNING_SECRET`). +4. Confirm the Stage 5 summary table before writing `.loopwright/taskpack.yaml` and `.loopwright/campaign.yaml`. +5. Validate offline with `loopwright evolve check --campaign .loopwright/campaign.yaml --repo . --json`. +6. Qualify locally with a loopback `runner relay` + `runner worker` (`probeMode: synthetic_fixture`, `--allow-synthetic-probe`) before running against live physical hardware (`loopwright evolve run|resume|status|inspect|export`). + --- -**See also** — [Declarative Taskpack](../walkthroughs/declarative-taskpack.md) (author and run a repository taskpack) · [Taskpack](../configuration/taskpack.md) (complete manifest field dictionary) · [GitHub Action](../operations/github-action.md) (Action inputs, preflight `source-revision`, and secrets) · [Managed Controller](../walkthroughs/managed-controller.md) (out-of-repo `TrustedRegistry` and CLI governance) +**See also** — [Declarative Taskpack](../walkthroughs/declarative-taskpack.md) (author and run a repository taskpack) · [Taskpack](../configuration/taskpack.md) (complete manifest field dictionary) · [Evolutionary Campaigns](../walkthroughs/evolutionary-campaigns.md) (end-to-end evolutionary campaign setup) · [Evolution Campaign](../configuration/evolution-campaign.md) (`EvolutionCampaign` schema and bundle contract) · [GitHub Action](../operations/github-action.md) (Action inputs, preflight `source-revision`, and secrets) · [Managed Controller](../walkthroughs/managed-controller.md) (out-of-repo `TrustedRegistry` and CLI governance) diff --git a/docs/walkthroughs/evolutionary-campaigns.md b/docs/walkthroughs/evolutionary-campaigns.md new file mode 100644 index 0000000..709ef2e --- /dev/null +++ b/docs/walkthroughs/evolutionary-campaigns.md @@ -0,0 +1,223 @@ +# Evolutionary Campaigns + +Evolutionary campaign mode coordinates bounded multi-generation optimization over mutable `EVOLVE-BLOCK` source regions, isolated child `LocalRunStore` runs, and hardware-verified `benchmark-gate.v1` receipts. Loopwright maintains a fenced `campaign.sqlite` Pareto archive and exports signed `evolution-bundle.v1` packages without delegating verification authority to models. + +For single-run repository automation, follow [Declarative Taskpack](declarative-taskpack.md). For manual out-of-repo controller governance, follow [Managed Controller](managed-controller.md). + +## Contents + +- [Overview](#overview) +- [Prompt bootstrap](#prompt-bootstrap) +- [Step 1: Mark evolve blocks](#step-1-mark-evolve-blocks) +- [Step 2: Author taskpack](#step-2-author-taskpack) +- [Step 3: Author campaign](#step-3-author-campaign) +- [Step 4: Start runner](#step-4-start-runner) +- [Step 5: Run and export](#step-5-run-and-export) + +## Overview + +![Hardware relay and outbound worker topology](../assets/diagrams/hardware-relay-flow.svg) + + + +Evolutionary campaigns separate candidate authoring from blind hardware evaluation across three zones: + +| Responsibility | Authored files | Runtime invariant | +| --- | --- | --- | +| Mutable span guard | `EVOLVE-BLOCK` markers and `evolve-block-guard.v1` | Outside bytes must match baseline SHA-256 exactly | +| Hardware contract | `target.matrix[].hardware` and `benchmark-gate.v1` | Stage A static audit blocks forbidden symbols and excess spills before Stage B | +| Blind evaluation | Outbound `runner relay` and `runner worker` | Zero inbound GPU cluster ports; Stage B executes offline with read-only holdout data | +| Archive and export | `.loopwright/campaign.yaml` and `loopwright evolve` | Fenced `campaign.sqlite` outside `--repo`; `evolve export` verifies every HMAC receipt | + +## Prompt bootstrap + +To configure an evolutionary campaign through an interview-first flow before writing YAML files, paste this prompt into your coding agent inside the target repository: + +```text +Read https://docs.gpustack.ai/loopwright/llms.txt and its Bootstrap Interview Reference (https://docs.gpustack.ai/loopwright/references/bootstrap-interview.md). Inspect this repository first WITHOUT editing any files yet, then follow Evolutionary campaign mode (Mode 3) to interview me one question at a time with repository-grounded defaults on EVOLVE-BLOCK guarded files, target hardware cell and Stage A static audit limits, held-out benchmark-gate.v1 workloads and runner relay/worker topology, objectives, island/niche budgets, optional teamEvolution, and bundle export. Wait for my approval on the design summary before generating .loopwright/taskpack.yaml and .loopwright/campaign.yaml and validating with loopwright evolve check. +``` + +## Step 1: Mark evolve blocks + +Wrap only the editable spans in guarded source files with matching `EVOLVE-BLOCK-START: ` and `EVOLVE-BLOCK-END: ` comments (`//`, `#`, or `/* */`): + +```cpp +__global__ void flash_decode(float* out, const float* q, int n) { + // EVOLVE-BLOCK-START: tile_loop + for (int i = threadIdx.x; i < n; i += blockDim.x) { + out[i] = q[i]; + } + // EVOLVE-BLOCK-END: tile_loop +} +``` + +Keep block IDs unique per file and bounded to printable ASCII. Any byte change outside marked spans fails `evolve-block-guard.v1` before Loopwright dispatches a hardware benchmark job. + +## Step 2: Author taskpack + +Create `.loopwright/taskpack.yaml` declaring the guarded files, hardware target cell, Stage A static audit ceilings, and `benchmark-gate.v1` slot. See [Taskpack](../configuration/taskpack.md) and [Task Contract](../configuration/task-contract.md#hardware-target-cells) for full field constraints. + +```yaml +apiVersion: loopwright.dev/v1alpha1 +kind: Taskpack +metadata: + name: kernel-evolve-tp +spec: + goal: + candidate: Optimize guarded kernel blocks and pass hardware benchmark thresholds. + noChange: Confirm no further optimization is needed and settle cleanly. + target: + matrix: + - id: cuda-h100-whole + platform: linux/amd64 + variant: cuda12 + hardware: + accelerator: sm_90a + isolationMode: whole_device + deviceCount: 1 + driverConstraint: ">=550.0" + forbiddenSymbolPatterns: + - cublas + - cudnn + maxRegisterCount: 128 # Optional + maxLocalSpillBytes: 0 # Optional + scope: + writable: + - src/kernels/** + protected: + - .loopwright/** + - scripts/** + models: + - provider: openai + id: gpt-5 + apiKeyEnv: LOOPWRIGHT_PROVIDER_TOKEN + roles: + - id: mutator + provider: openai + model: gpt-5 + purpose: task + tools: + - read + - write + - edit + prompt: Edit guarded EVOLVE-BLOCK spans in src/kernels/flash_decode.cu only. + verification: + localChecks: + - id: evolve-guard + implementation: evolve-block-guard.v1 + parameters: + files: + - src/kernels/flash_decode.cu + allowedBlockIds: # Optional + - tile_loop + maxBlockBytes: 8192 # Optional + externalGates: + - id: gpu-bench + implementation: benchmark-gate.v1 + endpointId: hw-relay + gateId: flash-decode-bench + required: true + targetCellId: cuda-h100-whole + heldOutWorkloadId: decode-bs1-4k + metricThresholds: + - kind: bounds + metric: max_ulp + max: 2 + bucketScope: all_buckets + publication: + mode: disabled +``` + +## Step 3: Author campaign + +Create `.loopwright/campaign.yaml` referencing the taskpack and target hardware cell. See [Evolution Campaign](../configuration/evolution-campaign.md) for all `stages`, `population`, `sampling`, `teamEvolution`, and `export` fields. + +```yaml +apiVersion: loopwright.dev/v1alpha1 +kind: EvolutionCampaign +metadata: + name: flash-decode-sm90a +spec: + taskpack: .loopwright/taskpack.yaml + targetCellId: cuda-h100-whole + tracks: [triton, cute, cuda_raw] # Optional + stages: # Optional + mode: single-target # Optional + population: + islands: 2 + migrationIntervalGenerations: 6 + maxMigrationElites: 1 + nicheAxes: + - id: bound_pipeline + kind: enum + values: [hbm, l2, smem_lds_ub, tensor_cube, vector_valu] + sampling: + noveltyDecayLambda: 1.0 + mutationWeights: + diff_tune: 0.5 + full_rewrite: 0.3 + crossover: 0.2 + modelBandit: deterministic-round-robin # Optional + maxCrossoversPerPrompt: 2 + objectives: + - metric: latency_us_p50 + direction: minimize + - metric: goodput_rps + direction: maximize + budgets: + maxGenerations: 20 + maxEvaluations: 40 + maxConcurrentEvaluations: 2 + scratchpadIntervalGenerations: 5 # Optional + export: # Optional + format: oci-layout # Optional + outputDir: .loopwright-out/bundles/flash-decode-sm90a +``` + +Validate both manifests and guarded files offline before starting any worker: + +```sh +loopwright evolve check --campaign .loopwright/campaign.yaml --repo . --json +``` + +## Step 4: Start runner + +Start the relay in a reachable DMZ or loopback host, then start one or more outbound workers on private GPU hosts. Workers poll the relay outbound and execute Stage A and Stage B inside offline sandboxes with zero inbound ports: + +```sh +loopwright runner relay --config "$HOME/loopwright-ops/relay.yaml" --json +loopwright runner worker --config "$HOME/loopwright-ops/worker.yaml" --json +``` + +For local offline smoke tests without physical GPUs, configure `probeMode: synthetic_fixture` on the worker and pass `--allow-synthetic-probe` to `loopwright evolve run`. Omit `--allow-synthetic-probe` on real hardware runs so synthetic receipts fail closed (`HARDWARE_PROVENANCE_MISMATCH`). + +## Step 5: Run and export + +Export the required secrets and point `--state` at a directory strictly outside `--repo`: + +```sh +export LOOPWRIGHT_PROVIDER_TOKEN="" +export LOOPWRIGHT_BENCHMARK_GATE_URL="https://relay.example.internal/v1/benchmark/jobs" +export LOOPWRIGHT_GATE_SIGNING_SECRET="" + +loopwright evolve run --campaign .loopwright/campaign.yaml --state "$HOME/evo-state/flash-decode" --repo . --json +``` + +Monitor progress, pause cleanly on `SIGINT` (exit `130`), resume later, and export signed `evolution-bundle.v1` artifacts: + +```sh +loopwright evolve status --campaign "$HOME/evo-state/flash-decode" --json +loopwright evolve inspect --campaign "$HOME/evo-state/flash-decode" --island 0 --json +loopwright evolve resume --campaign "$HOME/evo-state/flash-decode" --repo . --json +loopwright evolve export --campaign "$HOME/evo-state/flash-decode" --out "$HOME/evo-out/bundle" --format oci-layout --json +``` + +`evolve export` verifies every HMAC verdict receipt and CAS blob digest before publishing and fails closed (`EXPORT_UNVERIFIED_FORBIDDEN`, exit `3`) when signing secrets are absent or receipts are unverified. + +--- + +**See also** — [Evolution Campaign](../configuration/evolution-campaign.md) (complete `EvolutionCampaign` YAML schema and bundle contract) · [CLI](../operations/cli.md#evolution-campaigns) (`runner` and `evolve` flags, env vars, and exit codes) · [Taskpack](../configuration/taskpack.md) (`evolve-block-guard.v1` and `benchmark-gate.v1` declarations) + +**Next** → [Evolution Campaign](../configuration/evolution-campaign.md) — review every `EvolutionCampaign` field, enum, and bundle export bound. diff --git a/packages/cli/test/check-docs-rules.test.ts b/packages/cli/test/check-docs-rules.test.ts index 1ef876f..bad8075 100644 --- a/packages/cli/test/check-docs-rules.test.ts +++ b/packages/cli/test/check-docs-rules.test.ts @@ -59,11 +59,13 @@ const CANONICAL_PAGES: readonly PageSpec[] = [ { relPath: 'operations/coding-agents.md', title: 'Coding Agents' }, { relPath: 'walkthroughs/declarative-taskpack.md', title: 'Declarative Taskpack' }, { relPath: 'walkthroughs/managed-controller.md', title: 'Managed Controller' }, + { relPath: 'walkthroughs/evolutionary-campaigns.md', title: 'Evolutionary Campaigns' }, { relPath: 'configuration/taskpack.md', title: 'Taskpack' }, { relPath: 'configuration/task-contract.md', title: 'Task Contract' }, { relPath: 'configuration/controller-and-registry.md', title: 'Controller and Registry' }, { relPath: 'configuration/sandbox-backends.md', title: 'Sandbox Backends' }, { relPath: 'configuration/decision-routing.md', title: 'Decision Routing' }, + { relPath: 'configuration/evolution-campaign.md', title: 'Evolution Campaign' }, { relPath: 'development.md', title: 'Development and Verification' }, { relPath: 'contribute/internals.md', title: 'Workspace Internals and Boundaries' }, { relPath: 'contribute/identity.md', title: 'Canonical Identity and Digests' }, @@ -238,6 +240,7 @@ function buildMinimalRepoFixture(): string { ' items:', ' - /docs/walkthroughs/declarative-taskpack/', ' - /docs/walkthroughs/managed-controller/', + ' - /docs/walkthroughs/evolutionary-campaigns/', ' - name: Configuration', ' items:', ' - /docs/configuration/taskpack/', @@ -245,6 +248,7 @@ function buildMinimalRepoFixture(): string { ' - /docs/configuration/controller-and-registry/', ' - /docs/configuration/sandbox-backends/', ' - /docs/configuration/decision-routing/', + ' - /docs/configuration/evolution-campaign/', 'labels:', ' /docs/getting-started/architecture/: Architecture', ' /docs/getting-started/installation/: Installation', @@ -254,11 +258,13 @@ function buildMinimalRepoFixture(): string { ' /docs/operations/coding-agents/: Coding Agents', ' /docs/walkthroughs/declarative-taskpack/: Declarative Taskpack', ' /docs/walkthroughs/managed-controller/: Managed Controller', + ' /docs/walkthroughs/evolutionary-campaigns/: Evolutionary Campaigns', ' /docs/configuration/taskpack/: Taskpack', ' /docs/configuration/task-contract/: Task Contract', ' /docs/configuration/controller-and-registry/: Controller and Registry', ' /docs/configuration/sandbox-backends/: Sandbox Backends', ' /docs/configuration/decision-routing/: Decision Routing', + ' /docs/configuration/evolution-campaign/: Evolution Campaign', '', ].join('\n') ); diff --git a/packages/cli/test/docs-and-site.test.ts b/packages/cli/test/docs-and-site.test.ts index ba6ad21..fd5490d 100644 --- a/packages/cli/test/docs-and-site.test.ts +++ b/packages/cli/test/docs-and-site.test.ts @@ -20,8 +20,9 @@ import { dirname, join, resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; import { parseDocument } from 'yaml'; import { installedHandlerDigests } from '@loopwright/controller'; +import { parseEvolutionCampaignDocument } from '@loopwright/evolution'; import { validateTaskpackManifest } from '@loopwright/github-app'; -import { validateTaskpackSuiteManifest, type Json } from '@loopwright/taskpack'; +import { validateTaskpackManifestObject, validateTaskpackSuiteManifest, type Json } from '@loopwright/taskpack'; import { configurationFixture } from '../../controller/test/config-fixtures.js'; import { setFixture } from '../../controller/test/progress-fixtures.js'; @@ -236,6 +237,39 @@ test('documentation and skills: AGENTS.md, OpenCodeReview rules, and skills exis assert.equal(validatedBootstrapSuite.spec.domains.length, 2); assert.equal(validatedBootstrapSuite.spec.stages.length, 2); + // Verify complete EvolutionCampaign Macro YAML example in docs/configuration/evolution-campaign.md validates against schema + const evoConfigDoc = readFileSync(join(REPO_ROOT, 'docs', 'configuration', 'evolution-campaign.md'), 'utf8'); + const evoConfigYamlMatch = evoConfigDoc.match(/## EvolutionCampaign\n\n```yaml\n([\s\S]*?)\n```/); + assert.ok(evoConfigYamlMatch?.[1], 'docs/configuration/evolution-campaign.md must include a ## EvolutionCampaign YAML example'); + const evoConfigParsed = parseDocument(evoConfigYamlMatch[1], { version: '1.2', schema: 'core', uniqueKeys: true }); + assert.equal(evoConfigParsed.errors.length, 0, 'evolution-campaign.md YAML must parse cleanly'); + const validatedEvoConfig = parseEvolutionCampaignDocument(evoConfigParsed.toJS() as Record); + assert.equal(validatedEvoConfig.metadata.name, 'flash-decode-sm90a'); + assert.equal(validatedEvoConfig.spec.targetCellId, 'cuda-h100-whole'); + assert.equal(validatedEvoConfig.spec.stages.mode, 'specialist-then-portfolio'); + assert.equal(validatedEvoConfig.spec.teamEvolution?.enabled, true); + + // Verify embedded Taskpack and EvolutionCampaign YAML examples in docs/walkthroughs/evolutionary-campaigns.md validate against schema + const evoWalkthroughDoc = readFileSync(join(REPO_ROOT, 'docs', 'walkthroughs', 'evolutionary-campaigns.md'), 'utf8'); + const evoWalkthroughYamlBlocks = [...evoWalkthroughDoc.matchAll(/```yaml\n([\s\S]*?)\n```/g)] + .map(m => m[1]!) + .map(raw => { + const parsed = parseDocument(raw, { version: '1.2', schema: 'core', uniqueKeys: true }); + assert.equal(parsed.errors.length, 0, 'evolutionary-campaigns.md YAML must parse cleanly'); + return parsed.toJS() as Record; + }); + const evoWalkthroughTaskpack = evoWalkthroughYamlBlocks.find(doc => doc['kind'] === 'Taskpack'); + assert.ok(evoWalkthroughTaskpack, 'docs/walkthroughs/evolutionary-campaigns.md must include a YAML Taskpack example'); + const validatedEvoWalkthroughTaskpack = validateTaskpackManifestObject(evoWalkthroughTaskpack, { + controlRoot: '.loopwright', + manifestPath: '.loopwright/taskpack.yaml', + }); + assert.equal(validatedEvoWalkthroughTaskpack.metadata.name, 'kernel-evolve-tp'); + const evoWalkthroughCampaign = evoWalkthroughYamlBlocks.find(doc => doc['kind'] === 'EvolutionCampaign'); + assert.ok(evoWalkthroughCampaign, 'docs/walkthroughs/evolutionary-campaigns.md must include a YAML EvolutionCampaign example'); + const validatedEvoWalkthroughCampaign = parseEvolutionCampaignDocument(evoWalkthroughCampaign); + assert.equal(validatedEvoWalkthroughCampaign.metadata.name, 'flash-decode-sm90a'); + // 4. .claude/skills symlink const claudeSkillsPath = join(REPO_ROOT, '.claude', 'skills'); assert.ok(existsSync(claudeSkillsPath), '.claude/skills must exist'); @@ -259,7 +293,7 @@ test('documentation verification: check-docs.mjs passes with zero errors', () => assert.match(run.stdout, /0 error\(s\)/, 'check-docs.mjs must report 0 error(s)'); }); -test('hugo site: site.mjs build builds 13-page site, exports markdown, renders reading footers, and verifies zero broken links', () => { +test('hugo site: site.mjs build builds 15-page site, exports markdown, renders reading footers, and verifies zero broken links', () => { const siteScript = join(REPO_ROOT, 'scripts', 'site.mjs'); assert.ok(existsSync(siteScript), 'scripts/site.mjs must exist'); @@ -288,7 +322,7 @@ test('hugo site: site.mjs build builds 13-page site, exports markdown, renders r }); assert.equal(build.status, 0, `site.mjs build failed:\nstdout: ${build.stdout}\nstderr: ${build.stderr}`); - assert.match(build.stdout, /Verified \d+ HTML pages and 13 Markdown exports; 0 broken link\(s\)/); + assert.match(build.stdout, /Verified \d+ HTML pages and 15 Markdown exports; 0 broken link\(s\)/); const publicDir = join(REPO_ROOT, 'site', 'public'); assert.ok(existsSync(join(publicDir, 'llms.txt')), 'llms.txt must exist'); @@ -298,7 +332,7 @@ test('hugo site: site.mjs build builds 13-page site, exports markdown, renders r // Verify llms.txt content const llms = readFileSync(join(publicDir, 'llms.txt'), 'utf8'); const llmsMatches = llms.match(/^-\s+\[[^\]]+\]\(\/docs\/[^)]+\):/gm); - assert.equal(llmsMatches?.length, 13, 'llms.txt must list exactly 13 docs pages'); + assert.equal(llmsMatches?.length, 15, 'llms.txt must list exactly 15 docs pages'); assert.match(llms, /\[Bootstrap Interview Reference\]\(\/references\/bootstrap-interview\.md\)/, 'llms.txt must link to Bootstrap Interview Reference'); assert.ok(!llms.includes('/docs/development/'), 'llms.txt must not contain /docs/development/'); assert.ok(!llms.includes('/docs/contribute/'), 'llms.txt must not contain /docs/contribute/'); @@ -315,9 +349,9 @@ test('hugo site: site.mjs build builds 13-page site, exports markdown, renders r // Verify index.json content const index = JSON.parse(readFileSync(join(publicDir, 'index.json'), 'utf8')) as unknown[]; - assert.ok(Array.isArray(index) && index.length >= 13, 'index.json must contain at least 13 pages'); + assert.ok(Array.isArray(index) && index.length >= 15, 'index.json must contain at least 15 pages'); - // Verify 13 markdown and html exports exist under docs/// + // Verify 15 markdown and html exports exist under docs/// const canonicalPages = [ 'getting-started/architecture', 'getting-started/installation', @@ -327,11 +361,13 @@ test('hugo site: site.mjs build builds 13-page site, exports markdown, renders r 'operations/coding-agents', 'walkthroughs/declarative-taskpack', 'walkthroughs/managed-controller', + 'walkthroughs/evolutionary-campaigns', 'configuration/taskpack', 'configuration/task-contract', 'configuration/controller-and-registry', 'configuration/sandbox-backends', - 'configuration/decision-routing' + 'configuration/decision-routing', + 'configuration/evolution-campaign' ]; for (const p of canonicalPages) { @@ -361,7 +397,7 @@ test('hugo site: site.mjs build builds 13-page site, exports markdown, renders r env: { ...process.env, SITE_BASE_URL: 'https://docs.gpustack.ai/loopwright/latest/' } }); assert.equal(subpathBuild.status, 0, `subpath site.mjs build failed:\nstdout: ${subpathBuild.stdout}\nstderr: ${subpathBuild.stderr}`); - assert.match(subpathBuild.stdout, /Verified \d+ HTML pages and 13 Markdown exports; 0 broken link\(s\)/); + assert.match(subpathBuild.stdout, /Verified \d+ HTML pages and 15 Markdown exports; 0 broken link\(s\)/); const subpathLlms = readFileSync(join(publicDir, 'llms.txt'), 'utf8'); assert.match(subpathLlms, /\[Bootstrap Interview Reference\]\(\/loopwright\/latest\/references\/bootstrap-interview\.md\)/, 'subpath llms.txt must prefix relURL cleanly'); diff --git a/packages/controller/src/verification.ts b/packages/controller/src/verification.ts index 3bf2631..6deeefa 100644 --- a/packages/controller/src/verification.ts +++ b/packages/controller/src/verification.ts @@ -1491,7 +1491,7 @@ export class Verifier { const maxOldGenerationSizeMb = isWideOverlay ? Math.min(192, Math.max(64, Math.ceil(workerBounds.allocationMaxBytes / (1024 * 1024)) + 32)) : 64; - const timeoutMs = isWideOverlay ? 15_000 : 2_000; + const timeoutMs = isWideOverlay ? 15_000 : 10_000; const running = boundedWorker(verifierModule, packet, signal, { maxOldGenerationSizeMb, timeoutMs }); closed = false; const observed = await running; diff --git a/packages/evolution/test/campaign-hardening.test.ts b/packages/evolution/test/campaign-hardening.test.ts index cf3ae34..83604c5 100644 --- a/packages/evolution/test/campaign-hardening.test.ts +++ b/packages/evolution/test/campaign-hardening.test.ts @@ -590,6 +590,7 @@ test('concurrent child evaluator never mutates process.env, preserves evo-parent }); let workerLeases = 0; + let workerFatalError: unknown = null; const workerAbort = new AbortController(); const workerPromise = runHardwareWorker({ config: { @@ -620,7 +621,11 @@ test('concurrent child evaluator never mutates process.env, preserves evo-parent onLeaseAcquired: () => { workerLeases += 1; }, - }).catch(() => undefined); + }).catch((err: unknown) => { + if (!workerAbort.signal.aborted) { + workerFatalError = err; + } + }); const secretEnvVarName = 'LW_ISOLATED_TEST_SIGNING_KEY_SC2'; assert.equal(process.env[secretEnvVarName], undefined); @@ -724,9 +729,23 @@ test('concurrent child evaluator never mutates process.env, preserves evo-parent assert.equal(sawScratchpadInAgent, true, 'evo-scratchpad must be exposed in contextFiles when role.instructions is set'); // Gen 1 ran 2 worker leases (Island 0 + Island 1); Gen 2 Island 0 clone was rejected pre-gate (0 leases), Gen 2 Island 1 ran 1 lease -> total 3 leases - assert.equal(res.noveltyRejectionsCount, 1); - assert.equal(workerLeases, 3, 'cosmetic clone must be rejected BEFORE benchmark-gate.v1 acquires any worker lease'); - assert.equal(res.campaign.evaluationsUsed, 3); + const recordedSummary = JSON.stringify( + (await res.store.listIndividuals('camp-sc2-sh3-pm2')).map(ind => ({ + id: ind.individualId, + gen: ind.generation, + isl: ind.islandId, + status: ind.status, + reason: ind.failureReason, + })), + ); + assert.equal(workerFatalError, null, `hardware worker threw unexpectedly: ${String(workerFatalError)}`); + assert.equal( + res.noveltyRejectionsCount, + 1, + `expected 1 novelty rejection (workerLeases=${workerLeases}, individuals=${recordedSummary})`, + ); + assert.equal(workerLeases, 3, `cosmetic clone must be rejected BEFORE benchmark-gate.v1 acquires any worker lease (individuals=${recordedSummary})`); + assert.equal(res.campaign.evaluationsUsed, 3, `individuals=${recordedSummary}`); // Auto-exported bundle carries hardware.driverConstraint (">=550.54") in compatibility assert.ok(res.exportedBundle !== undefined); diff --git a/packages/hardware-runner/src/relay-server.ts b/packages/hardware-runner/src/relay-server.ts index 58e7e3e..f7a1927 100644 --- a/packages/hardware-runner/src/relay-server.ts +++ b/packages/hardware-runner/src/relay-server.ts @@ -1,6 +1,6 @@ import { createHash, createHmac, randomBytes, timingSafeEqual } from 'node:crypto'; import { constants, linkSync, lstatSync, realpathSync, statSync, unlinkSync, type Stats } from 'node:fs'; -import { chmod, link, lstat, mkdir, open, opendir, unlink } from 'node:fs/promises'; +import { chmod, lstat, mkdir, open, opendir, unlink } from 'node:fs/promises'; import { createServer as createHttpServer, type IncomingMessage, @@ -2457,34 +2457,45 @@ export async function startRelayServer(options: RelayServerOptions): Promise null); if (!st || st.isSymbolicLink() || !st.isFile() || st.nlink <= 1) break; - await new Promise(r => setTimeout(r, 5)); + await new Promise(r => setTimeout(r, 10)); } await verifyExistingCasBlob(sha256, expectedLength, { scrubSecrets: optionsIngest.scrubSecrets }); await syncDir(sha256Dir); diff --git a/packages/hardware-runner/test/relay-server.test.ts b/packages/hardware-runner/test/relay-server.test.ts index 1b555a4..6c14864 100644 --- a/packages/hardware-runner/test/relay-server.test.ts +++ b/packages/hardware-runner/test/relay-server.test.ts @@ -3424,3 +3424,51 @@ test('bounded terminal retention + evicted replay/GET lazy disk recovery, CAS lo await rm(dir, { recursive: true, force: true }); } }); + +test('RelayServer: concurrent identical-blob PUT staging across distinct operations never exposes transient nlink > 1', async () => { + const dir = await mkdtemp(join(tmpdir(), 'lw-relay-concurrent-put-')); + const casDir = join(dir, 'cas'); + const relay = await startRelayServer({ + port: 0, + casDir, + controllerSigningSecret: CONTROLLER_SECRET, + controllerAuthToken: CONTROLLER_BEARER, + workerTokens: [WORKER_TOKEN], + }); + try { + const sharedPayload = Buffer.from('shared-base-tree-bundle-payload-'.repeat(256), 'utf8'); + const sharedSha = sha256Hex(sharedPayload); + const opCount = 8; + const responses = await Promise.all( + Array.from({ length: opCount }, (_, idx) => { + const opId = `verify.0.check.concurrent-put-${idx}`; + const sig = signRelayPayload(CONTROLLER_SECRET, `PUT\n${opId}\n${sharedSha}\n${sharedPayload.byteLength}`); + return fetch(`${relay.url}/v1/benchmark/jobs/${opId}/blobs/${sharedSha}`, { + method: 'PUT', + headers: { + authorization: `Bearer ${CONTROLLER_BEARER}`, + 'content-type': 'application/octet-stream', + 'content-length': String(sharedPayload.byteLength), + 'x-loopwright-blob-sha256': sharedSha, + 'x-loopwright-blob-length': String(sharedPayload.byteLength), + 'x-loopwright-signature': sig, + }, + body: sharedPayload, + }); + }), + ); + + const statuses = responses.map(r => r.status); + for (const r of responses) { + assert.ok(r.status === 200 || r.status === 201, `expected 200/201 for concurrent identical PUT, got ${r.status} (all=${JSON.stringify(statuses)})`); + } + assert.equal(statuses.filter(s => s === 201).length, 1, `exactly one writer should create the CAS blob (statuses=${JSON.stringify(statuses)})`); + const blobStat = await lstat(join(casDir, 'blobs', 'sha256', sharedSha)); + assert.equal(blobStat.isFile(), true); + assert.equal(blobStat.nlink, 1); + assert.equal(blobStat.mode & 0o777, 0o400); + } finally { + await relay.close(); + await rm(dir, { recursive: true, force: true }); + } +}); diff --git a/packages/taskpack/src/sandbox.ts b/packages/taskpack/src/sandbox.ts index a23549d..afa3a65 100644 --- a/packages/taskpack/src/sandbox.ts +++ b/packages/taskpack/src/sandbox.ts @@ -1800,7 +1800,7 @@ function probeLinuxLandlockExecutable(executable: string): { readonly abi: numbe const probe = spawnSync( executable, ['-I', '-S', '-B', '-c', LANDLOCK_HOST_PROBE_SCRIPT], - { cwd: '/', encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'], timeout: 3_000 }, + { cwd: '/', encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'], timeout: 10_000 }, ); if (probe.status === 0 && probe.error === undefined) { const parts = (probe.stdout ?? '').trim().split(':'); @@ -1812,7 +1812,9 @@ function probeLinuxLandlockExecutable(executable: string): { readonly abi: numbe return info; } } - cachedLandlockProbesByExecutable.set(executable, null); + if ((probe.error as NodeJS.ErrnoException | undefined)?.code !== 'ETIMEDOUT') { + cachedLandlockProbesByExecutable.set(executable, null); + } return null; } @@ -1914,7 +1916,7 @@ export function negotiateSandboxBackend( } if (env.probeExecutables && process.platform === 'linux') { const probe = spawnSync(executable, ['--unshare-all', '--ro-bind', '/', '/', '/bin/true'], { - timeout: 2000, + timeout: 5_000, stdio: 'ignore', }); if (probe.status !== 0) { diff --git a/scripts/check-docs.mjs b/scripts/check-docs.mjs index c05ccc3..c56ad05 100755 --- a/scripts/check-docs.mjs +++ b/scripts/check-docs.mjs @@ -38,11 +38,13 @@ export const PUBLIC_SITE_DOC_REL_PATHS = new Set([ "docs/operations/coding-agents.md", "docs/walkthroughs/declarative-taskpack.md", "docs/walkthroughs/managed-controller.md", + "docs/walkthroughs/evolutionary-campaigns.md", "docs/configuration/taskpack.md", "docs/configuration/task-contract.md", "docs/configuration/controller-and-registry.md", "docs/configuration/sandbox-backends.md", - "docs/configuration/decision-routing.md" + "docs/configuration/decision-routing.md", + "docs/configuration/evolution-campaign.md" ]); export const REPO_ONLY_DOC_REL_PATHS = new Set([ "docs/development.md", @@ -1228,7 +1230,7 @@ export function checkDocs(rootDirOrOptions = process.cwd()) { } } - // Site publication link boundary & 1:1 filename-to-H1 slug rule on the 13 public docs pages + // Site publication link boundary & 1:1 filename-to-H1 slug rule on the 15 public docs pages if (PUBLIC_SITE_DOC_REL_PATHS.has(relDoc)) { if (firstNonEmpty && firstNonEmpty.startsWith("# ")) { const h1Title = firstNonEmpty.slice(2).trim(); diff --git a/site/data/navigation.yaml b/site/data/navigation.yaml index 1f56da6..edd90b6 100644 --- a/site/data/navigation.yaml +++ b/site/data/navigation.yaml @@ -13,6 +13,7 @@ groups: items: - /docs/walkthroughs/declarative-taskpack/ - /docs/walkthroughs/managed-controller/ + - /docs/walkthroughs/evolutionary-campaigns/ - name: Configuration items: - /docs/configuration/taskpack/ @@ -20,6 +21,7 @@ groups: - /docs/configuration/controller-and-registry/ - /docs/configuration/sandbox-backends/ - /docs/configuration/decision-routing/ + - /docs/configuration/evolution-campaign/ labels: /docs/getting-started/architecture/: Architecture @@ -30,8 +32,10 @@ labels: /docs/operations/coding-agents/: Coding Agents /docs/walkthroughs/declarative-taskpack/: Declarative Taskpack /docs/walkthroughs/managed-controller/: Managed Controller + /docs/walkthroughs/evolutionary-campaigns/: Evolutionary Campaigns /docs/configuration/taskpack/: Taskpack /docs/configuration/task-contract/: Task Contract /docs/configuration/controller-and-registry/: Controller and Registry /docs/configuration/sandbox-backends/: Sandbox Backends /docs/configuration/decision-routing/: Decision Routing + /docs/configuration/evolution-campaign/: Evolution Campaign