Skip to content
TEA docs in plain text: llms-full.txt

tea-nfr CLI

tea-nfr runs the packaged bmad-tea-nfr Create workflow against existing project evidence. It supplies resolved TEA configuration and NFR customizations, runs the workflow, validates the report and its canonical context, and publishes both files together.

Needs Node.js 22.20.0+. A live run also needs an agent CLI you already use: Claude Code (--agent claude), Codex (--agent codex), Antigravity (--agent agy), or any other runner through --agent custom with --agent-cmd. It uses that CLI’s existing session, so there is no separate login step. --agent none saves the prompt without calling an agent and needs neither. Prerequisites cover each agent.

Run it from a project that contains the example input paths:

Terminal window
npx --package bmad-method-test-architecture-enterprise tea-nfr \
--agent codex \
--project-root . \
--input docs/tech-spec.md \
--implementation src \
--evidence evidence \
--output-dir test-artifacts

The project must contain implementation files and existing evidence. Supply source directories such as src and evidence, or individual files. Output and run directories must remain separate from every supplied source directory. Requirements provide thresholds; implementation evidence provides observations. Supplying a requirements file as evidence fails before invocation. If a file under --implementation also proves an observation, include its directory under --evidence as well. For example, a structured logging configuration can serve as maintainability evidence.

The command audits security, performance, reliability, and maintainability. The workflow’s eight ADR categories guide elicitation. Explicit criteria outside the four audited domains appear in a recorded-only table and carry no gate impact. Unknown thresholds and missing implementation evidence produce CONCERNS. The workflow determines whether measured evidence meets a declared threshold.

OptionMeaning
--agent codex|claude|agy|custom|noneRequired vendor selection. none retains a prompt without invoking a vendor or publishing an audit.
--project-root <dir>Consuming project root, defaults to the current directory.
--input <path>Required requirements document, repeatable. Project TEA configuration files also remain protected threshold sources.
--implementation <path>Required implementation file or directory, repeatable.
--evidence <path>Required existing implementation evidence file or directory, repeatable.
--scope system|epic|storyAudit scope, defaults to system.
--scope-id <id>Required lowercase slug for epic/story scope. Produces epic-ID or story-ID run keys.
--output-dir <dir>Artifact root within the project, defaults to resolved test_artifacts.
--evidence-dir <dir>Retained live attempt root within the project, defaults to .tea-runs.
--fail-on concerns|fail|noneGate threshold, defaults to concerns. none accepts a valid audit with any status.
--timeout-ms <n>Timeout per vendor attempt, defaults to 1,200,000 milliseconds.
--retries <n>Additional transport or timeout attempts, defaults to zero, maximum three.
--model <name>Model override; not accepted with custom or none.
--agent-cmd <path>Agent executable override. Required with --agent custom.
--agent-arg <arg>Additional agent argument, repeatable.
--env-pass <NAME>Additional environment name passed to the agent, repeatable.
--skill-root <dir>Explicit trusted installed skill override with its sibling bmod-tea knowledge.

Claude and Codex default to an adapter model and Agy to its session model. A custom runner takes its model via --agent-arg (details).

Create is the command’s supported operation. Each invocation performs a fresh audit. Interactive skill invocation also provides Resume, Validate, and Edit.

Live execution outputs a JSON object with status, gatePassed, report, context, evidence, and runKey. Reports write to OUTPUT/nfr/nfr-assessment-RUNKEY.md. Canonical context snapshots write beside them as nfr-context-RUNKEY.json. Failed gates publish evidence and return the configured gate exit code.

Each retained attempt includes the prompt, stdout, stderr, metadata, and generated artifacts. run.json records the adapter, requested model, capabilities, attempts, and mode. CLI errors report an evidence directory when one was allocated. Existing published reports remain intact when generation or validation fails.

Validation checks completion, scope, gate structure, domain sections, declared criteria, literal thresholds, and observation excerpts. Actual values must come from supplied implementation evidence. Inline code quotations and fenced quotations are verified against their bound source files. Human report statuses accept canonical status enums with optional status glyphs. Canonical JSON and gate statuses require exact enums. Recorded category labels allow spaces and capitalization. Reports and context files must be fresh regular files confined to the current attempt. Supplied file and directory identities, topology, type, and permission modes are verified before publication. Headings and gate YAML inside code fences cannot satisfy completion.

The CLI stages both deliverables before replacing existing files. If replacement fails, it restores the previous files. Publication refuses symlink or hardlink aliases onto sources or deliverables. Source integrity checks detect file modifications made during execution.

CodeMeaning
0Valid audit accepted by --fail-on, or prompt-only output.
1Valid audit breaches the configured gate threshold.
2Invalid configuration, inputs, output collision, agent readiness or publication failure.
3Vendor failure/timeout, incomplete or invalid generated artifacts, or source mutation.

The NFR guide describes the audit workflow.