T-ARCR-leaf-parent-readiness-applicability
Status: closed/done · Impact: high · Complexity: small
The implementation-ready contract is a work-order contract: Files-to-touch
tables and touchpoint resolution are category errors for a parent task, which
is an organizational rollup, not a dispatchable work order (D-VSLI
settled leaf-only dispatch; D-S30G lists this split as its own
follow-up). Today nothing detects parenthood: /sdlc:task-ensure-ready run
against a parent fails the contract on grounds that cannot apply. This task
makes parenthood a deterministic fact the gate reads and formalizes the
exemption.
| Location | Role today |
|---|---|
apps/sdlc/lib/model/entities/task/implementation-ready.md | The readiness contract; says nothing about applicability to parent tasks |
apps/sdlc/lib/model/entities/task/ops/gap-report.ts | Deterministic composite gate (sections / placeholders / touchpoints / claims); no parenthood awareness |
apps/sdlc/lib/model/entities/task/ops/gap-report.test.ts | Composite’s test suite; no parent/child fixtures |
apps/sdlc/skills/task-ensure-ready/SKILL.md | Gate skill; evaluates every task against the leaf contract unconditionally |
apps/sdlc/lib/model/read.ts#readRawFrontmatter | Bulk frontmatter scan primitive — the right tool to find tasks whose parent_key names a given basename |
Proposed
Section titled “Proposed”task gap-report reports parenthood as a fact; the ensure-ready skill
short-circuits on it. A parent task is exempt from the leaf contract: the
gate emits a distinct slug-namespaced marker and applies no mutation (no
stamp, no downshift). The contract doc states the applicability rule so
future readers do not re-litigate it.
Approach
Section titled “Approach”- In
gap-report.ts, add aparenthoodslice to the output object:{ is_parent: boolean, children: string[] }, computed by scanningdocs/planning/tasks/*.mdfrontmatter withreadRawFrontmatterforparent_keywikilinks that resolve to the target task’s basename (match on theT-NNNNid prefix; slug optional, per the wikilink grammar). Parenthood is reported as a FACT — the op does not suppress or alter the other slices for a parent (interpretation stays with the skill, matching the op’s existing facts-only doctrine). - Extend the one-line
GAP-REPORTmarker withparent=<bool>. - Add fixtures + tests in
gap-report.test.ts: a parent task (named by a child’sparent_key) reportsis_parent: truewith the child basename listed; a childless task reportsis_parent: false,children: []. - In
implementation-ready.md, add an## Applicabilitysection: the contract binds LEAF tasks (no children viaparent_key); a parent task is an organizational rollup and is exempt — its readiness is its children’s readiness. Cross-linkD-VSLI(leaf-only dispatch) andD-S30G. - In the task-ensure-ready
SKILL.md, add a Step 3 pre-check: whenparenthood.is_parentis true, skip the contract evaluation and both mutation paths entirely; emitENSURE-READY-PARENT-ROLLUP: <basename>and exit success. Document the new marker beside the existingENSURE-READY-OK:/ENSURE-READY-NEEDS-DEFINITION:grammar.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
apps/sdlc/lib/model/entities/task/ops/gap-report.ts | modify | Add parenthood output slice (readRawFrontmatter scan of tasks’ parent_key) and parent= marker token |
apps/sdlc/lib/model/entities/task/ops/gap-report.test.ts | modify | Parent/child and childless fixtures asserting the parenthood slice |
apps/sdlc/lib/model/entities/task/implementation-ready.md | modify | New ## Applicability section — leaf-only binding, parent exemption, cross-links |
apps/sdlc/skills/task-ensure-ready/SKILL.md | modify | Step 3 parent short-circuit; ENSURE-READY-PARENT-ROLLUP: marker documented |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
sdlc task gap-reportagainst a fixture parent task reportsparenthood.is_parent: truewith the child basename inparenthood.children; a childless fixture reportsfalse/[]— asserted by tests inapps/sdlc/lib/model/entities/task/ops/gap-report.test.ts. - AC-2: the one-line marker carries the new token (e.g.
GAP-REPORT gaps=N ... parent=true). - AC-3:
apps/sdlc/lib/model/entities/task/implementation-ready.mdcontains an## Applicabilitysection naming the leaf-only rule and the parent exemption. - AC-4:
apps/sdlc/skills/task-ensure-ready/SKILL.mddocuments the parent short-circuit and theENSURE-READY-PARENT-ROLLUP:marker; the short-circuit path applies no frontmatter mutation. - AC-5: the composite’s test suite
apps/sdlc/lib/model/entities/task/ops/gap-report.test.tspasses when bun-run as a test file.
Out of scope
Section titled “Out of scope”- Nested orchestration traversal (parents decomposing into children at
dispatch time) —
D-VSLIend-state, not this task. - Any change to
task next/ orchestrate selection (leaf filtering there is separate machinery). - Rolling up child readiness into a parent-level readiness summary.
Dependencies
Section titled “Dependencies”- none