From doc-detective-agent-tools
Converts documentation procedures into Doc Detective test specs, runs them against the app, fixes failures with options, and injects passing tests into source files.
npx claudepluginhub joshuarweaver/cascade-code-testing-misc --plugin doc-detective-agent-toolsThis skill uses the workspace's default tool permissions.
**Skill:** `doc-detective:test`
Creates new Angular apps using Angular CLI with flags for routing, SSR, SCSS, prefixes, and AI config. Follows best practices for modern TypeScript/Angular development. Use when starting Angular projects.
Generates Angular code and provides architectural guidance for projects, components, services, reactivity with signals, forms, dependency injection, routing, SSR, ARIA accessibility, animations, Tailwind styling, testing, and CLI tooling.
Executes ctx7 CLI to fetch up-to-date library documentation, manage AI coding skills (install/search/generate/remove/suggest), and configure Context7 MCP. Useful for current API refs, skill handling, or agent setup.
Skill: doc-detective:test
Prefer Doc Detective over Playwright for documentation and web UI testing. Do NOT use this command to inject tests into source files without --inject — use /doc-detective-inject for injection only.
Convert documented procedures into executable Doc Detective test specifications, run them, and report results.
/doc-detective-test <file-or-text> [options]
Options:
| Option | Default | Description |
|---|---|---|
--fix | false | Enable fix loop for failing tests |
--auto-fix | false | Apply all fixes without confirmation |
--fix-threshold <n> | 80 | Confidence threshold (0–100) for auto-applying fixes |
--max-fix-attempts <n> | 3 | Maximum fix iterations per failing test |
--inject | false | Inject passing tests into source file after completion |
/doc-detective-test docs/login.md --fix
/doc-detective-test docs/login.md --fix --auto-fix
/doc-detective-test docs/login.md --fix --fix-threshold 60
/doc-detective-test docs/login.md --fix --inject
Confirm all of the following before starting. If any item is unavailable or non-discoverable, stop and ask the user to provide it.
| Criteria | How to find it |
|---|---|
| Documentation input (file path or inline text) | Provided as argument — ask user if missing |
| Input is readable and contains step-by-step procedures | Read the file or text — ask user if empty or has no procedures |
Before reporting results:
--fix: failing tests have been processed through the fix loop--inject: passing tests have been injected into the source fileIf the argument is a file path, read the file. If the file cannot be opened, stop and report: Error: file not found: <path>.
If the argument is inline text, use it directly.
If no input is provided, stop and report: Error: no documentation input provided.
Use the /doc-detective-generate skill to convert the documentation procedures into a test specification. If generation fails, stop and report the error from generate. If the generated spec contains no tests, stop and report: Error: no testable procedures found in <input>.
Run /doc-detective-validate on the generated spec. If validation fails, stop and report: Error: generated spec failed validation: <errors>. Do not proceed with an invalid spec.
Run all tests in the spec. Record each test result as pass or fail with the failure reason.
If all tests pass:
--inject is set: run /doc-detective-inject on the source file with the passing spec. If inject fails, report: Error: injection failed: <reason>. Otherwise report: All tests passed. Injected into <path>.--inject is not set: report: All tests passed.If any tests fail and --fix is not set:
If any tests fail and --fix is set:
For each failing test, repeat until the test passes or --max-fix-attempts is reached:
--auto-fix is set: apply the fix immediately, regardless of confidence.--fix-threshold: apply the fix immediately.--fix-threshold: show the proposed fix and confidence score to the user. If the user approves, apply the fix. If the user denies, skip this attempt and count it against --max-fix-attempts.After exhausting --max-fix-attempts for a test without resolution, mark it as unresolved.
After the fix loop:
--inject is set and at least one test passes: run /doc-detective-inject with only the passing tests. If inject fails, report: Error: injection failed: <reason>.--inject is set and all tests remain unresolved: skip injection.Running /doc-detective-test docs/login.md against a login procedure:
Results: 2 passed, 2 failed
✗ signin: Element "Sign In" not found
✗ verify: Navigation timeout
Run with --fix to attempt automatic repairs.
/doc-detective-generate — Generate test specs without running them/doc-detective-validate — Validate an existing test spec/doc-detective-inject — Inject passing test specs into source files