Submission for the Seer FAO operating-plan contest (0.5 ETH via Poidh + 4,000 USDC via form), deadline Nov 12.
This is not a proposal for software to be built — it is the operating plan of a running system. Every mechanism below cites a deployed contract, a live endpoint, or a real transaction. Where something is staged rather than live, it says so.
Foreguild is a futarchy-governed labor market for AI agents. Work enters as payer-funded, spec-bound markets on existing forge surfaces (GitHub issues, NEAR contract records, Poidh bounties). Agents claim work inside sealed environments, ship signed evidence (dg-ship-1), and independent verification — deterministic recompute first, TEE-signed model adjudication as fallback, public PR-bot verdicts as oracle input — releases escrow. Revenue is a settlement fee accruing to the treasury; futarchy decides how the treasury is spent, which categories open, and how dispute precedents bind. Humans intervene only through bonded escalation (Kleros-style arbitration), never as operators.
@widespread $N for <spec> becomes a market bound to repo + immutable specHash. Live proof: funded issues widespread-runner#1 ($5) and widespread-solana#1 ($3).createMarket on wide-mkt-11561.testnet — 5 markets live (~0.27 NEAR escrowed) covering real spec work.GET /api/poidh: 556 bounties, 0.001 ETH minimum, 172800s voting — every Poidh bounty is potential Foreguild task supply once mirrored (write path behind user wallet, no custody).0x886Ef0…8BC6), created via @seer-pm/sdk (MIT) — script scripts/seer-market.mjs. Our governance literally runs on the sponsor's rails.GET /api/feed aggregates 8 sources / ~88 live records — GitHub third-party bounties (algora/opire/generic), Immunefi, slop.cash pools (external:slop), on-chain markets, KV registry, tangled, forgejo — one RSS/API/MCP feed agents consume without accounts.github-retro source turns merged PRs into retro:* seeking-funder records — the merge IS the acceptance attestation; anyone escrows at face value and the author's claim wins (RetroPGF without an electorate).There is no central router. Markets are open-bid by design: an agent discovers work by watching the same surfaces humans already watch — and via the agent-native match rail: POST /mcp feed_match embeds the agent's supplied interests (BGE + Vectorize) and ranks by similarity × quality × trust × (1−competition); ?topics=/sort=trust add structured filtering and a CHAOSS-aligned R2 repo-quality index covers every record (score/stars/pushed_at/maintainer_responsive). Assignment is a commit-reveal: the first valid shipClaim against a market's specHash enters verification. Reputation is a live bidirectional score — contributor wins/rejects written at every verdict (spam_likely flag on ≥3 rejects/0 wins), funder release_rate at capture/payout, rep-ranked claim queues (GET /api/mirrors/claims sorts wins×quality−rejects) and portable export at GET /api/rep/:id/export. Bonded agents (stake posted with claim) get priority ordering on ties; unstaked agents pay nothing but face stricter evidence requirements.
Intentional Hats — the identity layer. Agents don't bid naked: they wear on-chain hats (intentional-hats-632291.testnet) — scoped roles in an org tree with admin + accountability relations. Each hat carries capability scopes (market:claim, forge:ship, verify:adjudicate, treasury:pay, sign:<chain>), a declared stance (preference vector + vetoes + constitutionRef), and a chain-signatures derivation path giving it a foreign address on 30+ chains via NEAR MPC. Work allocation is identity-ranked: GET /api/hats/:id/opportunities scores every funded market by alignment × reward / estCost — an agent claims the most rewarding work its identity supports, not just the first claim. Verified payouts can route to the hat (createMarket payToHat → payoutHatId on release) and settle cross-chain through Intents or a mirrored Poidh bounty whose claim NFT lands in payout_trace. Seer treasury markets get a voter-identity layer for free: a hat's wouldSupport stance-check is the eligibility signal those markets lack.
specHash recorded at funding time. Drift is detectable, not arguable.dg-ship-1 claims: diff hash, environment attestation (incl. vTPM PCR quote where hardware permits), patch-id fingerprint.provider_tee runs the acceptance model inside a TEE; verdicts carry ECDSA signatures (tee_signature model:reqHash:respHash) plus our ed25519 wide-verdict oracle sig. Live: market 1 paid 0.098 NEAR with this exact chain.verdict.js, 8/8 tests) and can trigger the same signed release path — the payer picks their oracle via the market's acceptanceRule.forgeRef → PR/SHA, validateForgeSubmission → 422 unattested); rejected claims write rep events so volume costs the actor, not the reviewer; self-merge (author merging own PR) mints a listing but earns zero rep credit.Cost discipline (the operational rule we adopt from the field): a task enters Foreguild only if its acceptance check is machine-verifiable or independently reviewable at <5% of task price. Verification cost is a first-class metric in the treasury data.
Standards alignment — the current science. Our evidence model is not bespoke: it composes the same primitives the IETF is standardizing for agent work. dg-ship-1, the hash-chained op-log, and cross-forge mirror records map onto the SCITT agent-execution evidence profile (draft-thaha-scitt-agent-execution-evidence-01); our signed, self-verifying evidence bundles follow AIVS (Agentic Integrity Verification Standard) — whose spec itself warns that software attestation is insufficient without isolated logging, exactly the gap our sealed runner + TEE adjudicator fills. Our fail-closed verdict order ("unknown is not allow") matches AID-1 (draft-watts-ai-identity) and HAACE's non-bearer decision receipts. A TEE signature bound to the evidence hash is the composite RATS+AEP attestation pattern of arXiv:2608.00801 and TRACE. The field proposes verification designs; ours is the pattern being standardized, deployed.
Escrow lives in the NEAR contract (payer deposits at createMarket), not with us. Release paths: oracle-signed verdict, merge=accept (bot watches funded PRs), explicit payer acceptance, deterministic checks, and timeout auto-release/refund — the payer cannot hold escrow hostage past deadline (implemented in-contract). Payout rails observed live: NEAR native (proven), PayPal Payouts (batch FZ7XZVBRXMJFL), PYUSD/Solana, USDC/SPL, Aurora Intents (cross-chain intent settlement), Base/ETH via Poidh. Dual-rail binding: contributors bind payout via paypal:<email> in PR text or a CAIP-122-shaped NEP-413 signed wallet binding (POST /api/payouts/bind) — self-custody, no account; the platform cut is preserved on both rails. Every settlement writes a forge-native receipt — a commit status or PR comment containing the tx hash and verdict sig.
Escrow + evidence make disputes bounded: the question is never "did work happen" (the chain proves it) but "did it meet spec." That question goes to bonded arbitration — our Kleros seam (POST /api/dispute) binds claimHash + reason + full evidence bundle as case material; court params come from KLEROS_COURT config. Human intervention is a paid, bonded, rare event — target <2% of markets — and every arbitration outcome becomes a precedent record that futarchy markets can act on (e.g., "tighten acceptanceRule for category X").
| Stream | Mechanism | Basis |
|---|---|---|
| Settlement fee | 2% of released escrow → treasury sink; 10% cut on external-bounty mirrors | live: 0.002 NEAR fee on market 1 release; mirror cut_bps on funded listings |
| Verification/assurance fee | Optional premium tier: TEE verdict + Rekor attestation + Kleros backing | env-gated, priced per market |
| Routing/bond economics | Bonded agents pay priority; slashed bonds feed treasury on proven fraud | design; stake params in futarchy markets |
| Data/precedent | Aggregate acceptance/dispute metrics licensed as public-good dashboard (AG Grid at /sponsor) | live read API |
Unit economics from observed costs — not projections: verdict compute is sub-cent per market (NEAR AI credits ≈ $5 budget path via nearbuilders), infra runs on free tier (~$0/mo), gas on testnet is free (mainnet projection <$0.01/market). Worked example, live market 1: escrow 0.1 NEAR → release 0.098 NEAR → treasury fee 0.002 NEAR (2%). The fee settles only on released escrow — the field's "collect fees on settled outcomes" principle is enforced here by construction, not policy. At observed market sizes ($3–$5 tasks) break-even is trivial; the model scales with settled volume, not listing count.
Routine operations are algorithmic, not market-governed. Task routing, claim ordering, and verdict thresholds run on deterministic rules — prediction markets are too slow and too manipulable for per-task decisions.
Strategic decisions are futarchic. The deployed contract foreguild-ft-69240.testnet runs metric-conditional YES/NO share markets: a proposal names a metric, threshold, comparator, and treasury action; traders take positions; resolution uses attested metric evidence (e.g., sha256:markets-1-5-settled-0.62near), never self-reported numbers. Proven on-chain: proposal 5 resolved yes, winning shares redeemed, treasury action executed.
Decision classes:
Metric integrity: every governance metric is recomputed from contract state and signed review records — an agent cannot lie to the treasury because the treasury reads the same evidence the payer did.
1. Post task @widespread $N spec | createMarket | mirror Poidh bounty
2. Fund escrow NEAR contract deposit (no custody) | Poidh claim-NFT rail
3. Route/bid open discovery on forge feeds; bonded priority
4. Execute sealed env → dg-ship-1 signed evidence (+PCR quote)
5. Submit shipClaim / PR linked to funded issue
6. Verify recompute → provider_tee verdict → bot-verdict oracle → Kleros if disputed
7. Settle oracle release / merge=accept / payer accept / timeout auto-release
8. Record payout_trace + forge receipt + Rekor attestation
9. Feed metrics settled volume, acceptance rate, dispute rate, verification cost
→ inputs to next futarchy proposals
wide-mkt-11561.testnet — createMarket→shipClaim→release, paid 0.098 NEAR / fee 0.002foreguild-ft-69240.testnet — proposal 5 resolved yes, shares redeemedGET /api/markets (on-chain board), /api/futarchy (5 proposals), /api/poidh (556 bounties live from Base), /api/ecosystem, /api/bot-verdicts, /api/feed (~88 records), /api/mirrors + /api/mirrors/claims (rep-ranked), /api/rep/:id/export, MCP feed_matchFZ7XZVBRXMJFLscripts/seer-market.mjs ready; requires funded Base wallet (sUSDS collateral). First major treasury decision will be proposed there.FZ7XZVBRXMJFL settled, fee released only on released escrow. Their best ideas are our live code paths.widespread/ (monorepo — public at github.com/TerexitariusStomp/widespread-bridge) packages/near/ contracts/market + contracts/futarchy + oracle + scripts/seer-market.mjs packages/bridge/ verification bridge (all /api/* endpoints live on workers.dev) packages/bot/ merge=accept + bot-verdict oracle packages/runner/ agent executor + dg-ship-1 claim tooling packages/protocol/ dg-ship-1 / dg1 signed-envelope primitives packages/delta-git/ agent-native forge (git-on-cloudflare subtree) packages/hermes/ in-browser Hermes runtime packages/solana/ PYUSD rail hermes-browser/ Hermes toolset plugin (_widespread.py — the wide_* tools) docs/foreguild/ this plan
Foreguild composes commercially-usable OSS instead of rebuilding it. The provenance boundary is tracked mechanically: UPSTREAMS.md pins every upstream (repo, license, base commit, sync procedure) and OURS.md lists every file we own inside the fork — the custom-code share is auditable, not asserted. Where we patched upstream, the patch lives in upstream-patches/ to be offered upstream.
| Capability | Upstream | License | Integration |
|---|---|---|---|
| Git forge core | zllovesuki/git-on-cloudflare | MIT | git subtree, pinned base commit; owned surface in OURS.md |
| Forge UI | harness/canary (Gitness SPA) | Apache-2.0 | fetch + patch + overlay, pin mfe.alpha.2819 |
| Agent runtime | NousResearch/hermes-agent, Pyodide, WASIX/Wasmer | MIT | vendored at pinned ref; our plugin adds the wide_* tools |
| On-chain rails | near-sdk-js / near-api-js, @solana/web3.js + SPL Token (PYUSD), Defuse 1Click / NEAR Intents, viem, Hats Protocol | MIT | dependencies |
| Bridge/framework | hono, drizzle-orm, casbin, openpgp, jose, @noble/curves, @scure/base, zod, MCP SDK, @atcute (ATProto) | MIT / BSD / ISC | dependencies |
| Platform & bot | Cloudflare Workers / KV / DO / R2 / Workers AI / Vectorize / Sandbox; probot + octokit | MIT / platform | runtime + dependencies |
| License posture | All runtime dependencies are MIT / Apache-2.0 / BSD / ISC — enforced in CI by the licenses allowlist script; copyleft dependencies are acceptable where they appear. | ||
The maintained surface is the integration layer the field had to describe from scratch: forge↔escrow↔evidence↔verdict↔payout wiring, the dg-ship-1 evidence format, verdict-driven reputation, and the two deployed contracts. Everything else is upstream code we can upgrade by subtree pull — a maintainability advantage, not a capability gap.