arkgate 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -10
- package/README.md +10 -7
- package/bin/ark-check-runtime.mjs +16 -1
- package/bin/lib/agent-projection.mjs +1 -1
- package/bin/lib/ci-and-commands.mjs +11 -5
- package/bin/lib/doctor-plan.mjs +25 -0
- package/bin/lib/html-report-advisories.mjs +33 -0
- package/bin/lib/html-report-depth.mjs +24 -0
- package/bin/lib/improvement-compass-doctor.mjs +106 -0
- package/bin/lib/improvement-compass.mjs +630 -0
- package/bin/lib/status-manifest.mjs +38 -1
- package/dist/index.cjs +33 -33
- package/dist/index.d.ts +159 -2
- package/dist/index.js +33 -33
- package/docs/README.md +6 -5
- package/docs/agent-guide.md +20 -4
- package/docs/develop.md +6 -3
- package/docs/diagnostics.md +1 -1
- package/docs/package-surface.md +37 -34
- package/docs/product-voice.md +26 -0
- package/docs/use.md +37 -1
- package/package.json +1 -1
- package/schemas/ark.status-manifest.schema.json +26 -0
- package/server.json +2 -2
- package/templates/agent-skills/README.md +2 -2
- package/templates/agent-skills/ark-adopt/SKILL.md +20 -0
- package/templates/agent-skills/ark-architect/SKILL.md +21 -1
- package/templates/agent-skills/ark-autopilot/SKILL.md +25 -5
- package/templates/agent-skills/ark-contract/SKILL.md +20 -0
- package/templates/agent-skills/ark-coverage/SKILL.md +20 -0
- package/templates/agent-skills/ark-explain/SKILL.md +20 -0
- package/templates/agent-skills/ark-explore/SKILL.md +23 -3
- package/templates/agent-skills/ark-fix/SKILL.md +22 -2
- package/templates/agent-skills/ark-loop/SKILL.md +22 -2
- package/templates/agent-skills/ark-place/SKILL.md +20 -0
- package/templates/agent-skills/ark-runtime/SKILL.md +7 -0
- package/templates/agent-skills/ark-think/SKILL.md +20 -0
- package/templates/agent-skills/ark-upgrade/SKILL.md +20 -0
- package/templates/skills/ark-adopt.md +20 -0
- package/templates/skills/ark-architect.md +21 -1
- package/templates/skills/ark-autopilot.md +25 -5
- package/templates/skills/ark-contract.md +20 -0
- package/templates/skills/ark-coverage.md +20 -0
- package/templates/skills/ark-explain.md +20 -0
- package/templates/skills/ark-explore.md +23 -3
- package/templates/skills/ark-fix.md +22 -2
- package/templates/skills/ark-loop.md +22 -2
- package/templates/skills/ark-place.md +20 -0
- package/templates/skills/ark-runtime.md +7 -0
- package/templates/skills/ark-think.md +20 -0
- package/templates/skills/ark-upgrade.md +20 -0
package/docs/README.md
CHANGED
|
@@ -19,10 +19,10 @@ Product site: [arkgate.online](https://www.arkgate.online/) · npm: [`arkgate`](
|
|
|
19
19
|
### Use (product)
|
|
20
20
|
| Doc | What it is |
|
|
21
21
|
|-----|------------|
|
|
22
|
-
| [use.md](use.md) | One flow: install → doctor → day-to-day |
|
|
22
|
+
| [use.md](use.md) | One flow: install → doctor (+ improvement compass) → day-to-day |
|
|
23
23
|
| [enthusiast/](enthusiast/README.md) | Tutorials and plain-language track |
|
|
24
24
|
| [demos/](demos/) | Short end-to-end demos |
|
|
25
|
-
| [product-voice.md](product-voice.md) | How ArkGate should sound in English UI |
|
|
25
|
+
| [product-voice.md](product-voice.md) | How ArkGate should sound in English UI (compass = lenses, not scores) |
|
|
26
26
|
|
|
27
27
|
### Develop (integrate)
|
|
28
28
|
| Doc | What it is |
|
|
@@ -53,13 +53,14 @@ These are **not** the day-to-day product path. They stay in the repo for evidenc
|
|
|
53
53
|
| Area | Path |
|
|
54
54
|
|------|------|
|
|
55
55
|
| Release notes (by version) | [releases/](releases/) · [CHANGELOG.md](../CHANGELOG.md) |
|
|
56
|
-
| Epic plans (seeded + shipped) | [plans/](plans/)
|
|
56
|
+
| Epic plans (seeded + shipped) | [plans/](plans/) — maintainer seeds (e.g. improvement compass for **4.4.0**, agent contract surface for **4.3.0**). Product how-to stays in use/develop/agent-guide; plans are not required reading to use the package. |
|
|
57
57
|
| Claims audit | [audit/claims-matrix.md](audit/claims-matrix.md) |
|
|
58
58
|
| Field adoption kit (scaffolding, not closed) | [field/](field/) |
|
|
59
59
|
| Runtime hardening (experimental) | [production-hardening.md](production-hardening.md) |
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
Current published: [releases/4.3.0.md](releases/4.3.0.md) (`arkgate@4.3.0` on npm `latest`).
|
|
62
|
+
Next prepare: [releases/4.4.0.md](releases/4.4.0.md) (Status: prepared — not on npm until publish verify).
|
|
63
|
+
Prior: [releases/4.2.1.md](releases/4.2.1.md) (`arkgate@4.2.1`).
|
|
63
64
|
Previous: [releases/4.2.0.md](releases/4.2.0.md) (`arkgate@4.2.0`) · [releases/4.1.1.md](releases/4.1.1.md) (`arkgate@4.1.1`).
|
|
64
65
|
Previous major: [releases/4.0.0.md](releases/4.0.0.md) (`arkgate@4.0.0`).
|
|
65
66
|
Config: [configuration.md](configuration.md) · Agent skills dual-plane: [agent-guide.md](agent-guide.md).
|
package/docs/agent-guide.md
CHANGED
|
@@ -59,7 +59,22 @@ path is authoritative only when that matching project id is also supplied. Only
|
|
|
59
59
|
`binding.status: "matched"` with `authoritative: true` is authoritative; calls that omit the
|
|
60
60
|
expectation remain compatible but are explicitly `unverified`.
|
|
61
61
|
|
|
62
|
-
###
|
|
62
|
+
### Improvement compass (doctor)
|
|
63
|
+
|
|
64
|
+
`ark-check --doctor` (human + `--json`) projects residual architecture work as a closed set of
|
|
65
|
+
**lenses** (`doctor.improvementCompass`). Always `notAScore: true`. Never feeds `valid`,
|
|
66
|
+
strict-merge exit, or plan `goal.met`. Out-of-scope lenses (scalability, app security tooling,
|
|
67
|
+
full resilience) stay honest. Product path: [use.md — Improvement compass](use.md#improvement-compass-not-a-score).
|
|
68
|
+
Package surface row: [package-surface.md](package-surface.md).
|
|
69
|
+
|
|
70
|
+
**Status snapshot:** the status schema may carry a thin optional residual-id slice when Tooling
|
|
71
|
+
passes it through, but **`ark status --json` does not compute the compass yet** — use doctor for
|
|
72
|
+
residual lenses. Residual never changes status `nextAction` by itself.
|
|
73
|
+
|
|
74
|
+
Compact router and skills read residual lenses in plain language; green edges alone are never
|
|
75
|
+
“architecture finished” while residual remains.
|
|
76
|
+
|
|
77
|
+
### Unified status snapshot (4.3)
|
|
63
78
|
|
|
64
79
|
For one machine-readable session/project manifest (identity binding, honest write-path activation,
|
|
65
80
|
last-check summary, rules residual counts, primary next action) use:
|
|
@@ -75,7 +90,7 @@ Schema: `arkgate/schema/status-manifest`. Never prompts; under `CI=1` JSON is fo
|
|
|
75
90
|
score** — counts and verdicts only. Write-path interpretation of activation vs merge teeth is under
|
|
76
91
|
[Write-path honesty](#write-path-honesty).
|
|
77
92
|
|
|
78
|
-
**Stable finding refs (4.3
|
|
93
|
+
**Stable finding refs (4.3):** every factory-emitted diagnostic on CLI JSON, MCP analysis
|
|
79
94
|
envelopes, and opt-in hook repair payloads (`ARK_REPAIR_JSON`) carries:
|
|
80
95
|
|
|
81
96
|
| Field | Meaning |
|
|
@@ -88,7 +103,7 @@ Line/message drift across agent turns does not change `findingRef` / `targetKey`
|
|
|
88
103
|
`arkgate/schema/analysis-result` **`1.5`**. Multi-turn fixture:
|
|
89
104
|
`tests/fixtures/finding-refs/multi-turn-stability.json`.
|
|
90
105
|
|
|
91
|
-
**Version-matched agent projection (4.3
|
|
106
|
+
**Version-matched agent projection (4.3):** install/upgrade embeds a managed AGENTS.md
|
|
92
107
|
block stamped with the installed `arkgate` version plus a compact contract summary (layers +
|
|
93
108
|
diagnostic short list). Regenerate after package upgrade without clobbering customized regions
|
|
94
109
|
outside the markers:
|
|
@@ -104,10 +119,11 @@ The projection is **non-authoritative**. Enforcement is `ark-check` / host write
|
|
|
104
119
|
CI (`--strict-merge`) — never AGENTS.md, skills, or this projection. Root API:
|
|
105
120
|
`buildAgentProjectionBlock` / `mergeAgentProjectionDocument`.
|
|
106
121
|
|
|
107
|
-
**Agent Skills packaging (4.3
|
|
122
|
+
**Agent Skills packaging (4.3):** the same frozen **13** skill names are also shipped as
|
|
108
123
|
an Agent Skills–compatible package under `templates/agent-skills/<name>/SKILL.md` for hosts that
|
|
109
124
|
install via `npx skills` (in addition to Ark `--install-agent-gates`). See
|
|
110
125
|
[Install skills — Ark and ecosystem](#install-skills-ark-and-ecosystem). No new skill names.
|
|
126
|
+
Skill bodies coach residual lenses and anti false-done; they never enforce.
|
|
111
127
|
|
|
112
128
|
## Architecture playbook and `ark-check --recommend`
|
|
113
129
|
|
package/docs/develop.md
CHANGED
|
@@ -100,9 +100,12 @@ Sensors:
|
|
|
100
100
|
```bash
|
|
101
101
|
npx arkgate-check --plan
|
|
102
102
|
npx arkgate-check --coverage
|
|
103
|
-
npx arkgate-check --doctor --json
|
|
103
|
+
npx arkgate-check --doctor --json # improvementCompass (notAScore lenses) + status light
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
+
Doctor residual lenses never flip `valid` / strict-merge alone. Product path:
|
|
107
|
+
[use.md — Improvement compass](use.md#improvement-compass-not-a-score).
|
|
108
|
+
|
|
106
109
|
Agent reference (tools, skills, dual path): [agent-guide.md](agent-guide.md).
|
|
107
110
|
|
|
108
111
|
---
|
|
@@ -122,8 +125,8 @@ npx arkgate-check --doctor --json
|
|
|
122
125
|
npx arkgate-check --plan --json
|
|
123
126
|
npx arkgate-check --coverage
|
|
124
127
|
npx arkgate-check --baseline
|
|
125
|
-
npx arkgate status --json #
|
|
126
|
-
npx arkgate agents-md #
|
|
128
|
+
npx arkgate status --json # session/project snapshot (not a score)
|
|
129
|
+
npx arkgate agents-md # preview managed AGENTS block
|
|
127
130
|
npx arkgate agents-md --write # embed/refresh projection markers
|
|
128
131
|
npx arkgate preflight --changes changes.json --json
|
|
129
132
|
npx arkgate upgrade --json # managed content preview
|
package/docs/diagnostics.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ArkGate diagnostic code catalog
|
|
2
2
|
|
|
3
|
-
> **Source of truth:** Domain module `src/domain/diagnosticCatalog.ts` (
|
|
3
|
+
> **Source of truth:** Domain module `src/domain/diagnosticCatalog.ts` (public diagnostic catalog).
|
|
4
4
|
> Generated CLI mirror: `bin/lib/diagnostic-catalog.mjs`. Catalog schema `1.0`.
|
|
5
5
|
> Enforcement remains CLI / hooks / CI — this page is documentation only.
|
|
6
6
|
|
package/docs/package-surface.md
CHANGED
|
@@ -16,47 +16,48 @@ hardening guide remains repository-hosted rather than duplicated in the gate tar
|
|
|
16
16
|
|
|
17
17
|
| Surface | How you use it | Stability notes |
|
|
18
18
|
|---------|----------------|-----------------|
|
|
19
|
-
| **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.
|
|
19
|
+
| **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). |
|
|
20
20
|
| **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. |
|
|
21
|
-
| **
|
|
22
|
-
| **
|
|
23
|
-
| **
|
|
24
|
-
| **
|
|
25
|
-
| **
|
|
26
|
-
| **
|
|
27
|
-
| **
|
|
28
|
-
| **
|
|
29
|
-
| **
|
|
30
|
-
| **
|
|
31
|
-
| **
|
|
32
|
-
| **
|
|
33
|
-
| **
|
|
34
|
-
| **
|
|
35
|
-
| **
|
|
21
|
+
| **Improvement compass (4.4)** | `ark-check --doctor --json` → `doctor.improvementCompass`; human doctor section **Improvement compass (not a score)**; HTML report `data-advisory="improvementCompass"`. Status schema accepts an optional thin `improvementCompass` residual-id slice for Tooling pass-through — **`ark status` does not compute lenses yet**; agents should read doctor for residual. | 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 (`valid` / strict-merge / `goal.met` unchanged). Out-of-scope locked for scalability, resilience, and app security (no residual invent from missing SAST/APM). Root API: `buildImprovementCompass` / `IMPROVEMENT_LENS_IDS`. |
|
|
22
|
+
| **Doctor design fitness** | `ark-check --doctor --json` → `doctor.designFitness`, `doctor.designSmells[]` | Additive. Stable smell `id`s: `io-under-application`, `handler-in-persistence`, `god-module`, `domain-logic-in-ui`, `facade-sql-in-routes`, `mixed-pattern-cluster`, `soft-contract`. `handler-in-persistence` covers static ES imports/re-exports of framework HTTP surfaces (`next/server`), `defineRoute` calls, and existing handler bodies inside Persistence-role layers or specific persistence paths; `require()` and dynamic `import()` are outside this narrow advisory, and a generic `Infrastructure` role alone is not Persistence. Persistence candidates are filtered and sorted before the bounded content scan so large application prefixes cannot hide the advisory. The detector inspects the first 800 sorted Persistence candidates; later candidates are uninspected, so **absence of a smell is not full-tree proof** above that envelope (incomplete/`partial` analysis also never proves “no smells”). **4.2 feedback hardening:** mode labels preserve the observed SUGGEST/ADAPT/ENFORCE state; a local permission/UI-state `canEdit` name alone is not a domain smell; real UI business rules route Domain → Application → UI; seed/fixture/demo/migration/generated files are not god-module pilots. Each smell has `evidence[]`, `fix`, technical `message`, and plain-language **`outcome`**. Does **not** fail the gate by itself. |
|
|
23
|
+
| **Post-green Shape door** | `doctor.postGreenPath`, `doctor.primaryNextAction`, `doctor.healthyFinishedForbidden` | Additive when `designFitness.designWeak`. Single Shape door (`id: clarify-for-ai`): explore shape-focus → dual-plan B → autopilot only with OK. Never empty plan A = healthy finished. |
|
|
24
|
+
| **Golden pattern (new code)** | Optional `.ark/golden-pattern.json`; doctor JSON `doctor.goldenPattern`; MCP `ark_place` / `ark_prepare_write` → `goldenPattern` | Additive, **advisory for NEW code only**. Required fields: `name`, `norm`; optional `newCodeHome`, `examplePath`, `schemaVersion`. **Absent is normal** (no claim). Never ENFORCE; never clears design-weak. Malformed → `invalid: true`, not silent guidance. |
|
|
25
|
+
| **Plan pattern B (Shape bets)** | `ark-check --plan --json` → `plan.patternBets[]`, `plan.goal.designWeak` | Additive. Each bet: `id`, `smellId`, `pilot`, `evidence`, `successSignal`, `killSwitch`, **`neverMechanicalSafe: true`**, `class: "judgment"`. **Never** auto-applied by loop/autoPatch; not a `remediationKind` mechanical-safe. `goal.met` remains edge honesty only. |
|
|
26
|
+
| **Pilot loop (one at a time)** | `plan.pilotLoop` / `doctor.pilotLoop` | Additive. When design-weak: `active`, `oneAtATime`, `neverMechanicalSafe`, **`nextPilot`** extraction-card fields (`pilotTarget`, `smellId`, `move`, `successSignal`, `killSwitch`, `doNot[]`). **One pilot → re-doctor**; never multi-pilot batch; never mechanical-safe. |
|
|
27
|
+
| **AI-velocity eval (maintainer)** | Repository-only evidence: `npm run eval:ai-velocity` → `eval/ai-velocity-report.json` | Fixture-measured (no live LLM). Same feature scenario on design-weak vs golden-path arms; metric **`placementTurns`** (agent-equivalent). Golden must be strictly better. Method string lives next to the number. Does not weaken the gate. |
|
|
28
|
+
| **Contract health** | `ark-check --doctor --json` → `doctor.contractHealth`; optional `.ark/contract-smell-acks.json` | Additive, **advisory only** — meta-lint of the contract itself (layer-name heuristics; imprecision costs a warning line, never a verdict); never changes the verdict, `designFitness`, or `patternBets`. Stable smell ids: `contract-bidirectional-allow`, `contract-peripheral-depends-core`, `contract-lateral-adapter-allow`, `contract-dead-rule`; each smell has `severity`, `evidence[]` (sorted, honest `…(+N more)` truncation), `fix`, `message`, plain-language `outcome`, and `acknowledgedEdges` (acks applied to that id). **X03/X06**: the lateral smell does not fire on an adapter reaching its **own family's infra base** — the target reads `<Family><InfraWords…>` (**every** remaining target token an infra word: `Infra(structure)`/`Base`/`Core`/`Shared`/`Common`/`Kernel`/`Platform`/`Foundation`) and the source carries the family token **anywhere** in its name (X06, field: `HoursPersistenceAdapters -> PersistenceInfrastructure` — mid-name families). `PaymentsCoreAdapters` is still a sibling; cross-family edges, non-infra siblings, and the reverse (base → member) still fire. Acknowledgments live in the bounded sidecar (`{ acks: [{ id, edge, reason, reviewBy? }] }`, ≤64 KB / ≤200 entries; bidirectional edges order-insensitive, exact two segments); `contractHealth.acknowledged` counts **applied** acks only (stale acks count 0). **X02 ack lifecycle**: optional `reviewBy` (`YYYY-MM-DD`, strict round-trip validation — `2026-02-30` is malformed) — past the date the ack **stops applying** and the smell returns with `(ack expired …)` annotated evidence; among dated entries a fresh re-ack wins over a dead one, but once ANY dated ack exists for an edge the dated entries govern — a leftover undated duplicate cannot resurrect an expired exception. `detectContractSmells` defaults `today` to the real clock (pass `null` to disable expiry); `analyzeContractSmells` stays pure (clock injected). `contractHealth.ackLifecycle` reports `{ undated, malformed, expiredCount, expired[], staleCount, stale[] (lists capped at 12) }`; undated acks apply (backward compatible) but surface in doctor, report, and the fossilization note even when every smell is suppressed. **X05**: an ack matching **no detected edge** (orphaned by a fixed contract or quieted heuristic, unknown id, or typo'd edge) is `stale` — it suppresses nothing and doctor/report list the exact entries to fix or delete, even at zero visible smells. Malformed `reviewBy` never applies (fail-loud, like a sloppy edge); non-string `reviewBy` → whole file `invalid`. **Absent is normal**; malformed file or edge grammar → ignored + `ackFile.invalid` where applicable, never silent suppression. |
|
|
29
|
+
| **Effect capabilities** | Public root API: `analyzeProject(...).ir.capabilityUses`; the CLI/hook adapters add symbol-aware ambient evidence internally | Additive within IR `1.0`. Seven **closed** ids: `network`, `filesystem`, `clock`, `randomness`, `environment`, `process`, `persistence` (ADR 0009). `collectCapabilityUses` and the Domain vocabulary are internal implementation exports, **not** exports from `arkgate`; the related public low-level helper is `collectForbiddenCapabilityUses`. Direct evidence only — transitive inference never detects. The symbol-aware adapter path covers ambient globals (shadowing/type-only/globalThis-alias precision from the S05/C04 machinery) plus imports; the compiler-free IR engine carries **import-based** uses only (exact module or subpath match, never substring; textual `import type`/`export type` erasure and all-type named lists (`import { type A }`) are type-only there; mixed `{ type A, B }` stays a value import; template-literal bodies are skipped entirely (specifiers inside `${…}` are the symbol path's job); package `require(…)` counts as capability evidence only, while relative `require(…)` also emits a pure-path graph edge). **U04 walls are opt-in:** per-layer `capabilities: { deny: [...] }` or the dual-depth sugar `pure: true` (denies all seven); absence changes no verdict. `CAPABILITY_VIOLATION` is judgment-class (never mechanical-safe) with a port-injection `nextAction`; D7 dedup — evidence already owned by the layer's `forbiddenGlobals` reports only `FORBIDDEN_GLOBAL`. Y08 adds one deliberately narrow import dual: `forbiddenGlobals: ["process"]` owns exact value imports of `process` and `node:process`, but not subpaths or `child_process`; statement-level `import type` / `export type` remains erased on every path (pure-IR residual envelope: mixed `{ type A, B }`, default+named type lists, and comment-interrupted forms stay value imports; symbol path owns full precision). Atomic preflight blocks denied capabilities and that exact dual across a complete multi-file candidate (import-based on the pure path; other ambient evidence adds on the symbol-aware CLI/hook path). T01 policy-delta classifies the surface on **coverage atoms** (`ambient:<entry>` prefix-expanded, narrow `import-exact:<specifier>` duals, and `import:<capability>` for a complete wall): any lost atom is weakening (`fetch`→`XMLHttpRequest`, `Date`→`Date.now`, wall→fg all weaken; finding path `$.layers[name].capabilities`); fg → equivalent-or-stronger wall never needs an acknowledgment; unlowerable custom globals keep raw key comparison. |
|
|
30
|
+
| **Ambient state (pure layers)** | `ark-check --doctor --json` → `doctor.ambientState`; optional `.ark/ambient-state-acks.json` | Additive, **advisory only and opt-in**: only layers declared `pure: true` are scanned; the MVP shape is module-scope `let`/`var`. Findings carry `file`/`line`/`name`/`kind` (sorted, capped with honest `truncated` count). Acknowledgments live in the bounded sidecar (`{ acks: [{ file, name, reason }] }`, ≤64 KB / ≤200 entries); `acknowledged` counts applied acks; malformed file suppresses nothing. When TypeScript is unavailable the sensor reports `available: false` instead of guessing. **No strict mode exists** — A5: strictness requires a completed corpus and an explicit later decision. |
|
|
31
|
+
| **Parse health + analysis completeness** | `ark-check --doctor --json` → `doctor.parseHealth` + `doctor.completeness`; check JSON → `completeness`; report section `data-advisory="parseHealth"` | The resolved candidate facts contribute only `parseDiagnosticCount` per governed file (no raw diagnostics, second parser pass, or `tsc`). Z04's correctness path ignores legacy v9 caches and parses the complete candidate on every invocation; Z07 owns any future identity-keyed warm snapshot. Doctor remains diagnostic: parse health adds no architecture violation and does not change `designFitness` or `patternBets`. Verdict surfaces consume the evidence fail-closed: affected governed files mean `partial`, plan `goal.met: false`, normal JSON `valid:false`/`ok:false`, and strict merge exit `1`; the non-strict process exit remains advisory for compatibility. No usable host means `unavailable`, plan false, and CLI exit `2`. JSON reports `scannedFiles`, `affectedFiles`, `diagnosticCount`, deterministic top-12 `{ file, diagnosticCount }` entries, and honest `truncated`/`overflow`; missing/unsafe evidence never becomes a clean claim. |
|
|
32
|
+
| **Physical cohesion + reshape pilot** | `ark-check --doctor --json` → `doctor.physicalCohesion` (`reshapePilot`, `reshapeDecisions`); optional `.ark/reshape-decisions.json`; report section `data-advisory="physicalCohesion"` | Additive, **advisory only** — `notAScore`; never feeds the verdict, `designFitness`, or `patternBets`. Signal is **concentration, not volume**: concept clusters per anchor directory (deterministic path/name tokenization; framework filenames like `route.ts` take the topmost meaningful path segment — ADR 0010 D2). Fixed corpus-calibrated thresholds (`maxCluster ≥ 40` OR ≥2 anchors ≥ 20, ADR 0010 D3); findings ranked and capped (top 5, honest `truncated`). Anchors under `app/`/`pages/` are `fixedByConvention` and never move (D7). `reshapePilot` is **proposed, never applied** (`neverMechanicalSafe`): one Q04-style pilot card at a time targeting the smallest convention-free anchor, with `moveSample`/`movesTotal`, `successSignal`, `killSwitch`, `doNot[]`; real moves run only through the write gate + atomic preflight via `/ark-loop`; merges are `/ark-architect` judgment cards, never a codemod (D6). **Y01 verdict memory:** bounded sidecar `{ schemaVersion?: "1", decisions: [{ concept, anchors, verdict: "accepted"|"deferred"|"rejected", reason, reviewBy? }] }` (≤64 KiB / ≤200 unique targets). Identity is concept + complete sorted anchor set, never counts/change-map evidence. Current rejected/deferred records suppress pilot pressure only; accepted keeps the existing path. Expired/malformed/stale/invalid records suppress nothing; lifecycle and decisions render in doctor/report. Explicit only — golden-pattern prose never infers a verdict. |
|
|
33
|
+
| **Capability walls, every adapter** | CLI scan, pure IR engine, atomic preflight, `ark-mcp --hook` / MCP gate (`capabilityWalls`), ESLint `ark/no-denied-capabilities` | The same opt-in deny set enforces across every surface: hook/MCP and CLI cover ambient + import evidence (symbol-aware); the pure engine, preflight, and ESLint cover the import dimension (documented envelope). Dual depth everywhere: plain port hint (`FIX_HINTS`/`suggestion`) + stable JSON (`ruleId`, `capability`, `fixClass: inject-port`, deterministic `nextAction`). |
|
|
34
|
+
| **Hook-path budgets (maintainer)** | Repository-only evidence: `npm run bench:hook-path`; `eval/performance/hook-budgets.v1.json`; CI job "Hook-path end-to-end budgets" | Measures the COMPLETE pre-tool paths as fresh child processes (hook cold/warm, doctor cold) at 1k/10k. D5 method locked: ceilings are Linux-baseline p95 + fixed headroom, set once per cycle, never ratcheted; scenarios without a recorded baseline stay in RECORDING mode and cannot fail CI. |
|
|
35
|
+
| **Governance weight** | `ark-check --doctor --json` → `doctor.contractHealth.governanceWeight` | Additive, **advisory only** — raw facts (`declaredLayers`, `populatedLayers`, `governedFiles`, `rules`, `deniedEdges`, `allowedEdges`, `filesPerLayer`, `rulesPerLayer`) plus a fixed comparative band `weight: heavy | typical | light | unknown` and its fixed `note`. Fixed deterministic thresholds: **heavy** = fewer than 25 governed files per declared layer AND (6+ layers OR 4+ well-formed rules per layer); **light** = at most 2 layers over 150+ governed files; **unknown** = no layers or no governed files; everything else is **typical** (banding uses raw ratios; the reported ratios are rounded for display). `notAScore: true` is explicit: never a composite score, ranking, or gate input; the heavy note asks to justify NEW layers/rules and never suggests deleting working ones. Human doctor prints a line only for `heavy`/`light`. |
|
|
36
|
+
| **Report parity and snapshot evidence (4.2)** | `ark-check --report` → advisory sections (`data-advisory="contractHealth\|ambientState\|parseHealth"`, 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. |
|
|
36
37
|
| **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. |
|
|
37
|
-
| **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
|
|
38
|
+
| **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. |
|
|
38
39
|
| **`ark.config.json`** | Layer globs, rules, include/exclude, forbiddenGlobals, intent prefixes, `peerIsolation`, `dynamicImportAllowlist`, `safety` thresholds; optional **`arkRules`** map (schema `1.1+`) | Versioned by `schemaVersion`; unknown fields fail closed and migrations preserve the previous supported major. Absence of `arkRules` is byte-for-byte silent on inter-layer verdicts. |
|
|
39
40
|
| **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. |
|
|
40
41
|
| **`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`. |
|
|
41
42
|
| **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. |
|
|
42
|
-
| **Product honesty readiness split (4.1.1
|
|
43
|
-
| **Policy transition analysis (
|
|
44
|
-
| **Atomic change preflight (
|
|
45
|
-
| **Architecture change map (
|
|
46
|
-
| **Structural convergence (
|
|
47
|
-
| **Enforcement ladder + fixed journey (
|
|
48
|
-
| **Enforcement state
|
|
49
|
-
| **Design delta (
|
|
50
|
-
| **`arkgate/schema/analysis-result`** or **`arkgate/schema/ark.analysis-result.schema.json`** | Public CLI/MCP/hook diagnostic envelope (`schemaVersion`, `mode`, `valid`, `completeness`, `completenessReasons`, `diagnostics`, resolved identities) | Schema **`1.5`**
|
|
51
|
-
| **Stable finding refs (
|
|
52
|
-
| **Diagnostic code catalog
|
|
53
|
-
| **Status manifest
|
|
54
|
-
| **Agent contract projection
|
|
55
|
-
| **Agent Skills packaging
|
|
43
|
+
| **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. |
|
|
44
|
+
| **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. |
|
|
45
|
+
| **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. |
|
|
46
|
+
| **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. |
|
|
47
|
+
| **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. |
|
|
48
|
+
| **Enforcement ladder + fixed journey (3.1.0)** | `doctor.writePath.enforcementLadder`; hook repair `enforcement`; `npm run eval:change-integrity` | Additive schema `1.0` separates supported/installed/active/bypassable state and evidence. Hard is operation-scoped only for a supported covered hook; MCP is advisory; required CI status stays unverified locally. Fixed no-context fixture proves CLI/MCP/hook/final parity, one casual denial, acceptance behavior, and strict Ark. |
|
|
49
|
+
| **Enforcement state** | `doctor.writePath.enforcementState`; schema/type | Schema `1.1`: runtime observation, operation coverage, and operation-scoped `hard`. Only fresh covered active-host evidence permits `hard:true`; unverified assets and MCP remain non-hard. |
|
|
50
|
+
| **Design delta (opt-in ratchet)** | `--fail-on-new-smells --base-ref <ref>`; hook/MCP; schema/types | Schema `1.0`: identities, touched paths, stable evidence/verdict. Missing base fails closed; only new/worsened `domain-logic-in-ui` blocks; global doctor smells stay advisory. |
|
|
51
|
+
| **`arkgate/schema/analysis-result`** or **`arkgate/schema/ark.analysis-result.schema.json`** | Public CLI/MCP/hook diagnostic envelope (`schemaVersion`, `mode`, `valid`, `completeness`, `completenessReasons`, `diagnostics`, resolved identities) | Schema **`1.5`** adds optional stable finding refs on diagnostics: `findingRef` (`fnv1a-` + hex), `targetKey` (baseline-compatible freeze identity), `docsCodePath` (`docs/diagnostics.md#RULE_ID`). Factory-emitted diagnostics always include them; consumer-owned 1.0–1.4 values remain valid without them. `1.4` added optional `evidence.arkruleId` / `evidence.arkruleSource` for ArkRules; `1.3` distinguished `resolved-candidate-facts` from `lexical-compatibility`; partial/unavailable analysis is always non-green, and resolved complete/partial results require policy/resolver/facts/tree identities. `1.2` added completeness and remains accepted alongside consumer-owned 1.0/1.1 values. |
|
|
52
|
+
| **Stable finding refs (4.3)** | Root API `adapterFindingTargetKey` / `adapterFindingRefFromTargetKey` / `toAdapterDiagnostic` / `createAdapterResult`; CLI/MCP/repair envelopes via analysis-result diagnostics | Multi-turn re-address without fuzzy message match. `targetKey` **is** the baseline (occurrence) key so freeze identity is never orphaned; `findingRef` is a compact FNV-1a of that key. Line/message drift does not change the ref. Multi-turn fixture: `tests/fixtures/finding-refs/multi-turn-stability.json`. |
|
|
53
|
+
| **Diagnostic code catalog** | Root API `DIAGNOSTIC_CATALOG` / `getDiagnosticCatalogEntry` / `diagnosticDocsPath`; docs [diagnostics.md](diagnostics.md) (`#RULE_ID` anchors) | Closed vocabulary of public `ruleId`s with why/fix anchors. Cataloguing only — no new rule semantics. Remediation parity is test-guarded. Docs ship in the npm tarball. |
|
|
54
|
+
| **Status manifest** | CLI `ark status [--json]`; MCP `ark_status`; `arkgate/schema/status-manifest`; root API `buildStatusManifest` / `ARK_STATUS_MANIFEST_SCHEMA` | Schema `1.0`. One session/project snapshot: identity binding, honest write-path activation (`hard`\|`advisory`\|`unavailable`), last-check summary, rules residual counts, primary next action. Optional thin `improvementCompass` residual ids when Tooling supplies them. **Not a score.** Never prompts (`CI=1` forces JSON). Optional `--expected-root` / `--expected-project-id` (MCP `project`) for matched vs stale identity. |
|
|
55
|
+
| **Agent contract projection** | CLI `ark agents-md [--write] [--check] [--stdout] [--json]`; install/upgrade AGENTS templates; root API `buildAgentProjectionBlock` / `mergeAgentProjectionDocument` | Schema `1.0` (projection markers). Version-stamped managed block (`arkgateVersion` + contract summary + diagnostic short list). **Non-authoritative** — not a gate input; enforcement is ark-check / hooks / CI. Content-identity merge preserves customized regions outside markers. Drift: `--check` vs package version. |
|
|
56
|
+
| **Agent Skills packaging** | `templates/agent-skills/<name>/SKILL.md` (+ package README); root API `ARK_SKILL_NAMES` / `validateAgentSkillsPackage`; `npm run check:agent-skills` | Schema `1.0` (package contract). Same **13** skill names as flat templates; Agent Skills–compatible layout for `npx skills add`. No new skill names. Layout is generated 1:1 from `templates/skills/*.md`. |
|
|
56
57
|
| **`arkgate/schema/arkrules`** or **`arkgate/schema/ark.arkrules.schema.json`** | Per-layer structure sensors + invariant catalog (ADR 0012) | Schema `1.0`. Opt-in via root `arkRules` map (`ark.config` schema `1.1`). |
|
|
57
58
|
| **`arkgate/schema/resolved-candidate-facts`** or **`arkgate/schema/ark.resolved-candidate-facts.schema.json`** | Versioned parity-capable input for `analyzeResolvedProject` / `preflightResolvedChange` | Schema `1.0` is serializable and deterministic. Tooling owns filesystem/compiler resolution; Domain/Kernel validate and evaluate supplied facts without importing those effects. Facts name resolver/compiler inputs, governed files, dependency evidence, completeness reasons, and candidate tree/facts hashes. |
|
|
58
59
|
| **Config JSON Schema** | `arkgate/schema` or `arkgate/schema/ark.config.schema.json` | Stable package resource subpaths for editor completion and contract tooling. |
|
|
59
|
-
| **Agent skills** | `/ark-*` templates; install via `--install-agent-gates` (often `--skills-only` on top of compact) **or** Agent Skills ecosystem path | **Day zero** is the compact router from `ark start` / `start --apply` + doctor control plane — not the full skill pack. Skill *names* (frozen **13**) and the guided expert path (`/ark-autopilot` after pack install) are stable; internal skill prose may evolve. **4.0:** all skills except experimental `/ark-runtime` integrate **layers + ArkRules** and must label residual `[Layer]` vs `[ArkRules]`. **4.2:** repo catalogs are content-idempotent; the optional shared Codex home catalog is monotonic across 4.2.0+ installers. Pre-4.2 writers are outside that protocol and must be upgraded first. A durable pending-catalog journal preserves the floor across an interrupted install and is cleared only by its owning same/newer recovery. **4.3
|
|
60
|
+
| **Agent skills** | `/ark-*` templates; install via `--install-agent-gates` (often `--skills-only` on top of compact) **or** Agent Skills ecosystem path | **Day zero** is the compact router from `ark start` / `start --apply` + doctor control plane — not the full skill pack. Skill *names* (frozen **13**) and the guided expert path (`/ark-autopilot` after pack install) are stable; internal skill prose may evolve. **4.0:** all skills except experimental `/ark-runtime` integrate **layers + ArkRules** and must label residual `[Layer]` vs `[ArkRules]`. **4.2:** repo catalogs are content-idempotent; the optional shared Codex home catalog is monotonic across 4.2.0+ installers. Pre-4.2 writers are outside that protocol and must be upgraded first. A durable pending-catalog journal preserves the floor across an interrupted install and is cleared only by its owning same/newer recovery. **4.3:** Agent Skills–compatible layout at `templates/agent-skills/<name>/SKILL.md` (1:1 with flat `templates/skills/*.md`); install via `npx skills add ./node_modules/arkgate/templates/agent-skills` (or the GitHub tree). Domain `ARK_SKILL_NAMES` + `validateAgentSkillsPackage`; drift `npm run check:agent-skills`. Skills never enforce. |
|
|
60
61
|
| **ESLint subpath** | `arkgate/eslint` | Config-driven layer/import rules; loads consumer `ark.config.json`. |
|
|
61
62
|
| **GitHub Action** | `pedroknigge/arkgate` (see `action.yml`) | The `uses:` tag/SHA selects the checker source; `version` remains an optional exact npm compatibility override. |
|
|
62
63
|
| **Package metadata** | `arkgate/package.json` | Stable resource subpath for tooling that needs the installed manifest. |
|
|
@@ -203,8 +204,10 @@ production deployment would need to satisfy; it is not a readiness certification
|
|
|
203
204
|
## Release notes (maintainers)
|
|
204
205
|
|
|
205
206
|
Ship notes for a version live under [releases/](https://github.com/pedroknigge/arkgate/tree/main/docs/releases)
|
|
206
|
-
(
|
|
207
|
-
|
|
207
|
+
(current published: [4.3.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.3.0.md);
|
|
208
|
+
next prepare: [4.4.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.4.0.md);
|
|
209
|
+
|
|
210
|
+
prior published: [4.2.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.2.1.md);
|
|
208
211
|
previous: [4.2.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.2.0.md),
|
|
209
212
|
[4.1.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.1.1.md),
|
|
210
213
|
[4.1.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.1.0.md),
|
package/docs/product-voice.md
CHANGED
|
@@ -24,6 +24,11 @@ because the design space is small and honest.
|
|
|
24
24
|
- **Agent contract surface (4.3.0):** agents read **guardrail catalogs** and **scan** evidence;
|
|
25
25
|
they **process** (judge / coach) outside the package. Projection and skills never become the
|
|
26
26
|
pass/fail gate.
|
|
27
|
+
- **Improvement compass (4.4.0):** residual architecture work is named as **lenses** (SoC, DIP,
|
|
28
|
+
domain alignment, …) projected from existing sensors — **never** a 0–10 score or Excellent/Good
|
|
29
|
+
rank. Out-of-scope lenses (perf, app security tooling, full resilience) stay honest.
|
|
30
|
+
- **Vibe-coder dual depth:** human doctor and skills lead with plain outcomes and one next move;
|
|
31
|
+
experts keep full JSON. Full-AI workflows get the same single door — not a skill menu exam.
|
|
27
32
|
- **False done is forbidden:** Enforce ≠ elegant design. `design-weak` / residual must not
|
|
28
33
|
read as “healthy finished.” Empty ArkRules inventory is not a score. MCP configuration on
|
|
29
34
|
disk is not proof that the current process belongs to this project.
|
|
@@ -93,6 +98,27 @@ Examples:
|
|
|
93
98
|
| **agent projection** | Version-matched AGENTS/CLAUDE (or equivalent) block generated from package + contract; **non-authoritative** — enforcement is ark-check / hooks / CI |
|
|
94
99
|
| **finding ref** | Stable id for a finding across turns (ruleId + target key), so agents re-address without fuzzy message match |
|
|
95
100
|
| **status snapshot** | One machine-readable project/session manifest (`ark status --json` shape): identity, activation honesty, last check, residual counts — not a numeric score |
|
|
101
|
+
| **improvement compass** | Closed projection of residual architecture work across fixed **lenses** (aligned to 15 common principles). Always `notAScore`. Never a gate input. |
|
|
102
|
+
| **lens** | One named principle dimension (`soc`, `dip`, `domain`, …) with status `ok` / `residual` / `not-instrumented` / `out-of-scope` and evidence refs from existing sensors |
|
|
103
|
+
| **topResidual** | Deterministic short list of residual lens ids — what to improve next, not a ranking score |
|
|
104
|
+
| **out-of-scope lens** | Principle Ark does not instrument (e.g. scalability APM, SAST) — say so; do not invent residual |
|
|
105
|
+
| **AI-easy architecture** | Small, pure, placeable modules and a golden pattern so the next agent turn stays ordered under the contract |
|
|
106
|
+
|
|
107
|
+
## Public docs are product-only (from 4.4.0)
|
|
108
|
+
|
|
109
|
+
Consumer-facing prose (README, use/develop/agent-guide, skills, compact router, doctor/CLI human
|
|
110
|
+
lines, CHANGELOG user bullets, release notes bodies) explains **what ArkGate does and how to use
|
|
111
|
+
it**. It does **not** explain features by roadmap item codes, phase numbers, or internal queue
|
|
112
|
+
jargon (`IC02`, `ACS08`, `Z09`, `RB-11`, “Phase X shipped…”).
|
|
113
|
+
|
|
114
|
+
| Put here | Not here (for consumers) |
|
|
115
|
+
|----------|---------------------------|
|
|
116
|
+
| Commands, lenses, gates, skills, honest limits | Roadmap ids as the story |
|
|
117
|
+
| Stable API names (`ruleId`, JSON fields) | Ticket dumps in CHANGELOG |
|
|
118
|
+
| `ROADMAP.md` / `docs/plans/` / archive (maintainers) | Required reading of epic codes to use the product |
|
|
119
|
+
|
|
120
|
+
Historical maintainer files may keep engineering ids. **Do not regress** public lanes with new
|
|
121
|
+
id-heavy narrative after 4.4.0.
|
|
96
122
|
|
|
97
123
|
## Scan vs process (dual depth)
|
|
98
124
|
|
package/docs/use.md
CHANGED
|
@@ -93,7 +93,7 @@ list: [configuration.md](configuration.md).
|
|
|
93
93
|
|
|
94
94
|
That is **Shape** work (plan B) — suggested, never auto-applied as silent magic.
|
|
95
95
|
|
|
96
|
-
1. Doctor confirms design-weak
|
|
96
|
+
1. Doctor confirms design-weak (and residual lenses on the improvement compass)
|
|
97
97
|
2. Guided map / dual plan (skill pack: `/ark-explore` then `/ark-autopilot` with your OK)
|
|
98
98
|
3. One pilot at a time · re-run doctor
|
|
99
99
|
|
|
@@ -105,6 +105,41 @@ npx arkgate-check --install-agent-gates --skills-only --force
|
|
|
105
105
|
|
|
106
106
|
---
|
|
107
107
|
|
|
108
|
+
## Improvement compass (not a score)
|
|
109
|
+
|
|
110
|
+
Doctor shows an **improvement compass**: a closed set of architecture **lenses** (separation of
|
|
111
|
+
concerns, dependency inversion, domain alignment, …) projected from existing sensors.
|
|
112
|
+
|
|
113
|
+
```text
|
|
114
|
+
Improvement compass (not a score)
|
|
115
|
+
Residual: Separation of concerns · Dependency inversion · Domain alignment
|
|
116
|
+
Out of scope (honest): Scalability · App security tooling · Full resilience patterns
|
|
117
|
+
Next: /ark-explore — one pilot at a time after map
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
| Fact | Meaning |
|
|
121
|
+
|------|---------|
|
|
122
|
+
| Always `notAScore` | No 0–10, no Excellent/Good ranks, no averages |
|
|
123
|
+
| Residual lenses | What still matters for cleaner, AI-easy code |
|
|
124
|
+
| Out of scope | Performance/APM, SAST, full resilience — use other tools |
|
|
125
|
+
| Never a gate input | Residual alone does **not** fail CI or flip `valid` |
|
|
126
|
+
|
|
127
|
+
JSON: `ark-check --doctor --json` → `doctor.improvementCompass` (full lenses + `topResidual`).
|
|
128
|
+
Human doctor prints the short section above.
|
|
129
|
+
|
|
130
|
+
### Align → Stabilize → Shape
|
|
131
|
+
|
|
132
|
+
| Phase | Goal | Done when (plain English) |
|
|
133
|
+
|-------|------|---------------------------|
|
|
134
|
+
| **Align** | Contract matches the tree | Include/layers honest; no false-green freeze |
|
|
135
|
+
| **Stabilize** | Edges under Enforce | Real debt only in baseline; write path + CI honest |
|
|
136
|
+
| **Shape** | One golden pattern + pilots | Residual lenses shrink pilot by pilot — never silent multi-pilot |
|
|
137
|
+
|
|
138
|
+
Green edges under **Enforce · design-weak** mean Align/Stabilize may be fine while Shape remains open.
|
|
139
|
+
Empty plan A is **not** “architecture finished.”
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
108
143
|
## Tutorials and demos
|
|
109
144
|
|
|
110
145
|
- Plain-language track: [enthusiast/](enthusiast/README.md)
|
|
@@ -118,6 +153,7 @@ npx arkgate-check --install-agent-gates --skills-only --force
|
|
|
118
153
|
| Need | Doc |
|
|
119
154
|
|------|-----|
|
|
120
155
|
| Hosts, CI, MCP, brownfield, power CLI | [develop.md](develop.md) |
|
|
156
|
+
| Agent/CLI/MCP reference (status, skills, compass JSON) | [agent-guide.md](agent-guide.md) |
|
|
121
157
|
| Wire a specific agent host | [ai-gates.md](ai-gates.md) |
|
|
122
158
|
| Improve the library | [CONTRIBUTING.md](../CONTRIBUTING.md) |
|
|
123
159
|
|
package/package.json
CHANGED
|
@@ -239,6 +239,32 @@
|
|
|
239
239
|
"minLength": 1
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
+
},
|
|
243
|
+
"improvementCompass": {
|
|
244
|
+
"type": "object",
|
|
245
|
+
"description": "Optional thin improvement-compass residual ids (notAScore). Never a gate input; full lenses on doctor JSON.",
|
|
246
|
+
"additionalProperties": false,
|
|
247
|
+
"required": [
|
|
248
|
+
"schemaVersion",
|
|
249
|
+
"notAScore",
|
|
250
|
+
"topResidual"
|
|
251
|
+
],
|
|
252
|
+
"properties": {
|
|
253
|
+
"schemaVersion": {
|
|
254
|
+
"const": "1.0"
|
|
255
|
+
},
|
|
256
|
+
"notAScore": {
|
|
257
|
+
"const": true
|
|
258
|
+
},
|
|
259
|
+
"topResidual": {
|
|
260
|
+
"type": "array",
|
|
261
|
+
"items": {
|
|
262
|
+
"type": "string",
|
|
263
|
+
"minLength": 1
|
|
264
|
+
},
|
|
265
|
+
"maxItems": 15
|
|
266
|
+
}
|
|
267
|
+
}
|
|
242
268
|
}
|
|
243
269
|
}
|
|
244
270
|
}
|
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/pedroknigge/arkgate",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "4.
|
|
9
|
+
"version": "4.4.0",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "arkgate",
|
|
14
|
-
"version": "4.
|
|
14
|
+
"version": "4.4.0",
|
|
15
15
|
"runtimeHint": "npx",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# ArkGate Agent Skills package
|
|
2
2
|
|
|
3
|
-
> **Generated layout (
|
|
3
|
+
> **Generated layout (Agent Skills packaging).** Do not edit SKILL.md files here by hand.
|
|
4
4
|
> Author skill bodies in `templates/skills/<name>.md`, then run
|
|
5
5
|
> `npm run generate:agent-skills`. Drift: `npm run check:agent-skills`.
|
|
6
6
|
|
|
7
7
|
This directory is the **Agent Skills–compatible** packaging of the same **13**
|
|
8
8
|
`/ark-*` skills shipped as flat templates for Ark install. **No new skill names.**
|
|
9
9
|
|
|
10
|
-
Package version when last generated context: **arkgate@4.
|
|
10
|
+
Package version when last generated context: **arkgate@4.3.0**
|
|
11
11
|
Schema: agent-skills package contract `1.0`
|
|
12
12
|
|
|
13
13
|
## Skills (frozen catalog)
|
|
@@ -12,6 +12,25 @@ with a burn-down. A green check over a wrong contract is a **false green**.
|
|
|
12
12
|
spaghetti “ENFORCE · design-weak”. Always end with dual-plan **B** seeds (or handoff explore)
|
|
13
13
|
when design smells remain after the contract is honest.
|
|
14
14
|
|
|
15
|
+
## Improvement compass (process preflight)
|
|
16
|
+
|
|
17
|
+
When doctor is available, read `doctor.improvementCompass` (or the human **Improvement compass** section).
|
|
18
|
+
Name 1–3 **residual** lenses in plain language before skill-shopping. Always `notAScore` — never invent
|
|
19
|
+
0–10 scores or Excellent/Good ranks.
|
|
20
|
+
|
|
21
|
+
**What the user should feel next:** fewer blocked AI writes, clearer folders, safer domain — then jargon.
|
|
22
|
+
|
|
23
|
+
**Anti false-done:** empty plan A + residual lenses / design-weak → **Incomplete? yes**. Green edges alone
|
|
24
|
+
are not “architecture finished.”
|
|
25
|
+
|
|
26
|
+
**AI-easy architecture:** ports over concrete I/O in domain; one concern per module; golden pattern for
|
|
27
|
+
new files; place before write (`/ark-place` / prepare-write).
|
|
28
|
+
|
|
29
|
+
**Out of scope (honest):** scalability/performance, full app-security tooling (SAST), and full resilience
|
|
30
|
+
patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement for them.
|
|
31
|
+
|
|
32
|
+
**Spaghetti → honest contract.** SoC/DIP false-green STOP paths in plain language; residual lenses stay Incomplete until mapped.
|
|
33
|
+
|
|
15
34
|
## When / not when
|
|
16
35
|
|
|
17
36
|
| Use `/ark-adopt` when… | Do **not** use it when… |
|
|
@@ -164,6 +183,7 @@ End with **exactly** these headings (markdown `###`):
|
|
|
164
183
|
- **Opened:** real paths read (or `n/a` only if pure install/upgrade with no source analysis)
|
|
165
184
|
- **Result:** one-line outcome
|
|
166
185
|
- **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
|
|
186
|
+
- **Compass:** top residual lenses | `n/a`
|
|
167
187
|
- **Handoff:** `/ark-…` / CLI / `none`
|
|
168
188
|
- **Incomplete?** `no` | `yes — <what is missing>`
|
|
169
189
|
|