arkgate 4.6.4 → 4.6.6
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 +77 -2105
- package/README.md +11 -9
- package/bin/ark-check-runtime.mjs +136 -16
- package/bin/ark-mcp-runtime.mjs +18 -30
- package/bin/ark.mjs +13 -3
- package/bin/lib/adapter-contract.mjs +13 -9
- package/bin/lib/adoption-stance.mjs +104 -0
- package/bin/lib/agent-projection-command.mjs +18 -0
- package/bin/lib/agent-projection.mjs +2 -2
- package/bin/lib/analysis-engine.mjs +5 -5
- package/bin/lib/ci-and-commands.mjs +3 -3
- package/bin/lib/ci-merge-boundary.mjs +91 -0
- package/bin/lib/config-contract.mjs +2 -0
- package/bin/lib/design-delta.mjs +2 -2
- package/bin/lib/design-smells.mjs +1 -1
- package/bin/lib/diagnostic-catalog.mjs +6 -5
- package/bin/lib/doctor-advisories.mjs +2 -2
- package/bin/lib/doctor-next-actions.mjs +35 -5
- package/bin/lib/doctor-plan.mjs +164 -133
- package/bin/lib/enforcement-honesty.mjs +72 -0
- package/bin/lib/first-run-help.mjs +8 -7
- package/bin/lib/graph-blind.mjs +15 -6
- package/bin/lib/html-report-advisories.mjs +10 -2
- package/bin/lib/html-report.mjs +2 -2
- package/bin/lib/install-migrate.mjs +10 -0
- package/bin/lib/invariant-coverage.mjs +6 -2
- package/bin/lib/managed-upgrade.mjs +8 -3
- package/bin/lib/mcp-adoption.mjs +19 -0
- package/bin/lib/policy-delta-io.mjs +1 -1
- package/bin/lib/post-green-path.mjs +5 -1
- package/bin/lib/presets.mjs +22 -0
- package/bin/lib/product-copy.mjs +6 -3
- package/bin/lib/remediation.mjs +74 -10
- package/bin/lib/skill-install.mjs +2 -0
- package/bin/lib/snippet-analysis.mjs +40 -8
- package/bin/lib/start-preview.mjs +12 -22
- package/bin/lib/status-command.mjs +16 -0
- package/bin/lib/status-manifest.mjs +8 -2
- package/bin/lib/team-parliament-io.mjs +62 -2
- package/bin/lib/team-parliament.mjs +25 -5
- package/bin/lib/unavailable-analysis.mjs +1 -0
- package/dist/{configTypes-B8uIcLaG.d.ts → configTypes-l6XiwiC1.d.ts} +7 -0
- package/dist/eslint/index.cjs +3 -3
- package/dist/eslint/index.d.ts +1 -1
- package/dist/eslint/index.js +3 -3
- package/dist/index.cjs +26 -26
- package/dist/index.d.ts +20 -3
- package/dist/index.js +29 -29
- package/docs/README.md +6 -9
- package/docs/agent-guide.md +10 -0
- package/docs/ai-gates.md +12 -5
- package/docs/brownfield-adoption.md +7 -1
- package/docs/configuration.md +11 -2
- package/docs/develop.md +4 -2
- package/docs/diagnostics.md +17 -7
- package/docs/package-surface.md +6 -4
- package/docs/product-voice.md +6 -4
- package/docs/threat-model.md +2 -2
- package/docs/use.md +5 -4
- package/package.json +1 -1
- package/schemas/ark.config.schema.json +6 -0
- package/schemas/ark.design-delta.schema.json +1 -1
- package/server.json +2 -2
- package/templates/agent-skills/README.md +1 -1
- package/templates/agent-skills/ark-adopt/SKILL.md +7 -0
- package/templates/agent-skills/ark-explore/SKILL.md +6 -0
- package/templates/agent-skills/ark-place/SKILL.md +11 -4
- package/templates/agent-skills/ark-upgrade/SKILL.md +9 -2
- package/templates/skills/ark-adopt.md +7 -0
- package/templates/skills/ark-explore.md +6 -0
- package/templates/skills/ark-place.md +11 -4
- package/templates/skills/ark-upgrade.md +9 -2
package/docs/README.md
CHANGED
|
@@ -40,7 +40,7 @@ Product site: [arkgate.online](https://www.arkgate.online/) · npm: [`arkgate`](
|
|
|
40
40
|
| Doc | What it is |
|
|
41
41
|
|-----|------------|
|
|
42
42
|
| [CONTRIBUTING.md](../CONTRIBUTING.md) | Setup, rules, PR/release |
|
|
43
|
-
| [ROADMAP.md](../ROADMAP.md) |
|
|
43
|
+
| [ROADMAP.md](../ROADMAP.md) | Live implementation queue (one `doing` at a time). History: [archive/roadmap-history.md](archive/roadmap-history.md) |
|
|
44
44
|
| [adr/](adr/README.md) | Architecture decisions |
|
|
45
45
|
| [SECURITY.md](../SECURITY.md) · [threat-model.md](threat-model.md) | Security |
|
|
46
46
|
|
|
@@ -52,18 +52,15 @@ These are **not** the day-to-day product path. They stay in the repo for evidenc
|
|
|
52
52
|
|
|
53
53
|
| Area | Path |
|
|
54
54
|
|------|------|
|
|
55
|
-
| Release notes (by version) | [releases/](releases/) · [CHANGELOG.md](../CHANGELOG.md) |
|
|
56
|
-
| Epic plans
|
|
55
|
+
| Release notes (by version) | [releases/](releases/) · npm [CHANGELOG.md](../CHANGELOG.md) (Unreleased + 4.6.x) · [pre-4.6 archive](archive/CHANGELOG-pre-4.6.md) |
|
|
56
|
+
| Epic plans | [plans/](plans/) — maintainer seeds, not required to use the package. Live: [alive-in-six-months](plans/alive-in-six-months/README.md) (`AL01`–`AL04` done on `main`; `AL05` parked). |
|
|
57
57
|
| Claims audit | [audit/claims-matrix.md](audit/claims-matrix.md) |
|
|
58
58
|
| Field adoption kit (scaffolding, not closed) | [field/](field/) |
|
|
59
59
|
| Runtime hardening (experimental) | [production-hardening.md](production-hardening.md) |
|
|
60
60
|
|
|
61
|
-
Current
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
Previous: [releases/4.6.1.md](releases/4.6.1.md) · [releases/4.6.0.md](releases/4.6.0.md) · [releases/4.5.7.md](releases/4.5.7.md) · [releases/4.5.6.md](releases/4.5.6.md) · [releases/4.5.5.md](releases/4.5.5.md) · [releases/4.5.0.md](releases/4.5.0.md) · [releases/4.4.0.md](releases/4.4.0.md) · [releases/4.3.0.md](releases/4.3.0.md) · [releases/4.2.1.md](releases/4.2.1.md) · [releases/4.2.0.md](releases/4.2.0.md) · [releases/4.1.1.md](releases/4.1.1.md).
|
|
65
|
-
Previous major: [releases/4.0.0.md](releases/4.0.0.md) (`arkgate@4.0.0`).
|
|
66
|
-
Config: [configuration.md](configuration.md) · Agent skills dual-plane: [agent-guide.md](agent-guide.md).
|
|
61
|
+
Current: [releases/4.6.6.md](releases/4.6.6.md) (`arkgate@4.6.6`).
|
|
62
|
+
Prior: [releases/4.6.5.md](releases/4.6.5.md) · [4.6.4](releases/4.6.4.md) · [4.6.3](releases/4.6.3.md) · [4.6.2](releases/4.6.2.md) · [4.6.1](releases/4.6.1.md) · [4.6.0](releases/4.6.0.md).
|
|
63
|
+
Older notes: [releases/](releases/). Config: [configuration.md](configuration.md).
|
|
67
64
|
|
|
68
65
|
---
|
|
69
66
|
|
package/docs/agent-guide.md
CHANGED
|
@@ -86,6 +86,16 @@ npx ark status --json --expected-root /abs/project/root
|
|
|
86
86
|
npx ark-check --doctor --json
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
+
`--doctor --json` is a stable envelope (4.6.5+): `{ "schemaVersion": "1.0", "envelope": "doctor", "ok": boolean, "doctor": { … } }`.
|
|
90
|
+
Payload lives only under `doctor`. Do not parse sibling root keys as the doctor object.
|
|
91
|
+
|
|
92
|
+
Doctor also writes `.ark/ci-merge-boundary.json` (hook configured-not-fired, per-host writePath,
|
|
93
|
+
CI present-but-not-required, GitHub Free cannot require). Read that file — do not grep `node_modules`.
|
|
94
|
+
Hook green is not tree green (scripted edits bypass PreToolUse).
|
|
95
|
+
|
|
96
|
+
CLI-first: if the local CLI already resolved the project root, identity handshake is optional.
|
|
97
|
+
Do not wait on MCP “still connecting”. The same projection schema is merged into `AGENTS.md` and `CLAUDE.md`.
|
|
98
|
+
|
|
89
99
|
Product path: [use.md — Session recipe](use.md#session-recipe-agent-turn).
|
|
90
100
|
|
|
91
101
|
### Multi-project MCP and upgrade honesty (4.5.6)
|
package/docs/ai-gates.md
CHANGED
|
@@ -81,7 +81,10 @@ bypassable/advisory because some Code Mode paths do not dispatch the project hoo
|
|
|
81
81
|
**Design fitness (3.0.1+):** the same doctor JSON may include `doctor.designFitness` and
|
|
82
82
|
`doctor.designSmells[]` (path evidence). Edge-clean `operatingMode: enforce` can still set
|
|
83
83
|
`designFitness.designWeak: true` (**ENFORCE · design-weak**). That global inventory remains Shape
|
|
84
|
-
residual, not a write-path failure.
|
|
84
|
+
residual, not a write-path failure. Required `arkgate-check --strict-merge` also evaluates
|
|
85
|
+
created-path `domain-logic-in-ui` when a merge base exists (Action inherits via `--strict` and
|
|
86
|
+
`ARK_POLICY_BASE_REF`; missing base skips, does not exit 2). Leftover design on existing files
|
|
87
|
+
stays Shape residual. Z10's opt-in `--fail-on-new-smells --base-ref` still blocks new/worsened
|
|
85
88
|
supported smells on touched paths. Companion plan JSON: `plan.patternBets[]` with `neverMechanicalSafe: true`
|
|
86
89
|
— never treat as write-boundary `autoPatch` / mechanical-safe. See
|
|
87
90
|
[package-surface.md](package-surface.md) and [brownfield-adoption.md](brownfield-adoption.md) §6.
|
|
@@ -739,10 +742,14 @@ Whatever the agent side does, run the merge profile in CI:
|
|
|
739
742
|
fi
|
|
740
743
|
```
|
|
741
744
|
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
745
|
+
The required status command is `arkgate-check --strict-merge` (alias `--strict`): import edges
|
|
746
|
+
plus created-path `domain-logic-in-ui` when a Git base exists. The composite Action already runs
|
|
747
|
+
`--strict` and exports `ARK_POLICY_BASE_REF`; it needs no extra flags. Generated CI still adds
|
|
748
|
+
`--fail-on-new-smells --base-ref` when the SHA is resolvable (stricter than created-path).
|
|
749
|
+
Missing base with `--fail-on-new-smells` exits `2`, so the generated workflow skips the full
|
|
750
|
+
ratchet on first-push all-zero / unresolvable SHA while keeping `--strict-merge` (created-path
|
|
751
|
+
also skips when the base is missing). Residual, path-only moves, unrelated work, and worsened
|
|
752
|
+
rules in existing files stay green on the merge command.
|
|
746
753
|
Generated Claude/Grok hooks share the delta and golden-pattern repair hint. MCP exposes the result
|
|
747
754
|
but stays advisory.
|
|
748
755
|
|
|
@@ -41,10 +41,16 @@ regenerate it unasked.
|
|
|
41
41
|
| `app/api/**`, `src/app/api/**` | **ApplicationOrchestration** (orchestration shell) |
|
|
42
42
|
| `pages/api/**`, `src/pages/api/**` | **ApplicationOrchestration** |
|
|
43
43
|
| UI routes (`app/(…)`, `page.tsx`, `components/**`) | **PresentationAdapters** |
|
|
44
|
+
| Types / constants (`src/**/types/**`, `src/**/constants/**`) | **SharedKernel** |
|
|
45
|
+
| Wiring (`src/**/composition/**`, `src/**/factories/**`, `bootstrap.ts`) | **CompositionRoot** |
|
|
46
|
+
| `src/**/domain/**` | **DomainModel** |
|
|
47
|
+
| Flattened `src/lib/**` bag | **Not** Application as a whole — classify interiors (use-cases → Application; types → SharedKernel). Adopt never dumps bare `src/lib/**` into Application. |
|
|
44
48
|
|
|
45
49
|
Without this split, broad `**/app/**` Presentation patterns push every API handler into UI and
|
|
46
50
|
create a Presentation→Persistence tsunami. Specificity still wins: more-specific Application
|
|
47
|
-
globs beat Presentation.
|
|
51
|
+
globs beat Presentation. Adopt writes `.ark/golden-pattern.json` (load-bearing for `/ark-place`).
|
|
52
|
+
`ark_place` requires `filePath` (fail-closed — never invents `components/*.tsx` or defaults to Presentation).
|
|
53
|
+
ArkRules stay **opt-in** (not forced on by start/adopt).
|
|
48
54
|
|
|
49
55
|
### Composition-root / factory modules (optional Application-only)
|
|
50
56
|
|
package/docs/configuration.md
CHANGED
|
@@ -90,6 +90,7 @@ Layer fields:
|
|
|
90
90
|
|
|
91
91
|
- `name`, `patterns`, `exclude`, `description`
|
|
92
92
|
- `intentPrefixes`, `forbiddenGlobals`, `mayImportInfrastructure`, `optional`
|
|
93
|
+
- `reserved` / `allowEmpty` — future houses whose globs match nothing yet. `--strict-config` does not fail; `CONFIG_LAYER_PATTERN_NO_MATCHES` (typo warning) is skipped. A typo warning fires only when the glob is not reserved.
|
|
93
94
|
- `capabilities: { deny: [...] }` — opt-in effect walls over the seven capability ids
|
|
94
95
|
(`network`, `filesystem`, `clock`, `randomness`, `environment`, `process`, `persistence`);
|
|
95
96
|
`pure: true` is the shorthand that denies all seven. Absence changes no verdict.
|
|
@@ -247,6 +248,14 @@ Optional `stewards` lists **GitHub handles or emails** who may **loosen** the co
|
|
|
247
248
|
matches `--author`, then `GITHUB_ACTOR` / `ARK_STEWARD`, then `GIT_AUTHOR_EMAIL`. A
|
|
248
249
|
noreply GitHub mail and the handle are the same person. Git `user.name` is not identity.
|
|
249
250
|
|
|
251
|
+
`--contract-session` is required to loosen the contract (T4) or grow the baseline
|
|
252
|
+
(`--update-baseline`, T5) **even when `stewards` is empty**. `--policy-ack` remains the
|
|
253
|
+
hash tooth on a weakening; session is the change-type tooth. An empty list cannot print
|
|
254
|
+
Healthy ENFORCE: doctor treats it as unfinished residual (`empty-stewards`) after a
|
|
255
|
+
30-day grace from the git first-add of `ark.config.json`, or immediately when that age
|
|
256
|
+
is unknown. `operatingMode` stays `enforce` (contract-fit). `/ark-adopt` asks; it does
|
|
257
|
+
not invent names.
|
|
258
|
+
|
|
250
259
|
Doctor detects several recent authors or a CODEOWNERS file (`doctor.stewardNudge`).
|
|
251
260
|
When `stewards` is empty it **asks** who owns the law and proposes handles or emails.
|
|
252
261
|
When the list exists but CODEOWNERS is ahead, or you started with one steward and git
|
|
@@ -254,7 +263,7 @@ now shows more authors, it shows the **gap** and asks whether to update. `/ark-a
|
|
|
254
263
|
writes only after you confirm — it does not invent names or remove entries.
|
|
255
264
|
|
|
256
265
|
```json
|
|
257
|
-
"stewards": ["
|
|
266
|
+
"stewards": ["you", "your-co-steward"]
|
|
258
267
|
```
|
|
259
268
|
|
|
260
269
|
Law files (`ark.config.json`, `arkrules/*`, `.ark-baseline.json`) are a different change
|
|
@@ -265,7 +274,7 @@ type than product source:
|
|
|
265
274
|
| `ark-check --changed --base origin/dev` | Layer check on touched sources only. A CSS/i18n PR pays almost nothing. |
|
|
266
275
|
| `ark-check --against origin/dev` | New violation keys vs **that ref's** baseline (not only HEAD). |
|
|
267
276
|
| `ark-check --contract-diff --base origin/dev` | Classifies tighten / loosen / reclassify / baseline-grow. |
|
|
268
|
-
| `--contract-session --author <id>` | Law-only PR. Mixed law+product still fails. Loosen/grow need a listed
|
|
277
|
+
| `--contract-session --author <id>` | Law-only PR. Mixed law+product still fails. Loosen/grow need a session even with an empty `stewards[]`; a non-empty list also needs a matching listed author. |
|
|
269
278
|
| `--persona touch\|contributor\|agent\|steward` | Budget presets for the same teeth. |
|
|
270
279
|
| `ark status --vs origin/dev` | One line: pin / contract / baseline drift vs that ref. |
|
|
271
280
|
|
package/docs/develop.md
CHANGED
|
@@ -106,10 +106,12 @@ Sensors:
|
|
|
106
106
|
```bash
|
|
107
107
|
npx arkgate-check --plan
|
|
108
108
|
npx arkgate-check --coverage
|
|
109
|
-
npx arkgate-check --doctor --json #
|
|
109
|
+
npx arkgate-check --doctor --json # stable envelope { schemaVersion, envelope:"doctor", ok, doctor }
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
`--doctor --json` payload lives only under `doctor`. Doctor also writes `.ark/ci-merge-boundary.json`
|
|
113
|
+
(writePath per host, hook configured-not-fired, CI present-but-not-required, GitHub Free cannot
|
|
114
|
+
require). Hook green is not tree green. Doctor residual lenses never flip `valid` / strict-merge alone. Product path:
|
|
113
115
|
[use.md — Improvement compass](use.md#improvement-compass-not-a-score).
|
|
114
116
|
|
|
115
117
|
Agent reference (tools, skills, dual path): [agent-guide.md](agent-guide.md).
|
package/docs/diagnostics.md
CHANGED
|
@@ -56,6 +56,7 @@ Link form for agents: `docs/diagnostics.md#RULE_ID` (exact-case HTML anchors bel
|
|
|
56
56
|
| [`ATOMIC_PREFLIGHT_UNAVAILABLE`](#ATOMIC_PREFLIGHT_UNAVAILABLE) | preflight | Atomic preflight unavailable |
|
|
57
57
|
| [`DESIGN_SMELL_REGRESSION`](#DESIGN_SMELL_REGRESSION) | preflight | Design smell regression on base-relative ratchet |
|
|
58
58
|
| [`ANALYSIS_PARSE_INCOMPLETE`](#ANALYSIS_PARSE_INCOMPLETE) | analysis | Parse incomplete |
|
|
59
|
+
| [`LEXICAL_EVIDENCE_INCOMPLETE`](#LEXICAL_EVIDENCE_INCOMPLETE) | analysis | Lexical evidence incomplete |
|
|
59
60
|
| [`ANALYSIS_HOST_UNAVAILABLE`](#ANALYSIS_HOST_UNAVAILABLE) | analysis | Analysis host unavailable |
|
|
60
61
|
| [`ADAPTER_NOT_ALLOWED_FOR_PORT`](#ADAPTER_NOT_ALLOWED_FOR_PORT) | adapter | Adapter not allowed for port |
|
|
61
62
|
| [`FORBIDDEN_PATTERN`](#FORBIDDEN_PATTERN) | snippet-policy | Forbidden regex pattern |
|
|
@@ -89,7 +90,7 @@ Link form for agents: `docs/diagnostics.md#RULE_ID` (exact-case HTML anchors bel
|
|
|
89
90
|
**Layer import not allowed**
|
|
90
91
|
|
|
91
92
|
- **Why:** A module import (or re-export) crosses a layer edge that ark.config.json does not allow. The architecture contract forbids that dependency direction so outer infrastructure cannot leak into pure or inner layers.
|
|
92
|
-
- **Fix:**
|
|
93
|
+
- **Fix:** Branch by import kind: constants/types/pure → adopt into DomainModel or SharedKernel (do not invent a port); kernel/events/bootstrap from Persistence → inject a port or move the map to SharedTypes (Persistence must not emit); define a port only when the target is a real use-case. Type-only edges use `import type`. Then preflight again. Do not weaken the layer rule without a hash-bound policy acknowledgement.
|
|
93
94
|
|
|
94
95
|
<a id="LAYER_INTENT_REFERENCE_VIOLATION"></a>
|
|
95
96
|
|
|
@@ -267,8 +268,8 @@ Link form for agents: `docs/diagnostics.md#RULE_ID` (exact-case HTML anchors bel
|
|
|
267
268
|
|
|
268
269
|
**Invariant without coverage evidence**
|
|
269
270
|
|
|
270
|
-
- **Why:** An ArkRules invariant is under contract but no covering test title or declared symbol evidence was found (or coverage is partial).
|
|
271
|
-
- **Fix:** Add a test title or declared symbol covering the arkruleId, then preflight again. Missing test globs report partial — never fake green.
|
|
271
|
+
- **Why:** An ArkRules invariant is under contract but no covering test title or declared symbol evidence was found (or coverage is partial). Kind is `never-had-tests` (adopt residual) vs `tests-disappeared` (suite exists).
|
|
272
|
+
- **Fix:** Add a test title or declared symbol covering the arkruleId, then preflight again. Treat never-had-tests as adopt residual; treat tests-disappeared as a regression. Missing test globs report partial — never fake green.
|
|
272
273
|
|
|
273
274
|
## Atomic preflight and change sets
|
|
274
275
|
|
|
@@ -368,8 +369,8 @@ Link form for agents: `docs/diagnostics.md#RULE_ID` (exact-case HTML anchors bel
|
|
|
368
369
|
|
|
369
370
|
**Design smell regression on base-relative ratchet**
|
|
370
371
|
|
|
371
|
-
- **Why:** Compared to the base ref, the candidate introduces or worsens a blocking design-smell class
|
|
372
|
-
- **Fix:**
|
|
372
|
+
- **Why:** Compared to the base ref, the candidate introduces a created-path `domain-logic-in-ui` file under `--strict-merge`, or introduces or worsens a blocking design-smell class under `--fail-on-new-smells`.
|
|
373
|
+
- **Fix:** Move the new UI business rule out of the created file (or revert a `--fail-on-new-smells` regression), then re-run with the same base ref.
|
|
373
374
|
|
|
374
375
|
## Analysis host and completeness
|
|
375
376
|
|
|
@@ -379,8 +380,17 @@ Link form for agents: `docs/diagnostics.md#RULE_ID` (exact-case HTML anchors bel
|
|
|
379
380
|
|
|
380
381
|
**Parse incomplete**
|
|
381
382
|
|
|
382
|
-
- **Why:** Governed source could not be fully parsed;
|
|
383
|
-
- **Fix:**
|
|
383
|
+
- **Why:** Governed source could not be fully parsed; evidence includes the TypeScript diagnostic (line + message). Incremental mid-edit parse is normal for agents. Contract `exclude` paths skip the write hook.
|
|
384
|
+
- **Fix:** Finish the source or fix the reported syntax error, then re-run `npx arkgate-check`. The write hook does not deny solely on mid-edit parse. Partial never means pass.
|
|
385
|
+
|
|
386
|
+
<a id="LEXICAL_EVIDENCE_INCOMPLETE"></a>
|
|
387
|
+
|
|
388
|
+
### `LEXICAL_EVIDENCE_INCOMPLETE`
|
|
389
|
+
|
|
390
|
+
**Lexical evidence incomplete**
|
|
391
|
+
|
|
392
|
+
- **Why:** Single-file validation cannot prove project module resolution. The write hook is already the verdict.
|
|
393
|
+
- **Fix:** Re-run `npx arkgate-check --root . --config ark.config.json`, or treat the hook deny as final. Do not call `ark_prepare_change` from a hook deny.
|
|
384
394
|
|
|
385
395
|
<a id="ANALYSIS_HOST_UNAVAILABLE"></a>
|
|
386
396
|
|
package/docs/package-surface.md
CHANGED
|
@@ -54,7 +54,7 @@ hardening guide remains repository-hosted rather than duplicated in the gate tar
|
|
|
54
54
|
| **Structural convergence (3.1.0)** | `analyzeArchitectureConvergence(...)`; map-enabled `preflightChange(...)`; existing CLI/MCP preflight adapters | Additive `convergence` result with stable `satisfied`, `missing`, `contradictory`, and `unplanned` findings. Uses the supplied/current project tree as base and the explicit complete change set as candidate; no implicit Git or LLM input. `readOnly: true`; `behavioralCompletion: "not-evaluated"`. Structural mismatch makes preflight invalid. |
|
|
55
55
|
| **Enforcement ladder + fixed journey (3.1.0)** | `doctor.writePath.enforcementLadder`; hook repair `enforcement`; `npm run eval:change-integrity` | Additive schema `1.0` separates supported/installed/active/bypassable state and evidence. Hard is operation-scoped only for a supported covered hook; MCP is advisory; required CI status stays unverified locally. Fixed no-context fixture proves CLI/MCP/hook/final parity, one casual denial, acceptance behavior, and strict Ark. |
|
|
56
56
|
| **Enforcement state** | `doctor.writePath.enforcementState`; schema/type | Schema `1.1`: runtime observation, operation coverage, and operation-scoped `hard`. Only fresh covered active-host evidence permits `hard:true`; unverified assets and MCP remain non-hard. |
|
|
57
|
-
| **Design delta
|
|
57
|
+
| **Design delta** | `--strict-merge` / `--strict` (created paths when a Git base exists); `--fail-on-new-smells --base-ref <ref>` (full ratchet); hook/MCP; schema/types | Schema `1.0`: identities, touched paths, optional `enforcementScope`. Default merge blocks **created** `domain-logic-in-ui` files vs merge-base; missing base skips (does not exit 2). Full new+worsened on touched paths remains opt-in `--fail-on-new-smells` (missing base fails closed). Historical residual and worsened-in-existing-file stay green on `--strict-merge`. Global doctor smells stay advisory. |
|
|
58
58
|
| **`arkgate/schema/analysis-result`** or **`arkgate/schema/ark.analysis-result.schema.json`** | Public CLI/MCP/hook diagnostic envelope (`schemaVersion`, `mode`, `valid`, `completeness`, `completenessReasons`, `diagnostics`, resolved identities) | Schema **`1.5`** adds optional stable finding refs on diagnostics: `findingRef` (`fnv1a-` + hex), `targetKey` (baseline-compatible freeze identity), `docsCodePath` (`docs/diagnostics.md#RULE_ID`). Factory-emitted diagnostics always include them; consumer-owned 1.0–1.4 values remain valid without them. `1.4` added optional `evidence.arkruleId` / `evidence.arkruleSource` for ArkRules; `1.3` distinguished `resolved-candidate-facts` from `lexical-compatibility`; partial/unavailable analysis is always non-green, and resolved complete/partial results require policy/resolver/facts/tree identities. `1.2` added completeness and remains accepted alongside consumer-owned 1.0/1.1 values. |
|
|
59
59
|
| **Stable finding refs (4.3)** | Root API `adapterFindingTargetKey` / `adapterFindingRefFromTargetKey` / `toAdapterDiagnostic` / `createAdapterResult`; CLI/MCP/repair envelopes via analysis-result diagnostics | Multi-turn re-address without fuzzy message match. `targetKey` **is** the baseline (occurrence) key so freeze identity is never orphaned; `findingRef` is a compact FNV-1a of that key. Line/message drift does not change the ref. Multi-turn fixture: `tests/fixtures/finding-refs/multi-turn-stability.json`. |
|
|
60
60
|
| **Diagnostic code catalog** | Root API `DIAGNOSTIC_CATALOG` / `getDiagnosticCatalogEntry` / `diagnosticDocsPath`; docs [diagnostics.md](diagnostics.md) (`#RULE_ID` anchors) | Closed vocabulary of public `ruleId`s with why/fix anchors. Cataloguing only — no new rule semantics. Remediation parity is test-guarded. Docs ship in the npm tarball. |
|
|
@@ -143,7 +143,8 @@ The type-only root exports are also semver-supported:
|
|
|
143
143
|
- Policy delta: `PolicyDelta`, `PolicyDeltaAcknowledgement`, `PolicyDeltaClassification`,
|
|
144
144
|
`PolicyDeltaFinding`.
|
|
145
145
|
- Design delta: `ArkDesignDeltaResult`, `ArkDesignDeltaIdentity`, `ArkDesignDeltaChange`,
|
|
146
|
-
`ArkDesignDeltaEvidence`, `ArkDesignSmellId`, `ArkDesignDeltaVerdict
|
|
146
|
+
`ArkDesignDeltaEvidence`, `ArkDesignSmellId`, `ArkDesignDeltaVerdict`,
|
|
147
|
+
`DesignDeltaEnforcementScope`.
|
|
147
148
|
- Analysis IR: `AnalysisFileInput`, `AnalysisFileChange`, `AnalysisCompilerOptions`,
|
|
148
149
|
`AnalysisFile`, `AnalysisImportEdge`, `AnalysisCapabilityUse`, `AnalysisEvidence`,
|
|
149
150
|
`AnalysisViolation`, `AnalysisIr`.
|
|
@@ -211,8 +212,9 @@ production deployment would need to satisfy; it is not a readiness certification
|
|
|
211
212
|
## Release notes (maintainers)
|
|
212
213
|
|
|
213
214
|
Ship notes for a version live under [releases/](https://github.com/pedroknigge/arkgate/tree/main/docs/releases)
|
|
214
|
-
(
|
|
215
|
-
|
|
215
|
+
(current: [4.6.6.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.6.md);
|
|
216
|
+
prior published: [4.6.5.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.5.md);
|
|
217
|
+
prior published: [4.6.3.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.3.md);
|
|
216
218
|
prior published: [4.6.2.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.2.md), [4.6.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.1.md), [4.6.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.0.md), [4.5.7.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.7.md), [4.5.6.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.6.md), [4.5.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.0.md), [4.4.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.4.0.md), [4.3.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.3.0.md),
|
|
217
219
|
[4.2.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.2.1.md);
|
|
218
220
|
previous: [4.2.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.2.0.md),
|
package/docs/product-voice.md
CHANGED
|
@@ -94,8 +94,8 @@ stay stable unless a change explicitly adds an alias.
|
|
|
94
94
|
| **five doors** | skill menu of 13 | adopt · place · autopilot · explore · upgrade — other names are shortcuts |
|
|
95
95
|
| **law / constitution** | contract + baseline + ArkRules files | `ark.config.json`, `arkrules/*`, `.ark-baseline.json` — a different change type than product |
|
|
96
96
|
| **steward** | contract owner | GitHub handle or email in `stewards`; only they may loosen the law or grow the baseline |
|
|
97
|
-
| **several hands** | multi-author / CODEOWNERS | Doctor asks for stewards or shows list drift; adopt proposes handles or emails, never invents names |
|
|
98
|
-
| **contract session** | `--contract-session` | Explicit “this diff is a law change”; still never mixed with product files |
|
|
97
|
+
| **several hands** | multi-author / CODEOWNERS | Doctor asks for stewards or shows list drift; empty `stewards[]` is unfinished ENFORCE (not Adapt); adopt proposes handles or emails, never invents names |
|
|
98
|
+
| **contract session** | `--contract-session` | Explicit “this diff is a law change”; required to loosen or grow the baseline even with an empty steward list; still never mixed with product files |
|
|
99
99
|
| **vs the base branch** | `--against` / `--changed --base` / `status --vs` | Ratchet and honesty against the ref you merge to |
|
|
100
100
|
| **doctor** | doctor | Status light + next action |
|
|
101
101
|
| **short agent router** | compact router | Default onboarding agent instructions (not the full skill pack) |
|
|
@@ -308,8 +308,10 @@ This change mixes the constitution with product files. Next: split the PR, or ru
|
|
|
308
308
|
|
|
309
309
|
### Healthy finished
|
|
310
310
|
|
|
311
|
-
Print “Healthy — nothing to do” **only** when
|
|
312
|
-
|
|
311
|
+
Print “Healthy — nothing to do” **only** when the merge boundary is adopted as a **required**
|
|
312
|
+
GitHub status running `arkgate-check --strict-merge`, there is no leftover design work, and no
|
|
313
|
+
open top actions. An explicit `.ark/adoption-stance.json` `stance: "advisory-only"` ack is
|
|
314
|
+
adopted for honesty, but it is not this Healthy string. Workflow files on disk are not adopted.
|
|
313
315
|
|
|
314
316
|
---
|
|
315
317
|
|
package/docs/threat-model.md
CHANGED
|
@@ -30,8 +30,8 @@ infrastructure beyond how this package is published.
|
|
|
30
30
|
| T1 | Agent bypasses hook (direct `fs` / alternate tool) | Ungoverned code lands | CI gate; optional pre-commit (Q3); doctor ladder never upgrades installed files to active/hard proof |
|
|
31
31
|
| T2 | Human commits without agent path | Same as T1 | `templates/hooks/pre-commit-ark`; branch protection + required check (Q3 external) |
|
|
32
32
|
| T3 | CI job missing / not required | Merge green without architecture | doctor `enforcement-ci-*` gaps; `--strict-merge`; required-status remains locally `unverified` |
|
|
33
|
-
| T4 | Config weakened (`peerIsolation: false`, empty rules) | False green | semantic policy-delta guard in strict merge; hash-bound
|
|
34
|
-
| T5 | Baseline ratcheted open | Debt reintroduced | baseline unused/stale signals; occurrence keys |
|
|
33
|
+
| T4 | Config weakened (`peerIsolation: false`, empty rules) | False green | semantic policy-delta guard in strict merge; hash-bound `--policy-ack`; `--contract-session` required even when `stewards[]` is empty; present-state safety diagnostics |
|
|
34
|
+
| T5 | Baseline ratcheted open | Debt reintroduced | `--update-baseline` requires `--contract-session` even with an empty steward list (`--force` is concentration, not parliament); unused/stale signals; occurrence keys |
|
|
35
35
|
| T6 | Stale MCP/global CLI or wrong root | Gate points at old package / wrong tree | project identity binding; stale process non-authoritative + `PROCESS_PACKAGE_STALE`; project-local upgrade handoff |
|
|
36
36
|
| T7 | Malicious dependency in publish | Compromised gate | signed tags, npm provenance, dependency-review, CodeQL, Semgrep, `verify-package-files` |
|
|
37
37
|
| T8 | Path traversal in hooks/check | Read/write outside project | root resolution + under-root import resolve |
|
package/docs/use.md
CHANGED
|
@@ -13,9 +13,10 @@ npm install -D arkgate typescript
|
|
|
13
13
|
npx arkgate start # preview what will change
|
|
14
14
|
npx arkgate start --apply # install compact contract + host router + CI plan
|
|
15
15
|
npx arkgate-check --doctor # where am I? one status light, one next action
|
|
16
|
+
npx arkgate-check --doctor --all # encyclopedia (Details)
|
|
16
17
|
```
|
|
17
18
|
|
|
18
|
-
Then keep working with your agent. The doctor is the **control plane**: when stuck, run doctor and do action **#1**.
|
|
19
|
+
Then keep working with your agent. The doctor is the **control plane**: when stuck, run doctor and do action **#1**. Compact first; `--all` for Details.
|
|
19
20
|
|
|
20
21
|
| Stuck on… | Do this |
|
|
21
22
|
|-----------|---------|
|
|
@@ -46,7 +47,7 @@ In those cases a boundary linter or editor rules may be enough; see [README —
|
|
|
46
47
|
| When | What happens |
|
|
47
48
|
|------|----------------|
|
|
48
49
|
| While the AI writes | Host write gate or advisory MCP (depends on host) |
|
|
49
|
-
| Before merge | Make the Ark job a **required GitHub status context** running `arkgate-check --strict-merge` (alias `ark-check`) |
|
|
50
|
+
| Before merge | Make the Ark job a **required GitHub status context** running `arkgate-check --strict-merge` (alias `ark-check`). Until that status is required — or you write `.ark/adoption-stance.json` with `stance: "advisory-only"` — doctor will not call the tree adopted. |
|
|
50
51
|
| Anytime | Doctor: Suggest / Adapt / Enforce (+ leftover design work if the design is still messy) |
|
|
51
52
|
|
|
52
53
|
**Cursor:** pre-write block for Write/StrReplace when `.cursor/hooks.json` is trusted.
|
|
@@ -87,8 +88,8 @@ list: [configuration.md](configuration.md).
|
|
|
87
88
|
|-------|--------|-----------|
|
|
88
89
|
| **Suggest** | New or thin project | Finish `start`, re-run doctor |
|
|
89
90
|
| **Adapt** | Not fully protected yet | Doctor action #1 until clean |
|
|
90
|
-
| **Enforce** |
|
|
91
|
-
| **Enforce · leftover design work** | Edges clean; design still messy | Shape door — not “done” |
|
|
91
|
+
| **Enforce** | Import edges honest, and no new UI business-rule files vs merge-base | Keep write path + CI |
|
|
92
|
+
| **Enforce · leftover design work** | Edges clean; leftover design on existing files is still messy | Shape door — not “done” |
|
|
92
93
|
|
|
93
94
|
**Green edges ≠ elegant design.** Empty remediation plan is not “architecture finished” if design residual remains.
|
|
94
95
|
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://unpkg.com/arkgate@3/schemas/ark.design-delta.schema.json","title":"ArkGate design delta","type":"object","additionalProperties":false,"required":["schemaVersion","mode","complete","valid","base","candidate","supportedSmellIds","touchedPaths","changes","baseFindingCount","candidateFindingCount","historicalResidualCount"],"properties":{"schemaVersion":{"const":"1.0"},"mode":{"enum":["git-base","write-candidate"]},"complete":{"type":"boolean"},"valid":{"type":"boolean"},"base":{"$ref":"#/$defs/identity"},"candidate":{"$ref":"#/$defs/identity"},"supportedSmellIds":{"type":"array","items":{"const":"domain-logic-in-ui"},"minItems":1,"uniqueItems":true},"touchedPaths":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"changes":{"type":"array","items":{"$ref":"#/$defs/change"}},"baseFindingCount":{"type":"integer","minimum":0},"candidateFindingCount":{"type":"integer","minimum":0},"historicalResidualCount":{"type":"integer","minimum":0},"error":{"type":"string","minLength":1}},"$defs":{"identity":{"type":"object","additionalProperties":false,"required":["kind","value"],"properties":{"kind":{"enum":["git-tree","candidate-tree"]},"value":{"type":"string","minLength":1},"commit":{"type":"string","minLength":1}}},"evidence":{"type":"object","additionalProperties":false,"required":["kind","path","magnitude"],"properties":{"kind":{"type":"string","minLength":1},"path":{"type":"string","minLength":1},"line":{"type":"integer","minimum":1},"symbol":{"type":"string","minLength":1},"detail":{"type":"string","minLength":1},"magnitude":{"type":"number","minimum":0}}},"finding":{"type":"object","required":["smellId","fingerprint","identity","evidence","repairHint"],"properties":{"smellId":{"enum":["io-under-application","handler-in-persistence","god-module","domain-logic-in-ui","facade-sql-in-routes","mixed-pattern-cluster","soft-contract"]},"fingerprint":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"identity":{"type":"string","minLength":1},"evidence":{"$ref":"#/$defs/evidence"},"repairHint":{"type":"string","minLength":1}}},"change":{"type":"object","unevaluatedProperties":false,"allOf":[{"$ref":"#/$defs/finding"},{"type":"object","required":["classification","baseMagnitude","candidateMagnitude"],"properties":{"classification":{"enum":["new","worsened"]},"baseMagnitude":{"type":"number","minimum":0},"candidateMagnitude":{"type":"number","minimum":0}}}]}}}
|
|
1
|
+
{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://unpkg.com/arkgate@3/schemas/ark.design-delta.schema.json","title":"ArkGate design delta","type":"object","additionalProperties":false,"required":["schemaVersion","mode","complete","valid","base","candidate","supportedSmellIds","touchedPaths","changes","baseFindingCount","candidateFindingCount","historicalResidualCount"],"properties":{"schemaVersion":{"const":"1.0"},"mode":{"enum":["git-base","write-candidate"]},"complete":{"type":"boolean"},"valid":{"type":"boolean"},"base":{"$ref":"#/$defs/identity"},"candidate":{"$ref":"#/$defs/identity"},"supportedSmellIds":{"type":"array","items":{"const":"domain-logic-in-ui"},"minItems":1,"uniqueItems":true},"touchedPaths":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"changes":{"type":"array","items":{"$ref":"#/$defs/change"}},"baseFindingCount":{"type":"integer","minimum":0},"candidateFindingCount":{"type":"integer","minimum":0},"historicalResidualCount":{"type":"integer","minimum":0},"enforcementScope":{"enum":["created-paths","touched-new-or-worsened"]},"error":{"type":"string","minLength":1}},"$defs":{"identity":{"type":"object","additionalProperties":false,"required":["kind","value"],"properties":{"kind":{"enum":["git-tree","candidate-tree"]},"value":{"type":"string","minLength":1},"commit":{"type":"string","minLength":1}}},"evidence":{"type":"object","additionalProperties":false,"required":["kind","path","magnitude"],"properties":{"kind":{"type":"string","minLength":1},"path":{"type":"string","minLength":1},"line":{"type":"integer","minimum":1},"symbol":{"type":"string","minLength":1},"detail":{"type":"string","minLength":1},"magnitude":{"type":"number","minimum":0}}},"finding":{"type":"object","required":["smellId","fingerprint","identity","evidence","repairHint"],"properties":{"smellId":{"enum":["io-under-application","handler-in-persistence","god-module","domain-logic-in-ui","facade-sql-in-routes","mixed-pattern-cluster","soft-contract"]},"fingerprint":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"identity":{"type":"string","minLength":1},"evidence":{"$ref":"#/$defs/evidence"},"repairHint":{"type":"string","minLength":1}}},"change":{"type":"object","unevaluatedProperties":false,"allOf":[{"$ref":"#/$defs/finding"},{"type":"object","required":["classification","baseMagnitude","candidateMagnitude"],"properties":{"classification":{"enum":["new","worsened"]},"baseMagnitude":{"type":"number","minimum":0},"candidateMagnitude":{"type":"number","minimum":0}}}]}}}
|
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/pedroknigge/arkgate",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "4.6.
|
|
9
|
+
"version": "4.6.6",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "arkgate",
|
|
14
|
-
"version": "4.6.
|
|
14
|
+
"version": "4.6.6",
|
|
15
15
|
"runtimeHint": "npx",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
This directory is the **Agent Skills–compatible** packaging of the same **13**
|
|
8
8
|
`/ark-*` skills shipped as flat templates for Ark install. **No new skill names.**
|
|
9
9
|
|
|
10
|
-
Package version when last generated context: **arkgate@4.6.
|
|
10
|
+
Package version when last generated context: **arkgate@4.6.6**
|
|
11
11
|
Schema: agent-skills package contract `1.0`
|
|
12
12
|
|
|
13
13
|
## Skills (frozen catalog)
|
|
@@ -14,6 +14,13 @@ description: Session 0 — mark the Ark path. Greenfield scaffold or brownfield
|
|
|
14
14
|
2. Write `ark.config.json` (and a baseline only for genuine debt) in this turn.
|
|
15
15
|
3. Re-run doctor. Day-to-day new files: `/ark-place`.
|
|
16
16
|
|
|
17
|
+
## Checklist
|
|
18
|
+
|
|
19
|
+
- Existing tree: propose **SharedKernel** (types/constants) + **CompositionRoot** (wiring) + `src/**/domain/**`. Never dump bare `src/lib/**` into Application.
|
|
20
|
+
- Generate `.ark/golden-pattern.json` (load-bearing for `/ark-place`).
|
|
21
|
+
- Future houses: mark unused layer globs `reserved` / `allowEmpty` so `--strict-config` does not fail.
|
|
22
|
+
- CLI-first: if `arkgate-check` already resolved the root, do not wait on MCP.
|
|
23
|
+
|
|
17
24
|
Invoking this skill **is** the approval. Write the architecture config in this turn.
|
|
18
25
|
Greenfield: scaffold like `--recommend`. Brownfield: match **product
|
|
19
26
|
reality**, freeze only genuine debt. A green check over a wrong config is a **false green**.
|
|
@@ -14,6 +14,12 @@ description: Map skill — decision-grade recon of layers + ArkRules opportuniti
|
|
|
14
14
|
2. Open the real tree (≥12 files across ≥4 dirs). CLI JSON alone is incomplete.
|
|
15
15
|
3. Rank leftover work. Hand off to `/ark-autopilot` to apply one refactor. Do not write config or product code here.
|
|
16
16
|
|
|
17
|
+
## Checklist
|
|
18
|
+
|
|
19
|
+
- Doctor #1: if ENFORCE + empty plan A and gates are already installed → **Shape** (`/ark-explore` then `/ark-autopilot`). Do not say install-agent-gates.
|
|
20
|
+
- Distinguish **missing** skills vs **stale** catalog. Installed ≠ stale.
|
|
21
|
+
- Hook green is not tree green (scripted edits bypass PreToolUse).
|
|
22
|
+
|
|
17
23
|
## Autonomy contract
|
|
18
24
|
|
|
19
25
|
Invoking this skill **is** the approval to **map**. Open the real tree. CLI JSON alone is
|
|
@@ -10,16 +10,23 @@ description: "Where does new code go? Names the layer, directory, and naming for
|
|
|
10
10
|
|
|
11
11
|
## Steps
|
|
12
12
|
|
|
13
|
-
1.
|
|
14
|
-
2. Place
|
|
13
|
+
1. CLI-first: if the local CLI already resolved the root, skip waiting on MCP. Identity is optional then.
|
|
14
|
+
2. Place with **filePath required** (`ark_place` or read `ark.config.json` + `.ark/golden-pattern.json`). Fail-closed without a path — never invent `components/*.tsx` or default to Presentation.
|
|
15
15
|
3. Write it there. Then `arkgate-check`.
|
|
16
16
|
|
|
17
|
+
## Checklist
|
|
18
|
+
|
|
19
|
+
- `filePath` is known before the call. Description alone is not a path.
|
|
20
|
+
- Golden pattern is load-bearing when present. Adopt generates it.
|
|
21
|
+
- Do not default a repository to Presentation.
|
|
22
|
+
|
|
17
23
|
## Autonomy contract
|
|
18
24
|
|
|
19
25
|
Invoking this skill **is** the approval. If the user described an artifact, **write the
|
|
20
26
|
files** in this turn (prepare-write + scaffold). A path table alone is incomplete.
|
|
21
|
-
The CLI is a **sensor and gate**. **CLI budget:** `ark_identity` then `ark_place`
|
|
22
|
-
read `ark.config.json
|
|
27
|
+
The CLI is a **sensor and gate**. **CLI budget:** `ark_identity` then `ark_place` when using MCP
|
|
28
|
+
(or skip identity if the CLI already resolved the root); otherwise read `ark.config.json`; write;
|
|
29
|
+
`ark-check`. Do not ask which layer they prefer.
|
|
23
30
|
|
|
24
31
|
**Still never:** weaken `ark.config.json`; invent `mechanical-safe` kinds; claim leftover
|
|
25
32
|
design work is finished because one file landed.
|
|
@@ -10,10 +10,17 @@ description: Upgrade ArkGate through a content-identity preview, preserve custom
|
|
|
10
10
|
|
|
11
11
|
## Steps
|
|
12
12
|
|
|
13
|
-
1. Preview: `arkgate upgrade` (no writes).
|
|
14
|
-
2. Apply in this turn: `arkgate upgrade --apply` (
|
|
13
|
+
1. Preview: `arkgate upgrade` (no writes). Default is **hosts keep** — do not retire other hosts’ skills.
|
|
14
|
+
2. Apply in this turn: `arkgate upgrade --apply` (installs the bumped package unless `--no-install`). Needs `--plan-digest` when applying managed files.
|
|
15
15
|
3. Re-run `arkgate-check --doctor`. Customized files stay unless you pass `--accept-conflicts` / `--refresh-skills`.
|
|
16
16
|
|
|
17
|
+
## Checklist
|
|
18
|
+
|
|
19
|
+
- Preview unions `--tools` with hosts already in the repo. Multi-agent trees keep every host.
|
|
20
|
+
- Apply must run the package install of the new pin. Do not skip `npm install` unless `--no-install` is explicit.
|
|
21
|
+
- Refresh AGENTS.md **and** CLAUDE.md (same projection schema).
|
|
22
|
+
- Prefer project `.agents/skills`. Do not duplicate the catalog into `~/.codex/skills`.
|
|
23
|
+
|
|
17
24
|
The preview is the source of truth. Do not treat a filename or package version as proof of ownership.
|
|
18
25
|
|
|
19
26
|
## Autonomy contract
|
|
@@ -14,6 +14,13 @@ description: Session 0 — mark the Ark path. Greenfield scaffold or brownfield
|
|
|
14
14
|
2. Write `ark.config.json` (and a baseline only for genuine debt) in this turn.
|
|
15
15
|
3. Re-run doctor. Day-to-day new files: `/ark-place`.
|
|
16
16
|
|
|
17
|
+
## Checklist
|
|
18
|
+
|
|
19
|
+
- Existing tree: propose **SharedKernel** (types/constants) + **CompositionRoot** (wiring) + `src/**/domain/**`. Never dump bare `src/lib/**` into Application.
|
|
20
|
+
- Generate `.ark/golden-pattern.json` (load-bearing for `/ark-place`).
|
|
21
|
+
- Future houses: mark unused layer globs `reserved` / `allowEmpty` so `--strict-config` does not fail.
|
|
22
|
+
- CLI-first: if `arkgate-check` already resolved the root, do not wait on MCP.
|
|
23
|
+
|
|
17
24
|
Invoking this skill **is** the approval. Write the architecture config in this turn.
|
|
18
25
|
Greenfield: scaffold like `--recommend`. Brownfield: match **product
|
|
19
26
|
reality**, freeze only genuine debt. A green check over a wrong config is a **false green**.
|
|
@@ -14,6 +14,12 @@ description: Map skill — decision-grade recon of layers + ArkRules opportuniti
|
|
|
14
14
|
2. Open the real tree (≥12 files across ≥4 dirs). CLI JSON alone is incomplete.
|
|
15
15
|
3. Rank leftover work. Hand off to `/ark-autopilot` to apply one refactor. Do not write config or product code here.
|
|
16
16
|
|
|
17
|
+
## Checklist
|
|
18
|
+
|
|
19
|
+
- Doctor #1: if ENFORCE + empty plan A and gates are already installed → **Shape** (`/ark-explore` then `/ark-autopilot`). Do not say install-agent-gates.
|
|
20
|
+
- Distinguish **missing** skills vs **stale** catalog. Installed ≠ stale.
|
|
21
|
+
- Hook green is not tree green (scripted edits bypass PreToolUse).
|
|
22
|
+
|
|
17
23
|
## Autonomy contract
|
|
18
24
|
|
|
19
25
|
Invoking this skill **is** the approval to **map**. Open the real tree. CLI JSON alone is
|
|
@@ -10,16 +10,23 @@ description: "Where does new code go? Names the layer, directory, and naming for
|
|
|
10
10
|
|
|
11
11
|
## Steps
|
|
12
12
|
|
|
13
|
-
1.
|
|
14
|
-
2. Place
|
|
13
|
+
1. CLI-first: if the local CLI already resolved the root, skip waiting on MCP. Identity is optional then.
|
|
14
|
+
2. Place with **filePath required** (`ark_place` or read `ark.config.json` + `.ark/golden-pattern.json`). Fail-closed without a path — never invent `components/*.tsx` or default to Presentation.
|
|
15
15
|
3. Write it there. Then `arkgate-check`.
|
|
16
16
|
|
|
17
|
+
## Checklist
|
|
18
|
+
|
|
19
|
+
- `filePath` is known before the call. Description alone is not a path.
|
|
20
|
+
- Golden pattern is load-bearing when present. Adopt generates it.
|
|
21
|
+
- Do not default a repository to Presentation.
|
|
22
|
+
|
|
17
23
|
## Autonomy contract
|
|
18
24
|
|
|
19
25
|
Invoking this skill **is** the approval. If the user described an artifact, **write the
|
|
20
26
|
files** in this turn (prepare-write + scaffold). A path table alone is incomplete.
|
|
21
|
-
The CLI is a **sensor and gate**. **CLI budget:** `ark_identity` then `ark_place`
|
|
22
|
-
read `ark.config.json
|
|
27
|
+
The CLI is a **sensor and gate**. **CLI budget:** `ark_identity` then `ark_place` when using MCP
|
|
28
|
+
(or skip identity if the CLI already resolved the root); otherwise read `ark.config.json`; write;
|
|
29
|
+
`ark-check`. Do not ask which layer they prefer.
|
|
23
30
|
|
|
24
31
|
**Still never:** weaken `ark.config.json`; invent `mechanical-safe` kinds; claim leftover
|
|
25
32
|
design work is finished because one file landed.
|
|
@@ -10,10 +10,17 @@ description: Upgrade ArkGate through a content-identity preview, preserve custom
|
|
|
10
10
|
|
|
11
11
|
## Steps
|
|
12
12
|
|
|
13
|
-
1. Preview: `arkgate upgrade` (no writes).
|
|
14
|
-
2. Apply in this turn: `arkgate upgrade --apply` (
|
|
13
|
+
1. Preview: `arkgate upgrade` (no writes). Default is **hosts keep** — do not retire other hosts’ skills.
|
|
14
|
+
2. Apply in this turn: `arkgate upgrade --apply` (installs the bumped package unless `--no-install`). Needs `--plan-digest` when applying managed files.
|
|
15
15
|
3. Re-run `arkgate-check --doctor`. Customized files stay unless you pass `--accept-conflicts` / `--refresh-skills`.
|
|
16
16
|
|
|
17
|
+
## Checklist
|
|
18
|
+
|
|
19
|
+
- Preview unions `--tools` with hosts already in the repo. Multi-agent trees keep every host.
|
|
20
|
+
- Apply must run the package install of the new pin. Do not skip `npm install` unless `--no-install` is explicit.
|
|
21
|
+
- Refresh AGENTS.md **and** CLAUDE.md (same projection schema).
|
|
22
|
+
- Prefer project `.agents/skills`. Do not duplicate the catalog into `~/.codex/skills`.
|
|
23
|
+
|
|
17
24
|
The preview is the source of truth. Do not treat a filename or package version as proof of ownership.
|
|
18
25
|
|
|
19
26
|
## Autonomy contract
|