archctx 0.1.3 → 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.
Files changed (77) hide show
  1. package/NOTICE.md +23 -0
  2. package/assets/README.md +15 -0
  3. package/assets/catalog.yaml +393 -0
  4. package/assets/practices/api.contract-before-implementation.yaml +70 -0
  5. package/assets/practices/compatibility.expiry-contract.yaml +71 -0
  6. package/assets/practices/compatibility.single-owner.yaml +78 -0
  7. package/assets/practices/data.single-authoritative-model.yaml +67 -0
  8. package/assets/practices/decision.record-significant-change.yaml +69 -0
  9. package/assets/practices/migration.target-and-removal-state.yaml +82 -0
  10. package/assets/practices/modularity.no-new-cycle.yaml +71 -0
  11. package/assets/practices/modularity.respect-dependency-direction.yaml +74 -0
  12. package/assets/practices/observability.boundary-telemetry.yaml +65 -0
  13. package/assets/practices/ownership.explicit-lifecycle-owner.yaml +74 -0
  14. package/assets/practices/s6-expanded.yaml +1278 -0
  15. package/assets/practices/security.least-privilege.yaml +70 -0
  16. package/assets/practices/supply-chain.pinned-dependencies.yaml +65 -0
  17. package/assets/profiles/s6.yaml +194 -0
  18. package/assets/sources/core.yaml +211 -0
  19. package/assets/sources/s6.yaml +122 -0
  20. package/bin/archctx.mjs +18231 -2410
  21. package/package.json +6 -2
  22. package/schemas/cloud/attestation-v2.schema.json +85 -0
  23. package/schemas/cloud/attestation.schema.json +49 -0
  24. package/schemas/cloud/check-delivery.schema.json +25 -0
  25. package/schemas/cloud/cloud-egress-envelope.schema.json +19 -0
  26. package/schemas/cloud/device-identity.schema.json +18 -0
  27. package/schemas/cloud/entitlement.schema.json +24 -0
  28. package/schemas/cloud/governance-key-status.schema.json +19 -0
  29. package/schemas/cloud/org-runner-identity.schema.json +21 -0
  30. package/schemas/cloud/review-challenge-v2.schema.json +23 -0
  31. package/schemas/cloud/runner-identity.schema.json +42 -0
  32. package/schemas/integrations/adapter-fidelity.schema.json +21 -0
  33. package/schemas/integrations/chatgpt-ga-tool.schema.json +25 -0
  34. package/schemas/integrations/likec4-mapping.schema.json +32 -0
  35. package/schemas/integrations/structurizr-mapping.schema.json +33 -0
  36. package/schemas/repo/architecture-intervention.schema.json +41 -0
  37. package/schemas/repo/architecture-node.schema.json +50 -0
  38. package/schemas/repo/architecture-relation.schema.json +26 -0
  39. package/schemas/repo/compatibility-contract.schema.json +49 -0
  40. package/schemas/repo/constraint.schema.json +56 -0
  41. package/schemas/repo/cross-repo-relation.schema.json +47 -0
  42. package/schemas/repo/landscape.schema.json +50 -0
  43. package/schemas/repo/practices/practice-policy.schema.json +72 -0
  44. package/schemas/repo/practices/practice-profile.schema.json +30 -0
  45. package/schemas/repo/practices/practice-source.schema.json +34 -0
  46. package/schemas/repo/practices/practice-waiver.schema.json +27 -0
  47. package/schemas/repo/practices/practice.schema.json +88 -0
  48. package/schemas/runtime/agent-job.schema.json +63 -0
  49. package/schemas/runtime/architecture-candidate-delta-policy.schema.json +129 -0
  50. package/schemas/runtime/architecture-candidate-delta.schema.json +386 -0
  51. package/schemas/runtime/architecture-event.schema.json +76 -0
  52. package/schemas/runtime/architecture-snapshot.schema.json +61 -0
  53. package/schemas/runtime/architecture-subject-selector.schema.json +31 -0
  54. package/schemas/runtime/changeset.schema.json +65 -0
  55. package/schemas/runtime/evidence-binding.schema.json +37 -0
  56. package/schemas/runtime/evidence-item.schema.json +58 -0
  57. package/schemas/runtime/explorer-projection.schema.json +92 -0
  58. package/schemas/runtime/explorer-service.schema.json +19 -0
  59. package/schemas/runtime/external-document-resource.schema.json +55 -0
  60. package/schemas/runtime/investigation-report.schema.json +119 -0
  61. package/schemas/runtime/notification-event.schema.json +18 -0
  62. package/schemas/runtime/notification-provider.schema.json +26 -0
  63. package/schemas/runtime/practice-catalog-manifest.schema.json +22 -0
  64. package/schemas/runtime/practice-check-result.schema.json +45 -0
  65. package/schemas/runtime/practice-checkpoint.schema.json +127 -0
  66. package/schemas/runtime/practice-guidance.schema.json +44 -0
  67. package/schemas/runtime/practice-match.schema.json +41 -0
  68. package/schemas/runtime/product-version-manifest.schema.json +115 -0
  69. package/schemas/runtime/projection-target.schema.json +52 -0
  70. package/schemas/runtime/recommendation-feedback.schema.json +53 -0
  71. package/schemas/runtime/recommendation-run.schema.json +62 -0
  72. package/schemas/runtime/recommendation.schema.json +26 -0
  73. package/schemas/runtime/retrieval-config.schema.json +44 -0
  74. package/schemas/runtime/retrieval-decision.schema.json +49 -0
  75. package/schemas/runtime/retrieval-eval.schema.json +29 -0
  76. package/schemas/runtime/review-result.schema.json +48 -0
  77. package/schemas/runtime/task-context.schema.json +53 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archctx",
