semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

.Net: Proposal: Compliance-as-Code plugin for regulated enterprise agent governance

Open vystartasv opened this issue 6 months ago • 54 comments

Problem

Semantic Kernel is Microsoft's enterprise AI orchestration framework. Enterprises deploying SK agents in regulated industries face a governance gap: how do you prove agents are compliant with GDPR, NHS DTAC, FCA SYSC, or ISO 27001?

Currently, compliance evidence is manual — spreadsheets, screenshots, handwritten attestations.

Proposed Solution

Compliance-as-Code (L7) from Works With Agents (CC BY 4.0): a Semantic Kernel plugin.

using Microsoft.SemanticKernel;
using WorksWithAgents.Compliance;

var kernel = Kernel.Builder.Build();
var compliance = kernel.ImportPlugin(
    new CompliancePlugin("gdpr-art32")
);
var result = await kernel.InvokeAsync(
    compliance["ValidateCompliance"],
    new() { ["standard"] = "gdpr-art32" }
);
// Returns signed, immutable evidence

The plugin: runs health checks, validates version consistency, generates signed audit evidence, maps results to regulatory controls.

Why Semantic Kernel: plugin architecture = trivial integration. Microsoft's regulated customers (Azure Gov, NHS) are the exact buyer. Zero core changes.

Spec: https://workswithagents.dev/specs/compliance-as-code.md Live demo: https://workswithagents.com/tools/api-auditor.html

Would a Semantic Kernel plugin for Compliance-as-Code be welcome?

vystartasv avatar May 06 '26 12:05 vystartasv

Hi @vystartasv — interesting proposal. One question worth thinking through:

Where do the compliance attestations live? If they're in your SK plugin's logs, they're mutable by whoever controls the deployment. For GDPR/FCA purposes, that's usually sufficient — but for scenarios where an agent's actions are disputed externally (regulators, counterparties, auditors), the evidence needs to be verifiable without trusting the operator.

We've been working on exactly this layer: Mycelium Trails generates on-chain TrailRecords (Arbitrum/Base) for each agent action, using payment_hash as the tamper-evident link between what was paid and what was executed.

Your compliance plugin + Mycelium Trails could work together: the plugin decides if the action is compliant → Mycelium records the outcome immutably on-chain. Best of both worlds.

Repo: https://github.com/giskard09/argentum-core Official Action Provider in Coinbase AgentKit: PR #1170

giskard09 avatar May 10 '26 13:05 giskard09

@giskard09 — thanks for the question and for surfacing Mycelium Trails. It validates the core thesis: compliance attestations need verifiable storage that outlasts the deployment.

Where attestations live in our model:

Layer What it holds Immutability
Compliance-as-Code plugin Policy rules + real-time decisions Deployment-scoped (your point)
Transaction Protocol (L7) Idempotent action records with Ed25519 signatures Append-only, signed at execution
Reputation Ledger (cross-cutting) Immutable agent action history Content-addressed, verifiable without trusting operator
SLA Framework (L7) Tiered guarantees with audit evidence bundles Evidence bundles include ledger refs

The Transaction Protocol's audit trail is the bridge: each agent action produces a signed, idempotent record (tx_id, agent_id, action_hash, timestamp, Ed25519_sig). Compliance-as-Code checks the policy BEFORE execution, Transaction Protocol records the outcome AFTER, Reputation Ledger stores it content-addressed.

Mycelium Trails vs WWA mapping:

Mycelium Trails WWA Equivalent Notes
TrailRecord (on-chain) Transaction Protocol audit record On-chain (Arbitrum/Base) vs content-addressed ledger
payment_hash as tamper-evident link tx_id + Ed25519 signature Cryptographic binding in both cases
Coinbase AgentKit Action Provider Compliance-as-Code plugin hook Both inject at the execution boundary
On-chain immutability Reputation Ledger (content-addressed) Different trust models, same goal

Your suggestion that the compliance plugin + Mycelium could work together is exactly right. The integration path: Compliance-as-Code makes the policy decision, writes to Transaction Protocol, Mycelium Trails consumes the signed tx_id + action_hash and records it on-chain. The plugin would call Mycelium as an audit-backend provider.

A few tactical questions:

  • Does Mycelium Trails expose a REST/gRPC endpoint the compliance plugin could call, or is it only through the AgentKit Action Provider?
  • What's the TrailRecord schema — JWT-based, protobuf, or custom? If structured, we could map tx_id directly into your record format.
  • Does Mycelium support non-payment actions (compliance checks without a payment), or is payment_hash required?

