archctx-contracts 0.15.0 → 0.17.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 (30) hide show
  1. package/fixtures/valid/archctx-capabilities.json +2 -2
  2. package/fixtures/valid/architecture-debt-delta.json +68 -0
  3. package/fixtures/valid/product-version-manifest.json +5 -5
  4. package/fixtures/valid/projection-slice.json +28 -0
  5. package/fixtures/valid/ref-impact-batch-request.json +11 -0
  6. package/fixtures/valid/ref-impact-batch.json +78 -0
  7. package/fixtures/valid/runtime-refactor-scan.json +2 -0
  8. package/fixtures/valid/runtime-verify.json +169 -0
  9. package/package.json +1 -1
  10. package/schemas/repo/constraint.schema.json +10 -1
  11. package/schemas/repo/refactor-decision.schema.json +5 -0
  12. package/schemas/runtime/archctx-capabilities.schema.json +1 -1
  13. package/schemas/runtime/architecture-debt-delta.schema.json +47 -0
  14. package/schemas/runtime/dependency-constraint-evaluation.schema.json +1 -0
  15. package/schemas/runtime/projection-slice.schema.json +147 -0
  16. package/schemas/runtime/ref-impact-batch-request.schema.json +26 -0
  17. package/schemas/runtime/ref-impact-batch.schema.json +38 -0
  18. package/schemas/runtime/runtime-recommendation-show.schema.json +5 -0
  19. package/schemas/runtime/runtime-refactor-scan.schema.json +18 -0
  20. package/schemas/runtime/runtime-verify.schema.json +131 -0
  21. package/src/architecture-debt.ts +18 -0
  22. package/src/architecture.ts +6 -4
  23. package/src/failure.ts +13 -1
  24. package/src/index.ts +1 -0
  25. package/src/ports.ts +46 -5
  26. package/src/product-version.ts +1 -1
  27. package/src/projection.ts +30 -0
  28. package/src/ref-impact.ts +33 -0
  29. package/src/refactor.ts +23 -1
  30. package/src/runtime-verify.ts +28 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": "archcontext.capabilities/v1",
3
- "package": { "name": "archctx", "version": "0.15.0" },
3
+ "package": { "name": "archctx", "version": "0.17.0" },
4
4
  "protocols": {
5
5
  "projectionRequest": "archcontext.projection-request/v1",
6
6
  "projectionResult": "archcontext.projection-result/v3",
@@ -10,5 +10,5 @@
10
10
  "architectureDocs": "archcontext.docs-renderer/v6",
11
11
  "agentContext": "archcontext.agent-context-renderer/v2"
12
12
  },
13
- "features": ["architecture-change-capabilities-v1", "architecture-debt-v1", "architecture-docs-renderer-v2", "architecture-refresh-signal-v1", "capability-dependencies-declared-v1", "capability-dependencies-v1", "changeset-entity-operations-v1", "changeset-ownership-delta-v1", "code-facts-unavailable-error-v1", "docs-anchors-v1", "flow-selector-check-v1", "module-statistics-v1", "native-context-export-v1", "projection-apply-readback-v1", "projection-apply-receipt-v1", "projection-apply-recovery-v1", "projection-apply-replay-restore-v1", "projection-apply-replay-v1", "projection-architecture-debt-v1", "projection-capability-isolation-v1", "projection-change-classification-v2", "projection-check-freshness-v2", "projection-freshness-v2", "projection-manifest-contract-v4", "projection-observed-major-change-acceptance-v1", "projection-orphan-review-v1", "projection-preview-v1", "projection-prior-committed-applies-v1", "projection-protocol-v2", "projection-publish-v1", "projection-snapshot-v1", "projection-verify-pr-v1", "recommendation-scan-decision-v1", "recommendation-v3", "refactor-assessment-v1", "refactor-observation-evidence-v1", "refactor-resolution-v1", "refactor-scan-limits-v1", "refactor-scan-untracked-count-v1"]
13
+ "features": ["architecture-change-capabilities-v1", "architecture-debt-v1", "architecture-docs-renderer-v2", "architecture-refresh-signal-v1", "capability-dependencies-declared-v1", "capability-dependencies-v1", "changeset-entity-operations-v1", "changeset-ownership-delta-v1", "code-facts-unavailable-error-v1", "docs-anchors-v1", "flow-selector-check-v1", "module-statistics-v1", "native-context-export-v1", "projection-apply-readback-v1", "projection-apply-receipt-v1", "projection-apply-recovery-v1", "projection-apply-replay-restore-v1", "projection-apply-replay-v1", "projection-architecture-debt-v1", "projection-capability-isolation-v1", "projection-change-classification-v2", "projection-check-freshness-v2", "projection-freshness-v2", "projection-manifest-contract-v4", "projection-observed-major-change-acceptance-v1", "projection-orphan-review-v1", "projection-preview-v1", "projection-prior-committed-applies-v1", "projection-protocol-v2", "projection-publish-v1", "projection-slice-v1", "projection-snapshot-v1", "projection-verify-pr-v1", "recommendation-scan-decision-v1", "recommendation-v3", "refactor-assessment-v1", "refactor-observation-evidence-v1", "refactor-resolution-v1", "refactor-scan-limits-v1", "refactor-scan-untracked-count-v1"]
14
14
  }
