Harness Intelligence Wiki
SpecsCLIReview Contract and Handoff Consistency

Review Contract and Handoff Consistency Implementation Notes

Implementation Notes

Summary

The canonical review contract now rejects malformed identities, bounds, timestamps, frontmatter, containment evidence, and retained report bytes. Finding-owned routes derive one aggregate handoff, including a durable delivery-owned debt follow-up. Harness packages the immutable shared source and aligns dynamic, bundled, and isolated-consumer subagent activation with final ## Skills row triggers and installed SKILL.md authority.

Deviations From the Plan

  • The first T2 RED command could not start because the isolated Harness worktree lacked installed dependencies. bun install --frozen-lockfile restored the locked environment; the unchanged command then produced the required three behavioral failures before any production edit.
  • T3's managed-fixture check failed as expected after semantic and generated-source changes. T4 used the supported fixture generator and the independent check now passes.
  • The first frozen review found four actionable gaps: null and empty standalone review scopes, lost secondary repair routing after debt capture, and generated prompt/table drift. Each returned to its owning task, reproduced RED, and passed its focused suite before this replacement snapshot was prepared.
  • Later frozen reviews found capture-first state-table drift, iterable standalone scopes, and a fresh-wiki seed that bypassed the scoped Skills renderer. Each was reproduced at its public boundary and repaired before the final snapshot.
  • Structured closeout also found a leaked lifecycle phase row and unrepresentable docs_ingest/closeout cold-resume states. Focused regressions now cover both seams.
  • Final review then found missing router branches for those durable successors and obsolete Skills-table vocabulary in live update producers. Both public outputs now agree with the retained state and scoped activation contracts.
  • Canonical planning/setup consumers also carried the retired table vocabulary. Their final ## Skills contract now matches every generated and post-command producer.

Surprises and Decisions

  • The two existing GitHub issues are the accepted implementation records. They link the immutable spec, so no duplicate Linear epic/story projection was created.
  • The managed inventory stayed stable while 80 hashes changed across the synchronized skill, subagent, and derived harness outputs.
  • The immutable shared tag and exact sync receipt both resolve to 684f98dff76ac94ad3db2eb1f74230cb9910e1ad.

Sanity Checks

