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
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: validate test validate-agent-cycle-health validate-authority-dependency-evidence validate-prometheus-sr validate-reasoning-failure-traces validate-governance-context validate-lattice-data-governai-execution-refs validate-lattice-runtime-profile-refs validate-network-native-assistant-evidence validate-guardrail-evidence-artifacts validate-stop-gate-evaluator validate-guarded-workcell-artifact validate-guarded-workcell-executor validate-guarded-invocation-artifact validate-guarded-invocation validate-agentic-pr-work-order validate-semantic-enterprise-agent-boundary validate-ops-history-contracts validate-action-contracts validate-agent-operation-contract validate-superconscious-reasoning-import validate-agent-harness-runtime-contracts validate-bounded-action-loop agentplane-evidence-receipt-composition-tier2-binding-ci lawful-learning-phase9-contract-ci validate-evidence-receipt-binding validate-semantic-activation-receipt validate-governed-run-contract validate-preflight-receipt validate-attempt-admission-receipt validate-verification-execution-receipt validate-synthetic-verification-receipt validate-governed-runner-v0-2-contract-chain validate-budget-settlement-receipt validate-rollback-receipts validate-run-dossier validate-governed-runner-readonly validate-workroom-context-evidence validate-wallguard-collaboration-admission validate-prophet-mesh-agentplane-adapter
.PHONY: validate test validate-agent-cycle-health validate-authority-dependency-evidence validate-prometheus-sr validate-reasoning-failure-traces validate-governance-context validate-lattice-data-governai-execution-refs validate-lattice-runtime-profile-refs validate-network-native-assistant-evidence validate-guardrail-evidence-artifacts validate-stop-gate-evaluator validate-guarded-workcell-artifact validate-guarded-workcell-executor validate-guarded-invocation-artifact validate-guarded-invocation validate-agentic-pr-work-order validate-semantic-enterprise-agent-boundary validate-ops-history-contracts validate-action-contracts validate-agent-operation-contract validate-superconscious-reasoning-import validate-agent-harness-runtime-contracts validate-bounded-action-loop agentplane-evidence-receipt-composition-tier2-binding-ci lawful-learning-phase9-contract-ci validate-evidence-receipt-binding validate-semantic-activation-receipt validate-governed-run-contract validate-preflight-receipt validate-attempt-admission-receipt validate-verification-execution-receipt validate-synthetic-verification-receipt validate-governed-runner-v0-2-contract-chain validate-budget-settlement-receipt validate-rollback-receipts validate-run-dossier validate-governed-runner-readonly validate-workroom-context-evidence validate-wallguard-collaboration-admission validate-prophet-mesh-agentplane-adapter validate-civic-stack-runtime-evidence

validate: validate-agent-cycle-health validate-authority-dependency-evidence validate-prometheus-sr validate-reasoning-failure-traces validate-governance-context validate-lattice-data-governai-execution-refs validate-lattice-runtime-profile-refs validate-network-native-assistant-evidence validate-guardrail-evidence-artifacts validate-stop-gate-evaluator validate-guarded-workcell-artifact validate-guarded-workcell-executor validate-guarded-invocation-artifact validate-guarded-invocation validate-agentic-pr-work-order validate-semantic-enterprise-agent-boundary validate-ops-history-contracts validate-action-contracts validate-agent-operation-contract validate-superconscious-reasoning-import validate-agent-harness-runtime-contracts validate-bounded-action-loop agentplane-evidence-receipt-composition-tier2-binding-ci lawful-learning-phase9-contract-ci validate-evidence-receipt-binding validate-semantic-activation-receipt validate-governed-run-contract validate-preflight-receipt validate-attempt-admission-receipt validate-verification-execution-receipt validate-synthetic-verification-receipt validate-governed-runner-v0-2-contract-chain validate-budget-settlement-receipt validate-rollback-receipts validate-run-dossier validate-governed-runner-readonly validate-workroom-context-evidence validate-wallguard-collaboration-admission validate-prophet-mesh-agentplane-adapter
validate: validate-agent-cycle-health validate-authority-dependency-evidence validate-prometheus-sr validate-reasoning-failure-traces validate-governance-context validate-lattice-data-governai-execution-refs validate-lattice-runtime-profile-refs validate-network-native-assistant-evidence validate-guardrail-evidence-artifacts validate-stop-gate-evaluator validate-guarded-workcell-artifact validate-guarded-workcell-executor validate-guarded-invocation-artifact validate-guarded-invocation validate-agentic-pr-work-order validate-semantic-enterprise-agent-boundary validate-ops-history-contracts validate-action-contracts validate-agent-operation-contract validate-superconscious-reasoning-import validate-agent-harness-runtime-contracts validate-bounded-action-loop agentplane-evidence-receipt-composition-tier2-binding-ci lawful-learning-phase9-contract-ci validate-evidence-receipt-binding validate-semantic-activation-receipt validate-governed-run-contract validate-preflight-receipt validate-attempt-admission-receipt validate-verification-execution-receipt validate-synthetic-verification-receipt validate-governed-runner-v0-2-contract-chain validate-budget-settlement-receipt validate-rollback-receipts validate-run-dossier validate-governed-runner-readonly validate-workroom-context-evidence validate-wallguard-collaboration-admission validate-prophet-mesh-agentplane-adapter validate-civic-stack-runtime-evidence
python3 tools/validate_execution_timing.py

