Night Market Architecture Contract

Architecture invariants, ADRs and known weak points — scoped to the claude-night-market repo

av athola · athola/claude-night-market

Testad · Fungerar ★ 8.8/10

Night Market Architecture Contract — Architecture invariants, ADRs and known weak points — scoped to the claude-night-market repo

Vad den gör

A written architecture contract for the claude-night-market plugin ecosystem: six load-bearing design decisions, an invariants table naming the CI script or test that enforces each one, five accepted weak points, and a digest of all ADRs in docs/adr/. It triggers when judging a design change that crosses a plugin boundary, touches a hook, adds a skill, or bumps a version, and it explicitly hands off gating to night-market-change-control. Every claim cites an ADR, a commit hash, or a checked-in enforcement file, so it is only useful inside this one repo.

Testrapport

Cloned the repo and reviewed one 4-part design proposal twice — baseline at /private/tmp/.../scratchpad/nmac_baseline.md, skill-followed at nmac_skill.md — and all four verdicts flipped. Baseline read `requires-python = ">=3.12"` in pyproject.toml and APPROVED using `datetime.UTC` in a plugin hook; the skill REJECTED it because hooks run under host Python 3.9 from a cache dir, which I confirmed in-tree (`UP017` ignored with comment "keep timezone.utc for Python 3.9 compat" at pyproject.toml:174, AST guard plugins/leyline/tests/test_python39_compat.py, 12 hook dirs listed in .github/workflows/python39-compat.yml). Baseline also APPROVED de-duplicating three tasks_manager.py copies; the skill rejected it citing ADR-0001 plus commits 054e2679 / 29961cd2 / d89a55c7 — I fetched all five cited commit patches from GitHub (HTTP 200) and the subjects match ("consolidate tasks_manager", "Revert...", "differentiate tasks_manag..."), and all 12 enforcement paths I spot-checked exist. Frontmatter parses (name + 149-char description), install into an isolated HOME placed SKILL.md correctly, no curl|sh / base64 / secret-exfil / injection text. Deductions: the skill's own digest has drifted (claims 17 ADRs / v1.9.15 / 198 skills; today the repo has 19 / 1.9.17 / 202) though it ships the re-verify commands that caught this, and the description never says "claude-night-market", so it would mis-trigger on a generic "design my checkout architecture" if installed outside the repo.

Testad: 2026-07-21 · Claude Code 2.x (agent harness)

Installation

git clone --depth 1 https://github.com/athola/claude-night-market.git /tmp/night-market-architecture-contract-src
mkdir -p ~/.claude/skills
cp -R /tmp/night-market-architecture-contract-src/.claude/skills/night-market-architecture-contract ~/.claude/skills/night-market-architecture-contract
# Single SKILL.md, no scripts, no deps, no API keys.
# IMPORTANT SCOPE LIMIT: this skill documents the claude-night-market repo itself.
# Every path it cites (docs/adr/, plugins/abstract/scripts/validate_budget.py,
# scripts/check_skill_graph_drift.py, .github/workflows/python39-compat.yml ...)
# only resolves when your cwd IS that repo. Installed into an unrelated project
# it will still load (description says only "judging a design change") and give
# you facts about someone else's codebase. Use it as a repo-local skill.
# Sibling skills in the same dir: night-market-change-control (gating),
# night-market-failure-archaeology (incidents), night-market-operations (commands).

Kommandon och exempelprompter

  • /night-market-architecture-contractArchitecture invariants, ADRs and known weak points — scoped to the claude-night-market repo

Skills triggas av vanliga förfrågningar — inga kommandon att memorera. Efter installationen aktiverar prompter som dessa skillen (på engelska):

  • Judge whether this design change breaks an invariant
  • List the load-bearing decisions in this architecture
  • Identify weak points before this design change