From ramco-brain
Safely ADD new knowledge to the Ramco ERP "Brain" (the LLM-wiki / vectorless-RAG knowledge system) as a strictly additive, non-regressing positive delta. Use this skill WHENEVER you are extending, reindexing, updating, or ingesting into the Brain — a new source file or artefact class, a new cross-connection/edge between components, or a new instruction in the chatbot's system prompt or tool set. Also use it whenever the user says "reindex", "add this to the brain", "ingest", "extend the brain", "add a parser/generator", "wire up a new source", or asks to update brain content without breaking what is already there. The governing rule is: the CURRENT Brain is pre-eminent — nothing is ever deleted, and earlier answers must never regress.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ramco-brain:reindex-brainThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The Brain is a compiled **LLM wiki**: raw product files are parsed into JSONL
The Brain is a compiled LLM wiki: raw product files are parsed into JSONL
registers, generators project registers into cross-linked Markdown wiki pages
(+ a kb/ machine projection + overlays), and a BM25 index makes it queryable. This
skill governs how to add to that artefact so it strictly grows.
Treat the current Brain as pre-eminent and immutable in effect. Every change must be a positive delta:
[[wikilink]] / CIM / call-graph / FK /
journey) fuses more of the graph together.Deletion, renaming that breaks links, replacing a good run with an ungated one, or merging two sources so a prior row disappears are all forbidden — they regress the Brain.
New raw source / file class / more of an existing source ......... NEW ARTEFACT → §A
New relationship between existing things (edge/link/journey) ..... CROSS-CONNECTION → §B
The Brain HAS the fact but the chatbot doesn't surface it well ... PROMPT ADDITION → §C
Most "it can't answer X" problems are not missing data — the V1 eval found ~45% of misses were surfacing/synthesis gaps (the fact was present, just not assembled). So check §C first: try a prompt/tool addition before adding a parser. Cheapest fix wins.
The one class where §C is NOT enough: impact / blast-radius queries. A question like
"if I widen column bodit_bpono, where does it get affected?" needs the chatbot to traverse
edges the graph does not contain — column→SP (which SPs read/write this column),
column→screen, column→service, and cross-component document-number links (a sibling
component storing the same *_bpono reference). You cannot prompt your way to an edge that
isn't in the graph — no §C rule makes the chatbot name an SP or a downstream component when
there is no column→SP or cross-component edge to follow. These are §A/§B data gaps first
(build the edge), and §C second (add an impact rule + tool that fans out over the new edges).
Diagnose honestly: if the missing answer is a name that lives on an edge nobody built, it's
a data gap, not a surfacing gap. Worked example + the full remediation roadmap:
references/case-impact-queries.md.
RAW (ramco-erp-brain/, immutable) → PARSER P-* → REGISTER (JSONL, run-id'd)
→ GENERATOR gen_*.py (pure projection, idempotent) → WIKI PAGES (L1–L6)
→ kb/ projection + overlays (journeys / a2ui / migration) → BM25 index + ToC
brain/_registers/<parser_id>/<run_id>/*.jsonl — every batch carries an accepted
pointer (last gate-passing --accept run — what generators read) and a current pointer
(last run of any mode). The accepted pointer only advances on a full gate pass — this
is the core device that makes a bad new run invisible to the wiki.
Full mechanics for each stage are in references/pipeline.md — read it before touching a parser or generator.
PARSER / HYBRID / LLM-DIRECT). Build a real parser only if the
source is structured and repeated at scale, a binary container the LLM can't read
raw, or too big for context; otherwise route it LLM-DIRECT. Add a class row to
parser_plan.md (V1 classes 1–44; V2 adds 45–53). Dispatch by magic bytes, not
extension.record_type:header first line with
counts.in/out/skipped_named, named residuals, source_path+location per record, and
a golden-file regression suite.old_total + new_disjoint = new_total with the delta
enumerated; tag new sub-classes (e.g. logic_class) — never silently merge into main
counts. Re-run only the newly-included dirs.accepted pointer is written. A
failed --accept run is suffixed .FAILED and links nothing.build_runmaps.py) so generators find the new run, then re-run the
generators (idempotent, register-only). New rows flow into pages by projection.See references/pipeline.md §"Add a parser/artefact" for the exact commands and the per-component ingest loop (scout → mine → compile → lint → maintain).
Cross-connections are added by extending one of the five edge-layer generators, all of which converge on the component basename as the node id:
[[Name]] wikilinks (basename resolution) · gen_cim_cardinality.py (CIM topology) ·
gen_sp_callgraph.py (EXEC edges) · gen_reverse_indexes.py + gen_cross_fk.py
(P-CSV/P-DDL lineage) · gen_journey_index (journey → component/screen links).Rules that keep an edge from regressing the graph:
_SER alias merge, and the `CODE`† backtick-escape
for partners with no page — or you create dangling links.[[link]] must resolve — check_links.py is a binding gate (exit 0 iff
0 dangling and 0 unreconciled A2UI packs). New journeys are gated by verify_journeys.py
(schema + all refs resolve).dynamic/relay/external as an
unresolved frontier; never invent a resolution). Raise-helper edges stay out of the logic
graph.Sub-component (column-level) impact edges — a known frontier (gaps G-43…G-47). The five generators above all key on the component basename, so today the graph carries table↔table (intra-component FK), SP→SP (call graph), and component↔component (CIM / service call) edges — but no edge finer than the component. Impact queries need four edge types that are not yet built:
sp_writes_column / sp_reads_column
so "which SPs touch bodit_bpono" is answerable, not just "873 SPs in the component".Pur_Rel_Slip.prs_mn_bpono → Bl_PO's bpoh_bpono). Match on the composite
key (*_bpono + *_bpoamendno + *_bpoou) as the reliable signal — same-UDD alone is
too noisy (every udd_documentno column would false-match).dataIndex→column) and column→service reverse indexes — capture
the screen control→column binding, then project column→screen and column→service.These are §A/§B work (build the capture pass + a new edge generator), added under the same
non-regression discipline (basename convergence where possible, [[link]]s that resolve,
check_links.py stays at 0 dangling). Until built, they are first-class declared gaps
in status.json (G-43…G-47) — never a silent "the Brain just didn't try hard enough".
See references/pipeline.md §"Cross-connections" and references/case-impact-queries.md.
The chatbot never re-reads raw files; it navigates the wiki with 9 tools driven by a system prompt. To make it use existing knowledge better:
vercel_deploy/brain_chatbot/src/prompt.js
(buildSystemPrompt()). Add a rule, a doc-type hint, or an enumerate-before-answering nudge.TOOL_SCHEMAS in src/tools.js. A new tool
needs a TOOL_SCHEMAS entry + an EXECUTORS executor + an indexStore.js function.scripts/build_index.js, ~6s, deterministic) so the chatbot can find it.See references/pipeline.md §"Prompt & tools".
These eight devices are what make the Brain safe to grow. Do not weaken any of them. Full detail + the exact gate names in references/non-regression.md:
.FAILED, invisible).status.json gaps[]; a silent gap is corruption).A change is only "done" when you have proven no regression:
check_links.py → 0 dangling, 0 unreconciled A2UI packs.verify_journeys.py → 0 schema-invalid, 0 dangling refs.gates.json all pass; count sums reconcile.eval-brain skill). Compare to the last accepted
run: FULL% and answerable% must not drop, and no previously-FULL question may
regress to PARTIAL/MISSING. New coverage should only add FULL answers.status.json: new/closed gaps recorded with the run that changed them; version bumped.If any previously-answered question got worse, do not accept the run — the accepted
pointer stays on the prior baseline (that's your rollback) until you fix the regression.
accepted pointer and record provenance in status.json.npx claudepluginhub rushyop/rushy-claude-plugins --plugin ramco-brainGuides reception of code review feedback: verify before implementing, avoid performative agreement, push back with technical reasoning when needed.
Design banners for social media, ads, website heroes, and print with multiple art direction options and AI-generated visuals.