Task — engineering-spec@1

task-reconcile, evidence ladder and report for drifted task states

doneTASK-IMP-100
module improvement · class product · priority p1 · created 2026-07-17 · shipped 2026-07-17
depends on none · blocks TASK-IMP-101

TASK-IMP-100: task-reconcile, evidence ladder and report for drifted task states

Summary

ship-tasks trusts two things today: its own manifests (hash-verified resume) and its own gates (route-back). A task that arrives already-implemented from outside the loop - status past ready_to_implement with no manifest, or done with missing gate artefacts - is invisible to both, and the 086 incident showed what an unverified status claim costs. Ship task-reconcile.mjs: a read-only evidence ladder over one task that emits reconcile-report@1 with per-rung verdicts and exactly one recommendation from a closed set, never acting on it - the verdict is HITL's, wired into the workflow by TASK-IMP-101.

Problem

Status claims beyond ready_to_implement carry no proof obligation. A task marked ready_to_review with no diff, or done with no coverage-gate, sits in the index looking finished; the only detector so far has been an external review bot. The measuring pieces all exist - nothing composes them into a verdict a human can act on.

Proposed Solution

node .cyberos/docs-tools/task-reconcile.mjs <task-id> [--repo <root>] [--run-tests] [--json] [--out <file>]. Rungs, all read-only (rung 5 executes suites only under the explicit flag):

  1. Spec integrity - task-lint verdict; audit.md present with overall_status pass; audit's audited_file_sha256 prefix matches the CURRENT spec bytes (drift = red).
  2. Artefact completeness vs claimed phase - the required set per status (implementing+: context-map, edge-case-matrix, impl-plan, obs-injection; reviewing+: code-review; testing/done: coverage-gate), accepted in the task folder or docs/tasks/.workflow/<id>/.
  3. Manifest state - ship-manifest present? verify via ship-manifest.mjs (version, task sha, artefact hashes); absent manifest is a finding, not a failure (out-of-band work has none).
  4. Committed-object presence - every frontmatter new_files/modified_files path exists at HEAD (git ls-tree), per the 092 rule: claims are measured on commits, not working views.
  5. Cited tests now (--run-tests) - the suite files named by §2 test: entries run once each; exit codes recorded. Report: reconcile-report@1 markdown (frontmatter: task, claimed_status, rung verdicts, drift_score, recommendation, hitl: required) + --json. Recommendation is EXACTLY one of resume_at_phase(<N>) (claims supported), route_back (claims unsupported - reasons per rung), adopt_candidate (work sound at HEAD, artefacts missing - backfill then re-enter). The tool never mutates task state, BACKLOG, or specs. modules/skill/task-reconcile/SKILL.md wraps it: machine floor first, judgment guidance for the model half (reading rung reds, drafting the gate question), and the hard rule that the agent NEVER executes a recommendation without the recorded human verdict. build.sh vendors the tool.

Alternatives Considered

Success Metrics

Scope

In scope: the CLI and its five rungs, reconcile-report@1 shape, the SKILL.md contract, fixture suite, build.sh vendor line.

Out of scope / Non-Goals

Dependencies

AI Authorship Disclosure

1. Description (normative)

2. Acceptance criteria

3. Edge cases

Audit

TASK-IMP-100-task-reconcile-evidence-ladder spec audit - audit_rubric@2.0 (machine floor + judgment)

Machine floor: task-lint clean on first pass. Judgment families: metrics grounded in the recorded gap map and operator decisions; alternatives distinct with real rejection reasons (warn-only and hard-block both considered and rejected per the recorded decision); dependency ordering (100 blocks 101, same agent serial) declared per §11a; the no-silent- execution rule appears as a normative clause, keeping the two-gate doctrine intact; edge cases cover the double-handling risk with resume semantics and the historical-corpus false-block risk.

ISSUE ISS-001 (QA-004, wontfix-info): SKILL.md prose contract verified by recorded greps (same accepted pattern as TASK-IMP-090 AC 1).

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

§gate-log

Populated during implementation (ship-tasks testing phase).