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.
Files changed (78) hide show
  1. package/CHANGELOG.md +54 -1
  2. package/README.md +11 -5
  3. package/bin/ark-check-runtime.mjs +115 -128
  4. package/bin/ark-mcp-runtime.mjs +86 -48
  5. package/bin/ark.mjs +21 -78
  6. package/bin/lib/agent-projection.mjs +1 -1
  7. package/bin/lib/analysis-engine.mjs +3 -3
  8. package/bin/lib/ci-and-commands.mjs +11 -11
  9. package/bin/lib/config-contract.mjs +2 -0
  10. package/bin/lib/contract-smells.mjs +5 -5
  11. package/bin/lib/design-smells.mjs +1 -1
  12. package/bin/lib/doctor-advisories.mjs +9 -0
  13. package/bin/lib/doctor-next-actions.mjs +92 -0
  14. package/bin/lib/doctor-plan.mjs +61 -71
  15. package/bin/lib/field-install.mjs +1 -1
  16. package/bin/lib/first-run-help.mjs +221 -0
  17. package/bin/lib/html-report-advisories.mjs +20 -0
  18. package/bin/lib/improvement-compass-map.mjs +20 -20
  19. package/bin/lib/pilot-loop.mjs +1 -1
  20. package/bin/lib/post-green-path.mjs +2 -2
  21. package/bin/lib/prepare-change.mjs +9 -0
  22. package/bin/lib/product-copy.mjs +1 -1
  23. package/bin/lib/start-preview.mjs +17 -10
  24. package/bin/lib/status-command.mjs +19 -0
  25. package/bin/lib/status-manifest.mjs +23 -0
  26. package/bin/lib/team-parliament-io.mjs +338 -0
  27. package/bin/lib/team-parliament.mjs +383 -0
  28. package/bin/lib/upgrade-whats-new.mjs +16 -0
  29. package/bin/lib/violations.mjs +8 -4
  30. package/dist/{configTypes-CC0FEXoF.d.ts → configTypes-B8uIcLaG.d.ts} +5 -0
  31. package/dist/eslint/index.cjs +2 -2
  32. package/dist/eslint/index.d.ts +1 -1
  33. package/dist/eslint/index.js +2 -2
  34. package/dist/index.cjs +8 -8
  35. package/dist/index.d.ts +66 -2
  36. package/dist/index.js +8 -8
  37. package/docs/README.md +5 -5
  38. package/docs/agent-guide.md +21 -17
  39. package/docs/configuration.md +36 -2
  40. package/docs/develop.md +13 -1
  41. package/docs/enthusiast/README.md +1 -1
  42. package/docs/enthusiast/how-to-agent-gates.md +3 -3
  43. package/docs/enthusiast/how-to-pick-shape.md +2 -2
  44. package/docs/enthusiast/tutorial-first-project.md +4 -3
  45. package/docs/package-surface.md +5 -3
  46. package/docs/product-voice.md +48 -10
  47. package/docs/use.md +10 -5
  48. package/package.json +2 -2
  49. package/schemas/ark.config.schema.json +9 -0
  50. package/schemas/ark.status-manifest.schema.json +51 -0
  51. package/server.json +3 -3
  52. package/templates/agent-skills/README.md +1 -1
  53. package/templates/agent-skills/ark-adopt/SKILL.md +59 -23
  54. package/templates/agent-skills/ark-architect/SKILL.md +24 -145
  55. package/templates/agent-skills/ark-autopilot/SKILL.md +49 -32
  56. package/templates/agent-skills/ark-contract/SKILL.md +21 -105
  57. package/templates/agent-skills/ark-coverage/SKILL.md +7 -3
  58. package/templates/agent-skills/ark-explain/SKILL.md +8 -4
  59. package/templates/agent-skills/ark-explore/SKILL.md +38 -21
  60. package/templates/agent-skills/ark-fix/SKILL.md +34 -157
  61. package/templates/agent-skills/ark-loop/SKILL.md +31 -153
  62. package/templates/agent-skills/ark-place/SKILL.md +35 -14
  63. package/templates/agent-skills/ark-runtime/SKILL.md +3 -3
  64. package/templates/agent-skills/ark-think/SKILL.md +6 -2
  65. package/templates/agent-skills/ark-upgrade/SKILL.md +21 -10
  66. package/templates/skills/ark-adopt.md +59 -23
  67. package/templates/skills/ark-architect.md +24 -145
  68. package/templates/skills/ark-autopilot.md +49 -32
  69. package/templates/skills/ark-contract.md +21 -105
  70. package/templates/skills/ark-coverage.md +7 -3
  71. package/templates/skills/ark-explain.md +8 -4
  72. package/templates/skills/ark-explore.md +38 -21
  73. package/templates/skills/ark-fix.md +34 -157
  74. package/templates/skills/ark-loop.md +31 -153
  75. package/templates/skills/ark-place.md +35 -14
  76. package/templates/skills/ark-runtime.md +3 -3
  77. package/templates/skills/ark-think.md +6 -2
  78. package/templates/skills/ark-upgrade.md +21 -10
@@ -5,13 +5,25 @@ description: Upgrade ArkGate through a content-identity preview, preserve custom
5
5
 
6
6
  # /ark-upgrade — managed ArkGate upgrade
7
7
 
8
- Upgrade the published `arkgate` package and its managed gates without treating a
9
- filename, package version, or similar-looking file as proof of ownership. The
10
- preview is the source of truth: inspect it before applying anything.
8
+ **When:** bump the published `arkgate` package and refresh managed gates.
9
+ **Not when:** session 0 (`/ark-adopt`) or leftover design (`/ark-explore`).
11
10
 
12
- For greenfield onboarding, start with `/ark-architect` (or
13
- `ark-check --recommend`); for a brownfield repository, use `/ark-adopt` before
14
- this upgrade flow.
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.
18
+
19
+ ## Autonomy contract
20
+
21
+ Invoking this skill **is** the approval. Preview, then `--apply` **in this turn**.
22
+ Stopping at preview is incomplete unless the probe failed or a conflict needs
23
+ `--accept-conflicts` / `--refresh-skills` consent.
24
+
25
+ For session 0, start with `/ark-adopt` (or `ark-check --recommend`); brownfield
26
+ honesty is `/ark-adopt` before this upgrade flow.
15
27
 
16
28
  ## Improvement compass (process preflight)
17
29
 
@@ -99,7 +111,7 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
99
111
  1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** (or a two-column table with those headers).
100
112
  2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
101
113
  3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
102
- 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).
114
+ 4. After upgrade, leftover architecture work is **`/ark-autopilot`** (never invent `mechanical-safe`).
103
115
  5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
104
116
 
105
117
 
@@ -241,9 +253,8 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
241
253
  `doctor.deepModuleCoach` honesty. Run `npx arkgate agents-md --check` and
242
254
  `npx arkgate status --json`. If MCP was used, restart MCP after package bump and re-bind
243
255
  identity. Treat provider-unavailable CI required-check evidence as `unverified`, never as proof
244
- that merges are blocked. If new violations appear, hand off to `/ark-fix` for a small set or
245
- `/ark-loop` / `/ark-autopilot` for residual debt; do not regenerate a baseline without explicit
246
- approval.
256
+ that merges are blocked. If new violations appear, hand off to `/ark-autopilot`; do not regenerate a baseline without
257
+ explicit approval.
247
258
 
248
259
  ## Active host vs deferred hosts
249
260
 
@@ -1,15 +1,51 @@
1
1
  ---
2
2
  name: ark-adopt
3
- description: Brownfield onboardingmatch contract to real product code, classify ungoverned dirs, mine business rules, freeze only real debt, seed Shape dual-plan B for spaghetti residual. Deep source analysis required.
3
+ description: Session 0mark the Ark path. Greenfield scaffold or brownfield honesty. Write ark.config, optional advisory ArkRules, baseline, and gates in this turn. CLI validates.
4
4
  ---
5
5
 
6
- # /ark-adopt — Bring Ark into an existing codebase
6
+ # /ark-adopt — Mark the path (session 0)
7
7
 
8
- Goal: contract reflects **product reality**, most code governed, only genuine debt frozen
9
- with a burn-down. A green check over a wrong contract is a **false green**.
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
+
17
+ Invoking this skill **is** the approval. Write the architecture config in this turn.
18
+ Greenfield: scaffold like `--recommend`. Brownfield: match **product
19
+ reality**, freeze only genuine debt. A green check over a wrong config is a **false green**.
20
+
21
+ ## Autonomy contract
22
+
23
+ The CLI is a **sensor and gate**, never the deliverable. **CLI budget:** one
24
+ `ark-check --recommend` or `--coverage` / `--doctor`; then write; then `ark-check`.
25
+ Forbidden as the result: preview-only adopt, “approve?”, or `STOP — invoke /ark-architect`
26
+ / `/ark-contract`. Do that work **here**.
27
+
28
+ **Still never:** weaken `ark.config.json`; invent `mechanical-safe` kinds; claim finished
29
+ while leftover design work remains.
30
+
31
+ **Team lock:** this door **is** a contract session (law-only). Do not mix product source
32
+ into the same diff. After writes, validate with
33
+ `ark-check --contract-diff --contract-session --base <merge-ref> --author <steward>`.
34
+ If `stewards` is set, loosen and baseline-grow require a listed author. Feature work
35
+ uses `/ark-place` / `/ark-autopilot` and must not touch the constitution.
36
+
37
+ **Several hands → ask for stewards.** Read `doctor.stewardNudge` (or the human
38
+ **Stewards (advisory)** line). Act when `needsStewards` **or** `drift` is true.
39
+ **Ask once** before writing `stewards[]`. Identity is a **GitHub handle or email**
40
+ (`pedroknigge` or the GitHub noreply mail), not git `user.name`. Empty list: use
41
+ `proposed` (CODEOWNERS first, else git handles/emails; bots and display names stripped).
42
+ Drift: CODEOWNERS handles in `missingFromList`, or “team grew” (author count > steward
43
+ count) — ask who else owns the law. If the user says yes or names handles or emails,
44
+ write them in this turn. If they say the list is still right, leave it. Never invent
45
+ or auto-remove stewards.
10
46
 
11
47
  **Adopt is Align + Stabilize, then seed Shape.** Freezing debt without a pattern plan leaves
12
- spaghetti “ENFORCE · design-weak”. Always end with dual-plan **B** seeds (or handoff explore)
48
+ spaghetti leftover design work. Always end with dual-plan **B** seeds (or handoff explore)
13
49
  when design smells remain after the contract is honest.
14
50
 
15
51
  ## Improvement compass (process preflight)
@@ -47,10 +83,10 @@ When present, prefer the consumer **domain glossary** for layer names, slice fol
47
83
 
48
84
  | Use `/ark-adopt` when… | Do **not** use it when… |
49
85
  |------------------------|-------------------------|
