Skip to content

docs: core principles, opinionated about process, agnostic about stack (#5) - #16

Merged
SamuelDenani merged 28 commits into
mainfrom
feat/rfc-5-core-principles
Oct 8, 2026
Merged

SamuelDenani merged 28 commits into
mainfrom
feat/rfc-5-core-principles

Conversation

@SamuelDenani

@SamuelDenani SamuelDenani commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Writes down the boundary that decides what belongs in loopwright's core and
what belongs behind a contract, so it stops being re-argued in every design
session. The document is descriptive: no skill consults it, no gate checks
it, no RFC is required to carry a classification line.

Closes #5.

Sub-issues

All three are merged and closed. This PR is the one that lands the RFC on
main.

Why this exists

Three open RFCs already cite this boundary textually, before it existed:

They do not need the document to enforce anything. They need it to exist and to
name things, so they can cite it.

What #11 delivered

docs/loopwright/principles.md, 194 lines:

  • P1–P12, each with the assertion, a rejects: line naming one concrete
    change it refuses, and a pointer to the file that enforces it. P6's pointer
    is empty on purpose
    — nothing in .loopwright/scripts/ or .claude/
    enforces mediation today, and the doc's own rule makes that empty line a
    finding rather than an omission.
  • T1–T8, each a territory with its seam and its default. T4 and T6 carry no
    seam; T5 is the one territory whose contract this RFC resolves, as four named
    capabilities.
  • The classification rule and an Amendments section with stable ids.

Known gaps carried forward

  1. T5's "exactly four capabilities" closure claim is false. The loop also
    requires host-scheduled re-invocation (/loop) and a native task list
    (TaskCreate). Adding a capability is a core change by the doc's own rule,
    so it belongs in an amendment to RFC: Core principles, opinionated about process, agnostic about stack #5 rather than in Task: Write docs/loopwright/principles.md #11.
  2. .claude/agents/reviewer.md:4 grants Bash, which is write-capable, so
    P10's own enforcer can commit over the diff it reviews. The three sibling
    reviewers carry Read, Grep, Glob only.
  3. audit.high is at 2 — brace-expansion and js-yaml, both with fixes
    available upstream. No audit.ignore entry was added, since CLAUDE.md
    forbids ignoring an advisory that has a fix.
  4. RFC RFC: Core principles, opinionated about process, agnostic about stack #5's body still carries two wording defects the doc deliberately did
    not reproduce: the claim that T7 works on a non-JS host because the engine is
    Node (@changesets/cli assumes a package.json), and the swap rule stated
    without T6's exception.

For #12

P1 admits no exception, but docs/loopwright/loop-harness.md:70-74 documents
one — "except the grill phase itself, whose task spine and drafts are
session-scoped, so a crashed grill restarts". #12 replaces that rule with a
reference to P1, so it must decide where the exception lives: mechanics that
stay, or a P1 violation.

🤖 Generated with Claude Code

How #12 landed

#12 was refused twice by the auto-mode permission classifier
([Instruction Poisoning]) — once as a sed deletion, once as an additive-only
script. The call is defensible: an agent editing the file that describes the
constraints agents operate under is, without project context, indistinguishable
from an agent stripping its own guardrails. The edit is de-duplication — all
three claims live in principles.md, and neither CLAUDE.md's "Do not do
these" list nor quality-gate.mjs is touched, so the net constraint on any
future agent is unchanged.

It landed after the user authorised it explicitly, applied through the dedicated
edit tool rather than a shell script. Worth recording: a later read-only Bash
command against the same file was still refused, so the deciding variable looks
like the tool, not the authorisation — a declared string-for-string edit reads
differently to the classifier than an opaque script.

#12 had no local branch review. Generating its diff for a reviewer was
itself refused, and the refusal covers pursuing the same read through another
tool or a sub-agent. Its fresh-context read is the Claude review on #18, which
came back clean, plus a per-check verification against its spec before the
commit. #11 and #17 each had a full local review in addition; #18 did not.

SamuelDenani and others added 15 commits October 5, 2026 19:55
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…le (#11)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…rding (#11)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ption (#11)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Brings in the platform-dependent test fix from #15 so this PR's gate can run
against a green base.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
docs: write docs/loopwright/principles.md (#11)
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

✅ Quality gate passed

commit cbb7489 · baseline ece7656 · 2 warning(s) · 6 improvement(s) 📈

⚠️ 2 warning(s) — not blocking
Check Baseline Now Verdict
⚠️ TypeScript errors — n/a collector not configured — see docs/loopwright/quality-gate.md
⚠️ High advisories 0 2 regressed 2 (tolerance 0)

High advisories

  • brace-expansion — high: brace-expansion: Quadratic-time expansion of the {a},b} rewrite causes CPU denial of service · fix available — upgrade it
  • js-yaml — high: js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources · fix available — upgrade it
📊 All metrics
Check Baseline Now Verdict
✅ Failing tests 0 0 holding
✅ Failing test suites 0 0 holding
⚠️ TypeScript errors — n/a collector not configured — see docs/loopwright/quality-gate.md
✅ Lint errors 0 0 holding
✅ Lint warnings 0 0 holding
✅ Critical advisories 0 0 holding
⚠️ High advisories 0 2 regressed 2 (tolerance 0)
✅ Suppressed advisories 0 0 holding
📈 Line coverage 84.67% 85.01% improved 0.34%
📈 Branch coverage 78.93% 79.44% improved 0.51%
📈 Function coverage 89.65% 89.71% improved 0.06%
📈 Statement coverage 85.01% 85.41% improved 0.40%
📈 Duplicated code 0.90% 0.88% improved 0.02%
✅ Highest function complexity 14 14 holding
📈 Average function complexity 1.81 1.80 improved 0.01
✅ Oversized files 0 0 holding
✅ Skipped tests 0 0 holding
✅ Focused tests (.only) 0 0 holding
✅ Tests with no assertion 0 0 holding
✅ Coverage-ignore hints 1 1 holding
✅ Type suppressions (@ts-ignore etc.) 2 2 holding
✅ Inline lint suppressions 2 2 holding
✅ Empty catch blocks 0 0 holding

📈 This PR improves 6 metric(s). Run node .loopwright/scripts/quality-gate.mjs --update-baseline and commit .loopwright/baseline.json to lock the gain in.


Generated by .loopwright/scripts/quality-gate.mjs · reproduce locally with node .loopwright/scripts/run-report.mjs --all && node .loopwright/scripts/quality-gate.mjs · full reports are in the workflow artifacts.

SamuelDenani and others added 13 commits October 7, 2026 19:19
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…les doc (#13)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ries (#13)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…13)

The preamble said "The engine that enforces them lives in
`.loopwright/scripts/`", attributing enforcement of all twelve opinions to
that directory one line after citing the doc that denies it:
`docs/loopwright/principles.md:175-176` states the engine has zero coupling
to Claude, agents, skills or sessions. Six of the twelve `enforced by:`
pointers live under `.claude/`, so an agent following this line to find what
enforces test-first would find nothing there.

"Its engine lives in" drops the false attribution and also resolves the
sentence's double "them" (the opinions, then the tests).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The old lead's "a CI quality gate ... plus the loop that feeds it" was its
only statement that the product has two halves, and roughly half the README
is about the loop half. Dropping it left `README.md:131` ("The gate is the
enforcement half. The other half is how work reaches it:") introducing that
duality cold.

Sentence 2 now carries the category fact, so sentence 1 stays the opinion and
the lead still carries the committed baseline, the earned-vs-bought question,
and the verdict as a comment an agent can act on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ntity

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The three rules that are core opinions now live in principles.md, so stating
them here too made two sources of truth for one rule. Replaced in place by a
reference: the section is renamed to Mechanics, a new Opinions section names
P1, P2 and P8 with the question each settles, and the opening paragraph points
at the doc. The grill-phase fact that was an exception to P1 is re-homed as a
descriptive mechanic. The Flow terminal drops the actor, since P8 owns it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@SamuelDenani
SamuelDenani marked this pull request as ready for review October 8, 2026 14:51
@claude

claude Bot commented Oct 8, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@SamuelDenani
SamuelDenani merged commit 6943726 into main Oct 8, 2026
3 of 4 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.

RFC: Core principles, opinionated about process, agnostic about stack

1 participant