arkgate 4.6.5 → 4.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGELOG.md +72 -2106
  2. package/README.md +11 -9
  3. package/bin/ark-check-runtime.mjs +36 -332
  4. package/bin/ark-mcp-runtime.mjs +7 -323
  5. package/bin/ark-shared.mjs +24 -158
  6. package/bin/ark.mjs +13 -3
  7. package/bin/lib/adoption-stance.mjs +104 -0
  8. package/bin/lib/check-args.mjs +173 -0
  9. package/bin/lib/check-config-detect.mjs +101 -0
  10. package/bin/lib/check-watch.mjs +80 -0
  11. package/bin/lib/ci-merge-boundary.mjs +4 -2
  12. package/bin/lib/deep-module-coach.mjs +3 -0
  13. package/bin/lib/design-delta.mjs +2 -2
  14. package/bin/lib/design-smells.mjs +1 -1
  15. package/bin/lib/diagnostic-catalog.mjs +1 -1
  16. package/bin/lib/doctor-advisories.mjs +2 -2
  17. package/bin/lib/doctor-human.mjs +509 -0
  18. package/bin/lib/doctor-next-actions.mjs +20 -2
  19. package/bin/lib/doctor-plan.mjs +86 -456
  20. package/bin/lib/enforcement-honesty.mjs +70 -0
  21. package/bin/lib/first-run-help.mjs +8 -7
  22. package/bin/lib/github-enforcement.mjs +22 -9
  23. package/bin/lib/html-report-advisories.mjs +10 -2
  24. package/bin/lib/html-report.mjs +26 -9
  25. package/bin/lib/mcp-adoption.mjs +19 -0
  26. package/bin/lib/mcp-hook-payload.mjs +328 -0
  27. package/bin/lib/package-manager.mjs +174 -0
  28. package/bin/lib/policy-delta-io.mjs +5 -1
  29. package/bin/lib/post-green-path.mjs +5 -1
  30. package/bin/lib/product-copy.mjs +6 -3
  31. package/bin/lib/start-preview.mjs +12 -22
  32. package/bin/lib/status-command.mjs +16 -0
  33. package/bin/lib/status-manifest.mjs +8 -2
  34. package/bin/lib/team-parliament-io.mjs +66 -2
  35. package/bin/lib/team-parliament.mjs +25 -5
  36. package/bin/lib/unavailable-analysis.mjs +1 -0
  37. package/dist/index.cjs +2 -2
  38. package/dist/index.d.ts +10 -2
  39. package/dist/index.js +2 -2
  40. package/docs/README.md +6 -10
  41. package/docs/ai-gates.md +12 -5
  42. package/docs/configuration.md +9 -1
  43. package/docs/diagnostics.md +2 -2
  44. package/docs/package-surface.md +6 -4
  45. package/docs/product-voice.md +6 -4
  46. package/docs/threat-model.md +2 -2
  47. package/docs/use.md +5 -4
  48. package/package.json +1 -1
  49. package/schemas/ark.design-delta.schema.json +1 -1
  50. package/server.json +2 -2
  51. package/templates/agent-skills/README.md +1 -1