@@ -0,0 +1,68 @@
1
+ {
2
+ "schemaVersion": "archcontext.architecture-debt-delta/v1",
3
+ "head": {
4
+ "sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
5
+ "debt": {
6
+ "schemaVersion": "archcontext.architecture-debt/v1",
7
+ "scope": { "kind": "repository", "changedPaths": [], "capabilityIds": [] },
8
+ "coverage": "partial",
9
+ "coverageReasonCodes": [
10
+ "dependencies:deferred-to-complete",
11
+ "dependencies:not-evaluated",
12
+ "flows:deferred-to-complete",
13
+ "flows:not-evaluated",
14
+ "practices:deferred-to-complete",
15
+ "practices:not-evaluated"
16
+ ],
17
+ "checks": [
18
+ { "check": "ownership", "coverage": "complete", "reasonCodes": [] },
19
+ { "check": "anchors", "coverage": "complete", "reasonCodes": [] },
20
+ { "check": "dependencies", "coverage": "unknown", "reasonCodes": ["deferred-to-complete", "not-evaluated"] },
21
+ { "check": "flows", "coverage": "unknown", "reasonCodes": ["deferred-to-complete", "not-evaluated"] },
22
+ { "check": "state-machines", "coverage": "complete", "reasonCodes": [] },
23
+ { "check": "practices", "coverage": "unknown", "reasonCodes": ["deferred-to-complete", "not-evaluated"] }
24
+ ],
25
+ "items": [
26
+ {
27
+ "id": "debt.f37e5304bec66f53c154a70b3abf8d61be20afc14040f61f3371eab270488426",
28
+ "kind": "unowned-path",
29
+ "nodeIds": [],
30
+ "capabilityIds": [],
31
+ "paths": ["src/new.ts"],
32
+ "reasonCode": "source-owner-missing",
33
+ "action": "archctx plan --id changeset.<id> --operations-file <ownership-operations.json>",
34
+ "details": { "modelField": "source.include/source.exclude/parent", "ownershipRule": "parent-chain" }
35
+ }
36
+ ],
37
+ "actionsRequired": ["archctx plan --id changeset.<id> --operations-file <ownership-operations.json>"],
38
+ "digest": "sha256:878b42fa0587301d41fe55ce73bcb15d8d23ab7a817c9fee0db4528ab6c86a7c"
39
+ }
40
+ },
41
+ "base": {
42
+ "ref": "HEAD^",
43
+ "sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
44
+ "debtDigest": "sha256:40b2be136b799d523fe5d3cd1742da6a74758c3ec77f653d023e1935ebb46e69",
45
+ "coverage": "partial",
46
+ "coverageReasonCodes": [
47
+ "dependencies:deferred-to-complete",
48
+ "dependencies:not-evaluated",
49
+ "flows:deferred-to-complete",
50
+ "flows:not-evaluated",
51
+ "practices:deferred-to-complete",
52
+ "practices:not-evaluated"
53
+ ]
54
+ },
55
+ "introduced": [
56
+ {
57
+ "id": "debt.f37e5304bec66f53c154a70b3abf8d61be20afc14040f61f3371eab270488426",
58
+ "kind": "unowned-path",
59
+ "nodeIds": [],
60
+ "capabilityIds": [],
61
+ "paths": ["src/new.ts"],
62
+ "reasonCode": "source-owner-missing",
63
+ "action": "archctx plan --id changeset.<id> --operations-file <ownership-operations.json>",
64
+ "details": { "modelField": "source.include/source.exclude/parent", "ownershipRule": "parent-chain" }
65
+ }
66
+ ],
67
+ "resolvedIds": ["debt.acfe6e8bbcf23a10d9531f62d0e23fd3a26861eddae8cb9a775dd9ff89170d2d"]
68
+ }
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": "archcontext.product-version-manifest/v1",
3
3
  "product": {
4
4
  "name": "archctx",
5
- "version": "0.15.0",
5
+ "version": "0.17.0",
6
6
  "distribution": "one-package"
7
7
  },
