Use when breaking down a project phase into stories with acceptance criteria, creating ADRs, or planning infrastructure work. Triggers on /plan, story breakdown, detailed plan, architecture doc.
From shieldnpx claudepluginhub infraspecdev/tesseract --plugin shieldThis skill uses the workspace's default tool permissions.
sidecar-schema.mdtemplates.mdObserves Claude Code sessions via hooks to create atomic project-scoped instincts with confidence scores, evolving them into skills, commands, or agents.
Automatically extracts reusable patterns like error resolutions, workarounds, and debugging techniques from Claude Code sessions via Stop hook, saving them as learned skills for reuse.
Provides patterns for continuous autonomous agent loops with loop selection, quality gates, evals, recovery controls, and failure mitigation. Useful for production AI agent workflows.
You MUST produce all four artifacts. No exceptions.
Write each artifact using the Write tool to exactly these paths:
{output_dir}/{feature-name}-YYYYMMDD/plan.json — machine-readable plan sidecar at feature root (updated in place){output_dir}/{feature-name}-YYYYMMDD/plan/{N}-{slug}/architecture.html — the "why and how"{output_dir}/{feature-name}-YYYYMMDD/plan/{N}-{slug}/plan.html — the "what to do", rendered from the sidecar{output_dir}/index.html — dashboard linking to all features (create or update)Where:
{output_dir} — read from .shield.json output_dir field (default: docs/shield){feature-name} — derived from plan name in kebab-case (e.g., input-validation, auth-feature). If user provides a name explicitly, use it.{N} — run number (count existing folders in {feature}/plan/ + 1){slug} — plan nameDo NOT use any other path, filename, or directory. The Write tool creates directories automatically. After writing, update {output_dir}/manifest.json and regenerate {output_dir}/index.html.
Always generate the sidecar JSON first, then render HTML from it. The sidecar ({output_dir}/{feature}/plan.json) is the source of truth — the HTML is a rendered view. When anything changes (AC edits, status updates, PM sync), the sidecar is updated and HTML is re-rendered.
The sidecar MUST be written to {output_dir}/{feature}/plan.json. See sidecar-schema.md for the full JSON schema and rules.
/plan command/research instead/plan-review insteadAfter the sidecar is created, generate HTML documents that render from it.
The "why and how" — explains the problem, current state, proposed solution, and key decisions.
Structure:
The "what to do" — stories rendered from the sidecar.
Structure:
The HTML MUST include a meta tag referencing the sidecar:
<meta name="sidecar" content="../plan.json">
Each story renders from the sidecar JSON:
┌─ Story N: [name from sidecar] ──────────────────────┐
│ [Status badge] [Week range] │
│ │
│ Description (from sidecar.description) │
│ │
│ Tasks (from sidecar.tasks) │
│ - [ ] Task 1 │
│ - [ ] Task 2 │
│ │
│ Acceptance Criteria (from sidecar.acceptance_criteria)│
│ - [ ] Criterion 1 │
│ - [ ] Criterion 2 │
└───────────────────────────────────────────────────────┘
See templates.md in this skill directory for CSS and HTML scaffolding. Key rules:
#1a73e8 (blue)max-width: 900px for architecture, 960px for detailed planAt startup, call execute-steps to register these steps. Execute them in order, updating status after each.
| Step | Action | Condition | Mandatory |
|---|---|---|---|
| 1 | Gather requirements | skip if spec/topic provided | No |
| 2 | Check for prior research | skip if no research exists | No |
| 3 | Generate plan.json sidecar | always | Yes |
| 4 | Generate architecture HTML | always | Yes |
| 5 | Generate plan HTML | always | Yes |
| 6 | Update manifest + index.html | always | Yes |
{output_dir}/{feature}/research/. If so, read the latest run's findings.md and use the research findings to inform the plan. If not, proceed without it..shield.json — get project name and active domains{output_dir}/{feature}/plan.json with epics, stories, tasks, and acceptance criteria<meta> sidecar referenceshield:summarize — produce a plan summary for the run directory/plan-review — multi-agent review of the plan/pm-sync — sync stories to project management tool| Mistake | Fix |
|---|---|
| Writing only a markdown plan | You MUST produce all 3 artifacts: sidecar JSON + architecture.html + plan.html |
| Skipping HTML because "it's simpler" | HTML is required. Markdown is not a substitute. |
| Generating HTML without sidecar | Always write sidecar JSON first |
| Vague acceptance criteria | Testable: specific commands, measurable states |
| Missing acceptance criteria on stories | Every story MUST have at least 1 criterion |
| Empty tasks list | Every story needs concrete, actionable tasks |
| Not reading .shield.json | Project name and domains come from the marker |
Writing to shield/plan.json (old path) | Write to {output_dir}/{feature}/plan.json — plan sidecar at feature root |