Enable and operate the Context Awareness feature (docs/context contracts + environment registry) so LLMs can work from a verified context layer instead of ad-hoc repo scans.
Provide a stable, verifiable, LLM-readable context layer under docs/context/.
This feature standardizes how the project exposes:
The main outcome is that the LLM can load a small number of canonical entry points and avoid fragile whole-repo discovery.
When enabled, the feature materializes these paths in the repo root:
docs/context/** (contracts + registry)config/environments/** (environment config templates; no secrets)And it assumes these controller scripts exist (they are part of the template SSOT under .ai/):
node .ai/skills/features/context-awareness/scripts/ctl-context.mjs — context artifacts + registry + environmentsnode .ai/scripts/ctl-project-state.mjs — project state (.ai/project/state.json)node .ai/skills/_meta/ctl-skill-packs.mjs — skill pack switching + wrapper syncdocs/context/INDEX.mddocs/context/registry.jsondocs/context/config/environment-registry.jsonIf a DB schema exists, the canonical DB contract is:
docs/context/db/schema.jsonThat DB contract is produced by the DB SSOT workflow (see ctl-db-ssot, and the database workflow skills).
To enable in any repo:
.ai/skills/features/context-awareness/templates/ into the repo root (merge / copy-if-missing).node .ai/scripts/ctl-project-state.mjs init
node .ai/scripts/ctl-project-state.mjs set features.contextAwareness true
node .ai/scripts/ctl-project-state.mjs set context.enabled true
node .ai/scripts/ctl-project-state.mjs set-context-mode <contract|snapshot>
node .ai/skills/features/context-awareness/scripts/ctl-context.mjs init
node .ai/skills/features/context-awareness/scripts/ctl-context.mjs touch
Use projectctl to maintain .ai/project/state.json:
node .ai/scripts/ctl-project-state.mjs init
node .ai/scripts/ctl-project-state.mjs set custom.stage <prototype|mvp|production|maintenance|archived>
node .ai/scripts/ctl-project-state.mjs set-context-mode <contract|snapshot>
node .ai/scripts/ctl-project-state.mjs verify
After editing any file under docs/context/**:
node .ai/skills/features/context-awareness/scripts/ctl-context.mjs touch
node .ai/skills/features/context-awareness/scripts/ctl-context.mjs list-envs
node .ai/skills/features/context-awareness/scripts/ctl-context.mjs add-env --id qa --description "QA environment"
node .ai/skills/features/context-awareness/scripts/ctl-context.mjs verify-config
node .ai/skills/features/context-awareness/scripts/ctl-context.mjs verify --strict
node .ai/scripts/ctl-project-state.mjs verify
reference/feature-overview.mdreference/feature-mechanism.mdreference/operating-guide.mdreference/project-state-guide.mddocs/context/ or config/.ctl-context touch.docs/context/db/schema.json.