arkgate 4.5.7 → 4.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -1
- package/README.md +18 -12
- package/bin/ark-check-runtime.mjs +107 -8
- package/bin/ark-mcp-runtime.mjs +17 -1
- package/bin/ark.mjs +5 -3
- package/bin/lib/agent-homes.mjs +296 -0
- package/bin/lib/agent-projection.mjs +2 -2
- package/bin/lib/analysis-engine.mjs +3 -3
- package/bin/lib/ci-and-commands.mjs +16 -16
- package/bin/lib/config-contract.mjs +2 -0
- package/bin/lib/contract-smells.mjs +5 -5
- package/bin/lib/design-smells.mjs +4 -8
- package/bin/lib/doctor-advisories.mjs +9 -0
- package/bin/lib/doctor-plan.mjs +39 -15
- package/bin/lib/field-install.mjs +1 -1
- package/bin/lib/golden-pattern.mjs +1 -1
- package/bin/lib/host-support-matrix.mjs +4 -4
- package/bin/lib/html-report-advisories.mjs +20 -0
- package/bin/lib/html-report-depth.mjs +7 -8
- package/bin/lib/html-report.mjs +2 -1
- package/bin/lib/improvement-compass-map.mjs +20 -20
- package/bin/lib/install-migrate.mjs +12 -0
- package/bin/lib/pilot-loop.mjs +1 -1
- package/bin/lib/post-green-path.mjs +5 -4
- package/bin/lib/prepare-change.mjs +9 -0
- package/bin/lib/product-copy.mjs +32 -0
- package/bin/lib/skill-write.mjs +1 -1
- package/bin/lib/status-command.mjs +14 -0
- package/bin/lib/status-manifest.mjs +17 -0
- package/bin/lib/team-parliament-io.mjs +338 -0
- package/bin/lib/team-parliament.mjs +383 -0
- package/bin/lib/upgrade-whats-new.mjs +32 -0
- package/bin/lib/violations.mjs +8 -4
- package/dist/{configTypes-CC0FEXoF.d.ts → configTypes-B8uIcLaG.d.ts} +5 -0
- package/dist/eslint/index.cjs +2 -2
- package/dist/eslint/index.d.ts +1 -1
- package/dist/eslint/index.js +2 -2
- package/dist/index.cjs +8 -8
- package/dist/index.d.ts +61 -2
- package/dist/index.js +8 -8
- package/docs/README.md +5 -4
- package/docs/agent-guide.md +31 -24
- package/docs/ai-gates.md +19 -0
- package/docs/configuration.md +36 -2
- package/docs/develop.md +16 -4
- package/docs/enthusiast/README.md +1 -1
- package/docs/enthusiast/how-to-agent-gates.md +3 -3
- package/docs/enthusiast/how-to-pick-shape.md +2 -2
- package/docs/enthusiast/tutorial-first-project.md +4 -3
- package/docs/package-surface.md +5 -3
- package/docs/product-voice.md +126 -82
- package/docs/use.md +13 -6
- package/package.json +1 -1
- package/schemas/ark.config.schema.json +9 -0
- package/schemas/ark.status-manifest.schema.json +51 -0
- package/server.json +2 -2
- package/templates/agent-skills/README.md +1 -1
- package/templates/agent-skills/ark-adopt/SKILL.md +46 -19
- package/templates/agent-skills/ark-architect/SKILL.md +24 -145
- package/templates/agent-skills/ark-autopilot/SKILL.md +40 -30
- package/templates/agent-skills/ark-contract/SKILL.md +21 -105
- package/templates/agent-skills/ark-coverage/SKILL.md +3 -0
- package/templates/agent-skills/ark-explain/SKILL.md +7 -4
- package/templates/agent-skills/ark-explore/SKILL.md +29 -21
- package/templates/agent-skills/ark-fix/SKILL.md +34 -157
- package/templates/agent-skills/ark-loop/SKILL.md +31 -153
- package/templates/agent-skills/ark-place/SKILL.md +25 -13
- package/templates/agent-skills/ark-runtime/SKILL.md +3 -3
- package/templates/agent-skills/ark-think/SKILL.md +5 -2
- package/templates/agent-skills/ark-upgrade/SKILL.md +13 -8
- package/templates/skills/ark-adopt.md +46 -19
- package/templates/skills/ark-architect.md +24 -145
- package/templates/skills/ark-autopilot.md +40 -30
- package/templates/skills/ark-contract.md +21 -105
- package/templates/skills/ark-coverage.md +3 -0
- package/templates/skills/ark-explain.md +7 -4
- package/templates/skills/ark-explore.md +29 -21
- package/templates/skills/ark-fix.md +34 -157
- package/templates/skills/ark-loop.md +31 -153
- package/templates/skills/ark-place.md +25 -13
- package/templates/skills/ark-runtime.md +3 -3
- package/templates/skills/ark-think.md +5 -2
- package/templates/skills/ark-upgrade.md +13 -8
|
@@ -1,13 +1,21 @@
|
|
|
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
|
+
## Autonomy contract
|
|
9
|
+
|
|
10
|
+
Invoking this skill **is** the approval to **map**. Open the real tree. CLI JSON alone is
|
|
11
|
+
incomplete. **Do not write** config or product code (that is `/ark-adopt` / `/ark-autopilot`).
|
|
12
|
+
**CLI budget:** one doctor / coverage; then open ≥12 files across ≥4 dirs; then the map.
|
|
13
|
+
|
|
14
|
+
**Still never:** weaken the config; invent `mechanical-safe` kinds; claim healthy because
|
|
15
|
+
plan A is empty while leftover design work remains.
|
|
16
|
+
|
|
17
|
+
Use when you need a decision-grade map or the **Primary post-green door**; hand off to
|
|
18
|
+
`/ark-autopilot` to apply. Day-to-day place + gate work does not require this skill.
|
|
11
19
|
|
|
12
20
|
You are a **staff engineer doing architecture reconnaissance** on *this* repository.
|
|
13
21
|
Ark’s CLI is a **sensor** (coverage, doctor, plan). **You** open source, entry points,
|
|
@@ -23,7 +31,7 @@ Name 1–3 **residual** lenses in plain language before skill-shopping. Always `
|
|
|
23
31
|
|
|
24
32
|
**What the user should feel next:** fewer blocked AI writes, clearer folders, safer domain — then jargon.
|
|
25
33
|
|
|
26
|
-
**Anti false-done:** empty plan A +
|
|
34
|
+
**Anti false-done:** empty plan A + leftover design work → **Incomplete? yes**. Green imports alone
|
|
27
35
|
are not “architecture finished.”
|
|
28
36
|
|
|
29
37
|
**AI-easy architecture:** ports over concrete I/O in domain; one concern per module; golden pattern for
|
|
@@ -58,15 +66,15 @@ If the consumer tree has a **domain glossary**, prefer its terms for layer/slice
|
|
|
58
66
|
|
|
59
67
|
| Use `/ark-explore` when… | Do **not** use it when… |
|
|
60
68
|
|--------------------------|-------------------------|
|
|
61
|
-
| Map / “what next?” / residual after ENFORCE | User wants edits applied → `/ark-autopilot`
|
|
62
|
-
| **Primary post-green door:** messy /
|
|
69
|
+
| Map / “what next?” / residual after ENFORCE | User wants edits applied → `/ark-autopilot` |
|
|
70
|
+
| **Primary post-green door:** messy / leftover design work / “clarify for AI” | Skill-shopping coverage or think for the same leftover work |
|
|
63
71
|
| Spaghetti brownfield: patterns concurrent, design-weak under green check | Only “governed% + gates installed?” numbers → `/ark-coverage` |
|
|
64
72
|
| Dual-plan **seed** (A remediation + B pattern bets) without applying | One design trade-off between 2–3 options already mapped → `/ark-think` |
|
|
65
73
|
| Path-correct vs design-correct honesty | Plain-language tour / HTML report → `/ark-explain` |
|
|
66
74
|
|
|
67
|
-
**Post-green single path:** when doctor `postGreenPath` / ENFORCE · design
|
|
68
|
-
(shape-focus / dual-plan seed) is the map half of the one door** — then `/ark-autopilot`
|
|
69
|
-
|
|
75
|
+
**Post-green single path:** when doctor `postGreenPath` / ENFORCE · leftover design work is active, **this skill
|
|
76
|
+
(shape-focus / dual-plan seed) is the map half of the one door** — then `/ark-autopilot`
|
|
77
|
+
applies one B pilot. Do not send the user to coverage or think as equal first choices.
|
|
70
78
|
|
|
71
79
|
### Status lights (rank residual; not settings)
|
|
72
80
|
|
|
@@ -75,15 +83,15 @@ to apply B with user OK. Do not send the user to coverage or think as equal firs
|
|
|
75
83
|
| **Suggest** | Point at `ark start` → doctor; map only if user insists on recon before setup |
|
|
76
84
|
| **Adapt** | Map false-green / ungoverned / concentrated edge; hand off adopt/contract before Shape vanity |
|
|
77
85
|
| **Enforce** | Confirm edges; if residual smells/patterns appear, auto-upgrade to dual-plan seed / shape-focus |
|
|
78
|
-
| **Enforce · design
|
|
86
|
+
| **Enforce · leftover design work** | **Primary post-green map door** — shape-focus + dual-plan B + extraction cards. False-done forbidden. Never claim healthy because plan A is empty. |
|
|
79
87
|
|
|
80
88
|
`/ark-autopilot`, `/ark-adopt`, and `/ark-coverage` embed a **lighter** version of this pass.
|
|
81
89
|
**You** are the full recon + pattern-planning skill.
|
|
82
90
|
|
|
83
91
|
## Related onboarding
|
|
84
92
|
|
|
85
|
-
- **Greenfield / thin tree:** `/ark-
|
|
86
|
-
- **Brownfield action (write
|
|
93
|
+
- **Greenfield / thin tree:** `/ark-adopt` or `ark-check --recommend` / `ark start`.
|
|
94
|
+
- **Brownfield action (write config/baseline):** `/ark-adopt` after the map.
|
|
87
95
|
- **Execute dual plan:** `/ark-autopilot` (explore seeds; autopilot applies A, proposes B).
|
|
88
96
|
- **Default path:** `ark start` → `ark-check --doctor` → `/ark-autopilot` for guided apply; use this skill for map-only or post-green Shape residual.
|
|
89
97
|
|
|
@@ -129,7 +137,7 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
|
|
|
129
137
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** (or a two-column table with those headers).
|
|
130
138
|
2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
|
|
131
139
|
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
|
|
140
|
+
4. Editing `arkrules/*` or applying structure fixes is **`/ark-adopt`** / **`/ark-autopilot`** — explore does not write (never invent `mechanical-safe`).
|
|
133
141
|
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
|
|
134
142
|
|
|
135
143
|
|
|
@@ -333,8 +341,8 @@ Empty plan A + design-weak is **not** architecture finished. Plan B is judgment
|
|
|
333
341
|
| 1. Confirm residual | `designFitness.designWeak` **or** non-empty `patternBets` / `designSmells` | You would claim healthy finished because plan A is empty |
|
|
334
342
|
| 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
343
|
| 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` (
|
|
344
|
+
| 4. Stay map-only here | Explore does not edit | Silent auto-apply of plan B |
|
|
345
|
+
| 5. Apply **only** that pilot | Via `/ark-autopilot` (one cluster) | Opening a second pilot before re-doctor |
|
|
338
346
|
| 6. Re-doctor | Success = reduced evidence on pilot paths; residual outside pilot may remain | Declaring whole-tree done from one pilot |
|
|
339
347
|
|
|
340
348
|
**Hard lines (never break):**
|
|
@@ -356,7 +364,7 @@ Do not:
|
|
|
356
364
|
- open a second pilot before re-doctor
|
|
357
365
|
Success: <observable / falsifiable — re-doctor>
|
|
358
366
|
Kill-switch: <stop condition — e.g. if pilot does not clear smell evidence in 1 PR → stop / re-map>
|
|
359
|
-
Next: /ark-autopilot (apply
|
|
367
|
+
Next: /ark-autopilot (apply one pilot) | re-doctor
|
|
360
368
|
```
|
|
361
369
|
|
|
362
370
|
When doctor JSON is available, prefer smell `id`s from `designSmells` / `patternBets[].smellId`
|
|
@@ -380,10 +388,10 @@ Kinds: `risk` | `false-green` | `debt` | `opportunity` | `shape` | `manifiesto`
|
|
|
380
388
|
|
|
381
389
|
5. **Field path summary**.
|
|
382
390
|
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
|
|
391
|
+
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`.
|
|
392
|
+
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
393
|
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-
|
|
394
|
+
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
395
|
|
|
388
396
|
Optional: **Diff vs naive sensor-only read** (what reading the tree changed).
|
|
389
397
|
|
|
@@ -397,7 +405,7 @@ Optional: **Diff vs naive sensor-only read** (what reading the tree changed).
|
|
|
397
405
|
- When §G fires: phase named, design smells listed with paths, dual-plan B or shape-focus B present.
|
|
398
406
|
- Every Top-3 / B bet has a **success signal**; new-layer bets have a **kill-switch** + pilot.
|
|
399
407
|
- Mode respected: no multi-week roadmap in recon mode; dual-plan seed capped at 3–5 B bets.
|
|
400
|
-
- Clear handoff: `/ark-adopt` | `/ark-
|
|
408
|
+
- Clear handoff: `/ark-adopt` | `/ark-autopilot` | `/ark-place` | CLI | `stop`.
|
|
401
409
|
- No gate weakening; no false ENFORCE claim; no README echo as primary content.
|
|
402
410
|
|
|
403
411
|
## Completion contract (skill incomplete if missing)
|
|
@@ -1,81 +1,41 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ark-fix
|
|
3
|
-
description:
|
|
3
|
+
description: Shortcut to /ark-autopilot for a small violation cluster. Deprecated as a first-class door.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /ark-fix —
|
|
6
|
+
# /ark-fix — Shortcut to /ark-autopilot
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
the two files on the violation edge.
|
|
8
|
+
**Deprecated as a first-class door.** Gate violations and judgment remediations are
|
|
9
|
+
**`/ark-autopilot`**. Do that job now. CLI only validates.
|
|
11
10
|
|
|
12
|
-
##
|
|
11
|
+
## Autonomy contract
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
Invoking this leftover name **is** the approval to write the fix. Open importers,
|
|
14
|
+
design the port/move, apply, `ark-check`. Never weaken the config. Never invent
|
|
15
|
+
`mechanical-safe` kinds.
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
**Anti false-done:** empty plan A + residual lenses / design-weak → **Incomplete? yes**. Green edges alone
|
|
21
|
-
are not “architecture finished.”
|
|
22
|
-
|
|
23
|
-
**AI-easy architecture:** ports over concrete I/O in domain; one concern per module; golden pattern for
|
|
24
|
-
new files; place before write (`/ark-place` / prepare-write).
|
|
25
|
-
|
|
26
|
-
**Out of scope (honest):** scalability/performance, full app-security tooling (SAST), and full resilience
|
|
27
|
-
patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement for them.
|
|
28
|
-
|
|
29
|
-
**Name residual lenses** on each cluster (SoC, DIP, coupling, …). Still no weaken-gate to clear a lens.
|
|
30
|
-
|
|
31
|
-
## Deep modules (process)
|
|
17
|
+
## When / not when
|
|
32
18
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
19
|
+
| Use this leftover name when… | Prefer instead |
|
|
20
|
+
|------------------------------|----------------|
|
|
21
|
+
| One change / small cluster just failed the gate | **`/ark-autopilot`** |
|
|
22
|
+
| Judgment design for a known violation | Session 0 / false-green → **`/ark-adopt`** |
|
|
36
23
|
|
|
37
|
-
##
|
|
24
|
+
## Plan B one-pilot checklist (when leftover design, not a single edge)
|
|
38
25
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
| Judgment design for a known violation | Contract wrong / false-green → STOP to `/ark-contract` / `/ark-adopt` |
|
|
44
|
-
|
|
45
|
-
When the fix is really a **Shape** extraction (I/O out of routes, god module split), write an
|
|
46
|
-
**extraction card** before editing — same template as `docs/brownfield-adoption.md`
|
|
47
|
-
§6 and explore §G. Fixed fields (never mechanical-safe, never silent B apply).
|
|
48
|
-
|
|
49
|
-
### Plan B one-pilot checklist (when Shape residual, not a single edge fix)
|
|
50
|
-
|
|
51
|
-
Empty plan A + `designWeak` is **not** architecture finished. One pilot only:
|
|
52
|
-
|
|
53
|
-
1. **Confirm** doctor `designFitness.designWeak` / non-empty `patternBets` (or agent-detected smell).
|
|
54
|
-
2. **One pilot** — prefer `pilotLoop.nextPilot`; never multi-batch concurrent Shape extractions.
|
|
55
|
-
3. **Extraction card** with **Kill-switch** + falsifiable Success (required).
|
|
56
|
-
4. **User OK** before apply — `autoApplyPlanBForbidden` / never mechanical-safe.
|
|
57
|
-
5. **Edit only that pilot scope** — then `ark-check` / re-doctor; residual outside pilot may remain.
|
|
58
|
-
6. **Stop** if kill-switch fires; do not open pilot #2 in the same batch.
|
|
59
|
-
|
|
60
|
-
```text
|
|
61
|
-
### Extraction card
|
|
62
|
-
Pilot: <one directory or feature path — or pilotLoop.nextPilot.pilotTarget>
|
|
63
|
-
Smell: <doctor designSmells id if present>
|
|
64
|
-
Move: <verbatim relocate / split>
|
|
65
|
-
Do not: rewrite queries; weaken ark.config; invent mechanical-safe kinds; big-bang; multi-pilot batch
|
|
66
|
-
Success: <falsifiable — re-doctor on pilot paths>
|
|
67
|
-
Kill-switch: <stop condition — required>
|
|
68
|
-
Next: re-run ark-check; shrink baseline if applicable
|
|
69
|
-
```
|
|
26
|
+
Empty plan A + leftover design work is **not** architecture finished. One pilot only.
|
|
27
|
+
Write an **extraction card** (`docs/brownfield-adoption.md` §6) — never mechanical-safe,
|
|
28
|
+
never silent B apply. **Kill-switch** required. `multiPilotBatchForbidden` — never
|
|
29
|
+
multi-pilot batch.
|
|
70
30
|
|
|
71
31
|
## Dual engine (mandatory)
|
|
72
32
|
|
|
73
33
|
| Engine | Role |
|
|
74
34
|
|--------|------|
|
|
75
|
-
| **Deterministic** |
|
|
76
|
-
| **Exploratory** |
|
|
77
|
-
|
|
35
|
+
| **Deterministic** | CLI / MCP / contract sensors — exit codes, plan kinds, coverage numbers, install status |
|
|
36
|
+
| **Exploratory** | You open **this** repo's real files and product surface before concluding |
|
|
78
37
|
|
|
38
|
+
The CLI is a **sensor**, never the whole job. Claiming done without the exploratory bar for this skill is **incomplete**.
|
|
79
39
|
|
|
80
40
|
## MCP workspace binding (mandatory)
|
|
81
41
|
|
|
@@ -88,89 +48,25 @@ restart/retargeting is required. `ark://manifest` never satisfies this preflight
|
|
|
88
48
|
|
|
89
49
|
## Dual plane — layers + ArkRules (mandatory, except /ark-runtime)
|
|
90
50
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
| Plane | What it protects | Where it lives | Sensors / tools |
|
|
94
|
-
|-------|------------------|----------------|-----------------|
|
|
95
|
-
| **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
|
|
96
|
-
| **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
|
|
97
|
-
|
|
98
|
-
**Rules for every report / answer:**
|
|
99
|
-
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** (or a two-column table with those headers).
|
|
100
|
-
2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
|
|
101
|
-
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).
|
|
103
|
-
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
### Fix + ArkRules
|
|
107
|
-
- Classify each violation: `LAYER_*` / capability → **[Layer]**; `ARKRULE_*` / `INVARIANT_*` → **[ArkRules]**.
|
|
108
|
-
- Structure sensor fixes are judgment (ports, factories, private state) — not mechanical-safe.
|
|
51
|
+
Label findings **`[Layer]`** vs **`[ArkRules]`**. Structure sensor fixes are judgment.
|
|
109
52
|
|
|
110
53
|
## Subagent fan-out (optional, host-dependent)
|
|
111
54
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
| Host capability | Behavior |
|
|
116
|
-
|-----------------|----------|
|
|
117
|
-
| **Parallel subagents supported** (e.g. multi-agent / `spawn_subagent` / concurrent Agent tools) | Launch **2–N** agents in **one wave** with **disjoint path scopes**. Prefer **read-only** explore agents for mapping; at most **one writer** unless the host gives isolated worktrees. Parent merges findings, then runs `ark-check` once. |
|
|
118
|
-
| **Not supported** (single agent only) | **Fall back to sequential** — same checklist, one cluster/step at a time. Never claim parallel work you did not run. |
|
|
119
|
-
|
|
120
|
-
**Rules:**
|
|
121
|
-
1. Give each subagent a **tight brief**: paths in scope, sensor commands allowed, deliverable shape (paths opened + findings JSON or bullets).
|
|
122
|
-
2. **No shared mutable files** across parallel writers.
|
|
123
|
-
3. STOP handoffs and dual-engine rules still apply in every agent.
|
|
124
|
-
4. Parent owns the **### Completion** block (union of **Opened**, single **Handoff**).
|
|
125
|
-
5. Do **not** use subagents to weaken the gate or invent `mechanical-safe` kinds.
|
|
55
|
+
If the host supports **parallel subagents**, fan out read-only scouts; otherwise
|
|
56
|
+
**fall back to sequential**. Never weaken the gate.
|
|
126
57
|
|
|
127
58
|
## Related onboarding
|
|
128
59
|
|
|
129
|
-
- **Greenfield:** `/ark-
|
|
130
|
-
- **Brownfield:** `/ark-adopt
|
|
131
|
-
- **Map first:** `/ark-explore` when the violation is one of many structural smells.
|
|
132
|
-
- **peerIsolation / cross-slice:** always **judgment** — extract to shared, events/ports, or redesign ownership. Never auto-apply cross-feature or cross-context moves.
|
|
133
|
-
- **`vertical-slice` ownership:** feature code stays under `src/features/<slice>/…` (no sibling-slice imports); shared primitives in `src/shared/`; infra in `src/lib/`; shell in `src/app/`. Cross-feature edges are peerIsolation — extract shared or use events/ports.
|
|
134
|
-
- **`ddd-bounded-contexts` ownership:** code under `src/contexts/<context>/{domain,application,infrastructure,presentation}/`; shared kernel only under `src/shared/kernel/`. Cross-context imports (same or cross technical layer) are peerIsolation — integrate via application APIs/events, not peer technical layers.
|
|
135
|
-
- **Default path:** `ark start` → `/ark-autopilot` → `ark-check --doctor`.
|
|
60
|
+
- **Greenfield:** `/ark-adopt` or `ark-check --recommend` / `ark start`.
|
|
61
|
+
- **Brownfield:** `/ark-adopt`.
|
|
136
62
|
|
|
137
|
-
##
|
|
63
|
+
## Steps
|
|
138
64
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
**
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
If the wall is a concentrated contract smell: **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).
|
|
145
|
-
If false-green cores: **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`.
|
|
146
|
-
If many residuals: **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.
|
|
147
|
-
3. **“Así te lo re-soluciono”** — concrete change before editing.
|
|
148
|
-
4. After edits: `ark-check --strict-config` (and baseline if configured).
|
|
149
|
-
|
|
150
|
-
## Common fix patterns
|
|
151
|
-
|
|
152
|
-
| Symptom | Fix |
|
|
153
|
-
|---------|-----|
|
|
154
|
-
| App → Presentation type-only | Extract type to application/core; re-export from UI |
|
|
155
|
-
| App → Presentation value (UI in core) | Move component wrappers to presentation |
|
|
156
|
-
| Domain → outer layer | Port/interface in Domain; adapter outside; or relocate false Domain file (`**/types.ts` trap) |
|
|
157
|
-
| Intent prefix mismatch | Rename intent to layer’s `intentPrefixes` or fix prefix in config via `/ark-contract` |
|
|
158
|
-
| Forbidden global in Domain | Inject a port (Clock, Id, Http) — don’t allow `Date.now` in Domain |
|
|
159
|
-
| Concentrated edge wall | Stop grinding; `/ark-contract` facade/surface split |
|
|
160
|
-
|
|
161
|
-
## Manifiesto
|
|
162
|
-
|
|
163
|
-
If the “fix” is really a missing business intent or Domain home for a rule:
|
|
164
|
-
|
|
165
|
-
- Propose intent name + layer placement.
|
|
166
|
-
- Register / place code so `ark_manifest` / config can enforce it.
|
|
167
|
-
- Do not only delete the import.
|
|
168
|
-
|
|
169
|
-
## Rules
|
|
170
|
-
|
|
171
|
-
- No `ark-*-disable`, no allowing a bad edge “to finish”, no baselining a **new** violation you introduced.
|
|
172
|
-
- Prefer mechanical-safe kinds when the plan tags them; otherwise design judgment carefully.
|
|
173
|
-
- Code only — no DB migrations unless user asked.
|
|
65
|
+
1. Sensor: `ark-check` / `--plan --json`.
|
|
66
|
+
2. If false-green or concentrated edge: **STOP — do not continue this skill as complete.**
|
|
67
|
+
**STOP — false-green:** / **STOP — concentrated edge:** execute **`/ark-adopt`** in this turn.
|
|
68
|
+
3. Otherwise execute **`/ark-autopilot`** for the cluster (extraction card if Shape).
|
|
69
|
+
4. Re-check.
|
|
174
70
|
|
|
175
71
|
## Mechanical-edit hygiene (outcome gate)
|
|
176
72
|
|
|
@@ -179,24 +75,9 @@ If the “fix” is really a missing business intent or Domain home for a rule:
|
|
|
179
75
|
- A convention-only `*-data.ts` stub is not a fix: move the real code or **leave the placeholder file uncreated**; never write `import "server-only"; export {}` as an empty naming token.
|
|
180
76
|
- Keep the edit only when the **previously clean file stays typecheck-clean**. Otherwise roll it back and treat the change as judgment.
|
|
181
77
|
|
|
182
|
-
## Reshape findings (physical cohesion — never mechanical)
|
|
183
|
-
|
|
184
|
-
If `doctor.physicalCohesion` fires while you fix: do **not** fold reshape moves into your fix
|
|
185
|
-
batch. Physical moves run only through `/ark-loop`'s one-pilot loop; merge decisions only as
|
|
186
|
-
`/ark-architect` merge cards. A cohesion finding is context for your fix, never a license to
|
|
187
|
-
reorganize. Respect `physicalCohesion.reshapeDecisions`: never revive a current rejected/deferred
|
|
188
|
-
target from the still-visible facts. If the user makes a verdict while reviewing the finding,
|
|
189
|
-
record its exact `decisionTarget` + reason in `.ark/reshape-decisions.json`; never infer one from
|
|
190
|
-
golden-pattern prose.
|
|
191
|
-
|
|
192
|
-
## Done
|
|
193
|
-
|
|
194
|
-
- Targeted violations gone; no new ones.
|
|
195
|
-
- Report: what moved, what was intentional default, what needs user decision.
|
|
196
|
-
|
|
197
78
|
## Completion contract (skill incomplete if missing)
|
|
198
79
|
|
|
199
|
-
|
|
80
|
+
Skill incomplete if missing any field below.
|
|
200
81
|
|
|
201
82
|
### Completion
|
|
202
83
|
- **Sensor:** commands/tools run
|
|
@@ -204,9 +85,5 @@ End with **exactly** these headings (markdown `###`):
|
|
|
204
85
|
- **Result:** one-line outcome
|
|
205
86
|
- **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
|
|
206
87
|
- **Compass:** top residual lenses | `n/a`
|
|
207
|
-
- **
|
|
208
|
-
- **Handoff:** `/ark-…` / CLI / `none`
|
|
88
|
+
- **Handoff:** `/ark-autopilot` / `/ark-adopt` / `none`
|
|
209
89
|
- **Incomplete?** `no` | `yes — <what is missing>`
|
|
210
|
-
|
|
211
|
-
If a **STOP** handoff applies and you continued as if done, set **Incomplete?** to `yes`.
|
|
212
|
-
**Skill incomplete if missing** any of the bullets above.
|
|
@@ -1,71 +1,34 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ark-loop
|
|
3
|
-
description:
|
|
3
|
+
description: Shortcut to /ark-autopilot for driving plan A to zero. Deprecated as a first-class door. CLI validates — you edit code.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /ark-loop —
|
|
6
|
+
# /ark-loop — Shortcut to /ark-autopilot
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
**Deprecated as a first-class door.** Driving `--plan` to `goal.met` is **`/ark-autopilot`**.
|
|
9
|
+
Do that job now. Auto-apply only the four `mechanical-safe` kinds; judgment you write.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
importers/targets, see if the plan step is a symptom of wrong shape / false Domain / I/O
|
|
13
|
-
under Application — escalate to `/ark-contract` or `/ark-explore` when the wall is structural.
|
|
11
|
+
## Autonomy contract
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Name 1–3 **residual** lenses in plain language before skill-shopping. Always `notAScore` — never invent
|
|
19
|
-
0–10 scores or Excellent/Good ranks.
|
|
20
|
-
|
|
21
|
-
**What the user should feel next:** fewer blocked AI writes, clearer folders, safer domain — then jargon.
|
|
22
|
-
|
|
23
|
-
**Anti false-done:** empty plan A + residual lenses / design-weak → **Incomplete? yes**. Green edges alone
|
|
24
|
-
are not “architecture finished.”
|
|
25
|
-
|
|
26
|
-
**AI-easy architecture:** ports over concrete I/O in domain; one concern per module; golden pattern for
|
|
27
|
-
new files; place before write (`/ark-place` / prepare-write).
|
|
28
|
-
|
|
29
|
-
**Out of scope (honest):** scalability/performance, full app-security tooling (SAST), and full resilience
|
|
30
|
-
patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement for them.
|
|
31
|
-
|
|
32
|
-
**Lens language on each cluster** while looping edges; residual shape lenses hand off to explore/autopilot.
|
|
33
|
-
|
|
34
|
-
## Deep modules (process)
|
|
35
|
-
|
|
36
|
-
- Judgment remediations that introduce ports: **name the seam**, prefer deep modules, **test at the public interface**.
|
|
37
|
-
- Do not invent pass-through files that fail the **deletion test** just to clear a plan step.
|
|
38
|
-
- Empty plan A is edge residual only — Shape residual still needs explore/autopilot; green edges ≠ feature done.
|
|
13
|
+
Invoking this leftover name **is** the approval to apply plan A. Open every step file.
|
|
14
|
+
Write. Re-check. Empty plan A + leftover design → **`/ark-explore`** then **`/ark-autopilot`**
|
|
15
|
+
for one extraction card (never mechanical-safe B).
|
|
39
16
|
|
|
40
17
|
## When / not when
|
|
41
18
|
|
|
42
|
-
| Use
|
|
43
|
-
|
|
44
|
-
| Plan A has steps; drive to `goal.met` |
|
|
45
|
-
| Mechanical-safe +
|
|
46
|
-
| User already has a plan and wants the apply loop | Brownfield contract false-green → `/ark-adopt` |
|
|
47
|
-
|
|
48
|
-
**Empty plan is not success for the product** — only for *edge remediation*. If `goal.met` and
|
|
49
|
-
(`goal.designWeak` or non-empty `patternBets` from `--plan --json`): do **not** invent
|
|
50
|
-
mechanical-safe kinds; hand off `/ark-explore` shape-focus or `/ark-autopilot` for dual-plan B.
|
|
51
|
-
Pattern bets always have `neverMechanicalSafe: true` — extraction cards only
|
|
52
|
-
(`docs/brownfield-adoption.md` §6).
|
|
53
|
-
|
|
54
|
-
## Related onboarding
|
|
55
|
-
|
|
56
|
-
- **Greenfield:** `/ark-architect` or `ark-check --recommend` / `ark start`.
|
|
57
|
-
- **Brownfield:** `/ark-adopt` — match contract to reality; do not force a starter preset.
|
|
58
|
-
- **Map / opportunities:** `/ark-explore`.
|
|
59
|
-
- **Default path:** `ark start` → `/ark-autopilot` → `ark-check --doctor`.
|
|
19
|
+
| Use this leftover name when… | Prefer instead |
|
|
20
|
+
|------------------------------|----------------|
|
|
21
|
+
| Plan A has steps; drive to `goal.met` | **`/ark-autopilot`** |
|
|
22
|
+
| Mechanical-safe + judgment apply | Map only → `/ark-explore`; session 0 → `/ark-adopt` |
|
|
60
23
|
|
|
61
24
|
## Dual engine (mandatory)
|
|
62
25
|
|
|
63
26
|
| Engine | Role |
|
|
64
27
|
|--------|------|
|
|
65
28
|
| **Deterministic** | Only the four `mechanical-safe` kinds auto-apply; plan tags; gate re-check |
|
|
66
|
-
| **Exploratory** | Read sources; detect concentrated edges / false-green
|
|
67
|
-
|
|
29
|
+
| **Exploratory** | Read sources; detect concentrated edges / false-green before grinding |
|
|
68
30
|
|
|
31
|
+
The CLI is a **sensor**, never the whole job. Claiming done without the exploratory bar for this skill is **incomplete**.
|
|
69
32
|
|
|
70
33
|
## MCP workspace binding (mandatory)
|
|
71
34
|
|
|
@@ -76,67 +39,30 @@ retain `projectIdentity.projectId`, then pass both `expectedRoot` and `expectedP
|
|
|
76
39
|
uncertain, do not consume MCP analysis: use the workspace-local CLI and report that MCP
|
|
77
40
|
restart/retargeting is required. `ark://manifest` never satisfies this preflight.
|
|
78
41
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
ArkGate has **two opt-in planes**. The user chooses which to use; you **always label** findings so they never blur.
|
|
82
|
-
|
|
83
|
-
| Plane | What it protects | Where it lives | Sensors / tools |
|
|
84
|
-
|-------|------------------|----------------|-----------------|
|
|
85
|
-
| **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
|
|
86
|
-
| **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
|
|
87
|
-
|
|
88
|
-
**Rules for every report / answer:**
|
|
89
|
-
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** (or a two-column table with those headers).
|
|
90
|
-
2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
|
|
91
|
-
3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
|
|
92
|
-
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).
|
|
93
|
-
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
|
|
42
|
+
Atomic multi-file work uses **`ark_prepare_change`** with the same matched `project` envelope.
|
|
94
43
|
|
|
44
|
+
## Dual plane — layers + ArkRules (mandatory, except /ark-runtime)
|
|
95
45
|
|
|
96
|
-
|
|
97
|
-
- Drive plan to zero **active** debt on the plane the user cares about; keep **[Layer]** and **[ArkRules]** queues separate.
|
|
98
|
-
- One pilot at a time for ArkRules extraction cards (`pilotLoop` / inventory).
|
|
46
|
+
Label findings **`[Layer]`** vs **`[ArkRules]`**. Never invent `mechanical-safe` kinds.
|
|
99
47
|
|
|
100
48
|
## Subagent fan-out (optional, host-dependent)
|
|
101
49
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
| Host capability | Behavior |
|
|
106
|
-
|-----------------|----------|
|
|
107
|
-
| **Parallel subagents supported** (e.g. multi-agent / `spawn_subagent` / concurrent Agent tools) | Launch **2–N** agents in **one wave** with **disjoint path scopes**. Prefer **read-only** explore agents for mapping; at most **one writer** unless the host gives isolated worktrees. Parent merges findings, then runs `ark-check` once. |
|
|
108
|
-
| **Not supported** (single agent only) | **Fall back to sequential** — same checklist, one cluster/step at a time. Never claim parallel work you did not run. |
|
|
109
|
-
|
|
110
|
-
**Rules:**
|
|
111
|
-
1. Give each subagent a **tight brief**: paths in scope, sensor commands allowed, deliverable shape (paths opened + findings JSON or bullets).
|
|
112
|
-
2. **No shared mutable files** across parallel writers.
|
|
113
|
-
3. STOP handoffs and dual-engine rules still apply in every agent.
|
|
114
|
-
4. Parent owns the **### Completion** block (union of **Opened**, single **Handoff**).
|
|
115
|
-
5. Do **not** use subagents to weaken the gate or invent `mechanical-safe` kinds.
|
|
116
|
-
|
|
117
|
-
## Anti-wrapper rule (mandatory)
|
|
50
|
+
If the host supports **parallel subagents**, fan out read-only scouts; otherwise
|
|
51
|
+
**fall back to sequential**. Never weaken the gate.
|
|
118
52
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
**Required:**
|
|
122
|
-
1. `--plan --json` as sensor.
|
|
123
|
-
2. For each step you touch: **read** `file` and `target` source (and enough callers to know the edge).
|
|
124
|
-
3. **“Así te lo re-soluciono”** — exact edit before applying.
|
|
125
|
-
4. After each apply: full gate re-run; rollback if targeted violation remains or new ones appear.
|
|
126
|
-
5. If one edge dominates: **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).
|
|
127
|
-
6. If empty cores + I/O under Application: **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`.
|
|
53
|
+
## Related onboarding
|
|
128
54
|
|
|
129
|
-
|
|
55
|
+
- **Greenfield:** `/ark-adopt` or `ark-check --recommend` / `ark start`.
|
|
56
|
+
- **Brownfield:** `/ark-adopt`.
|
|
130
57
|
|
|
131
|
-
|
|
132
|
-
|-------------------|------------|
|
|
133
|
-
| `type-only-import-move` | Move type to owning layer; re-export for back-compat |
|
|
134
|
-
| `pure-type-file-relocate` | Relocate pure-type file to owning layer (or rename out of false Domain globs) |
|
|
135
|
-
| `import-type-from-pure-type-module` | Convert value import of pure-type module to `import type` |
|
|
136
|
-
| `import-type-of-type-exports` | Convert value-syntax named import/export of type-only exports from a mixed module to `import type` / `export type` |
|
|
137
|
-
| *(none for port-proof)* | **W6** `port-proof-inject-binding` is **judgment** (arity change) — propose inject; do not auto-apply |
|
|
58
|
+
## Steps
|
|
138
59
|
|
|
139
|
-
|
|
60
|
+
1. `--plan --json`. Open every `steps[]` file.
|
|
61
|
+
2. If one edge dominates: **STOP — do not continue this skill as complete.**
|
|
62
|
+
**STOP — concentrated edge:** execute **`/ark-adopt`**.
|
|
63
|
+
3. If empty cores + I/O under Application: **STOP — do not continue this skill as complete.**
|
|
64
|
+
**STOP — false-green:** execute **`/ark-adopt`**.
|
|
65
|
+
4. Else execute **`/ark-autopilot`** (mechanical-safe + judgment). Extraction card for Shape B.
|
|
140
66
|
|
|
141
67
|
## Mechanical-edit hygiene (outcome gate)
|
|
142
68
|
|
|
@@ -145,53 +71,9 @@ Never auto: free value uses of imports, multi-import files, dynamic import/requi
|
|
|
145
71
|
- A convention-only `*-data.ts` stub is not a fix: move the real code or **leave the placeholder file uncreated**; never write `import "server-only"; export {}` as an empty naming token.
|
|
146
72
|
- Keep the edit only when the **previously clean file stays typecheck-clean**. Otherwise roll it back and treat the change as judgment.
|
|
147
73
|
|
|
148
|
-
## Reshape pilots (physical cohesion — physical cohesion, advisory)
|
|
149
|
-
|
|
150
|
-
When `ark-check --doctor --json` carries `doctor.physicalCohesion.reshapePilot.nextPilot`,
|
|
151
|
-
you may run **that one pilot** — never more:
|
|
152
|
-
|
|
153
|
-
1. Read `physicalCohesion.reshapeDecisions` first. A current rejected/deferred target has no live
|
|
154
|
-
card: respect the explicit record and do not reconstruct it from raw facts. Read a live card's
|
|
155
|
-
`pilotTarget`, `decisionTarget`, `moveSample`/`movesTotal`, `successSignal`, `killSwitch`, `doNot[]`.
|
|
156
|
-
2. Moves are **proposed only** — enumerate the full move set for the pilot anchor, express it as
|
|
157
|
-
an architecture change map, and validate through the atomic preflight (`ark_prepare_change`
|
|
158
|
-
with the matched `project` envelope / the write gate) **before** any file moves. A move the preflight rejects is a finding, not a
|
|
159
|
-
thing to force.
|
|
160
|
-
3. Never move anything under `app/` or `pages/` (fixed by framework convention). Never merge
|
|
161
|
-
files here — merges are judgment cards for `/ark-architect` / `/ark-fix`.
|
|
162
|
-
4. After the move set: full gate re-run + re-doctor. Success = the concept's cluster count drops
|
|
163
|
-
and the verdict stays green; otherwise use the kill switch (revert the move set, nothing else).
|
|
164
|
-
5. Re-doctor decides whether a next card exists. One pilot per loop iteration, always.
|
|
165
|
-
6. If the user accepts, defers, or rejects the target, persist that explicit verdict in
|
|
166
|
-
`.ark/reshape-decisions.json` using the card's exact `decisionTarget`, a reason, and optional
|
|
167
|
-
`reviewBy`. `accepted` keeps this execution path; `deferred`/`rejected` stop repeat pressure.
|
|
168
|
-
Never infer a decision from `.ark/golden-pattern.json` prose.
|
|
169
|
-
|
|
170
|
-
## Steps
|
|
171
|
-
|
|
172
|
-
1. **Plan** — `ark-check --plan --json` (+ `--baseline` if used). If `goal.met`: stop **A**;
|
|
173
|
-
if design-weak residual is visible, hand off explore/autopilot B — do not claim architecture done.
|
|
174
|
-
2. **Worktree** — prefer discardable git worktree.
|
|
175
|
-
3. **Apply mechanical-safe** one-by-one with validate/rollback.
|
|
176
|
-
4. **Judgment** — propose with source-based design; apply only if user approved (or parent autopilot said full apply).
|
|
177
|
-
5. **Re-plan** after each round until dry, `goal.met`, or only judgment left without approval.
|
|
178
|
-
6. **Report** — auto-applied / proposed / deferred with paths; never claim clean if skipped.
|
|
179
|
-
|
|
180
|
-
## Operating rules
|
|
181
|
-
|
|
182
|
-
- Never weaken the gate (no rule disables, no fresh baselining of new debt).
|
|
183
|
-
- Concentrated single edge → stop and hand to `/ark-contract` with code evidence.
|
|
184
|
-
- When unsure behavior preservation → judgment, not mechanical-safe.
|
|
185
|
-
|
|
186
|
-
## Done criteria
|
|
187
|
-
|
|
188
|
-
- Gate confirms each kept edit.
|
|
189
|
-
- Honest residual list with **Así te lo re-soluciono** for anything left.
|
|
190
|
-
- If residual steps hide domain/business rules in the wrong layer, call out **manifiesto** work (`intentPrefixes` / Domain placement) via `/ark-contract` or `/ark-adopt`.
|
|
191
|
-
|
|
192
74
|
## Completion contract (skill incomplete if missing)
|
|
193
75
|
|
|
194
|
-
|
|
76
|
+
Skill incomplete if missing any field below.
|
|
195
77
|
|
|
196
78
|
### Completion
|
|
197
79
|
- **Sensor:** commands/tools run
|
|
@@ -199,9 +81,5 @@ End with **exactly** these headings (markdown `###`):
|
|
|
199
81
|
- **Result:** one-line outcome
|
|
200
82
|
- **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
|
|
201
83
|
- **Compass:** top residual lenses | `n/a`
|
|
202
|
-
- **
|
|
203
|
-
- **Handoff:** `/ark-…` / CLI / `none`
|
|
84
|
+
- **Handoff:** `/ark-autopilot` / `/ark-explore` / `none`
|
|
204
85
|
- **Incomplete?** `no` | `yes — <what is missing>`
|
|
205
|
-
|
|
206
|
-
If a **STOP** handoff applies and you continued as if done, set **Incomplete?** to `yes`.
|
|
207
|
-
**Skill incomplete if missing** any of the bullets above.
|