package/docs/README.md CHANGED
@@ -40,7 +40,7 @@ Product site: [arkgate.online](https://www.arkgate.online/) · npm: [`arkgate`](
40
40
  | Doc | What it is |
41
41
  |-----|------------|
42
42
  | [CONTRIBUTING.md](../CONTRIBUTING.md) | Setup, rules, PR/release |
43
- | [ROADMAP.md](../ROADMAP.md) | Implementation queue (one `doing` at a time) |
43
+ | [ROADMAP.md](../ROADMAP.md) | Live implementation queue (one `doing` at a time). History: [archive/roadmap-history.md](archive/roadmap-history.md) |
44
44
  | [adr/](adr/README.md) | Architecture decisions |
45
45
  | [SECURITY.md](../SECURITY.md) · [threat-model.md](threat-model.md) | Security |
46
46
 
@@ -52,19 +52,15 @@ These are **not** the day-to-day product path. They stay in the repo for evidenc
52
52
 
53
53
  | Area | Path |
54
54
  |------|------|
55
- | Release notes (by version) | [releases/](releases/) · [CHANGELOG.md](../CHANGELOG.md) |
56
- | Epic plans (seeded + shipped) | [plans/](plans/) — maintainer seeds (e.g. [team-parliament](plans/team-parliament/README.md) **shipped in 4.6.1**; [five-door-autonomy](plans/five-door-autonomy/README.md) **shipped in 4.6.1**; [understandable-ark-4.6](plans/understandable-ark-4.6/README.md) **4.6.0**; [field-upgrade-mcp-truth](plans/field-upgrade-mcp-truth/README.md) **shipped in 4.5.6**; deep-module coach **shipped in 4.5.5**; domain fitness & session truth for **4.5.0**; 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. |
55
+ | 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) |
56
+ | 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 on `main`; `AL05` parked). |
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
- Current: [releases/4.6.5.md](releases/4.6.5.md) (`arkgate@4.6.5`).
62
- Prior published: [releases/4.6.4.md](releases/4.6.4.md) (`arkgate@4.6.4` on npm `latest` until 4.6.5 lands).
63
- Prior published: [releases/4.6.3.md](releases/4.6.3.md) (`arkgate@4.6.3`).
64
- Prior: [releases/4.6.2.md](releases/4.6.2.md) (`arkgate@4.6.2`).
65
- Previous: [releases/4.6.1.md](releases/4.6.1.md) · [releases/4.6.0.md](releases/4.6.0.md) · [releases/4.5.7.md](releases/4.5.7.md) · [releases/4.5.6.md](releases/4.5.6.md) · [releases/4.5.5.md](releases/4.5.5.md) · [releases/4.5.0.md](releases/4.5.0.md) · [releases/4.4.0.md](releases/4.4.0.md) · [releases/4.3.0.md](releases/4.3.0.md) · [releases/4.2.1.md](releases/4.2.1.md) · [releases/4.2.0.md](releases/4.2.0.md) · [releases/4.1.1.md](releases/4.1.1.md).
66
- Previous major: [releases/4.0.0.md](releases/4.0.0.md) (`arkgate@4.0.0`).
67
- Config: [configuration.md](configuration.md) · Agent skills dual-plane: [agent-guide.md](agent-guide.md).
61
+ Current published: [releases/4.6.7.md](releases/4.6.7.md) (`arkgate@4.6.7` on npm `latest`).
62
+ Prior: [releases/4.6.6.md](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).
63
+ Older notes: [releases/](releases/). Config: [configuration.md](configuration.md).
68
64
 
69
65
  ---
70
66
 
package/docs/ai-gates.md CHANGED
@@ -81,7 +81,10 @@ bypassable/advisory because some Code Mode paths do not dispatch the project hoo
81
81
  **Design fitness (3.0.1+):** the same doctor JSON may include `doctor.designFitness` and
82
82
  `doctor.designSmells[]` (path evidence). Edge-clean `operatingMode: enforce` can still set
83
83
  `designFitness.designWeak: true` (**ENFORCE · design-weak**). That global inventory remains Shape
84
- residual, not a write-path failure. Separately, Z10's opt-in design delta blocks only new/worsened
84
+ residual, not a write-path failure. Required `arkgate-check --strict-merge` also evaluates
85
+ created-path `domain-logic-in-ui` when a merge base exists (Action inherits via `--strict` and
86
+ `ARK_POLICY_BASE_REF`; missing base skips, does not exit 2). Leftover design on existing files
87
+ stays Shape residual. Z10's opt-in `--fail-on-new-smells --base-ref` still blocks new/worsened
85
88
  supported smells on touched paths. Companion plan JSON: `plan.patternBets[]` with `neverMechanicalSafe: true`
86
89
  — never treat as write-boundary `autoPatch` / mechanical-safe. See
87
90
  [package-surface.md](package-surface.md) and [brownfield-adoption.md](brownfield-adoption.md) §6.
