/flagrare:tdd-writerfrom Flagrare
Drafts Technical Design Documents by analyzing codebase and fetching ticket/design context via MCP. Verifies every technical claim against actual code and marks unknowns explicitly. Use for planning large projects or writing TDDs.
Ships in Flagrare. 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.
Draft Technical Design Documents for staging up large or complex projects. A TDD is a communication tool: a reader who has never seen the work should be able to read it start to finish and come away understanding what you're proposing, why, and how it will be built. It is not a form to fill in, and it is not a checklist with the prose removed.
REQUIRED BACKGROUND: Invoke /flagrare:write-docs before drafting. This skill owns what a TDD must cover and how to verify it; write-docs owns how to make the prose readable. The single most common failure of an AI-drafted TDD is the "medicine sheet", every section flattened into terse bullets, no causality, nothing a human wants to read. The craft layer in write-docs is the antidote, and the section "Writing the document" below applies it specifically to TDDs. Read both; do not skip the handoff.
Never assume, imply, or hallucinate ANY technical information.
Every piece of information about architecture, code, systems, services, data models, and APIs must be:
Use these markers:
[UNKNOWN: Brief description of what's missing]
[NEEDS VERIFICATION: What needs to be checked and where]
[TBD: Decision pending - who needs to decide]
Before drafting, collect and verify information from all available sources.
Step 1: Fetch External Context via MCP
Jira/Linear ticket (if provided):
Confluence/Notion docs (if referenced):
Figma designs (if linked):
Step 2: Explore Existing UI (if modifying an existing system)
If the feature modifies an existing interface, explore the current state:
Step 3: Analyze Codebase (required)
Read actual code before writing technical details:
Step 4: Mark All Unknowns
After gathering, explicitly list what could NOT be verified:
Before drafting, run /flagrare:measure-impact with before <ticket, doc or initiative link> full called by /flagrare:tdd-writer. Use what it returns in two places: the For product paragraph at the top of the Introduction (the bet, the number it should move with today's value and its source, how sure we are, what is out of scope), and the Analytics or Observability section (how the change will be tracked). When it reports a baseline as unknown, keep that visible in the doc ("baseline unknown: ") instead of inventing a number.
The template below is a coverage checklist for the author, not a layout for the reader. It lists what a good TDD considers. It does not mean each heading gets three bullets and a code block. As you fill it, follow one rule above all others: write each section as prose a colleague could read aloud. Reach for a list or table only when the content is genuinely parallel and order-independent, a roster of endpoints, a t-shirt-size scale, a test matrix. The moment a "list" has bullets that depend on each other (this happens, then that, because of the other), it's a paragraph wearing a list costume. Write the paragraph.
Drop sections that don't apply rather than filling them with "N/A" noise. Mark ANY unverified information with the markers above.
# TDD: [Initiative Title]
**Author:** [Name]
**Team:** [Team/Squad Name]
**Status:** IN REVIEW | GO | NO GO
**Links:**
- Ticket: [link]
- Designs: [link]
- Docs: [link]
---
## Introduction
### For product
[3 to 5 plain sentences a product manager can read without the rest of the doc: what changes for users, the bet from /flagrare:measure-impact (the number it should move, today's value and its source, how sure we are), and what is out of scope.]
### Context
[1-2 paragraphs: What problem are we solving? Business-oriented terms.]
### Problem Statement (Current State)
[Current limitations, pain points, gaps.]
### Current Flow (if modifying existing system)
[Document the existing UI and user flow.]
### Proposed Solution
[2-3 sentences: How do you plan on solving it?]
### Long Term Vision
[How does this bring us closer to the team's long-term goals?]
---
## Decision Record
- **Driver:** [Author]
- **Approver:** [EM or senior IC with domain expertise]
- **Contributors:** [Your team, affected teams]
- **Informed:** [Engineering, PM, relevant stakeholders]
---
## Phase 1
### LOE (T-Shirt Size)
| Size | Time |
|------|------|
| XS | 1-2 days |
| S | 1 week |
| M | 2 weeks |
| L | 4 weeks |
| XL | 4+ weeks |
**This phase:** [SIZE]
### External dependencies & impact
[Prose. Who else is affected and how? Name the teams that depend on this or whose
systems you touch, the vendors (with cost) you're adding, the libraries or internal
services you'll lean on, and the consequence of each. A reader should learn not just
*that* Team X is involved but *what they have to do because of this work*.]
### Concepts
[Prose. Introduce each new idea or model and, crucially, how they relate. This is
where causality lives, "an Order owns many LineItems, and a LineItem can't outlive
its Order", so resist turning it into a glossary of disconnected terms.]
### System architecture, data model & APIs
[The technical heart. Walk the reader through the design as a story: the shape of the
data, what flows where, and the one or two decisions that everything else hangs on.
Lead with the decision and its reason, then show the artifact.
- **Data model:** Describe in prose what's changing and why, then show the actual
schema/migration. A reader should understand the *semantics* before they read the
column list. Reserve tables for the column inventory itself.
- **APIs:** Say what the client experiences differently and why you chose this shape,
then include the real endpoint/proto/GraphQL definition inline (verified against
source). A list is right for the *roster* of endpoints; prose is right for the *why*.
- **Business logic:** Explain non-trivial logic as a narrative of what happens and
when. Number the steps only when they're a true sequence. Call out load, response,
and caching considerations where they bite, not as a trailing bullet dump.]
### Testing
[One or two sentences on the testing strategy, what gives you confidence this is
correct, then the matrix. The table is genuinely parallel data, so a table earns its
place here. Follow `/flagrare:testing-philosophy`: integration-heavy, behavior over
implementation, and, for any user-facing flow, at least one end-to-end test of the
critical happy path (a browser journey, a running-service HTTP test, a CLI subprocess,
or a public-API consumer, depending on the surface). "Mostly integration" is not "skip
e2e."]
| Scenario | Type | Data Considerations |
|----------|------|---------------------|
| [scenario] | unit/integration/e2e/manual | [special data] |
**What won't be tested:** [Prose. State the exclusions and *why* they're acceptable.]
### Localization
[Prose, if applicable. Translation strategy and what triggers it.]
### PII
[Prose. New PII fields? PII persisted outside the primary database? Name the field and
the handling, not just "yes".]
### Observability & alerting
[Prose. What new signal will exist, and, more importantly, what question each
metric/dashboard/alert answers when something goes wrong.]
### Security
[Prose. Auth, permissions, and any vulnerability surface this opens or closes, with
the mitigation in the same breath.]
### Analytics
[Prose. New or modified events and where they land, framed by what decision the data
supports.]
### Rollout strategy
[Prose. Walk through how this reaches production, dry run, stealth mode, feature
flags, gradual percentages, as a sequence with reasons, not a checklist of toggles.
The reader should understand the *risk posture*, not just the mechanics.]
### Post-deployment monitoring
[Prose. How will we know it's working? Name the queries/dashboards and who watches
them, so a reader could verify success themselves.]
### Risks
[Prose. Each known risk paired with its mitigation in the same sentence or paragraph.
A risk listed without a mitigation reads as an unanswered worry.]
### Documentation
[Prose. What docs need to exist or change, and for whom.]
### Open questions
- [ ] [Genuinely open question, a real fork, not a placeholder]
- [ ] [Another, if any]
### Alternative solutions
[Prose. The options you considered and *why you discarded them*. This is one of the
most-read sections in any TDD, reviewers come here first to check you weren't naive,
so give each alternative a fair sentence and an honest reason it lost.]
---
## Phase 2
[If applicable]
## Future Work
[Deferred items]
Verification (a drafting artifact, NOT a section of the shipped TDD). While drafting, keep a private checklist of what you verified and what you couldn't, sources checked (ticket, docs, code files, proto, schemas) and information gaps ([UNKNOWN], [NEEDS VERIFICATION], [TBD]). This keeps you honest and tells you what's still unproven. It is scaffolding for the author, so strip it from the document you present. A reader answering what/why/how does not need your sources list; genuinely-open decisions live in Open Questions, not a gaps dump. (Earlier versions of this skill shipped a "Verification Summary" section in the doc, that was wrong; it is a checklist you run, not content you publish.)
This is where TDDs live or die. You've gathered verified facts; now you have to turn
them into a document a busy senior engineer will actually read. The craft layer is in
/flagrare:write-docs, invoke it, but here is how its principles land in a TDD.
Lead each section with the reader's situation, not the section's topic. Compare "This section describes the data model changes." (metadata, it has done zero work) with "Orders currently can't be partially refunded because the schema models a refund as a single boolean. We're replacing that with a refund ledger." The second sentence tells the reader where they are and where you're taking them. The opening line of every section should state a conclusion, name a problem, or ask a question.
Prose carries causality; lists flatten it. A TDD is mostly because and so that and before, exactly the relationships a bullet list erases. When you catch yourself writing a list whose items depend on each other, you've found a paragraph. Keep lists for the genuinely parallel: a roster of endpoints, a t-shirt scale, a test matrix, a checklist of sources verified. (This is the single biggest lever against the "medicine sheet" feel the operator complained about.)
Put context at the point of need. The first time a reader meets client_secret or
OrderProjection or a service name, define it inline in the same sentence, not in a
glossary, not three sections up. The reader who knows skips it; the reader who doesn't
is rescued exactly where they got lost.
Voice and tone. Use "We will…", conversational but precise. Be direct about scope and limitations; a TDD that hides its gaps loses reviewer trust faster than one that names them. Keep the voice the same throughout; let the tone tighten in the dense technical sections and warm slightly in the context and vision.
Diagrams. A good diagram replaces three paragraphs of prose, so prefer Mermaid for any non-trivial flow or architecture:
flowchart TD
A[User Action] --> B{Decision Point}
B -->|Option 1| C[Service A]
B -->|Option 2| D[Service B]
C --> E[Database]
D --> E
Color-code consistently, yellow/maize for existing architecture, blue for new, so a reader can see the boundary of the change at a glance. When you show alternatives in a diagram, mark the chosen path. Reference exact, verified file paths and show directory layout for new components, but do it in service of the narrative, not as a standalone inventory.
Show what you name. Every existing screen, service or file the TDD mentions gets a
link at first mention (code pinned to a commit) and every screen gets a cropped dev
screenshot with a caption that says what to look at. A proposed UI gets a clickable
mockup, and code citations go in collapsible toggles. /flagrare:write-docs ("Show
what you name") has the full set of moves.
Do not end your turn the moment the draft is assembled. A complete-looking TDD reads as "done," but the craft pass (Phase 3 / /flagrare:write-docs) and this review still have to happen before you present it. Drafting and stopping is a stall, continue through review in the same turn. (Same pattern as docs/research/2026-06-11-claude-code-goal-anti-stall.md.)
Run the write-docs self-check, read the document aloud; sentences that choke on the
tongue usually nominalize a verb or rely on a bullet list to carry a relationship the
prose should have carried. For a finished draft heading to reviewers, /flagrare:editorial-pass
is the full version of this review: a whole-document read (throughline, pacing, consistency)
plus the noise hunt the Restraint rules below only summarize. Then confirm:
Once the review passes, present the TDD and close with a tool, not prose: issue an AskUserQuestion (e.g. Looks good / Revise a section / Mark ready for review) so the turn ends on a clear next step rather than trailing off after a long document.
Craft (the "medicine sheet"):
Verification:
Restraint (the TDD answers three questions: what are we solving, why, and how, for a reader who has never seen the work). Everything that doesn't serve those is noise that raises the reader's risk and mental load):
/flagrare:write-docs teaches; restraint here means applying it, not just trimming length.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub flagrare/agent-skills --plugin flagrare43 skills in this plugin
/atdd-planProduce an ATDD-first implementation plan in Claude Code's native plan mode, with named design patterns called out where they earn their keep. The skill enters plan mode automatically (via the EnterPlanMode tool), runs /flagrare:codebase-explore to ground the plan in the actual codebase, then produces a plan-mode plan that MUST include both: (1) 3-5 acceptance tests in plain English defining 'done' before any implementation, written behavior-first against the public API only; and (2) any non-trivial structural decisions named as design patterns with a one-line rationale. Plan mode's native approve/edit/reject button UI is the close, ExitPlanMode is how the skill ends. Use whenever the user wants to plan a feature, fix, or refactor, 'how should we implement X', 'plan this', 'let's design X', 'where do we start on Y'. Tests follow Kent Dodds Testing Trophy: behavior over implementation, integration-heavy, public-API-only, refactor-proof. The skill stops at the plan; it does not write implementation code./brag-docGenerate a comprehensive, impact-framed brag-doc entry for a chosen time window (day, week, biweek, month, or custom). Pulls authored PRs, reviews given, commits, deploys, and linked tickets across GitHub, local git, and configured MCPs, then synthesises a themed narrative, leading with outcomes, quantifying impact, owning the work in first-person past tense, separating IC contributions from amplification, and naming the judgment exercised. Output is designed to drop straight into a developer journal, a personal bragging sheet, or a performance-review packet. Accepts a mode argument, `/flagrare:brag-doc resumancer` renders the output as ready-to-paste Resumancer CLI commands (`resumancer impact "..." --branch ...`) instead of markdown. Use whenever the user says "brag doc", "brag sheet", "what did I do this week", "weekly recap", "monthly recap", "performance review prep", "what should I tell my manager", "summarise my impact", "career log entry", "give me my wins", "biweekly recap", or any variant about looking back over a longer window than a single day's standup. Also trigger near review season ("self-review", "perf packet", "evaluation prep"), and on phrases like "log my wins to resumancer" or "make resumancer entries for this week" (which should pass the `resumancer` mode). For windows longer than about a month, a tenure retrospective, a departure record, or "everything I did at this company", hand off to `/flagrare:impact-timeline` instead; this skill's window tops out at a month./bug-bashProgrammatic bug bashing, ingest a prescribed test plan (Notion, markdown, pasted spec), drive a real running system (browser via Chrome DevTools / Playwright MCP, backend via API tools when relevant), run every prescribed case with evidence, then do exploratory passes (viewports, edge inputs, multi-actor flows, codebase-driven concerns, additional context like meeting transcripts, emails and links checked in the real inbox with a control case, other languages, failures and races) without ever claiming a bug it didn't itself reproduce. Fills free-text fields with tagged, playful test data that also probes something (unicode, HTML, template syntax, length). Lands results in a local MD file by default, optionally writes back to the source (Notion bug DB, test case Eng QA columns, etc.) in the user's voice. Use whenever the user says 'bug bash', 'QA this feature', 'run the test cases', 'go through this test plan', 'verify these scenarios', 'do a bash on X', when they hand over a Notion test case page, or any time programmatic end-to-end verification of a feature against a checklist is needed. Also use it when a smoke test passed but the user wants more cases tested, or asks 'what else should we test' and then 'test it yourself'. Make sure to use this skill even when the user just says 'test this Notion page' or 'check these scenarios', anything that smells like running someone else's prescribed test plan against a live system./careerRun the career skills that are due, in one pass, and return one short combined digest plus an updated board. It reads timestamps and flags to decide: the promotion map's first run when there is none (after asking), a refresh of map sections that are older than 90 days or flagged by a scan, an opportunity scan when the last one is a month old, and an impact scan every time. The digest leads with the initiative the user owns and its next step, then up to 5 threads worth weighing in on, one line on the promotion map (open rubric rows, people who haven't seen the work, when to talk to the manager, the packet deadline), anything that needs the user, and an "all answering, nothing owned" warning when the user keeps replying but owns nothing. A scheduled run (from /loop or a schedule) never asks questions and never posts; it lists what needs the user as pending. Use when the user says "career", "career check", "career digest", "run my career skills", "what should I do for my promotion this week", "daily career scan", or sets up a recurring career run. Also trigger for a scheduled career run./codebase-exploreExplore the codebase to map conventions, reusable utilities, analogous features, and data flows relevant to a planned change. Returns raw findings (file paths, patterns, code snippets), does NOT produce a plan. Used by /flagrare:atdd-plan as its codebase understanding step./communication-setupSet up, change or remove how Claude talks to you: a custom output style with your reply rules, a reminder of those rules on every message, and a Stop hook that quietly nudges Claude when a reply runs a little long and blocks one that runs far past your limit. Use when the user says Claude's replies are too long, exhausting, hard to skim, full of process narration or caveats, 'you make me work for the information', 'talk to me shorter', 'communication setup', 'set up how you talk to me'; when the length check or reply-length hook blocked a reply it shouldn't have, or the user wants a different limit or style; or asks to remove or undo it ('remove communication setup', 'go back to normal replies').Other plugins' skills for the same job