arkgate 4.8.6 → 4.8.8
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 +55 -4
- package/README.md +37 -4
- package/bin/ark-dashboard.mjs +423 -0
- package/bin/ark-mcp-runtime.mjs +8 -2
- package/bin/ark.mjs +51 -3
- package/bin/lib/analysis-engine.mjs +5 -5
- package/bin/lib/doctor-human.mjs +9 -0
- package/bin/lib/doctor-plan.mjs +5 -1
- package/bin/lib/html-report.mjs +4 -2
- package/bin/lib/layer-description.mjs +27 -0
- package/bin/lib/prepare-write.mjs +7 -1
- package/dist/{configTypes-dy5PfTqS.d.ts → configTypes-0eHpocR3.d.ts} +4 -0
- package/dist/{diagnosticCatalog-D_DI7qrZ.d.ts → diagnosticCatalog-DxKCTBbp.d.ts} +3 -3
- package/dist/eslint/index.d.ts +1 -1
- package/dist/index.cjs +19 -19
- package/dist/index.d.ts +5 -4
- package/dist/index.js +20 -20
- package/dist/nestjs/index.cjs +5 -5
- package/dist/nestjs/index.d.ts +3 -3
- package/dist/nestjs/index.js +5 -5
- 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-BuM8WNqe.d.ts → types-BK47clMl.d.ts} +1 -1
- package/dist/{types-DrqsOiTY.d.ts → types-DxvmJO-D.d.ts} +106 -2
- package/docs/README.md +12 -4
- package/docs/agent-guide.md +36 -1
- package/docs/ai-gates.md +13 -1
- package/docs/arkorder.md +11 -1
- package/docs/configuration.md +25 -3
- package/docs/develop.md +13 -6
- package/docs/enthusiast/README.md +13 -2
- package/docs/package-surface.md +21 -5
- package/docs/product-voice.md +25 -2
- package/docs/use.md +11 -3
- package/package.json +3 -1
- package/server.json +2 -2
- package/templates/agent-skills/ark-adopt/SKILL.md +19 -1
- 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-place/SKILL.md +18 -4
- package/templates/skills/ark-adopt.md +19 -1
- package/templates/skills/ark-autopilot.md +1 -1
- package/templates/skills/ark-contract.md +1 -1
- package/templates/skills/ark-place.md +18 -4
|
@@ -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-BK47clMl.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,14 @@ 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
|
|
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 on the **4.8.8 prepared tree**; not yet published; 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.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).
|
|
74
|
+
Prepared: [releases/4.8.8.md](releases/4.8.8.md) (`arkgate@4.8.8`; not published).
|
|
75
|
+
Current published: [releases/4.8.7.md](releases/4.8.7.md) (`arkgate@4.8.7` on npm `latest`; does not close `K01`).
|
|
76
|
+
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
77
|
Older notes: [releases/](releases/). Config: [configuration.md](configuration.md).
|
|
70
78
|
|
|
71
79
|
---
|
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)
|
|
@@ -1413,3 +1425,26 @@ doctor → compact router (and `/ark-autopilot` only after the skill pack).
|
|
|
1413
1425
|
6. **Wire** relationships via `registry.define(..., { dependsOn, produces })`
|
|
1414
1426
|
7. **Register** event contracts before publishing in strict mode
|
|
1415
1427
|
8. **Observe** runtime via `bus.getTrace()`, `auditTrail.query()`, outbox records, projection checkpoints, and `ark.observability.report()`
|
|
1428
|
+
9. **Optional loopback inspector** via `ark.startInspector()` — JSON facts only (see below); poll with `ark-dashboard` / `arkgate-dashboard` when you want a terminal view
|
|
1429
|
+
|
|
1430
|
+
### Dev inspector queue endpoints and dashboard bins
|
|
1431
|
+
|
|
1432
|
+
`startInspector()` / `startArkRunInspector()` bind loopback only, refuse
|
|
1433
|
+
`NODE_ENV=production`, and lazy-load HTTP. The kernel exposes JSON monitor facts
|
|
1434
|
+
(snapshot / graph / queue endpoints) — not a TUI.
|
|
1435
|
+
|
|
1436
|
+
| Method + path | Role |
|
|
1437
|
+
|---------------|------|
|
|
1438
|
+
| `GET /snapshot` (also `/`) | Information package + transport + observability snapshot |
|
|
1439
|
+
| `GET /events` | SSE of the same snapshot |
|
|
1440
|
+
| `GET /graph` | `requestGraph` slice (+ Mermaid helper) |
|
|
1441
|
+
| `GET /outbox` | Outbox monitor: `available`, `pendingCount`, `failedCount`, `pending[]` / `failed[]` row summaries (`id`, `status`, `attempts`, optional `intent` / `error` / `updatedAt`) — **no event payloads** |
|
|
1442
|
+
| `GET /workflows` | Workflows monitor: counts + `workflows[]` summaries (`id`, `name`, `status`, optional `currentStep` / `error`) |
|
|
1443
|
+
|
|
1444
|
+
Dual package bins **`ark-dashboard`** and **`arkgate-dashboard`**
|
|
1445
|
+
(`bin/ark-dashboard.mjs`) poll `--url` (default `http://127.0.0.1:3000/snapshot`)
|
|
1446
|
+
and sibling `/outbox` + `/workflows` on an interval (`--interval`, 200–60000 ms).
|
|
1447
|
+
ANSI escape sequences + polling only — no React, Ink, or Blessed. Use
|
|
1448
|
+
`ark dashboard` / `arkgate dashboard` (passthrough to `bin/ark-dashboard.mjs`) or the
|
|
1449
|
+
dual bins `ark-dashboard` / `arkgate-dashboard`.
|
|
1450
|
+
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
|
@@ -139,12 +139,18 @@ does not change `h(ξ)` fails closed (`ARKORDER_EMPTY_BLAST`).
|
|
|
139
139
|
| `managedLayers` | Layers whose persistence writes of `xiKeys` are the skip |
|
|
140
140
|
| `planeRoots` | Files allowed to call `createOrderPlane` |
|
|
141
141
|
| `maxXiKeys` | Cap on ξ (default 7). Haken: few slow modes |
|
|
142
|
-
| `xiKeys` | Optional 3–5 slow names. Empty → `ARKORDER_XI_FIELD_WRITE` silent |
|
|
142
|
+
| `xiKeys` | Optional 3–5 slow names chosen by the modeller. Empty → `ARKORDER_XI_FIELD_WRITE` silent |
|
|
143
143
|
|
|
144
144
|
Unknown keys fail closed. Empty `planeRoots` in `enforced` fails
|
|
145
145
|
`ARKORDER_MISSING_PLANE`. Demotion or deletion is a policy-delta **weakening**.
|
|
146
146
|
This library’s 4-layer authoring contract does **not** turn the extra on.
|
|
147
147
|
|
|
148
|
+
The modeller names the keys. Empty blast is a mechanical rejection, but a large
|
|
149
|
+
blast does not make `paid` independent of current state. Whether a candidate is
|
|
150
|
+
entailed by current state remains a modeller and skill obligation. Invoices stay
|
|
151
|
+
on ingest. A `paid` flag is not a fourth slow key: derive it from cash received
|
|
152
|
+
against the invoice amount.
|
|
153
|
+
|
|
148
154
|
---
|
|
149
155
|
|
|
150
156
|
## Activation (same shape as ArkRun)
|
|
@@ -212,6 +218,10 @@ Durability (`K01`) stays parked. In-memory is the honesty line.
|
|
|
212
218
|
- a degraded-mode contract (nothing can be down)
|
|
213
219
|
|
|
214
220
|
If a “slow parameter” changes with every click, it is not an order parameter.
|
|
221
|
+
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.
|
|
222
|
+
For example, cash arrives through ingest; `paid` is a conclusion derived from
|
|
223
|
+
cash received against amount due, not a key to freeze or change with
|
|
224
|
+
`proposeRelease`.
|
|
215
225
|
|
|
216
226
|
The valved loop ships in **4.8.6** ([ADR 0034](adr/0034-arkorder-valved-loop.md)).
|
|
217
227
|
In-memory `ReleaseStore` is **not** durable. Doctor / status `arkOrder` stays
|
package/docs/configuration.md
CHANGED
|
@@ -130,7 +130,8 @@ 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
|
|
133
|
+
leaves `ARKORDER_XI_FIELD_WRITE` silent. Membership ids and recomputable statuses
|
|
134
|
+
such as `paid` / `overdue` are not keys. Factory options
|
|
134
135
|
`informationBudget`, `sigmaMaxAgeMs`, `store` (`ReleaseStore`), and capacity packs
|
|
135
136
|
belong on `createOrderPlane`, not this extra object. Later ξ is `proposeRelease`
|
|
136
137
|
then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold`.
|
|
@@ -144,7 +145,28 @@ name different factories: `arkRun.kernelRoots` (`compositionRoots` alias) vs
|
|
|
144
145
|
|
|
145
146
|
Layer fields:
|
|
146
147
|
|
|
147
|
-
- `name`, `patterns`, `exclude
|
|
148
|
+
- `name`, `patterns`, `exclude`
|
|
149
|
+
- **`layers[].description`** (optional) — **app-context caption**: one product sentence for what
|
|
150
|
+
this folder is *in the app*, not architecture jargon. `/ark-place` prints it next to
|
|
151
|
+
the layer name and globs; doctor, coverage, and the HTML report show the same text.
|
|
152
|
+
Changing the sentence does **not** change `policyHash` (same strip as `stewards`) and
|
|
153
|
+
does **not** need a weakening ack. Absence is silent: never fails `--strict-config`,
|
|
154
|
+
never invents a doctor residual, never flips `valid`. Empty string is invalid JSON for
|
|
155
|
+
the field (`minLength: 1`). Compact starters may omit it. `/ark-adopt` writes it when
|
|
156
|
+
the product map or glossary names the house; it does not invent captions. No
|
|
157
|
+
`/ark-describe`.
|
|
158
|
+
|
|
159
|
+
```json
|
|
160
|
+
"layers": [
|
|
161
|
+
{
|
|
162
|
+
"name": "Application",
|
|
163
|
+
"patterns": ["src/application/**"],
|
|
164
|
+
"description": "Purchase requests — from asked to received."
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
That sentence is product copy. Not “Rich domain model, business rules, and domain events.”
|
|
148
170
|
- `intentPrefixes`, `forbiddenGlobals`, `mayImportInfrastructure`, `optional`
|
|
149
171
|
- `reserved` / `allowEmpty` — future houses whose globs match nothing yet. `--strict-config` does not fail; `CONFIG_LAYER_PATTERN_NO_MATCHES` (typo warning) is skipped. A typo warning fires only when the glob is not reserved.
|
|
150
172
|
- `capabilities: { deny: [...] }` — opt-in effect walls over the seven capability ids
|
|
@@ -353,7 +375,7 @@ changing either contract changes its hash and invalidates the acknowledgement.
|
|
|
353
375
|
|
|
354
376
|
Optional `stewards` lists **GitHub handles or emails** who may **loosen** the contract or
|
|
355
377
|
**grow** the baseline (`pedroknigge` or `pedroknigge@users.noreply.github.com` — not
|
|
356
|
-
`Pedro Knigge`). The field is metadata — it does not change the policy hash. The lock
|
|
378
|
+
`Pedro Knigge`). The field is metadata — it does not change the policy hash. `layers[].description` is stripped the same way (caption-only edits do not change `policyHash` and do not need a weakening ack; `contractHash` still fingerprints the raw config). The lock
|
|
357
379
|
matches `--author`, then `GITHUB_ACTOR` / `ARK_STEWARD`, then `GIT_AUTHOR_EMAIL`. A
|
|
358
380
|
noreply GitHub mail and the handle are the same person. Git `user.name` is not identity.
|
|
359
381
|
|
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).
|
|
@@ -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,
|
package/docs/package-surface.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
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
|
That is the product wedge (host hook + required CI). Skills name the next step after that.
|
|
6
18
|
**Not the wedge:** the optional in-process **ArkRun** runtime (`arkgate/runtime`) and the
|
|
7
19
|
optional **ArkOrder** pattern extra (`arkgate/order`).
|
|
@@ -25,7 +37,7 @@ hardening guide remains repository-hosted rather than duplicated in the gate tar
|
|
|
25
37
|
|
|
26
38
|
| Surface | How you use it | Stability notes |
|
|
27
39
|
|---------|----------------|-----------------|
|
|
28
|
-
| **CLI** | `arkgate` / `arkgate-check` (aliases `ark` / `ark-check`) | Flags and human text may improve; **JSON output shapes** for `--json` (check, doctor, plan, coverage, recommend, **status**, **agents-md**) are stable within a major. Additive fields OK; removals/renames are major. From 4.2, `--require-gates` implies strict config and verifies semantic Ark AGENTS, project-rooted MCP/compact Codex registration, and fail-closed CI rather than file presence alone. `ark status --json` is the unified status snapshot. `ark agents-md` is the version-matched agent projection (non-authoritative). |
|
|
40
|
+
| **CLI** | `arkgate` / `arkgate-check` (aliases `ark` / `ark-check`); optional ArkRun **`ark-dashboard`** / **`arkgate-dashboard`** | Flags and human text may improve; **JSON output shapes** for `--json` (check, doctor, plan, coverage, recommend, **status**, **agents-md**) are stable within a major. Additive fields OK; removals/renames are major. From 4.2, `--require-gates` implies strict config and verifies semantic Ark AGENTS, project-rooted MCP/compact Codex registration, and fail-closed CI rather than file presence alone. `ark status --json` is the unified status snapshot. `ark agents-md` is the version-matched agent projection (non-authoritative). **Dashboard bins** poll an ArkRun inspector snapshot (ANSI + interval polling; `--url` / `--interval`); they are not a gate verdict. The main CLI also accepts `ark dashboard` / `arkgate dashboard` as a passthrough to those bins. |
|
|
29
41
|
| **Host write boundaries** | Generated trusted PreToolUse/preToolUse hooks + `ark-mcp --hook`; inspect with doctor/status | Hard is always operation-scoped and runtime-evidenced. From 4.6.3, Codex CLI and local ChatGPT Desktop/App Server can hard-block a complete `apply_patch` sent as `tool_input.command`; `.codex/hooks.json` on disk remains unverified until a fresh covered invocation. Hosted tools, specialized hook opt-outs, shell/direct writes, incomplete reconstruction, and humans rely on required CI. Repair envelopes may emit, but Codex reinjection is not guaranteed. |
|
|
30
42
|
| **Programmatic gate API** | `import { analyzeProject, loadContract, createAICodeGate, ... } from 'arkgate'` | The root export is the static gate/config/analysis contract listed below. It intentionally contains no runtime-kernel implementation. |
|
|
31
43
|
| **Improvement compass (4.4; status honesty 4.5)** | `ark-check --doctor --json` → `doctor.improvementCompass`; human doctor section **Improvement compass (not a score)**; HTML report `data-advisory="improvementCompass"`. **`ark status --json` / MCP `ark_status`** project a thin `improvementCompass` residual map with explicit honesty **`mode`**: `full` \| `subset` \| `unavailable` (always `notAScore: true`). When `mode` is `full`, status residual lens **ids** are a **subset of** doctor residual for the same facts (report snapshot stores the thin slice after `--report`). Incomplete or missing session facts → `subset` / `unavailable` + `reasonCode` / `reason` — **never invent green residual**. Residual never flips `valid` / strict-merge / `goal.met`. When status mode ≠ full, run doctor for full 15-lens detail. | Additive schema `1.0`. Closed **15** lens ids (`soc`, `cohesion`, `coupling`, `srp`, `dip`, `ocp`, `encapsulation`, `modularity`, `scalability`, `resilience`, `security`, `maintainability`, `testability`, `domain`, `stack`) with status `ok` \| `residual` \| `not-instrumented` \| `out-of-scope`, evidence refs, optional `nextAction`, capped `topResidual`, always **`notAScore: true`**. Projection from existing smells / walls / cohesion / ArkRules / design-weak only — **never** a gate input. Out-of-scope locked for scalability, resilience, and app security (no residual invent from missing SAST/APM). Root API: `buildImprovementCompass` / `IMPROVEMENT_LENS_IDS`; status: `projectStatusImprovementCompass` / `STATUS_COMPASS_MODES`. |
|
|
@@ -51,14 +63,15 @@ hardening guide remains repository-hosted rather than duplicated in the gate tar
|
|
|
51
63
|
| **Report parity and snapshot evidence (4.2)** | `ark-check --report` → advisory sections (`data-advisory="contractHealth\|ambientState\|parseHealth\|arkRun"`, nested `governanceWeight`) + layer wall badges; `.ark/reports/*.json` | The report is a rendering of doctor truth. **Standing rule:** every doctor advisory ships with its report section — enforced by the `reportParity` guard, which enumerates the doctor's advisory keys and fails on any missing section. Snapshots add best-effort Git `HEAD`/branch/dirty provenance without a shell; unavailable Git is explicit. Evolution renders the Ark score delta only when both snapshots name the same ArkGate version, while retaining raw facts across versions. Thin `arkRun` on `latest.json` is `notAScore` residual honesty for `ark status`. |
|
|
52
64
|
| **MCP project identity (4.2)** | `ark_identity`; `arkgate/schema/project-identity` or `arkgate/schema/ark.project-identity.schema.json`; root API constants/helpers/types | Schema `1.0`. `projectId` hashes canonical root + config path and stays stable across contract edits/restarts; runtime id/start time are separate. Every project-bound tool result and error carries `projectIdentity`, `binding` (`matched` / `unverified` / `mismatch`), and `authoritative`. Canonical out-of-root config/file evidence fails before project data. |
|
|
53
65
|
| **MCP tools and compatibility resource** | `arkgate-mcp`; `ark_manifest`; `ark_status`; `ark://manifest` | Tool names and primary argument shapes are stable within a major. Every tool accepts additive `project.expectedRoot` / optional `expectedProjectId`. The initial handshake requires the exact project root; a contained descendant is authoritative only together with the matching project id. Legacy tool calls remain callable but `unverified` and non-authoritative. `ark_manifest` is the authoritative contract surface after binding. **`ark_status`** returns the status manifest envelope (parity with `ark status --json`). Standard `resources/read` cannot portably carry the expectation, so `ark://manifest` remains compatibility-only and always unverified/non-authoritative. The server never retargets from input. |
|
|
54
|
-
| **`ark.config.json`** | Layer globs, rules, include/exclude, forbiddenGlobals, intent prefixes, `peerIsolation`, `dynamicImportAllowlist`, `safety` thresholds; optional **`coverage`** controls (`testGlobs`, `maxFiles`); optional **`arkRules`** map (schema `1.1+`); optional **`arkRun`** extra (schema `1.2+`); optional **`arkOrder`** extra (schema `1.3+`) | Versioned by `schemaVersion`; unknown fields fail closed and migrations preserve the previous supported major. Absence of `coverage`, `arkRules`, `arkRun`, or `arkOrder` is byte-for-byte silent on Layers / ArkRules verdicts. Enforced extra teeth share the CLI / MCP / hook / preflight / CI verdict and arm only when the layer plane is classified (same ArkRules floor). |
|
|
66
|
+
| **`ark.config.json`** | Layer globs, optional `layers[].description`, rules, include/exclude, forbiddenGlobals, intent prefixes, `peerIsolation`, `dynamicImportAllowlist`, `safety` thresholds; optional **`coverage`** controls (`testGlobs`, `maxFiles`); optional **`arkRules`** map (schema `1.1+`); optional **`arkRun`** extra (schema `1.2+`); optional **`arkOrder`** extra (schema `1.3+`) | Versioned by `schemaVersion`; unknown fields fail closed and migrations preserve the previous supported major. Absence of `coverage`, `arkRules`, `arkRun`, or `arkOrder` is byte-for-byte silent on Layers / ArkRules verdicts. Enforced extra teeth share the CLI / MCP / hook / preflight / CI verdict and arm only when the layer plane is classified (same ArkRules floor). |
|
|
67
|
+
| **Layer caption (`layers[].description`, 4.8.7)** | Optional string on each layer. Projected onto `ark_place` / prepare-write / MCP place JSON, doctor JSON + human, coverage JSON, and the HTML Purpose column when present. `/ark-adopt` writes it from the product map or glossary; `/ark-place` prints it next to layer name + globs. | Existing optional field — **no `schemaVersion` bump**, no new key, no 14th skill. Copy is **app context** (a product sentence such as `Purchase requests — from asked to received.`), not architecture jargon. Stripped from `policyHash` like `stewards`; caption-only edits are neutral. Absence is silent: never a residual, never a score, never `--strict-config` fail, never flips `valid`. Compact starters may omit. |
|
|
55
68
|
| **ArkRules inventory / under-contract (4.0; layer context 4.2)** | `ark-check --rules-inventory [--json]`; doctor `rulesUnderContract`; MCP `ark_rules_inventory` | Additive. Honest counts (inventoried / under-contract / frozen) — **never a score**. When configured layer evidence exists it overrides filename role guesses: a Domain file named `handler` is not a controller candidate. Test/fixture/seed/migration/exclusion surfaces plus narrow development-identity, PostgreSQL OID, and technical I/O constants are silent. Without layer evidence, backward-compatible path/content heuristics remain. Structure/invariant diagnostics use adapter `1.4` provenance. |
|
|
56
69
|
| **`arkgate/schema/project-identity`** or **`arkgate/schema/ark.project-identity.schema.json`** | MCP canonical project, contract, runtime, expectation, and binding envelope | Schema `1.0`. Initial `expectedRoot` must be the exact project root. A contained descendant can match only when `expectedProjectId` is also present and correct; id-only matching stays non-authoritative. Mismatch codes are `PROJECT_ROOT_MISMATCH`, `PROJECT_ID_MISMATCH`, and `INVALID_PROJECT_EXPECTATION`. |
|
|
57
70
|
| **Package pin dual-truth (4.0)** | doctor JSON `packageVersionTruth`; upgrade JSON/human note when pin behind CLI | Additive, advisory. Surfaces after `upgrade --no-install` when managed CLI is ahead of package.json. |
|
|
58
71
|
| **Managed upgrade self-service honesty (4.5 / DF05)** | `ark upgrade [--json]` → `selfService` (+ human “Self-service honesty” lines) | Additive, advisory. Answers without a maintainer: write-path activation labels per selected host (`hard`\|`advisory`\|`unavailable`) and customized content-identity preserve (`customizedPaths` / `customizedContentPreserved`). Soft hosts never hard; upgrade never invents `hardWriteActive` from disk alone. Always `notAScore: true`. Not a gate input; not part of `planDigest`. |
|
|
59
72
|
| **Product honesty readiness split (4.1.1)** | doctor JSON `productHonesty` | Additive. `unfinished` / `headline` / `primaryNextAction` / `reasonIds` remain; EH adds `contractReadiness` (`ready`\|`partial`\|`not-ready`), `localWriteBoundary` (`advisory`\|`hard`\|`unverified`\|`unknown`), `architectureReasonIds`, `environmentResidualIds` / `environmentResiduals`. Soft-write hosts stay in evidence without alone forcing global **Not finished**. `notAScore: true` always. |
|
|
60
73
|
| **Policy transition analysis (3.1.0)** | `analyzePolicyDelta(...)`; MCP `ark_policy_delta`; CLI `--policy-base` / `--policy-base-ref` / `--policy-ack`; check JSON `policyDelta` | Additive schema `1.0`. Classifications and finding ids are deterministic. Weakening/judgment requires an acknowledgement bound to both policy hashes and the exact blocking finding set. |
|
|
61
|
-
| **Team parliament (law vs feature)** | Optional `stewards` on `ark.config.json` (GitHub handle or email); CLI `--changed` / `--against` / `--base` / `--contract-diff` / `--contract-session` / `--persona` / `--author`; check JSON `teamParliament`; `ark status --vs`; write-gate mixed-batch deny | Additive. Law files must not mix with product source. Loosen / baseline-grow are steward-only when `stewards` is set. `--against` ratchets vs the base-ref baseline. `--changed` scans touched sources. `stewards`
|
|
74
|
+
| **Team parliament (law vs feature)** | Optional `stewards` on `ark.config.json` (GitHub handle or email); CLI `--changed` / `--against` / `--base` / `--contract-diff` / `--contract-session` / `--persona` / `--author`; check JSON `teamParliament`; `ark status --vs`; write-gate mixed-batch deny | Additive. Law files must not mix with product source. Loosen / baseline-grow are steward-only when `stewards` is set. `--against` ratchets vs the base-ref baseline. `--changed` scans touched sources. `stewards` and `layers[].description` are excluded from policy hash. Identity is handle or email, not git `user.name`. No org plane. |
|
|
62
75
|
| **Atomic change preflight (3.1.0)** | `preflightChange(...)`; CLI `ark preflight --changes <file> --json`; MCP `ark_prepare_change` | Additive schema `1.0`. One complete governed production-source `{path,content}` / `{path,delete:true}` batch; read-only; returns operation, content/tree/policy/compiler fingerprints and stable graph findings. MCP availability alone is advisory. |
|
|
63
76
|
| **Architecture change map (3.1.0)** | `arkgate/schema/change-map` or `arkgate/schema/ark.change-map.schema.json`; CLI `ark preflight --change-map <file>`; MCP `ark_prepare_change.changeMap` | Optional strict schema `1.0`. Canonical planned paths + operations + resolved Ark layers + dependencies between planned files. Preflight returns `changeMapHash`; absence is normal and adds no project file. Structural intent only, never behavioral completion. |
|
|
64
77
|
| **Structural convergence (3.1.0)** | `analyzeArchitectureConvergence(...)`; map-enabled `preflightChange(...)`; existing CLI/MCP preflight adapters | Additive `convergence` result with stable `satisfied`, `missing`, `contradictory`, and `unplanned` findings. Uses the supplied/current project tree as base and the explicit complete change set as candidate; no implicit Git or LLM input. `readOnly: true`; `behavioralCompletion: "not-evaluated"`. Structural mismatch makes preflight invalid. |
|
|
@@ -176,7 +189,7 @@ claims. Static architecture enforcement does not depend on them.
|
|
|
176
189
|
|
|
177
190
|
| Surface | Import path | Notes |
|
|
178
191
|
|---------|-------------|--------|
|
|
179
|
-
| **ArkRun kernel** | **`arkgate/runtime`** | Public brand **ArkRun**. Same npm package `arkgate` (ADR 0031). Factory `createStrictArkKernel` (each call is an isolated instance; no process-wide `getKernel()` singleton). Root export does **not** include the factory. Optional extra `arkRun` on schema `1.2+`. Event bus, intents, policies, sagas, event buffer, projections, and strict helpers. Managed components declare `uses` / `reactsTo` / `raises` / `sends` on `register()`; `getDependencyInformationPackage()` is a JSON snapshot of ids, lifetime, and declarations and never includes factories, live instances, or input DTOs (ADR 0023). `requestGraph()` slices that snapshot into **process** or **technical** graphs with optional `nodeIds`, `degreesOfSeparation`, and include/exclude query; `formatArkRunGraphMermaid()` (also `graph.mermaid`) is a helper string, never a score. `send()` is the transport port (local / localBlocking / broker); missing broker falls back to in-process local delivery, `ephemeral` defaults true, and **no cloud SDKs ship** in the package (ADR 0024). Opt-in `startInspector()` / `startArkRunInspector()` binds **`127.0.0.1` only**, refuses `NODE_ENV=production`, lazy-loads HTTP, and serves JSON snapshots, SSE,
|
|
192
|
+
| **ArkRun kernel** | **`arkgate/runtime`** | Public brand **ArkRun**. Same npm package `arkgate` (ADR 0031). Factory `createStrictArkKernel` (each call is an isolated instance; no process-wide `getKernel()` singleton). Root export does **not** include the factory. Optional extra `arkRun` on schema `1.2+`. Event bus, intents, policies, sagas, event buffer, projections, and strict helpers. Managed components declare `uses` / `reactsTo` / `raises` / `sends` on `register()`; `getDependencyInformationPackage()` is a JSON snapshot of ids, lifetime, and declarations and never includes factories, live instances, or input DTOs (ADR 0023). `requestGraph()` slices that snapshot into **process** or **technical** graphs with optional `nodeIds`, `degreesOfSeparation`, and include/exclude query; `formatArkRunGraphMermaid()` (also `graph.mermaid`) is a helper string, never a score. `send()` is the transport port (local / localBlocking / broker); missing broker falls back to in-process local delivery, `ephemeral` defaults true, and **no cloud SDKs ship** in the package (ADR 0024). Opt-in `startInspector()` / `startArkRunInspector()` binds **`127.0.0.1` only**, refuses `NODE_ENV=production`, lazy-loads HTTP, and serves JSON snapshots, SSE, `/graph` slices of the information package, plus queue monitors **`GET /outbox`** and **`GET /workflows`** (full counts + sanitized samples capped at 32; no full event payloads; missing ports are unavailable; no public / authless bind). Snapshot `hardening.durability` classifies the explicit outbox/audit/workflow store ports; default `InMemory*` stores stay visibly `memory`, never durable. Dual bins **`ark-dashboard`** / **`arkgate-dashboard`** poll those JSON facts (ANSI TUI in `bin/` only — presentation is not in the kernel); `ark dashboard` / `arkgate dashboard` dispatch to the same executable. **Shadow / replay / compare** (`shadowInformationPackage`, `compareInformationPackages`, `replayInformationPackages`) are in-memory helpers on that snapshot — not durable, not a second bus (ADR 0033). **Decision tape** `decisionTape` `{ xiHash, event, residual }` via `appendDecisionTape` (ADR 0034). Built-in stores are **InMemory reference only**. Branding ArkRun is not a production-durability claim. **`@arkgate/runtime` is deprecated** leftover 0.x (`experimental` dist-tag). |
|
|
180
193
|
| **NestJS adapter** | **`arkgate/nestjs`** | Experimental optional peer `@nestjs/common` for the ArkRun kernel. Same npm package. `@arkgate/runtime/nestjs` is deprecated. |
|
|
181
194
|
| **ArkOrder plane** | **`arkgate/order`** | Public brand **ArkOrder**. Same npm package `arkgate` (ADR 0030) — not `@arkgate/order`. Factory `createOrderPlane`. Valved verbs: `release` / `project` / `ingest` / `proposeRelease` / `apply` / `refreshSigma`. No `update`. First freeze is `release()`; later ξ change is `apply` (`ARKORDER_UNVALVED_RELEASE`). Haken: few slow keys; ingest residual `absorb | escalate_up | hold` + closed `reasonCode`; empty blast fails closed. Capacity pack as data (`kind` / `sigmaKey` / `payloadKey` / `op`). Factory options (not config keys): `informationBudget.cannotObserve`, `sigmaMaxAgeMs`, `store` (`ReleaseStore` / `createMemoryReleaseStore`), `catalogDigest`. Thin travel: `ingestTravelAction` absorb→`send` / escalate_up human→`raises`. `IngestEscalate.target` includes `human`. Root `arkgate` export does **not** include the factory. Optional extra `arkOrder` on schema `1.3`. In-memory; not durable; does not close K01. Does not replace ArkRun. Runtime half (shadow/replay/compare + `decisionTape` / `appendDecisionTape`) is ArkRun (ADR 0033 / 0034). Canonical: [ArkOrder](arkorder.md). |
|
|
182
195
|
|
|
@@ -252,7 +265,10 @@ production deployment would need to satisfy; it is not a readiness certification
|
|
|
252
265
|
## Release notes (maintainers)
|
|
253
266
|
|
|
254
267
|
Ship notes for a version live under [releases/](https://github.com/pedroknigge/arkgate/tree/main/docs/releases)
|
|
255
|
-
(current
|
|
268
|
+
(current tree candidate: [4.8.8.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.8.md), prepared and not published;
|
|
269
|
+
current published: [4.8.7.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.7.md);
|
|
270
|
+
prior published: [4.8.6.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.6.md);
|
|
271
|
+
prior published: [4.8.5.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.5.md);
|
|
256
272
|
prior published: [4.8.4.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.4.md);
|
|
257
273
|
prior published: [4.8.3.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.3.md);
|
|
258
274
|
prior published: [4.8.2.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.2.md);
|
package/docs/product-voice.md
CHANGED
|
@@ -45,12 +45,15 @@ human copy says **status**.
|
|
|
45
45
|
|
|
46
46
|
## Locked first-contact
|
|
47
47
|
|
|
48
|
-
On
|
|
48
|
+
On the eight canonical public openings — `README.md`, `docs/use.md`,
|
|
49
|
+
`docs/develop.md`, `docs/README.md`, `docs/enthusiast/README.md`,
|
|
50
|
+
`docs/agent-guide.md`, `docs/ai-gates.md`, and `docs/package-surface.md` — use:
|
|
49
51
|
|
|
50
52
|
1. **Verbs:** `Write. Check. Ship.`
|
|
51
53
|
2. **Deny:** `When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.`
|
|
52
54
|
3. **Not-that (below the fold, one line):** `Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config is just documentation.`
|
|
53
|
-
4. **
|
|
55
|
+
4. **Story:** the exact four-paragraph introduction below, with no visible heading or labels.
|
|
56
|
+
5. **Technical nouns (below the introduction):** ArkGate is import rules. ArkRules is optional policies. ArkRun is an optional experimental runtime. ArkOrder is the extra that stops the agent from rewriting the few slow product decisions (plan, protocol) as CRUD — named when the consumer opts in, never as the first noun.
|
|
54
57
|
|
|
55
58
|
Do not lead with folders, `ark.config.json`, “contract”, “gate”, “house”, or “doctor”
|
|
56
59
|
as the first noun. Historical: `If the AI writes an illegal import, the write is rejected`
|
|
@@ -61,6 +64,26 @@ ADR 0001 keeps the public name **ArkGate**.
|
|
|
61
64
|
|
|
62
65
|
---
|
|
63
66
|
|
|
67
|
+
## Unlabeled four-paragraph introduction
|
|
68
|
+
|
|
69
|
+
STAR is an internal writing method only. Public openings never print the formula's
|
|
70
|
+
name, a heading for this block, bullets, or Situation/Task/Action/Result labels.
|
|
71
|
+
Use these exact four paragraphs and put technical precision below them.
|
|
72
|
+
|
|
73
|
+
AI can build fast—and make a mess just as fast.
|
|
74
|
+
|
|
75
|
+
Keep the product easy to understand, change, and trust.
|
|
76
|
+
|
|
77
|
+
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.
|
|
78
|
+
|
|
79
|
+
Safer changes, fewer surprises, and extra protection only when you choose it.
|
|
80
|
+
|
|
81
|
+
Do not add technical terms to these four paragraphs. In the next section, explain that
|
|
82
|
+
ArkGate checks imports, ArkRules is optional, ArkRun is experimental and in-memory,
|
|
83
|
+
and ArkOrder is optional and for a few slow product decisions.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
64
87
|
## How it sounds
|
|
65
88
|
|
|
66
89
|
Short. Product nouns. Scene English (Vercel / Supabase / GitHub Checks).
|
package/docs/use.md
CHANGED
|
@@ -2,13 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
**Write. Check. Ship.**
|
|
4
4
|
|
|
5
|
-
For **anyone** shipping TypeScript with an AI coding agent.
|
|
6
|
-
|
|
7
5
|
**When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.**
|
|
8
6
|
|
|
9
7
|
Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
|
|
10
8
|
is just documentation.
|
|
11
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.
|
|
17
|
+
|
|
18
|
+
For **anyone** shipping TypeScript with an AI coding agent.
|
|
19
|
+
|
|
12
20
|
---
|
|
13
21
|
|
|
14
22
|
## In one minute
|
|
@@ -81,7 +89,7 @@ The config only binds when the write doesn’t land and CI is required.
|
|
|
81
89
|
| **ArkGate** (layers) | Import rules. The write doesn’t land. The PR fails. | Always — this is the product |
|
|
82
90
|
| **ArkRules** | Optional policies *inside* a layer. | Off until you turn it on (start may ship advisory templates) |
|
|
83
91
|
| **ArkRun** | Optional experimental runtime (`arkgate/runtime`) | Off. In-memory. Not Postgres. |
|
|
84
|
-
| **ArkOrder** | Stops the agent rewriting the few slow product decisions as CRUD (`arkgate/order`). Library + sensors, [not a service](arkorder.md). Valve: `proposeRelease` then `apply`; `refreshSigma`; ingest residual; capacity pack; `ReleaseStore`; ArkRun `decisionTape`. ArkOrder freezes the pattern through a valve. ArkRun is how the residual travels. | Off. Name `xiKeys` (plan / protocol, not `projectId`).
|
|
92
|
+
| **ArkOrder** | Stops the agent rewriting the few slow product decisions as CRUD (`arkgate/order`). Library + sensors, [not a service](arkorder.md). Valve: `proposeRelease` then `apply`; `refreshSigma`; ingest residual; capacity pack; `ReleaseStore`; ArkRun `decisionTape`. ArkOrder freezes the pattern through a valve. ArkRun is how the residual travels. | Off. Name `xiKeys` (plan / protocol, not `projectId`). Derive recomputable statuses; invoices and seats still flow. In-memory. Not durable. |
|
|
85
93
|
|
|
86
94
|
Start always gives you **layers**. Compact starters do **not** turn on ArkRun or
|
|
87
95
|
ArkOrder. No extras is fine — only ArkGate runs. Leftovers are labeled
|