vouchington-tooling 0.40.0 → 0.42.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.
Files changed (52) hide show
  1. package/README.md +9 -7
  2. package/bin/policy-runner.mjs +26 -0
  3. package/dist/agent-blackboard/feedback-codec.d.mts +1 -0
  4. package/dist/agent-blackboard/feedback-codec.mjs +1 -1
  5. package/dist/cli/usage.d.mts +1 -1
  6. package/dist/cli/usage.mjs +3 -1
  7. package/dist/dependency-license-policy/audit-store.d.mts +1 -4
  8. package/dist/dependency-license-policy/audit-store.mjs +1 -16
  9. package/dist/dependency-license-policy/collect.d.mts +0 -1
  10. package/dist/dependency-license-policy/collect.mjs +2 -2
  11. package/dist/mcp-server/context.d.mts +11 -2
  12. package/dist/mcp-server/context.mjs +14 -1
  13. package/dist/mcp-server/dispatch.d.mts +3 -0
  14. package/dist/mcp-server/dispatch.mjs +5 -0
  15. package/dist/mcp-server/handlers-journal.d.mts +14 -1
  16. package/dist/mcp-server/handlers-journal.mjs +14 -9
  17. package/dist/mcp-server/handlers-retrospective.d.mts +12 -0
  18. package/dist/mcp-server/handlers-retrospective.mjs +154 -0
  19. package/dist/mcp-server/harness.test-helpers.d.mts +2 -0
  20. package/dist/mcp-server/harness.test-helpers.mjs +1 -0
  21. package/dist/mcp-server/journal-read.d.mts +9 -0
  22. package/dist/mcp-server/journal-read.mjs +33 -0
  23. package/dist/mcp-server/policy-config.d.mts +6 -0
  24. package/dist/mcp-server/policy-config.mjs +60 -0
  25. package/dist/mcp-server/policy-run.d.mts +40 -0
  26. package/dist/mcp-server/policy-run.mjs +116 -0
  27. package/dist/mcp-server/policy-spawn.d.mts +24 -0
  28. package/dist/mcp-server/policy-spawn.mjs +97 -0
  29. package/dist/mcp-server/retrospective-facts-input.d.mts +6 -0
  30. package/dist/mcp-server/retrospective-facts-input.mjs +25 -0
  31. package/dist/mcp-server/retrospective-front-matter.d.mts +22 -0
  32. package/dist/mcp-server/retrospective-front-matter.mjs +88 -0
  33. package/dist/mcp-server/retrospective-input.d.mts +29 -0
  34. package/dist/mcp-server/retrospective-input.mjs +145 -0
  35. package/dist/mcp-server/retrospective-resolve.d.mts +15 -0
  36. package/dist/mcp-server/retrospective-resolve.mjs +41 -0
  37. package/dist/mcp-server/tools-retrospective.d.mts +2 -0
  38. package/dist/mcp-server/tools-retrospective.mjs +48 -0
  39. package/dist/mcp-server/tools-schema.d.mts +54 -0
  40. package/dist/mcp-server/tools-schema.mjs +70 -0
  41. package/dist/mcp-server/tools.d.mts +1 -18
  42. package/dist/mcp-server/tools.mjs +4 -70
  43. package/dist/mcp-server/worktree.d.mts +11 -4
  44. package/dist/mcp-server/worktree.mjs +31 -6
  45. package/dist/pg-schema-snapshot/generated-arbiter-facts.d.mts +1 -1
  46. package/docs/mcp-server.md +94 -18
  47. package/package.json +2 -2
  48. package/skills/blackboard/SKILL.md +28 -14
  49. package/skills/manifest.json +4 -4
  50. package/skills/postgres-node-performance-tuning/SKILL.md +2 -0
  51. package/skills/postgres-node-performance-tuning/references/performance-patterns.md +23 -0
  52. package/skills/retrospective/SKILL.md +5 -2
@@ -38,18 +38,36 @@ Every call may take `worktree`, the absolute path of a worktree of the current r
38
38
  launch worktree by default). Writing or retrying an entry needs no provider skill, temporary file,
39
39
  `--file` flag, or replay command.
40
40
  Search for `journal_append` (by bare name, so every prefix matches) before concluding the server is
