arkgate 4.8.7 → 4.8.9
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/CHANGELOG.md +92 -3
- package/README.md +41 -6
- package/bin/ark-check-runtime.mjs +22 -0
- package/bin/ark-dashboard.mjs +423 -0
- package/bin/ark-layer-match.mjs +25 -10
- package/bin/ark.mjs +51 -3
- package/bin/lib/agent-homes.mjs +1 -1
- package/bin/lib/analysis-engine.mjs +8 -8
- package/bin/lib/ark-order-sensors.mjs +103 -3
- package/bin/lib/config-extras.mjs +1 -0
- package/bin/lib/contract-smells.mjs +12 -6
- package/bin/lib/doctor-human.mjs +32 -7
- package/bin/lib/doctor-next-actions.mjs +21 -2
- package/bin/lib/gate-files.mjs +108 -22
- package/bin/lib/managed-upgrade.mjs +9 -1
- package/bin/lib/upgrade-command.mjs +17 -4
- package/dist/{configTypes-0eHpocR3.d.ts → configTypes-j7so8B4O.d.ts} +12 -0
- package/dist/{diagnosticCatalog-wDAH08gH.d.ts → diagnosticCatalog-BrkOiwCk.d.ts} +3 -3
- package/dist/eslint/index.cjs +5 -5
- package/dist/eslint/index.d.ts +6 -4
- package/dist/eslint/index.js +5 -5
- package/dist/index.cjs +30 -30
- package/dist/index.d.ts +13 -4
- package/dist/index.js +31 -31
- package/dist/nestjs/index.cjs +5 -5
- package/dist/nestjs/index.d.ts +3 -3
- package/dist/nestjs/index.js +5 -5
- package/dist/order/index.cjs +1 -1
- package/dist/order/index.d.ts +6 -2
- package/dist/order/index.js +1 -1
- package/dist/runtime/index.cjs +15 -15
- package/dist/runtime/index.d.ts +6 -6
- package/dist/runtime/index.js +15 -15
- package/dist/{types-BK47clMl.d.ts → types-Djbs3KjE.d.ts} +1 -1
- package/dist/{types-CwZ_oz1N.d.ts → types-tGhZUiGX.d.ts} +106 -2
- package/docs/README.md +13 -4
- package/docs/agent-guide.md +38 -2
- package/docs/ai-gates.md +13 -1
- package/docs/arkorder.md +41 -8
- package/docs/configuration.md +47 -12
- package/docs/develop.md +17 -8
- package/docs/enthusiast/README.md +13 -2
- package/docs/package-surface.md +20 -6
- package/docs/product-voice.md +25 -2
- package/docs/use.md +11 -3
- package/package.json +3 -1
- package/schemas/ark.config.schema.json +9 -0
- package/server.json +2 -2
- package/templates/agent-skills/README.md +1 -1
- package/templates/agent-skills/ark-adopt/SKILL.md +1 -0
- package/templates/agent-skills/ark-autopilot/SKILL.md +1 -1
- package/templates/agent-skills/ark-contract/SKILL.md +1 -1
- package/templates/agent-skills/ark-explore/SKILL.md +2 -2
- package/templates/agent-skills/ark-place/SKILL.md +1 -0
- package/templates/skills/ark-adopt.md +1 -0
- package/templates/skills/ark-autopilot.md +1 -1
- package/templates/skills/ark-contract.md +1 -1
- package/templates/skills/ark-explore.md +2 -2
- package/templates/skills/ark-place.md +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as Policy, P as PolicyViolation, I as IntentName, j as IntentCreator, k as IntentRelationship, b as ArchitectureProfile, D as DomainEvent, E as EventMetadata, h as PolicyEnforcementMode, A as ArchitectureLayer, c as ArchitectureRule, d as ArkCheckConfig } from './types-
|
|
1
|
+
import { i as Policy, P as PolicyViolation, I as IntentName, j as IntentCreator, k as IntentRelationship, b as ArchitectureProfile, D as DomainEvent, E as EventMetadata, h as PolicyEnforcementMode, A as ArchitectureLayer, c as ArchitectureRule, d as ArkCheckConfig } from './types-Djbs3KjE.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* PolicyEngine
|
|
@@ -1030,8 +1030,67 @@ declare const ARK_RUN_INSPECTOR_DEFAULT_PORT = 0;
|
|
|
1030
1030
|
declare const ARK_RUN_INSPECTOR_SNAPSHOT_PATH = "/snapshot";
|
|
1031
1031
|
declare const ARK_RUN_INSPECTOR_EVENTS_PATH = "/events";
|
|
1032
1032
|
declare const ARK_RUN_INSPECTOR_GRAPH_PATH = "/graph";
|
|
1033
|
+
declare const ARK_RUN_INSPECTOR_OUTBOX_PATH = "/outbox";
|
|
1034
|
+
declare const ARK_RUN_INSPECTOR_WORKFLOWS_PATH = "/workflows";
|
|
1033
1035
|
declare const ARK_RUN_INSPECTOR_SSE_EVENT = "snapshot";
|
|
1034
1036
|
declare const ARK_RUN_INSPECTOR_TRANSPORT_FALLBACK: "in-process-local";
|
|
1037
|
+
/** Server-side sample cap for outbox/workflows monitors (DoS floor). */
|
|
1038
|
+
declare const ARK_RUN_INSPECTOR_MONITOR_SAMPLE_LIMIT = 32;
|
|
1039
|
+
/** Outbox statuses the Queues monitor surfaces (dispatched is omitted). */
|
|
1040
|
+
declare const ARK_RUN_INSPECTOR_OUTBOX_MONITOR_STATUSES: readonly ["pending", "failed"];
|
|
1041
|
+
type ArkRunInspectorOutboxMonitorStatus = (typeof ARK_RUN_INSPECTOR_OUTBOX_MONITOR_STATUSES)[number];
|
|
1042
|
+
type ArkRunInspectorStoreDurabilityKind = 'memory' | 'durable';
|
|
1043
|
+
type ArkRunInspectorStoreRole = 'outbox' | 'audit' | 'workflow';
|
|
1044
|
+
type ArkRunInspectorStoreDurability = {
|
|
1045
|
+
role: ArkRunInspectorStoreRole;
|
|
1046
|
+
id: string;
|
|
1047
|
+
kind: ArkRunInspectorStoreDurabilityKind;
|
|
1048
|
+
};
|
|
1049
|
+
type ArkRunInspectorHardeningDurability = {
|
|
1050
|
+
stores: ArkRunInspectorStoreDurability[];
|
|
1051
|
+
};
|
|
1052
|
+
type ArkRunInspectorHardening = {
|
|
1053
|
+
durability: ArkRunInspectorHardeningDurability;
|
|
1054
|
+
};
|
|
1055
|
+
type ArkRunInspectorOutboxRecordSummary = {
|
|
1056
|
+
id: string;
|
|
1057
|
+
status: ArkRunInspectorOutboxMonitorStatus;
|
|
1058
|
+
attempts: number;
|
|
1059
|
+
intent?: string;
|
|
1060
|
+
error?: string;
|
|
1061
|
+
updatedAt?: string;
|
|
1062
|
+
};
|
|
1063
|
+
type ArkRunInspectorOutboxMonitor = {
|
|
1064
|
+
available: boolean;
|
|
1065
|
+
pendingCount: number;
|
|
1066
|
+
failedCount: number;
|
|
1067
|
+
pending: ArkRunInspectorOutboxRecordSummary[];
|
|
1068
|
+
failed: ArkRunInspectorOutboxRecordSummary[];
|
|
1069
|
+
/** Cap applied to pending/failed sample arrays (counts remain accurate). */
|
|
1070
|
+
sampleLimit: number;
|
|
1071
|
+
};
|
|
1072
|
+
type ArkRunInspectorWorkflowSummary = {
|
|
1073
|
+
id: string;
|
|
1074
|
+
name: string;
|
|
1075
|
+
status: string;
|
|
1076
|
+
currentStep?: string;
|
|
1077
|
+
error?: string;
|
|
1078
|
+
};
|
|
1079
|
+
type ArkRunInspectorWorkflowsMonitor = {
|
|
1080
|
+
available: boolean;
|
|
1081
|
+
total: number;
|
|
1082
|
+
runningCount: number;
|
|
1083
|
+
compensatingCount: number;
|
|
1084
|
+
failedCount: number;
|
|
1085
|
+
pendingCount: number;
|
|
1086
|
+
workflows: ArkRunInspectorWorkflowSummary[];
|
|
1087
|
+
/** Cap applied to workflows sample array (counts remain accurate). */
|
|
1088
|
+
sampleLimit: number;
|
|
1089
|
+
};
|
|
1090
|
+
type ArkRunInspectorMonitorBuildOptions = {
|
|
1091
|
+
/** Bound samples; clamped to 0…ARK_RUN_INSPECTOR_MONITOR_SAMPLE_LIMIT. Default 32. */
|
|
1092
|
+
sampleLimit?: number;
|
|
1093
|
+
};
|
|
1035
1094
|
declare class ArkRunInspectorProductionError extends Error {
|
|
1036
1095
|
constructor();
|
|
1037
1096
|
}
|
|
@@ -1060,6 +1119,12 @@ type ArkRunInspectorSnapshot = {
|
|
|
1060
1119
|
package: DependencyInformationPackage;
|
|
1061
1120
|
transport: ArkRunInspectorTransportFacts;
|
|
1062
1121
|
observability: unknown;
|
|
1122
|
+
/** Explicit store durability facts from real kernel ports (never component-id inference). */
|
|
1123
|
+
hardening: ArkRunInspectorHardening;
|
|
1124
|
+
/** Optional OD04 queue facts when the caller supplies them (endpoints preferred). */
|
|
1125
|
+
outbox?: ArkRunInspectorOutboxMonitor;
|
|
1126
|
+
/** Optional OD04 workflow facts when the caller supplies them (endpoints preferred). */
|
|
1127
|
+
workflows?: ArkRunInspectorWorkflowsMonitor;
|
|
1063
1128
|
};
|
|
1064
1129
|
type ArkRunInspectorBindInput = {
|
|
1065
1130
|
host?: unknown;
|
|
@@ -1075,11 +1140,34 @@ type ArkRunInspectorSnapshotInput = {
|
|
|
1075
1140
|
observability?: unknown;
|
|
1076
1141
|
ephemeralDefault?: unknown;
|
|
1077
1142
|
brokerBound?: unknown;
|
|
1143
|
+
hardening?: unknown;
|
|
1144
|
+
outbox?: unknown;
|
|
1145
|
+
workflows?: unknown;
|
|
1078
1146
|
};
|
|
1079
1147
|
declare function isArkRunInspectorProductionEnv(nodeEnv: unknown): boolean;
|
|
1080
1148
|
declare function isArkRunInspectorLoopbackHost(host: unknown): boolean;
|
|
1081
1149
|
declare function resolveArkRunInspectorBind(input?: ArkRunInspectorBindInput): ArkRunInspectorBind;
|
|
1082
1150
|
declare function arkRunInspectorUrl(host: string, port: number, path: string): string;
|
|
1151
|
+
/**
|
|
1152
|
+
* Classify a store port by constructor / declared id. `InMemory*` → memory; else durable.
|
|
1153
|
+
*/
|
|
1154
|
+
declare function classifyArkRunInspectorStoreDurability(id: unknown, role: ArkRunInspectorStoreRole): ArkRunInspectorStoreDurability;
|
|
1155
|
+
/**
|
|
1156
|
+
* Build hardening.durability facts from explicit store rows (not package.components).
|
|
1157
|
+
*/
|
|
1158
|
+
declare function buildArkRunInspectorHardening(input?: unknown): ArkRunInspectorHardening;
|
|
1159
|
+
/**
|
|
1160
|
+
* Sanitize EventBufferStore.list rows into pending/failed monitor facts (no payloads).
|
|
1161
|
+
* Counts cover the full input; sample arrays are capped at sampleLimit (≤32).
|
|
1162
|
+
*/
|
|
1163
|
+
declare function buildArkRunInspectorOutboxMonitor(records?: unknown, options?: ArkRunInspectorMonitorBuildOptions): ArkRunInspectorOutboxMonitor;
|
|
1164
|
+
declare function unavailableArkRunInspectorOutboxMonitor(): ArkRunInspectorOutboxMonitor;
|
|
1165
|
+
/**
|
|
1166
|
+
* Sanitize WorkflowEngine.list rows into monitor facts (id/name/status/step/error only).
|
|
1167
|
+
* Counts cover the full input; the workflows sample is capped at sampleLimit (≤32).
|
|
1168
|
+
*/
|
|
1169
|
+
declare function buildArkRunInspectorWorkflowsMonitor(snapshots?: unknown, options?: ArkRunInspectorMonitorBuildOptions): ArkRunInspectorWorkflowsMonitor;
|
|
1170
|
+
declare function unavailableArkRunInspectorWorkflowsMonitor(): ArkRunInspectorWorkflowsMonitor;
|
|
1083
1171
|
declare function buildArkRunInspectorSnapshot(input?: ArkRunInspectorSnapshotInput): ArkRunInspectorSnapshot;
|
|
1084
1172
|
declare function formatArkRunInspectorSseEvent(snapshot: unknown): string;
|
|
1085
1173
|
|
|
@@ -1107,6 +1195,8 @@ type ArkRunInspectorHandle = {
|
|
|
1107
1195
|
snapshotUrl: string;
|
|
1108
1196
|
eventsUrl: string;
|
|
1109
1197
|
graphUrl: string;
|
|
1198
|
+
outboxUrl: string;
|
|
1199
|
+
workflowsUrl: string;
|
|
1110
1200
|
close(): Promise<void>;
|
|
1111
1201
|
};
|
|
1112
1202
|
|
|
@@ -1125,6 +1215,20 @@ type StartArkRunInspectorOptions = {
|
|
|
1125
1215
|
type ArkRunInspectorSource = {
|
|
1126
1216
|
getInspectorSnapshot(bind: ArkRunInspectorBind): ArkRunInspectorSnapshot;
|
|
1127
1217
|
requestGraph(query?: ArkRunGraphQuery): ArkRunGraph;
|
|
1218
|
+
/** OD04: pending/failed outbox summaries (EventBufferStore.list). */
|
|
1219
|
+
listInspectorOutbox?(): Promise<ArkRunInspectorOutboxMonitor>;
|
|
1220
|
+
/** OD04: workflow/saga summaries (WorkflowEngine.list). */
|
|
1221
|
+
listInspectorWorkflows?(): Promise<ArkRunInspectorWorkflowsMonitor>;
|
|
1222
|
+
/** Duck-typed kernel ports when explicit list* helpers are absent. */
|
|
1223
|
+
outbox?: {
|
|
1224
|
+
list(status?: 'pending' | 'dispatched' | 'failed'): Promise<unknown[]>;
|
|
1225
|
+
};
|
|
1226
|
+
eventBuffer?: {
|
|
1227
|
+
list(status?: 'pending' | 'dispatched' | 'failed'): Promise<unknown[]>;
|
|
1228
|
+
};
|
|
1229
|
+
workflowEngine?: {
|
|
1230
|
+
list(workflowName?: string): Promise<unknown[]>;
|
|
1231
|
+
};
|
|
1128
1232
|
};
|
|
1129
1233
|
declare function startArkRunInspector(source: ArkRunInspectorSource, options?: StartArkRunInspectorOptions): Promise<ArkRunInspectorHandle>;
|
|
1130
1234
|
|
|
@@ -1249,4 +1353,4 @@ interface CreateArkKernelFromConfigOptions extends Omit<CreateArkKernelOptions,
|
|
|
1249
1353
|
}
|
|
1250
1354
|
type ArkKernelConfig = ArkCheckConfig;
|
|
1251
1355
|
|
|
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,
|
|
1356
|
+
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, type EventContractIssue as a$, ARK_RUN_INSPECTOR_GRAPH_PATH as a0, ARK_RUN_INSPECTOR_MONITOR_SAMPLE_LIMIT as a1, ARK_RUN_INSPECTOR_OUTBOX_PATH as a2, ARK_RUN_INSPECTOR_SCHEMA_VERSION as a3, ARK_RUN_INSPECTOR_SNAPSHOT_PATH as a4, ARK_RUN_INSPECTOR_SSE_EVENT as a5, ARK_RUN_INSPECTOR_TRANSPORT_FALLBACK as a6, ARK_RUN_INSPECTOR_WORKFLOWS_PATH as a7, ARK_RUN_TRANSPORT_KINDS as a8, type ArkManifestArchitecture as a9, type ArkRunInspectorHandle as aA, type ArkRunInspectorHardening as aB, type ArkRunInspectorHardeningDurability as aC, type ArkRunInspectorMonitorBuildOptions as aD, type ArkRunInspectorOutboxMonitor as aE, type ArkRunInspectorOutboxRecordSummary as aF, ArkRunInspectorProductionError as aG, type ArkRunInspectorSnapshot as aH, type ArkRunInspectorSnapshotInput as aI, type ArkRunInspectorSource as aJ, type ArkRunInspectorStoreDurability as aK, type ArkRunInspectorStoreDurabilityKind as aL, type ArkRunInspectorStoreRole as aM, type ArkRunInspectorTransportFacts as aN, type ArkRunInspectorWorkflowSummary as aO, type ArkRunInspectorWorkflowsMonitor as aP, type ArkRunPublisher as aQ, type ArkRunRegisterOptions as aR, type ArkRunRegistrationHandle as aS, type ArkRunSendOptions as aT, type ArkRunSendPlan as aU, type ArkRunSendPlanInput as aV, type ArkRunSendResult as aW, type ArkRunTransportKind as aX, type AuditRecordInput as aY, type AuditRecordType as aZ, type EntityMeta as a_, type ArkManifestData as aa, type ArkManifestEntityLink as ab, type ArkManifestGraph as ac, type ArkManifestIntent as ad, type ArkManifestPolicy as ae, type ArkManifestProjection as af, type ArkRunBrokerAdapter as ag, type ArkRunComponentLifetime as ah, type ArkRunDeliveredVia as ai, type ArkRunExtendedInfo as aj, type ArkRunGraph as ak, type ArkRunGraphEdge as al, type ArkRunGraphEdgeKind as am, type ArkRunGraphMatch as an, type ArkRunGraphMatchInput as ao, type ArkRunGraphNode as ap, type ArkRunGraphNodeKind as aq, type ArkRunGraphProcessEdgeKind as ar, type ArkRunGraphQuery as as, type ArkRunGraphResolvedQuery as at, type ArkRunGraphSlice as au, type ArkRunGraphTechnicalEdgeKind as av, type ArkRunInformationPackageComponent as aw, type ArkRunInspectorBind as ax, ArkRunInspectorBindError as ay, type ArkRunInspectorBindInput as az, type AuditStore as b, type EventHandler as b0, type EventInterceptionInfo as b1, type EventInterceptor as b2, type EventInterceptorContext as b3, type EventPayloadPatch as b4, type EventPayloadSchema as b5, type EventPublisher as b6, type EventSchemaField as b7, type EventSchemaFieldType as b8, type FieldMeta as b9, buildDependencyInformationPackage as bA, classifyArkRunInspectorStoreDurability as bB, closeArkRunGraphQuery as bC, closedArkRunEphemeral as bD, closedArkRunTransportKind as bE, formatArkRunGraphMermaid as bF, formatArkRunInspectorSseEvent as bG, isArkRunInspectorLoopbackHost as bH, isArkRunInspectorProductionEnv as bI, requestArkRunGraph as bJ, resolveArkRunInspectorBind as bK, resolveArkRunSendPlan as bL, startArkRunInspector as bM, unavailableArkRunInspectorOutboxMonitor as bN, unavailableArkRunInspectorWorkflowsMonitor as bO, type GraphNode as ba, InvalidArkRunGraphQueryError as bb, InvalidArkRunSendOptionError as bc, type ObservabilityFlow as bd, type ObservedLayerFlowMode as be, type OutboxStore as bf, type PolicyEvaluationResult as bg, type ProjectionCheckpoint as bh, type ProjectionDefinition as bi, type PublishedEventRecord as bj, type RetryPolicy as bk, type SagaStatus as bl, type SagaStep as bm, type StartArkRunInspectorOptions as bn, type TraceSink as bo, type Unsubscribe as bp, type WorkflowDefinition as bq, type WorkflowStatus as br, type WorkflowStep as bs, appendDecisionTape as bt, arkRunGraphQueryFromSearchParams as bu, arkRunInspectorUrl as bv, buildArkRunInspectorHardening as bw, buildArkRunInspectorOutboxMonitor as bx, buildArkRunInspectorSnapshot as by, buildArkRunInspectorWorkflowsMonitor as bz, 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
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
|
|
7
7
|
is just documentation.
|
|
8
8
|
|
|
9
|
+
AI can build fast—and make a mess just as fast.
|
|
10
|
+
|
|
11
|
+
Keep the product easy to understand, change, and trust.
|
|
12
|
+
|
|
13
|
+
ArkGate stops bad shortcuts. ArkRules protects how each part should behave. ArkRun keeps work moving. ArkOrder protects the few big choices that should not change by accident.
|
|
14
|
+
|
|
15
|
+
Safer changes, fewer surprises, and extra protection only when you choose it.
|
|
16
|
+
|
|
9
17
|
Pick your path. Skip everything else.
|
|
10
18
|
|
|
11
19
|
| You are… | Start here |
|
|
@@ -58,14 +66,15 @@ These are **not** the day-to-day product path. They stay in the repo for evidenc
|
|
|
58
66
|
| Area | Path |
|
|
59
67
|
|------|------|
|
|
60
68
|
| 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) |
|
|
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; shipped **4.8.6**; [ADR 0034](adr/0034-arkorder-valved-loop.md); does not close K01). [layer-description-projection](plans/layer-description-projection/README.md) (Phase LD; `LD01`–`LD06` done
|
|
69
|
+
| 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; shipped **4.8.6**; [ADR 0034](adr/0034-arkorder-valved-loop.md); does not close K01). [layer-description-projection](plans/layer-description-projection/README.md) (Phase LD; `LD01`–`LD06` done; shipped **4.8.7**; [ADR 0035](adr/0035-layer-description-projection.md); project `layers[].description`; no schema bump). [observability-tui](plans/observability-tui/README.md) (`OD01`–`OD04` done; shipped **4.8.8**; in-memory honesty retained). |
|
|
62
70
|
| Claims audit | [audit/claims-matrix.md](audit/claims-matrix.md) |
|
|
63
71
|
| Field adoption kit (scaffolding, not closed) | [field/](field/) |
|
|
64
72
|
| Runtime hardening (experimental) | [production-hardening.md](production-hardening.md) |
|
|
65
73
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
Prior: [releases/4.8.
|
|
74
|
+
Prepared: [releases/4.8.9.md](releases/4.8.9.md) (`arkgate@4.8.9`; not published).
|
|
75
|
+
Current published: [releases/4.8.8.md](releases/4.8.8.md) (`arkgate@4.8.8` on npm `latest`; does not close `K01`).
|
|
76
|
+
Prior published: [releases/4.8.7.md](releases/4.8.7.md) (`arkgate@4.8.7`).
|
|
77
|
+
Prior: [releases/4.8.6.md](releases/4.8.6.md) · [releases/4.8.5.md](releases/4.8.5.md) · [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).
|
|
69
78
|
Older notes: [releases/](releases/). Config: [configuration.md](configuration.md).
|
|
70
79
|
|
|
71
80
|
---
|
package/docs/agent-guide.md
CHANGED
|
@@ -2,8 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
**Write. Check. Ship.**
|
|
4
4
|
**When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.**
|
|
5
|
+
|
|
6
|
+
Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
|
|
7
|
+
is just documentation.
|
|
8
|
+
|
|
9
|
+
AI can build fast—and make a mess just as fast.
|
|
10
|
+
|
|
11
|
+
Keep the product easy to understand, change, and trust.
|
|
12
|
+
|
|
13
|
+
ArkGate stops bad shortcuts. ArkRules protects how each part should behave. ArkRun keeps work moving. ArkOrder protects the few big choices that should not change by accident.
|
|
14
|
+
|
|
15
|
+
Safer changes, fewer surprises, and extra protection only when you choose it.
|
|
16
|
+
|
|
5
17
|
This guide is the **develop** reference for agents and codegen: write hooks, advisory MCP tools,
|
|
6
|
-
CI, and `/ark-*` skills.
|
|
18
|
+
CI, and `/ark-*` skills.
|
|
7
19
|
|
|
8
20
|
- Product path (anyone): [use.md](use.md)
|
|
9
21
|
- Integration overview: [develop.md](develop.md)
|
|
@@ -346,7 +358,8 @@ into orchestration/persistence), `contract-lateral-adapter-allow` (adapter layer
|
|
|
346
358
|
sibling adapter layer; X03 — an adapter into its OWN family's infra base, e.g.
|
|
347
359
|
`PaymentsAdapters -> PaymentsInfra`, is the sanctioned direction and does not fire),
|
|
348
360
|
`contract-dead-rule` (rule references an empty or unknown layer, or is a
|
|
349
|
-
same-layer
|
|
361
|
+
same-layer allow / classic same-layer deny; a same-layer `peerIsolation: true`
|
|
362
|
+
+ `allowed: false` wall is live, not this smell; `optional: true` layers are exempt). Advisory only: it never changes the
|
|
350
363
|
verdict, `designFitness`, or `patternBets` — layer roles come from name heuristics, so treat a
|
|
351
364
|
miss as a warning to read, not a defect to silence. A deliberate edge is acknowledged in
|
|
352
365
|
`.ark/contract-smell-acks.json` (`{ acks: [{ id, edge, reason, reviewBy? }] }`); `acknowledged` counts
|
|
@@ -1413,3 +1426,26 @@ doctor → compact router (and `/ark-autopilot` only after the skill pack).
|
|
|
1413
1426
|
6. **Wire** relationships via `registry.define(..., { dependsOn, produces })`
|
|
1414
1427
|
7. **Register** event contracts before publishing in strict mode
|
|
1415
1428
|
8. **Observe** runtime via `bus.getTrace()`, `auditTrail.query()`, outbox records, projection checkpoints, and `ark.observability.report()`
|
|
1429
|
+
9. **Optional loopback inspector** via `ark.startInspector()` — JSON facts only (see below); poll with `ark-dashboard` / `arkgate-dashboard` when you want a terminal view
|
|
1430
|
+
|
|
1431
|
+
### Dev inspector queue endpoints and dashboard bins
|
|
1432
|
+
|
|
1433
|
+
`startInspector()` / `startArkRunInspector()` bind loopback only, refuse
|
|
1434
|
+
`NODE_ENV=production`, and lazy-load HTTP. The kernel exposes JSON monitor facts
|
|
1435
|
+
(snapshot / graph / queue endpoints) — not a TUI.
|
|
1436
|
+
|
|
1437
|
+
| Method + path | Role |
|
|
1438
|
+
|---------------|------|
|
|
1439
|
+
| `GET /snapshot` (also `/`) | Information package + transport + observability snapshot |
|
|
1440
|
+
| `GET /events` | SSE of the same snapshot |
|
|
1441
|
+
| `GET /graph` | `requestGraph` slice (+ Mermaid helper) |
|
|
1442
|
+
| `GET /outbox` | Outbox monitor: `available`, `pendingCount`, `failedCount`, `pending[]` / `failed[]` row summaries (`id`, `status`, `attempts`, optional `intent` / `error` / `updatedAt`) — **no event payloads** |
|
|
1443
|
+
| `GET /workflows` | Workflows monitor: counts + `workflows[]` summaries (`id`, `name`, `status`, optional `currentStep` / `error`) |
|
|
1444
|
+
|
|
1445
|
+
Dual package bins **`ark-dashboard`** and **`arkgate-dashboard`**
|
|
1446
|
+
(`bin/ark-dashboard.mjs`) poll `--url` (default `http://127.0.0.1:3000/snapshot`)
|
|
1447
|
+
and sibling `/outbox` + `/workflows` on an interval (`--interval`, 200–60000 ms).
|
|
1448
|
+
ANSI escape sequences + polling only — no React, Ink, or Blessed. Use
|
|
1449
|
+
`ark dashboard` / `arkgate dashboard` (passthrough to `bin/ark-dashboard.mjs`) or the
|
|
1450
|
+
dual bins `ark-dashboard` / `arkgate-dashboard`.
|
|
1451
|
+
Presentation stays in Tooling (`bin/`); do not couple a TUI into `src/kernel`.
|
package/docs/ai-gates.md
CHANGED
|
@@ -2,7 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
**Write. Check. Ship.**
|
|
4
4
|
**When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.**
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
|
|
7
|
+
is just documentation.
|
|
8
|
+
|
|
9
|
+
AI can build fast—and make a mess just as fast.
|
|
10
|
+
|
|
11
|
+
Keep the product easy to understand, change, and trust.
|
|
12
|
+
|
|
13
|
+
ArkGate stops bad shortcuts. ArkRules protects how each part should behave. ArkRun keeps work moving. ArkOrder protects the few big choices that should not change by accident.
|
|
14
|
+
|
|
15
|
+
Safer changes, fewer surprises, and extra protection only when you choose it.
|
|
16
|
+
|
|
17
|
+
This page is host install depth (hooks / MCP / CI).
|
|
6
18
|
|
|
7
19
|
This page is **develop** depth (install hooks/MCP/CI per host). Product path: [use.md](use.md) ·
|
|
8
20
|
overview: [develop.md](develop.md) · hub: [README.md](README.md).
|
package/docs/arkorder.md
CHANGED
|
@@ -25,7 +25,7 @@ Config: [configuration.md](configuration.md). Surface:
|
|
|
25
25
|
| Is | Is not |
|
|
26
26
|
|----|--------|
|
|
27
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` |
|
|
28
|
+
| Valved verbs: `release` / `project` / `ingest` / `proposeRelease` / `apply` / `refreshSigma` / `restore` | A generic `update` / `patch` / `set` |
|
|
29
29
|
| Opt-in extra on `ark.config.json` | Always-on; compact starters leave it off |
|
|
30
30
|
| Consumer-named slow keys (`xiKeys`) | A construction OS, BIM, or FirmPack |
|
|
31
31
|
| Same npm tarball | not `@arkgate/order` |
|
|
@@ -66,6 +66,9 @@ They already exist:
|
|
|
66
66
|
| Capacity as data | `ConstraintPack.capacity` (`kind` / `sigmaKey` / `payloadKey` / `op`) | 4.8.6 |
|
|
67
67
|
| Store port | `ReleaseStore` / `createMemoryReleaseStore` in-memory default — not durable, not K01 | 4.8.6 |
|
|
68
68
|
| Thin travel helper | `ingestTravelAction` absorb→`send` / escalate_up human→`raises` | 4.8.6 |
|
|
69
|
+
| Verify a stored `Release.hash` | `hashOf(ξ, σ)` alias of `hashReleasePayload` — no `release()` side effect | 4.8.9 |
|
|
70
|
+
| Reinstall a frozen Release | `restore(release)` — process-local; hash is identity; not durable; does not close K01 | 4.8.9 |
|
|
71
|
+
| Default clock | omitted `clocks` is Kernel `Date.now()`; Domain must not call `Date.now` | 4.8.9 |
|
|
69
72
|
|
|
70
73
|
Nothing here is a hosted runtime. Nothing here can be “down”. A degraded-mode
|
|
71
74
|
contract would defend against an outage that cannot happen.
|
|
@@ -77,13 +80,13 @@ contract would defend against an outage that cannot happen.
|
|
|
77
80
|
**ArkOrder freezes the pattern through a valve. ArkRun is how the residual travels.**
|
|
78
81
|
|
|
79
82
|
```ts
|
|
80
|
-
import { createOrderPlane } from 'arkgate/order';
|
|
83
|
+
import { createOrderPlane, hashOf, hashReleasePayload } from 'arkgate/order';
|
|
81
84
|
|
|
82
85
|
const plane = createOrderPlane({
|
|
83
86
|
projector, // consumer: (release, sigma) => { allowedKinds, invalidated }
|
|
84
87
|
xiSchema, // JSON Schema object; additionalProperties false
|
|
85
88
|
maxXiKeys, // default 7
|
|
86
|
-
clocks, //
|
|
89
|
+
clocks, // optional; default Kernel Date.now(); Domain must not call Date.now
|
|
87
90
|
packs, // data, not user predicates (capacity is kind/sigmaKey/payloadKey/op)
|
|
88
91
|
informationBudget, // optional { cannotObserve: ['ledger'] } — not a config key
|
|
89
92
|
sigmaMaxAgeMs, // optional σ freshness; never on ξ — not a config key
|
|
@@ -97,6 +100,8 @@ plane.ingest(event); // residual absorb | escalate_up | hold. Never a
|
|
|
97
100
|
plane.proposeRelease(delta); // blast radius. Empty blast = domain error
|
|
98
101
|
plane.apply(proposal); // valve: later ξ change
|
|
99
102
|
plane.refreshSigma(sigma); // saldo / clocks; xiHash unchanged
|
|
103
|
+
plane.restore(release); // process-local install; hash is identity; not durable; not K01
|
|
104
|
+
hashOf(xi, sigma); // same bytes as hashReleasePayload; no freeze side effect
|
|
100
105
|
```
|
|
101
106
|
|
|
102
107
|
There is no `update()`. Calling `update` / `patch` / `set` on the plane throws
|
|
@@ -112,9 +117,24 @@ There is no `update()`. Calling `update` / `patch` / `set` on the plane throws
|
|
|
112
117
|
| Change plan / protocol / cost-code bound | `proposeRelease` then `apply` |
|
|
113
118
|
| PATCH the slow key through Prisma/Drizzle | `ARKORDER_XI_FIELD_WRITE` |
|
|
114
119
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
120
|
+
Gallery (not in the npm tarball):
|
|
121
|
+
[examples/arkorder-billing](https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing).
|
|
122
|
+
Rename the three keys. Membership ids (`projectId`) are not keys: a
|
|
123
|
+
`proposeRelease` that does not change `h(ξ)` fails closed (`ARKORDER_EMPTY_BLAST`).
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Ingest kinds vs payload (deliberate)
|
|
128
|
+
|
|
129
|
+
`classifyIngest` uses `event.kind` for `escalateKinds` and `allowedKinds`.
|
|
130
|
+
`ConstraintPack` is data-only: a function in the pack is `hold` with
|
|
131
|
+
`reasonCode: pack` ([ADR 0016](adr/0016-arkrules-no-executable-core.md) /
|
|
132
|
+
[ADR 0034](adr/0034-arkorder-valved-loop.md) D5). Capacity already compares
|
|
133
|
+
numeric `payload[payloadKey]` against `sigma[sigmaKey]`.
|
|
134
|
+
|
|
135
|
+
A payload-dependent story such as "second week failing a goal" is domain /
|
|
136
|
+
projector work (a new kind, or that kind in `allowedKinds` when ξ says so).
|
|
137
|
+
It is not a pack predicate. Do not add user functions to `ConstraintPack`.
|
|
118
138
|
|
|
119
139
|
---
|
|
120
140
|
|
|
@@ -139,12 +159,18 @@ does not change `h(ξ)` fails closed (`ARKORDER_EMPTY_BLAST`).
|
|
|
139
159
|
| `managedLayers` | Layers whose persistence writes of `xiKeys` are the skip |
|
|
140
160
|
| `planeRoots` | Files allowed to call `createOrderPlane` |
|
|
141
161
|
| `maxXiKeys` | Cap on ξ (default 7). Haken: few slow modes |
|
|
142
|
-
| `xiKeys` | Optional 3–5 slow names. Empty → `ARKORDER_XI_FIELD_WRITE` silent |
|
|
162
|
+
| `xiKeys` | Optional 3–5 slow names chosen by the modeller. Empty → `ARKORDER_XI_FIELD_WRITE` silent |
|
|
143
163
|
|
|
144
164
|
Unknown keys fail closed. Empty `planeRoots` in `enforced` fails
|
|
145
165
|
`ARKORDER_MISSING_PLANE`. Demotion or deletion is a policy-delta **weakening**.
|
|
146
166
|
This library’s 4-layer authoring contract does **not** turn the extra on.
|
|
147
167
|
|
|
168
|
+
The modeller names the keys. Empty blast is a mechanical rejection, but a large
|
|
169
|
+
blast does not make `paid` independent of current state. Whether a candidate is
|
|
170
|
+
entailed by current state remains a modeller and skill obligation. Invoices stay
|
|
171
|
+
on ingest. A `paid` flag is not a fourth slow key: derive it from cash received
|
|
172
|
+
against the invoice amount.
|
|
173
|
+
|
|
148
174
|
---
|
|
149
175
|
|
|
150
176
|
## Activation (same shape as ArkRun)
|
|
@@ -198,6 +224,8 @@ package, inspector, in-memory compare). ArkOrder does not grow a bus, outbox,
|
|
|
198
224
|
or hosted replay. [ADR 0033](adr/0033-arkorder-runtime-half-is-arkrun.md).
|
|
199
225
|
|
|
200
226
|
Durability (`K01`) stays parked. In-memory is the honesty line.
|
|
227
|
+
`restore(release)` reinstalls a frozen Release in this process. It is not a
|
|
228
|
+
store. It does not close `K01`.
|
|
201
229
|
|
|
202
230
|
---
|
|
203
231
|
|
|
@@ -212,6 +240,10 @@ Durability (`K01`) stays parked. In-memory is the honesty line.
|
|
|
212
240
|
- a degraded-mode contract (nothing can be down)
|
|
213
241
|
|
|
214
242
|
If a “slow parameter” changes with every click, it is not an order parameter.
|
|
243
|
+
A status you can recompute from data you already have is not a slow decision. Derive it. Do not freeze it. The check remains silent on semantic entailment.
|
|
244
|
+
For example, cash arrives through ingest; `paid` is a conclusion derived from
|
|
245
|
+
cash received against amount due, not a key to freeze or change with
|
|
246
|
+
`proposeRelease`.
|
|
215
247
|
|
|
216
248
|
The valved loop ships in **4.8.6** ([ADR 0034](adr/0034-arkorder-valved-loop.md)).
|
|
217
249
|
In-memory `ReleaseStore` is **not** durable. Doctor / status `arkOrder` stays
|
|
@@ -223,6 +255,7 @@ In-memory `ReleaseStore` is **not** durable. Doctor / status `arkOrder` stays
|
|
|
223
255
|
|
|
224
256
|
```bash
|
|
225
257
|
npx arkgate-check --doctor
|
|
226
|
-
#
|
|
258
|
+
# gallery (not in the npm tarball):
|
|
259
|
+
# https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing
|
|
227
260
|
# /ark-adopt to turn arkOrder on advisory
|
|
228
261
|
```
|
package/docs/configuration.md
CHANGED
|
@@ -126,16 +126,23 @@ Top-level fields:
|
|
|
126
126
|
preflight / CI verdict and arm only when the layer plane is classified (same ≥50%
|
|
127
127
|
governed and ≥1 populated-layer floor as ArkRules).
|
|
128
128
|
- **`arkOrder`** (optional, schema `1.3+`) — inline ArkOrder extra (`mode`, `planeRoots`,
|
|
129
|
-
`managedLayers`, `maxXiKeys`, **`xiKeys`**). Absence is silent.
|
|
130
|
-
Import `createOrderPlane` from `arkgate/order` (same package).
|
|
131
|
-
`enforced` mode fails closed (`ARKORDER_MISSING_PLANE`).
|
|
132
|
-
names the product already knows (plan,
|
|
133
|
-
|
|
134
|
-
`
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
129
|
+
`managedLayers`, `maxXiKeys`, **`xiKeys`**, optional **`appliesTo`**). Absence is silent.
|
|
130
|
+
Unknown keys fail closed. Import `createOrderPlane` from `arkgate/order` (same package).
|
|
131
|
+
Empty `planeRoots` in `enforced` mode fails closed (`ARKORDER_MISSING_PLANE`).
|
|
132
|
+
`xiKeys` is a repo-wide watchlist of slow names the product already knows (plan,
|
|
133
|
+
protocol, cost-code bound). Empty `xiKeys` leaves `ARKORDER_XI_FIELD_WRITE` silent.
|
|
134
|
+
`maxXiKeys` (default 7) is the Haken cap on one `release()` / `assertXiKeyCap`, not
|
|
135
|
+
a cap on watchlist length: eight named `xiKeys` with `maxXiKeys` 7 is valid.
|
|
136
|
+
`ARKORDER_TOO_MANY_PARAMS` fires when `release()` `keyCount` exceeds `maxXiKeys`.
|
|
137
|
+
Optional `appliesTo` uses the same glob engine as `layers[].patterns`. Absence or
|
|
138
|
+
empty keeps current behavior (every file in `managedLayers`). Non-empty emits
|
|
139
|
+
`ARKORDER_XI_FIELD_WRITE` only when the layer is managed **and** the file matches
|
|
140
|
+
at least one glob. Membership ids and recomputable statuses such as `paid` /
|
|
141
|
+
`overdue` are not keys. Factory options `informationBudget`, `sigmaMaxAgeMs`,
|
|
142
|
+
`store` (`ReleaseStore`), and capacity packs belong on `createOrderPlane`, not this
|
|
143
|
+
extra object. Later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest
|
|
144
|
+
residual `absorb | escalate_up | hold`. Demotion or deletion is a policy-delta
|
|
145
|
+
**weakening**. Field ingest never mints a pattern.
|
|
139
146
|
|
|
140
147
|
**Activation is one shape.** ArkRun and ArkOrder both use `mode` + `managedLayers`.
|
|
141
148
|
Absence of either extra is silent. They keep different *root* names because they
|
|
@@ -190,8 +197,36 @@ Rule fields:
|
|
|
190
197
|
- `from`, `to`, `allowed`, `message`, `peerIsolation`, `sliceFolders`, `sharedRoots`,
|
|
191
198
|
`allowedCrossSlice`
|
|
192
199
|
- `peerIsolation: true` + `allowed: false`: deny only when slice ids differ; same-slice allows
|
|
193
|
-
when both paths classify.
|
|
194
|
-
**fail closed** (deny — cannot
|
|
200
|
+
when both paths classify. Applies to **any** declared `from`→`to` pair, not only self-edges.
|
|
201
|
+
Missing paths, empty slice folders, or unclassifiable slices **fail closed** (deny — cannot
|
|
202
|
+
prove same-slice).
|
|
203
|
+
|
|
204
|
+
#### Cross-layer slice walls (already in the engine)
|
|
205
|
+
|
|
206
|
+
A slice wall on a cross-layer edge is a `peerIsolation` rule on that `from`/`to` pair
|
|
207
|
+
(`allowed: false`). There is no slice-wide engine mode, no new config key, and no new skill
|
|
208
|
+
name. `findDeniedEdgeDecision` already applies `peerIsolation` to any declared pair
|
|
209
|
+
(same-layer or cross-layer) — locked on `EdgeRule` and `findDeniedEdgeDecision` in
|
|
210
|
+
[`src/domain/layerMatch.ts`](../src/domain/layerMatch.ts). There is no dedicated ADR to add.
|
|
211
|
+
|
|
212
|
+
A feature slice is often cross-layer. Classic Application→Domain is allowed by omission, so
|
|
213
|
+
`ApplicationOrchestration/management` importing `DomainModel/projects` is invisible to an
|
|
214
|
+
Application→Application wall. Declare the cross-layer pair with the same `sliceFolders` /
|
|
215
|
+
`sharedRoots` as the same-layer wall:
|
|
216
|
+
|
|
217
|
+
```jsonc
|
|
218
|
+
{
|
|
219
|
+
"from": "ApplicationOrchestration",
|
|
220
|
+
"to": "DomainModel",
|
|
221
|
+
"allowed": false,
|
|
222
|
+
"peerIsolation": true,
|
|
223
|
+
"sliceFolders": ["features"],
|
|
224
|
+
"sharedRoots": ["ui", "hooks"]
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Domain files that do not resolve to a slice **fail closed** unless they sit under a declared
|
|
229
|
+
`sharedRoots` entry. Do not invent a sixth rule shape for this.
|
|
195
230
|
|
|
196
231
|
#### Declared peerIsolation exceptions (4.8.4)
|
|
197
232
|
|
package/docs/develop.md
CHANGED
|
@@ -2,13 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
**Write. Check. Ship.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.**
|
|
6
|
+
|
|
7
|
+
Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
|
|
8
|
+
is just documentation.
|
|
9
|
+
|
|
10
|
+
AI can build fast—and make a mess just as fast.
|
|
11
|
+
|
|
12
|
+
Keep the product easy to understand, change, and trust.
|
|
6
13
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
ArkGate stops bad shortcuts. ArkRules protects how each part should behave. ArkRun keeps work moving. ArkOrder protects the few big choices that should not change by accident.
|
|
15
|
+
|
|
16
|
+
Safer changes, fewer surprises, and extra protection only when you choose it.
|
|
17
|
+
|
|
18
|
+
For **developers** integrating ArkGate into a product repo: agents, CI, config, brownfield, and power tools.
|
|
12
19
|
|
|
13
20
|
If you only want the happy path, start at [use.md](use.md). Optional ArkOrder
|
|
14
21
|
(library + sensors, not a service): [arkorder.md](arkorder.md).
|
|
@@ -207,8 +214,10 @@ First freeze is `release()`. Later pattern change is `proposeRelease` then
|
|
|
207
214
|
`absorb | escalate_up | hold` + `reasonCode`; capacity pack as data;
|
|
208
215
|
`createMemoryReleaseStore`; `ingestTravelAction`; ArkRun `decisionTape`.
|
|
209
216
|
|
|
210
|
-
|
|
211
|
-
|
|
217
|
+
The billing gallery (`plan` / `cycle` / `tenancy`) lives on GitHub, not in the
|
|
218
|
+
npm tarball:
|
|
219
|
+
[examples/arkorder-billing](https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing).
|
|
220
|
+
Rename the keys. Posting an invoice is absorbed; changing plan is
|
|
212
221
|
`proposeRelease` then `apply`. See [configuration.md](configuration.md) and
|
|
213
222
|
[package-surface.md](package-surface.md).
|
|
214
223
|
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
# ArkGate — enthusiast track
|
|
2
2
|
|
|
3
3
|
**Write. Check. Ship.**
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
**When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.**
|
|
6
|
+
|
|
7
|
+
Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
|
|
8
|
+
is just documentation.
|
|
9
|
+
|
|
10
|
+
AI can build fast—and make a mess just as fast.
|
|
11
|
+
|
|
12
|
+
Keep the product easy to understand, change, and trust.
|
|
13
|
+
|
|
14
|
+
ArkGate stops bad shortcuts. ArkRules protects how each part should behave. ArkRun keeps work moving. ArkOrder protects the few big choices that should not change by accident.
|
|
15
|
+
|
|
16
|
+
Safer changes, fewer surprises, and extra protection only when you choose it.
|
|
6
17
|
|
|
7
18
|
Plain-language onboarding for builders who use AI agents but are not professional
|
|
8
19
|
developers. This track follows [Diátaxis](https://diataxis.fr/): tutorial, how-to,
|