Skip to content

feat!: replace the constitution with org-wide CODING_STANDARDS.md and REVIEW.md - #37

Merged
systemfsoftware-bot merged 5 commits into
mainfrom
org-coding-standards
Nov 23, 2026
Merged

systemfsoftware-bot merged 5 commits into
mainfrom
org-coding-standards

Conversation

@systemfsoftware-bot

@systemfsoftware-bot systemfsoftware-bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

What

This replaces the constitution with the organization's shared CODING_STANDARDS.md and REVIEW.md, on the Compound Engineering plugin's model.

  • Removed: CONSTITUTION.md, ENFORCEMENT.md, the YAML corpus validator (scripts/), and CONCEPTS.md. That vocabulary only described the corpus.

  • CODING_STANDARDS.md leads with Impossible states first:

    • make the wrong state unconstructable;
    • the compiler error is the evidence;
    • no integration, end-to-end or microVM test for an invariant a type can hold.

    After that come Tests, Shape the code, Secrets and public repositories, Checks and gates (the part of ENFORCEMENT.md that still earns its place), and Finish. Every rule has an SF-<family>-<n> ID and a Why: line. A former-ID table maps every CONST-* ID to its new home.

  • REVIEW.md holds the shared review policy: the finding bar (including that a finding asking for a test names the behaviour no type can hold), accretion, severities, the declared-breach waiver, limits, what not to report, and evidence.

  • Consumption: each repository keeps the subtree at repos/constitution/ and includes both files from its root REVIEW.md. The README says how.

  • Check: the required check job now runs deno task check (deno fmt --check over the markdown), the same task as the pre-commit hook. The validator it ran graded the YAML corpus, which this change deletes. This PR changes that grader because the grader is the subject of the change. The markdown formatting also reflowed the three solution notes. docs/plans/ is history and stays as it was.

Evidence

  • deno task check → Checked 9 files, exit 0.
  • grep for private names over every changed file: none.

Revision after red-team and Gemini round 3

The red-team's diff-level proposal is applied. The owner delegated the two open calls, and the rulings are applied verbatim:

  • SF-IMP-4 commits one tstyche assertion that the refused state is refused, in the package's test-types/, run by typecheck and never by tests. It imports a published type by package name and an internal one by a relative path into src/; no export, subpath or imports map is added for it (option B, ruled by Fable and Gemini). SF-TST-1 exempts these assertions. SF-IMP-1's ban on suppression comments has no exception. REVIEW.md gains an "Always check" list of P1 limits on the assertions.
  • Copy: the four agent-facing files are rewritten in plain, direct English, then tightened back under their earlier word counts (CODING_STANDARDS.md 1,476 words, REVIEW.md 698 after the ordered checks, GRADERS.md 166, WORKING.md 167). README.md is rewritten for human readers and follows the README skill.
  • P0 waiver: only an approving review from the owner's own account on the current head waives a P0. A bypass merge over a standing P0 is itself a P0.
  • SF-GATE-5: an owner-ordered grader change is its own PR, holding nothing else.

CODING_STANDARDS.md

  • Cut:
    • the Former IDs table (below);
    • SF-SHP-3, -4 and -6;
    • Why: lines that only restate their rule.
  • Merged:
    • SF-IMP-2 into SF-IMP-1;
    • SF-TST-3 into SF-TST-5;
    • SF-SHP-2 into SF-SHP-1.
  • Moved: SF-GATE-1, -3, -4 and -6 go to the new on-demand GRADERS.md.
  • Added: SF-SHP-9 (no shell beyond a wrapper) and "Maintaining this file". IDs are permanent: retired numbers leave gaps and are listed there.

WORKING.md (new): how agents work. It holds SF-WRK-1 to -5 and SF-FIN-1, which moved here from the standards. Every consumer imports it always-on; this restores what dropping CONST-W1 lost.

REVIEW.md

  • Moved or copied code: an issue it already had is not new, but a defect its new location creates is.
  • Blocking and waivers:
    • P1 blocks; naming is P3.
    • A breach of SF-IMP-3 is P1.
    • A declared breach of a standards rule falls to P2.
    • A runtime defect or a defective test cannot be declared away.
    • Only the owner's own approving review on the current head waives a P0.
  • Rounds: one round per head. A later round re-lists unresolved P0 and P1 findings, and every review ends with a verdict line.
  • Findings stay on the PR. No finding asks for a new check, guard or lint.