validate-governance-context:
Expand Down Expand Up @@ -248,6 +248,10 @@ validate-prophet-mesh-agentplane-adapter:
python3 -m json.tool contracts/prophet-mesh/prophet-mesh-agentplane-adapter.v0.1.json >/dev/null
python3 tools/validate_prophet_mesh_agentplane_adapter.py

validate-civic-stack-runtime-evidence:
python3 -m json.tool schemas/civic-stack-run-capsule.schema.v0.1.json >/dev/null
python3 tools/validate_civic_stack_runtime_evidence.py

validate-agent-cycle-health:
python3 tools/validate_agent_cycle_health.py

Expand Down
270 changes: 270 additions & 0 deletions schemas/civic-stack-run-capsule.schema.v0.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,270 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://socioprophet.io/schemas/agentplane/civic-stack-run-capsule/v0.1",
"title": "CivicStackRunCapsule",
"description": "AgentPlane runtime evidence capsule for Seven-Model Civic Operating Architecture execution. Emits OQL plan acceptance, OAC compiler invocation, tool grants, action dispatch, and RationalGRL trace links. AgentPlane emits governed runtime evidence; it does not own the ontology, policy evaluation, or Delivery Excellence scoring.",
"type": "object",
"required": [
"kind",
"run_id",
"actor_ref",
"oql_plan_id",
"artifact_manifest_id",
"policy_decision_id",
"timestamps",
"provenance_refs",
"rationalgrl_trace",
"hellgraph_evidence_refs",
"issued_at"
],
"additionalProperties": false,
"properties": {
"kind": { "type": "string", "const": "CivicStackRunCapsule" },
"run_id": { "type": "string", "minLength": 1 },
"actor_ref": { "type": "string", "description": "Agent or human actor reference" },
"post_authority_ref": {
"type": "string",
"description": "Post or authority binding reference, if applicable"
},
"oql_plan_id": { "type": "string", "minLength": 1 },
"artifact_manifest_id": { "type": "string", "minLength": 1 },
"service_id": { "type": "string" },
"policy_decision_id": { "type": "string", "minLength": 1 },
"policy_decision_outcome": {
"type": "string",
"enum": ["allow", "allow_with_constraints", "deny", "escalate"]
},
"dataset_ids": {
"type": "array",
"items": { "type": "string" }
},
"resource_ids": {
"type": "array",
"items": { "type": "string" }
},
"tool_grants": {
"type": "array",
"items": { "$ref": "#/$defs/ToolGrant" }
},
"action_dispatch_records": {
"type": "array",
"items": { "$ref": "#/$defs/ActionDispatchRecord" }
},
"oql_plan_acceptance": { "$ref": "#/$defs/OQLPlanAcceptance" },
"oac_compiler_invocation": { "$ref": "#/$defs/OACCompilerInvocation" },
"subagent_delegations": {
"type": "array",
"items": { "$ref": "#/$defs/SubagentDelegation" }
},
"attestation_events": {
"type": "array",
"items": { "$ref": "#/$defs/AttestationEvent" }
},
"timestamps": {
"type": "object",
"required": ["started_at", "completed_at"],
"additionalProperties": false,
"properties": {
"started_at": { "type": "string", "format": "date-time" },
"completed_at": { "type": "string", "format": "date-time" }
}
},
"provenance_refs": {
"type": "array",
"items": { "type": "string" },
"minItems": 1
},
"rationalgrl_trace": { "$ref": "#/$defs/RationalGRLTrace" },
"hellgraph_evidence_refs": {
"type": "array",
"items": { "type": "string" },
"minItems": 1,
"description": "Evidence refs emitted to HellGraph/Prophet Core"
},
"delivery_excellence_signal_ref": {
"type": "string",
"description": "Score signal ref emitted to Delivery Excellence"
},
"upstream_anchors": {
"type": "array",
"items": { "type": "string" }
},
"issued_at": { "type": "string", "format": "date-time" }
},
"$defs": {
"ToolGrant": {
"type": "object",
"required": ["grant_id", "tool_id", "granted_to", "policy_decision_ref"],
"additionalProperties": false,
"properties": {
"grant_id": { "type": "string", "minLength": 1 },
"tool_id": { "type": "string", "minLength": 1 },
"granted_to": { "type": "string", "minLength": 1 },
"policy_decision_ref": { "type": "string", "minLength": 1 },
"cgrm_decision_ref": { "type": "string" },
"scope_constraints": {
"type": "array",
"items": { "type": "string" }
}
}
},
"ActionDispatchRecord": {
"type": "object",
"required": ["dispatch_id", "action_type", "policy_decision_ref", "dispatch_status"],
"additionalProperties": false,
"properties": {
"dispatch_id": { "type": "string", "minLength": 1 },
"action_type": { "type": "string", "minLength": 1 },
"policy_decision_ref": { "type": "string", "minLength": 1 },
"dispatch_status": {
"type": "string",
"enum": ["dispatched", "blocked", "deferred", "completed"]
},
"rationalgrl_task_ref": { "type": "string" },
"defeater_reason": {
"type": "string",
"description": "RationalGRL defeater description when dispatch_status=blocked"
}
}
},
"OQLPlanAcceptance": {
"type": "object",
"required": ["acceptance_id", "oql_plan_id", "acceptance_status"],
"additionalProperties": false,
"properties": {
"acceptance_id": { "type": "string", "minLength": 1 },
"oql_plan_id": { "type": "string", "minLength": 1 },
"acceptance_status": {
"type": "string",
"enum": ["accepted", "rejected", "partial", "pending_review"]
},
"interpretation_ref": { "type": "string" },
"oql_task_mappings": {
"type": "array",
"items": { "$ref": "#/$defs/OQLTaskMapping" }
}
}
},
"OQLTaskMapping": {
"type": "object",
"required": ["task_id", "oql_task_ref", "agent_action_ref"],
"additionalProperties": false,
"properties": {
"task_id": { "type": "string" },
"oql_task_ref": { "type": "string" },
"agent_action_ref": { "type": "string" }
}
},
"OACCompilerInvocation": {
"type": "object",
"required": ["invocation_id", "compiler_id", "artifact_manifest_id", "invocation_status"],
"additionalProperties": false,
"properties": {
"invocation_id": { "type": "string", "minLength": 1 },
"compiler_id": { "type": "string", "minLength": 1 },
"artifact_manifest_id": { "type": "string", "minLength": 1 },
"invocation_status": {
"type": "string",
"enum": ["success", "failure", "partial"]
},
"artifact_emission_refs": {
"type": "array",
"items": { "type": "string" }
}
}
},
"SubagentDelegation": {
"type": "object",
"required": ["delegation_id", "delegated_to", "task_ref", "policy_decision_ref"],
"additionalProperties": false,
"properties": {
"delegation_id": { "type": "string", "minLength": 1 },
"delegated_to": { "type": "string", "minLength": 1 },
"task_ref": { "type": "string", "minLength": 1 },
"policy_decision_ref": { "type": "string", "minLength": 1 }
}
},
"AttestationEvent": {
"type": "object",
"required": ["attestation_id", "attestation_type", "attested_by"],
"additionalProperties": false,
"properties": {
"attestation_id": { "type": "string", "minLength": 1 },
"attestation_type": {
"type": "string",
"enum": ["policy_compliance", "provenance_chain", "dataset_access", "tool_grant", "oql_plan_acceptance"]
},
"attested_by": { "type": "string", "minLength": 1 },
"ref": { "type": "string" }
}
},
"RationalGRLTrace": {
"type": "object",
"required": ["trace_id", "goals_addressed", "tasks_executed"],
"additionalProperties": false,
"properties": {
"trace_id": { "type": "string", "minLength": 1 },
"goals_addressed": {
"type": "array",
"items": {
"type": "object",
"required": ["goal_ref", "goal_type", "satisfaction_status"],
"additionalProperties": false,
"properties": {
"goal_ref": { "type": "string" },
"goal_type": {
"type": "string",
"enum": ["goal", "softgoal"]
},
"satisfaction_status": {
"type": "string",
"enum": ["satisfied", "partially_satisfied", "denied", "unknown"]
},
"contribution_refs": {
"type": "array",
"items": { "type": "string" }
}
}
}
},
"tasks_executed": {
"type": "array",
"items": {
"type": "object",
"required": ["task_ref", "execution_status"],
"additionalProperties": false,
"properties": {
"task_ref": { "type": "string" },
"execution_status": {
"type": "string",
"enum": ["completed", "blocked", "delegated", "deferred"]
},
"resource_used_refs": {
"type": "array",
"items": { "type": "string" }
},
"dependency_satisfied_refs": {
"type": "array",
"items": { "type": "string" }
},
"defeater_reason": { "type": "string" }
}
}
},
"dependencies_blocked": {
"type": "array",
"items": {
"type": "object",
"required": ["dependency_ref", "blocking_policy_ref"],
"additionalProperties": false,
"properties": {
"dependency_ref": { "type": "string" },
"blocking_policy_ref": { "type": "string" },
"defeater_reason": { "type": "string" }
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"_reject_reason": "hellgraph_evidence_refs is required but absent",
"kind": "CivicStackRunCapsule",
"run_id": "civic-stack-run:reject-no-hellgraph",
"actor_ref": "agent://agentplane/civic-stack-agent/v1",
"oql_plan_id": "oql://plan/service-delivery-v1/step-1",
"artifact_manifest_id": "manifest://civic-stack/artifacts/reject-no-hellgraph",
"policy_decision_id": "policy-fabric://decision/pd-reject-no-hellgraph",
"timestamps": {
"started_at": "2024-01-15T10:00:00Z",
"completed_at": "2024-01-15T10:01:00Z"
},
"provenance_refs": ["provenance://sociosphere/civic-stack-run/reject-no-hellgraph"],
"rationalgrl_trace": {
"trace_id": "rationalgrl-trace:reject-no-hellgraph",
"goals_addressed": [],
"tasks_executed": []
},
"issued_at": "2024-01-15T10:01:01Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"_reject_reason": "provenance_refs is required (minItems: 1) but empty",
"kind": "CivicStackRunCapsule",
"run_id": "civic-stack-run:reject-empty-provenance",
"actor_ref": "agent://agentplane/civic-stack-agent/v1",
"oql_plan_id": "oql://plan/service-delivery-v1/step-1",
"artifact_manifest_id": "manifest://civic-stack/artifacts/reject-empty-provenance",
"policy_decision_id": "policy-fabric://decision/pd-reject-empty-provenance",
"timestamps": {
"started_at": "2024-01-15T10:00:00Z",
"completed_at": "2024-01-15T10:01:00Z"
},
"provenance_refs": [],
"rationalgrl_trace": {
"trace_id": "rationalgrl-trace:reject-empty-provenance",
"goals_addressed": [],
"tasks_executed": []
},
"hellgraph_evidence_refs": ["evidence://hellgraph/reject-empty-provenance/run-capsule"],
"issued_at": "2024-01-15T10:01:01Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"_reject_reason": "kind must be CivicStackRunCapsule (const violation)",
"kind": "CivicStackRunCapsuleV2",
"run_id": "civic-stack-run:reject-wrong-kind",
"actor_ref": "agent://agentplane/civic-stack-agent/v1",
"oql_plan_id": "oql://plan/service-delivery-v1/step-1",
"artifact_manifest_id": "manifest://civic-stack/artifacts/reject-wrong-kind",
"policy_decision_id": "policy-fabric://decision/pd-reject-wrong-kind",
"timestamps": {
"started_at": "2024-01-15T10:00:00Z",
"completed_at": "2024-01-15T10:01:00Z"
},
"provenance_refs": ["provenance://sociosphere/civic-stack-run/reject-wrong-kind"],
"rationalgrl_trace": {
"trace_id": "rationalgrl-trace:reject-wrong-kind",
"goals_addressed": [],
"tasks_executed": []
},
"hellgraph_evidence_refs": ["evidence://hellgraph/reject-wrong-kind/run-capsule"],
"issued_at": "2024-01-15T10:01:01Z"
}
Loading
Loading