archctx-contracts 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fixtures/boundary/attestation-v2-error.json +1 -1
- package/fixtures/invalid/attestation-v2-finding-field.json +1 -1
- package/fixtures/valid/attestation-v2.json +1 -1
- package/fixtures/valid/practice-catalog-manifest.json +1 -1
- package/fixtures/valid/product-version-manifest.json +5 -5
- package/package.json +6 -4
- package/schemas/cloud/attestation-v2.schema.json +85 -0
- package/schemas/cloud/attestation.schema.json +49 -0
- package/schemas/cloud/check-delivery.schema.json +25 -0
- package/schemas/cloud/cloud-egress-envelope.schema.json +19 -0
- package/schemas/cloud/device-identity.schema.json +18 -0
- package/schemas/cloud/entitlement.schema.json +24 -0
- package/schemas/cloud/governance-key-status.schema.json +19 -0
- package/schemas/cloud/org-runner-identity.schema.json +21 -0
- package/schemas/cloud/review-challenge-v2.schema.json +23 -0
- package/schemas/cloud/runner-identity.schema.json +42 -0
- package/schemas/integrations/adapter-fidelity.schema.json +21 -0
- package/schemas/integrations/chatgpt-ga-tool.schema.json +25 -0
- package/schemas/integrations/likec4-mapping.schema.json +32 -0
- package/schemas/integrations/structurizr-mapping.schema.json +33 -0
- package/schemas/repo/architecture-intervention.schema.json +41 -0
- package/schemas/repo/architecture-node.schema.json +50 -0
- package/schemas/repo/architecture-relation.schema.json +26 -0
- package/schemas/repo/compatibility-contract.schema.json +49 -0
- package/schemas/repo/constraint.schema.json +56 -0
- package/schemas/repo/cross-repo-relation.schema.json +47 -0
- package/schemas/repo/landscape.schema.json +50 -0
- package/schemas/repo/practices/practice-policy.schema.json +72 -0
- package/schemas/repo/practices/practice-profile.schema.json +30 -0
- package/schemas/repo/practices/practice-source.schema.json +34 -0
- package/schemas/repo/practices/practice-waiver.schema.json +27 -0
- package/schemas/repo/practices/practice.schema.json +88 -0
- package/schemas/runtime/agent-job.schema.json +63 -0
- package/schemas/runtime/architecture-candidate-delta-policy.schema.json +129 -0
- package/schemas/runtime/architecture-candidate-delta.schema.json +386 -0
- package/schemas/runtime/architecture-event.schema.json +76 -0
- package/schemas/runtime/architecture-snapshot.schema.json +61 -0
- package/schemas/runtime/architecture-subject-selector.schema.json +31 -0
- package/schemas/runtime/changeset.schema.json +65 -0
- package/schemas/runtime/evidence-binding.schema.json +37 -0
- package/schemas/runtime/evidence-item.schema.json +58 -0
- package/schemas/runtime/explorer-projection.schema.json +92 -0
- package/schemas/runtime/explorer-service.schema.json +19 -0
- package/schemas/runtime/external-document-resource.schema.json +55 -0
- package/schemas/runtime/investigation-report.schema.json +119 -0
- package/schemas/runtime/notification-event.schema.json +18 -0
- package/schemas/runtime/notification-provider.schema.json +26 -0
- package/schemas/runtime/practice-catalog-manifest.schema.json +22 -0
- package/schemas/runtime/practice-check-result.schema.json +45 -0
- package/schemas/runtime/practice-checkpoint.schema.json +127 -0
- package/schemas/runtime/practice-guidance.schema.json +44 -0
- package/schemas/runtime/practice-match.schema.json +41 -0
- package/schemas/runtime/product-version-manifest.schema.json +115 -0
- package/schemas/runtime/projection-target.schema.json +52 -0
- package/schemas/runtime/recommendation-feedback.schema.json +53 -0
- package/schemas/runtime/recommendation-run.schema.json +62 -0
- package/schemas/runtime/recommendation.schema.json +26 -0
- package/schemas/runtime/retrieval-config.schema.json +44 -0
- package/schemas/runtime/retrieval-decision.schema.json +49 -0
- package/schemas/runtime/retrieval-eval.schema.json +29 -0
- package/schemas/runtime/review-result.schema.json +48 -0
- package/schemas/runtime/task-context.schema.json +53 -0
- package/src/ledger.ts +2 -1
- package/src/product-version.ts +1 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archctx.repoharness.com/schemas/runtime/practice-checkpoint.schema.json",
|
|
4
|
+
"title": "PracticeCheckpoint",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"taskSessionId",
|
|
10
|
+
"event",
|
|
11
|
+
"headSha",
|
|
12
|
+
"worktreeDigest",
|
|
13
|
+
"fresh",
|
|
14
|
+
"reasonCode",
|
|
15
|
+
"staleReasons",
|
|
16
|
+
"changedPaths",
|
|
17
|
+
"catalogDigest",
|
|
18
|
+
"contextDigest",
|
|
19
|
+
"practiceGuidanceDigest",
|
|
20
|
+
"delta",
|
|
21
|
+
"noOpDigest",
|
|
22
|
+
"resultDigest",
|
|
23
|
+
"hook",
|
|
24
|
+
"nextSnapshot"
|
|
25
|
+
],
|
|
26
|
+
"properties": {
|
|
27
|
+
"schemaVersion": { "const": "archcontext.practice-checkpoint/v1" },
|
|
28
|
+
"taskSessionId": { "type": "string", "minLength": 1 },
|
|
29
|
+
"event": { "enum": ["manual", "post-edit", "post-write", "pre-complete"] },
|
|
30
|
+
"headSha": { "type": "string", "minLength": 1 },
|
|
31
|
+
"expectedHeadSha": { "type": "string", "minLength": 1 },
|
|
32
|
+
"worktreeDigest": { "type": "string", "pattern": "^sha256:" },
|
|
33
|
+
"expectedWorktreeDigest": { "type": "string", "pattern": "^sha256:" },
|
|
34
|
+
"fresh": { "type": "boolean" },
|
|
35
|
+
"reasonCode": { "enum": ["fresh", "stale-head", "stale-worktree", "stale-catalog", "no-baseline", "no-op"] },
|
|
36
|
+
"staleReasons": {
|
|
37
|
+
"type": "array",
|
|
38
|
+
"items": { "enum": ["fresh", "stale-head", "stale-worktree", "stale-catalog", "no-baseline", "no-op"] }
|
|
39
|
+
},
|
|
40
|
+
"changedPaths": { "type": "array", "items": { "type": "string" } },
|
|
41
|
+
"toolCallId": { "type": "string" },
|
|
42
|
+
"catalogDigest": { "type": "string", "pattern": "^sha256:" },
|
|
43
|
+
"previousCatalogDigest": { "type": "string", "pattern": "^sha256:" },
|
|
44
|
+
"contextDigest": { "type": "string", "pattern": "^sha256:" },
|
|
45
|
+
"previousContextDigest": { "type": "string", "pattern": "^sha256:" },
|
|
46
|
+
"practiceGuidanceDigest": { "type": "string", "pattern": "^sha256:" },
|
|
47
|
+
"previousPracticeGuidanceDigest": { "type": "string", "pattern": "^sha256:" },
|
|
48
|
+
"delta": { "$ref": "#/$defs/delta" },
|
|
49
|
+
"noOpDigest": { "type": "string", "pattern": "^sha256:" },
|
|
50
|
+
"resultDigest": { "type": "string", "pattern": "^sha256:" },
|
|
51
|
+
"hook": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": true,
|
|
54
|
+
"required": ["egress", "failOpen", "pathCount", "network"],
|
|
55
|
+
"properties": {
|
|
56
|
+
"egress": { "const": "none" },
|
|
57
|
+
"failOpen": { "const": true },
|
|
58
|
+
"pathCount": { "type": "integer", "minimum": 0 },
|
|
59
|
+
"network": { "const": "forbidden" },
|
|
60
|
+
"pathSummary": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"required": ["schemaVersion", "total", "source", "generated", "ignored", "binary", "deleted", "renameHints"],
|
|
64
|
+
"properties": {
|
|
65
|
+
"schemaVersion": { "const": "archcontext.checkpoint-path-summary/v1" },
|
|
66
|
+
"total": { "type": "integer", "minimum": 0 },
|
|
67
|
+
"source": { "type": "integer", "minimum": 0 },
|
|
68
|
+
"generated": { "type": "integer", "minimum": 0 },
|
|
69
|
+
"ignored": { "type": "integer", "minimum": 0 },
|
|
70
|
+
"binary": { "type": "integer", "minimum": 0 },
|
|
71
|
+
"deleted": { "type": "integer", "minimum": 0 },
|
|
72
|
+
"renameHints": { "type": "integer", "minimum": 0 }
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"coalesced": { "type": "boolean" },
|
|
76
|
+
"skippedAnalysis": { "type": "boolean" },
|
|
77
|
+
"coalescedEventCount": { "type": "integer", "minimum": 1 },
|
|
78
|
+
"coalesceKey": { "type": "string", "pattern": "^sha256:" },
|
|
79
|
+
"elapsedMs": { "type": "integer", "minimum": 0 }
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"nextSnapshot": { "$ref": "#/$defs/snapshot" }
|
|
83
|
+
},
|
|
84
|
+
"$defs": {
|
|
85
|
+
"delta": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"required": ["schemaVersion", "added", "removed", "upgraded", "downgraded", "unchanged", "requiresProof"],
|
|
89
|
+
"properties": {
|
|
90
|
+
"schemaVersion": { "const": "archcontext.practice-delta/v1" },
|
|
91
|
+
"added": { "type": "array", "items": { "$ref": "#/$defs/match" } },
|
|
92
|
+
"removed": { "type": "array", "items": { "$ref": "#/$defs/match" } },
|
|
93
|
+
"upgraded": { "type": "array", "items": { "$ref": "#/$defs/match" } },
|
|
94
|
+
"downgraded": { "type": "array", "items": { "$ref": "#/$defs/match" } },
|
|
95
|
+
"unchanged": { "type": "array", "items": { "$ref": "#/$defs/match" } },
|
|
96
|
+
"requiresProof": { "type": "array", "items": { "$ref": "#/$defs/match" } }
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"match": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"additionalProperties": true,
|
|
102
|
+
"required": ["schemaVersion", "practiceId", "assetDigest", "enforcement", "confidence"],
|
|
103
|
+
"properties": {
|
|
104
|
+
"schemaVersion": { "const": "archcontext.practice-match/v1" },
|
|
105
|
+
"practiceId": { "type": "string" },
|
|
106
|
+
"assetDigest": { "type": "string", "pattern": "^sha256:" },
|
|
107
|
+
"enforcement": { "enum": ["advisory", "checkpoint", "complete"] },
|
|
108
|
+
"confidence": { "enum": ["low", "medium", "high"] }
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"snapshot": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": false,
|
|
114
|
+
"required": ["schemaVersion", "task", "headSha", "worktreeDigest", "contextDigest", "practiceGuidanceDigest", "catalogDigest", "matches"],
|
|
115
|
+
"properties": {
|
|
116
|
+
"schemaVersion": { "const": "archcontext.practice-checkpoint-snapshot/v1" },
|
|
117
|
+
"task": { "type": "string" },
|
|
118
|
+
"headSha": { "type": "string" },
|
|
119
|
+
"worktreeDigest": { "type": "string", "pattern": "^sha256:" },
|
|
120
|
+
"contextDigest": { "type": "string", "pattern": "^sha256:" },
|
|
121
|
+
"practiceGuidanceDigest": { "type": "string", "pattern": "^sha256:" },
|
|
122
|
+
"catalogDigest": { "type": "string", "pattern": "^sha256:" },
|
|
123
|
+
"matches": { "type": "array", "items": { "$ref": "#/$defs/match" } }
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archctx.repoharness.com/schemas/runtime/practice-guidance.schema.json",
|
|
4
|
+
"title": "PracticeGuidance",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "catalogDigest", "overlayDigest", "matches", "constraints", "decisions", "realConstraints", "unknowns", "requiredCheckpoints", "resources"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.practice-guidance/v1" },
|
|
10
|
+
"catalogDigest": { "type": "string", "pattern": "^sha256:" },
|
|
11
|
+
"overlayDigest": { "type": "string", "pattern": "^sha256:" },
|
|
12
|
+
"matches": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"additionalProperties": true,
|
|
17
|
+
"required": ["schemaVersion", "practiceId", "assetDigest"],
|
|
18
|
+
"properties": {
|
|
19
|
+
"schemaVersion": { "const": "archcontext.practice-match/v1" },
|
|
20
|
+
"practiceId": { "type": "string" },
|
|
21
|
+
"assetDigest": { "type": "string", "pattern": "^sha256:" }
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"constraints": { "type": "array", "items": { "type": "string" } },
|
|
26
|
+
"decisions": { "type": "array", "items": { "type": "string" } },
|
|
27
|
+
"realConstraints": { "type": "array", "items": { "type": "string" } },
|
|
28
|
+
"unknowns": { "type": "array", "items": { "type": "string" } },
|
|
29
|
+
"requiredCheckpoints": { "type": "array", "items": { "type": "string" } },
|
|
30
|
+
"resources": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"items": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"required": ["type", "uri", "digest"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"type": { "const": "practice" },
|
|
38
|
+
"uri": { "type": "string" },
|
|
39
|
+
"digest": { "type": "string", "pattern": "^sha256:" }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archctx.repoharness.com/schemas/runtime/practice-match.schema.json",
|
|
4
|
+
"title": "PracticeMatch",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "practiceId", "assetRevision", "assetDigest", "title", "category", "score", "confidence", "enforcement", "matchedBy", "evidence", "explanation", "sourceTrust"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.practice-match/v1" },
|
|
10
|
+
"practiceId": { "type": "string" },
|
|
11
|
+
"assetRevision": { "type": "integer", "minimum": 1 },
|
|
12
|
+
"assetDigest": { "type": "string", "pattern": "^sha256:" },
|
|
13
|
+
"title": { "type": "string" },
|
|
14
|
+
"category": { "type": "string" },
|
|
15
|
+
"score": { "type": "number", "minimum": 0, "maximum": 100 },
|
|
16
|
+
"confidence": { "type": "string", "enum": ["low", "medium", "high"] },
|
|
17
|
+
"enforcement": { "type": "string", "enum": ["advisory", "checkpoint", "complete"] },
|
|
18
|
+
"matchedBy": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": { "type": "string", "enum": ["retrieval", "scope", "signal", "predicate", "repo-policy"] }
|
|
21
|
+
},
|
|
22
|
+
"evidence": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"required": ["kind", "strength", "subject"],
|
|
28
|
+
"properties": {
|
|
29
|
+
"kind": { "type": "string" },
|
|
30
|
+
"strength": { "type": "string", "enum": ["heuristic", "declared", "observed", "verified"] },
|
|
31
|
+
"subject": { "type": "string" },
|
|
32
|
+
"digest": { "type": "string", "pattern": "^sha256:" },
|
|
33
|
+
"observedAt": { "type": "string" }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"explanation": { "type": "array", "items": { "type": "string" } },
|
|
38
|
+
"sourceTrust": { "type": "string", "enum": ["repo-authored", "curated-static", "external-dynamic"] },
|
|
39
|
+
"suppressedReason": { "type": "string" }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archcontext.dev/schemas/runtime/product-version-manifest.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["schemaVersion", "product", "packageManager", "engines", "surfaces", "schemas", "runtime"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": "archcontext.product-version-manifest/v1" },
|
|
9
|
+
"product": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"additionalProperties": false,
|
|
12
|
+
"required": ["name", "version", "distribution"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"name": { "const": "archctx" },
|
|
15
|
+
"version": { "$ref": "#/$defs/semver" },
|
|
16
|
+
"distribution": { "enum": ["one-package"] }
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"packageManager": { "type": "string", "minLength": 1 },
|
|
20
|
+
"engines": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["node"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"node": { "const": ">=24 <26" }
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"surfaces": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": ["cli", "daemon", "mcp"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"cli": { "$ref": "#/$defs/surface" },
|
|
34
|
+
"daemon": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["packageName", "version", "entrypoint", "rpcSchemaVersion"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"packageName": { "type": "string", "minLength": 1 },
|
|
40
|
+
"version": { "$ref": "#/$defs/semver" },
|
|
41
|
+
"entrypoint": { "type": "string", "minLength": 1 },
|
|
42
|
+
"rpcSchemaVersion": { "const": "archcontext.runtime-rpc/v1" }
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"mcp": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": ["packageName", "version", "entrypoint", "transport"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"packageName": { "type": "string", "minLength": 1 },
|
|
51
|
+
"version": { "$ref": "#/$defs/semver" },
|
|
52
|
+
"entrypoint": { "type": "string", "minLength": 1 },
|
|
53
|
+
"transport": { "enum": ["stdio"] }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"schemas": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"required": ["schemaSetVersion", "contractsPackageVersion", "reviewChallenge", "attestation", "deviceIdentity", "runnerIdentity"],
|
|
62
|
+
"properties": {
|
|
63
|
+
"schemaSetVersion": { "type": "string", "minLength": 1 },
|
|
64
|
+
"contractsPackageVersion": { "$ref": "#/$defs/semver" },
|
|
65
|
+
"reviewChallenge": { "const": "archcontext.review-challenge/v2" },
|
|
66
|
+
"attestation": { "const": "archcontext.attestation/v2" },
|
|
67
|
+
"deviceIdentity": { "const": "archcontext.device-identity/v1" },
|
|
68
|
+
"runnerIdentity": { "const": "archcontext.runner-identity/v1" }
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"runtime": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"required": ["localRpc", "sqliteMigrations", "codeGraph"],
|
|
75
|
+
"properties": {
|
|
76
|
+
"localRpc": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"additionalProperties": false,
|
|
79
|
+
"required": ["schemaVersion", "protocol"],
|
|
80
|
+
"properties": {
|
|
81
|
+
"schemaVersion": { "const": "archcontext.runtime-rpc/v1" },
|
|
82
|
+
"protocol": { "enum": ["http-loopback"] }
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"sqliteMigrations": { "type": "string", "minLength": 1 },
|
|
86
|
+
"codeGraph": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"required": ["packageName", "requiredVersion", "adapter"],
|
|
90
|
+
"properties": {
|
|
91
|
+
"packageName": { "const": "@colbymchenry/codegraph" },
|
|
92
|
+
"requiredVersion": { "type": "string", "minLength": 1 },
|
|
93
|
+
"adapter": { "enum": ["codegraph-cli"] }
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"$defs": {
|
|
100
|
+
"semver": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$"
|
|
103
|
+
},
|
|
104
|
+
"surface": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"required": ["packageName", "version", "entrypoint"],
|
|
108
|
+
"properties": {
|
|
109
|
+
"packageName": { "type": "string", "minLength": 1 },
|
|
110
|
+
"version": { "$ref": "#/$defs/semver" },
|
|
111
|
+
"entrypoint": { "type": "string", "minLength": 1 }
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archcontext.dev/schemas/runtime/projection-target.schema.json",
|
|
4
|
+
"title": "ProjectionTarget",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "targetId", "type", "scope", "path", "ownership", "generatedRegion", "rendererVersion", "format", "sourceDigest", "outputDigest"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.projection-target/v1" },
|
|
10
|
+
"targetId": { "type": "string", "pattern": "^projection_target\\.[a-zA-Z0-9_.-]+$" },
|
|
11
|
+
"type": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": ["architecture-index", "entity-summary", "relation-summary", "decision-index", "architecture-changelog", "diagram-mermaid", "diagram-structurizr", "diagram-likec4", "agent-context"]
|
|
14
|
+
},
|
|
15
|
+
"scope": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"required": ["kind"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"kind": { "type": "string", "enum": ["repository", "entity", "relation", "decision", "diagram", "changelog"] },
|
|
21
|
+
"id": { "type": "string" },
|
|
22
|
+
"entityKind": { "type": "string" }
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"path": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"minLength": 1,
|
|
28
|
+
"not": {
|
|
29
|
+
"anyOf": [
|
|
30
|
+
{ "pattern": "^/" },
|
|
31
|
+
{ "pattern": "\\\\" },
|
|
32
|
+
{ "pattern": "(^|/)\\.\\.(/|$)" }
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"ownership": { "type": "string", "enum": ["generated", "mixed"] },
|
|
37
|
+
"generatedRegion": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"required": ["startMarker", "endMarker"],
|
|
41
|
+
"properties": {
|
|
42
|
+
"startMarker": { "type": "string", "minLength": 1 },
|
|
43
|
+
"endMarker": { "type": "string", "minLength": 1 }
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"rendererVersion": { "type": "string", "minLength": 1 },
|
|
47
|
+
"format": { "type": "string", "enum": ["markdown", "mermaid", "structurizr-json", "likec4"] },
|
|
48
|
+
"sourceDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
49
|
+
"outputDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
50
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archcontext.dev/schemas/runtime/recommendation-feedback.schema.json",
|
|
4
|
+
"title": "RecommendationFeedback",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "feedbackId", "recommendationId", "runId", "action", "previousStatus", "nextStatus", "actor", "reason", "explicit", "implicitAcceptance", "repository", "worktree", "createdAt"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.recommendation-feedback/v1" },
|
|
10
|
+
"feedbackId": { "type": "string", "pattern": "^(recommendation_feedback|rec_feedback)\\.[a-zA-Z0-9_.-]+$" },
|
|
11
|
+
"recommendationId": { "type": "string", "pattern": "^(recommendation|rec)\\.[a-zA-Z0-9_.-]+$" },
|
|
12
|
+
"runId": { "type": "string", "pattern": "^(recommendation_run|rec_run)\\.[a-zA-Z0-9_.-]+$" },
|
|
13
|
+
"action": { "enum": ["acknowledge", "accept", "reject", "defer", "waive", "resolve"] },
|
|
14
|
+
"previousStatus": { "enum": ["open", "acknowledged", "accepted", "rejected", "deferred", "waived", "resolved", "superseded", "expired"] },
|
|
15
|
+
"nextStatus": { "enum": ["open", "acknowledged", "accepted", "rejected", "deferred", "waived", "resolved", "superseded", "expired"] },
|
|
16
|
+
"actor": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": ["kind", "id", "source"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"kind": { "enum": ["developer", "daemon", "hook", "cli", "mcp", "subagent", "migration", "system"] },
|
|
22
|
+
"id": { "type": "string", "minLength": 1 },
|
|
23
|
+
"source": { "enum": ["cli", "mcp", "manual", "daemon", "system", "subagent"] }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"reason": { "type": "string", "minLength": 1 },
|
|
27
|
+
"explicit": { "const": true },
|
|
28
|
+
"implicitAcceptance": { "const": false },
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"required": ["repositoryId", "storageRepositoryId"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"repositoryId": { "type": "string" },
|
|
35
|
+
"storageRepositoryId": { "type": "string" }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"worktree": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": ["workspaceId", "storageWorkspaceId", "branch", "headSha", "worktreeDigest"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"workspaceId": { "type": "string" },
|
|
44
|
+
"storageWorkspaceId": { "type": "string" },
|
|
45
|
+
"branch": { "type": "string" },
|
|
46
|
+
"headSha": { "type": "string" },
|
|
47
|
+
"worktreeDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"createdAt": { "type": "string" },
|
|
51
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archcontext.dev/schemas/runtime/recommendation-run.schema.json",
|
|
4
|
+
"title": "RecommendationRun",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "runId", "repository", "worktree", "trigger", "engineVersion", "catalogDigest", "inputDigest", "outputDigest", "policyMode", "status", "startedAt", "recommendationIds", "metrics"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.recommendation-run/v1" },
|
|
10
|
+
"runId": { "type": "string", "pattern": "^rec_run\\.[a-zA-Z0-9_-]+$" },
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"required": ["repositoryId", "storageRepositoryId"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"repositoryId": { "type": "string" },
|
|
17
|
+
"storageRepositoryId": { "type": "string" }
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"worktree": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["workspaceId", "storageWorkspaceId", "branch", "headSha", "worktreeDigest"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"workspaceId": { "type": "string" },
|
|
26
|
+
"storageWorkspaceId": { "type": "string" },
|
|
27
|
+
"branch": { "type": "string" },
|
|
28
|
+
"headSha": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
|
|
29
|
+
"worktreeDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"trigger": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"required": ["level", "source"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"level": { "enum": ["L0", "L1", "L2", "L3", "L4"] },
|
|
38
|
+
"source": { "enum": ["prepare_task", "checkpoint", "plan_update", "apply_update", "complete_task", "git_hook", "yaml_import", "projection_reconcile", "migration", "manual"] }
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"engineVersion": { "type": "string" },
|
|
42
|
+
"catalogDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
43
|
+
"inputDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
44
|
+
"outputDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
45
|
+
"policyMode": { "enum": ["advisory", "checkpoint", "complete"] },
|
|
46
|
+
"status": { "enum": ["queued", "running", "succeeded", "failed", "superseded"] },
|
|
47
|
+
"startedAt": { "type": "string" },
|
|
48
|
+
"completedAt": { "type": "string" },
|
|
49
|
+
"recommendationIds": { "type": "array", "items": { "type": "string" } },
|
|
50
|
+
"metrics": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"required": ["matchCount", "evidenceBindingCount", "unboundEvidenceCount"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"matchCount": { "type": "integer", "minimum": 0 },
|
|
56
|
+
"evidenceBindingCount": { "type": "integer", "minimum": 0 },
|
|
57
|
+
"unboundEvidenceCount": { "type": "integer", "minimum": 0 }
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archcontext.dev/schemas/runtime/recommendation.schema.json",
|
|
4
|
+
"title": "Recommendation",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "recommendationId", "runId", "fingerprint", "subject", "status", "confidence", "enforcement", "risk", "uncertainty", "evidenceBindingIds", "explanation", "createdAt", "updatedAt"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.recommendation/v2" },
|
|
10
|
+
"recommendationId": { "type": "string", "pattern": "^rec\\.[a-zA-Z0-9_.-]+$" },
|
|
11
|
+
"runId": { "type": "string", "pattern": "^rec_run\\.[a-zA-Z0-9_-]+$" },
|
|
12
|
+
"fingerprint": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
13
|
+
"subject": { "type": "string" },
|
|
14
|
+
"practiceId": { "type": "string" },
|
|
15
|
+
"status": { "enum": ["open", "acknowledged", "accepted", "rejected", "deferred", "waived", "resolved", "superseded", "expired"] },
|
|
16
|
+
"confidence": { "enum": ["low", "medium", "high"] },
|
|
17
|
+
"enforcement": { "enum": ["advisory", "checkpoint", "complete"] },
|
|
18
|
+
"risk": { "enum": ["low", "medium", "high"] },
|
|
19
|
+
"uncertainty": { "enum": ["low", "medium", "high"] },
|
|
20
|
+
"evidenceBindingIds": { "type": "array", "items": { "type": "string", "pattern": "^binding\\.[a-zA-Z0-9_.-]+$" } },
|
|
21
|
+
"explanation": { "type": "array", "items": { "type": "string" } },
|
|
22
|
+
"createdAt": { "type": "string" },
|
|
23
|
+
"updatedAt": { "type": "string" },
|
|
24
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archctx.repoharness.com/schemas/runtime/retrieval-config.schema.json",
|
|
4
|
+
"title": "RetrievalConfig",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "defaultMode", "lexical", "embedding", "decisionGate"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.retrieval-config/v1" },
|
|
10
|
+
"defaultMode": { "type": "string", "enum": ["lexical"] },
|
|
11
|
+
"lexical": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"required": ["enabled", "tokenizer"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"enabled": { "const": true },
|
|
17
|
+
"tokenizer": { "type": "string", "enum": ["english-normalized+jieba-search"] }
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"embedding": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["enabled", "provider", "dimensions", "egress"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"enabled": { "type": "boolean" },
|
|
26
|
+
"provider": { "type": "string", "enum": ["local-deterministic", "local-provider"] },
|
|
27
|
+
"dimensions": { "type": "integer", "minimum": 1 },
|
|
28
|
+
"indexPath": { "type": "string" },
|
|
29
|
+
"egress": { "type": "string", "enum": ["forbidden"] }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"decisionGate": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"required": ["minContextRecallLift", "minConstraintRecallLift", "maxIrrelevantRatio", "maxToolCallIncrease"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"minContextRecallLift": { "type": "number", "minimum": 0 },
|
|
38
|
+
"minConstraintRecallLift": { "type": "number", "minimum": 0 },
|
|
39
|
+
"maxIrrelevantRatio": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
40
|
+
"maxToolCallIncrease": { "type": "integer", "minimum": 0 }
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archctx.repoharness.com/schemas/runtime/retrieval-decision.schema.json",
|
|
4
|
+
"title": "RetrievalDecisionRecord",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "decidedAt", "baseline", "candidate", "thresholds", "decision", "evidenceDigest"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.retrieval-decision/v1" },
|
|
10
|
+
"decidedAt": { "type": "string" },
|
|
11
|
+
"baseline": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"required": ["mode", "contextRecall", "constraintRecall", "irrelevantRatio", "toolCalls"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"mode": { "type": "string", "enum": ["lexical"] },
|
|
17
|
+
"contextRecall": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
18
|
+
"constraintRecall": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
19
|
+
"irrelevantRatio": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
20
|
+
"toolCalls": { "type": "integer", "minimum": 0 }
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"candidate": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": ["mode", "contextRecall", "constraintRecall", "irrelevantRatio", "toolCalls"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"mode": { "type": "string", "enum": ["embedding"] },
|
|
29
|
+
"contextRecall": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
30
|
+
"constraintRecall": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
31
|
+
"irrelevantRatio": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
32
|
+
"toolCalls": { "type": "integer", "minimum": 0 }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"thresholds": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"required": ["minContextRecallLift", "minConstraintRecallLift", "maxIrrelevantRatio", "maxToolCallIncrease"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"minContextRecallLift": { "type": "number", "minimum": 0 },
|
|
41
|
+
"minConstraintRecallLift": { "type": "number", "minimum": 0 },
|
|
42
|
+
"maxIrrelevantRatio": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
43
|
+
"maxToolCallIncrease": { "type": "integer", "minimum": 0 }
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"decision": { "type": "string", "enum": ["enable-embedding", "keep-lexical"] },
|
|
47
|
+
"evidenceDigest": { "type": "string" }
|
|
48
|
+
}
|
|
49
|
+
}
|