Skip to content

feat(code-review): pick the focus set by gate level - #512

Merged
dean0x merged 29 commits into
mainfrom
feat/474-code-review-lens-sets-per-level
Oct 15, 2026
Merged

dean0x merged 29 commits into
mainfrom
feat/474-code-review-lens-sets-per-level

Conversation

@dean0x

@dean0x dean0x commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

The /code-review command runs 11 to 20 lenses on every code diff, at every gate level. #472 added GATE_LEVEL. No command reads it yet. Epic #468 defined the lens sets for each level. This PR makes /code-review apply those sets.

Changes

  • Add the reference file code-review-levels.md. It has a table of lens classes by gate level. Each cell is a keep: list or a drop: list. Both kinds of list only remove lenses.
  • Dependencies rule: at standard, a code diff keeps the Dependencies focus only when a listed manifest changes. A code diff that changes a lockfile and no manifest drops it at standard. This is a founder decision, by design. At lean, a code diff never keeps the Dependencies focus. A lockfile-only diff keeps Dependencies at every level. A lockfile alone is not a manifest change. The manifest list is in code-review-levels.md. It has 22 names, and it includes go.work, *.csproj, Directory.*.props, Package.swift, Podfile, pubspec.yaml, build.sbt, mix.exs, deno.json and build.gradle*.
  • Add Step 1.2b. It runs once for each worktree and narrows REVIEW_FOCUS_LIST. It reads the reference only at the standard or lean level, through the sanctioned resolution line. It applies the row of each class and takes the union of the results. If the reference cannot be read, or a row is malformed, the step keeps the full sets and prints a message.
  • Security runs at every level and in every class. The compliance trigger does not change at any level. The command keeps it as one gated line.
  • Synthesize receives GATE_LEVEL and FOCUSES. The review summary has a **Gate level**: line. A planned focus with no report is marked (no report). The row for a missing security report applies in every review, not only when the planned focus list names security. A review with no security report never gets APPROVED. The Merge Rules now state that the first matching row applies. The row for a missing security report comes before both APPROVED rows.
  • Update the devflow gates help text, the README, the CLI reference, the commands doc and the CHANGELOG.
  • Condense the command text. Both code-review builds and the review reference are smaller. Lower these ceilings: code-review from 35,246 to 34,981; learning-off from 32,499 to 32,236; synthesize review reference from 3,940 to 3,805. Add a ceiling of 1,349 for the new level reference. No ceiling is raised. These sizes are measured on the branch after it merged main 04f0a26 (chore(commands): lower the command byte ceilings to the measured sizes after #472 #514). The code-review build is 34,974 bytes, and the learning-off build is 32,229 bytes. Each has 7 bytes of slack under its ceiling. The code-review ceilings did not change after the merge.
  • Cost: a standard or lean run reads the reference one time. After the command text cut, the net context cost is about 1.6 KB. A full run reads nothing.

Breaking Changes

There is no API change. These behavior changes apply:

  • After devflow init, the default standard level drops the TypeScript focus. It also drops the Dependencies focus on a code diff that changes no listed manifest, even when that diff changes a lockfile.
  • The lean level runs the security, testing and reliability focuses. It also runs compliance on its trigger. A lean tests-only diff drops the consistency focus.
  • devflow gates --set full keeps the current focus set.
  • Until devflow init runs, the installed command keeps the current focus set.
  • This is the no-floor interim. A personal lean level narrows the review, even where compliance is declared. The compliance focus still runs on its trigger. See feat(gates): decide whether the compliance lens sets a floor on GATE_LEVEL #488 for the compliance floor.

Reviewer Focus Areas

  1. Check the fail-closed wording. It covers every worktree and a malformed row. Check that it sits outside the learning arms.
  2. Check the keep: and drop: rules and the manifest list in the reference. Check that compliance appears only as a lens name.
  3. Check the guard changes in command-reference-move and claude-dir. The sanctioned resolution line is an accepted read root. Exactly one directory read is allowed.
  4. Check the byte cuts, the lowered ceilings and the new reference ceiling. Only the Step 1.1 tail carried behavior. This PR does not restore that tail as text. The class limit is now in the compliance sentence, "on a code diff, add compliance", and a guard checks that sentence. Confirm that no other cut text carried behavior. The complete cut list follows.
    • code-review.mds, Principles: "Clear ownership" and "Auto-discover worktrees".
    • code-review.mds, Step 0a item 3: "(the common case)". Step 0b: "of that worktree". Step 0c: "(parallel)". Step 0e-i item 5: "(valuable for Review agent cross-cycle awareness)".
    • code-review.mds, Phase 2: "(max 20 total per worktree)" on the agent-count line. The agent-overload reason on the multi-worktree line is replaced by "so Review spawns never pile up".
    • code-review.mds, Step 1.1: the --no-renames reason, which the Edge Cases "moved across classes" row restates, and the tail "they add no focus, and Step 1.2 applies to the code class only".
    • code-review.mds, compliance sentence: "to REVIEW_FOCUS_LIST for this worktree".
    • code-review.mds, Step 3a: "(wait for completion before 3b)". Phase 4: "In multi-worktree mode, report results per worktree."
    • code-review.mds, Edge Cases: the "Concurrent sessions" row. The Docs-only, Tests-only and Lockfile-only rows now read "Its Step 1.1 set, narrowed by level". Also cut: "(docs with tests, tests with a lockfile)", "(fail-safe): the 8 core focuses on the full diff", "The count is printed;", "of about 40 lines" and "the old and the new path".
    • code-review.mds, Architecture: "if FP ratio > 70%" on the Step 0e-ii line (the threshold stays in Step 0e-ii); the eight focus names on the Phase 2 code line; the line that lists consistency, regression, testing and reliability; "D7 marker-dedup" and "REVIEW_PUBLICATION" on the Step 3b line.
    • code-review.mds, Backwards Compatibility: the "Single worktree" bullet. The "Legacy flat layout" bullet is replaced by a "Gate level" bullet.
    • synthesize/review.md: the intro line "Synthesize outputs from multiple Review agents. Apply strict merge rules."; "for cross-referencing recurring vs new issues,"; the sentence on agreement between agents for a compliance and security overlap, which ends "is not corroboration"; "Every bucket is reported for resolution; the bucket decides only whether an issue blocks the merge"; "using Write tool"; "3. Confirm file written in final message"; "Brief descriptions only."
    • Resolve round 1 also cut "applied" and "planned" from the GATE_LEVEL and FOCUSES input wording in synthesize/review.md. Neither word is in the final diff.
    • Resolve round 1 also cut these words from code-review-levels.md: "full-level set" to "full set"; "the named focuses the set holds" to "the named focuses"; "removes the named focuses" to "removes them"; the file-name sentence to "A path matches by file name."; and "This file never adds it" from the compliance rule.
  5. Check that the simulator reads its rules from the reference. Check that the no-second-cycle collector is independent.
  6. Check the Step 1.2b heading. The diff-gating guard must stay green. A reduced-class run must reach the narrowing.
  7. Two QA guard gaps are fixed in resolve round 1. The Requires line of Step 1.2b now lists CHANGED_PATHS. The guard in tests/guards/code-review-levels.test.ts now checks that the missing-security row comes after the BLOCK MERGE row.

Testing

  • The targeted suites pass at the head. These are the levels guard, the diff-gating guard (no edit), reference-move, claude-dir, command-size, agent-references, numeric floors, install snapshot, language stamp, compliance prompts and injection, convergence, synthesize, the gates CLI, ambient, disposition and build-mds.
  • The local full suite ran under the machine lock. Its only failures were load timeouts in files that this PR does not touch. Each of those tests passes when it runs alone. CI gives the full-suite result.

Related Issues

Closes #474

Part of epic #468. Builds on #472. Related: #473 (same guard lines and goldens), #475 (Validate lint pack), #480 (later level reader), #488 (compliance floor).

Follow-up (founder decision, not this PR): #515 — the counts-only STUB review comment does not show the gate level.

#473 rebases after this PR merges. It then re-runs npm run test:golden:update -- install-snapshot, and updates the text that names #473 as a later reader of the level: src/cli/commands/gates.ts, README.md, docs/cli-reference.md and CHANGELOG.md.

Test Plan

  • TP-1 (AC-1) At level full every class and mixed combination gets exactly the full-level set and the reference is not read — method:ci [files: tests/guards/code-review-levels.test.ts, src/assets/commands/code-review.mds]
  • TP-2 (AC-1) The existing diff-gating guard passes with no edit on both compiled builds — method:ci [files: tests/guards/code-review-diff-gating.test.ts]
  • TP-3 (AC-1) The Step 1.1 reduced-set lines and the Step 1.2 trigger rows equal the independent copies of today's text — method:ci [files: tests/guards/code-review-levels.test.ts]
  • TP-4 (AC-2) Standard code diffs never hold typescript and keep dependencies only when a listed manifest changed, so a lockfile with code drops it — method:ci [files: tests/guards/code-review-levels.test.ts, src/assets/skills/agent-references/references/commands/code-review-levels.md]
  • TP-5 (AC-2) Known-bad probes: a standard code cell without typescript or without dependencies in its drop list is reported — method:ci [files: tests/guards/code-review-levels.test.ts]
  • TP-6 (AC-3) Lean code diffs hold only security, testing and reliability, plus compliance only when its trigger fired — method:ci [files: tests/guards/code-review-levels.test.ts, src/assets/skills/agent-references/references/commands/code-review-levels.md]
  • TP-7 (AC-4) Each reduced class matches the per-level table and lean tests-only is testing, reliability and security — method:ci [files: tests/guards/code-review-levels.test.ts]
  • TP-8 (AC-4) Known-bad probe: consistency added to the lean tests-only cell is reported — method:ci [files: tests/guards/code-review-levels.test.ts]
  • TP-9 (AC-5) Mixed non-code diffs run the union of the per-class sets with no cap, from the mixed rule read from the reference: five lenses for docs plus tests at lean, six for all three — method:ci [files: tests/guards/code-review-levels.test.ts]
  • TP-10 (AC-6) Compliance joins only code diffs under the full-level trigger at every level and never a reduced class — method:ci [files: tests/guards/code-review-levels.test.ts, tests/compliance-prompts.test.ts, tests/guards/compliance-injection.test.ts]
  • TP-11 (AC-6) The reference holds no compliance trigger, framework list, directive or spawn block, and a seeded one is reported — method:ci [files: tests/guards/code-review-levels.test.ts, src/assets/skills/agent-references/references/commands/code-review-levels.md]
  • TP-12 (AC-7) Security is in every set across the exported gate levels, every class and every mixed combination — method:ci [files: tests/guards/code-review-levels.test.ts, src/core/gate-level.ts]
  • TP-13 (AC-7) Known-bad probes: a lean cell without security and a command without the security sentence are each reported — method:ci [files: tests/guards/code-review-levels.test.ts]
  • TP-14 (AC-8) Every level set is a subset of the full-level set and a cell name outside the class set is reported — method:ci [files: tests/guards/code-review-levels.test.ts]
  • TP-15 (AC-8) Both compiled builds carry the sanctioned resolution line, the Read tool phrase, the union rule, the every-worktree fallback sentence and its message, outside learning arms — method:ci [files: tests/guards/code-review-levels.test.ts, src/assets/commands/code-review.mds]
  • TP-16 (AC-8) Known-bad probes: a pointer without the fallback sentence, or with a root form other than the sanctioned resolution line, is reported — method:ci [files: tests/guards/code-review-levels.test.ts]
  • TP-17 (AC-8) Manual run at standard with the installed level reference renamed prints the fallback message and spawns the full set — method:manual [files: src/assets/commands/code-review.mds]
  • TP-18 (AC-9) Step 0b Produces, Phase 1 Requires and Step 1.2 Requires list GATE_LEVEL and the level block ends Step 1.2 before Step 1.3 — method:ci [files: tests/guards/code-review-levels.test.ts, src/assets/commands/code-review.mds]
  • TP-19 (AC-9) The Edge Cases table says the full flag sets the diff range and never the gate level — method:ci [files: tests/guards/code-review-levels.test.ts]
  • TP-20 (AC-10) Step 0e-ii only warns and continues, both continue lines exist, and nothing restarts a phase or a cycle — method:ci [files: tests/guards/code-review-levels.test.ts, tests/review/convergence-detection.test.ts]
  • TP-21 (AC-10) Known-bad probes: continue changed to stop, a second-cycle sentence seeded into the reference, and a seeded resolve command start are each reported — method:ci [files: tests/guards/code-review-levels.test.ts]
  • TP-22 (AC-11) The Synthesize spawn passes GATE_LEVEL and FOCUSES and the summary template has a line that starts with the gate level prefix — method:ci [files: tests/guards/code-review-levels.test.ts, src/assets/skills/agent-references/references/synthesize/review.md, tests/commands/synthesize-base-dir.test.ts]
  • TP-23 (AC-11) The template marks a planned focus with no report, and a missing security report cannot give APPROVED — method:ci [files: tests/guards/code-review-levels.test.ts, src/assets/skills/agent-references/references/synthesize/review.md]
  • TP-24 (AC-11) Manual lean review of a sample branch shows the gate level line and three or four focuses in the summary — method:manual [files: src/assets/commands/code-review.mds]
  • TP-25 (AC-12) After a fresh build both code-review builds and the review mode reference fit their lowered ceilings — method:ci [files: tests/guards/command-size.test.ts, tests/guards/agent-references.test.ts, tests/fixtures/numeric-floors.json, tests/guards/numeric-floor-manifest.test.ts]
  • TP-26 (AC-12) Full suite passes under the shared heavy-tests lock after a fresh build — method:local [files: tests/**]
  • TP-27 (AC-13) The reference-move guard lists the new reference and the code-review host, and accepts the sanctioned resolution line as the read root — method:ci [files: tests/guards/command-reference-move.test.ts]
  • TP-28 (AC-13) The Claude-directory guard finds exactly one sanctioned resolution line and exactly one skills path, the level reference, in each code-review build — method:ci [files: tests/guards/claude-dir.test.ts]
  • TP-29 (AC-13) The three install goldens list the new reference file and the install snapshot test passes — method:ci [files: tests/fixtures/golden/install-snapshot-*.txt, tests/install-snapshot.test.ts]
  • TP-30 (AC-14) The stamp line stays single, the level block restates no language list, and the language-stamp tests pass with no edit — method:ci [files: tests/installer/language-stamp.test.ts, tests/installer/language-stamp-e2e.test.ts, tests/guards/code-review-levels.test.ts]
  • TP-31 (AC-15) The gates help text says code-review reads the level and no longer lists issue 474 as pending — method:ci [files: tests/gates-cli.test.ts, src/cli/commands/gates.ts]
  • TP-32 (AC-15) README, CLI reference, commands doc and CHANGELOG describe the level sets, the manifest rule, the default standard effect and the set full upgrade step — method:manual [files: README.md, docs/cli-reference.md, docs/commands.md, CHANGELOG.md]
  • TP-33 (AC-16) PR body states the no-floor interim with a pointer to issue 488 — method:manual [files: CHANGELOG.md]
  • TP-34 (AC-2) Manual standard review of a code diff that changes package.json spawns the dependencies focus — method:manual [files: src/assets/commands/code-review.mds]
  • TP-35 (AC-5) Manual lean review of a docs plus tests diff spawns five focuses — method:manual [files: src/assets/commands/code-review.mds]
  • TP-36 (AC-2) Known-bad probes: the manifest exception removed from the standard code cell, or Gemfile removed from the reference manifest list, is reported — method:ci [files: tests/guards/code-review-levels.test.ts]
  • TP-37 (AC-5) Known-bad probe: a reference mixed rule that applies each row in turn to one list is reported through the simulator — method:ci [files: tests/guards/code-review-levels.test.ts]
  • TP-38 (AC-13) Known-bad probes: a second sanctioned line in the stamp paragraph, a language skill Read, and the read moved out of the gate level block are each reported — method:ci [files: tests/guards/claude-dir.test.ts]
  • TP-39 (AC-12) The level reference fits its measured ceiling and a probe one byte under its size is reported — method:ci [files: tests/guards/agent-references.test.ts, tests/fixtures/numeric-floors.json, src/assets/skills/agent-references/references/commands/code-review-levels.md]

dean0x added 13 commits October 15, 2026 03:29
Cut sentences, tree labels and Edge Cases cells that repeat text stated
elsewhere in the command. No behaviour change. The cuts sit outside the
learning arms, so both builds shrink by the same amount.
/code-review now narrows its review focus list by GATE_LEVEL in a new
Step 1.2b, once per worktree and before the diff files are written.
- full keeps today's sets and reads nothing.
- standard drops typescript, and drops dependencies on a code diff unless
  a listed dependency manifest changed.
- lean keeps security, testing and reliability on a code diff, plus
  compliance on its own trigger.
- Security runs at every level and in every class.

A new reference, code-review-levels.md, holds the class-by-level table. The
command reads it only at standard or lean, once per run, through the
sanctioned resolution line. If the read fails, or a row is missing or
malformed, the full sets apply for every worktree of the run.

The guards accept the sanctioned resolution line as a read root, allow
exactly one directory read in the command, and a new test file checks the
reference, the block, the unchanged full-level text and the no-second-cycle
invariant with known-bad probes. The install goldens follow in the next
commit.
The three install-snapshot goldens gain one line each for the new level
reference under references/commands/. Regenerated with the golden update
script; nothing else changed.
/code-review passes GATE_LEVEL and the planned focus list to the
Synthesize agent. The review summary gains a "Gate level" line that lists
the focuses and marks each focus with no report. A planned security focus
with no report now gives CHANGES REQUESTED, so a lost security review
cannot read as a clean merge.

The summary reference gives back more bytes than it takes, and the new test
checks the spawn inputs, the template line, the merge row and the file set
the command writes.
Lower the code-review ceilings (learning-on and learning-off) and the
Synthesize mode reference ceiling to the sizes measured after a fresh
build. No ceiling rises.

Add a ceiling row for the new level reference. /code-review reads it once
per run on the default path, so it gets its own measured cap and a probe
that reports a file one byte over.
The gates help no longer says that no command reads the level. It now says
that /code-review reads it and that standard and lean run fewer review
focuses. The constant is renamed to match, and the CLI test checks the new
wording.
Describe the level sets in the README, the CLI reference, the commands
guide and the CHANGELOG. State the manifest rule for the Dependencies
focus, that a lockfile alone does not keep it, that Security runs at every
level, and that --full sets the diff range and never the level.

The upgrade notes tell a user with no level that the default is now
standard and that "devflow gates --set full" keeps today's set. The known
limits note that a personal lean level narrows the review even where
compliance is declared, with the compliance focus still running on its
trigger.
- docs/cli-reference.md: scope the lean set to a code diff, name the Compliance trigger and the reduced classes, so the CLI reference no longer says a docs-only lean run gets Security, Testing and Reliability.
- tests/guards/code-review-levels.test.ts: the Gate level order check now reports a template that lost its Date or Merge Recommendation line; known-bad probes now cover every block item, both read-paragraph phrases, the root-after-path order, the stamp order, the CLAUDE_CONFIG_DIR count, the Step 1.2b heading, both Requires lines, the Phase 2 spawn line and the level in the Git spawn.
…line

Step 1.2b gets its Produces/Requires annotation. The compliance gate
sentence returns as one gated line naming COMPLIANCE_ACTIVE, so the
disposition table and the tree agree again. The added bytes are paid by
two edge-case and principle cuts; both size ceilings are lowered to the
new measured sizes.

Task: feat/474-code-review-lens-sets-per-level
The review Merge Rules had no precedence, so "No blocking issues" and
"Only MEDIUM in blocking" matched even when a planned security focus had
no report. The table now says the first matching row applies and the
security row sits before both APPROVED rows. Step 8 defers to the table.

The summary guard checks that no APPROVED row precedes the security row
and that the precedence sentence exists, with known-bad probes for both.
The mode reference ceiling drops to the new size.
@dean0x

dean0x commented Oct 15, 2026

Copy link
Copy Markdown
Owner Author

Code Review — Cycle 1

Full summary withheld (public repository).

Review depth: light review. Focuses that ran: security, regression, testing, consistency.

Category CRITICAL HIGH MEDIUM LOW Total
Blocking 0 0 7 1 8
Should Fix - 0 3 - 3
Pre-existing - - 1 0 1

Full report: .devflow/docs/reviews/feat-474-code-review-lens-sets-per-level/2026-10-15_0510/review-summary.md (not committed; ask the author)

Posted by devflow · cycle 1

dean0x added a commit that referenced this pull request Oct 15, 2026
…s after #472 (#514)

## Summary

PR #508 cut 76 bytes from each command that carries the settings line.
It did not change the command byte ceilings. This PR lowers the ceilings
to the measured sizes on main (8875e09). The slack is now 0 for each
changed row.

Only ceiling values change, in `tests/guards/command-size.test.ts` and
`tests/fixtures/numeric-floors.json`. The `description` of each changed
fixture row now states the new measured size. No prompt text changes.

## Ceilings

| Command | On: old → new | Off: old → new |
|---|---:|---:|
| bug-analysis | 25065 → 24966 | 21077 → 21056 |
| debug | 19967 → 19885 | 17046 → 16966 |
| dynamic-plan | 36994 → 36880 | 32557 → 32530 |
| dynamic-profile | 16487 → 16389 | 12684 → 12673 |
| dynamic-tickets | 41450 → 41336 | 37156 → 37129 |
| explore | 12944 → 12866 | 10040 → 9964 |
| implement | 49883 → 49807 | 47029 → 46953 |
| plan | 38096 → 38018 | 35126 → 35050 |
| release | 22903 → 22825 | 19609 (no change, already exact) |
| research | 14972 → 14894 | 10838 (no change, already exact) |
| resolve | 52422 → 52287 | 49220 → 49087 |
| self-review | 15889 → 15691 | 12801 → 12619 |

Sizes are in bytes.

### Not changed here

- `code-review` (on and off): open PR #512 changes this command and its
ceilings.
- `dynamic-build` (on and off): open PR #505 changes this command and
its ceilings.

Those PRs set their own ceilings. Open PR #513 changes no command and no
ceiling.

## Evidence

- `npm run build` on a clean tree: exit 0, 33 compiled, 0 errors, 0
warnings.
- The measured sizes equal the slack table in the #508 PR body. There
are no differences.
- `npx vitest run tests/guards/command-size.test.ts
tests/guards/numeric-floor-manifest.test.ts`: 2 files, 16 tests pass.
- `npx tsc --noEmit`: exit 0.
- CI: see the checks on this PR.

## Breaking Changes

None. The change is in test constants only.
dean0x added 13 commits October 15, 2026 05:44
…b data flow

- Compliance sentence in Step 1.2 names the `code` class again, so a
  compliance-active docs-only or tests-only diff cannot spawn the focus
  at `full` or on the fail-closed path.
- Step 1.2 Produces and Requires no longer claim the level work. Step 1.2b
  declares REVIEW_FOCUS_LIST, DIFF_CLASS, CHANGED_PATHS and GATE_LEVEL, and
  produces GATE_LEVEL. Phase 3 Requires lists GATE_LEVEL and
  REVIEW_FOCUS_LIST. Step 0b title names the gate level.
- Step 1.2 says the code list starts with the eight core focuses and that
  Step 1.2b may narrow them, instead of calling them unconditional.
- Guard: the compliance class limit, a Step 1.2b slice with its own
  Produces and Requires checks, the Phase 3 and Step 0b checks and the core
  sentence, each with a known-bad probe.
- Cuts that pay for the added bytes (no behaviour change): the repeated
  "(max 20 per worktree)" in the agent count line, "(wait for completion
  before 3b)" in Step 3a, "of that worktree" in Step 0b, "(parallel)" in
  Step 0c, "(the common case)" in Step 0a and the rationale in Step 0e-i
  item 5.

Task: resolve-512-A
… review

The Merge Rules row for a missing security report fired only for a
"planned" security focus. The planned list is the optional FOCUSES
input, which the same level narrowing produces, so a review whose list
lacked security could still give APPROVED. The row is now unconditional
in review mode.

- Spell the Merge Recommendation slot with the four Merge Rules outcomes.
- Restore the "brief" limit on the suggestions guidance.
- Trim two duplicate phrases to stay inside the byte ceiling.
- Guard: evaluate the Merge Rules for FOCUSES lists with and without
  security, require the security row below the BLOCK MERGE row, pin the
  slot spelling and the suggestions limit, each with a known-bad probe.
- CHANGELOG: describe the unconditional row.
The review reference fell from 3,813 to 3,805 bytes. The ceiling follows
it down so the saved bytes cannot be spent again.
…reference

At the standard level a code diff keeps the Dependencies focus only when a
listed manifest changes. The list missed real manifests, so a change to
go.work, a .NET project file, Package.swift, Podfile, pubspec.yaml,
build.sbt, mix.exs or deno.json silently dropped the focus. The list now
holds them, with glob forms for Gradle build files and .NET props files.
A lockfile alone is still not a manifest change.

The reference keeps its byte ceiling: the list is longer, and the intro,
the file-name sentence and the compliance rule are shorter. The guard
checks each new name, and each has a known-bad probe.
The guard did not pin four load-bearing sentences. A change from "for every
class" to "for the code class only" in the gate-level step, or a change to
"full keeps it and reads nothing", passed the guard. The same held for the
file-name matching sentence and the lockfile sentence of the Manifests line
in the level reference. The guard now pins all four, and each has a
known-bad probe.
… guard

Seven failure branches of the guard had no known-bad probe: a missing or
extra class row, a malformed cell, a name outside the focus vocabulary, a
drop cell that drops security, a name outside the class's full set, an
exception on a cell other than code/standard, and the simulator check for a
focus outside the full set. Each now has a seed or a probe run that proves
it fires. The same pass probes the compliance check on a non-code class, the
lockfile check, and the two rule-1 manifest checks.
The level reference is 1,349 bytes after the manifest list grew and the
prose around it shrank. The ceiling follows it down so the saved bytes
cannot be spent again.
The level guard copied sectionBetween and tableRows byte for byte, the
claude-dir guard held a third sectionBetween, and three guards each held
the sanctioned resolution line. Move all three to tests/helpers.ts and
import them. The diff-gating guard keeps its own copy.

Test counts are unchanged.
… check

The check for a restated language list matched parts of words, so a
sentence with "untrusted" (rust) or "javascript" (java) tripped it. Match
whole names, with backticked `go` only. A new test proves that lookalike
words pass and that every real name, plain or in backticks, is reported.
… row

Step 1.2b sets the whole run to full when a class row is missing or a cell
is malformed. The simulator kept only that class at its full set. It now
returns every class at its full set. A new test proves it for a missing
row, a malformed cell and a missing row of the only class.
At the default standard gate level the TypeScript focus does not run.
The feature blurb named it without that condition. Add a sentence that
the gate level narrows the conditional focuses.
The Conditional Activation table says Always and names file triggers
for focuses that /code-review now narrows by gate level. Add one line
that points to the gate level and its Step 1.2b.
…ead guard

The budget KB lacked the level reference ceiling and described the
reference-move guard for /implement and one read root only. It now
covers the /code-review host, both read roots and the default-path
read. The learning KB said command references hold rare branches
only; the /code-review level table is read on every non-full run.
Merge origin/main (04f0a26, #514) into
feat/474-code-review-lens-sets-per-level.

#514 lowers the command byte ceilings of the other commands in
numeric-floors.json and tests/guards/command-size.test.ts. Those rows
take main's values. The code-review command ceilings keep this branch's
values (34,981 learning-on, 32,236 learning-off) because #514 did not
change them.
Each known-bad probe re-ran the whole scenario grid, and every manifest check
rebuilt its regular expression. Build the grid once, compile each manifest
pattern once, and share the oracle's full and expected sets across probes.
No check and no probe changes; the slowest test drops from about 2.9 s to
about 0.6 s locally.
@dean0x

dean0x commented Oct 15, 2026

Copy link
Copy Markdown
Owner Author

Resolution Summary

Full summary withheld (public repository).

Metric Value
Total Issues 24
Fixed 19
False Positive 1
By Design 2
Deferred 0
Blocked 0
Escalated 1
Duplicates Collapsed 1

Full report: .devflow/docs/reviews/feat-474-code-review-lens-sets-per-level/2026-10-15_0510/resolution-summary.md (not committed; ask the author)
Posted by devflow

@dean0x

dean0x commented Oct 15, 2026

Copy link
Copy Markdown
Owner Author

Test Plan Evidence — 194406c

Verified 34/39: VERIFIED-CI 32, ATTESTED-LOCAL 2, UNVERIFIED 5, STALE 0, FAILED 0, INDETERMINATE 0

  • TP-1 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:df38c9e6c3c7
  • TP-2 VERIFIED-CI sha:d0efa9f661c69e5a01030e1dcd8254badac23172 out:PASS run:38668327015/1 exit:0 h:fa0cdf5d50ae
  • TP-3 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:72697bc97bf8
  • TP-4 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:50cb19d5ed17
  • TP-5 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:ab0f206cb56c
  • TP-6 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:73ffafbee651
  • TP-7 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:3131cdfb0950
  • TP-8 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:317e68d57a2d
  • TP-9 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:ec4adb15039f
  • TP-10 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:7c4953ffbee5
  • TP-11 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:be0679c4d1d1
  • TP-12 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:fc69f2418992
  • TP-13 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:3059a8098ea0
  • TP-14 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:410fce112d52
  • TP-15 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:45abeb6b213c
  • TP-16 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:f564d187d1bb
  • TP-17 UNVERIFIED sha:194406c2c23480265877cd2b764485b2f87c68e3 out:SKIP h:d7771bbcb089
  • TP-18 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:5fb8a6a9880a
  • TP-19 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:6010a7a71736
  • TP-20 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:f4d4ee15405b
  • TP-21 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:fa8270aba088
  • TP-22 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:6d61b582c5e9
  • TP-23 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:85392ce16b48
  • TP-24 UNVERIFIED sha:194406c2c23480265877cd2b764485b2f87c68e3 out:SKIP h:99e64b79781a
  • TP-25 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:c1c4938b1f0f
  • TP-26 UNVERIFIED sha:d0efa9f661c69e5a01030e1dcd8254badac23172 out:SKIP h:76d336d86b56
  • TP-27 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:236528b1ac9c
  • TP-28 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:9c665ae72f43
  • TP-29 VERIFIED-CI sha:d0efa9f661c69e5a01030e1dcd8254badac23172 out:PASS run:38668327015/1 exit:0 h:8aee3eba0401
  • TP-30 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:9109f53ef494
  • TP-31 VERIFIED-CI sha:d0efa9f661c69e5a01030e1dcd8254badac23172 out:PASS run:38668327015/1 exit:0 h:5a5e64a01a64
  • TP-32 ATTESTED-LOCAL sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS h:dac1fe1a723c
  • TP-33 ATTESTED-LOCAL sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS h:bf9ec9d90177
  • TP-34 UNVERIFIED sha:194406c2c23480265877cd2b764485b2f87c68e3 out:SKIP h:872e7ca774f3
  • TP-35 UNVERIFIED sha:194406c2c23480265877cd2b764485b2f87c68e3 out:SKIP h:ab0a9c37e08e
  • TP-36 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:1b0cec4e6dcd
  • TP-37 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:24a0ddbb6d9f
  • TP-38 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:a4577f1a46ac
  • TP-39 VERIFIED-CI sha:194406c2c23480265877cd2b764485b2f87c68e3 out:PASS run:38676520318/1 exit:0 h:ed6bad30fafd

@dean0x
dean0x merged commit 7088639 into main Oct 15, 2026
3 checks passed
@dean0x
dean0x deleted the feat/474-code-review-lens-sets-per-level branch October 15, 2026 03:45
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.

feat(gates): /code-review lens sets per level

1 participant