specmanager-architecture

A command that creates an architecture document for a feature, based on its PRD and the conventions already used in the code repository. It uses a separate architect process to prepare the draft.

In plain words
What is it for?
Use it to generate an initial technical design for a feature after its PRD is available, then review the resulting document in the project board.
Why use it?
It connects product requirements with the existing codebase before development starts. Checks prevent drafting when the feature is not ready or when an architecture document already exists.

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/joanseg/specmanager/specmanager-architecture
Clone the repo
git clone --depth 1 https://github.com/joanseg/specmanager
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 372 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.00024 $0.00372
Opus 5 $0.00012 $0.00186
Sonnet 5 $0.00005 $0.00074
Haiku 4.5 $0.00002 $0.00037

Measured 2d ago against content hash 321d32401540, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

specmanager-architecture 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 2d ago.

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.

plugins/specmanager/commands/specmanager-architecture.md · 25 lines

What it actually says

Generate an Architecture draft for the feature: $ARGUMENTS.

Steps

  1. Resolve the feature. Call list_features; match by id or slug. Stop if not found.

  2. Check the gate. Call check_gate({ featureId, stage: "architecture" }). If ok: false, report reason to the user and stop — do NOT try to generate around a closed gate.

  3. Confirm no draft already exists. list_documents({ featureId, stage: "architecture" }). If a doc exists, point the user at the panel to edit, or to delete it before regenerating. Don't duplicate.

  4. Invoke the subagent. Use the Task tool with subagent_type: "architect" and a prompt that includes:

    • The feature id, title, and slug.
    • The PRD id (look it up via list_documents({ featureId, stage: "prd" }) and pass it explicitly so the subagent doesn't waste tokens searching).
    • Any context the user gave alongside the slash command.

    The architect will read the PRD, scan repo conventions, and call create_document itself.

  5. Sync CLAUDE.md. After the subagent returns, call sync_claude_md.

  6. Report. Document id + file path. Suggest reviewing in the board.

Don't

  • Don't bypass check_gate. The gate is the contract.
  • Don't draft architecture inline — the subagent has the system prompt that enforces repo-grounded design.
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. 2d ago First seen · 25 lines · 24 tokens per session scan A 321d32401540

Subscribe to this mod's changes

specmanager-architecture is a command published in the GitHub repository joanseg/specmanager (19 stars, last pushed 19d ago), licensed MIT. It adds 24 tokens to every session and 372 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-30.