arkgate 3.0.2 → 3.0.4

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.
@@ -57,7 +57,33 @@ the same files or weaken the gate.
57
57
  2. Tell the user the path to `ark-report.html` and `.ark/reports/origin.html`.
58
58
  Mention `.ark/` should stay gitignored (Ark appends that on first report when possible).
59
59
 
60
- 3. Optionally also run:
60
+ 3. **Open the report in the default browser** (mandatory when `ark-report.html` exists and
61
+ this is a local interactive session — skip only in CI/headless or if the user said not to):
62
+
63
+ Detect OS and run **one** simple open (best-effort; do not fail the skill if open fails):
64
+
65
+ | OS | Command |
66
+ |----|---------|
67
+ | **macOS** | `open ark-report.html` |
68
+ | **Linux** | `xdg-open ark-report.html` |
69
+ | **Windows** | `start ark-report.html` (cmd) or `Invoke-Item ark-report.html` (PowerShell) |
70
+
71
+ One-liner that picks the host OS (from the project root, after the report was written):
72
+
73
+ ```bash
74
+ # macOS / Linux / Windows (Git Bash or similar)
75
+ case "$(uname -s 2>/dev/null || echo unknown)" in
76
+ Darwin*) open ark-report.html ;;
77
+ Linux*) xdg-open ark-report.html ;;
78
+ MINGW*|MSYS*|CYGWIN*|Windows_NT) start ark-report.html 2>/dev/null || cmd.exe /c start ark-report.html ;;
79
+ *) open ark-report.html 2>/dev/null || xdg-open ark-report.html 2>/dev/null || true ;;
80
+ esac
81
+ ```
82
+
83
+ Prefer the absolute path if the cwd is not the project root. This only opens the file in
84
+ the **default browser** — no special flags, no browser selection.
85
+
86
+ 4. Optionally also run:
61
87
 
62
88
  ```bash
63
89
  npx ark-check --coverage
@@ -104,6 +130,8 @@ else is judgment/deferred and must not be auto-applied.
104
130
  - the strict check from `package.json` (or `ark-check --root . --config ark.config.json --strict-config`)
105
131
  - `/ark-place` for "where does new code go?"
106
132
  - the path to `ark-report.html`
133
+ - **open that HTML in the default browser** (step 3 above: `open` / `xdg-open` / `start`)
134
+ if you have not already — so the user sees the showcase without hunting for the file
107
135
 
108
136
  ## Related
109
137
 
@@ -116,11 +144,14 @@ else is judgment/deferred and must not be auto-applied.
116
144
  End with **exactly** these headings (markdown `###`):
117
145
 
118
146
  ### Completion
119
- - **Sensor:** commands/tools run
147
+ - **Sensor:** commands/tools run (include report + browser-open command when used)
120
148
  - **Opened:** real paths read (or `n/a` only if pure install/upgrade with no source analysis)
121
- - **Result:** one-line outcome
149
+ - **Result:** one-line outcome (include `ark-report.html` path; note if browser open was attempted)
122
150
  - **Handoff:** `/ark-…` / CLI / `none`
123
151
  - **Incomplete?** `no` | `yes — <what is missing>`
124
152
 
153
+ Prefer **Incomplete?** `yes` if the showcase report was generated but the browser-open step was
154
+ skipped without CI/headless/user-opt-out reason.
155
+
125
156
  If a **STOP** handoff applies and you continued as if done, set **Incomplete?** to `yes`.
126
157
  **Skill incomplete if missing** any of the bullets above.
@@ -16,10 +16,15 @@ ranked residual that changes the next command — **not** a celebration of ENFOR
16
16
  | Use `/ark-explore` when… | Do **not** use it when… |
17
17
  |--------------------------|-------------------------|
18
18
  | Map / “what next?” / residual after ENFORCE | User wants edits applied → `/ark-autopilot` or `/ark-fix` |
19
+ | **Primary post-green door (Q01):** messy / spaghetti / design-weak / “clarify for AI” | Skill-shopping coverage or think for the same residual |
19
20
  | Spaghetti brownfield: patterns concurrent, design-weak under green check | Only “governed% + gates installed?” numbers → `/ark-coverage` |
