arkgate 4.6.1 → 4.6.2
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 +30 -1
- package/README.md +5 -3
- package/bin/ark-check-runtime.mjs +23 -127
- package/bin/ark-mcp-runtime.mjs +70 -48
- package/bin/ark.mjs +19 -78
- package/bin/lib/doctor-next-actions.mjs +92 -0
- package/bin/lib/doctor-plan.mjs +59 -69
- package/bin/lib/first-run-help.mjs +221 -0
- package/bin/lib/start-preview.mjs +17 -10
- package/bin/lib/status-command.mjs +5 -0
- package/bin/lib/status-manifest.mjs +6 -0
- package/dist/index.cjs +19 -19
- package/dist/index.d.ts +6 -1
- package/dist/index.js +22 -22
- package/docs/README.md +5 -5
- package/docs/agent-guide.md +1 -1
- package/docs/enthusiast/how-to-agent-gates.md +1 -1
- package/docs/package-surface.md +3 -3
- package/docs/use.md +4 -4
- package/package.json +2 -2
- package/server.json +3 -3
- package/templates/agent-skills/README.md +1 -1
- package/templates/agent-skills/ark-adopt/SKILL.md +14 -5
- package/templates/agent-skills/ark-architect/SKILL.md +2 -2
- package/templates/agent-skills/ark-autopilot/SKILL.md +12 -5
- package/templates/agent-skills/ark-contract/SKILL.md +1 -1
- package/templates/agent-skills/ark-coverage/SKILL.md +6 -5
- package/templates/agent-skills/ark-explain/SKILL.md +3 -2
- package/templates/agent-skills/ark-explore/SKILL.md +13 -4
- package/templates/agent-skills/ark-fix/SKILL.md +1 -1
- package/templates/agent-skills/ark-loop/SKILL.md +1 -1
- package/templates/agent-skills/ark-place/SKILL.md +10 -1
- package/templates/agent-skills/ark-think/SKILL.md +3 -2
- package/templates/agent-skills/ark-upgrade/SKILL.md +10 -3
- package/templates/skills/ark-adopt.md +14 -5
- package/templates/skills/ark-architect.md +2 -2
- package/templates/skills/ark-autopilot.md +12 -5
- package/templates/skills/ark-contract.md +1 -1
- package/templates/skills/ark-coverage.md +6 -5
- package/templates/skills/ark-explain.md +3 -2
- package/templates/skills/ark-explore.md +13 -4
- package/templates/skills/ark-fix.md +1 -1
- package/templates/skills/ark-loop.md +1 -1
- package/templates/skills/ark-place.md +10 -1
- package/templates/skills/ark-think.md +3 -2
- package/templates/skills/ark-upgrade.md +10 -3
package/docs/README.md
CHANGED
|
@@ -53,15 +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. [team-parliament](plans/team-parliament/README.md) **4.6.1
|
|
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. |
|
|
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
|
-
Prepared: [releases/4.6.
|
|
62
|
-
Current published: [releases/4.6.
|
|
63
|
-
Prior: [releases/4.
|
|
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).
|
|
61
|
+
Prepared: [releases/4.6.2.md](releases/4.6.2.md) (`arkgate@4.6.2` — not yet npm `latest`).
|
|
62
|
+
Current published: [releases/4.6.1.md](releases/4.6.1.md) (`arkgate@4.6.1` on npm `latest`).
|
|
63
|
+
Prior: [releases/4.6.0.md](releases/4.6.0.md) (`arkgate@4.6.0`).
|
|
64
|
+
Previous: [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).
|
|
65
65
|
Previous major: [releases/4.0.0.md](releases/4.0.0.md) (`arkgate@4.0.0`).
|
|
66
66
|
Config: [configuration.md](configuration.md) · Agent skills dual-plane: [agent-guide.md](agent-guide.md).
|
|
67
67
|
|
package/docs/agent-guide.md
CHANGED
|
@@ -493,7 +493,7 @@ generating project structure on greenfield or early-adoption repos.
|
|
|
493
493
|
coverage is low or the config is fresh:
|
|
494
494
|
|
|
495
495
|
```
|
|
496
|
-
New to Ark?
|
|
496
|
+
New to Ark? /ark-adopt or: arkgate-check --doctor
|
|
497
497
|
```
|
|
498
498
|
|
|
499
499
|
The `/ark-adopt` skill ships in `templates/skills/ark-adopt.md` (leftover
|
|
@@ -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?
|
|
36
|
+
New to Ark? /ark-adopt or: arkgate-check --doctor
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
## Verify gates
|
package/docs/package-surface.md
CHANGED
|
@@ -210,9 +210,9 @@ production deployment would need to satisfy; it is not a readiness certification
|
|
|
210
210
|
## Release notes (maintainers)
|
|
211
211
|
|
|
212
212
|
Ship notes for a version live under [releases/](https://github.com/pedroknigge/arkgate/tree/main/docs/releases)
|
|
213
|
-
(prepared: [4.6.
|
|
214
|
-
current published: [4.6.
|
|
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),
|
|
213
|
+
(prepared: [4.6.2.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.2.md);
|
|
214
|
+
current published: [4.6.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.1.md);
|
|
215
|
+
prior published: [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),
|
|
216
216
|
[4.2.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.2.1.md);
|
|
217
217
|
previous: [4.2.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.2.0.md),
|
|
218
218
|
[4.1.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.1.1.md),
|
package/docs/use.md
CHANGED
|
@@ -49,9 +49,9 @@ In those cases a boundary linter or editor rules may be enough; see [README —
|
|
|
49
49
|
| Before merge | Make the Ark job a **required GitHub status context** running `arkgate-check --strict-merge` (alias `ark-check`) |
|
|
50
50
|
| Anytime | Doctor: Suggest / Adapt / Enforce (+ leftover design work if the design is still messy) |
|
|
51
51
|
|
|
52
|
-
**
|
|
52
|
+
**Cursor:** pre-write block for Write/StrReplace when `.cursor/hooks.json` is trusted. **Codex / OpenCode:** local write stays advisory (warning only, not blocked) — that is not unfinished architecture. Doctor may say **contract ready** while still reminding you that those hosts do not hard-block writes; **Not finished** is reserved for real project/contract debt.
|
|
53
53
|
|
|
54
|
-
ArkGate is **not** a web framework, ORM, or app runtime. It is architecture enforcement +
|
|
54
|
+
ArkGate is **not** a web framework, ORM, or app runtime. It is architecture enforcement + a coach for AI TypeScript.
|
|
55
55
|
|
|
56
56
|
### Two planes (you choose)
|
|
57
57
|
|
|
@@ -83,7 +83,7 @@ list: [configuration.md](configuration.md).
|
|
|
83
83
|
| **Suggest** | New or thin project | Finish `start`, re-run doctor |
|
|
84
84
|
| **Adapt** | Not fully protected yet | Doctor action #1 until clean |
|
|
85
85
|
| **Enforce** | Edges honest under the contract | Keep write path + CI |
|
|
86
|
-
| **Enforce · design
|
|
86
|
+
| **Enforce · leftover design work** | Edges clean; design still messy | Shape door — not “done” |
|
|
87
87
|
|
|
88
88
|
**Green edges ≠ elegant design.** Empty remediation plan is not “architecture finished” if design residual remains.
|
|
89
89
|
|
|
@@ -175,7 +175,7 @@ Human doctor prints the short section above.
|
|
|
175
175
|
| **Stabilize** | Edges under Enforce | Real debt only in baseline; write path + CI honest |
|
|
176
176
|
| **Shape** | One golden pattern + pilots | Residual lenses shrink pilot by pilot — never silent multi-pilot |
|
|
177
177
|
|
|
178
|
-
Green edges under **Enforce · design
|
|
178
|
+
Green edges under **Enforce · leftover design work** mean Align/Stabilize may be fine while Shape remains open.
|
|
179
179
|
Empty plan A is **not** “architecture finished.”
|
|
180
180
|
|
|
181
181
|
---
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arkgate",
|
|
3
|
-
"version": "4.6.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "4.6.2",
|
|
4
|
+
"description": "One architecture config. One check. One coach.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
package/server.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
3
|
"name": "io.github.pedroknigge/arkgate",
|
|
4
|
-
"description": "ArkGate
|
|
4
|
+
"description": "When your agent writes TypeScript, ArkGate stops it from breaking the layers — and CI rejects the merge if it still does.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/pedroknigge/arkgate",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "4.6.
|
|
9
|
+
"version": "4.6.2",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "arkgate",
|
|
14
|
-
"version": "4.6.
|
|
14
|
+
"version": "4.6.2",
|
|
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.
|
|
10
|
+
Package version when last generated context: **arkgate@4.6.2**
|
|
11
11
|
Schema: agent-skills package contract `1.0`
|
|
12
12
|
|
|
13
13
|
## Skills (frozen catalog)
|
|
@@ -5,8 +5,17 @@ description: Session 0 — mark the Ark path. Greenfield scaffold or brownfield
|
|
|
5
5
|
|
|
6
6
|
# /ark-adopt — Mark the path (session 0)
|
|
7
7
|
|
|
8
|
+
**When:** empty tree, or the architecture config does not match the real folders (session 0).
|
|
9
|
+
**Not when:** a single new file (`/ark-place`) or leftover design after the path is honest (`/ark-explore` then `/ark-autopilot`).
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
1. Read `arkgate-check --doctor` (one light, one next action).
|
|
14
|
+
2. Write `ark.config.json` (and a baseline only for genuine debt) in this turn.
|
|
15
|
+
3. Re-run doctor. Day-to-day new files: `/ark-place`.
|
|
16
|
+
|
|
8
17
|
Invoking this skill **is** the approval. Write the architecture config in this turn.
|
|
9
|
-
Greenfield: scaffold like `--recommend
|
|
18
|
+
Greenfield: scaffold like `--recommend`. Brownfield: match **product
|
|
10
19
|
reality**, freeze only genuine debt. A green check over a wrong config is a **false green**.
|
|
11
20
|
|
|
12
21
|
## Autonomy contract
|
|
@@ -36,7 +45,7 @@ write them in this turn. If they say the list is still right, leave it. Never in
|
|
|
36
45
|
or auto-remove stewards.
|
|
37
46
|
|
|
38
47
|
**Adopt is Align + Stabilize, then seed Shape.** Freezing debt without a pattern plan leaves
|
|
39
|
-
spaghetti
|
|
48
|
+
spaghetti leftover design work. Always end with dual-plan **B** seeds (or handoff explore)
|
|
40
49
|
when design smells remain after the contract is honest.
|
|
41
50
|
|
|
42
51
|
## Improvement compass (process preflight)
|
|
@@ -152,7 +161,7 @@ feature dirs, plan clusters), you **may** dispatch **subagents**:
|
|
|
152
161
|
2. **Product map** — what ships, which apps/packages, entry routes/CLIs.
|
|
153
162
|
3. **Read real source** in largest ungoverned dirs and top import edges (min **12 files**
|
|
154
163
|
across **≥4 dirs**).
|
|
155
|
-
4. **“
|
|
164
|
+
4. **“How to fix”** — concrete layer globs, file moves, manifest/intent proposals.
|
|
156
165
|
5. **Suggestive burn-down** — ranked next steps after adopt (not only “baseline done”).
|
|
157
166
|
6. Never freeze a concentrated edge without investigating contract smell / false-green.
|
|
158
167
|
|
|
@@ -182,7 +191,7 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
|
|
|
182
191
|
- Propose: Domain files, `intentPrefixes`, intent names (`Domain.*` / `Application.*`), kernel `defineIntent` stubs if runtime is used;
|
|
183
192
|
land structure/invariant entries under `arkrules/<Layer>.json` **in this turn** (ADR 0015 routing).
|
|
184
193
|
- Write the config; move pure rules into Domain when safe; validate with ark-check.
|
|
185
|
-
- Deliver section
|
|
194
|
+
- Deliver section **How to fix the architecture config** with before/after contract snippets.
|
|
186
195
|
5. **Freeze only real debt** — `--update-baseline` (zero debt → **no empty baseline file** left behind).
|
|
187
196
|
6. **Gates + skills** — `--install-agent-gates` (CI monorepo-aware when `frontend/package.json` exists).
|
|
188
197
|
7. **Ratchet + Shape seed (mandatory exploratory close)** — after freeze/gates:
|
|
@@ -197,7 +206,7 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
|
|
|
197
206
|
## Operating modes
|
|
198
207
|
|
|
199
208
|
Explain modes as **detected stages** (Setup / Align / Guard), not user settings.
|
|
200
|
-
**Guard on the contract ≠ Shape done.** Say
|
|
209
|
+
**Guard on the contract ≠ Shape done.** Say leftover design work remains when B residual remains.
|
|
201
210
|
|
|
202
211
|
## Verify
|
|
203
212
|
|
|
@@ -5,8 +5,8 @@ description: Shortcut to /ark-adopt for greenfield shape. Deprecated as a first-
|
|
|
5
5
|
|
|
6
6
|
# /ark-architect — Shortcut to /ark-adopt
|
|
7
7
|
|
|
8
|
-
**
|
|
9
|
-
|
|
8
|
+
**Not a first-run door.** This leftover name is a shortcut. Session 0 is **`/ark-adopt`**.
|
|
9
|
+
Do that job now. Do not send the user to `/ark-contract` or `/ark-fix`.
|
|
10
10
|
|
|
11
11
|
## Autonomy contract
|
|
12
12
|
|
|
@@ -5,9 +5,16 @@ description: Apply Ark end-to-end — explore first; dual plan A (edges) + B (sh
|
|
|
5
5
|
|
|
6
6
|
# /ark-autopilot — Apply the path
|
|
7
7
|
|
|
8
|
-
**
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
**When:** the user wants architecture cleaned end-to-end, or leftover design after a map.
|
|
9
|
+
**Not when:** map only (`/ark-explore`), session 0 / config lying (`/ark-adopt`), or one new file (`/ark-place`).
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
1. Read `arkgate-check --doctor` (do #1).
|
|
14
|
+
2. Fix import-rule debt; if leftover design remains, apply **one** small refactor.
|
|
15
|
+
3. Re-run doctor. Never weaken `ark.config.json`.
|
|
16
|
+
|
|
17
|
+
**This is the apply door.** Invoking it **is** the approval. Doctor remains the control plane.
|
|
11
18
|
|
|
12
19
|
## Autonomy contract
|
|
13
20
|
|
|
@@ -81,7 +88,7 @@ decision-grade explore pass **and** without opening violating files.
|
|
|
81
88
|
2. CLI sensors: `--plan --json`, `--coverage --json` / `--doctor` as needed.
|
|
82
89
|
3. **Dual plan** always emitted (sections A and B).
|
|
83
90
|
4. **Open every file** in plan A `steps[]` (and `target` if present) before classifying a fix.
|
|
84
|
-
5. **“
|
|
91
|
+
5. **“How to fix”** for each A cluster and each B pattern bet.
|
|
85
92
|
6. Apply A → re-run ark-check → rollback on regression. **Never auto-apply B** as mechanical-safe.
|
|
86
93
|
7. **One-pilot loop for B:** when leftover design / design-weak, take **`pilotLoop.nextPilot`** (one extraction card)
|
|
87
94
|
→ apply **only** that pilot **in this turn** → **re-doctor**. Never multi-pilot batch B; residual
|
|
@@ -153,7 +160,7 @@ Use the **`/ark-explore` decision-grade bar** (compressed into the autopilot rep
|
|
|
153
160
|
Include explore **§G** when spaghetti / design-weak signals fire.
|
|
154
161
|
|
|
155
162
|
1. **Headline** — product one-liner + honesty (mode, governed%, false-green / false-promise /
|
|
156
|
-
|
|
163
|
+
leftover design work risk).
|
|
157
164
|
2. **Map** — entry points, lived layout vs globs (one screen). **Concurrent patterns** table when ≥2 styles.
|
|
158
165
|
3. **Phase ladder** — name **Align | Stabilize | Shape** (explore §G).
|
|
159
166
|
4. **Field path** — if `examples/` / gallery / starter docs exist: open ≥2, **run** their check when cheap; flag soft-green or broken demos. Else `Field path: n/a` + internal norm.
|
|
@@ -5,7 +5,7 @@ description: Shortcut to /ark-adopt (session 0) or /ark-autopilot (later config
|
|
|
5
5
|
|
|
6
6
|
# /ark-contract — Shortcut to adopt / autopilot
|
|
7
7
|
|
|
8
|
-
**
|
|
8
|
+
**Not a first-run door.** This leftover name is a shortcut. Writing `ark.config.json` is
|
|
9
9
|
**`/ark-adopt`** at session 0 and **`/ark-autopilot`** afterward. Do that job now.
|
|
10
10
|
|
|
11
11
|
## Autonomy contract
|
|
@@ -5,8 +5,9 @@ description: Ark adoption fitness audit — governed%, gates, baseline honesty,
|
|
|
5
5
|
|
|
6
6
|
# /ark-coverage — Ark adoption fitness (not full recon)
|
|
7
7
|
|
|
8
|
-
**
|
|
9
|
-
|
|
8
|
+
**Not a first-run door.** Fitness numbers only (governed files, gates, baseline).
|
|
9
|
+
Session 0 → **`/ark-adopt`**. Leftover design → **`/ark-explore`**. Apply → **`/ark-autopilot`**.
|
|
10
|
+
Do not send the user to leftover `/ark-contract` or `/ark-fix`.
|
|
10
11
|
|
|
11
12
|
You audit **how this repo uses ArkGate** (coverage, gates, baseline, host write path) and
|
|
12
13
|
what adoption gaps remain. Work autonomously. End with a ranked fitness report.
|
|
@@ -56,7 +57,7 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
|
|
|
56
57
|
2. **Product surface** — name the app/package(s) in one line (not a full recon).
|
|
57
58
|
3. **Read real source** in the top ungoverned / high-risk clusters (minimum **10 files**
|
|
58
59
|
across at least **4 directories**). Prefer domain, features, adapters, routes — not only config.
|
|
59
|
-
4. **“
|
|
60
|
+
4. **“How to fix”** for adoption gaps (globs, install, baseline, intents).
|
|
60
61
|
5. If plan A is empty but you see design-weak / concurrent patterns / god modules:
|
|
61
62
|
list them briefly and **STOP — do not continue this skill as complete** for pattern work —
|
|
62
63
|
**handoff `/ark-explore` (dual-plan seed or shape-focus)**. Do not invent a second explore report here.
|
|
@@ -159,7 +160,7 @@ because governed% is 100% and plan is empty.
|
|
|
159
160
|
2. **Adoption map** — clusters you read for *fitness* (paths) — keep short.
|
|
160
161
|
3. **Ranked table** (adoption residual + install/capability opportunities)
|
|
161
162
|
|
|
162
|
-
| # | Kind | Gap / opportunity | Evidence (path or CLI) |
|
|
163
|
+
| # | Kind | Gap / opportunity | Evidence (path or CLI) | How to fix (concrete) | Next |
|
|
163
164
|
|
|
164
165
|
Kinds: `debt` | `false-green` | `shape` | `manifiesto` | `gates` | `opportunity` | `design-weak`
|
|
165
166
|
|
|
@@ -169,7 +170,7 @@ Kinds: `debt` | `false-green` | `shape` | `manifiesto` | `gates` | `opportunity`
|
|
|
169
170
|
## Done criteria
|
|
170
171
|
|
|
171
172
|
- ≥10 source files read and cited; product surface named.
|
|
172
|
-
- At least one **
|
|
173
|
+
- At least one **How to fix** block with real paths or install commands.
|
|
173
174
|
- CLI numbers used as evidence, not as the whole report.
|
|
174
175
|
- Design residual either absent with evidence or explicitly handed to `/ark-explore`.
|
|
175
176
|
|
|
@@ -5,8 +5,9 @@ description: Explain this project's architecture in plain language and generate
|
|
|
5
5
|
|
|
6
6
|
# /ark-explain — Understand this project's architecture
|
|
7
7
|
|
|
8
|
-
**
|
|
9
|
-
|
|
8
|
+
**Not a first-run door.** Teach / HTML tour only. Session 0 → **`/ark-adopt`**.
|
|
9
|
+
Map → **`/ark-explore`**. Apply → **`/ark-autopilot`**.
|
|
10
|
+
Do not send the user to leftover `/ark-contract` or `/ark-fix`.
|
|
10
11
|
|
|
11
12
|
The user wants to understand the architecture, a specific rule, or why the gate blocked them.
|
|
12
13
|
|
|
@@ -5,6 +5,15 @@ description: Map skill — decision-grade recon of layers + ArkRules opportuniti
|
|
|
5
5
|
|
|
6
6
|
# /ark-explore — Recon the real project (map only)
|
|
7
7
|
|
|
8
|
+
**When:** you need a map, or leftover design work remains after imports look green.
|
|
9
|
+
**Not when:** the user wants edits applied (`/ark-autopilot`) or session 0 (`/ark-adopt`).
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
1. Read `arkgate-check --doctor`.
|
|
14
|
+
2. Open the real tree (≥12 files across ≥4 dirs). CLI JSON alone is incomplete.
|
|
15
|
+
3. Rank leftover work. Hand off to `/ark-autopilot` to apply one refactor. Do not write config or product code here.
|
|
16
|
+
|
|
8
17
|
## Autonomy contract
|
|
9
18
|
|
|
10
19
|
Invoking this skill **is** the approval to **map**. Open the real tree. CLI JSON alone is
|
|
@@ -308,7 +317,7 @@ Prefer bets the user can run next (`command` / skill), not vague “improve DX
|
|
|
308
317
|
| **Stabilize** | ENFORCE + honest baseline only for real debt | 0 new edges; doctor not lying about write path/CI |
|
|
309
318
|
| **Shape** | One **golden** pattern + pilot cluster | Pilot smells cleared; rest is migrate-on-touch; B bets have success signals |
|
|
310
319
|
|
|
311
|
-
ENFORCE without Shape progress is
|
|
320
|
+
ENFORCE without Shape progress is leftover design work — say that out loud. It is **not** “healthy finished.”
|
|
312
321
|
|
|
313
322
|
**Agent-detected design smells** (list any that apply; paths required — these may predate doctor IDs):
|
|
314
323
|
|
|
@@ -374,16 +383,16 @@ and the ranked **`pilotLoop.nextPilot`**.
|
|
|
374
383
|
|
|
375
384
|
State **Mode: recon | dual-plan seed | shape-focus** and **Phase: Align | Stabilize | Shape** in the first lines.
|
|
376
385
|
|
|
377
|
-
1. **Headline** — product one sentence + honesty (mode, governed%, false-green /
|
|
386
|
+
1. **Headline** — product one sentence + honesty (mode, governed%, false-green / leftover design work / false-promise risk). ENFORCE is context, not the story.
|
|
378
387
|
2. **Map** — entry points, major dirs, shape name (or “no honest shape yet”). One screen. **Patterns concurrent** table when §B/§G requires it.
|
|
379
388
|
3. **What I opened** — paths + sensors (include field/hook/origin when used).
|
|
380
389
|
4. **Ranked table** — **only rows that change a decision**. Prefer **3–6** hard rows.
|
|
381
390
|
|
|
382
|
-
| # | Kind | Finding | Evidence (path) |
|
|
391
|
+
| # | Kind | Finding | Evidence (path) | How to fix | Success signal | Next skill / command |
|
|
383
392
|
|
|
384
393
|
Kinds: `risk` | `false-green` | `debt` | `opportunity` | `shape` | `manifiesto` | `agent-dx` | `design-weak`
|
|
385
394
|
|
|
386
|
-
**
|
|
395
|
+
**How to fix** must be concrete: files to touch, command to run.
|
|
387
396
|
**Success signal** must be falsifiable (see §F).
|
|
388
397
|
|
|
389
398
|
5. **Field path summary**.
|
|
@@ -5,7 +5,7 @@ description: Shortcut to /ark-autopilot for a small violation cluster. Deprecate
|
|
|
5
5
|
|
|
6
6
|
# /ark-fix — Shortcut to /ark-autopilot
|
|
7
7
|
|
|
8
|
-
**
|
|
8
|
+
**Not a first-run door.** This leftover name is a shortcut. Gate violations are
|
|
9
9
|
**`/ark-autopilot`**. Do that job now. CLI only validates.
|
|
10
10
|
|
|
11
11
|
## Autonomy contract
|
|
@@ -5,7 +5,7 @@ description: Shortcut to /ark-autopilot for driving plan A to zero. Deprecated a
|
|
|
5
5
|
|
|
6
6
|
# /ark-loop — Shortcut to /ark-autopilot
|
|
7
7
|
|
|
8
|
-
**
|
|
8
|
+
**Not a first-run door.** This leftover name is a shortcut. Driving `--plan` to `goal.met` is **`/ark-autopilot`**.
|
|
9
9
|
Do that job now. Auto-apply only the four `mechanical-safe` kinds; judgment you write.
|
|
10
10
|
|
|
11
11
|
## Autonomy contract
|
|
@@ -5,6 +5,15 @@ description: "Where does new code go? Names the layer, directory, and naming for
|
|
|
5
5
|
|
|
6
6
|
# /ark-place — Where does this code go?
|
|
7
7
|
|
|
8
|
+
**When:** you are adding a new file or artifact and need the layer, folder, and name.
|
|
9
|
+
**Not when:** session 0 / config is missing or lying (`/ark-adopt`) or an existing violation cluster (`/ark-autopilot`).
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
1. Bind identity if using MCP (`ark_identity` with the exact project root).
|
|
14
|
+
2. Place the file (`ark_place` or read `ark.config.json`).
|
|
15
|
+
3. Write it there. Then `arkgate-check`.
|
|
16
|
+
|
|
8
17
|
## Autonomy contract
|
|
9
18
|
|
|
10
19
|
Invoking this skill **is** the approval. If the user described an artifact, **write the
|
|
@@ -155,7 +164,7 @@ the same files or weaken the gate.
|
|
|
155
164
|
|
|
156
165
|
- If the user needs bulk adoption / wrong config, not a single artifact: **STOP — do not continue this skill as complete.** Switch to **`/ark-adopt`** (write the path) instead of ad-hoc multi-file grinding without a plan.
|
|
157
166
|
- If the config lacks a home for the artifact: add the layer **in this turn**, then write the file.
|
|
158
|
-
- If doctor
|
|
167
|
+
- If doctor shows leftover design work and the user is asking to reshape existing structure
|
|
159
168
|
(not place one new artifact): place only the new file under the golden/contract home, then
|
|
160
169
|
hand off **one** pilot via `pilotLoop.nextPilot` / `/ark-explore` shape-focus — never multi-pilot
|
|
161
170
|
batch reshape from this skill.
|
|
@@ -5,8 +5,9 @@ description: Host-side architectural reasoning — 2–3 enforceable options on
|
|
|
5
5
|
|
|
6
6
|
# /ark-think — Architectural reasoning (host LLM only)
|
|
7
7
|
|
|
8
|
-
**
|
|
9
|
-
|
|
8
|
+
**Not a first-run door.** One decision only. Session 0 → **`/ark-adopt`**.
|
|
9
|
+
Full map → **`/ark-explore`**. Apply → **`/ark-autopilot`**.
|
|
10
|
+
Do not send the user to leftover `/ark-contract` or `/ark-fix`.
|
|
10
11
|
|
|
11
12
|
You are the user's architecture thinking partner **inside** the project's Ark contract.
|
|
12
13
|
This skill does **not** call any LLM API from the arkgate package. **You** (the host agent)
|
|
@@ -5,9 +5,16 @@ description: Upgrade ArkGate through a content-identity preview, preserve custom
|
|
|
5
5
|
|
|
6
6
|
# /ark-upgrade — managed ArkGate upgrade
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
**When:** bump the published `arkgate` package and refresh managed gates.
|
|
9
|
+
**Not when:** session 0 (`/ark-adopt`) or leftover design (`/ark-explore`).
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
1. Preview: `arkgate upgrade` (no writes).
|
|
14
|
+
2. Apply in this turn: `arkgate upgrade --apply` (needs `--plan-digest` when applying managed files).
|
|
15
|
+
3. Re-run `arkgate-check --doctor`. Customized files stay unless you pass `--accept-conflicts` / `--refresh-skills`.
|
|
16
|
+
|
|
17
|
+
The preview is the source of truth. Do not treat a filename or package version as proof of ownership.
|
|
11
18
|
|
|
12
19
|
## Autonomy contract
|
|
13
20
|
|
|
@@ -5,8 +5,17 @@ description: Session 0 — mark the Ark path. Greenfield scaffold or brownfield
|
|
|
5
5
|
|
|
6
6
|
# /ark-adopt — Mark the path (session 0)
|
|
7
7
|
|
|
8
|
+
**When:** empty tree, or the architecture config does not match the real folders (session 0).
|
|
9
|
+
**Not when:** a single new file (`/ark-place`) or leftover design after the path is honest (`/ark-explore` then `/ark-autopilot`).
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
1. Read `arkgate-check --doctor` (one light, one next action).
|
|
14
|
+
2. Write `ark.config.json` (and a baseline only for genuine debt) in this turn.
|
|
15
|
+
3. Re-run doctor. Day-to-day new files: `/ark-place`.
|
|
16
|
+
|
|
8
17
|
Invoking this skill **is** the approval. Write the architecture config in this turn.
|
|
9
|
-
Greenfield: scaffold like `--recommend
|
|
18
|
+
Greenfield: scaffold like `--recommend`. Brownfield: match **product
|
|
10
19
|
reality**, freeze only genuine debt. A green check over a wrong config is a **false green**.
|
|
11
20
|
|
|
12
21
|
## Autonomy contract
|
|
@@ -36,7 +45,7 @@ write them in this turn. If they say the list is still right, leave it. Never in
|
|
|
36
45
|
or auto-remove stewards.
|
|
37
46
|
|
|
38
47
|
**Adopt is Align + Stabilize, then seed Shape.** Freezing debt without a pattern plan leaves
|
|
39
|
-
spaghetti
|
|
48
|
+
spaghetti leftover design work. Always end with dual-plan **B** seeds (or handoff explore)
|
|
40
49
|
when design smells remain after the contract is honest.
|
|
41
50
|
|
|
42
51
|
## Improvement compass (process preflight)
|
|
@@ -152,7 +161,7 @@ feature dirs, plan clusters), you **may** dispatch **subagents**:
|
|
|
152
161
|
2. **Product map** — what ships, which apps/packages, entry routes/CLIs.
|
|
153
162
|
3. **Read real source** in largest ungoverned dirs and top import edges (min **12 files**
|
|
154
163
|
across **≥4 dirs**).
|
|
155
|
-
4. **“
|
|
164
|
+
4. **“How to fix”** — concrete layer globs, file moves, manifest/intent proposals.
|
|
156
165
|
5. **Suggestive burn-down** — ranked next steps after adopt (not only “baseline done”).
|
|
157
166
|
6. Never freeze a concentrated edge without investigating contract smell / false-green.
|
|
158
167
|
|
|
@@ -182,7 +191,7 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
|
|
|
182
191
|
- Propose: Domain files, `intentPrefixes`, intent names (`Domain.*` / `Application.*`), kernel `defineIntent` stubs if runtime is used;
|
|
183
192
|
land structure/invariant entries under `arkrules/<Layer>.json` **in this turn** (ADR 0015 routing).
|
|
184
193
|
- Write the config; move pure rules into Domain when safe; validate with ark-check.
|
|
185
|
-
- Deliver section
|
|
194
|
+
- Deliver section **How to fix the architecture config** with before/after contract snippets.
|
|
186
195
|
5. **Freeze only real debt** — `--update-baseline` (zero debt → **no empty baseline file** left behind).
|
|
187
196
|
6. **Gates + skills** — `--install-agent-gates` (CI monorepo-aware when `frontend/package.json` exists).
|
|
188
197
|
7. **Ratchet + Shape seed (mandatory exploratory close)** — after freeze/gates:
|
|
@@ -197,7 +206,7 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
|
|
|
197
206
|
## Operating modes
|
|
198
207
|
|
|
199
208
|
Explain modes as **detected stages** (Setup / Align / Guard), not user settings.
|
|
200
|
-
**Guard on the contract ≠ Shape done.** Say
|
|
209
|
+
**Guard on the contract ≠ Shape done.** Say leftover design work remains when B residual remains.
|
|
201
210
|
|
|
202
211
|
## Verify
|
|
203
212
|
|
|
@@ -5,8 +5,8 @@ description: Shortcut to /ark-adopt for greenfield shape. Deprecated as a first-
|
|
|
5
5
|
|
|
6
6
|
# /ark-architect — Shortcut to /ark-adopt
|
|
7
7
|
|
|
8
|
-
**
|
|
9
|
-
|
|
8
|
+
**Not a first-run door.** This leftover name is a shortcut. Session 0 is **`/ark-adopt`**.
|
|
9
|
+
Do that job now. Do not send the user to `/ark-contract` or `/ark-fix`.
|
|
10
10
|
|
|
11
11
|
## Autonomy contract
|
|
12
12
|
|
|
@@ -5,9 +5,16 @@ description: Apply Ark end-to-end — explore first; dual plan A (edges) + B (sh
|
|
|
5
5
|
|
|
6
6
|
# /ark-autopilot — Apply the path
|
|
7
7
|
|
|
8
|
-
**
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
**When:** the user wants architecture cleaned end-to-end, or leftover design after a map.
|
|
9
|
+
**Not when:** map only (`/ark-explore`), session 0 / config lying (`/ark-adopt`), or one new file (`/ark-place`).
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
1. Read `arkgate-check --doctor` (do #1).
|
|
14
|
+
2. Fix import-rule debt; if leftover design remains, apply **one** small refactor.
|
|
15
|
+
3. Re-run doctor. Never weaken `ark.config.json`.
|
|
16
|
+
|
|
17
|
+
**This is the apply door.** Invoking it **is** the approval. Doctor remains the control plane.
|
|
11
18
|
|
|
12
19
|
## Autonomy contract
|
|
13
20
|
|
|
@@ -81,7 +88,7 @@ decision-grade explore pass **and** without opening violating files.
|
|
|
81
88
|
2. CLI sensors: `--plan --json`, `--coverage --json` / `--doctor` as needed.
|
|
82
89
|
3. **Dual plan** always emitted (sections A and B).
|
|
83
90
|
4. **Open every file** in plan A `steps[]` (and `target` if present) before classifying a fix.
|
|
84
|
-
5. **“
|
|
91
|
+
5. **“How to fix”** for each A cluster and each B pattern bet.
|
|
85
92
|
6. Apply A → re-run ark-check → rollback on regression. **Never auto-apply B** as mechanical-safe.
|
|
86
93
|
7. **One-pilot loop for B:** when leftover design / design-weak, take **`pilotLoop.nextPilot`** (one extraction card)
|
|
87
94
|
→ apply **only** that pilot **in this turn** → **re-doctor**. Never multi-pilot batch B; residual
|
|
@@ -153,7 +160,7 @@ Use the **`/ark-explore` decision-grade bar** (compressed into the autopilot rep
|
|
|
153
160
|
Include explore **§G** when spaghetti / design-weak signals fire.
|
|
154
161
|
|
|
155
162
|
1. **Headline** — product one-liner + honesty (mode, governed%, false-green / false-promise /
|
|
156
|
-
|
|
163
|
+
leftover design work risk).
|
|
157
164
|
2. **Map** — entry points, lived layout vs globs (one screen). **Concurrent patterns** table when ≥2 styles.
|
|
158
165
|
3. **Phase ladder** — name **Align | Stabilize | Shape** (explore §G).
|
|
159
166
|
4. **Field path** — if `examples/` / gallery / starter docs exist: open ≥2, **run** their check when cheap; flag soft-green or broken demos. Else `Field path: n/a` + internal norm.
|
|
@@ -5,7 +5,7 @@ description: Shortcut to /ark-adopt (session 0) or /ark-autopilot (later config
|
|
|
5
5
|
|
|
6
6
|
# /ark-contract — Shortcut to adopt / autopilot
|
|
7
7
|
|
|
8
|
-
**
|
|
8
|
+
**Not a first-run door.** This leftover name is a shortcut. Writing `ark.config.json` is
|
|
9
9
|
**`/ark-adopt`** at session 0 and **`/ark-autopilot`** afterward. Do that job now.
|
|
10
10
|
|
|
11
11
|
## Autonomy contract
|
|
@@ -5,8 +5,9 @@ description: Ark adoption fitness audit — governed%, gates, baseline honesty,
|
|
|
5
5
|
|
|
6
6
|
# /ark-coverage — Ark adoption fitness (not full recon)
|
|
7
7
|
|
|
8
|
-
**
|
|
9
|
-
|
|
8
|
+
**Not a first-run door.** Fitness numbers only (governed files, gates, baseline).
|
|
9
|
+
Session 0 → **`/ark-adopt`**. Leftover design → **`/ark-explore`**. Apply → **`/ark-autopilot`**.
|
|
10
|
+
Do not send the user to leftover `/ark-contract` or `/ark-fix`.
|
|
10
11
|
|
|
11
12
|
You audit **how this repo uses ArkGate** (coverage, gates, baseline, host write path) and
|
|
12
13
|
what adoption gaps remain. Work autonomously. End with a ranked fitness report.
|
|
@@ -56,7 +57,7 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
|
|
|
56
57
|
2. **Product surface** — name the app/package(s) in one line (not a full recon).
|
|
57
58
|
3. **Read real source** in the top ungoverned / high-risk clusters (minimum **10 files**
|
|
58
59
|
across at least **4 directories**). Prefer domain, features, adapters, routes — not only config.
|
|
59
|
-
4. **“
|
|
60
|
+
4. **“How to fix”** for adoption gaps (globs, install, baseline, intents).
|
|
60
61
|
5. If plan A is empty but you see design-weak / concurrent patterns / god modules:
|
|
61
62
|
list them briefly and **STOP — do not continue this skill as complete** for pattern work —
|
|
62
63
|
**handoff `/ark-explore` (dual-plan seed or shape-focus)**. Do not invent a second explore report here.
|
|
@@ -159,7 +160,7 @@ because governed% is 100% and plan is empty.
|
|
|
159
160
|
2. **Adoption map** — clusters you read for *fitness* (paths) — keep short.
|
|
160
161
|
3. **Ranked table** (adoption residual + install/capability opportunities)
|
|
161
162
|
|
|
162
|
-
| # | Kind | Gap / opportunity | Evidence (path or CLI) |
|
|
163
|
+
| # | Kind | Gap / opportunity | Evidence (path or CLI) | How to fix (concrete) | Next |
|
|
163
164
|
|
|
164
165
|
Kinds: `debt` | `false-green` | `shape` | `manifiesto` | `gates` | `opportunity` | `design-weak`
|
|
165
166
|
|
|
@@ -169,7 +170,7 @@ Kinds: `debt` | `false-green` | `shape` | `manifiesto` | `gates` | `opportunity`
|
|
|
169
170
|
## Done criteria
|
|
170
171
|
|
|
171
172
|
- ≥10 source files read and cited; product surface named.
|
|
172
|
-
- At least one **
|
|
173
|
+
- At least one **How to fix** block with real paths or install commands.
|
|
173
174
|
- CLI numbers used as evidence, not as the whole report.
|
|
174
175
|
- Design residual either absent with evidence or explicitly handed to `/ark-explore`.
|
|
175
176
|
|
|
@@ -5,8 +5,9 @@ description: Explain this project's architecture in plain language and generate
|
|
|
5
5
|
|
|
6
6
|
# /ark-explain — Understand this project's architecture
|
|
7
7
|
|
|
8
|
-
**
|
|
9
|
-
|
|
8
|
+
**Not a first-run door.** Teach / HTML tour only. Session 0 → **`/ark-adopt`**.
|
|
9
|
+
Map → **`/ark-explore`**. Apply → **`/ark-autopilot`**.
|
|
10
|
+
Do not send the user to leftover `/ark-contract` or `/ark-fix`.
|
|
10
11
|
|
|
11
12
|
The user wants to understand the architecture, a specific rule, or why the gate blocked them.
|
|
12
13
|
|