archctx 0.1.2 → 0.1.4-beta.0
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/NOTICE.md +23 -0
- package/assets/README.md +15 -0
- package/assets/catalog.yaml +393 -0
- package/assets/practices/api.contract-before-implementation.yaml +70 -0
- package/assets/practices/compatibility.expiry-contract.yaml +71 -0
- package/assets/practices/compatibility.single-owner.yaml +78 -0
- package/assets/practices/data.single-authoritative-model.yaml +67 -0
- package/assets/practices/decision.record-significant-change.yaml +69 -0
- package/assets/practices/migration.target-and-removal-state.yaml +82 -0
- package/assets/practices/modularity.no-new-cycle.yaml +71 -0
- package/assets/practices/modularity.respect-dependency-direction.yaml +74 -0
- package/assets/practices/observability.boundary-telemetry.yaml +65 -0
- package/assets/practices/ownership.explicit-lifecycle-owner.yaml +74 -0
- package/assets/practices/s6-expanded.yaml +1278 -0
- package/assets/practices/security.least-privilege.yaml +70 -0
- package/assets/practices/supply-chain.pinned-dependencies.yaml +65 -0
- package/assets/profiles/s6.yaml +194 -0
- package/assets/sources/core.yaml +211 -0
- package/assets/sources/s6.yaml +122 -0
- package/bin/archctx.mjs +18231 -2410
- package/bin/codegraph.mjs +6 -0
- package/package.json +8 -3
- 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
|
@@ -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"]
|
|
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
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archctx.repoharness.com/schemas/runtime/retrieval-eval.schema.json",
|
|
4
|
+
"title": "RetrievalEvalSet",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "id", "seed", "queries"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.retrieval-eval/v1" },
|
|
10
|
+
"id": { "type": "string" },
|
|
11
|
+
"seed": { "type": "integer", "minimum": 0 },
|
|
12
|
+
"queries": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"minItems": 1,
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"required": ["id", "text", "expectedContextIds", "expectedConstraintIds", "prohibitedContextIds"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"id": { "type": "string" },
|
|
21
|
+
"text": { "type": "string" },
|
|
22
|
+
"expectedContextIds": { "type": "array", "items": { "type": "string" } },
|
|
23
|
+
"expectedConstraintIds": { "type": "array", "items": { "type": "string" } },
|
|
24
|
+
"prohibitedContextIds": { "type": "array", "items": { "type": "string" } }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archctx.repoharness.com/schemas/runtime/review-result.schema.json",
|
|
4
|
+
"title": "ReviewResult",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "reviewId", "taskSessionId", "snapshot", "posture", "result", "summary", "findings"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.review/v1" },
|
|
10
|
+
"reviewId": { "type": "string" },
|
|
11
|
+
"taskSessionId": { "type": "string" },
|
|
12
|
+
"snapshot": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"required": ["headSha", "worktreeDigest", "modelDigest", "codeFactsDigest"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"headSha": { "type": "string" },
|
|
18
|
+
"worktreeDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
19
|
+
"modelDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
20
|
+
"codeFactsDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
21
|
+
"practiceCatalogDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
22
|
+
"practicePolicyDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
23
|
+
"practiceCheckResultDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
24
|
+
"projectionSourceDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
25
|
+
"projectionDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
26
|
+
"projectionRendererVersion": { "type": "string" }
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"posture": { "type": "string", "enum": ["normal", "structural", "intervention", "proof-required"] },
|
|
30
|
+
"result": { "type": "string", "enum": ["pass", "pass_with_warnings", "fail_action_required"] },
|
|
31
|
+
"summary": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"additionalProperties": false,
|
|
34
|
+
"required": ["errors", "warnings", "notices"],
|
|
35
|
+
"properties": {
|
|
36
|
+
"errors": { "type": "integer", "minimum": 0 },
|
|
37
|
+
"warnings": { "type": "integer", "minimum": 0 },
|
|
38
|
+
"notices": { "type": "integer", "minimum": 0 }
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"findings": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
|
|
42
|
+
"practiceViolations": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
|
|
43
|
+
"waiversApplied": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
|
|
44
|
+
"actionsRequired": { "type": "array", "items": { "type": "string" } },
|
|
45
|
+
"cleanup": { "type": "object", "additionalProperties": false, "properties": { "required": { "type": "integer" }, "completed": { "type": "integer" } } },
|
|
46
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archctx.repoharness.com/schemas/runtime/task-context.schema.json",
|
|
4
|
+
"title": "TaskContext",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "task", "posture", "architecturePressure", "refactorConfidence", "relevantNodes", "constraints", "decisions"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.task-context/v1" },
|
|
10
|
+
"task": { "type": "string" },
|
|
11
|
+
"posture": { "type": "string", "enum": ["normal", "structural", "intervention", "proof-required"] },
|
|
12
|
+
"architecturePressure": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"required": ["level", "score", "signals"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"level": { "type": "string", "enum": ["low", "medium", "high"] },
|
|
18
|
+
"score": { "type": "number", "minimum": 0, "maximum": 100 },
|
|
19
|
+
"signals": { "type": "array", "items": { "type": "string" } }
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"refactorConfidence": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": ["level", "score", "coverage"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"level": { "type": "string", "enum": ["low", "medium", "high"] },
|
|
28
|
+
"score": { "type": "number", "minimum": 0, "maximum": 100 },
|
|
29
|
+
"coverage": { "type": "array", "items": { "type": "string" } }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"relevantNodes": { "type": "array", "items": { "type": "string" } },
|
|
33
|
+
"constraints": { "type": "array", "items": { "type": "string" } },
|
|
34
|
+
"decisions": { "type": "array", "items": { "type": "string" } },
|
|
35
|
+
"realConstraints": { "type": "array", "items": { "type": "string" } },
|
|
36
|
+
"unknowns": { "type": "array", "items": { "type": "string" } },
|
|
37
|
+
"recommendedTargetState": { "type": "object", "additionalProperties": true },
|
|
38
|
+
"requiredCheckpoints": { "type": "array", "items": { "type": "string" } },
|
|
39
|
+
"resources": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
|
|
40
|
+
"practiceGuidance": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"additionalProperties": true,
|
|
43
|
+
"required": ["schemaVersion", "catalogDigest", "overlayDigest", "matches"],
|
|
44
|
+
"properties": {
|
|
45
|
+
"schemaVersion": { "const": "archcontext.practice-guidance/v1" },
|
|
46
|
+
"catalogDigest": { "type": "string", "pattern": "^sha256:" },
|
|
47
|
+
"overlayDigest": { "type": "string", "pattern": "^sha256:" },
|
|
48
|
+
"matches": { "type": "array", "items": { "type": "object", "additionalProperties": true } }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
52
|
+
}
|
|
53
|
+
}
|