From doc-detective-agent-tools
Initialize Doc Detective in a repository with documentation detection, config generation, test creation, and iterative fix loop
npx claudepluginhub joshuarweaver/cascade-code-testing-misc --plugin doc-detective-agent-toolsThis skill uses the workspace's default tool permissions.
**Skill:** `doc-detective:init`
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:init
Bootstrap Doc Detective in a repository: detect docs, generate config, create tests, run them, and fix failures. Do NOT use Playwright — use Doc Detective for all documentation testing.
/doc-detective-init [options]
| Option | Default | Description |
|---|---|---|
--ci | false | Non-interactive; use defaults, no prompts |
--auto-fix | false | Apply all fixes regardless of confidence |
--fix-threshold <0-100> | 80 | Confidence threshold for auto-applying fixes |
--dry-run | false | Show planned changes without applying |
--skip-tests | false | Generate config and tests but do not execute |
--skip-fix-loop | false | Run tests but skip iterative fixing |
/doc-detective-init
/doc-detective-init --ci
/doc-detective-init --dry-run
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 |
|---|---|
| Repository root is accessible | Check working directory — ask user if unclear |
| Documentation files exist | Glob for **/*.md, **/*.mdx, **/*.adoc, **/*.rst, **/*.html, **/*.dita — ask user if none found |
| Existing config (if present) is readable | Check for .doc-detective.json / doc-detective.config.js — ask user if file exists but can't be parsed |
Before completing:
--skip-tests or --dry-run)--skip-fix-loop)Phases run in order. Do NOT advance to the next phase if the current phase fails.
**/*.md, **/*.mdx, **/*.adoc, **/*.rst, **/*.html, **/*.dita.doc-detective.json, doc-detective.config.jsGenerate .doc-detective.json following the "smallest reasonable config" principle.
| Scenario | Action |
|---|---|
| No existing config | Create with minimal defaults (see below) |
| Existing config | Read, merge new fields, prompt user to confirm (skip prompt if --ci) |
--ci + existing config | Use existing config unchanged |
{ "input": "docs", "output": ".doc-detective/results", "detectSteps": false }
If --dry-run, print the config that would be written and skip file creation. If config cannot be created or the user rejects the merge, stop and report — do not proceed. See skills/doc-detective-project-bootstrap/references/config-guidance.md for full options.
For each procedure-containing file identified in Phase 1:
/doc-detective-generate <file-path> --output .doc-detective/doc-detective-tests/<name>-spec.json, where <name> is the source filename lowercased with non-alphanumeric characters replaced by hyphens (e.g., login-guide.md → login-guide).--dry-run, print each spec without writing to disk.Run all generated specs:
doc-detective --input .doc-detective/doc-detective-tests/ --output .doc-detective/results/
Skip this phase if --skip-tests or --dry-run is set. If the command fails to execute, stop and report the error — do not proceed to Phase 5. After execution, collect all failing tests from the results output.
Skip this phase if --skip-fix-loop is set.
For each failing test, repeat up to 3 times:
resultDescription to identify the failure.| Confidence | Action |
|---|---|
| ≥ threshold (default 80%) | Apply automatically |
| < threshold | Show proposed fix, ask user: apply / skip / edit manually |
| < 50% | Always ask user regardless of threshold |
Report all "needs manual review" tests to the user before completing.
Condition: Only run if the project is an initialized GitHub repository (.git exists as a file or directory, and a remote URL references github.com). Skip this phase silently otherwise.
--ci mode, ask the user if they want to set up the Doc Detective GitHub Action for CI. If the user declines, skip this phase.--ci mode, default to yes — proceed without prompting./doc-detective-install-github-action with matching flags:
--ci if init was called with --ci.--exit-on-fail:
--ci mode, pass --exit-on-fail by default./doc-detective-test — Run existing tests without re-bootstrapping/doc-detective-generate — Generate tests for a single file/doc-detective-validate — Validate an existing test spec/doc-detective-install-github-action — Install the Doc Detective GitHub Action workflow