Step 5 - Commit and install
Goal: move the reviewed draft out of the disposable .alloy-output/ and into your committed .alloy/, on a branch, so the corpus config is real and reviewable.
Everything so far lived under the gitignored .alloy-output/. Installation is weaving that draft into the .alloy/ frame alloy init --spoke scaffolded. It is all additive, and it belongs on its own branch:
git checkout -b feat/alloy-spoke-corpusWhere each draft file goes
| Draft file | Install into |
|---|---|
source-entry.yaml | .alloy/alloy.config.yaml, under sources: - replacing the placeholder discovery block |
rulepacks/*.yaml and rulepacks/templates/*.md | .alloy/rulepacks/ |
manifest-categories.yaml | .alloy/corpus/meta/corpus-manifest.yaml, under sources.<name>.categories (add view membership if needed) |
units.yaml (if present) | the source's inventory location |
A few things to keep right as you weave:
- Keep the source
self: true. In a spoke the source is the repo. It carries norepo/ref(those are optional-informational only) and nopath/track/drift- its referent is the repo's own HEAD. - Keep
corpusRoot: .alloy/corpusfrom the scaffold. - The scaffolded manifest already carries the required scalar fields; you are adding your categories to it, not replacing it.
Verify the installed config
Run the check once more, now against the installed config rather than the draft:
alloy discover # enumerate the units your installed config declares
alloy status # coverage, drift, staleness - the whole health reportdiscover should list exactly the units you settled on in step 4. status reports findings and exits 0 - it never reds anything on a finding, so treat its output as a report, not a gate.
Commit
git add .alloy
git commit -m "feat: install alloy spoke corpus config"You now have a committed corpus config and an empty corpus. The next step fills it.
Optional: self-updating CI
If you want the spoke to keep itself honest as the code moves, scaffold the spoke CI workflows:
alloy init --spoke --ci # composable; --ci also works standalone on an existing spokeThis writes .github/workflows/alloy-{detect,propose,validate}.yml and refuses to clobber an existing alloy-*.yml:
alloy-detect.yml- daily drift detection, rendered into a single pinned issue.alloy-propose.yml- a weekly propose run that opens one human-merged PR.alloy-validate.yml- corpus validation on every PR that touches.alloy/**.
All three keep the human in the loop - detection and proposal automate; merging never does.
Next: step 6 - Run a campaign.