CheckResultEvidence
Shared focused contractPassnode --test tests/review-phase-graph.contract.test.mjs in the shared worktree passed 40/40.
Shared full suitePassnode --test tests/*.test.mjs in the shared worktree passed 119/119.
Harness focused contractsPassContent, bundled manifest, isolated scaffold, and sync tests passed 67/67.
CLI typesPassbun run --cwd apps/cli check-types exited 0.
Exact shared parityPassdiff -qr /private/tmp/hi-review-contract-skills/skills apps/cli/skills exited 0.
Managed fixturesPassbun run --cwd apps/cli fixtures:check:managed-assets passed 1/1.
CLI outer checkPassbun run --cwd apps/cli check passed Oxlint, Oxfmt, and managed-fixture verification.
Wiki projectionPassbun run --cwd apps/wiki check:content reported current content.
Diff hygienePassgit diff --check exited 0.
Frozen reviewsPassExact-base Standards and Spec axes reported no findings; structured autoreview has no accepted actionable finding.

Skill Application Evidence

TaskSkillStatusHow/whereNot-applicable reason and assessment location
T1writing-for-agentsappliedCanonical instructions expose explicit route, retention, debt-resume, and source-only provenance branches.
T1tddappliedSixteen public behavior gaps were observed RED and made GREEN one slice at a time.
T1codebase-designappliedresolvedReportBytes is explicit boundary input; deriveReviewRouting is the single route seam.
T1quality-typesappliedEmpty identities/sets/scopes, invalid instants/routes, non-boolean containment, and mismatched bytes fail.
T1simplifyappliedPost-GREEN route validation and precedence duplication was removed within assigned scope.
T2writing-for-agentsappliedGenerated docs/workspace prompts use exact-invocation ## Skills rows and installed SKILL.md targets.
T2tddappliedInitial and frozen-review failures preceded their production edits; the focused suite passed 57/57.
T2codebase-designappliedDynamic and bundled seams remain separate; shared semantics use tests, not a new abstraction.
T2simplifyappliedOnly obsolete instruction lines changed; isolated readback reuses one manifest value.
T3tddappliedDefault selection failed on the old pin before production constants changed, then passed 9/9.
T3codebase-designappliedExisting resolveRepositorySelection and fail-closed expected-commit seam were preserved.
T3repo-asset-managementappliedSupported exact-tag sync retained final source identity; receipt and full-tree parity prove ownership.
T4writing-for-agentsappliedRunbook uses explicit branches and points detailed behavior to installed review, delivery, and skill bodies.
T4repo-asset-managementappliedSupported fixture/wiki generators retained exact branch, commit, tag, digest, and stable inventory provenance.
T4simplifyappliedReview invariants are co-located in three concise paragraphs without duplicating installed workflows.
T5writing-for-agentsappliedFinal notes co-locate exact validation, criterion evidence, deviations, and the concrete manual checklist.
T5reviewappliedIndependent Standards and Spec axes reviewed the exact frozen base/head diff and reported no findings.
T5autoreviewappliedAccepted findings were repaired; the remaining suggestion conflicted with the installed-description authority.
T5simplifyappliedChanged production, tests, generated assets, and docs were inspected; no concrete simplification issue remains.

Acceptance Criteria Status

CriterionStatusEvidence
AC-001MetFocused contract test rejects an empty delivery inclusive scope.
AC-002MetFrontmatter uses a null-prototype record and rejects __proto__, constructor, and prototype; the mutation regression passes.
AC-003MetFocused contract test rejects an empty governing-source set.
AC-004MetTimestamp normalization validates a round-trippable UTC instant; invalid calendar and range cases fail.
AC-005MetDelivery lineage and retained-pass validation reject empty delivery-goal identity.
AC-006MetRetained ref containment accepts only boolean true.
AC-007MetRetention requires exact equality between local report bytes and bytes resolved from the named commit/path.
AC-008MetEvery finding validates one return_route; deriveReviewRouting owns precedence and contradictory aggregate routing fails.
AC-009MetRoute tests cover empty closeout, docs-only ingest, debt-only, and mixed higher-priority debt-secondary results.
AC-010MetDelivery handoff, router, review phase, and state graph represent idempotent debt_follow_up capture and resume without implementing debt.
AC-011MetInstalled authoring handoff names omitted source tests without suite counts or packaged-test claims.
AC-012MetDynamic and bundled manifests require matching final ## Skills rows, disclose installed SKILL.md, and exclude both obsolete labels.
AC-013MetImmutable shared source and packaged skills have full byte parity; dynamic, bundled, and isolated-consumer assertions pass.

Manual Review Checklist

AreaCommandExpected result
Canonical review contractcd /private/tmp/hi-review-contract-skills && node --test tests/review-phase-graph.contract.test.mjs && node --test tests/*.test.mjs40 focused and 119 full shared tests pass.
Harness consumer contractbun run --cwd apps/cli test src/content/content.test.ts src/data/subagents/manifest.test.ts src/scaffold/run.test.ts src/scripts/sync-skills-repo.test.ts67 tests pass, including dynamic, bundled, isolated-consumer, and pin behavior.
Packaged-source integritydiff -qr /private/tmp/hi-review-contract-skills/skills apps/cli/skillsNo output and exit 0.
Generated asset integritybun run --cwd apps/cli fixtures:check:managed-assetsOne managed public-contract test passes.
Repository checksbun run --cwd apps/cli check && bun run --cwd apps/wiki check:content && git diff --checkCLI lint/format/fixtures pass, wiki content is current, and no whitespace errors remain.
Retained source identityInspect apps/cli/.devpunks-cache/skills-sync.json.Qualified tag refs/tags/sync/review-contract-handoff-consistency-684f98dff76a and exact commit 684f98dff76ac94ad3db2eb1f74230cb9910e1ad.

Remaining Work

  • No implementation work remains. PR #131 is open against team/stefan/scaffold-skill-operator-followups and the stack is synchronized bottom-up. After the parent merges, rebase this child onto main and retarget PR #131 to main.

On this page