| name | closure-attest |
| description | Assemble a bdClosureAttestation JSON object (bd-close evidence shape — issueId/head/timestamp/evidenceBundle/evidencePaths/rationaleHash). This is DISTINCT from the canonical ADR-016 §6 closureAttestation (post-sign-off-correction) shape; see amnesia-pdqi. |
Closure attest
When to invoke
At every Track C / governance issue closure that carries an evidence bundle. The output JSON is the bdClosureAttestation object (bd-close evidence assembly) that the bundle's manifest.json ingests, and that the bd close rationale references by hash. NOTE (amnesia-pdqi, 2026-06-07): this key was renamed from closureAttestation to bdClosureAttestation to resolve a collision — the canonical closureAttestation key is reserved for the ADR-016 §6 post-sign-off-correction shape (type/preFixSha256/postFixSha256/interpreterPhase3Timestamp/verdictStatus/rationale), which is a DIFFERENT object emitted elsewhere.
What it does
Invokes tools/closure-attest.sh with an issue id, an evidence-bundle directory, and a rationale file. The primitive verifies both paths exist, computes a sha256 of the rationale file, enumerates the bundle's top-level files as evidencePaths, and emits a single JSON document containing the issue id, current HEAD, an ISO 8601 UTC timestamp, the bundle path, the evidence paths array, and the rationale hash. Default output is indented; --json switches to compact for piping into a parent JSON document.
Contract with primitive
- Primitive:
tools/closure-attest.sh
- Flags / inputs:
--issue-id <bd-id> (required)
--evidence-bundle <dir> (required; existence verified)
--rationale <file> (required; existence verified)
--head <sha> (optional; defaults to git rev-parse HEAD)
--json (compact output; default is indented)
- Output shape:
{
"bdClosureAttestation": {
"issueId": "amnesia-o4fp.6",
"head": "<sha>",
"timestamp": "2026-05-11T00:00:00Z",
"evidenceBundle": "apps/amnesia/docs/perf-evidence/2026-05-11/o4fp.6",
"evidencePaths": ["...", "..."],
"rationaleHash": "<sha256>"
}
}
- Exit semantics: 0 on success; 1 on missing inputs.
Example invocation
tools/closure-attest.sh \
--issue-id amnesia-o4fp.6 \
--evidence-bundle apps/amnesia/docs/perf-evidence/2026-05-11/o4fp.6 \
--rationale apps/amnesia/docs/perf-evidence/2026-05-11/o4fp.6/rationale.md \
--json
Halt conditions
--evidence-bundle directory does not exist — halt + surface.
--rationale file does not exist — halt + surface.
Related
- ADR-016 §6 Evidence Bundle Schema: canonical home for the shape; this primitive emits a payload that conforms to it.
- Sibling skill:
bd-close-rationale consumes the output of this skill (or the same rationale file) as the body of the bd closure.