Active Rules and Gates
This page defines enforcement behavior. Context loading alone is not enforcement.
Active Rule Set
Before implementation, produce an Active Rule Set with up to 12 bullets.
It must include:
- architecture boundaries,
- owning-layer decision for touched logic (runtime/schema/transport/client/sync/framework adapter),
- coding style constraints,
- required validation/test commands for changed scope,
- explicit conflict resolution (
higher priority rule wins), - applicable recurring rules from Root Gate by rule id,
- applicable scope-specific deviations from Specializations by specialization id.
Priority order:
- system/developer/user instructions,
- package-level prompt/rules in scope,
- core governance/coding/testing docs,
- task-local instructions.
Scope Lock
Only edit:
- user-requested scope,
- direct dependencies needed for correctness/build/tests,
- minimal docs required by rule sources.
Any scope expansion must include a reason.
Gate Review
Before final output:
- re-check changes against the Active Rule Set,
- run required checks for changed scope,
- ensure any documentation updates are made in canonical docs sources (not in derived artifacts),
- regenerate/check derived documentation artifacts when applicable,
- ensure any rule updates are documented for both humans and agents,
- list unresolved risks explicitly.
If the task is push-bound, run pnpm qg before push
(check:readmes, check:policies, lint, typecheck, test, build).
For local iteration speed, use pnpm qg:changed to run the same gate graph on affected scope only.
If a gate fails, fix within scope first. Expand scope only with explicit justification.