Skip to content

fix(discover): exclude common tooling dirs (.claude, .opencode, etc.) by default#43

Merged
RichardHightower merged 1 commit into
mainfrom
fix/inv-excludes-tooling-dirs
Apr 27, 2026
Merged

fix(discover): exclude common tooling dirs (.claude, .opencode, etc.) by default#43
RichardHightower merged 1 commit into
mainfrom
fix/inv-excludes-tooling-dirs

Conversation

@RichardHightower
Copy link
Copy Markdown
Contributor

Summary

Add `.claude`, `.opencode`, `.devcontainer`, `.idea`, `.vscode` to `DEFAULT_EXCLUDES` so designdoc stops paying for LLM analysis on committed-but-not-product-code tooling dirs.

Why

Real-repo eval (designdoc 1.2.0 against agent-brain — see #41 for that run) indexed and paid for 7 file summaries on tooling artifacts: 4 under `.claude/skills/.../sample-cli/` (Claude Code skill samples), 3 under `.opencode/`. ~$0.85 of $14.99 budget wasted before the run halted mid-Stage-2.

Modern dev workflows commit these configs all the time. Treating them as documentation targets is never what the user wants.

Changes

  • `src/designdoc/index/discover.py`: extend `DEFAULT_EXCLUDES` with the five tooling dirs.
  • `tests/unit/test_discover.py`: add `test_default_excludes_skips_committed_tooling_dirs` and `test_excludes_dot_claude_skill_samples` (regression). Wrote both red first, then made green by the source change (TWRC).
  • `.gitignore`: bring along the `docs/agent-brain/` eval-output ignore I added on a previous branch — keeps the repo clean during local evals.

Invariants

Pure discover-stage change. No `loop.py`, no `verdict.py`, no `mermaid/loop.py` touched. Gen-3 invariants (MAX_ATTEMPTS=3, checker isolation, schema-validated verdicts, mermaid two-checker, HIL fallback) not in scope.

Verification

  • `task ci` green locally — 11 unit + 95 integration tests pass.
  • Failing test written first; passes after the discover.py change.
  • No behavioral change for users who already pass custom `exclude_paths` — those still compose additively (`discover.py:85-86`).

Related

🤖 Generated with Claude Code

….vscode/ by default

Surfaced by the agent-brain real-repo eval: designdoc indexed 4 .claude/skills/.../sample-cli/*.py
files (Rick's local Claude skill samples) and 3 .opencode/ files, paying full
doer/checker treatment on each (~$0.85 of $14.99 budget on tooling samples
that have nothing to do with the codebase under documentation).

Modern dev workflows commonly commit local-tooling configs:
- .claude — Claude Code skills, agents, commands
- .opencode — sst.dev OpenCode configuration
- .devcontainer — VS Code dev container definitions
- .idea — JetBrains project files
- .vscode — VS Code settings

These are never the user's product code. Adding them to DEFAULT_EXCLUDES
mirrors the .gitignore patterns most users already have for these dirs.

Users who genuinely want to document one of these can pass --exclude-paths
with an empty/different list, or rely on the existing exclude_paths config
hook (which still composes additively with DEFAULT_EXCLUDES).

The .gitignore change in this commit is the eval-output gitignore I added
earlier when running designdoc against agent-brain — pulled along to keep
the repo clean.

Closes #42.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DEFAULT_EXCLUDES missing .claude/, .opencode/, .devcontainer/

1 participant