arkgate 4.6.0 → 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 +25 -1
- package/README.md +9 -5
- package/bin/ark-check-runtime.mjs +98 -7
- package/bin/ark-mcp-runtime.mjs +17 -1
- package/bin/ark.mjs +5 -3
- package/bin/lib/agent-projection.mjs +1 -1
- package/bin/lib/analysis-engine.mjs +3 -3
- package/bin/lib/ci-and-commands.mjs +11 -11
- package/bin/lib/config-contract.mjs +2 -0
- package/bin/lib/contract-smells.mjs +5 -5
- package/bin/lib/design-smells.mjs +1 -1
- package/bin/lib/doctor-advisories.mjs +9 -0
- package/bin/lib/doctor-plan.mjs +4 -4
- package/bin/lib/field-install.mjs +1 -1
- package/bin/lib/html-report-advisories.mjs +20 -0
- package/bin/lib/improvement-compass-map.mjs +20 -20
- package/bin/lib/pilot-loop.mjs +1 -1
- package/bin/lib/post-green-path.mjs +2 -2
- package/bin/lib/prepare-change.mjs +9 -0
- package/bin/lib/product-copy.mjs +1 -1
- package/bin/lib/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 +16 -0
- package/bin/lib/violations.mjs +8 -4
- package/dist/{configTypes-CC0FEXoF.d.ts → configTypes-B8uIcLaG.d.ts} +5 -0
- package/dist/eslint/index.cjs +2 -2
- package/dist/eslint/index.d.ts +1 -1
- package/dist/eslint/index.js +2 -2
- package/dist/index.cjs +19 -19
- package/dist/index.d.ts +61 -2
- package/dist/index.js +22 -22
- package/docs/README.md +5 -5
- package/docs/agent-guide.md +21 -17
- package/docs/configuration.md +36 -2
- package/docs/develop.md +13 -1
- package/docs/enthusiast/README.md +1 -1
- package/docs/enthusiast/how-to-agent-gates.md +3 -3
- package/docs/enthusiast/how-to-pick-shape.md +2 -2
- package/docs/enthusiast/tutorial-first-project.md +4 -3
- package/docs/package-surface.md +5 -3
- package/docs/product-voice.md +48 -10
- package/docs/use.md +6 -1
- package/package.json +2 -2
- package/schemas/ark.config.schema.json +9 -0
- package/schemas/ark.status-manifest.schema.json +51 -0
- package/server.json +3 -3
- package/templates/agent-skills/README.md +1 -1
- package/templates/agent-skills/ark-adopt/SKILL.md +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 +25 -17
- 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 +11 -7
- 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 +25 -17
- 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 +11 -7
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ark-place
|
|
3
|
-
description: "Where does new code go? Names the layer, directory, and naming for a new artifact from the contract, and
|
|
3
|
+
description: "Where does new code go? Names the layer, directory, and naming for a new artifact from the contract, and writes it there. Autonomous."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /ark-place — Where does this code go?
|
|
7
7
|
|
|
8
|
+
## Autonomy contract
|
|
9
|
+
|
|
10
|
+
Invoking this skill **is** the approval. If the user described an artifact, **write the
|
|
11
|
+
files** in this turn (prepare-write + scaffold). A path table alone is incomplete.
|
|
12
|
+
The CLI is a **sensor and gate**. **CLI budget:** `ark_identity` then `ark_place` (or
|
|
13
|
+
read `ark.config.json`); write; `ark-check`. Do not ask which layer they prefer.
|
|
14
|
+
|
|
15
|
+
**Still never:** weaken `ark.config.json`; invent `mechanical-safe` kinds; claim leftover
|
|
16
|
+
design work is finished because one file landed.
|
|
17
|
+
|
|
8
18
|
## Improvement compass (process preflight)
|
|
9
19
|
|
|
10
20
|
When doctor is available, read `doctor.improvementCompass` (or the human **Improvement compass** section).
|
|
@@ -34,8 +44,8 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
|
|
|
34
44
|
|
|
35
45
|
| Use `/ark-place` when… | Do **not** use it when… |
|
|
36
46
|
|------------------------|-------------------------|
|
|
37
|
-
| New artifact: where +
|
|
38
|
-
| Naming / directory for a known kind |
|
|
47
|
+
| New artifact: where + **write** under the config | Existing violation cluster → `/ark-autopilot` |
|
|
48
|
+
| Naming / directory for a known kind | Session 0 / config missing or lying → `/ark-adopt` (then come back) |
|
|
39
49
|
|
|
40
50
|
The user describes something they need to build (a saga, a background job, an
|
|
41
51
|
event handler, a repository, an HTTP client, a use case, a projection, …).
|
|
@@ -83,7 +93,7 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
|
|
|
83
93
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** (or a two-column table with those headers).
|
|
84
94
|
2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
|
|
85
95
|
3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
|
|
86
|
-
4.
|
|
96
|
+
4. Missing layer home: add it via **`/ark-adopt`** in this session if needed, then write the file; never invent `mechanical-safe`.
|
|
87
97
|
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
|
|
88
98
|
|
|
89
99
|
|
|
@@ -132,17 +142,19 @@ the same files or weaken the gate.
|
|
|
132
142
|
3. **Answer concretely**: layer name, target directory (from the layer's
|
|
133
143
|
`patterns`), intent-name prefix if the layer declares `intentPrefixes`, and
|
|
134
144
|
which layers it may/may not import (from `rules`).
|
|
135
|
-
4. **If the layer isn't adopted yet** (suggested but no directory):
|
|
136
|
-
|
|
137
|
-
|
|
145
|
+
4. **If the layer isn't adopted yet** (suggested but no directory): write the
|
|
146
|
+
layer into `ark.config.json` (session-0 honesty — same as `/ark-adopt` for
|
|
147
|
+
that glob) **then** write the file. Don't silently drop the code into a
|
|
138
148
|
wrong-but-existing layer.
|
|
139
|
-
5. **If
|
|
140
|
-
|
|
149
|
+
5. **Write it.** If the user described the artifact, scaffold the file(s) in
|
|
150
|
+
place this turn (prepare-write), following the nearest existing sibling's
|
|
151
|
+
style, and any port/adapter split the rules force. A path table without
|
|
152
|
+
files is incomplete unless they asked “where only.”
|
|
141
153
|
|
|
142
154
|
## Critical handoffs
|
|
143
155
|
|
|
144
|
-
- If the user needs bulk adoption / wrong
|
|
145
|
-
- If
|
|
156
|
+
- If the user needs bulk adoption / wrong config, not a single artifact: **STOP — do not continue this skill as complete.** Switch to **`/ark-adopt`** (write the path) instead of ad-hoc multi-file grinding without a plan.
|
|
157
|
+
- If the config lacks a home for the artifact: add the layer **in this turn**, then write the file.
|
|
146
158
|
- If doctor is **ENFORCE · design-weak** and the user is asking to reshape existing structure
|
|
147
159
|
(not place one new artifact): place only the new file under the golden/contract home, then
|
|
148
160
|
hand off **one** pilot via `pilotLoop.nextPilot` / `/ark-explore` shape-focus — never multi-pilot
|
|
@@ -159,8 +171,8 @@ the same files or weaken the gate.
|
|
|
159
171
|
|
|
160
172
|
## Related onboarding
|
|
161
173
|
|
|
162
|
-
- Run **after**
|
|
163
|
-
`/ark-adopt`
|
|
174
|
+
- Run **after** session 0: `/ark-adopt` (or `ark init --archetype` / `ark-check --recommend`
|
|
175
|
+
on greenfield). Brownfield: `/ark-adopt` first if the config is missing or lying.
|
|
164
176
|
- `ark-check --recommend` / MCP `ark_recommend` picks phase-1 dirs; gallery starters in
|
|
165
177
|
`examples/*-starter/` show correct placement per archetype.
|
|
166
178
|
- Related demos: `docs/demos/` (write-gate self-correction, brownfield, autopilot).
|
|
@@ -19,7 +19,7 @@ one feature at a time.
|
|
|
19
19
|
|
|
20
20
|
This skill is **experimental runtime** only. Do **not** treat runtime adoption as residual on the
|
|
21
21
|
resilience lens unless the user explicitly opts into the experimental kernel. Prefer doctor compass
|
|
22
|
-
for static architecture residual; hand static residual to `/ark-explore` / `/ark-
|
|
22
|
+
for static architecture residual; hand static residual to `/ark-explore` / `/ark-autopilot`.
|
|
23
23
|
|
|
24
24
|
## Dual engine (mandatory)
|
|
25
25
|
|
|
@@ -86,7 +86,7 @@ the same files or weaken the gate.
|
|
|
86
86
|
|
|
87
87
|
## Critical handoffs
|
|
88
88
|
|
|
89
|
-
- No static gates yet: **STOP — do not continue this skill as complete.** Run `/ark-
|
|
89
|
+
- No static gates yet: **STOP — do not continue this skill as complete.** Run `/ark-adopt` first (`ark-check --recommend` / leftover `/ark-architect`).
|
|
90
90
|
- Runtime companion unavailable from npm and no ArkGate source checkout: **STOP** and report the distribution boundary.
|
|
91
91
|
- Inventory finds nothing: stop; do not introduce kernel speculatively.
|
|
92
92
|
|
|
@@ -102,7 +102,7 @@ the same files or weaken the gate.
|
|
|
102
102
|
|
|
103
103
|
## Related onboarding
|
|
104
104
|
|
|
105
|
-
- Adopt static gates and application shape **first** (`/ark-
|
|
105
|
+
- Adopt static gates and application shape **first** (`/ark-adopt`).
|
|
106
106
|
- Runtime kernel is optional and separate from enthusiast onboarding.
|
|
107
107
|
|
|
108
108
|
## Verify and report
|
|
@@ -5,6 +5,9 @@ description: Host-side architectural reasoning — 2–3 enforceable options on
|
|
|
5
5
|
|
|
6
6
|
# /ark-think — Architectural reasoning (host LLM only)
|
|
7
7
|
|
|
8
|
+
**Shortcut.** One decision only. Full map → **`/ark-explore`**. Apply → **`/ark-autopilot`**.
|
|
9
|
+
Session 0 → **`/ark-adopt`**.
|
|
10
|
+
|
|
8
11
|
You are the user's architecture thinking partner **inside** the project's Ark contract.
|
|
9
12
|
This skill does **not** call any LLM API from the arkgate package. **You** (the host agent)
|
|
10
13
|
reason; the write-gate and CI remain deterministic.
|
|
@@ -39,8 +42,8 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
|
|
|
39
42
|
| Use `/ark-think` when… | Do **not** use it when… |
|
|
40
43
|
|------------------------|-------------------------|
|
|
41
44
|
| One decision: new layer vs slice, port vs shared, peerIsolation choice | Full map / ranked residual / dual-plan seed → `/ark-explore` |
|
|
42
|
-
| 2–3 options already bounded by a known surface | Apply remediation → `/ark-
|
|
43
|
-
| Trade-offs before writing a **new** feature | Brownfield
|
|
45
|
+
| 2–3 options already bounded by a known surface | Apply remediation → `/ark-autopilot` |
|
|
46
|
+
| Trade-offs before writing a **new** feature | Brownfield config wrong / false-green → `/ark-adopt` |
|
|
44
47
|
| Explain *why* a rule exists in *this* tree | HTML tour → `/ark-explain`; fitness numbers → `/ark-coverage` |
|
|
45
48
|
|
|
46
49
|
If you lack a product map and the tree is messy: run a **compressed** explore pass first
|
|
@@ -9,9 +9,14 @@ Upgrade the published `arkgate` package and its managed gates without treating a
|
|
|
9
9
|
filename, package version, or similar-looking file as proof of ownership. The
|
|
10
10
|
preview is the source of truth: inspect it before applying anything.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
this
|
|
12
|
+
## Autonomy contract
|
|
13
|
+
|
|
14
|
+
Invoking this skill **is** the approval. Preview, then `--apply` **in this turn**.
|
|
15
|
+
Stopping at preview is incomplete unless the probe failed or a conflict needs
|
|
16
|
+
`--accept-conflicts` / `--refresh-skills` consent.
|
|
17
|
+
|
|
18
|
+
For session 0, start with `/ark-adopt` (or `ark-check --recommend`); brownfield
|
|
19
|
+
honesty is `/ark-adopt` before this upgrade flow.
|
|
15
20
|
|
|
16
21
|
## Improvement compass (process preflight)
|
|
17
22
|
|
|
@@ -99,7 +104,7 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
|
|
|
99
104
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** (or a two-column table with those headers).
|
|
100
105
|
2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
|
|
101
106
|
3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
|
|
102
|
-
4.
|
|
107
|
+
4. After upgrade, leftover architecture work is **`/ark-autopilot`** (never invent `mechanical-safe`).
|
|
103
108
|
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
|
|
104
109
|
|
|
105
110
|
|
|
@@ -241,9 +246,8 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
|
|
|
241
246
|
`doctor.deepModuleCoach` honesty. Run `npx arkgate agents-md --check` and
|
|
242
247
|
`npx arkgate status --json`. If MCP was used, restart MCP after package bump and re-bind
|
|
243
248
|
identity. Treat provider-unavailable CI required-check evidence as `unverified`, never as proof
|
|
244
|
-
that merges are blocked.
|
|
245
|
-
|
|
246
|
-
approval.
|
|
249
|
+
that merges are blocked. If new violations appear, hand off to `/ark-autopilot`; do not regenerate a baseline without
|
|
250
|
+
explicit approval.
|
|
247
251
|
|
|
248
252
|
## Active host vs deferred hosts
|
|
249
253
|
|