archctx 0.1.3 → 0.1.4
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 +17591 -1752
- package/package.json +6 -2
- 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,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archcontext.dev/schemas/runtime/evidence-binding.schema.json",
|
|
4
|
+
"title": "EvidenceBinding",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "bindingId", "evidenceId", "target", "bindingReason", "authorityEffect", "createdAt", "provenance"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.evidence-binding/v1" },
|
|
10
|
+
"bindingId": { "type": "string", "pattern": "^binding\\.[a-zA-Z0-9_.-]+$" },
|
|
11
|
+
"evidenceId": { "type": "string", "pattern": "^evidence\\.[a-zA-Z0-9_.-]+$" },
|
|
12
|
+
"target": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"required": ["kind", "id"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"kind": { "enum": ["entity", "relation", "constraint", "recommendation", "practice", "event", "snapshot", "subject", "candidate-delta"] },
|
|
18
|
+
"id": { "type": "string" }
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"bindingReason": { "enum": ["direct-selector", "predicate-subject", "change-cursor", "human-attestation", "deterministic-check", "subagent-proposal"] },
|
|
22
|
+
"authorityEffect": { "enum": ["context-only", "ranking", "checkpoint-eligible", "complete-eligible"] },
|
|
23
|
+
"createdAt": { "type": "string" },
|
|
24
|
+
"provenance": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"required": ["producer", "command", "inputDigest"],
|
|
28
|
+
"properties": {
|
|
29
|
+
"producer": { "type": "string" },
|
|
30
|
+
"command": { "type": "string" },
|
|
31
|
+
"inputDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
32
|
+
"traceDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archcontext.dev/schemas/runtime/evidence-item.schema.json",
|
|
4
|
+
"title": "EvidenceItem",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "evidenceId", "kind", "strength", "polarity", "origin", "subject", "selector", "summary", "coverage", "supports", "provenance", "createdAt", "digest"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.evidence-item/v2" },
|
|
10
|
+
"evidenceId": { "type": "string", "pattern": "^evidence\\.[a-zA-Z0-9_.-]+$" },
|
|
11
|
+
"kind": { "type": "string" },
|
|
12
|
+
"strength": { "enum": ["heuristic", "declared", "observed", "verified"] },
|
|
13
|
+
"polarity": { "enum": ["positive", "absence", "declaration"] },
|
|
14
|
+
"origin": { "enum": ["codegraph", "model-store-yaml", "checkpoint", "runtime-daemon", "user", "subagent", "external-doc"] },
|
|
15
|
+
"subject": { "type": "string" },
|
|
16
|
+
"selector": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": ["kind", "id"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"kind": { "enum": ["repository", "path", "symbol", "relation", "constraint", "practice", "event", "snapshot"] },
|
|
22
|
+
"id": { "type": "string" },
|
|
23
|
+
"path": { "type": "string" },
|
|
24
|
+
"symbolId": { "type": "string" },
|
|
25
|
+
"startLine": { "type": "integer", "minimum": 1 },
|
|
26
|
+
"endLine": { "type": "integer", "minimum": 1 }
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"summary": { "type": "string" },
|
|
30
|
+
"coverage": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"required": ["level", "scope"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"level": { "enum": ["complete", "partial", "unknown"] },
|
|
36
|
+
"scope": { "type": "string" }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"supports": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": { "enum": ["recommendation", "checkpoint", "complete"] }
|
|
42
|
+
},
|
|
43
|
+
"provenance": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"required": ["producer", "command", "inputDigest"],
|
|
47
|
+
"properties": {
|
|
48
|
+
"producer": { "type": "string" },
|
|
49
|
+
"command": { "type": "string" },
|
|
50
|
+
"inputDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
51
|
+
"traceDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"createdAt": { "type": "string" },
|
|
55
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
56
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archctx.repoharness.com/schemas/runtime/explorer-projection.schema.json",
|
|
4
|
+
"title": "ExplorerProjection",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "generatedAt", "repository", "nodes", "relations", "verification", "pressure", "interventions", "capabilities"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.explorer-projection/v1" },
|
|
10
|
+
"generatedAt": { "type": "string" },
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"required": ["repositoryId", "headSha", "worktreeDigest"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"repositoryId": { "type": "string" },
|
|
17
|
+
"headSha": { "type": "string" },
|
|
18
|
+
"worktreeDigest": { "type": "string" },
|
|
19
|
+
"modelDigest": { "type": "string" }
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"nodes": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"required": ["id", "name", "kind", "verificationStatus", "pressure", "sourceSelectors"],
|
|
28
|
+
"properties": {
|
|
29
|
+
"id": { "type": "string" },
|
|
30
|
+
"name": { "type": "string" },
|
|
31
|
+
"kind": { "type": "string" },
|
|
32
|
+
"repositoryId": { "type": "string" },
|
|
33
|
+
"verificationStatus": { "type": "string", "enum": ["MATCHED", "DRIFT", "UNKNOWN", "VERIFIED"] },
|
|
34
|
+
"pressure": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["level", "score", "signals"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"level": { "type": "string", "enum": ["low", "medium", "high"] },
|
|
40
|
+
"score": { "type": "number", "minimum": 0, "maximum": 100 },
|
|
41
|
+
"signals": { "type": "array", "items": { "type": "string" } }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"sourceSelectors": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"additionalProperties": false,
|
|
49
|
+
"required": ["path"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"path": { "type": "string" },
|
|
52
|
+
"symbolId": { "type": "string" },
|
|
53
|
+
"startLine": { "type": "integer", "minimum": 1 },
|
|
54
|
+
"endLine": { "type": "integer", "minimum": 1 }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"relations": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"required": ["id", "source", "target", "kind", "verificationStatus"],
|
|
67
|
+
"properties": {
|
|
68
|
+
"id": { "type": "string" },
|
|
69
|
+
"source": { "type": "string" },
|
|
70
|
+
"target": { "type": "string" },
|
|
71
|
+
"kind": { "type": "string" },
|
|
72
|
+
"verificationStatus": { "type": "string", "enum": ["MATCHED", "DRIFT", "UNKNOWN", "VERIFIED"] }
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"landscape": { "type": "object", "additionalProperties": true },
|
|
77
|
+
"verification": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
|
|
78
|
+
"pressure": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
|
|
79
|
+
"interventions": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
|
|
80
|
+
"capabilities": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"required": ["readOnly", "mutationMode", "egress", "tokenRequired"],
|
|
84
|
+
"properties": {
|
|
85
|
+
"readOnly": { "const": true },
|
|
86
|
+
"mutationMode": { "type": "string", "enum": ["forbidden"] },
|
|
87
|
+
"egress": { "type": "string", "enum": ["none"] },
|
|
88
|
+
"tokenRequired": { "type": "boolean" }
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archctx.repoharness.com/schemas/runtime/explorer-service.schema.json",
|
|
4
|
+
"title": "ExplorerServiceContract",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "bindHost", "protocol", "optIn", "defaultEnabled", "tokenTtlSeconds", "readOnly", "allowedMethods", "egress"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.explorer-service/v1" },
|
|
10
|
+
"bindHost": { "const": "127.0.0.1" },
|
|
11
|
+
"protocol": { "const": "http-loopback" },
|
|
12
|
+
"optIn": { "const": true },
|
|
13
|
+
"defaultEnabled": { "const": false },
|
|
14
|
+
"tokenTtlSeconds": { "type": "integer", "minimum": 1 },
|
|
15
|
+
"readOnly": { "const": true },
|
|
16
|
+
"allowedMethods": { "type": "array", "items": { "type": "string", "enum": ["GET"] } },
|
|
17
|
+
"egress": { "type": "string", "enum": ["none"] }
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archcontext.dev/schemas/runtime/external-document-resource.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"schemaVersion",
|
|
8
|
+
"provider",
|
|
9
|
+
"libraryId",
|
|
10
|
+
"queryDigest",
|
|
11
|
+
"contentDigest",
|
|
12
|
+
"retrievedAt",
|
|
13
|
+
"expiresAt",
|
|
14
|
+
"trust",
|
|
15
|
+
"enforcement",
|
|
16
|
+
"cacheStatus",
|
|
17
|
+
"uri",
|
|
18
|
+
"byteCount",
|
|
19
|
+
"snippets",
|
|
20
|
+
"warning"
|
|
21
|
+
],
|
|
22
|
+
"properties": {
|
|
23
|
+
"schemaVersion": { "const": "archcontext.external-document/v1" },
|
|
24
|
+
"provider": { "const": "context7" },
|
|
25
|
+
"libraryId": { "type": "string", "pattern": "^/[A-Za-z0-9._-]+/[A-Za-z0-9._/@-]+$" },
|
|
26
|
+
"requestedVersion": { "type": "string", "minLength": 1 },
|
|
27
|
+
"resolvedVersion": { "type": "string", "minLength": 1 },
|
|
28
|
+
"queryDigest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
|
|
29
|
+
"contentDigest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
|
|
30
|
+
"retrievedAt": { "type": "string" },
|
|
31
|
+
"expiresAt": { "type": "string" },
|
|
32
|
+
"trust": { "const": "external-unverified" },
|
|
33
|
+
"enforcement": { "const": "advisory-only" },
|
|
34
|
+
"cacheStatus": { "enum": ["fresh", "stale", "miss"] },
|
|
35
|
+
"uri": { "type": "string", "pattern": "^archcontext://external-docs/context7/sha256:[0-9a-f]{64}$" },
|
|
36
|
+
"byteCount": { "type": "integer", "minimum": 0 },
|
|
37
|
+
"snippets": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"items": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": ["title", "contentPreview", "contentDigest", "sourceUri", "byteCount"],
|
|
43
|
+
"properties": {
|
|
44
|
+
"title": { "type": "string", "minLength": 1 },
|
|
45
|
+
"contentPreview": { "type": "string", "maxLength": 4000 },
|
|
46
|
+
"contentDigest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
|
|
47
|
+
"sourceUri": { "type": "string", "pattern": "^https://.+" },
|
|
48
|
+
"byteCount": { "type": "integer", "minimum": 0 }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"warning": { "const": "untrusted-documentation-data" },
|
|
53
|
+
"metadata": { "type": "object", "additionalProperties": true }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archcontext.dev/schemas/runtime/investigation-report.schema.json",
|
|
4
|
+
"title": "InvestigationReport",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "reportId", "jobId", "status", "findings", "outputDigest", "createdAt", "directMutationAllowed"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.investigation-report/v1" },
|
|
10
|
+
"reportId": { "type": "string", "pattern": "^investigation_report\\.[a-zA-Z0-9_-]+$" },
|
|
11
|
+
"jobId": { "type": "string", "pattern": "^agent_job\\.[a-zA-Z0-9_-]+$" },
|
|
12
|
+
"status": { "enum": ["succeeded", "failed", "partial"] },
|
|
13
|
+
"findings": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"required": ["findingId", "hypothesis", "evidenceBindingIds", "unknowns", "falsifier", "proposedDelta", "proposedDeltaDigest", "confidence"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"findingId": { "type": "string" },
|
|
21
|
+
"hypothesis": { "type": "string" },
|
|
22
|
+
"evidenceBindingIds": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"minItems": 1,
|
|
25
|
+
"items": { "type": "string", "pattern": "^binding\\.[a-zA-Z0-9_.-]+$" }
|
|
26
|
+
},
|
|
27
|
+
"unknowns": { "type": "array", "items": { "type": "string" } },
|
|
28
|
+
"falsifier": { "type": "string" },
|
|
29
|
+
"proposedDelta": { "$ref": "#/$defs/architectureCandidateChange" },
|
|
30
|
+
"proposedDeltaDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
31
|
+
"confidence": { "enum": ["low", "medium", "high"] }
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"outputDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
36
|
+
"createdAt": { "type": "string" },
|
|
37
|
+
"directMutationAllowed": { "const": false },
|
|
38
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
39
|
+
},
|
|
40
|
+
"$defs": {
|
|
41
|
+
"architectureCandidateChange": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"additionalProperties": false,
|
|
44
|
+
"required": [
|
|
45
|
+
"candidateChangeId",
|
|
46
|
+
"kind",
|
|
47
|
+
"target",
|
|
48
|
+
"stateDimension",
|
|
49
|
+
"changeKind",
|
|
50
|
+
"subjectSelectorIds",
|
|
51
|
+
"mappingIds",
|
|
52
|
+
"ambiguityIds",
|
|
53
|
+
"evidenceIds",
|
|
54
|
+
"confidence",
|
|
55
|
+
"heuristic",
|
|
56
|
+
"summary",
|
|
57
|
+
"digest"
|
|
58
|
+
],
|
|
59
|
+
"properties": {
|
|
60
|
+
"candidateChangeId": { "type": "string", "pattern": "^candidate_change\\.[a-zA-Z0-9_.-]+$" },
|
|
61
|
+
"kind": {
|
|
62
|
+
"enum": [
|
|
63
|
+
"node-added",
|
|
64
|
+
"node-removed",
|
|
65
|
+
"node-moved",
|
|
66
|
+
"node-renamed",
|
|
67
|
+
"node-materially-changed",
|
|
68
|
+
"relation-added",
|
|
69
|
+
"relation-removed",
|
|
70
|
+
"relation-moved",
|
|
71
|
+
"relation-renamed",
|
|
72
|
+
"relation-materially-changed",
|
|
73
|
+
"constraint-added",
|
|
74
|
+
"constraint-removed",
|
|
75
|
+
"constraint-moved",
|
|
76
|
+
"constraint-renamed",
|
|
77
|
+
"constraint-materially-changed",
|
|
78
|
+
"owner-added",
|
|
79
|
+
"owner-removed",
|
|
80
|
+
"owner-moved",
|
|
81
|
+
"owner-renamed",
|
|
82
|
+
"owner-materially-changed",
|
|
83
|
+
"lifecycle-added",
|
|
84
|
+
"lifecycle-removed",
|
|
85
|
+
"lifecycle-moved",
|
|
86
|
+
"lifecycle-renamed",
|
|
87
|
+
"lifecycle-materially-changed",
|
|
88
|
+
"migration-state-added",
|
|
89
|
+
"migration-state-removed",
|
|
90
|
+
"migration-state-moved",
|
|
91
|
+
"migration-state-renamed",
|
|
92
|
+
"migration-state-materially-changed"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"target": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"additionalProperties": false,
|
|
98
|
+
"required": ["kind", "id"],
|
|
99
|
+
"properties": {
|
|
100
|
+
"kind": { "enum": ["node", "relation", "constraint", "owner", "lifecycle", "migration-state"] },
|
|
101
|
+
"id": { "type": "string" },
|
|
102
|
+
"parentId": { "type": "string" }
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"stateDimension": { "enum": ["target-state", "migration-state"] },
|
|
106
|
+
"changeKind": { "enum": ["added", "removed", "moved", "renamed", "materially_changed"] },
|
|
107
|
+
"subjectSelectorIds": { "type": "array", "items": { "type": "string" } },
|
|
108
|
+
"mappingIds": { "type": "array", "items": { "type": "string" } },
|
|
109
|
+
"ambiguityIds": { "type": "array", "items": { "type": "string" } },
|
|
110
|
+
"evidenceIds": { "type": "array", "items": { "type": "string" } },
|
|
111
|
+
"confidence": { "enum": ["low", "medium", "high"] },
|
|
112
|
+
"heuristic": { "const": true },
|
|
113
|
+
"summary": { "type": "string" },
|
|
114
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
115
|
+
"extensions": { "type": "object", "additionalProperties": true }
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archctx.repoharness.com/schemas/runtime/notification-event.schema.json",
|
|
4
|
+
"title": "NotificationEvent",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "eventId", "prUrl", "result", "riskLevel", "commitSha", "runtimeVersion", "occurredAt"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.notification-event/v1" },
|
|
10
|
+
"eventId": { "type": "string", "pattern": "^notification\\.[a-z0-9][a-z0-9-]*$" },
|
|
11
|
+
"prUrl": { "type": "string", "pattern": "^https://github\\.com/[^/]+/[^/]+/pull/[0-9]+$" },
|
|
12
|
+
"result": { "type": "string", "enum": ["pass", "pass_with_warnings", "fail_action_required"] },
|
|
13
|
+
"riskLevel": { "type": "string", "enum": ["low", "medium", "high", "critical"] },
|
|
14
|
+
"commitSha": { "type": "string", "pattern": "^[a-f0-9]{7,40}$" },
|
|
15
|
+
"runtimeVersion": { "type": "string" },
|
|
16
|
+
"occurredAt": { "type": "string" }
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archctx.repoharness.com/schemas/runtime/notification-provider.schema.json",
|
|
4
|
+
"title": "NotificationProviderConfig",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "id", "provider", "enabled", "target", "retry"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.notification-provider/v1" },
|
|
10
|
+
"id": { "type": "string", "pattern": "^notification-provider\\.[a-z0-9][a-z0-9-]*$" },
|
|
11
|
+
"provider": { "type": "string", "enum": ["github-check", "slack", "webhook", "email"] },
|
|
12
|
+
"enabled": { "type": "boolean" },
|
|
13
|
+
"target": { "type": "string" },
|
|
14
|
+
"secretRef": { "type": "string", "pattern": "^(env|secret|keychain)://[A-Za-z0-9_.:/-]+$" },
|
|
15
|
+
"unsubscribeUrl": { "type": "string" },
|
|
16
|
+
"retry": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": ["maxAttempts", "backoffSeconds"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"maxAttempts": { "type": "integer", "minimum": 1, "maximum": 10 },
|
|
22
|
+
"backoffSeconds": { "type": "integer", "minimum": 1, "maximum": 3600 }
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"required": [
|
|
4
|
+
"schemaVersion",
|
|
5
|
+
"catalogVersion",
|
|
6
|
+
"productVersion",
|
|
7
|
+
"generatedAt",
|
|
8
|
+
"entries",
|
|
9
|
+
"sourceIds",
|
|
10
|
+
"catalogDigest"
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"schemaVersion": { "const": "archcontext.practice-catalog-manifest/v1" },
|
|
14
|
+
"catalogVersion": { "type": "string" },
|
|
15
|
+
"productVersion": { "type": "string" },
|
|
16
|
+
"generatedAt": { "type": "string" },
|
|
17
|
+
"entries": { "type": "array", "items": { "type": "object" } },
|
|
18
|
+
"sourceIds": { "type": "array", "items": { "type": "string" } },
|
|
19
|
+
"catalogDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
20
|
+
},
|
|
21
|
+
"additionalProperties": false
|
|
22
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archctx.repoharness.com/schemas/runtime/practice-check-result.schema.json",
|
|
4
|
+
"title": "PracticeCheckResult",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "practiceId", "checkId", "assetDigest", "enforcement", "status", "reasonCode", "deterministic", "subjects", "subjectDigests", "message", "remediation"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.practice-check-result/v1" },
|
|
10
|
+
"practiceId": { "type": "string", "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" },
|
|
11
|
+
"checkId": { "type": "string" },
|
|
12
|
+
"assetDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
13
|
+
"enforcement": { "type": "string", "enum": ["advisory", "checkpoint", "complete"] },
|
|
14
|
+
"status": { "type": "string", "enum": ["pass", "fail", "waived", "not_applicable"] },
|
|
15
|
+
"reasonCode": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": ["policy-disabled", "not-opted-in", "not-registered", "fixture-gate-missing", "heuristic-only", "no-baseline", "no-violation", "violation", "waived", "invalid-waiver"]
|
|
18
|
+
},
|
|
19
|
+
"deterministic": { "const": true },
|
|
20
|
+
"subjects": { "type": "array", "items": { "type": "string" } },
|
|
21
|
+
"subjectDigests": { "type": "array", "items": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" } },
|
|
22
|
+
"message": { "type": "string" },
|
|
23
|
+
"remediation": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": ["action", "paths"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"action": { "type": "string" },
|
|
29
|
+
"paths": { "type": "array", "items": { "type": "string" } }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"waiver": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"required": ["waiverDigest", "practiceId", "owner", "expiresAt"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"waiverDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
38
|
+
"practiceId": { "type": "string" },
|
|
39
|
+
"checkId": { "type": "string" },
|
|
40
|
+
"owner": { "type": "string" },
|
|
41
|
+
"expiresAt": { "type": "string" }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -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
|
+
}
|