Skip to content

Overview — Project 8: Rankforge

Rankforge begins with a real TypeScript experiment: scrape a business website, research search demand, choose one angle, outline it, write the article, package it for SEO, and print estimated model cost. That experiment is useful because every run produces something you can read. It is also a perfect Rust AI engineering exercise because a single script hides several boundaries that production software must make explicit.

You will preserve the fast feedback loop while turning the workflow into typed, testable stages.

From rust/rust-ai-engineering:

Terminal window
cargo run -p rankforge -- build \
--source fixtures/rankforge/site.md \
--responses fixtures/rankforge/responses.json \
--output target/rankforge

Inspect the result:

target/rankforge/
├── blog-1-research.md
├── blog-2-angle.md
├── blog-3-outline.md
├── blog-4-article.md
├── blog-5-seo-package.md
├── blog-final.md
├── blog-cost.json
└── run-report.json

The required build is offline. responses.json acts like saved responses from a scraper, web-search tool, and model provider. This lets you learn the pipeline and reproduce failures before a network, API key, changing search result, or model release enters the system.

DayProduct sliceRust pressureAI engineering lesson
35CLI and website snapshotpaths, bytes, ownership, errorsacquisition is separate from generation
36five-stage workflowenums, traits, exhaustive order, artifactsworkflows beat one giant prompt
37search-backed researchtyped tool observations, provenancesearch output is untrusted evidence
38article and SEO packagevalidation, strings, fail-closed writesformat checks and factual checks differ
39receipts and completion gatechecked math, hashes, integration testsmeasure cost per inspectable completion
website snapshot
│
▼
research ─▶ angle ─▶ outline ─▶ article ─▶ SEO package
│ │ │ │ │
└──────────┴──────────┴──────────┴────────────┴──▶ stage artifacts + receipts

Each arrow is a gate. The next stage receives an accepted artifact, not an invisible conversation history. If the angle is weak, you inspect blog-2-angle.md. If packaging removes useful depth, you compare it with blog-4-article.md. If spend jumps, you inspect usage per stage.

What changes from the TypeScript experiment

Section titled “What changes from the TypeScript experiment”

Rankforge keeps the original five useful steps and improves their software boundary:

  • stage order is an enum-backed contract;
  • every intermediate response is a durable artifact;
  • required sections are validated before publication;
  • punctuation policy is executable rather than prompt-only;
  • token and tool spend use checked integer arithmetic;
  • every stage receipt binds its input hash to its output hash;
  • the required tests do not spend money or depend on current search results.

The live extension can still use a scraping API, the OpenAI Responses API, and web search. Those are adapters at the edge. The workflow and its completion evidence remain yours.

Start with Day 35 — Freeze the Source →.