-
-
The question in business words: "We are discontinuing PU-1004 — what breaks?" The answer arrives as a path, not a score.
-
600 products · 1,667 nodes · 3,730 relationships. One discontinued product expands to 475 consequences — in a single 1.1 MB file.
-
viewer.html after a real click: 130 nodes · 142 relationships, every edge a real relationship in store/catalog.rl.
-
Same question twice: SQL needs ten tables plus a recursive CTE; Cypher needs one variable-length pattern (query 01).
-
Live MCP, read-only: five tools, a plain-English question, and read_cypher answers "2 rows · 4 hops" with the path itself.
-
make report opens with one line for the ticket: delisting PU-1004 takes 2 listing(s) offline, deadens 1 page(s), breaks 1 feed contract(s).
-
make verify grades itself: eleven gates over queries, MCP, baselines and determinism, ending in "== verify: OK ==".
-
"Know the blast radius before it breaks." github.com/koztechie/cascade · no signup · no server · one file · 11 gates green.
-
GIF
One click in viewer.html: every edge the product touches, read from the committed store.
Cascade
Know the blast radius before it breaks: one Cypher question returns a path through the graph — not a score.
Use case
E-commerce teams change something every week: a SKU is discontinued, a brand is renamed, prices rise 10%, two categories merge. The blast radius of that one change is scattered across product feeds, marketplace listings, price rules, campaigns, landing pages and CRM segments — today it lives in spreadsheets and tribal knowledge, and nobody finds the seventh consequence until it breaks.
Who this is for: the e-commerce operations manager who owns the weekly change spreadsheet — SKU retired, price moved, categories merged — together with marketplace/feed managers and the AI agents that assist them. You learn the seventh consequence before it breaks, not on Friday in production.
The challenge asks for connected data that helps "agents, apps, or people" — Cascade answers with all three from one graph: the agent over MCP (five read-only tools), the app as viewer.html and a one-line make report, and the person above — an operations manager who never has to write Cypher.
Cascade answers seven of those questions, one Cypher statement each: what breaks if we stop selling this product · why is this listing rejected · what is invisible or unlinked right now · what collides if we merge two categories (a dry run) · which products will be rejected next · is this promo still in force · what single fix clears the most risk. No Cypher required to read the answer — the queries are how it is checked, not what you are asked to write.
Why a graph: a vector store finds text that looks like the question; it cannot say what breaks, because breakage lives in relationships that have to be traversed (listing → product → category → feed contract → rule), not in similarity. So every answer arrives as a path — the consequence is proven, not asserted. In SQL the same question is ten tables and a recursive CTE; here it is one pattern.
What connects to what
Product→Listing→Marketplace— where it is actually soldProduct→Category→Rule,Campaign,Segment— the commercial machinery pointed at itCategory→Mapping→Feed— the field contract each feed enforces (e.g. a requiredgtin)Page→Product/Category— what the site shows and links
Change one node and the graph shows what else moves — with the reason beside each edge. Where a link should exist and doesn't, the missing edge is the answer (orphan pages, invisible stock).
How it uses Relate
- Mode: single file (
store/catalog.rl) — 1.1 MB, committed to the repository. - Why this mode: one file is the whole database. No server, no signup, no directory to reconcile; the whole interface is
relate query --database store/catalog.rl. Copy it, commit it, mail it, move it to another machine and the graph travels with it. - What the graph models:
| Node | Meaning |
| --- | --- |
| Product, Brand, Category, Supplier | the catalog itself |
| Listing, Marketplace, Feed, Mapping | where it is published, and the field contract each feed enforces |
| Rule, Campaign, Segment | the commercial machinery pointed at the catalog |
| Page | landing / category / product pages on the site |
Relationships: IN_CATEGORY, HAS_BRAND, SUPPLIED_BY · OFFERS, PUBLISHED_ON · HAS_MAPPING, APPLIES_TO · TARGETS, FILTERS_BY · FEATURES, COVERS, LINKS_TO. 1,667 nodes and 3,730 relationships.
What is verified before you trust a number
Every figure above comes from a run, and each one can be traced to the thing that produced it:
| Claim | Where it is checked |
|---|---|
| What the seven queries return | make verify gates 01–04, 06, 08, 09 assert the expected rows |
| Eleven gates exist | scripts/check_claims.sh counts the gate markers inside scripts/verify.sh |
| Five read-only MCP tools, by name | check-claims asks the live server for tools/list |
| 1,667 nodes · 3,730 relationships · 600 products · 553 clean | verify gate 07 (self-grading), reconciled against the README |
| Outputs cannot drift during a refactor | make golden compares demo, report and verify output byte for byte |
| One-line verdict | the **Verdict:** line make report writes |
The store is synthetic (seed 42, generator in this repository, deliberate defects planted and asserted), because a public dataset of e-commerce operations does not exist and publishing a real catalog is not an option. No AI runs inside the product: every runtime answer is deterministic Cypher against the store.
Setup and run
Prerequisites: Python 3.8+ and the relate binary — no server, no signup.
# 1. install relate — one binary
curl -sSfL https://relatedb.ai/install.sh | bash
# 2. clone, build the store, verify everything
git clone https://github.com/koztechie/cascade.git
cd cascade
make verify
Expected output ends with == verify: OK == (about 12–17 s on a 2013 floor machine). On hardware the prebuilt CLI does not support, bin/relate drives the same engine through the pinned Python client — same commands, same store.
From zero to an answer, in this order:
- Open
viewer.html— the demo blast radius, already built: offline, no server, no query written. That is the first insight. make verify— eleven gates, ending== verify: OK ==.make report— a paste-into-a-ticket markdown report that opens with a one-line verdict, again with no Cypher.- Give it to your agent —
.mcp.json(any MCP client),opencode.json(OpenCode) or.agents/skills/cascade/SKILL.mdwire in five read-only tools:read_cypher,get_schema,blast_radius,rejection_causes,remediation. Then ask: "We are discontinuing PU-1004 — what breaks?" A recorded transcript — including the agent correcting its own first query — is indocs/agent-session.md.
Where the data lives
store/catalog.rl— the persistent Relate store, committed to this repository.data/load.cypher— the generated load script (scripts/generate_data.py, seed 42).data/demo_params.json— the demo SKU and category pair used by the queries.
The dataset is synthetic: realistic structure, deliberate defects, no real business data — and the generator ships in the repository, so every row can be audited.
Product capabilities, third-party tools and AI tools
Product capabilities (Relate): the project makes meaningful use of Relate through the CLI (relate query, relate serve --mcp stdio), embedded use (the relate_db Python client behind bin/relate) and MCP (five read-only tools over stdio), against a single-file .rl store, with Cypher as the query language. Bolt, HTTP and the Rust and Python libraries are the surfaces that switch on when a catalog outgrows a single process — see Beyond one file in the README: the same queries run on Neo4j / Neo4j Aura, and a subgraph can be pulled into Relay for local work and pushed back.
Third-party tools: cytoscape.js (MIT, vendored in vendor/) for the viewer; Relate and the relate_db client (Apache-2.0).
AI tools: AI-assisted development — design, code, tests and docs produced with AI under the project owner's direction. No AI runs at runtime: every answer is deterministic Cypher against the store, and where a model and the graph disagree, the graph wins. The narration voice in the demo video is AI-generated — Kokoro-82M (Apache-2.0), run locally on CPU: no cloud service, no account. The video's music bed is synthesised by this repository's own build script, so no third-party audio is used anywhere in the video.
Originality: written for this contest; no reused third-party application code.
Built With
- cytoscape
- graph-database
- mcp
- python
- relate

