-
Notifications
You must be signed in to change notification settings - Fork 0
Publish bounded v1 goal and lifecycle contracts #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "kind": "ArtifactManifest", | ||
| "correlationId": "corr-20260611-001", | ||
| "promptId": "prompt-001", | ||
| "runId": "run-001", | ||
| "repo": "Coding-Autopilot-System/cas-contracts", | ||
| "actor": { "id": "gsd-orchestrator", "type": "workflow" }, | ||
| "timestamp": "2026-06-11T09:00:04Z", | ||
| "schemaVersion": "1.0.0", | ||
| "traceContext": { "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01" }, | ||
| "artifacts": [ | ||
| { | ||
| "kind": "schema", | ||
| "uri": "https://schemas.coding-autopilot.dev/v1.0/prompt-envelope.schema.json", | ||
| "sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "kind": "EvaluationResult", | ||
| "correlationId": "corr-20260611-001", | ||
| "promptId": "prompt-001", | ||
| "runId": "run-001", | ||
| "repo": "Coding-Autopilot-System/cas-contracts", | ||
| "actor": { "id": "cas-evals", "type": "service" }, | ||
| "timestamp": "2026-06-11T09:00:06Z", | ||
| "schemaVersion": "1.0.0", | ||
| "traceContext": { "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01" }, | ||
| "evaluator": "contract-completeness-v1", | ||
| "outcome": "passed", | ||
| "metrics": { | ||
| "schemaValidity": 1, | ||
| "traceability": 1 | ||
| }, | ||
| "evidence": [ | ||
| { "kind": "test-report", "uri": "cas://evidence/evaluation-001" } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "kind": "PolicyDecision", | ||
| "correlationId": "corr-20260611-001", | ||
| "promptId": "prompt-001", | ||
| "runId": "run-001", | ||
| "repo": "Coding-Autopilot-System/cas-contracts", | ||
| "actor": { "id": "policy-engine", "type": "service" }, | ||
| "timestamp": "2026-06-11T09:00:01Z", | ||
| "schemaVersion": "1.0.0", | ||
| "traceContext": { "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01" }, | ||
| "decision": "allow", | ||
| "policyVersion": "2026.06", | ||
| "reasons": ["Requested paths are within the contract repository."] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "kind": "PromptEnvelope", | ||
| "correlationId": "corr-20260611-001", | ||
| "promptId": "prompt-001", | ||
| "runId": "run-001", | ||
| "repo": "Coding-Autopilot-System/cas-contracts", | ||
| "actor": { "id": "kim", "type": "human", "displayName": "Repository owner" }, | ||
| "timestamp": "2026-06-11T09:00:00Z", | ||
| "schemaVersion": "1.0.0", | ||
| "traceContext": { "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01" }, | ||
| "intent": "Add a versioned lifecycle contract", | ||
| "prompt": "Define and validate the CAS lifecycle contracts.", | ||
| "constraints": ["No secrets in examples", "Preserve backward compatibility"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| { | ||
| "kind": "RunEvent", | ||
| "correlationId": "corr-20260611-001", | ||
| "promptId": "prompt-001", | ||
| "runId": "run-001", | ||
| "repo": "Coding-Autopilot-System/cas-contracts", | ||
| "actor": { "id": "gsd-orchestrator", "type": "workflow" }, | ||
| "timestamp": "2026-06-11T09:00:03Z", | ||
| "schemaVersion": "1.0.0", | ||
| "traceContext": { "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01" }, | ||
| "eventType": "validation.started", | ||
| "sequence": 1, | ||
| "status": "running", | ||
| "message": "Validating lifecycle fixtures." | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "kind": "VerificationResult", | ||
| "correlationId": "corr-20260611-001", | ||
| "promptId": "prompt-001", | ||
| "runId": "run-001", | ||
| "repo": "Coding-Autopilot-System/cas-contracts", | ||
| "actor": { "id": "ci", "type": "service" }, | ||
| "timestamp": "2026-06-11T09:00:05Z", | ||
| "schemaVersion": "1.0.0", | ||
| "traceContext": { "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01" }, | ||
| "outcome": "passed", | ||
| "checks": [ | ||
| { | ||
| "name": "contract-tests", | ||
| "outcome": "passed", | ||
| "evidenceUri": "https://github.com/Coding-Autopilot-System/cas-contracts/actions" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "kind": "WorkRequest", | ||
| "correlationId": "corr-20260611-001", | ||
| "promptId": "prompt-001", | ||
| "runId": "run-001", | ||
| "repo": "Coding-Autopilot-System/cas-contracts", | ||
| "actor": { "id": "autogen", "type": "agent" }, | ||
| "timestamp": "2026-06-11T09:00:02Z", | ||
| "schemaVersion": "1.0.0", | ||
| "traceContext": { "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01" }, | ||
| "workType": "change", | ||
| "objective": "Publish and validate the bounded v1 goal contract.", | ||
| "targetRef": "refs/heads/main", | ||
| "targetRepositories": ["Coding-Autopilot-System/cas-contracts"], | ||
| "successCriteria": [ | ||
| { "id": "contracts-pass", "description": "All contract examples and negative validation tests pass." } | ||
| ], | ||
| "constraints": ["Preserve all v0.1 payloads and schemas unchanged."], | ||
| "riskLevel": "medium", | ||
| "approvalPolicy": "risk-based", | ||
| "verificationProfile": "contracts-default", | ||
| "requiredCapabilities": ["json-schema", "node-test"], | ||
| "budget": { | ||
| "maxFanOut": 3, | ||
| "maxIterations": 3, | ||
| "maxAttemptsPerWorkItem": 3, | ||
| "maxRuntimeSeconds": 1800, | ||
| "maxModelCalls": 20 | ||
| }, | ||
| "stopPolicy": { "noProgressLimit": 2 } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "$id": "https://schemas.coding-autopilot.dev/v1.0/artifact-manifest.schema.json", | ||
| "title": "ArtifactManifest", | ||
| "type": "object", | ||
| "allOf": [ | ||
| { | ||
| "$ref": "common.schema.json#/$defs/lifecycleMetadata" | ||
| }, | ||
| { | ||
| "type": "object", | ||
| "required": [ | ||
| "kind", | ||
| "artifacts" | ||
| ], | ||
| "properties": { | ||
| "kind": { | ||
| "const": "ArtifactManifest" | ||
| }, | ||
| "artifacts": { | ||
| "type": "array", | ||
| "minItems": 1, | ||
| "items": { | ||
| "$ref": "common.schema.json#/$defs/evidence" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ], | ||
| "unevaluatedProperties": false | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "$id": "https://schemas.coding-autopilot.dev/v1.0/common.schema.json", | ||
| "title": "CAS Common Definitions", | ||
| "$defs": { | ||
| "actor": { | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "required": ["id", "type"], | ||
| "properties": { | ||
| "id": { "type": "string", "minLength": 1, "maxLength": 256 }, | ||
| "type": { | ||
| "type": "string", | ||
| "enum": ["human", "agent", "service", "workflow"] | ||
| }, | ||
| "displayName": { "type": "string", "minLength": 1, "maxLength": 256 } | ||
| } | ||
| }, | ||
| "traceContext": { | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "required": ["traceparent"], | ||
| "properties": { | ||
| "traceparent": { | ||
| "type": "string", | ||
| "pattern": "^[\\da-f]{2}-[\\da-f]{32}-[\\da-f]{16}-[\\da-f]{2}$" | ||
| }, | ||
| "tracestate": { "type": "string", "maxLength": 512 } | ||
| } | ||
| }, | ||
| "lifecycleMetadata": { | ||
| "type": "object", | ||
| "required": [ | ||
| "correlationId", | ||
| "promptId", | ||
| "runId", | ||
| "repo", | ||
| "actor", | ||
| "timestamp", | ||
| "schemaVersion", | ||
| "traceContext" | ||
| ], | ||
| "properties": { | ||
| "correlationId": { "type": "string", "minLength": 1, "maxLength": 128 }, | ||
| "promptId": { "type": "string", "minLength": 1, "maxLength": 128 }, | ||
| "runId": { "type": "string", "minLength": 1, "maxLength": 128 }, | ||
| "repo": { | ||
| "type": "string", | ||
| "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$" | ||
| }, | ||
| "actor": { "$ref": "#/$defs/actor" }, | ||
| "timestamp": { "type": "string", "format": "date-time" }, | ||
| "schemaVersion": { "const": "1.0.0" }, | ||
| "traceContext": { "$ref": "#/$defs/traceContext" } | ||
| } | ||
| }, | ||
| "evidence": { | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "required": ["kind", "uri"], | ||
| "properties": { | ||
| "kind": { "type": "string", "minLength": 1, "maxLength": 64 }, | ||
| "uri": { "type": "string", "format": "uri" }, | ||
| "sha256": { "type": "string", "pattern": "^[\\da-f]{64}$" } | ||
| } | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "$id": "https://schemas.coding-autopilot.dev/v1.0/evaluation-result.schema.json", | ||
| "title": "EvaluationResult", | ||
| "type": "object", | ||
| "allOf": [ | ||
| { | ||
| "$ref": "common.schema.json#/$defs/lifecycleMetadata" | ||
| }, | ||
| { | ||
| "type": "object", | ||
| "required": [ | ||
| "kind", | ||
| "evaluator", | ||
| "outcome", | ||
| "metrics", | ||
| "evidence" | ||
| ], | ||
| "properties": { | ||
| "kind": { | ||
| "const": "EvaluationResult" | ||
| }, | ||
| "evaluator": { | ||
| "type": "string", | ||
| "minLength": 1, | ||
| "maxLength": 256 | ||
| }, | ||
| "outcome": { | ||
| "enum": [ | ||
| "passed", | ||
| "failed", | ||
| "inconclusive" | ||
| ] | ||
| }, | ||
| "metrics": { | ||
| "type": "object", | ||
| "minProperties": 1, | ||
| "additionalProperties": { | ||
| "type": "number" | ||
| } | ||
| }, | ||
| "evidence": { | ||
| "type": "array", | ||
| "minItems": 1, | ||
| "items": { "$ref": "common.schema.json#/$defs/evidence" } | ||
| } | ||
| } | ||
| } | ||
| ], | ||
| "unevaluatedProperties": false | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "$id": "https://schemas.coding-autopilot.dev/v1.0/policy-decision.schema.json", | ||
| "title": "PolicyDecision", | ||
| "type": "object", | ||
| "allOf": [ | ||
| { | ||
| "$ref": "common.schema.json#/$defs/lifecycleMetadata" | ||
| }, | ||
| { | ||
| "type": "object", | ||
| "required": [ | ||
| "kind", | ||
| "decision", | ||
| "policyVersion", | ||
| "reasons" | ||
| ], | ||
| "properties": { | ||
| "kind": { | ||
| "const": "PolicyDecision" | ||
| }, | ||
| "decision": { | ||
| "enum": [ | ||
| "allow", | ||
| "deny", | ||
| "require-approval" | ||
| ] | ||
| }, | ||
| "policyVersion": { | ||
| "type": "string", | ||
| "minLength": 1, | ||
| "maxLength": 64 | ||
| }, | ||
| "reasons": { | ||
| "type": "array", | ||
| "minItems": 1, | ||
| "items": { | ||
| "type": "string", | ||
| "minLength": 1, | ||
| "maxLength": 1000 | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ], | ||
| "unevaluatedProperties": false | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For v1 records, this pattern accepts values such as
ff-00000000000000000000000000000000-0000000000000000-00, because it only checks lowercase hex lengths. The W3C Trace Context spec forbids versionffand all-zero trace-id/parent-id, so a record can satisfy the v1 schema while compliant downstream tracers must ignore itstraceparent.Useful? React with 👍 / 👎.