Step 6 - Run a campaign
Goal: establish the corpus - every unit your config declares, documented, validated, and stamped, in one orchestrated run.
Invoke the campaign skill:
/alloy-campaignIt asks the scope if you did not name one - everything remaining, one kind as a wave, or a sample of one unit per kind. The sample is the right first run: it surfaces a bad rule pack cheaply before you spend the whole campaign. Then /alloy-campaign remaining finishes the job - stamps are the state, so resuming is just running it again.
The per-unit loop it fans out
The orchestrator derives the worklist from the CLI (never a hardcoded list), fans out one worker per unit (at most six at a time), and each worker runs the same five-step loop:
alloy generate <kind>/<name> → context bundle (deterministic)
agent writes the doc → markdown (probabilistic)
alloy validate <doc home> → 8 gates pass or it goes back
you review & merge → the only path into the corpus
alloy stamp <kind>/<name> → provenance written, only nowTwo guards inside that loop stop a hollow doc:
- The bundle must carry at least two code input files - fewer means a rule pack is not reaching the unit's source, so the worker stops and reports rather than authoring over nothing.
alloy stampre-runs the gate and refuses to write provenance if it fails - provenance asserts a doc was verified against its source, and a doc that fails the gate has not been.
The orchestrator then verifies from stamps, never from a worker's self-report: a unit is done only if its docs carry source_ref: frontmatter, which only alloy stamp writes. Finally it runs alloy finalize to regenerate each category's navigational map - LLM-free and byte-stable.
When the wave finishes
The agent reports back: units stamped by kind, every validator warning (each is a mandatory read), gap-marker counts, and anything that tripped the two-files guard. It also hands back the one wave-end check it leaves to you - ask it to run alloy validate .alloy/corpus (0 failed over the whole corpus, including map integrity). Read the report, spot-check the docs, and commit them - the campaign never commits.
You now have a knowledge corpus
That is the milestone: a full corpus for your repo - every unit documented, every doc gate-checked and stamped with the exact commit it was derived from.
Go look at it. Ask your agent to start the console (alloy console - local, strictly read-only), open it in your browser, and click Graph in the sidebar: your whole corpus as a live force-directed map of docs and their relationships, filterable and searchable. Browse a doc with its provenance, and check Coverage and Freshness while you are there. See The console.
Next: step 7 - Add curated docs.