arkgate 4.1.0 → 4.1.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 +46 -2
- package/README.md +12 -13
- package/bin/lib/ark-gitignore.mjs +88 -0
- package/bin/lib/ci-and-commands.mjs +17 -1
- package/bin/lib/doctor-plan.mjs +11 -3
- package/bin/lib/enforcement-honesty.mjs +78 -22
- package/bin/lib/enforcement-state.mjs +1 -1
- package/bin/lib/github-enforcement.mjs +152 -4
- package/bin/lib/host-support-matrix.mjs +91 -17
- package/bin/lib/html-report-depth.mjs +13 -2
- package/bin/lib/html-report.mjs +7 -8
- package/bin/lib/write-path-detect.mjs +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/README.md +4 -4
- package/docs/agent-guide.md +5 -3
- package/docs/ai-gates.md +30 -7
- package/docs/develop.md +16 -6
- package/docs/package-surface.md +5 -3
- package/docs/product-voice.md +9 -3
- package/docs/use.md +3 -1
- package/package.json +1 -1
- package/server.json +2 -2
package/docs/develop.md
CHANGED
|
@@ -14,14 +14,18 @@ npx arkgate start --apply
|
|
|
14
14
|
npx arkgate-check --doctor
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
Make the architecture check a **required** merge status (GitHub/GitLab/etc.)
|
|
17
|
+
Make the architecture check a **required** merge **status context** (GitHub/GitLab/etc.). The CLI
|
|
18
|
+
command is `arkgate-check --strict-merge` / `ark-check --strict-merge` — the hard boundary is
|
|
19
|
+
requiring that job’s status, not merely adding a workflow file:
|
|
18
20
|
|
|
19
21
|
```yaml
|
|
20
22
|
- run: npx arkgate-check --root . --config ark.config.json --strict-merge
|
|
21
23
|
# or: uses: pedroknigge/arkgate@<tag-or-SHA>
|
|
22
24
|
```
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
Generated workflows also gate `--fail-on-new-smells --base-ref` so a first push with an all-zero
|
|
27
|
+
`github.event.before` still runs the full merge gate without a broken delta (see
|
|
28
|
+
[ai-gates.md](ai-gates.md#ci-backstop)).
|
|
25
29
|
|
|
26
30
|
---
|
|
27
31
|
|
|
@@ -31,9 +35,9 @@ Local write hardness **differs by host**. CI required status is the shared hard
|
|
|
31
35
|
|
|
32
36
|
| Host | Local write | MCP | Merge |
|
|
33
37
|
|------|-------------|-----|-------|
|
|
34
|
-
| Claude · Grok · Antigravity | Hard PreToolUse when installed + trusted | Advisory | Required status |
|
|
35
|
-
| Codex · OpenCode | Best-effort / advisory | Advisory | Required status |
|
|
36
|
-
| Cursor | Advisory only | Advisory | Required status |
|
|
38
|
+
| Claude · Grok · Antigravity | Hard PreToolUse when installed + trusted | Advisory | Required status context |
|
|
39
|
+
| Codex · OpenCode | Best-effort / advisory | Advisory | Required status context |
|
|
40
|
+
| Cursor | Advisory only | Advisory | Required status context |
|
|
37
41
|
|
|
38
42
|
Full matrix and install commands: [ai-gates.md](ai-gates.md) · canonical table in [README](../README.md#host-enforcement-support).
|
|
39
43
|
|
|
@@ -46,7 +50,13 @@ npx arkgate-check --install-agent-gates --tools opencode
|
|
|
46
50
|
npx arkgate-check --install-agent-gates --skills-only --force
|
|
47
51
|
```
|
|
48
52
|
|
|
49
|
-
Doctor reports what is actually installed and observed (`writePath` / enforcement state). Installed
|
|
53
|
+
Doctor reports what is actually installed and observed (`writePath` / enforcement state). Installed
|
|
54
|
+
files alone do not imply `hard:true` without runtime evidence where the product requires it.
|
|
55
|
+
|
|
56
|
+
**Evidence split (Phase EH):** soft-write hosts keep `soft-write-host` in evidence without forcing
|
|
57
|
+
global **Not finished** when the contract is ready. With `ARK_DOCTOR_GITHUB=1`, successful CI runs
|
|
58
|
+
can show `runtimeObserved: true` even when branch-protection policy is plan-unavailable
|
|
59
|
+
(`unavailable-plan` on GitHub Free private); `hard: false` until the status is required.
|
|
50
60
|
|
|
51
61
|
---
|
|
52
62
|
|
package/docs/package-surface.md
CHANGED
|
@@ -37,6 +37,7 @@ hardening guide remains repository-hosted rather than duplicated in the gate tar
|
|
|
37
37
|
| **`ark.config.json`** | Layer globs, rules, include/exclude, forbiddenGlobals, intent prefixes, `peerIsolation`, `dynamicImportAllowlist`, `safety` thresholds; optional **`arkRules`** map (schema `1.1+`) | Versioned by `schemaVersion`; unknown fields fail closed and migrations preserve the previous supported major. Absence of `arkRules` is byte-for-byte silent on inter-layer verdicts. |
|
|
38
38
|
| **ArkRules inventory / under-contract (4.0)** | `ark-check --rules-inventory [--json]`; doctor `rulesUnderContract`; MCP `ark_rules_inventory` | Additive. Honest counts (inventoried / under-contract / frozen) — **never a score**. Structure/invariant diagnostics use adapter `1.4` provenance. |
|
|
39
39
|
| **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. |
|
|
40
|
+
| **Product honesty readiness split (4.1.1 EH)** | 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. |
|
|
40
41
|
| **Policy transition analysis (T01, 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. |
|
|
41
42
|
| **Atomic change preflight (T02, 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. |
|
|
42
43
|
| **Architecture change map (T03, 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. |
|
|
@@ -189,7 +190,8 @@ production deployment would need to satisfy; it is not a readiness certification
|
|
|
189
190
|
## Release notes (maintainers)
|
|
190
191
|
|
|
191
192
|
Ship notes for a version live under [releases/](https://github.com/pedroknigge/arkgate/tree/main/docs/releases)
|
|
192
|
-
(current published: [4.0.
|
|
193
|
-
next
|
|
194
|
-
previous: [4.0.
|
|
193
|
+
(current published: [4.1.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.1.0.md);
|
|
194
|
+
prepared next: [4.1.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.1.1.md);
|
|
195
|
+
previous: [4.0.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.0.1.md),
|
|
196
|
+
[4.0.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.0.0.md)).
|
|
195
197
|
Publish path: signed annotated tag → GitHub Release → `publish-npm.yml` (see [CONTRIBUTING.md](https://github.com/pedroknigge/arkgate/blob/main/CONTRIBUTING.md)).
|
package/docs/product-voice.md
CHANGED
|
@@ -73,7 +73,9 @@ Examples:
|
|
|
73
73
|
| **compact router** | Default onboarding agent instructions (not the full skill pack) |
|
|
74
74
|
| **hard write** | Non-bypassable PreToolUse block for listed ops (Claude/Grok when installed + trusted) |
|
|
75
75
|
| **advisory write** | MCP/rules coach only (Cursor/Codex at write time) — not a hard block |
|
|
76
|
-
| **required CI** | Merge hard boundary when the repository makes `arkgate-check`
|
|
76
|
+
| **required CI / status context** | Merge hard boundary when the repository makes the Ark job a **required GitHub status context** (CLI: `arkgate-check --strict-merge` / `ark-check --strict-merge`) |
|
|
77
|
+
| **contract ready** | Project/layers/ArkRules honesty residual clear — not the same as “hard local write” |
|
|
78
|
+
| **environment residual** | Permanent host/provider posture (e.g. soft-write Codex) kept in evidence without forcing global **Not finished** |
|
|
77
79
|
|
|
78
80
|
## Do (product copy)
|
|
79
81
|
|
|
@@ -82,11 +84,13 @@ Examples:
|
|
|
82
84
|
| Name the status light + plain fact + term + next action | “Enforce · design-weak. Checked edges are honest; design smells remain. Next: one Shape door — explore → dual-plan B → autopilot with OK.” |
|
|
83
85
|
| Rank one primary door under residual | Doctor **Primary next action** #1; **Also** only for secondary |
|
|
84
86
|
| Label expert skills as escapes | “Install skill pack only when doctor or a STOP handoff names a skill.” |
|
|
85
|
-
| State host write honesty | “Cursor/Codex: advisory write. Required
|
|
87
|
+
| State host write honesty | “Cursor/Codex: advisory write. Required GitHub status context is the hard merge boundary.” |
|
|
88
|
+
| Soft-write ≠ unfinished project | “Architecture contract ready; Codex local writes are advisory.” Keep `soft-write-host` in evidence; reserve **Not finished** for contract/project debt. |
|
|
86
89
|
| Keep Suggest on start → doctor | New-here primary is finish `start`, not a competing recommend/architect curriculum |
|
|
87
90
|
| Qualify edge-clean under design-weak | “None on checked edges … design residual remains. Not healthy finished.” |
|
|
88
91
|
| Prefer fail-closed over fake hard | Incomplete analysis, unobserved hooks, and soft MCP never paint as hard green |
|
|
89
|
-
| Honesty clear ≠ architecture healthy | `productHonesty.finished` means residual honesty sensors are clear — not a green graph score. Open blocking violations, ADAPT/SUGGEST with debt, dual-truth pin, or design residual keep `unfinished: true`. |
|
|
92
|
+
| Honesty clear ≠ architecture healthy | `productHonesty.finished` means residual **architecture** honesty sensors are clear — not a green graph score. Open blocking violations, ADAPT/SUGGEST with debt, dual-truth pin, or design residual keep `unfinished: true`. Permanent soft-write alone does **not**. |
|
|
93
|
+
| Separate CI runtime from provider policy | Successful CI run ≠ required status; GitHub Free plan 403 → `unavailable-plan`, not “CI never ran.” |
|
|
90
94
|
|
|
91
95
|
## Avoid
|
|
92
96
|
|
|
@@ -100,6 +104,8 @@ Examples:
|
|
|
100
104
|
| Skill-shopping lists as the default curriculum | Progressive disclosure: one door first |
|
|
101
105
|
| “Healthy / done” while design-weak | False done |
|
|
102
106
|
| “Honesty clear” as “architecture finished” | Honesty clear only means residual honesty sensors are quiet; graph/mode debt is separate |
|
|
107
|
+
| “Not finished” solely because host is Codex/Cursor | Soft-write is environment residual; do not paint a green whole-tree project as unfinished architecture |
|
|
108
|
+
| Conflating CLI name with required status | `ark-check` is the command; the hard boundary is the GitHub required **status context** |
|
|
103
109
|
| “ArkRules prove business correctness” | They enforce *declared* structure/coverage evidence, not arbitrary logic or full semantic proof |
|
|
104
110
|
| “Structure enforced = Domain extraction done” | Structure sensors are **heuristics**; extraction is judgment (`/ark-fix` / pilot) |
|
|
105
111
|
| “Covered invariant = E2E business tests” | Coverage = symbol/test evidence for a named policy, not a runtime test runner |
|
package/docs/use.md
CHANGED
|
@@ -33,9 +33,11 @@ Full skill pack is **optional** (expert depth). Day-to-day: compact router + doc
|
|
|
33
33
|
| When | What happens |
|
|
34
34
|
|------|----------------|
|
|
35
35
|
| While the AI writes | Host write gate or advisory MCP (depends on host) |
|
|
36
|
-
| Before merge |
|
|
36
|
+
| Before merge | Make the Ark job a **required GitHub status context** running `arkgate-check --strict-merge` (alias `ark-check`) |
|
|
37
37
|
| Anytime | Doctor: Suggest / Adapt / Enforce (+ design-weak if residual) |
|
|
38
38
|
|
|
39
|
+
**Codex / Cursor / OpenCode:** local write stays advisory forever — that is not unfinished architecture. Doctor may say **contract ready** while still reminding you that local writes are advisory; **Not finished** is reserved for real project/contract debt.
|
|
40
|
+
|
|
39
41
|
ArkGate is **not** a web framework, ORM, or app runtime. It is architecture enforcement + co-pilot for AI TypeScript.
|
|
40
42
|
|
|
41
43
|
### Two planes (you choose)
|
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.1.
|
|
9
|
+
"version": "4.1.1",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "arkgate",
|
|
14
|
-
"version": "4.1.
|
|
14
|
+
"version": "4.1.1",
|
|
15
15
|
"runtimeHint": "npx",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|