Gemini round 3 (High) fixes, all applied:

  • GRADERS.md is citable.
  • The PR's text and commit messages are reviewable for SF-SEC-1.
  • A removal's stale call sites can be flagged.
  • SF-GATE-5:
    • takes CI as evidence;
    • defines an operational timeout;
    • counts CODING_STANDARDS.md and REVIEW.md as graders.
  • Scope:
    • SF-IMP-1's untyped clause and SF-IMP-3 are narrowed;
    • SF-TST-5 deletes only defective assertions;
    • SF-SHP-8 covers reusable helpers;
    • SF-SHP-9 covers non-JS repositories.
  • Review mechanics:
    • Do-not-report covers only what CI ran.
    • A repository may rate its own rules lower.

Size (tokens estimated as characters ÷ 4)

File Before After
CODING_STANDARDS.md 1,757 words, ≈2.9k tokens 1,476 words, ≈2.3k tokens
REVIEW.md 617 words, ≈0.9k tokens 698 words, ≈1.1k tokens
GRADERS.md (on demand) — 166 words, ≈0.3k tokens
WORKING.md (always-on) — 167 words, ≈0.3k tokens

Former IDs

The retired CONSTITUTION.md laws map to these rules. Dated plans keep the old IDs.

Former Now
CONST-D1, CONST-B5, CONST-D4 SF-IMP-1
CONST-D2 SF-IMP-3
CONST-B1, B2, B3, B4, B6, P1, P2 SF-SHP-1
CONST-S1 SF-SHP-5
CONST-S4, CONST-S3 SF-SHP-7
CONST-T8, T9, T14, T15 SF-TST-1
CONST-T10 SF-TST-2
CONST-T3, CONST-T13 SF-TST-5
CONST-T12, CONST-P3 SF-GATE-4 (GRADERS.md)
CONST-E7, CONST-E9 SF-FIN-1 (WORKING.md), SF-GATE-5
CONST-W1 SF-WRK-1 (WORKING.md)
CONST-G3, G4, G5 REVIEW.md
CONST-N1, N2, N3, S2, D3, W2, W3, and any other retired

… REVIEW.md

CONSTITUTION.md, ENFORCEMENT.md, the YAML corpus validator and CONCEPTS.md are
removed. CODING_STANDARDS.md leads with 'Impossible states first' and carries
every law that still earns its place under SF-* IDs, with a former-ID table.
REVIEW.md holds the shared finding bar, severities and evidence rules.
@mergify

mergify Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

This pull request is merged.

…d WORKING.md split out

CODING_STANDARDS.md drops the Former IDs table (now in the PR body), SF-SHP-3,
-4 and -6, and restating Why lines; folds SF-IMP-2 into SF-IMP-1, SF-TST-3
into SF-TST-5 and SF-SHP-2 into SF-SHP-1; scopes SF-IMP-1 and -3; rewrites
SF-GATE-5 (CI evidence, operational timeouts, owner's quoted order) and
SF-SHP-8 (search org packages and skills first); adds SF-SHP-9 and a
Maintaining section. SF-GATE-1, -3, -4 and -6 move to an on-demand GRADERS.md.
WORKING.md holds how agents work (SF-WRK-1..5, SF-FIN-1) for consumers to
import always-on. REVIEW.md: moved code is judged by what its new place
creates, P1 blocks, P0 waived only by the owner's quoted order, one round per
head with a verdict line, findings stay on the PR, no finding asks for a check.
…review waives a P0; an owner-ordered grader change is its own PR
… and let SF-IMP-4 assertions import internal types by relative path

Gemini's plain-English pass, tightened under the pre-rewrite word counts, with
owner-ruled passages kept word for word. README is rewritten for human
readers per the write-readme-md skill. SF-IMP-4 (option B, ruled by Fable and
Gemini): the assertion lives in test-types/ and imports a published type by
package name or an internal one by a relative path into src/; no export,
subpath or imports map is added for it. SF-TST-1 exempts SF-IMP-4 assertions.
REVIEW.md checks for an export whose only importer is a .tst.ts file.
This was referenced Nov 23, 2026
@systemfsoftware-bot
systemfsoftware-bot merged commit b8fb277 into main Nov 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant