feat(build): opt out of .gitignore and .ignore writes (#148) - #156
Conversation
ebc2d66 to
e18eac0
Compare
|
Rebased on current Local verification on the rebased head
|
e18eac0 to
8869309
Compare
|
Rebased onto current
|
Co-authored-by: Cursor <cursoragent@cursor.com>
8869309 to
6b18fd9
Compare
|
Still the #148 opt-out:
|
🌱 graft blast radius2 areas changed → 2 areas can be affected. 4 dependent symbols, depth 2. flowchart TB
A0(("Workspace Build Graph<br/>3 symbols"))
A1(("Graph Engine<br/>1 symbol"))
classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
class A0,A1 reached;
All 4 dependent symbols, grouped by areaWorkspace Build Graph — 3 symbols in 3 files
Graph Engine — 1 symbol in 1 file
Test signal per changed area — 1 ✓ · 1 –Reached = a node under a test path has a resolved edge into the changed symbol. It undercounts anything called indirectly — through a CLI, a spawned process or a dynamic import — so read a low ratio as “look here”, never as a coverage gate.
29 test suites also reference this code31 symbols, kept out of the diagram and the table so they cannot crowd out the areas a reviewer has to look at.
Open the interactive graph → — click an area to see its dependent symbols at file:line. |
|
Verified locally on top of current Fixes #148: adds
|
Summary
GRAFT_NO_GITIGNORE=1to skip writing/graft/into the repo's.gitignoreduringgraft build(including hook-triggered builds that inherit env).GRAFT_NO_IGNORE=1to skip writing.ignore(the ripgrep re-admit file). Default behavior is unchanged; both are opt-in disable switches using the same truthy parsing asGRAFT_NO_REFRESH.graft build --no-gitignoreandgraft build --no-ignore..env.example.Closes #148
Notes
.ignorewrites, ripgrep will honor.gitignoreand won't searchgraft/cards unless you manage search exclusions yourself (e.g. keep a hand-written.ignore, or userg -uu).core.excludesfiledetection is intentionally out of scope here — a good follow-up if users want automatic skip without env vars.Test plan
npm run build && npm test— all greennode --import tsx --test test/context.test.ts— new unit + CLI integration tests passensureGitignored/ensureSearchabletests unchanged (default path)Made with Cursor