story-045: The documenter runs before verification - #43
Merged
Conversation
Implemented by the l5 harness story workflow.
The verifier reported it as factually right and grammatically broken: 'after the verifier passes, which since story-045 is the last stage of the workflow, so the tree it clones already holds the documenter's edits'. Split into two sentences; the content is unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The workflow ran implementer → tester → verifier → documenter, so every check happened before the last stage that writes. The documenter's output was the only stage output nothing verified, and story-043 shipped a red suite because of it: its documenter named a module the same story deleted,
ARCHITECTURE.mdfailed story-038's dangling-path rule, all three CI jobs went red, and the run recordedstory completed.Seven consecutive stories — 034, 037, 039, 040, 041, 042, 043 — carried a verifier note saying the documenter's file could not be judged because the documenter had not run yet.
What changed
The order is now implementer → tester → documenter → verifier.
One reorder closes both gaps. The verifier sees the documenter's output and judges it. And the clean-clone check — declared on the verifier stage — now commits a tree that already holds the documenter's edits, so
story completedstops being compatible with a red suite.The third route
The verifier declares
documentation, routing to the documenter:That last sentence is the line the category most needed. Without it, a verifier finding wrong behaviour that the document faithfully describes would send a code defect to the documenter.
The route could not have landed separately.
retry_routing_problemsrefuses a destination that does not sit strictly before the declaring stage, so declaringdocumentationbefore this reorder would have made every run refuse at pre-flight. And it could not have been omitted either: story-028's rule is that an unrecognised category escalates rather than falling back, so giving the verifier documentation as a subject with no category that owns it would have turned every documentation finding into an escalation.What it costs
Documentation is redone on every retry — a failing verdict re-enters at the implementer and the documenter runs again on the way back. That is the reason it was placed last originally. It is the right trade because the alternative is documentation nothing judges, and the cost is only paid when a story retries, but it is a real extra invocation.
Verification
2366 passed, 31 written; verification passed on the first iteration, no retries; clean-clone green with the story committedtests/were permitted by the revert checkNotes for the reviewer
This story could not verify itself. The coordinator loads the workflow at start, so this run executed under the old order — the same property story-028 and story-030 recorded. The reorder takes effect from the next run.
prompts/documenter.mdwas modified though the story lists it underdo_not_modify. Adjudicated by the verifier as forced rather than a scope violation:test_every_stage_that_can_receive_a_retry_declares_the_placeholdersrequires a retry-receiving stage to declare the retry placeholders, and the documenter can now receive a retry.One follow-up commit on this branch fixes a comment the verifier reported as factually right and grammatically broken.
🤖 Generated with Claude Code