ensemble-implement-trd-beads

ensemble-implement-trd-beads is a skill for Claude Code, Codex from FortiumPartners/ensemble. It costs 47 tokens per session (33,038 once invoked), scanned A, original, MIT.

A workflow for implementing a Technical Requirements Document, or TRD, while tracking the work in Beads. Beads is a persistent task and dependency system that organizes work into epics, stories, and tasks.

In plain words
What is it for?
Converting a TRD into a tracked task hierarchy, finding ready work according to dependencies, recording progress, and planning parallel implementation.
Why use it?
It keeps implementation state, task relationships, and execution order available across sessions. This helps resume partial work without rebuilding the plan from scratch.

Skill for Claude CodeCodex

Written for Claude Code and Codex: user-invocable in frontmatter, but also installed under .codex/. Also seen: model in frontmatter; mentions subagents; names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the ensemble-codex plugin — 40 skills shipped together

Good fit Converting a TRD into a tracked task hierarchy, finding ready work according to dependencies, recording progress, and planning parallel implementation.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add FortiumPartners/ensemble
Claude Code
/plugin install ensemble-codex

Made for: Claude Code, Codex.

Or install ensemble-codex, the plugin that ships this one along with the rest of its 40 skills.

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 ensemble-implement-trd-beads

README.md
[![agentmods](https://agentmods.dev/badge/skills/fortiumpartners/ensemble/ensemble-implement-trd-beads/github.svg)](https://agentmods.dev/skills/fortiumpartners/ensemble/ensemble-implement-trd-beads)
Your own site
<a href="https://agentmods.dev/skills/fortiumpartners/ensemble/ensemble-implement-trd-beads"><img src="https://agentmods.dev/badge/skills/fortiumpartners/ensemble/ensemble-implement-trd-beads/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ensemble-implement-trd-beads

Your own site · 80×15
<a href="https://agentmods.dev/skills/fortiumpartners/ensemble/ensemble-implement-trd-beads"><img src="https://agentmods.dev/badge/skills/fortiumpartners/ensemble/ensemble-implement-trd-beads.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 33,038 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00047 $0.33038
Opus 5 $0.00023 $0.16519
Sonnet 5 $0.00009 $0.06608
Haiku 4.5 $0.00005 $0.03304

Measured 9d ago against content hash 8e120d67883c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

ensemble-implement-trd-beads 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 9d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

packages/codex/.codex/skills/commands/ensemble-implement-trd-beads/SKILL.md · 1,295 lines

How it starts

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

Ensemble Command: /ensemble:implement-trd-beads

This Codex skill mirrors the Ensemble slash command /ensemble:implement-trd-beads. Follow the workflow below, adapt to the current repository, and keep outputs structured.

Parse a TRD and create a beads hierarchy (epic -> stories -> tasks) before any implementation begins. Drive execution order through bv --robot-plan (with br ready fallback when bv is unavailable) rather than TRD re-parsing. Record all state transitions in br beads so the implementation is resumable across sessions without access to local state files.

This command wraps the implement-trd-enhanced execution model with a full beads project management layer powered by br (beads_rust) and bv (beads_viewer). It transforms TRD-structured work into a persistent, queryable beads hierarchy and drives execution order through bv --robot-plan — enabling cross-session resumability, graph-aware triage, and parallel execution planning.

Key behaviors:

  • Scaffold: epic -> stories -> tasks created in br before first line of code
  • Idempotency: existing scaffolds detected via title-prefix matching; partial scaffolds resumed safely
  • Execution: bv --robot-plan determines what to run next, extracting up to max_parallel tasks for parallel execution (fallback: br ready when bv unavailable)
  • Quality gates: phase completion triggers test delegation; results recorded as br comments
  • Sync: br sync --flush-only exports JSONL before every bv call
  • Wheel instructions: printed every run with NTM spawn commands for multi-agent flywheel
  • Graceful degradation: bv features skipped if bv unavailable; br required
  • No .trd-state/ files: beads + JSONL are the single source of truth

Workflow

Phase 1: Preflight

1. Handle Special Arguments Process --status and --reset-task arguments for early exit paths

  • If $ARGUMENTS contains '--plan' AND $ARGUMENTS contains '--execute': print 'ERROR: --plan and --execute are mutually exclusive.' and EXIT
  • Parse $ARGUMENTS for .md paths. Initialize COMBINED_WORKSTREAM_MODE=false before branching. If two or more TRD paths are present without '--workstream' or '--legacy-multi': print 'ERROR: Multiple TRDs passed directly. Direct multi-TRD execution is deprecated because it can lose fidelity across parser/runtime merge boundaries. Run /ensemble:create-workstream-trd ... then /ensemble:implement-trd-beads , or rerun with --workstream to generate first.' and HALT before any br/git/scaffold side effects. If two or more TRD paths are present with '--workstream': resolve TRD_CLI and run node "$TRD_CLI" create-workstream-trd <TRD_PATHS...>; parse {ok,path}. If ok is false or JSON malformed, print errors and HALT. Replace TRD path list with the generated single workstream TRD path and continue normal single-TRD behavior. If two or more TRD paths are present with '--legacy-multi': set COMBINED_WORKSTREAM_MODE=true, set SOURCE_TRD_PATHS to the ordered path list, print 'DEPRECATED: direct multi-TRD mode; prefer /ensemble:create-workstream-trd then implement the generated workstream TRD', and list every source TRD. If exactly one TRD path is present: keep COMBINED_WORKSTREAM_MODE=false and preserve existing single-TRD behavior exactly. If zero TRD paths are present: keep COMBINED_WORKSTREAM_MODE=false and defer to normal single-TRD selection in Preflight step 4.
  • If $ARGUMENTS contains '--plan': set PLAN_ONLY=true (scaffold phase runs, Execute phase is skipped — print wheel instructions and exit after scaffold completes)
  • If $ARGUMENTS contains '--execute': set EXECUTE_ONLY=true (scaffold phase is skipped — resume detection runs, Execute phase runs against existing beads)
  • If $ARGUMENTS contains '--use-current-branch': set USE_CURRENT_BRANCH_REQUESTED=true; if $ARGUMENTS also contains '--branch=': print 'ERROR: --use-current-branch and --branch= are mutually exclusive.' and HALT before any git side effects. If flag absent: set USE_CURRENT_BRANCH_REQUESTED=false. If $ARGUMENTS contains '--branch=': extract the branch name after '=' and store it as BRANCH_REQUESTED; if --use-current-branch is also present this is already caught and HALTed above.
  • If $ARGUMENTS contains '--status' AND TEAM_MODE=true: (TRD-029, AC: FR-IT-8, AC-BC-2)
    1. Derive TRD_SLUG from filename (same derivation as normal Preflight step 4)
    1. Run: br list --status=in_progress --json, filter by [trd:<TRD_SLUG>:task:] prefix
    1. For each in-progress task: call get_sub_state(bead_id) to get sub-state
    1. Group and print:
  •    '=== TEAM STATUS: <TRD_SLUG> ==='
    
  •    'Tasks in_progress (building): <N>'  -- list task IDs and assigned builder
    
  •    'Tasks in_review: <N>'               -- list task IDs and reviewer
    
  •    'Tasks in_qa: <N>'                   -- list task IDs and QA agent
    
  •    For each task with rejection count > 0: show 'Task <ID>: <N> rejections'
    
  •    'Tasks completed: <M> / <Total>'
    
  •    '================================='
    
    1. EXIT
  • If $ARGUMENTS contains '--status' AND COMBINED_WORKSTREAM_MODE=true: capture all issues with explicit file redirection, e.g. ISSUES_JSON=$(mktemp); br list --all --limit 0 --json > "$ISSUES_JSON". If the user supplied --workstream , run node "$TRD_CLI" workstream-status --issues-json "$ISSUES_JSON" --workstream ; otherwise omit --workstream and print all detected workstreams. Parse {ok,workstreams,trds,blocked,ready,parallelSafeStreams}; if ok is false, process exits non-zero, or JSON is malformed, print the error and HALT. Print release train progress, each TRD epic progress, blocked items, ready items, and parallel-safe streams; EXIT
  • If $ARGUMENTS contains '--status' AND TEAM_MODE=false: derive TRD_SLUG, then call trd_progress() (Execute phase order 10) to print the TRD-scoped progress summary, EXIT
  • If $ARGUMENTS contains '--reset-task' AND TEAM_MODE=true: (TRD-030, AC: FR-IT-9, AC-BC-3)
    1. Extract TASK_ID from argument
    1. Find bead: br list --status=open --json OR br list --status=in_progress --json
  •  Filter for title containing [trd:<TRD_SLUG>:task:<TASK_ID>]
    
    1. Reset br native status: br update <bead_id> --status=open
    1. Add reset comment: br comment add <bead_id> 'status:open reset:manual reason:--reset-task'
    1. Run: br sync --flush-only
    1. Print: 'Reset task <TASK_ID> (bead: <bead_id>) to open. Team sub-state cleared.'
    1. EXIT
  • If $ARGUMENTS contains '--reset-task' AND TEAM_MODE=false: extract TASK_ID, run br list --status=open --json, filter JSON for entry with title containing [trd:<TRD_SLUG>:task:<TASK_ID>], run br update <BEAD_ID> --status=open, EXIT

Read the full file on GitHub · 1,295 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. 9d ago First seen · 1,295 lines · 47 tokens per session scan A 8e120d67883c

Subscribe to this mod's changes

ensemble-implement-trd-beads is a skill published in the GitHub repository FortiumPartners/ensemble (12 stars, last pushed today), licensed MIT. It adds 47 tokens to every session and 33,038 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-30.