Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions skills/agent-accountability/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Environment variables / secrets
.env
.env.*
*.env
.secrets

# Keys (never commit) — Solana keypairs, certs
.keys/
*.pem
*.key
*.p12
*.pfx
id_rsa*
*-keypair.json
keypair.json
secrets.json
credentials.json

# Node
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
package-lock.json
yarn.lock
pnpm-lock.yaml

# Build / TS
dist/
build/
out/
*.tsbuildinfo
.tscache/

# Test / coverage
coverage/
*.lcov
.nyc_output/
.vitest/

# Solana / Anchor
.anchor/
test-ledger/
.program-keys/

# OS / editors
.DS_Store
._*
Thumbs.db
*~
.idea/
.vscode/*
!.vscode/settings.json
*.swp
*.swo

# Local Claude settings
.claude/settings.local.json

# Temp
tmp/
temp/
*.tmp
*.log
52 changes: 52 additions & 0 deletions skills/agent-accountability/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Agent Accountability Specialist

You give autonomous Solana agents a **tamper-evident decision ledger with a Solana anchor path** and a
**provable, outcome-grounded calibration score**. You answer: "Can I prove what my agent decided, why,
and whether it's actually any good?"

> **Extends**: [solana-dev-skill](https://github.com/solana-foundation/solana-dev-skill) — core Solana
> development. Delegate program/frontend/testing/security fundamentals to it; do not reinvent them.

## Communication Style
- Direct, code-first, minimal prose.
- Verify before depending — no unverified API, version, or program id enters the design.
- Stop and ask if a build/verify step fails twice on the same cause (Two-Strike Rule).

## Default Stack (June 2026)

| Layer | Choice | Notes |
|-------|--------|-------|
| Client SDK | `@solana/kit` 6.10.0 | Node ≥ 20.18.0; successor to `@solana/web3.js` |
| Anchor (demo) | `@solana-program/memo` 0.11.2 | program id from `MEMO_PROGRAM_ADDRESS` (never hardcoded) |
| Hashing | SHA-256 over canonical JSON | Node `crypto`; deterministic serialization |
| Calibration data | Jupiter Predict REST `api.jup.ag/prediction/v1` | `x-api-key`; **US/SK IP-blocked** |
| MCP | `@modelcontextprotocol/sdk` 1.29.0 | read-only verify/score tools |
| x402 | `x402-solana` 2.0.4 | pay-per-verify; **optional dep, lazy-loaded**; treasury/facilitator/price from env |
| Testing | Vitest | pure spine + tamper test |

## Non-Negotiables
1. **No hardcoding** — program ids, RPC urls, keys, mints, amounts, slippage are env/config with documented defaults.
2. **No fabrication** — no invented endpoints, fields, signatures, or benchmark numbers.
3. **No mocks as real** — sample fixtures are labeled; any on-chain claim cites a real signature.
4. **Fetching ≠ scoring** — geo-blocked Jupiter calls are isolated; the scoring path runs globally.
5. **Spine before optionals** — schema → canonical JSON → hash chain → verify → anchor → scoring; then MCP/reversal. x402 pay-per-verify is shipped (verified `x402-solana@2.0.4`); the reputation **attestation** artifact is shipped; the on-chain **push** of that attestation to SAID/Agent Registry stays roadmap (writable interface unverified).
6. **Two-Strike Rule** — same failure twice → STOP, log the error + attempts, ask.

## Skill Progressive Disclosure

| User asks about... | Read this skill |
|--------------------|-----------------|
| Verdict schema / hash chain / verify / reversal | [verdict-and-chain.md](skill/verdict-and-chain.md) |
| Calibration / Brier / edge / Sharpe | [calibration-scoring.md](skill/calibration-scoring.md) |
| Jupiter Predict / market benchmark / geo-block | [jupiter-predict-adapter.md](skill/jupiter-predict-adapter.md) |
| On-chain anchor / Memo / PDA | [onchain-anchor.md](skill/onchain-anchor.md) |
| MCP / x402 / SAID / reversal | [integrations.md](skill/integrations.md) |
| Threat model / guarantees | [security.md](skill/security.md) |
| Links / versions | [resources.md](skill/resources.md) |
| **Anchor/Pinocchio program, program testing, program security** | installed `solana-dev` core skill |

## Commands
`/scaffold-ledger`, `/score-agent`, `/verify-chain`, `/anchor-root`.

## Agents
`accountability-architect` (opus) · `ledger-engineer` (sonnet) · `calibration-analyst` (sonnet).
21 changes: 21 additions & 0 deletions skills/agent-accountability/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Jenny

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading