Skip to content

feat: Poa DAO agent — task tools, participation, governance, confirmation & steward#4

Open
RonTuretzky wants to merge 2 commits into
mainfrom
poa-tool-integration
Open

feat: Poa DAO agent — task tools, participation, governance, confirmation & steward#4
RonTuretzky wants to merge 2 commits into
mainfrom
poa-tool-integration

Conversation

@RonTuretzky

@RonTuretzky RonTuretzky commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Makes the TEE Signal bot a governance-hireable member of a Poa DAO. The bot's signing wallet is derived inside the enclave (dstack) — no key leaves the TEE — reusing the x402-payments pattern.

Capabilities (crates/poa-tools)

Read (everyone when enabled, via the Poa subgraph): projects, tasks, proposals, wallet info.

Write (allowlisted operators only; on-chain calls to the org's contracts):

  • task authoring — create / update / assign / complete / reject / cancel task
  • participation — claim / submit / apply → the bot does work and earns participation tokens
  • governance — create NON-executable polls, vote (HybridVoting)

Safety (defense in depth)

  1. TOOLS__POA__ENABLED master switch (off by default).
  2. TOOLS__POA__ENABLE_WRITES — write tools aren't registered otherwise.
  3. TOOLS__POA__AUTHORIZED_SENDERS allowlist — write tools only offered to / executed for allowlisted Signal senders (keyed off the individual sender, even in groups; enforced at offer-time in the registry and in the executor).
  4. Confirmation — value-moving actions (poa_complete_task, which mints a payout) are staged and require a deterministic !poa-confirm <code> reply from the same sender. The LLM cannot self-confirm.
  5. On-chain: a write only lands if the wallet holds the right TaskManager / voting permission.

Autonomy

Board steward — an optional read-only background loop that scans the board and posts a digest of expired / at-risk claims to a Signal group. Never sends transactions.

Shared tools crate additions (backward compatible)

ToolContext, Tool::execute_ctx / requires_authorization / requires_confirmation / timeout_override, ToolRegistry::get_definitions_authorized, ToolExecutor::execute_ctx, and a ConfirmationStore.

Testing

  • cargo build (whole workspace) clean.
  • cargo test -p poa-tools -p tools -p signal-bot all pass (subgraph parsing via wiremock; units, tool split, confirmation store, steward scan, vote-weight split unit-tested).
  • clippy clean on touched crates; poa-tools is cargo fmt clean; edits to existing files kept minimal (no repo-wide reformat).

On-chain senders are thin alloy sol! wrappers, meant to be exercised end-to-end against a testnet Poa org (Gnosis) rather than in unit tests.

Poa-side (contracts repo)

Granting the bot its permissions — and the endgame: TEEAgentEligibilityModule, which binds a Hats role to an attested enclave measurement so upgrading the bot's code is a governance event — is documented in the macau-v6 contracts repo (docs/SIGSTACK_BOT_INTEGRATION.md, docs/TEE_AGENT_ELIGIBILITY.md).

🤖 Generated with Claude Code

Add a poa-tools crate letting the bot read a Poa DAO org's projects/tasks
(via the subgraph) and, for authorized operators, create/update/assign/
complete/reject/cancel tasks on-chain against the org's TaskManager. The
signing wallet is derived inside the TEE (dstack) by default.

Tools crate gains Tool::requires_authorization() + timeout_override(),
ToolRegistry::get_definitions_authorized() and
ToolExecutor::execute_authorized() to gate privileged tools. signal-bot
gains PoaConfig, register_poa_tools() and a per-sender ToolAuthorization
gate on ChatHandler.

Config under TOOLS__POA__*; see docs/poa-integration.md.
Stage 2 of the Poa agent: the bot becomes a full org member, not just a
task scribe.

- Participation tools (claim/submit/apply) so the bot can do work and earn PT.
- Governance tools: list proposals, create NON-executable polls, vote.
- Value-moving actions (complete_task) now require a deterministic
  !poa-confirm <code> second step — the LLM cannot self-confirm. Backed by a
  new tools::ConfirmationStore + ToolContext threaded through the executor.
- Autonomous board steward: a read-only background loop posting a digest of
  expired/at-risk claims to a Signal target.

tools crate: adds ToolContext, Tool::execute_ctx/requires_confirmation, and
ConfirmationStore. Config under TOOLS__POA__* (voting contract, confirm TTL,
steward). All new code unit-tested, clippy- and fmt-clean.
@RonTuretzky RonTuretzky changed the title feat: Poa DAO task tools (read + gated on-chain writes) feat: Poa DAO agent — task tools, participation, governance, confirmation & steward Jul 7, 2026
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