bydisentinel· 40 skills
Fix nodes silently disappearing from RFDB when an enricher or post-resolution pass writes new nodes via BatchHandle. Use when: (1) writing a TypeScript enricher that should ADD nodes/edges to existing files, (2) after calling client.createBatch() + batch.addNode({file: 'X', ...}) + batch.commit() the original nodes in file X have vanished, (3) tests that load a graph fixture, run an enricher, then query original nodes get empty results, (4) a verification step shows expected nodes pre-enrichment but 0 post-enrichment. Root cause: BatchHandle.commit() invokes RFDB's commit_batch which AUTO-POPULATES changed_files from each added node's file field, then the server DELETES all existing nodes whose file matches before inserting new ones — file-level upsert semantics. This is correct for the JS/Haskell analyzers (which fully re-emit a file's contents) but catastrophic for enrichers that only ADD to existing files.
$npx -y skills add disentinel/grafema --skill rfdb-batchhandle-deletes-existing-nodesInstalls into the current project.
Run `npx skills use "https://github.com/disentinel/grafema" --skill "disentinel/grafema/rfdb-batchhandle-deletes-existing-nodes"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/disentinel/grafema" that are relevant to the current task. Run `npx skills add "https://github.com/disentinel/grafema"` and select the relevant skills, then follow their instructions.