wicked-garden 12.57.0 → 12.58.0
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/mcp.json +27 -0
- package/.codex-plugin/plugin.json +27 -0
- package/CHANGELOG.md +11 -1
- package/README.md +12 -2
- package/package.json +2 -2
- package/scripts/estate_mcp.mjs +188 -0
- package/skills/governed-worker/SKILL.md +16 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "wicked-garden", "owner": {"name": "Mike Parcewski"}, "plugins": [{"name": "wicked-garden", "source": "./", "description": "Your coding agent already plans and swarms \u2014 Wicked Garden is the curated toolkit for what it can't: proof-not-claims gates, code links grep can't see, deterministic refactor, cross-session memory, multi-model second opinions (fallback seats labelled). Don't fight the harness; fill its gaps. The gate needs wicked-vault (a self-contained infra peer, installed directly) and re-derives through garden's built-in engine; estate/bus are opt-in layers (wicked-testing and wicked-brain are retired \u2014 QE ships in-catalog as the qe domain, memory lives in wicked-estate).", "version": "12.
|
|
1
|
+
{"name": "wicked-garden", "owner": {"name": "Mike Parcewski"}, "plugins": [{"name": "wicked-garden", "source": "./", "description": "Your coding agent already plans and swarms \u2014 Wicked Garden is the curated toolkit for what it can't: proof-not-claims gates, code links grep can't see, deterministic refactor, cross-session memory, multi-model second opinions (fallback seats labelled). Don't fight the harness; fill its gaps. The gate needs wicked-vault (a self-contained infra peer, installed directly) and re-derives through garden's built-in engine; estate/bus are opt-in layers (wicked-testing and wicked-brain are retired \u2014 QE ships in-catalog as the qe domain, memory lives in wicked-estate).", "version": "12.58.0"}], "version": "12.58.0"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wicked-garden",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.58.0",
|
|
4
4
|
"description": "Your coding agent's harness already plans and swarms; Wicked Garden is the curated toolkit for what it can't do alone. Proof, not claims \u2014 gates re-derive 'done' through the internal loom engine (fail-closed, independently attested via wicked-vault), so a self-asserted pass can't lie its way green. Relationships grep can't see \u2014 the wicked-estate code graph + injected bus/dispatch/capability/archetype edges power blast-radius & lineage. Plus deterministic multi-file refactor (wicked-patch), cross-session memory + knowledge (the mem domain over wicked-estate), multi-model second opinions (fallback seats labelled) (jam:council), portable expertise as on-demand skill-refs, and evidence-gated testing (the in-catalog qe domain). It reads the shape of your work to apply the right rigor \u2014 steering, not a pipeline \u2014 then gets out of the way. The compiler stamps a self-contained evidence gate into any repo that runs with no wicked-garden installed. Don't fight the harness; fill its gaps. The evidence gate requires wicked-vault, a self-contained infra peer wicked-garden installs directly; wicked-bus is an opt-in layer \u2014 install what you'll use, the toolkit works without the rest.",
|
|
5
5
|
"wicked_vault_version": ">=0.8.0",
|
|
6
6
|
"wicked_ledger_version": "^0.6.0",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"wicked-estate": {
|
|
4
|
+
"command": "wicked-garden",
|
|
5
|
+
"args": [
|
|
6
|
+
"run",
|
|
7
|
+
"scripts/estate_mcp.mjs"
|
|
8
|
+
],
|
|
9
|
+
"env_vars": [
|
|
10
|
+
"WICKED_ESTATE_MCP_BIN",
|
|
11
|
+
"WICKED_ESTATE_DB",
|
|
12
|
+
"WICKED_HOME",
|
|
13
|
+
"WICKED_MEMORY_DB",
|
|
14
|
+
"WICKED_KNOWLEDGE_DB",
|
|
15
|
+
"WICKED_XEDGE_DB",
|
|
16
|
+
"WICKED_ESTATE_READONLY",
|
|
17
|
+
"WICKED_GOVERNED",
|
|
18
|
+
"WICKED_RUN_ID",
|
|
19
|
+
"WICKED_RUN_UNIT",
|
|
20
|
+
"WICKED_RUN_AGENT",
|
|
21
|
+
"WICKED_RUN_PROJECT",
|
|
22
|
+
"WICKED_GATE_SCOPE",
|
|
23
|
+
"WICKED_WRITE_ROOTS"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "wicked-garden",
|
|
3
|
+
"version": "12.58.0",
|
|
4
|
+
"description": "The skills your coding agent can't build alone: \"done\" re-checked from evidence, graph-aware search and multi-file refactor, 40 QE specialists, review panels from other models, and cross-session memory. Works in Claude Code, Codex, Antigravity, OpenCode and Pi, in CI, or in a wicked-crew job.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"coding-agent",
|
|
7
|
+
"evidence-gate",
|
|
8
|
+
"code-graph",
|
|
9
|
+
"refactoring",
|
|
10
|
+
"testing",
|
|
11
|
+
"memory",
|
|
12
|
+
"multi-model"
|
|
13
|
+
],
|
|
14
|
+
"skills": "./skills",
|
|
15
|
+
"mcpServers": "./.codex-plugin/mcp.json",
|
|
16
|
+
"hooks": {
|
|
17
|
+
"description": "No hooks on Codex: hooks/hooks.json is Claude Code's event model; garden's skills run the gate themselves on skills-only hosts.",
|
|
18
|
+
"hooks": {}
|
|
19
|
+
},
|
|
20
|
+
"interface": {
|
|
21
|
+
"displayName": "Wicked Garden",
|
|
22
|
+
"shortDescription": "Evidence-gated done, graph-aware search and refactor, QE specialists, review panels, cross-session memory.",
|
|
23
|
+
"developerName": "Mike Parcewski",
|
|
24
|
+
"category": "Developer Tools",
|
|
25
|
+
"websiteURL": "https://github.com/mikeparcewski/wicked-garden"
|
|
26
|
+
}
|
|
27
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [12.58.0] — 2026-10-20
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **garden is a registered Codex plugin (#1326).** `.codex-plugin/plugin.json` (Codex prefers it over `.claude-plugin/plugin.json`) declares the skills directory (`./skills`; Codex namespaces them `wicked-garden:<skill>`), the `wicked-estate` MCP server (`.codex-plugin/mcp.json`) and an explicit empty `hooks` block, because without one Codex would load `hooks/hooks.json`, which is Claude Code's hook model. Codex installs it from the existing `.claude-plugin/marketplace.json`: `codex plugin marketplace add <garden package root>`, then `codex plugin add wicked-garden@wicked-garden`. The MCP server starts through `wicked-garden run scripts/estate_mcp.mjs`. That new launcher finds `wicked-estate-mcp` the way `scripts/_estate_client.py` does (`WICKED_ESTATE_MCP_BIN`, then PATH, then `~/.local/bin`), so no install path is written into the manifest. The server forwards the binary override, estate's store pins (`WICKED_ESTATE_DB`, `WICKED_HOME`, `WICKED_*_DB`), the read-only opt-in and the run markers through `env_vars`, because Codex hands a stdio MCP server only a default allowlist (PATH, HOME, …) plus the variables named there. The launcher also applies `_estate_client.py`'s rules. It accepts only `--readonly`, `--governed` and `--db <path>`/`--db=<path>`, and refuses a misspelt flag. `--readonly` is added for the flag, for `WICKED_ESTATE_READONLY`, `WICKED_GOVERNED` or `--governed`, and for a run marker. A governed unit with no pinned store is refused. The child gets `[--readonly] [--db <path>]`, the only spelling estate reads. It passes stdio, arguments, cwd and the exit code through, and when no binary is found it prints one JSON line and exits 1. A `wicked-estate` server in the user's Codex config takes precedence over the plugin's.
|
|
9
|
+
- **The Codex manifest is kept in version lockstep and checked in CI (#1326).** `sync-plugin-version.mjs` (the npm `version` hook the release runs) now bumps `.codex-plugin/plugin.json` too, and so does the dev `release.py` (with `package.json`). `scripts/ci/validate.py` runs `scripts/ci/codex_plugin.py`, which applies the rules Codex 0.163 uses: name matches the Claude manifest, and the Codex and Claude versions both match `package.json`; paths start with `./` and stay under the root; the hooks opt-out is present; the estate server goes through a launcher script under the root. It also requires that the skills Codex would discover (recursive, hidden directories skipped, string names of at most 64 characters, a string description present) are exactly the catalog's. `tests/test_codex_plugin_manifest.py` checks that the npm package ships those same skills plus the manifest files.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- **Governed-worker evaluators defer delivery-only criteria instead of failing them (rule E6, #1328).** A criterion whose evidence exists only after the deliver phase pushes (CI on the opened pull request, the pull request's title or body, a merge, a release) is now DEFERRED, neither PASS nor FAIL. Every part the run can show is still judged, and a failing in-run part still FAILs the item (deny-dominates). The evaluator names each deferred item (`ITEM <n>: DEFERRED — <the artifact it waits for>`, or a "Deferred to delivery" list) so the deliver gate can show it to the operator; a deferred item never fails the verdict by itself. E6 is distinct from E3: an in-run item the creator left as a follow-up is still judged. Pinned by `tests/test_governed_worker_rules.py`.
|
|
13
|
+
|
|
5
14
|
## [12.57.0] — 2026-10-18
|
|
6
15
|
|
|
7
16
|
### Added
|
|
@@ -1170,7 +1179,8 @@ through `v9.2.18`. Major themes across that span:
|
|
|
1170
1179
|
|
|
1171
1180
|
For each of those releases, see the corresponding tag in git history.
|
|
1172
1181
|
|
|
1173
|
-
[Unreleased]: https://github.com/mikeparcewski/wicked-garden/compare/v12.
|
|
1182
|
+
[Unreleased]: https://github.com/mikeparcewski/wicked-garden/compare/v12.58.0...HEAD
|
|
1183
|
+
[12.58.0]: https://github.com/mikeparcewski/wicked-garden/compare/v12.57.0...v12.58.0
|
|
1174
1184
|
[12.57.0]: https://github.com/mikeparcewski/wicked-garden/compare/v12.56.0...v12.57.0
|
|
1175
1185
|
[12.56.0]: https://github.com/mikeparcewski/wicked-garden/compare/v12.55.1...v12.56.0
|
|
1176
1186
|
[12.55.1]: https://github.com/mikeparcewski/wicked-garden/compare/v12.55.0...v12.55.1
|
package/README.md
CHANGED
|
@@ -69,7 +69,17 @@ installs/updates the whole wicked-\* family (garden, its peers, and the rest).
|
|
|
69
69
|
> and the previous copy is put back). Those transient dirs are **not plugins**; a leftover after an interrupted install is
|
|
70
70
|
> safe to delete (`status` lists them).
|
|
71
71
|
|
|
72
|
-
**
|
|
72
|
+
**Codex (codex-cli with `codex plugin`, 0.163+)** — garden is a registered Codex plugin: `.codex-plugin/plugin.json`
|
|
73
|
+
declares the skills (`./skills`, namespaced `wicked-garden:<skill>`), the `wicked-estate` MCP server (started through
|
|
74
|
+
`wicked-garden run scripts/estate_mcp.mjs`, which finds `wicked-estate-mcp` the way garden's scripts do:
|
|
75
|
+
`WICKED_ESTATE_MCP_BIN` → PATH → `~/.local/bin`; that override, estate's store pins and the read-only/run markers are forwarded through `env_vars`, since Codex passes an MCP server only those plus PATH/HOME and the like, and `WICKED_ESTATE_READONLY` or a run marker adds `--readonly` as garden's estate client does), and no hooks (`hooks/hooks.json` is Claude Code's). By hand:
|
|
76
|
+
`npm i -g wicked-garden`, then `codex plugin marketplace add "$(npm root -g)/wicked-garden"` and
|
|
77
|
+
`codex plugin add wicked-garden@wicked-garden`. wicked-installer's Codex script does the same (pick Codex in
|
|
78
|
+
`npx wicked-installer`, or run `node "$(npm root -g)/wicked-installer/dist/install-codex.js" wicked-garden`) and
|
|
79
|
+
removes the loose skill copies it made earlier. A `[mcp_servers.wicked-estate]` entry in your Codex config takes
|
|
80
|
+
precedence over the plugin's server.
|
|
81
|
+
|
|
82
|
+
**Other CLIs (OpenCode, Pi, Antigravity, and Codex without `codex plugin`)** — `npx wicked-installer install-<cli> wicked-garden` copies
|
|
73
83
|
the skills only (flat, by name — no `scripts/`, no venv). Every skill's text works there as written: own files are
|
|
74
84
|
referenced relative to the skill's directory, other skills by name, and the shared runtime only through the
|
|
75
85
|
launcher — `wicked-garden run scripts/<x>.py …`. So for script-backed skills the runtime prerequisite on those
|
|
@@ -130,7 +140,7 @@ false "done" runs into depends on the host and the entry path:
|
|
|
130
140
|
|---|---|---|
|
|
131
141
|
| **Any host — the gate, invoked** (`wicked-garden-prove`, an archetype's produces-gate → `scripts/qe/vault_gate.py`) | Re-hashes the recorded evidence and re-runs its verifier through `wicked-vault`: a false claim is **rejected**, an unresolvable backend **fails closed** (`gate: "unavailable"`). Hard gates also need an attestation under an explicit `--actor` that differs from the author's — a local label, not an authenticated identity. The verdict stops whatever acts on it. | With `--no-require`, a backend that cannot run falls back to the claim-only tracker and says so (`claim-only`, not re-derived); a working backend still re-derives. |
|
|
132
142
|
| **Claude Code — plugin hooks** (plain conversation, "just work") | `PreToolUse` denies a few specific tool calls: native `EnterPlanMode` (always — planning goes through the archetype playbooks), writes to `MEMORY.md` / the auto-memory dir, build-phase writes on a high-complexity crew project with no challenge artifacts, a `phase_manager.py approve` whose gate preflight fails, a worktree cwd leak, and — only in `strict` mode (default `warn`) — invalid task metadata (`WG_TASK_METADATA`) and orphan state writes (`WG_BUS_EMIT_LINT`). Prompts are held until `/wicked-garden-core setup` completes. | Everything else. The archetype detector **steers** (it does not gate), the Stop-time claim sentinel is a fail-open **nudge** when a "done/passing" claim has no verdict for HEAD, `TaskCompleted` never blocks, and output governance is advisory. A completion claim is **not** blocked unless a gate is run. |
|
|
133
|
-
| **Codex · OpenCode · Pi · Antigravity — skills only** (`npx wicked-installer install-<cli> wicked-garden`) | Nothing by itself: no
|
|
143
|
+
| **Codex (plugin) · OpenCode · Pi · Antigravity — skills only** (`npx wicked-installer install-<cli> wicked-garden`) | Nothing by itself: no hooks are installed on those hosts (the Codex plugin opts out of them). | The skill text tells the agent to run the gate; it blocks only when the agent does run it (and the launcher + `wicked-vault` are present). |
|
|
134
144
|
| **Compiled repo gate** (`/wicked-garden-prove compile <repo> --trigger hook,ci`) | `.wicked/gate.py` fails the **git pre-push hook / CI job** it is wired into, with no wicked-garden installed. | Without a trigger it is a script you run by hand. |
|
|
135
145
|
| **wicked-crew governed run** | crew's engine decides each gated phase deny-dominates, on the layers that actually ran — deterministic floors, repo checks, policies, a judge. Review moves to a distinct seat when the roster has an eligible one; team runs refuse without one. | An ordinary run on a too-small roster keeps review on the creator seat and labels it "evaluator ≠ creator not held"; a pinned floor with no distinct judge is labelled "floor only"; a phase nothing gated is "approved by default, not verified". |
|
|
136
146
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wicked-garden",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.58.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The skills your coding agent can't build alone: \"done\" re-checked from evidence, graph-aware search and multi-file refactor, 40 QE specialists, review panels from other models, and cross-session memory. Works in Claude Code, Codex, Antigravity, OpenCode and Pi, in CI, or in a wicked-crew job.",
|
|
6
6
|
"keywords": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"main": "install.mjs",
|
|
35
35
|
"scripts": {
|
|
36
36
|
"test": "node scripts/ci/run_pytest.js",
|
|
37
|
-
"version": "node .github/scripts/sync-plugin-version.mjs && git add .claude-plugin/plugin.json .claude-plugin/marketplace.json",
|
|
37
|
+
"version": "node .github/scripts/sync-plugin-version.mjs && git add .claude-plugin/plugin.json .claude-plugin/marketplace.json .codex-plugin/plugin.json",
|
|
38
38
|
"prepublishOnly": "node install.mjs --version"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* estate_mcp.mjs — start the wicked-estate MCP server over stdio for a host that loads garden as
|
|
4
|
+
* a plugin (Codex: `.codex-plugin/mcp.json` runs `wicked-garden run scripts/estate_mcp.mjs`).
|
|
5
|
+
*
|
|
6
|
+
* The binary is found the way garden's own estate client finds it
|
|
7
|
+
* (`scripts/_estate_client.py` `resolve_mcp_bin`), so the plugin and the skills talk to the same
|
|
8
|
+
* binary and no install path is written into the manifest:
|
|
9
|
+
*
|
|
10
|
+
* 1. WICKED_ESTATE_MCP_BIN, when it names an existing file;
|
|
11
|
+
* 2. `wicked-estate-mcp` on PATH — an executable file, as `shutil.which` requires (PATHEXT on
|
|
12
|
+
* Windows);
|
|
13
|
+
* 3. ~/.local/bin/wicked-estate-mcp (or `.exe`).
|
|
14
|
+
*
|
|
15
|
+
* stdin/stdout/stderr are inherited (the MCP stream passes straight through), the caller's cwd is
|
|
16
|
+
* kept (the binary resolves its store from it), and arguments after the script name are passed
|
|
17
|
+
* on. The read-only and governed-unit rules of `_estate_client.py` apply here too: `--readonly`
|
|
18
|
+
* is added when WICKED_ESTATE_READONLY / WICKED_GOVERNED is truthy or a run marker
|
|
19
|
+
* (WICKED_RUN_ID, WICKED_GATE_SCOPE, WICKED_WRITE_ROOTS) is set — estate only honours the
|
|
20
|
+
* literal flag — and a governed unit with no pinned store (--db, WICKED_ESTATE_DB, WICKED_HOME,
|
|
21
|
+
* WICKED_MEMORY_DB) is refused rather than pointed at the operator's default stores. The exit code is the server's; SIGINT/SIGTERM/SIGHUP are forwarded. When no binary is found
|
|
22
|
+
* it writes one JSON line on stderr — {"ok": false, "reason": …, "tried": […]} — and exits 1, so
|
|
23
|
+
* the host reports a failed MCP server rather than a hung one.
|
|
24
|
+
*
|
|
25
|
+
* Pure helpers are exported for tests (tests/test_codex_plugin_manifest.py).
|
|
26
|
+
*/
|
|
27
|
+
import { accessSync, constants as fsConstants, realpathSync, statSync } from "node:fs";
|
|
28
|
+
import { spawn } from "node:child_process";
|
|
29
|
+
import { homedir } from "node:os";
|
|
30
|
+
import path from "node:path";
|
|
31
|
+
import { fileURLToPath } from "node:url";
|
|
32
|
+
|
|
33
|
+
export const MCP_BIN_NAME = "wicked-estate-mcp";
|
|
34
|
+
export const OVERRIDE_ENV = "WICKED_ESTATE_MCP_BIN";
|
|
35
|
+
|
|
36
|
+
function isFile(p) {
|
|
37
|
+
try {
|
|
38
|
+
return statSync(p).isFile();
|
|
39
|
+
} catch {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** shutil.which's test: a regular file the user may execute (Windows has no execute bit). */
|
|
45
|
+
function isExecutableFile(p, platform = process.platform) {
|
|
46
|
+
if (!isFile(p)) return false;
|
|
47
|
+
if (platform === "win32") return true;
|
|
48
|
+
try {
|
|
49
|
+
accessSync(p, fsConstants.X_OK);
|
|
50
|
+
return true;
|
|
51
|
+
} catch {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Resolve the estate MCP binary. Returns { bin, tried } — `bin` is null when nothing qualifies.
|
|
58
|
+
* `env`, `platform`, `home` and `fileExists` are seams for tests.
|
|
59
|
+
*/
|
|
60
|
+
export function resolveEstateMcpBin({
|
|
61
|
+
env = process.env,
|
|
62
|
+
platform = process.platform,
|
|
63
|
+
home = homedir(),
|
|
64
|
+
fileExists = isFile,
|
|
65
|
+
isExecutable = (p) => isExecutableFile(p, platform),
|
|
66
|
+
} = {}) {
|
|
67
|
+
const p = platform === "win32" ? path.win32 : path.posix;
|
|
68
|
+
const tried = [];
|
|
69
|
+
const override = env[OVERRIDE_ENV];
|
|
70
|
+
if (override) {
|
|
71
|
+
tried.push(`${OVERRIDE_ENV}=${override}`);
|
|
72
|
+
if (fileExists(override)) return { bin: override, tried };
|
|
73
|
+
}
|
|
74
|
+
const exts = platform === "win32"
|
|
75
|
+
? ["", ...(env.PATHEXT || ".COM;.EXE;.BAT;.CMD").split(";").filter(Boolean).map((e) => e.toLowerCase())]
|
|
76
|
+
: [""];
|
|
77
|
+
const pathVar = env.PATH ?? env.Path ?? "";
|
|
78
|
+
for (const dir of pathVar.split(platform === "win32" ? ";" : ":")) {
|
|
79
|
+
if (!dir) continue;
|
|
80
|
+
for (const ext of exts) {
|
|
81
|
+
const candidate = p.join(dir, MCP_BIN_NAME + ext);
|
|
82
|
+
// PATH entries must be executable (as shutil.which requires); the override and
|
|
83
|
+
// ~/.local/bin only need to be files, exactly as _estate_client.py checks them.
|
|
84
|
+
if (isExecutable(candidate)) return { bin: candidate, tried: [...tried, "PATH"] };
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
tried.push("PATH");
|
|
88
|
+
const local = p.join(home, ".local", "bin");
|
|
89
|
+
for (const name of [MCP_BIN_NAME, `${MCP_BIN_NAME}.exe`]) {
|
|
90
|
+
const candidate = p.join(local, name);
|
|
91
|
+
tried.push(candidate);
|
|
92
|
+
if (fileExists(candidate)) return { bin: candidate, tried };
|
|
93
|
+
}
|
|
94
|
+
return { bin: null, tried };
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const GOVERNED_MARKERS = ["WICKED_RUN_ID", "WICKED_GATE_SCOPE", "WICKED_WRITE_ROOTS"];
|
|
98
|
+
const STORE_PIN_ENV = ["WICKED_ESTATE_DB", "WICKED_HOME", "WICKED_MEMORY_DB"];
|
|
99
|
+
const truthy = (v) => !["", "0", "false", "no"].includes(String(v ?? "").trim().toLowerCase());
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The argv to hand estate, or the reason to refuse — `_estate_client.parse_cli_flags()`,
|
|
103
|
+
* `read_only()`, `governed_refusal()` and `mcp_argv()` applied to the launcher's own argv and
|
|
104
|
+
* environment. Accepted flags: `--readonly`, `--governed`, `--db <path>` / `--db=<path>`
|
|
105
|
+
* (anywhere); any other `--flag` is refused (a misspelt `--read-only` must never reach a
|
|
106
|
+
* write-capable server). The child argv is `[--readonly] [--db <path>] …positionals`, the only
|
|
107
|
+
* `--db` spelling estate reads.
|
|
108
|
+
*/
|
|
109
|
+
export function estateArgv(argv, env = process.env) {
|
|
110
|
+
let readonlyFlag = false;
|
|
111
|
+
let governedFlag = false;
|
|
112
|
+
let db = null;
|
|
113
|
+
const rest = [];
|
|
114
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
115
|
+
const tok = argv[i];
|
|
116
|
+
if (tok === "--readonly") readonlyFlag = true;
|
|
117
|
+
else if (tok === "--governed") governedFlag = true;
|
|
118
|
+
else if (tok === "--db") {
|
|
119
|
+
const value = argv[i + 1];
|
|
120
|
+
if (!value || value.startsWith("-")) return { usage: "--db requires a store path" };
|
|
121
|
+
db = value;
|
|
122
|
+
i += 1;
|
|
123
|
+
} else if (tok.startsWith("--db=")) {
|
|
124
|
+
const value = tok.slice("--db=".length);
|
|
125
|
+
if (!value) return { usage: "--db= requires a store path" };
|
|
126
|
+
db = value;
|
|
127
|
+
} else if (tok.startsWith("--") && tok.length > 2) {
|
|
128
|
+
return { usage: `unknown flag ${JSON.stringify(tok)}: the estate launcher accepts --readonly, --governed and --db <path> only (spell --readonly exactly)` };
|
|
129
|
+
} else rest.push(tok);
|
|
130
|
+
}
|
|
131
|
+
const marker = governedFlag ? "--governed"
|
|
132
|
+
: truthy(env.WICKED_GOVERNED) ? "WICKED_GOVERNED"
|
|
133
|
+
: GOVERNED_MARKERS.find((k) => String(env[k] ?? "").trim());
|
|
134
|
+
const pinned = !!db || STORE_PIN_ENV.some((k) => String(env[k] ?? "").trim());
|
|
135
|
+
if (marker && !pinned) {
|
|
136
|
+
return { refusal: `governed unit (${marker} is set) but no estate store is pinned: set ${STORE_PIN_ENV.join(" / ")} or pass --db; refusing to start wicked-estate-mcp against the operator's default stores` };
|
|
137
|
+
}
|
|
138
|
+
const readOnly = readonlyFlag || !!marker || truthy(env.WICKED_ESTATE_READONLY);
|
|
139
|
+
return { argv: [...(readOnly ? ["--readonly"] : []), ...(db ? ["--db", db] : []), ...rest] };
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function main(argv) {
|
|
143
|
+
const plan = estateArgv(argv);
|
|
144
|
+
if (plan.usage || plan.refusal) {
|
|
145
|
+
process.stderr.write(JSON.stringify({ ok: false, reason: plan.usage ?? plan.refusal, tried: [] }) + "\n");
|
|
146
|
+
return process.exit(plan.usage ? 2 : 1);
|
|
147
|
+
}
|
|
148
|
+
argv = plan.argv;
|
|
149
|
+
const { bin, tried } = resolveEstateMcpBin();
|
|
150
|
+
if (!bin) {
|
|
151
|
+
process.stderr.write(JSON.stringify({
|
|
152
|
+
ok: false,
|
|
153
|
+
reason: `${MCP_BIN_NAME} not found — install wicked-estate (npx wicked-installer install wicked-estate) or set ${OVERRIDE_ENV}`,
|
|
154
|
+
tried,
|
|
155
|
+
}) + "\n");
|
|
156
|
+
return process.exit(1);
|
|
157
|
+
}
|
|
158
|
+
const child = spawn(bin, argv, { stdio: "inherit", shell: false });
|
|
159
|
+
for (const sig of ["SIGINT", "SIGTERM", "SIGHUP"]) {
|
|
160
|
+
process.on(sig, () => {
|
|
161
|
+
try {
|
|
162
|
+
child.kill(sig);
|
|
163
|
+
} catch {
|
|
164
|
+
/* already gone */
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
child.on("error", (err) => {
|
|
169
|
+
process.stderr.write(JSON.stringify({ ok: false, reason: `could not start ${bin}: ${err.message}`, tried }) + "\n");
|
|
170
|
+
process.exit(1);
|
|
171
|
+
});
|
|
172
|
+
child.on("exit", (code, signal) => {
|
|
173
|
+
process.exit(code ?? (signal ? 128 + (signalNumber(signal) || 1) : 1));
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function signalNumber(name) {
|
|
178
|
+
return { SIGHUP: 1, SIGINT: 2, SIGKILL: 9, SIGTERM: 15 }[name];
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function invokedDirectly() {
|
|
182
|
+
try {
|
|
183
|
+
return Boolean(process.argv[1]) && realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url));
|
|
184
|
+
} catch {
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if (invokedDirectly()) main(process.argv.slice(2));
|
|
@@ -139,6 +139,19 @@ verdict with reasons. You are output-only.
|
|
|
139
139
|
creator's reason. An unjustified duplicate is at least a Concern. So is new code
|
|
140
140
|
whose output records no built-in check (C8). Code that swaps out the framework the
|
|
141
141
|
user or a policy chose is a Critical.
|
|
142
|
+
- **E6 — Judge what the run can show; defer what only delivery can.** A
|
|
143
|
+
criterion whose evidence exists only after the deliver phase pushes — CI
|
|
144
|
+
results on the opened pull request, the pull request's title or body, a merge,
|
|
145
|
+
a release — is DEFERRED: neither PASS nor FAIL. Judge every part you can check
|
|
146
|
+
before delivery (the tree, your own runs in it, the floor record: tests,
|
|
147
|
+
format, lint, CHANGELOG). An item that mixes the two FAILs when its in-run part
|
|
148
|
+
fails; a deferral never lifts a failing in-run part. Otherwise name what waits:
|
|
149
|
+
`ITEM <n>: DEFERRED — <the artifact it waits for>` when your brief asks for item
|
|
150
|
+
lines, else a "Deferred to delivery" list above the verdict line. A deferred
|
|
151
|
+
item never fails the unit by itself, and a promise that CI will pass is never a
|
|
152
|
+
PASS. The deliver gate shows each deferred check to the operator. This is not
|
|
153
|
+
a creator's deferral (E3): an in-run item the creator left as a follow-up is
|
|
154
|
+
still judged.
|
|
142
155
|
|
|
143
156
|
Method: read the outcome and design, then the changed files; for each, ask
|
|
144
157
|
whether it follows the design, whether tests cover the key paths, and whether
|
|
@@ -146,7 +159,8 @@ the evidence (commands + exit codes) supports the claims; re-run what you can
|
|
|
146
159
|
without mutating; sort findings into Critical (must fix), Concern, Suggestion;
|
|
147
160
|
verdict: make the LAST line of your output exactly `VERDICT: PASS` or
|
|
148
161
|
`VERDICT: FAIL` — one plain-text line (no `**`, backticks or `#` around it),
|
|
149
|
-
findings above it. FAIL needs at least one Critical or a CONDITIONS list;
|
|
162
|
+
findings above it. FAIL needs at least one Critical or a CONDITIONS list; a
|
|
163
|
+
DEFERRED item (E6) is neither, so it never makes the verdict FAIL;
|
|
150
164
|
there is no conditional pass (CONDITIONAL, APPROVE, REJECT and SKIP are not
|
|
151
165
|
verdicts); never quote another VERDICT line in your message; no verdict line
|
|
152
166
|
= FAIL (human gate). If you are the seat that created the work, say so and
|
|
@@ -207,6 +221,7 @@ Rules cite the acceptance-program findings that motivated them.
|
|
|
207
221
|
| E3 | garden#1223 (companion to wicked-core#760) |
|
|
208
222
|
| E4 | garden#1253 (S19a: `before:1` vs the form's `before:2`, passed on presence) |
|
|
209
223
|
| E5 | operator ruling 2026-10-12 (wicked-core POL-2101) |
|
|
224
|
+
| E6 | operator-approved fix, 2026-10-19 (runs 290a7fee and a74f51ac: reviews FAILed "CI green on every OS" and "PR body says Closes #N", which cannot exist before the deliver phase) |
|
|
210
225
|
| N1 | F-RC2-038 |
|
|
211
226
|
|
|
212
227
|
History: the `crew-implementer`, `crew-reviewer` and `crew-researcher` fork-agent definitions
|