Inspiration

Every serious defect in a factory gets an 8D investigation. Step D7 is yokoten (横展): take the proven fix sideways to every line, part and product where the same failure can happen. It is the step most often left unfinished. Months later the same defect comes back on a sister line, and a new team starts from a blank page - while the answer sits in a closed report nobody connects to it.

That knowledge is a graph: failure → part → part family, line → process → sister lines, root cause → mechanism, fix → where it was (and was not) deployed, part → customer. So we built the quality memory as one.

What it does

When a complaint lands, Yokoten Graph answers five questions, each a Cypher query over a Relate graph:

  • Is this a recurrence? Same failure mode on the same process or part family in a closed 8D, then that case's yokoten decision for this line and this part. In the demo, today's porosity complaint on line DC-3 turns out to be a repeat of a May case fixed on DC-2 - the yokoten to DC-3 was recorded as "open" and never done.
  • Seen before - and why? The similarity score is built from shared paths (failure mode, part, family, process, line, customer, root-cause mechanism) plus vector similarity, so every match explains itself.
  • Where is the plant exposed? Proven error-proofing that never reached a sister line, the parts made there and the customers they ship to - and whether it already recurred.
  • What is systemic? Root-cause mechanisms shared by different failures, e.g. "process runs before its thermal state is stable" behind a short shot, a cold shut and an out-of-tolerance bore.
  • This 8D is weak - what has worked here before? A coach flags root causes that end on a person and training-only fixes, then suggests error-proofing already proven in the plant for the best-fitting mechanism.

Plus who-solved-this-before, hybrid search (vector + full-text over cases + full-text over every why in every five-why chain, walked back to its case), and "report a new problem in plain words" (facets inferred, written in a transaction, analysed, rolled back unless saved).

How we built it

  • Relate, single-file mode: the whole plant memory is data/kestrel.rl in the repo - one file to commit, copy, attach to an audit, or open read-only from several processes. 127 nodes, 230 relationships, 13 labels, 18 relationship types.
  • Same Cypher everywhere: one .cypher file per question, used by the Python CLI (yg), the MCP server for agents (8 tools; writes only with save=true; Cypher tool is read-only) and the browser demo, where Relate's WebAssembly build rebuilds the graph from the exact statements that built the file. A parity test checks the browser and the CLI give identical answers.
  • Relate features used: embedded Python library, WASM, vector index with SEARCH ... SCORE AS, two full-text indexes, constraints, pattern comprehensions, variable-length paths, shortestPath, transactions with rollback, read-only opens. The store also opens with the relate CLI and relate serve --mcp.
  • The sample plant (Kestrel Castings, 11 8D cases) is fictional. The text vector is a tiny deterministic hashed embedding, so the demo needs no model download or API key; the graph does the heavy lifting.

Challenges we ran into

Making similarity explainable instead of a black-box number: we score with graph paths first and use the vector only as a tiebreaker. Modelling five-why chains so that a search hit deep in a chain still leads back to its case. Keeping the browser and the CLI answers identical.

Accomplishments that we're proud of

The recurrence check: one query connects a brand-new complaint to the exact unfinished yokoten decision that let it happen, and names the fix to deploy. And it all runs in a browser tab with no server.

What we learned

How much of quality engineering is relationships rather than documents, and how far a small embedded graph goes: the whole demo graph builds in the browser in a few hundred milliseconds.

What's next

Import from real 8D tools (Jira, spreadsheets), a "close the gap" action that creates the yokoten tasks, real embeddings, and a shared store for several plants using Relate's pull/push to Neo4j.

Built With

Share this project:

Updates

Submission history