arkgate 3.0.2 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -1
- package/README.md +30 -2
- package/bin/ark-mcp.mjs +14 -7
- package/bin/lib/ai-velocity.mjs +293 -0
- package/bin/lib/ci-and-commands.mjs +8 -6
- package/bin/lib/design-smells.mjs +122 -58
- package/bin/lib/doctor-plan.mjs +104 -7
- package/bin/lib/golden-pattern.mjs +184 -0
- package/bin/lib/pilot-loop.mjs +266 -0
- package/bin/lib/post-green-path.mjs +79 -0
- package/bin/lib/prepare-write.mjs +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/agent-guide.md +62 -10
- package/docs/brownfield-adoption.md +22 -1
- package/docs/package-surface.md +5 -1
- package/package.json +2 -1
- package/server.json +2 -2
- package/templates/skills/ark-autopilot.md +7 -0
- package/templates/skills/ark-explain.md +34 -3
- package/templates/skills/ark-explore.md +15 -5
- package/templates/skills/ark-place.md +4 -1
|
@@ -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) |
|
|
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).
|
|
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.
|