phx-brief
Interactive briefing of a plan file — explains reasoning, schema decisions,
Install
npx skills add https://github.com/oliver-kriska/claude-elixir-phoenix/tree/main/targets/amp/skills/phx-brief
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install oliver-kriska-claude-elixir-phoenix@llmmart
git clone https://github.com/oliver-kriska/claude-elixir-phoenix.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole oliver-kriska/claude-elixir-phoenix collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
Plan Briefing
Interactive walkthrough of a plan's reasoning, decisions, and solution shape. Designed for developers who need to understand a plan in 1-2 minutes instead of reading the full document.
Why This Exists
Plans answer "what to do" but bury "why." This skill bridges that gap with an interactive walkthrough.
Usage
phx-brief # Latest plan
phx-brief .claude/plans/user-auth/plan.md # Specific plan
Arguments
$ARGUMENTS= Path to plan file (optional, auto-detects latest)
Mode Detection
Read the plan file and determine mode from phase statuses:
- All phases
[PENDING]= Pre-work briefing (what WILL happen) - Any phase
[COMPLETED]or[IN_PROGRESS]= Post-work briefing (what WAS done and why)
Execution Flow
Step 1: Locate and Load Plan
If
$ARGUMENTShas a path, use itOtherwise, find latest plan:
Use Glob to find
.claude/plans/*/plan.mdand pick the most recent.If no plan found, tell user and suggest
phx-planRead the plan file
Step 2: Load Supporting Artifacts
Read what's available (don't fail if missing):
.claude/plans/{slug}/summaries/consolidated.md(research summary).claude/plans/{slug}/scratchpad.md(decisions, dead-ends).claude/plans/{slug}/progress.md(work log, post-work only)
Step 3: Present Briefing Sections
Present ONE section at a time, wrapped in the visual briefing block
(see references/briefing-guide.md Visual Formatting).
The section MUST be emitted as visible response text BEFORE the
AskUserQuestion call. Content composed only in thinking/reasoning
is invisible to the user, and the question field is too short to
carry it. If the user would see only a "Continue?" dialog, the section
was never shown. Write the ★ Briefing block as normal output first,
then ask:
- If sections remain: question "Continue the briefing?" with options "Next: ", "Ask me a question about this", "Stop here"
- If final section: no question needed, show closing message
Section Flow (Pre-Work Mode)
| # | Title | Source |
|---|---|---|
| 1 | What We're Building | Summary + Scope |
| 2 | Key Decisions | Technical Decisions + scratchpad rationale |
| 3 | Solution Shape | Phases overview + Data Model |
| 4 | Risks & Confidence | Risks table + unknowns/spikes |
Section Flow (Post-Work Mode)
| # | Title | Source |
|---|---|---|
| 1 | What Was Built | Summary + completion status |
| 2 | Key Decisions & Why | Technical Decisions + scratchpad |
| 3 | How It Was Built | Phases with implementation notes |
| 4 | Lessons & Patterns | Risks encountered + patterns used |
See references/briefing-guide.md for section content templates.
Iron Laws
- ONE section at a time — never dump all content
- User controls pace — always offer to stop
- Explain WHY, not just WHAT — rationale over listing
- Ground in artifacts — focus on insights specific to this plan's research, decisions, and scratchpad entries, not general programming concepts
- Keep each section under 20 lines — this is a briefing, not a lecture
- NEVER skip sections or auto-start work — briefing is read-only; do not execute plan tasks or launch
phx-workwithout explicit user request - SECTION TEXT BEFORE THE QUESTION — every ★ Briefing block is
visible response text emitted before its
AskUserQuestion; never deliver a section only inside thinking or the question field
Closing Message
After final section (or when user stops):
That's the briefing! For full details, see:
{plan_path}
Ready to proceed? Try `phx-work {plan_path}` to start execution.
Post-work variant:
That's what was built! For full details, see:
{plan_path}
Consider `phx-compound` to capture key learnings for future reference.
Integration
phx-plan --> phx-brief (optional) --> phx-work --> phx-brief (optional)
create understand before execute understand after
Complex Plan Enhancement
For plans with 5+ phases or 4+ key decisions, consider suggesting
visual rendering after Section 3. See
references/visual-explainer.md for thresholds and commands.
Notes
- Runs in main conversation context (not a subagent)
- Model: no special requirement — uses default session model
- No artifacts written — briefing is ephemeral, plan IS the artifact
- Reference file readable since skill runs in user's session
Files (claude-elixir-phoenix)
-
references
-
briefing-guide.md 9.5 KB
# Briefing Guide Detailed templates for each section of the `phx-brief` interactive briefing. Two modes: pre-work (plan pending) and post-work (plan completed or in progress). ## Contents - [General Rules](#general-rules) - [Visual Formatting](#visual-formatting) - [Pre-Work Mode Sections](#pre-work-mode-sections) - [Post-Work Mode Sections](#post-work-mode-sections) - [Handling "Ask me a question about this"](#handling-ask-me-a-question-about-this) - [Edge Cases](#edge-cases) ## General Rules 1. **Each section: max 15-20 lines of output** — scan-friendly 2. **Use tables and bullet points** — no paragraphs of prose 3. **Ground everything in artifacts** — focus on insights specific to this plan's research, decisions, and scratchpad entries rather than general programming concepts. Quote from plan.md, scratchpad.md, and summaries 4. **Translate jargon** — convert `[P2-T3][ecto]` annotations into plain English like "Phase 2: set up the database schema" 5. **Highlight trade-offs** — decisions without trade-offs aren't interesting; focus on where alternatives existed ## Visual Formatting Wrap each section in a distinctive briefing block so output is visually distinct from normal conversation: ``` `★ Briefing ── {Section Title} ───────────────────` {section content — tables, bullets, etc.} `──────────────────────────────────────────────────` ``` Rules: - The `★` marker and box-drawing lines (`─`) create a scannable landmark that users learn to recognize across briefings - Keep the title short — it's the section name from the flow tables - Content inside follows all normal rules (tables, bullets, max lines) - The closing line has no label — just the border - **The block is VISIBLE response text, emitted before the `AskUserQuestion` call.** Composing the section in thinking and then calling the tool shows the user an empty briefing — only the "Continue?" dialog renders. Emit the block, then ask. --- ## Pre-Work Mode Sections ### Section 1: What We're Building **Source**: plan.md `## Summary` + `## Scope` **Template:** ```markdown `★ Briefing ── What We're Building ───────────────` {Rewrite the Summary in plain language — what does this feature DO for users? Not what files we'll touch.} **In scope:** - {scope item, rephrased as user-facing outcome} **Out of scope:** - {boundary, rephrased as "we're NOT doing X because Y"} **Size:** {N} tasks across {M} phases `──────────────────────────────────────────────────` ``` **Rules:** - Rewrite the Summary for a developer who hasn't seen the ticket - "In scope" items should answer "what will users see/do?" - "Out of scope" should explain WHY items were excluded, not just list them — pull from scratchpad DECISION entries if available - Include task/phase count so developers gauge effort ### Section 2: Key Decisions **Source**: plan.md `## Technical Decisions` table + `.claude/plans/{slug}/scratchpad.md` DECISION entries **Template:** ```markdown ### Key Decisions {For each row in Technical Decisions table:} **{Decision}**: We chose **{Choice}**. - Why: {Rationale from table} - Alternative rejected: {From scratchpad DECISION entry, if exists} - Trade-off: {What we give up with this choice} {If scratchpad has DECISION entries not in the table, include those too.} ``` **Rules:** - Max 4 decisions — pick the most architecturally significant - Always include the rejected alternative and WHY it was rejected - If no scratchpad exists, use only the table rationale - If a Decision Council was run (check for `summaries/decision-*.md`), mention the consensus/disagreement ### Section 3: Solution Shape **Source**: plan.md phase headers + `## Data Model` + `## System Map` (if exists) **Template:** ```markdown ### Solution Shape The implementation flows through {M} phases: | Phase | What Happens | Key Pattern | |-------|-------------|-------------| | 1: {Name} | {1-line summary} | {Primary approach} | | 2: {Name} | {1-line summary} | {Primary approach} | | ... | ... | ... | {If Data Model section exists:} **Data changes:** {1-2 sentences about schema/migration changes} {If System Map exists:} **Pages involved:** {List Place names from System Map} ``` **Rules:** - One line per phase — phase NAME + what it achieves - "Key Pattern" = the primary technique (e.g., "assign_async for lazy loading", "Oban worker with unique constraint") - Skip verification phase — it's always "run tests" - If System Map exists, list the Places (LiveView pages) as a quick mental model of the UI surface area ### Section 4: Risks & Confidence **Source**: plan.md `## Risks & Mitigations` + `## Phase 0: Spikes` (if exists) **Template:** ```markdown ### Risks & Confidence {If spikes exist:} **Unknowns to investigate first:** - {Spike description — what we don't know yet} **Key risks:** | Risk | Our mitigation | |------|---------------| | {risk} | {mitigation, rephrased as action} | **Confidence level:** {HIGH / MEDIUM / LOW} - {Justify: HIGH = no spikes, familiar patterns, existing tests} - {MEDIUM = some unknowns but mitigated} - {LOW = spikes needed, new territory} ``` **Rules:** - Confidence level is derived, not stated in the plan — assess based on: spike count, risk severity, pattern familiarity - Spikes = unknowns that MUST be resolved before main work - If no risks section in plan, say "No specific risks identified" rather than inventing concerns --- ## Post-Work Mode Sections ### Section 1: What Was Built **Source**: plan.md `## Summary` + checkbox completion status **Template:** ```markdown ### What Was Built {Summary rephrased in past tense — what this feature now DOES.} **Status:** {done}/{total} tasks completed {If blockers:} **Blockers:** {list blocked tasks} **Files changed:** {Count from progress.md or estimate from plan locations} ``` **Rules:** - Past tense throughout — "Added", "Created", "Configured" - Be honest about incomplete tasks and blockers - If progress.md exists, use it for accurate file counts ### Section 2: Key Decisions & Why **Source**: Same as pre-work Section 2, plus scratchpad entries written DURING work (DEAD-END, HANDOFF entries) **Template:** ```markdown ### Key Decisions & Why {Same format as pre-work Section 2, but also include:} {If scratchpad has DEAD-END entries:} **Approaches that didn't work:** - {Dead-end description}: {Why it failed, what we did instead} ``` **Rules:** - Dead-ends are valuable learning — always include them - Implementation notes on checked tasks (e.g., `[x] [P1-T3] Add user schema — citext for email`) contain decisions made DURING work. Extract and explain these ### Section 3: How It Was Built **Source**: plan.md phases with `[x]` checked tasks + implementation notes **Template:** ```markdown ### How It Was Built | Phase | Result | Notable Detail | |-------|--------|---------------| | 1: {Name} | {done}/{total} tasks | {Key implementation note} | | 2: {Name} | {done}/{total} tasks | {Key implementation note} | | ... | ... | ... | {If any tasks have inline implementation notes:} **Implementation highlights:** - {Task}: {what was actually done vs what was planned} ``` **Rules:** - Show completion ratio per phase - "Notable Detail" = anything that deviated from the plan or was particularly interesting - If implementation notes exist on tasks, surface the most important ones — deviations from plan are more interesting than tasks that went as expected ### Section 4: Lessons & Patterns **Source**: plan.md `## Patterns to Follow` + `## Risks` + scratchpad + progress.md **Template:** ```markdown ### Lessons & Patterns **Patterns used:** - {Pattern from codebase that was followed} {If risks materialized:} **Risks that materialized:** - {Risk}: {What actually happened and how it was handled} {If dead-ends exist:} **What to avoid next time:** - {Lesson from dead-end} **Compound candidate?** {If this solution involved a non-obvious fix or architectural decision, suggest `phx-compound` to capture it.} ``` **Rules:** - Focus on what FUTURE developers should know - Dead-ends and risk materializations are the most valuable lessons — always surface them - Suggest `phx-compound` only when there's genuinely novel knowledge worth capturing --- ## Handling "Ask me a question about this" When the user selects this option between sections: 1. Wait for their question 2. Answer using ONLY information from plan artifacts (plan.md, scratchpad.md, summaries, progress.md) 3. If the answer isn't in the artifacts, say so: "The plan doesn't cover this — you may want to check with the person who created it or run `phx-plan --existing` to research this aspect" 4. After answering, offer to continue to the next section ## Edge Cases **Empty scratchpad / no summaries**: Skip rationale deep-dives, rely only on plan.md Technical Decisions table. Note: "Limited context available — briefing based on plan document only." **Plan with 1-2 tasks**: Skip Section 3 (Solution Shape / How It Was Built) — it would repeat Section 1. Go directly from decisions to risks/lessons. **Plan from review file**: Mention the review origin in Section 1: "This plan addresses findings from a code review" and reference the review file path. **Mixed status (partially complete)**: Use post-work mode but clearly separate completed work from remaining work in each section. -
visual-explainer.md 2.3 KB
# Visual Explainer Integration When a plan's complexity exceeds what terminal-based briefings handle well, consider generating a visual HTML artifact using the [visual-explainer](https://github.com/nicobailon/visual-explainer) skill. ## When to Suggest Visual Output Suggest visual rendering when ANY of these apply: - Plan has **5+ phases** with cross-phase dependencies - Plan has **4+ key decisions** with competing trade-offs - Plan includes a **System Map** with 3+ pages and wiring - Post-work briefing shows **mixed completion** (some phases blocked, others done) — progress burndown is clearer visually ## What Visual-Explainer Provides | Cognitive Issue | Terminal Brief | Visual-Explainer | |----------------|---------------|-----------------| | Phase sequencing | Flat table | Mermaid flowchart with dependencies | | Decision trade-offs | Linear text per decision | CSS Grid constraint cards (pros/cons/rejected) | | Data model connections | Prose description | Entity diagrams with phase annotations | | Post-work progress | Text table with counts | Chart.js burndown / progress bars | | System Map wiring | Flat page list | Interactive Mermaid sequence diagram | ## How to Suggest At the end of Section 3 (Solution Shape / How It Was Built), if complexity thresholds are met, add: ``` This plan has {N} phases with cross-dependencies. Want a visual diagram? Try: `/generate-visual-plan` (requires visual-explainer skill) ``` Keep it as a **suggestion only** — never block the briefing flow. The terminal briefing remains the primary output; visual rendering is a complement for complex cases. ## Key Commands from Visual-Explainer - `/generate-visual-plan` — Render plan as styled HTML with Mermaid phase flow diagrams and decision cards - `/generate-slides` — Magazine-quality slide deck of the briefing - `/diff-review --slides` — Visual diff analysis (pairs well with post-work brief) - `/project-recap` — Context-switching snapshot (useful when resuming work on a plan after time away) ## Installation ```bash # Via Claude Code # Clone to ~/.claude/skills/visual-explainer git clone https://github.com/nicobailon/visual-explainer ~/.claude/skills/visual-explainer ``` See the [visual-explainer README](https://github.com/nicobailon/visual-explainer) for full setup instructions.
-
-
SKILL.md 4.6 KB
--- name: phx-brief description: Interactive briefing of a plan file — explains reasoning, schema decisions, component choices. Use when developers need to understand a plan before approving. --- # Plan Briefing Interactive walkthrough of a plan's reasoning, decisions, and solution shape. Designed for developers who need to understand a plan in 1-2 minutes instead of reading the full document. ## Why This Exists Plans answer "what to do" but bury "why." This skill bridges that gap with an interactive walkthrough. ## Usage ``` phx-brief # Latest plan phx-brief .claude/plans/user-auth/plan.md # Specific plan ``` ## Arguments - `$ARGUMENTS` = Path to plan file (optional, auto-detects latest) ## Mode Detection Read the plan file and determine mode from phase statuses: - **All phases `[PENDING]`** = Pre-work briefing (what WILL happen) - **Any phase `[COMPLETED]` or `[IN_PROGRESS]`** = Post-work briefing (what WAS done and why) ## Execution Flow ### Step 1: Locate and Load Plan 1. If `$ARGUMENTS` has a path, use it 2. Otherwise, find latest plan: Use Glob to find `.claude/plans/*/plan.md` and pick the most recent. 3. If no plan found, tell user and suggest `phx-plan` 4. Read the plan file ### Step 2: Load Supporting Artifacts Read what's available (don't fail if missing): - `.claude/plans/{slug}/summaries/consolidated.md` (research summary) - `.claude/plans/{slug}/scratchpad.md` (decisions, dead-ends) - `.claude/plans/{slug}/progress.md` (work log, post-work only) ### Step 3: Present Briefing Sections Present ONE section at a time, wrapped in the visual briefing block (see `references/briefing-guide.md` Visual Formatting). **The section MUST be emitted as visible response text BEFORE the `AskUserQuestion` call.** Content composed only in thinking/reasoning is invisible to the user, and the `question` field is too short to carry it. If the user would see only a "Continue?" dialog, the section was never shown. Write the ★ Briefing block as normal output first, then ask: - If sections remain: question "Continue the briefing?" with options **"Next: {title}"**, **"Ask me a question about this"**, **"Stop here"** - If final section: no question needed, show closing message ### Section Flow (Pre-Work Mode) | # | Title | Source | |---|-------|--------| | 1 | What We're Building | Summary + Scope | | 2 | Key Decisions | Technical Decisions + scratchpad rationale | | 3 | Solution Shape | Phases overview + Data Model | | 4 | Risks & Confidence | Risks table + unknowns/spikes | ### Section Flow (Post-Work Mode) | # | Title | Source | |---|-------|--------| | 1 | What Was Built | Summary + completion status | | 2 | Key Decisions & Why | Technical Decisions + scratchpad | | 3 | How It Was Built | Phases with implementation notes | | 4 | Lessons & Patterns | Risks encountered + patterns used | See `references/briefing-guide.md` for section content templates. ## Iron Laws 1. **ONE section at a time** — never dump all content 2. **User controls pace** — always offer to stop 3. **Explain WHY, not just WHAT** — rationale over listing 4. **Ground in artifacts** — focus on insights specific to this plan's research, decisions, and scratchpad entries, not general programming concepts 5. **Keep each section under 20 lines** — this is a briefing, not a lecture 6. **NEVER skip sections or auto-start work** — briefing is read-only; do not execute plan tasks or launch `phx-work` without explicit user request 7. **SECTION TEXT BEFORE THE QUESTION** — every ★ Briefing block is visible response text emitted before its `AskUserQuestion`; never deliver a section only inside thinking or the question field ## Closing Message After final section (or when user stops): ``` That's the briefing! For full details, see: {plan_path} Ready to proceed? Try `phx-work {plan_path}` to start execution. ``` Post-work variant: ``` That's what was built! For full details, see: {plan_path} Consider `phx-compound` to capture key learnings for future reference. ``` ## Integration ```text phx-plan --> phx-brief (optional) --> phx-work --> phx-brief (optional) create understand before execute understand after ``` ## Complex Plan Enhancement For plans with 5+ phases or 4+ key decisions, consider suggesting visual rendering after Section 3. See `references/visual-explainer.md` for thresholds and commands. ## Notes - Runs in main conversation context (not a subagent) - Model: no special requirement — uses default session model - No artifacts written — briefing is ephemeral, plan IS the artifact - Reference file readable since skill runs in user's session
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.