Index of every page on this site: llms.txt
All skills
ucsandman avatar

/muse-governance

@9e1a97f
Run it yourself

Governance behavior for Muse agents governed by DashClaw. Teaches the governance protocol over REST: when to call guard, how to interpret allow/warn/block/require_approval, recording actions and outcomes, plan-first execution with preflight approval, and waiting for human review. Trigger on: governed agent, dashclaw governance, guard policy, approval wait, plan authorization, action recording, risk threshold.

Use this Skill: https://skilld.dev/gh/ucsandman/dashclaw-skills/muse-governance

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesgovernance-patterns.md

≈1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Governance patterns (REST)

Base URL and auth are runtime-specific; every example below assumes BASE is your DashClaw instance and the request carries your credential (see the Credential hygiene section in SKILL.md). The dc reference CLI from the integration guide wraps these calls when your runtime supports it.

1. Guard before a risky act

curl -s -X POST "$BASE/api/guard?record=true" \
  -H 'Content-Type: application/json' \
  -d '{
    "action_type": "shell",
    "declared_goal": "Restart the staging API after config change",
    "agent_id": "my-agent",
    "agent_name": "My Agent",
    "systems_touched": ["staging"],
    "reversible": false,
    "confidence": 80
  }'

Decision lattice: allow < warn < allow_contained < require_approval < block. With ?record=true, use the returned action_id for everything downstream.

Or with the CLI:

dc guard --action-type shell \
  --goal "Restart the staging API after config change" \
  --systems staging --no-reversible --confidence 80 --record
# exit 2 on block

2. Record and close out

# record (or reuse the action_id from ?record=true)
ACTION=$(curl -s -X POST "$BASE/api/actions" \
  -H 'Content-Type: application/json' \
  -d '{"agent_id":"my-agent","action_type":"deploy",
       "declared_goal":"Deploy v2.3.1 to staging after all tests passed",
       "idempotency_key":"sha256:<...>" }' | jq -r .action_id)

# ... do the work ...

# outcome (one-shot: first call wins)
curl -s -X POST "$BASE/api/actions/$ACTION/outcome" \
  -H 'Content-Type: application/json' \
  -d '{"status":"completed"}'

CLI equivalent: dc action ..., dc outcome <id> --status completed|partial|failed.

3. Wait for a human

When the verdict is require_approval, the action parks with status: pending_approval. Poll until it resolves:

dc pending                       # what is waiting across the org
# poll one action:
while true; do
  S=$(curl -s "$BASE/api/actions/$ACTION" | jq -r .action.status)
  case "$S" in approved) break;; denied|expired|cancelled) exit 1;; esac
  sleep 10
done

The operator approves from the dashboard (/approvals), the CLI (dashclaw approve <id>), the mobile PWA (/approve), Telegram, or Discord. Approvals are only approvable while they can still release something; overdue rows flip to expired (acting on one returns 410).

4. SDKs (when you manage the credential yourself)

import { DashClaw } from 'dashclaw';
const claw = new DashClaw({ baseUrl: process.env.DASHCLAW_BASE_URL,
                            apiKey: process.env.DASHCLAW_API_KEY,
                            agentId: 'my-agent' });
const decision = await claw.guard({ action_type: 'deploy', risk_score: 85,
                                    declared_goal: 'Deploy v2.3.1 to staging' });
if (decision.decision === 'block') throw new Error('blocked: ' + decision.reason);
from dashclaw import DashClaw
claw = DashClaw(base_url=..., api_key=..., agent_id='my-agent')
plan = claw.submit_plan("Nightly deploy", steps=[
    {"action_type": "deploy", "step_goal": "Deploy v2.3.1 to staging"},
])

run_governed() / runGoverned() need a server advertising execution-claim protocol 1; upgrade server and SDK together before using them.

5. Sessions

curl -s -X POST "$BASE/api/sessions" -H 'Content-Type: application/json' \
  -d '{"agent_id":"my-agent","metadata":{"task":"nightly deploy run"}}'
# ... PATCH status / checkpoint as the run progresses ...

6. Assumptions

When an action depends on a belief ("staging tests passed"), record it so an operator can invalidate it later:

curl -s -X POST "$BASE/api/assumptions" -H 'Content-Type: application/json' \
  -d '{"agent_id":"my-agent","action_id":"'"$ACTION"'",
       "assumption":"staging tests passed on build 402"}'

Invalidated assumptions ride back on your next guard calls as assumption_alerts until acknowledged.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill implements a governance protocol that allows an AI agent to cooperate with a security infrastructure (DashClaw) for auditing and approvals. It defines a structured workflow for risk assessment, action recording, and human-in-the-loop validation, representing a defensive implementation for secure agent orchestration.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 9e1a97f. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 3 months ago

README badge

README badge for ucsandman/dashclaw-skills/muse-governance