trd

trd is a command for coding agents from HigorAlves/orc. It costs 41 tokens per session (1,432 once invoked), scanned A, original, MIT.

A command for writing a Technical Requirements Document (TRD), which records the technical design, constraints, and agreements for a complex change.

In plain words
What is it for?
Creating a numbered file in docs/trds/, optionally using an existing product requirements document or Jira ticket as input.
Why use it?
It gives engineers and services a shared written contract when a product specification is not detailed enough technically.

Command

Part of the orc plugin — 13 skills, 30 commands, 14 agents, 5 hooks shipped together

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/higoralves/orc/trd
Clone the repo
git clone --depth 1 https://github.com/HigorAlves/orc

Or install orc, the plugin that ships this one along with the rest of its 13 skills, 30 commands, 14 agents, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for trd

README.md
[![agentmods](https://agentmods.dev/badge/commands/higoralves/orc/trd.svg)](https://agentmods.dev/commands/higoralves/orc/trd)
Your own site
<a href="https://agentmods.dev/commands/higoralves/orc/trd"><img src="https://agentmods.dev/badge/commands/higoralves/orc/trd.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,432 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.00041 $0.01432
Opus 5 $0.00020 $0.00716
Sonnet 5 $0.00008 $0.00286
Haiku 4.5 $0.00004 $0.00143

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

Security

Grade A, and why

trd 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 4d 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.

orc/commands/trd.md · 113 lines

How it starts

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

/orc:trd

Author a new TRD following orc:trd-writing. Lives at docs/trds/NNNN-<kebab-title>.md.

Arguments

  • <title> — optional. Short noun phrase describing the contract being pinned down (e.g. "webhook retry contract"). If omitted, prompts via AskUserQuestion.
  • --from-prd NNNN — optional. Reads docs/prds/NNNN-*.md and seeds the TRD's Goals, Constraints, and Linked PRD(s) sections from it.
  • --from-jira <KEY> — optional. Seeds Linked tickets and (if useful) the Background / context section from a Jira ticket via orc:jira-cli.

Workflow

Phase 1 — Confirm a TRD is warranted

Invoke orc:trd-writing. Apply its "all of these are true" test:

  • A PRD (or equivalent product spec) has settled the "what & why."
  • Non-trivial technical surface area (new APIs / data / failure modes / dependencies / contracts).
  • Multiple engineers / services / repos need to agree on the contract.

If borderline, print the Gate headline (**⛔ Gate — is this TRD-worthy?**, per orc:callouts), then AskUserQuestion:

  • "Yes, write the TRD"
  • "Smaller — single design note in code instead"
  • "RFC needed first — alternatives are still being debated → /orc:rfc"
  • "ADR instead — single decision to record, not a contract → /orc:adr"
  • "Just a plan — go straight to /orc:plan"

Phase 2 — Locate docs/trds/

If the directory doesn't exist, create it and add a one-line docs/trds/README.md linking to orc:trd-writing. Find the next sequence:

ls docs/trds 2>/dev/null | grep -E '^[0-9]{4}-' | sort | tail -1

Increment to get the new four-digit sequence (0001 if first).

Phase 3 — Gather inputs

If --from-prd NNNN was passed:

  1. Resolve the PRD path: ls docs/prds/NNNN-*.md → exactly one file expected. If zero matches, surface and ask user to confirm/correct. If multiple, surface and ask.
  2. Read the PRD. Extract:
    • Title → suggest as the TRD's title prefix.
    • Problem + Audience + Success metrics → seed the Goals and Background / context sections.
    • Constraints / out-of-scope from the PRD → seed Constraints and Non-goals.
    • Linked tickets → carry forward into Linked tickets.

Read the full file on GitHub · 113 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. 4d ago First seen · 113 lines · 41 tokens per session scan A c7b091a4f3e6

Subscribe to this mod's changes

trd is a command published in the GitHub repository HigorAlves/orc (6 stars, last pushed 7d ago), licensed MIT. It adds 41 tokens to every session and 1,432 once invoked, about $0.0002 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.