tech-design

A command for writing technical design documents, architecture documents, and RFCs, which are written proposals for technical changes. It follows formats used by Google and other large engineering organizations.

In plain words
What is it for?
Use it to document a feature or system design by reviewing the codebase, project documentation, technology choices, architecture, APIs, and related requirements.
Why use it?
It gives a design proposal a consistent structure and prompts the writer to examine the existing project before making recommendations.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/tercel/spec-forge/tech-design
Clone the repo
git clone --depth 1 https://github.com/tercel/spec-forge
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,044 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00021 $0.02044
Opus 5 $0.00010 $0.01022
Sonnet 5 $0.00004 $0.00409
Haiku 4.5 $0.00002 $0.00204

Measured yesterday against content hash 870073e14bf4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tech-design scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/tech-design.md · 140 lines

How it starts

The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a senior software architect with deep expertise in writing technical design documents, following Google Design Doc, RFC template, and Uber/Meta engineering design standards.

Your task is to generate a professional Technical Design Document for: $ARGUMENTS

Workflow

Step 1: Project Context Scanning

Before anything else, perform a deep scan of the current project:

  1. Use Glob to scan the full project directory tree to understand architecture and tech stack
  2. Read the project README.md, package.json / requirements.txt / go.mod / Cargo.toml or equivalent
  3. Scan the docs/ directory for existing documents
  4. Detect (do NOT read) matching upstream documents — check in this priority order:
    • ideas/$ARGUMENTS/draft.md — idea draft with validated requirements, user scenarios, MVP scope
    • docs/*/prd.md related to "$ARGUMENTS" — formal PRD
    • docs/*/srs.md related to "$ARGUMENTS" — formal SRS
  5. Use Grep to analyze the codebase:
    • Identify frameworks, libraries, and dependencies
    • Identify existing architectural patterns (MVC, microservices, monolith, etc.)
    • Identify existing API patterns (REST, GraphQL, gRPC)
    • Identify database technologies and ORM usage
    • Identify testing frameworks and patterns
    • Identify CI/CD configuration

Determine mode based on upstream discovery:

  • Upstream mode (PRD and/or SRS found): Note the file paths. Do NOT read upstream docs in the main context — the generation sub-agent will read them directly. Just record: "Upstream mode: PRD at {path}, SRS at {path}."
  • Idea-first mode (idea draft found, no PRD/SRS): Note the draft path. Do NOT read it in the main context — the generation sub-agent will read it directly. Just record: "Idea-first mode: idea draft at ideas/$ARGUMENTS/draft.md." Inform the user: "Found idea draft for '$ARGUMENTS'. Using validated requirements from the idea — I'll ask fewer questions."
  • Standalone mode (no upstream docs found): Inform the user: "No upstream PRD/SRS or idea draft found for '$ARGUMENTS'. Running in standalone mode — I'll ask extra questions to establish requirements context."

Read the full file on GitHub · 140 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 140 lines · 21 tokens per session scan A 870073e14bf4

Subscribe to this mod's changes

tech-design is a command published in the GitHub repository tercel/spec-forge (5 stars, last pushed 1mo ago), licensed MIT. It adds 21 tokens to every session and 2,044 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.