50
- | Existing messy repo; contract folders | Empty greenfield shape → `/ark-architect` |
51
- | False-green / concentrated edge needs contract truth | Map-only without writing config/baseline → `/ark-explore` |
52
- | Mine loose business rules into Domain / intents | Single violation fix → `/ark-fix` |
53
- | Freeze **real** debt after contract is honest | Grind plan A only → `/ark-loop`; full apply loop → `/ark-autopilot` |
86
+ | Session 0: empty tree or existing repo needs an honest path | Map-only without writing config → `/ark-explore` |
87
+ | False-green / concentrated edge needs config truth | Feature file only → `/ark-place` |
88
+ | Mine loose business rules into Domain / advisory ArkRules | Apply leftover design after the path is honest → `/ark-autopilot` |
89
+ | Freeze **real** debt after the config is honest | User said map only |
54
90
 
55
91
  ## Dual engine (mandatory)
56
92
 
@@ -83,13 +119,13 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
83
119
  1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** (or a two-column table with those headers).
84
120
  2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
85
121
  3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
86
- 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).
122
+ 4. Editing `arkrules/*` or promoting modes is **this skill** (session 0) or **`/ark-autopilot`** later; never invent `mechanical-safe`.
87
123
  5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
88
124
 
89
125
 
90
126
  ### Adopt + ArkRules
91
127
  - After classify: emit or refresh `arkRules` for matched layers (exact names; generic mold for unknowns).
92
- - Mine rules → inventory + propose invariants/structure; land via `/ark-contract`.
128
+ - Mine rules → inventory + write advisory invariants/structure into `arkrules/<Layer>.json` **in this turn**.
93
129
  - Freeze baseline is **[Layer]** debt; inventory residual is **[ArkRules]** — report both.
94
130
 
95
131
  ## Subagent fan-out (optional, host-dependent)
@@ -111,10 +147,10 @@ feature dirs, plan clusters), you **may** dispatch **subagents**:
111
147
 
112
148
  ## Related onboarding
113
149
 
114
- - **Greenfield:** `/ark-architect` or `ark-check --recommend` / `ark start`.
115
- - **Brownfield:** `/ark-adopt` — match contract to reality; do not force a starter preset.
150
+ - **Greenfield:** this skill + `ark-check --recommend` / `ark start` — write the scaffold here.
151
+ - **Brownfield:** this skill — match config to reality; do not force a starter preset.
116
152
  - **Deep map only:** `/ark-explore`.
117
- - **Default path:** `ark start` → `/ark-autopilot` `ark-check --doctor`.
153
+ - **Default path:** `ark start` → **`/ark-adopt`** → `/ark-place` / `/ark-autopilot`.
118
154
 
119
155
  ## Anti-wrapper rule (mandatory)
120
156
 
@@ -125,7 +161,7 @@ feature dirs, plan clusters), you **may** dispatch **subagents**:
125
161
  2. **Product map** — what ships, which apps/packages, entry routes/CLIs.
126
162
  3. **Read real source** in largest ungoverned dirs and top import edges (min **12 files**
127
163
  across **≥4 dirs**).
128
- 4. **“Así te lo re-soluciono”** — concrete layer globs, file moves, manifest/intent proposals.
164
+ 4. **“How to fix”** — concrete layer globs, file moves, manifest/intent proposals.
129
165
  5. **Suggestive burn-down** — ranked next steps after adopt (not only “baseline done”).
130
166
  6. Never freeze a concentrated edge without investigating contract smell / false-green.
131
167
 
@@ -143,19 +179,19 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
143
179
  **ApplicationOrchestration**, not Presentation — do not reclassify API shells as UI.
144
180
  2. **Check + diagnose** — `summary.concentrated` / dominant edge → fix contract first, don’t freeze.
145
181
  Cross-slice / cross-context `peerIsolation` hits are judgment: extract shared or events.
146
- If one edge dominates residual debt: **STOP — do not continue this skill as complete.** **STOP — concentrated edge: invoke /ark-contract with source evidence** (do not freeze a wrong contract or grind N freezes).
182
+ If one edge dominates residual debt: **STOP — do not continue this skill as complete.** **STOP — concentrated edge:** rewrite `ark.config.json` **in this turn** with source evidence (do not freeze a wrong config or grind N freezes).
147
183
  Empty Domain/Persistence + I/O under Application → false-green.
148
- **STOP — do not continue this skill as complete.** **STOP — false-green: invoke /ark-adopt or /ark-contract before claiming ENFORCE.** Do not claim goal.met / ENFORCE from type-only cleanup while doctor reports `contract-false-green-io-under-application`.
184
+ **STOP — do not continue this skill as complete.** **STOP — false-green:** fix the config **in this turn** before claiming ENFORCE. Do not claim goal.met / ENFORCE from type-only cleanup while doctor reports `contract-false-green-io-under-application`.
149
185
  3. **Classify ungoverned** — use coverage `suggestions` **plus** dirs you discovered by reading;
150
- add layers/patterns via `/ark-contract`.
186
+ add layers/patterns **here** (write `ark.config.json`).
151
187
  4. **Mine business rules → manifiesto** (model job — this is why the skill exists):
152
188
  - Scan for loose domain: validators, pricing/policy functions, `can*`/`calculate*`, magic business constants, publish/intent strings, logic in UI/hooks that belongs in Domain.
153
189
  - **ArkRules inventory (AR13):** run `ark-check --rules-inventory --json` for deterministic candidates
154
190
  (validation-in-controller, magic constants, anemic entities). Counts are **not a score**.
155
191
  - Propose: Domain files, `intentPrefixes`, intent names (`Domain.*` / `Application.*`), kernel `defineIntent` stubs if runtime is used;
