tdmcp-quality-audit
Use this skill for broad repository quality campaigns. It coordinates existing
tdmcp specialists instead of replacing them: tdmcp-test-coverage handles focused
coverage waves, and td-feature-qa handles tool/CLI/docs/bridge boundary QA.
Execution mode: hybrid fan-out/fan-in
This environment runs coordinated sub-agents rather than TeamCreate. Spawn the
independent auditors in parallel, then fan their reports into one lead-owned plan.
Implementation happens in small waves after QA verifies the findings.
Agent roster
| Agent |
Focus |
Output |
tdmcp-quality-audit-lead |
scope, orchestration, shared edits, wave plan |
_workspace/quality-audit/00_scope.md, 05_plan.md |
tdmcp-command-auditor |
scripts, Makefile, CI, CLI command health |
_workspace/quality-audit/01_commands.md |
tdmcp-security-auditor |
trust boundaries, raw Python, env redaction, package safety |
_workspace/quality-audit/02_security.md |
tdmcp-ux-flow-auditor |
first-run, docs-to-command parity, CLI help/errors |
_workspace/quality-audit/03_usability.md |
tdmcp-refactor-test-auditor |
coverage gaps, weak tests, complexity, refactor seams |
_workspace/quality-audit/04_refactor_tests.md |
tdmcp-quality-qa |
verifies evidence and first patch wave |
_workspace/quality-audit/06_qa.md |
Phase 0 - Context check
- Read
AGENTS.md, CLAUDE.md, package.json, Makefile,
.github/workflows/*.yml, vitest.config.ts, and existing
_workspace/quality-audit/ reports.
- Decide run mode:
- no quality workspace: fresh audit;
- existing reports + user asks to continue/fix/re-run: partial re-run;
- new broad request: archive prior reports under
_workspace/quality-audit/archive/<timestamp>/ before a fresh audit.
- Check git status. Do not revert unrelated user changes.
Phase 1 - Scope and command policy
Create _workspace/quality-audit/00_scope.md with:
- requested scope;
- current branch and dirty-state summary;
- commands that are safe one-shot;
- commands requiring timeout;
- commands requiring TouchDesigner, hardware, network, or credentials;
- commands that are publish/destructive and must not run without explicit user
approval.
Command policy:
- Select the command runner before executing gates:
- if
command -v rtk >/dev/null 2>&1 succeeds, use rtk for shell commands
and follow local repo instructions such as rtk proxy zsh -lc for pipelines
or shell control flow;
- if
rtk is unavailable, record that fallback in 00_scope.md and run the
same commands through the normal shell/Codex exec path without failing the
audit solely because the wrapper is missing.
- Safe baseline:
npm run typecheck, npm run build, ./node_modules/.bin/biome check ., npm test, npm run validate:recipes, npm run test:bridge,
npm run docs:build, make complexity, npm run deps:check,
npm run coverage:harness.
- Classify before running:
dev, start, docs:dev, docs:preview,
smoke:live, docs:clips, import:bottobot, prepublishOnly,
npm publish, tag/push/version commands, and any server command.
- Long-running commands need timeout, readiness probe, and cleanup.
- TouchDesigner and hardware commands are UNVERIFIED when the bridge/device is
unavailable; they are not failures by themselves.
Phase 2 - Parallel audit
Spawn the four auditors in parallel:
tdmcp-command-auditor
tdmcp-security-auditor
tdmcp-ux-flow-auditor
tdmcp-refactor-test-auditor
Each report must use PASS / FAIL / UNVERIFIED buckets and include file:line or
command evidence. Avoid generic recommendations that cannot become a patch or a
test.
Phase 3 - Synthesis
The lead reads all reports and writes _workspace/quality-audit/05_plan.md:
- deduped findings;
- severity and confidence;
- first safe patch wave;
- deferred items requiring TD, hardware, network, or user credentials;
- suggested tests and exact commands;
- owner for each item.
Patch waves should be small:
- Wave A: regression tests for concrete security/CLI/tool behavior.
- Wave B: behavior-preserving refactors guarded by tests.
- Wave C: command/CI/docs harness improvements.
- Wave D: live TouchDesigner/hardware verification.
Phase 4 - QA before edits
Run tdmcp-quality-qa against the reports. It must reject:
- claims without evidence;
- command passes with no command output;
- weakened test thresholds;
- broad rewrites without failing tests or measurable risk;
- unverified live checks reported as passing.
Phase 5 - Implement a wave
Only after QA, implement the smallest useful wave. For coverage-heavy work, invoke
tdmcp-test-coverage and keep writers on disjoint test files. For boundary
quality issues, invoke td-feature-qa. After edits, run narrow tests first, then
the relevant gates from Phase 1.
Phase 6 - Final report
Update _workspace/quality-audit/06_qa.md with final command results and report:
- what was fixed;
- what was tested;
- what remains FAIL;
- what remains UNVERIFIED and why;
- next wave recommendation.
Error handling
- Retry deterministic local command failures once after checking dependencies.
- If dependencies are missing, run
npm ci only when appropriate for the checkout
and record that it was required.
- If generated files change from docs/build commands, inspect the diff before
keeping it.
- Do not run publish, tag, push, credential, destructive, or hardware-control
commands without explicit approval.
Test scenarios
Normal flow: user asks for a complete quality audit. The lead creates
00_scope.md, four auditors run in parallel, QA verifies evidence, Wave A adds
two CLI/config security regression tests, and gates pass. The final report keeps
TouchDesigner live smoke as UNVERIFIED if the bridge is offline.
Error flow: docs:build regenerates docs/reference/tools.md and fails because a
tool schema is broken. The command auditor records FAIL, the lead routes the
boundary to td-feature-qa, a focused test locks the schema behavior, docs build
is re-run, and the final report names the fixed file and command.
1---2name: tdmcp-quality-audit3description: Run or maintain the full tdmcp repo quality-audit team: command sweeps, all package/Makefile/CI gates, security review, usability/flow review, refactor/test-gap analysis, coverage hardening, QA, and follow-up fix waves. Use whenever the user asks for a complete audit, improve repo/code quality, test all commands, find security/usability failures, refactor debt, add missing tests, re-run the audit, continue a previous quality wave, or verify the repo is ready.4---56# tdmcp-quality-audit78Use this skill for broad repository quality campaigns. It coordinates existing9tdmcp specialists instead of replacing them: `tdmcp-test-coverage` handles focused10coverage waves, and `td-feature-qa` handles tool/CLI/docs/bridge boundary QA.1112## Execution mode: hybrid fan-out/fan-in1314This environment runs coordinated sub-agents rather than `TeamCreate`. Spawn the15independent auditors in parallel, then fan their reports into one lead-owned plan.16Implementation happens in small waves after QA verifies the findings.1718## Agent roster1920| Agent | Focus | Output |21|---|---|---|22| `tdmcp-quality-audit-lead` | scope, orchestration, shared edits, wave plan | `_workspace/quality-audit/00_scope.md`, `05_plan.md` |23| `tdmcp-command-auditor` | scripts, Makefile, CI, CLI command health | `_workspace/quality-audit/01_commands.md` |24| `tdmcp-security-auditor` | trust boundaries, raw Python, env redaction, package safety | `_workspace/quality-audit/02_security.md` |25| `tdmcp-ux-flow-auditor` | first-run, docs-to-command parity, CLI help/errors | `_workspace/quality-audit/03_usability.md` |26| `tdmcp-refactor-test-auditor` | coverage gaps, weak tests, complexity, refactor seams | `_workspace/quality-audit/04_refactor_tests.md` |27| `tdmcp-quality-qa` | verifies evidence and first patch wave | `_workspace/quality-audit/06_qa.md` |2829## Phase 0 - Context check30311. Read `AGENTS.md`, `CLAUDE.md`, `package.json`, `Makefile`,32 `.github/workflows/*.yml`, `vitest.config.ts`, and existing33 `_workspace/quality-audit/` reports.342. Decide run mode:35 - no quality workspace: fresh audit;36 - existing reports + user asks to continue/fix/re-run: partial re-run;37 - new broad request: archive prior reports under38 `_workspace/quality-audit/archive/<timestamp>/` before a fresh audit.393. Check git status. Do not revert unrelated user changes.4041## Phase 1 - Scope and command policy4243Create `_workspace/quality-audit/00_scope.md` with:4445- requested scope;46- current branch and dirty-state summary;47- commands that are safe one-shot;48- commands requiring timeout;49- commands requiring TouchDesigner, hardware, network, or credentials;50- commands that are publish/destructive and must not run without explicit user51 approval.5253Command policy:5455- Select the command runner before executing gates:56 - if `command -v rtk >/dev/null 2>&1` succeeds, use `rtk` for shell commands57 and follow local repo instructions such as `rtk proxy zsh -lc` for pipelines58 or shell control flow;59 - if `rtk` is unavailable, record that fallback in `00_scope.md` and run the60 same commands through the normal shell/Codex exec path without failing the61 audit solely because the wrapper is missing.62- Safe baseline: `npm run typecheck`, `npm run build`, `./node_modules/.bin/biome63 check .`, `npm test`, `npm run validate:recipes`, `npm run test:bridge`,64 `npm run docs:build`, `make complexity`, `npm run deps:check`,65 `npm run coverage:harness`.66- Classify before running: `dev`, `start`, `docs:dev`, `docs:preview`,67 `smoke:live`, `docs:clips`, `import:bottobot`, `prepublishOnly`,68 `npm publish`, tag/push/version commands, and any server command.69- Long-running commands need timeout, readiness probe, and cleanup.70- TouchDesigner and hardware commands are UNVERIFIED when the bridge/device is71 unavailable; they are not failures by themselves.7273## Phase 2 - Parallel audit7475Spawn the four auditors in parallel:76771. `tdmcp-command-auditor`782. `tdmcp-security-auditor`793. `tdmcp-ux-flow-auditor`804. `tdmcp-refactor-test-auditor`8182Each report must use PASS / FAIL / UNVERIFIED buckets and include file:line or83command evidence. Avoid generic recommendations that cannot become a patch or a84test.8586## Phase 3 - Synthesis8788The lead reads all reports and writes `_workspace/quality-audit/05_plan.md`:8990- deduped findings;91- severity and confidence;92- first safe patch wave;93- deferred items requiring TD, hardware, network, or user credentials;94- suggested tests and exact commands;95- owner for each item.9697Patch waves should be small:9899- Wave A: regression tests for concrete security/CLI/tool behavior.100- Wave B: behavior-preserving refactors guarded by tests.101- Wave C: command/CI/docs harness improvements.102- Wave D: live TouchDesigner/hardware verification.103104## Phase 4 - QA before edits105106Run `tdmcp-quality-qa` against the reports. It must reject:107108- claims without evidence;109- command passes with no command output;110- weakened test thresholds;111- broad rewrites without failing tests or measurable risk;112- unverified live checks reported as passing.113114## Phase 5 - Implement a wave115116Only after QA, implement the smallest useful wave. For coverage-heavy work, invoke117`tdmcp-test-coverage` and keep writers on disjoint test files. For boundary118quality issues, invoke `td-feature-qa`. After edits, run narrow tests first, then119the relevant gates from Phase 1.120121## Phase 6 - Final report122123Update `_workspace/quality-audit/06_qa.md` with final command results and report:124125- what was fixed;126- what was tested;127- what remains FAIL;128- what remains UNVERIFIED and why;129- next wave recommendation.130131## Error handling132133- Retry deterministic local command failures once after checking dependencies.134- If dependencies are missing, run `npm ci` only when appropriate for the checkout135 and record that it was required.136- If generated files change from docs/build commands, inspect the diff before137 keeping it.138- Do not run publish, tag, push, credential, destructive, or hardware-control139 commands without explicit approval.140141## Test scenarios142143Normal flow: user asks for a complete quality audit. The lead creates144`00_scope.md`, four auditors run in parallel, QA verifies evidence, Wave A adds145two CLI/config security regression tests, and gates pass. The final report keeps146TouchDesigner live smoke as UNVERIFIED if the bridge is offline.147148Error flow: `docs:build` regenerates `docs/reference/tools.md` and fails because a149tool schema is broken. The command auditor records FAIL, the lead routes the150boundary to `td-feature-qa`, a focused test locks the schema behavior, docs build151is re-run, and the final report names the fixed file and command.