workflow-war-story: three gate-independent precision defects (16 of 17 current offenses are noise) #165
Labels
No labels
P0
P1
P2
P3
bug
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#165
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Surfaced while measuring the #163 heading-gate options against this repo's own corpus. These three defects are independent of #163's gate question and cost far more than it: over the 99 files
bin/aidd-lintactually lints, WorkflowWarStory emits 17 offenses; fix these three and it emits 1. Sixteen of seventeen current findings are noise the cop produces regardless of which sections it opens.Each defect has a purpose-built helper already in
lib/that the cop does not use.1. Per-section double counting (should use
Document#leaf_sections)cops/workflow_war_story.rb:21iteratesdocument.sections, which is subtree-inclusive: a heading's body runs to the next heading of equal-or-lesser level, so an ancestor'sbody_linesfully contain every descendant's. A line under nested matching headings is flagged once per enclosing section.document.rb:60-70already documents this exact hazard: "Cops that scan section bodies for content (not headings) need the leaf sections only, or they double-count everything nested under an ancestor."Invisible today (this repo has no nested workflow-headed sections, so emitted == unique == 17), but it is latent: measured with an all-sections gate the cop emits 165 for 84 unique lines.
Caveat for whoever implements this:
leaf_sectionsrejects parents wholesale, so a parent's preamble lines before its first child heading would stop being scanned. That is a behavior change, not a pure fix, and needs its own test.2. Table rows are scanned (should use
Document#skip_mask)scan_sectionguards ondocument.fence_maskonly.Document#skip_mask(fence | table | frontmatter) exists and is unused here. Markdown table rows are therefore scanned as if they were step prose.Real hits in this repo, all table rows in
plugins/os-aidd-lint/references/tier2-catalog-validation.md:3. Dates and issue numbers inside inline code spans
A date or
#-number inside backticks is a value being illustrated, not incident history. Same class asPathReferenceScanner::PLACEHOLDER_TOKEN-- a convention shown, not a fact asserted.Real hits:
Measured effect (99 in-scope files, unique offenses)
workflow|process|steps)The last row is why this matters beyond noise reduction: it is what makes the all-sections question on #163 answerable at a sane price.
Scope note
Fixes 1 and 2 are generic
MarkdownCophygiene -- worth checking whether other section-scanning cops have the same two defects rather than patching WorkflowWarStory alone. Fix 3 is a line-level filter and may belong next to the incident-pattern matching.Discovered while working #163, 2026-07-27.