arkgate 4.8.4 → 4.8.6

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 (70) hide show
  1. package/CHANGELOG.md +69 -2
  2. package/README.md +20 -11
  3. package/bin/lib/agent-homes.mjs +41 -6
  4. package/bin/lib/analysis-engine.mjs +8 -8
  5. package/bin/lib/ark-order-invariants.mjs +199 -13
  6. package/bin/lib/ark-order-sensors.mjs +4 -0
  7. package/bin/lib/ark-order-types.mjs +3 -0
  8. package/bin/lib/check-args.mjs +2 -0
  9. package/bin/lib/diagnostic-catalog.mjs +7 -3
  10. package/bin/lib/first-run-help.mjs +4 -4
  11. package/bin/lib/remediation.mjs +20 -5
  12. package/bin/lib/skill-catalog-apply.mjs +18 -1
  13. package/bin/lib/skill-install.mjs +4 -3
  14. package/bin/lib/upgrade-whats-new.mjs +1 -1
  15. package/dist/{diagnosticCatalog-DgTs0abp.d.ts → diagnosticCatalog-D_DI7qrZ.d.ts} +1 -1
  16. package/dist/eslint/index.cjs +5 -5
  17. package/dist/eslint/index.js +5 -5
  18. package/dist/index.cjs +17 -17
  19. package/dist/index.d.ts +5 -3
  20. package/dist/index.js +13 -13
  21. package/dist/nestjs/index.cjs +5 -5
  22. package/dist/nestjs/index.d.ts +1 -1
  23. package/dist/nestjs/index.js +5 -5
  24. package/dist/order/index.cjs +1 -1
  25. package/dist/order/index.d.ts +69 -9
  26. package/dist/order/index.js +1 -1
  27. package/dist/runtime/index.cjs +15 -15
  28. package/dist/runtime/index.d.ts +27 -4
  29. package/dist/runtime/index.js +15 -15
  30. package/dist/{types-D95drJ3_.d.ts → types-DrqsOiTY.d.ts} +21 -6
  31. package/docs/README.md +6 -4
  32. package/docs/agent-guide.md +6 -4
  33. package/docs/ai-gates.md +18 -4
  34. package/docs/arkorder.md +228 -0
  35. package/docs/configuration.md +14 -5
  36. package/docs/develop.md +10 -4
  37. package/docs/diagnostics.md +41 -4
  38. package/docs/enthusiast/how-to-agent-gates.md +1 -1
  39. package/docs/package-surface.md +14 -9
  40. package/docs/product-voice.md +3 -3
  41. package/docs/use.md +1 -1
  42. package/package.json +2 -1
  43. package/server.json +2 -2
  44. package/templates/agent-skills/README.md +1 -1
  45. package/templates/agent-skills/ark-adopt/SKILL.md +4 -4
  46. package/templates/agent-skills/ark-architect/SKILL.md +1 -1
  47. package/templates/agent-skills/ark-autopilot/SKILL.md +4 -4
  48. package/templates/agent-skills/ark-contract/SKILL.md +1 -1
  49. package/templates/agent-skills/ark-coverage/SKILL.md +3 -2
  50. package/templates/agent-skills/ark-explain/SKILL.md +3 -2
  51. package/templates/agent-skills/ark-explore/SKILL.md +3 -2
  52. package/templates/agent-skills/ark-fix/SKILL.md +1 -1
  53. package/templates/agent-skills/ark-loop/SKILL.md +1 -1
  54. package/templates/agent-skills/ark-place/SKILL.md +8 -8
  55. package/templates/agent-skills/ark-runtime/SKILL.md +3 -0
  56. package/templates/agent-skills/ark-think/SKILL.md +2 -2
  57. package/templates/agent-skills/ark-upgrade/SKILL.md +3 -3
  58. package/templates/skills/ark-adopt.md +4 -4
  59. package/templates/skills/ark-architect.md +1 -1
  60. package/templates/skills/ark-autopilot.md +4 -4
  61. package/templates/skills/ark-contract.md +1 -1
  62. package/templates/skills/ark-coverage.md +3 -2
  63. package/templates/skills/ark-explain.md +3 -2
  64. package/templates/skills/ark-explore.md +3 -2
  65. package/templates/skills/ark-fix.md +1 -1
  66. package/templates/skills/ark-loop.md +1 -1
  67. package/templates/skills/ark-place.md +8 -8
  68. package/templates/skills/ark-runtime.md +3 -0
  69. package/templates/skills/ark-think.md +2 -2
  70. package/templates/skills/ark-upgrade.md +3 -3
@@ -862,20 +862,35 @@ type ArkRunInformationPackageComponent = {
862
862
  sends: string[];
863
863
  extendedInfo?: ArkRunExtendedInfo;
864
864
  };
865
+ declare const ARK_RUN_DECISION_TAPE_RESIDUAL_KINDS: readonly ["absorb", "escalate_up", "hold"];
866
+ type ArkRunDecisionTapeResidualKind = (typeof ARK_RUN_DECISION_TAPE_RESIDUAL_KINDS)[number];
867
+ /** Additive Order residual tape (ADR 0034 D6). Not a bus. Not durable. */
868
+ type ArkRunDecisionTapeRecord = {
869
+ xiHash: string;
870
+ event: {
871
+ kind: string;
872
+ payload?: Record<string, string | number | boolean | null>;
873
+ };
874
+ residual: {
875
+ kind: ArkRunDecisionTapeResidualKind;
876
+ reasonCode?: string;
877
+ eventId?: string;
878
+ target?: string;
879
+ };
880
+ };
865
881
  type DependencyInformationPackage = {
866
882
  schemaVersion: typeof ARK_RUN_INFORMATION_PACKAGE_SCHEMA_VERSION;
867
883
  kernelInstanceId: string;
868
884
  components: ArkRunInformationPackageComponent[];
885
+ /** Optional; omitted keeps the 4.8.x component snapshot shape. */
886
+ decisionTape?: ArkRunDecisionTapeRecord[];
869
887
  };
870
- /**
871
- * Build a JSON-serializable snapshot from unknown component records.
872
- * Only id, lifetime, the four declaration lists, and optional extendedInfo
873
- * survive — extra keys (factory, instance, DTO payloads) are dropped.
874
- */
875
888
  declare function buildDependencyInformationPackage(input: {
876
889
  kernelInstanceId?: unknown;
877
890
  components?: unknown;
891
+ decisionTape?: unknown;
878
892
  }): DependencyInformationPackage;
893
+ declare function appendDecisionTape(pack: DependencyInformationPackage, record: unknown): DependencyInformationPackage;
879
894
 
