Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .claude/commands/vouch-propose-from-pr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
description: Distill a merged PR into vouch claim proposals
---

# /vouch-propose-from-pr

A PR is a decision: someone proposed a change, the team accepted it. The
"why" gets compressed into the merge message and forgotten. This command
preserves the why as cited claims in the KB.

Steps:

1. Parse `$ARGUMENTS` as a PR URL or `<owner>/<repo>#<num>`; default to the
most-recently-merged PR you authored.
2. Fetch the PR title, body, and the merged-commit SHA via `gh`.
3. Register the merge commit as a `kb_register_source` so subsequent claims
can cite it.
4. Read the diff. For each *behavioural* change (not formatting / renaming),
draft one `kb_propose_claim` whose text summarises the new invariant the
code now upholds, citing the source from step 3.
5. Propose at most five claims per PR. If a PR is that big, suggest the
contributor split it next time.

Do not auto-approve. The KB's review gate is intentional; this command
only fills the queue.
20 changes: 20 additions & 0 deletions .claude/commands/vouch-recall.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
description: Recall what the project's vouch KB knows about a topic
---

# /vouch-recall

Use vouch's `kb_context` MCP tool to assemble a working set of claims, sources,
and entities the KB already has on the current topic. Print them with their
ids and citations; do not write anything.

Steps:

1. Call `kb_context` with `query: "$ARGUMENTS"`.
2. List every returned claim by id + one-line text; for each, show the
source ids it cites.
3. End with a one-sentence summary of what's *missing* from the KB on this
topic — the gap the user can fill with `/vouch-propose-from-pr` or
`kb_propose_claim`.

Be terse. The KB is meant to remove ambiguity, not pad it.
27 changes: 27 additions & 0 deletions .claude/commands/vouch-resolve-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
description: Use vouch's KB to ground a fix for a GitHub issue
---

# /vouch-resolve-issue

Wire vouch's `kb_context` into an issue-resolution flow: the KB should
inform the fix, and the act of solving should propose new claims that
make the next contributor faster.

Steps:

1. Parse `$ARGUMENTS` as a GitHub issue URL or `<owner>/<repo>#<num>` shorthand.
If neither, ask for clarification.
2. `kb_context` with the issue title + body — what does the KB already know
about this area? Show the top 5 claims.
3. Read the relevant code paths.
4. Propose the smallest fix (run the project's tests first to confirm the
bug reproduces).
5. After the fix is committed, propose **at most three** new claims via
`kb_propose_claim` that capture:
* the root cause in one sentence (cited by the offending file:line),
* the chosen fix pattern (cited by the patch commit), and
* any policy/precedent established (only if novel).

Do not auto-approve. Leave the proposals in `.vouch/proposed/` for the
maintainer to review with `vouch approve` after the PR merges.
23 changes: 23 additions & 0 deletions .claude/commands/vouch-status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
description: Show the project's vouch KB at a glance
---

# /vouch-status

Run vouch's `kb_status` MCP tool and surface the result. Use this when the
user asks "what's in our KB?" or before/after a long claim-proposal flow so
they can see the proposal count tick up.

Format:

```
KB at <root>
claims: <n>
sources: <n>
entities: <n>
pending: <n> ← review queue depth
last audit: <iso8601 timestamp>
```

If `pending > 0`, suggest the user run `vouch approve <id>` (or `vouch lint`
if they want to inspect anything first). Do not propose anything yourself.
60 changes: 60 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"permissions": {
"allow": [
"mcp__vouch__kb_status",
"mcp__vouch__kb_capabilities",
"mcp__vouch__kb_search",
"mcp__vouch__kb_context",
"mcp__vouch__kb_read_claim",
"mcp__vouch__kb_read_source",
"mcp__vouch__kb_read_page",
"mcp__vouch__kb_read_entity",
"mcp__vouch__kb_read_relation",
"mcp__vouch__kb_list_claims",
"mcp__vouch__kb_list_sources",
"mcp__vouch__kb_list_pages",
"mcp__vouch__kb_list_entities",
"mcp__vouch__kb_list_relations",
"mcp__vouch__kb_list_pending"
]
},
"hooks": {
"SessionStart": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "vouch status --json || true"
},
{
"type": "command",
"command": "vouch capture banner || true"
}
]
Comment on lines +25 to +34
}
],
"PostToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "vouch capture observe || true"
}
]
}
],
"SessionEnd": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "vouch capture finalize || true"
}
]
}
]
}
}
Loading
Loading