<!-- Unlicense — cochranblock.org -->

# Timeline of Invention

*Dated, commit-level record of what was built, when, and why. Proves human-piloted AI development — not generated spaghetti.*

> Every entry maps to real commits. Run `git log --oneline` to verify.

## How to Read This Document

Each entry follows this format:

- **Date**: When the work shipped (not when it was started)
- **What**: Concrete deliverable — feature, fix, architecture change
- **Why**: Business or technical reason driving the decision
- **Commit**: Short hash for traceability
- **AI Role**: What the AI did vs. what the human directed

This document exists because AI-assisted code has a trust problem. Anyone can generate 10,000 lines of spaghetti. This timeline proves that a human pilot directed every decision, verified every output, and shipped working software.

---

## Human Revelations — Invented Techniques

*Novel ideas that came from human insight, not AI suggestion. These are original contributions to the field.*

### The 49.5/49.5 Recruitment Artifact (April 2026)

**Invention:** Build a working artifact targeting a specific person's strongest co-build territory, hand it to them with explicit ownership splits, and let the artifact recruit instead of a pitch.

**The Problem:** Cofounder recruitment is broken. Outreach messages get ignored. Pitch decks describe what you'd build together someday. The signal-to-noise ratio is awful — recipients can't tell who's serious from who's spamming.

**The Insight:** Hand the person a real binary that does most of what their previous job did, with explicit "here's what's mine, here's what's yours if you say yes." The artifact proves seriousness, the split offers them ownership of meaningful surface area, and the gift shape removes the recruitment frame entirely. Worst case: they pass and you have a working product anyway.

**The Technique:**
1. Pick a domain where the target has deep expertise (n8n integrations for Tanner Woodrum)
2. Build the part you can ship without them (engine, T1 nodes, federal go-to-market)
3. Scaffold the part they're best positioned to own (codegen pipeline, T2/T3 long tail, canvas)
4. Ship the artifact under public-domain license (Unlicense) so the gift is unconditional
5. Address the README to them by name

**Result:** The r8r repo. 19 working T1 nodes, 566 codegen stubs, full Leptos canvas, ships as a 7.9MB static binary. Tanner gets it whether he says yes or no — it works either way.

**Named:** 49.5/49.5 (the equity split, applied to repo authorship)
**Origin:** Michael Cochran's existing federal go-to-market motion (SDVOSB pending, MD CSB approved) needs an integration platform. Tanner Woodrum's n8n background makes him the natural co-build partner. Standard pitch decks failed.

### Codegen-First Long-Tail Strategy (April 2026)

**Invention:** A 350-line TS-AST extractor that walks every `.node.ts` file in the n8n source tree, emits per-node JSON specs, and stamps out 566 Rust skeletons that all compile and register. Hand-written T1 nodes supersede the stubs via an `IMPL_OVERRIDES` allow-list.

**The Problem:** Porting n8n means hand-writing 306 nodes. That's months of typing. Most ports of complex software fail because the long tail is unattractive work.

**The Insight:** The metadata schema (which nodes exist, what params they take, what credentials they need) is extractable from the source tree without copying the implementation. License-clean. The Rust trait is uniform — `Node::execute(&self, ctx) -> Result<NodeOutput, _>`. Every node is the same shape, only the body differs. Generate the shape, hand-fill the bodies that matter, leave the rest as `NotYetPorted` stubs that ship as registered types.

**The Technique:**
1. swc_ecma_parser walks `.node.ts` files, finds the class implementing `INodeType`
2. Extract `description` field literal → `serde_json::Value` → write to `nodes-spec/<slug>.json`
3. Emit a Rust skeleton per spec to `src/nodes/generated/<slug>.rs`
4. `IMPL_OVERRIDES` slugs skip stub generation (hand-built T1 wins)
5. `inventory::submit!` registers all 585 at startup, no manual registration table

**Result:** 566 nodes that didn't exist on day 1 are registered as types on day 1. Each ships with a pointer to the upstream `.node.ts` URL. Adding a new T1 node is `cp generated/X.rs impl/X.rs`, write the body, add to `IMPL_OVERRIDES`. The 50-T1 target is typing-bound, not architecture-bound.

**Origin:** n8n's metadata is in JSON-shaped object literals inside TS files. AST extraction is a 2026 commodity. Federal/regulated buyers want parity-on-name (every n8n node is here) and parity-on-function for the ~50 they actually use.

### Inventory + Single Trait + Codegen = Force Multiplier

**Invention:** Combine `inventory` crate (compile-time registration), a uniform `Node` trait, and codegen-emitted stubs to make adding a node an O(1) operation regardless of registry size.

**The Problem:** Workflow engines accumulate node-registration boilerplate. Every new node typically requires touching a central registry table, updating an enum, threading a string-to-impl map. This scales O(n) with node count and creates merge conflicts on every PR.

**The Insight:** `inventory::submit!` lets each node register itself at compile time without touching a central table. Combined with a single `async fn execute(...)` trait, every node is structurally identical. The codegen pipeline knows the trait shape; it can stamp out conformant stubs forever.

**The Technique:**
- `pub trait Node { fn metadata(&self) -> &'static NodeMetadata; async fn execute(&self, ctx) -> Result<...>; }`
- `inventory::submit! { NodeFactory::new("slug", || Arc::new(MyNode)) }` at the bottom of each impl
- `Registry::global()` collects all submissions on first access via `OnceLock`
- Adding a node = writing one file, no registry edit

**Result:** Adding `wait`, `code`, `switch`, `webhook`, `cron`, `datetime`, `crypto`, `rename_keys`, `filter`, `item_lists`, `postgres`, `slack`, `github`, `openai`, `email_send` to the registry required zero edits to the registry — each commit is purely additive.

