Post mortem

From griddynamics/rosetta · View interactive version

Post mortem is an AI agent skill from the GitHub repository griddynamics/rosetta. Diagnose instruction defects and optionally submit Rosetta GitHub issue

How to use this skill

Skill file

<post_mortem>

<core_concepts>

</core_concepts>

<process>

① Post-mortem (always), strictly in this order:

  1. Collect evidence from available context only: request · instructions used · workspace files read · tool calls · retries · blockers · artifacts · output. Run not in context → ask for it; NEVER invent history.
  2. OUTPUT evidence inventory — available vs missing. ONLY THEN proceed.
  3. Assess every layer: prompt clarity/completeness · inferred-vs-told requirements · workspace files (stale, wrong, missing, contradictory) · repo-local instructions/config · Rosetta instruction ambiguity/gaps · execution errors · repeated same-approach retries · duplicated effort · tooling/context friction · validation gaps · user-input timing · handoff quality (per subagent if multi-agent).
  4. OUTPUT candidate issue list — one line each, suspected layer. ONLY THEN proceed.
  5. Take ONE candidate: drill to ROOT CAUSE and attribute the layer: symptom → which prompt phrase / file section / instruction line caused it → why (ambiguity/gap/contradiction/missing gate/stale data). Quote the source; state expected vs actual behavior. Ambiguous → ask 1-3 clarifying questions, do not guess.
  6. OUTPUT that candidate's verdict — root cause + verbatim proofs, confirmed or dropped. ONLY THEN take the next candidate: repeat 5-6 until none remain.
  7. ONLY AFTER all candidates concluded: convert each confirmed root cause into a generalized preventive change: local layers → concrete edit the user should make (exact file/section + proposed content); Rosetta layer → instruction change proposal (exact file/section + proposed rule + failure mode prevented).
  8. OUTPUT recommended changes per layer. ONLY THEN proceed.
  9. Store generalized rules in AGENT MEMORY.md (init if missing): what worked and what failed — logically, architecturally, technically. Concise, organized, reusable.
  10. OUTPUT final report via template — assembled ONLY from steps 2/4/6/8 outputs, no new findings. Material/recurring issues only; uncertain → label low-confidence. RECOMMEND local fixes to the user; apply NOTHING.

② GitHub issue (only if ≥1 defect attributed to Rosetta instructions; otherwise state "nothing Rosetta-attributable" and stop):

  1. GATE A: ask directly — "File the Rosetta-attributed finding(s) as a GitHub issue to griddynamics/rosetta?" Clear no → stop ②. Unclear/partial answer → RE-ASK directly until clear yes/no. NEVER proceed on silence or assumption.
  2. ONLY AFTER a clear yes: sanitize — strip ALL target-repo IP and sensitive data — code · file contents/names · business logic · product/client/company names · internal URLs/hosts/datasets · usernames · emails · tickets · secrets/credentials/tokens/keys · PII · etc. Unavoidable refs → <project>, <file>. Keep: Rosetta component, release, IDE/agent, model.
  3. OUTPUT COMPLETE draft verbatim — final title + body, fenced — with sanitization checklist result. ONLY THEN proceed.
  4. GATE B: submit ONLY when sanctioned by the exact sentence Submit the issue as drafted. Question → answer it, then RE-ASK. Comment/edit → revise → re-OUTPUT full draft → RE-ASK. Unclear → ask directly "Approve submission, or revise?". Loop until sanctioned or declined.
  5. ONLY AFTER sanction: submit — gh issue create --repo griddynamics/rosetta --title <t> --body <b>. gh missing/unauthed → hand user the draft + https://github.com/griddynamics/rosetta/issues/new; NO other channels.
  6. Report issue URL. Change NOTHING else — this skill fixes nothing.

</process>

<validation_checklist>

</validation_checklist>

<pitfalls>

</pitfalls>

<templates>

Post-mortem report:

## Post-Mortem
**Component:** {skill|agent|workflow|prompt|file} · **Release:** {r2|r3} · **Delivery:** {MCP|plugin} · **IDE/agent:** {name} · **Model:** {id}
**Task:** {one line} · **Outcome:** {completed | partial | blocked}

**Issues** (repeat per issue)
P{0-3} — {title}
- Layer: {prompt | workspace files | local config | Rosetta instruction | tooling}
- Trigger: {minimal repro — request paraphrase + preconditions}
- Source: {prompt phrase / file section / instruction line — quoted}
- Expected vs actual: {intent vs what agent did}
- Root cause: {ambiguity | gap | contradiction | missing gate | stale data — why}
- Reasons: {terse: why AI concluded this is the root cause — verbatim proof quotes from prompt/instructions/files/output}
- Frequency: {always | intermittent | once} · Workaround: {if any}

**Recommended Changes**
- Local (user applies): {exact file/section + proposed content + failure mode prevented}
- Rosetta (issue candidate): {exact instruction file/section + proposed generalized rule + failure mode prevented}

**Confidence:** {High|Medium|Low} — {why}

GitHub issue draft (Rosetta-attributed findings only):

Title: [post-mortem] {component}: {root-cause summary}

## Environment
{release} · {MCP|plugin} · {IDE/agent} · {model}

## Repro / trigger
{sanitized minimal repro}

## Expected vs actual
{quoted instruction line/section} vs {observed agent behavior}

## Root cause
{ambiguity | gap | contradiction | missing gate — why}

## Reasons
{terse: why this is the root cause — verbatim proof quotes from instructions/output, sanitized}

## Suggested change
{exact file/section + proposed generalized rule + failure mode prevented}

## Severity
P{0-3} · Frequency {always|intermittent|once} · Confidence {High|Medium|Low}

</templates>

</post_mortem>

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.