arkgate 4.6.0 → 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 +54 -1
- package/README.md +11 -5
- package/bin/ark-check-runtime.mjs +115 -128
- package/bin/ark-mcp-runtime.mjs +86 -48
- package/bin/ark.mjs +21 -78
- package/bin/lib/agent-projection.mjs +1 -1
- package/bin/lib/analysis-engine.mjs +3 -3
- package/bin/lib/ci-and-commands.mjs +11 -11
- package/bin/lib/config-contract.mjs +2 -0
- package/bin/lib/contract-smells.mjs +5 -5
- package/bin/lib/design-smells.mjs +1 -1
- package/bin/lib/doctor-advisories.mjs +9 -0
- package/bin/lib/doctor-next-actions.mjs +92 -0
- package/bin/lib/doctor-plan.mjs +61 -71
- package/bin/lib/field-install.mjs +1 -1
- package/bin/lib/first-run-help.mjs +221 -0
- package/bin/lib/html-report-advisories.mjs +20 -0
- package/bin/lib/improvement-compass-map.mjs +20 -20
- package/bin/lib/pilot-loop.mjs +1 -1
- package/bin/lib/post-green-path.mjs +2 -2
- package/bin/lib/prepare-change.mjs +9 -0
- package/bin/lib/product-copy.mjs +1 -1
- package/bin/lib/start-preview.mjs +17 -10
- package/bin/lib/status-command.mjs +19 -0
- package/bin/lib/status-manifest.mjs +23 -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 +16 -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 +66 -2
- package/dist/index.js +8 -8
- package/docs/README.md +5 -5
- package/docs/agent-guide.md +21 -17
- package/docs/configuration.md +36 -2
- package/docs/develop.md +13 -1
- 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 +48 -10
- package/docs/use.md +10 -5
- package/package.json +2 -2
- package/schemas/ark.config.schema.json +9 -0
- package/schemas/ark.status-manifest.schema.json +51 -0
- package/server.json +3 -3
- package/templates/agent-skills/README.md +1 -1
- package/templates/agent-skills/ark-adopt/SKILL.md +59 -23
- package/templates/agent-skills/ark-architect/SKILL.md +24 -145
- package/templates/agent-skills/ark-autopilot/SKILL.md +49 -32
- package/templates/agent-skills/ark-contract/SKILL.md +21 -105
- package/templates/agent-skills/ark-coverage/SKILL.md +7 -3
- package/templates/agent-skills/ark-explain/SKILL.md +8 -4
- package/templates/agent-skills/ark-explore/SKILL.md +38 -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 +35 -14
- package/templates/agent-skills/ark-runtime/SKILL.md +3 -3
- package/templates/agent-skills/ark-think/SKILL.md +6 -2
- package/templates/agent-skills/ark-upgrade/SKILL.md +21 -10
- package/templates/skills/ark-adopt.md +59 -23
- package/templates/skills/ark-architect.md +24 -145
- package/templates/skills/ark-autopilot.md +49 -32
- package/templates/skills/ark-contract.md +21 -105
- package/templates/skills/ark-coverage.md +7 -3
- package/templates/skills/ark-explain.md +8 -4
- package/templates/skills/ark-explore.md +38 -21
- package/templates/skills/ark-fix.md +34 -157
- package/templates/skills/ark-loop.md +31 -153
- package/templates/skills/ark-place.md +35 -14
- package/templates/skills/ark-runtime.md +3 -3
- package/templates/skills/ark-think.md +6 -2
- package/templates/skills/ark-upgrade.md +21 -10
|
@@ -1,40 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ark-contract
|
|
3
|
-
description:
|
|
3
|
+
description: Shortcut to /ark-adopt (session 0) or /ark-autopilot (later config tighten). Deprecated as a first-class door.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /ark-contract —
|
|
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
|
+
**`/ark-adopt`** at session 0 and **`/ark-autopilot`** afterward. Do that job now.
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
Name 1–3 **residual** lenses in plain language before skill-shopping. Always `notAScore` — never invent
|
|
12
|
-
0–10 scores or Excellent/Good ranks.
|
|
11
|
+
## Autonomy contract
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
**Anti false-done:** empty plan A + residual lenses / design-weak → **Incomplete? yes**. Green edges alone
|
|
17
|
-
are not “architecture finished.”
|
|
18
|
-
|
|
19
|
-
**AI-easy architecture:** ports over concrete I/O in domain; one concern per module; golden pattern for
|
|
20
|
-
new files; place before write (`/ark-place` / prepare-write).
|
|
21
|
-
|
|
22
|
-
**Out of scope (honest):** scalability/performance, full app-security tooling (SAST), and full resilience
|
|
23
|
-
patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement for them.
|
|
24
|
-
|
|
25
|
-
**Contract edits are last resort.** Policy-delta honesty; do not weaken rules to clear compass residual.
|
|
13
|
+
Invoking this leftover name **is** the approval to write an honest config. Do not
|
|
14
|
+
preview-only. Never weaken the architecture config.
|
|
26
15
|
|
|
27
16
|
## When / not when
|
|
28
17
|
|
|
29
|
-
| Use
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
34
|
-
The **one sanctioned way** to change layers/rules/`intentPrefixes`/includes.
|
|
35
|
-
Also used to **land mined business rules** into the executable manifest (`ark.config.json` +
|
|
36
|
-
intent naming that the project-bound `ark_manifest` tool exposes authoritatively).
|
|
37
|
-
|
|
18
|
+
| Use this leftover name when… | Prefer instead |
|
|
19
|
+
|------------------------------|----------------|
|
|
20
|
+
| Layers / include / ArkRules need an edit | **`/ark-adopt`** (path) or **`/ark-autopilot`** (tighten) |
|
|
21
|
+
| False-green / concentrated edge | **`/ark-adopt`** — write the honest config |
|
|
38
22
|
|
|
39
23
|
## Dual engine (mandatory)
|
|
40
24
|
|
|
@@ -45,8 +29,6 @@ intent naming that the project-bound `ark_manifest` tool exposes authoritatively
|
|
|
45
29
|
|
|
46
30
|
The CLI is a **sensor**, never the whole job. Claiming done without the exploratory bar for this skill is **incomplete**.
|
|
47
31
|
|
|
48
|
-
|
|
49
|
-
|
|
50
32
|
## MCP workspace binding (mandatory)
|
|
51
33
|
|
|
52
34
|
Before any `ark_*` MCP tool, call `ark_identity` with `project.expectedRoot` set to the exact
|
|
@@ -58,90 +40,27 @@ restart/retargeting is required. `ark://manifest` never satisfies this preflight
|
|
|
58
40
|
|
|
59
41
|
## Dual plane — layers + ArkRules (mandatory, except /ark-runtime)
|
|
60
42
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
| Plane | What it protects | Where it lives | Sensors / tools |
|
|
64
|
-
|-------|------------------|----------------|-----------------|
|
|
65
|
-
| **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
|
|
66
|
-
| **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
|
|
67
|
-
|
|
68
|
-
**Rules for every report / answer:**
|
|
69
|
-
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** (or a two-column table with those headers).
|
|
70
|
-
2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
|
|
71
|
-
3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
|
|
72
|
-
4. Editing `arkrules/*` or promoting modes is **`/ark-contract`**; fixing code under a structure sensor is **`/ark-fix`** / **`/ark-loop`** (judgment, never invent mechanical-safe).
|
|
73
|
-
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
### Contract + ArkRules
|
|
77
|
-
- You own **both** `layers/rules` and `arkRules`/`arkrules/*.json`.
|
|
78
|
-
- Report diffs in two blocks: **[Layer] config** and **[ArkRules] files**.
|
|
79
|
-
- Promotion ladder: advisory→enforced only with coverage; demote = hash-ack weakening.
|
|
43
|
+
Label findings **`[Layer]`** vs **`[ArkRules]`**. Absence of `arkRules` is valid.
|
|
80
44
|
|
|
81
45
|
## Subagent fan-out (optional, host-dependent)
|
|
82
46
|
|
|
83
|
-
If the host supports **parallel subagents
|
|
84
|
-
|
|
85
|
-
Parent merges and still emits the **### Completion** contract. Never parallel-write
|
|
86
|
-
the same files or weaken the gate.
|
|
47
|
+
If the host supports **parallel subagents**, fan out read-only scouts; otherwise
|
|
48
|
+
**fall back to sequential**. Never weaken the gate.
|
|
87
49
|
|
|
88
50
|
## Related onboarding
|
|
89
51
|
|
|
90
|
-
- **Greenfield:** `/ark-
|
|
91
|
-
- **Brownfield:** `/ark-adopt` — match
|
|
92
|
-
- **Default path:** `ark start` → `/ark-autopilot` → `ark-check --doctor`.
|
|
93
|
-
|
|
94
|
-
## Anti-wrapper rule (mandatory)
|
|
95
|
-
|
|
96
|
-
**Forbidden:** editing globs from vibes without reading the directories those globs claim to cover.
|
|
97
|
-
|
|
98
|
-
**Required:**
|
|
99
|
-
1. Snapshot before using CLI as **sensor**: coverage + check JSON.
|
|
100
|
-
2. **Read source** in dirs you reclassify (sample files).
|
|
101
|
-
3. **“Así te lo re-soluciono”** — exact JSON fields + which files become governed/ungoverned.
|
|
102
|
-
4. After write: `ark-check --strict-config` must be the validation gate (dead pattern noise is advisory; unclassified + real violations still matter).
|
|
103
|
-
|
|
104
|
-
## What you may edit
|
|
105
|
-
|
|
106
|
-
- `include` / `exclude`
|
|
107
|
-
- `layers[]` (`name`, `patterns`, `optional`, `forbiddenGlobals`, `intentPrefixes`, layer `exclude`)
|
|
108
|
-
- `rules[]` (from/to/allowed)
|
|
109
|
-
- **`arkRules` map + `arkrules/<Layer>.json`** (ADR 0012/0014) — structure sensors + invariant catalog;
|
|
110
|
-
promote advisory→enforced only with coverage evidence; demote/delete requires hash-bound policy ack
|
|
111
|
-
- Never: disable the check, delete CI gates, or add blanket `allowed: true` for a bad edge without a facade design
|
|
52
|
+
- **Greenfield:** `/ark-adopt` or `ark-check --recommend` / `ark start`.
|
|
53
|
+
- **Brownfield:** `/ark-adopt` — match config to reality.
|
|
112
54
|
|
|
113
55
|
## Steps
|
|
114
56
|
|
|
115
|
-
1.
|
|
116
|
-
2.
|
|
117
|
-
|
|
118
|
-
- Expand patterns for ungoverned dirs (`suggestions` from coverage)
|
|
119
|
-
- Facade: public surface patterns more specific than internals
|
|
120
|
-
- **Business rules → manifiesto:**
|
|
121
|
-
- Add/adjust `intentPrefixes` (`Domain.`, `Application.`, …)
|
|
122
|
-
- Point Domain patterns at real pure folders (`**/domain/**`, not bare `**/types.ts`)
|
|
123
|
-
- Document proposed intent names for the app to register (kernel) or for agents to use
|
|
124
|
-
3. **Impact** — re-run coverage/check; report before/after governed% and violation delta.
|
|
125
|
-
4. **Rollback** if strict fails for reasons other than pre-existing debt the user accepted.
|
|
126
|
-
|
|
127
|
-
## Operating modes
|
|
128
|
-
|
|
129
|
-
Contract edits are most common in **Align (Adapt)**. In **Guard (Enforce)**, treat edits as high-risk product decisions.
|
|
130
|
-
|
|
131
|
-
## Critical handoffs
|
|
132
|
-
|
|
133
|
-
- After contract is honest but residual violations remain: **STOP — do not continue this skill as complete.** **STOP — bulk residual debt: invoke /ark-loop or /ark-autopilot** instead of ad-hoc multi-file grinding without a plan.
|
|
134
|
-
- New artifact home after reclassify: **STOP — do not continue this skill as complete.** **STOP — new file placement: invoke /ark-place** when the user needs a new artifact home.
|
|
135
|
-
|
|
136
|
-
## Done
|
|
137
|
-
|
|
138
|
-
- Diff of `ark.config.json` explained in plain language.
|
|
139
|
-
- **Así te lo re-soluciono en el manifiesto** when intents/Domain were part of the request.
|
|
140
|
-
- Strict check result captured.
|
|
57
|
+
1. If the path is missing or lying → execute **`/ark-adopt`**.
|
|
58
|
+
2. If the path is honest and you are tightening rules → execute **`/ark-autopilot`**.
|
|
59
|
+
3. `ark-check --strict-config`.
|
|
141
60
|
|
|
142
61
|
## Completion contract (skill incomplete if missing)
|
|
143
62
|
|
|
144
|
-
|
|
63
|
+
Skill incomplete if missing any field below.
|
|
145
64
|
|
|
146
65
|
### Completion
|
|
147
66
|
- **Sensor:** commands/tools run
|
|
@@ -149,8 +68,5 @@ End with **exactly** these headings (markdown `###`):
|
|
|
149
68
|
- **Result:** one-line outcome
|
|
150
69
|
- **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
|
|
151
70
|
- **Compass:** top residual lenses | `n/a`
|
|
152
|
-
- **Handoff:** `/ark
|
|
71
|
+
- **Handoff:** `/ark-adopt` / `/ark-autopilot` / `none`
|
|
153
72
|
- **Incomplete?** `no` | `yes — <what is missing>`
|
|
154
|
-
|
|
155
|
-
If a **STOP** handoff applies and you continued as if done, set **Incomplete?** to `yes`.
|
|
156
|
-
**Skill incomplete if missing** any of the bullets above.
|
|
@@ -5,6 +5,10 @@ description: Ark adoption fitness audit — governed%, gates, baseline honesty,
|
|
|
5
5
|
|
|
6
6
|
# /ark-coverage — Ark adoption fitness (not full recon)
|
|
7
7
|
|
|
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`.
|
|
11
|
+
|
|
8
12
|
You audit **how this repo uses ArkGate** (coverage, gates, baseline, host write path) and
|
|
9
13
|
what adoption gaps remain. Work autonomously. End with a ranked fitness report.
|
|
10
14
|
|
|
@@ -53,7 +57,7 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
|
|
|
53
57
|
2. **Product surface** — name the app/package(s) in one line (not a full recon).
|
|
54
58
|
3. **Read real source** in the top ungoverned / high-risk clusters (minimum **10 files**
|
|
55
59
|
across at least **4 directories**). Prefer domain, features, adapters, routes — not only config.
|
|
56
|
-
4. **“
|
|
60
|
+
4. **“How to fix”** for adoption gaps (globs, install, baseline, intents).
|
|
57
61
|
5. If plan A is empty but you see design-weak / concurrent patterns / god modules:
|
|
58
62
|
list them briefly and **STOP — do not continue this skill as complete** for pattern work —
|
|
59
63
|
**handoff `/ark-explore` (dual-plan seed or shape-focus)**. Do not invent a second explore report here.
|
|
@@ -156,7 +160,7 @@ because governed% is 100% and plan is empty.
|
|
|
156
160
|
2. **Adoption map** — clusters you read for *fitness* (paths) — keep short.
|
|
157
161
|
3. **Ranked table** (adoption residual + install/capability opportunities)
|
|
158
162
|
|
|
159
|
-
| # | Kind | Gap / opportunity | Evidence (path or CLI) |
|
|
163
|
+
| # | Kind | Gap / opportunity | Evidence (path or CLI) | How to fix (concrete) | Next |
|
|
160
164
|
|
|
161
165
|
Kinds: `debt` | `false-green` | `shape` | `manifiesto` | `gates` | `opportunity` | `design-weak`
|
|
162
166
|
|
|
@@ -166,7 +170,7 @@ Kinds: `debt` | `false-green` | `shape` | `manifiesto` | `gates` | `opportunity`
|
|
|
166
170
|
## Done criteria
|
|
167
171
|
|
|
168
172
|
- ≥10 source files read and cited; product surface named.
|
|
169
|
-
- At least one **
|
|
173
|
+
- At least one **How to fix** block with real paths or install commands.
|
|
170
174
|
- CLI numbers used as evidence, not as the whole report.
|
|
171
175
|
- Design residual either absent with evidence or explicitly handed to `/ark-explore`.
|
|
172
176
|
|
|
@@ -5,6 +5,10 @@ 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
|
+
**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`.
|
|
11
|
+
|
|
8
12
|
The user wants to understand the architecture, a specific rule, or why the gate blocked them.
|
|
9
13
|
|
|
10
14
|
## Improvement compass (process preflight)
|
|
@@ -31,7 +35,7 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
|
|
|
31
35
|
| Use `/ark-explain` when… | Do **not** use it when… |
|
|
32
36
|
|--------------------------|-------------------------|
|
|
33
37
|
| Plain-language tour of layers/rules/report | Decision-grade recon / dual-plan → `/ark-explore` |
|
|
34
|
-
| “Why did the gate block me?” pedagogy | Apply fixes → `/ark-
|
|
38
|
+
| “Why did the gate block me?” pedagogy | Apply fixes → `/ark-autopilot` |
|
|
35
39
|
| Generate / walk HTML showcase report | Fitness numbers only → `/ark-coverage`; brownfield action → `/ark-adopt` |
|
|
36
40
|
Your job is to **teach with this repo's real data** and leave a shareable visual artifact.
|
|
37
41
|
|
|
@@ -68,7 +72,7 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
|
|
|
68
72
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** (or a two-column table with those headers).
|
|
69
73
|
2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
|
|
70
74
|
3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
|
|
71
|
-
4. Editing `arkrules/*` or
|
|
75
|
+
4. Editing `arkrules/*` or applying structure fixes is **`/ark-adopt`** / **`/ark-autopilot`** (never invent `mechanical-safe`).
|
|
72
76
|
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
|
|
73
77
|
|
|
74
78
|
|
|
@@ -186,7 +190,7 @@ when residual signals remain.
|
|
|
186
190
|
- If a DI/kernel framework border exists, explain public surface vs internals.
|
|
187
191
|
3. **If asked about a specific rule or block**, answer with: the rule, the consequence it
|
|
188
192
|
prevents, and the sanctioned fix (usually a port). If they want it fixed now:
|
|
189
|
-
**STOP — do not continue this skill as complete.** **STOP — fix requested
|
|
193
|
+
**STOP — do not continue this skill as complete.** **STOP — fix requested:** invoke `/ark-autopilot`.
|
|
190
194
|
This skill stays read-only.
|
|
191
195
|
4. **If asked "what's a port/adapter/saga…"**, two sentences + this-repo example or conventional path.
|
|
192
196
|
|
|
@@ -206,7 +210,7 @@ when residual signals remain.
|
|
|
206
210
|
|
|
207
211
|
## Related
|
|
208
212
|
|
|
209
|
-
- Onboarding: `/ark-architect
|
|
213
|
+
- Onboarding: `/ark-adopt` (or leftover `/ark-architect`), `ark-check --recommend`, `docs/enthusiast/README.md`
|
|
210
214
|
- Brownfield: `/ark-adopt`, `docs/brownfield-adoption.md`
|
|
211
215
|
- Autopilot: `/ark-autopilot` after the user understands the contract
|
|
212
216
|
|
|
@@ -1,13 +1,30 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ark-explore
|
|
3
|
-
description:
|
|
3
|
+
description: Map skill — decision-grade recon of layers + ArkRules opportunities + dual-plan seed (no apply). Primary post-green door when leftover design work remains. CLI is a sensor; you read the tree. No gate bypass.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /ark-explore — Recon the real project (map only)
|
|
7
7
|
|
|
8
|
-
**
|
|
9
|
-
|
|
10
|
-
|
|
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
|
+
|
|
17
|
+
## Autonomy contract
|
|
18
|
+
|
|
19
|
+
Invoking this skill **is** the approval to **map**. Open the real tree. CLI JSON alone is
|
|
20
|
+
incomplete. **Do not write** config or product code (that is `/ark-adopt` / `/ark-autopilot`).
|
|
21
|
+
**CLI budget:** one doctor / coverage; then open ≥12 files across ≥4 dirs; then the map.
|
|
22
|
+
|
|
23
|
+
**Still never:** weaken the config; invent `mechanical-safe` kinds; claim healthy because
|
|
24
|
+
plan A is empty while leftover design work remains.
|
|
25
|
+
|
|
26
|
+
Use when you need a decision-grade map or the **Primary post-green door**; hand off to
|
|
27
|
+
`/ark-autopilot` to apply. Day-to-day place + gate work does not require this skill.
|
|
11
28
|
|
|
12
29
|
You are a **staff engineer doing architecture reconnaissance** on *this* repository.
|
|
13
30
|
Ark’s CLI is a **sensor** (coverage, doctor, plan). **You** open source, entry points,
|
|
@@ -58,15 +75,15 @@ If the consumer tree has a **domain glossary**, prefer its terms for layer/slice
|
|
|
58
75
|
|
|
59
76
|
| Use `/ark-explore` when… | Do **not** use it when… |
|
|
60
77
|
|--------------------------|-------------------------|
|
|
61
|
-
| Map / “what next?” / residual after ENFORCE | User wants edits applied → `/ark-autopilot`
|
|
78
|
+
| Map / “what next?” / residual after ENFORCE | User wants edits applied → `/ark-autopilot` |
|
|
62
79
|
| **Primary post-green door:** messy / leftover design work / “clarify for AI” | Skill-shopping coverage or think for the same leftover work |
|
|
63
80
|
| Spaghetti brownfield: patterns concurrent, design-weak under green check | Only “governed% + gates installed?” numbers → `/ark-coverage` |
|
|
64
81
|
| Dual-plan **seed** (A remediation + B pattern bets) without applying | One design trade-off between 2–3 options already mapped → `/ark-think` |
|
|
65
82
|
| Path-correct vs design-correct honesty | Plain-language tour / HTML report → `/ark-explain` |
|
|
66
83
|
|
|
67
84
|
**Post-green single path:** when doctor `postGreenPath` / ENFORCE · leftover design work is active, **this skill
|
|
68
|
-
(shape-focus / dual-plan seed) is the map half of the one door** — then `/ark-autopilot`
|
|
69
|
-
|
|
85
|
+
(shape-focus / dual-plan seed) is the map half of the one door** — then `/ark-autopilot`
|
|
86
|
+
applies one B pilot. Do not send the user to coverage or think as equal first choices.
|
|
70
87
|
|
|
71
88
|
### Status lights (rank residual; not settings)
|
|
72
89
|
|
|
@@ -82,8 +99,8 @@ to apply B with user OK. Do not send the user to coverage or think as equal firs
|
|
|
82
99
|
|
|
83
100
|
## Related onboarding
|
|
84
101
|
|
|
85
|
-
- **Greenfield / thin tree:** `/ark-
|
|
86
|
-
- **Brownfield action (write
|
|
102
|
+
- **Greenfield / thin tree:** `/ark-adopt` or `ark-check --recommend` / `ark start`.
|
|
103
|
+
- **Brownfield action (write config/baseline):** `/ark-adopt` after the map.
|
|
87
104
|
- **Execute dual plan:** `/ark-autopilot` (explore seeds; autopilot applies A, proposes B).
|
|
88
105
|
- **Default path:** `ark start` → `ark-check --doctor` → `/ark-autopilot` for guided apply; use this skill for map-only or post-green Shape residual.
|
|
89
106
|
|
|
@@ -129,7 +146,7 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
|
|
|
129
146
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** (or a two-column table with those headers).
|
|
130
147
|
2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
|
|
131
148
|
3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
|
|
132
|
-
4. Editing `arkrules/*` or
|
|
149
|
+
4. Editing `arkrules/*` or applying structure fixes is **`/ark-adopt`** / **`/ark-autopilot`** — explore does not write (never invent `mechanical-safe`).
|
|
133
150
|
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
|
|
134
151
|
|
|
135
152
|
|
|
@@ -300,7 +317,7 @@ Prefer bets the user can run next (`command` / skill), not vague “improve DX
|
|
|
300
317
|
| **Stabilize** | ENFORCE + honest baseline only for real debt | 0 new edges; doctor not lying about write path/CI |
|
|
301
318
|
| **Shape** | One **golden** pattern + pilot cluster | Pilot smells cleared; rest is migrate-on-touch; B bets have success signals |
|
|
302
319
|
|
|
303
|
-
ENFORCE without Shape progress is
|
|
320
|
+
ENFORCE without Shape progress is leftover design work — say that out loud. It is **not** “healthy finished.”
|
|
304
321
|
|
|
305
322
|
**Agent-detected design smells** (list any that apply; paths required — these may predate doctor IDs):
|
|
306
323
|
|
|
@@ -333,8 +350,8 @@ Empty plan A + design-weak is **not** architecture finished. Plan B is judgment
|
|
|
333
350
|
| 1. Confirm residual | `designFitness.designWeak` **or** non-empty `patternBets` / `designSmells` | You would claim healthy finished because plan A is empty |
|
|
334
351
|
| 2. Pick **one** pilot | `pilotLoop.nextPilot` (preferred) **or** one ranked B bet with a path scope | Multi-pilot batch / “fix all smells this PR” |
|
|
335
352
|
| 3. Write extraction card | Pilot · Smell · Move · Do not · Success · **Kill-switch** · Next | Missing kill-switch or success signal |
|
|
336
|
-
| 4.
|
|
337
|
-
| 5. Apply **only** that pilot | Via `/ark-autopilot` (
|
|
353
|
+
| 4. Stay map-only here | Explore does not edit | Silent auto-apply of plan B |
|
|
354
|
+
| 5. Apply **only** that pilot | Via `/ark-autopilot` (one cluster) | Opening a second pilot before re-doctor |
|
|
338
355
|
| 6. Re-doctor | Success = reduced evidence on pilot paths; residual outside pilot may remain | Declaring whole-tree done from one pilot |
|
|
339
356
|
|
|
340
357
|
**Hard lines (never break):**
|
|
@@ -356,7 +373,7 @@ Do not:
|
|
|
356
373
|
- open a second pilot before re-doctor
|
|
357
374
|
Success: <observable / falsifiable — re-doctor>
|
|
358
375
|
Kill-switch: <stop condition — e.g. if pilot does not clear smell evidence in 1 PR → stop / re-map>
|
|
359
|
-
Next: /ark-autopilot (apply
|
|
376
|
+
Next: /ark-autopilot (apply one pilot) | re-doctor
|
|
360
377
|
```
|
|
361
378
|
|
|
362
379
|
When doctor JSON is available, prefer smell `id`s from `designSmells` / `patternBets[].smellId`
|
|
@@ -366,24 +383,24 @@ and the ranked **`pilotLoop.nextPilot`**.
|
|
|
366
383
|
|
|
367
384
|
State **Mode: recon | dual-plan seed | shape-focus** and **Phase: Align | Stabilize | Shape** in the first lines.
|
|
368
385
|
|
|
369
|
-
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.
|
|
370
387
|
2. **Map** — entry points, major dirs, shape name (or “no honest shape yet”). One screen. **Patterns concurrent** table when §B/§G requires it.
|
|
371
388
|
3. **What I opened** — paths + sensors (include field/hook/origin when used).
|
|
372
389
|
4. **Ranked table** — **only rows that change a decision**. Prefer **3–6** hard rows.
|
|
373
390
|
|
|
374
|
-
| # | Kind | Finding | Evidence (path) |
|
|
391
|
+
| # | Kind | Finding | Evidence (path) | How to fix | Success signal | Next skill / command |
|
|
375
392
|
|
|
376
393
|
Kinds: `risk` | `false-green` | `debt` | `opportunity` | `shape` | `manifiesto` | `agent-dx` | `design-weak`
|
|
377
394
|
|
|
378
|
-
**
|
|
395
|
+
**How to fix** must be concrete: files to touch, command to run.
|
|
379
396
|
**Success signal** must be falsifiable (see §F).
|
|
380
397
|
|
|
381
398
|
5. **Field path summary**.
|
|
382
399
|
6. **Top 3 bets** — first bet = highest leverage residual, even when plan A is empty (design-correct / agent-dx / field honesty — **not** “run loop on zero steps”).
|
|
383
|
-
On false-green dominant: **STOP — do not continue this skill as complete.** **STOP — false-green
|
|
384
|
-
On concentrated edge dominant: **STOP — do not continue this skill as complete.** **STOP — concentrated edge
|
|
400
|
+
On false-green dominant: **STOP — do not continue this skill as complete.** **STOP — false-green:** name the honesty gap; next door is `/ark-adopt` (write). Do not claim goal.met / ENFORCE from type-only cleanup while doctor reports `contract-false-green-io-under-application`.
|
|
401
|
+
On concentrated edge dominant: **STOP — do not continue this skill as complete.** **STOP — concentrated edge:** name the config smell with source evidence; next door is `/ark-adopt` (do not freeze a wrong config or grind N freezes).
|
|
385
402
|
7. **Dual-plan seed** — required in dual-plan seed / shape-focus (and when §G auto-upgrades); A + B cap 3–5; extraction cards for I/O bets.
|
|
386
|
-
8. **Deterministic residue** — plan completeness, steps, violations, doctor top action. Point to `/ark-
|
|
403
|
+
8. **Deterministic residue** — plan completeness, steps, violations, doctor top action. Point to `/ark-autopilot` **when A steps exist**; never call a `partial`/`unavailable` plan met, and never pretend an empty plan is the architecture story when leftover design remains.
|
|
387
404
|
|
|
388
405
|
Optional: **Diff vs naive sensor-only read** (what reading the tree changed).
|
|
389
406
|
|
|
@@ -397,7 +414,7 @@ Optional: **Diff vs naive sensor-only read** (what reading the tree changed).
|
|
|
397
414
|
- When §G fires: phase named, design smells listed with paths, dual-plan B or shape-focus B present.
|
|
398
415
|
- Every Top-3 / B bet has a **success signal**; new-layer bets have a **kill-switch** + pilot.
|
|
399
416
|
- Mode respected: no multi-week roadmap in recon mode; dual-plan seed capped at 3–5 B bets.
|
|
400
|
-
- Clear handoff: `/ark-adopt` | `/ark-
|
|
417
|
+
- Clear handoff: `/ark-adopt` | `/ark-autopilot` | `/ark-place` | CLI | `stop`.
|
|
401
418
|
- No gate weakening; no false ENFORCE claim; no README echo as primary content.
|
|
402
419
|
|
|
403
420
|
## Completion contract (skill incomplete if missing)
|