fix(init): generated instructions work without a global graft install (#61) - #210
fix(init): generated instructions work without a global graft install (#61)#210Frankie-Xu wants to merge 1 commit into
Conversation
…trailhq#61) Co-authored-by: Cursor <cursoragent@cursor.com>
🌱 graft blast radius2 areas changed → 3 areas can be affected. 10 dependent symbols, depth 2. flowchart TB
A0(("Host Initialization<br/>5 symbols"))
A1(("CLI Wiring<br/>4 symbols"))
A2(("Claude Initialization<br/>1 symbol"))
classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
class A0,A1,A2 reached;
All 10 dependent symbols, grouped by areaHost Initialization — 5 symbols in 4 files
CLI Wiring — 4 symbols in 3 files
Claude Initialization — 1 symbol in 1 file
Test signal per changed area — 2 ✓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.
4 test suites also reference this code4 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. |
Summary
graft initdoes not install a globalgraftbinary, but AGENTS.md / GEMINI.md / SKILL.md (and the other host copies of the same body) told agents to run baregraft ask. The first command then failed with command-not-found.npx @nanonets/graft …: smaller diff, and re-runninginitonly replaces graft's fenced section / owned skill file rather than making every listed command noisier for repos that already have the CLI.cliFallbackNote(), is interpolated intoinstructionBody()andskillTemplate(). Agents that hit a missing binary are told to usenpx -y @nanonets/graftin its place (example included);bunx/pnpm dlx/yarn dlxare named as equivalents. Commands staygraft askso a global install keeps working unchanged.Independent of #60 / #208 — the note is a static npx fallback, not lockfile detection. Those can merge later if instructions should follow
--runner.Test plan
hosts-instructionsandclaude-skill-templateassert the fallback wordinggraft init --agents claude cursor agents --no-globalwrites the note into AGENTS.md,.cursor/rules/graft.mdc, and SKILL.mdgraft init --dry-runstill only lists pathsnpm run buildnpm testmatches origin/main aside from an unrelatedviz --tabsfailure when this worktree has nograft/graphCloses #61
Made with Cursor