8
8
  "packageManager": "bun@1.4.4",
@@ -12,25 +12,25 @@
12
12
  "surfaces": {
13
13
  "cli": {
14
14
  "packageName": "@archcontext/surfaces",
15
- "version": "0.15.0",
15
+ "version": "0.17.0",
16
16
  "entrypoint": "archctx"
17
17
  },
18
18
  "daemon": {
19
19
  "packageName": "@archcontext/local-runtime",
20
- "version": "0.15.0",
20
+ "version": "0.17.0",
21
21
  "entrypoint": "archctx daemon start",
22
22
  "rpcSchemaVersion": "archcontext.runtime-rpc/v2"
23
23
  },
24
24
  "mcp": {
25
25
  "packageName": "@archcontext/surfaces",
26
- "version": "0.15.0",
26
+ "version": "0.17.0",
27
27
  "entrypoint": "archctx mcp",
28
28
  "transport": "stdio"
29
29
  }
30
30
  },
31
31
  "schemas": {
32
32
  "schemaSetVersion": "2026-06-25.al0-ledger",
33
- "contractsPackageVersion": "0.15.0"
33
+ "contractsPackageVersion": "0.17.0"
34
34
  },
35
35
  "runtime": {
36
36
  "localRpc": {
@@ -0,0 +1,28 @@
1
+ {
2
+ "schemaVersion": "archcontext.projection-slice/v1",
3
+ "base": "main",
4
+ "baseSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
+ "mergeBase": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
6
+ "headSha": "cccccccccccccccccccccccccccccccccccccccc",
7
+ "changedPaths": [
8
+ ".archcontext/model/nodes/component.worker.yaml"
9
+ ],
10
+ "changed": true,
11
+ "affectedCapabilities": [
12
+ {
13
+ "capabilityId": "capability.example",
14
+ "modulePath": "docs/architecture/modules/capability.example.md",
15
+ "diagramMermaid": "flowchart LR\n capability[\"Example\"]:::component\n component[\"Worker\"]\n capability -->|\"dispatches\"| component\n classDef component fill:#075985,color:#ffffff,stroke:#bae6fd,stroke-width:2px\n classDef target fill:#FFF4D6,stroke:#B42318,stroke-width:2px,color:#5C3D0A\n class component target",
16
+ "entrypoints": [
17
+ {
18
+ "nodeId": "component.worker",
19
+ "entrypointId": "entrypoint.work",
20
+ "path": "src/worker.ts",
21
+ "symbol": "work"
22
+ }
23
+ ],
24
+ "markdown": "### [capability.example](docs/architecture/modules/capability.example.md)\n\n#### 1.1 架構圖\n\n```mermaid\nflowchart LR\n capability[\"Example\"]:::component\n component[\"Worker\"]\n capability -->|\"dispatches\"| component\n classDef component fill:#075985,color:#ffffff,stroke:#bae6fd,stroke-width:2px\n classDef target fill:#FFF4D6,stroke:#B42318,stroke-width:2px,color:#5C3D0A\n class component target\n```\n\n#### 1.2 模組職責表\n\n- 未宣告 `source.entrypoints`,入口清單無法從架構模型推導。\n\n組件入口:\n\n| 組件 | 宣告入口 | 錨點 | 職責 |\n| --- | --- | --- | --- |\n| `component.worker` | `entrypoint.work` | `src/worker.ts#work` | `sink.finish` → `src/worker.ts#finish` |"
25
+ }
26
+ ],
27
+ "markdown": "## Architecture slice\n\n### [capability.example](docs/architecture/modules/capability.example.md)\n\n#### 1.1 架構圖\n\n```mermaid\nflowchart LR\n capability[\"Example\"]:::component\n component[\"Worker\"]\n capability -->|\"dispatches\"| component\n classDef component fill:#075985,color:#ffffff,stroke:#bae6fd,stroke-width:2px\n classDef target fill:#FFF4D6,stroke:#B42318,stroke-width:2px,color:#5C3D0A\n class component target\n```\n\n#### 1.2 模組職責表\n\n- 未宣告 `source.entrypoints`,入口清單無法從架構模型推導。\n\n組件入口:\n\n| 組件 | 宣告入口 | 錨點 | 職責 |\n| --- | --- | --- | --- |\n| `component.worker` | `entrypoint.work` | `src/worker.ts#work` | `sink.finish` → `src/worker.ts#finish` |\n"
28
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "schemaVersion": "archcontext.ref-impact-batch-request/v1",
3
+ "items": [
4
+ {
5
+ "id": "pr-42",
6
+ "paths": [
7
+ "src/new.ts"
8
+ ]
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,78 @@
1
+ {
2
+ "schemaVersion": "archcontext.ref-impact-batch/v1",
3
+ "items": [
4
+ {
5
+ "id": "pr-42",
6
+ "impact": {
7
+ "schemaVersion": "archcontext.ref-impact/v1",
8
+ "base": null,
9
+ "head": {
10
+ "source": "worktree",
11
+ "headSha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
12
+ "headTreeOid": "cccccccccccccccccccccccccccccccccccccccc",
13
+ "validation": "stable-read"
14
+ },
15
+ "depth": 1,
16
+ "changedPaths": [
17
+ {
18
+ "path": "src/new.ts",
19
+ "added": null,
20
+ "deleted": null,
21
+ "baseOwners": [],
22
+ "headOwners": [],
23
+ "owners": [],
24
+ "reasonCodes": [
25
+ "paths-only"
26
+ ]
27
+ }
28
+ ],
29
+ "unownedPaths": [
30
+ "src/new.ts"
31
+ ],
32
+ "touchedNodes": [],
33
+ "touchedFlowSteps": {
34
+ "status": "unknown",
35
+ "reasonCodes": [
36
+ "ref-code-facts-unavailable"
37
+ ],
38
+ "items": null
39
+ },
40
+ "dependents": [],
41
+ "dependencyCoverage": {
42
+ "status": "complete",
43
+ "graph": "head",
44
+ "pathSelection": "one-shortest-path-per-node-pair"
45
+ },
46
+ "modelDelta": {
47
+ "status": "unknown",
48
+ "reasonCode": "paths-only",
49
+ "changes": null,
50
+ "truncated": false
51
+ },
52
+ "limits": {
53
+ "changedPaths": 1000,
54
+ "nodes": 1000,
55
+ "relations": 5000,
56
+ "flowSteps": 2000,
57
+ "dependents": 5000,
58
+ "modelChanges": 5000,
59
+ "depth": 10,
60
+ "diffLines": 100000,
61
+ "diffWork": 2000000,
62
+ "diffBytes": 8388608,
63
+ "responseBytes": 8388608,
64
+ "codeFactFiles": 10000,
65
+ "codeFactBytes": 8388608
66
+ },
67
+ "truncated": {
68
+ "changedPaths": false,
69
+ "touchedNodes": false,
70
+ "relations": false,
71
+ "flowSteps": false,
72
+ "dependents": false,
73
+ "modelDelta": false
74
+ }
75
+ }
76
+ }
77
+ ]
78
+ }
@@ -128,6 +128,7 @@
128
128
  "createdAt": "2026-10-11T04:21:31.000Z",
129
129
  "snapshotDigest": "sha256:35796bb112cab526dfe31a9ad84bc9df5d28b6a9ef4154d7d3c2d7d3a7753f7e"
130
130
  },
131
+ "snapshotDigest": "sha256:bfe13b0184519c0979222bb30fa79db4af5f4223d56f9f48418b2b639a209301",
131
132
  "assessment": {
132
133
  "schemaVersion": "archcontext.refactor-assessment/v1",
133
134
  "requestId": "refactor_request.d514edefd58b7a9e",
@@ -351,6 +352,7 @@
351
352
  }
352
353
  }
353
354
  ],
355
+ "openRecommendations": [],
354
356
  "evidenceItems": [
355
357
  {
356
358
  "schemaVersion": "archcontext.evidence-item/v2",
@@ -0,0 +1,169 @@
1
+ {
2
+ "schemaVersion": "archcontext.runtime-verify/v1",
3
+ "base": "origin/main",
4
+ "baseSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
+ "headSha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
6
+ "checks": {
7
+ "validate": {
8
+ "ok": true,
9
+ "data": {
10
+ "valid": true,
11
+ "errors": [],
12
+ "modelDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
13
+ }
14
+ },
15
+ "flows": {
16
+ "ok": false,
17
+ "error": {
18
+ "code": "AC_CODE_FACTS_UNAVAILABLE",
19
+ "message": "Required code facts have no available index. Run codegraph init, or in a linked worktree run archctx sync after archctx sync in the primary checkout has published a base index.",
20
+ "severity": "error",
21
+ "retryable": true,
22
+ "action": "codegraph-init",
23
+ "reasonCode": "index-missing",
24
+ "details": {}
25
+ }
26
+ },
27
+ "state-machines": {
28
+ "ok": true,
29
+ "data": {
30
+ "schemaVersion": "archcontext.state-machine-check/v1",
31
+ "machines": []
32
+ }
33
+ },
34
+ "constraints": {
35
+ "ok": true,
36
+ "data": {
37
+ "schemaVersion": "archcontext.dependency-constraint-evaluation/v1",
38
+ "status": "not-applicable",
39
+ "coverage": "complete",
40
+ "reasonCodes": [],
41
+ "constraintIds": [],
42
+ "importEdgeCount": 0,
43
+ "unresolvedImports": [],
44
+ "violations": [],
45
+ "warnings": []
46
+ }
47
+ },
48
+ "docs": {
49
+ "ok": true,
50
+ "data": {
51
+ "schemaVersion": "archcontext.docs-anchors/v1",
52
+ "profile": "default",
53
+ "codeGraph": {
54
+ "availability": "unavailable",
55
+ "reasonCode": "index-missing"
56
+ },
57
+ "summary": {
58
+ "nodes": 0,
59
+ "documents": 0,
60
+ "citations": 0,
61
+ "findings": 0,
62
+ "unchecked": 0,
63
+ "byKind": {
64
+ "line-moved": 0,
65
+ "line-out-of-range": 0,
66
+ "missing-path": 0,
67
+ "missing-symbol": 0,
68
+ "unknown-selector": 0
69
+ }
70
+ },
71
+ "nodes": []
72
+ }
73
+ },
74
+ "projection": {
75
+ "ok": false,
76
+ "error": {
77
+ "code": "AC_CODE_FACTS_UNAVAILABLE",
78
+ "message": "Required code facts have no available index. Run codegraph init, or in a linked worktree run archctx sync after archctx sync in the primary checkout has published a base index.",
79
+ "severity": "error",
80
+ "retryable": true,
81
+ "action": "codegraph-init",
82
+ "reasonCode": "index-missing",
83
+ "details": {}
84
+ }
85
+ },
86
+ "debt": {
87
+ "ok": true,
88
+ "data": {
89
+ "schemaVersion": "archcontext.architecture-debt/v1",
90
+ "scope": {
91
+ "kind": "repository",
92
+ "changedPaths": [],
93
+ "capabilityIds": []
94
+ },
95
+ "coverage": "partial",
96
+ "coverageReasonCodes": [
97
+ "dependencies:deferred-to-complete",
98
+ "dependencies:not-evaluated",
99
+ "flows:deferred-to-complete",
100
+ "flows:not-evaluated",
101
+ "practices:deferred-to-complete",
102
+ "practices:not-evaluated"
103
+ ],
104
+ "checks": [
105
+ {
106
+ "check": "ownership",
107
+ "coverage": "complete",
108
+ "reasonCodes": []
109
+ },
110
+ {
111
+ "check": "anchors",
112
+ "coverage": "complete",
113
+ "reasonCodes": []
114
+ },
115
+ {
116
+ "check": "dependencies",
117
+ "coverage": "unknown",
118
+ "reasonCodes": [
119
+ "deferred-to-complete",
120
+ "not-evaluated"
121
+ ]
122
+ },
123
+ {
124
+ "check": "flows",
125
+ "coverage": "unknown",
126
+ "reasonCodes": [
127
+ "deferred-to-complete",
128
+ "not-evaluated"
129
+ ]
130
+ },
131
+ {
132
+ "check": "state-machines",
133
+ "coverage": "complete",
134
+ "reasonCodes": []
135
+ },
136
+ {
137
+ "check": "practices",
138
+ "coverage": "unknown",
139
+ "reasonCodes": [
140
+ "deferred-to-complete",
141
+ "not-evaluated"
142
+ ]
143
+ }
144
+ ],
145
+ "items": [
146
+ {
147
+ "id": "debt.f37e5304bec66f53c154a70b3abf8d61be20afc14040f61f3371eab270488426",
148
+ "kind": "unowned-path",
149
+ "nodeIds": [],
150
+ "capabilityIds": [],
151
+ "paths": [
152
+ "src/new.ts"
153
+ ],
154
+ "reasonCode": "source-owner-missing",
155
+ "action": "archctx plan --id changeset.<id> --operations-file <ownership-operations.json>",
156
+ "details": {
157
+ "modelField": "source.include/source.exclude/parent",
158
+ "ownershipRule": "parent-chain"
159
+ }
160
+ }
161
+ ],
162
+ "actionsRequired": [
163
+ "archctx plan --id changeset.<id> --operations-file <ownership-operations.json>"
164
+ ],
165
+ "digest": "sha256:878b42fa0587301d41fe55ce73bcb15d8d23ab7a817c9fee0db4528ab6c86a7c"
166
+ }
167
+ }
168
+ }
169
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archctx-contracts",
3
- "version": "0.15.0",
3
+ "version": "0.17.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -37,8 +37,17 @@
37
37
  "require-cleanup-by",
38
38
  "require-review"
39
39
  ]
40
+ },
41
+ "allowedTargets": {
42
+ "description": "Public contract nodes that are strict descendants of a forbid-dependency target. Every owner of an exempt import target must be in one of these subtrees.",
43
+ "type": "array",
44
+ "minItems": 1,
45
+ "uniqueItems": true,
46
+ "items": { "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-]*)+$" }
40
47
  }
41
- }
48
+ },
49
+ "if": { "required": ["allowedTargets"] },
50
+ "then": { "properties": { "type": { "const": "forbid-dependency" } } }
42
51
  },