156
- land structure/invariant entries under `arkrules/<Layer>.json` via `/ark-contract` (ADR 0015 routing).
157
- - Apply config through `/ark-contract` discipline; move pure rules into Domain when safe; validate with ark-check.
158
- - Deliver section **“Así te lo re-soluciono en el manifiesto”** with before/after contract snippets.
192
+ land structure/invariant entries under `arkrules/<Layer>.json` **in this turn** (ADR 0015 routing).
193
+ - Write the config; move pure rules into Domain when safe; validate with ark-check.
194
+ - Deliver section **How to fix the architecture config** with before/after contract snippets.
159
195
  5. **Freeze only real debt** — `--update-baseline` (zero debt → **no empty baseline file** left behind).
160
196
  6. **Gates + skills** — `--install-agent-gates` (CI monorepo-aware when `frontend/package.json` exists).
161
197
  7. **Ratchet + Shape seed (mandatory exploratory close)** — after freeze/gates:
@@ -164,13 +200,13 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
164
200
  domain logic in UI, or semantic false-green: emit **dual-plan B** (3–5 bets) with pilot,
165
201
  success signal, kill-switch, and extraction cards for I/O moves — same bar as `/ark-explore` §G.
166
202
  - Do **not** claim “adopt complete / healthy” solely because the check is green.
167
- - Prefer handoff `/ark-autopilot` for B execution with user ok, or `/ark-explore` shape-focus
203
+ - Prefer handoff `/ark-autopilot` to apply one Shape refactor, or `/ark-explore` shape-focus
168
204
  if the user only wanted a plan.
169
205
 
170
206
  ## Operating modes
171
207
 
172
208
  Explain modes as **detected stages** (Setup / Align / Guard), not user settings.
173
- **Guard on the contract ≠ Shape done.** Say `ENFORCE · design-weak` when B residual remains.
209
+ **Guard on the contract ≠ Shape done.** Say leftover design work remains when B residual remains.
174
210
 
175
211
  ## Verify
176
212
 
@@ -1,43 +1,24 @@
1
1
  ---
2
2
  name: ark-architect
3
- description: Choose the application shape, adopt phase-1 layers, scaffold directories, and verify honestly for enthusiasts before codegen. Autonomous.
3
+ description: Shortcut to /ark-adopt for greenfield shape. Deprecated as a first-class door. Do adopt’s job.
4
4
  ---
5
5
 
6
- # /ark-architect — Choose your application shape and adopt Ark
6
+ # /ark-architect — Shortcut to /ark-adopt
7
7
 
8
- ## Improvement compass (process preflight)
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`.
9
10
 
10
- When doctor is available, read `doctor.improvementCompass` (or the human **Improvement compass** section).
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
- **What the user should feel next:** fewer blocked AI writes, clearer folders, safer domain — then jargon.
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
- **Greenfield that is AI-easy day one:** golden norm + thin layers so the next agent turn stays ordered.
13
+ Invoking this skill **is** the approval to mark the path. Write `ark.config.json` and
14
+ phase-1 dirs in this turn. Then `ark-check`.
26
15
 
27
16
  ## When / not when
28
17
 
29
- | Use `/ark-architect` when… | Do **not** use it when… |
30
- |----------------------------|-------------------------|
31
- | Greenfield / thin tree; pick shape + phase-1 layers | Existing spaghetti brownfield → `/ark-adopt` (+ `/ark-explore` first if map missing) |
32
- | Enthusiast before heavy codegen | Enforcement residual on mature tree `/ark-autopilot` |
33
-
34
- The user is building something new or early in Ark adoption. They may not know
35
- layered architecture jargon. Your job: translate **what they want to build**
36
- (application shape, not framework name) into an Ark preset, a phase-1 layer plan,
37
- conventional directories, and a passing honest check — without weakening the gate.
38
-
39
- Commands below are written as `ark-check` / `ark`; run each through the project's
40
- package manager (`pnpm exec`, `yarn`, `npx`) — match the lockfile.
18
+ | Use this leftover name when… | Prefer instead |
19
+ |------------------------------|----------------|
20
+ | Muscle memory / old docs say architect | **`/ark-adopt`** (greenfield + brownfield) |
21
+ | Empty tree needs a shape | Same adopt writes the recommend result |
41
22
 
42
23
  ## Dual engine (mandatory)
43
24
 
@@ -48,8 +29,6 @@ package manager (`pnpm exec`, `yarn`, `npx`) — match the lockfile.
48
29
 
49
30
  The CLI is a **sensor**, never the whole job. Claiming done without the exploratory bar for this skill is **incomplete**.
50
31
 
51
-
52
-
53
32
  ## MCP workspace binding (mandatory)
54
33
 
55
34
  Before any `ark_*` MCP tool, call `ark_identity` with `project.expectedRoot` set to the exact
@@ -59,128 +38,31 @@ retain `projectIdentity.projectId`, then pass both `expectedRoot` and `expectedP
59
38
  uncertain, do not consume MCP analysis: use the workspace-local CLI and report that MCP
60
39
  restart/retargeting is required. `ark://manifest` never satisfies this preflight.
61
40
 
62
- ## Dual plane layers + ArkRules (mandatory, except /ark-runtime)
63
-
64
- ArkGate has **two opt-in planes**. The user chooses which to use; you **always label** findings so they never blur.
65
-
66
- | Plane | What it protects | Where it lives | Sensors / tools |
67
- |-------|------------------|----------------|-----------------|
68
- | **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
69
- | **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
70
-
71
- **Rules for every report / answer:**
72
- 1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** (or a two-column table with those headers).
73
- 2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
74
- 3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
75
- 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).
76
- 5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
41
+ Then call **`ark_recommend`** with the same bound `project` envelope (or `ark-check --recommend`).
77
42
 
43
+ ## Dual plane — layers + ArkRules (mandatory, except /ark-runtime)
78
44
 