880
895
  /**
881
896
  * ArkRun requestGraph slices (RN13). Tooling only — never a gate verdict.
@@ -1234,4 +1249,4 @@ interface CreateArkKernelFromConfigOptions extends Omit<CreateArkKernelOptions,
1234
1249
  }
1235
1250
  type ArkKernelConfig = ArkCheckConfig;
1236
1251
 
1237
- export { ARK_RUN_INSPECTOR_GRAPH_PATH as $, type ArkKernel as A, type OutboxRecord as B, type CreateArkKernelOptions as C, type DefineIntentOptions as D, type EventContractRegistry as E, type ObservabilityDriftReport as F, type GraphEdge as G, ARK_RUN_COMPONENT_LIFETIMES as H, IntentRegistry as I, ARK_RUN_EPHEMERAL_DEFAULT as J, ARK_RUN_GRAPH_DEFAULT_SLICE as K, ARK_RUN_GRAPH_NODE_KINDS as L, type MetadataRegistry as M, ARK_RUN_GRAPH_PROCESS_EDGE_KINDS as N, type ObservabilityReporter as O, type ProjectionRegistry as P, ARK_RUN_GRAPH_SCHEMA_VERSION as Q, type ReadModelStore as R, type SagaContext as S, type TraceRecordType as T, ARK_RUN_GRAPH_SLICES as U, ARK_RUN_GRAPH_TECHNICAL_EDGE_KINDS as V, type WorkflowStore as W, ARK_RUN_INFORMATION_PACKAGE_SCHEMA_VERSION as X, ARK_RUN_INSPECTOR_DEFAULT_HOST as Y, ARK_RUN_INSPECTOR_DEFAULT_PORT as Z, ARK_RUN_INSPECTOR_EVENTS_PATH as _, type DependencyGraph as a, InvalidArkRunSendOptionError as a$, ARK_RUN_INSPECTOR_SCHEMA_VERSION as a0, ARK_RUN_INSPECTOR_SNAPSHOT_PATH as a1, ARK_RUN_INSPECTOR_SSE_EVENT as a2, ARK_RUN_INSPECTOR_TRANSPORT_FALLBACK as a3, ARK_RUN_TRANSPORT_KINDS as a4, type ArkManifestArchitecture as a5, type ArkManifestData as a6, type ArkManifestEntityLink as a7, type ArkManifestGraph as a8, type ArkManifestIntent as a9, type ArkRunInspectorSource as aA, type ArkRunInspectorTransportFacts as aB, type ArkRunPublisher as aC, type ArkRunRegisterOptions as aD, type ArkRunRegistrationHandle as aE, type ArkRunSendOptions as aF, type ArkRunSendPlan as aG, type ArkRunSendPlanInput as aH, type ArkRunSendResult as aI, type ArkRunTransportKind as aJ, type AuditRecordInput as aK, type AuditRecordType as aL, type DependencyInformationPackage as aM, type EntityMeta as aN, type EventContractIssue as aO, type EventHandler as aP, type EventInterceptionInfo as aQ, type EventInterceptor as aR, type EventInterceptorContext as aS, type EventPayloadPatch as aT, type EventPayloadSchema as aU, type EventPublisher as aV, type EventSchemaField as aW, type EventSchemaFieldType as aX, type FieldMeta as aY, type GraphNode as aZ, InvalidArkRunGraphQueryError as a_, type ArkManifestPolicy as aa, type ArkManifestProjection as ab, type ArkRunBrokerAdapter as ac, type ArkRunComponentLifetime as ad, type ArkRunDeliveredVia as ae, type ArkRunExtendedInfo as af, type ArkRunGraph as ag, type ArkRunGraphEdge as ah, type ArkRunGraphEdgeKind as ai, type ArkRunGraphMatch as aj, type ArkRunGraphMatchInput as ak, type ArkRunGraphNode as al, type ArkRunGraphNodeKind as am, type ArkRunGraphProcessEdgeKind as an, type ArkRunGraphQuery as ao, type ArkRunGraphResolvedQuery as ap, type ArkRunGraphSlice as aq, type ArkRunGraphTechnicalEdgeKind as ar, type ArkRunInformationPackageComponent as as, type ArkRunInspectorBind as at, ArkRunInspectorBindError as au, type ArkRunInspectorBindInput as av, type ArkRunInspectorHandle as aw, ArkRunInspectorProductionError as ax, type ArkRunInspectorSnapshot as ay, type ArkRunInspectorSnapshotInput as az, type AuditStore as b, type ObservabilityFlow as b0, type ObservedLayerFlowMode as b1, type OutboxStore as b2, type PolicyEvaluationResult as b3, type ProjectionCheckpoint as b4, type ProjectionDefinition as b5, type PublishedEventRecord as b6, type RetryPolicy as b7, type SagaStatus as b8, type SagaStep as b9, type StartArkRunInspectorOptions as ba, type TraceSink as bb, type Unsubscribe as bc, type WorkflowDefinition as bd, type WorkflowStatus as be, type WorkflowStep as bf, arkRunGraphQueryFromSearchParams as bg, arkRunInspectorUrl as bh, buildArkRunInspectorSnapshot as bi, buildDependencyInformationPackage as bj, closeArkRunGraphQuery as bk, closedArkRunEphemeral as bl, closedArkRunTransportKind as bm, formatArkRunGraphMermaid as bn, formatArkRunInspectorSseEvent as bo, isArkRunInspectorLoopbackHost as bp, isArkRunInspectorProductionEnv as bq, requestArkRunGraph as br, resolveArkRunInspectorBind as bs, resolveArkRunSendPlan as bt, startArkRunInspector as bu, type AuditRecord as c, type AuditQuery as d, type CreateAuditTrailOptions as e, type AuditTrail as f, type EventContract as g, type EventContractValidationResult as h, type CreateProjectionRegistryOptions as i, type EventBufferStore as j, type EventBufferRecord as k, type EventBufferStatus as l, type EventBusOptions as m, type EventBus as n, type CreateObservabilityReporterOptions as o, PolicyEngine as p, type ArkManifest as q, type WorkflowSnapshot as r, type SagaDefinition as s, type CreateWorkflowEngineOptions as t, type SagaInstance as u, type WorkflowEngine as v, type ArkKernelConfig as w, type CreateArkKernelFromConfigOptions as x, type TraceRecord as y, type OutboxStatus as z };
1252
+ export { ARK_RUN_INSPECTOR_EVENTS_PATH as $, type ArkKernel as A, type OutboxStatus as B, type CreateArkKernelOptions as C, type DefineIntentOptions as D, type EventContractRegistry as E, type OutboxRecord as F, type GraphEdge as G, type ObservabilityDriftReport as H, IntentRegistry as I, ARK_RUN_COMPONENT_LIFETIMES as J, ARK_RUN_EPHEMERAL_DEFAULT as K, ARK_RUN_GRAPH_DEFAULT_SLICE as L, type MetadataRegistry as M, ARK_RUN_GRAPH_NODE_KINDS as N, type ObservabilityReporter as O, type ProjectionRegistry as P, ARK_RUN_GRAPH_PROCESS_EDGE_KINDS as Q, type ReadModelStore as R, type SagaContext as S, type TraceRecordType as T, ARK_RUN_GRAPH_SCHEMA_VERSION as U, ARK_RUN_GRAPH_SLICES as V, type WorkflowStore as W, ARK_RUN_GRAPH_TECHNICAL_EDGE_KINDS as X, ARK_RUN_INFORMATION_PACKAGE_SCHEMA_VERSION as Y, ARK_RUN_INSPECTOR_DEFAULT_HOST as Z, ARK_RUN_INSPECTOR_DEFAULT_PORT as _, type DependencyGraph as a, InvalidArkRunSendOptionError as a$, ARK_RUN_INSPECTOR_GRAPH_PATH as a0, ARK_RUN_INSPECTOR_SCHEMA_VERSION as a1, ARK_RUN_INSPECTOR_SNAPSHOT_PATH as a2, ARK_RUN_INSPECTOR_SSE_EVENT as a3, ARK_RUN_INSPECTOR_TRANSPORT_FALLBACK as a4, ARK_RUN_TRANSPORT_KINDS as a5, type ArkManifestArchitecture as a6, type ArkManifestData as a7, type ArkManifestEntityLink as a8, type ArkManifestGraph as a9, type ArkRunInspectorSnapshotInput as aA, type ArkRunInspectorSource as aB, type ArkRunInspectorTransportFacts as aC, type ArkRunPublisher as aD, type ArkRunRegisterOptions as aE, type ArkRunRegistrationHandle as aF, type ArkRunSendOptions as aG, type ArkRunSendPlan as aH, type ArkRunSendPlanInput as aI, type ArkRunSendResult as aJ, type ArkRunTransportKind as aK, type AuditRecordInput as aL, type AuditRecordType as aM, type EntityMeta as aN, type EventContractIssue as aO, type EventHandler as aP, type EventInterceptionInfo as aQ, type EventInterceptor as aR, type EventInterceptorContext as aS, type EventPayloadPatch as aT, type EventPayloadSchema as aU, type EventPublisher as aV, type EventSchemaField as aW, type EventSchemaFieldType as aX, type FieldMeta as aY, type GraphNode as aZ, InvalidArkRunGraphQueryError as a_, type ArkManifestIntent as aa, type ArkManifestPolicy as ab, type ArkManifestProjection as ac, type ArkRunBrokerAdapter as ad, type ArkRunComponentLifetime as ae, type ArkRunDeliveredVia as af, type ArkRunExtendedInfo as ag, type ArkRunGraph as ah, type ArkRunGraphEdge as ai, type ArkRunGraphEdgeKind as aj, type ArkRunGraphMatch as ak, type ArkRunGraphMatchInput as al, type ArkRunGraphNode as am, type ArkRunGraphNodeKind as an, type ArkRunGraphProcessEdgeKind as ao, type ArkRunGraphQuery as ap, type ArkRunGraphResolvedQuery as aq, type ArkRunGraphSlice as ar, type ArkRunGraphTechnicalEdgeKind as as, type ArkRunInformationPackageComponent as at, type ArkRunInspectorBind as au, ArkRunInspectorBindError as av, type ArkRunInspectorBindInput as aw, type ArkRunInspectorHandle as ax, ArkRunInspectorProductionError as ay, type ArkRunInspectorSnapshot as az, type AuditStore as b, type ObservabilityFlow as b0, type ObservedLayerFlowMode as b1, type OutboxStore as b2, type PolicyEvaluationResult as b3, type ProjectionCheckpoint as b4, type ProjectionDefinition as b5, type PublishedEventRecord as b6, type RetryPolicy as b7, type SagaStatus as b8, type SagaStep as b9, type StartArkRunInspectorOptions as ba, type TraceSink as bb, type Unsubscribe as bc, type WorkflowDefinition as bd, type WorkflowStatus as be, type WorkflowStep as bf, appendDecisionTape as bg, arkRunGraphQueryFromSearchParams as bh, arkRunInspectorUrl as bi, buildArkRunInspectorSnapshot as bj, buildDependencyInformationPackage as bk, closeArkRunGraphQuery as bl, closedArkRunEphemeral as bm, closedArkRunTransportKind as bn, formatArkRunGraphMermaid as bo, formatArkRunInspectorSseEvent as bp, isArkRunInspectorLoopbackHost as bq, isArkRunInspectorProductionEnv as br, requestArkRunGraph as bs, resolveArkRunInspectorBind as bt, resolveArkRunSendPlan as bu, startArkRunInspector as bv, type AuditRecord as c, type AuditQuery as d, type CreateAuditTrailOptions as e, type AuditTrail as f, type EventContract as g, type EventContractValidationResult as h, type CreateProjectionRegistryOptions as i, type EventBufferStore as j, type EventBufferRecord as k, type EventBufferStatus as l, type EventBusOptions as m, type EventBus as n, type CreateObservabilityReporterOptions as o, PolicyEngine as p, type ArkManifest as q, type WorkflowSnapshot as r, type SagaDefinition as s, type CreateWorkflowEngineOptions as t, type SagaInstance as u, type WorkflowEngine as v, type DependencyInformationPackage as w, type ArkKernelConfig as x, type CreateArkKernelFromConfigOptions as y, type TraceRecord as z };
package/docs/README.md CHANGED
@@ -36,6 +36,7 @@ Product site: [arkgate.online](https://www.arkgate.online/) · npm: [`arkgate`](
36
36
  | [agent-guide.md](agent-guide.md) | Agent, CLI, and MCP reference (incl. `ark status --json` / MCP `ark_status`) |
37
37
  | [diagnostics.md](diagnostics.md) | Public diagnostic `ruleId` catalog (why / fix anchors) |
38
38
  | [configuration.md](configuration.md) | `ark.config.json` contract |
39
+ | [arkorder.md](arkorder.md) | Optional ArkOrder extra: library + sensors, not a service |
39
40
  | [brownfield-adoption.md](brownfield-adoption.md) | Existing messy repos |
40
41
  | [package-surface.md](package-surface.md) | Stable vs experimental package surface |
41
42
  | [typescript-support.md](typescript-support.md) | TS 5 / 6 / 7 analysis boundary |
@@ -45,7 +46,7 @@ Product site: [arkgate.online](https://www.arkgate.online/) · npm: [`arkgate`](
45
46
  |-----|------------|
46
47
  | [CONTRIBUTING.md](../CONTRIBUTING.md) | Setup, rules, PR/release |
47
48
  | [ROADMAP.md](../ROADMAP.md) | Live implementation queue (one `doing` at a time). History: [archive/roadmap-history.md](archive/roadmap-history.md) |
48
- | [adr/](adr/README.md) | Architecture decisions ([0032](adr/0032-writes-via-aggregate-sensor.md) writes-via-aggregate) |
49
+ | [adr/](adr/README.md) | Architecture decisions ([0032](adr/0032-writes-via-aggregate-sensor.md) writes-via-aggregate · [0033](adr/0033-arkorder-runtime-half-is-arkrun.md) ArkOrder runtime half · [0034](adr/0034-arkorder-valved-loop.md) valved loop) |
49
50
  | [SECURITY.md](../SECURITY.md) · [threat-model.md](threat-model.md) | Security |
50
51
 
51
52
  ---
@@ -57,13 +58,14 @@ These are **not** the day-to-day product path. They stay in the repo for evidenc
57
58
  | Area | Path |
58
59
  |------|------|
59
60
  | Release notes (by version) | [releases/](releases/) · npm [CHANGELOG.md](../CHANGELOG.md) (Unreleased + 4.6.x) · [pre-4.6 archive](archive/CHANGELOG-pre-4.6.md) |
60
- | Epic plans | [plans/](plans/) — maintainer seeds, not required to use the package. Live: [alive-in-six-months](plans/alive-in-six-months/README.md) (`AL01`–`AL04` done; `AL05` parked). [arkrun](plans/arkrun/README.md) (Phase RN; `RN01`–`RN17` done; shipped **4.7.0** + companion **4.7.4**; ADRs [0020](adr/0020-arkrun-gated-extra-plane.md)–[0024](adr/0024-arkrun-transport-ports.md) accepted). [one-catalog-one-root](plans/one-catalog-one-root/README.md) (Phase HS; `HS01`–`HS05` done; shipped **4.7.1**). [arkorder](plans/arkorder/README.md) (Phase OR; `OR01`–`OR07` done; shipped **4.8.0**; extra **inside** package `arkgate` as `arkgate/order`; ADRs [0027](adr/0027-arkorder-gated-extra-plane.md)–[0031](adr/0031-one-package-extras-deprecate-companion.md)). |
61
+ | Epic plans | [plans/](plans/) — maintainer seeds, not required to use the package. Live: [alive-in-six-months](plans/alive-in-six-months/README.md) (`AL01`–`AL04` done; `AL05` parked). [arkrun](plans/arkrun/README.md) (Phase RN; `RN01`–`RN17` done; shipped **4.7.0** + companion **4.7.4**; ADRs [0020](adr/0020-arkrun-gated-extra-plane.md)–[0024](adr/0024-arkrun-transport-ports.md) accepted). [one-catalog-one-root](plans/one-catalog-one-root/README.md) (Phase HS; `HS01`–`HS05` done; shipped **4.7.1**). [arkorder](plans/arkorder/README.md) (Phase OR; `OR01`–`OR07` done; shipped **4.8.0**; extra **inside** package `arkgate` as `arkgate/order`; ADRs [0027](adr/0027-arkorder-gated-extra-plane.md)–[0031](adr/0031-one-package-extras-deprecate-companion.md)). [arkorder-arkrun](plans/arkorder-arkrun/README.md) (Phase XP; `XP01`–`XP08` done; shipped **4.8.5**; ADR [0033](adr/0033-arkorder-runtime-half-is-arkrun.md)). [arkorder-valve-loop](plans/arkorder-valve-loop/README.md) (Phase LV; `LV01`–`LV09` done on tree; **4.8.6** prepared; [ADR 0034](adr/0034-arkorder-valved-loop.md); does not close K01). |
61
62
  | Claims audit | [audit/claims-matrix.md](audit/claims-matrix.md) |
62
63
  | Field adoption kit (scaffolding, not closed) | [field/](field/) |
63
64
  | Runtime hardening (experimental) | [production-hardening.md](production-hardening.md) |
64
65
 
65
- Current published: [releases/4.8.3.md](releases/4.8.3.md) (`arkgate@4.8.3` on npm `latest`; does not close `K01`). Current tree: [releases/4.8.4.md](releases/4.8.4.md) (pending publish).
66
- Prior: [releases/4.8.2.md](releases/4.8.2.md) · [releases/4.8.1.md](releases/4.8.1.md) · [4.8.0](releases/4.8.0.md) · [4.7.6](releases/4.7.6.md) · [4.7.5](releases/4.7.5.md) · [4.7.4](releases/4.7.4.md) · [4.7.3](releases/4.7.3.md) · [4.7.2](releases/4.7.2.md) · [4.7.1](releases/4.7.1.md) · [4.7.0](releases/4.7.0.md) · [4.6.7](releases/4.6.7.md) · [4.6.6](releases/4.6.6.md) · [4.6.5](releases/4.6.5.md) · [4.6.4](releases/4.6.4.md) · [4.6.3](releases/4.6.3.md) · [4.6.2](releases/4.6.2.md) · [4.6.1](releases/4.6.1.md) · [4.6.0](releases/4.6.0.md).
66
+ Current published: [releases/4.8.5.md](releases/4.8.5.md) (`arkgate@4.8.5` on npm `latest`; does not close `K01`).
67
+ Tree: [releases/4.8.6.md](releases/4.8.6.md) (`arkgate@4.8.6` prepared).
68
+ Prior: [releases/4.8.4.md](releases/4.8.4.md) · [releases/4.8.3.md](releases/4.8.3.md) · [releases/4.8.2.md](releases/4.8.2.md) · [releases/4.8.1.md](releases/4.8.1.md) · [4.8.0](releases/4.8.0.md) · [4.7.6](releases/4.7.6.md) · [4.7.5](releases/4.7.5.md) · [4.7.4](releases/4.7.4.md) · [4.7.3](releases/4.7.3.md) · [4.7.2](releases/4.7.2.md) · [4.7.1](releases/4.7.1.md) · [4.7.0](releases/4.7.0.md) · [4.6.7](releases/4.6.7.md) · [4.6.6](releases/4.6.6.md) · [4.6.5](releases/4.6.5.md) · [4.6.4](releases/4.6.4.md) · [4.6.3](releases/4.6.3.md) · [4.6.2](releases/4.6.2.md) · [4.6.1](releases/4.6.1.md) · [4.6.0](releases/4.6.0.md).
67
69
  Older notes: [releases/](releases/). Config: [configuration.md](configuration.md).
68
70
 
69
71
  ---
@@ -507,6 +507,8 @@ npx ark-check --promote <ruleId> --apply # write mode "enforced" into that
507
507
  **`--sensors`** lists every sensor ArkGate ships — ArkRules, ArkRun and
508
508
  ArkOrder — with its plane, its tier and whether it can *ever* be enforced, so
509
509
  Tier-2 shows up before you write the rule rather than after you wait for a run.
510
+ ArkOrder: `proposeRelease` then `apply`; `refreshSigma`; ingest residual;
511
+ capacity pack; `ReleaseStore`; ArkRun `decisionTape`. No `/ark-order` skill.
510
512
  It also says *how*: only the ArkRules plane is promoted per rule; ArkRun and
511
513
  ArkOrder are switched by the plane-level `arkRun.mode` / `arkOrder.mode`, and
512
514
  `--promote --apply` writes ArkRules documents only.
@@ -809,7 +811,7 @@ npx arkgate-check --install-agent-gates --tools claude,cursor,codex,grok,antigra
809
811
  | Cursor | `.cursor/mcp.json` + `.cursor/rules/ark.mdc` | **Repo:** `.agents/skills/<name>/SKILL.md` (same catalog as Codex). Do not also copy into `.cursor/commands/` or `$CODEX_HOME/skills` — Cursor lists every path it scans. |
810
812
  | OpenAI Codex | `.codex/config.toml` (project primary, relative `--root .`; configured on disk is not runtime-active until restart + `ark_identity` match); optional legacy `$CODEX_HOME/config.toml` fallback uses absolute roots and scoped secondaries — see [ai-gates.md](ai-gates.md) | **Repo:** `.agents/skills/<name>/SKILL.md`; **home:** `$CODEX_HOME/skills/<name>/SKILL.md` (`--codex-home`) |
811
813
  | **Grok Build** | `.grok/hooks/ark-write-gate.json` + `.grok/config.toml` / `.mcp.json` | **Repo:** `.grok/skills/<name>/SKILL.md`; **home:** `$GROK_HOME/skills` (default `~/.grok/skills`, `--grok-home`) |
812
- | Google Antigravity | `.agents/hooks.json` + `.agents/mcp_config.json` (+ `GEMINI.md` for shared Gemini consumers) | `.agents/skills/<name>/SKILL.md` |
814
+ | Google Antigravity | `.agents/hooks.json` + `.agents/mcp_config.json` (+ `GEMINI.md` for shared Gemini consumers) | **Repo:** `.agents/skills/<name>/SKILL.md`; **home:** `$ANTIGRAVITY_HOME/skills` (default `~/.gemini/config/skills`, `--antigravity-home`) |
813
815
  | OpenCode | `opencode.json` MCP (`type: local`; advisory) | `.opencode/skills/<name>/SKILL.md` |
814
816
 
815
817
  This is a path reference, not a guarantee table. Full copy-paste setups:
@@ -817,12 +819,12 @@ This is a path reference, not a guarantee table. Full copy-paste setups:
817
819
  [README](../README.md#other-skills-only-when-you-need-them).
818
820
  When several repositories share one machine, repo catalogs stay pinned and isolated; unchanged
819
821
  skill bodies are not rewritten for a version stamp. Shared **home** catalogs (Codex since 4.2;
820
- Claude/Grok since 4.6) are the machine floor: always latest additive, never downgrade. Refresh
821
- with `--agent-homes` (or `--claude-home` / `--grok-home` / `--codex-home`). Absent home trees
822
+ Claude/Grok since 4.6; Antigravity since 4.8.5) are the machine floor: always latest additive, never downgrade. Refresh
823
+ with `--agent-homes` (or `--claude-home` / `--grok-home` / `--antigravity-home` / `--codex-home`). Absent home trees
822
824
  are normal — doctor stays quiet until `ark-*` skills exist there. Pre-4.2 binaries ignore Codex
823
825
  home metadata and lock, so upgrade legacy repos before they write the optional Codex home
824
826
  catalog. See [AI gates — Codex skill catalog](ai-gates.md#codex-skill-catalog-skillmd-not-flat-prompts)
825
- and [shared Claude/Grok homes](ai-gates.md#shared-claude--grok-home-skills).
827
+ and [shared Claude/Grok/Antigravity homes](ai-gates.md#shared-claude--grok-home-skills).
826
828
 
827
829
  ### Install skills — Ark and ecosystem {#install-skills-ark-and-ecosystem}
828
830
 
package/docs/ai-gates.md CHANGED
@@ -33,8 +33,11 @@ Prefer fail-closed honesty over fake hard guarantees on advisory hosts.
33
33
  Everything below uses the same `ark.config.json` as `arkgate-check` / `ark-check` (CI) — one
34
34
  rules file shared by every surface. From **4.0**, optional **ArkRules** (`arkRules` map +
35
35
  `arkrules/*.json`) ride the **same** write path, doctor, and CI adapter; absence of ArkRules
36
- does not change inter-layer verdicts. Label residual **`[Layer]`** vs **`[ArkRules]`**. See
37
- [configuration ArkRules](configuration.md#arkrules-intra-layer-opt-in).
36
+ does not change inter-layer verdicts. Optional ArkRun / ArkOrder extras ride that envelope
37
+ when on (`proposeRelease` then `apply`). Absence is silent. Label residual **`[Layer]`** vs
38
+ **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrder]`**. See
39
+ [configuration — ArkRules](configuration.md#arkrules-intra-layer-opt-in) ·
40
+ [ArkOrder](arkorder.md).
38
41
 
39
42
  Generate the layer contract once:
40
43
 
@@ -465,7 +468,7 @@ severity **info**, marked `deferred: true`, and omitted from doctor **Primary ne
465
468
  `/ark-upgrade` on Grok/Claude is not Incomplete because of them. **Temp/upgrade primary roots**
466
469
  stay fail-closed urgent (rewritten, not multi-project).
467
470
 
468
- ### Shared Claude / Grok home skills {#shared-claude--grok-home-skills}
471
+ ### Shared Claude / Grok / Antigravity home skills {#shared-claude--grok-home-skills}
469
472
 
470
473
  Project catalogs follow that checkout’s ArkGate pin (they may lag). Shared user-home catalogs
471
474
  are the **machine floor**:
@@ -474,11 +477,19 @@ are the **machine floor**:
474
477
  |-------|------|------|
475
478
  | Claude home | `$CLAUDE_HOME/skills` (default `~/.claude/skills`) | `--claude-home` |
476
479
  | Grok home | `$GROK_HOME/skills` (default `~/.grok/skills`) | `--grok-home` |
477
- | All three + Codex | same monotonic protocol | `--agent-homes` |
480
+ | Antigravity home | `$ANTIGRAVITY_HOME/skills` (default `~/.gemini/config/skills`) | `--antigravity-home` |
481
+ | All four + Codex | same monotonic protocol | `--agent-homes` |
482
+
483
+ Antigravity’s official global catalog is `~/.gemini/config/skills` (workspace catalog remains
484
+ `.agents/skills`). Claude/Grok home copies override or duplicate the project catalog in the same
485
+ session, so `--agent-homes` skips those homes when `.agents/skills` already exists. The Antigravity
486
+ global catalog is the machine floor for **every** workspace, so `--antigravity-home` still writes
487
+ it. `--prune-home-duplicates` does **not** delete `~/.gemini/config/skills/ark-*`.
478
488
 
479
489
  Doctor reports `agentHomeGaps` only when those catalogs already contain `ark-*` skills and
480
490
  lag the installed package. Temp/upgrade `--root` never mutates default user homes. Cursor
481
491
  sessions treat a stale Claude home as urgent because Cursor loads `~/.claude/skills`.
492
+ Antigravity sessions treat a stale `~/.gemini/config/skills` catalog as urgent.
482
493
 
483
494
  ```bash
484
495
  npx arkgate-check --install-agent-gates --skills-only --agent-homes --force
@@ -589,6 +600,8 @@ Install:
589
600
  npx ark-check --install-agent-gates --tools antigravity
590
601
  # alias:
591
602
  npx ark-check --install-agent-gates --tools agy
603
+ # refresh the official global catalog (all workspaces):
604
+ npx ark-check --install-agent-gates --skills-only --antigravity-home --force
592
605
  ```
593
606
 
594
607
  | File | Role |
@@ -597,6 +610,7 @@ npx ark-check --install-agent-gates --tools agy
597
610
  | `.agents/mcp_config.json` | Official workspace MCP (`mcpServers.ark` stdio) |
598
611
  | `GEMINI.md` | Instruction rule for Gemini CLI / legacy consumers sharing the tree |
599
612
  | `.agents/skills/*/SKILL.md` | Agent Skills catalog (shared path with Codex) |
613
+ | `~/.gemini/config/skills/*/SKILL.md` | Official Antigravity **global** catalog (`--antigravity-home` / `--agent-homes`) |
600
614
  | `AGENTS.md` + `.mcp.json` + CI | Shared with other hosts (`.mcp.json` is not the Antigravity MCP path) |
601
615
 
602
616
  **Write tools covered:** `write_to_file`, `replace_file_content`, `multi_replace_file_content`.
@@ -0,0 +1,228 @@
1
+ # ArkOrder
2
+
3
+ **Write. Check. Ship.** Layers can be green while an agent still PATCHes the
4
+ billing plan as if it were a seat count. ArkOrder is the extra that names the
5
+ few slow product decisions and stops that write.
6
+
7
+ Import: `arkgate/order` (same npm package `arkgate`). Off until you add
8
+ `arkOrder` on schema `1.3`. Absence is silent. In-memory. Not durable. It is
9
+ a library plus sensors, not a service. Does **not** replace ArkRun.
10
+
11
+ First-contact copy: freeze through a valve / no `update`. Haken (ξ vs s) lives
12
+ below. **ArkOrder freezes the pattern through a valve. ArkRun is how the residual travels.**
13
+
14
+ Canonical plan seed: [plans/arkorder/README.md](plans/arkorder/README.md).
15
+ ADRs: [0027](adr/0027-arkorder-gated-extra-plane.md)–[0030](adr/0030-opt-in-extras-same-npm-package.md),
16
+ [0033](adr/0033-arkorder-runtime-half-is-arkrun.md) (runtime half is ArkRun),
17
+ [0034](adr/0034-arkorder-valved-loop.md) (valved loop; public verbs in 4.8.6).
18
+ Config: [configuration.md](configuration.md). Surface:
19
+ [package-surface.md](package-surface.md#experimental-opt-in-surfaces).
20
+
21
+ ---
22
+
23
+ ## What it is (and is not)
24
+
25
+ | Is | Is not |
26
+ |----|--------|
27
+ | A **library** (`createOrderPlane`) plus **static sensors** | A running service, daemon, or hosted plane |
28
+ | Valved verbs: `release` / `project` / `ingest` / `proposeRelease` / `apply` / `refreshSigma` | A generic `update` / `patch` / `set` |
29
+ | Opt-in extra on `ark.config.json` | Always-on; compact starters leave it off |
30
+ | Consumer-named slow keys (`xiKeys`) | A construction OS, BIM, or FirmPack |
31
+ | Same npm tarball | not `@arkgate/order` |
32
+
33
+ If the extra is off, every ArkOrder sensor is silent. If it is on, the same
34
+ write gate / CI / ESLint envelope as Layers applies. Domain stays plane-free:
35
+ `createOrderPlane` lives in `arkOrder.planeRoots`.
36
+
37
+ ArkRun is **how the app talks** (intents, transport, information package).
38
+ ArkOrder is **what the app may treat as pattern**. Two extras. One activation
39
+ shape (`mode` + `managedLayers`). Roots keep different names because they
40
+ point at different factories: `arkRun.kernelRoots` vs `arkOrder.planeRoots`.
41
+ `compositionRoots` remains an alias of `kernelRoots`. See
42
+ [activation](#activation-same-shape-as-arkrun).
43
+
44
+ ---
45
+
46
+ ## Already shipped (named APIs)
47
+
48
+ Adopters kept redesigning this extra because the names were not on one page.
49
+ They already exist:
50
+
51
+ | Ask | API | Since |
52
+ |-----|-----|-------|
53
+ | Escalation as a first-class concept | `IngestResult` residual `absorb \| escalate_up \| hold` (`reasonCode`, `IngestEscalate.target`) | 4.8.0 / 4.8.6 |
54
+ | Projection at the boundary | `Projector = (release, sigma) => Projection` | 4.8.0 |
55
+ | Cap on badly designed slow parameters | `DEFAULT_MAX_XI_KEYS = 7`, `maxXiKeys`, `ARKORDER_TOO_MANY_PARAMS`, `ARKORDER_EMPTY_XI`, `ARKORDER_NESTED_XI` | 4.8.0 |
56
+ | Valved proposals, never direct mutation | `ProposeResult` then `apply` (`ARKORDER_UNVALVED_RELEASE`) | 4.8.0 / 4.8.6 |
57
+ | Typed cell schema | `XiSchema` / `XiPropertySchema` | 4.8.0 |
58
+ | Named slow keys on the write path | `arkOrder.xiKeys`; `ARKORDER_XI_FIELD_WRITE` | 4.8.3 |
59
+ | Factory isolation | `createOrderPlane` from `arkgate/order` only | 4.8.0 |
60
+ | Information budget | `informationBudget.cannotObserve`; `ARKORDER_INFORMATION_BUDGET` | 4.8.5 |
61
+ | σ freshness, never ξ | `sigmaMaxAgeMs` / `σ.freshUntil`; `ARKORDER_XI_TTL`, `ARKORDER_STALE_SIGMA` | 4.8.5 |
62
+ | Escalate to a person | `IngestEscalate.target` including `human` | 4.8.5 |
63
+ | Shadow / replay / compare | ArkRun `shadowInformationPackage` / `compareInformationPackages` / `replayInformationPackages` | 4.8.5 |
64
+ | Decision tape | ArkRun information package `decisionTape` `{ xiHash, event, residual }` | 4.8.6 |
65
+ | σ vs ξ identity | `xiHash` / `sigmaHash` / `refreshSigma` | 4.8.6 |
66
+ | Capacity as data | `ConstraintPack.capacity` (`kind` / `sigmaKey` / `payloadKey` / `op`) | 4.8.6 |
67
+ | Store port | `ReleaseStore` / `createMemoryReleaseStore` in-memory default — not durable, not K01 | 4.8.6 |
68
+ | Thin travel helper | `ingestTravelAction` absorb→`send` / escalate_up human→`raises` | 4.8.6 |
69
+
70
+ Nothing here is a hosted runtime. Nothing here can be “down”. A degraded-mode
71
+ contract would defend against an outage that cannot happen.
72
+
73
+ ---
74
+
75
+ ## Valved loop
76
+
77
+ **ArkOrder freezes the pattern through a valve. ArkRun is how the residual travels.**
78
+
79
+ ```ts
80
+ import { createOrderPlane } from 'arkgate/order';
81
+
82
+ const plane = createOrderPlane({
83
+ projector, // consumer: (release, sigma) => { allowedKinds, invalidated }
84
+ xiSchema, // JSON Schema object; additionalProperties false
85
+ maxXiKeys, // default 7
86
+ clocks, // injected; Domain must not call Date.now
87
+ packs, // data, not user predicates (capacity is kind/sigmaKey/payloadKey/op)
88
+ informationBudget, // optional { cannotObserve: ['ledger'] } — not a config key
89
+ sigmaMaxAgeMs, // optional σ freshness; never on ξ — not a config key
90
+ store, // optional ReleaseStore; default in-memory is not durable
91
+ catalogDigest, // optional; keyed by ξ.catalogReleaseId — SKU set does not enter the hash
92
+ });
93
+
94
+ plane.release(xi, sigma); // first freeze only
95
+ plane.project(); // derive allowed s + invalidations
96
+ plane.ingest(event); // residual absorb | escalate_up | hold. Never a Release
97
+ plane.proposeRelease(delta); // blast radius. Empty blast = domain error
98
+ plane.apply(proposal); // valve: later ξ change
99
+ plane.refreshSigma(sigma); // saldo / clocks; xiHash unchanged
100
+ ```
101
+
102
+ There is no `update()`. Calling `update` / `patch` / `set` on the plane throws
103
+ `ARKORDER_FORBIDDEN_METHOD` and, on the write path, emits
104
+ `ARKORDER_GENERIC_UPDATE`. A second `release()` whose ξ differs fails
105
+ `ARKORDER_UNVALVED_RELEASE`.
106
+
107
+ | Field write | Verb |
108
+ |-------------|------|
109
+ | Invoice, seat within cap, timesheet, daily log | `ingest` → absorb (`ingestTravelAction` may `send`) |
110
+ | Over cap (capacity pack) / stale σ | `ingest` → hold |
111
+ | Kind not in h(ξ) | `ingest` → escalate_up (`target: human`; `ingestTravelAction` may `raises`) |
112
+ | Change plan / protocol / cost-code bound | `proposeRelease` then `apply` |
113
+ | PATCH the slow key through Prisma/Drizzle | `ARKORDER_XI_FIELD_WRITE` |
114
+
115
+ Copy [examples/arkorder-billing/](../examples/arkorder-billing/) and rename the
116
+ three keys. Membership ids (`projectId`) are not keys: a `proposeRelease` that
117
+ does not change `h(ξ)` fails closed (`ARKORDER_EMPTY_BLAST`).
118
+
119
+ ---
120
+
121
+ ## Config
122
+
123
+ ```json
124
+ {
125
+ "schemaVersion": "1.3",
126
+ "arkOrder": {
127
+ "mode": "advisory",
128
+ "planeRoots": ["src/composition/order-plane.ts"],
129
+ "managedLayers": ["Application"],
130
+ "maxXiKeys": 7,
131
+ "xiKeys": ["plan", "cycle", "tenancy"]
132
+ }
133
+ }
134
+ ```
135
+
136
+ | Field | Meaning |
137
+ |-------|---------|
138
+ | `mode` | `advisory` (default) or `enforced`. Same word as ArkRun / ArkRules |
139
+ | `managedLayers` | Layers whose persistence writes of `xiKeys` are the skip |
140
+ | `planeRoots` | Files allowed to call `createOrderPlane` |
141
+ | `maxXiKeys` | Cap on ξ (default 7). Haken: few slow modes |
142
+ | `xiKeys` | Optional 3–5 slow names. Empty → `ARKORDER_XI_FIELD_WRITE` silent |
143
+
144
+ Unknown keys fail closed. Empty `planeRoots` in `enforced` fails
145
+ `ARKORDER_MISSING_PLANE`. Demotion or deletion is a policy-delta **weakening**.
146
+ This library’s 4-layer authoring contract does **not** turn the extra on.
147
+
148
+ ---
149
+
150
+ ## Activation (same shape as ArkRun)
151
+
152
+ Both extras already share **`mode`** and **`managedLayers`**. They diverge on
153
+ one axis: the factory root.
154
+
155
+ | | ArkOrder | ArkRun |
156
+ |--|----------|--------|
157
+ | Extra key | `arkOrder` | `arkRun` |
158
+ | Schema | `1.3+` | `1.2+` |
159
+ | Factory | `createOrderPlane` from `arkgate/order` | `createStrictArkKernel` from `arkgate/runtime` |
160
+ | Roots | `planeRoots` | `kernelRoots` (`compositionRoots` alias) |
161
+ | Silence | absence of the extra | absence of the extra |
162
+
163
+ Do not rename `planeRoots` to `kernelRoots`. They name different factories.
164
+ List both on `ark-check --sensors` (same table, same tier vocabulary).
165
+
166
+ Turn extras on with `/ark-adopt`. Place new files with `/ark-place`. There is
167
+ no `/ark-order` skill.
168
+
169
+ ---
170
+
171
+ ## Sensors (closed)
172
+
173
+ Direct evidence blocks. Inference never does. Default advisory; promotable
174
+ except withdrawn heuristics.
175
+
176
+ | Diagnostic | Skip |
177
+ |------------|------|
178
+ | `ARKORDER_MISSING_PLANE` | Extra on, no `createOrderPlane` in `planeRoots` |
179
+ | `ARKORDER_KERNEL_IN_DOMAIN` | Domain-role layer imports `arkgate/order` |
180
+ | `ARKORDER_GENERIC_UPDATE` | `update` / `patch` / `set` on the plane |
181
+ | `ARKORDER_TOO_MANY_PARAMS` | ξ keys > `maxXiKeys` |
182
+ | `ARKORDER_INGEST_WRITES_XI` | `ingest` result assigned into a Release / ξ store |
183
+ | `ARKORDER_XI_FIELD_WRITE` | Managed-layer driver import **and** write token **and** a declared `xiKeys` name |
184
+ | `ARKORDER_INFORMATION_BUDGET` | `h(ξ)` allows a kind in `informationBudget.cannotObserve` |
185
+ | `ARKORDER_XI_TTL` | ξ named ttl/freshUntil/maxAge — freshness is σ |
186
+ | `ARKORDER_STALE_SIGMA` | ingest after σ.freshUntil, or after `release.releasedAt` + `sigmaMaxAgeMs` |
187
+
188
+ Why / fix: [diagnostics.md](diagnostics.md#ARKORDER_MISSING_PLANE).
189
+ `ark-check --sensors` lists every extra sensor with plane, tier, and whether
190
+ it can ever be enforced.
191
+
192
+ ---
193
+
194
+ ## Runtime half
195
+
196
+ Shadow, replay, provenance, and compare belong to **ArkRun** (information
197
+ package, inspector, in-memory compare). ArkOrder does not grow a bus, outbox,
198
+ or hosted replay. [ADR 0033](adr/0033-arkorder-runtime-half-is-arkrun.md).
199
+
200
+ Durability (`K01`) stays parked. In-memory is the honesty line.
201
+
202
+ ---
203
+
204
+ ## What we will not build here
205
+
206
+ - another event bus
207
+ - a general workflow engine
208
+ - a permissions engine
209
+ - a central store holding operational state
210
+ - a DSL that duplicates domain / DB / ArkRules
211
+ - a coordinator required on every request
212
+ - a degraded-mode contract (nothing can be down)
213
+
214
+ If a “slow parameter” changes with every click, it is not an order parameter.
215
+
216
+ The valved loop ships in **4.8.6** ([ADR 0034](adr/0034-arkorder-valved-loop.md)).
217
+ In-memory `ReleaseStore` is **not** durable. Doctor / status `arkOrder` stays
218
+ `notAScore`. This does **not** close `K01` / `Z09`. No `/ark-order` skill.
219
+
220
+ ---
221
+
222
+ ## Next step
223
+
224
+ ```bash
225
+ npx arkgate-check --doctor
226
+ # copy examples/arkorder-billing/ and rename the three keys
227
+ # /ark-adopt to turn arkOrder on advisory
228
+ ```
@@ -116,8 +116,8 @@ Top-level fields:
116
116
  - **`arkRules`** (optional, schema `1.1+`) — map of layer name → project-relative path to an
117
117
  ArkRules file (e.g. `"DomainModel": "arkrules/DomainModel.json"`). Keys must match a declared
118
118
  layer. Missing/invalid referenced files **fail closed**.
119
- - **`arkRun`** (optional, schema `1.2+`) — inline ArkRun extra (`mode`, `compositionRoots`,
120
- `managedLayers`, `requireDeclarations`). Absence is silent. Unknown keys fail closed.
119
+ - **`arkRun`** (optional, schema `1.2+`) — inline ArkRun extra (`mode`, `kernelRoots`
120
+ (`compositionRoots` alias), `managedLayers`, `requireDeclarations`). Absence is silent. Unknown keys fail closed.
121
121
  `managedLayers` must name existing `layers[].name` values. Empty `compositionRoots` in
122
122
  `enforced` mode fails closed (`ARKRUN_MISSING_ROOT`); empty `managedLayers` in `enforced`
123
123
  mode also fails closed (direct-new / undeclared / transport-bypass would otherwise no-op).
@@ -130,8 +130,17 @@ Top-level fields:
130
130
  Import `createOrderPlane` from `arkgate/order` (same package). Empty `planeRoots` in
131
131
  `enforced` mode fails closed (`ARKORDER_MISSING_PLANE`). `xiKeys` are the 3–5 slow
132
132
  names the product already knows (plan, protocol, cost-code bound). Empty `xiKeys`
133
- leaves `ARKORDER_XI_FIELD_WRITE` silent. Membership ids are not keys. Demotion or
134
- deletion is a policy-delta **weakening**. Field ingest never mints a pattern.
133
+ leaves `ARKORDER_XI_FIELD_WRITE` silent. Membership ids are not keys. Factory options
134
+ `informationBudget`, `sigmaMaxAgeMs`, `store` (`ReleaseStore`), and capacity packs
135
+ belong on `createOrderPlane`, not this extra object. Later ξ is `proposeRelease`
136
+ then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold`.
137
+ Demotion or deletion is a policy-delta **weakening**. Field ingest never mints
138
+ a pattern.
139
+
140
+ **Activation is one shape.** ArkRun and ArkOrder both use `mode` + `managedLayers`.
141
+ Absence of either extra is silent. They keep different *root* names because they
142
+ name different factories: `arkRun.kernelRoots` (`compositionRoots` alias) vs
143
+ `arkOrder.planeRoots`. Do not fold them. Canonical: [arkorder.md](arkorder.md#activation-same-shape-as-arkrun).
135
144
 
136
145
  Layer fields:
137
146
 
@@ -239,7 +248,7 @@ See [brownfield adoption](brownfield-adoption.md#nextjs-honesty-default-overlays
239
248
  | **Structure sensors** | Intra-layer heuristics | Only `mode: "enforced"` |
240
249
  | **Invariants** | Catalog + coverage evidence (not a business runtime) | Only enforced + proven-uncovered |
241
250
  | **ArkRun** (opt-in extra) | Kernel usage + complete declarations | Only `arkRun.mode: "enforced"` when classified |
242
- | **ArkOrder** (opt-in extra) | Frozen pattern + four verbs (no `update`) | Only `arkOrder.mode: "enforced"` when classified |
251
+ | **ArkOrder** (opt-in extra) | Frozen pattern; first freeze `release()`, later ξ is `proposeRelease` then `apply` (no `update`) | Only `arkOrder.mode: "enforced"` when classified |
243
252
 
244
253
  Absence of `arkRules`, `arkRun`, or `arkOrder` adds **no** extra merge teeth. **Advisory** structure sensors, advisory
245
254
  invariants, advisory ArkRun, and advisory ArkOrder also add **no** merge teeth (FG-ARKRULES-ADVISORY-ONLY / ADR 0020 / ADR 0027) — packing every starter
package/docs/develop.md CHANGED
@@ -10,7 +10,8 @@ request. Not an API Gateway. Not a folder linter. Without a required CI status,
10
10
  and ArkOrder are optional — policies, an experimental runtime, and the extra that
11
11
  stops slow product decisions being CRUD. Not a second install.
12
12
 
13
- If you only want the happy path, start at [use.md](use.md).
13
+ If you only want the happy path, start at [use.md](use.md). Optional ArkOrder
14
+ (library + sensors, not a service): [arkorder.md](arkorder.md).
14
15
 
15
16
  ### Why it exists
16
17
 
@@ -60,7 +61,7 @@ Full matrix and install commands: [ai-gates.md](ai-gates.md) · canonical table
60
61
 
61
62
  ```bash
62
63
  # All common hosts (examples)
63
- npx arkgate-check --install-agent-gates --tools claude,cursor,codex,grok
64
+ npx arkgate-check --install-agent-gates --tools claude,cursor,codex,grok,antigravity
64
65
  npx arkgate-check --install-agent-gates --tools antigravity # alias: agy
65
66
  npx arkgate-check --install-agent-gates --tools opencode
66
67
  # Full /ark-* skill pack (optional expert depth)
@@ -201,9 +202,14 @@ The plane is `arkgate/order` in package `arkgate`, not a second install.
201
202
  stays plane-free. Empty `planeRoots` in `enforced` mode fails closed
202
203
  (`ARKORDER_MISSING_PLANE`). In-memory. Not durable. Does not replace ArkRun.
203
204
 
205
+ First freeze is `release()`. Later pattern change is `proposeRelease` then
206
+ `apply` (`ARKORDER_UNVALVED_RELEASE`). `refreshSigma`; ingest residual
207
+ `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data;
208
+ `createMemoryReleaseStore`; `ingestTravelAction`; ArkRun `decisionTape`.
209
+
204
210
  Copy [examples/arkorder-billing/](../examples/arkorder-billing/) (`plan` / `cycle` /
205
- `tenancy`) and rename the keys. Posting an invoice is absorbed; changing plan is a
206
- new release. See [configuration.md](configuration.md) and
211
+ `tenancy`) and rename the keys. Posting an invoice is absorbed; changing plan is
212
+ `proposeRelease` then `apply`. See [configuration.md](configuration.md) and
207
213
  [package-surface.md](package-surface.md).
208
214
 
209
215
  ---
@@ -57,6 +57,7 @@ Link form for agents: `docs/diagnostics.md#RULE_ID` (exact-case HTML anchors bel
57
57
  | [`ARKORDER_GENERIC_UPDATE`](#ARKORDER_GENERIC_UPDATE) | arkorder | Generic update of ξ |
58
58
  | [`ARKORDER_TOO_MANY_PARAMS`](#ARKORDER_TOO_MANY_PARAMS) | arkorder | Too many slow keys |
59
59
  | [`ARKORDER_INGEST_WRITES_XI`](#ARKORDER_INGEST_WRITES_XI) | arkorder | ingest assigned into ξ |
60
+ | [`ARKORDER_UNVALVED_RELEASE`](#ARKORDER_UNVALVED_RELEASE) | arkorder | Unvalved second freeze of ξ |
60
61
  | [`INVALID_CHANGE_PATH`](#INVALID_CHANGE_PATH) | preflight | Unsafe change path |
61
62
  | [`DUPLICATE_CHANGE_PATH`](#DUPLICATE_CHANGE_PATH) | preflight | Duplicate path in change set |
62
63
  | [`DELETE_TARGET_MISSING`](#DELETE_TARGET_MISSING) | preflight | Delete target missing |
@@ -395,7 +396,7 @@ Haken slaving: few slow keys (ξ) determine derived fast state. Field ingest nev
395
396
  **Generic update of ξ**
396
397
 
397
398
  - **Why:** A call to update/patch/set on the order plane rewrites the slow pattern. Haken slaving forbids generic ξ mutation.
398
- - **Fix:** Use release() to freeze ξ or proposeRelease() for a pattern change with blast radius, then preflight again. Never mechanical-safe.
399
+ - **Fix:** Use release() for the first freeze of ξ. Later pattern change is proposeRelease then apply(ProposeResult). Never update/patch/set. Never mechanical-safe.
399
400
 
400
401
  <a id="ARKORDER_TOO_MANY_PARAMS"></a>
401
402
 
@@ -412,8 +413,8 @@ Haken slaving: few slow keys (ξ) determine derived fast state. Field ingest nev
412
413
 
413
414
  **ingest assigned into ξ**
414
415
 
415
- - **Why:** An ingest() result is written into a Release or ξ store. ingest may absorb or escalate; it never mints a pattern.
416
- - **Fix:** Keep ingest results as absorb/escalate only. Change ξ with proposeRelease + release. Never mechanical-safe.
416
+ - **Why:** An ingest() result is written into a Release or ξ store. ingest may absorb, escalate_up, or hold; it never mints a pattern.
417
+ - **Fix:** Keep ingest results as absorb/escalate_up/hold only. Change ξ with proposeRelease then apply(ProposeResult). Never mechanical-safe.
417
418
 
418
419
  <a id="ARKORDER_XI_FIELD_WRITE"></a>
419
420
 
@@ -422,7 +423,43 @@ Haken slaving: few slow keys (ξ) determine derived fast state. Field ingest nev
422
423
  **Slow key written around the order plane**
423
424
 
424
425
  - **Why:** A managed-layer file imports a persistence driver and writes a declared arkOrder.xiKeys name. Field events absorb or escalate; they do not PATCH the slow pattern.
425
- - **Fix:** Keep invoices, seats, hours, and logs on ingest. Change the slow key with proposeRelease + release, then preflight again. Never mechanical-safe.
426
+ - **Fix:** Keep invoices, seats, hours, and logs on ingest. Change the slow key with proposeRelease then apply(ProposeResult), then preflight again. Never mechanical-safe.
427
+
428
+ <a id="ARKORDER_INFORMATION_BUDGET"></a>
429
+
430
+ ### `ARKORDER_INFORMATION_BUDGET`
431
+
432
+ **Projection observes a forbidden kind**
433
+
434
+ - **Why:** h(ξ) allowedKinds includes a kind listed in informationBudget.cannotObserve. A scale may not look at what it was told not to see.
435
+ - **Fix:** Cut that kind from the projector or from cannotObserve, then preflight again. Never mechanical-safe.
436
+
437
+ <a id="ARKORDER_XI_TTL"></a>
438
+
439
+ ### `ARKORDER_XI_TTL`
440
+
441
+ **Slow key carries a freshness field**
442
+
443
+ - **Why:** ξ named ttl/freshUntil/maxAge. Freshness belongs on σ. A slow parameter that expires per transaction is not slow.
444
+ - **Fix:** Move freshness onto σ (freshUntil) and keep ξ stable, then preflight again. Never mechanical-safe.
445
+
446
+ <a id="ARKORDER_STALE_SIGMA"></a>
447
+
448
+ ### `ARKORDER_STALE_SIGMA`
449
+
450
+ **σ is stale**
451
+
452
+ - **Why:** ingest ran after σ.freshUntil (or sigmaMaxAgeMs). ξ does not TTL.
453
+ - **Fix:** Call refreshSigma and ingest again, or proposeRelease then apply(ProposeResult) if the pattern changed. Never mechanical-safe.
454
+
455
+ <a id="ARKORDER_UNVALVED_RELEASE"></a>
456
+
457
+ ### `ARKORDER_UNVALVED_RELEASE`
458
+
459
+ **Unvalved second freeze of ξ**
460
+
461
+ - **Why:** release() ran after a pattern was already frozen and the new ξ differs. First freeze is release(); later pattern change is proposeRelease then apply.
462
+ - **Fix:** Change ξ with proposeRelease then apply(ProposeResult). release() is only the first freeze. Never mechanical-safe.
426
463
 
427
464
  ## Atomic preflight and change sets
428
465
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ```bash
4
4
  npx arkgate-check --install-agent-gates
5
- npx arkgate-check --install-agent-gates --tools claude,cursor,codex,grok
5
+ npx arkgate-check --install-agent-gates --tools claude,cursor,codex,grok,antigravity
6
6
  # aliases: ark-check …
7
7
  ```
8
8