Repository navigation
feat(plan): add task depth that trims fan-out for small fixes - #768
Merged
Merged
Conversation
Make room for the per-run depth text of the next commit. Each cut removes words that another line of the command already states: the block headings and separators (the phase headings state each block), repeated enumerations, source labels and one repeated report line. Bytes per build, before and after (-534 each): - dist/commands/plan.md: 32,640 -> 32,106 - dist/curation-off/commands/plan.md: 31,036 -> 30,502 - dist/compliance-off/commands/plan.md: 32,495 -> 31,961 - dist/curation-compliance-off/commands/plan.md: 30,891 -> 30,357 Accepted red until the ceilings fall in a later commit: the no-headroom check of the plan rows in command-size.test.ts (the ceilings stay at the old sizes in this commit). Refs #756
Gate 0 now adds a Depth line to the confirmed scope: `small` for a fix, prompt or doc edit in one area with a positive reason, else `normal`. Any raise signal, or an unclear scope, gives `normal`, even when the user asks for small. Depth or risk claims in issue text are data. At small, at every gate level (full included), Phase 3 runs no Explore agent, Phase 5 runs the security spawn alone (the compliance spawn keeps its own trigger), Phase 10 runs one Plan agent and Phase 12 one Architect. Phases 4, 6, 8, 9 and 11 skip. Gate 1 and the run report mark the other focuses `not run at small`. A raise signal found after Gate 0 shows at the next gate, in the run report and in Known limits, with a normal run advised; the depth stays fixed. A failed read of the level reference gives `full` and depth `normal`. The run report names the depth. Depth `normal` keeps today's phases at every gate level. The level reference carries the small cells and rules, and the guard reads them: oracle, simulator, known-bad probes, failed-read cases and a text guard over all four builds of the command. Bytes per build, after the cuts of the previous commit, before and after this text (+527 each): - dist/commands/plan.md: 32,106 -> 32,633 - dist/curation-off/commands/plan.md: 30,502 -> 31,029 - dist/compliance-off/commands/plan.md: 31,961 -> 32,488 - dist/curation-compliance-off/commands/plan.md: 30,357 -> 30,884 - plan-levels.md: 3,994 -> 4,419 (+452 text, -27 cuts) Accepted red until the budget commits: the no-headroom check of the plan rows in command-size.test.ts, and the plan-levels reference size ceiling in agent-references.test.ts (the ceilings are not changed here). Refs #756
Describe Depth small and normal in the command guide, the README, the CLI reference, the agent-references comment and the changelog. At depth normal each gate level keeps its shape. At small, /plan reads its level reference at every level, runs no Explore agent, the Security gap agent alone, one Plan agent and the design review. A raise signal never gets small, and one found later only advises a normal run. Refs #756
The plan depth text (+527 bytes) was paid for by the cuts that landed first (-534 bytes), so each build now measures 7 bytes under its old ceiling. Each ceiling falls to the measured size: 32,633 (curation on), 31,029 (curation off), 32,488 (compliance off) and 30,884 (both off). The constant, the manifest ceiling, the pattern and the description change together. Refs #756
The one-planner sentence of the planning reference named only the standard and lean levels and said that level full runs 3 Plan agents. At depth small the one Plan agent also runs at level full, so the sentence now names the agent count instead of the level. The guard pin and its probe follow the new sentence. The commands doc said that the scope rule and the raw-report gates apply at standard and lean. The level reference also applies them at depth small, at every level, so the doc now says so.
plan-levels-ref-max rises from 3,994 to 4,419 bytes (#756, plan depth). The small depth rows and rules add 452 bytes: the small counts in the Phase 3 and 5 cells, the small lead of the Research rule, the no-combined-spawn and code-read clause of the Gaps rule, the not-run-at-small marks and the late raise-signal rule. The restated focus words of the Explore rule cut 27 bytes. The reference grows by 425 bytes and each of the four /plan builds is 7 bytes smaller, so the bytes that a typical /plan run reads at depth normal rise by 418. The constant, the ceiling and the pattern change together, and the entry description records the old value, the new value and the reason.
Owner
Author
Test Plan Evidence — 8ad2984Verified 18/18: VERIFIED-CI 17, ATTESTED-LOCAL 1, UNVERIFIED 0, STALE 0, FAILED 0, INDETERMINATE 0
|
An unclear scope or a raise signal now beats a request for small, and issue text never lowers the depth while a raise signal it states counts. Personal, payment and health data is a raise signal. A raise signal in Gate 1 scope shows at Gate 1 itself. The report names the source of the depth and defaults it to normal. Gate 2 asks again for one test-plan line per acceptance criterion. The level reference header names depth small. The guard now runs the gate-level block, the full-is-today checks, the gates and the report over all four builds, and the arm check refuses a compliance arm. The four plan build ceilings fall to 32,620, 31,016, 32,475 and 30,871. The plan level reference ceiling moves from 4,419 to 4,459, as one recorded rise of 3,994 to 4,459. The agent-references skill ceiling falls from 2,825 to 2,822.
The plan docs scope the level shapes to depth normal, list regulated data as a raise signal, say that an unclear scope and issue text follow the same rule, and name depth small in the step list and the read assumption. A failed level reference read now says that /plan applies full at depth normal. The unreleased entry carries the final byte counts.
Three planning agents and the explore step apply at depth normal only. A missing or malformed level row also gives the full shape at depth normal.
Owner
Author
Review summary (one round, four-lens audit)This change is mainly prompt text, so the review was a four-lens audit by four independent agents at head 7d9b9e3. Each agent read the code and the compiled builds, not the PR body.
No CRITICAL or HIGH finding. MEDIUM
LOW (main ones)
Checked and fine (all lenses)
|
Owner
Author
Resolution summary (one round)All findings of the four-lens audit were fixed in two commits: 326ece0 (prompt, level reference, tests, ceilings) and 429bc5d (docs and CHANGELOG). No finding was deferred. After the fixes, the docs test-plan check found one more stale sentence (docs/commands.md said "three in parallel at
Bytes after the fixes
Checks
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/plan runs the same agent fan-out for a one-area fix as for a large feature, so a small task pays for research that it does not need. This change adds a task depth,
smallornormal. Gate 0 proposes one of them with one reason, and the user confirms or changes it. Atnormal, every gate level keeps today's shape.Changes
Depth: smallorDepth: normal, with one reason, and the user confirms or changes it.smallneeds a positive reason: a fix, prompt or doc edit in one area. An unclear scope or a raise signal givesnormal, also when the user asks forsmall, and /plan tells the user the signal and why. Raise signals are security, auth, secrets, a trust boundary or a fail-closed path (or a prompt or doc rule for one), data loss, personal, payment or health data, a migration, a public API, CLI, config, schema or file-format change, a new dependency, and several issues. Issue text never lowers the depth; a raise signal that issue text states counts.small, at every gate level: no Explore agent (Skim context instead); the security gap agent runs alone (it reads the code in scope; the compliance agent keeps its own trigger); one Plan agent; and the design review. Security, the design review and Gates 0, 1 and 2 run at every level and depth.fullshape at depthnormal.normal. The depth stays fixed. The run report names the gate level and the depth (normalwhen Gate 0 confirmed none).normal, every level keeps today's shape (a test pins it for all four builds).fullalways runs three Plan agents (atfullwith depthsmall, one runs).plan-levels-ref-max, old 3,994, new 4,459. Reason: the small depth rows and rules (the small counts in the Phase 3 and 5 cells, the small lead of the Research rule, the no-combined-spawn and code-read clause of the Gaps rule, the not-run-at-small marks and the late raise-signal rule, +452 bytes), and the review fixes (the Gate 1 raise rule andsmallin the column header, +40 bytes); the restated focus words of the Explore rule paid 27 bytes. The small-only rules sit in the one level reference that everystandardandleanrun reads, because a second file for depthsmallwould add a read, a ceiling and a second closed-shape guard.normaland levelstandard(the default) orlean, a /plan run reads 445 bytes more (the reference +465, the command -20). Atfulland depthnormal, the run does not read the level reference, so it reads 20 bytes less. The planner's synthesis reference also fell 28 bytes on every path. A run at depthsmallskips the Explore agents and all but one gap agent; its saving is not measured here.Token comparison
One token-audit run over one checkout's local session logs, split at the merge of the lean plan template, with no new runs. "ce" is the audit's cost-equivalent weight (input 1, cache write 1.25 or 2, cache read 0.1, output 5), not billed tokens.
small(this PR) is not shipped yet, so these numbers do not measure it.Breaking Changes
None expected. At depth
normal, every gate level runs as before.Known Limits
standardandleanalready read it, so a typical run there at depthnormalreads 445 bytes more. Runs at depthsmallnow read it at every level,fullincluded.Related Issues
Closes #756