Shared blocks in plan files¶
A plan is planned from the blocks it carries. Where a plan's embedded copy of a shared block is behind the canonical one, the planner reading it is working from wording this repository has already replaced -- and until this criterion existed, nothing looked.
plan-template reads PLAN-TEMPLATE.md and push-audit reads
PUSH-AUDIT.md. Between them that was every file in a repository whose
shared blocks were checked, while most copies of a block live in
docs/plans/PLAN-*.md. Ten copies of three blocks across six plans in
this repository were stale when every marker in every plan file was
first compared -- nine of them where this criterion looks, and the
tenth inside a fenced example it passes over by design -- and the one
that mattered was a plan whose next phase was being planned from it:
v4 of plan-push-audit-phase added a five-item floor for a
repository with no PUSH-AUDIT.md, and the planner reading v3 did
not know the floor existed.
The issue that asked for this counted one of those three blocks rather
than all of them, which is why its figure differs: seven of this
repository's thirteen copies of plan-push-audit-phase were behind
when PLAN-size-ratchet.md's survey ran, and six by the time the
criterion was written, because that survey's own plan re-synced its
copy in the commit that recorded the finding.
What we check¶
For every plan docs/plans/index.md links whose status is not
terminal, every <!-- shared-block: NAME vN --> marker in the plan
file names the version the canonical templates/shared-blocks/NAME.md
carries.
Versions only. The body is never compared, and that is a decision
rather than an economy: plan-closeout-sections ships ...
placeholders under Future work and Bugs fixed during this work that
each plan is meant to replace with its own content, and the block's end
marker sits after them. A plan that has done what the block asks
therefore differs from the canonical wording necessarily, and nine of
this repository's plans do. A criterion that compared bodies would
report every one of them for complying, and a criterion that fails for
compliance is worse than no criterion. PLAN-TEMPLATE.md escapes this
only because it is the one file that still carries the placeholders
unfilled, which is why plan-template can afford the stricter
comparison and this cannot.
Live plans only. A plan whose index status is Complete, Abandoned
or Superseded is not reported. This is the same carve-out
plan-audit-phase makes, for the same reason:
nobody plans a phase from a finished plan, so a stale block in one
misleads no one, while binding them would turn every future version
bump into a sweep across every plan every repository has ever closed.
The cost of that is not the sweep itself but that the sweep is prose,
and plan-phase-landing exists to keep prose out of pull requests.
What we deliberately do not check¶
- A plan the index does not link. That is plan-index's finding, under its own title. Reading an unindexed plan here would report one file twice for one cause.
- A plan the index links whose file is missing or unreadable.
Likewise
plan-index's. A file that cannot be opened has no marker to read, so failing for it would make one broken link fail two criteria. - A plan the index links without recording a status. The carve-out
above turns on what the status says, and a row that says nothing
places the plan on neither side of it;
plan-audit-phase declines the same rows for
the same reason. An index that is a bullet list, or a table with no
Statuscolumn, is every row of this kind at once, so where such rows are all the index has the skip counts them rather than reporting that the index holds no live plan. - A marker naming a block with no canonical copy.
plan-templateandpush-auditreport an unknown block where a repository is required to carry one. A plan naming a block this repository has never shipped is a different complaint from a stale one. - Whether a plan carries any block at all. A plan predating the
blocks is not made to acquire one. Which blocks a file must embed is
plan-template's business; this criterion is about the version in a marker that is already there. - A marker inside a fenced code block. That is sample text, not a
copy of the block, and it is read the same way by every other
structure reader here:
iter_markdown_table_rowsblanks fenced lines, andblank_generated_blocksignores a generated-region marker inside a fence for the same reason. A plan drafts a block before it is canonical, quotes an older version to reason about what changed, or shows what a marker looks like -- all three are a plan talking about a block rather than carrying one, and the only fix a version check could offer is to overwrite the quotation.PLAN-review-unit-size.mdfences its draft ofsource-file-sizev1 and says in its own prose why: "it carries its own markers, which is why it is fenced here rather than embedded". - A document in
docs/plans/without thePLAN-prefix. The index is read throughplan_index_entries, which records only a link whose basename starts withPLAN-, so an investigation headedDocumentrather thanPlanis out of scope here even though plan-retirement clocks it. The two criteria disagree on purpose: retirement asks whether a document's reasoning is still maintained, which is true of an investigation, and this asks whether a planner would be misled by a stale convention, which needs the document to be a plan.
How to fix it¶
Copy the whole marked region -- the begin marker through
<!-- shared-block-end --> -- from
templates/shared-blocks/<name>.md in shakenfist/development over the
copy in the plan file. The blocks are verbatim copies by design; see
templates/shared-blocks/README.md
for the mechanism and for what each version added.
Projects¶
Per-project compliance for this criterion is regenerated on every run of the consistency audit: see the compliance page.
This criterion arrived in the same change that bumped
plan-file-conventions to v3, plan-push-audit-phase to v5 and
plan-phase-landing to v2, so its first run was never going to be
quiet: measured over the 25 repositories in the audit matrix, it fails
7 of the 10 that have a readable live plan index, for 48 stale copies,
and plan-template fails a further 14 for their PLAN-TEMPLATE.md.
That is the mechanism working rather than a backlog to triage -- every
finding closes by copying the marked region verbatim from the file the
issue names -- but a repository picking up three bumps at once should
expect to re-sync several plans in one pull request, not one.