79
- ### Architect + ArkRules
80
- - Preset/init should emit lean `arkRules` + templates for phase-1 layers (exact names).
81
- - Explain to the user: layers = boundaries; arkrules = habits inside Domain/App/adapters (opt-in, start advisory).
45
+ Label findings **`[Layer]`** vs **`[ArkRules]`**. Absence of `arkRules` is valid.
82
46
 
83
47
  ## Subagent fan-out (optional, host-dependent)
84
48
 
85
- If the host supports **parallel subagents** and the task splits cleanly (e.g. multiple
86
- dirs to sample), fan out read-only scouts; otherwise **fall back to sequential**.
87
- Parent merges and still emits the **### Completion** contract. Never parallel-write
88
- the same files or weaken the gate.
49
+ If the host supports **parallel subagents**, fan out read-only scouts; otherwise
50
+ **fall back to sequential**. Never weaken the gate.
89
51
 
90
- ## Relationship to other skills
52
+ ## Related onboarding
91
53
 
92
- | Skill | When |
93
- |-------|------|
94
- | **/ark-architect** | **Before** — greenfield or fresh config; pick shape + phase 1 |
95
- | /ark-adopt | **After** — messy existing repo |
96
- | /ark-contract | **During** — evolve config safely |
97
- | /ark-place | **During** — one new file |
98
- | /ark-explain | **After** — understand what exists |
54
+ - **Greenfield:** this shortcut → **`/ark-adopt`** + `ark-check --recommend` / `ark start`.
55
+ - **Brownfield:** `/ark-adopt` — do not force a starter preset.
99
56
 
100
57
  ## Steps
101
58
 
