Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use night-market-debugging-playbook.
Every change to this repo passes through a fixed law stack, a
classification step, and a gauntlet of automated gates. This skill tells
you which class your change is, which gates it must pass, and which
rules are non-negotiable because a past incident made them so. Nothing
here may be routed around: if a gate fails, fix the cause, never the
gate.
Jargon used below: a "gate" is any automated check that can block a
commit, PR, or release. An "ADR" is an Architecture Decision Record in
docs/adr/. The "Iron Law" is constitution rule 3: no implementation
without a failing test first.
The law stack
When two documents conflict, the higher one wins.
Rank
Source
Contents
1
CONSTITUTION.md
10 rules with what checks each, override and amendment process
A skill, hook, or agent instruction that says "skip rule N" without an
explicit user grant or a merged amendment is itself a defect
(CONSTITUTION.md, Override mechanism section).
The ten constitution rules
One line each. Where a rule was written in blood, the incident column
names the blood.
#
Rule
Motivating incident
1
The README discloses AI development for maintainer work. Outside contributors name their AI tool per PR. Never fake or deny AI involvement
Commit attribution kept out by hook plugins/imbue/hooks/vow_no_ai_attribution.py
2
An AI change over 200 changed lines names its spec, ADR, or plan doc in the PR description (lockfiles, fixtures, snapshots excluded)
Size = scrutiny principle. See the unbloat incident under non-negotiables
3
Iron Law TDD: failing test before implementation for plugin Python. Skills and prose need structural tests (the repo-wide SKILL.md tests, plus a plugin test where a skill's contract matters)
Design principle, no single incident
4
One identity leak ("As a large language model") in any committed artifact is an automatic revert
Pattern catalog in scribe slop-detector
5
Quality claims ("fast", "production-ready") need in-repo evidence or deletion
Design principle
6
No bypassing gates: no --no-verify, no SKIP=hook, no unauthorized force push, no bare suppression comments without a stated reason
Docs cost reader-time (audience x frequency x per-read time); writing effort must match
Design principle
9
Prefer deletion over rewriting; AI slop is overwhelmingly additive
Design principle
10
Errors are not optional: propagate by default, no bare except, safe-to-discard needs an inline "why" comment
Silent-failure sweep 666171c3 and the ecosystem bare-except campaign
Change classification
Classify before the first commit. The class sets the paperwork.
Change
Required process
AI-generated diff, 200 changed lines or fewer
Plain PR through the standard gates
AI-generated diff over 200 changed lines
Spec, ADR, or planning doc, named in the PR description (rule 2)
Load-bearing design decision
Numbered ADR in docs/adr/ (next number after 0017)
New project-wide rule
New file in .claude/rules/ via plain PR; existing rules cite an origin issue or discussion (#454, #457)
Constitution amendment
PR titled constitution: amend rule N (or a commit with that subject inside a larger PR), a summary of what changes and why, sign-off from the repo owner
Release
Version bump, changelog section, v-prefixed tag (lifecycle below)
The change lifecycle
1. Branch
Branch from master (the main branch) using <topic>-<version>:
Live examples in git branch -a: ai-slop-1.9.4, bugfixes-1.9.5,
discussions-fix-1.9.14. Never delete backup/unbloat-* branches.
They are the recovery points for past deletion campaigns
(backup/unbloat-20260328 is how the 2026-03-28 over-deletion was
undone).
2. Local gates before committing
make lint # ruff format + ruff check --fix + bandit
make typecheck # per-plugin strict mypy (all plugins)
make test # per-plugin pytest via scripts/run-plugin-tests.sh
make validate-all # plugin structure validation
Plugin tests MUST run per plugin (make <plugin>-test or
make -C plugins/<plugin> test). Root pytest excludes plugins/* to
avoid import-path collisions.
3. The pre-commit gauntlet
git commit runs .pre-commit-config.yaml hooks in this order
(verified 2026-07-02):
The typecheck gate runs --all deliberately. It used to run
--changed, and a global mirrors-mypy hook silently disabled 13 error
codes. Both were fixed in 1.9.12 (CHANGELOG). Do not weaken either
setting.
4. PR flow
Run in this order (all are sanctum slash commands):
/sanctum:prepare-pr updates docs, runs tests, drafts the PR.
/sanctum:pr-review reviews scope, requirements, and code.
/sanctum:validate-pr builds and executes a diff-derived test
plan, and proves revert-tests are genuine guards.
/sanctum:fix-pr and /sanctum:resolve-threads handle feedback.
For plugin-touching changes, add abstract:plugin-review at the
matching tier:
Tier
When
Scope
Time
branch
Default during work
Affected and related plugins
~2 min
pr
Before merge
Affected and related plugins
~5 min
release
Before version bump
Every plugin
~15 min
5. Release
Bump the ecosystem version. .claude-plugin/marketplace.json is
the source of truth; the bumper fans it out to every plugin's
plugin.json, metadata.json, openpackage.yml, pyproject.toml,
and __init__.py:
Or use the sanctum:version-updates skill, which runs a
git-workspace-review preflight first.
Move [Unreleased] entries in CHANGELOG.md into a dated version
section (Keep a Changelog 1.1.0, SemVer). Never rewrite or de-slop
historical entries.
Update the docs of record: docs/api-overview.md version
reference, plugin READMEs, and the generated capabilities reference
via /sanctum:sync-capabilities.
Run abstract:plugin-review --tier release.
/sanctum:create-tag pushes a v-prefixed tag. The tag matching
v* triggers .github/workflows/cross-framework-publish.yml
(semver validation, cross-framework build, tarballs, GitHub
release). Pushes to master separately trigger
trust-attestation.yml (full test run plus SLSA attestation).
Landing a change: checklist
Step
Action
Gate satisfied
Classify
Match the change against the classification table
Rule 2, amendment process
Branch
<topic>-<version> off master
Convention
Test first
Failing test before implementation
Rule 3 (Iron Law)
Local gates
make lint && make typecheck && make test
Rule 6
Commit
Plain commit, no bypass flags, honest attribution
Rules 1 and 6
PR
prepare-pr, pr-review, validate-pr; disclose AI involvement
Rule 1
Plugin review
abstract:plugin-review at branch or pr tier
Plugin quality
Merge
All CI checks green, review threads resolved
CI
Non-negotiables
Each row is a settled battle. Re-litigating one requires new evidence
stronger than the incident that settled it.
Non-negotiable
Rationale
Incident
Evidence
Never bypass or weaken a gate
A green gate that skips checks is worse than no gate: it certifies broken code
mirrors-mypy silently disabled 13 error codes. Typecheck ran changed-only. Bulk ruff ignores hid 73 real violations
CHANGELOG 1.9.12; commit 06b9b1db
No swallowed errors, ever
catch-and-continue in a scanner drops findings silently and reports clean
Scanners B1-B4 returned clean results on malformed input for months
commit 666171c3 (PR #521, issue #575)
Deletion campaigns need a backup branch and a markdown-reference scan
Python import graphs miss scripts referenced only from skills and commands
Tier-3 unbloat deleted 182 files (66K lines); skill-referenced scripts had to be restored
Plugins are independent deployables, and shared code couples their release cycles
tasks_manager consolidated to a shared script, reverted, then differentiated per plugin
commits 054e2679, 29961cd2, d89a55c7
No speculative infrastructure
Unused abstraction is pure carrying cost
LSP proxy landed without a consumer and was reverted in PR #193 review
commit bc318947
Identity leaks are an automatic revert
One leaked phrase proves unreviewed AI text shipped
Constitution rule 4
CONSTITUTION.md
Historical CHANGELOG entries are never edited
The changelog is a record, not prose to polish
Codified as an anti-goal in the slop rules
.claude/rules/slop-scan-for-docs.md (anti-goals)
When NOT to use
A gate is failing and you need to diagnose why: use
night-market-debugging-playbook.
You want the full story behind an incident named above: use
night-market-failure-archaeology.
You need the mechanics of running tests, lint, or the release
scripts (flags, artifacts, environments): use
night-market-operations.
You are judging whether a design fits the architecture: use
night-market-architecture-contract.
You are deciding what evidence a test must provide: use
night-market-validation-and-qa.
Exit Criteria
The change is classified against the classification table, and
any over-200-line AI diff names its spec, ADR, or plan doc in the
PR description.
make lint, make typecheck, and make test pass locally, and
no bypass flag (--no-verify, SKIP=, force push) appears in
the branch history.
The branch name matches <topic>-<version> and is based on
master.
The PR description discloses AI involvement (authored,
co-authored, or reviewed).
For a release: marketplace.json, the dated CHANGELOG.md
section, and the pushed v* tag all carry the same version.
Any constitution change is in a PR titled
constitution: amend rule N with repo-owner sign-off.
Provenance and maintenance
Compiled 2026-07-02 against repo v1.9.15 (10 constitution rules, 8
project rules, 17 ADRs). Re-verify volatile facts before relying on
them:
rg -c '^### [0-9]' CONSTITUTION.md # expect 10
ls .claude/rules/ | wc -l # expect 8
ls docs/adr/ | wc -l # expect 17
rg -n '"version"' .claude-plugin/marketplace.json | head -1
rg -n ' - id:' .pre-commit-config.yaml # current gate order
rg -n 'v\*' .github/workflows/cross-framework-publish.yml
rg -n 'amend rule' CONSTITUTION.md # amendment title convention
Commit hashes cited above were verified with git log --oneline -1 <hash> on 2026-07-02. Unverified/candidate: the exact count of files
restored after the unbloat incident (commit subjects confirm the
delete and restore, not the restored-file count), and whether
docs/api-overview.md holds a version table or a single version
reference (one version mention verified).
1---2name: night-market-change-control-23description: 'Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use night-market-debugging-playbook.'4metadata:5 source: https://skillmd.com/skills/athola/night-market-change-control-26---78# Night Market Change Control910Every change to this repo passes through a fixed law stack, a11classification step, and a gauntlet of automated gates. This skill tells12you which class your change is, which gates it must pass, and which13rules are non-negotiable because a past incident made them so. Nothing14here may be routed around: if a gate fails, fix the cause, never the15gate.1617Jargon used below: a "gate" is any automated check that can block a18commit, PR, or release. An "ADR" is an Architecture Decision Record in19`docs/adr/`. The "Iron Law" is constitution rule 3: no implementation20without a failing test first.2122## The law stack2324When two documents conflict, the higher one wins.2526| Rank | Source | Contents |27|------|--------|----------|28| 1 | `CONSTITUTION.md` | 10 rules with what checks each, override and amendment process |29| 2 | `.claude/rules/` | 8 project rules (markdown style, read budgets, slop gates, invariants) |30| 3 | `docs/adr/` | 17 numbered decision records (0001 to 0017) |31| 4 | Guides in `docs/` | quality-gates, testing-guide, plugin-development-guide |3233A skill, hook, or agent instruction that says "skip rule N" without an34explicit user grant or a merged amendment is itself a defect35(CONSTITUTION.md, Override mechanism section).3637## The ten constitution rules3839One line each. Where a rule was written in blood, the incident column40names the blood.4142| # | Rule | Motivating incident |43|---|------|---------------------|44| 1 | The README discloses AI development for maintainer work. Outside contributors name their AI tool per PR. Never fake or deny AI involvement | Commit attribution kept out by hook `plugins/imbue/hooks/vow_no_ai_attribution.py` |45| 2 | An AI change over 200 changed lines names its spec, ADR, or plan doc in the PR description (lockfiles, fixtures, snapshots excluded) | Size = scrutiny principle. See the unbloat incident under non-negotiables |46| 3 | Iron Law TDD: failing test before implementation for plugin Python. Skills and prose need structural tests (the repo-wide `SKILL.md` tests, plus a plugin test where a skill's contract matters) | Design principle, no single incident |47| 4 | One identity leak ("As a large language model") in any committed artifact is an automatic revert | Pattern catalog in scribe slop-detector |48| 5 | Quality claims ("fast", "production-ready") need in-repo evidence or deletion | Design principle |49| 6 | No bypassing gates: no `--no-verify`, no `SKIP=hook`, no unauthorized force push, no bare suppression comments without a stated reason | Neutered-mypy incident (CHANGELOG 1.9.12); bulk-ignore revert `06b9b1db` |50| 7 | New dependencies need justification; 18 months unmaintained is presumed abandoned; verify AI-suggested package names against the registry | Slopsquatting defense; hook `guard_package_hallucination.py` (imbue) |51| 8 | Docs cost reader-time (audience x frequency x per-read time); writing effort must match | Design principle |52| 9 | Prefer deletion over rewriting; AI slop is overwhelmingly additive | Design principle |53| 10 | Errors are not optional: propagate by default, no bare except, safe-to-discard needs an inline "why" comment | Silent-failure sweep `666171c3` and the ecosystem bare-except campaign |5455## Change classification5657Classify before the first commit. The class sets the paperwork.5859| Change | Required process |60|--------|------------------|61| AI-generated diff, 200 changed lines or fewer | Plain PR through the standard gates |62| AI-generated diff over 200 changed lines | Spec, ADR, or planning doc, named in the PR description (rule 2) |63| Load-bearing design decision | Numbered ADR in `docs/adr/` (next number after 0017) |64| New project-wide rule | New file in `.claude/rules/` via plain PR; existing rules cite an origin issue or discussion (#454, #457) |65| Constitution amendment | PR titled `constitution: amend rule N` (or a commit with that subject inside a larger PR), a summary of what changes and why, sign-off from the repo owner |66| Release | Version bump, changelog section, v-prefixed tag (lifecycle below) |6768## The change lifecycle6970### 1. Branch7172Branch from `master` (the main branch) using `<topic>-<version>`:7374```bash75git checkout master && git pull76git checkout -b my-topic-1.9.1677```7879Live examples in `git branch -a`: `ai-slop-1.9.4`, `bugfixes-1.9.5`,80`discussions-fix-1.9.14`. Never delete `backup/unbloat-*` branches.81They are the recovery points for past deletion campaigns82(`backup/unbloat-20260328` is how the 2026-03-28 over-deletion was83undone).8485### 2. Local gates before committing8687```bash88make lint # ruff format + ruff check --fix + bandit89make typecheck # per-plugin strict mypy (all plugins)90make test # per-plugin pytest via scripts/run-plugin-tests.sh91make validate-all # plugin structure validation92```9394Plugin tests MUST run per plugin (`make <plugin>-test` or95`make -C plugins/<plugin> test`). Root pytest excludes `plugins/*` to96avoid import-path collisions.9798### 3. The pre-commit gauntlet99100`git commit` runs `.pre-commit-config.yaml` hooks in this order101(verified 2026-07-02):1021031. Suppression guards: `check-noqa` (blocks bare inline lint104 suppressions), `check-docstring-quality`, `check-json-utils-drift`,105 `check-per-file-ignores`.1062. Hook registration: `check-hook-registrations`,107 `check-plugin-hooks`.1083. Code gates: `run-plugin-typecheck --all` (strict mypy on every109 plugin, not just changed ones), `run-plugin-tests --changed`.1104. Skill and plugin validation: `validate-skill-descriptions`, one111 `validate-<plugin>-plugin` hook per plugin,112 `check-context-optimization`, `validate-description-budget`,113 `check-markdown-links`, `capabilities-sync-check`,114 `check-skill-graph-drift`, `check-skill-exit-criteria-drift`.1155. Standard file hygiene (trailing whitespace, YAML/TOML/JSON syntax,116 merge conflicts, debug statements).1176. `bandit` security scan.1187. `ruff-format`, `ruff-fix`, `ruff-check`.1198. Pin freshness: `check-ruff-version`, `check-pinned-versions`.120121The typecheck gate runs `--all` deliberately. It used to run122`--changed`, and a global mirrors-mypy hook silently disabled 13 error123codes. Both were fixed in 1.9.12 (CHANGELOG). Do not weaken either124setting.125126### 4. PR flow127128Run in this order (all are sanctum slash commands):1291301. `/sanctum:prepare-pr` updates docs, runs tests, drafts the PR.1312. `/sanctum:pr-review` reviews scope, requirements, and code.1323. `/sanctum:validate-pr` builds and executes a diff-derived test133 plan, and proves revert-tests are genuine guards.1344. `/sanctum:fix-pr` and `/sanctum:resolve-threads` handle feedback.135136For plugin-touching changes, add `abstract:plugin-review` at the137matching tier:138139| Tier | When | Scope | Time |140|------|------|-------|------|141| branch | Default during work | Affected and related plugins | ~2 min |142| pr | Before merge | Affected and related plugins | ~5 min |143| release | Before version bump | Every plugin | ~15 min |144145### 5. Release1461471. Bump the ecosystem version. `.claude-plugin/marketplace.json` is148 the source of truth; the bumper fans it out to every plugin's149 `plugin.json`, `metadata.json`, `openpackage.yml`, `pyproject.toml`,150 and `__init__.py`:151152 ```bash153 python3 plugins/sanctum/scripts/update_versions.py 1.9.16154 ```155156 Or use the `sanctum:version-updates` skill, which runs a157 `git-workspace-review` preflight first.1581592. Move `[Unreleased]` entries in `CHANGELOG.md` into a dated version160 section (Keep a Changelog 1.1.0, SemVer). Never rewrite or de-slop161 historical entries.1621633. Update the docs of record: `docs/api-overview.md` version164 reference, plugin READMEs, and the generated capabilities reference165 via `/sanctum:sync-capabilities`.1661674. Run `abstract:plugin-review --tier release`.1681695. `/sanctum:create-tag` pushes a v-prefixed tag. The tag matching170 `v*` triggers `.github/workflows/cross-framework-publish.yml`171 (semver validation, cross-framework build, tarballs, GitHub172 release). Pushes to `master` separately trigger173 `trust-attestation.yml` (full test run plus SLSA attestation).174175## Landing a change: checklist176177| Step | Action | Gate satisfied |178|------|--------|----------------|179| Classify | Match the change against the classification table | Rule 2, amendment process |180| Branch | `<topic>-<version>` off master | Convention |181| Test first | Failing test before implementation | Rule 3 (Iron Law) |182| Local gates | `make lint && make typecheck && make test` | Rule 6 |183| Commit | Plain commit, no bypass flags, honest attribution | Rules 1 and 6 |184| PR | prepare-pr, pr-review, validate-pr; disclose AI involvement | Rule 1 |185| Plugin review | `abstract:plugin-review` at branch or pr tier | Plugin quality |186| Merge | All CI checks green, review threads resolved | CI |187188## Non-negotiables189190Each row is a settled battle. Re-litigating one requires new evidence191stronger than the incident that settled it.192193| Non-negotiable | Rationale | Incident | Evidence |194|----------------|-----------|----------|----------|195| Never bypass or weaken a gate | A green gate that skips checks is worse than no gate: it certifies broken code | mirrors-mypy silently disabled 13 error codes. Typecheck ran changed-only. Bulk ruff ignores hid 73 real violations | CHANGELOG 1.9.12; commit `06b9b1db` |196| No swallowed errors, ever | catch-and-continue in a scanner drops findings silently and reports clean | Scanners B1-B4 returned clean results on malformed input for months | commit `666171c3` (PR #521, issue #575) |197| Deletion campaigns need a backup branch and a markdown-reference scan | Python import graphs miss scripts referenced only from skills and commands | Tier-3 unbloat deleted 182 files (66K lines); skill-referenced scripts had to be restored | commits `a3f11323` (delete), `3f280334` (restore); branch `backup/unbloat-20260328` |198| No DRY consolidation across plugin boundaries | Plugins are independent deployables, and shared code couples their release cycles | tasks_manager consolidated to a shared script, reverted, then differentiated per plugin | commits `054e2679`, `29961cd2`, `d89a55c7` |199| No speculative infrastructure | Unused abstraction is pure carrying cost | LSP proxy landed without a consumer and was reverted in PR #193 review | commit `bc318947` |200| Identity leaks are an automatic revert | One leaked phrase proves unreviewed AI text shipped | Constitution rule 4 | `CONSTITUTION.md` |201| Historical CHANGELOG entries are never edited | The changelog is a record, not prose to polish | Codified as an anti-goal in the slop rules | `.claude/rules/slop-scan-for-docs.md` (anti-goals) |202203## When NOT to use204205- A gate is failing and you need to diagnose why: use206 `night-market-debugging-playbook`.207- You want the full story behind an incident named above: use208 `night-market-failure-archaeology`.209- You need the mechanics of running tests, lint, or the release210 scripts (flags, artifacts, environments): use211 `night-market-operations`.212- You are judging whether a design fits the architecture: use213 `night-market-architecture-contract`.214- You are deciding what evidence a test must provide: use215 `night-market-validation-and-qa`.216217## Exit Criteria218219- [ ] The change is classified against the classification table, and220 any over-200-line AI diff names its spec, ADR, or plan doc in the221 PR description.222- [ ] `make lint`, `make typecheck`, and `make test` pass locally, and223 no bypass flag (`--no-verify`, `SKIP=`, force push) appears in224 the branch history.225- [ ] The branch name matches `<topic>-<version>` and is based on226 `master`.227- [ ] The PR description discloses AI involvement (authored,228 co-authored, or reviewed).229- [ ] For a release: `marketplace.json`, the dated `CHANGELOG.md`230 section, and the pushed `v*` tag all carry the same version.231- [ ] Any constitution change is in a PR titled232 `constitution: amend rule N` with repo-owner sign-off.233234## Provenance and maintenance235236Compiled 2026-07-02 against repo v1.9.15 (10 constitution rules, 8237project rules, 17 ADRs). Re-verify volatile facts before relying on238them:239240```bash241rg -c '^### [0-9]' CONSTITUTION.md # expect 10242ls .claude/rules/ | wc -l # expect 8243ls docs/adr/ | wc -l # expect 17244rg -n '"version"' .claude-plugin/marketplace.json | head -1245rg -n ' - id:' .pre-commit-config.yaml # current gate order246rg -n 'v\*' .github/workflows/cross-framework-publish.yml247rg -n 'amend rule' CONSTITUTION.md # amendment title convention248```249250Commit hashes cited above were verified with `git log --oneline -1251<hash>` on 2026-07-02. Unverified/candidate: the exact count of files252restored after the unbloat incident (commit subjects confirm the253delete and restore, not the restored-file count), and whether254`docs/api-overview.md` holds a version table or a single version255reference (one version mention verified).
Run npx get-skill add athola/night-market-change-control-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use night-market-debugging-playbook. It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: CAUTION, Skill Scanner: PASS. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
athola (@athola) published this skill. Their other Agent Skills are listed on their SkillMD profile.