arkgate 4.8.6 → 4.8.7
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 +27 -4
- package/README.md +4 -3
- package/bin/ark-mcp-runtime.mjs +8 -2
- package/bin/lib/analysis-engine.mjs +5 -5
- package/bin/lib/doctor-human.mjs +9 -0
- package/bin/lib/doctor-plan.mjs +5 -1
- package/bin/lib/html-report.mjs +4 -2
- package/bin/lib/layer-description.mjs +27 -0
- package/bin/lib/prepare-write.mjs +7 -1
- package/dist/{configTypes-dy5PfTqS.d.ts → configTypes-0eHpocR3.d.ts} +4 -0
- package/dist/{diagnosticCatalog-D_DI7qrZ.d.ts → diagnosticCatalog-wDAH08gH.d.ts} +3 -3
- package/dist/eslint/index.d.ts +1 -1
- package/dist/index.cjs +19 -19
- package/dist/index.d.ts +5 -4
- package/dist/index.js +20 -20
- package/dist/nestjs/index.cjs +1 -1
- package/dist/nestjs/index.d.ts +3 -3
- package/dist/nestjs/index.js +1 -1
- package/dist/runtime/index.cjs +10 -10
- package/dist/runtime/index.d.ts +6 -6
- package/dist/runtime/index.js +10 -10
- package/dist/{types-BuM8WNqe.d.ts → types-BK47clMl.d.ts} +1 -1
- package/dist/{types-DrqsOiTY.d.ts → types-CwZ_oz1N.d.ts} +1 -1
- package/docs/README.md +4 -4
- package/docs/configuration.md +23 -2
- package/docs/package-surface.md +6 -3
- package/package.json +1 -1
- package/server.json +2 -2
- package/templates/agent-skills/ark-adopt/SKILL.md +18 -1
- package/templates/agent-skills/ark-place/SKILL.md +17 -4
- package/templates/skills/ark-adopt.md +18 -1
- package/templates/skills/ark-place.md +17 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as Policy, P as PolicyViolation, I as IntentName, j as IntentCreator, k as IntentRelationship, b as ArchitectureProfile, D as DomainEvent, E as EventMetadata, h as PolicyEnforcementMode, A as ArchitectureLayer, c as ArchitectureRule, d as ArkCheckConfig } from './types-
|
|
1
|
+
import { i as Policy, P as PolicyViolation, I as IntentName, j as IntentCreator, k as IntentRelationship, b as ArchitectureProfile, D as DomainEvent, E as EventMetadata, h as PolicyEnforcementMode, A as ArchitectureLayer, c as ArchitectureRule, d as ArkCheckConfig } from './types-BK47clMl.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* PolicyEngine
|
package/docs/README.md
CHANGED
|
@@ -58,14 +58,14 @@ These are **not** the day-to-day product path. They stay in the repo for evidenc
|
|
|
58
58
|
| Area | Path |
|
|
59
59
|
|------|------|
|
|
60
60
|
| 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) |
|
|
61
|
-
| 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; `AL05` parked). [arkrun](plans/arkrun/README.md) (Phase RN; `RN01`–`RN17` done; shipped **4.7.0** + companion **4.7.4**; ADRs [0020](adr/0020-arkrun-gated-extra-plane.md)–[0024](adr/0024-arkrun-transport-ports.md) accepted). [one-catalog-one-root](plans/one-catalog-one-root/README.md) (Phase HS; `HS01`–`HS05` done; shipped **4.7.1**). [arkorder](plans/arkorder/README.md) (Phase OR; `OR01`–`OR07` done; shipped **4.8.0**; extra **inside** package `arkgate` as `arkgate/order`; ADRs [0027](adr/0027-arkorder-gated-extra-plane.md)–[0031](adr/0031-one-package-extras-deprecate-companion.md)). [arkorder-arkrun](plans/arkorder-arkrun/README.md) (Phase XP; `XP01`–`XP08` done; shipped **4.8.5**; ADR [0033](adr/0033-arkorder-runtime-half-is-arkrun.md)). [arkorder-valve-loop](plans/arkorder-valve-loop/README.md) (Phase LV; `LV01`–`LV09` done
|
|
61
|
+
| 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; `AL05` parked). [arkrun](plans/arkrun/README.md) (Phase RN; `RN01`–`RN17` done; shipped **4.7.0** + companion **4.7.4**; ADRs [0020](adr/0020-arkrun-gated-extra-plane.md)–[0024](adr/0024-arkrun-transport-ports.md) accepted). [one-catalog-one-root](plans/one-catalog-one-root/README.md) (Phase HS; `HS01`–`HS05` done; shipped **4.7.1**). [arkorder](plans/arkorder/README.md) (Phase OR; `OR01`–`OR07` done; shipped **4.8.0**; extra **inside** package `arkgate` as `arkgate/order`; ADRs [0027](adr/0027-arkorder-gated-extra-plane.md)–[0031](adr/0031-one-package-extras-deprecate-companion.md)). [arkorder-arkrun](plans/arkorder-arkrun/README.md) (Phase XP; `XP01`–`XP08` done; shipped **4.8.5**; ADR [0033](adr/0033-arkorder-runtime-half-is-arkrun.md)). [arkorder-valve-loop](plans/arkorder-valve-loop/README.md) (Phase LV; `LV01`–`LV09` done; shipped **4.8.6**; [ADR 0034](adr/0034-arkorder-valved-loop.md); does not close K01). [layer-description-projection](plans/layer-description-projection/README.md) (Phase LD; `LD01`–`LD06` done on tree; **4.8.7** prepared; [ADR 0035](adr/0035-layer-description-projection.md); project `layers[].description`; no schema bump). |
|
|
62
62
|
| Claims audit | [audit/claims-matrix.md](audit/claims-matrix.md) |
|
|
63
63
|
| Field adoption kit (scaffolding, not closed) | [field/](field/) |
|
|
64
64
|
| Runtime hardening (experimental) | [production-hardening.md](production-hardening.md) |
|
|
65
65
|
|
|
66
|
-
Current published: [releases/4.8.
|
|
67
|
-
Tree: [releases/4.8.
|
|
68
|
-
Prior: [releases/4.8.4.md](releases/4.8.4.md) · [releases/4.8.3.md](releases/4.8.3.md) · [releases/4.8.2.md](releases/4.8.2.md) · [releases/4.8.1.md](releases/4.8.1.md) · [4.8.0](releases/4.8.0.md) · [4.7.6](releases/4.7.6.md) · [4.7.5](releases/4.7.5.md) · [4.7.4](releases/4.7.4.md) · [4.7.3](releases/4.7.3.md) · [4.7.2](releases/4.7.2.md) · [4.7.1](releases/4.7.1.md) · [4.7.0](releases/4.7.0.md) · [4.6.7](releases/4.6.7.md) · [4.6.6](releases/4.6.6.md) · [4.6.5](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).
|
|
66
|
+
Current published: [releases/4.8.6.md](releases/4.8.6.md) (`arkgate@4.8.6` on npm `latest`; does not close `K01`).
|
|
67
|
+
Tree: [releases/4.8.7.md](releases/4.8.7.md) (`arkgate@4.8.7` prepared).
|
|
68
|
+
Prior: [releases/4.8.5.md](releases/4.8.5.md) · [releases/4.8.4.md](releases/4.8.4.md) · [releases/4.8.3.md](releases/4.8.3.md) · [releases/4.8.2.md](releases/4.8.2.md) · [releases/4.8.1.md](releases/4.8.1.md) · [4.8.0](releases/4.8.0.md) · [4.7.6](releases/4.7.6.md) · [4.7.5](releases/4.7.5.md) · [4.7.4](releases/4.7.4.md) · [4.7.3](releases/4.7.3.md) · [4.7.2](releases/4.7.2.md) · [4.7.1](releases/4.7.1.md) · [4.7.0](releases/4.7.0.md) · [4.6.7](releases/4.6.7.md) · [4.6.6](releases/4.6.6.md) · [4.6.5](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).
|
|
69
69
|
Older notes: [releases/](releases/). Config: [configuration.md](configuration.md).
|
|
70
70
|
|
|
71
71
|
---
|
package/docs/configuration.md
CHANGED
|
@@ -144,7 +144,28 @@ name different factories: `arkRun.kernelRoots` (`compositionRoots` alias) vs
|
|
|
144
144
|
|
|
145
145
|
Layer fields:
|
|
146
146
|
|
|
147
|
-
- `name`, `patterns`, `exclude
|
|
147
|
+
- `name`, `patterns`, `exclude`
|
|
148
|
+
- **`layers[].description`** (optional) — **app-context caption**: one product sentence for what
|
|
149
|
+
this folder is *in the app*, not architecture jargon. `/ark-place` prints it next to
|
|
150
|
+
the layer name and globs; doctor, coverage, and the HTML report show the same text.
|
|
151
|
+
Changing the sentence does **not** change `policyHash` (same strip as `stewards`) and
|
|
152
|
+
does **not** need a weakening ack. Absence is silent: never fails `--strict-config`,
|
|
153
|
+
never invents a doctor residual, never flips `valid`. Empty string is invalid JSON for
|
|
154
|
+
the field (`minLength: 1`). Compact starters may omit it. `/ark-adopt` writes it when
|
|
155
|
+
the product map or glossary names the house; it does not invent captions. No
|
|
156
|
+
`/ark-describe`.
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
"layers": [
|
|
160
|
+
{
|
|
161
|
+
"name": "Application",
|
|
162
|
+
"patterns": ["src/application/**"],
|
|
163
|
+
"description": "Purchase requests — from asked to received."
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
That sentence is product copy. Not “Rich domain model, business rules, and domain events.”
|
|
148
169
|
- `intentPrefixes`, `forbiddenGlobals`, `mayImportInfrastructure`, `optional`
|
|
149
170
|
- `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.
|
|
150
171
|
- `capabilities: { deny: [...] }` — opt-in effect walls over the seven capability ids
|
|
@@ -353,7 +374,7 @@ changing either contract changes its hash and invalidates the acknowledgement.
|
|
|
353
374
|
|
|
354
375
|
Optional `stewards` lists **GitHub handles or emails** who may **loosen** the contract or
|
|
355
376
|
**grow** the baseline (`pedroknigge` or `pedroknigge@users.noreply.github.com` — not
|
|
356
|
-
`Pedro Knigge`). The field is metadata — it does not change the policy hash. The lock
|
|
377
|
+
`Pedro Knigge`). The field is metadata — it does not change the policy hash. `layers[].description` is stripped the same way (caption-only edits do not change `policyHash` and do not need a weakening ack; `contractHash` still fingerprints the raw config). The lock
|
|
357
378
|
matches `--author`, then `GITHUB_ACTOR` / `ARK_STEWARD`, then `GIT_AUTHOR_EMAIL`. A
|
|
358
379
|
noreply GitHub mail and the handle are the same person. Git `user.name` is not identity.
|
|
359
380
|
|
package/docs/package-surface.md
CHANGED
|
@@ -51,14 +51,15 @@ hardening guide remains repository-hosted rather than duplicated in the gate tar
|
|
|
51
51
|
| **Report parity and snapshot evidence (4.2)** | `ark-check --report` → advisory sections (`data-advisory="contractHealth\|ambientState\|parseHealth\|arkRun"`, nested `governanceWeight`) + layer wall badges; `.ark/reports/*.json` | The report is a rendering of doctor truth. **Standing rule:** every doctor advisory ships with its report section — enforced by the `reportParity` guard, which enumerates the doctor's advisory keys and fails on any missing section. Snapshots add best-effort Git `HEAD`/branch/dirty provenance without a shell; unavailable Git is explicit. Evolution renders the Ark score delta only when both snapshots name the same ArkGate version, while retaining raw facts across versions. Thin `arkRun` on `latest.json` is `notAScore` residual honesty for `ark status`. |
|
|
52
52
|
| **MCP project identity (4.2)** | `ark_identity`; `arkgate/schema/project-identity` or `arkgate/schema/ark.project-identity.schema.json`; root API constants/helpers/types | Schema `1.0`. `projectId` hashes canonical root + config path and stays stable across contract edits/restarts; runtime id/start time are separate. Every project-bound tool result and error carries `projectIdentity`, `binding` (`matched` / `unverified` / `mismatch`), and `authoritative`. Canonical out-of-root config/file evidence fails before project data. |
|
|
53
53
|
| **MCP tools and compatibility resource** | `arkgate-mcp`; `ark_manifest`; `ark_status`; `ark://manifest` | Tool names and primary argument shapes are stable within a major. Every tool accepts additive `project.expectedRoot` / optional `expectedProjectId`. The initial handshake requires the exact project root; a contained descendant is authoritative only together with the matching project id. Legacy tool calls remain callable but `unverified` and non-authoritative. `ark_manifest` is the authoritative contract surface after binding. **`ark_status`** returns the status manifest envelope (parity with `ark status --json`). Standard `resources/read` cannot portably carry the expectation, so `ark://manifest` remains compatibility-only and always unverified/non-authoritative. The server never retargets from input. |
|
|
54
|
-
| **`ark.config.json`** | Layer globs, rules, include/exclude, forbiddenGlobals, intent prefixes, `peerIsolation`, `dynamicImportAllowlist`, `safety` thresholds; optional **`coverage`** controls (`testGlobs`, `maxFiles`); optional **`arkRules`** map (schema `1.1+`); optional **`arkRun`** extra (schema `1.2+`); optional **`arkOrder`** extra (schema `1.3+`) | Versioned by `schemaVersion`; unknown fields fail closed and migrations preserve the previous supported major. Absence of `coverage`, `arkRules`, `arkRun`, or `arkOrder` is byte-for-byte silent on Layers / ArkRules verdicts. Enforced extra teeth share the CLI / MCP / hook / preflight / CI verdict and arm only when the layer plane is classified (same ArkRules floor). |
|
|
54
|
+
| **`ark.config.json`** | Layer globs, optional `layers[].description`, rules, include/exclude, forbiddenGlobals, intent prefixes, `peerIsolation`, `dynamicImportAllowlist`, `safety` thresholds; optional **`coverage`** controls (`testGlobs`, `maxFiles`); optional **`arkRules`** map (schema `1.1+`); optional **`arkRun`** extra (schema `1.2+`); optional **`arkOrder`** extra (schema `1.3+`) | Versioned by `schemaVersion`; unknown fields fail closed and migrations preserve the previous supported major. Absence of `coverage`, `arkRules`, `arkRun`, or `arkOrder` is byte-for-byte silent on Layers / ArkRules verdicts. Enforced extra teeth share the CLI / MCP / hook / preflight / CI verdict and arm only when the layer plane is classified (same ArkRules floor). |
|
|
55
|
+
| **Layer caption (`layers[].description`, 4.8.7)** | Optional string on each layer. Projected onto `ark_place` / prepare-write / MCP place JSON, doctor JSON + human, coverage JSON, and the HTML Purpose column when present. `/ark-adopt` writes it from the product map or glossary; `/ark-place` prints it next to layer name + globs. | Existing optional field — **no `schemaVersion` bump**, no new key, no 14th skill. Copy is **app context** (a product sentence such as `Purchase requests — from asked to received.`), not architecture jargon. Stripped from `policyHash` like `stewards`; caption-only edits are neutral. Absence is silent: never a residual, never a score, never `--strict-config` fail, never flips `valid`. Compact starters may omit. |
|
|
55
56
|
| **ArkRules inventory / under-contract (4.0; layer context 4.2)** | `ark-check --rules-inventory [--json]`; doctor `rulesUnderContract`; MCP `ark_rules_inventory` | Additive. Honest counts (inventoried / under-contract / frozen) — **never a score**. When configured layer evidence exists it overrides filename role guesses: a Domain file named `handler` is not a controller candidate. Test/fixture/seed/migration/exclusion surfaces plus narrow development-identity, PostgreSQL OID, and technical I/O constants are silent. Without layer evidence, backward-compatible path/content heuristics remain. Structure/invariant diagnostics use adapter `1.4` provenance. |
|
|
56
57
|
| **`arkgate/schema/project-identity`** or **`arkgate/schema/ark.project-identity.schema.json`** | MCP canonical project, contract, runtime, expectation, and binding envelope | Schema `1.0`. Initial `expectedRoot` must be the exact project root. A contained descendant can match only when `expectedProjectId` is also present and correct; id-only matching stays non-authoritative. Mismatch codes are `PROJECT_ROOT_MISMATCH`, `PROJECT_ID_MISMATCH`, and `INVALID_PROJECT_EXPECTATION`. |
|
|
57
58
|
| **Package pin dual-truth (4.0)** | doctor JSON `packageVersionTruth`; upgrade JSON/human note when pin behind CLI | Additive, advisory. Surfaces after `upgrade --no-install` when managed CLI is ahead of package.json. |
|
|
58
59
|
| **Managed upgrade self-service honesty (4.5 / DF05)** | `ark upgrade [--json]` → `selfService` (+ human “Self-service honesty” lines) | Additive, advisory. Answers without a maintainer: write-path activation labels per selected host (`hard`\|`advisory`\|`unavailable`) and customized content-identity preserve (`customizedPaths` / `customizedContentPreserved`). Soft hosts never hard; upgrade never invents `hardWriteActive` from disk alone. Always `notAScore: true`. Not a gate input; not part of `planDigest`. |
|
|
59
60
|
| **Product honesty readiness split (4.1.1)** | doctor JSON `productHonesty` | Additive. `unfinished` / `headline` / `primaryNextAction` / `reasonIds` remain; EH adds `contractReadiness` (`ready`\|`partial`\|`not-ready`), `localWriteBoundary` (`advisory`\|`hard`\|`unverified`\|`unknown`), `architectureReasonIds`, `environmentResidualIds` / `environmentResiduals`. Soft-write hosts stay in evidence without alone forcing global **Not finished**. `notAScore: true` always. |
|
|
60
61
|
| **Policy transition analysis (3.1.0)** | `analyzePolicyDelta(...)`; MCP `ark_policy_delta`; CLI `--policy-base` / `--policy-base-ref` / `--policy-ack`; check JSON `policyDelta` | Additive schema `1.0`. Classifications and finding ids are deterministic. Weakening/judgment requires an acknowledgement bound to both policy hashes and the exact blocking finding set. |
|
|
61
|
-
| **Team parliament (law vs feature)** | Optional `stewards` on `ark.config.json` (GitHub handle or email); CLI `--changed` / `--against` / `--base` / `--contract-diff` / `--contract-session` / `--persona` / `--author`; check JSON `teamParliament`; `ark status --vs`; write-gate mixed-batch deny | Additive. Law files must not mix with product source. Loosen / baseline-grow are steward-only when `stewards` is set. `--against` ratchets vs the base-ref baseline. `--changed` scans touched sources. `stewards`
|
|
62
|
+
| **Team parliament (law vs feature)** | Optional `stewards` on `ark.config.json` (GitHub handle or email); CLI `--changed` / `--against` / `--base` / `--contract-diff` / `--contract-session` / `--persona` / `--author`; check JSON `teamParliament`; `ark status --vs`; write-gate mixed-batch deny | Additive. Law files must not mix with product source. Loosen / baseline-grow are steward-only when `stewards` is set. `--against` ratchets vs the base-ref baseline. `--changed` scans touched sources. `stewards` and `layers[].description` are excluded from policy hash. Identity is handle or email, not git `user.name`. No org plane. |
|
|
62
63
|
| **Atomic change preflight (3.1.0)** | `preflightChange(...)`; CLI `ark preflight --changes <file> --json`; MCP `ark_prepare_change` | Additive schema `1.0`. One complete governed production-source `{path,content}` / `{path,delete:true}` batch; read-only; returns operation, content/tree/policy/compiler fingerprints and stable graph findings. MCP availability alone is advisory. |
|
|
63
64
|
| **Architecture change map (3.1.0)** | `arkgate/schema/change-map` or `arkgate/schema/ark.change-map.schema.json`; CLI `ark preflight --change-map <file>`; MCP `ark_prepare_change.changeMap` | Optional strict schema `1.0`. Canonical planned paths + operations + resolved Ark layers + dependencies between planned files. Preflight returns `changeMapHash`; absence is normal and adds no project file. Structural intent only, never behavioral completion. |
|
|
64
65
|
| **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. |
|
|
@@ -252,7 +253,9 @@ production deployment would need to satisfy; it is not a readiness certification
|
|
|
252
253
|
## Release notes (maintainers)
|
|
253
254
|
|
|
254
255
|
Ship notes for a version live under [releases/](https://github.com/pedroknigge/arkgate/tree/main/docs/releases)
|
|
255
|
-
(current
|
|
256
|
+
(current tree prepared: [4.8.7.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.7.md);
|
|
257
|
+
current published: [4.8.6.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.6.md);
|
|
258
|
+
prior published: [4.8.5.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.5.md);
|
|
256
259
|
prior published: [4.8.4.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.4.md);
|
|
257
260
|
prior published: [4.8.3.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.3.md);
|
|
258
261
|
prior published: [4.8.2.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.2.md);
|
package/package.json
CHANGED
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.8.
|
|
9
|
+
"version": "4.8.7",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "arkgate",
|
|
14
|
-
"version": "4.8.
|
|
14
|
+
"version": "4.8.7",
|
|
15
15
|
"runtimeHint": "npx",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
@@ -19,6 +19,9 @@ description: Session 0 — write the rules file (ark.config.json) to match the r
|
|
|
19
19
|
- Existing tree: propose **SharedKernel** (types/constants) + **CompositionRoot** (wiring) + `src/**/domain/**`. Never dump bare `src/lib/**` into Application.
|
|
20
20
|
- Generate `.ark/golden-pattern.json` (load-bearing for `/ark-place`).
|
|
21
21
|
- Future houses: mark unused layer globs `reserved` / `allowEmpty` so `--strict-config` does not fail.
|
|
22
|
+
- When the product map or glossary names a house, write `layers[].description` as
|
|
23
|
+
app-context copy (what this folder is *in the product*). Compact starter may omit.
|
|
24
|
+
Do not invent captions. Do not invent `/ark-describe`.
|
|
22
25
|
- CLI-first: if `arkgate-check` already resolved the root, do not wait on MCP.
|
|
23
26
|
- Do not add `arkRun` or `arkOrder` unless the user wants that extra. When they do, write
|
|
24
27
|
**advisory** extra in this turn (`arkRun` schema `1.2+`; `arkOrder` schema `1.3+`).
|
|
@@ -88,6 +91,16 @@ When present, prefer the consumer **domain glossary** for layer names, slice fol
|
|
|
88
91
|
- Prefer glossary terms over inventing parallel vocabulary.
|
|
89
92
|
- Call out conflicts between glossary language and code reality (process judgment).
|
|
90
93
|
- **Missing glossary is normal** — continue without warning spam. Never treat glossary prose as enforcement.
|
|
94
|
+
- When the glossary (or product map) names a house, that name is the `layers[].description` source — write it; do not invent a parallel caption.
|
|
95
|
+
|
|
96
|
+
## Layer captions (process)
|
|
97
|
+
|
|
98
|
+
When the **product map** (anti-wrapper) or **glossary** names a house, write
|
|
99
|
+
`layers[].description` on that layer in this turn. One sentence of **app context**
|
|
100
|
+
(what this folder is *in the product* — e.g. "Purchase requests — from asked to
|
|
101
|
+
received."), not architecture jargon. Compact starter / `ark start` may omit the
|
|
102
|
+
field. Absence is silent — never fail `--strict-config` for a missing caption.
|
|
103
|
+
Do **not** invent captions. Do not invent `/ark-describe`.
|
|
91
104
|
|
|
92
105
|
## When / not when
|
|
93
106
|
|
|
@@ -235,6 +248,8 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
|
|
|
235
248
|
User wants the ArkOrder extra → write **advisory** `arkOrder` (schema `1.3+`, real
|
|
236
249
|
`planeRoots`, existing `managedLayers`, `maxXiKeys` 7) **in this turn**. Do not add extras
|
|
237
250
|
to a compact starter. Do not promote to enforced as the session-0 default.
|
|
251
|
+
When the product map or glossary names a house, write `layers[].description` on that
|
|
252
|
+
layer (app-context sentence). Compact starter may omit. Do not invent captions.
|
|
238
253
|
2. **Check + diagnose** — `summary.concentrated` / dominant edge → fix contract first, don’t freeze.
|
|
239
254
|
Cross-slice / cross-context `peerIsolation` hits are judgment: extract shared or events.
|
|
240
255
|
The denial names its reason. `unclassifiable path` in bulk means shared code lives outside
|
|
@@ -246,7 +261,8 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
|
|
|
246
261
|
Empty Domain/Persistence + I/O under Application → false-green.
|
|
247
262
|
**STOP — do not continue this skill as complete.** **STOP — false-green:** fix the config **in this turn** before claiming ENFORCE. Do not claim goal.met / ENFORCE from type-only cleanup while doctor reports `contract-false-green-io-under-application`.
|
|
248
263
|
3. **Classify ungoverned** — use coverage `suggestions` **plus** dirs you discovered by reading;
|
|
249
|
-
add layers/patterns **here** (write `ark.config.json`).
|
|
264
|
+
add layers/patterns **here** (write `ark.config.json`). When adding a layer the product map
|
|
265
|
+
or glossary already names, write `layers[].description` on it (do not invent filler).
|
|
250
266
|
4. **Mine business rules → manifiesto** (model job — this is why the skill exists):
|
|
251
267
|
- Scan for loose domain: validators, pricing/policy functions, `can*`/`calculate*`, magic business constants, publish/intent strings, logic in UI/hooks that belongs in Domain.
|
|
252
268
|
- **ArkRules inventory (AR13):** run `ark-check --rules-inventory --json` for deterministic candidates
|
|
@@ -285,6 +301,7 @@ proposals applied or deferred, **phase**, **top Shape / design-weak opportunitie
|
|
|
285
301
|
- Put `arkRun` or `arkOrder` on the compact starter / `ark start` scaffold.
|
|
286
302
|
- Claim in-memory kernel stores are production durability.
|
|
287
303
|
- Invent `/ark-run` or `/ark-order`.
|
|
304
|
+
- Invent `layers[].description` filler or a `/ark-describe` skill.
|
|
288
305
|
- Claim Enforce while governed% is low, cores empty with I/O in Application, or core bags ungoverned.
|
|
289
306
|
- End adopt with only “baseline written” when design-weak residual is visible in files you opened.
|
|
290
307
|
|
|
@@ -19,6 +19,8 @@ description: "Where does new code go? Names the folder from the rules file and w
|
|
|
19
19
|
- `filePath` is known before the call. Description alone is not a path.
|
|
20
20
|
- Golden pattern is load-bearing when present. Adopt generates it.
|
|
21
21
|
- Do not default a repository to Presentation.
|
|
22
|
+
- When the matched layer has `layers[].description`, print that caption next to the
|
|
23
|
+
layer name and globs. Omit when absent — do not invent a caption or `/ark-describe`.
|
|
22
24
|
- When `arkRun` is on: scaffold through the kernel (no `new` of managed types; declare
|
|
23
25
|
`uses` / `reactsTo` / `raises` / `sends`; factory only in `arkRun.kernelRoots`,
|
|
24
26
|
`compositionRoots` alias). Extra off → do not introduce the kernel. Enable it
|
|
@@ -57,6 +59,12 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
|
|
|
57
59
|
|
|
58
60
|
**Where so the AI doesn’t mess up next time** — golden pattern + layer home before the write.
|
|
59
61
|
|
|
62
|
+
## Layer captions (process)
|
|
63
|
+
|
|
64
|
+
When `ark_place` / the contract includes `layers[].description`, print that caption
|
|
65
|
+
next to the layer name and globs. Omit it when the field is absent. Do **not** invent
|
|
66
|
+
a caption or `/ark-describe`.
|
|
67
|
+
|
|
60
68
|
## Deep modules (process)
|
|
61
69
|
|
|
62
70
|
- Place so new code stays **deep**: one small public surface per concern; hide implementation details.
|
|
@@ -80,7 +88,8 @@ and — if they asked to build it — scaffold it there correctly.
|
|
|
80
88
|
**No artifact given?** If the skill is invoked with nothing to place, don't error
|
|
81
89
|
and don't guess — the artifact is the one thing only the user knows. Read the
|
|
82
90
|
contract (step 1) and print the placement map from it: one row per declared layer
|
|
83
|
-
with
|
|
91
|
+
with layer name, globs, and `layers[].description` when present (omit when absent),
|
|
92
|
+
what belongs there, its directory, and which layers it may/may not import,
|
|
84
93
|
plus the not-yet-adopted `suggestedLayers` as a footnote. Then ask what they want
|
|
85
94
|
to place. That map is derived entirely from the repo, so producing it is real work,
|
|
86
95
|
not a stalling question.
|
|
@@ -164,7 +173,9 @@ the same files or weaken the gate.
|
|
|
164
173
|
the mandatory `ark_identity` preflight first, then call **`ark_place`** with the target file
|
|
165
174
|
path and bound `project` envelope — it returns the layer,
|
|
166
175
|
its forbidden globals, and exactly which layers the file may / must not import,
|
|
167
|
-
straight from the contract (no guessing). When
|
|
176
|
+
straight from the contract (no guessing). When the matched layer has
|
|
177
|
+
`layers[].description`, print that caption next to the layer name and globs;
|
|
178
|
+
omit it when absent. When present, also honor optional
|
|
168
179
|
**`goldenPattern`** (from `.ark/golden-pattern.json`) for **NEW code only** —
|
|
169
180
|
advisory layout norm; never overrides the gate and never clears design-weak.
|
|
170
181
|
Absent golden is normal. Otherwise load `ark.config.json`; after the matched preflight,
|
|
@@ -197,7 +208,8 @@ the same files or weaken the gate.
|
|
|
197
208
|
same technical layer are peerIsolation violations.
|
|
198
209
|
3. **Answer concretely**: layer name, target directory (from the layer's
|
|
199
210
|
`patterns`), intent-name prefix if the layer declares `intentPrefixes`, and
|
|
200
|
-
which layers it may/may not import (from `rules`).
|
|
211
|
+
which layers it may/may not import (from `rules`). When present, print
|
|
212
|
+
`layers[].description` next to the layer name and globs; omit when absent.
|
|
201
213
|
4. **If the layer isn't adopted yet** (suggested but no directory): write the
|
|
202
214
|
layer into `ark.config.json` (session-0 honesty — same as `/ark-adopt` for
|
|
203
215
|
that glob) **then** write the file. Don't silently drop the code into a
|
|
@@ -242,7 +254,8 @@ the same files or weaken the gate.
|
|
|
242
254
|
## Verify and report
|
|
243
255
|
|
|
244
256
|
If you created files, run `ark-check --root . --config ark.config.json
|
|
245
|
-
--strict-config` and make it pass. Report: placement + why
|
|
257
|
+
--strict-config` and make it pass. Report: placement + why (include the caption
|
|
258
|
+
next to layer name and globs when present; omit when absent), files created (if
|
|
246
259
|
any), and the import rules the new code must respect going forward.
|
|
247
260
|
|
|
248
261
|
## Completion contract (skill incomplete if missing)
|
|
@@ -19,6 +19,9 @@ description: Session 0 — write the rules file (ark.config.json) to match the r
|
|
|
19
19
|
- Existing tree: propose **SharedKernel** (types/constants) + **CompositionRoot** (wiring) + `src/**/domain/**`. Never dump bare `src/lib/**` into Application.
|
|
20
20
|
- Generate `.ark/golden-pattern.json` (load-bearing for `/ark-place`).
|
|
21
21
|
- Future houses: mark unused layer globs `reserved` / `allowEmpty` so `--strict-config` does not fail.
|
|
22
|
+
- When the product map or glossary names a house, write `layers[].description` as
|
|
23
|
+
app-context copy (what this folder is *in the product*). Compact starter may omit.
|
|
24
|
+
Do not invent captions. Do not invent `/ark-describe`.
|
|
22
25
|
- CLI-first: if `arkgate-check` already resolved the root, do not wait on MCP.
|
|
23
26
|
- Do not add `arkRun` or `arkOrder` unless the user wants that extra. When they do, write
|
|
24
27
|
**advisory** extra in this turn (`arkRun` schema `1.2+`; `arkOrder` schema `1.3+`).
|
|
@@ -88,6 +91,16 @@ When present, prefer the consumer **domain glossary** for layer names, slice fol
|
|
|
88
91
|
- Prefer glossary terms over inventing parallel vocabulary.
|
|
89
92
|
- Call out conflicts between glossary language and code reality (process judgment).
|
|
90
93
|
- **Missing glossary is normal** — continue without warning spam. Never treat glossary prose as enforcement.
|
|
94
|
+
- When the glossary (or product map) names a house, that name is the `layers[].description` source — write it; do not invent a parallel caption.
|
|
95
|
+
|
|
96
|
+
## Layer captions (process)
|
|
97
|
+
|
|
98
|
+
When the **product map** (anti-wrapper) or **glossary** names a house, write
|
|
99
|
+
`layers[].description` on that layer in this turn. One sentence of **app context**
|
|
100
|
+
(what this folder is *in the product* — e.g. "Purchase requests — from asked to
|
|
101
|
+
received."), not architecture jargon. Compact starter / `ark start` may omit the
|
|
102
|
+
field. Absence is silent — never fail `--strict-config` for a missing caption.
|
|
103
|
+
Do **not** invent captions. Do not invent `/ark-describe`.
|
|
91
104
|
|
|
92
105
|
## When / not when
|
|
93
106
|
|
|
@@ -235,6 +248,8 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
|
|
|
235
248
|
User wants the ArkOrder extra → write **advisory** `arkOrder` (schema `1.3+`, real
|
|
236
249
|
`planeRoots`, existing `managedLayers`, `maxXiKeys` 7) **in this turn**. Do not add extras
|
|
237
250
|
to a compact starter. Do not promote to enforced as the session-0 default.
|
|
251
|
+
When the product map or glossary names a house, write `layers[].description` on that
|
|
252
|
+
layer (app-context sentence). Compact starter may omit. Do not invent captions.
|
|
238
253
|
2. **Check + diagnose** — `summary.concentrated` / dominant edge → fix contract first, don’t freeze.
|
|
239
254
|
Cross-slice / cross-context `peerIsolation` hits are judgment: extract shared or events.
|
|
240
255
|
The denial names its reason. `unclassifiable path` in bulk means shared code lives outside
|
|
@@ -246,7 +261,8 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
|
|
|
246
261
|
Empty Domain/Persistence + I/O under Application → false-green.
|
|
247
262
|
**STOP — do not continue this skill as complete.** **STOP — false-green:** fix the config **in this turn** before claiming ENFORCE. Do not claim goal.met / ENFORCE from type-only cleanup while doctor reports `contract-false-green-io-under-application`.
|
|
248
263
|
3. **Classify ungoverned** — use coverage `suggestions` **plus** dirs you discovered by reading;
|
|
249
|
-
add layers/patterns **here** (write `ark.config.json`).
|
|
264
|
+
add layers/patterns **here** (write `ark.config.json`). When adding a layer the product map
|
|
265
|
+
or glossary already names, write `layers[].description` on it (do not invent filler).
|
|
250
266
|
4. **Mine business rules → manifiesto** (model job — this is why the skill exists):
|
|
251
267
|
- Scan for loose domain: validators, pricing/policy functions, `can*`/`calculate*`, magic business constants, publish/intent strings, logic in UI/hooks that belongs in Domain.
|
|
252
268
|
- **ArkRules inventory (AR13):** run `ark-check --rules-inventory --json` for deterministic candidates
|
|
@@ -285,6 +301,7 @@ proposals applied or deferred, **phase**, **top Shape / design-weak opportunitie
|
|
|
285
301
|
- Put `arkRun` or `arkOrder` on the compact starter / `ark start` scaffold.
|
|
286
302
|
- Claim in-memory kernel stores are production durability.
|
|
287
303
|
- Invent `/ark-run` or `/ark-order`.
|
|
304
|
+
- Invent `layers[].description` filler or a `/ark-describe` skill.
|
|
288
305
|
- Claim Enforce while governed% is low, cores empty with I/O in Application, or core bags ungoverned.
|
|
289
306
|
- End adopt with only “baseline written” when design-weak residual is visible in files you opened.
|
|
290
307
|
|
|
@@ -19,6 +19,8 @@ description: "Where does new code go? Names the folder from the rules file and w
|
|
|
19
19
|
- `filePath` is known before the call. Description alone is not a path.
|
|
20
20
|
- Golden pattern is load-bearing when present. Adopt generates it.
|
|
21
21
|
- Do not default a repository to Presentation.
|
|
22
|
+
- When the matched layer has `layers[].description`, print that caption next to the
|
|
23
|
+
layer name and globs. Omit when absent — do not invent a caption or `/ark-describe`.
|
|
22
24
|
- When `arkRun` is on: scaffold through the kernel (no `new` of managed types; declare
|
|
23
25
|
`uses` / `reactsTo` / `raises` / `sends`; factory only in `arkRun.kernelRoots`,
|
|
24
26
|
`compositionRoots` alias). Extra off → do not introduce the kernel. Enable it
|
|
@@ -57,6 +59,12 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
|
|
|
57
59
|
|
|
58
60
|
**Where so the AI doesn’t mess up next time** — golden pattern + layer home before the write.
|
|
59
61
|
|
|
62
|
+
## Layer captions (process)
|
|
63
|
+
|
|
64
|
+
When `ark_place` / the contract includes `layers[].description`, print that caption
|
|
65
|
+
next to the layer name and globs. Omit it when the field is absent. Do **not** invent
|
|
66
|
+
a caption or `/ark-describe`.
|
|
67
|
+
|
|
60
68
|
## Deep modules (process)
|
|
61
69
|
|
|
62
70
|
- Place so new code stays **deep**: one small public surface per concern; hide implementation details.
|
|
@@ -80,7 +88,8 @@ and — if they asked to build it — scaffold it there correctly.
|
|
|
80
88
|
**No artifact given?** If the skill is invoked with nothing to place, don't error
|
|
81
89
|
and don't guess — the artifact is the one thing only the user knows. Read the
|
|
82
90
|
contract (step 1) and print the placement map from it: one row per declared layer
|
|
83
|
-
with
|
|
91
|
+
with layer name, globs, and `layers[].description` when present (omit when absent),
|
|
92
|
+
what belongs there, its directory, and which layers it may/may not import,
|
|
84
93
|
plus the not-yet-adopted `suggestedLayers` as a footnote. Then ask what they want
|
|
85
94
|
to place. That map is derived entirely from the repo, so producing it is real work,
|
|
86
95
|
not a stalling question.
|
|
@@ -164,7 +173,9 @@ the same files or weaken the gate.
|
|
|
164
173
|
the mandatory `ark_identity` preflight first, then call **`ark_place`** with the target file
|
|
165
174
|
path and bound `project` envelope — it returns the layer,
|
|
166
175
|
its forbidden globals, and exactly which layers the file may / must not import,
|
|
167
|
-
straight from the contract (no guessing). When
|
|
176
|
+
straight from the contract (no guessing). When the matched layer has
|
|
177
|
+
`layers[].description`, print that caption next to the layer name and globs;
|
|
178
|
+
omit it when absent. When present, also honor optional
|
|
168
179
|
**`goldenPattern`** (from `.ark/golden-pattern.json`) for **NEW code only** —
|
|
169
180
|
advisory layout norm; never overrides the gate and never clears design-weak.
|
|
170
181
|
Absent golden is normal. Otherwise load `ark.config.json`; after the matched preflight,
|
|
@@ -197,7 +208,8 @@ the same files or weaken the gate.
|
|
|
197
208
|
same technical layer are peerIsolation violations.
|
|
198
209
|
3. **Answer concretely**: layer name, target directory (from the layer's
|
|
199
210
|
`patterns`), intent-name prefix if the layer declares `intentPrefixes`, and
|
|
200
|
-
which layers it may/may not import (from `rules`).
|
|
211
|
+
which layers it may/may not import (from `rules`). When present, print
|
|
212
|
+
`layers[].description` next to the layer name and globs; omit when absent.
|
|
201
213
|
4. **If the layer isn't adopted yet** (suggested but no directory): write the
|
|
202
214
|
layer into `ark.config.json` (session-0 honesty — same as `/ark-adopt` for
|
|
203
215
|
that glob) **then** write the file. Don't silently drop the code into a
|
|
@@ -242,7 +254,8 @@ the same files or weaken the gate.
|
|
|
242
254
|
## Verify and report
|
|
243
255
|
|
|
244
256
|
If you created files, run `ark-check --root . --config ark.config.json
|
|
245
|
-
--strict-config` and make it pass. Report: placement + why
|
|
257
|
+
--strict-config` and make it pass. Report: placement + why (include the caption
|
|
258
|
+
next to layer name and globs when present; omit when absent), files created (if
|
|
246
259
|
any), and the import rules the new code must respect going forward.
|
|
247
260
|
|
|
248
261
|
## Completion contract (skill incomplete if missing)
|