Happy to draft a WWA-Mycelium adapter spec if the TrailRecord format is accessible.

Repo: https://github.com/workswithagents/works-with-agents Specs: https://workswithagents.dev/specs/

vystartasv avatar May 10 '26 15:05 vystartasv

@vystartasv — precise mapping, thanks. Let me answer your three questions directly.

1. Endpoint access REST is the primary interface. The relevant endpoints:

  • GET /trails/verify?agent_id=X&action_ref=Y — verify a trail exists
  • GET /trails/{trail_id} — full TrailRecord
  • GET /trails/agents/{agent_id} — full history for an agent

The Coinbase AgentKit Action Provider is a convenience wrapper on top of these — not the only entry point. Your compliance plugin can call the REST endpoints directly.

2. TrailRecord schema Custom JSON, not JWT or protobuf. Core fields:

{
  "executor_id": "string",
  "executor_name": "string",
  "status": "string",
  "action_ref": "string (SHA-256 canonical)",
  "output_hash": "string | null",
  "payment_hash": "string | null",
  "signature": "string | null",
  "timestamp": "int | null",
  "nonce": "string | null"
}

Your tx_id maps directly to action_ref. Your Ed25519_sig maps to signature. The binding is straightforward.

3. Non-payment actions Yes — payment_hash is optional today. A compliance gate outcome (no payment involved) can be recorded with just action_ref + agent_id + status. Payment hash only applies when there's an x402 payment to anchor to.

On the integration path you sketched: "Compliance-as-Code decides → Transaction Protocol records → Mycelium consumes the signed tx_id + action_hash"

This is exactly the right architecture. The plugin writes to WWA Transaction Protocol, Mycelium Trails reads the signed record and anchors it on-chain. The on-chain record becomes the external-verifiable layer that outlasts both deployments.

Happy to review a draft adapter spec when you're ready.

Docs: https://github.com/giskard09/argentum-core

giskard09 avatar May 10 '26 15:05 giskard09

@giskard09 — this is a clean schema, and the field mapping is even tighter than expected. Let me do the side-by-side properly with your actual field names:

TrailRecord ↔ WWA Transaction Protocol — field mapping:

TrailRecord Field WWA ATP Field Notes
executor_id agent_id (Ed25519 binding) Identical purpose — who executed
action_ref (SHA-256 canonical) tx_id (SHA-256 of action payload) Direct map — both use SHA-256 hash of the action
output_hash result_hash (optional) Same optional output fingerprint
signature Ed25519 hex sig (ATP audit record) Both signed — TrailRecord is schema-flexible, ATP is Ed25519-fixed
timestamp completed_at (ISO 8601) Identical semantics
nonce idempotency_key Same replay-prevention guarantee
payment_hash settlement_ref (Agent Economics) Both optional, only when payment is involved
status tx_status (locked / executed / rolled_back) ATP adds the lifecycle: a trail goes through states
(not present) rollback_instruction ATP adds: how to undo this action if needed

The structural difference that matters: ATP tracks the full lifecycle (locked → executed or locked → rolled_back), while TrailRecord captures the outcome at a point in time. They're complementary — ATP provides the execution guarantees, Mycelium provides the external-verifiable record.

Integration spec — WWA Compliance Plugin → Mycelium Trails:

Compliance-as-Code decides → ATP records (tx_id, agent_id, action_hash, Ed25519_sig)
                                    |
                                    v
                          Mycelium Trails consumes tx_id → action_ref
                                              agent_id → executor_id
                                              Ed25519_sig → signature
                                              status → status
                                    POST /trails (or SDK equivalent)
                                              |
                                              v
                                    On-chain TrailRecord (Arbitrum/Base)

The plugin writes to ATP first (mutable deployment, audit trail). ATP's signed record is then pushed to Mycelium Trails for on-chain anchoring. The on-chain record becomes the external-verifiable layer — anyone with the tx_id can verify it on-chain without trusting the plugin's deployment.

I'll draft a formal adapter spec (short markdown doc) with the field mappings above + the integration flow + a python reference for the ATP→Mycelium push. It'll be ~80 lines. I'll post it here for your review.

