Luigit
repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by admin

docs: extend plan with edge-case gitignore tests

cc1d3b808620c0e270f395f795eef85790851678

Oliver Jan Krylow <oliver@bugabinga.net> · 2026-06-05 20:01 UTC

unsigned 1 parent

Changed files (1)

PLAN.md

ready
@@ -73,6 +73,13 @@
- `/build/` anchors to the context root
- `src/noisy/` ignores the directory and descendants
- Multiple patterns from a multiline string
+ - `**` matches any number of directory levels (`a/**/b`)
+ - Character classes `[abc]` match single chars
+ - Escaped specials (`\#`, `\!`, `\ `, `\*`) are treated as literals
+ - Trailing-slash semantics: `build/` ignores only directories; `build` ignores files and directories
+ - Multiple negations in sequence (`*.log` → `!a.log` → `!b.log`)
+ - Nested directory patterns (`node_modules/**/package.json`)
+ - Edge: pattern `*` does NOT match path separator (`a/b` should not match `*`)
3. **Implement replacement**
Create `extensions/llmiterate/gitignore.ts` with a `GitIgnoreMatcher` class:
@@ -85,7 +92,7 @@
- Unanchored patterns match at any depth
- Leading `/` anchors to the context root
- Applies patterns in order; negation flips state
- - Estimated: ~100 lines
+ - Estimated: ~120 lines
4. **Swap dependency in `watcher.ts`**
- Remove `import ignore, { type Ignore } from "ignore";`