Postmortem
Purpose: Answer an explicit retrospective causal question using the
already-validated outcome and evidence.
Prompt
Postmortem: verdict .agents/ao/verdicts/2026-08-30-cli-regen.json shows
NOT_PROVEN then PASS after we added a mutating-check guard to
skills/validate/scripts/validate.sh. Did that guard actually cause the
fix, or did the flaky CI runner just stop flaking that day?
It's working if
Observable in the trace, without reading the prose:
- The report pins the exact
verdict.v2 id and the causal question before
the timeline section.
- A claim promoted to cause cites its mechanism, evidence, and
counterfactual together under the report's
hypotheses list.
- A claim resting only on symptom cessation is listed under
unknowns,
not promoted to cause.
- The report lands at
.agents/scratch/postmortem/YYYY-MM-DD-postmortem-<topic>.md and
bash skills/postmortem/scripts/validate.sh exits 0.
Critical Constraints
- Because proof and causal inference are different judgments, Postmortem is retrospective causal analysis, not the general learning umbrella and not a completion gate.
- It consumes immutable Validate verdict evidence and does not re-run acceptance validation because Validate already owns that proof.
- Treat causal statements as hypotheses because causal confidence must survive
alternatives. Separate observed sequence, contributing conditions,
counterfactuals, and unknowns.
- A correlation is not promoted to cause without evidence that discriminates
plausible alternatives.
- Because the caller owns delivery decisions, do not rewrite proof, operate
tracker state, change the remaining plan, or promote a rule. Return evidence
to the caller.
- Empty or inconclusive analysis is valid; manufacture neither certainty nor a
lesson to make the retrospective feel useful.
Workflow
- Pin the verdict, subject evidence, and explicit causal
question.
- Reconstruct the evidence-backed timeline without importing hidden author
reasoning as fact.
- List candidate contributing conditions and at least one plausible
alternative explanation.
- Test each claim against cited evidence and a counterfactual: what should
differ if the claim were false?
- Optionally use independent judges to challenge contested causal claims.
- Emit a report containing supported claims, rejected claims, unknowns,
evidence references, and suggested experiments. Stop.
Correlation-to-cause discrimination
A fix is proven when the mechanism is demonstrated, not when symptoms stop.
Promoting a claim from correlation to cause requires all three:
- a stated mechanism — the specific path by which the condition produced the
outcome, in terms a reader could check against the subject;
- discriminating evidence — an observation that the mechanism predicts and at
least one plausible alternative does not;
- a counterfactual test — what should have differed if the claim were false,
with the cited evidence showing it did differ.
Symptom disappearance after a change satisfies none of these on its own: the
change and the recovery may share an unobserved cause, or the symptom may be
intermittent. The named failure mode is post-hoc fix attribution — "we
changed X and the failure stopped, therefore X was the cause." Claims backed
only by symptom cessation stay in the report as correlations with the
untested alternatives listed, and the suggested experiment is the
discrimination that would settle them. Stop condition: every supported causal
claim in the report carries all three elements with citations; anything less
is filed under correlations or unknowns, never silently promoted.
Output Specification
- Artifact directory:
.agents/scratch/postmortem/.
- Filename convention:
YYYY-MM-DD-postmortem-<topic>.md.
- Serialization/schema format: Markdown with causal question, pinned inputs,
timeline, hypotheses, evidence, counterfactuals, unknowns, and experiments.
- Validator command:
bash skills/postmortem/scripts/validate.sh.
- Downstream handoff: Learn or the caller may consume the analysis; they own
any bookkeeping, promotion, planning, or delivery decision.
Quality Checklist
Executable behavior is in postmortem.feature.
1---2name: postmortem3description: Optionally test a retrospective causal question against durable verdict evidence. Triggers: "postmortem", "causal retrospective", "test a retrospective hypothesis".4---5
6# Postmortem
7
8> **Purpose:** Answer an explicit retrospective causal question using the
9> already-validated outcome and evidence.
10
11## Prompt
12
13```text
14Postmortem: verdict .agents/ao/verdicts/2026-08-30-cli-regen.json shows
15NOT_PROVEN then PASS after we added a mutating-check guard to
16skills/validate/scripts/validate.sh. Did that guard actually cause the
17fix, or did the flaky CI runner just stop flaking that day?
18```
19
20## It's working if
21
22Observable in the trace, without reading the prose:
23
24- The report pins the exact `verdict.v2` id and the causal question before
25 the timeline section.
26- A claim promoted to cause cites its mechanism, evidence, and
27 counterfactual together under the report's `hypotheses` list.
28- A claim resting only on symptom cessation is listed under `unknowns`,
29 not promoted to cause.
30- The report lands at
31 `.agents/scratch/postmortem/YYYY-MM-DD-postmortem-<topic>.md` and
32 `bash skills/postmortem/scripts/validate.sh` exits 0.
33
34## Critical Constraints
35
36- Because proof and causal inference are different judgments, Postmortem is retrospective causal analysis, not the general learning umbrella and not a completion gate.
37- It consumes immutable Validate verdict evidence and does not re-run acceptance validation because Validate already owns that proof.
38- Treat causal statements as hypotheses because causal confidence must survive
39 alternatives. Separate observed sequence, contributing conditions,
40 counterfactuals, and unknowns.
41- A correlation is not promoted to cause without evidence that discriminates
42 plausible alternatives.
43- Because the caller owns delivery decisions, do not rewrite proof, operate
44 tracker state, change the remaining plan, or promote a rule. Return evidence
45 to the caller.
46- Empty or inconclusive analysis is valid; manufacture neither certainty nor a
47 lesson to make the retrospective feel useful.
48
49## Workflow
50
511. Pin the verdict, subject evidence, and explicit causal
52 question.
532. Reconstruct the evidence-backed timeline without importing hidden author
54 reasoning as fact.
553. List candidate contributing conditions and at least one plausible
56 alternative explanation.
574. Test each claim against cited evidence and a counterfactual: what should
58 differ if the claim were false?
595. Optionally use independent judges to challenge contested causal claims.
606. Emit a report containing supported claims, rejected claims, unknowns,
61 evidence references, and suggested experiments. Stop.
62
63## Correlation-to-cause discrimination
64
65A fix is proven when the mechanism is demonstrated, not when symptoms stop.
66Promoting a claim from correlation to cause requires all three:
67
68- a stated mechanism — the specific path by which the condition produced the
69 outcome, in terms a reader could check against the subject;
70- discriminating evidence — an observation that the mechanism predicts and at
71 least one plausible alternative does not;
72- a counterfactual test — what should have differed if the claim were false,
73 with the cited evidence showing it did differ.
74
75Symptom disappearance after a change satisfies none of these on its own: the
76change and the recovery may share an unobserved cause, or the symptom may be
77intermittent. The named failure mode is post-hoc fix attribution — "we
78changed X and the failure stopped, therefore X was the cause." Claims backed
79only by symptom cessation stay in the report as correlations with the
80untested alternatives listed, and the suggested experiment is the
81discrimination that would settle them. Stop condition: every supported causal
82claim in the report carries all three elements with citations; anything less
83is filed under correlations or unknowns, never silently promoted.
84
85## Output Specification
86
87- **Artifact directory:** `.agents/scratch/postmortem/`.
88- **Filename convention:** `YYYY-MM-DD-postmortem-<topic>.md`.
89- **Serialization/schema format:** Markdown with causal question, pinned inputs,
90 timeline, hypotheses, evidence, counterfactuals, unknowns, and experiments.
91- **Validator command:** `bash skills/postmortem/scripts/validate.sh`.
92- **Downstream handoff:** Learn or the caller may consume the analysis; they own
93 any bookkeeping, promotion, planning, or delivery decision.
94
95## Quality Checklist
96
97- [ ] The causal question and immutable inputs are pinned.
98- [ ] Supported and rejected claims cite discriminating evidence.
99- [ ] Alternatives, counterfactuals, and unknowns remain visible.
100- [ ] The report stops short of proof, planning, tracker, and delivery authority.
101
102Executable behavior is in [postmortem.feature](references/postmortem.feature).