eng recap · 2026-08-17

Screenshot verification and plan Context completeness

Two unrelated fixes, one session: a post-capture check in social-media-tools's screenshot pipeline (shipped, 0bedc78), and a completeness bar added to plan-agent's ## Context guidance (uncommitted). Both trace back to a plugin review run against an external article on agent-prompting technique.

8
Files touched
2
Plugins bumped
4
Decisions
4
Open items
01 · At a glance

Where it landed

Two independent fixes landed in one session, unrelated to each other beyond sharing a source: a plugin/skills review run earlier against an external article on agent-prompting technique.

social-media-tools's shared Playwright screenshot pipeline gained a post-capture verification step — it checked the DOM was ready before capture but never checked the output file after, so a blank PNG still counted as success. Committed and pushed (0bedc78, branch claude/project-optimization-review-595e98).

plan-agent's implementation-plan and build-proposal skills, plus the personal global plan-mode skeleton, got an explicit "no follow-up question" completeness bar added to their ## Context section guidance. Still uncommitted in the working tree.

02 · Architecture and code paths

Where things live, and how they call

Screenshot pipeline

kit/plugins/social-media-tools/references/rendering-pipeline.md is a single shared reference, not duplicated per skill. Ten SKILL.md files read it: share-code, share-react, share-github, share-project, share-session, share-selection, share-explanation, share-blog, share-video, and one more matched by the same grep. One file change reaches all ten with no per-skill edit.

pass

fail

Step 1 · find_free_port.py

Step 2 · python3 -m http.server

Step 3 · Playwright resize / navigate / snapshot / take_screenshot(.card)

Step 4 · kill $SERVER_PID

Step 5 (new) · verify $SAVE_PATH_PNG exists and size >= 5KB

Phase 6 · Deliver

Fallback · point user at local HTML

Step 5 is new. A blank or truncated capture now routes to Fallback instead of reaching Deliver.

Plan Context sections

Three independent copies of the same guidance, no shared code path between them:

Worth knowing before touching any of these again: implementation-plan already has a ## Decisions section, and build-proposal already has Locked & resolved decisions — both exist specifically so "a resumed session reads this instead of re-deriving" (verbatim from section-catalog.md). Context is the why; Decisions/Locked-decisions is the settled how. Don't merge them.

Not modified, but load-bearing if extending verification-gate patterns elsewhere: kit/plugins/plan-agent/skills/build/references/completion-gates.md is this repo's reference implementation of a mandatory, bounded, escalate-rather-than-fake-success verification gate — the pattern the screenshot check is a lightweight instance of.

03 · Decisions

What was decided, and why

Screenshot check uses a 5,000-byte heuristic, not pixel inspection.

wc -c on the output file is free; a real "is this blank" check would need an image-decode dependency the pipeline doesn't have. A solid-color/blank PNG compresses far smaller than a populated card with text and a gradient, so byte count is a reasonable proxy. Marked with an inline ponytail: comment naming the ceiling (a legitimately sparse card could false-positive) and the upgrade path (real pixel sampling).

Verification runs after server cleanup, not before.

Step 5 sits after Step 4 (kill $SERVER_PID), so a failed verification never leaves the HTTP server orphaned — cleanup isn't gated on the check succeeding.

Context-section fix scope was cut down mid-session.

The original plan was a heavier rewrite of implementation-plan/build-proposal's Context guidance. After reading section-catalog.md, right-sizing.md, and artifact-shape.md in full — not just implementation-plan/SKILL.md's summary line — it became clear both skills already solve the cold-read problem via ## Decisions/Locked & resolved decisions. The change shipped is one added sentence per file stating the completeness test in words, plus a clause naming the Context/Decisions boundary — not a restructure.

~/.claude/rules/plan-mode.md's own Required Structure gloss for context was left untouched.

It's now slightly thinner than SKELETON.md's copy ("Background and motivation; why this work is needed" vs. the strengthened placeholder). Not fixed because the request named SKELETON.md specifically, and SKELETON.md is the file actually copied into new plans — plan-mode.md's line is reference prose, not copied. Practical fix landed in the higher-leverage file; the inconsistency is flagged in §07, not resolved.

04 · Tradeoffs and rejected options

What was weighed and lost

05 · Learnings

Tried, abandoned, and gotchas

06 · Tests and verification

What ran, and what didn't

07 · Review follow-ups and tech debt

Open items

uncommitted

.claude-plugin/marketplace.json, kit/plugins/plan-agent/CHANGELOG.md, kit/plugins/plan-agent/skills/build-proposal/references/artifact-shape.md, kit/plugins/plan-agent/skills/implementation-plan/guidelines/section-catalog.md, kit/plugins/plan-agent/skills/implementation-plan/reference/SKELETON.md. The plan-agent Context-completeness change is not yet committed or pushed.

known ceiling

The screenshot Step 5's 5KB threshold is a documented byte-count heuristic (inline ponytail: comment in rendering-pipeline.md), untested against a real capture. Upgrade path if it misfires: sample actual pixel content instead of byte count.

left inconsistent

~/.claude/rules/plan-mode.md's Required Structure line for context still reads "Background and motivation; why this work is needed" — thinner than the strengthened SKELETON.md it points at. Flagged mid-session as optional polish, not applied because it wasn't named in the request.

not implemented

Three more gaps identified during the earlier plugin-review pass, no action taken beyond the screenshot fix:

  1. Only plan-agent:build uses an explicit completion-gate/"don't finish until X" pattern; roughly 30 of 63 skills in this repo mention no verification step at all (some legitimately don't need one — routers, display-only skills).
  2. code-review-agent doesn't verify its own findings against cited line numbers before reporting them.
  3. Only 3 of 63 skills in the repo ship a worked example of their actual output shape.
08 · Files touched

Grouped by area

social-media-tools committed · 0bedc78 · pushed
kit/plugins/social-media-tools/references/rendering-pipeline.mdAdded Step 5 (post-capture PNG existence/size check); widened Fallback's trigger to include verification failure.
kit/plugins/social-media-tools/CHANGELOG.mdNew v2.23.1 entry.
.claude-plugin/marketplace.jsonsocial-media-tools 2.23.0 → 2.23.1.
plan-agent uncommitted
.../implementation-plan/guidelines/section-catalog.mdAdded the no-follow-up test and the Context/Decisions boundary sentence to the ## Context entry.
.../implementation-plan/reference/SKELETON.mdSame addition to the copyable Context placeholder.
.../build-proposal/references/artifact-shape.mdSame addition, two spots: section-order description (item 4) and the copyable Skeleton block.
kit/plugins/plan-agent/CHANGELOG.mdNew 9.4.2 entry.
.claude-plugin/marketplace.jsonplan-agent 9.4.1 → 9.4.2.
Outside this repo untracked · no version mechanism
~/.claude/reference/SKELETON.mdSame Context-completeness addition, personal dotfiles.