From grimoire
Writes technical specifications for non-trivial engineering changes before implementation. Captures problem statements, goals, proposed solutions, alternatives, and open questions. Based on practices from Stripe, Google, and Notion.
How this skill is triggered — by the user, by Claude, or both
Slash command
/grimoire:write-tech-specThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Write a technical specification that aligns engineers on what to build and how before implementation begins — capturing the problem, proposed solution, alternatives considered, and open questions.
Write a technical specification that aligns engineers on what to build and how before implementation begins — capturing the problem, proposed solution, alternatives considered, and open questions.
Adopted by: Stripe (engineering blog documents mandatory design docs for services), Google (design doc culture is central to the engineering process, documented in "Software Engineering at Google"), Notion, Airbnb, Dropbox, and most engineering organizations above ~20 engineers.
Impact: Google's "Software Engineering at Google" (O'Reilly, 2020) reports that design docs catch ~50% of design flaws before any code is written. A spec review that takes 2 engineer-hours prevents weeks of rework. Studies cited in the book show that the cost to fix a bug found during design is 10× cheaper than finding it during testing and 100× cheaper than finding it in production.
Why best: Technical specs externalize design reasoning. Without them, critical decisions exist only in one engineer's head, making onboarding harder, debugging slower, and post-mortems incomplete. The discipline of writing forces the author to think through edge cases, failure modes, and alternatives they might skip when coding. Specs also create a historical record of why decisions were made — invaluable when those decisions are questioned six months later.
Sources: Titus Winters, Tom Manshreck, Hyrum Wright, "Software Engineering at Google" (O'Reilly, 2020, Chapter 10); Stripe Engineering Blog; Google Technical Writing Course (developers.google.com/tech-writing); Gergely Orosz, "The Software Engineer's Guidebook" (2023).
Write the problem statement (2–4 sentences): what technical problem are you solving? Why does it exist now? What breaks if you don't solve it? Include relevant metrics or incident data if available.
State the goals and non-goals: goals are the specific outcomes the solution must achieve. Non-goals are explicitly out of scope. Both must be measurable or clearly bounded. Example goal: "Reduce p99 latency of the search API from 2.1s to under 500ms." Example non-goal: "This spec does not address search ranking — that is handled separately."
Describe the proposed solution in enough detail that a senior engineer who wasn't in any of the planning meetings could implement it. Include:
List alternatives considered — at least two. For each alternative: what it is, why you considered it, and why you rejected it. This section is not optional. Without it, reviewers will suggest alternatives you already evaluated, and future engineers won't know why the current approach was chosen.
Address operational concerns:
Write the open questions section — anything unresolved that needs a decision before or during implementation. Assign each question to an owner with a target resolution date.
Estimate scope: rough implementation timeline by phase, and which teams or engineers are needed. This is for planning purposes, not a commitment.
Get async written review from: the tech lead or staff engineer for the affected system, engineers who will implement the work, and any teams that own dependencies. Collect feedback in the document itself, not in Slack threads.
Resolve open questions and update the spec before engineering kicks off. The spec should reflect the final agreed design, not just the initial proposal.
Problem statement (bad): "We need to refactor the payments service to be more scalable."
Problem statement (good): "The payments service processes all transactions synchronously in a single process. At current growth (20% MoM), we will exceed our single-process throughput ceiling within 60 days. The P0 incident on 2024-01-15 (COE-447) was caused by exactly this bottleneck. This spec proposes async processing via a job queue to decouple ingestion from processing."
Alternatives considered (bad): "We considered other approaches but this one was best."
Alternatives considered (good):
Alternative 1: Vertical scaling (larger instance type)
- Considered: Yes. Estimated cost: $4,200/month additional.
- Rejected: Buys ~4 months at current growth before hitting the next ceiling. Does not address the architectural bottleneck.
Alternative 2: Database read replicas
- Considered: Yes. Addresses read load but not write throughput.
- Rejected: Our bottleneck is write processing, not reads (see profiling data in Appendix A).
API contract (bad): "The endpoint will return user data in JSON."
API contract (good):
POST /v1/payments/queue
Request: { "amount": integer (cents), "currency": "USD"|"EUR", "idempotency_key": string (UUID) }
Response 202: { "job_id": string, "estimated_completion_ms": integer }
Response 400: { "error": "invalid_currency", "message": string }
Response 409: { "error": "duplicate_idempotency_key", "job_id": string }
Response 429: { "error": "rate_limit_exceeded", "retry_after": integer (seconds) }
npx claudepluginhub jeffreytse/grimoire --plugin grimoireCreates structured technical specification documents bridging product requirements and engineering implementation. Covers problem framing, data model, API design, alternatives, security, testing, and rollout.
Writes technical specifications for post-decision implementation details including API contracts, database schemas, system architecture, and developer guides.
Creates technical specifications interactively by gathering requirements, exploring codebases, running planning interviews, drafting with Mermaid diagrams, expert review, and iteration. For new features or projects needing architecture and decisions.