archctx-contracts 0.12.0 → 0.14.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/fixtures/invalid/hook-debt-checkpoint-failed-read.json +6 -1
- package/fixtures/invalid/projection-result-applied-incomplete-coverage.json +2 -2
- package/fixtures/valid/archctx-capabilities.json +5 -5
- package/fixtures/valid/architecture-refresh-signal.json +1 -3
- package/fixtures/valid/architecture-state-machine.json +158 -0
- package/fixtures/valid/hook-debt-checkpoint.json +6 -1
- package/fixtures/valid/product-version-manifest.json +5 -5
- package/fixtures/valid/projection-manifest.json +2 -4
- package/fixtures/valid/projection-request.json +1 -1
- package/fixtures/valid/projection-result.json +2 -2
- package/fixtures/valid/state-machine-check.json +80 -0
- package/package.json +1 -1
- package/schemas/repo/architecture-state-machine.schema.json +153 -0
- package/schemas/runtime/archctx-capabilities.schema.json +4 -4
- package/schemas/runtime/architecture-debt.schema.json +6 -3
- package/schemas/runtime/architecture-refresh-signal.schema.json +3 -4
- package/schemas/runtime/projection-apply-readback.schema.json +41 -41
- package/schemas/runtime/projection-apply-recovery.schema.json +7 -8
- package/schemas/runtime/projection-manifest.schema.json +21 -108
- package/schemas/runtime/projection-publish-run.schema.json +1 -1
- package/schemas/runtime/projection-request.schema.json +1 -1
- package/schemas/runtime/projection-result.schema.json +20 -21
- package/schemas/runtime/projection-target.schema.json +2 -2
- package/schemas/runtime/state-machine-check.schema.json +181 -0
- package/src/architecture-debt.ts +2 -2
- package/src/architecture-history.ts +8 -0
- package/src/failure.ts +29 -6
- package/src/index.ts +1 -0
- package/src/ledger.ts +2 -2
- package/src/product-version.ts +1 -1
- package/src/projection-manifest.ts +53 -156
- package/src/projection-writer.ts +1 -1
- package/src/projection.ts +122 -99
- package/src/state-machine.ts +280 -0
- package/src/validator.ts +7 -0
|
@@ -30,6 +30,11 @@
|
|
|
30
30
|
"coverage": "complete",
|
|
31
31
|
"reasonCodes": []
|
|
32
32
|
},
|
|
33
|
+
{
|
|
34
|
+
"check": "state-machines",
|
|
35
|
+
"coverage": "complete",
|
|
36
|
+
"reasonCodes": []
|
|
37
|
+
},
|
|
33
38
|
{
|
|
34
39
|
"check": "practices",
|
|
35
40
|
"coverage": "complete",
|
|
@@ -38,7 +43,7 @@
|
|
|
38
43
|
],
|
|
39
44
|
"items": [],
|
|
40
45
|
"actionsRequired": [],
|
|
41
|
-
"digest": "sha256:
|
|
46
|
+
"digest": "sha256:ceaaaf214aff4c0b05abe367cad2b58e52b25d2aeeb4809ebc0e101d34e66d09"
|
|
42
47
|
},
|
|
43
48
|
"hookLog": {
|
|
44
49
|
"schemaVersion": "archcontext.hook-log/v1",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"schemaVersion": "archcontext.projection-result/
|
|
2
|
+
"schemaVersion": "archcontext.projection-result/v3",
|
|
3
3
|
"requestId": "projection_request.repo_main",
|
|
4
4
|
"status": "applied",
|
|
5
5
|
"inputSnapshot": {
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"projection_target.entity.capability.api"
|
|
75
75
|
]
|
|
76
76
|
},
|
|
77
|
-
"receiptDigest": "sha256:
|
|
77
|
+
"receiptDigest": "sha256:04b89c0dfb1f4a5771286b9b968ac585686d58ca12f62fb12a9e6d1db78aa8f2"
|
|
78
78
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "archcontext.capabilities/v1",
|
|
3
|
-
"package": { "name": "archctx", "version": "0.
|
|
3
|
+
"package": { "name": "archctx", "version": "0.14.0" },
|
|
4
4
|
"protocols": {
|
|
5
5
|
"projectionRequest": "archcontext.projection-request/v1",
|
|
6
|
-
"projectionResult": "archcontext.projection-result/
|
|
7
|
-
"architectureRefreshSignal": "archcontext.architecture-refresh-signal/
|
|
6
|
+
"projectionResult": "archcontext.projection-result/v3",
|
|
7
|
+
"architectureRefreshSignal": "archcontext.architecture-refresh-signal/v2"
|
|
8
8
|
},
|
|
9
9
|
"renderers": {
|
|
10
10
|
"architectureDocs": "archcontext.docs-renderer/v6",
|
|
11
|
-
"agentContext": "archcontext.agent-context-renderer/
|
|
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-
|
|
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"]
|
|
14
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"schemaVersion": "archcontext.architecture-refresh-signal/
|
|
2
|
+
"schemaVersion": "archcontext.architecture-refresh-signal/v2",
|
|
3
3
|
"signalId": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
|
|
4
4
|
"idempotencyKey": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
|
|
5
5
|
"mode": "refresh-required",
|
|
@@ -21,13 +21,11 @@
|
|
|
21
21
|
"refreshTargets": ["architecture-contract-context", "architecture-readiness", "capability-context", "capability-index"],
|
|
22
22
|
"baseDigests": {
|
|
23
23
|
"modelDigest": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
|
|
24
|
-
"sourceTreeDigest": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
|
|
25
24
|
"flowProofDigest": "sha256:6666666666666666666666666666666666666666666666666666666666666666",
|
|
26
25
|
"projectionDigest": "sha256:7777777777777777777777777777777777777777777777777777777777777777"
|
|
27
26
|
},
|
|
28
27
|
"resultingDigests": {
|
|
29
28
|
"modelDigest": "sha256:8888888888888888888888888888888888888888888888888888888888888888",
|
|
30
|
-
"sourceTreeDigest": "sha256:9999999999999999999999999999999999999999999999999999999999999999",
|
|
31
29
|
"flowProofDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
32
30
|
"projectionDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
|
|
33
31
|
},
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "archcontext.state-machine/v1",
|
|
3
|
+
"id": "state-machine.checkout.order",
|
|
4
|
+
"capabilityId": "capability.checkout",
|
|
5
|
+
"name": "Order and payment",
|
|
6
|
+
"regions": [
|
|
7
|
+
{
|
|
8
|
+
"id": "order",
|
|
9
|
+
"label": "Order",
|
|
10
|
+
"initial": "open",
|
|
11
|
+
"states": [
|
|
12
|
+
{
|
|
13
|
+
"id": "open",
|
|
14
|
+
"label": "Open"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "shipped",
|
|
18
|
+
"label": "Shipped",
|
|
19
|
+
"terminal": true
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "cancelled",
|
|
23
|
+
"label": "Cancelled",
|
|
24
|
+
"terminal": true
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "payment",
|
|
30
|
+
"label": "Payment",
|
|
31
|
+
"initial": "unpaid",
|
|
32
|
+
"states": [
|
|
33
|
+
{
|
|
34
|
+
"id": "unpaid",
|
|
35
|
+
"label": "Unpaid"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "captured",
|
|
39
|
+
"label": "Captured"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "refunded",
|
|
43
|
+
"label": "Refunded"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"events": [
|
|
49
|
+
{
|
|
50
|
+
"id": "capture",
|
|
51
|
+
"label": "Capture the payment",
|
|
52
|
+
"source": {
|
|
53
|
+
"kind": "code",
|
|
54
|
+
"path": "src/payment.ts",
|
|
55
|
+
"symbol": "PaymentService.capture"
|
|
56
|
+
},
|
|
57
|
+
"steps": [
|
|
58
|
+
{
|
|
59
|
+
"when": {
|
|
60
|
+
"order": [
|
|
61
|
+
"open"
|
|
62
|
+
],
|
|
63
|
+
"payment": [
|
|
64
|
+
"unpaid"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"then": {
|
|
68
|
+
"payment": "captured"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"id": "ship",
|
|
75
|
+
"label": "Ship the order",
|
|
76
|
+
"source": {
|
|
77
|
+
"kind": "code",
|
|
78
|
+
"path": "src/order.ts",
|
|
79
|
+
"symbol": "shipOrder"
|
|
80
|
+
},
|
|
81
|
+
"steps": [
|
|
82
|
+
{
|
|
83
|
+
"when": {
|
|
84
|
+
"order": [
|
|
85
|
+
"open"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"then": {
|
|
89
|
+
"order": "shipped"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "cancel",
|
|
96
|
+
"label": "Cancel the order",
|
|
97
|
+
"source": {
|
|
98
|
+
"kind": "code",
|
|
99
|
+
"path": "src/order.ts",
|
|
100
|
+
"symbol": "cancelOrder"
|
|
101
|
+
},
|
|
102
|
+
"steps": [
|
|
103
|
+
{
|
|
104
|
+
"when": {
|
|
105
|
+
"order": [
|
|
106
|
+
"open"
|
|
107
|
+
],
|
|
108
|
+
"payment": [
|
|
109
|
+
"unpaid"
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
"then": {
|
|
113
|
+
"order": "cancelled"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"when": {
|
|
118
|
+
"order": [
|
|
119
|
+
"open"
|
|
120
|
+
],
|
|
121
|
+
"payment": [
|
|
122
|
+
"captured"
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
"then": {
|
|
126
|
+
"order": "cancelled",
|
|
127
|
+
"payment": "refunded"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"rules": [
|
|
134
|
+
{
|
|
135
|
+
"id": "paid-before-shipped",
|
|
136
|
+
"label": "An order never ships without a captured payment",
|
|
137
|
+
"never": {
|
|
138
|
+
"order": [
|
|
139
|
+
"shipped"
|
|
140
|
+
],
|
|
141
|
+
"payment": [
|
|
142
|
+
"unpaid",
|
|
143
|
+
"refunded"
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"id": "closed-order-stays-closed",
|
|
149
|
+
"label": "A shipped or cancelled order never changes",
|
|
150
|
+
"final": {
|
|
151
|
+
"order": [
|
|
152
|
+
"shipped",
|
|
153
|
+
"cancelled"
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
}
|
|
@@ -30,6 +30,11 @@
|
|
|
30
30
|
"coverage": "complete",
|
|
31
31
|
"reasonCodes": []
|
|
32
32
|
},
|
|
33
|
+
{
|
|
34
|
+
"check": "state-machines",
|
|
35
|
+
"coverage": "complete",
|
|
36
|
+
"reasonCodes": []
|
|
37
|
+
},
|
|
33
38
|
{
|
|
34
39
|
"check": "practices",
|
|
35
40
|
"coverage": "complete",
|
|
@@ -38,7 +43,7 @@
|
|
|
38
43
|
],
|
|
39
44
|
"items": [],
|
|
40
45
|
"actionsRequired": [],
|
|
41
|
-
"digest": "sha256:
|
|
46
|
+
"digest": "sha256:ceaaaf214aff4c0b05abe367cad2b58e52b25d2aeeb4809ebc0e101d34e66d09"
|
|
42
47
|
},
|
|
43
48
|
"hookLog": {
|
|
44
49
|
"schemaVersion": "archcontext.hook-log/v1",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": "archcontext.product-version-manifest/v1",
|
|
3
3
|
"product": {
|
|
4
4
|
"name": "archctx",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.14.0",
|
|
6
6
|
"distribution": "one-package"
|
|
7
7
|
},
|
|
8
8
|
"packageManager": "bun@1.4.3",
|
|
@@ -12,25 +12,25 @@
|
|
|
12
12
|
"surfaces": {
|
|
13
13
|
"cli": {
|
|
14
14
|
"packageName": "@archcontext/surfaces",
|
|
15
|
-
"version": "0.
|
|
15
|
+
"version": "0.14.0",
|
|
16
16
|
"entrypoint": "archctx"
|
|
17
17
|
},
|
|
18
18
|
"daemon": {
|
|
19
19
|
"packageName": "@archcontext/local-runtime",
|
|
20
|
-
"version": "0.
|
|
20
|
+
"version": "0.14.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.
|
|
26
|
+
"version": "0.14.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.
|
|
33
|
+
"contractsPackageVersion": "0.14.0"
|
|
34
34
|
},
|
|
35
35
|
"runtime": {
|
|
36
36
|
"localRpc": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"schemaVersion": "archcontext.architecture-docs-projection-manifest/
|
|
2
|
+
"schemaVersion": "archcontext.architecture-docs-projection-manifest/v4",
|
|
3
3
|
"rendererVersion": "archcontext.docs-renderer/v6",
|
|
4
4
|
"profile": "repo-harness/v1",
|
|
5
5
|
"layoutVersion": "archcontext.docs-layout/v1",
|
|
@@ -35,8 +35,6 @@
|
|
|
35
35
|
]
|
|
36
36
|
},
|
|
37
37
|
"targets": {
|
|
38
|
-
"projection_target.architecture.changelog":
|
|
39
|
-
{"type":"architecture-changelog","scope":{"kind":"changelog"},"path":"docs/architecture/changelog.md","ownership":"mixed","format":"markdown","outputDigest":"sha256:1f723aeb74466aae7d607eeab8c438a830c36f49a48e6622f868a8151afabea6"},
|
|
40
38
|
"projection_target.architecture.index":
|
|
41
39
|
{"type":"architecture-index","scope":{"kind":"repository"},"path":"docs/architecture/index.md","ownership":"mixed","format":"markdown","outputDigest":"sha256:64f1a29733be5033316aa99f657bfeb543df2fca99a2ba8b4103be22d46eeb57"},
|
|
42
40
|
"projection_target.decision.index":
|
|
@@ -48,6 +46,6 @@
|
|
|
48
46
|
"projection_target.diagram.structurizr":
|
|
49
47
|
{"type":"diagram-structurizr","scope":{"kind":"diagram","id":"architecture"},"path":"docs/architecture/diagrams/architecture.structurizr.json","ownership":"generated","format":"structurizr-json","outputDigest":"sha256:c886230580a87c89ee758db91fc26f6fb2100eb1017cfe0619a3e2332171c42d"},
|
|
50
48
|
"projection_target.entity.capability-example-billing":
|
|
51
|
-
{"type":"entity-summary","scope":{"kind":"entity","id":"capability.example.billing","entityKind":"capability"},"path":"docs/architecture/modules/example/billing.md","ownership":"mixed","format":"markdown","outputDigest":"sha256:2963da98797bba21c3e87b86e60dca3b7c19f75a592723e4c98e0f41b2eb8f58"
|
|
49
|
+
{"type":"entity-summary","scope":{"kind":"entity","id":"capability.example.billing","entityKind":"capability"},"path":"docs/architecture/modules/example/billing.md","ownership":"mixed","format":"markdown","outputDigest":"sha256:2963da98797bba21c3e87b86e60dca3b7c19f75a592723e4c98e0f41b2eb8f58"}
|
|
52
50
|
}
|
|
53
51
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"requestId": "projection_request.repo_main",
|
|
4
4
|
"profile": "repo-harness/v1",
|
|
5
5
|
"mode": "apply",
|
|
6
|
-
"targets": ["agent-context", "architecture-docs"],
|
|
6
|
+
"targets": ["agent-context", "architecture-docs", "architecture-history"],
|
|
7
7
|
"changedPaths": ["packages/core/src/index.ts", "src/cli/main.ts"],
|
|
8
8
|
"expected": {
|
|
9
9
|
"repositoryId": "repo.example",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"schemaVersion": "archcontext.projection-result/
|
|
2
|
+
"schemaVersion": "archcontext.projection-result/v3",
|
|
3
3
|
"requestId": "projection_request.repo_main",
|
|
4
4
|
"status": "applied",
|
|
5
5
|
"inputSnapshot": {
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
],
|
|
44
44
|
"humanActions": [],
|
|
45
45
|
"refreshSignals": [],
|
|
46
|
-
"receiptDigest": "sha256:
|
|
46
|
+
"receiptDigest": "sha256:2f8e73315a0ff9c678d496bf78438b47dc5a8a25eb757eda3d15718f58dd2b8c"
|
|
47
47
|
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "archcontext.state-machine-check/v1",
|
|
3
|
+
"machines": [
|
|
4
|
+
{
|
|
5
|
+
"id": "state-machine.checkout.order",
|
|
6
|
+
"capabilityId": "capability.checkout",
|
|
7
|
+
"reachableStates": 6,
|
|
8
|
+
"transitions": 5,
|
|
9
|
+
"rules": [
|
|
10
|
+
{
|
|
11
|
+
"id": "paid-before-shipped",
|
|
12
|
+
"kind": "never",
|
|
13
|
+
"status": "broken",
|
|
14
|
+
"state": {
|
|
15
|
+
"order": "shipped",
|
|
16
|
+
"payment": "unpaid"
|
|
17
|
+
},
|
|
18
|
+
"path": [
|
|
19
|
+
{
|
|
20
|
+
"event": "ship",
|
|
21
|
+
"step": 1
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "closed-order-stays-closed",
|
|
27
|
+
"kind": "final",
|
|
28
|
+
"status": "holds",
|
|
29
|
+
"protectedBy": [
|
|
30
|
+
{
|
|
31
|
+
"event": "ship",
|
|
32
|
+
"step": 1,
|
|
33
|
+
"region": "order"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"event": "cancel",
|
|
37
|
+
"step": 1,
|
|
38
|
+
"region": "order"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"event": "cancel",
|
|
42
|
+
"step": 2,
|
|
43
|
+
"region": "order"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"breaks": [],
|
|
49
|
+
"anchors": [
|
|
50
|
+
{
|
|
51
|
+
"owner": "event",
|
|
52
|
+
"ownerId": "capture",
|
|
53
|
+
"path": "src/payment.ts",
|
|
54
|
+
"symbol": "PaymentService.capture",
|
|
55
|
+
"status": "anchor-unconfirmed",
|
|
56
|
+
"digest": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
|
|
57
|
+
"callees": [
|
|
58
|
+
{ "path": "src/payment-gateway.ts", "qualifiedName": "chargeCard" }
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"owner": "event",
|
|
63
|
+
"ownerId": "ship",
|
|
64
|
+
"path": "src/order.ts",
|
|
65
|
+
"symbol": "shipOrder",
|
|
66
|
+
"status": "anchor-unconfirmed",
|
|
67
|
+
"digest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
|
|
68
|
+
"callees": []
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"owner": "event",
|
|
72
|
+
"ownerId": "cancel",
|
|
73
|
+
"path": "src/order.ts",
|
|
74
|
+
"symbol": "cancelOrder",
|
|
75
|
+
"status": "anchor-missing-symbol"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archctx.repoharness.com/schemas/repo/architecture-state-machine.schema.json",
|
|
4
|
+
"title": "ArchitectureStateMachineV1",
|
|
5
|
+
"description": "One state machine of a capability: parallel regions of states, events whose steps move them, and the rules that no reachable global state may break. Cross-entity rules (unknown regions and states, duplicate ids, the 100000 global state limit) are checked by stateMachineModelIssues.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schemaVersion", "id", "capabilityId", "name", "regions", "events", "rules"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": { "const": "archcontext.state-machine/v1" },
|
|
11
|
+
"id": { "type": "string", "pattern": "^state-machine\\.[a-z][a-z0-9-]*(\\.[a-z0-9][a-z0-9-]*)*$" },
|
|
12
|
+
"capabilityId": { "type": "string", "pattern": "^capability\\.[a-z][a-z0-9-]*(\\.[a-z0-9][a-z0-9-]*)*$" },
|
|
13
|
+
"name": { "$ref": "#/$defs/label" },
|
|
14
|
+
"regions": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"minItems": 1,
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": ["id", "label", "initial", "states"],
|
|
21
|
+
"properties": {
|
|
22
|
+
"id": { "$ref": "#/$defs/localId" },
|
|
23
|
+
"label": { "$ref": "#/$defs/label" },
|
|
24
|
+
"initial": { "$ref": "#/$defs/localId" },
|
|
25
|
+
"states": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"minItems": 1,
|
|
28
|
+
"items": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": ["id", "label"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"id": { "$ref": "#/$defs/localId" },
|
|
34
|
+
"label": { "$ref": "#/$defs/label" },
|
|
35
|
+
"terminal": { "type": "boolean" }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"source": { "$ref": "#/$defs/codeSource" }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"events": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"minItems": 1,
|
|
46
|
+
"items": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"additionalProperties": false,
|
|
49
|
+
"required": ["id", "label", "source", "steps"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"id": { "$ref": "#/$defs/localId" },
|
|
52
|
+
"label": { "$ref": "#/$defs/label" },
|
|
53
|
+
"source": {
|
|
54
|
+
"if": { "required": ["kind"], "properties": { "kind": { "const": "code" } } },
|
|
55
|
+
"then": { "$ref": "#/$defs/codeSource" },
|
|
56
|
+
"else": { "$ref": "#/$defs/environmentSource" }
|
|
57
|
+
},
|
|
58
|
+
"steps": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"minItems": 1,
|
|
61
|
+
"items": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"required": ["when", "then"],
|
|
65
|
+
"properties": {
|
|
66
|
+
"when": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"minProperties": 1,
|
|
69
|
+
"propertyNames": { "$ref": "#/$defs/localId" },
|
|
70
|
+
"additionalProperties": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/localId" } }
|
|
71
|
+
},
|
|
72
|
+
"then": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"minProperties": 1,
|
|
75
|
+
"propertyNames": { "$ref": "#/$defs/localId" },
|
|
76
|
+
"additionalProperties": { "$ref": "#/$defs/localId" }
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"rules": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"required": ["id", "label"],
|
|
90
|
+
"oneOf": [{ "required": ["never"] }, { "required": ["final"] }],
|
|
91
|
+
"properties": {
|
|
92
|
+
"id": { "$ref": "#/$defs/localId" },
|
|
93
|
+
"label": { "$ref": "#/$defs/label" },
|
|
94
|
+
"never": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"minProperties": 2,
|
|
97
|
+
"propertyNames": { "$ref": "#/$defs/localId" },
|
|
98
|
+
"additionalProperties": { "$ref": "#/$defs/stateList" }
|
|
99
|
+
},
|
|
100
|
+
"final": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"minProperties": 1,
|
|
103
|
+
"maxProperties": 1,
|
|
104
|
+
"propertyNames": { "$ref": "#/$defs/localId" },
|
|
105
|
+
"additionalProperties": { "$ref": "#/$defs/stateList" }
|
|
106
|
+
},
|
|
107
|
+
"finding": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"additionalProperties": false,
|
|
110
|
+
"required": ["tracking"],
|
|
111
|
+
"properties": {
|
|
112
|
+
"tracking": { "type": "string", "pattern": "^https://[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*(?::[0-9]{1,5})?(?:[/?#][^\\s|`]*)?$" }
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"$defs": {
|
|
120
|
+
"localId": { "type": "string", "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$" },
|
|
121
|
+
"label": {
|
|
122
|
+
"description": "One line of 1 to 80 characters with none of the characters that a statechart label would need to escape.",
|
|
123
|
+
"type": "string",
|
|
124
|
+
"minLength": 1,
|
|
125
|
+
"maxLength": 80,
|
|
126
|
+
"pattern": "^[^\"#;:<>\\\\|\\r\\n]+$"
|
|
127
|
+
},
|
|
128
|
+
"stateList": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/localId" } },
|
|
129
|
+
"codeSource": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"additionalProperties": false,
|
|
132
|
+
"required": ["kind", "path"],
|
|
133
|
+
"properties": {
|
|
134
|
+
"kind": { "const": "code" },
|
|
135
|
+
"path": {
|
|
136
|
+
"description": "A canonical repository-relative POSIX path: no leading slash, backslash, empty, `.` or `..` segment, and no `|`, backtick or line break.",
|
|
137
|
+
"type": "string",
|
|
138
|
+
"pattern": "^(?!(?:.*/)?\\.\\.?(?:/|$))[^/\\\\|`\\r\\n]+(?:/[^/\\\\|`\\r\\n]+)*$"
|
|
139
|
+
},
|
|
140
|
+
"symbol": { "description": "One line with no `|` or backtick.", "type": "string", "pattern": "^[^|`\\r\\n]+$" },
|
|
141
|
+
"confirmedDigest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"environmentSource": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"additionalProperties": false,
|
|
147
|
+
"required": ["kind"],
|
|
148
|
+
"properties": {
|
|
149
|
+
"kind": { "const": "environment" }
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"required": ["projectionRequest", "projectionResult", "architectureRefreshSignal"],
|
|
23
23
|
"properties": {
|
|
24
24
|
"projectionRequest": { "const": "archcontext.projection-request/v1" },
|
|
25
|
-
"projectionResult": { "const": "archcontext.projection-result/
|
|
26
|
-
"architectureRefreshSignal": { "const": "archcontext.architecture-refresh-signal/
|
|
25
|
+
"projectionResult": { "const": "archcontext.projection-result/v3" },
|
|
26
|
+
"architectureRefreshSignal": { "const": "archcontext.architecture-refresh-signal/v2" }
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"renderers": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"required": ["architectureDocs", "agentContext"],
|
|
33
33
|
"properties": {
|
|
34
34
|
"architectureDocs": { "const": "archcontext.docs-renderer/v6" },
|
|
35
|
-
"agentContext": { "const": "archcontext.agent-context-renderer/
|
|
35
|
+
"agentContext": { "const": "archcontext.agent-context-renderer/v2" }
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"features": {
|
|
@@ -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-
|
|
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"]
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
},
|
|
72
72
|
"checks": {
|
|
73
73
|
"type": "array",
|
|
74
|
-
"minItems":
|
|
75
|
-
"maxItems":
|
|
74
|
+
"minItems": 6,
|
|
75
|
+
"maxItems": 6,
|
|
76
76
|
"items": {
|
|
77
77
|
"type": "object",
|
|
78
78
|
"additionalProperties": false,
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
"anchors",
|
|
89
89
|
"dependencies",
|
|
90
90
|
"flows",
|
|
91
|
+
"state-machines",
|
|
91
92
|
"practices"
|
|
92
93
|
]
|
|
93
94
|
},
|
|
@@ -137,7 +138,9 @@
|
|
|
137
138
|
"undeclared-dependency",
|
|
138
139
|
"flow-proof-failed",
|
|
139
140
|
"stale-anchor",
|
|
140
|
-
"practice-regression"
|
|
141
|
+
"practice-regression",
|
|
142
|
+
"state-machine-rule",
|
|
143
|
+
"state-machine-stale"
|
|
141
144
|
]
|
|
142
145
|
},
|
|
143
146
|
"nodeIds": {
|