nWave/skills/nw-rigor/SKILL.md
Selects a quality-vs-token-consumption profile (lean, standard, thorough, exhaustive, custom, inherit) and persists it globally (~/.nwave/global-config.json) or per-project (.nwave/des-config.json). Use when tuning how much rigor wave commands apply.
npx skillsauth add nwave-ai/nwave nw-rigorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Wave: CROSS_WAVE | Agent: Main Instance (self) | Command: /nw-rigor [profile]
Interactive command to select a quality-vs-token-consumption profile. Persists choice to either ~/.nwave/global-config.json (global scope) or .nwave/des-config.json (project scope) under the rigor key. All wave commands read this config to adjust agent models, review policy, TDD phases, and mutation testing.
You (the main Claude instance) run this directly. No subagent delegation.
Note on TDD phase canons (dual-canon, ADR-025, 2026-05-07): the canonical TDD cycle is 3-phase v5 (RED, GREEN, COMMIT) as described in nw-tdd-methodology. The legacy 5-phase v4 (PREPARE, RED_ACCEPTANCE, RED_UNIT, GREEN, COMMIT) is preserved for backward-compat audit-log replay of pre-2026-05-07 commits. The .nwave/des-config.json tdd_phases field accepts BOTH canons: writers of new logs may emit v5; the validator + schema (step-tdd-cycle-schema.json) dispatch on schema_version ("5.0" → canonical, anything else → legacy). The profile table below shows both canons side-by-side: pick v5 for new features, keep v4 only when extending a feature whose audit log was started under the legacy canon.
| Setting | lean | standard [recommended] | thorough | exhaustive | inherit | |--------------------|---------------------------------------|------------------------------------------------------------------------------|------------------------------------------------------------------------------|------------------------------------------------------------------------------|------------------------------------------------------------------------------| | agent_model | haiku | sonnet | opus | opus | inherit | | reviewer_model | skip | haiku | sonnet | opus | haiku | | review_enabled | false | true | true | true | true | | double_review | false | false | true | true | false | | tdd_phases (v5 canonical, ADR-025) | [RED, GREEN] | [RED, GREEN, COMMIT] | [RED, GREEN, COMMIT] | [RED, GREEN, COMMIT] | [RED, GREEN, COMMIT] | | tdd_phases (v4 legacy, audit-replay) | [RED_UNIT, GREEN] | [PREPARE, RED_ACCEPTANCE, RED_UNIT, GREEN, COMMIT] | [PREPARE, RED_ACCEPTANCE, RED_UNIT, GREEN, COMMIT] | [PREPARE, RED_ACCEPTANCE, RED_UNIT, GREEN, COMMIT] | [PREPARE, RED_ACCEPTANCE, RED_UNIT, GREEN, COMMIT] | | refactor_pass | false | true | true | true | true | | mutation_enabled | false | false | false | true | false |
custom -> Mode 3 (Custom Builder)Read .nwave/des-config.json. If missing or .nwave/ directory absent -> error: "No nWave config directory found. Run nwave install first."
If JSON is invalid -> backup as .nwave/des-config.json.bak, reset config to {}, note: "Config was corrupted. Backed up and reset."
Display current profile (from config.rigor.profile) or "none set" if absent.
Brief explanation: "Rigor profiles control how much quality infrastructure nWave applies per wave: agent models, review depth, TDD phases, mutation testing. Higher rigor = better guarantees, higher token cost."
Display the current project rigor (from .nwave/des-config.json) and current global rigor (from ~/.nwave/global-config.json, if it exists).
Ask via AskUserQuestion:
Where do you want to save this configuration?
Options:
Store the user's choice as {scope} and the corresponding file path as {target_file}:
{target_file} = ~/.nwave/global-config.json{target_file} = .nwave/des-config.jsonDisplay this table:
+-----------+--------+----------+----------+------------+---------+
| | lean | standard | thorough | exhaustive | inherit |
+-----------+--------+----------+----------+------------+---------+
| Agent | haiku | sonnet | opus | opus | *yours* |
| Reviewer | -- | haiku | sonnet | opus | haiku |
| Review | no | yes | double | double | yes |
| TDD | R->G | 5-phase | 5-phase | 5-phase | 5-phase |
| Refactor | no | yes | yes | yes | yes |
| Mutation | no | no | no | yes | no |
+-----------+--------+----------+----------+------------+---------+
| Est. cost | lowest | moderate | higher | highest | varies |
| Est. time | fast | moderate | slower | slowest | varies |
+-----------+--------+----------+----------+------------+---------+
Mark "standard" as [recommended]. Below the table, note: "Or choose custom to configure each setting individually. Type inherit to use your current session model."
Ask user to select via AskUserQuestion (4 options + Other for inherit/custom):
Note in the question text: "Type 'custom' to build your own profile, or 'inherit' to use your session model."
If user selects or types "custom" -> jump to Mode 3 (Custom Builder). If user types "inherit" -> proceed with inherit profile to Step 4.
Show the detail view for the selected profile. Render in a code block for visual clarity.
lean:
WHAT YOU GET:
- Haiku agent (fastest, cheapest)
- RED -> GREEN TDD (skip PREPARE, RED_ACCEPTANCE, COMMIT phases)
WHAT YOU LOSE:
- No code review
- No PREPARE phase (no test fixture setup)
- No RED_ACCEPTANCE phase (no acceptance tests)
- No COMMIT phase (no refactoring pass)
- No mutation testing
WHEN TO USE:
Config changes, documentation, simple bug fixes, spikes/prototypes
ESTIMATED IMPACT:
Lowest token cost | Fastest per step
standard [recommended]:
WHAT YOU GET:
- Sonnet agent (balanced quality/speed)
- Full 5-phase TDD (PREPARE -> RED_ACCEPTANCE -> RED_UNIT -> GREEN -> COMMIT)
- Haiku reviewer (cost-effective review)
- Refactoring pass in COMMIT phase
WHAT'S NOT INCLUDED:
- No double review (single pass only)
- No mutation testing
- Not opus-level reasoning
WHEN TO USE:
Most development work — features, integrations, refactoring
ESTIMATED IMPACT:
Moderate token cost | Moderate time per step
thorough:
WHAT YOU GET:
- Opus agent (strongest reasoning)
- Sonnet reviewer (deeper review analysis)
- Double review (two independent review passes)
- Full 5-phase TDD
- Refactoring pass
WHAT IT COSTS:
Higher token cost | Slower per step
WHEN TO USE:
Critical features, security-sensitive code, public APIs, complex algorithms
exhaustive:
WHAT YOU GET:
- Opus agent and opus reviewer (strongest at every stage)
- Double review (two independent review passes)
- Full 5-phase TDD
- Refactoring pass
- Mutation testing (>= 80% kill rate gate)
WHAT IT COSTS:
Highest token cost | Slowest per step
WHEN TO USE:
Critical production systems, compliance-sensitive code, long-lived core modules
inherit:
WHAT YOU GET:
- Your session model for agents (nWave inherits, does not override)
- Haiku reviewer
- Full 5-phase TDD
- Single review pass
- Refactoring pass
WHAT THIS MEANS:
nWave respects your model choice and controls the process around it.
If your session runs opus, agents get opus. If sonnet, agents get sonnet.
WHEN TO USE:
When you have strong opinions about which model to use,
or your organization controls model selection externally.
Ask user to confirm via AskUserQuestion:
{scope} is global AND the directory ~/.nwave/ does not exist, create it with parents=True{target_file} (handle missing file or corrupt JSON: start with {})config["rigor"] to the full profile object:
{
"profile": "{selected}",
"agent_model": "...",
"reviewer_model": "...",
"tdd_phases": [...],
"review_enabled": true/false,
"double_review": true/false,
"mutation_enabled": true/false,
"refactor_pass": true/false
}
{target_file}, preserving all other top-level keys (audit_logging_enabled, skill_tracking, update_check, etc.)Display all resolved settings:
Rigor profile saved: {name}
Resolved settings:
+-----------------------+---------------------------------------------------+
| agent_model | {value} |
| reviewer_model | {value} |
| tdd_phases | {value} |
| review_enabled | {value} |
| double_review | {value} |
| mutation_enabled | {value} |
| refactor_pass | {value} |
+-----------------------+---------------------------------------------------+
Config: {target_file} ({scope})
All wave commands will use these settings.
If argument is not one of: lean, standard, thorough, exhaustive, custom, inherit -> error: "Unknown profile '{name}'. Available: lean, standard, thorough, exhaustive, custom, inherit"
If argument is custom -> redirect to Mode 3 (Custom Builder).
Read .nwave/des-config.json. If missing -> same error as Mode 1 Step 1.
Same as Mode 1 Step 1.5. Ask scope question, store {scope} and {target_file}.
Display what changes from current profile to target profile:
Switching from {current} -> {target}:
agent_model: sonnet -> haiku
reviewer_model: haiku -> skip
review_enabled: true -> false
tdd_phases: 5-phase -> R->G
refactor_pass: true -> false
mutation_enabled: (unchanged) false
If downgrading (moving to a less rigorous profile), highlight what user will lose:
You will LOSE:
- Code review (reviewer_model: skip)
- PREPARE, RED_ACCEPTANCE, COMMIT phases
- Refactoring pass
If no current profile is set, show the target profile settings without diff.
Ask user to confirm via AskUserQuestion:
Same as Mode 1 Steps 6 and 7. Uses {target_file} from Step 1.5.
/nw-rigor custom or selected from interactive)Build a profile setting by setting. Each question uses AskUserQuestion with sensible defaults (standard values pre-selected). After all questions, show summary and confirm.
Same as Mode 1 Step 1 (read config, handle missing/corrupt).
Same as Mode 1 Step 1.5. Ask scope question, store {scope} and {target_file}.
Ask via AskUserQuestion:
Which model should agents use? (crafter, architect, acceptance-designer)
Options:
Ask via AskUserQuestion:
Which model for peer reviewers?
Options:
Ask via AskUserQuestion:
Run peer review twice (two independent passes)?
Options:
Only show this question if reviewer_model is not "skip". If "skip", set double_review = false automatically.
Ask via AskUserQuestion:
Which TDD phases should agents execute?
Options:
Ask via AskUserQuestion:
Include a dedicated refactoring pass after implementation?
Options:
Only show if TDD phases is "Full 5-phase". If minimal, set refactor_pass = false automatically.
Ask via AskUserQuestion:
Enable mutation testing (>= 80% kill rate gate)?
Options:
Display the assembled profile:
Custom profile:
+-----------------------+---------------------------------------------------+
| agent_model | {value} |
| reviewer_model | {value} |
| double_review | {value} |
| tdd_phases | {value} |
| refactor_pass | {value} |
| mutation_enabled | {value} |
+-----------------------+---------------------------------------------------+
Ask to confirm via AskUserQuestion:
Same as Mode 1 Steps 6 and 7. Uses {target_file} from Step 1.5. Save with "profile": "custom".
| Error | Response |
|-------|----------|
| Missing .nwave/ directory | "No nWave config directory found. Run nwave install first." |
| Invalid JSON in des-config.json | Backup as .bak, reset to {}, proceed with notice |
| Unknown profile name | "Unknown profile '{name}'. Available: lean, standard, thorough, exhaustive, custom, inherit" |
| inherit with undetectable session model | Fallback to sonnet with notice: "Could not detect session model. Defaulting agent_model to sonnet." |
{target_file} (read-modify-write, other keys preserved)~/.nwave/ directory auto-created with parents=True on first global save/nw-rigor
No current profile set. Shows comparison table, user picks "standard", sees detail view, confirms. Config written with full rigor block.
/nw-rigor lean
Current profile is "standard". Shows diff: loses review, loses PREPARE/COMMIT phases, loses refactoring pass. Agent drops from sonnet to haiku. User confirms. Config updated.
/nw-rigor thorough
Current profile is "standard". Shows diff: sonnet->opus agent, haiku->sonnet reviewer, double review enabled. No losses to highlight (pure upgrade). User confirms. Config updated.
/nw-rigor custom
Walks through 6 questions: agent model (opus), reviewer (haiku), double review (no), TDD (full 5-phase), refactoring (yes), mutation (yes). Saves as custom profile with opus agent, haiku reviewer, single review, full TDD, refactoring, and mutation testing — a combination no preset offers.
/nw-rigor turbo
Error: "Unknown profile 'turbo'. Available: lean, standard, thorough, exhaustive, inherit"
/nw-rigor
No .nwave/ directory found. Shows: "No nWave config directory found. Run nwave install first." Stops.
testing
Acceptance test creation methodology for the DISTILL wave. Domain knowledge for the acceptance designer agent: port-to-port principle, prior wave reading, wave-decision reconciliation, graceful degradation, and document back-propagation.
testing
Methodology for minimizing test count while maximizing behavioral coverage - behavior definition, anti-pattern catalog, consolidation patterns, stopping criterion, coverage-preserving validation
testing
Methodology for minimizing test count while maximizing behavioral coverage - behavior definition, anti-pattern catalog, consolidation patterns, stopping criterion, coverage-preserving validation
development
Design mandates for acceptance tests - hexagonal boundary, business language abstraction, user journey completeness, pure function extraction, 3 Pillars (domain language / chained narrative / production composition), and the layered ATD discipline (Universe-bound assertion, layer-dependent PBT mode, two-tier acceptance, example-based sad paths)