Files
clide/docs/ADRs/0004-ignore-file-strategy.md
T
jpmschweitzerandClaude Opus 4.7 a782511470 carry forward ADRs, Claude Code config, and changelog discipline
Ports the patterns that crystallized during the short-lived claudian
plugin project (discarded in favour of this Flutter rebuild):

- ADRs 0001-0004 capture decisions that survive the host change —
  CLI-first over MCP, Go for the sidecar, pql as a supporter tool
  that becomes a clide-managed subsystem when present, and the
  ignore-file strategy that wires all file-enumerating surfaces
  through one knob in .pql/config.yaml.
- .claude/settings.json and the git-commit and skill-create skills
  come over with naming updated for clide. The git-commit skill's
  "no Conventional Commits" convention supersedes the Python-era
  clide style under legacy/; the Keep-a-Changelog discipline and
  the project.yaml-version-and-changelog-bumped-together rule
  apply going forward.
- CHANGELOG.md starts fresh at the repo root to track the Flutter
  rebuild. The Python changelog is preserved under legacy/.

.gitignore narrows from `.claude/` to just `.claude/settings.local.json`
so project-level config and skills travel with the repo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 20:38:49 +02:00

2.7 KiB

ADR 0004 — Ignore file strategy

Status: accepted Date: 2026-04-20 (ported from the claudian lineage)

Context

Clide's working assumption is that the git repo is the workspace — no separate "vault" concept layered on top. Every file-enumerating surface in Clide (pql query panels, canvas drivers, graph view, sidecar file watchers, pane lists, file tree) needs to skip the obvious junk — vendor/, node_modules/, dist/, build artifacts — or results drown in noise.

Decision

One mechanism everywhere: the ignore_files: list in .pql/config.yaml. An ordered list of gitignore-shaped files, later entries win on per-pattern conflicts.

Default

pql defaults to ignore_files: [.gitignore]. Most repos already keep exclusions there, so zero config in a code repo; in a notes-only directory .gitignore doesn't exist and the default is a safe no-op.

Clide sync

Per ADR 0003's "pql is a Clide subsystem when present" rule, Clide writes the list on load:

  • If .clideignore exists in the repo: ignore_files: [.gitignore, .clideignore]. Clide-specific deltas (including !pattern negations) layer on top of gitignore.
  • Otherwise: ignore_files: [.gitignore] (matches the pql default).

No conditional sync. Clide only stomps ignore_files:; other pql config keys are left alone.

.clideignore semantics

  • Carries only the Clide-specific deviations from .gitignore. Never duplicate gitignore's contents.
  • Supports !pattern negations to un-ignore specific entries (e.g. !.github/ to expose workflow docs in query results).

Walker magic: none except .git/

Git self-hides .git/ — that's the only invisible exclusion in the stack. Every other tool is explicit: pql adds .pql/ to .gitignore at install time, and Clide adds any private dirs it introduces (e.g. .clide/) to .gitignore on install. Exclusion flows through the normal ignore_files: chain; no hardcoded walker exceptions for tool-owned dirs.

Same list, same rules, everywhere

Sidecar consumers (watchers, canvas, pane list, file tree, graph view) read the same key from .pql/config.yaml and apply identical precedence, so Claude and the user always see the same filtered surface.

Consequences

  • Users get one config knob, in a file they might already know (pql users) or never need to touch (Clide-only users).
  • .clideignore is short by design — it's deltas, not a full list.
  • Removing Clide from a repo leaves pql working with vanilla defaults (Clide's last-written ignore_files: stays until pql or the user rewrites it; worth reconsidering during uninstall design).
  • Upstream pql work: the ignore_files: list is already the shape pql has landed on (plural, ordered, defaults to [.gitignore]).