43
52
  "allowedVia": { "type": "array", "items": { "type": "string" } },
44
53
  "rationale": { "type": "string" },
@@ -132,6 +132,11 @@
132
132
  "waived"
133
133
  ]
134
134
  },
135
+ "observationScopeDigest": {
136
+ "type": "string",
137
+ "pattern": "^sha256:[a-f0-9]{64}$",
138
+ "description": "Scope of the measured observation metrics. Absent for repository baselines."
139
+ },
135
140
  "observationMetrics": {
136
141
  "anyOf": [
137
142
  {
@@ -43,7 +43,7 @@
43
43
  "type": "string",
44
44
  "pattern": "^[a-z0-9]+(-[a-z0-9]+)*-v[0-9]+$",
45
45
  "description": "One feature flag: a lowercase kebab-case name that ends in a version suffix (-v1, -v2, ...). The pattern is open, so a validator built from this schema accepts flags that a later archctx adds. A consumer must ignore a flag it does not know. examples lists the flags this schema version knows.",
46
- "examples": ["architecture-change-capabilities-v1", "architecture-debt-v1", "architecture-docs-renderer-v2", "architecture-refresh-signal-v1", "capability-dependencies-declared-v1", "capability-dependencies-v1", "changeset-entity-operations-v1", "changeset-ownership-delta-v1", "code-facts-unavailable-error-v1", "docs-anchors-v1", "flow-selector-check-v1", "module-statistics-v1", "native-context-export-v1", "projection-apply-readback-v1", "projection-apply-receipt-v1", "projection-apply-recovery-v1", "projection-apply-replay-restore-v1", "projection-apply-replay-v1", "projection-architecture-debt-v1", "projection-capability-isolation-v1", "projection-change-classification-v2", "projection-check-freshness-v2", "projection-freshness-v2", "projection-manifest-contract-v4", "projection-observed-major-change-acceptance-v1", "projection-orphan-review-v1", "projection-preview-v1", "projection-prior-committed-applies-v1", "projection-protocol-v2", "projection-publish-v1", "projection-snapshot-v1", "projection-verify-pr-v1", "recommendation-scan-decision-v1", "recommendation-v3", "refactor-assessment-v1", "refactor-observation-evidence-v1", "refactor-resolution-v1", "refactor-scan-limits-v1", "refactor-scan-untracked-count-v1"]
46
+ "examples": ["architecture-change-capabilities-v1", "architecture-debt-v1", "architecture-docs-renderer-v2", "architecture-refresh-signal-v1", "capability-dependencies-declared-v1", "capability-dependencies-v1", "changeset-entity-operations-v1", "changeset-ownership-delta-v1", "code-facts-unavailable-error-v1", "docs-anchors-v1", "flow-selector-check-v1", "module-statistics-v1", "native-context-export-v1", "projection-apply-readback-v1", "projection-apply-receipt-v1", "projection-apply-recovery-v1", "projection-apply-replay-restore-v1", "projection-apply-replay-v1", "projection-architecture-debt-v1", "projection-capability-isolation-v1", "projection-change-classification-v2", "projection-check-freshness-v2", "projection-freshness-v2", "projection-manifest-contract-v4", "projection-observed-major-change-acceptance-v1", "projection-orphan-review-v1", "projection-preview-v1", "projection-prior-committed-applies-v1", "projection-protocol-v2", "projection-publish-v1", "projection-slice-v1", "projection-snapshot-v1", "projection-verify-pr-v1", "recommendation-scan-decision-v1", "recommendation-v3", "refactor-assessment-v1", "refactor-observation-evidence-v1", "refactor-resolution-v1", "refactor-scan-limits-v1", "refactor-scan-untracked-count-v1"]
47
47
  }
48
48
  }
49
49
  }
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/runtime/architecture-debt-delta.schema.json",
4
+ "title": "ArchitectureDebtDeltaReportV1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "head", "base", "introduced", "resolvedIds"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.architecture-debt-delta/v1" },
10
+ "head": {
11
+ "type": "object",
12
+ "additionalProperties": false,
13
+ "required": ["sha", "debt"],
14
+ "properties": {
15
+ "sha": { "$ref": "#/$defs/commitSha" },
16
+ "debt": { "$ref": "architecture-debt.schema.json" }
17
+ }
18
+ },
19
+ "base": {
20
+ "type": "object",
21
+ "additionalProperties": false,
22
+ "required": ["ref", "sha", "debtDigest", "coverage", "coverageReasonCodes"],
23
+ "properties": {
24
+ "ref": { "type": "string", "minLength": 1 },
25
+ "sha": { "$ref": "#/$defs/commitSha" },
26
+ "debtDigest": { "$ref": "architecture-debt.schema.json#/properties/digest" },
27
+ "coverage": { "$ref": "architecture-debt.schema.json#/properties/coverage" },
28
+ "coverageReasonCodes": { "$ref": "architecture-debt.schema.json#/properties/coverageReasonCodes" }
29
+ }
30
+ },
31
+ "introduced": {
32
+ "description": "Items ordered by item ID.",
33
+ "type": "array",
34
+ "uniqueItems": true,
35
+ "items": { "$ref": "architecture-debt.schema.json#/properties/items/items" }
36
+ },
37
+ "resolvedIds": {
38
+ "description": "Resolved item IDs in ascending order.",
39
+ "type": "array",
40
+ "uniqueItems": true,
41
+ "items": { "$ref": "architecture-debt.schema.json#/properties/items/items/properties/id" }
42
+ }
43
+ },
44
+ "$defs": {
45
+ "commitSha": { "type": "string", "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$" }
46
+ }
47
+ }
@@ -48,6 +48,7 @@
48
48
  "code-facts-unavailable",
49
49
  "unresolved-import",
50
50
  "layer-endpoint-unclassified",
51
+ "forbid-target-unowned",
51
52
  "workspace-resolution-failed"
52
53
  ]
53
54
  }