/tbsheff-skills:writing-architecture-plansfrom tbsheff-skills
Write concise implementation-ready architecture plans and ADRs with human naming, ASCII diagrams, pseudocode, proposed file trees, call stacks, calldiff-style call-flow diffs, API contracts, state/failure models, concurrency and idempotency semantics, rollout steps, testable invariants, and optional standalone HTML output. Use for architecture plans, ADRs, system redesigns, migrations, saga/workflow design, service boundaries, reliability work, and technical implementation planning.
Ships in tbsheff-skills. 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.
Read when SKILL.md points to them.
Produce plans engineers can implement without translating architecture prose into code first.
Use as few words as possible without dropping a decision.
Prefer:
diagram
pseudocode
contract
file tree / call stack / call-flow diff
table
prose
Use prose mostly for why. Use code-shaped artifacts for how.
Default to markdown; also support html and both. Use HTML for visual artifacts, webpages, or explicit HTML requests. HTML must preserve the same decisions, names, contracts, and invariants as Markdown. Read references/html-output.md.
When repository access exists, inspect the code before designing around it.
Read the smallest useful set:
Verify behavior from source, not memory.
Do not preserve a bad abstraction merely because the current code uses its name.
Choose words that describe what a person thinks is happening.
Prefer ordinary nouns:
review chart packet collection run manifest file path task account lease refresh generation
Prefer concrete verbs:
create collect build publish open refresh read write start finish retry report acquire release replace
Be suspicious of vague verbs:
process handle manage hydrate materialize orchestrate finalize execute sync transform
Use one noun for one concept.
Prefer intent-revealing functions:
collectChart()
startChartCollection()
getChartCollection()
buildReviewPacket()
publishReviewPacket()
refreshReviewPacket()
openReview()
If infrastructure vocabulary differs, map it once:
Saga vocabulary Domain vocabulary
externalRunId <-> collectionRunId
Then use domain vocabulary in the plan.
For non-trivial designs, show:
Nouns
review
chart
packet
Verbs
collect
build
publish
Functions
collectChart()
buildReviewPacket()
publishReviewPacket()
Show meaningful renames:
Current Proposed
ingest-patient collect-chart
correlationId collectionRunId
Rename only when it improves meaning, ownership, or behavior.
Open with one short statement of what changes, then draw it.
create review
|
v
PREPARING
|
v
collect chart
|
v
build packet
|
v
publish + open review
|
v
PENDING_REVIEW
Do not build suspense before the recommendation.
Use ASCII when it explains structure faster than prose:
Keep diagrams terminal-readable and copyable. Do not explain them again line by line.
Every implementation-ready plan should show where important code is expected to live.
apps/dashboard/
lib/core/qa-reviews/
chart-collection/
start-chart-collection.ts
review-packet/
build-review-packet.ts
publish-review-packet.ts
Use real paths when known. Group by ownership and concept. Avoid invented utils layers. Show important new, moved, renamed, and removed files; omit unchanged noise.
For non-trivial flows, show the proposed application-level call stack.
createQaChartReview()
|
+-- createReview()
|
+-- startQaChartReviewSaga()
|
+-- collectChartJob()
|
+-- startChartCollection()
Show only functions that clarify boundaries. Skip framework internals unless they affect correctness.
When existing call flow is rewired, show the before/after shape.
Use calldiff semantics plus a presentation-only move marker:
unchanged
+ added
- removed
↳ moved / reparented
Example:
createQaChartReview()
|
- ├─ ingestPatient()
+ ├─ collectChart()
+ │ ├─ startChartCollection()
↳ │ └─ reportChartCollection() MOVED
Color is a second channel:
unchanged muted neutral
added blue
removed magenta
moved amber
boundary cyan / blue rule
invariant green annotation
blocked red
Do not use red/green for ordinary add/remove semantics.
When code exists, prefer observed call-flow evidence:
npx calldiff@latest diff main HEAD --entry createQaChartReview
npx calldiff@latest diff main HEAD --file path/to/entrypoint.ts
npx calldiff@latest diff main HEAD --format json
Use structured output for HTML when possible.
Derive moved only when the same stable key is removed under one parent and added under another. Never infer a move from similar names.
If the graph is proposed, label it Proposed call flow.
Read references/call-flow-diff.md for rendering rules.
Every cross-service boundary should show the call and smallest useful payload.
Dashboard Integrations
POST /chart-collections
--------------------------------------------->
{ collectionRunId, reviewId, patientId }
<---------------------------------------------
202 Accepted
{ collectionRunId, status: "QUEUED" }
Show route/RPC name, important fields, result semantics, idempotency identity, and ownership/fencing fields when relevant. Omit incidental payload detail.
Use pseudocode for transactions, retries, locking, idempotency, fallback, partial failure, publication, and replay.
Use proposed function names. Expose invariants rather than pretending the pseudocode compiles.
Read references/examples.md for examples.
If state matters, draw it.
PREPARING
|
| packet published
v
PENDING_REVIEW
|
| claimed
v
IN_PROGRESS
State names should answer what is true right now?
Separate execution state from business outcome when needed:
Run state: COLLECTED
Outcome: READY_WITH_GAPS
A valid incomplete result is not an infrastructure failure.
Split work when failure should retry only part of the flow.
collect chart
|
v
build packet
|
v
publish packet
If collection succeeds and build fails, retry build, not collection.
Never write only “ensure concurrency safety.”
Distinguish:
deduplicate same request
!=
serialize work sharing one account
Show what the primitive actually does and the desired behavior. Give different mechanisms different names.
Use a compact identity map:
review creation -> idempotencyKey
collection attempt -> collectionRunId
collection item -> run + item identity
published file -> review + logical path
task -> review
Each durable operation should have one obvious identity.
Do not model every missing source as workflow failure.
collection
|
+---- complete ----------> READY
+---- optional missing --> READY_WITH_GAPS
+---- unusable context --> BLOCKED
+---- system failed -----> FAILED
Keep business outcome separate from execution failure.
Prefer:
callback fails
|
v
retry callback
over “the callback should be resilient.”
Include a compact failure map for important systems.
packet A is live
|
| refresh
v
build packet B
|
+---- failure ----> A stays live
|
v
publish B
|
v
packet B is live
Say what happens if a user is actively working against A.
State rules that can become tests.
1. PREPARING reviews cannot be claimed.
2. No task exists before initial packet publication.
3. Two reviews never share a collectionRunId.
4. Callback failure never causes recollection.
5. Refresh failure never changes the live packet.
6. Active reviews never silently switch packet generation.
Avoid soft goals such as “the system should avoid inconsistent state.”
1. fix readiness
|
2. durable collection
|
3. reliable reporting
|
4. packet builder
|
5. atomic publisher
|
6. shadow
|
7. pilot
|
8. remove old path
Each phase gets one purpose. Do not invent sprint dates unless asked.
Use only sections that help.
For substantial plans, prefer:
# <Decision title>
## Decision
## Why
## Vocabulary
## Naming
## Ownership
## Proposed file tree
## Call stacks
## Call-flow diff
## API contracts
## State
## Data model
## Pseudocode
## Concurrency and idempotency
## Failure model
## Refresh / replay
## Rollout
## Invariants
Remove:
Ask:
Can an engineer see the implementation and call-flow change without mentally converting prose into code?
Then:
Would a new engineer guess what each important function does from its name alone?
If not, improve the plan.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub tbsheff/skills --plugin tbsheff-skills11 skills in this plugin
/abstraction-design-coachHelp design, review, simplify, and refactor software abstractions, especially in TypeScript and JavaScript./agent-artifactsCreate or update a substantial engineering deliverable as validated semantic JSON, then render it through the Agent Artifacts CLI or MCP into self-contained HTML plus optional durable Markdown. Covers eight kinds - implementation plan, progress report, ADR or design decision, architecture explainer, code or design review, research report, incident report or post-mortem, and engineering handoff. Use whenever the request is for a plan, RFC, design doc, status update, post-mortem, retro, architecture writeup, review verdict, or handoff that a colleague will read and act on - prefer this over hand-authored HTML or freeform Markdown for these eight, because the renderer enforces answer-first structure, provenance, print, and mobile layout that hand-written output silently drops. Do not use for short answers, ordinary notes, code-only replies, or one-off visual artifacts that fit none of the eight kinds./askUse when the user asks to be interviewed, wants guided choices, or needs to answer a question before work can continue. Ask through the agent's user-question tool.