**Origin:** `inventory` is a 2019 invention by David Tolnay; the application of it to a 600-node workflow registry — combined with codegen — is novel.

---

## Dated Timeline

### 2026-04-25 — v0.1 scaffold + 19 T1 nodes + Leptos canvas + collapse

**What:** Workspace scaffolded with 5 crates (`r8r-{core,engine,nodes,codegen,cli}`); 4 hand-built T1 nodes (set, if, http_request, no_op); codegen extractor produces 578 stubs from the n8n source tree.

**Why:** Day 1 of PLAN.md. Establish the architecture so subsequent work is typing.

**Commit:** `aeb0746`

**AI Role:** C2 (parallel Claude instance) wrote the scaffold and initial 4 nodes from PLAN.md spec. Human directed: location (`/home/mcochran/r8r`), license (Unlicense), GitHub owner (`cochranblock`), private repo, Tanner-addressed README, no T3 scope.

---

**What:** 5 more T1 nodes — `wait`, `code`, `switch`, `webhook`, `cron`. Codegen `IMPL_OVERRIDES` extended; orphan generated stubs auto-deleted.

**Why:** PLAN.md Day 3 milestone — webhook + cron are the trigger nodes; wait, code, switch are common transforms. These five unlock the federal demo path.

**Commit:** `8a2606e`

**AI Role:** AI wrote impls following the existing Node trait pattern; cargo check + manual workflow run verified. Human directed: priority order (easiest first), one-shot semantics for webhook/cron in v0.1.

---

**What:** `datetime` T1 node — format/parse/add/subtract via chrono.

**Why:** Common across most n8n workflows. Pure transform, no I/O — easy to validate.

**Commit:** `ee675d6`

**AI Role:** AI implemented + ran cargo check.

---

**What:** Per-node exopack sim harness. `r8r-test` binary calls `sim_<slug>()` per T1, plus registry/expr/e2e checks, all wrapped in TRIPLE SIMS f60.

**Why:** Per-node sims give 50-line failure messages instead of "workflow exited with error" — needed for regression safety as more nodes land.

**Commit:** `20bb58d`

**AI Role:** AI wrote sim functions; first run caught a real bug (the if sim used `right = "5"` as string, the if node wanted a number — fixed in same commit).

---

**What:** 4 pure transforms — `crypto`, `rename_keys`, `filter`, `item_lists`. Crypto deps added (sha2/sha1/md-5/hmac/hex/base64).

**Why:** Pure transforms compose cleanly with the existing nodes; needed for any non-trivial workflow.

**Commit:** `95d2f3a`

**AI Role:** AI implemented; sim suite extended.

---

**What:** 5 I/O nodes — `postgres`, `slack`, `github`, `openai`, `email_send`. tokio-postgres + lettre added.

**Why:** The federal moat. Postgres is the universal DB target; Slack/GitHub/OpenAI are the most-asked SaaS endpoints; EmailSend is required by every alerting workflow.

**Commit:** `202a884`

**AI Role:** AI implemented. Compile-validated only — sims would need fixture servers (deferred to v0.2 integration tier).

---

**What:** `r8r serve` axum HTTP API + canvas stub HTML.

**Why:** A binary with no UI is half a gift. Stub HTML proves the API surface (registry browse, node inspect, run workflow) before the Leptos build.

**Commit:** `270fcb0`

**AI Role:** AI wrote the axum router + the HTML stub. Human directed: no Vue, no Node, embed everything in the binary.

---

**What:** Leptos canvas — node palette, SVG graph editor with drag-drop, parameter inspector, run button. Compiled to WASM via trunk, dist embedded into the binary via `include_dir!`.

**Why:** Going-all-in on the artifact. The federal pitch is "WASM not Node" — Leptos compiles to a 316KB WASM blob, no Node runtime in production. The Vue editor is exactly what regulated buyers can't run; ours is.

**Commit:** `b632cc2`

**AI Role:** AI wrote the Leptos app (palette, graph, inspector, run). 350KB total bundle, embedded into the 7.9MB binary. Browser-validation deferred.

---

**What:** Collapse — workspace dissolved into single crate with module dirs (`src/core/`, `src/engine/`, etc.). Canvas stays separate (WASM target).

**Why:** User preference: "different crates get messy, I prefer to handle it on the directory side of things." 5 Cargo.tomls become 1.

**Commit:** `7eba8f7`

**AI Role:** AI executed the move via `git mv`, sed-rewrote ~600 imports across all source files, fixed serde version pin to keep transitive swc_common 0.37 compiling. TRIPLE SIMS still 3/3 green after the move.

---

## Pending (not yet shipped)

- 31 more T1 nodes to hit PLAN's 50 target (Anthropic, Discord, Gmail, Notion, S3, GoogleSheets, MySQL, MongoDB, Redis, Elasticsearch, SSH, FTP, Compression, Xml, Html, Markdown, Merge, Interval, ExecuteCommand, Function, ExecuteWorkflow, SplitInBatches, StopAndError, Schedule, RabbitMQ, Kafka, MQTT, GraphQL)
- Codegen property emission (META gets `properties: &[]` instead of the actual property list — limits canvas inspector to JSON textareas)
- Canvas browser smoke-test (compile-validated only; never opened in a real browser)
- Demo workflows: webhook-to-slack with real creds, self-deploy, vcenter-mock
- README polish for the Tanner-addressed pitch
- Codegen bugs: Wait extraction missing, registry over-counts (585 includes ~280 false entries from credential files)
- Persistence layer (deferred to v0.2 — redb when added, not sled)
- GitHub repo creation + push (no remote yet, awaiting auth)
