Status: reasoning document.
Why this repository should be able to repair a draft on its own, what it must never repair, and the one documented rule that stands in the way.
Written for someone who wants to know why the loop is shaped the way it is, and in particular why the amendment in The amendment this needs, which the user settled personally, was granted.
Not covered here: what is built. That is AUTO-IMPROVEMENT.md, which is normative and carries no argument; where a claim here and a requirement there touch, that file states the obligation and this one says why it exists. The prose and house-style axis has its own document, HOUSE-STYLE.md.
Assumes ARCHITECTURE.md for the four layers, DRAFT-ITERATION.md for the dossier and the drift sweep, and PLAGIARISM-DESIGN.md for the detection tiers.
misquoted may not be acceptedThis repository is unusually good at noticing that a draft has a problem and unusually bad at doing anything about it. Every quality signal it produces terminates in prose that a human must read, hold in their head, and hand-translate into a revision request.
That posture is deliberate. The review layer is
advisory by construction, and SOUL.md is explicit that
"does this source support this sentence" is not a question a machine
gets to settle.
But deciding is not the same as assembling. The judgement is not the
tedious part of acting on a review report. The tedious part is reading
three prose documents, reconciling them against the section map, dropping
the ones rejected.md already declined, and dispatching a reviser per
survivor. None of that is a judgement call, and all of it is currently
manual.
The claim is narrow: the pipeline should assemble the worklist, attempt the mechanical repairs, and re-verify them, and the human should still decide.
A recorded issue already scopes exactly this loop for one signal (verbatim runs). The proposal is that shape generalised to the other three, plus the class of improvement none of them cover.
These commands carry the quality signals this repository has, and on their own each one is a dead end.
| Signal | What it finds | What it emits | Who acts on it |
|---|---|---|---|
python -m chitragupta.draft dossier status --all |
a cited citekey that has left the ledger or no longer parses; a newly reachable paper the dossier never weighed | text, or --json |
human, by hand |
python -m chitragupta.review provenance |
a citation whose source does not visibly support it | Markdown report, or --json |
human, by hand |
python -m chitragupta.review verbatim scan |
wording shared with a parsed source | Markdown report, or --json |
human, by hand |
python -m chitragupta.review coverage |
a source retrieval surfaced that the draft never cited | Markdown report, or --json |
human, by hand |
python -m chitragupta.draft style |
a defect marker, an unexpanded acronym, dialect drift | text, or --json |
human, by hand |
Every signal above is machine-readable, yet each one ends with a person
reading it and acting by hand. The agenda and agenda-reviser are the
step that joins them.
The obvious placement is a new drafting-layer verb, python -m chitragupta.draft agenda <draft>, reading the review reports and
emitting a worklist. That placement is wrong because it would bring back
the one cycle this repository already removed.
ARCHITECTURE.md states the dependency graph as acyclic and artefact-mediated, with exactly one edge into the review layer:
corpus ββledger, parsed/βββΆ drafting ββdraftβββΆ review
Review has no outgoing edge, and that is load-bearing: the enrichment
layer hosts no review or drafting stage, which
AGENTS.md and ARCHITECTURE.md record as closing "the one
cycle in this picture". A drafting-layer command reading content/review/*.json
re-opens it in the other direction.
The edge that matters is the artefact edge, not the import. Review
already imports drafting-layer code (citation_provenance imports
citation_gate and ledger, citation_coverage imports retrieval, and
core/review/__init__.py imports render_output), and that is fine, because
those are tier-1 modules being called, downhill, by the layer that reads
their output. The acyclicity ARCHITECTURE.md claims is of the artefact
graph: who writes a file that whom reads. content/review/*.json is a
layer-4 artefact, and a layer-2 command consuming it is a new edge in that
graph, which nothing else in the repository has.
The alternative has no such problem. review.AIDS is an explicit, guarded
extension point: chitragupta/cli/review/_registry.py raises a RuntimeError
(deliberately not an assert) if its subcommands drift from that dict,
which exists so a further aid can be added safely. An agenda is "evidence for a
human judgement, never a verdict", which is the review layer's charter
word for word, and as an aid it inherits report_dir, report_path,
write and the exits-0-always posture for free. Reading the other
aids' output is an edge within layer 4.
So the aid belongs in layer 4. The clause that matters is the last one in the specification's shape, that the human and not code closes the loop, because that is what keeps the graph acyclic: a skill reading a review report is the same act as a human reading one, which the layer already expects.
karpathy/autoresearch (MIT, per its README) is the nearest published thing to what this proposes. It is worth describing in full, because the parts that make it work are not the parts it is famous for.
The design rests on how it splits work across three files. prepare.py
holds the constants, the data preparation and, decisively, the
evaluation function; it is read-only. train.py holds the model, the
optimiser and the training loop; it is the only file the agent edits,
and within it everything is fair game. program.md holds the agent's
instructions, and it is the only file the human edits. The README is
explicit that this inversion is the point: "you're not touching any of the
Python files like you normally would as a researcher. Instead, you are
programming the program.md Markdown files that provide context to the AI
agents and set up your autonomous research org." program.md is, in its
own words, "essentially a super lightweight skill".
It uses one number and one budget. Training always runs for exactly five
minutes of wall clock, and the score is val_bpb (validation bits per
byte, lower better, and vocabulary-size-independent so that architectural
changes compare fairly). The fixed budget is a control variable, not a
resource cap: it is what makes two experiments answers to the same
question.
The loop, as program.md states it: branch (autoresearch/<tag>);
establish a baseline by running the code unmodified; then repeat: hack
train.py with one idea, commit, run redirecting all output to a log
(explicitly not to the terminal, so the transcript does not flood the
agent's context), grep two numbers back out of that log, and decide. If
val_bpb fell, advance the branch and keep the commit. If it did not,
git reset back to where the iteration started. Every attempt gets one
row in results.tsv: commit, score, memory, status of
keep / discard / crash, and a one-line description of what was
tried. Crashes are diagnosed from the log's tail, fixed if the fault is
trivial, abandoned if the idea itself is broken. A run exceeding double
its budget is killed and treated as a failure.
Two rules are easy to miss. The first is a tie-breaker: all else being equal, simpler is better. An improvement bought with twenty lines of hacky code is probably not worth it, while an equal result from deleting code is a win outright. The second is the posture: "NEVER STOP". Once the loop has begun, do not ask the human whether to continue, because "the human might be asleep", and the loop runs "until the human interrupts you, period".
Component for component, the correspondence is close enough to be useful and different enough to be dangerous.
| autoresearch | Here | Note |
|---|---|---|
train.py, the one file the agent edits |
the draft under content/drafts/ |
Same discipline: one artefact, reviewable diffs |
prepare.py + evaluate_bpb, read-only ground truth |
the review aids, chitragupta.draft gate, the boilerplate allowlist |
The loop may run them and may not edit them |
program.md, edited by the human and not the agent |
.claude/skills/, scope.md, steering.md, docs/WRITING-STANDARDS.md |
HOUSE-STYLE.md is where this half is worked out |
val_bpb, one global scalar |
the count of objective-class findings over all aids | Coarser, and the reason for the binary rule |
| the fixed five-minute budget | nothing, deliberately | Its runs compete; agenda items do not |
results.tsv, one row per attempt |
revisions.md, including refused attempts |
Same keep/discard/crash discipline, existing file |
branch advance-or-git reset |
dossier export + per-item revert |
Drafts are gitignored; the granularity is what transfers |
| "NEVER STOP" | two attempts per item, one pass, hand back | Inverted, for the reasons below |
| Its design choice | Transfers? | Requirement |
|---|---|---|
| The evaluation harness is read-only ground truth | Yes, and it is the rule this proposal most needed. A rewrite that keeps failing the re-scan could otherwise be "fixed" by adding its phrase to the boilerplate allowlist, and a loop that can suppress its own findings is gaming a metric instead of improving a draft | R1 |
| Keep / discard / crash, one row per attempt | Yes, as discipline. The failure rows outnumber the keeps and are where the learning is. Not as a file: revisions.md already exists |
R6 |
| Simplicity as the tie-breaker | Yes. Where a deletion and a rewrite both pass, prefer the smaller diff. That is SOUL.md's substantive-editor posture already | R8 |
| Baseline first | Yes. The agenda taken before the pass is that baseline | R9 |
| One scalar metric that must go down | Partly, and the gap runs in both directions. The asymmetry is local-versus-global, not boolean-versus-scalar: val_bpb catches a regression anywhere, while a per-finding re-check cannot see that fixing one verbatim run introduced another. The scalar's own blind spot is the mirror image, and is why R4 reads both the count and the identity sets (see below) |
R4 |
| A fixed per-iteration budget | No, and it is not needed. Its experiments are competing alternatives on one leaderboard, so they must be comparable. Agenda items are independent repairs that do not compete | -- |
| A dedicated git branch, advanced or reset per experiment | No; structurally unavailable. content/drafts/ and content/dossiers/ are gitignored, so a user's drafts are not in git. What transfers is the granularity: one experiment reverts alone |
R5 |
| "NEVER STOP" | No, and the opposite is correct here | R7 |
On the scalar, and what a level count hides. A total answers "is the
draft worse?" and nothing finer. Fix one objective finding, introduce
another, and the count is unchanged. An edit that swapped one defect for
a different one is then indistinguishable from an edit that changed
nothing, and the swapped-in defect is kept. That is no hypothetical
about drafts: it is the ordinary experience of working on this
repository's own code, where every "did I break something?" is
answered by diffing a recorded per-test baseline
instead of by reading a pass count, precisely because a total moves for
reasons a name does not (DEVELOPER-AGENTS.md, "Baseline the suite
before you edit").
R4 therefore reads both, and the second half costs nothing to add: R2
already requires every finding to carry an identity stable across runs,
and chitragupta/core/review/agenda/_recheck.py already emits
resolved/persisting/new matched on that id beside the count.
Keeping the count as well is deliberate, since it is the cross-class
signal that catches a verbatim-run repair raising the prose count,
but a level count is not read as evidence that nothing regressed.
On never stopping. It is the most quotable thing in program.md and
the least transferable. A discarded training run costs five GPU-minutes
and the metric catches it; a wrong scholarly claim is silent and ships.
Unattended looping is only safe under a metric that catches compounding
damage, and this design's is coarse. Five of eight item classes need a
human whatever the loop does, so an indefinite loop either starves or
creeps into judgement. And its per-iteration cost is fixed where this
one's token cost is not. The bounded design is argued, not timid.
Where the proposal was too cautious was narrower: one pass per
invocation. A bounded-convergence variant (keep passing while the
objective-class count strictly falls, to a hard maximum) still terminates
deterministically and is closer to advance-while-improving, and it is
what shipped: agenda-reviser keeps passing while
objective_class_count strictly falls and stops at pass_bound (3).
It is tempting to say a machine may not judge whether a source supports a sentence because SOUL.md forbids it. The stronger reason is that the loop cannot detect its own failure here.
A paraphrase that subtly misstates what a paper claims passes the gate, because the citekey is still real. It passes the verbatim scan, because the wording now differs, which is precisely what "fixing" an overlap means. And it passes provenance, if the source remains topically related. Every check the loop owns returns clean on its worst output. The exclusion is therefore a property of the mechanism, not a policy that could be relaxed by a more permissive rule.
What can improve unattended on that axis is ordering and surfacing (which sections are least supported, which citations rest on the thinnest passage), never the fix.
One reconciliation is needed. A companion proposal puts forward terminology, claim and cross-reference registries as "deterministic, blocking global checks ... beside the citation gate". This proposal borrows its detectors and declines its blocking posture: nothing here becomes a gate, and the overlap-gate proposal remains the only place that decision is taken. If the registries land as specified, the two are reconciled because a registry may block a book assembly without any review aid blocking a draft.
misquoted may not be acceptedAUTO-IMPROVEMENT.md gives three reasons, any one of which is enough. The order in which they were settled is the binding part: narrow the class first, decide afterwards, because acceptance over a class that means two things can permanently suppress the one finding this project exists to catch. The measurement behind the answer:
fragments one piece instead of two:
"For data-driven models the topic is [unresolved]." against a source
reading "...the topic is still being debated." is found, because
everything before the drafter's own bracket is verbatim. Measured over
206 spans extracted from 19 real evidence.md files, it took the
residual absents from 40 to 38, with no span lost."a Digital Twin (DT) to gain the most value" against a quotation that dropped the (DT))
recovers 1 span and loses 12, because a drafter quoting that sentence
usually keeps the gloss. It is the obvious next thing to try, which is
why it is recorded."explain it to a sponsor"), which a
quote: field would never hold; 18 have essentially nothing of the
quote in the source, which at that extraction rule's fidelity is
mostly a mis-attribution and not a finding; and 5 match a real
prefix and then diverge, which is exactly the class this aid exists
for. A class that contains those 5 is not a class to let a keystroke
silence.misquoted item
would require its identity to carry the parsed source's fingerprint, so
that a re-parse or a replaced PDF reopens it. That is a new mechanism,
and nothing in the measurement argues for paying for it.quote:/claim:/support: contract, so misquoted's universe is
empty on every real draft and acceptance would buy nothing measurable.
The normalisation is still what makes the class trustworthy the first
time the contract is used.plans/775-quotation-residual-absents.md holds the arms, the counts and
the recipe for rebuilding them. If a later corpus makes the residual
class mean one thing, this is the entry to revisit, and the sequence to
keep is: normalise, measure, then decide.
The specification says the aid may be run by anyone at any time, that the skill's only trigger is a person asking, and that no hook, schedule or other skill may start it (R11). Each half of that has its own reason.
Why the aid is unrestricted. It is free, deterministic, read-only and
exits 0. There is no occasion on which running it is a mistake, so there
is nothing to restrict. That is the bare command; its --baseline mode
re-runs the eight aids before comparing (~21 s, plus support's own
~21--60 s model-load floor per REVIEW.md; and the
eight aids' .tex/.pdf go stale against their .md until a
full-format run follows), so for that mode occasion does matter, and
R11's restriction to a person asking is what covers it.
Why not a PostToolUse hook. One already exists, running the gate on
every write under content/drafts/. Cost is no objection: the bare
agenda reads the aids' JSON instead of executing them, so a hooked
agenda would run one command, not four. The objection is that
it would put a review report in the path of a write. The gate belongs
in that path because it is a gate; nothing in the review layer does,
and a report that a write waits on is one short step from a report
that blocks it.
Why not a genre skill at the end of its own run. A draft just written has no review reports to read, so the agenda would be empty. More importantly, a skill repairing its own output is marking its own homework, which is why the existing gate loop discards an unsupported claim and writes again instead of "fixing" it.
Why not cron. sync is safely scheduled because it is deterministic
and idempotent. The skill is neither, and a scheduled reviser is the
overnight posture
rejected above.
Why R11 is a convention, not a mechanism. Skills already hand off to
one another in prose (draft-reviser to corpus-reviser and back),
and nothing enforces that mechanically. R11 is enforceable exactly as
every other skill rule in this repository is, and no more. The hook half
is mechanical: it
requires an entry in .claude/settings.json, and not adding one is a
decision someone would have to reverse deliberately.
Why SOUL.md is not part of the wiring. It states the one invariant and what each layer may not do, and the loop changes neither. Its review bullet (the layer "never blocks, and must not be made to") already covers the loop and survives the amendment intact. A proposal that has not been built also has no business in the file the assistant treats as its memory. If the loop ships, the sentence worth adding there is about the propose-and-accept asymmetry, not about the aid.
Settled: approved by the user
(plans/f-auto-improvement-adoption.md, a working note not shipped
outside a git checkout, Β§"Decision 1"). It is what lets the verbatim
scan be a required step in the genre skills. The argument below is kept
because it is why the decision went the way it did; the sweep is kept
because the next rule-wide sweep will want its method.
One documented rule the loop could not satisfy. It is about who may invoke a review aid, and the loop's driver invokes them. This sweep surfaces the candidates:
grep -rniE "never automatic|never invoked|invokes them automatically|reads it back|runs automatically|offered, never run" \
--include='*.md' --include='*.mmd' --include='*.py' .
Do not trust it to be complete; applying the amendment proved it.
It is line-based, and every one of these files is hand-wrapped to about
72 columns, so a statement of the rule that happens to break across a
line ("never\n automatically") is invisible to it. Two real sites were
missed exactly
that way (uncited_prose.py and figure_layout/__init__.py), and a
third (GENRE.md, which states the rule for every skill at once) was
missed because the original pattern had no term for offered. A sweep
that has to be right normalises whitespace per file first and then
matches; the grep above is for finding where to look.
It also hits phrases with nothing to do with the review layer, such as
AGENTS.md's "reads it back out of the ledger", a tests/cli/corpus/test_sync.py
docstring's "never invoked", and chitragupta/core/draft/dossier/_acronyms.py's
"still never automatic" (a drafting-layer rule about
acronyms-suggest --apply, and untouched by this). It hits these
documents too.
Its hits come in two families, "never automatic" and "nothing reads it back". The number of real sites tracks how many aids exist, because each aid's docstring carries its own copy of the sentence, so a count goes stale with the next aid.
Three diagrams were borderline, and they turned out to be in scope. No
.mmd source stated the rule outright; the one label that said "never
automatic" was inline in ARCHITECTURE.md, so it was a text edit like the
rest. But 00-main-workflow.mmd's "REVIEW AIDS
-- you run these", g1-corpus-led.mmd's "afterwards, by you" and
extra-sequence.mmd's "optional afterwards", which draws You invoking
the aids, were manual-invocation claims on exactly the axis the amendment
abolishes, and each has a committed SVG under docs/diagrams/svg/
that is re-rendered with it. The "never a gate" text in all three stayed true
and untouched.
The surviving invariant is the one that was always doing the work, and it
is narrower than the old wording: a review finding may be read, may
be invoked by a driver, and may never block a draft. The line is
between advisory and blocking, not between manual and automatic.
chitragupta.draft gate remains the only gate.
SOUL.md did not need amending. Its review bullet says the layer "never blocks, and must not be made to", with no claim about who invokes it, and its "let a machine outrank a human on a judgment call" prohibition is satisfied by the three surfaced item classes. The rule that changed is stated only in the layer's implementation and in the documents describing it, never in the soul. That is what made the amendment approvable instead of a rewrite of the project's premises.
It was still a change to the review layer's stated posture in the user-facing rules file, and SOUL.md reserves that kind of call for the user. It was the first thing to settle, before any code, and it was. Had it been declined, the agenda aid could still have been written and run by hand, and only the skill's automation would have been lost.
Can the same idea improve the software as well as the drafts? It can, but it is the smaller half, and what is missing is signal, not permission.
DEVELOPER-AGENTS.md already grants an agent the
whole cycle: "implementing features, writing tests first, running the
full local check suite, opening PRs, watching CI, merging, and cutting
releases [...] proceed autonomously". CI runs on two platforms with a
coverage floor. The backlog is labelled and dependency-ordered. Nothing is
missing on the authorisation side.
What is missing is an objective signal an unattended agent could act on:
bench/ records results but never compares them.
bench/results/*/ holds real timings from named machines, and nothing
reads them back to say a change made the parse slower. A
compare-to-baseline step (same host, same fixture corpus, a tolerance)
would turn performance from something a human notices into something
a run reports. That is the single most valuable piece, and it is the
same "measurement before mechanism" principle the retrieval backlog
already states for retrieval.enhancement, parked issues plus CI and coverage state
and propose the next rung with its dependency edges checked. It should
not open the PR: every PR here bumps pyproject.toml, so two concurrent
PRs always conflict on the version line, which forces the work serial
regardless of how much of it an agent could parallelise.Both are bench/, .github/ and .claude/ changes. Neither is a
pipeline layer, and neither should acquire one.
pass_bound), but a long agenda on a long draft is a
real run. TOKENS.md has the arithmetic this would extend;
the saving to weigh it against is that today the same work happens as a
human-driven sequence of full draft-reviser invocations, each paying
its own start-up read of the dossier.missing-citekey acted on unattended? Yes. Removing a
citation the corpus does not support is objective, since the gate
fails either way. What replaces the sentence is not, so the repair
de-cites the sentence, and the sentence then surfaces as an
uncited-claim for a person to decide
(AGENDA.md).draft-reviser as a branch? No. It is a
separate skill, agenda-reviser, because its input is a file and not
a person.agenda strain the aid vocabulary? It ships as a
review.AIDS key, so its report is survey.agenda.md. It is the one
key that names what to do next rather than an observed property of the
draft, and the first aid that reads other aids.Recorded because settling it turned up a constraint that outlives this proposal.
The obvious names for a report of everything still wrong with a draft come
from the audit register: audit itself, reckoning, arrears. audit is
the strongest candidate in the language for this repository: it is the
project's own defining verb (SOUL.md: "keeps a ledger of
every citekey and audits citations against it"), it is dialect-neutral,
and it is unused as an identifier anywhere in the tree.
It is still wrong, because of NAME.md. That document maps
the myth onto the code. Its third and fourth points map exactly this
register onto the citation gate: "a draft's claims are checked
against the ledger at the moment of reckoning, and a FAIL is final -- a
gate, not a suggestion", then "The audit is incorruptible, not
well-intentioned."
Naming a never-blocking aid audit would file the review layer's softest
output under the word this project reserves for its hardest check.
So there is a rule here, and it binds any future aid as much as this one:
The judgement register belongs to the gate. Audit, reckoning, verdict, ruling: an advisory aid may not borrow them, however well they fit the myth. NAME.md's fifth point gives the review layer its own slot instead, "Evidence, quoted": the deeds are read out, and the reading is not the ruling.
That disposes of a whole family at once, and what survives has to come
from the deliberation register instead of the judgement one. Every
alternative weighed against agenda is worse:
worklist and backlog presume the items are accepted work, when
three of six classes are undecided.remediation names only the half the aid does not do.findings is what all six existing aids already emit.digest suggests condensing, not prioritising.snags is exact but colloquial, and opaque outside British usage.docket reads as a delivery note in that same British usage.triage is spoken for. REJECTION.md records a
retrieval stage of that name built and withdrawn, and reusing it here
would collide with a documented refusal.agenda wins on register: the ordered list of matters put before a
decision-maker, none of them decided by the person who drew it up, which
is the review layer's charter in one word.
The same test applies to the skill. draft-improver was rejected because
"improver" presumes the outcome; auto-reviser because a name built on
auto- would re-enshrine in the vocabulary the manual-versus-automatic
distinction the amendment exists to dissolve. agenda-reviser names its
input, which is what draft-reviser and corpus-reviser already do.