102
- 1. **Bind and detect the shape** complete the mandatory `ark_identity` preflight first, then
103
- call MCP tool **`ark_recommend`** with the bound `project` envelope (or run the workspace-local
104
- `ark-check --recommend --json`). Never use an unverified recommendation. Read `archetype`, `preset`, `confidence`,
105
- `adoptInOrder.phase1`, `analogy`, `why`, `evidence`, and `requiresConfirmation`.
106
- Ask at most **two** questions only if `requiresConfirmation` is true (or for compatibility
107
- with older ArkGate output, `confidence < 0.5`):
108
- - "Will this app save data between sessions?"
109
- - "Is this one app or several in one repository?"
110
-
111
- 2. **Present in plain English** — name the application shape (e.g. "product with
112
- UI and stored data"), not the framework. One analogy. List **phase-1 layers only**.
113
-
114
- 3. **Map to Ark** — if `ark.config.json` is missing, run
115
- `ark init --archetype <archetype> --yes` (maps playbook id → preset + gates),
116
- or `ark-check --apply-policy-pack enthusiast-<preset>` for the enthusiast variant.
117
- Optional team record: `ark-check --recommend --write-plan` → `ark-adoption-plan.json`.
118
- If a config already exists, use `/ark-contract` to align it — do not regenerate
119
- unasked. On a messy brownfield tree: **STOP — do not continue this skill as complete.** Invoke **/ark-adopt** instead of forcing greenfield shape.
120
-
121
- 4. **Scaffold phase 1** — create conventional directories from the preset/playbook
122
- (`src/domain`, `src/application`, …). Add a one-line README per folder explaining
123
- what belongs there. Match the nearest sibling file style if code already exists.
124
- Flat layouts (`src/` + `lib/` + `api/` at the repo root) are common in Vite and
125
- serverless projects — use `/ark-contract` to map them to layers instead of forcing
126
- everything under `src/**/domain/**` only.
127
-
128
- 5. **Install gates** when the user uses AI coding tools and gates are missing:
129
- `ark-check --install-agent-gates`.
130
-
131
- 6. **Verify honestly** — run `ark-check --doctor` and `ark-check --coverage --json`.
132
- Report `governed.percent`. Say explicitly what is **not** governed yet
133
- (ungoverned directories, empty layers).
134
-
135
- 7. **Deliver to the user**
136
- - ASCII diagram (≤3 boxes for phase 1, inner → outer)
137
- - Table: "when you build X, put it in Y"
138
- - Three rules the agent must not break (no domain→database imports, no raw
139
- `publish()`, no weakening `ark.config.json` to pass)
140
- - Optional book refs from `books` in the recommendation JSON under "go deeper"
141
- - **Gallery starter** — point the user at the matching clonable example:
142
-
143
- | Archetype | Example directory |
144
- |-----------|-------------------|
145
- | `crud-product` | `examples/crud-product-starter/` |
146
- | `api-backend` | `examples/api-backend-starter/` |
147
- | `worker-pipeline` | `examples/worker-pipeline-starter/` |
148
- | `multi-app-workspace` | `examples/multi-app-workspace-starter/` |
149
- | `vertical-slice-product` | `examples/vertical-slice-starter/` |
150
- | `ddd-bounded-contexts` | `examples/ddd-context-starter/` |
151
-
152
- Say they can copy that folder as a baseline (`npm install && npm run check`).
153
- For a runnable API with break exercises, mention `examples/hexagonal-order-api/`.
154
- Full enthusiast track: `docs/enthusiast/README.md`.
155
-
156
- ## Operating rules
157
-
158
- - Never weaken `ark.config.json`, the baseline, CI, or agent settings to pass.
159
- - Never invent layers outside the 11-layer profile or named presets
160
- (`hexagonal`, `layered`, `feature-sliced`, `monorepo`, `ui-surface`,
161
- `vertical-slice`, `ddd-bounded-contexts`).
162
- - Flag unrecognized dirs (`utils/`, `lib/`) — user must classify via `/ark-contract`.
163
- - Default to smallest viable phase 1; unlock phase 2 only when the user describes need.
164
- - All user-facing copy is **English**.
165
-
166
- ## Merge cards (physical cohesion reshape — judgment only)
167
-
168
- When `doctor.physicalCohesion` reports a mirrored concept and the user asks whether files
169
- should be **merged**, treat it as domain modeling, never deduplication (field fact: zero
170
- structural clones among 123 same-concept files). Produce a **merge card** per candidate group:
171
- which files, the domain concept they express, 2–3 shapes the merged module could take, and what
172
- each shape costs — **no default action, no auto-merge, never a codemod**. Physical **moves**
173
- belong to `/ark-loop`'s pilot loop; your job here is the judgment about what the concept IS.
174
-
175
- ## Verify and report
176
-
177
- End with `ark-check --root . --config ark.config.json --strict-config` when the
178
- tree is ready. Report: archetype + preset, directories created, governed %, and
179
- the next command if anything remains ungoverned.
59
+ 1. Bind MCP (`ark_identity` then `ark_recommend`) or run `ark-check --recommend`.
60
+ 2. Execute **`/ark-adopt`** autonomy: write the config, dirs, optional advisory ArkRules, gates.
61
+ 3. `ark-check --strict-config`. Handoff `/ark-place` for new files.
180
62
 
181
63
  ## Completion contract (skill incomplete if missing)
182
64
 
183
- End with **exactly** these headings (markdown `###`):
65
+ Skill incomplete if missing any field below.
184
66
 
185
67
  ### Completion
186
68
  - **Sensor:** commands/tools run
@@ -188,8 +70,5 @@ End with **exactly** these headings (markdown `###`):
188
70
  - **Result:** one-line outcome
189
71
  - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
190
72
  - **Compass:** top residual lenses | `n/a`
191
- - **Handoff:** `/ark-…` / CLI / `none`
73
+ - **Handoff:** `/ark-adopt` / `/ark-place` / `none`
192
74
  - **Incomplete?** `no` | `yes — <what is missing>`
193
-
194
- If a **STOP** handoff applies and you continued as if done, set **Incomplete?** to `yes`.
195
- **Skill incomplete if missing** any of the bullets above.
@@ -1,17 +1,34 @@
1
1
  ---
2
2
  name: ark-autopilot
3
- description: Guided end-to-end path for layers and opt-in ArkRules doctor next action when unsure. Explore first; dual plan A (edges) + B (shape); mechanical-safe only by default; B with user OK, one pilot at a time. Empty plan A is not healthy if design-weak. CLI is a sensor; you read and remediate files.
3
+ description: Apply Ark end-to-end — explore first; dual plan A (edges) + B (shape); write mechanical-safe and judgment in this turn; one Shape refactor. Empty plan A is not healthy if leftover design remains. CLI is a sensor; you edit files.
4
4
  ---
5
5
 
6
- # /ark-autopilot — Guided end-to-end architecture path
6
+ # /ark-autopilot — Apply the path
7
7
 
8
- **This is the full guided co-pilot** after the compact router. Prefer it when the user wants
9
- architecture cleaned end-to-end, not when they only need a map (`/ark-explore`) or a single
10
- edge fix (`/ark-fix`). Doctor remains the control plane: re-check status after each major step.
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`).
11
10
 
12
- Composes **explore → sensors → dual plan → loop**. Safe default: auto-apply only
13
- `mechanical-safe`; when the user says full apply / apply everything, also execute **judgment**
14
- fixes you design from reading source (still validate with ark-check, never weaken the gate).
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.
18
+
19
+ ## Autonomy contract
20
+
21
+ The CLI is a **sensor and gate**. **CLI budget:** one doctor / `--plan`; open files; **write**;
22
+ re-check. Forbidden as the result: “4 safe / 4 judgment — approve?”, dumping `--plan` JSON,
23
+ or `STOP — invoke /ark-fix` / `/ark-loop` / `/ark-contract`. Do that work **here**.
24
+
25
+ Apply plan A (`mechanical-safe` **and** judgment). If leftover design work remains, apply
26
+ **one** small refactor this turn, then re-doctor. Never batch every Shape bet.
27
+
28
+ Composes **explore → sensors → dual plan → write**. Validate with ark-check; never weaken the gate.
29
+ **Team lock:** do not edit `ark.config.json`, `arkrules/*`, or `.ark-baseline.json` in this
30
+ turn unless the user invoked a steward contract session. Feature diffs use
31
+ `ark-check --changed --base <merge-ref>`. Growing the baseline is steward-only.
15
32
 
16
33
  **Not a plan grinder.** Empty `--plan` does **not** mean “architecture is healthy” without
17
34
  the explore pass and dual-plan section B (pattern / Shape bets).
@@ -33,25 +50,25 @@ new files; place before write (`/ark-place` / prepare-write).
33
50
  **Out of scope (honest):** scalability/performance, full app-security tooling (SAST), and full resilience
34
51
  patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement for them.
35
52
 
36
- **Guided vibe path:** phase 0 = doctor + compass residual. Shape only with user OK. Never script “done” while residual lenses remain.
53
+ **Guided vibe path:** phase 0 = doctor + compass residual. Shape: one refactor this turn (invoke = OK). Never script “done” while residual lenses remain.
37
54
 
38
55
  ## When / not when
39
56
 
40
57
  | Use `/ark-autopilot` when… | Do **not** use it when… |
41
58
  |----------------------------|-------------------------|
42
59
  | “Make architecture sound” end-to-end | Map only, no apply → `/ark-explore` |
43
- | Brownfield or greenfield with apply | Only fitness numbers → `/ark-coverage` |
44
- | User wants A + B planned and A executed | Single edge fix → `/ark-fix`; plan A only → `/ark-loop` |
45
- | **Apply half of post-green Shape path** (after explore map / when user wants full apply) | Skipping explore when doctor primary is Shape map-first |
46
- | Spaghetti under ENFORCE: Shape work with user ok on B | Contract false-green first → `/ark-adopt` / `/ark-contract` STOP paths |
60
+ | Brownfield or greenfield with apply | Session 0 / config lying → `/ark-adopt` first, then return |
61
+ | User wants A + B planned and **applied** | New file only → `/ark-place` |
62
+ | **Apply** leftover design (one Shape refactor) | User said map only |
63
+ | Spaghetti under ENFORCE: Shape work (invoke = apply one pilot) | |
47
64
 
48
- **Post-green door:** doctor’s single door is `/ark-explore` shape-focus → dual-plan B, **then** this skill only
49
- to apply B with OK. Prefer that order when `postGreenPath` / design-weak is the primary residual.
65
+ **Post-green door:** `/ark-explore` shape-focus → dual-plan B, **then this skill applies one
66
+ pilot**. Prefer that order when `postGreenPath` / leftover design work is the primary residual.
50
67
 
51
68
  ## Related onboarding
52
69
 
53
- - **Greenfield:** `/ark-architect` or `ark-check --recommend` / `ark start`.
54
- - **Brownfield:** `/ark-adopt` — match contract to reality; do not force a starter preset.
70
+ - **Greenfield:** `/ark-adopt` or `ark-check --recommend` / `ark start`.
71
+ - **Brownfield:** `/ark-adopt` — match config to reality; do not force a starter preset.
55
72
  - **Deep map only:** `/ark-explore` — full recon / dual-plan seed without applying.
56
73
  - **Adoption fitness only:** `/ark-coverage` — governed% + capability gaps (not pattern dual-plan).
57
74
  - **Default path:** `ark start` → `ark-check --doctor` → **`/ark-autopilot`** (this skill) for guided work.
@@ -71,10 +88,10 @@ decision-grade explore pass **and** without opening violating files.
71
88
  2. CLI sensors: `--plan --json`, `--coverage --json` / `--doctor` as needed.
72
89
  3. **Dual plan** always emitted (sections A and B).
73
90
  4. **Open every file** in plan A `steps[]` (and `target` if present) before classifying a fix.
74
- 5. **“Así te lo re-soluciono”** for each A cluster and each B pattern bet.
91
+ 5. **“How to fix”** for each A cluster and each B pattern bet.
75
92
  6. Apply A → re-run ark-check → rollback on regression. **Never auto-apply B** as mechanical-safe.
76
- 7. **One-pilot loop for B:** when design-weak, take **`pilotLoop.nextPilot`** (one extraction card)
77
- → apply **only** that pilot with user OK → **re-doctor**. Never multi-pilot batch B; residual
93
+ 7. **One-pilot loop for B:** when leftover design / design-weak, take **`pilotLoop.nextPilot`** (one extraction card)
94
+ → apply **only** that pilot **in this turn** → **re-doctor**. Never multi-pilot batch B; residual
78
95
  outside the pilot may remain and must not be called “healthy finished.”
79
96
  8. **Reshape decision memory:** read `doctor.physicalCohesion.reshapeDecisions` before acting on
80
97
  mirror facts. Outcome first: a current rejected/deferred verdict means “intentional/deferred
@@ -106,7 +123,7 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
106
123
  1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** (or a two-column table with those headers).
107
124
  2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
108
125
  3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
109
- 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).
126
+ 4. Editing `arkrules/*` or promoting modes and fixing structure sensors is **this skill** (judgment, never invent `mechanical-safe`).
110
127
  5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
111
128
 
112
129
 
@@ -143,14 +160,14 @@ Use the **`/ark-explore` decision-grade bar** (compressed into the autopilot rep
143
160
  Include explore **§G** when spaghetti / design-weak signals fire.
144
161
 
145
162
  1. **Headline** — product one-liner + honesty (mode, governed%, false-green / false-promise /
146
- **ENFORCE·design-weak** risk).
163
+ leftover design work risk).
147
164
  2. **Map** — entry points, lived layout vs globs (one screen). **Concurrent patterns** table when ≥2 styles.
148
165
  3. **Phase ladder** — name **Align | Stabilize | Shape** (explore §G).
149
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.
150
167
  5. **Agent/gate reality** — installed hooks vs install templates (e.g. `--hook` vs `--hook-repair`); MCP; CI gate present.
151
168
  6. **Coupling** — fan-in / exports / importers for hotspots (LOC alone is a hint).
152
169
  7. **False-green soft block** — doctor/coverage: empty Domain/Persistence while Application owns I/O (`airtable`, `supabase`, `prisma`, `drizzle`, `repositories`, …). Doctor gap id: `contract-false-green-io-under-application`. If so:
153
- **STOP — do not continue this skill as complete.** **STOP — false-green: invoke /ark-adopt or /ark-contract before claiming ENFORCE.** Do not claim goal.met / ENFORCE from type-only cleanup while doctor reports `contract-false-green-io-under-application`.
170
+ **STOP — do not continue this skill as complete.** **STOP — false-green:** fix the architecture config **in this turn** (same job as `/ark-adopt`) before claiming ENFORCE. Do not claim goal.met / ENFORCE from type-only cleanup while doctor reports `contract-false-green-io-under-application`.
154
171
  8. **Seed dual plan B** — 2–5 pattern / Shape bets ranked (impact × effort × enforceability). Each B row needs pilot + success signal; I/O bets need an **extraction card** (explore §G).
155
172
 
156
173
  Min bar: **≥12 source files** across **≥4 meaningful directories** (not only files in `steps[]`).
@@ -160,16 +177,16 @@ Standalone long report: `/ark-explore`. Adoption fitness only: `/ark-coverage`.
160
177
 
161
178
  | Section | Source | Question | Auto-apply? |
162
179
  |---------|--------|----------|-------------|
163
- | **A. Remediation** | `--plan --json` + opened step files | What must change so the **gate** is honest? | Only `mechanical-safe` by default |
180
+ | **A. Remediation** | `--plan --json` + opened step files | What must change so the **gate** is honest? | Write `mechanical-safe` **and** judgment |
164
181
  | **B. Pattern / Shape** | Explore §B/§G (not coverage alone) | What **design** must improve even if A is empty? | **Never** as mechanical-safe |
165
182
 
166
183
  **Section A** — group by edge; treat `peerIsolation` / cross-slice as **judgment**.
167
184
  **Section B** examples: choose golden pattern + pilot migrate-on-touch, peerIsolation, move rules out of UI, write-path repair, split god modules, Domain placement / intents, facade SQL → port/adapter (extraction card). Cap **3–5** B rows. Each row: evidence path + **así te lo re-soluciono** + next skill/command + **success signal** + **pilot** (+ kill-switch if new layer).
168
185
 
169
- B does **not** count as “architecture healthy finished.” Report B as `proposed | deferred | applied-with-user-ok`.
186
+ B does **not** count as “architecture healthy finished.” Report B as `proposed | deferred | applied`.
170
187
  When A is empty and B is non-empty: status is **`goal.met on edges · Shape residual open`** — never “done” without listing B.
171
- Prefer CLI `patternBets[]` / `designSmells[]` when present; apply B only with explicit user ok using
172
- **extraction cards** (`docs/brownfield-adoption.md` §6) — never mechanical-safe, never silent.
188
+ Prefer CLI `patternBets[]` / `designSmells[]` when present; apply **one** B pilot this turn using
189
+ **extraction cards** (`docs/brownfield-adoption.md` §6) — never mechanical-safe, never silent, never multi-pilot.
173
190
  If B will take multiple PRs, offer (do not require) persisting a short Shape plan under the
174
191
  repo so the next agent session continues the same pilot — still never auto-apply B.
175
192
 
@@ -190,7 +207,7 @@ Status lights from doctor — not settings you choose. Rank residual honestly:
190
207
  | **Suggest** | Thin/new tree; contract not control plane | Finish `ark start` → re-doctor; do not skill-shop |
191
208
  | **Adapt** | Contract/tree disagree or debt open | Explore + adopt/loop/contract; do not claim guarded |
192
209
  | **Enforce** | Honest coverage + clean checked **edges** | Confirm gates + CI; emit dual-plan B only if residual found |
193
- | **Enforce · leftover design work** | Imports clean; design still messy | **Primary Shape door:** explore shape-focus → dual-plan **B** → apply **one** small refactor with user OK. Empty plan A ≠ done. Never mechanical-safe B. False-done forbidden. |
210
+ | **Enforce · leftover design work** | Imports clean; design still messy | **Primary Shape door:** explore shape-focus → dual-plan **B** → apply **one** small refactor. Empty plan A ≠ done. Never mechanical-safe B. False-done forbidden. |
194
211
 
195
212
  - **Setup (Suggest):** no config → `ark start` (start freezes origin after config, before gates).
196
213
  - **Align (Adapt):** open debt, low honesty, or false-green → explore + adopt/loop; do not claim “guarded”.
@@ -206,12 +223,12 @@ Status lights from doctor — not settings you choose. Rank residual honestly:
206
223
  3. **Sensors** — `--plan --json`, doctor/coverage as needed.
207
224
  4. **Emit dual plan** — A from plan steps (files opened); B from explore (3–5 bets).
208
225
  5. **Concentrated edge?** — if one edge dominates A:
209
- **STOP — do not continue this skill as complete.** **STOP — concentrated edge: invoke /ark-contract with source evidence** (do not freeze a wrong contract or grind N freezes).
226
+ **STOP — do not continue this skill as complete.** **STOP — concentrated edge:** rewrite `ark.config.json` **in this turn** with source evidence (do not freeze a wrong config or grind N freezes).
210
227
  6. **Worktree preferred** — discardable git worktree when possible.
211
228
  7. **Mechanical-safe (A only)** — kinds from `/ark-loop` table; one step, validate, rollback.
212
- 8. **Judgment (A)** — default: propose with full “así te lo re-soluciono”. If user authorized full apply: implement, validate, rollback on fail.
213
- 9. **Pattern bets (B)** — propose; apply only with explicit user go + correct skill (`/ark-contract`, refactor, install gates, etc.). Never weaken the gate to clear B.
214
- 10. **Manifiesto** — loose business rules → Domain placement + `intentPrefixes` / intents via `/ark-contract` discipline.
229
+ 8. **Judgment (A)** — implement with full “así te lo re-soluciono”; validate; rollback on fail.
230
+ 9. **Pattern bets (B)** — apply **one** extraction-card pilot this turn; leave the rest queued. Never weaken the gate to clear B.
231
+ 10. **Manifiesto** — loose business rules → Domain placement + `intentPrefixes` / intents; write config here if the path is still dishonest.
215
232
  11. **Final report** — re-`--report`; evolution vs origin; A applied vs open; B proposed/deferred; gates on.
216
233
  12. **Strict check** — `ark-check --strict-config` (dead preset globs are advisory; real violations still fail).
217
234
  13. **Core ratchet (when green)** — if plan `goal.met` and doctor still **ADAPT** only because