41
- unavailable; a deferred harness lists the tool only on request. If the search finds no such tool
42
- because the server is not registered or not connected, use the supported CLI fallback below.
43
- Tell the human that MCP is unavailable and which CLI is being used. Record the fallback reason,
44
- entrypoint, affected operations, and observed delivery status in the caller's journal before
45
- continuing primary work. Do not treat a permission denial as tool unavailability or bypass a host
46
- approval requirement through the CLI. If neither path persists the note, stop and report the blocker.
41
+ unavailable; a deferred harness lists the tool only on request. A tool error is not
42
+ unavailability: act on its message and retry through MCP.
43
+
44
+ ## When the server is unavailable
45
+
46
+ MCP is the supported journaling path. If the search finds no such tool, stop journaling and tell the
47
+ human which case applies before continuing:
48
+
49
+ - Not registered: the machine's agent configuration must register it; follow the consumer's
50
+ registration and diagnosis steps.
51
+ - Registered but disconnected: reconnect it through the harness's MCP controls, or restart the
52
+ harness.
53
+ - Automated runs with no human to ask: report "journaling unavailable" in the final report.
54
+
55
+ Prefer restoring MCP over the CLI fallback below, and use the fallback only when the human asks or
56
+ MCP cannot be restored for this session. Harness sandboxes commonly withhold
57
+ `AGENT_BLACKBOARD_TOKEN` from shell commands, so the fallback usually cannot deliver there. Never
58
+ request an unsandboxed run only to obtain the token. When the fallback is used, record its reason,
59
+ entrypoint, affected operations, and observed delivery status in the caller's journal. Do not treat
60
+ a permission denial as tool unavailability or bypass a host approval requirement through the CLI.
61
+ If neither path persists the note, stop and report the blocker.
47
62
 
48
63
  ## CLI fallback
49
64
 
65
+ Deprecated and being phased out: the MCP tools replace it, and retrospective and PR writers are
66
+ moving to MCP tools as well.
67
+
50
68
  Use a trusted machine-installed `vouchington` executable at a verified absolute path outside the
51
69
  consumer worktree. Resolve its symlinks and verify the installation's source and version before
52
- using credentials or requesting an unsandboxed run; its runtime dependencies must also belong to
70
+ using credentials; its runtime dependencies must also belong to
53
71
  that trusted installation. The CLI resolves its client relative to its own installation; installing
54
72
  `agent-blackboard` only in the consumer worktree is insufficient for CLI fallback. Do not resolve the executable through the consumer's `node_modules/.bin`,
55
73
  `pnpm exec`, or repository-controlled `PATH`. Set `BLACKBOARD_CLI` below to that verified absolute
@@ -93,13 +111,9 @@ explicit coverage sources when assessed. Omit `--timestamp` so the writer owns t
93
111
  mode omits `--outbox-directory` and still requires fresh online admission plus readback.
94
112
  For session-only or snapshot operations not exposed by this CLI, use the upstream
95
113
  `agent-blackboard` CLI under its skill's operation contract; preserve exact identities and tags.
96
- A sandboxed fallback may only write the outbox: the machine's harness sandbox can withhold
97
- `AGENT_BLACKBOARD_TOKEN`, so it cannot deliver or read back. If delivery or readback needs the
98
- credentials and the sandbox withholds them, run that one command unsandboxed through the harness's
99
- normal approval path for running one command outside the sandbox, with each such run approved
100
- individually. Never read, print, copy, or export the token
101
- to work around the sandbox. If approval is denied, leave the record pending in the outbox, report
102
- `pendingCount`, and tell the human.
114
+ A sandboxed fallback may only write the outbox: without `AGENT_BLACKBOARD_TOKEN` it cannot deliver
115
+ or read back. Leave the record pending, report `pendingCount`, and deliver it with `outbox_flush`
116
+ once MCP is restored. Never read, print, copy, or export the token to work around the sandbox.
103
117
  Return to MCP when available and journal recovery. Never silently downgrade envelope validation,
104
118
  retention, or delivery checks because the transport changed.
105
119
 
@@ -24,7 +24,7 @@
24
24
  {
25
25
  "name": "bounded-iteration",
26
26
  "plugin": "vouchington-database",
27
- "pluginVersion": "0.5.0",
27
+ "pluginVersion": "0.6.0",
28
28
  "path": "bounded-iteration/SKILL.md"
29
29
  },
