wicked-vault 0.2.1 → 0.3.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/README.md +11 -4
- package/bin/wicked-vault.mjs +72 -1
- package/install.mjs +33 -2
- package/package.json +1 -1
- package/skills/wicked-vault/init/SKILL.md +8 -4
- package/skills/wicked-vault/update/SKILL.md +140 -0
package/README.md
CHANGED
|
@@ -51,18 +51,24 @@ config root (Claude Code, Gemini, Copilot, Codex, Cursor, Kiro, Antigravity):
|
|
|
51
51
|
npx wicked-vault-install # detect and install everywhere
|
|
52
52
|
npx wicked-vault-install --cli=claude # one CLI only (comma-separated for several)
|
|
53
53
|
npx wicked-vault-install --path ~/.claude # a specific config root
|
|
54
|
+
npx wicked-vault-install --help # options
|
|
54
55
|
```
|
|
55
56
|
|
|
56
57
|
This mirrors the shared wicked-bus / wicked-brain installer: `$CLAUDE_CONFIG_DIR`
|
|
57
58
|
is honored, alt-config layouts are probed, and skills land as
|
|
58
|
-
`wicked-vault-{init,record-evidence,verify-evidence,analyze-evidence,cross-check-evidence}/`
|
|
59
|
+
`wicked-vault-{init,record-evidence,verify-evidence,analyze-evidence,cross-check-evidence,update}/`
|
|
59
60
|
under each CLI's `skills/`. If wicked-bus is installed, the installer also
|
|
60
61
|
registers the vault as a bus provider (see below).
|
|
61
62
|
|
|
63
|
+
**Updating:** say `wicked-vault:update` to your agent, or run
|
|
64
|
+
`npm install -g wicked-vault@latest && npx wicked-vault-install` — it compares
|
|
65
|
+
your version against npm and refreshes the skills across every CLI. Both
|
|
66
|
+
binaries support `--help`.
|
|
67
|
+
|
|
62
68
|
## CLI
|
|
63
69
|
|
|
64
70
|
```bash
|
|
65
|
-
wicked-vault init
|
|
71
|
+
wicked-vault init # optional — record / declare-contract / supersede create .wicked-vault/ automatically
|
|
66
72
|
# record: --criteria is MANDATORY (the bar this evidence claims to clear); --verifier is optional
|
|
67
73
|
wicked-vault record --scope S --phase build --claim tests-pass --kind test-run \
|
|
68
74
|
--source "npm test" --criteria "all unit tests pass (exit 0)" \
|
|
@@ -177,8 +183,9 @@ bash test/bus-integration.sh # graceful no-op + schema validity + real-bus emis
|
|
|
177
183
|
`attestation.sh` and `bus-integration.sh` are the gating proofs and run in CI
|
|
178
184
|
(`.github/workflows/ci.yml`) on ubuntu + macos, with a Windows CLI smoke.
|
|
179
185
|
|
|
180
|
-
Status: v0.
|
|
186
|
+
Status: v0.3.0 — deterministic core proven on real repos; criteria-binding +
|
|
181
187
|
independent judgment tier (ADR-0002, council 5–0) implemented and proven;
|
|
182
188
|
wicked-bus integration **proven end-to-end against a real bus** (emit → store →
|
|
183
|
-
poll), optional and fire-and-forget
|
|
189
|
+
poll), optional and fire-and-forget; `--help` on both binaries + a
|
|
190
|
+
`wicked-vault:update` skill. Not yet implemented:
|
|
184
191
|
`pr_check_status`/`http_status_eq` and the sqlite query cache.
|
package/bin/wicked-vault.mjs
CHANGED
|
@@ -33,7 +33,63 @@ function emit(obj, ok) {
|
|
|
33
33
|
process.exit(ok ? 0 : 1);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
const HELP = `wicked-vault — local-first evidence primitive
|
|
37
|
+
Record evidence with the acceptance criteria it must clear, re-derive integrity
|
|
38
|
+
deterministically, and record independent third-party judgments. Never trusts a
|
|
39
|
+
stored verdict; never lets work self-grade its own "done".
|
|
40
|
+
|
|
41
|
+
USAGE
|
|
42
|
+
wicked-vault <command> [options]
|
|
43
|
+
|
|
44
|
+
COMMANDS
|
|
45
|
+
init Create .wicked-vault/ in the current repo (optional —
|
|
46
|
+
record / declare-contract / supersede auto-create it)
|
|
47
|
+
record Capture evidence + the criteria it must clear
|
|
48
|
+
--scope S --phase P --claim C --kind K --source "<cmd|file>"
|
|
49
|
+
--criteria "<text|@file>" (--run | --artifact <file>) [--verifier "kind:arg"]
|
|
50
|
+
verify <artifact-id> Integrity tier: re-derive hashes + verifier (deterministic,
|
|
51
|
+
model-free). Exit 0 iff intact AND pass. Surfaces latest opinion.
|
|
52
|
+
inspect <artifact-id> Frozen criteria + evidence + integrity (what a judge evaluates)
|
|
53
|
+
attest <artifact-id> Record an INDEPENDENT judgment (fail-closed; evaluator != creator)
|
|
54
|
+
--opinion <pass|reject|unclear> --rationale "..." --evaluator ID
|
|
55
|
+
[--model prov/ver] [--prompt-hash H] [--sampling '<json>']
|
|
56
|
+
attestations <artifact-id> Show the append-only opinion log
|
|
57
|
+
cross-check Mechanical contract verdict; exit 0 iff PASS
|
|
58
|
+
--scope S --phase P [--integrity-only (default) | --with-attestations]
|
|
59
|
+
declare-contract Pin a contract --scope S --phase P --spec <file>
|
|
60
|
+
supersede <old-id> Append-only replacement (same flags as record)
|
|
61
|
+
list --scope S [--phase P]
|
|
62
|
+
|
|
63
|
+
GLOBAL
|
|
64
|
+
--cwd <dir> Operate on a vault rooted at <dir> (default: walk up from cwd)
|
|
65
|
+
--help, -h Show this help
|
|
66
|
+
--version, -v Print the wicked-vault version
|
|
67
|
+
|
|
68
|
+
OUTPUT JSON on stdout; exit code is the gate signal (0 = PASS / success).
|
|
69
|
+
ENV WICKED_VAULT_NO_BUS=1 Disable optional wicked-bus event emission
|
|
70
|
+
|
|
71
|
+
Skills (AI CLIs): wicked-vault:{init,record-evidence,verify-evidence,analyze-evidence,cross-check-evidence,update}
|
|
72
|
+
Install skills: npx wicked-vault-install (run with --help for options)
|
|
73
|
+
Docs: https://github.com/mikeparcewski/wicked-vault
|
|
74
|
+
`;
|
|
75
|
+
|
|
36
76
|
const [cmd, ...rest] = process.argv.slice(2);
|
|
77
|
+
|
|
78
|
+
// Help / no-command: print usage to stdout and exit 0 — before any vault or bus
|
|
79
|
+
// work, so `--help` works outside a repo and never errors.
|
|
80
|
+
if (cmd === undefined || cmd === '--help' || cmd === '-h' || cmd === 'help') {
|
|
81
|
+
process.stdout.write(HELP);
|
|
82
|
+
process.exit(0);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Version: like --help, must work outside any repo — resolved from this
|
|
86
|
+
// package's own manifest, never from a vault.
|
|
87
|
+
if (cmd === '--version' || cmd === '-v' || cmd === 'version') {
|
|
88
|
+
const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
|
|
89
|
+
process.stdout.write(pkg.version + '\n');
|
|
90
|
+
process.exit(0);
|
|
91
|
+
}
|
|
92
|
+
|
|
37
93
|
const args = parseArgs(rest);
|
|
38
94
|
const cwd = (typeof args.cwd === 'string' && args.cwd) || process.cwd();
|
|
39
95
|
|
|
@@ -48,7 +104,22 @@ try {
|
|
|
48
104
|
}
|
|
49
105
|
|
|
50
106
|
const root = findRoot(cwd, { create: cmd === 'record' || cmd === 'declare-contract' || cmd === 'supersede' });
|
|
51
|
-
if (!root)
|
|
107
|
+
if (!root) {
|
|
108
|
+
// "What evidence exists?" in a repo with no vault is a question with a
|
|
109
|
+
// truthful answer — none — not an infrastructure error.
|
|
110
|
+
if (cmd === 'list') emit([], true);
|
|
111
|
+
const notFound = {
|
|
112
|
+
error: `no .wicked-vault/ found in or above ${cwd}`,
|
|
113
|
+
code: 'VAULT_NOT_FOUND',
|
|
114
|
+
hint: 'no evidence has been recorded here — `wicked-vault record` creates the vault automatically; `wicked-vault init` is optional scaffolding',
|
|
115
|
+
};
|
|
116
|
+
// Gate consumers (wicked-loom) read `overall` from cross-check JSON:
|
|
117
|
+
// report a truthful FAIL (no evidence exists) instead of a generic error.
|
|
118
|
+
if (cmd === 'cross-check') {
|
|
119
|
+
emit({ scope: args.scope, phase: args.phase, overall: 'FAIL', ...notFound }, false);
|
|
120
|
+
}
|
|
121
|
+
emit(notFound, false);
|
|
122
|
+
}
|
|
52
123
|
|
|
53
124
|
switch (cmd) {
|
|
54
125
|
case 'record': {
|
package/install.mjs
CHANGED
|
@@ -64,10 +64,41 @@ const CLI_TARGETS = [
|
|
|
64
64
|
{ name: "antigravity", dir: join(home, ".antigravity", "skills"), platform: "antigravity" },
|
|
65
65
|
];
|
|
66
66
|
|
|
67
|
-
console.log("wicked-vault installer\n");
|
|
68
|
-
|
|
69
67
|
const args = argv.slice(2);
|
|
70
68
|
|
|
69
|
+
// Help: print usage and exit 0 before doing any detection or filesystem work.
|
|
70
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
71
|
+
process.stdout.write(`wicked-vault-install — install wicked-vault skills into your AI CLIs/IDEs
|
|
72
|
+
|
|
73
|
+
Copies the wicked-vault skills into every detected CLI config root so your
|
|
74
|
+
agent knows how to use the vault. Also registers wicked-vault as a wicked-bus
|
|
75
|
+
provider when the bus is available.
|
|
76
|
+
|
|
77
|
+
USAGE
|
|
78
|
+
npx wicked-vault-install [options]
|
|
79
|
+
|
|
80
|
+
OPTIONS
|
|
81
|
+
(no options) Detect and install into every supported CLI found
|
|
82
|
+
--cli=<name> Install into one CLI only (comma-separated for several),
|
|
83
|
+
e.g. --cli=claude or --cli=claude,cursor
|
|
84
|
+
--path=<dir> Install into a specific config root, e.g. --path=~/.claude
|
|
85
|
+
--help, -h Show this help
|
|
86
|
+
|
|
87
|
+
SUPPORTED CLIs claude, gemini, copilot, codex, cursor, kiro, antigravity
|
|
88
|
+
(\$CLAUDE_CONFIG_DIR is honored; alt-config layouts are probed)
|
|
89
|
+
|
|
90
|
+
INSTALLS (per CLI, under skills/)
|
|
91
|
+
wicked-vault-init · -record-evidence · -verify-evidence · -analyze-evidence
|
|
92
|
+
· -cross-check-evidence · -update
|
|
93
|
+
|
|
94
|
+
To update later: npm install -g wicked-vault@latest && npx wicked-vault-install
|
|
95
|
+
(or just say "wicked-vault:update" to your agent)
|
|
96
|
+
`);
|
|
97
|
+
process.exit(0);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
console.log("wicked-vault installer\n");
|
|
101
|
+
|
|
71
102
|
// Flag parser supporting both --flag=value and --flag value forms, plus
|
|
72
103
|
// narrow string-boolean coercion ("true" / "false" → booleans). The ad-hoc
|
|
73
104
|
// parser this replaces silently dropped space-separated values — same bug
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wicked-vault",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Local-first evidence primitive — record evidence with its acceptance criteria, re-derive integrity deterministically, and record independent third-party judgments. Never trusts a stored verdict, never lets work self-grade its own \"done\".",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wicked-vault:init
|
|
3
|
-
description: Initialize a wicked-vault in a repository so claims can be backed by re-derivable evidence.
|
|
3
|
+
description: Initialize a wicked-vault in a repository so claims can be backed by re-derivable evidence. OPTIONAL ceremony — record/declare-contract/supersede create the vault automatically; use init only to scaffold explicitly. A read command reporting code VAULT_NOT_FOUND means no evidence exists yet, which record (not init) fixes.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# wicked-vault:init
|
|
@@ -11,9 +11,13 @@ vault records claim-backing artifacts, hashes them tamper-evidently, and
|
|
|
11
11
|
|
|
12
12
|
## When to use
|
|
13
13
|
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
-
|
|
14
|
+
- You want the `.wicked-vault/` scaffold to exist before any evidence is
|
|
15
|
+
recorded (e.g. committing the directory layout, pre-provisioning CI).
|
|
16
|
+
- Otherwise init is **optional**: `record`, `declare-contract`, and
|
|
17
|
+
`supersede` create the vault automatically on first use.
|
|
18
|
+
- A read command failing with `code: VAULT_NOT_FOUND` means no evidence has
|
|
19
|
+
been recorded in that repo — recording evidence fixes it; bare init alone
|
|
20
|
+
does not produce evidence.
|
|
17
21
|
|
|
18
22
|
## Initialize
|
|
19
23
|
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wicked-vault:update
|
|
3
|
+
description: |
|
|
4
|
+
Check for and install wicked-vault updates. Compares the installed version
|
|
5
|
+
against the npm registry, updates the published CLI, and refreshes the skills
|
|
6
|
+
across all detected AI CLIs (Claude Code, Gemini, Copilot, Codex, Cursor,
|
|
7
|
+
Kiro, Antigravity).
|
|
8
|
+
|
|
9
|
+
Use when: "update wicked-vault", "check for vault updates", "wicked-vault update",
|
|
10
|
+
or periodically to stay current.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# wicked-vault:update
|
|
14
|
+
|
|
15
|
+
Check for and install updates to wicked-vault and its skills.
|
|
16
|
+
|
|
17
|
+
## Cross-Platform Notes
|
|
18
|
+
|
|
19
|
+
Commands work on macOS, Linux, and Windows. Prefer agent-native tools
|
|
20
|
+
(Read, Write, Grep, Glob) over shell where possible. JSON parsing uses
|
|
21
|
+
`python3 … || python …` so it runs on macOS, Linux, WSL, and Git Bash.
|
|
22
|
+
|
|
23
|
+
## When to use
|
|
24
|
+
|
|
25
|
+
- User asks to update or check for updates.
|
|
26
|
+
- After unexpected behavior that might be fixed in a newer version.
|
|
27
|
+
- Periodically (suggest checking monthly).
|
|
28
|
+
|
|
29
|
+
## Process
|
|
30
|
+
|
|
31
|
+
### Step 1 — Check the installed version
|
|
32
|
+
|
|
33
|
+
Global install:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm list -g wicked-vault --json 2>/dev/null | python3 -c "
|
|
37
|
+
import json, sys
|
|
38
|
+
try:
|
|
39
|
+
d = json.load(sys.stdin)
|
|
40
|
+
print(d.get('dependencies', {}).get('wicked-vault', {}).get('version', 'not installed'))
|
|
41
|
+
except Exception:
|
|
42
|
+
print('not installed')
|
|
43
|
+
" 2>/dev/null || npm list -g wicked-vault --json 2>/dev/null | python -c "
|
|
44
|
+
import json, sys
|
|
45
|
+
try:
|
|
46
|
+
d = json.load(sys.stdin)
|
|
47
|
+
print(d.get('dependencies', {}).get('wicked-vault', {}).get('version', 'not installed'))
|
|
48
|
+
except Exception:
|
|
49
|
+
print('not installed')
|
|
50
|
+
"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Also check a local (project-level) install:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm list wicked-vault --json 2>/dev/null
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
If neither is installed, the user may be running via `npx wicked-vault@latest`
|
|
60
|
+
(always current) — note that and skip to Step 5 to (re)install skills.
|
|
61
|
+
|
|
62
|
+
### Step 2 — Check the latest version on npm
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm view wicked-vault version 2>/dev/null
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Step 3 — Compare
|
|
69
|
+
|
|
70
|
+
- Up to date: "wicked-vault is up to date (v{version})."
|
|
71
|
+
- Update available: "wicked-vault v{new} is available (you have v{current}). Update now?"
|
|
72
|
+
|
|
73
|
+
If the user only wanted to check, stop here and report current vs. available.
|
|
74
|
+
|
|
75
|
+
### Step 4 — Update the package (if approved)
|
|
76
|
+
|
|
77
|
+
Global:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm install -g wicked-vault@latest 2>&1
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Local (project):
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm install wicked-vault@latest 2>&1
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
If `EACCES` / permission denied:
|
|
90
|
+
- macOS/Linux: `sudo npm install -g wicked-vault@latest`
|
|
91
|
+
- Windows: re-run the shell as Administrator
|
|
92
|
+
- Report the failure — do NOT silently skip.
|
|
93
|
+
|
|
94
|
+
### Step 5 — Refresh the skills in all CLIs
|
|
95
|
+
|
|
96
|
+
After updating the package, re-run the installer to copy the updated skills
|
|
97
|
+
into every detected CLI:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npx wicked-vault-install
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Or target one CLI:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
npx wicked-vault-install --cli=claude
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
(The installer is idempotent — re-running overwrites the installed skills with
|
|
110
|
+
the current version and re-registers the wicked-bus provider if the bus is
|
|
111
|
+
present.)
|
|
112
|
+
|
|
113
|
+
### Step 6 — Verify
|
|
114
|
+
|
|
115
|
+
Re-run the Step 1 version check and confirm it matches latest. Also confirm the
|
|
116
|
+
CLI runs:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
npx wicked-vault --help | head -1
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
If it still shows the old version:
|
|
123
|
+
1. `which wicked-vault` (macOS/Linux) or `where wicked-vault` (Windows).
|
|
124
|
+
2. `npm cache clean --force`.
|
|
125
|
+
3. Check whether nvm / fnm / volta is pinning a stale copy.
|
|
126
|
+
|
|
127
|
+
### Step 7 — Report
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
wicked-vault updated: v{old} → v{new}
|
|
131
|
+
Skills refreshed in {N} CLIs: {list}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Notes
|
|
135
|
+
|
|
136
|
+
- wicked-vault has **no background server** to update (unlike wicked-brain) —
|
|
137
|
+
updating is just the package + the skills.
|
|
138
|
+
- The published package is provenance-signed; `npm view wicked-vault --json`
|
|
139
|
+
shows the attestation under `dist.attestations` if you want to confirm
|
|
140
|
+
supply-chain integrity after updating.
|