Codegen Debugging Skill Implementation Plan

For Claude: REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.

Goal: Create a SEA repo skill that guides agents to debug why code generation fails or produces wrong/incomplete output by tracing the spec→AST→IR→manifest→code pipeline.

Architecture: A single skill with two diagnostic tracks (hard failure vs wrong/incomplete output), aligned with SEA spec-first rules and generator-first guardrails. Keep SKILL.md concise and move detailed checks into a short reference file if needed.

Tech Stack: Markdown skill format with YAML frontmatter; repo-local skill under .claude/skills/.

Task 1: Baseline (RED) — Write failing pressure scenarios

Files:

Step 1: Draft 3+ pressure scenarios

Step 2: Run baseline without skill

Step 3: Summarize violations

Task 2: GREEN — Create skill skeleton

Files:

Step 1: Create YAML frontmatter

Step 2: Draft core sections

Task 3: GREEN — Add reference checklist (optional but likely)

Files:

Step 1: Add concise stage-by-stage checks

Task 4: GREEN — Add one high-quality example

Files:

Step 1: Add a single worked example

Task 5: REFACTOR — Close loopholes

Files:

Step 1: Add rationalization table Step 2: Add explicit counters for each excuse Step 3: Add red flags list

Task 6: Verify

Files:

Step 1: Re-run the scenarios with the skill

Task 7: Package (optional)

Step 1: If needed, run packaging