Skip to content

Step 1 - Survey your repo ​

Goal: a checked, human-reviewable draft of your source config - what gets documented and how it is grouped - without you touching a command.

Go into your repo and ask your agent:

/alloy survey this repo

That is the whole step. The alloy front-door skill routes to the alloy-survey drafting skill, which runs the loop end to end: scaffold, sniff, draft, check. You never run the sniff and never write the brief - the skill's own contract is "you run every command; the human's only acts are review and commit."

What the agent runs underneath ​

bash
alloy init              # create this repo's knowledge base (the bootstrap already did this; the skill skips it)
alloy survey .          # sniff ecosystem markers, write the survey brief
# ...reads the brief AND the real source tree, drafts the config...
alloy survey . --check  # validate + dry-run the draft; iterate until green

The scaffold writes a portable .alloy/ root and refuses to clobber an existing one:

.alloy/alloy.config.yaml                    a self: true source (this repo IS the source; referent = local HEAD)
.alloy/ecosystems.yaml                      standard ecosystem profiles
.alloy/rulepacks/templates/                 survey-drafted packs and templates land here
.alloy/corpus/meta/corpus-manifest.yaml     this repo's knowledge base manifest
.gitignore                                  .alloy-output/ added

The scaffolded config carries a placeholder discovery block - a valid frame, not yet a working ontology. The survey fills it in:

yaml
corpusRoot: .alloy/corpus
sources:
  your-repo:
    self: true # this repo is the source; referent = local HEAD
    # TODO(survey): scanners / units / ecosystems / coverage from the draft.
    scanners: [inventory]

self: true is what makes the repo document itself: the source is the enclosing repo, its drift referent is the repo's own HEAD, so docs and code share one commit history.

The discipline that keeps the draft honest ​

  • It reads your repo before any existing ontology, so it describes your populations in your repo's vocabulary rather than pattern-matching onto categories that do not fit.
  • It never invents units the tree does not support. Where paths do not predict units, it classifies files by content.
  • It triages every candidate to a state - a unit, an exclusion with a written rationale, or UNKNOWN as surfaced remaining work. Silent omission is the failure it exists to prevent.
  • It commits nothing. Everything lands under the gitignored .alloy-output/survey/your-repo/ - draft, disposable, yours to judge.

When it finishes, the agent reports the draft location, a per-file summary, the decompositions it considered and the one it chose, and the final check output. That report is your entry into step 2.

E11 Alloy - knowledge as a build artifact.