@@ -739,10 +742,14 @@ Whatever the agent side does, run the merge profile in CI:
739
742
  fi
740
743
  ```
741
744
 
742
- This explicit brownfield ratchet records schema `1.0` identities, touched paths, and stable
743
- evidence; missing base with `--fail-on-new-smells` exits `2`, so the generated workflow skips the
744
- delta when the SHA is all-zero or unresolvable while keeping the full merge gate. Its first
745
- semantic smell is `domain-logic-in-ui`; residual, path-only moves, and unrelated work stay green.
745
+ The required status command is `arkgate-check --strict-merge` (alias `--strict`): import edges
746
+ plus created-path `domain-logic-in-ui` when a Git base exists. The composite Action already runs
747
+ `--strict` and exports `ARK_POLICY_BASE_REF`; it needs no extra flags. Generated CI still adds
748
+ `--fail-on-new-smells --base-ref` when the SHA is resolvable (stricter than created-path).
749
+ Missing base with `--fail-on-new-smells` exits `2`, so the generated workflow skips the full
750
+ ratchet on first-push all-zero / unresolvable SHA while keeping `--strict-merge` (created-path
751
+ also skips when the base is missing). Residual, path-only moves, unrelated work, and worsened
752
+ rules in existing files stay green on the merge command.
746
753
  Generated Claude/Grok hooks share the delta and golden-pattern repair hint. MCP exposes the result
747
754
  but stays advisory.
748
755
 
@@ -248,6 +248,14 @@ Optional `stewards` lists **GitHub handles or emails** who may **loosen** the co
248
248
  matches `--author`, then `GITHUB_ACTOR` / `ARK_STEWARD`, then `GIT_AUTHOR_EMAIL`. A
249
249
  noreply GitHub mail and the handle are the same person. Git `user.name` is not identity.
250
250
 
251
+ `--contract-session` is required to loosen the contract (T4) or grow the baseline
252
+ (`--update-baseline`, T5) **even when `stewards` is empty**. `--policy-ack` remains the
253
+ hash tooth on a weakening; session is the change-type tooth. An empty list cannot print
254
+ Healthy ENFORCE: doctor treats it as unfinished residual (`empty-stewards`) after a
255
+ 30-day grace from the git first-add of `ark.config.json`, or immediately when that age
256
+ is unknown. `operatingMode` stays `enforce` (contract-fit). `/ark-adopt` asks; it does
257
+ not invent names.
258
+
251
259
  Doctor detects several recent authors or a CODEOWNERS file (`doctor.stewardNudge`).
252
260
  When `stewards` is empty it **asks** who owns the law and proposes handles or emails.
253
261
  When the list exists but CODEOWNERS is ahead, or you started with one steward and git
@@ -266,7 +274,7 @@ type than product source:
266
274
  | `ark-check --changed --base origin/dev` | Layer check on touched sources only. A CSS/i18n PR pays almost nothing. |
267
275
  | `ark-check --against origin/dev` | New violation keys vs **that ref's** baseline (not only HEAD). |
268
276
  | `ark-check --contract-diff --base origin/dev` | Classifies tighten / loosen / reclassify / baseline-grow. |
269
- | `--contract-session --author <id>` | Law-only PR. Mixed law+product still fails. Loosen/grow need a listed steward. |
277
+ | `--contract-session --author <id>` | Law-only PR. Mixed law+product still fails. Loosen/grow need a session even with an empty `stewards[]`; a non-empty list also needs a matching listed author. |
270
278
  | `--persona touch\|contributor\|agent\|steward` | Budget presets for the same teeth. |
271
279
  | `ark status --vs origin/dev` | One line: pin / contract / baseline drift vs that ref. |
272
280
 
@@ -369,8 +369,8 @@ Link form for agents: `docs/diagnostics.md#RULE_ID` (exact-case HTML anchors bel
369
369
 
370
370
  **Design smell regression on base-relative ratchet**
371
371
 
372
- - **Why:** Compared to the base ref, the candidate introduces or worsens a blocking design-smell class (e.g. domain-logic-in-ui) under --fail-on-new-smells.
373
- - **Fix:** Revert the regression or redesign so the smell does not worsen versus base, then re-run with the same base ref.
372
+ - **Why:** Compared to the base ref, the candidate introduces a created-path `domain-logic-in-ui` file under `--strict-merge`, or introduces or worsens a blocking design-smell class under `--fail-on-new-smells`.
373
+ - **Fix:** Move the new UI business rule out of the created file (or revert a `--fail-on-new-smells` regression), then re-run with the same base ref.
374
374
 
375
375
  ## Analysis host and completeness
376
376
 
@@ -54,7 +54,7 @@ hardening guide remains repository-hosted rather than duplicated in the gate tar
54
54
  | **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. |
55
55
  | **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. |
56
56
  | **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. |
57
- | **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. |
57
+ | **Design delta** | `--strict-merge` / `--strict` (created paths when a Git base exists); `--fail-on-new-smells --base-ref <ref>` (full ratchet); hook/MCP; schema/types | Schema `1.0`: identities, touched paths, optional `enforcementScope`. Default merge blocks **created** `domain-logic-in-ui` files vs merge-base; missing base skips (does not exit 2). Full new+worsened on touched paths remains opt-in `--fail-on-new-smells` (missing base fails closed). Historical residual and worsened-in-existing-file stay green on `--strict-merge`. Global doctor smells stay advisory. |
58
58
  | **`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. |
59
59
  | **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`. |
60
60
  | **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. |
@@ -143,7 +143,8 @@ The type-only root exports are also semver-supported:
143
143
  - Policy delta: `PolicyDelta`, `PolicyDeltaAcknowledgement`, `PolicyDeltaClassification`,
144
144
  `PolicyDeltaFinding`.
145
145
  - Design delta: `ArkDesignDeltaResult`, `ArkDesignDeltaIdentity`, `ArkDesignDeltaChange`,
146
- `ArkDesignDeltaEvidence`, `ArkDesignSmellId`, `ArkDesignDeltaVerdict`.
146
+ `ArkDesignDeltaEvidence`, `ArkDesignSmellId`, `ArkDesignDeltaVerdict`,
147
+ `DesignDeltaEnforcementScope`.
147
148
  - Analysis IR: `AnalysisFileInput`, `AnalysisFileChange`, `AnalysisCompilerOptions`,
148
149
  `AnalysisFile`, `AnalysisImportEdge`, `AnalysisCapabilityUse`, `AnalysisEvidence`,
149
150
  `AnalysisViolation`, `AnalysisIr`.
@@ -211,8 +212,9 @@ production deployment would need to satisfy; it is not a readiness certification
211
212
  ## Release notes (maintainers)
212
213
 
