Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Ownership of the verification surface (principle 09). These paths decide what
# the repository checks and how, so changing one is authorizing a change to the
# rules themselves. Pairing this with a branch ruleset that requires Code Owner
# review makes the authorization real: an agent can rewrite the code freely, but
# not weaken or delete a check to get a change through.
# rules themselves. With one maintainer, no review is required (GitHub does not
# count an author's own approval): this file declares the surface, the branch
# ruleset requires a pull request and the CI check, and the maintainer's merge is
# the authorization.
/tests/ @sergioazoc
/.oxlintrc.json @sergioazoc
/.oxfmtrc.json @sergioazoc
Expand Down
10 changes: 6 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,12 @@ the verification surface (`tests/`, the lint and format config, `vitest.config.t
`.claude/`, `.claude-plugin/`) as owned; `REVIEW.md` states the review rules an agent or a person
applies on every change; and `.claude/settings.json` denies the agent editing that surface (leaving
`tests/` writable so tests can be added, with deletion caught by the test above), so a person edits
the rest by hand. The external half is a branch ruleset on `main` that requires a pull request,
the `ci` check, and Code Owner review, and blocks force pushes and deletions. Create or verify it with
`gh api repos/sergioazoc/context-architecture/rulesets`; it is the one part of this that lives in the
GitHub settings, not the tree.
the rest by hand. The external half is a branch ruleset on `main` that requires a pull request and
the `ci` check, and blocks force pushes and deletions. It requires no approval: the agent opens pull
requests with the one maintainer's account, and GitHub never counts an author's own approval. The
maintainer's merge is the authorization; against the agent, the edit-time deny rules are what act.
Create or verify it with `gh api repos/sergioazoc/context-architecture/rulesets`; it is the one part
that lives in GitHub settings, not the tree.

Principle 04 (legibility at every zoom level) is bound by the `complexity`, `max-depth`, `max-params`,
and `max-lines-per-function` rules in `.oxlintrc.json`, kept at `error` and pinned by
Expand Down
3 changes: 2 additions & 1 deletion REVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ important any of the following, and require the fix in the same change.
- A new claim left loose: a source of truth, an invariant, a convention, or a boundary added without
the mechanism that fails when it stops being true.
- The verification surface weakened: a lint rule dropped below `error`, a CI step removed, a test
deleted, or a deny rule loosened, without the Code Owner's approval (principle 09).
deleted, or a deny rule loosened, unless the pull request states it is intended (principle 09).
The maintainer's merge is the only authorization, so the intent must be on the record.
- EN and ES out of parity, or an em dash, an emoji, or marketing copy, against the house rules in the
root `AGENTS.md`.
4 changes: 2 additions & 2 deletions tests/verification-surface.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ describe('the verification surface is itself bound (principle 09)', () => {

// The authorization principle 09 names is declared in the repo: CODEOWNERS marks
// the verification surface, and the vitest config keeps collecting every test so a
// deleted test file is not silently uncovered. A branch ruleset that requires Code
// Owner review and the CI check is the external half (see the root AGENTS.md).
// deleted test file is not silently uncovered. A branch ruleset that requires a
// pull request and the CI check is the external half (see the root AGENTS.md).
describe('the authorization is declared (principle 09)', () => {
it('CODEOWNERS covers the verification surface', () => {
const owners = read('.github/CODEOWNERS')
Expand Down
Loading