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.
Run the finished project
Section titled “Run the finished project”From rust/rust-ai-engineering:
cargo run -p rankforge -- build \ --source fixtures/rankforge/site.md \ --responses fixtures/rankforge/responses.json \ --output target/rankforgeInspect 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.jsonThe 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.
The five gates
Section titled “The five gates”| Day | Product slice | Rust pressure | AI engineering lesson |
|---|---|---|---|
| 35 | CLI and website snapshot | paths, bytes, ownership, errors | acquisition is separate from generation |
| 36 | five-stage workflow | enums, traits, exhaustive order, artifacts | workflows beat one giant prompt |
| 37 | search-backed research | typed tool observations, provenance | search output is untrusted evidence |
| 38 | article and SEO package | validation, strings, fail-closed writes | format checks and factual checks differ |
| 39 | receipts and completion gate | checked math, hashes, integration tests | measure cost per inspectable completion |
The pipeline you own
Section titled “The pipeline you own”website snapshot │ ▼research ─▶ angle ─▶ outline ─▶ article ─▶ SEO package │ │ │ │ │ └──────────┴──────────┴──────────┴────────────┴──▶ stage artifacts + receiptsEach 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 →.