Revision · Project 1 — Brandforge
Brandforge began with the exciting part—make an advertisement—but did not stop at an impressive image. You built the software boundaries that decide whether the artifact is safe to create.
What the project forced you to learn
Section titled “What the project forced you to learn”- Ownership and borrowing: one buffer owns the frozen website snapshot; validation and hashing borrow it.
- Typed commands: Clap converts shell text into a command enum and
PathBufvalues. - Structs and Serde: model output crosses into Rust through an exact
BusinessProfilecontract. - Validation layers: JSON syntax, structural decoding, domain validity, evidence support, and product quality are different claims.
- Traits: the product depends on a profile-producing capability rather than a vendor’s complete SDK.
- Enums: supported and unsupported claims are explicit states with exhaustive handling.
- Iterators: claim audits transform a list of proposals into a list of evidence verdicts.
- Errors and exit codes: failures name their boundary and automation can trust the process status.
- Artifacts and hashes: a run records the exact source and model profile that produced its outputs.
- Tests: fast unit cases prove deterministic rules; CLI tests prove the user’s success and failure paths.
The AI engineering takeaway
Section titled “The AI engineering takeaway”Prompt instructions are requests, not enforcement. A model can propose a structured profile and an image prompt, but independent code must decide whether the structure is valid and the factual claims are supported. The first useful harness is often one deterministic gate after one probabilistic step.
Rebuild from memory
Section titled “Rebuild from memory”Without opening the reference crate, sketch:
- the
BusinessProfile,Claim, andClaimStatustypes; - the function signature for auditing claims;
- the order in which the pipeline writes diagnostic and publishable artifacts;
- the assertions in the unsupported-claim integration test.
Then compare your sketch with crates/brandforge and explain every difference.
Completion proof
Section titled “Completion proof”You are ready to continue when you can:
- build the campaign pack from the supported fixture;
- make the unsupported fixture fail without producing a preview;
- explain why valid JSON is not verified advertising content;
- locate the source and profile hashes in the run report;
- add one claim and its evidence without changing Rust code;
- make all nine tests pass.
Next project: AskDocs — cited answers from your own files →.