30
30
  {
@@ -109,19 +109,19 @@
109
109
  {
110
110
  "name": "postgres-node-performance-tuning",
111
111
  "plugin": "vouchington-database",
112
- "pluginVersion": "0.5.0",
112
+ "pluginVersion": "0.6.0",
113
113
  "path": "postgres-node-performance-tuning/SKILL.md"
114
114
  },
115
115
  {
116
116
  "name": "postgres-partitioning-uuid-v7",
117
117
  "plugin": "vouchington-database",
118
- "pluginVersion": "0.5.0",
118
+ "pluginVersion": "0.6.0",
119
119
  "path": "postgres-partitioning-uuid-v7/SKILL.md"
120
120
  },
121
121
  {
122
122
  "name": "postgres-schema-design",
123
123
  "plugin": "vouchington-database",
124
- "pluginVersion": "0.5.0",
124
+ "pluginVersion": "0.6.0",
125
125
  "path": "postgres-schema-design/SKILL.md"
126
126
  },
127
127
  {
@@ -18,6 +18,8 @@ Measure the query plan and the workload shape before changing code.
18
18
  - Keep connection-pool usage bounded.
19
19
  - Validate a query change at representative cardinality. Watch latency, memory, lock time, and
20
20
  connection pressure together.
21
+ - Cut round trips: fold dependent reads, batch per-item lookups, and overlap independent reads; see
22
+ [round trips](references/performance-patterns.md#round-trips).
21
23
  - Read [performance patterns](references/performance-patterns.md) before changing a high-volume
22
24
  path.
23
25
 
@@ -37,3 +37,26 @@ recipient-keyed fan-out rows. Verify actual pruning with EXPLAIN.
37
37
 
38
38
  Generic `jonathanong/no-mistakes` checks include `postgres-no-offset`; inspect available rules
39
39
  and configure reviewed cross-partition exceptions rather than treating a rule as plan evidence.
40
+
41
+ ## Round trips
42
+
43
+ Sequential queries can add network round trips when the client waits between statements, and planning
44
+ can add latency when PostgreSQL does not reuse a prepared plan; count round trips per request before
45
+ tuning individual statements.
46
+
47
+ Load a parent and the viewer's relation to it in one query: join the membership row, or use a
48
+ lateral subquery, rather than reading the parent and then the relation.
49
+
50
+ `Promise.all` over statements on one transaction client is still serial, because one connection
51
+ runs one statement at a time. Merge them instead: CTEs, `UNNEST`, or one multi-row statement.
52
+
53
+ Give every per-item lookup helper a batch twin that takes an array of keys and returns a keyed
54
+ map, and call the twin from loops, `.map` callbacks, and `Promise.all` fan-outs. `no-await-in-loop`
55
+ misses a helper that queries internally and `Promise.all(items.map(helper))`; review those call
56
+ sites by hand.
57
+
58
+ Overlap independent cache and PostgreSQL reads with `Promise.all`, such as a rate-limiter check
59
+ alongside the user fetch. Serialize only true dependencies, where one result feeds the next call.
60
+
61
+ Run a symmetric check, such as "is either party blocking the other", as one query with an `OR`
62
+ or both-direction predicate, not twice with the arguments swapped.
@@ -14,7 +14,8 @@ local `AGENTS.md`, and journal guidance first.
14
14
 
15
15
  1. Read the agent's own journal oldest-first and check for an existing retrospective. Capture a
16
16
  material new observation before filing a follow-up issue. Preserve entry-level repository tags.
17
- 2. Generate routine repository and transcript facts with the approved composer. Keep exact factual
17
+ 2. Generate routine repository and transcript facts with the approved composer: pass `compose` to
18
+ the `retrospective_save` MCP tool and preview the composition with `dryRun`, never a CLI. Keep exact factual
18
19
  section markers generated, preserve unavailable counts, and never replace missing evidence with
19
20
  invented zero statistics. Do not paste raw collectors' output or manually reconstruct facts.
20
21
  3. Record work outcome, feedback coverage, and delivery independently. Success, failure,
@@ -30,7 +31,9 @@ local `AGENTS.md`, and journal guidance first.
30
31
  5. Keep the top five findings or improvements in the human prose. The bounded durable evidence can
31
32
  retain additional relevant findings; a prose limit is not permission to silently discard them.
32
33
  Separate recurring root causes from one-off noise and preserve existing issue references.
33
- 6. Save through the shared validated writer. Interactive outages use the approved bounded private
34
+ 6. Check for an existing retrospective with the `retrospective_check` MCP tool and save with
35
+ `retrospective_save`, never a CLI. A revision of changed content needs a new `sourceEventId`.
36
+ Interactive outages use the approved bounded private
34
37
  outbox with visible pending count; failed persistence blocks capture. Autonomous reporting stays
35
38
  online and never uses that outbox to authorize an attempt or completion. Report the acknowledged
36
39
  record/receipt, or the actual pending/blocked state and next replay action.