Agent repository context
For merge-quality authority, run specfact code review run --scope range --base-ref <full-base-ref> --head-ref <full-head-ref> --pr-context-file <event-derived-absolute-path> --enforcement full. A local range run without matching claimed context is range_preview; matching claimed context produces range_candidate. Neither is pr_range until a protected consumer independently verifies and promotes the evidence.
Project overview
specfact-cli-modules hosts official nold-ai bundle packages and the module registry consumed by SpecFact CLI. The core CLI lives in the sibling specfact-cli repository and is installed locally through hatch run dev-deps.
Essential commands
hatch env create
hatch run dev-deps
hatch run format
hatch run type-check
hatch run lint
hatch run yaml-lint
hatch run verify-modules-signature --payload-from-filesystem --enforce-version-bump
# add --require-signature for main-equivalent checks (see agent-rules/50-quality-gates-and-review.md)
hatch run contract-test
hatch run smart-test
hatch run test
# manual code review: always include --bug-hunt (CrossHair longer budgets; see bundle docs)
hatch run specfact code review run --enforcement changed --bug-hunt --json --out .specfact/code-review.json
Architecture
packages/<bundle>/contains bundle source andmodule-package.yamlregistry/index.jsonis the published module registry indexscripts/andtools/hold signing, publishing, bootstrap, and validation helperssrc/specfact_cli_modules/contains shared repo tooling codetests/covers bundle behavior, docs/tooling, and registry validationdocs/is the Jekyll site for modules docs and reference pagesopenspec/holds change proposals, specs, ordering, and evidence
Local dependency bootstrap
hatch run dev-deps prefers SPECFACT_CLI_REPO when set, otherwise a matching ../specfact-cli-worktrees/<branch> checkout when present, then falls back to ../specfact-cli.
SpecFact module scopes (avoid project vs user mismatch)
Match specfact-cli behavior: project .specfact/modules wins over ~/.specfact/modules when the same module id exists in both; the CLI may warn once per module (see module_discovery._maybe_warn_user_shadowed_by_project in specfact-cli).
In this checkout:
- Prefer
specfact module init --scope project --repo .(and project-scoped installs) so bundled modules live under the repo, not only under user scope. SPECFACT_MODULES_REPOis set to the modules repo root for everyhatch run(pyproject.tomlenv-vars) and viaapply_specfact_workspace_envfromspecfact_cli_modules.dev_bootstrap(also used byensure_core_dependency, pytestconftest, andscripts/pre_commit_code_review.py).SPECFACT_REPO_ROOTdefaults to the resolved sibling/core specfact-cli checkout when discoverable.- A user-scoped copy shadowed here remains installed and available outside this repository. Normal precedence requires no uninstall or cleanup action; use
specfact module list --show-originonly when you need to inspect the effective source.