Skip to content
Development
Command

/trace

Requirement → use-case → task → test traceability (NaCl graph value, no Neo4j). Trace one bd node's rationale (upstream) + impact (downstream), or audit a whole feature's chain for coverage gaps. Reads beads relationships.

From plugin
great-cto
11521 skills73 agents21 commands1 hook
> /plugin marketplace add avelikiy/great_cto
> /plugin install great_cto@great-cto

Command definition

trace.md
description: "Requirement → use-case → task → test traceability (NaCl graph value, no Neo4j). Trace one bd node's rationale (upstream) + impact (downstream), or audit a whole feature's chain for coverage gaps. Reads beads relationships."
argument-hint: "<bd-id> | feature <slug> | <bd-id> --json"
user-invocable: true
allowed-tools: Read, Bash
model: haiku

<!-- great_cto-managed -->

You are the great_cto `/trace` command — **requirement → use-case → task → test** traceability over beads relationships (governance Phase 4). This is NaCl's graph value — impact analysis and coverage gaps — without a Neo4j dependency. The chain is modelled as bd tasks classified by label and linked with `bd dep`:

◆ req  ──depended-upon-by──▶  ◇ uc  ──▶  ○ task  ──▶  ▷ test

Edge semantics follow `bd dep`: a downstream node **depends on** its upstream rationale (`bd dep add <uc> <req>` ⇒ uc depends on req). So tracing **down** = rationale ("why does this exist?"), tracing **up** = impact ("what breaks if I change this?").

Step 0 — Resolve the engine + require bd

PD=${CLAUDE_PLUGIN_ROOT:-$(ls -d ~/.claude/plugins/cache/*/great_cto/*/ 2>/dev/null | awk -F'/plugins/cache/' '{split($NF,p,"/"); print p[3], $0}' | sort -V | tail -1 | cut -d' ' -f2- | sed 's|/$||')}; [ -z "$PD" ] && PD=.
TRACE() { node "$PD/scripts/lib/trace.mjs" "$@" 2>/dev/null || node scripts/lib/trace.mjs "$@"; }

bd --help >/dev/null 2>&1 || {
  echo "bd not installed — traceability requires Beads."
  echo "Fallback: the ARCH Requirements Checklist — grep '^- \\[ \\] REQ-' docs/architecture/ARCH-*.md"
  exit 1
}

Step 1 — Dispatch on the argument

ARG="${ARGUMENTS%% *}"
REST="${ARGUMENTS#* }"

if [ -z "$ARG" ]; then
  echo "Usage:"
  echo "  /trace <bd-id>            # rationale (upstream) + impact (downstream) for one node"
  echo "  /trace feature <slug>     # coverage audit across feature-<slug> (exit 1 if gaps)"
  echo "  /trace <bd-id> --json     # machine-readable"
  exit 0
fi

if [ "$ARG" = "feature" ]; then
  TRACE feature "${REST%% *}"        # coverage audit; non-zero exit ⇒ open gaps
else
  TRACE $ARGUMENTS                   # node-centric trace (passes through --json if present)
fi

How to read the output

  • **Rationale (upstream)** — the req/uc this node traces back to. An impl task with an empty

rationale is an *orphan*: it implements nothing anyone asked for (scope creep, or a missing `bd dep add <task> <uc>` link).

  • **Impact (downstream)** — everything that depends on this node. Before changing a req or a

shared task, read this list — those are the use-cases / tasks / tests to re-verify.

  • **Coverage gaps** — a req with no use-case, a use-case with no task, a task with no test, or

a req that never reaches any test (an untested requirement). Each gap is a hole in the chain; close it by adding the missing node + `bd dep` link, or explain it with a signed `/exception`.

The label + edge convention (how the chain gets built)

The graph is only as good as the links agents create. The convention (architect Step 7, qa-engineer test step):

| Layer | bd label | Linked by | |---|---|---| | requirement | `req` + `feature-<slug>` | architect mirrors the ARCH Requirements Checklist | | use-case | `uc` + `feature-<slug>` | architect mirrors User Success Criteria (USC) | | task | `feature-<slug>` | pm/architect — `bd dep add <task> <uc>` | | test | `test` + `feature-<slug>` | qa-engineer — `bd dep add <test> <task>` |

`/trace` excludes epic `parent` edges (structural, not rationale) so the chain stays clean. If bd is unavailable, the ARCH Requirements Checklist is the degraded-mode source of truth.

Read more
@avelikiy
Ships withgreat-cto

You already have the agent. This is everything around it. great_cto runs Claude Code as a pipeline of 70 specialist agents — an independent model checks each stage before the next builds on it, spending caps refuse rather than warn, and three decisions stay yours: what gets built, how, and whether it ships.

11537 skills73 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
115
Star history of avelikiy/great_cto on GitHub, a chart by star-history.com

Other commands on great-cto.

agent

agent

Command

Manage an agent like an employee — review its record, generate its evals, evolve its prompt against held-out evals, or retire it.

@avelikiy@avelikiyInstall Command
audit

audit

Command

Have an existing codebase? Run it — you get the detected stack, a gap list with severity and file:line evidence, a task per gap,…

@avelikiy@avelikiyInstall Command
board

board

Command

Open the great_cto admin board at http://localhost:3141 (Kanban, cost, pipeline, inbox, memory). Starts it in background if not…

@avelikiy@avelikiyInstall Command
crystallize

crystallize

Command

After a session or an incident, turn what happened into reusable knowledge — `learn` captures this session's lessons,…

@avelikiy@avelikiyInstall Command
digest

digest

Command

Friday review — what shipped, what broke, what it cost; add `cost`, `slo`, `gov` or `sessions` for the detail. Weekly engineering…

@avelikiy@avelikiyInstall Command
doctor

doctor

Command

Something off with great_cto, or just upgraded it? Run it — you get a health report (pipeline state, missing artefacts, hooks,…

@avelikiy@avelikiyInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command