Skip to content

Centralize the shared BYOS specification - #1

Merged
jean-neiverth merged 8 commits into
mainfrom
pedro/cow-1119-refactor-design-document-subsolver-guide
Aug 12, 2026
Merged

Centralize the shared BYOS specification#1
jean-neiverth merged 8 commits into
mainfrom
pedro/cow-1119-refactor-design-document-subsolver-guide

Conversation

@yvesfracari

Copy link
Copy Markdown
Contributor

BYOS documentation was spread across three repos with no owner. cow-solver-slashing-policy.md was byte-identical in all three; solver-auctions.md and solver-cips.md in two. Both CONTEXT.md files defined the same ~13 domain terms, along with an identical "What BYOS is" paragraph and Track A/B risk table. Worse, one decision had two hand-maintained homes: byos-service ADR-0003 says outright that byos-contracts ADR-0004 is "a contract-scoped extract of the same decision". Those two have not drifted yet, which is the only reason this merge is mechanical rather than an adjudication, and that window will not stay open. Meanwhile order-flow.md lived in the contracts repo despite its first actor being the BYOS driver, and a TypeScript service now exists as a second consumer of everything the Rust one depends on.

This repo becomes the single normative home for anything that constrains more than one implementation or that a reader outside bleu needs. design-document.md is that specification, extracted from the live ADRs; its "Citable sections" table is a stable anchor API that implementation-repo ADRs will cite instead of restating, so each ADR shrinks to the rationale only it owns. Section numbers are deliberately absent from headings, and slugs come from heading text rather than {#custom} syntax, because that syntax renders as literal text on GitHub and citations have to resolve both from the site and from the docs/shared/ submodule. glossary.md takes over the shared vocabulary; the reference docs, the isolation proof, and the SLO half of metrics-reasoning.md move in. The cost and revenue half of that file stays out, since it carries bleu's internal dev rate and per-solver revenue comparables that do not belong in an auditor-facing repo. Reviewers should look hardest at the implementation status table in the design document: those cells are inferred from the ADRs rather than read off the code, and byos-service marked partial on escrow and penalties is the weakest claim. Nothing has changed in the three implementation repos yet; adding the submodule and trimming their ADRs is the follow-up.

VitePress on GitHub Pages, with mermaid for the settlement sequence diagrams and
a local search index. Dead links fail the build: an ADR in an implementation
repo that cites a section which no longer exists must break CI here rather than
rot silently.

scripts/gen-llms.ts emits llms.txt, llms-full.txt, and a raw markdown mirror of
every page, so an agent fetching design-document.md gets markdown rather than a
parsed-out article.
design-document.md is normative and monolithic, extracted from the live ADRs in
byos-contracts and byos-service. Its "Citable sections" table is the interface
that implementation-repo ADRs cite; anchors there are stable, and heading text
may only be reworded in ways that preserve them. Section numbers are
deliberately absent so inserting a section invalidates nothing.

glossary.md merges the ~13 terms that byos-contracts/CONTEXT.md and
byos-service/CONTEXT.md both defined, along with the "What BYOS is" paragraph
and the Track A/B table that were byte-identical in each. Those files keep only
what is local to them.

The sub-solver guide carries sequence and gotchas only. Every field name,
amount, and signature shape links into the design document or the OpenAPI
document instead of being repeated.
…e implementation repos

cow-solver-slashing-policy.md was byte-identical in three repos;
solver-auctions.md and solver-cips.md in two. cow-fee-collection.md and the
trampoline isolation proof lived only in byos-contracts despite both halves
depending on them. Relative links that pointed at contract-side ADRs now point
at design-document anchors.

operations/slo-targets.md is the latency half of byos-service's
metrics-reasoning.md. The cost and revenue half stays out: it carries bleu's
internal dev rate, infra cost basis, and per-solver revenue comparables, which
do not belong in an auditor- and sub-solver-facing repo.
@linear-code

linear-code Bot commented Aug 11, 2026

Copy link
Copy Markdown

COW-1119

jean-neiverth and others added 5 commits August 11, 2026 13:23
…nd enhance subsolver guide

- Add overview.md: problem statement (solver onboarding barrier), before/after
  contrast, how BYOS works, revenue model, consolidated rejection reasons,
  slashing policy summary
- Add contracts.md: Escrow/Trampoline/TrampolineFactory interfaces (functions,
  events, errors), how BYOS interacts with each, key design decisions from
  contracts ADRs
- Add service.md: two-listener model, async validation loop, proposal lifecycle,
  scoring, gas cut, persistence model, key design decisions from service ADRs
- Enhance sub-solver integration guide: add explicit responsibility framing,
  API endpoint summary table, TypeScript reference implementation
- Update vitepress sidebar/nav and README entry points
Cut triads, contrastive "X, not Y" padding, self-defending justifications,
narrative flourishes, and unnecessary qualifiers. No facts removed.
…ysis-v2

docs: add overview, contracts reference, service architecture pages

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk: medium. Approved — Cursor Bugbot and Cursor Security Agent were not present after the initial check poll, so those signals were skipped; no applicable approval policy required human review. No reviewers assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@jean-neiverth
jean-neiverth merged commit 61e147f into main Aug 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants