arkgate 4.5.7 → 4.6.1
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 +48 -1
- package/README.md +18 -12
- package/bin/ark-check-runtime.mjs +107 -8
- package/bin/ark-mcp-runtime.mjs +17 -1
- package/bin/ark.mjs +5 -3
- package/bin/lib/agent-homes.mjs +296 -0
- package/bin/lib/agent-projection.mjs +2 -2
- package/bin/lib/analysis-engine.mjs +3 -3
- package/bin/lib/ci-and-commands.mjs +16 -16
- package/bin/lib/config-contract.mjs +2 -0
- package/bin/lib/contract-smells.mjs +5 -5
- package/bin/lib/design-smells.mjs +4 -8
- package/bin/lib/doctor-advisories.mjs +9 -0
- package/bin/lib/doctor-plan.mjs +39 -15
- package/bin/lib/field-install.mjs +1 -1
- package/bin/lib/golden-pattern.mjs +1 -1
- package/bin/lib/host-support-matrix.mjs +4 -4
- package/bin/lib/html-report-advisories.mjs +20 -0
- package/bin/lib/html-report-depth.mjs +7 -8
- package/bin/lib/html-report.mjs +2 -1
- package/bin/lib/improvement-compass-map.mjs +20 -20
- package/bin/lib/install-migrate.mjs +12 -0
- package/bin/lib/pilot-loop.mjs +1 -1
- package/bin/lib/post-green-path.mjs +5 -4
- package/bin/lib/prepare-change.mjs +9 -0
- package/bin/lib/product-copy.mjs +32 -0
- package/bin/lib/skill-write.mjs +1 -1
- package/bin/lib/status-command.mjs +14 -0
- package/bin/lib/status-manifest.mjs +17 -0
- package/bin/lib/team-parliament-io.mjs +338 -0
- package/bin/lib/team-parliament.mjs +383 -0
- package/bin/lib/upgrade-whats-new.mjs +32 -0
- package/bin/lib/violations.mjs +8 -4
- package/dist/{configTypes-CC0FEXoF.d.ts → configTypes-B8uIcLaG.d.ts} +5 -0
- package/dist/eslint/index.cjs +2 -2
- package/dist/eslint/index.d.ts +1 -1
- package/dist/eslint/index.js +2 -2
- package/dist/index.cjs +8 -8
- package/dist/index.d.ts +61 -2
- package/dist/index.js +8 -8
- package/docs/README.md +5 -4
- package/docs/agent-guide.md +31 -24
- package/docs/ai-gates.md +19 -0
- package/docs/configuration.md +36 -2
- package/docs/develop.md +16 -4
- package/docs/enthusiast/README.md +1 -1
- package/docs/enthusiast/how-to-agent-gates.md +3 -3
- package/docs/enthusiast/how-to-pick-shape.md +2 -2
- package/docs/enthusiast/tutorial-first-project.md +4 -3
- package/docs/package-surface.md +5 -3
- package/docs/product-voice.md +126 -82
- package/docs/use.md +13 -6
- package/package.json +1 -1
- package/schemas/ark.config.schema.json +9 -0
- package/schemas/ark.status-manifest.schema.json +51 -0
- package/server.json +2 -2
- package/templates/agent-skills/README.md +1 -1
- package/templates/agent-skills/ark-adopt/SKILL.md +46 -19
- package/templates/agent-skills/ark-architect/SKILL.md +24 -145
- package/templates/agent-skills/ark-autopilot/SKILL.md +40 -30
- package/templates/agent-skills/ark-contract/SKILL.md +21 -105
- package/templates/agent-skills/ark-coverage/SKILL.md +3 -0
- package/templates/agent-skills/ark-explain/SKILL.md +7 -4
- package/templates/agent-skills/ark-explore/SKILL.md +29 -21
- package/templates/agent-skills/ark-fix/SKILL.md +34 -157
- package/templates/agent-skills/ark-loop/SKILL.md +31 -153
- package/templates/agent-skills/ark-place/SKILL.md +25 -13
- package/templates/agent-skills/ark-runtime/SKILL.md +3 -3
- package/templates/agent-skills/ark-think/SKILL.md +5 -2
- package/templates/agent-skills/ark-upgrade/SKILL.md +13 -8
- package/templates/skills/ark-adopt.md +46 -19
- package/templates/skills/ark-architect.md +24 -145
- package/templates/skills/ark-autopilot.md +40 -30
- package/templates/skills/ark-contract.md +21 -105
- package/templates/skills/ark-coverage.md +3 -0
- package/templates/skills/ark-explain.md +7 -4
- package/templates/skills/ark-explore.md +29 -21
- package/templates/skills/ark-fix.md +34 -157
- package/templates/skills/ark-loop.md +31 -153
- package/templates/skills/ark-place.md +25 -13
- package/templates/skills/ark-runtime.md +3 -3
- package/templates/skills/ark-think.md +5 -2
- package/templates/skills/ark-upgrade.md +13 -8
package/docs/README.md
CHANGED
|
@@ -53,14 +53,15 @@ 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/) — maintainer seeds (e.g. [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. |
|
|
56
|
+
| Epic plans (seeded + shipped) | [plans/](plans/) — maintainer seeds (e.g. [team-parliament](plans/team-parliament/README.md) **4.6.1 prepared**; [five-door-autonomy](plans/five-door-autonomy/README.md) **4.6.1 prepared**; [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. |
|
|
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
|
-
|
|
63
|
-
|
|
61
|
+
Prepared: [releases/4.6.1.md](releases/4.6.1.md) (`arkgate@4.6.1` — not yet npm `latest`).
|
|
62
|
+
Current published: [releases/4.6.0.md](releases/4.6.0.md) (`arkgate@4.6.0` on npm `latest`).
|
|
63
|
+
Prior: [releases/4.5.7.md](releases/4.5.7.md) (`arkgate@4.5.7`).
|
|
64
|
+
Previous: [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).
|
|
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).
|
|
66
67
|
|
package/docs/agent-guide.md
CHANGED
|
@@ -233,7 +233,7 @@ When the top two shapes are close or projected governed coverage is below 90%, J
|
|
|
233
233
|
`requiresConfirmation: true` and explains why in `confirmationReasons`.
|
|
234
234
|
|
|
235
235
|
Human output highlights phase-1 layers and the analogy; JSON is the stable contract for
|
|
236
|
-
MCP `ark_recommend` and the `/ark-architect`
|
|
236
|
+
MCP `ark_recommend` and the `/ark-adopt` skill (leftover name `/ark-architect` is a shortcut).
|
|
237
237
|
|
|
238
238
|
### Terminal onboarding (Phase B)
|
|
239
239
|
|
|
@@ -270,13 +270,17 @@ To remove a compact host integration, preview `ark start --remove-host <host>` a
|
|
|
270
270
|
only after review. Ark removes only its exact compact artifacts, leaves customized files untouched
|
|
271
271
|
as unresolved decisions, and restores the integration with `ark start --tools <host> --apply`.
|
|
272
272
|
|
|
273
|
-
**
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
273
|
+
**Five doors (emphasize):** `/ark-adopt` = session 0 (greenfield scaffold + brownfield honesty —
|
|
274
|
+
write the path). `/ark-place` = new feature (place **and write**). `/ark-autopilot` = apply
|
|
275
|
+
plan A + one Shape refactor (invoke = approval). `/ark-explore` = map + dual-plan seed (no
|
|
276
|
+
apply). `/ark-upgrade` = preview then apply in-turn. Other `/ark-*` names stay installed as
|
|
277
|
+
**shortcuts**. Empty plan A is not “architecture healthy” if leftover design remains.
|
|
278
|
+
|
|
279
|
+
**Team parliament:** adopt is a **contract session** (law-only). Feature work must not edit
|
|
280
|
+
`ark.config.json` / `arkrules/*` / `.ark-baseline.json`. Prefer
|
|
281
|
+
`ark-check --changed --base <merge-ref>` in local gates. `--contract-diff` + `--author`
|
|
282
|
+
when `stewards` is set (`--author` is a GitHub handle or email, not git `user.name`).
|
|
283
|
+
`ark status --vs <ref>` prints pin / contract / baseline drift.
|
|
280
284
|
|
|
281
285
|
**Design fitness (3.0.1+ / Phase Q 3.0.3):** after checked edges are clean, doctor can still
|
|
282
286
|
report **SUGGEST / ADAPT / ENFORCE · design-weak** using the mode it actually observed; a weak
|
|
@@ -290,7 +294,7 @@ npx ark-check --doctor --fail-on-new-smells --base-ref origin/main --json # opt-
|
|
|
290
294
|
|
|
291
295
|
**Post-green path (Q01):** when design-weak, doctor sets `postGreenPath` / `primaryNextAction`
|
|
292
296
|
(`clarify-for-ai`) — **one** Shape door: `/ark-explore` shape-focus → dual-plan B, then
|
|
293
|
-
`/ark-autopilot`
|
|
297
|
+
`/ark-autopilot` applies one pilot. Do not skill-shop coverage/think for the same residual.
|
|
294
298
|
|
|
295
299
|
**Pilot loop (Q04):** when design-weak, `pilotLoop.nextPilot` is **one** extraction card
|
|
296
300
|
(pilot target, move, success, kill-switch). Apply **that one pilot only**, then re-doctor.
|
|
@@ -363,7 +367,7 @@ clusters per anchor directory (concentration, not volume — dispersed hooks nev
|
|
|
363
367
|
fixed corpus-calibrated thresholds; anchors under `app/`/`pages/` are `fixedByConvention` and
|
|
364
368
|
never move. `reshapePilot.nextPilot` is a **proposed** one-at-a-time card (`moveSample`,
|
|
365
369
|
`movesTotal`, `successSignal`, `killSwitch`, `doNot[]`): run it only via `/ark-loop` through the
|
|
366
|
-
write gate + atomic preflight; merges are `/ark-
|
|
370
|
+
write gate + atomic preflight; merges are `/ark-adopt` / `/ark-autopilot` judgment cards. `notAScore`, never a
|
|
367
371
|
verdict/`designFitness` input; there is no apply path.
|
|
368
372
|
|
|
369
373
|
**Reshape decision memory (Y01):** when the team accepts, defers, or rejects that target, record
|
|
@@ -479,21 +483,21 @@ in `ark.config.json`.
|
|
|
479
483
|
closed solely by `import type` (common with generated route trees) is **not** reported as
|
|
480
484
|
`CIRCULAR_DEPENDENCY`. Value cycles still fail.
|
|
481
485
|
|
|
482
|
-
### MCP `ark_recommend` and `/ark-
|
|
486
|
+
### MCP `ark_recommend` and `/ark-adopt` (Phase C)
|
|
483
487
|
|
|
484
488
|
The `ark-mcp` server exposes **`ark_recommend`** — same JSON as
|
|
485
|
-
`ark-check --recommend --json`. Call it (or invoke `/ark-
|
|
489
|
+
`ark-check --recommend --json`. Call it (or invoke `/ark-adopt`) before
|
|
486
490
|
generating project structure on greenfield or early-adoption repos.
|
|
487
491
|
|
|
488
492
|
`ark-mcp --session-context` appends a one-line enthusiast hint when governed
|
|
489
493
|
coverage is low or the config is fresh:
|
|
490
494
|
|
|
491
495
|
```
|
|
492
|
-
New to Ark? Run /ark-architect or: ark-check --recommend
|
|
496
|
+
New to Ark? Run /ark-adopt (or /ark-architect) or: ark-check --recommend
|
|
493
497
|
```
|
|
494
498
|
|
|
495
|
-
The `/ark-
|
|
496
|
-
via `ark-check --install-agent-gates`.
|
|
499
|
+
The `/ark-adopt` skill ships in `templates/skills/ark-adopt.md` (leftover
|
|
500
|
+
`/ark-architect` is a shortcut) and installs via `ark-check --install-agent-gates`.
|
|
497
501
|
|
|
498
502
|
### Adoption plan artifact (Phase E)
|
|
499
503
|
|
|
@@ -588,9 +592,9 @@ checks; this improves early feedback without upgrading Codex's bypassable hook t
|
|
|
588
592
|
boundary. Removing `AGENTS.md`, skills, or session context never changes the contract verdict.
|
|
589
593
|
|
|
590
594
|
Do not invent layers outside the 11-layer profile or named presets. Unrecognized
|
|
591
|
-
directories (`utils/`, `lib/`) must be classified explicitly via `/ark-
|
|
595
|
+
directories (`utils/`, `lib/`) must be classified explicitly via `/ark-adopt`.
|
|
592
596
|
|
|
593
|
-
**Brownfield** (existing messy repo): use `/ark-adopt` and [brownfield-adoption.md](brownfield-adoption.md)
|
|
597
|
+
**Brownfield** (existing messy repo): use `/ark-adopt` and [brownfield-adoption.md](brownfield-adoption.md). `/ark-architect` is a leftover shortcut to the same door.
|
|
594
598
|
|
|
595
599
|
## Supported agent hosts
|
|
596
600
|
|
|
@@ -607,10 +611,10 @@ npx arkgate-check --install-agent-gates --tools claude,cursor,codex,grok,antigra
|
|
|
607
611
|
|
|
608
612
|
| Host | Installed paths | Skills path |
|
|
609
613
|
|------|-----------------|-------------|
|
|
610
|
-
| Claude Code | `.claude/settings.json` hook + `.mcp.json` / `claude mcp add` | `.claude/skills/<name>/SKILL.md` |
|
|
611
|
-
| Cursor | `.cursor/mcp.json` + `.cursor/rules/ark.mdc` | `.cursor/commands/` |
|
|
614
|
+
| Claude Code | `.claude/settings.json` hook + `.mcp.json` / `claude mcp add` | **Repo:** `.claude/skills/<name>/SKILL.md`; **home:** `$CLAUDE_HOME/skills` (default `~/.claude/skills`, `--claude-home`) |
|
|
615
|
+
| Cursor | `.cursor/mcp.json` + `.cursor/rules/ark.mdc` | `.cursor/commands/` (Cursor also loads Claude **home** skills from `~/.claude/skills`) |
|
|
612
616
|
| OpenAI Codex | `.codex/config.toml` (project primary, relative `--root .`; configured on disk is not runtime-active until restart + `ark_identity` match); optional legacy `$CODEX_HOME/config.toml` fallback uses absolute roots and scoped secondaries — see [ai-gates.md](ai-gates.md) | **Repo:** `.agents/skills/<name>/SKILL.md`; **home:** `$CODEX_HOME/skills/<name>/SKILL.md` (`--codex-home`) |
|
|
613
|
-
| **Grok Build** | `.grok/hooks/ark-write-gate.json` + `.grok/config.toml` / `.mcp.json` | `.grok/skills/<name>/SKILL.md` |
|
|
617
|
+
| **Grok Build** | `.grok/hooks/ark-write-gate.json` + `.grok/config.toml` / `.mcp.json` | **Repo:** `.grok/skills/<name>/SKILL.md`; **home:** `$GROK_HOME/skills` (default `~/.grok/skills`, `--grok-home`) |
|
|
614
618
|
| Google Antigravity | `.agents/hooks.json` (+ `GEMINI.md` for shared Gemini consumers) | `.agents/skills/<name>/SKILL.md` |
|
|
615
619
|
| OpenCode | `opencode.json` MCP (`type: local`; advisory) | `.opencode/skills/<name>/SKILL.md` |
|
|
616
620
|
|
|
@@ -618,10 +622,13 @@ This is a path reference, not a guarantee table. Full copy-paste setups:
|
|
|
618
622
|
[ai-gates.md](ai-gates.md). Skill inventory: main
|
|
619
623
|
[README](../README.md#other-skills-only-when-you-need-them).
|
|
620
624
|
When several repositories share one machine, repo catalogs stay pinned and isolated; unchanged
|
|
621
|
-
skill bodies are not rewritten for a version stamp.
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
+
skill bodies are not rewritten for a version stamp. Shared **home** catalogs (Codex since 4.2;
|
|
626
|
+
Claude/Grok since 4.6) are the machine floor: always latest additive, never downgrade. Refresh
|
|
627
|
+
with `--agent-homes` (or `--claude-home` / `--grok-home` / `--codex-home`). Absent home trees
|
|
628
|
+
are normal — doctor stays quiet until `ark-*` skills exist there. Pre-4.2 binaries ignore Codex
|
|
629
|
+
home metadata and lock, so upgrade legacy repos before they write the optional Codex home
|
|
630
|
+
catalog. See [AI gates — Codex skill catalog](ai-gates.md#codex-skill-catalog-skillmd-not-flat-prompts)
|
|
631
|
+
and [shared Claude/Grok homes](ai-gates.md#shared-claude--grok-home-skills).
|
|
625
632
|
|
|
626
633
|
### Install skills — Ark and ecosystem {#install-skills-ark-and-ecosystem}
|
|
627
634
|
|
package/docs/ai-gates.md
CHANGED
|
@@ -446,6 +446,25 @@ severity **info**, marked `deferred: true`, and omitted from doctor **Primary ne
|
|
|
446
446
|
`/ark-upgrade` on Grok/Claude is not Incomplete because of them. **Temp/upgrade primary roots**
|
|
447
447
|
stay fail-closed urgent (rewritten, not multi-project).
|
|
448
448
|
|
|
449
|
+
### Shared Claude / Grok home skills {#shared-claude--grok-home-skills}
|
|
450
|
+
|
|
451
|
+
Project catalogs follow that checkout’s ArkGate pin (they may lag). Shared user-home catalogs
|
|
452
|
+
are the **machine floor**:
|
|
453
|
+
|
|
454
|
+
| Scope | Path | Flag |
|
|
455
|
+
|-------|------|------|
|
|
456
|
+
| Claude home | `$CLAUDE_HOME/skills` (default `~/.claude/skills`) | `--claude-home` |
|
|
457
|
+
| Grok home | `$GROK_HOME/skills` (default `~/.grok/skills`) | `--grok-home` |
|
|
458
|
+
| All three + Codex | same monotonic protocol | `--agent-homes` |
|
|
459
|
+
|
|
460
|
+
Doctor reports `agentHomeGaps` only when those catalogs already contain `ark-*` skills and
|
|
461
|
+
lag the installed package. Temp/upgrade `--root` never mutates default user homes. Cursor
|
|
462
|
+
sessions treat a stale Claude home as urgent because Cursor loads `~/.claude/skills`.
|
|
463
|
+
|
|
464
|
+
```bash
|
|
465
|
+
npx arkgate-check --install-agent-gates --skills-only --agent-homes --force
|
|
466
|
+
```
|
|
467
|
+
|
|
449
468
|
### Codex skill catalog (SKILL.md, not flat prompts)
|
|
450
469
|
|
|
451
470
|
Codex discovers skills as directories containing `SKILL.md` (Agent Skills standard):
|
package/docs/configuration.md
CHANGED
|
@@ -190,7 +190,7 @@ a hash-bound policy weakening. Empty `appliesTo: []` fails closed; zero-match gl
|
|
|
190
190
|
|
|
191
191
|
**What they do not do:** prove business semantics end-to-end; replace Layers import edges;
|
|
192
192
|
make “green” mean elegant Shape. Promoting structure to enforced can force rename-to-pass
|
|
193
|
-
heuristics — prefer judgment extraction via `/ark-
|
|
193
|
+
heuristics — prefer judgment extraction via `/ark-autopilot` when the real goal is
|
|
194
194
|
Domain ownership.
|
|
195
195
|
|
|
196
196
|
```bash
|
|
@@ -198,7 +198,7 @@ Domain ownership.
|
|
|
198
198
|
npx arkgate-check --rules-inventory --json
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
-
Edit ArkRules through
|
|
201
|
+
Edit ArkRules through `/ark-adopt` (session 0) or `/ark-autopilot`; extract/implement via `/ark-autopilot`.
|
|
202
202
|
|
|
203
203
|
## Contract transitions
|
|
204
204
|
|
|
@@ -239,6 +239,40 @@ JSON artifact passed with `--policy-ack`:
|
|
|
239
239
|
The acknowledgement must list every blocking finding exactly. It is not a permanent allowlist:
|
|
240
240
|
changing either contract changes its hash and invalidates the acknowledgement.
|
|
241
241
|
|
|
242
|
+
## Team parliament (law vs feature)
|
|
243
|
+
|
|
244
|
+
Optional `stewards` lists **GitHub handles or emails** who may **loosen** the contract or
|
|
245
|
+
**grow** the baseline (`pedroknigge` or `pedroknigge@users.noreply.github.com` — not
|
|
246
|
+
`Pedro Knigge`). The field is metadata — it does not change the policy hash. The lock
|
|
247
|
+
matches `--author`, then `GITHUB_ACTOR` / `ARK_STEWARD`, then `GIT_AUTHOR_EMAIL`. A
|
|
248
|
+
noreply GitHub mail and the handle are the same person. Git `user.name` is not identity.
|
|
249
|
+
|
|
250
|
+
Doctor detects several recent authors or a CODEOWNERS file (`doctor.stewardNudge`).
|
|
251
|
+
When `stewards` is empty it **asks** who owns the law and proposes handles or emails.
|
|
252
|
+
When the list exists but CODEOWNERS is ahead, or you started with one steward and git
|
|
253
|
+
now shows more authors, it shows the **gap** and asks whether to update. `/ark-adopt`
|
|
254
|
+
writes only after you confirm — it does not invent names or remove entries.
|
|
255
|
+
|
|
256
|
+
```json
|
|
257
|
+
"stewards": ["pedroknigge", "Amarilla-David"]
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Law files (`ark.config.json`, `arkrules/*`, `.ark-baseline.json`) are a different change
|
|
261
|
+
type than product source:
|
|
262
|
+
|
|
263
|
+
| Check | What it does |
|
|
264
|
+
|-------|----------------|
|
|
265
|
+
| `ark-check --changed --base origin/dev` | Layer check on touched sources only. A CSS/i18n PR pays almost nothing. |
|
|
266
|
+
| `ark-check --against origin/dev` | New violation keys vs **that ref's** baseline (not only HEAD). |
|
|
267
|
+
| `ark-check --contract-diff --base origin/dev` | Classifies tighten / loosen / reclassify / baseline-grow. |
|
|
268
|
+
| `--contract-session --author <id>` | Law-only PR. Mixed law+product still fails. Loosen/grow need a listed steward. |
|
|
269
|
+
| `--persona touch\|contributor\|agent\|steward` | Budget presets for the same teeth. |
|
|
270
|
+
| `ark status --vs origin/dev` | One line: pin / contract / baseline drift vs that ref. |
|
|
271
|
+
|
|
272
|
+
Write-gate ApplyPatch denies a batch that mixes law files with product source. Humans who
|
|
273
|
+
never hit PreToolUse are unchanged. Local `pnpm` gates should call `--changed --base`, not
|
|
274
|
+
only full-tree `--strict-merge`.
|
|
275
|
+
|
|
242
276
|
MCP clients can call `ark_policy_delta` with the previous `baseConfig`, an optional candidate
|
|
243
277
|
contract (the current project contract is the default), and the same optional acknowledgement.
|
|
244
278
|
It invokes the public classifier directly, is read-only, and marks a blocking result as an MCP
|
package/docs/develop.md
CHANGED
|
@@ -35,9 +35,9 @@ Local write hardness **differs by host**. CI required status is the shared hard
|
|
|
35
35
|
|
|
36
36
|
| Host | Local write | MCP | Merge |
|
|
37
37
|
|------|-------------|-----|-------|
|
|
38
|
-
| Claude · Grok · Antigravity |
|
|
39
|
-
| Codex · OpenCode |
|
|
40
|
-
| Cursor |
|
|
38
|
+
| Claude · Grok · Antigravity | Pre-write block when installed + trusted | Advisory | Required status context |
|
|
39
|
+
| Codex · OpenCode | Warning only (not blocked) | Advisory | Required status context |
|
|
40
|
+
| Cursor | Pre-write block for Write/StrReplace when `.cursor/hooks.json` is trusted | Advisory | Required status context |
|
|
41
41
|
|
|
42
42
|
Full matrix and install commands: [ai-gates.md](ai-gates.md) · canonical table in [README](../README.md#host-enforcement-support).
|
|
43
43
|
|
|
@@ -65,7 +65,7 @@ can show `runtimeObserved: true` even when branch-protection policy is plan-unav
|
|
|
65
65
|
| Concern | Doc / tool |
|
|
66
66
|
|---------|------------|
|
|
67
67
|
| Layers, rules, globs | [configuration.md](configuration.md) · `ark.config.json` |
|
|
68
|
-
| ArkRules (structure + invariants) | [configuration.md](configuration.md#arkrules-intra-layer-opt-in) · `arkRules` / `arkrules/*` · skill `/ark-
|
|
68
|
+
| ArkRules (structure + invariants) | [configuration.md](configuration.md#arkrules-intra-layer-opt-in) · `arkRules` / `arkrules/*` · skill `/ark-adopt` (session 0) or `/ark-autopilot` |
|
|
69
69
|
| Rules inventory (brownfield) | `arkgate-check --rules-inventory` · MCP `ark_rules_inventory` |
|
|
70
70
|
| Stable package API | [package-surface.md](package-surface.md) |
|
|
71
71
|
| Diagnostic codes (`ruleId` why/fix) | [diagnostics.md](diagnostics.md) · root `DIAGNOSTIC_CATALOG` |
|
|
@@ -133,10 +133,22 @@ npx arkgate agents-md --write # embed/refresh projection markers
|
|
|
133
133
|
npx arkgate preflight --changes changes.json --json
|
|
134
134
|
npx arkgate upgrade --json # managed content preview
|
|
135
135
|
npx arkgate upgrade --apply
|
|
136
|
+
npx arkgate-check --changed --base origin/dev
|
|
137
|
+
npx arkgate-check --against origin/dev
|
|
138
|
+
npx arkgate status --vs origin/dev
|
|
136
139
|
```
|
|
137
140
|
|
|
138
141
|
---
|
|
139
142
|
|
|
143
|
+
## Team parliament (law vs feature)
|
|
144
|
+
|
|
145
|
+
`ark.config.json`, `arkrules/*`, and `.ark-baseline.json` are a **constitution**. A product PR
|
|
146
|
+
must not amend them. Optional `stewards` (GitHub handle or email) makes loosen / baseline-grow
|
|
147
|
+
steward-only. Doctor `stewardNudge` asks who owns the law or shows list drift — never invents
|
|
148
|
+
names. Details: [configuration.md](configuration.md#team-parliament-law-vs-feature).
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
140
152
|
## Optional experimental runtime
|
|
141
153
|
|
|
142
154
|
Gates need **no** runtime kernel. `@arkgate/runtime` is experimental, separate package, not the day-zero product. See [package-surface.md](package-surface.md) and [production-hardening.md](production-hardening.md).
|
|
@@ -70,7 +70,7 @@ Deep teaching example (runnable API + break exercises): [hexagonal-order-api](ht
|
|
|
70
70
|
|
|
71
71
|
| Situation | Use |
|
|
72
72
|
|-----------|-----|
|
|
73
|
-
| New or empty repo | `/ark-
|
|
73
|
+
| New or empty repo | `/ark-adopt`, `ark-check --recommend`, gallery starters |
|
|
74
74
|
| Existing messy codebase | `/ark-adopt`, [brownfield playbook](../brownfield-adoption.md) |
|
|
75
75
|
|
|
76
76
|
## Related
|
|
@@ -15,8 +15,8 @@ Installs:
|
|
|
15
15
|
Still exit 2 / hard block; never silent write. Drop `--hook-repair` for
|
|
16
16
|
reject-only prose, or set `ARK_HOOK_REPAIR=0` and omit the flag.
|
|
17
17
|
- MCP server entry (`.mcp.json`, Cursor/Codex/Grok equivalents)
|
|
18
|
-
- `/ark-*` skills
|
|
19
|
-
(
|
|
18
|
+
- `/ark-*` skills: five doors **`/ark-adopt`**, **`/ark-place`**, **`/ark-autopilot`**,
|
|
19
|
+
**`/ark-explore`**, **`/ark-upgrade`** (other names are shortcuts)
|
|
20
20
|
|
|
21
21
|
| Host | Extra paths |
|
|
22
22
|
|------|-------------|
|
|
@@ -33,7 +33,7 @@ local, MCP, CI, and repair guarantees. The table above only lists installed path
|
|
|
33
33
|
`arkgate-mcp --session-context` appends when governed coverage is low:
|
|
34
34
|
|
|
35
35
|
```
|
|
36
|
-
New to Ark? Run /ark-architect or: ark-check --recommend
|
|
36
|
+
New to Ark? Run /ark-adopt (or /ark-architect) or: ark-check --recommend
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
## Verify gates
|
|
@@ -14,7 +14,7 @@ Call tool **`ark_recommend`** — same JSON as `--recommend --json`.
|
|
|
14
14
|
|
|
15
15
|
## Skill
|
|
16
16
|
|
|
17
|
-
Run **`/ark-
|
|
17
|
+
Run **`/ark-adopt`** on a greenfield or early-adoption repo (leftover `/ark-architect` is a shortcut).
|
|
18
18
|
|
|
19
19
|
## What to read in the output
|
|
20
20
|
|
|
@@ -37,7 +37,7 @@ If `confidence < 0.5`, ask:
|
|
|
37
37
|
1. Will this app save data between sessions?
|
|
38
38
|
2. Is this one app or several in one repository?
|
|
39
39
|
|
|
40
|
-
Then re-run `--recommend` or continue with `/ark-
|
|
40
|
+
Then re-run `--recommend` or continue with `/ark-adopt`.
|
|
41
41
|
|
|
42
42
|
## Reference
|
|
43
43
|
|
|
@@ -61,7 +61,7 @@ Or copy a [gallery starter](../enthusiast/how-to-gallery-starter.md) and run `np
|
|
|
61
61
|
npx ark-check --install-agent-gates
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
This installs `/ark-
|
|
64
|
+
This installs the five doors (`/ark-adopt`, `/ark-place`, `/ark-autopilot`, `/ark-explore`, `/ark-upgrade`) and leftover shortcut names for Claude, Cursor, Codex, Grok, and other detected hosts.
|
|
65
65
|
|
|
66
66
|
## 6. Verify honestly
|
|
67
67
|
|
|
@@ -75,9 +75,10 @@ Report `governed.percent` truthfully. An empty layer is fine; an ungoverned `lib
|
|
|
75
75
|
|
|
76
76
|
## 7. Build a feature with the agent
|
|
77
77
|
|
|
78
|
-
Invoke `/ark-
|
|
78
|
+
Invoke `/ark-adopt` once at the start, then `/ark-place` for each new file. The agent
|
|
79
79
|
should place use cases in `application/`, ports in `domain/`, and never import the database
|
|
80
|
-
into `domain/`.
|
|
80
|
+
into `domain/`. Do not edit `ark.config.json` in the same change as a feature — that is a
|
|
81
|
+
steward contract session. Teams: `ark-check --changed --base origin/dev`.
|
|
81
82
|
|
|
82
83
|
## Next steps
|
|
83
84
|
|
package/docs/package-surface.md
CHANGED
|
@@ -47,6 +47,7 @@ hardening guide remains repository-hosted rather than duplicated in the gate tar
|
|
|
47
47
|
| **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`. |
|
|
48
48
|
| **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. |
|
|
49
49
|
| **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. |
|
|
50
|
+
| **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` is excluded from policy hash. Identity is handle or email, not git `user.name`. No org plane. |
|
|
50
51
|
| **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. |
|
|
51
52
|
| **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. |
|
|
52
53
|
| **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. |
|
|
@@ -56,7 +57,7 @@ hardening guide remains repository-hosted rather than duplicated in the gate tar
|
|
|
56
57
|
| **`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. |
|
|
57
58
|
| **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`. |
|
|
58
59
|
| **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. |
|
|
59
|
-
| **Status manifest** | CLI `ark status [--json]`; MCP `ark_status`; `arkgate/schema/status-manifest`; root API `buildStatusManifest` / `ARK_STATUS_MANIFEST_SCHEMA` / `projectStatusImprovementCompass` | 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,
|
|
60
|
+
| **Status manifest** | CLI `ark status [--json] [--vs <ref>]`; MCP `ark_status`; `arkgate/schema/status-manifest`; root API `buildStatusManifest` / `ARK_STATUS_MANIFEST_SCHEMA` / `projectStatusImprovementCompass` | 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, **`improvementCompass`** with honesty **`mode`** `full`\|`subset`\|`unavailable` (residual ids only; always `notAScore: true`; optional `reasonCode`/`reason`/`factsSource`/`contractHash`), and optional **`vsBase`** (pin / contract / baseline grow vs a git ref; advisory only). **Not a score.** Residual never changes gate verdicts. Never prompts (`CI=1` forces JSON). Optional `--expected-root` / `--expected-project-id` (MCP `project`) for matched vs stale identity. |
|
|
60
61
|
| **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. |
|
|
61
62
|
| **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`. |
|
|
62
63
|
| **`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`). |
|
|
@@ -209,8 +210,9 @@ production deployment would need to satisfy; it is not a readiness certification
|
|
|
209
210
|
## Release notes (maintainers)
|
|
210
211
|
|
|
211
212
|
Ship notes for a version live under [releases/](https://github.com/pedroknigge/arkgate/tree/main/docs/releases)
|
|
212
|
-
(
|
|
213
|
-
|
|
213
|
+
(prepared: [4.6.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.1.md);
|
|
214
|
+
current published: [4.6.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.0.md);
|
|
215
|
+
prior published: [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),
|
|
214
216
|
[4.2.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.2.1.md);
|
|
215
217
|
previous: [4.2.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.2.0.md),
|
|
216
218
|
[4.1.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.1.1.md),
|