Task — engineering-spec@1

regen_backlog emits every status and recomputes Totals from frontmatter

doneTASK-IMP-091
module improvement · class product · priority p1 · created 2026-07-16 · shipped 2026-07-17
depends on none · blocks none

TASK-IMP-091: regen_backlog emits every status and recomputes Totals from frontmatter

Summary

The function every insert contract cites as the byte authority cannot regenerate a truthful index: its ACTIVE-status filter drops done rows entirely - the proven root cause of the fourteen-task drift TASK-IMP-086 repaired. Make regen_backlog emit one row per task folder for every status, recompute the repo-wide Totals line from a frontmatter tally, and gate it with a parity test that regenerates today's corpus and byte-compares the improvement section against the committed file.

Problem

TASK-IMP-086's mandated trial recorded the failure precisely: regen deleted the three committed done rows, emitted nothing for 068-081 (all done), and left a Totals line three short of the corpus. An index regenerator that silently drops terminal statuses turns the audit trail into fiction the moment tasks ship.

Proposed Solution

Remove the ACTIVE filter from row emission (the index lists the whole corpus; the queue's eligibility logic stays elsewhere), keep grammar and stem ordering byte-identical to the committed convention, and compute Totals from a per-status frontmatter tally at regen time. A new suite regenerates against the live corpus into a scratch copy and asserts (a) byte-parity of the improvement section with the committed file and (b) Totals equal to the tally.

Alternatives Considered

Success Metrics

Scope

In scope: the emission filter, the Totals computation, the parity suite.

Out of scope / Non-Goals

Dependencies

AI Authorship Disclosure

1. Description (normative)

2. Acceptance criteria

3. Edge cases

Audit

TASK-IMP-091-regen-backlog-all-statuses spec audit - audit_rubric@2.0 (machine floor + judgment)

Machine floor: task-lint clean on first pass (FM/SEC/COND/TRACE-structural all green). Judgment families: metrics carry baseline/target/deadline grounded in recorded run or incident evidence; alternatives distinct with real rejection reasons; scope subsections present; sourced untrusted evidence only where quoted; ops-verified ACs carry explicit rationales; COND-004 bullets truthful.

ISSUE ISS-001 (QA-004, wontfix-info): several ACs are ops-verified (prose contracts, repo-state chores, single documents) with recorded-evidence rationales judged sufficient - the same pattern accepted for TASK-IMP-086/087 and consistent with TRACE-002's manual allowance.

SUMMARY verdict: pass issues_open: 0 issues_human: 0 next_action: ship

§gate-log

Populated during implementation (ship-tasks testing phase).