/max:tech-specfrom max
Transforms a PRD into a technical implementation spec with module decomposition, tracer-bullet sequencing, and a grill gate. Bridges the 'what and why' of a PRD and the 'how' an agent needs to execute.
Ships in max. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Turn a PRD (the "what and why") into a technical implementation spec (the "how"). A tech-spec answers: which modules do we build, in what order, with what interfaces, and what can go wrong along the way.
Inspired by Ouroboros's Double Diamond execution decomposition (Discover → Define → Design → Deliver), John Ousterhout's A Philosophy of Software Design (deep modules), and the classic "design doc" form used at big engineering orgs.
Input: a PRD (as a file path, conversation content, or caller-injected context) + the codebase.
Output: a technical spec as markdown. Default destination: docs/tech-specs/<slug>.md. Callers can override.
What this skill does NOT do: re-litigate the PRD. If the PRD is unclear, invoke max:grill-me on it, or push the user back to max:write-prd. Tech specs build on PRDs; they don't replace them.
Composition chain: caller → write-prd (outputs PRD) → tech-spec (outputs implementation plan) → grill-me (stress-tests the plan) → return to caller.
Read the PRD from wherever the caller points at — file path, conversation, or pre-loaded context. Verify every PRD section has content (Goals / Requirements / Non-Goals / Constraints / Approach / Open Questions).
Hard-stop if these are missing:
If either is missing, STOP and tell the user: "This PRD needs sharpening before I can tech-spec it. Want me to invoke max:grill-me on the PRD first, or do you want to revise it yourself?"
Warn but proceed if these are weak:
Before designing the solution, understand the constraints the PRD's Approach section gestured at.
What to look for:
Output of this phase: a mental model rich enough to decompose the work. You should be able to answer: "Given this codebase, what shape does the solution naturally want to take?"
Time budget: 10-20 minutes. If you find yourself reading beyond that, the PRD scope is too big — push back and ask for a slice.
Break the work into modules with clear interfaces. This is where deep-module thinking applies.
Deep module test (Ousterhout): A module is deep if its public interface is much smaller than the implementation it encapsulates. A class that exposes 3 methods but internally handles 500 lines of complexity is deep. A class that exposes 20 methods that are each 2-line wrappers around something else is shallow.
Good deep modules:
TranscriptParser — public: parse(text) -> Transcript. Internal: tokenization, speaker detection, timestamp normalization, punctuation recovery.CacheEvictionPolicy — public: shouldEvict(entry, now) -> Bool. Internal: LRU tracking, priority weighting, size accounting.ExportManager — public: export(document, format) -> URL. Internal: format-specific renderers, asset collection, zip packaging.Bad shallow modules:
TextUtils with 15 static methods each wrapping one line of string manipulationDatabaseHelper whose methods all take a SQL string and pass it to the underlying clientEventMiddleware that exists only to re-emit events on a different nameDecomposition steps:
TranscriptParser good, StringProcessor bad.Present the decomposition to the user in chunks (2-3 modules at a time). Get approval on each module before proceeding to the next.
For each module in the decomposition, spec:
### <Module Name>
**Responsibility:** <what this module does in one sentence. If it takes more than one sentence, it's two modules.>
**Public interface:**
```swift
struct TranscriptParser {
func parse(_ text: String) throws -> Transcript
func parseStream(_ bytes: AsyncBytes) -> AsyncThrowingStream<TranscriptFragment, Error>
}
Invariants:
Failure modes:
TranscriptError.emptyTranscriptError.unsupported(format)Tests (behaviors to verify):
**Rules:**
- **Concrete signatures, not prose.** Code blocks are more honest than "a parse method that takes text".
- **Invariants are load-bearing.** They tell future maintainers what must always be true.
- **Failure modes belong next to the interface.** Error handling isn't an afterthought.
- **Tests are behaviors, not implementation steps.** "Parses VTT" not "calls tokenizer then builds speaker map".
### Phase 5: Deliver (sequence the work)
Order the modules for execution. Wrong order causes cascading rework.
**Principles:**
1. **Foundations first.** Modules with no dependencies go first. You need data types before the services that manipulate them.
2. **Tracer bullet through the whole stack.** Before polishing any single module, prove the architecture works end-to-end with a thin vertical slice. This means building a minimal version of every layer to get one happy-path scenario working, then going back to fill in each layer.
3. **Risky modules early.** If something's likely to need rework (unfamiliar API, performance unknown, integration concern), find out early. A failed tracer bullet in week one is cheaper than a failed integration in week three.
4. **Leaf modules last.** Polish, edge cases, and non-critical paths come after the core path is proven.
**Example sequencing** (a hypothetical "add a transcript search feature"):
The tracer bullet comes at step 4, not step 8. After step 4 you KNOW the architecture is viable; the remaining work is filling in, not discovering.
### Phase 6: Grill gate
Invoke `max:grill-me` in spec mode against the tech spec. Threshold: 0.2 (same as PRDs — tech specs are what agents execute against).
The grill's dimensions map naturally:
- **Goals** — is the module decomposition obviously correct, or are there unresolved decisions?
- **Acceptance** — does each module have concrete "done when" criteria (tests listed)?
- **Boundaries** — are Non-Goals preserved from the PRD? Any scope creep introduced at the tech spec level?
- **Alternatives** — which decompositions did we consider and rule out?
- **Assumptions** — which constraints are verified (via Phase 2 exploration) vs. guessed?
Iterate on the spec until below threshold, or let the user override.
**Fallback if `max:grill-me` is not available:** self-review against the five dimensions, flag any gaps, ask one clarifying round, and exit.
### Phase 7: Output
Write the tech spec to `docs/tech-specs/<slug>.md` (or caller-specified destination). Print the path and ambiguity report.
Return control to the caller.
---
## Output format
```markdown
# <Feature Name> — Technical Spec
## Context
<Link to the source PRD. Summarize in 2-3 sentences what this spec implements.>
## Decomposition
<Bulleted list of modules with 1-line descriptions. This is the table of contents.>
- **TranscriptIndex** — in-memory index over transcript content
- **TranscriptIndexer** — populates the index from Bugbook pages
- **SearchQuery** — parses search input into executable queries
- **SearchResultsView** — displays ranked results with highlighting
## Modules
### TranscriptIndex
**Responsibility:** ...
**Public interface:** ...
**Invariants:** ...
**Failure modes:** ...
**Tests:** ...
### TranscriptIndexer
...
## Sequence
Ordered list of modules with rationale for the order. Call out the tracer bullet boundary.
## Open Questions
Anything unresolved that the PRD didn't cover. Tag with who needs to answer.
## Ambiguity Report
<Appended by grill-me at exit.>
A small tech spec, for the "Cmd+K focuses search bar" PRD example in max:write-prd:
# Cmd+K focuses search bar — Technical Spec
## Context
Implements the PRD at `docs/prds/cmd-k-search-focus.md`. Adds a Cmd+K
keyboard shortcut that focuses the sidebar search field from anywhere in
the app, expanding the sidebar first if collapsed.
## Decomposition
- **SearchFocusCoordinator** — owns the focus state and the expand-sidebar-if-needed sequence
- **ContentView shortcut binding** — attaches the Cmd+K keyboard shortcut at the app-level container
## Modules
### SearchFocusCoordinator
**Responsibility:** Own the search field's focus state and the sequencing logic
for focusing it even when the sidebar is collapsed.
**Public interface:**
```swift
@MainActor
final class SearchFocusCoordinator: ObservableObject {
@Published var isSearchFocused: Bool = false
func requestFocus()
func releaseFocus()
}
Invariants:
requestFocus() always results in isSearchFocused == true after a short delay,
regardless of sidebar stateContentView acts onFailure modes:
requestFocus
is a no-op. The caller is expected to check for blocking state before calling.Tests:
requestFocus sets isSearchFocused to truereleaseFocus sets it back to falserequestFocus calls are idempotent (no focus-stealing loop)Responsibility: Attach the Cmd+K keyboard shortcut at the root SwiftUI view so it's available regardless of which child view is focused.
Public interface:
// In ContentView body:
.keyboardShortcut(.init("k"), modifiers: .command, action: { coordinator.requestFocus() })
Invariants:
.keyboardShortcut)Failure modes:
coordinator isn't yet injected into the environment, crash early with a
clear error — don't silently no-opTests:
max:verify-before-done)max:tdd)isSearchFocused at the sidebar level, expand if needed, then focus)The tracer bullet is deliberately thin. Step 2 proves the shortcut-to-focus path works end-to-end with the simplest possible sidebar state (already expanded). Steps 3-4 fill in the edge cases after we know the core wiring is right.
@FocusState but cross-view restoration isn't built-in. Investigation needed.Notice:
@MainActor on the view model" is an implementation choice. Tech specs define what the module should do, not how it's written line-by-line. If you catch yourself writing code in the spec, stop.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
tech-spec, implementation-plan, software-design, prd-to-spec
npx claudepluginhub max4c/skills --plugin max11 skills in this plugin
/cookoffAuto-grill a plan, spec, or ticket by running Claude and Codex as interrogator/answerer pairs instead of interviewing the user. Two modes — relay (iterative back-and-forth between Claude and Codex) and parallel (two swapped streams merged into one spec). Produces a pre-chewed artifact where the user only reviews the result, not sits through the interview. Use this skill whenever the user says "cookoff", "pre-grill this", "have codex grill it", "dual grill", "grill this without me", "run grill-me with codex", "cross-examine this plan", or wants the ambiguity-resolution work done autonomously before they review. Also use when the user has a plan/spec/PRD that would normally go through max:grill-me but explicitly wants to skip being interviewed themselves. Supports `--to-tickets` to emit the grilled spec as Dahso Agent Tickets ready for `/go`, and `--to-tickets --go` to chain straight to `dahso:go` without a review pause./design-interfaceExplore multiple radically different interface designs for a feature in parallel before committing to one. Uses parallel sub-agents to generate distinct approaches so you can compare tradeoffs rather than anchoring on the first idea. For UI/UX interface work specifically — not API interface design. Use when the user says "design-interface", "let's explore some designs for X", "what are the options for this screen", or before building any non-trivial UI./grill-meInterview the user relentlessly about a plan, spec, or ticket until every branch of the decision tree is resolved. Produces a per-dimension ambiguity report (Goals / Acceptance / Boundaries / Alternatives / Assumptions) and an aggregate gate. Use this skill whenever the user is drafting a spec, proposing a design, debating an approach, or describing work to hand off — even if they don't say "grill me". Explicit triggers include "grill me", "stress-test this", "am I missing anything", "what are the risks", or any time a non-trivial plan is being finalized. Also invoked as a subroutine by max:write-prd Phase 5, max:tech-spec Phase 6, max:improve-codebase Phase 5, bugbook:flow Phase 2d, bugbook:prep Phase 3, and bugbook:ticket Phase 2d./grill-with-docsA grilling session that stress-tests a plan against the project's documented domain model — sharpens fuzzy terminology, challenges it against the existing glossary, cross-references it with the code, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallize. The domain-aware variant of grill-me — use this instead when the repo has (or should have) a CONTEXT.md glossary or docs/adr/ decision records. Triggers include "grill with docs", "stress-test this against our domain model", "does this match our language", "check this against our glossary", "grill this and update the docs", or any time a non-trivial plan needs to be reconciled with the project's documented decisions./handoffCompact the current conversation into a handoff document so a fresh agent can pick up the work without re-deriving context. Writes a self-contained brief to the OS temp directory — what's been done, what's left, key decisions, gotchas, and which skills to invoke next. Use when the user says "handoff", "write a handoff", "hand this off", "compact this for a new session", "summarize this for another agent", "I'm running low on context", or is about to start a fresh session on the same work. Takes an optional argument describing what the next session will focus on./improve-codebaseArchitectural review and improvement proposals. Reads the codebase for structural opportunities — shallow modules that should be deepened, leaky abstractions, misplaced complexity — and proposes specific changes with tradeoffs. Uses a four-persona pass (Contrarian, Simplifier, Architect, Hacker) to stress-test proposals before presenting. Not a refactoring bot; it produces proposals, not commits. Use when the user says "improve-codebase", "architectural review", "where is this codebase weak", or before starting a big refactor.Other plugins' skills for the same job