Skip to content

feat: agent discovery docs and cast-based pact skill - #68

Merged
r0ohafza merged 6 commits into
mainfrom
feat/agent-discovery
Aug 25, 2026
Merged

feat: agent discovery docs and cast-based pact skill#68
r0ohafza merged 6 commits into
mainfrom
feat/agent-discovery

Conversation

@r0ohafza

@r0ohafza r0ohafza commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Scaled-down extraction of #67: keeps discovery only. #67 stays open as the full CLI / MCP / generated-skills reference.

What's in

  • NatSpec pass on the contracts (no ABI or bytecode change).
  • docs/integrate.md direct-call guide; prebuild renders /llms.txt, /.well-known/pact.json, and /docs/*.md from the generated contract pin (build fails if a landing doc carries a different factory address).
  • skills/pact: one knowledge skill (SKILL.md + references/vouchers.md) that gives an agent the protocol model, lifecycle table, safety rails, and cast commands for every read and write, including EIP-712 voucher issue and claim via cast wallet sign --data. Install: npx skills add 0xSplits/pact.

What's deliberately out (see #67)

packages/pact CLI, MCP server, generated command skills, packages/core extraction, the CLI e2e.

Validation

  • npm run typecheck
  • npm test (84)
  • oxlint, prettier
  • npm run discovery output inspected
  • Skill recipes exercised end to end on anvil by a fresh agent given only the skill (create → verify → public buy → voucher issue → private claim → withdraw); the four recipes that failed verbatim were fixed in 256140b. Not in CI.

Every public/external function now carries @param/@return, and the getters
agents poll (state, minMet, raised, publicUnits, unitsSold, deposits,
allocationConsumed) carry @notice. No ABI change; userdoc/devdoc reach
explorers on the next instance verification.
…n block

Adds docs/integrate.md as the canonical direct-call guide and a prebuild
step that renders /llms.txt, /.well-known/pact.json, and markdown mirrors
under /docs/ from the generated contract pin, failing the build if a
landing doc carries a different factory address. Per-page OG descriptions.
Discovery surfaces point at skills/pact, a single knowledge skill that
gives an agent the protocol model, lifecycle, safety rails, and cast
commands for every read and write, including EIP-712 voucher issue and
claim. No CLI or MCP server; the contracts are the interface.
@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pact Ready Ready Preview Aug 25, 2026 10:02pm

Request Review

…y recipe order

Simulate buyPublic after the approve lands (before, it always reverts on
allowance). Addresses live once, in the env block.
Reuse quoted amounts via cast --to-dec (typed output carries a [1e8]
annotation), decode revert selectors with cast decode-error, BSD-safe tr
and padded base64 in the link codec, jq path for the new offering address.
@r0ohafza
r0ohafza merged commit 958e6f2 into main Aug 25, 2026
5 checks passed
@r0ohafza
r0ohafza deleted the feat/agent-discovery branch August 25, 2026 22:23
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.

1 participant