213
214
  Ship notes for a version live under [releases/](https://github.com/pedroknigge/arkgate/tree/main/docs/releases)
214
- (current: [4.6.5.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.5.md);
215
- prior published: [4.6.4.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.4.md);
215
+ (current published: [4.6.7.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.7.md);
216
+ prior published: [4.6.6.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.6.md);
217
+ prior published: [4.6.5.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.5.md);
216
218
  prior published: [4.6.3.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.3.md);
217
219
  prior published: [4.6.2.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.2.md), [4.6.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.1.md), [4.6.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.0.md), [4.5.7.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.7.md), [4.5.6.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.6.md), [4.5.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.0.md), [4.4.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.4.0.md), [4.3.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.3.0.md),
218
220
  [4.2.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.2.1.md);
@@ -94,8 +94,8 @@ stay stable unless a change explicitly adds an alias.
94
94
  | **five doors** | skill menu of 13 | adopt · place · autopilot · explore · upgrade — other names are shortcuts |
95
95
  | **law / constitution** | contract + baseline + ArkRules files | `ark.config.json`, `arkrules/*`, `.ark-baseline.json` — a different change type than product |
96
96
  | **steward** | contract owner | GitHub handle or email in `stewards`; only they may loosen the law or grow the baseline |
97
- | **several hands** | multi-author / CODEOWNERS | Doctor asks for stewards or shows list drift; adopt proposes handles or emails, never invents names |
98
- | **contract session** | `--contract-session` | Explicit “this diff is a law change”; still never mixed with product files |
97
+ | **several hands** | multi-author / CODEOWNERS | Doctor asks for stewards or shows list drift; empty `stewards[]` is unfinished ENFORCE (not Adapt); adopt proposes handles or emails, never invents names |
98
+ | **contract session** | `--contract-session` | Explicit “this diff is a law change”; required to loosen or grow the baseline even with an empty steward list; still never mixed with product files |
99
99
  | **vs the base branch** | `--against` / `--changed --base` / `status --vs` | Ratchet and honesty against the ref you merge to |
100
100
  | **doctor** | doctor | Status light + next action |
101
101
  | **short agent router** | compact router | Default onboarding agent instructions (not the full skill pack) |
@@ -308,8 +308,10 @@ This change mixes the constitution with product files. Next: split the PR, or ru
308
308
 
309
309
  ### Healthy finished
310
310
 
311
- Print “Healthy — nothing to do” **only** when there is no leftover design work and no open top actions.
312
- Otherwise name the leftover work.
311
+ Print “Healthy — nothing to do” **only** when the merge boundary is adopted as a **required**
312
+ GitHub status running `arkgate-check --strict-merge`, there is no leftover design work, and no
313
+ open top actions. An explicit `.ark/adoption-stance.json` `stance: "advisory-only"` ack is
314
+ adopted for honesty, but it is not this Healthy string. Workflow files on disk are not adopted.
313
315
 
314
316
  ---
315
317
 
@@ -30,8 +30,8 @@ infrastructure beyond how this package is published.
30
30
  | T1 | Agent bypasses hook (direct `fs` / alternate tool) | Ungoverned code lands | CI gate; optional pre-commit (Q3); doctor ladder never upgrades installed files to active/hard proof |
31
31
  | T2 | Human commits without agent path | Same as T1 | `templates/hooks/pre-commit-ark`; branch protection + required check (Q3 external) |
32
32
  | T3 | CI job missing / not required | Merge green without architecture | doctor `enforcement-ci-*` gaps; `--strict-merge`; required-status remains locally `unverified` |
33
- | T4 | Config weakened (`peerIsolation: false`, empty rules) | False green | semantic policy-delta guard in strict merge; hash-bound explicit acknowledgement; present-state safety diagnostics |
34
- | T5 | Baseline ratcheted open | Debt reintroduced | baseline unused/stale signals; occurrence keys |
33
+ | T4 | Config weakened (`peerIsolation: false`, empty rules) | False green | semantic policy-delta guard in strict merge; hash-bound `--policy-ack`; `--contract-session` required even when `stewards[]` is empty; present-state safety diagnostics |
34
+ | T5 | Baseline ratcheted open | Debt reintroduced | `--update-baseline` requires `--contract-session` even with an empty steward list (`--force` is concentration, not parliament); unused/stale signals; occurrence keys |
35
35
  | T6 | Stale MCP/global CLI or wrong root | Gate points at old package / wrong tree | project identity binding; stale process non-authoritative + `PROCESS_PACKAGE_STALE`; project-local upgrade handoff |
36
36
  | T7 | Malicious dependency in publish | Compromised gate | signed tags, npm provenance, dependency-review, CodeQL, Semgrep, `verify-package-files` |
37
37
  | T8 | Path traversal in hooks/check | Read/write outside project | root resolution + under-root import resolve |
package/docs/use.md CHANGED
@@ -13,9 +13,10 @@ npm install -D arkgate typescript
13
13
  npx arkgate start # preview what will change
14
14
  npx arkgate start --apply # install compact contract + host router + CI plan
15
15
  npx arkgate-check --doctor # where am I? one status light, one next action
16
+ npx arkgate-check --doctor --all # encyclopedia (Details)
16
17
  ```
17
18
 
18
- Then keep working with your agent. The doctor is the **control plane**: when stuck, run doctor and do action **#1**.
19
+ Then keep working with your agent. The doctor is the **control plane**: when stuck, run doctor and do action **#1**. Compact first; `--all` for Details.
19
20
 
20
21
  | Stuck on… | Do this |
21
22
  |-----------|---------|
@@ -46,7 +47,7 @@ In those cases a boundary linter or editor rules may be enough; see [README —
46
47
  | When | What happens |
47
48
  |------|----------------|
48
49
  | While the AI writes | Host write gate or advisory MCP (depends on host) |
49
- | Before merge | Make the Ark job a **required GitHub status context** running `arkgate-check --strict-merge` (alias `ark-check`) |
50
+ | Before merge | Make the Ark job a **required GitHub status context** running `arkgate-check --strict-merge` (alias `ark-check`). Until that status is required — or you write `.ark/adoption-stance.json` with `stance: "advisory-only"` — doctor will not call the tree adopted. |
50
51
  | Anytime | Doctor: Suggest / Adapt / Enforce (+ leftover design work if the design is still messy) |
51
52
 
52
53
  **Cursor:** pre-write block for Write/StrReplace when `.cursor/hooks.json` is trusted.
@@ -87,8 +88,8 @@ list: [configuration.md](configuration.md).
87
88
  |-------|--------|-----------|
88
89
  | **Suggest** | New or thin project | Finish `start`, re-run doctor |
89
90
  | **Adapt** | Not fully protected yet | Doctor action #1 until clean |
90
- | **Enforce** | Edges honest under the contract | Keep write path + CI |
91
- | **Enforce · leftover design work** | Edges clean; design still messy | Shape door — not “done” |
91
+ | **Enforce** | Import edges honest, and no new UI business-rule files vs merge-base | Keep write path + CI |
92
+ | **Enforce · leftover design work** | Edges clean; leftover design on existing files is still messy | Shape door — not “done” |
92
93
 
93
94
  **Green edges ≠ elegant design.** Empty remediation plan is not “architecture finished” if design residual remains.
94
95
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkgate",
3
- "version": "4.6.5",
3
+ "version": "4.6.7",
4
4
  "description": "One architecture config. One check. One coach.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -1 +1 @@
1
- {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://unpkg.com/arkgate@3/schemas/ark.design-delta.schema.json","title":"ArkGate design delta","type":"object","additionalProperties":false,"required":["schemaVersion","mode","complete","valid","base","candidate","supportedSmellIds","touchedPaths","changes","baseFindingCount","candidateFindingCount","historicalResidualCount"],"properties":{"schemaVersion":{"const":"1.0"},"mode":{"enum":["git-base","write-candidate"]},"complete":{"type":"boolean"},"valid":{"type":"boolean"},"base":{"$ref":"#/$defs/identity"},"candidate":{"$ref":"#/$defs/identity"},"supportedSmellIds":{"type":"array","items":{"const":"domain-logic-in-ui"},"minItems":1,"uniqueItems":true},"touchedPaths":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"changes":{"type":"array","items":{"$ref":"#/$defs/change"}},"baseFindingCount":{"type":"integer","minimum":0},"candidateFindingCount":{"type":"integer","minimum":0},"historicalResidualCount":{"type":"integer","minimum":0},"error":{"type":"string","minLength":1}},"$defs":{"identity":{"type":"object","additionalProperties":false,"required":["kind","value"],"properties":{"kind":{"enum":["git-tree","candidate-tree"]},"value":{"type":"string","minLength":1},"commit":{"type":"string","minLength":1}}},"evidence":{"type":"object","additionalProperties":false,"required":["kind","path","magnitude"],"properties":{"kind":{"type":"string","minLength":1},"path":{"type":"string","minLength":1},"line":{"type":"integer","minimum":1},"symbol":{"type":"string","minLength":1},"detail":{"type":"string","minLength":1},"magnitude":{"type":"number","minimum":0}}},"finding":{"type":"object","required":["smellId","fingerprint","identity","evidence","repairHint"],"properties":{"smellId":{"enum":["io-under-application","handler-in-persistence","god-module","domain-logic-in-ui","facade-sql-in-routes","mixed-pattern-cluster","soft-contract"]},"fingerprint":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"identity":{"type":"string","minLength":1},"evidence":{"$ref":"#/$defs/evidence"},"repairHint":{"type":"string","minLength":1}}},"change":{"type":"object","unevaluatedProperties":false,"allOf":[{"$ref":"#/$defs/finding"},{"type":"object","required":["classification","baseMagnitude","candidateMagnitude"],"properties":{"classification":{"enum":["new","worsened"]},"baseMagnitude":{"type":"number","minimum":0},"candidateMagnitude":{"type":"number","minimum":0}}}]}}}
1
+ {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://unpkg.com/arkgate@3/schemas/ark.design-delta.schema.json","title":"ArkGate design delta","type":"object","additionalProperties":false,"required":["schemaVersion","mode","complete","valid","base","candidate","supportedSmellIds","touchedPaths","changes","baseFindingCount","candidateFindingCount","historicalResidualCount"],"properties":{"schemaVersion":{"const":"1.0"},"mode":{"enum":["git-base","write-candidate"]},"complete":{"type":"boolean"},"valid":{"type":"boolean"},"base":{"$ref":"#/$defs/identity"},"candidate":{"$ref":"#/$defs/identity"},"supportedSmellIds":{"type":"array","items":{"const":"domain-logic-in-ui"},"minItems":1,"uniqueItems":true},"touchedPaths":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"changes":{"type":"array","items":{"$ref":"#/$defs/change"}},"baseFindingCount":{"type":"integer","minimum":0},"candidateFindingCount":{"type":"integer","minimum":0},"historicalResidualCount":{"type":"integer","minimum":0},"enforcementScope":{"enum":["created-paths","touched-new-or-worsened"]},"error":{"type":"string","minLength":1}},"$defs":{"identity":{"type":"object","additionalProperties":false,"required":["kind","value"],"properties":{"kind":{"enum":["git-tree","candidate-tree"]},"value":{"type":"string","minLength":1},"commit":{"type":"string","minLength":1}}},"evidence":{"type":"object","additionalProperties":false,"required":["kind","path","magnitude"],"properties":{"kind":{"type":"string","minLength":1},"path":{"type":"string","minLength":1},"line":{"type":"integer","minimum":1},"symbol":{"type":"string","minLength":1},"detail":{"type":"string","minLength":1},"magnitude":{"type":"number","minimum":0}}},"finding":{"type":"object","required":["smellId","fingerprint","identity","evidence","repairHint"],"properties":{"smellId":{"enum":["io-under-application","handler-in-persistence","god-module","domain-logic-in-ui","facade-sql-in-routes","mixed-pattern-cluster","soft-contract"]},"fingerprint":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"identity":{"type":"string","minLength":1},"evidence":{"$ref":"#/$defs/evidence"},"repairHint":{"type":"string","minLength":1}}},"change":{"type":"object","unevaluatedProperties":false,"allOf":[{"$ref":"#/$defs/finding"},{"type":"object","required":["classification","baseMagnitude","candidateMagnitude"],"properties":{"classification":{"enum":["new","worsened"]},"baseMagnitude":{"type":"number","minimum":0},"candidateMagnitude":{"type":"number","minimum":0}}}]}}}
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.6.5",
9
+ "version": "4.6.7",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "arkgate",
14
- "version": "4.6.5",
14
+ "version": "4.6.7",
15
15
  "runtimeHint": "npx",
16
16
  "transport": {
17
17
  "type": "stdio"
@@ -7,7 +7,7 @@
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.6.5**
10
+ Package version when last generated context: **arkgate@4.6.7**
11
11
  Schema: agent-skills package contract `1.0`
12
12
 
13
13
  ## Skills (frozen catalog)