Skill: task-postflight — Post-dispatch validation + learning loop
Skill: task-postflight — Post-dispatch validation + learning loop
Skill path: ~/.claude/skills/task-postflight/
Description
Closes the loop on H/BLOCKER MC tasks after specialist dispatch. Runs Proveo (Angie Jones) validation against MC acceptance criteria, detects anomalies, invokes /learning-opportunity if anomaly found (root cause + memory entry), and writes mc.js ready submission with evidence path.
Trigger: /task-postflight <mc_id>
Use AFTER: Specialist dispatch completes for any task that went through /prompt-forge or any H/BLOCKER task.
Workflow
- Preconditions: Verify MC task exists, status is
in_progress, evidence dir exists (or flag MISSING) - Proveo dispatch: Spawn Angie Jones (Proveo) to validate against acceptance criteria
- Anomaly detection: Parse Proveo report, classify failure type and severity
- Learning-opportunity: Invoke learning loop on PARTIAL/FAIL verdicts (skip if PASS or known issue)
- Memory entry: Write feedback file if learning-opportunity returns memory path
- MC ready: Submit
mc.js readywith evidence summary (or BLOCK on FULL_FAILURE) - Audit trail: Append JSON line to
~/system/postflight-log.jsonl
Proveo Integration
Angie Jones (Proveo) validates against MC acceptance criteria. Expected output:
- GLOBAL_VERDICT: PASS | FAIL | PARTIAL
- per_criterion: List with verdict (PASS | FAIL | SKIP), evidence path, notes
- anomalies: List of issues found (empty if PASS)
- evidence_paths: Files verified
Report written to: /tmp/postflight-<mc_id>/proveo-report.md
Anomaly Classification
| Verdict | Anomaly Class | Action |
|---|---|---|
| PASS (all criteria) | ANOMALY:NONE | Skip to mc.js ready |
| PASS (some SKIP) | ANOMALY:PARTIAL_COVERAGE | Learning-opportunity (LOW severity) |
| PARTIAL | ANOMALY:PARTIAL_FAILURE | Learning-opportunity (MEDIUM severity) |
| FAIL | ANOMALY:FULL_FAILURE | Learning-opportunity (HIGH severity) + BLOCK mc.js ready |
| Proveo timeout/error | SYNTHESIS:DEGRADED | Inline fallback check + escalate to John |
Learning-Opportunity Loop
Invoked when anomaly class is not NONE. Receives:
- Proveo report path
- Evidence directory
- Task context (title, MC ID, specialist)
- Forged prompt path (if available)
Expected output:
- Failure type (HALLUCINATION / PROCESS_SKIP / WRONG_OUTPUT / KNOWLEDGE_GAP / REPEAT_MISTAKE)
- Root cause layer (GOTCHA)
- Fix type (Hook / Tool / Rule / CLAUDE.md / Memory)
- Memory entry path (if memory fix applied)
Skip learning-opportunity if:
- Same anomaly tracked in MEMORY.md within last 7 days
- ANOMALY_SEVERITY = LOW and first occurrence
- Known flaky test pattern
Cost and Limits
- Hard cap: $0.50 per invocation
- Typical cost: $0.15 warm cache / $0.40 cold
- Breakdown: Proveo dispatch (Sonnet) ~$0.05-0.15 + learning-opportunity ~$0.10-0.25
- Timeout: 90 seconds for Proveo report
Failure Modes
| Condition | Action |
|---|---|
| Proveo unavailable | SYNTHESIS:DEGRADED — inline fallback, flag in mc.js notes, escalate |
| Proveo timeout | Same as unavailable |
| learning-opportunity fails | Log LEARNING:FAILED, skip memory entry, continue with warning |
| MEMORY.md write fails | Log error, skip index update, include content inline in mc.js notes |
| ANOMALY:FULL_FAILURE | Block mc.js ready, write failure-summary.md, report re-dispatch required |
Audit Trail
Every invocation appends one JSON line to ~/system/postflight-log.jsonl:
{"mc_id":9959,"timestamp":"2026-04-28T12:12:00Z","proveo_verdict":"PASS","anomaly_class":"NONE","learning_invoked":false,"ready_status":"submitted","cost_estimate":"$0.15"}
Log is lightweight observability — does NOT replace evidence files.
v0.1 Deferred (post-Akershus 2026-05-04)
- Telemetry: latency p50/p95 per section
- BFPR tracking dashboard: correlate anomaly rate with prompt-forge usage
- Automated regression detection: compare to previous same-specialist tasks
- Slack alerting on ANOMALY:FULL_FAILURE or SYNTHESIS:DEGRADED
- cost-tracker.js integration
References
- Local SKILL.md:
~/.claude/skills/task-postflight/SKILL.md - Proveo brief:
~/.claude/skills/task-postflight/references/proveo-brief.md - Learning loop:
~/.claude/skills/task-postflight/references/learning-loop.md - Mirror pattern:
~/.claude/skills/prompt-forge/SKILL.md - Related: ZAKON #25 (john-operating-system.md line 77)
Last updated: 2026-04-28
No comments to display
No comments to display