ID:WORK-129Status:donePriority:mediumComplexity:moderateSource:SPEC-037
knownSections scanner integration: section-scoped refs and validation
Once knownSections are declared in the plan rune content models (WORK-024), the scanner and validator need to become section-aware. Today, refs are extracted from the entire file without knowing which section they belong to. With knownSections, refs get tagged with their canonical section name, enabling the next command to distinguish blocking dependencies from informational references.
Acceptance Criteria
- Scanner extracts refs with their canonical section name (e.g., refs in "Dependencies" section tagged as dependency refs)
- Alias resolution maps "Deps", "Depends On", "Blocked By", "Requires" to the canonical "Dependencies" section
- Known section presence is reported per entity (which known sections are present/missing, using canonical names)
validatewarns when aready+ work item has no Acceptance Criteria sectionvalidatewarns when aconfirmed+ bug has no Steps to Reproduce, Expected, or Actual sectionvalidatewarns when an accepted decision has no Context or Decision sectionnextcommand only treats refs in the Dependencies section as blockers (refs in References/Approach/etc. are informational)- Backward compatibility: files without known section headings continue working (all refs treated as potential blockers, same as today)
- Tests for section-scoped ref extraction, alias resolution, and section-aware blocking
Dependencies
- Add knownSections to Plan Rune Content Models — knownSections framework support and plan rune declarations must ship first
References
- Plan Package Hardening — Plan Package Hardening (Part 3: scanner integration, dependency resolution)
- Declarative Content Model — Specification — Declarative Content Model (knownSections design)
Resolution
Completed: 2026-04-12
Branch: claude/spec-037-breakdown-docs-Whj40
What was done
- Added ScopedRef type and extractScopedRefs() to scanner
- Scanner now reports knownSectionsPresent per entity
- Validate checks required sections: AC for ready+ work, Steps/Expected/Actual for confirmed+ bugs, Context/Decision for accepted decisions
- Next command uses section-aware blocking via knownSectionsPresent
- 13 new tests across scanner, validate, and next test files
Relationships
Dependency of
History
- a295513statusdraft→done
- ☑ Scanner extracts refs with their canonical section name (e.g., refs in "Dependencies" section tagged as dependency refs)
- ☑ Alias resolution maps "Deps", "Depends On", "Blocked By", "Requires" to the canonical "Dependencies" section
- ☑ Known section presence is reported per entity (which known sections are present/missing, using canonical names)
- +6 more criteria
- 1676387Created (draft, medium, moderate, SPEC-037, plan, cli, content-model)