3
- "version": "0.1.3",
3
+ "version": "0.1.4-beta.0",
4
4
  "description": "Local architecture context CLI for agentic coding workflows.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -10,6 +10,9 @@
10
10
  },
11
11
  "files": [
12
12
  "bin",
13
+ "assets",
14
+ "schemas",
15
+ "NOTICE.md",
13
16
  "README.md"
14
17
  ],
15
18
  "homepage": "https://archcontext.repoharness.com",
@@ -21,6 +24,7 @@
21
24
  "node": ">=24 <26"
22
25
  },
23
26
  "dependencies": {
24
- "@colbymchenry/codegraph": "1.0.1"
27
+ "@colbymchenry/codegraph": "1.0.1",
28
+ "@node-rs/jieba": "^2.0.1"
25
29
  }
26
30
  }
@@ -0,0 +1,85 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/cloud/attestation-v2.schema.json",
4
+ "title": "AttestationV2",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "attestationId", "challengeId", "installationId", "repositoryId", "pullRequestNumber", "headSha", "baseSha", "mergeBaseSha", "headTreeOid", "worktreeDigest", "modelDigest", "policyDigest", "codeFactsDigest", "reviewDigest", "result", "execution", "runtime", "nonce", "startedAt", "completedAt", "expiresAt", "signature"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.attestation/v2" },
10
+ "attestationId": { "type": "string" },
11
+ "challengeId": { "type": "string" },
12
+ "installationId": { "type": "integer", "minimum": 1 },
13
+ "repositoryId": { "type": "integer", "minimum": 1 },
14
+ "pullRequestNumber": { "type": "integer", "minimum": 1 },
15
+ "headSha": { "type": "string", "pattern": "^[a-f0-9]{40,64}$" },
16
+ "baseSha": { "type": "string", "pattern": "^[a-f0-9]{40,64}$" },
17
+ "mergeBaseSha": { "type": "string", "pattern": "^[a-f0-9]{40,64}$" },
18
+ "headTreeOid": { "type": "string" },
19
+ "worktreeDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
20
+ "modelDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
21
+ "policyDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
22
+ "codeFactsDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
23
+ "reviewDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
24
+ "result": { "type": "string", "enum": ["pass", "fail", "error"] },
25
+ "errorCode": { "type": "string", "enum": ["RUNTIME_VERSION_UNSUPPORTED", "HEAD_UNAVAILABLE", "WORKTREE_NOT_CLEAN", "CODEGRAPH_FAILED", "POLICY_INVALID", "REVIEW_INCOMPLETE"] },
26
+ "execution": {
27
+ "type": "object",
28
+ "oneOf": [
29
+ {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "required": ["trustLevel", "source", "principalId", "publicKeyId"],
33
+ "properties": {
34
+ "trustLevel": { "const": "developer" },
35
+ "source": { "const": "clean-commit-worktree" },
36
+ "principalId": { "type": "string" },
37
+ "publicKeyId": { "type": "string" }
38
+ }
39
+ },
40
+ {
41
+ "type": "object",
42
+ "additionalProperties": false,
43
+ "required": ["trustLevel", "source", "principalId", "publicKeyId", "runnerId", "workflowRef", "runId", "runAttempt"],
44
+ "properties": {
45
+ "trustLevel": { "const": "organization" },
46
+ "source": { "const": "organization-runner-checkout" },
47
+ "principalId": { "type": "string" },
48
+ "publicKeyId": { "type": "string" },
49
+ "runnerId": { "type": "string", "pattern": "^runner_[A-Za-z0-9_.-]+$" },
50
+ "workflowRef": {
51
+ "type": "string",
52
+ "pattern": "^[^/\\s]+/[^/\\s]+/\\.github/workflows/[^@\\s]+@(refs/(heads|tags)/[^@\\s]+|[a-fA-F0-9]{40})$"
53
+ },
54
+ "runId": { "type": "string", "pattern": "^[1-9][0-9]*$" },
55
+ "runAttempt": { "type": "integer", "minimum": 1 }
56
+ }
57
+ }
58
+ ]
59
+ },
60
+ "runtime": {
61
+ "type": "object",
62
+ "additionalProperties": false,
63
+ "required": ["version", "buildDigest", "codeGraphVersion", "capabilitiesDigest"],
64
+ "properties": {
65
+ "version": { "type": "string" },
66
+ "buildDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
67
+ "codeGraphVersion": { "type": "string" },
68
+ "capabilitiesDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
69
+ }
70
+ },
71
+ "nonce": { "type": "string" },
72
+ "startedAt": { "type": "string" },
73
+ "completedAt": { "type": "string" },
74
+ "expiresAt": { "type": "string" },
75
+ "signature": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "required": ["algorithm", "value"],
79
+ "properties": {
80
+ "algorithm": { "type": "string", "enum": ["ed25519"] },
81
+ "value": { "type": "string" }
82
+ }
83
+ }
84
+ }
85
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/cloud/attestation.schema.json",
4
+ "title": "Attestation",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "attestationId", "challengeId", "repository", "headSha", "worktreeDigest", "reviewDigest", "device", "issuedAt", "expiresAt", "trustLevel", "signature"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.attestation/v1" },
10
+ "attestationId": { "type": "string" },
11
+ "challengeId": { "type": "string" },
12
+ "repository": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "required": ["provider", "owner", "name", "visibility"],
16
+ "properties": {
17
+ "provider": { "type": "string", "enum": ["github"] },
18
+ "owner": { "type": "string" },
19
+ "name": { "type": "string" },
20
+ "visibility": { "type": "string", "enum": ["public", "private"] }
21
+ }
22
+ },
23
+ "headSha": { "type": "string" },
24
+ "worktreeDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
25
+ "reviewDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
26
+ "device": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": ["deviceId", "publicKeyId"],
30
+ "properties": {
31
+ "deviceId": { "type": "string" },
32
+ "publicKeyId": { "type": "string" }
33
+ }
34
+ },
35
+ "issuedAt": { "type": "string" },
36
+ "expiresAt": { "type": "string" },
37
+ "trustLevel": { "type": "string", "enum": ["developer", "organization"] },
38
+ "signature": {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "required": ["alg", "value"],
42
+ "properties": {
43
+ "alg": { "type": "string", "enum": ["ed25519"] },
44
+ "value": { "type": "string" }
45
+ }
46
+ },
47
+ "extensions": { "type": "object", "additionalProperties": true }
48
+ }
49
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/cloud/check-delivery.schema.json",
4
+ "title": "CheckDelivery",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "deliveryId", "challengeId", "checkName", "headSha", "status", "attemptCount", "createdAt", "updatedAt"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.check-delivery/v1" },
10
+ "deliveryId": { "type": "string" },
11
+ "challengeId": { "type": "string" },
12
+ "checkRunId": { "type": ["string", "null"] },
13
+ "checkName": { "type": "string", "enum": ["ArchContext / Developer Review", "ArchContext / Organization Runner"] },
14
+ "headSha": { "type": "string", "pattern": "^[a-f0-9]{40,64}$" },
15
+ "status": { "type": "string", "enum": ["PENDING", "PUBLISHED", "RETRYING", "DEAD_LETTER"] },
16
+ "attemptCount": { "type": "integer", "minimum": 0 },
17
+ "nextAttemptAt": { "type": ["string", "null"] },
18
+ "lastErrorCode": {
19
+ "type": ["string", "null"],
20
+ "enum": ["CHALLENGE_NOT_FOUND", "CHALLENGE_EXPIRED", "CHALLENGE_SUPERSEDED", "CHALLENGE_ALREADY_CONSUMED", "NONCE_MISMATCH", "REPOSITORY_MISMATCH", "PULL_REQUEST_MISMATCH", "HEAD_SHA_MISMATCH", "BASE_SHA_MISMATCH", "TREE_OID_MISMATCH", "TRUST_LEVEL_MISMATCH", "DIGEST_INVALID", "RUNNER_NOT_FOUND", "RUNNER_REVOKED", "RUNNER_SCOPE_MISMATCH", "WORKFLOW_REF_MISMATCH", "DEVICE_REVOKED", "RUNTIME_VERSION_UNSUPPORTED", "SIGNATURE_INVALID", "PAYLOAD_PRIVACY_VIOLATION", null]
21
+ },
22
+ "createdAt": { "type": "string" },
23
+ "updatedAt": { "type": "string" }
24
+ }
25
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/cloud/cloud-egress-envelope.schema.json",
4
+ "title": "CloudEgressEnvelope",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "requestId", "category", "method", "host", "pathTemplate", "statusCode", "latencyMs", "recordedAt"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.cloud-egress/v1" },
10
+ "requestId": { "type": "string" },
11
+ "category": { "type": "string", "enum": ["github.metadata", "github.pull-head", "github.check-list-for-ref", "github.check-create", "github.check-update"] },
12
+ "method": { "type": "string", "enum": ["GET", "POST", "PATCH"] },
13
+ "host": { "type": "string", "enum": ["api.github.com"] },
14
+ "pathTemplate": { "type": "string" },
15
+ "statusCode": { "type": "integer", "minimum": 100, "maximum": 599 },
16
+ "latencyMs": { "type": "integer", "minimum": 0 },
17
+ "recordedAt": { "type": "string" }
18
+ }
19
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/cloud/device-identity.schema.json",
4
+ "title": "DeviceIdentity",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "deviceId", "accountId", "publicKeyId", "publicKeyFingerprint", "status", "createdAt"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.device-identity/v1" },
10
+ "deviceId": { "type": "string" },
11
+ "accountId": { "type": "string" },
12
+ "publicKeyId": { "type": "string" },
13
+ "publicKeyFingerprint": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
14
+ "status": { "type": "string", "enum": ["active", "revoked"] },
15
+ "createdAt": { "type": "string" },
16
+ "revokedAt": { "type": ["string", "null"] }
17
+ }
18
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/cloud/entitlement.schema.json",
4
+ "title": "Entitlement",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "entitlementId", "accountId", "plan", "billingInterval", "privateRepositoryScope", "issuedAt"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.entitlement/v1" },
10
+ "entitlementId": { "type": "string" },
11
+ "accountId": { "type": "string" },
12
+ "plan": { "type": "string", "enum": ["free", "pro"] },
13
+ "billingInterval": { "type": "string", "enum": ["none", "monthly", "annual"] },
14
+ "privateRepositoryScope": {
15
+ "type": "string",
16
+ "enum": ["public-only", "user-all-private-repositories"]
17
+ },
18
+ "repositoryNumericIds": { "type": "array", "items": { "type": "integer", "minimum": 1 } },
19
+ "issuedAt": { "type": "string" },
20
+ "validUntil": { "type": "string" },
21
+ "offlineUntil": { "type": "string" },
22
+ "extensions": { "type": "object", "additionalProperties": true }
23
+ }
24
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/cloud/governance-key-status.schema.json",
4
+ "title": "GovernanceKeyStatus",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "publicKeyId", "ownerKind", "ownerId", "fingerprint", "status", "createdAt"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.governance-key-status/v1" },
10
+ "publicKeyId": { "type": "string" },
11
+ "ownerKind": { "type": "string", "enum": ["device", "runner"] },
12
+ "ownerId": { "type": "string" },
13
+ "fingerprint": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
14
+ "status": { "type": "string", "enum": ["active", "rotating", "revoked"] },
15
+ "createdAt": { "type": "string" },
16
+ "rotatedAt": { "type": ["string", "null"] },
17
+ "revokedAt": { "type": ["string", "null"] }
18
+ }
19
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/cloud/org-runner-identity.schema.json",
4
+ "title": "OrgRunnerIdentity",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "runnerId", "installationId", "publicKeyId", "publicKeyFingerprint", "status", "createdAt"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.org-runner-identity/v1" },
10
+ "runnerId": { "type": "string" },
11
+ "installationId": { "type": "integer", "minimum": 1 },
12
+ "repositoryNumericIds": { "type": "array", "items": { "type": "integer", "minimum": 1 } },
13
+ "publicKeyId": { "type": "string" },
14
+ "publicKeyFingerprint": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
15
+ "status": { "type": "string", "enum": ["active", "revoked"] },
16
+ "createdAt": { "type": "string" },
17
+ "rotatedAt": { "type": "string" },
18
+ "revokedAt": { "type": "string" },
19
+ "extensions": { "type": "object", "additionalProperties": true }
20
+ }
21
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/cloud/review-challenge-v2.schema.json",
4
+ "title": "ReviewChallengeV2",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "challengeId", "installationId", "repositoryId", "pullRequestNumber", "headSha", "baseSha", "nonce", "requiredTrust", "policyProfileId", "createdAt", "expiresAt", "status"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.review-challenge/v2" },
10
+ "challengeId": { "type": "string" },
11
+ "installationId": { "type": "integer", "minimum": 1 },
12
+ "repositoryId": { "type": "integer", "minimum": 1 },
13
+ "pullRequestNumber": { "type": "integer", "minimum": 1 },
14
+ "headSha": { "type": "string", "pattern": "^[a-f0-9]{40,64}$" },
15
+ "baseSha": { "type": "string", "pattern": "^[a-f0-9]{40,64}$" },
16
+ "nonce": { "type": "string" },
17
+ "requiredTrust": { "type": "string", "enum": ["developer", "organization"] },
18
+ "policyProfileId": { "type": "string" },
19
+ "createdAt": { "type": "string" },
20
+ "expiresAt": { "type": "string" },
21
+ "status": { "type": "string", "enum": ["PENDING", "LEASED", "SUBMITTED", "VERIFIED", "REJECTED", "SUPERSEDED", "EXPIRED"] }
22
+ }
23
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/cloud/runner-identity.schema.json",
4
+ "title": "RunnerIdentity",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "runnerId", "installationId", "repositoryIds", "workflowRef", "publicKeyId", "publicKeyFingerprint", "status", "createdAt"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.runner-identity/v1" },
10
+ "runnerId": { "type": "string" },
11
+ "installationId": { "type": "integer", "minimum": 1 },
12
+ "repositoryIds": { "type": "array", "minItems": 0, "items": { "type": "integer", "minimum": 1 } },
13
+ "scope": {
14
+ "oneOf": [
15
+ {
16
+ "type": "object",
17
+ "additionalProperties": false,
18
+ "required": ["kind", "repositoryIds"],
19
+ "properties": {
20
+ "kind": { "const": "repository" },
21
+ "repositoryIds": { "type": "array", "minItems": 1, "items": { "type": "integer", "minimum": 1 } }
22
+ }
23
+ },
24
+ {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "required": ["kind"],
28
+ "properties": {
29
+ "kind": { "const": "organization" }
30
+ }
31
+ }
32
+ ]
33
+ },
34
+ "workflowRef": { "type": "string" },
35
+ "publicKeyId": { "type": "string" },
36
+ "publicKeyFingerprint": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
37
+ "status": { "type": "string", "enum": ["active", "rotating", "revoked"] },
38
+ "createdAt": { "type": "string" },
39
+ "rotatedAt": { "type": ["string", "null"] },
40
+ "revokedAt": { "type": ["string", "null"] }
41
+ }
42
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/integrations/adapter-fidelity.schema.json",
4
+ "title": "AdapterFidelityRule",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "id", "direction", "importScope", "nativeIsSourceOfTruth", "reverseSync", "protectedNativeFields"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.adapter-fidelity/v1" },
10
+ "id": { "type": "string", "pattern": "^adapter-fidelity\\.[a-z0-9][a-z0-9-]*$" },
11
+ "direction": { "const": "export-first" },
12
+ "importScope": { "const": "initialization-only" },
13
+ "nativeIsSourceOfTruth": { "const": true },
14
+ "reverseSync": { "const": "forbidden" },
15
+ "protectedNativeFields": {
16
+ "type": "array",
17
+ "items": { "type": "string", "enum": ["evidence", "verification", "constraint", "intervention"] },
18
+ "minItems": 4
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/integrations/chatgpt-ga-tool.schema.json",
4
+ "title": "ChatGptGaToolContract",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "toolName",
10
+ "surface",
11
+ "readOnlyByDefault",
12
+ "dataClassification",
13
+ "requiresLocalConfirmationForWrite",
14
+ "disclosure"
15
+ ],
16
+ "properties": {
17
+ "schemaVersion": { "const": "archcontext.chatgpt-ga-tool/v1" },
18
+ "toolName": { "type": "string", "pattern": "^archcontext_[a-z0-9_]+$" },
19
+ "surface": { "type": "string", "enum": ["cloud-metadata", "local-runtime"] },
20
+ "readOnlyByDefault": { "const": true },
21
+ "dataClassification": { "type": "string", "enum": ["cloud-metadata", "local-metadata", "local-architecture"] },
22
+ "requiresLocalConfirmationForWrite": { "type": "boolean" },
23
+ "disclosure": { "type": "string" }
24
+ }
25
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/integrations/likec4-mapping.schema.json",
4
+ "title": "LikeC4Mapping",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "id", "exportMode", "native", "likec4", "views"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.likec4-mapping/v1" },
10
+ "id": { "type": "string", "pattern": "^mapping\\.likec4\\.[a-z0-9][a-z0-9-]*$" },
11
+ "exportMode": { "const": "export-first" },
12
+ "native": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "required": ["nodeKinds", "relationKinds"],
16
+ "properties": {
17
+ "nodeKinds": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
18
+ "relationKinds": { "type": "array", "items": { "type": "string" }, "minItems": 1 }
19
+ }
20
+ },
21
+ "likec4": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": ["elementKinds", "relationLabels"],
25
+ "properties": {
26
+ "elementKinds": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
27
+ "relationLabels": { "type": "array", "items": { "type": "string" }, "minItems": 1 }
28
+ }
29
+ },
30
+ "views": { "type": "array", "items": { "type": "string" }, "minItems": 1 }
31
+ }
32
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/integrations/structurizr-mapping.schema.json",
4
+ "title": "StructurizrMapping",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "id", "exportMode", "native", "structurizr", "views"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.structurizr-mapping/v1" },
10
+ "id": { "type": "string", "pattern": "^mapping\\.structurizr\\.[a-z0-9][a-z0-9-]*$" },
11
+ "exportMode": { "const": "export-first" },
12
+ "native": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "required": ["nodeKinds", "relationKinds"],
16
+ "properties": {
17
+ "nodeKinds": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
18
+ "relationKinds": { "type": "array", "items": { "type": "string" }, "minItems": 1 }
19
+ }
20
+ },
21
+ "structurizr": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": ["workspace", "model", "views"],
25
+ "properties": {
26
+ "workspace": { "type": "string" },
27
+ "model": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
28
+ "views": { "type": "array", "items": { "type": "string" }, "minItems": 1 }
29
+ }
30
+ },
31
+ "views": { "type": "array", "items": { "type": "string" }, "minItems": 1 }
32
+ }
33
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/repo/architecture-intervention.schema.json",
4
+ "title": "ArchitectureIntervention",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "id", "status", "trigger", "thesis", "targetState", "constraints", "strategy", "completionCriteria"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.intervention/v1" },
10
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9]*(\\.[a-z0-9][a-z0-9-]*)+$" },
11
+ "status": { "type": "string", "enum": ["proposed", "approved", "in-progress", "complete", "rejected"] },
12
+ "trigger": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "required": ["task", "pressure", "confidence", "signals"],
16
+ "properties": {
17
+ "task": { "type": "string" },
18
+ "pressure": { "type": "string", "enum": ["low", "medium", "high"] },
19
+ "confidence": { "type": "string", "enum": ["low", "medium", "high"] },
20
+ "signals": { "type": "array", "items": { "type": "string" } }
21
+ }
22
+ },
23
+ "thesis": { "type": "string" },
24
+ "targetState": { "type": "object", "additionalProperties": true },
25
+ "constraints": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": ["real", "inherited"],
29
+ "properties": {
30
+ "real": { "type": "array", "items": { "type": "string" } },
31
+ "inherited": { "type": "array", "items": { "type": "string" } }
32
+ }
33
+ },
34
+ "strategy": { "type": "object", "additionalProperties": true, "required": ["selected"] },
35
+ "proofPoint": { "type": "object", "additionalProperties": true },
36
+ "falsifiers": { "type": "array", "items": { "type": "string" } },
37
+ "killList": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
38
+ "completionCriteria": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
39
+ "extensions": { "type": "object", "additionalProperties": true }
40
+ }
41
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/repo/architecture-node.schema.json",
4
+ "title": "ArchitectureNode",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "id", "kind", "name", "status", "summary"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.node/v1" },
10
+ "id": { "type": "string", "pattern": "^([a-z][a-z0-9]*(\\.[a-z0-9][a-z0-9-]*)*::)?[a-z][a-z0-9]*(\\.[a-z0-9][a-z0-9-]*)+$" },
11
+ "kind": {
12
+ "type": "string",
13
+ "enum": ["capability", "module", "component", "interface", "event", "datastore", "external-system", "deployment"]
14
+ },
15
+ "name": { "type": "string" },
16
+ "status": { "type": "string", "enum": ["active", "planned", "deprecated", "removed"] },
17
+ "parent": { "type": "string", "pattern": "^([a-z][a-z0-9]*(\\.[a-z0-9][a-z0-9-]*)*::)?[a-z][a-z0-9]*(\\.[a-z0-9][a-z0-9-]*)+$" },
18
+ "summary": { "type": "string" },
19
+ "responsibilities": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
20
+ "source": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "properties": {
24
+ "include": { "type": "array", "items": { "type": "string" } },
25
+ "exclude": { "type": "array", "items": { "type": "string" } },
26
+ "entrypoints": { "type": "array", "items": { "type": "string" } }
27
+ }
28
+ },
29
+ "ownership": {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "properties": {
33
+ "lifecycle": { "type": "array", "items": { "type": "string" } },
34
+ "data": { "type": "array", "items": { "type": "string" } }
35
+ }
36
+ },
37
+ "interfaces": {
38
+ "type": "object",
39
+ "additionalProperties": false,
40
+ "properties": {
41
+ "provides": { "type": "array", "items": { "type": "string" } },
42
+ "consumes": { "type": "array", "items": { "type": "string" } }
43
+ }
44
+ },
45
+ "criticality": { "type": "string", "enum": ["low", "medium", "high", "critical"] },
46
+ "riskDomains": { "type": "array", "items": { "type": "string" } },
47
+ "notes": { "type": "array", "items": { "type": "string" } },
48
+ "extensions": { "type": "object", "additionalProperties": true }
49
+ }
50
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/repo/architecture-relation.schema.json",
4
+ "title": "ArchitectureRelation",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "id", "kind", "source", "target", "intent"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.relation/v1" },
10
+ "id": { "type": "string", "pattern": "^([a-z][a-z0-9]*(\\.[a-z0-9][a-z0-9-]*)*::)?[a-z][a-z0-9]*(\\.[a-z0-9][a-z0-9-]*)+$" },
11
+ "kind": {
12
+ "type": "string",
13
+ "enum": ["depends-on", "calls", "publishes", "subscribes", "reads", "writes", "implements", "deployed-on"]
14
+ },
15
+ "source": { "type": "string", "pattern": "^([a-z][a-z0-9]*(\\.[a-z0-9][a-z0-9-]*)*::)?[a-z][a-z0-9]*(\\.[a-z0-9][a-z0-9-]*)+$" },
16
+ "target": { "type": "string", "pattern": "^([a-z][a-z0-9]*(\\.[a-z0-9][a-z0-9-]*)*::)?[a-z][a-z0-9]*(\\.[a-z0-9][a-z0-9-]*)+$" },
17
+ "via": { "type": "string", "pattern": "^([a-z][a-z0-9]*(\\.[a-z0-9][a-z0-9-]*)*::)?[a-z][a-z0-9]*(\\.[a-z0-9][a-z0-9-]*)+$" },
18
+ "protocol": { "type": "string" },
19
+ "synchrony": { "type": "string", "enum": ["synchronous", "asynchronous", "batch"] },
20
+ "intent": { "type": "string" },
21
+ "allowedData": { "type": "array", "items": { "type": "string" } },
22
+ "forbiddenData": { "type": "array", "items": { "type": "string" } },
23
+ "criticality": { "type": "string", "enum": ["low", "medium", "high", "critical"] },
24
+ "extensions": { "type": "object", "additionalProperties": true }
25
+ }
26
+ }