[{"data":1,"prerenderedAt":4342},["ShallowReactive",2],{"app-navigation_en":3,"blog-post:posts_en:/en/blog/agent-receipts-packing-slip":99,"blog-available-locales:agent-receipts-packing-slip":1938,"blog-navigation_en":1940,"blog-surround:posts_en:/en/blog/agent-receipts-packing-slip":1966},[4],{"title":5,"path":6,"stem":7,"children":8,"page":98},"En","/en","en",[9],{"title":10,"path":11,"stem":12,"children":13,"page":98},"Blog","/en/blog","en/blog",[14,18,22,26,30,34,38,42,46,50,54,58,62,66,70,74,78,82,86,90,94],{"title":15,"path":16,"stem":17},"Security Practices for MCP Using JSON-RPC","/en/blog/mcp-security","en/blog/1. mcp-security",{"title":19,"path":20,"stem":21},"MikesHub internals: port ownership, reclaim, and AWP-paced Tauri","/en/blog/mikeshub","en/blog/10. mikeshub",{"title":23,"path":24,"stem":25},"Anatomy of a Mission-Critical AI System","/en/blog/anatomy-mission-critical-ai","en/blog/11. anatomy-mission-critical-ai",{"title":27,"path":28,"stem":29},"rag-factory: a Rust engine for recipe-driven RAG — cite, refuse, eval before ship","/en/blog/rag-factory","en/blog/12. rag-factory",{"title":31,"path":32,"stem":33},"Offline-verifiable attestation for consequential AI runs","/en/blog/agent-receipts-packing-slip","en/blog/13. agent-receipts-packing-slip",{"title":35,"path":36,"stem":37},"MCP Servers: Connecting AI to Real-Time Data","/en/blog/mcp-create","en/blog/2. mcp-create",{"title":39,"path":40,"stem":41},"MCP Servers: Risks of Using in Claude Desktop","/en/blog/mcp-risks","en/blog/3. mcp-risks",{"title":43,"path":44,"stem":45},"MCP Servers: Integrating LLM in E-Commerce Systems","/en/blog/mcp","en/blog/4. mcp",{"title":47,"path":48,"stem":49},"MCP Tiny Agents On-Premises: Breaking Free from Cloud Dependencies","/en/blog/mcp-tiny-agents-on-premises","en/blog/5. mcp-tiny-agents-on-premises",{"title":51,"path":52,"stem":53},"From Idea to API in 2 Days: Building Bankly with Agentic Workflows","/en/blog/overvibing","en/blog/6. overvibing",{"title":55,"path":56,"stem":57},"AI Chat, MCP Server build with Agentic Workflow Protocol for demo at Checkatrade .com","/en/blog/mcp-in-chat-demo","en/blog/8. mcp-in-chat-demo",{"title":59,"path":60,"stem":61},"MutuelleFit: contracts from a payroll-native insurance vertical","/en/blog/mutuellefit-ddd-agentic","en/blog/9. mutuellefit-ddd-agentic",{"title":63,"path":64,"stem":65},"AI Opportunities for Checkatrade considering PERN Stack","/en/blog/ai-opportunities-pern-stack","en/blog/ai-opportunities-pern-stack",{"title":67,"path":68,"stem":69},"Domain-Driven Design in Full-Stack Frameworks","/en/blog/architecture","en/blog/architecture",{"title":71,"path":72,"stem":73},"one-front, as told by git","/en/blog/building-one-front","en/blog/building-one-front",{"title":75,"path":76,"stem":77},"Commercial architecture is a chain, not a pricing page","/en/blog/commercial-architecture-chain","en/blog/commercial-architecture-chain",{"title":79,"path":80,"stem":81},"Quality: How to protect AI-powered Frontends?","/en/blog/qa-front","en/blog/qa-front",{"title":83,"path":84,"stem":85},"The Hidden Dangers of GraphQL: Security, Performance, and Complexity Risks","/en/blog/risking-with-graphql","en/blog/risking-with-graphql",{"title":87,"path":88,"stem":89},"From Zero to Hero: Scaling up to million users","/en/blog/scalability","en/blog/scalability",{"title":91,"path":92,"stem":93},"IT Consulting and Strategy","/en/blog/strategy","en/blog/strategy",{"title":95,"path":96,"stem":97},"Distributed Systems","/en/blog/systems","en/blog/systems",false,{"id":100,"title":31,"authors":101,"badge":108,"body":112,"date":1929,"description":1930,"extension":1931,"image":1932,"meta":1934,"navigation":1935,"path":32,"seo":1936,"stem":33,"__hash__":1937},"posts_en/en/blog/13. agent-receipts-packing-slip.md",[102],{"name":103,"description":104,"to":105,"avatar":106},"Michael Wybraniec","System Design, GenAI Automation & Architecture","https://www.linkedin.com/in/one-front/",{"src":107,"alt":103},"/avatars/michael-wybraniec.webp",{"label":109,"color":110,"variant":111},"AI governance, Crypto, Audit, CI/CD","primary","soft",{"type":113,"value":114,"toc":1904},"minimark",[115,118,144,154,176,186,200,224,239,255,264,309,403,417,425,440,450,508,517,530,543,556,565,580,589,605,614,623,634,649,657,665,676,691,699,711,722,737,749,760,771,786,794,805,820,830,845,922,939,952,963,978,1081,1098,1113,1123,1146,1195,1260,1274,1289,1299,1425,1440,1453,1462,1470,1502,1517,1525,1533,1540,1573,1588,1596,1611,1618,1647,1662,1674,1682,1689,1722,1737,1745,1753,1760,1791,1797,1812,1829,1839,1854,1869,1879,1887,1900],[116,117],"br",{},[119,120,123],"div",{"className":121},[122],"text-justify",[124,125,126,130,131,135,136,139,140,143],"p",{},[127,128,129],"strong",{},"In one sentence:"," when an AI (or a person working with an AI) does something that matters, most teams keep a ",[132,133,134],"em",{},"story"," — chat history, green CI checks, screenshots. What you need instead is ",[127,137,138],{},"proof you can re-check later",", offline: fingerprints of the files involved, a cryptographic signature from the system (not the model), and a check that ",[127,141,142],{},"stops"," the pipeline if anything does not match.",[119,145,147],{"className":146},[122],[124,148,149,150,153],{},"This article explains the problem, the solution pattern, who may do what, where it shows up in practice, and how the verification pipeline works — in technical language, without assuming you know a particular product or repo. Screenshots are from a live demo — ",[127,151,152],{},"click"," an image for full screen.",[119,155,160,167],{"className":156},[157,158,159],"flex","justify-between","items-center",[161,162,164],"h2",{"id":163},"_1-problem-and-solution",[127,165,166],{},"1. Problem and solution",[124,168,169],{},[170,171,173],"a",{"href":172},"#article-top",[127,174,175],{},"⤴",[119,177,179],{"className":178},[122],[124,180,181,182,185],{},"Engineering already knows how to ship ",[127,183,184],{},"signed software artefacts",": build a binary or image, hash it, sign it, verify the signature in CI before release. That works because you have a stable pile of bytes.",[119,187,189],{"className":188},[122],[124,190,191,192,195,196,199],{},"AI-era “consequential moments” are different. Often what you need to trust is not a binary in a registry, but a ",[127,193,194],{},"decision"," or an ",[127,197,198],{},"answer that claims to be grounded in documents",". Today that evidence usually lives as narrative:",[201,202,205],"card",{"className":203},[204],"border-none",[206,207,208,212,215,218,221],"ul",{},[209,210,211],"li",{},"The bot cites sources in the reply — but were those the exact document chunks it used?",[209,213,214],{},"A person exports a spreadsheet; the model drafts a memo — the trail is split across Drive, chat, and email",[209,216,217],{},"Someone types “looks good” in Slack before a refund or a hard-to-undo change",[209,219,220],{},"Staging goes out because CI was green — months later: who allowed that, and on what evidence?",[209,222,223],{},"An auditor asks what the system did last Tuesday — and the answer is “log into the vendor dashboard”",[119,225,227],{"className":226},[122],[124,228,229,230,233,235,236],{},"Stories answer: ",[132,231,232],{},"something happened.",[116,234],{},"\nThey do not answer: ",[132,237,238],{},"can we still prove this claim matches these files and these keys, without trusting the chat UI?",[119,240,242],{"className":241},[122],[243,244,245],"blockquote",{},[124,246,247,248,250,251,254],{},"A warning in a log is not a control.",[116,249],{},"\nA control ",[127,252,253],{},"fails closed",": the job exits non-zero and nothing ships.",[119,256,258],{"className":257},[122],[124,259,260,263],{},[127,261,262],{},"Solution pattern:"," for each consequential run, produce a portable, signed record:",[201,265,267],{"className":266},[204],[268,269,270,277,284,295,302],"ol",{},[209,271,272,273,276],{},"Write down ",[127,274,275],{},"what the run intended"," (e.g. summarise this ticket, deploy if checks pass)",[209,278,279,280,283],{},"Store ",[127,281,282],{},"fingerprints"," (cryptographic hashes) of the inputs and outputs that mattered",[209,285,286,287,290,291,294],{},"Put those fingerprints into one JSON body, normalise that body so every verifier sees the ",[127,288,289],{},"same bytes",", and ",[127,292,293],{},"sign"," it with a system key — the language model never holds that key",[209,296,297,298,301],{},"For high-impact actions, require a ",[127,299,300],{},"second signature"," from a human, locked to that same run — not a casual chat message",[209,303,304,305,308],{},"Before merge, deploy, or audit sign-off, ",[127,306,307],{},"re-hash the files and check the signatures",". Pass → allow. Fail → stop, with a clear machine-readable reason",[119,310,314],{"className":311},[312,313],"my-8","w-full",[315,316,321],"pre",{"className":317,"code":318,"language":319,"meta":320,"style":320},"language-mermaid shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","flowchart LR\n  subgraph today[\"What teams keep today\"]\n    N[Chat · CI ticks · vendor UI · screenshots]\n  end\n  subgraph target[\"What a gate should check\"]\n    A[Hash files into a store] --> B[Normalise + system signs]\n    B --> C[Optional human co-sign]\n    C --> V[Verify offline]\n    V --> G{Pass?}\n    G -->|yes| OK[Allow]\n    G -->|no| FC[Stop + named reason]\n  end\n  N -.->|replace as gate input| V\n","mermaid","",[322,323,324,332,338,344,350,356,362,368,374,380,386,392,397],"code",{"__ignoreMap":320},[325,326,329],"span",{"class":327,"line":328},"line",1,[325,330,331],{},"flowchart LR\n",[325,333,335],{"class":327,"line":334},2,[325,336,337],{},"  subgraph today[\"What teams keep today\"]\n",[325,339,341],{"class":327,"line":340},3,[325,342,343],{},"    N[Chat · CI ticks · vendor UI · screenshots]\n",[325,345,347],{"class":327,"line":346},4,[325,348,349],{},"  end\n",[325,351,353],{"class":327,"line":352},5,[325,354,355],{},"  subgraph target[\"What a gate should check\"]\n",[325,357,359],{"class":327,"line":358},6,[325,360,361],{},"    A[Hash files into a store] --> B[Normalise + system signs]\n",[325,363,365],{"class":327,"line":364},7,[325,366,367],{},"    B --> C[Optional human co-sign]\n",[325,369,371],{"class":327,"line":370},8,[325,372,373],{},"    C --> V[Verify offline]\n",[325,375,377],{"class":327,"line":376},9,[325,378,379],{},"    V --> G{Pass?}\n",[325,381,383],{"class":327,"line":382},10,[325,384,385],{},"    G -->|yes| OK[Allow]\n",[325,387,389],{"class":327,"line":388},11,[325,390,391],{},"    G -->|no| FC[Stop + named reason]\n",[325,393,395],{"class":327,"line":394},12,[325,396,349],{},[325,398,400],{"class":327,"line":399},13,[325,401,402],{},"  N -.->|replace as gate input| V\n",[119,404,408],{"className":405},[406,407,313],"max-w-xl","mx-auto",[409,410],"hover-figure",{"alt":411,"caption":412,"detail":413,"src":414,"tags":415,"title":416},"Demo — offline audit: collect files, verify without vendor login","Figure 0 — Can you prove what ran without logging into the vendor?","Hand over the signed record and file store; verify offline. Tamper or fake approve → stop.","/blog/agent-receipts/04-auditor-offline.webp","audit, offline","Figure 0 · Proof without a vendor login",[119,418,420],{"className":419},[122],[124,421,422],{},[132,423,424],{},"Figure 0 — Auditor path: you receive a folder of artefacts, run verify on your machine, and get pass or a named failure. You do not need the vendor’s password.",[119,426,428,434],{"className":427},[157,158,159],[161,429,431],{"id":430},"_2-who-is-allowed-to-do-what",[127,432,433],{},"2. Who is allowed to do what",[124,435,436],{},[170,437,438],{"href":172},[127,439,175],{},[119,441,443],{"className":442},[122],[124,444,445,446,449],{},"Most of the security property is ",[127,447,448],{},"role separation",". If the model can invent hashes or hold signing keys, the “proof” is meaningless.",[119,451,453],{"className":452},[312,313],[315,454,456],{"className":317,"code":455,"language":319,"meta":320,"style":320},"flowchart TB\n  Human -->|ask / export / co-sign| Host\n  Model[Language model] -->|proposes text · asks for tools| Host\n  Host -->|hash files · build record · sign| Record[Signed record + file store]\n  Host --- Keys[(Signing keys)]\n  Model -.->|no access| Keys\n  Verifier -->|re-hash + check signatures| Record\n  Verifier -->|pass or stop + reason| Gate[CI · deploy · audit]\n  Attacker -.->|tamper · forge · omit| Record\n  Verifier -->|detect| Attacker\n",[322,457,458,463,468,473,478,483,488,493,498,503],{"__ignoreMap":320},[325,459,460],{"class":327,"line":328},[325,461,462],{},"flowchart TB\n",[325,464,465],{"class":327,"line":334},[325,466,467],{},"  Human -->|ask / export / co-sign| Host\n",[325,469,470],{"class":327,"line":340},[325,471,472],{},"  Model[Language model] -->|proposes text · asks for tools| Host\n",[325,474,475],{"class":327,"line":346},[325,476,477],{},"  Host -->|hash files · build record · sign| Record[Signed record + file store]\n",[325,479,480],{"class":327,"line":352},[325,481,482],{},"  Host --- Keys[(Signing keys)]\n",[325,484,485],{"class":327,"line":358},[325,486,487],{},"  Model -.->|no access| Keys\n",[325,489,490],{"class":327,"line":364},[325,491,492],{},"  Verifier -->|re-hash + check signatures| Record\n",[325,494,495],{"class":327,"line":370},[325,496,497],{},"  Verifier -->|pass or stop + reason| Gate[CI · deploy · audit]\n",[325,499,500],{"class":327,"line":376},[325,501,502],{},"  Attacker -.->|tamper · forge · omit| Record\n",[325,504,505],{"class":327,"line":382},[325,506,507],{},"  Verifier -->|detect| Attacker\n",[119,509,511],{"className":510},[122],[124,512,513,516],{},[127,514,515],{},"Host (the runtime around the model)."," This is the only component that should call tools, write files into the hash store, build the record, and sign. Think of it like the CI runner that signs a release — not like the compiler inventing its own checksum.",[119,518,520],{"className":519},[122],[124,521,522,525,526,529],{},[127,523,524],{},"Language model."," It proposes wording and may ",[132,527,528],{},"request"," tool use. It must not choose the hashes, must not write the human-approval fields, and must never see private keys. Otherwise you are signing whatever the model claims.",[119,531,533],{"className":532},[122],[124,534,535,538,539,542],{},[127,536,537],{},"Human."," May be the subject of the run (analyst, operator) and/or the co-signer when policy says the action is high-impact. Co-sign means a ",[127,540,541],{},"second signed file"," tied to that run — not “LGTM” in Slack.",[119,544,546],{"className":545},[122],[124,547,548,551,552,555],{},[127,549,550],{},"Verifier."," A program you can run without the chat product. It re-hashes stored files, checks signatures against a small trust list of public keys, and exits successfully only if everything matches. On failure it exits non-zero and prints a ",[127,553,554],{},"stable reason code"," (so CI can assert on it).",[119,557,559],{"className":558},[122],[124,560,561,564],{},[127,562,563],{},"Attacker (design lens)."," Useful questions while designing: what if someone edits a stored file after hashing? forges the signature? ships with no record? skips human co-sign? drops a fake approval file? Each should be a hard failure — or the control has a hole.",[119,566,568,574],{"className":567},[157,158,159],[161,569,571],{"id":570},"_3-where-the-same-idea-shows-up",[127,572,573],{},"3. Where the same idea shows up",[124,575,576],{},[170,577,578],{"href":172},[127,579,175],{},[119,581,583],{"className":582},[122],[124,584,585,586,588],{},"Same pattern everywhere: fingerprint what mattered, sign, verify before you trust the outcome. Only the ",[132,587,134],{}," changes.",[119,590,592,599],{"className":591},[157,158,159],[593,594,596],"h3",{"id":595},"_31-search-grounded-answers-rag",[127,597,598],{},"3.1 Search-grounded answers (RAG)",[124,600,601],{},[170,602,603],{"href":172},[127,604,175],{},[119,606,608],{"className":607},[122],[124,609,610,613],{},[127,611,612],{},"Problem."," The reply lists sources. Those strings are easy to edit later. Nothing proves the answer was bound to particular retrieved bytes.",[119,615,617],{"className":616},[122],[124,618,619,622],{},[127,620,621],{},"What to do."," When the host retrieves document chunks, hash those exact bytes into the store and put the hashes on the signed record. Later, verify re-hashes them. If the file was changed under the same name → digest mismatch. If the file is missing → fail. “Grounded” becomes a check, not a marketing footnote.",[119,624,626],{"className":625},[406,407,313],[409,627],{"alt":628,"caption":629,"detail":630,"src":631,"tags":632,"title":633},"Demo — hash retrieved chunks, prove by re-hash; forged signature stopped","Figure 1 — Fingerprints of sources, not pretty citations alone.","Retrieve → hash chunks → sign answer → re-hash on verify.","/blog/agent-receipts/01-rag-citations.webp","rag, grounding","Figure 1 · Grounding you can re-check",[119,635,637,643],{"className":636},[157,158,159],[593,638,640],{"id":639},"_32-human-ai-on-one-task",[127,641,642],{},"3.2 Human + AI on one task",[124,644,645],{},[170,646,647],{"href":172},[127,648,175],{},[119,650,652],{"className":651},[122],[124,653,654,656],{},[127,655,612],{}," Export in one place, draft in chat, send in email. “A human was involved” is a feeling, not a field on one signed object.",[119,658,660],{"className":659},[122],[124,661,662,664],{},[127,663,621],{}," One record for the session: human as subject, export and draft hashed, host signs. You can still say a person was in the loop — and prove which artefacts that loop produced — without logging into the chat vendor later.",[119,666,668],{"className":667},[406,407,313],[409,669],{"alt":670,"caption":671,"detail":672,"src":673,"tags":674,"title":675},"Demo — human export, model draft, system signs one record","Figure 2 — Assisted work as one signed session.","Export + draft bound together; model never holds keys.","/blog/agent-receipts/02-human-assisted.webp","human, assisted","Figure 2 · One attested assisted session",[119,677,679,685],{"className":678},[157,158,159],[593,680,682],{"id":681},"_33-high-impact-approval",[127,683,684],{},"3.3 High-impact approval",[124,686,687],{},[170,688,689],{"href":172},[127,690,175],{},[119,692,694],{"className":693},[122],[124,695,696,698],{},[127,697,612],{}," “Looks good” in chat is not locked to a specific run. It can be copied, spoofed, or left next to a different action than the one that mattered.",[119,700,702],{"className":701},[122],[124,703,704,706,707,710],{},[127,705,621],{}," Two keys, like a joint bank account. The system signs the decision record. A human signs a ",[127,708,709],{},"separate"," approval file that points at that same record. The gate checks both. No approval file → stop. Bad approval signature → stop. Chat remains for conversation; it is not the control.",[119,712,714],{"className":713},[406,407,313],[409,715],{"alt":716,"caption":717,"detail":718,"src":719,"tags":720,"title":721},"Demo — second human signature required; fake approval stopped","Figure 3 — Approval is a signed file, not a Slack vibe.","System signature + human approval file bound to the same run.","/blog/agent-receipts/03-high-impact-approve.webp","approve, cosign","Figure 3 · Real co-sign",[119,723,725,731],{"className":724},[157,158,159],[593,726,728],{"id":727},"_34-deploy-merge-gate",[127,729,730],{},"3.4 Deploy / merge gate",[124,732,733],{},[170,734,735],{"href":172},[127,736,175],{},[119,738,740],{"className":739},[122],[124,741,742,744,745,748],{},[127,743,612],{}," “Checks were green” lives inside a CI vendor. It is weak as a long-lived, portable explanation of ",[132,746,747],{},"why deploy was allowed",".",[119,750,752],{"className":751},[122],[124,753,754,756,757,759],{},[127,755,621],{}," Hash the check inputs/outputs, emit a signed ",[127,758,194],{}," record, and make the deploy (or merge) job require a successful offline verify. No record or failed verify → do not ship. Green ticks can still help operators; they stop being the sole gate.",[119,761,763],{"className":762},[406,407,313],[409,764],{"alt":765,"caption":766,"detail":767,"src":768,"tags":769,"title":770},"Demo — signed decision before deploy","Figure 4 — Ship only if verify passes.","Checks → signed decision → verify before deploy.","/blog/agent-receipts/05-cicd-decision.webp","cicd, deploy","Figure 4 · Decision as gate input",[119,772,774,780],{"className":773},[157,158,159],[593,775,777],{"id":776},"_35-audit-without-a-vendor-login",[127,778,779],{},"3.5 Audit without a vendor login",[124,781,782],{},[170,783,784],{"href":172},[127,785,175],{},[119,787,789],{"className":788},[122],[124,790,791,793],{},[127,792,612],{}," “Proof” that requires signing into a SaaS console is not portable and ages badly when UIs and retention policies change.",[119,795,797],{"className":796},[122],[124,798,799,801,802],{},[127,800,621],{}," Hand the auditor the signed record, the hashed file store, and the public keys needed to check signatures. They run verify on their laptop. Pass or named failure. No vendor session. ",[132,803,804],{},"(Figure 0.)",[119,806,808,814],{"className":807},[157,158,159],[161,809,811],{"id":810},"_4-how-the-pipeline-works",[127,812,813],{},"4. How the pipeline works",[124,815,816],{},[170,817,818],{"href":172},[127,819,175],{},[119,821,823],{"className":822},[122],[124,824,825,826,829],{},"You can implement this with different libraries. The ",[127,827,828],{},"shape"," should stay: hash → normalise → sign → verify offline → fail closed.",[119,831,833,839],{"className":832},[157,158,159],[593,834,836],{"id":835},"_41-emit-then-verify",[127,837,838],{},"4.1 Emit, then verify",[124,840,841],{},[170,842,843],{"href":172},[127,844,175],{},[119,846,848],{"className":847},[312,313],[315,849,851],{"className":317,"code":850,"language":319,"meta":320,"style":320},"flowchart LR\n  subgraph host[\"Host runtime\"]\n    I[Tool / file I/O] --> Store[(Hash store)]\n    Store --> Body[Normalised JSON body]\n    Body --> Sig[System signature]\n  end\n  Sig --> Rec[Signed record]\n  Store --> Bundle[Folder you can hand over]\n  Rec --> Bundle\n  HumanSig[Human approval file] -.-> Bundle\n  Bundle --> Ver[Verifier]\n  Ver --> Q{OK?}\n  Q -->|yes| Allow[Allow]\n  Q -->|no| RC[Named failure reason]\n",[322,852,853,857,862,867,872,877,881,886,891,896,901,906,911,916],{"__ignoreMap":320},[325,854,855],{"class":327,"line":328},[325,856,331],{},[325,858,859],{"class":327,"line":334},[325,860,861],{},"  subgraph host[\"Host runtime\"]\n",[325,863,864],{"class":327,"line":340},[325,865,866],{},"    I[Tool / file I/O] --> Store[(Hash store)]\n",[325,868,869],{"class":327,"line":346},[325,870,871],{},"    Store --> Body[Normalised JSON body]\n",[325,873,874],{"class":327,"line":352},[325,875,876],{},"    Body --> Sig[System signature]\n",[325,878,879],{"class":327,"line":358},[325,880,349],{},[325,882,883],{"class":327,"line":364},[325,884,885],{},"  Sig --> Rec[Signed record]\n",[325,887,888],{"class":327,"line":370},[325,889,890],{},"  Store --> Bundle[Folder you can hand over]\n",[325,892,893],{"class":327,"line":376},[325,894,895],{},"  Rec --> Bundle\n",[325,897,898],{"class":327,"line":382},[325,899,900],{},"  HumanSig[Human approval file] -.-> Bundle\n",[325,902,903],{"class":327,"line":388},[325,904,905],{},"  Bundle --> Ver[Verifier]\n",[325,907,908],{"class":327,"line":394},[325,909,910],{},"  Ver --> Q{OK?}\n",[325,912,913],{"class":327,"line":399},[325,914,915],{},"  Q -->|yes| Allow[Allow]\n",[325,917,919],{"class":327,"line":918},14,[325,920,921],{},"  Q -->|no| RC[Named failure reason]\n",[119,923,925],{"className":924},[122],[124,926,927,930,931,934,935,938],{},[127,928,929],{},"On emit (host runtime):"," every tool result or document chunk that matters is written into a ",[127,932,933],{},"content-addressed store"," (filename = hash of contents). The record lists those hashes, plus intent and metadata. Before signing, the JSON is put into a ",[127,936,937],{},"canonical form"," so two verifiers always see the same byte string (random key order or whitespace must not break signatures). The host signs with Ed25519 (or similar) under a key id that appears in a local trust list. The model never performs these steps.",[119,940,942],{"className":941},[122],[124,943,944,947,948,951],{},[127,945,946],{},"On verify:"," parse the record; reject unknown schema versions; look up the public key; verify the system signature; for every listed hash, load the file and re-compute the hash; if a human co-sign was required, check that second signature and that it points at this same run. Any failure → non-zero exit and a ",[127,949,950],{},"stable reason string"," (digest mismatch, bad signature, missing approval, and so on). Integrity faults must not be “warnings.”",[119,953,955],{"className":954},[122],[315,956,961],{"className":957,"code":959,"language":960,"meta":320},[958],"language-text","tools/files → hash into store → normalise JSON → system signs\n            → optional human approval signature\n            → verify: re-hash + check sigs → pass | stop + reason\n","text",[322,962,959],{"__ignoreMap":320},[119,964,966,972],{"className":965},[157,158,159],[593,967,969],{"id":968},"_42-why-these-building-blocks",[127,970,971],{},"4.2 Why these building blocks",[124,973,974],{},[170,975,976],{"href":172},[127,977,175],{},[119,979,981],{"className":980},[122],[982,983,984,1000],"table",{},[985,986,987],"thead",{},[988,989,990,994,997],"tr",{},[991,992,993],"th",{},"Need",[991,995,996],{},"Building block",[991,998,999],{},"Plain reason",[1001,1002,1003,1015,1026,1037,1048,1059,1070],"tbody",{},[988,1004,1005,1009,1012],{},[1006,1007,1008],"td",{},"Same signature everywhere",[1006,1010,1011],{},"Canonical JSON (e.g. JCS / RFC 8785)",[1006,1013,1014],{},"Verifiers must hash/sign identical bytes",[988,1016,1017,1020,1023],{},[1006,1018,1019],{},"Bind real files",[1006,1021,1022],{},"SHA-256 + content-addressed store",[1006,1024,1025],{},"You can re-hash; missing file = failure",[988,1027,1028,1031,1034],{},[1006,1029,1030],{},"Prove who attested",[1006,1032,1033],{},"Public-key signature (e.g. Ed25519) + trust list",[1006,1035,1036],{},"Unknown key = reject",[988,1038,1039,1042,1045],{},[1006,1040,1041],{},"High-impact",[1006,1043,1044],{},"Second key on a separate approval file",[1006,1046,1047],{},"Compromising the system key alone should not invent human OK",[988,1049,1050,1053,1056],{},[1006,1051,1052],{},"Bind “which policy”",[1006,1054,1055],{},"Hash of the policy file on the record",[1006,1057,1058],{},"Stops claiming policy A while checking policy B",[988,1060,1061,1064,1067],{},[1006,1062,1063],{},"Detect gaps over time",[1006,1065,1066],{},"Hash link to the previous run",[1006,1068,1069],{},"Dropped or reordered history becomes visible",[988,1071,1072,1075,1078],{},[1006,1073,1074],{},"Automate in CI",[1006,1076,1077],{},"CLI exit code + structured reason",[1006,1079,1080],{},"Jobs assert numbers/codes, not log poetry",[119,1082,1084],{"className":1083},[122],[124,1085,1086,1089,1090,1093,1094,1097],{},[127,1087,1088],{},"Honest limit:"," this proves the ",[127,1091,1092],{},"record is intact"," — signatures and hashes still match. It does ",[127,1095,1096],{},"not"," prove the host told the truth about the world. If a compromised host hashes the wrong file and signs it, verify can still pass. That is “signed garbage.” Fixing it needs a harder host (sealed tools, stronger key custody) — a separate layer. Saying so is part of a serious design.",[119,1099,1101,1107],{"className":1100},[157,158,159],[593,1102,1104],{"id":1103},"_43-named-failures-so-ci-can-act",[127,1105,1106],{},"4.3 Named failures (so CI can act)",[124,1108,1109],{},[170,1110,1111],{"href":172},[127,1112,175],{},[119,1114,1116],{"className":1115},[122],[124,1117,1118,1119,1122],{},"Give failures ",[127,1120,1121],{},"stable names",", the way HTTP status classes are stable. Examples:",[201,1124,1126],{"className":1125},[204],[206,1127,1128,1131,1134,1137,1140,1143],{},[209,1129,1130],{},"Stored file no longer matches its hash",[209,1132,1133],{},"Hash listed but file missing",[209,1135,1136],{},"System signature invalid or key unknown",[209,1138,1139],{},"Policy file does not match the hash on the record",[209,1141,1142],{},"Human approval required but missing, forged, or bound to another run",[209,1144,1145],{},"History link to the previous run does not match",[119,1147,1149],{"className":1148},[122],[315,1150,1154],{"className":1151,"code":1152,"language":1153,"meta":320,"style":320},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","verify record.json --store ./cas --trust ./trust --policies ./policies\n# exit 0 → proceed\n# exit ≠ 0 → stop; print the named reason\n","bash",[322,1155,1156,1184,1190],{"__ignoreMap":320},[325,1157,1158,1162,1166,1169,1172,1175,1178,1181],{"class":327,"line":328},[325,1159,1161],{"class":1160},"sBMFI","verify",[325,1163,1165],{"class":1164},"sfazB"," record.json",[325,1167,1168],{"class":1164}," --store",[325,1170,1171],{"class":1164}," ./cas",[325,1173,1174],{"class":1164}," --trust",[325,1176,1177],{"class":1164}," ./trust",[325,1179,1180],{"class":1164}," --policies",[325,1182,1183],{"class":1164}," ./policies\n",[325,1185,1186],{"class":327,"line":334},[325,1187,1189],{"class":1188},"sHwdD","# exit 0 → proceed\n",[325,1191,1192],{"class":327,"line":340},[325,1193,1194],{"class":1188},"# exit ≠ 0 → stop; print the named reason\n",[119,1196,1198],{"className":1197},[122],[982,1199,1200,1210],{},[985,1201,1202],{},[988,1203,1204,1207],{},[991,1205,1206],{},"Someone tries…",[991,1208,1209],{},"Gate should…",[1001,1211,1212,1220,1228,1236,1244,1252],{},[988,1213,1214,1217],{},[1006,1215,1216],{},"Edit a stored file after the fact",[1006,1218,1219],{},"Fail — hash mismatch",[988,1221,1222,1225],{},[1006,1223,1224],{},"Ship with no signed record",[1006,1226,1227],{},"Fail — nothing to verify",[988,1229,1230,1233],{},[1006,1231,1232],{},"Forge the system signature",[1006,1234,1235],{},"Fail — bad signature",[988,1237,1238,1241],{},[1006,1239,1240],{},"Skip required human approval",[1006,1242,1243],{},"Fail — approval missing",[988,1245,1246,1249],{},[1006,1247,1248],{},"Drop a fake approval file",[1006,1250,1251],{},"Fail — bad approval signature",[988,1253,1254,1257],{},[1006,1255,1256],{},"Swap the policy file",[1006,1258,1259],{},"Fail — policy hash mismatch",[119,1261,1263],{"className":1262},[122],[124,1264,1265,1266,1269,1270,1273],{},"A demo can ",[132,1267,1268],{},"draw"," those attacks for teaching. Production means: ",[127,1271,1272],{},"a failing test case per reason",", and a CI job that goes red when verify fails. Pictures without failing tests are documentation, not a control.",[119,1275,1277,1283],{"className":1276},[157,158,159],[161,1278,1280],{"id":1279},"_5-competencies",[127,1281,1282],{},"5. Competencies",[124,1284,1285],{},[170,1286,1287],{"href":172},[127,1288,175],{},[119,1290,1292],{"className":1291},[122],[124,1293,1294,1295,1298],{},"This work sits closer to ",[127,1296,1297],{},"supply-chain and code-signing engineering"," than to prompt writing. The mindmap is the map; the subsections are what “good” looks like in practice.",[119,1300,1302],{"className":1301},[312,313],[315,1303,1305],{"className":317,"code":1304,"language":319,"meta":320,"style":320},"mindmap\n  root((Attested AI runs))\n    Evidence design\n      What to hash\n      Intent vs files\n      Enough for later questions\n    Crypto pipeline\n      Canonical JSON\n      Signatures\n      Trust lists\n    Isolation\n      Host vs model\n      System vs human keys\n      No key access for the model\n    Automation\n      Fail closed\n      Named reasons in CI\n      Negative fixtures\n    Honesty\n      Intact record ≠ truth\n      Hardened host next\n      Say the limit out loud\n",[322,1306,1307,1312,1317,1322,1327,1332,1337,1342,1347,1352,1357,1362,1367,1372,1377,1383,1389,1395,1401,1407,1413,1419],{"__ignoreMap":320},[325,1308,1309],{"class":327,"line":328},[325,1310,1311],{},"mindmap\n",[325,1313,1314],{"class":327,"line":334},[325,1315,1316],{},"  root((Attested AI runs))\n",[325,1318,1319],{"class":327,"line":340},[325,1320,1321],{},"    Evidence design\n",[325,1323,1324],{"class":327,"line":346},[325,1325,1326],{},"      What to hash\n",[325,1328,1329],{"class":327,"line":352},[325,1330,1331],{},"      Intent vs files\n",[325,1333,1334],{"class":327,"line":358},[325,1335,1336],{},"      Enough for later questions\n",[325,1338,1339],{"class":327,"line":364},[325,1340,1341],{},"    Crypto pipeline\n",[325,1343,1344],{"class":327,"line":370},[325,1345,1346],{},"      Canonical JSON\n",[325,1348,1349],{"class":327,"line":376},[325,1350,1351],{},"      Signatures\n",[325,1353,1354],{"class":327,"line":382},[325,1355,1356],{},"      Trust lists\n",[325,1358,1359],{"class":327,"line":388},[325,1360,1361],{},"    Isolation\n",[325,1363,1364],{"class":327,"line":394},[325,1365,1366],{},"      Host vs model\n",[325,1368,1369],{"class":327,"line":399},[325,1370,1371],{},"      System vs human keys\n",[325,1373,1374],{"class":327,"line":918},[325,1375,1376],{},"      No key access for the model\n",[325,1378,1380],{"class":327,"line":1379},15,[325,1381,1382],{},"    Automation\n",[325,1384,1386],{"class":327,"line":1385},16,[325,1387,1388],{},"      Fail closed\n",[325,1390,1392],{"class":327,"line":1391},17,[325,1393,1394],{},"      Named reasons in CI\n",[325,1396,1398],{"class":327,"line":1397},18,[325,1399,1400],{},"      Negative fixtures\n",[325,1402,1404],{"class":327,"line":1403},19,[325,1405,1406],{},"    Honesty\n",[325,1408,1410],{"class":327,"line":1409},20,[325,1411,1412],{},"      Intact record ≠ truth\n",[325,1414,1416],{"class":327,"line":1415},21,[325,1417,1418],{},"      Hardened host next\n",[325,1420,1422],{"class":327,"line":1421},22,[325,1423,1424],{},"      Say the limit out loud\n",[119,1426,1428,1434],{"className":1427},[157,158,159],[593,1429,1431],{"id":1430},"_51-evidence-design",[127,1432,1433],{},"5.1 Evidence design",[124,1435,1436],{},[170,1437,1438],{"href":172},[127,1439,175],{},[119,1441,1443],{"className":1442},[122],[124,1444,1445,1448,1449,1452],{},[127,1446,1447],{},"What it is."," Choosing ",[132,1450,1451],{},"which bytes"," belong on the signed record so a future reader can answer real questions — not dumping entire disks, not hashing a vague summary of a summary.",[119,1454,1456],{"className":1455},[122],[124,1457,1458,1461],{},[127,1459,1460],{},"Why it matters."," If you hash the wrong thing, verify still passes and you have learned nothing. If you hash everything, the store becomes unusable and people bypass the gate. Evidence design is the product judgment layer above crypto.",[119,1463,1465],{"className":1464},[122],[124,1466,1467],{},[127,1468,1469],{},"What “good” looks like.",[201,1471,1473],{"className":1472},[204],[206,1474,1475,1478,1485,1496,1499],{},[209,1476,1477],{},"Ask: six months later, what will security / audit / incident response actually ask?",[209,1479,1480,1481,1484],{},"Hash ",[127,1482,1483],{},"raw tool outputs and retrieved chunks",", not only the final chat sentence",[209,1486,1487,1488,1491,1492,1495],{},"Record ",[127,1489,1490],{},"intent"," (what we meant to do) separately from ",[127,1493,1494],{},"I/O fingerprints"," (what we touched)",[209,1497,1498],{},"Prefer fewer, consequential artefacts over a noisy firehose",[209,1500,1501],{},"When in doubt, hash the bytes that would settle a dispute — not the bytes that look nice in a demo",[119,1503,1505,1511],{"className":1504},[157,158,159],[593,1506,1508],{"id":1507},"_52-crypto-pipeline",[127,1509,1510],{},"5.2 Crypto pipeline",[124,1512,1513],{},[170,1514,1515],{"href":172},[127,1516,175],{},[119,1518,1520],{"className":1519},[122],[124,1521,1522,1524],{},[127,1523,1447],{}," The mechanical path from files → hashes → normalised body → signature → verify, with no ambiguity about which bytes were signed.",[119,1526,1528],{"className":1527},[122],[124,1529,1530,1532],{},[127,1531,1460],{}," Most “it verified on my machine” bugs are not exotic crypto breaks. They are unstable serialisation, missing trust entries, or soft-failing checks. A boring, deterministic pipeline is the skill.",[119,1534,1536],{"className":1535},[122],[124,1537,1538],{},[127,1539,1469],{},[201,1541,1543],{"className":1542},[204],[206,1544,1545,1551,1557,1567,1570],{},[209,1546,1547,1550],{},[127,1548,1549],{},"Canonical JSON"," before sign — same logical document ⇒ same bytes for every verifier",[209,1552,1553,1556],{},[127,1554,1555],{},"Content-addressed store"," — re-hash is the check; missing object is failure, not a skip",[209,1558,1559,1562,1563,1566],{},[127,1560,1561],{},"Public-key signatures"," (e.g. Ed25519) with an explicit ",[127,1564,1565],{},"trust list"," of allowed key ids",[209,1568,1569],{},"Unknown key ⇒ reject; do not “try the next key until something works”",[209,1571,1572],{},"Document the algorithm and encoding once; freeze them for the schema version",[119,1574,1576,1582],{"className":1575},[157,158,159],[593,1577,1579],{"id":1578},"_53-isolation",[127,1580,1581],{},"5.3 Isolation",[124,1583,1584],{},[170,1585,1586],{"href":172},[127,1587,175],{},[119,1589,1591],{"className":1590},[122],[124,1592,1593,1595],{},[127,1594,1447],{}," Enforcing who may compute hashes, who may sign, and who may only propose text — in code and in review, not only in a slide.",[119,1597,1599],{"className":1598},[122],[124,1600,1601,1603,1604,1607,1608,748],{},[127,1602,1460],{}," If the language model can invent hashes or hold private keys, attestation collapses into “the bot said so, and we signed it.” Isolation is what makes the signature mean ",[132,1605,1606],{},"the host runtime attested",", not ",[132,1609,1610],{},"the model narrated",[119,1612,1614],{"className":1613},[122],[124,1615,1616],{},[127,1617,1469],{},[201,1619,1621],{"className":1620},[204],[206,1622,1623,1629,1635,1641,1644],{},[209,1624,1625,1628],{},[127,1626,1627],{},"Host"," mediates tools, writes the hash store, builds and signs the record",[209,1630,1631,1634],{},[127,1632,1633],{},"Model"," proposes; never chooses digests; never writes approval fields; never sees private keys",[209,1636,1637,1640],{},[127,1638,1639],{},"System signing key ≠ human approval key"," — compromise of one should not mint the other",[209,1642,1643],{},"Code review treats “model touched the signing path” as a severity-one smell",[209,1645,1646],{},"Tests that the model path cannot call sign or write the approval artefact",[119,1648,1650,1656],{"className":1649},[157,158,159],[593,1651,1653],{"id":1652},"_54-automation",[127,1654,1655],{},"5.4 Automation",[124,1657,1658],{},[170,1659,1660],{"href":172},[127,1661,175],{},[119,1663,1665],{"className":1664},[122],[124,1666,1667,1669,1670,1673],{},[127,1668,1447],{}," Making verify a ",[127,1671,1672],{},"machine contract",": exit codes, named reasons, fixtures — so merge/deploy jobs can enforce the control without a human reading logs.",[119,1675,1677],{"className":1676},[122],[124,1678,1679,1681],{},[127,1680,1460],{}," A control that only fails in a demo UI will not survive Friday afternoon. CI only trusts numbers and stable strings. If integrity failures are warnings, they will be ignored.",[119,1683,1685],{"className":1684},[122],[124,1686,1687],{},[127,1688,1469],{},[201,1690,1692],{"className":1691},[204],[206,1693,1694,1704,1710,1716,1719],{},[209,1695,1696,1697,1700,1701],{},"Verify exits ",[127,1698,1699],{},"0"," only on full pass; any integrity fault ⇒ ",[127,1702,1703],{},"non-zero",[209,1705,1706,1709],{},[127,1707,1708],{},"Named reasons"," stay stable across releases (like HTTP status classes)",[209,1711,1712,1715],{},[127,1713,1714],{},"One negative fixture per reason"," — tamper, missing file, bad sig, missing approval, …",[209,1717,1718],{},"Merge/deploy jobs call verify and fail closed; no “continue on error”",[209,1720,1721],{},"Optional JSON report for dashboards — but the exit code remains the gate",[119,1723,1725,1731],{"className":1724},[157,158,159],[593,1726,1728],{"id":1727},"_55-honesty-threat-model",[127,1729,1730],{},"5.5 Honesty (threat model)",[124,1732,1733],{},[170,1734,1735],{"href":172},[127,1736,175],{},[119,1738,1740],{"className":1739},[122],[124,1741,1742,1744],{},[127,1743,1447],{}," Stating clearly what attestation proves — and what it does not — so leadership and auditors do not confuse an intact signature with ground truth.",[119,1746,1748],{"className":1747},[122],[124,1749,1750,1752],{},[127,1751,1460],{}," Overclaiming (“this proves the AI did the right thing”) destroys trust the first time signed garbage appears. Under-claiming (“it’s just a log”) wastes the control. Precision is a competency.",[119,1754,1756],{"className":1755},[122],[124,1757,1758],{},[127,1759,1469],{},[201,1761,1763],{"className":1762},[204],[206,1764,1765,1771,1778,1785,1788],{},[209,1766,1767,1768],{},"Say in docs and reviews: ",[127,1769,1770],{},"intact record ≠ proven world-truth",[209,1772,1773,1774,1777],{},"Name ",[127,1775,1776],{},"signed garbage",": wrong bytes hashed on purpose or by bug, then signed → verify still passes",[209,1779,1780,1781,1784],{},"Treat ",[127,1782,1783],{},"hardened host"," (sealed tools, stronger key custody, identity-bound approve) as an explicit next layer — not magic inside the signature",[209,1786,1787],{},"Prefer demos that show both PASS and catch paths over demos that only celebrate green",[209,1789,1790],{},"Never market verify-pass as legal certification or “the model was correct”",[119,1792,1794],{"className":1793},[122],[124,1795,1796],{},"Together these five competencies are the difference between a slide about “AI governance” and an engineering control you can put on a merge or deploy job.",[119,1798,1800,1806],{"className":1799},[157,158,159],[161,1801,1803],{"id":1802},"_6-why-this-is-still-rare",[127,1804,1805],{},"6. Why this is still rare",[124,1807,1808],{},[170,1809,1810],{"href":172},[127,1811,175],{},[201,1813,1815],{"className":1814},[204],[206,1816,1817,1820,1823,1826],{},[209,1818,1819],{},"Demos reward fluent chat; attestation rewards audit and hard gates",[209,1821,1822],{},"“Human in the loop” sounds like process without producing a signed artefact",[209,1824,1825],{},"Vendor dashboards keep “proof” behind login",[209,1827,1828],{},"Agents started doing consequential work faster than portable evidence became a default merge/deploy check",[119,1830,1832],{"className":1831},[122],[124,1833,1834,1835,1838],{},"Hashes and signatures are not new. What is late is treating ",[127,1836,1837],{},"AI decisions and assisted runs"," with the same seriousness we already apply to signed software releases — and refusing to treat the chat transcript as the system of record.",[119,1840,1842,1848],{"className":1841},[157,158,159],[161,1843,1845],{"id":1844},"_7-close",[127,1846,1847],{},"7. Close",[124,1849,1850],{},[170,1851,1852],{"href":172},[127,1853,175],{},[119,1855,1857],{"className":1856},[122],[124,1858,1859,1862,1863,1865,1868],{},[127,1860,1861],{},"Problem:"," consequential AI runs leave stories.",[116,1864],{},[127,1866,1867],{},"Solution:"," fingerprint what was used, system-sign the record, optionally human-co-sign, verify offline, stop on failure with a named reason.",[119,1870,1872],{"className":1871},[122],[124,1873,1874,1875,1878],{},"If you cannot re-check ",[132,1876,1877],{},"why"," an action was allowed without opening the chat product, you do not have a control. You have a diary.",[119,1880,1882],{"className":1881},[122],[124,1883,1884],{},[127,1885,1886],{},"Stories describe. Attestation re-checks. Controls fail closed.",[119,1888,1894],{"className":1889},[1890,1891,1892,1893],"text-md","text-center","mt-10","font-bold",[124,1895,1896],{},[170,1897,1898],{"href":172},[127,1899,175],{},[1901,1902,1903],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":320,"searchDepth":334,"depth":334,"links":1905},[1906,1907,1908,1915,1920,1927,1928],{"id":163,"depth":334,"text":166},{"id":430,"depth":334,"text":433},{"id":570,"depth":334,"text":573,"children":1909},[1910,1911,1912,1913,1914],{"id":595,"depth":340,"text":598},{"id":639,"depth":340,"text":642},{"id":681,"depth":340,"text":684},{"id":727,"depth":340,"text":730},{"id":776,"depth":340,"text":779},{"id":810,"depth":334,"text":813,"children":1916},[1917,1918,1919],{"id":835,"depth":340,"text":838},{"id":968,"depth":340,"text":971},{"id":1103,"depth":340,"text":1106},{"id":1279,"depth":334,"text":1282,"children":1921},[1922,1923,1924,1925,1926],{"id":1430,"depth":340,"text":1433},{"id":1507,"depth":340,"text":1510},{"id":1578,"depth":340,"text":1581},{"id":1652,"depth":340,"text":1655},{"id":1727,"depth":340,"text":1730},{"id":1802,"depth":334,"text":1805},{"id":1844,"depth":334,"text":1847},"2026-11-08","AI actions usually leave chat logs and screenshots—not proof you can re-check later. A better pattern: fingerprint what was used, sign the record, verify offline, and fail closed. Plain technical walkthrough.","md",{"src":1933},"/blog/agent-receipts/00-cover.webp",{},true,{"title":31,"description":1930},"4RjUj_qQmiijx-uyjJc1TRNBjVtSEpLXgTDsbs4nSRY",[7,1939],"fr",[1941],{"title":5,"path":6,"stem":7,"children":1942,"page":98},[1943],{"title":10,"path":11,"stem":12,"children":1944,"page":98},[1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965],{"title":15,"path":16,"stem":17},{"title":19,"path":20,"stem":21},{"title":23,"path":24,"stem":25},{"title":27,"path":28,"stem":29},{"title":31,"path":32,"stem":33},{"title":35,"path":36,"stem":37},{"title":39,"path":40,"stem":41},{"title":43,"path":44,"stem":45},{"title":47,"path":48,"stem":49},{"title":51,"path":52,"stem":53},{"title":55,"path":56,"stem":57},{"title":59,"path":60,"stem":61},{"title":63,"path":64,"stem":65},{"title":67,"path":68,"stem":69},{"title":71,"path":72,"stem":73},{"title":75,"path":76,"stem":77},{"title":79,"path":80,"stem":81},{"title":83,"path":84,"stem":85},{"title":87,"path":88,"stem":89},{"title":91,"path":92,"stem":93},{"title":95,"path":96,"stem":97},[1967],{"id":1968,"title":27,"authors":1969,"badge":1972,"body":1974,"date":4336,"description":4337,"extension":1931,"image":4338,"meta":4339,"navigation":1935,"path":28,"seo":4340,"stem":29,"__hash__":4341},"posts_en/en/blog/12. rag-factory.md",[1970],{"name":103,"description":104,"to":105,"avatar":1971},{"src":107,"alt":103},{"label":1973,"color":110,"variant":111},"RAG, Rust, AWP, On-prem, Speckit",{"type":113,"value":1975,"toc":4314},[1976,1978,1984,1998,2007,2031,2042,2058,2073,2079,2088,2097,2106,2112,2131,2159,2274,2283,2291,2308,2323,2329,2337,2367,2376,2417,2427,2455,2467,2492,2503,2518,2533,2553,2559,2588,2594,2631,2646,2652,2665,2680,2686,2743,2749,2760,2787,2802,2816,2856,2865,2902,2908,2928,2938,2953,2968,2977,3009,3015,3030,3036,3070,3117,3123,3138,3144,3153,3159,3337,3352,3358,3481,3499,3514,3520,3570,3685,3709,3724,3736,3742,3757,3763,3775,3831,3946,3961,3971,3991,4043,4053,4068,4078,4127,4137,4152,4158,4164,4170,4224,4230,4239,4249,4264,4272,4278,4284,4292,4302,4311],[116,1977],{},[119,1979,1981],{"className":1980},[122],[124,1982,1983],{},"Most companies don’t need a louder chatbot.",[119,1985,1987],{"className":1986},[122],[124,1988,1989,1990,1993,1994,1997],{},"They need retrieval that is ",[127,1991,1992],{},"predictable",", ",[127,1995,1996],{},"reviewable",", and easy to plug into the way they already ship software.",[119,1999,2001],{"className":2000},[122],[124,2002,2003,2006],{},[127,2004,2005],{},"rag-factory"," is my answer to that: a Rust CLI and library that runs RAG pipelines from a config “recipe.” Build an index. Ask a question. Get a structured answer with citations — or a clear signal when the evidence isn’t strong enough to answer. Evaluate before you call it done.",[119,2008,2010],{"className":2009},[122],[124,2011,2012,2013,2016,2017,2020,2021,2024,2025,2028,2029,153],{},"Around the code sits a second product: how humans and AI assistants deliver features without losing ownership. Speckit for ",[132,2014,2015],{},"what",", AWP for ",[132,2018,2019],{},"when",", skills for ",[132,2022,2023],{},"how",". This piece walks the ",[127,2026,2027],{},"full arc"," — thesis, RAG types analysed, product principles, Rust, architecture, delivery protocol with parallel agents, competencies, future, and close — without turning into a public clone kit. Figures are full width — ",[127,2030,152],{},[119,2032,2034],{"className":2033},[406,407,313],[409,2035],{"alt":2036,"caption":2037,"detail":2038,"src":2039,"tags":2040,"title":2041},"rag-factory brand — A recipe factory for grounded RAG — retrieve from your index, cite what you use, or refuse when evidence isn’t there","Figure 0 — The product promise in one line: cite or refuse.","Product line: a recipe factory for grounded RAG — retrieve from your index, cite what you use, or refuse when evidence isn’t there.","/blog/rag-factory/00-brand-cite-refuse.webp","brand, cite, refuse, grounded-rag","Figure 0 · Brand · cite or refuse",[119,2043,2045],{"className":2044},[122],[124,2046,2047],{},[132,2048,2049,2050,2053,2054,2057],{},"Figure 0 — The product promise in one line: retrieve from your index, ",[127,2051,2052],{},"cite"," what you use, or ",[127,2055,2056],{},"refuse"," when evidence isn’t there.",[119,2059,2061,2067],{"className":2060},[157,158,159],[161,2062,2064],{"id":2063},"_1-thesis-trustworthy-rag-is-a-factory-problem",[127,2065,2066],{},"1. Thesis — trustworthy RAG is a factory problem",[124,2068,2069],{},[170,2070,2071],{"href":172},[127,2072,175],{},[119,2074,2076],{"className":2075},[122],[124,2077,2078],{},"Most RAG work stalls for the same three reasons.",[119,2080,2082],{"className":2081},[122],[124,2083,2084,2087],{},[127,2085,2086],{},"Glue, not product"," — ingest, chunk, embed, retrieve, prompt, and eval get reinvented per project.",[119,2089,2091],{"className":2090},[122],[124,2092,2093,2096],{},[127,2094,2095],{},"One stack for every domain"," — docs Q&A, code Q&A, and policy review need different defaults. A single “universal” chat experience usually fits none of them well.",[119,2098,2100],{"className":2099},[122],[124,2101,2102,2105],{},[127,2103,2104],{},"Vibes instead of gates"," — if the system cannot decline weak evidence, and CI cannot fail when quality drops, you mostly shipped a demo skin.",[119,2107,2109],{"className":2108},[122],[124,2110,2111],{},"The bet is the opposite of a magic answer bar:",[119,2113,2115],{"className":2114},[122],[243,2116,2117],{},[124,2118,2119,2120,2123,2124,2126,2127,2130],{},"A ",[127,2121,2122],{},"universal factory"," (scaffold + knobs + measure) is realistic.",[116,2125],{},"\nA ",[127,2128,2129],{},"universal answer-quality bar"," is not.",[119,2132,2134],{"className":2133},[122],[124,2135,2136,2137,2140,2141,2144,2145,2148,2149,1993,2152,1993,2155,2158],{},"The product is a ",[127,2138,2139],{},"Rust CLI + library"," that runs ",[127,2142,2143],{},"config-driven RAG pipelines from a recipe",": build an index, answer with citations, refuse when unsure, and ",[127,2146,2147],{},"eval before you ship",". Domain packs (",[322,2150,2151],{},"docs-qa",[322,2153,2154],{},"code-rag",[322,2156,2157],{},"sop-audit",") change knobs — not the engine.",[119,2160,2162],{"className":2161},[312,313],[315,2163,2165],{"className":317,"code":2164,"language":319,"meta":320,"style":320},"flowchart LR\n  subgraph inputs\n    R[Recipe YAML]\n    P[Pack overlay]\n    C[Corpus]\n    G[Golden JSONL]\n  end\n  subgraph engine[\"rag-factory-core\"]\n    B[build]\n    Q[query]\n    E[eval]\n    IDX[(Index)]\n  end\n  R --> P\n  P --> B\n  C --> B\n  B --> IDX\n  IDX --> Q\n  Q --> A[Answer JSON\u003Cbr/>cite / refuse]\n  G --> E\n  IDX --> E\n  E --> GATE{CI gate}\n",[322,2166,2167,2171,2176,2181,2186,2191,2196,2200,2205,2210,2215,2220,2225,2229,2234,2239,2244,2249,2254,2259,2264,2269],{"__ignoreMap":320},[325,2168,2169],{"class":327,"line":328},[325,2170,331],{},[325,2172,2173],{"class":327,"line":334},[325,2174,2175],{},"  subgraph inputs\n",[325,2177,2178],{"class":327,"line":340},[325,2179,2180],{},"    R[Recipe YAML]\n",[325,2182,2183],{"class":327,"line":346},[325,2184,2185],{},"    P[Pack overlay]\n",[325,2187,2188],{"class":327,"line":352},[325,2189,2190],{},"    C[Corpus]\n",[325,2192,2193],{"class":327,"line":358},[325,2194,2195],{},"    G[Golden JSONL]\n",[325,2197,2198],{"class":327,"line":364},[325,2199,349],{},[325,2201,2202],{"class":327,"line":370},[325,2203,2204],{},"  subgraph engine[\"rag-factory-core\"]\n",[325,2206,2207],{"class":327,"line":376},[325,2208,2209],{},"    B[build]\n",[325,2211,2212],{"class":327,"line":382},[325,2213,2214],{},"    Q[query]\n",[325,2216,2217],{"class":327,"line":388},[325,2218,2219],{},"    E[eval]\n",[325,2221,2222],{"class":327,"line":394},[325,2223,2224],{},"    IDX[(Index)]\n",[325,2226,2227],{"class":327,"line":399},[325,2228,349],{},[325,2230,2231],{"class":327,"line":918},[325,2232,2233],{},"  R --> P\n",[325,2235,2236],{"class":327,"line":1379},[325,2237,2238],{},"  P --> B\n",[325,2240,2241],{"class":327,"line":1385},[325,2242,2243],{},"  C --> B\n",[325,2245,2246],{"class":327,"line":1391},[325,2247,2248],{},"  B --> IDX\n",[325,2250,2251],{"class":327,"line":1397},[325,2252,2253],{},"  IDX --> Q\n",[325,2255,2256],{"class":327,"line":1403},[325,2257,2258],{},"  Q --> A[Answer JSON\u003Cbr/>cite / refuse]\n",[325,2260,2261],{"class":327,"line":1409},[325,2262,2263],{},"  G --> E\n",[325,2265,2266],{"class":327,"line":1415},[325,2267,2268],{},"  IDX --> E\n",[325,2270,2271],{"class":327,"line":1421},[325,2272,2273],{},"  E --> GATE{CI gate}\n",[119,2275,2277],{"className":2276},[122],[315,2278,2281],{"className":2279,"code":2280,"language":960,"meta":320},[958],"Recipe + Pack  →  ingest → chunk → embed → store\n               →  retrieve → context → LLM → cite / decline\n               →  eval on golden questions (CI gate)\n",[322,2282,2280],{"__ignoreMap":320},[119,2284,2286],{"className":2285},[122],[124,2287,2288],{},[127,2289,2290],{},"What success looks like",[201,2292,2294],{"className":2293},[204],[206,2295,2296,2299,2302,2305],{},[209,2297,2298],{},"A new pilot for a known pack family in hours, not weeks",[209,2300,2301],{},"Swap store / LLM via config without rewriting the app",[209,2303,2304],{},"Same Answer JSON from library, CLI, and HTTP — one engine path",[209,2306,2307],{},"Cite or refuse; injection / refuse goldens stay green in CI",[119,2309,2311,2317],{"className":2310},[157,158,159],[161,2312,2314],{"id":2313},"_2-rag-types-analysed-before-the-factory-shape",[127,2315,2316],{},"2. RAG types analysed (before the factory shape)",[124,2318,2319],{},[170,2320,2321],{"href":172},[127,2322,175],{},[119,2324,2326],{"className":2325},[122],[124,2327,2328],{},"The factory did not start from a single blog-post architecture. It started from comparing the RAG patterns teams actually ask for — and writing down where their trust bars diverge.",[119,2330,2332],{"className":2331},[122],[124,2333,2334],{},[127,2335,2336],{},"Domain packs (shipped as overlays):",[201,2338,2340],{"className":2339},[204],[206,2341,2342,2351,2359],{},[209,2343,2344,2350],{},[127,2345,2346,2347,2349],{},"Docs Q&A (",[322,2348,2151],{},")"," — product/eng docs, wikis, support knowledge bases",[209,2352,2353,2358],{},[127,2354,2355,2356,2349],{},"Code RAG (",[322,2357,2154],{}," — repositories, paths, symbols, engineering questions",[209,2360,2361,2366],{},[127,2362,2363,2364,2349],{},"SOP / policy audit (",[322,2365,2157],{}," — procedures where declining weak evidence matters as much as answering",[119,2368,2370],{"className":2369},[122],[124,2371,2372,2375],{},[127,2373,2374],{},"Pipeline patterns analysed"," and folded into the roadmap (behind calm defaults and flags):",[201,2377,2379],{"className":2378},[204],[206,2380,2381,2387,2393,2399,2405,2411],{},[209,2382,2383,2386],{},[127,2384,2385],{},"Dense retrieve"," — the default, teachable path",[209,2388,2389,2392],{},[127,2390,2391],{},"Hybrid retrieve + rerank"," — when lexical misses matter",[209,2394,2395,2398],{},[127,2396,2397],{},"Conversational / streaming"," — multi-turn with session memory",[209,2400,2401,2404],{},[127,2402,2403],{},"Multimodal"," — PDF pages, figures, vision-adjacent corpora",[209,2406,2407,2410],{},[127,2408,2409],{},"Multi-hop / bounded agentic retrieve"," — decompose and iterate without unbounded autonomy",[209,2412,2413,2416],{},[127,2414,2415],{},"Structured + docs hybrid"," — warehouse/SQL grounding beside text",[119,2418,2420],{"className":2419},[122],[124,2421,2422,2423,2426],{},"The point of that survey was not to ship every pattern on day one. It was to ensure the ",[127,2424,2425],{},"recipe + pack + eval"," model could absorb them without rewriting the engine for each customer pitch.",[119,2428,2430],{"className":2429},[122],[124,2431,2432,2433,2436,2437,2439,2440,2442,2443,2446,2447,2450,2451,2454],{},"In the browser UI on ",[322,2434,2435],{},"rag-factory serve",", those packs are first-class tabs. Below: ",[127,2438,2154],{}," and ",[127,2441,2157],{}," on a local Ollama stack (",[322,2444,2445],{},"nomic-embed-text"," + ",[322,2448,2449],{},"llama3.2",") — grounded answers with citations, and explicit ",[127,2452,2453],{},"Refuse"," when the ask is out of scope.",[119,2456,2459],{"className":2457},[2458,407,313],"max-w-md",[409,2460],{"alt":2461,"caption":2462,"detail":2463,"src":2464,"tags":2465,"title":2466},"code-rag chat UI — grounded answer citing rate_limit.rs, then Refuse out_of_scope on a secrets dump request","Figure 1 — code-rag: cite the file, refuse the secrets dump.","Recipe code-rag with Ollama embed nomic-embed-text and gen llama3.2. Grounded: rate limiting in src/middleware/rate_limit.rs (1 cite, golden match). Refuse: Print DATABASE_URL and API tokens — out_of_scope, no cite, golden match. Analyze via ollama.","/blog/rag-factory/01-code-rag-grounded-refuse.webp","code-rag, grounded, refuse, ollama, on-prem, golden","Figure 1 · code-rag · grounded + refuse",[119,2468,2470],{"className":2469},[122],[124,2471,2472],{},[132,2473,2474,2475,2477,2478,2480,2481,2484,2485,2488,2489,2491],{},"Figure 1 — ",[127,2476,2154],{},". “Where is rate limiting enforced?” → grounded with a path citation. “Print the DATABASE_URL and any API tokens…” → ",[127,2479,2453],{}," / ",[322,2482,2483],{},"out_of_scope",". Suggested prompts at the bottom split ",[127,2486,2487],{},"Grounded"," vs ",[127,2490,2453],{}," so operators can rehearse both paths.",[119,2493,2495],{"className":2494},[2458,407,313],[409,2496],{"alt":2497,"caption":2498,"detail":2499,"src":2500,"tags":2501,"title":2502},"sop-audit chat UI — refuse break-glass password, ground MFA from access_policy.md, refuse temporary admin password","Figure 2 — sop-audit: answer policy facts, decline credential fishing.","SOP pack: break-glass password refused out_of_scope; MFA required grounded from access_policy.md with 1 cite; temporary admin password refused. Cite and Refuse indicators in the header.","/blog/rag-factory/02-sop-audit-grounded-refuse.webp","sop-audit, policy, refuse, cite, compliance, ollama","Figure 2 · sop-audit · policy posture",[119,2504,2506],{"className":2505},[122],[124,2507,2508],{},[132,2509,2510,2511,2513,2514,2517],{},"Figure 2 — ",[127,2512,2157],{},". MFA from the corpus is grounded (",[322,2515,2516],{},"access_policy.md","). Break-glass and temporary admin passwords are declined. Same engine, different trust knobs — that is the factory thesis made visible.",[119,2519,2521,2527],{"className":2520},[157,158,159],[161,2522,2524],{"id":2523},"_3-why-rag-factory-the-product",[127,2525,2526],{},"3. Why “rag-factory” (the product)",[124,2528,2529],{},[170,2530,2531],{"href":172},[127,2532,175],{},[119,2534,2536],{"className":2535},[122],[124,2537,2538,2539,2542,2543,1993,2546,1993,2549,2552],{},"The name is the product. ",[127,2540,2541],{},"Factory"," means you assemble a pipeline — you don’t get one fixed chatbot that pretends to fit every corpus and every review bar. Alternatives (",[322,2544,2545],{},"raggen",[322,2547,2548],{},"forge-rag",[322,2550,2551],{},"ragkit",") were less clear for search and for the mental model. The name forces the right conversation: knobs and measurement, not magic.",[119,2554,2556],{"className":2555},[122],[124,2557,2558],{},"Teams rebuild the same plumbing while trust needs diverge:",[201,2560,2562],{"className":2561},[204],[206,2563,2564,2570,2576,2582],{},[209,2565,2566,2569],{},[127,2567,2568],{},"Data shape"," — markdown docs vs code vs controlled procedures",[209,2571,2572,2575],{},[127,2573,2574],{},"Trust bar"," — casual support vs careful policy answers",[209,2577,2578,2581],{},[127,2579,2580],{},"Freshness"," — static wiki vs live repositories",[209,2583,2584,2587],{},[127,2585,2586],{},"Failure mode"," — best-effort vs “decline when unsure”",[119,2589,2591],{"className":2590},[122],[124,2592,2593],{},"So the operating loop is deliberate:",[201,2595,2597],{"className":2596},[204],[268,2598,2599,2609,2612,2628],{},[209,2600,2601,2602,1993,2604,2606,2607],{},"Pick a pack — ",[322,2603,2151],{},[322,2605,2154],{},", or ",[322,2608,2157],{},[209,2610,2611],{},"Write a recipe — sources, embed/LLM, store, cite rules, goldens",[209,2613,2614,2615,2618,2619,2618,2622,2618,2625],{},"Run — ",[322,2616,2617],{},"init"," → ",[322,2620,2621],{},"build",[322,2623,2624],{},"query",[322,2626,2627],{},"eval",[209,2629,2630],{},"Ship when eval passes",[119,2632,2634],{"className":2633},[122],[124,2635,2636,2639,2640,2642,2645],{},[127,2637,2638],{},"Strong fit:"," docs, runbooks, code Q&A, policy/SOP, support KB, onboarding.",[116,2641],{},[127,2643,2644],{},"Poor fit:"," open-ended creative chat, general web search, “one RAG for every industry” with no pack and no eval.",[119,2647,2649],{"className":2648},[122],[124,2650,2651],{},"What it is not: ChatGPT glued to your files, a LangChain clone in Rust, or local foundation-model training. Models stay on approved OpenAI-compatible HTTP or Ollama.",[119,2653,2655],{"className":2654},[122],[124,2656,2657,2660,2661,2664],{},[127,2658,2659],{},"On-premises is a first-class posture."," The engine is a shippable Rust binary. Indexes can stay local (for example LanceDB on disk). Embed and generate can call ",[127,2662,2663],{},"Ollama or other OpenAI-compatible endpoints inside your network"," — so corpus, keys, and models do not have to leave the perimeter. Cloud APIs remain optional when policy allows. Same recipe shape either way; deployment policy is a config choice, not a fork. Figures 1–2 above are that posture in practice: local models, local UI, cite/refuse visible in the chrome.",[119,2666,2668,2674],{"className":2667},[157,158,159],[593,2669,2671],{"id":2670},"_31-product-principles-constitution-level",[127,2672,2673],{},"3.1 Product principles (constitution-level)",[124,2675,2676],{},[170,2677,2678],{"href":172},[127,2679,175],{},[119,2681,2683],{"className":2682},[122],[124,2684,2685],{},"These are laws, not slogans:",[201,2687,2689],{"className":2688},[204],[268,2690,2691,2697,2703,2712,2718,2724,2730],{},[209,2692,2693,2696],{},[127,2694,2695],{},"Factory, not universal RAG"," — domains land as packs and goldens, not hardcoded forks",[209,2698,2699,2702],{},[127,2700,2701],{},"Library owns logic; CLI is thin"," — HTTP reuses the same engine and Answer JSON",[209,2704,2705,2708,2709],{},[127,2706,2707],{},"Recipe knobs over hardcoding"," — pluggable backends; secrets are env ",[132,2710,2711],{},"names",[209,2713,2714,2717],{},[127,2715,2716],{},"Eval gate before “done”"," — cite/decline checks and regression cases in CI",[209,2719,2720,2723],{},[127,2721,2722],{},"Calm defaults; gate advanced surfaces"," — hybrid, connectors, multi-hop behind flags and written plans",[209,2725,2726,2729],{},[127,2727,2728],{},"Tools fetch; language models write under constraints"," — Layer A cite/refuse; Layer B allowlisted tools only",[209,2731,2732,2735,2736,2480,2739,2742],{},[127,2733,2734],{},"Observable by default"," — ",[322,2737,2738],{},"request_id",[322,2740,2741],{},"build_id",", redaction, log retention TTL",[119,2744,2746],{"className":2745},[122],[124,2747,2748],{},"That set is why the feature list can grow without the product becoming improvisation.",[119,2750,2752],{"className":2751},[406,407,313],[409,2753],{"alt":2754,"caption":2755,"detail":2756,"src":2757,"tags":2758,"title":2759},"rag-factory README — Config-driven RAG pipelines from a recipe; Rust CLI + library; badges for Tokio, Clap, Serde, Ollama, LanceDB, Qdrant; tech table","Figure 3 — Public stack contract: universal plumbing, domain-specific trust.","Tagline: build an index, answer with citations, refuse when unsure, eval before you ship. Stack: Rust/Tokio/Clap/Serde, YAML recipes, OpenAI-compatible HTTP or Ollama, LanceDB/Qdrant/JSON local/memory, GitHub Actions with mock-* backends.","/blog/rag-factory/03-readme-stack.webp","readme, rust, ollama, lancedb, qdrant, ci, yaml","Figure 3 · README · stack contract",[119,2761,2763],{"className":2762},[122],[124,2764,2765],{},[132,2766,2767,2768,2771,2772,2775,2776,2779,2780,2783,2784,748],{},"Figure 3 — The public stack contract from the README: Rust engine, YAML recipes (",[322,2769,2770],{},"version: 1","), OpenAI-compatible HTTP or ",[127,2773,2774],{},"Ollama",", LanceDB / Qdrant / local JSON, GitHub Actions with ",[322,2777,2778],{},"mock-*"," offline models. Universal ",[132,2781,2782],{},"plumbing",", domain-specific ",[132,2785,2786],{},"trust",[119,2788,2790,2796],{"className":2789},[157,158,159],[161,2791,2793],{"id":2792},"_4-why-rust",[127,2794,2795],{},"4. Why Rust",[124,2797,2798],{},[170,2799,2800],{"href":172},[127,2801,175],{},[119,2803,2805],{"className":2804},[122],[124,2806,2807,2808,2811,2812,2815],{},"I didn’t pick Rust because it’s fashionable. I picked it because the ",[132,2809,2810],{},"engine"," should be a ",[127,2813,2814],{},"fast, single shippable binary"," with clean backend traits and predictable failures, while models stay on the other side of HTTP (cloud or Ollama). That split is the point — not “Rust for the resume.”",[119,2817,2819],{"className":2818},[122],[124,2820,2821,2824,2825,2480,2828,2480,2831,2480,2834,2837,2838,2840,2841,2843,2844,2847,2848,2851,2852,2855],{},[127,2822,2823],{},"Choose Rust for:"," ingest / chunk / retrieve orchestration; trait-based ",[322,2826,2827],{},"Embedder",[322,2829,2830],{},"Store",[322,2832,2833],{},"Reranker",[322,2835,2836],{},"Llm","; CLI + library + optional HTTP on one path; offline CI with ",[322,2839,2778],{}," backends; fail-closed types and exit codes (",[322,2842,1699],{}," ok · ",[322,2845,2846],{},"1"," eval fail · ",[322,2849,2850],{},"2"," config · ",[322,2853,2854],{},"3"," index/model mismatch).",[119,2857,2859],{"className":2858},[122],[124,2860,2861,2864],{},[127,2862,2863],{},"Leave to Python / HTTP:"," embedding and chat model weights; training / fine-tuning; light eval lint helpers and retention scripts; notebooks and one-off experiments.",[119,2866,2868],{"className":2867},[312,313],[315,2869,2871],{"className":317,"code":2870,"language":319,"meta":320,"style":320},"flowchart TB\n  C[Corpus on your disk / network] --> E[Rust pipeline\u003Cbr/>build · query · eval]\n  E \u003C--> M[Approved model endpoints\u003Cbr/>Ollama on-prem / OpenAI-compatible cloud]\n  E --> CLI[CLI]\n  E --> HTTP[HTTP serve + chat UI]\n  E --> A[Answer JSON\u003Cbr/>cite or decline]\n",[322,2872,2873,2877,2882,2887,2892,2897],{"__ignoreMap":320},[325,2874,2875],{"class":327,"line":328},[325,2876,462],{},[325,2878,2879],{"class":327,"line":334},[325,2880,2881],{},"  C[Corpus on your disk / network] --> E[Rust pipeline\u003Cbr/>build · query · eval]\n",[325,2883,2884],{"class":327,"line":340},[325,2885,2886],{},"  E \u003C--> M[Approved model endpoints\u003Cbr/>Ollama on-prem / OpenAI-compatible cloud]\n",[325,2888,2889],{"class":327,"line":346},[325,2890,2891],{},"  E --> CLI[CLI]\n",[325,2893,2894],{"class":327,"line":352},[325,2895,2896],{},"  E --> HTTP[HTTP serve + chat UI]\n",[325,2898,2899],{"class":327,"line":358},[325,2900,2901],{},"  E --> A[Answer JSON\u003Cbr/>cite or decline]\n",[119,2903,2905],{"className":2904},[122],[124,2906,2907],{},"What teams get in practice:",[201,2909,2911],{"className":2910},[204],[206,2912,2913,2916,2922,2925],{},[209,2914,2915],{},"One engine path across library, CLI, and service — fewer surprises between environments",[209,2917,2918,2919,2921],{},"Secrets out of git — recipes reference env ",[132,2920,2711],{},", not keys",[209,2923,2924],{},"Mock backends so CI doesn’t depend on live vendor calls",[209,2926,2927],{},"Feature flags so advanced retrieve modes stay opt-in",[119,2929,2931],{"className":2930},[122],[124,2932,2933,2934,2937],{},"Python remains excellent for exploration. The production pipeline benefits from something more boring and stable. Rust owns ",[127,2935,2936],{},"trust and plumbing",". Models are pluggable workers.",[119,2939,2941,2947],{"className":2940},[157,158,159],[161,2942,2944],{"id":2943},"_5-architecture-layer-ab-recipes-packs-eval-ops",[127,2945,2946],{},"5. Architecture — Layer A/B, recipes, packs, eval, ops",[124,2948,2949],{},[170,2950,2951],{"href":172},[127,2952,175],{},[119,2954,2956,2962],{"className":2955},[157,158,159],[593,2957,2959],{"id":2958},"_51-one-engine-thin-surfaces",[127,2960,2961],{},"5.1 One engine, thin surfaces",[124,2963,2964],{},[170,2965,2966],{"href":172},[127,2967,175],{},[119,2969,2971],{"className":2970},[122],[124,2972,2973,2974],{},"Architecture follows the product bet: ",[127,2975,2976],{},"universal plumbing, domain-specific trust.",[119,2978,2980],{"className":2979},[312,313],[315,2981,2983],{"className":317,"code":2982,"language":319,"meta":320,"style":320},"flowchart TB\n  R[Recipe + pack overlay] --> Core[rag-factory-core\u003Cbr/>build / query / eval]\n  Core --> CLI[CLI · thin]\n  Core --> HTTP[HTTP serve + browser UI]\n  Core --> Ans[Answer JSON]\n",[322,2984,2985,2989,2994,2999,3004],{"__ignoreMap":320},[325,2986,2987],{"class":327,"line":328},[325,2988,462],{},[325,2990,2991],{"class":327,"line":334},[325,2992,2993],{},"  R[Recipe + pack overlay] --> Core[rag-factory-core\u003Cbr/>build / query / eval]\n",[325,2995,2996],{"class":327,"line":340},[325,2997,2998],{},"  Core --> CLI[CLI · thin]\n",[325,3000,3001],{"class":327,"line":346},[325,3002,3003],{},"  Core --> HTTP[HTTP serve + browser UI]\n",[325,3005,3006],{"class":327,"line":352},[325,3007,3008],{},"  Core --> Ans[Answer JSON]\n",[119,3010,3012],{"className":3011},[122],[124,3013,3014],{},"No parallel “service rewrite.” Behavior lives in the library. Surfaces only adapt I/O.",[119,3016,3018,3024],{"className":3017},[157,158,159],[593,3019,3021],{"id":3020},"_52-layer-a-vs-layer-b",[127,3022,3023],{},"5.2 Layer A vs Layer B",[124,3025,3026],{},[170,3027,3028],{"href":172},[127,3029,175],{},[119,3031,3033],{"className":3032},[122],[124,3034,3035],{},"A friendly assistant and a grounded retriever are different jobs. Separating them keeps both useful — and keeps architecture and security reviews short.",[201,3037,3039],{"className":3038},[204],[206,3040,3041,3061],{},[209,3042,3043,3046,3047,3050,3051,3054,3055,3057,3058,748],{},[127,3044,3045],{},"Pipeline (Layer A)"," — retrieve → generate → ",[127,3048,3049],{},"cite or refuse",". Evidence only. Lives in ",[322,3052,3053],{},"rag-factory-core"," / CLI ",[322,3056,2624],{}," / HTTP ",[322,3059,3060],{},"/query",[209,3062,3063,3066,3067,3069],{},[127,3064,3065],{},"Front chat (Layer B)"," — greet, classify, decide when to call A. Must call A for docs/code/policy facts. Playbook + your chat client (or the serve UI as a direct ",[322,3068,3060],{}," client).",[119,3071,3073],{"className":3072},[312,313],[315,3074,3076],{"className":317,"code":3075,"language":319,"meta":320,"style":320},"flowchart TB\n  U[User] --> B[Front assistant · Layer B]\n  B -->|chitchat| Out[Reply]\n  B -->|docs / code / policy| Tool[Tool: rag-factory query]\n  Tool --> A[Pipeline · Layer A\u003Cbr/>retrieve → generate → cite/refuse]\n  A --> J[Answer JSON]\n  J --> B\n  B --> Out\n",[322,3077,3078,3082,3087,3092,3097,3102,3107,3112],{"__ignoreMap":320},[325,3079,3080],{"class":327,"line":328},[325,3081,462],{},[325,3083,3084],{"class":327,"line":334},[325,3085,3086],{},"  U[User] --> B[Front assistant · Layer B]\n",[325,3088,3089],{"class":327,"line":340},[325,3090,3091],{},"  B -->|chitchat| Out[Reply]\n",[325,3093,3094],{"class":327,"line":346},[325,3095,3096],{},"  B -->|docs / code / policy| Tool[Tool: rag-factory query]\n",[325,3098,3099],{"class":327,"line":352},[325,3100,3101],{},"  Tool --> A[Pipeline · Layer A\u003Cbr/>retrieve → generate → cite/refuse]\n",[325,3103,3104],{"class":327,"line":358},[325,3105,3106],{},"  A --> J[Answer JSON]\n",[325,3108,3109],{"class":327,"line":364},[325,3110,3111],{},"  J --> B\n",[325,3113,3114],{"class":327,"line":370},[325,3115,3116],{},"  B --> Out\n",[119,3118,3120],{"className":3119},[122],[124,3121,3122],{},"Models help with language. The pipeline owns evidence. Language models phrase. Tools fetch. That split is how you keep usefulness without turning the product into unbounded LM autonomy.",[119,3124,3126,3132],{"className":3125},[157,158,159],[593,3127,3129],{"id":3128},"_53-recipes-and-packs",[127,3130,3131],{},"5.3 Recipes and packs",[124,3133,3134],{},[170,3135,3136],{"href":172},[127,3137,175],{},[119,3139,3141],{"className":3140},[122],[124,3142,3143],{},"Merge order stays boring on purpose:",[119,3145,3147],{"className":3146},[122],[315,3148,3151],{"className":3149,"code":3150,"language":960,"meta":320},[958],"engine defaults  →  pack overlay  →  user recipe\n",[322,3152,3150],{"__ignoreMap":320},[119,3154,3156],{"className":3155},[122],[124,3157,3158],{},"Packs encode domain posture without forking the codebase. Your recipe wins on conflict. A trimmed example (not the full schema — on purpose):",[315,3160,3164],{"className":3161,"code":3162,"language":3163,"meta":320,"style":320},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","version: 1\nname: acme-docs\npack: docs-qa          # domain defaults; your recipe still wins on conflict\n\ningest:\n  sources:\n    - type: glob\n      paths: [\"corp/docs/**/*.md\"]\n\nembed:\n  provider: openai_compatible\n  api_key_env: EMBED_API_KEY   # env name only — never the secret\n\ngenerate:\n  cite: required\n  # refuse policy lives with the pack / recipe — weak evidence → no answer\n\neval:\n  golden_path: eval/golden.jsonl\n","yaml",[322,3165,3166,3180,3190,3203,3208,3216,3223,3236,3257,3261,3268,3278,3291,3295,3302,3312,3317,3321,3327],{"__ignoreMap":320},[325,3167,3168,3172,3176],{"class":327,"line":328},[325,3169,3171],{"class":3170},"swJcz","version",[325,3173,3175],{"class":3174},"sMK4o",":",[325,3177,3179],{"class":3178},"sbssI"," 1\n",[325,3181,3182,3185,3187],{"class":327,"line":334},[325,3183,3184],{"class":3170},"name",[325,3186,3175],{"class":3174},[325,3188,3189],{"class":1164}," acme-docs\n",[325,3191,3192,3195,3197,3200],{"class":327,"line":340},[325,3193,3194],{"class":3170},"pack",[325,3196,3175],{"class":3174},[325,3198,3199],{"class":1164}," docs-qa",[325,3201,3202],{"class":1188},"          # domain defaults; your recipe still wins on conflict\n",[325,3204,3205],{"class":327,"line":346},[325,3206,3207],{"emptyLinePlaceholder":1935},"\n",[325,3209,3210,3213],{"class":327,"line":352},[325,3211,3212],{"class":3170},"ingest",[325,3214,3215],{"class":3174},":\n",[325,3217,3218,3221],{"class":327,"line":358},[325,3219,3220],{"class":3170},"  sources",[325,3222,3215],{"class":3174},[325,3224,3225,3228,3231,3233],{"class":327,"line":364},[325,3226,3227],{"class":3174},"    -",[325,3229,3230],{"class":3170}," type",[325,3232,3175],{"class":3174},[325,3234,3235],{"class":1164}," glob\n",[325,3237,3238,3241,3243,3246,3249,3252,3254],{"class":327,"line":370},[325,3239,3240],{"class":3170},"      paths",[325,3242,3175],{"class":3174},[325,3244,3245],{"class":3174}," [",[325,3247,3248],{"class":3174},"\"",[325,3250,3251],{"class":1164},"corp/docs/**/*.md",[325,3253,3248],{"class":3174},[325,3255,3256],{"class":3174},"]\n",[325,3258,3259],{"class":327,"line":376},[325,3260,3207],{"emptyLinePlaceholder":1935},[325,3262,3263,3266],{"class":327,"line":382},[325,3264,3265],{"class":3170},"embed",[325,3267,3215],{"class":3174},[325,3269,3270,3273,3275],{"class":327,"line":388},[325,3271,3272],{"class":3170},"  provider",[325,3274,3175],{"class":3174},[325,3276,3277],{"class":1164}," openai_compatible\n",[325,3279,3280,3283,3285,3288],{"class":327,"line":394},[325,3281,3282],{"class":3170},"  api_key_env",[325,3284,3175],{"class":3174},[325,3286,3287],{"class":1164}," EMBED_API_KEY",[325,3289,3290],{"class":1188},"   # env name only — never the secret\n",[325,3292,3293],{"class":327,"line":399},[325,3294,3207],{"emptyLinePlaceholder":1935},[325,3296,3297,3300],{"class":327,"line":918},[325,3298,3299],{"class":3170},"generate",[325,3301,3215],{"class":3174},[325,3303,3304,3307,3309],{"class":327,"line":1379},[325,3305,3306],{"class":3170},"  cite",[325,3308,3175],{"class":3174},[325,3310,3311],{"class":1164}," required\n",[325,3313,3314],{"class":327,"line":1385},[325,3315,3316],{"class":1188},"  # refuse policy lives with the pack / recipe — weak evidence → no answer\n",[325,3318,3319],{"class":327,"line":1391},[325,3320,3207],{"emptyLinePlaceholder":1935},[325,3322,3323,3325],{"class":327,"line":1397},[325,3324,2627],{"class":3170},[325,3326,3215],{"class":3174},[325,3328,3329,3332,3334],{"class":327,"line":1403},[325,3330,3331],{"class":3170},"  golden_path",[325,3333,3175],{"class":3174},[325,3335,3336],{"class":1164}," eval/golden.jsonl\n",[119,3338,3340,3346],{"className":3339},[157,158,159],[593,3341,3343],{"id":3342},"_54-the-answer-contract",[127,3344,3345],{},"5.4 The Answer contract",[124,3347,3348],{},[170,3349,3350],{"href":172},[127,3351,175],{},[119,3353,3355],{"className":3354},[122],[124,3356,3357],{},"A typical response is intentionally plain:",[315,3359,3363],{"className":3360,"code":3361,"language":3362,"meta":320,"style":320},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"status\": \"ok\",\n  \"answer\": \"…\",\n  \"citations\": [{ \"source\": \"docs/install.md\", \"score\": 0.82 }],\n  \"refuse_reason\": null\n}\n","json",[322,3364,3365,3370,3394,3414,3462,3476],{"__ignoreMap":320},[325,3366,3367],{"class":327,"line":328},[325,3368,3369],{"class":3174},"{\n",[325,3371,3372,3375,3379,3381,3383,3386,3389,3391],{"class":327,"line":334},[325,3373,3374],{"class":3174},"  \"",[325,3376,3378],{"class":3377},"spNyl","status",[325,3380,3248],{"class":3174},[325,3382,3175],{"class":3174},[325,3384,3385],{"class":3174}," \"",[325,3387,3388],{"class":1164},"ok",[325,3390,3248],{"class":3174},[325,3392,3393],{"class":3174},",\n",[325,3395,3396,3398,3401,3403,3405,3407,3410,3412],{"class":327,"line":340},[325,3397,3374],{"class":3174},[325,3399,3400],{"class":3377},"answer",[325,3402,3248],{"class":3174},[325,3404,3175],{"class":3174},[325,3406,3385],{"class":3174},[325,3408,3409],{"class":1164},"…",[325,3411,3248],{"class":3174},[325,3413,3393],{"class":3174},[325,3415,3416,3418,3421,3423,3425,3428,3430,3433,3435,3437,3439,3442,3444,3447,3449,3452,3454,3456,3459],{"class":327,"line":346},[325,3417,3374],{"class":3174},[325,3419,3420],{"class":3377},"citations",[325,3422,3248],{"class":3174},[325,3424,3175],{"class":3174},[325,3426,3427],{"class":3174}," [{",[325,3429,3385],{"class":3174},[325,3431,3432],{"class":1160},"source",[325,3434,3248],{"class":3174},[325,3436,3175],{"class":3174},[325,3438,3385],{"class":3174},[325,3440,3441],{"class":1164},"docs/install.md",[325,3443,3248],{"class":3174},[325,3445,3446],{"class":3174},",",[325,3448,3385],{"class":3174},[325,3450,3451],{"class":1160},"score",[325,3453,3248],{"class":3174},[325,3455,3175],{"class":3174},[325,3457,3458],{"class":3178}," 0.82",[325,3460,3461],{"class":3174}," }],\n",[325,3463,3464,3466,3469,3471,3473],{"class":327,"line":352},[325,3465,3374],{"class":3174},[325,3467,3468],{"class":3377},"refuse_reason",[325,3470,3248],{"class":3174},[325,3472,3175],{"class":3174},[325,3474,3475],{"class":3174}," null\n",[325,3477,3478],{"class":327,"line":358},[325,3479,3480],{"class":3174},"}\n",[119,3482,3484],{"className":3483},[122],[124,3485,3486,3487,3490,3491,3493,3494,2480,3496,3498],{},"Or it refuses. That second path is not a failure of the product — ",[127,3488,3489],{},"it is the product."," Decline is a first-class outcome. Figures 1–2 show both paths in the UI: ",[322,3492,2487],{}," with cites, ",[322,3495,2453],{},[322,3497,2483],{}," with no invented secrets.",[119,3500,3502,3508],{"className":3501},[157,158,159],[593,3503,3505],{"id":3504},"_55-build-query-eval",[127,3506,3507],{},"5.5 Build, query, eval",[124,3509,3510],{},[170,3511,3512],{"href":172},[127,3513,175],{},[119,3515,3517],{"className":3516},[122],[124,3518,3519],{},"Three verbs operators already understand:",[315,3521,3523],{"className":1151,"code":3522,"language":1153,"meta":320,"style":320},"rag-factory build -f recipe.yaml\nrag-factory eval  -f recipe.yaml\nrag-factory query -f recipe.yaml \"How do we rotate API keys?\"\n",[322,3524,3525,3538,3550],{"__ignoreMap":320},[325,3526,3527,3529,3532,3535],{"class":327,"line":328},[325,3528,2005],{"class":1160},[325,3530,3531],{"class":1164}," build",[325,3533,3534],{"class":1164}," -f",[325,3536,3537],{"class":1164}," recipe.yaml\n",[325,3539,3540,3542,3545,3548],{"class":327,"line":334},[325,3541,2005],{"class":1160},[325,3543,3544],{"class":1164}," eval",[325,3546,3547],{"class":1164},"  -f",[325,3549,3537],{"class":1164},[325,3551,3552,3554,3557,3559,3562,3564,3567],{"class":327,"line":340},[325,3553,2005],{"class":1160},[325,3555,3556],{"class":1164}," query",[325,3558,3534],{"class":1164},[325,3560,3561],{"class":1164}," recipe.yaml",[325,3563,3385],{"class":3174},[325,3565,3566],{"class":1164},"How do we rotate API keys?",[325,3568,3569],{"class":3174},"\"\n",[119,3571,3573],{"className":3572},[312,313],[315,3574,3576],{"className":317,"code":3575,"language":319,"meta":320,"style":320},"sequenceDiagram\n  participant U as Operator\n  participant CLI as rag-factory CLI\n  participant Core as Pipeline\n  participant Store as Store\n  participant LM as Embed / LLM\n\n  U->>CLI: build -f recipe.yaml\n  CLI->>Core: ingest → chunk → embed → upsert\n  Core->>LM: embed docs\n  Core->>Store: upsert + metadata\n  Core-->>U: build_id, config_hash\n\n  U->>CLI: query \"…\"\n  CLI->>Core: retrieve → pack → generate → cite/refuse\n  Core->>Store: search\n  Core->>LM: embed query + chat\n  Core-->>U: Answer JSON\n\n  U->>CLI: eval\n  CLI->>Core: run goldens / thresholds\n  Core-->>U: exit 0 or 1\n",[322,3577,3578,3583,3588,3593,3598,3603,3608,3612,3617,3622,3627,3632,3637,3641,3646,3651,3656,3661,3666,3670,3675,3680],{"__ignoreMap":320},[325,3579,3580],{"class":327,"line":328},[325,3581,3582],{},"sequenceDiagram\n",[325,3584,3585],{"class":327,"line":334},[325,3586,3587],{},"  participant U as Operator\n",[325,3589,3590],{"class":327,"line":340},[325,3591,3592],{},"  participant CLI as rag-factory CLI\n",[325,3594,3595],{"class":327,"line":346},[325,3596,3597],{},"  participant Core as Pipeline\n",[325,3599,3600],{"class":327,"line":352},[325,3601,3602],{},"  participant Store as Store\n",[325,3604,3605],{"class":327,"line":358},[325,3606,3607],{},"  participant LM as Embed / LLM\n",[325,3609,3610],{"class":327,"line":364},[325,3611,3207],{"emptyLinePlaceholder":1935},[325,3613,3614],{"class":327,"line":370},[325,3615,3616],{},"  U->>CLI: build -f recipe.yaml\n",[325,3618,3619],{"class":327,"line":376},[325,3620,3621],{},"  CLI->>Core: ingest → chunk → embed → upsert\n",[325,3623,3624],{"class":327,"line":382},[325,3625,3626],{},"  Core->>LM: embed docs\n",[325,3628,3629],{"class":327,"line":388},[325,3630,3631],{},"  Core->>Store: upsert + metadata\n",[325,3633,3634],{"class":327,"line":394},[325,3635,3636],{},"  Core-->>U: build_id, config_hash\n",[325,3638,3639],{"class":327,"line":399},[325,3640,3207],{"emptyLinePlaceholder":1935},[325,3642,3643],{"class":327,"line":918},[325,3644,3645],{},"  U->>CLI: query \"…\"\n",[325,3647,3648],{"class":327,"line":1379},[325,3649,3650],{},"  CLI->>Core: retrieve → pack → generate → cite/refuse\n",[325,3652,3653],{"class":327,"line":1385},[325,3654,3655],{},"  Core->>Store: search\n",[325,3657,3658],{"class":327,"line":1391},[325,3659,3660],{},"  Core->>LM: embed query + chat\n",[325,3662,3663],{"class":327,"line":1397},[325,3664,3665],{},"  Core-->>U: Answer JSON\n",[325,3667,3668],{"class":327,"line":1403},[325,3669,3207],{"emptyLinePlaceholder":1935},[325,3671,3672],{"class":327,"line":1409},[325,3673,3674],{},"  U->>CLI: eval\n",[325,3676,3677],{"class":327,"line":1415},[325,3678,3679],{},"  CLI->>Core: run goldens / thresholds\n",[325,3681,3682],{"class":327,"line":1421},[325,3683,3684],{},"  Core-->>U: exit 0 or 1\n",[119,3686,3688],{"className":3687},[122],[124,3689,3690,3692,3693,2480,3695,3698,3699,3701,3703,3704,3706,3708],{},[322,3691,2621],{}," produces provenance (",[322,3694,2741],{},[322,3696,3697],{},"config_hash",").",[116,3700],{},[322,3702,2624],{}," returns the Answer JSON.",[116,3705],{},[322,3707,2627],{}," runs golden questions against thresholds — including cases that try to talk the system into bad behavior. If quality drops, the exit code says so. That fits next to existing CI, change management, and review habits.",[119,3710,3712,3718],{"className":3711},[157,158,159],[593,3713,3715],{"id":3714},"_56-ops-without-drama",[127,3716,3717],{},"5.6 Ops without drama",[124,3719,3720],{},[170,3721,3722],{"href":172},[127,3723,175],{},[119,3725,3727],{"className":3726},[122],[124,3728,3729,3730,3732,3733,748],{},"Stage logs, ",[322,3731,2738],{},", redaction, and retention helpers exist so operators can reconstruct what happened. Secrets, raw prompts, and full chunk bodies stay out of default info logs. Advanced tracing (for example a full OpenTelemetry exporter) can deepen later; the contract starts early: ",[127,3734,3735],{},"observable by default",[119,3737,3739],{"className":3738},[122],[124,3740,3741],{},"Advanced retrieve (hybrid, rerank), connectors, streaming, multimodal deepen, and related surfaces ship as deliberate Speckit slices behind flags — dense defaults stay teachable.",[119,3743,3745,3751],{"className":3744},[157,158,159],[161,3746,3748],{"id":3747},"_6-delivery-os-speckit-awp-skills",[127,3749,3750],{},"6. Delivery OS — Speckit + AWP + skills",[124,3752,3753],{},[170,3754,3755],{"href":172},[127,3756,175],{},[119,3758,3760],{"className":3759},[122],[124,3761,3762],{},"A large RAG surface sprawls if assistants freestyle: features without acceptance criteria, READMEs that lie about what shipped, skipped eval / security goldens, no honest next step.",[119,3764,3766],{"className":3765},[122],[124,3767,3768,2439,3771,3774],{},[127,3769,3770],{},"Speckit",[127,3772,3773],{},"AWP"," are the antidote: agents get power; humans keep gates. Skills are required for implement work — not optional flavor text.",[201,3776,3778],{"className":3777},[204],[206,3779,3780,3797,3810],{},[209,3781,3782,2735,3784,3786,3787,2618,3790,2618,3793,3796],{},[127,3783,3770],{},[132,3785,2015],{}," to build: numbered features with ",[322,3788,3789],{},"spec.md",[322,3791,3792],{},"plan.md",[322,3794,3795],{},"tasks.md"," → implement (slices from MVP engine through stores, hybrid, connectors, conversational/streaming, HTTP, control plane, observability, front UI, …)",[209,3798,3799,2735,3802,3805,3806,3809],{},[127,3800,3801],{},"AWP (Agentic Workflow Protocol)",[132,3803,3804],{},"how work advances",": check → Speckit slice → update docs → ",[127,3807,3808],{},"human-approved commit"," → next",[209,3811,3812,2735,3815,3818,3819,3822,3823,3826,3827,3830],{},[127,3813,3814],{},"Skills",[132,3816,3817],{},"how to implement correctly",": universal ",[322,3820,3821],{},"rag-*"," craft, ",[322,3824,3825],{},"rag-factory-*"," product rules, and ",[322,3828,3829],{},"speckit-*"," process skills",[119,3832,3834],{"className":3833},[312,313],[315,3835,3837],{"className":317,"code":3836,"language":319,"meta":320,"style":320},"flowchart TB\n  subgraph awp_outer [AWP outer loop]\n    Check[awp check]\n    Update[awp update · docs match reality]\n    Commit[awp commit · human gate]\n    Next[awp next]\n  end\n  subgraph speckit [Speckit feature slice]\n    Clarify[clarify?]\n    Plan[plan?]\n    Tasks[tasks · required]\n    Impl[implement · skills ON]\n    Converge[converge?]\n  end\n  Check --> Clarify\n  Clarify --> Plan\n  Plan --> Tasks\n  Tasks --> Impl\n  Impl --> Converge\n  Converge --> Update\n  Update --> Commit\n  Commit --> Next\n",[322,3838,3839,3843,3848,3853,3858,3863,3868,3872,3877,3882,3887,3892,3897,3902,3906,3911,3916,3921,3926,3931,3936,3941],{"__ignoreMap":320},[325,3840,3841],{"class":327,"line":328},[325,3842,462],{},[325,3844,3845],{"class":327,"line":334},[325,3846,3847],{},"  subgraph awp_outer [AWP outer loop]\n",[325,3849,3850],{"class":327,"line":340},[325,3851,3852],{},"    Check[awp check]\n",[325,3854,3855],{"class":327,"line":346},[325,3856,3857],{},"    Update[awp update · docs match reality]\n",[325,3859,3860],{"class":327,"line":352},[325,3861,3862],{},"    Commit[awp commit · human gate]\n",[325,3864,3865],{"class":327,"line":358},[325,3866,3867],{},"    Next[awp next]\n",[325,3869,3870],{"class":327,"line":364},[325,3871,349],{},[325,3873,3874],{"class":327,"line":370},[325,3875,3876],{},"  subgraph speckit [Speckit feature slice]\n",[325,3878,3879],{"class":327,"line":376},[325,3880,3881],{},"    Clarify[clarify?]\n",[325,3883,3884],{"class":327,"line":382},[325,3885,3886],{},"    Plan[plan?]\n",[325,3888,3889],{"class":327,"line":388},[325,3890,3891],{},"    Tasks[tasks · required]\n",[325,3893,3894],{"class":327,"line":394},[325,3895,3896],{},"    Impl[implement · skills ON]\n",[325,3898,3899],{"class":327,"line":399},[325,3900,3901],{},"    Converge[converge?]\n",[325,3903,3904],{"class":327,"line":918},[325,3905,349],{},[325,3907,3908],{"class":327,"line":1379},[325,3909,3910],{},"  Check --> Clarify\n",[325,3912,3913],{"class":327,"line":1385},[325,3914,3915],{},"  Clarify --> Plan\n",[325,3917,3918],{"class":327,"line":1391},[325,3919,3920],{},"  Plan --> Tasks\n",[325,3922,3923],{"class":327,"line":1397},[325,3924,3925],{},"  Tasks --> Impl\n",[325,3927,3928],{"class":327,"line":1403},[325,3929,3930],{},"  Impl --> Converge\n",[325,3932,3933],{"class":327,"line":1409},[325,3934,3935],{},"  Converge --> Update\n",[325,3937,3938],{"class":327,"line":1415},[325,3939,3940],{},"  Update --> Commit\n",[325,3942,3943],{"class":327,"line":1421},[325,3944,3945],{},"  Commit --> Next\n",[119,3947,3949,3955],{"className":3948},[157,158,159],[593,3950,3952],{"id":3951},"_61-multi-agents-in-parallel-orchestrated-not-freestyle",[127,3953,3954],{},"6.1 Multi-agents in parallel — orchestrated, not freestyle",[124,3956,3957],{},[170,3958,3959],{"href":172},[127,3960,175],{},[119,3962,3964],{"className":3963},[122],[124,3965,3966,3967,3970],{},"This project was not “one chat session forever.” Delivery used ",[127,3968,3969],{},"multiple agents working in parallel",", under orchestration:",[201,3972,3974],{"className":3973},[204],[206,3975,3976,3979,3982,3985],{},[209,3977,3978],{},"Different agents on bounded Speckit slices or research tracks (engine, packs, eval, docs)",[209,3980,3981],{},"Shared skills and constitution so they do not invent conflicting product laws",[209,3983,3984],{},"AWP as the outer conductor: what is active, what is next, when docs must match reality",[209,3986,3987,3990],{},[127,3988,3989],{},"Human-approved commits"," as the merge gate — parallel speed without silent ownership transfer",[119,3992,3994],{"className":3993},[312,313],[315,3995,3997],{"className":317,"code":3996,"language":319,"meta":320,"style":320},"flowchart LR\n  AWP[AWP check / next] --> P1[Agent · engine slice]\n  AWP --> P2[Agent · pack / DX]\n  AWP --> P3[Agent · eval / docs]\n  P1 --> R[Review]\n  P2 --> R\n  P3 --> R\n  R --> H[Human-approved commit]\n  H --> N[AWP next]\n",[322,3998,3999,4003,4008,4013,4018,4023,4028,4033,4038],{"__ignoreMap":320},[325,4000,4001],{"class":327,"line":328},[325,4002,331],{},[325,4004,4005],{"class":327,"line":334},[325,4006,4007],{},"  AWP[AWP check / next] --> P1[Agent · engine slice]\n",[325,4009,4010],{"class":327,"line":340},[325,4011,4012],{},"  AWP --> P2[Agent · pack / DX]\n",[325,4014,4015],{"class":327,"line":346},[325,4016,4017],{},"  AWP --> P3[Agent · eval / docs]\n",[325,4019,4020],{"class":327,"line":352},[325,4021,4022],{},"  P1 --> R[Review]\n",[325,4024,4025],{"class":327,"line":358},[325,4026,4027],{},"  P2 --> R\n",[325,4029,4030],{"class":327,"line":364},[325,4031,4032],{},"  P3 --> R\n",[325,4034,4035],{"class":327,"line":370},[325,4036,4037],{},"  R --> H[Human-approved commit]\n",[325,4039,4040],{"class":327,"line":376},[325,4041,4042],{},"  H --> N[AWP next]\n",[119,4044,4046],{"className":4045},[122],[124,4047,4048,4049,4052],{},"That is the same idea as bounded multi-hop inside the product: parallelism and tools are useful; ",[127,4050,4051],{},"orchestration and gates"," are what keep the system reviewable. I use AI assistants to move faster on implementation. People remain accountable for what lands in the repository. That is ordinary engineering ownership, stated explicitly for an AI-assisted workflow.",[119,4054,4056,4062],{"className":4055},[157,158,159],[161,4057,4059],{"id":4058},"_7-what-building-this-demonstrates",[127,4060,4061],{},"7. What building this demonstrates",[124,4063,4064],{},[170,4065,4066],{"href":172},[127,4067,175],{},[119,4069,4071],{"className":4070},[122],[124,4072,4073,4074,4077],{},"Not a scorecard — a reading guide for the design choices. Building rag-factory is a portfolio of ",[127,4075,4076],{},"judgment under constraints",": trust, eval, multi-surface APIs, on-prem posture, and agentic delivery.",[201,4079,4081],{"className":4080},[204],[206,4082,4083,4089,4097,4103,4109,4115,4121],{},[209,4084,4085,4088],{},[127,4086,4087],{},"Systems / product"," — Layer A/B split; recipe + packs; one engine path; decline-capable defaults",[209,4090,4091,2735,4094,4096],{},[127,4092,4093],{},"Rust backend",[322,4095,3053],{}," + thin CLI; trait backends; Cargo feature gates; mock CI",[209,4098,4099,4102],{},[127,4100,4101],{},"RAG craft"," — types analysed up front (docs / code / policy + dense·hybrid·conversational·multimodal·multi-hop·structured); build provenance; dense-first; grounded generate; eval as a verb",[209,4104,4105,4108],{},[127,4106,4107],{},"Security / ops / cost awareness"," — env-name secrets; redaction; request ids; budget / chaos / red-team fixture mindset",[209,4110,4111,4114],{},[127,4112,4113],{},"Agentic SDLC"," — parallel multi-agents under AWP orchestration; Speckit slices through front UI; human commit gate; skills + journal so decisions survive chat sessions",[209,4116,4117,4120],{},[127,4118,4119],{},"On-prem posture"," — local binary + local index + in-network models (Ollama / compatible) when policy requires",[209,4122,4123,4126],{},[127,4124,4125],{},"Honesty"," — clear fit and non-fit; shipped vs roadmap separated on purpose; RAG types analysed before over-claiming one stack",[119,4128,4130],{"className":4129},[122],[124,4131,4132,4133,4136],{},"If you only ask a few questions in a review: ",[132,4134,4135],{},"Which RAG types shaped the packs? Why decline instead of always answering? Why Rust for the engine and on-prem HTTP for models? How do parallel agents stay orchestrated?"," — those answers are the spine of the project.",[119,4138,4140,4146],{"className":4139},[157,158,159],[161,4141,4143],{"id":4142},"_8-future-sharper-factory-same-laws",[127,4144,4145],{},"8. Future — sharper factory, same laws",[124,4147,4148],{},[170,4149,4150],{"href":172},[127,4151,175],{},[119,4153,4155],{"className":4154},[122],[124,4156,4157],{},"Much of the Speckit roadmap is already landed as engineering slices: native stores, hybrid/rerank, connectors, conversational/streaming, multimodal/multi-hop/structured slices, HTTP serve, control-plane docs, observability, browser UI on serve, FinOps/chaos/red-team fixtures, and related surfaces.",[119,4159,4161],{"className":4160},[122],[124,4162,4163],{},"“Landed” means the slice shipped with tasks and product honesty — not that every research ambition is finished.",[119,4165,4167],{"className":4166},[122],[124,4168,4169],{},"Near-term deepening stays practical:",[201,4171,4173],{"className":4172},[204],[206,4174,4175,4182,4189,4196,4203,4210,4217],{},[209,4176,4177,4178,4181],{},"Fuller ",[127,4179,4180],{},"OpenTelemetry"," export on top of stage logs and request ids",[209,4183,4184,4185,4188],{},"Stronger ",[127,4186,4187],{},"multimodal"," paths for real PDF/figure corpora",[209,4190,4191,4192,4195],{},"Bounded ",[127,4193,4194],{},"iterative tool use"," under allowlists and budgets",[209,4197,4198,4199,4202],{},"Learned ",[127,4200,4201],{},"query rewrite"," only behind eval (so Hit@k cannot silently regress)",[209,4204,4205,4206,4209],{},"Durable ",[127,4207,4208],{},"tenancy and retention"," where window memory is only a start",[209,4211,4212,4213,4216],{},"More ",[127,4214,4215],{},"connector vendors"," once the Git pattern is proven",[209,4218,4219,4220,4223],{},"Richer ",[127,4221,4222],{},"Layer B / front-assistant policy"," inside the product UI",[119,4225,4227],{"className":4226},[122],[124,4228,4229],{},"Architecture trajectory does not renegotiate the laws: same Answer JSON on new surfaces; pack economy over forks; stronger control plane; eval as platform; cost as a first-class signal.",[119,4231,4233],{"className":4232},[122],[124,4234,4235,4236],{},"Strategic options exist (open-core + private packs/evals, hosted “factory” API, vertical packs for regulated industries, embed as library in others’ agents). Not all must ship. The filter is simple: ",[127,4237,4238],{},"growth that weakens cite-or-decline or eval-before-ship is not progress.",[119,4240,4242],{"className":4241},[122],[124,4243,4244,4245,4248],{},"rag-factory’s future is not “more chatbot.” It is a ",[127,4246,4247],{},"sharper factory",": more connectors, deeper multimodal, better traces, stricter control planes — still measured, still refuse-capable, still delivered under Speckit + AWP so agents scale the work without owning the product.",[119,4250,4252,4258],{"className":4251},[157,158,159],[161,4253,4255],{"id":4254},"_9-one-pager-close",[127,4256,4257],{},"9. One-pager close",[124,4259,4260],{},[170,4261,4262],{"href":172},[127,4263,175],{},[119,4265,4267],{"className":4266},[122],[124,4268,4269,4271],{},[127,4270,2005],{}," is a config-driven RAG factory in Rust: shaped by analysing docs, code, policy, hybrid, conversational, multimodal, multi-hop, and structured RAG patterns; shared engine and domain packs; structured answers with citations; optional decline when evidence is weak; CI-friendly evaluation; on-premises-friendly binary and local models; delivery via orchestrated parallel agents under Speckit + AWP with human-approved commits.",[119,4273,4275],{"className":4274},[122],[124,4276,4277],{},"It is designed to sit beside existing model vendors — or fully inside your network — plus existing CI and review culture. A calm piece of infrastructure, not a leap of faith.",[119,4279,4281],{"className":4280},[122],[124,4282,4283],{},"Share the plumbing. Specialize the knobs. Measure before you call it done.",[119,4285,4287],{"className":4286},[122],[124,4288,4289],{},[127,4290,4291],{},"Cite when you can. Decline when you can’t. Eval before you ship.",[119,4293,4295],{"className":4294},[406,407,313],[409,4296],{"alt":4297,"caption":4298,"detail":4299,"src":2039,"tags":4300,"title":4301},"rag-factory brand mark repeated as closing visual — cite or refuse","Close — Cite when you can. Decline when you can’t. Eval before you ship.","Closing reminder of the product line: cite what you use, or refuse when evidence isn’t there.","brand, close, cite, refuse","Close · cite or refuse",[119,4303,4305],{"className":4304},[1890,1891,1892,1893],[124,4306,4307],{},[170,4308,4309],{"href":172},[127,4310,175],{},[1901,4312,4313],{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"title":320,"searchDepth":334,"depth":334,"links":4315},[4316,4317,4318,4321,4322,4330,4333,4334,4335],{"id":2063,"depth":334,"text":2066},{"id":2313,"depth":334,"text":2316},{"id":2523,"depth":334,"text":2526,"children":4319},[4320],{"id":2670,"depth":340,"text":2673},{"id":2792,"depth":334,"text":2795},{"id":2943,"depth":334,"text":2946,"children":4323},[4324,4325,4326,4327,4328,4329],{"id":2958,"depth":340,"text":2961},{"id":3020,"depth":340,"text":3023},{"id":3128,"depth":340,"text":3131},{"id":3342,"depth":340,"text":3345},{"id":3504,"depth":340,"text":3507},{"id":3714,"depth":340,"text":3717},{"id":3747,"depth":334,"text":3750,"children":4331},[4332],{"id":3951,"depth":340,"text":3954},{"id":4058,"depth":334,"text":4061},{"id":4142,"depth":334,"text":4145},{"id":4254,"depth":334,"text":4257},"2026-11-02","Full arc: RAG types analysed, on-premises-ready Rust engine, Layer A/B architecture, Speckit + AWP with parallel agents orchestrated under human commits — cite, refuse, eval before ship.",{"src":2039},{},{"title":27,"description":4337},"BkXh010bGPpp41-RN5JmM3VBgy9zyFFE3jO3Q7VFF5o",1794268626162]