20
21
  | Dual-plan **seed** (A remediation + B pattern bets) without applying | One design trade-off between 2–3 options already mapped → `/ark-think` |
21
22
  | Path-correct vs design-correct honesty | Plain-language tour / HTML report → `/ark-explain` |
22
23
 
24
+ **Q01 single path:** when doctor `postGreenPath` / ENFORCE · design-weak is active, **this skill
25
+ (shape-focus / dual-plan seed) is the map half of the one door** — then `/ark-autopilot` only
26
+ to apply B with user OK. Do not send the user to coverage or think as equal first choices.
27
+
23
28
  `/ark-autopilot`, `/ark-adopt`, and `/ark-coverage` embed a **lighter** version of this pass.
24
29
  **You** are the full recon + pattern-planning skill.
25
30
 
@@ -218,11 +223,15 @@ ENFORCE without Shape progress is **`ENFORCE · design-weak`** — say that out
218
223
  | `facade-sql-in-routes` | Routes import raw ORM/SQL while “repositories exist” elsewhere |
219
224
 
220
225
  **Extraction card** (for each I/O / god-module B bet — judgment, never mechanical-safe).
221
- Canonical productized template also in `docs/brownfield-adoption.md` §6:
226
+ Canonical productized template also in `docs/brownfield-adoption.md` §6.
227
+
228
+ **Q04 pilot loop:** when doctor/plan JSON is available, use **`pilotLoop.nextPilot`** as the
229
+ **single** next extraction card (one pilot at a time → re-doctor). Do not open five B bets
230
+ in parallel. After the pilot lands, re-run doctor; success = reduced evidence on pilot paths.
222
231
 
223
232
  ```text
224
233
  ### Extraction card
225
- Pilot: <one dir or feature>
234
+ Pilot: <one dir or feature — or pilotLoop.nextPilot.pilotTarget>
226
235
  Smell: <doctor designSmells[].id when present, else agent-detected id>
227
236
  Move: <verbatim I/O or rule → port/adapter or Domain file>
228
237
  Do not:
@@ -230,12 +239,13 @@ Do not:
230
239
  - weaken ark.config.json
231
240
  - auto-apply as mechanical-safe or invent new mechanical-safe kinds
232
241
  - big-bang the monorepo
233
- Success: <observable / falsifiable>
242
+ Success: <observable / falsifiable — re-doctor>
234
243
  Kill-switch: <stop condition>
235
- Next: /ark-autopilot (apply with user ok) | /ark-fix (one cluster) | /ark-contract (globs only)
244
+ Next: /ark-autopilot (apply with user ok) | /ark-fix (one cluster) | re-doctor
236
245
  ```
237
246
 
238
- When doctor JSON is available, prefer smell `id`s from `designSmells` / `patternBets[].smellId`.
247
+ When doctor JSON is available, prefer smell `id`s from `designSmells` / `patternBets[].smellId`
248
+ and the ranked **`pilotLoop.nextPilot`**.
239
249
 
240
250
  ## Output format (keep tight)
241
251
 
@@ -47,7 +47,10 @@ the same files or weaken the gate.
47
47
  1. **Read the contract, not your intuition.** If the `ark` MCP server is available,
48
48
  call the **`ark_place`** tool with the target file path — it returns the layer,
49
49
  its forbidden globals, and exactly which layers the file may / must not import,
50
- straight from the contract (no guessing). Otherwise load `ark.config.json` and the
50
+ straight from the contract (no guessing). When present, also honor optional
51
+ **`goldenPattern`** (from `.ark/golden-pattern.json`) for **NEW code only** —
52
+ advisory layout norm; never overrides the gate and never clears design-weak.
53
+ Absent golden is normal. Otherwise load `ark.config.json` and the
51
54
  `ark://manifest` MCP resource (it includes `suggestedLayers` with conventional
52
55
  directories for layers not yet adopted). The project's `AGENTS.md` placement table,
53
56
  if present, is authoritative too.