Lookout Agent Guidance#
Lookout is @kontourai/lookout: a source registry and non-throwing drift-check
runner over Forage snapshots. It classifies each source into exactly one of
four CheckResult kinds (unchanged-304, unchanged-hash, changed, error)
and exposes a machine-readable JSONL CLI. Lookout owns the prior-vs-fresh hash
comparison, classification, and snapshot persistence; Forage owns fetch
politeness/robots/redirects/timeout, snapshot mechanics, and durable reference
integrity. Scheduling stays external. The runner NEVER throws.
Source Of Truth#
- Vocabulary:
CONTEXT.md; the L1 contract decision:docs/decisions/l1-registry-and-results.md(index regenerated bynpm run gen:decisions-index). - Library source in
src/; the thin bin shim isbin/lookout.mjs. dist/is generated bynpm run build(tsc); do not hand-edit it.- Trustworthy
unchanged-304requires Forage's validator-scoped revalidation; do not bypass@kontourai/forage/fetchor reconstruct snapshot references in Lookout. Traverse remains exact-pinned for its schema/proposal contracts. - Public repo: newly authored source, tests, docs, and config stay
content-boundary-clean (generic illustrative names/URLs only, no private
vertical vocabulary);
npm run check:content-boundaryenforces this. Thescripts/check-content-boundary.cjsgate is a temporary per-repo copy pending kontourai/veritas#112 centralization.
Match Checks To Change Type#
- Library/types changes:
npm test(build + Node tests againstdist/). - Package-shape/exports/bin changes:
npm run check:pack. - Docs/decision changes: one living record per subject in
docs/decisions/<slug>.md, in the Corpus decision-record format. After editing a record, runnpm run gen:decisions-index.npm run check:decisionsvalidates the records and the index. It passes--base $DECISIONS_BASE(defaultorigin/main; CI sets it to the pull request base), which Corpus uses for the ADR freeze ifdecisions.adris ever declared; Lookout has no numbered ADRs. - Docs are published with Corpus:
corpus.jsonlists the published docs and MCP topics, andnpm run docs:checkis the gate. When you change code a documentcovers, update that document. - Content/fixture changes:
npm run check:content-boundary. - Anything before push:
npm run verify(content-boundary + decisions + typecheck + test + pack sanity — the exact chain CI'sverifyjob runs). - Releases use release-please with conventional commits; the version lives in
.release-please-manifest.jsonandpackage.json.
Useful Commands#
npm run verify·npm test·npm run typecheck·npm run check:pack·npm run check:decisions·npm run check:content-boundary
Documentation freshness#
The Corpus gate is strict for the source paths declared in corpus.json.
Review the selected canonical guides when those files change. Update inaccurate
claims in the same PR. When the prose remains accurate, record a new local
input/output byte review with a concrete explanation and limits in
corpus-content.json; do not add filler text or refresh hashes without review.
The shared Corpus review contract
owns that format. CI uses the reviewed shared pin; for local review checks use
that same Corpus revision with check --base origin/main.
This repo uses Veritas for AI governance. Read .veritas/GOVERNANCE.md before making changes.
After changes, run npx --no @kontourai/veritas readiness and address any FAIL lines before finishing.