PoC: task-postflight PoC: task-postflight Refactor Source: /tmp/pillar4-99131-out/poc-task-postflight-tier1.md + ~/system/specs/agentic-os-pillar4-skills-audit-2026-05-04.md (§6) MC: #99131 | #99176 Branch: feat/pillar4-skills-poc (merged to master 2026-05-05 ef8536ad) Date: 2026-05-05 Overview The PoC refactor of task-postflight/SKILL.md validates the three-tier progressive disclosure pattern on the highest-priority target. Target: 541 LOC → ≤ 200 LOC core trigger skeleton New references/ files: anomaly-decision-tree.md , proveo-rubric.md , memory-writer.md Existing references/ preserved: proveo-brief.md , learning-loop.md (unchanged) Token Reduction Analysis Metric Before After (PASS path) After (ANOMALY path) SKILL.md LOC 541 ≤190 ≤190 SKILL.md bytes 19,859 ~8,200 ~8,200 Tokens loaded 5,367 ~2,216 ~2,216 Additional refs loaded 0 0 ~3,000 (anomaly-decision-tree) Total tokens (PASS path) 5,367 2,216 N/A Reduction on PASS path — 59% — Bytes reduction check — 11,659 bytes saved / 19,859 = 58.7% ≥ 40% PASS The ≥40% byte reduction target is met on the typical PASS path. On anomaly paths, the anomaly-decision-tree.md is loaded (~3,000 additional tokens) but this is appropriate because the anomaly path requires that content. PoC Target Rationale Selection: task-postflight Priority score comparison: Skill tokens_est inv_30d priority_score task-postflight 5,367 21 82.054 prompt-forge 2,372 20 70.877 doc-coauthoring 4,274 0 3.631 product-lifecycle 5,103 0 3.708 Petter's preference for doc-coauthoring (376L, clean three-stage structure) was overridden by frequency data. task-postflight fires on every H/BLOCKER closure — 21 times in 19 days. doc-coauthoring has 0 measured invocations. Frequency × size dominates structural elegance. Trigger-Map Table Content migration plan (required before coding per D3 pre-refactor requirement): Current SKILL.md section Lines Always needed? Move to Frontmatter (description) 8 YES — trigger Keep in SKILL.md §1 Preconditions 32 YES — fail fast Keep in SKILL.md §2 Proveo dispatch 40 YES — every invocation Keep in SKILL.md §3 Anomaly decision tree 38 NO — only after Proveo returns → references/anomaly-decision-tree.md §4 Learning-opportunity dispatch template 62 NO — only on ANOMALY path → references/anomaly-decision-tree.md §5 Memory writer procedure 38 NO — only if learning returns memory → references/memory-writer.md §6 Postflight marker writer 72 PARTIAL — Section 6a-6b always needed, 6c-6f only on success path 6a-6b keep; 6c-6f → references/marker-writer.md §7 mc.js ready writer 52 PARTIAL — format in SKILL.md; details → references/ Keep dispatch shape; move table → references/ §8 Failure modes table 30 NO — reference only → references/anomaly-decision-tree.md §9 Audit trail 20 YES — always runs Keep in SKILL.md v0.1 TODO + References footer 30 NO Drop from PoC (TODO deferred) Content Split Stage 1 content (stays in SKILL.md core) Preconditions (1a-1c) Proveo dispatch inputs and expected output format Anomaly routing decision (IF/THEN — 4 cases, each with "Read ./references/anomaly-decision-tree.md") Postflight marker check (6a-6b only) mc.js ready submission shape Audit trail append Stages 2-N content (moved to references/) Full anomaly class decision tree → references/anomaly-decision-tree.md Learning-opportunity invocation template → references/anomaly-decision-tree.md (same file, appended) Memory writer procedure → references/memory-writer.md Marker writer full procedure (6c-6f) → references/marker-writer.md Failure modes table → appended to references/anomaly-decision-tree.md Existing references/ files references/proveo-brief.md — keep as-is (already correct progressive disclosure) references/learning-loop.md — keep as-is Verification Commands # 1. Branch exists git -C /Users/makinja/.claude branch --list "feat/pillar4-skills-poc" # 2. LOC check wc -l /Users/makinja/.claude/skills/task-postflight/SKILL.md # must be <= 200 # 3. Reference files exist ls /Users/makinja/.claude/skills/task-postflight/references/anomaly-decision-tree.md ls /Users/makinja/.claude/skills/task-postflight/references/proveo-rubric.md ls /Users/makinja/.claude/skills/task-postflight/references/memory-writer.md # 4. Before/after snapshots exist ls /tmp/pillar4-99131-out/poc-task-postflight-before.md ls /tmp/pillar4-99131-out/poc-task-postflight-after.md # 5. Byte reduction >= 40% python3 -c " before=$(wc -c < /tmp/pillar4-99131-out/poc-task-postflight-before.md) after=$(wc -c < /tmp/pillar4-99131-out/poc-task-postflight-after.md) print(f'Reduction: {(before-after)/before*100:.1f}%') print('PASS' if (before-after) >= 0.4*before else 'FAIL') " # 6. No section header permanently lost # Proveo verifies headers in before.md appear in {after.md + 3 ref files} PR Merged Branch: feat/pillar4-skills-poc Merged: 2026-05-05T09:17:35Z Commit: ef8536adba17 Status: Merged to master Result: 541 LOC → 194 LOC (64.7% reduction) ← Design Pattern | Audit Summary