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.


Token Reduction Analysis

Metric Before After (PASS path) After (ANOMALY path)
SKILL.md LOC541≤190≤190
SKILL.md bytes19,859~8,200~8,200
Tokens loaded5,367~2,216~2,216
Additional refs loaded00~3,000 (anomaly-decision-tree)
Total tokens (PASS path)5,3672,216N/A
Reduction on PASS path59%
Bytes reduction check11,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-postflight5,3672182.054
prompt-forge2,3722070.877
doc-coauthoring4,27403.631
product-lifecycle5,10303.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)8YES — triggerKeep in SKILL.md
§1 Preconditions32YES — fail fastKeep in SKILL.md
§2 Proveo dispatch40YES — every invocationKeep in SKILL.md
§3 Anomaly decision tree38NO — only after Proveo returns→ references/anomaly-decision-tree.md
§4 Learning-opportunity dispatch template62NO — only on ANOMALY path→ references/anomaly-decision-tree.md
§5 Memory writer procedure38NO — only if learning returns memory→ references/memory-writer.md
§6 Postflight marker writer72PARTIAL — Section 6a-6b always needed, 6c-6f only on success path6a-6b keep; 6c-6f → references/marker-writer.md
§7 mc.js ready writer52PARTIAL — format in SKILL.md; details → references/Keep dispatch shape; move table → references/
§8 Failure modes table30NO — reference only→ references/anomaly-decision-tree.md
§9 Audit trail20YES — always runsKeep in SKILL.md
v0.1 TODO + References footer30NODrop from PoC (TODO deferred)

Content Split

Stage 1 content (stays in SKILL.md core)

Stages 2-N content (moved to references/)

Existing references/ files


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


Revision #2
Created 2026-05-05 13:06:05 UTC by John
Updated 2026-06-07 20:01:14 UTC by John