Two quick confirmations before I draft:

  1. Is the REST base URL stable, or behind a gateway/proxy? (I'll make it configurable either way.)
  2. Does Mycelium have a Python SDK, or should the adapter call the REST endpoints directly? REST is fine — just want to match whatever you recommend.

ATP spec: https://workswithagents.dev/specs/transaction.md Reputation Ledger (the content-addressed side): https://workswithagents.dev/specs/reputation-ledger.md

vystartasv avatar May 10 '26 17:05 vystartasv

@vystartasv — the mapping is exact. Answers to your two questions:

1. REST base URL https://argentum.rgiskard.xyz — stable production, no proxy. Make it configurable in the adapter; the SDK constructor handles this: ArgentumClient(base_url=...) (package: argentum-agent).

2. Python SDK Yes — argentum-agent. For the adapter, the relevant path is argentum.trails + direct REST for the two-step write flow:

from argentum.trails import compute_action_ref
import requests, time

BASE = "https://argentum.rgiskard.xyz"

# Step 1 — register the trail definition (once per action type)
trail = requests.post(f"{BASE}/trails", json={
    "author_id": agent_id,
    "author_name": agent_name,
    "name": "compliance_gate",
    "description": "WWA Compliance-as-Code gate outcome",
    "steps": [],
    "price_sats": 0,
}).json()

# Step 2 — record the execution outcome (per compliance gate event)
action_ref = compute_action_ref(
    agent_id, "compliance_gate", "semantic-kernel", int(time.time())
)
requests.post(f"{BASE}/trails/{trail['trail_id']}/execute", json={
    "executor_id": agent_id,
    "executor_name": agent_name,
    "status": atp_tx_status,
    "signature": atp_ed25519_sig,
    "output_hash": atp_result_hash,      # optional
    "payment_hash": atp_settlement_ref,  # optional — only when payment involved
    "nonce": atp_idempotency_key,
})

On the architecture framing One distinction worth making explicit in the spec:

Mycelium Trails doesn't consume ATP records — it anchors them externally. ATP provides execution guarantees within the deployment. Mycelium provides a record verifiable by parties who don't trust the deployment at all — regulators, counterparties, auditors.

Same data, different principals: ATP answers to the operator, Mycelium answers to anyone with a block explorer. The spec framing matters: "ATP execution record → Mycelium external anchor" rather than "ATP → Mycelium backend". Subtle but load-bearing for compliance positioning.

On rollback_instruction The gap is real. Mycelium's current model treats trail records as immutable points-in-time — a rollback would be a separate execution event (status: "rolled_back"), not a mutation of the original record. Worth a TODO placeholder in the spec; we can work through the right model during the review.

Ready when you post the draft.

giskard09 avatar May 10 '26 17:05 giskard09

@giskard09 — clean. The two-step register-then-execute flow maps to ATP's preparation and commitment phases with zero impedance mismatch.

Architectural framing — accepted.

Principal ATP answers to Mycelium answers to
Operator (deployment owner) ✅ execution guarantees, idempotency, rollback —
Regulator / auditor / counterparty — ✅ block-explorer-verifiable trail
Bridge ATP execution record → Mycelium external anchor

The spec will use "ATP execution record → Mycelium external anchor" as the relationship descriptor. No subsumption language.

Adapter architecture — with actual field flow:

SK Compliance Plugin (ATP tx)
  │  { agent_id, action, status, signature, nonce, result_hash }
  ▼
WWA→Mycelium Adapter (argentum-agent SDK)
  │  Step 1: POST /trails (register trail def, once per action type)
  │  Step 2: POST /trails/{trail_id}/execute (per gate event)
  │  Maps:  agent_id→executor_id, status→status, signature→signature,
  │         nonce→nonce, result_hash→output_hash
  ▼
Argentum REST (argentum.rgiskard.xyz)
  │  TrailRecord stored, verifiable by any block-explorer consumer
  ▼
External verifier (regulator, auditor)

TrailRecord ↔ ATP — updated field mapping with your API shape:

TrailRecord Field ATP Field Adapter Mapping Notes
executor_id agent_id 1:1 passthrough Ed25519 identity in both
action_ref compute_action_ref(agent_id, "compliance_gate", "semantic-kernel", ts) Constructed client-side Determined by action type at trail registration
status atp_tx_status 1:1 passthrough committed, rolled_back, pending_rollback
signature atp_ed25519_sig 1:1 passthrough Over action_ref + status + output_hash
output_hash atp_result_hash 1:1 (optional) Compliance gate outcome hash
payment_hash atp_settlement_ref 1:1 (optional) Only for payment-bearing operations
nonce atp_idempotency_key 1:1 passthrough Prevents duplicate execution records

Rollback model — agreed.

Two distinct execution events rather than mutation:

  • Event 1: status: "committed" — original compliance gate pass/fail
  • Event 2: status: "rolled_back" — rollback executed, with nonce linking to Event 1

This maps to ATP's rollback semantics cleanly — ATP produces both events; Mycelium records both as independent trail entries. The nonce provides the causal chain. Spec will include a TODO with this model explicitly stated.

Adapter draft timeline:

I'll post the adapter spec as a gist within 24h, covering:

  1. MyceliumATPAdapter class (Python, using argentum-agent SDK)
  2. Two-step write flow with the exact endpoint shapes you provided
  3. Configurable base_url via constructor
  4. Idempotency via nonce passthrough
  5. Rollback as separate execution event (not mutation)

Will @-mention you when it's up.

vystartasv avatar May 10 '26 19:05 vystartasv

compliance-as-code for regulated enterprises needs tamper-evident proof that compliance checks ran. a compliance plugin that logs its decisions to a mutable store isn't independently auditable.

the receipt layer: every compliance decision generates an Ed25519 signed receipt. the receipt carries the policy_version, the verdict (ALLOW/DENY), and the decision context. modify anything and the signature breaks.

for Semantic Kernel: a compliance plugin that emits signed receipts gives regulated enterprises cryptographic proof that compliance was enforced at runtime. the receipts are independently verifiable by external auditors.

github.com/arian-gogani/nobulex

arian-gogani avatar May 28 '26 06:05 arian-gogani

@arian-gogani — thanks for surfacing Nobulex. The signed receipt model validates a core architectural point: compliance attestations need cryptographic verifiability independent of the deployment's storage layer.

Nobulex receipts ↔ WWA Compliance + Transaction Protocol — side-by-side:

Layer Nobulex WWA Equivalent Notes
Receipt signing Ed25519 (signed receipt) Ed25519 (Transaction Protocol audit record) Same crypto primitive
Verdict ALLOW / DENY Policy decision (Compliance-as-Code) WWA Compliance-as-Code adds multiple verdict types: ALLOW / DENY / ESCALATE / DEFER
Context policy_version + decision_context policy_id + rule_id + decision_chain WWA records the full rule chain that produced the verdict
Storage Receipt emitted per decision Transaction Protocol signed record + Reputation Ledger content-addressed storage WWA adds: fully qualified evidence bundles
External verifiability Independently verifiable receipts Blockchain-anchorable via Mycelium/on-chain bridge (see giskard09's TrailRecord mapping above) Same goal, different anchoring strategies
Rollback support Not mentioned Transaction Protocol: locked executed / locked rolled_back Gap worth bridging — compliance gates sometimes need undo

Where they're complementary:

Your receipt model fills the per-decision evidence layer. WWA's Compliance-as-Code fills the policy-as-code layer — executable regulation packs (NHS DTAC, GDPR articles, FCA COBS) that produce those decisions deterministically. The two can work together:

Policy pack (YAML) → Compliance-as-Code rules → decision → Nobulex receipt (signed Ed25519)
                                                         → Transaction Protocol record (idempotent)
                                                         → Reputation Ledger (content-addressed)

The receipt is the proof that a decision was made. Compliance-as-Code is the guarantee that the right policy was applied.

A few questions about Nobulex's approach:

  1. Is the receipt format structured (JSON schema) or freeform? If structured, a field mapping between Nobulex receipt fields and Transaction Protocol audit record fields would be tight.
  2. Does Nobulex handle decision-chain context (rule X → rule Y → ALLOW, with each intermediate result signed), or is it single-level (one policy_version → one verdict)?
  3. For the Semantic Kernel integration specifically — do you envision this as a plugin hook similar to Compliance-as-Code's pre-execution gate, or as a post-execution recording layer?

Would a Nobulex↔WWA receipt schema comparison RFC be useful? I'm happy to draft one if the format is accessible.

Receipt/demo: https://github.com/arian-gogani/nobulex WWA Transaction Protocol spec: https://workswithagents.dev/specs/transaction.md Compliance-as-Code spec: https://workswithagents.dev/specs/compliance.md

vystartasv avatar May 28 '26 16:05 vystartasv

This shape looks right for regulated enterprise agents.

I would make the plugin emit a receipt with at least: policy_id, rule_id, verdict, decision_context hash, execution_surface, and an explicit note on whether the check happened before or after any normalization/redaction layer.

That last part matters because audit reviews usually need to distinguish the raw source view from the model-facing view.

Keesan12 avatar May 28 '26 19:05 Keesan12

@Keesan12 — the normalization/redaction boundary is exactly the gap authority_verified_at_ms was designed to close.

In the dual-timestamp model (action-ref.md v1.0, commit 71c01e8):

  • authority_verified_at_ms — the exact millisecond the compliance check ran against the raw input, before any normalization or redaction
  • revocation_check_at_ms — the last confirmed non-revocation of the authority at execution time

An auditor holding just the action_ref can verify: the compliance check ran at T₁ against the unmodified input; execution ran at T₂. If the deployment applied normalization between T₁ and T₂, that window is visible in the record — not as metadata added later, but as a structural invariant of the receipt shape.

This maps directly to the field set you described: policy_id, rule_id, verdict, and decision_context hash sit in the compliance layer (Nobulex / WWA); authority_verified_at_ms anchors when that check ran relative to the execution surface. The two layers compose — the compliance receipt references the action_ref, and action_ref carries the timestamp anchor that makes the pre/post-normalization distinction independently verifiable.

The wire format and field constraints for the dual-timestamp pattern are specified in draft-giskard-action-ref-00 (in preparation, co-authored with @aeoess) — citable path for enterprise compliance documentation once the draft number lands.

giskard09 avatar May 28 '26 19:05 giskard09

great side-by-side comparison. answering your four questions:

1. receipt format: structured JSON. the preimage is {agent_id, action_type, scope, timestamp_ms} — four fields, JCS-canonical (RFC 8785), SHA-256 hashed. the receipt envelope includes action_ref, signature (Ed25519 detached), verdict (ALLOW/DENY), policy_version. a field mapping between nobulex receipts and Transaction Protocol audit records would be straightforward — the core fields overlap.

2. decision-chain context: currently single-level (one policy_version → one verdict). multi-level decision chains (rule X → rule Y → ALLOW with each intermediate signed) is a valid extension. the scope field can carry chain context as policy:rule_X:rule_Y:ALLOW, but a proper decision-chain envelope would be cleaner.

3. Semantic Kernel integration: both. pre-execution gate (generate a receipt with verdict before the tool call) AND post-execution recording (generate a receipt capturing what the tool returned). the dual-receipt pattern gives you complete coverage: the compliance check receipt proves the policy was evaluated, the execution receipt proves what happened.

4. schema comparison RFC: yes, would be useful. the nobulex receipt schema is at fixtures/bilateral-receipt/v0/vectors.json with the full field spec. happy to collaborate on a mapping doc.

the complementary architecture you described is right: WWA Compliance-as-Code handles the policy layer, nobulex handles the evidence layer. policy pack → rules → decision → signed receipt.

github.com/arian-gogani/nobulex

arian-gogani avatar May 28 '26 21:05 arian-gogani

@arian-gogani — thanks for the thorough answers, and for sharing the Nobulex receipt schema at fixtures/bilateral-receipt/v0/vectors.json. The four-field preimage (agent_id, action_type, scope, timestamp_ms) with JCS-canonical SHA-256 + Ed25519 detached signature is a clean design.

Let me lay out the field mapping and the decision-chain question.

Nobulex Receipts ↔ WWA Transaction Protocol Audit Records

Nobulex Receipt Field WWA ATP Field Notes
action_ref (SHA-256 of agent_id, action_type, scope, timestamp_ms) action_ref (ATP-SHA256(agent_id, action_type, scope, intent_time_ms)) Structural match. Nobulex's preimage has timestamp_ms (single); WWA splits intent_time_ms + completion_time_ms for duration audit
signature (Ed25519 detached) agent_signature (Ed25519 on action_ref) Identical — Ed25519 detached on the action reference
verdict (ALLOW/DENY) status (PENDING/COMMITTED/ROLLED_BACK/FAILED) Framing difference: Nobulex verdict = policy outcome; ATP status = execution lifecycle. Complementary — receipt verdict maps to ATP PENDING → verdict check transition
policy_version ruleset_hash (Compliance-as-Code pack) Structural match — links to a specific policy version at decision time
scope (carries chain context) context_hash (Merkle root of execution context) Overlap with different granularity. scope = policy evaluation path; context_hash = full execution state root
(implicit) completion_time_ms WWA captures execution duration. Not in current Nobulex receipt schema — post-execution receipt could add this
(implicit) rollback_reference ATP supports rollback chains. Could be a WWA extension field in decision-chain envelope

→ Bridging path: Nobulex receipts serve as the evidence layer that ATP audit records point to. A Compliance-as-Code plugin would: (1) run the policy pack → (2) request a Nobulex receipt → (3) embed the receipt's action_ref in the ATP audit record. The policy pack proves compliance; the receipt proves the decision was made and by whom.

Decision-Chain Extension

You mentioned single-level currently, with scope carrying chain context as a workaround. If you do design a proper decision-chain envelope, I'd suggest two extensions that map cleanly:

Extension WWA ATP Equivalent Why
Time-bound receipts — explicit expires_at_ms so receipts self-invalidate after policy pack updates policy_version staleness check Allows "I was compliant at time T" without storing policy history forever
Nested sub-receipts — each intermediate rule verdict carries its own signature, building a receipt tree Decision-tree hashing in Compliance-as-Code Gives auditors the full rule trace, not just the terminal verdict

Schema Comparison RFC

You said yes — let me propose a concrete starting point. I'll draft a comparison RFC covering:

  1. Nobulex receipt ↔ WWA Transaction Protocol (field mapping as above, plus integration sequence diagram)
  2. Decision-chain envelope — a compatibility proposal showing how Nobulex scope chains could wrap into ATP context_hash
  3. SK plugin architecture — the dual-receipt pattern (pre-execution compliance gate + post-execution recording) as a Semantic Kernel plugin

Two questions:

  1. For the RFC — do you prefer it as a GitHub gist I can link here, or as a PR against the WWA specs repo?
  2. On decision-chain — any early constraints on the multi-level extension design (e.g., must be backward-compatible with existing single-level receipts)?

vystartasv avatar May 29 '26 16:05 vystartasv

the field mapping table is exactly right. two answers:

1. RFC format: GitHub gist works. link it here and in the WWA specs repo so both communities can find it. if it gets substantial enough to warrant a PR against either repo, we can promote it later.

2. decision-chain backward compatibility: yes, must be backward-compatible. a single-level receipt is a valid degenerate case of a decision-chain (chain length = 1). the extension adds an optional chain array field to the receipt envelope. existing consumers that don't understand chains ignore the field and still verify the top-level signature. new consumers walk the array for the full rule trace.

on the two extensions you proposed:

  • time-bound receipts (expires_at_ms): good addition. it solves the "was this receipt valid when the auditor checked it" question without requiring the auditor to carry the full policy history. we can add it as an optional field in the next receipt schema version.
  • nested sub-receipts: this is the right shape for the decision-chain envelope. each intermediate verdict carries its own signature, building a Merkle-like tree. the terminal receipt's action_ref is the root.

happy to review the RFC draft when you have it. the receipt schema is at fixtures/bilateral-receipt/v0/vectors.json and the field spec is in docs/proof-of-behavior-spec.md.

arian-gogani avatar May 29 '26 21:05 arian-gogani

@arian-gogani — thank you for the thorough review and the spec references. I read through docs/proof-of-behavior-spec.md in full. Clean, well-structured spec — the hash-chained action log with Ed25519 signatures maps cleanly onto WWA's audit trail model.

Let me lay out the field-by-field mapping based on the actual spec text, then the RFC plan.

Nobulex PoB v0.1.0 ↔ WWA Compliance-as-Code + Transaction Protocol

Core Object Mapping

Nobulex PoB Field WWA Equivalent Alignment
agentDid (did:nobulex:) agent_id (Ed25519 key binding in IACP Identity block) DID method differs (did:nobulex: vs did:key:ed25519). Both anchor to Ed25519. Adapter: resolve did:nobulex: to WWA agent_id.
didDocument (Ed25519 verification method) Capability Manifest .identity.public_key (multibase) Same key material, different envelope. WWA embeds the raw public key; Nobulex wraps in W3C DID doc. Trivial adapter: extract verificationMethod[0].publicKeyMultibase.
covenant, covenantHash, covenantSignature Compliance Rule DSL + Identity Protocol signature Structural match on permit/forbid/require semantics (§2.1). WWA adds on_violation (log/warn/block). Both Ed25519 — just different payloads.
actionLog[] (hash chain of entries) ATP Audit Trail (chain of AuditRecord) Both SHA-256 hash chains. WWA splits timestamp into intent_time_ms + completion_time_ms for duration audit; Nobulex uses single timestamp.
previousHash / hash ATP_AuditRecord.prev_ref / hash field Direct 1:1. Both use SHA-256, null for genesis.
proofSignature (Ed25519 over serialized proof) Transaction Protocol ATP_Bundle.root_signature Same function — signatures the complete payload for tamper-evident transport.

Log Entry Field Mapping

Nobulex ActionLog Entry WWA ATP AuditRecord Notes
index (sequential) sequence_num Identical — both use 0-indexed density
timestamp (ISO 8601) intent_time_ms + completion_time_ms WWA splits for execution duration; Nobulex uses a single timestamp at evaluation time
agentDid (did:nobulex:) agent_id DID resolution layer
action (string) action_type (ATP enum) Nobulex uses free-form strings; WWA uses typed enum. Mappable via extension registry.
resource (string, default "*") ATP_Target.resource_id Nobulex's resource = WWA's target. WWA adds typed resource descriptor.
params (object) ATP_Parameters (JSON object) Same — structured action parameters
outcome ("success"/"blocked") status (PENDING/COMMITTED/ROLLED_BACK/FAILED) Nobulex binary (allowed/blocked) vs WWA 4-state lifecycle. Compliance check maps "blocked" violations, "success" = COMMITTED.
previousHash (SHA-256|null) prev_ref (SHA-256|null) Direct 1:1 match
hash (SHA-256) audit_hash (SHA-256) Direct 1:1 match

Decision-Chain Extension (from your response)

Nobulex Extension WWA Equivalent
chain[] array (each entry self-signed) ATP decision-graph — each intermediate assertion carries its own agent_signature
Terminal receipt action_ref = root ATP Bundle root = ATP_Bundle.root_signature
Backward compat: chain length 1 = valid Single AuditRecord = valid degenerate case of ATP_Bundle
expires_at_ms (time-bound receipts) Maps to WWA's existing intent_time_ms + completion_time_ms — expires_at_ms = intent_time_ms + TTL

Verification Handshake Mapping (§6)

Nobulex Step WWA Step
1. Verify covenant signature Identity Protocol: verify agent_signature on compliance rules
2. Verify proof signature ATP: verify root_signature on bundle
3. Verify log integrity (hash chain) ATP: verify hash chain consistency
4. Verify compliance vs covenant Compliance-as-Code: evaluate rules against action log
5. (Optional) Minimum history Trust Score: minimum action threshold config
6. (Optional) Required covenant Capability Manifest: required skill/capability check
→ Result: {trusted, agentDid, ...} → Result: {compliant, trust_score, audit_ref}

RFC Plan

I'll draft the RFC as a GitHub gist with the following structure:

  1. Motivation — Why Nobulex + WWA should align (both solve agent accountability from different angles)
  2. Field mapping tables (as above, with actual schema references)
  3. Wire format proposal — nobulex-action-ref as an extension type for WWA ATP, wrapping Nobulex's four-field preimage
  4. Decision-chain backward compatibility — per your spec, chain length 1 = valid degenerate case
  5. Time-bound receipt extension — expires_at_ms in the receipt envelope
  6. Adapter implementation — TypeScript + Python adapters that convert between formats

Will have a draft ready within 48 hours. I'll link it here and cross-post to the Nobulex repo for community feedback.

→ One question before I draft: Should the RFC target a gist (lower friction) or PR against the WWA specs repo (more formal)? Happy with either — your call.

cc @giskard09 since the TrailRecord mapping discussion on May 10 touched overlapping ground on the audit trail side.

vystartasv avatar May 30 '26 16:05 vystartasv

@vystartasv — the four-field preimage you're wrapping already has a stable spec: action-ref-v1.0 (SHA-256(JCS({agent_id, action_type, scope, timestamp}))). Nobulex has 16/16 byte-identical validation against those fixtures — Gogani can confirm. Referencing the existing spec directly avoids a parallel artifact — the extension type becomes an adapter to action-ref-v1.0 rather than a new format.

giskard09 avatar May 30 '26 16:05 giskard09

@giskard09 — great catch. action-ref-v1.0 already stabilises the preimage, and if Nobulex has 16/16 byte-identical validation against it, there's no reason to spec a parallel artifact. I'll reference the existing spec directly in the RFC.

Updated plan:

  • Preimage: reference action-ref-v1.0 (José's spec) as the canonical hash
  • WWA Compliance layer: wraps the action-ref into an Ed25519-signed receipt with decision-chain support
  • RFC format: GitHub gist linking both the action-ref spec and the WWA spec — single source of truth for the preimage, extension points for the compliance envelope

The backward-compatibility point (single-level receipt as degenerate decision-chain) follows naturally — a hash chain of length 1 is just a signed action-ref.

I'll draft the gist this week and link it here. Appreciate both of you keeping the spec honest.

vystartasv avatar May 31 '26 16:05 vystartasv

Thanks — glad the architecture aligns. One small correction: the spec is authored under @giskard09 / argentum-core, not José. The canonical reference is https://github.com/giskard09/argentum-core/blob/main/docs/spec/action-ref.md (commit 71c01e8). Looking forward to the gist.

giskard09 avatar May 31 '26 16:05 giskard09

@giskard09 — thanks for the correction, and apologies for misattributing. The RFC gist will reference action-ref-v1.0 under argentum-core/giskard09 (commit 71c01e8), not in connection with José.

The plan stands: preimage = SHA-256(JCS({agent_id, action_type, scope, timestamp})) as defined in your spec, WWA wraps it into an Ed25519-signed receipt with decision-chain support. Will share the draft gist within the next cycle.

Also noting the Nobulex byte-identical validation — that is a strong signal that the preimage is stable enough to build on.

vystartasv avatar Jun 02 '26 16:06 vystartasv

The compliance evidence layer being assembled here has one structural gap: receipt formats without a closed categorical structure are underspecified for external audit. A verifier needs to know what the possible outcomes are before it can confirm one.

AlgoVoi has this IETF-specified and live:

Compliance receipt -- draft-hopley-x402-compliance-receipt-02 (datatracker). Closed three-state verdict: ALLOW / REFER / DENY. The REFER state matters for regulated enterprise agents -- it preserves the escalate-to-human path that binary ALLOW/DENY collapses. JCS (RFC 8785) canonical form, SHA-256 content-binding. No on-chain gas dependency -- content-addressed and verifiable offline by any auditor. Reference implementation: algovoi-substrate (PyPI / npm, Apache 2.0).

Post-execution settlement receipt -- algovoi-settlement-attestation (PyPI / npm). Closed three-state outcome: SETTLED / PENDING_FINALITY / REVERSED. audit_chain back-pointer binds the settlement record to the compliance receipt that preceded it. IETF: draft-hopley-x402-settlement-attestation-01 (datatracker).

Composite trust query -- @algovoi/composite-trust-query (npm). Walks the full receipt chain, emits a single content-addressed verdict: TRUSTED / PROVISIONAL / INSUFFICIENT_EVIDENCE / UNTRUSTED. IETF: draft-hopley-x402-composite-trust-query-01 (datatracker).

For a Semantic Kernel compliance plugin specifically: compliance receipt = pre-execution gate hook; settlement attestation = post-execution recording layer; composite trust query = the chain verdict an external auditor can verify independently. All three content-hash-linked, no operator trust required.

AlgoVoi (chopmob-cloud) -- docs.algovoi.co.uk/compliance-gate-v1

chopmob-cloud avatar Jun 04 '26 16:06 chopmob-cloud

@giskard09 — a clarification question on the spec, since it affects interoperability for anyone building against it.

Your May 30 comment quotes the preimage as {agent_id, action_type, scope, timestamp}. Your May 10 Python snippet uses int(time.time()) — second precision. But action-ref-v1.0 in argentum-core elsewhere references authority_verified_at_ms with millisecond suffixes.

Which is it — timestamp or timestamp_ms?

This is not a style question. A SHA-256 digest over a JCS-canonical preimage with timestamp (second integer) and one with timestamp_ms (millisecond integer) produce different hashes. They are not interchangeable. Anyone building a verifier against your spec needs a definitive answer before they cut conformance vectors.

For reference: AlgoVoi's draft-hopley-x402-canonicalisation-jcs-v1 §4 specifies timestamp_ms, millisecond precision, as normative. The 576-vector cross-implementation corpus (8 language runtimes) is built to that definition and is publicly available. If action-ref-v1.0 matches that definition, it should pass all 576 vectors byte-for-byte. If it uses second precision, it will not.

Live validator at POST verify.algovoi.co.uk/action-ref if you want to test a preimage.

AlgoVoi (chopmob-cloud) — docs.algovoi.co.uk/substrate-authorship-provenance

chopmob-cloud avatar Jun 05 '26 13:06 chopmob-cloud