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 by npm run gen:decisions-index).
  • Library source in src/; the thin bin shim is bin/lookout.mjs.
  • dist/ is generated by npm run build (tsc); do not hand-edit it.
  • Trustworthy unchanged-304 requires Forage's validator-scoped revalidation; do not bypass @kontourai/forage/fetch or 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-boundary enforces this. The scripts/check-content-boundary.cjs gate is a temporary per-repo copy pending kontourai/veritas#112 centralization.

Match Checks To Change Type#

  • Library/types changes: npm test (build + Node tests against dist/).
  • 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, run npm run gen:decisions-index. npm run check:decisions validates the records and the index. It passes --base $DECISIONS_BASE (default origin/main; CI sets it to the pull request base), which Corpus uses for the ADR freeze if decisions.adr is ever declared; Lookout has no numbered ADRs.
  • Docs are published with Corpus: corpus.json lists the published docs and MCP topics, and npm run docs:check is the gate. When you change code a document covers, 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's verify job runs).
  • Releases use release-please with conventional commits; the version lives in .release-please-manifest.json and package.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.

Source: AGENTS.md