create-claude-cabinet 0.46.0 → 0.47.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/README.md +2 -6
- package/lib/cli.js +348 -91
- package/lib/copy.js +108 -6
- package/lib/db-setup.js +122 -17
- package/lib/metadata.js +51 -2
- package/lib/settings-merge.js +52 -10
- package/lib/watchtower-setup.js +22 -2
- package/package.json +1 -1
- package/templates/cabinet/advisories-state-schema.md +1 -1
- package/templates/cabinet/checklist-stats-schema.md +15 -1
- package/templates/cabinet/memory-lifecycle-contract.md +135 -0
- package/templates/cabinet/pib-db-access.md +13 -0
- package/templates/cabinet/watchtower-contracts.md +414 -0
- package/templates/cabinet/worktree-invocation-contract.md +87 -0
- package/templates/engagement/OVERVIEW.md +12 -0
- package/templates/engagement/__tests__/engagement.test.mjs +177 -2
- package/templates/engagement/__tests__/invoice-doc.test.mjs +195 -0
- package/templates/engagement/engagement-preview.mjs +100 -0
- package/templates/engagement/engagement-schema.md +240 -0
- package/templates/engagement/engagement.mjs +391 -11
- package/templates/engagement/pib-db-patches/pib-db-mcp-server.mjs +5 -44
- package/templates/engagement/pib-db-patches/pib-db.mjs +5 -2
- package/templates/hooks/action-completion-gate.sh +9 -3
- package/templates/hooks/memory-index-guard.sh +17 -11
- package/templates/hooks/watchtower-session-start.sh +24 -2
- package/templates/mcp/pib-db.json +1 -4
- package/templates/mux/bin/mux +8 -1
- package/templates/mux/config/help.txt +1 -0
- package/templates/rules/acknowledge-when-corrected.md +33 -0
- package/templates/rules/maintainability.md +11 -0
- package/templates/rules/memory-capture.md +26 -4
- package/templates/rules/plan-before-bulk-or-irreversible-actions.md +48 -0
- package/templates/rules/verify-before-asserting.md +79 -0
- package/templates/scripts/__tests__/ahead-check-origin.test.mjs +355 -0
- package/templates/scripts/__tests__/batch-disposition.test.mjs +98 -0
- package/templates/scripts/__tests__/claude-churn-authored.test.mjs +90 -0
- package/templates/scripts/__tests__/cross-ring-reader.test.mjs +505 -0
- package/templates/scripts/__tests__/dx-captures-briefing.test.mjs +169 -0
- package/templates/scripts/__tests__/hook-runner.test.mjs +247 -0
- package/templates/scripts/__tests__/narrative-corpus.test.mjs +247 -0
- package/templates/scripts/__tests__/phase-shim.test.mjs +112 -0
- package/templates/scripts/__tests__/qa-handoff-merge-state.test.mjs +162 -0
- package/templates/scripts/__tests__/resolve-cli.test.mjs +314 -0
- package/templates/scripts/__tests__/ring-state-ownership.test.mjs +120 -0
- package/templates/scripts/__tests__/ring1-content-detector.test.mjs +168 -0
- package/templates/scripts/__tests__/ring1-flagged-actions.test.mjs +135 -0
- package/templates/scripts/__tests__/ring1-script-drift.test.mjs +126 -0
- package/templates/scripts/__tests__/ring2-queue-reader.test.mjs +80 -0
- package/templates/scripts/__tests__/ring2-recall-canary.test.mjs +150 -0
- package/templates/scripts/__tests__/ring2-roster-review.test.mjs +311 -0
- package/templates/scripts/__tests__/ring3-chunk-merge.test.mjs +122 -0
- package/templates/scripts/__tests__/ring3-close-lenses.test.mjs +359 -0
- package/templates/scripts/__tests__/ring3-dedup.test.mjs +92 -12
- package/templates/scripts/__tests__/ring3-memory-titles.test.mjs +187 -0
- package/templates/scripts/__tests__/ring3-novelty-rescue.test.mjs +148 -0
- package/templates/scripts/__tests__/ring3-recent-slice.test.mjs +101 -0
- package/templates/scripts/__tests__/ring4-reconcile.test.mjs +393 -0
- package/templates/scripts/__tests__/shared-thread-reader.test.mjs +187 -0
- package/templates/scripts/__tests__/suppression-ledger.test.mjs +148 -0
- package/templates/scripts/__tests__/verify-backfill.test.mjs +103 -0
- package/templates/scripts/__tests__/verify-coverage.test.mjs +80 -0
- package/templates/scripts/__tests__/watchtower-snapshot.test.mjs +261 -0
- package/templates/scripts/__tests__/watchtower-sync.test.mjs +311 -0
- package/templates/scripts/load-triage-history.js +5 -2
- package/templates/scripts/pib-db-mcp-server.mjs +5 -44
- package/templates/scripts/pib-db-path.mjs +61 -0
- package/templates/scripts/pib-db.mjs +5 -2
- package/templates/scripts/validate-memory.mjs +214 -16
- package/templates/scripts/watchtower-advisories.mjs +7 -3
- package/templates/scripts/watchtower-build-context.mjs +192 -8
- package/templates/scripts/watchtower-cross-ring-reader.mjs +700 -0
- package/templates/scripts/watchtower-hook-runner.mjs +422 -0
- package/templates/scripts/watchtower-lib.mjs +273 -4
- package/templates/scripts/watchtower-narrative-corpus.mjs +385 -0
- package/templates/scripts/watchtower-phase-shim.mjs +171 -0
- package/templates/scripts/watchtower-queue.mjs +341 -3
- package/templates/scripts/watchtower-ring1.mjs +405 -45
- package/templates/scripts/watchtower-ring2.mjs +710 -68
- package/templates/scripts/watchtower-ring3-close.mjs +988 -147
- package/templates/scripts/watchtower-ring4-runner.sh +85 -0
- package/templates/scripts/watchtower-ring4.mjs +753 -0
- package/templates/scripts/watchtower-routines.mjs +1 -1
- package/templates/scripts/watchtower-snapshot.mjs +452 -0
- package/templates/scripts/watchtower-sync.mjs +393 -0
- package/templates/skills/briefing/SKILL.md +281 -41
- package/templates/skills/cabinet-process-therapist/SKILL.md +28 -0
- package/templates/skills/cabinet-security/SKILL.md +11 -0
- package/templates/skills/catch-up/SKILL.md +113 -0
- package/templates/skills/cc-publish/SKILL.md +53 -16
- package/templates/skills/cc-remember/SKILL.md +45 -0
- package/templates/skills/close/SKILL.md +107 -0
- package/templates/skills/collab-client/SKILL.md +22 -5
- package/templates/skills/collab-consultant/SKILL.md +110 -2
- package/templates/skills/debrief/SKILL.md +21 -4
- package/templates/skills/debrief-classic/SKILL.md +696 -0
- package/templates/skills/debrief-classic/calibration.md +44 -0
- package/templates/skills/debrief-classic/phases/audit-pattern-capture.md +78 -0
- package/templates/skills/debrief-classic/phases/auto-maintenance.md +48 -0
- package/templates/skills/debrief-classic/phases/checklist-feedback.md +123 -0
- package/templates/skills/debrief-classic/phases/close-work.md +163 -0
- package/templates/skills/debrief-classic/phases/health-checks.md +54 -0
- package/templates/skills/debrief-classic/phases/inventory.md +40 -0
- package/templates/skills/debrief-classic/phases/loose-ends.md +52 -0
- package/templates/skills/debrief-classic/phases/methodology-capture.md +223 -0
- package/templates/skills/debrief-classic/phases/qa-handoff-sweep.md +78 -0
- package/templates/skills/debrief-classic/phases/record-lessons.md +177 -0
- package/templates/skills/debrief-classic/phases/report.md +59 -0
- package/templates/skills/debrief-classic/phases/update-state.md +48 -0
- package/templates/skills/debrief-classic/phases/upstream-feedback.md +185 -0
- package/templates/skills/debrief-classic/phases/verify-coverage.md +101 -0
- package/templates/skills/execute/SKILL.md +71 -6
- package/templates/skills/execute/phases/commit-and-deploy.md +8 -0
- package/templates/skills/execute-group/SKILL.md +23 -26
- package/templates/skills/generate-plan-groups/SKILL.md +20 -0
- package/templates/skills/inbox/SKILL.md +84 -28
- package/templates/skills/memory/SKILL.md +22 -6
- package/templates/skills/orient/SKILL.md +71 -5
- package/templates/skills/orient-classic/SKILL.md +770 -0
- package/templates/skills/orient-classic/phases/auto-maintenance.md +52 -0
- package/templates/skills/orient-classic/phases/briefing.md +53 -0
- package/templates/skills/orient-classic/phases/cabinet.md +46 -0
- package/templates/skills/orient-classic/phases/checklist-status.md +54 -0
- package/templates/skills/orient-classic/phases/context.md +88 -0
- package/templates/skills/orient-classic/phases/data-sync.md +35 -0
- package/templates/skills/orient-classic/phases/deferred-check.md +55 -0
- package/templates/skills/orient-classic/phases/dx-captures.md +53 -0
- package/templates/skills/orient-classic/phases/health-checks.md +50 -0
- package/templates/skills/orient-classic/phases/verify-backfill.md +109 -0
- package/templates/skills/orient-classic/phases/work-scan.md +69 -0
- package/templates/skills/qa-drain/SKILL.md +38 -0
- package/templates/skills/qa-handoff/SKILL.md +287 -46
- package/templates/skills/setup-accounts/SKILL.md +38 -16
- package/templates/skills/threads/SKILL.md +4 -0
- package/templates/skills/validate/phases/validators.md +41 -0
- package/templates/skills/watchtower/SKILL.md +160 -8
- package/templates/verify-runtime/CONVENTIONS.md +9 -0
- package/templates/verify-runtime/README.md +37 -0
- package/templates/watchtower/config.json.template +8 -2
- package/templates/workflows/execute-group-complete.js +10 -1
|
@@ -40,8 +40,18 @@ PROJECT_PATH="$(pwd)"
|
|
|
40
40
|
# and silence the watchdog while appearing configured)
|
|
41
41
|
FRONTIER_WARNING=""
|
|
42
42
|
SESSION_MODEL=""
|
|
43
|
+
SESSION_ID=""
|
|
43
44
|
if [ -n "${PAYLOAD}" ]; then
|
|
44
45
|
SESSION_MODEL=$(printf '%s' "${PAYLOAD}" | jq -r '.model // empty' 2>/dev/null)
|
|
46
|
+
# Session id from the stdin payload — the documented CC hook contract used by
|
|
47
|
+
# every other watchtower hook (session-end, telemetry). NOT $CLAUDE_SESSION_ID
|
|
48
|
+
# (which CC does not set here). Keys the mid-session baseline snapshot below.
|
|
49
|
+
SESSION_ID=$(printf '%s' "${PAYLOAD}" | jq -r '.session_id // empty' 2>/dev/null)
|
|
50
|
+
# Defense-in-depth: the id is used as a filename component below. CC emits a
|
|
51
|
+
# UUID, but reject anything carrying a path separator or dot-dir so a
|
|
52
|
+
# malformed id can never escape state/session-snapshots/ (then it's treated
|
|
53
|
+
# as "no session id" and capture is skipped, never written under a bad path).
|
|
54
|
+
case "${SESSION_ID}" in */*|..|.) SESSION_ID="" ;; esac
|
|
45
55
|
fi
|
|
46
56
|
REGISTRY="${HOME}/.claude/cc-registry.json"
|
|
47
57
|
FRONTIER_KEY=""
|
|
@@ -87,6 +97,20 @@ CONTEXT=""
|
|
|
87
97
|
if [ -f "${WATCHTOWER_DIR}/config.json" ]; then
|
|
88
98
|
# Build context. Suppress stderr to avoid noise on missing files.
|
|
89
99
|
CONTEXT=$(node "${WATCHTOWER_DIR}/scripts/watchtower-build-context.mjs" --project-path "${PROJECT_PATH}" 2>/dev/null)
|
|
100
|
+
|
|
101
|
+
# Capture this session's mid-session-polling baseline (for /catch-up). A
|
|
102
|
+
# SEPARATE, guarded best-effort invocation — it can never alter or block the
|
|
103
|
+
# injection above (the additive contract: the injected context is unchanged).
|
|
104
|
+
# Skipped entirely when no session id is available, so we never write a
|
|
105
|
+
# shared/keyless snapshot that a later session would mistake for its own
|
|
106
|
+
# baseline. The module prunes snapshots >7d on each write, so the dir stays
|
|
107
|
+
# bounded.
|
|
108
|
+
if [ -n "${SESSION_ID}" ] && [ -f "${WATCHTOWER_DIR}/scripts/watchtower-snapshot.mjs" ]; then
|
|
109
|
+
node "${WATCHTOWER_DIR}/scripts/watchtower-snapshot.mjs" \
|
|
110
|
+
--emit-snapshot "${WATCHTOWER_DIR}/state/session-snapshots/${SESSION_ID}.json" \
|
|
111
|
+
--project-path "${PROJECT_PATH}" \
|
|
112
|
+
--session-id "${SESSION_ID}" >/dev/null 2>&1 || true
|
|
113
|
+
fi
|
|
90
114
|
fi
|
|
91
115
|
|
|
92
116
|
if [ -n "${FRONTIER_WARNING}" ]; then
|
|
@@ -104,8 +128,6 @@ if [ -z "${CONTEXT}" ]; then
|
|
|
104
128
|
exit 0
|
|
105
129
|
fi
|
|
106
130
|
|
|
107
|
-
SESSION_ID="${CLAUDE_SESSION_ID:-unknown}"
|
|
108
|
-
|
|
109
131
|
cat <<HOOKEOF
|
|
110
132
|
{
|
|
111
133
|
"hookSpecificOutput": {
|
package/templates/mux/bin/mux
CHANGED
|
@@ -1664,6 +1664,13 @@ cmd_handoff() {
|
|
|
1664
1664
|
[[ -n "$prompt" ]] || die "mux handoff: descriptor missing 'seed_prompt'"
|
|
1665
1665
|
[[ -n "$name" ]] || name="next-session"
|
|
1666
1666
|
|
|
1667
|
+
# The worktree path and git branch are built from this name; spaces or
|
|
1668
|
+
# other non-slug chars in the descriptor's 'name' break `git branch` /
|
|
1669
|
+
# `git worktree add` and abort the handoff. Slugify for branch/path use;
|
|
1670
|
+
# keep $name as the human-readable window label. (act:573f38e1)
|
|
1671
|
+
local name_slug; name_slug=$(slugify "$name")
|
|
1672
|
+
[[ -n "$name_slug" ]] || name_slug="next-session"
|
|
1673
|
+
|
|
1667
1674
|
# `project` should be the mux DESK (tmux session). Desk short-names often
|
|
1668
1675
|
# differ from the repo dir name, so if it isn't a live session but the
|
|
1669
1676
|
# descriptor's project_path matches a desk's MUX_PROJECT_PATH, remap to that
|
|
@@ -1696,7 +1703,7 @@ cmd_handoff() {
|
|
|
1696
1703
|
# window 1, consistent with "QA drains belong to window 1".
|
|
1697
1704
|
local win_path where skip_reason
|
|
1698
1705
|
if skip_reason=$(worktree_isolation_capable "$project"); then
|
|
1699
|
-
win_path=$(create_worktree "$project" "$
|
|
1706
|
+
win_path=$(create_worktree "$project" "$name_slug") \
|
|
1700
1707
|
|| die "mux handoff: couldn't create a worktree for '${name}' — refusing to seed a second session onto the main checkout. Seed is saved; try: mux worktree ls"
|
|
1701
1708
|
where="a fresh worktree of ${project}"
|
|
1702
1709
|
else
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Acknowledge When Corrected
|
|
2
|
+
|
|
3
|
+
When the user points out that something is wrong — a precondition you
|
|
4
|
+
skipped, a fact you got wrong, a step you missed — acknowledge it
|
|
5
|
+
plainly and ask what they want, before anything else. Do not reach for a
|
|
6
|
+
rationalization that explains why the mistake was reasonable.
|
|
7
|
+
|
|
8
|
+
The instinct under correction is to defend: to narrate the chain of
|
|
9
|
+
reasoning that made the error understandable. That instinct is almost
|
|
10
|
+
always wrong here. The user already knows something is off — that is why
|
|
11
|
+
they spoke up. A defense makes them litigate your reasoning before they
|
|
12
|
+
can redirect you, which is slower and more frustrating than a clean
|
|
13
|
+
"you're right, I missed X — do you want me to do Y or Z?"
|
|
14
|
+
|
|
15
|
+
## What this looks like
|
|
16
|
+
|
|
17
|
+
- **Lead with the acknowledgment.** "You're right, I didn't check the
|
|
18
|
+
worktree first." Name the actual error, not a softened version of it.
|
|
19
|
+
- **Then ask, don't assume the fix.** A correction is a fork: surface
|
|
20
|
+
the options and let the user choose, rather than charging ahead on the
|
|
21
|
+
repair you guessed at.
|
|
22
|
+
- **Save the explanation for when it's asked for.** If the user wants to
|
|
23
|
+
know how it happened, they will ask. An unprompted post-mortem in the
|
|
24
|
+
moment of correction reads as defensiveness, not transparency.
|
|
25
|
+
|
|
26
|
+
## Why this is a rule
|
|
27
|
+
|
|
28
|
+
The rationalize-instead-of-acknowledge reflex recurs across sessions and
|
|
29
|
+
erodes trust fastest exactly when trust is already wobbling — right after
|
|
30
|
+
a mistake. It is a judgment habit, so it lives here as eager guidance:
|
|
31
|
+
the discipline is to make "you're right, here is the error, what do you
|
|
32
|
+
want" the reflex that fires before any defense of how the error made
|
|
33
|
+
sense.
|
|
@@ -39,6 +39,17 @@ the root cause is buried under layers of consequences.
|
|
|
39
39
|
or validation script. If it should happen, put it in a rule. If it's
|
|
40
40
|
nice to have, document it. See `enforcement-pipeline.md` for the
|
|
41
41
|
compliance stack.
|
|
42
|
+
- **Check the exit, not just the output.** A command that fails — `git
|
|
43
|
+
show` on a bad ref, a glob that matched nothing — can still produce an
|
|
44
|
+
empty-but-zero-looking stream that the next step consumes as if valid,
|
|
45
|
+
yielding a confident wrong result with no error signal. Verify exit
|
|
46
|
+
status or a non-empty result before piping a command's output into a
|
|
47
|
+
decision or a diff.
|
|
48
|
+
- **Resolve merge conflicts by inspection, not preference.** Clearing a
|
|
49
|
+
conflict with a blind `git checkout HEAD -- <file>` (or "keep ours")
|
|
50
|
+
silently discards whatever the other side changed. Read the diff and
|
|
51
|
+
merge intentionally; an unexamined "keep ours" is data loss disguised
|
|
52
|
+
as conflict resolution.
|
|
42
53
|
|
|
43
54
|
## Fix Upstream, Not Downstream
|
|
44
55
|
|
|
@@ -67,16 +67,38 @@ Over-capturing degrades retrieval quality. The test:
|
|
|
67
67
|
|
|
68
68
|
If yes, capture it. If it's just noise or ephemera, skip it.
|
|
69
69
|
|
|
70
|
+
## The index is a bounded working set, not a full catalogue
|
|
71
|
+
|
|
72
|
+
`MEMORY.md` loads in full at every session start, so it is a bounded
|
|
73
|
+
**working set** — a pinned tier (load-bearing constraints/identity kept
|
|
74
|
+
eagerly present regardless of age), a recency block (recent entries), and
|
|
75
|
+
**region pointers** that cover whole classes of cooled files with one
|
|
76
|
+
line each. Total memory grows without bound; only the eager working set
|
|
77
|
+
is capped. New memories enter the recency block; mark a load-bearing
|
|
78
|
+
constraint `pinned: true` so it never decays out. Full rules:
|
|
79
|
+
`cabinet/memory-lifecycle-contract.md`.
|
|
80
|
+
|
|
70
81
|
## Validation
|
|
71
82
|
|
|
72
83
|
`scripts/validate-memory.mjs` checks structural integrity:
|
|
73
84
|
- MEMORY.md within Claude Code's 200-line / 25KB session-start budget
|
|
74
|
-
- Every memory file is
|
|
75
|
-
|
|
76
|
-
-
|
|
85
|
+
- Every memory file is **reachable** from MEMORY.md — a direct index line
|
|
86
|
+
OR a region pointer whose glob matches it (reachability replaces the old
|
|
87
|
+
enumerate-every-file rule; "present on disk" alone is NOT reachable)
|
|
88
|
+
- Every directly-referenced file exists (no broken references), and every
|
|
89
|
+
region pointer's glob matches ≥1 file on disk (no stale region cues)
|
|
90
|
+
- Topic-style files (migrated from omega) and `MEMORY-archive.md` (the
|
|
91
|
+
on-demand cold tier) stay under 50KB
|
|
92
|
+
|
|
93
|
+
It also samples working-set pressure to `.memory-pressure.jsonl` (≥90% of
|
|
94
|
+
budget, once/day) — the data that gates the Stage 2 lifecycle verbs.
|
|
77
95
|
|
|
78
96
|
Wired into `/validate`. Also runs PostToolUse on memory writes via
|
|
79
|
-
`memory-index-guard.sh
|
|
97
|
+
`memory-index-guard.sh`, which fires when a just-written file is not
|
|
98
|
+
reachable from MEMORY.md. The index files themselves (MEMORY.md,
|
|
99
|
+
MEMORY-archive.md, edges.json) are exempt from the per-write
|
|
100
|
+
reachability check — they are the index, not memory entries — so
|
|
101
|
+
editing the index never trips the guard on itself (NON_MEMORY_FILES).
|
|
80
102
|
|
|
81
103
|
## Migrated topic files (read-only legacy)
|
|
82
104
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Show the Plan Before Bulk or Irreversible Actions
|
|
2
|
+
|
|
3
|
+
Before an action that is expensive to run, hard to undo, or applied to
|
|
4
|
+
many items at once, surface a complete, reviewable plan and confirm
|
|
5
|
+
scope first. The plan is the checkpoint — once the action is running,
|
|
6
|
+
the cheap moment to catch a mistake has passed.
|
|
7
|
+
|
|
8
|
+
## Front-load the disposition map
|
|
9
|
+
|
|
10
|
+
For bulk work — dispositioning a queue, migrating N files, mass edits —
|
|
11
|
+
produce one structured "here is exactly what I will do to each group,
|
|
12
|
+
before I touch anything" and show it. Do not start applying changes
|
|
13
|
+
while still discovering what the changes should be. A per-item or
|
|
14
|
+
per-group plan the user can scan and correct is worth more than progress
|
|
15
|
+
they can't see.
|
|
16
|
+
|
|
17
|
+
## Interleave analysis and execution; don't bank it all
|
|
18
|
+
|
|
19
|
+
The failure mode is front-loading every bit of analysis, then running out
|
|
20
|
+
of runway before a single change lands — lots of work, nothing done. For
|
|
21
|
+
large jobs, prefer: plan the batch, execute the batch, checkpoint, repeat.
|
|
22
|
+
Interleaving also gives the user intermediate progress to course-correct
|
|
23
|
+
against, instead of an all-or-nothing dump at the end.
|
|
24
|
+
|
|
25
|
+
## Checkpoint scope before it expands
|
|
26
|
+
|
|
27
|
+
When a focused request starts pulling in adjacent work — "while I'm here
|
|
28
|
+
I'll also touch X, Y, Z" — stop and name the expansion before doing it,
|
|
29
|
+
with a rough cost. A small question that grew into a seven-file,
|
|
30
|
+
five-repo pass without a checkpoint is scope creep even when each step
|
|
31
|
+
felt reasonable. Offer the bigger scope as a choice; don't assume it.
|
|
32
|
+
|
|
33
|
+
## Review an expensive or irreversible launch before pulling the trigger
|
|
34
|
+
|
|
35
|
+
Before launching a costly or hard-to-stop operation — a multi-agent
|
|
36
|
+
workflow, a mass mutation, a deploy — pause for a self-imposed review:
|
|
37
|
+
what could make this wrong, what's the blast radius, what's the rollback.
|
|
38
|
+
The review costs seconds; the launch can cost a lot. Don't rely on the
|
|
39
|
+
user happening to interrupt at the right moment to catch a flaw.
|
|
40
|
+
|
|
41
|
+
## Why this is a rule
|
|
42
|
+
|
|
43
|
+
The "huge analysis, zero execution" and "bulk action applied before the
|
|
44
|
+
plan was shown" failures recur across queue triage, migrations, and
|
|
45
|
+
multi-agent runs. The discipline is judgment, not a mechanical gate, so
|
|
46
|
+
it lives here as eager guidance: when an action is bulk or irreversible,
|
|
47
|
+
the plan goes in front of the user *before* the action goes to the
|
|
48
|
+
system.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Verify Before Asserting
|
|
2
|
+
|
|
3
|
+
State a conclusion as fact only after you have checked it. Until then,
|
|
4
|
+
hedge ("I think", "likely") or — better — go check, then state it. The
|
|
5
|
+
order matters: verification must precede the assertion, not follow the
|
|
6
|
+
recommendation it supported.
|
|
7
|
+
|
|
8
|
+
This is cheap insurance against the most expensive class of mistake —
|
|
9
|
+
the confident wrong answer that the user has to catch and that you then
|
|
10
|
+
have to walk back, unwinding whatever was built on top of it.
|
|
11
|
+
|
|
12
|
+
## The three cases where it costs the most
|
|
13
|
+
|
|
14
|
+
1. **Claims about code, system, or tool behavior.** "This function
|
|
15
|
+
already handles X", "that dedup checks the dismissed pile", "the
|
|
16
|
+
installer touches settings.json" — read the code or run it before
|
|
17
|
+
asserting. A plausible mental model of how something *probably* works
|
|
18
|
+
is not knowledge of how it *does* work.
|
|
19
|
+
|
|
20
|
+
2. **External or time-sensitive facts.** Prices, availability, hours,
|
|
21
|
+
addresses, version numbers, API shapes. Memory goes stale and was
|
|
22
|
+
never authoritative for these. Look them up before you build a
|
|
23
|
+
recommendation on them.
|
|
24
|
+
|
|
25
|
+
3. **Anything that gates a decision.** If a claim is a decision input —
|
|
26
|
+
"we should do A because B is true" — then confirming B is part of
|
|
27
|
+
doing the job, not a follow-up. Name your decision criteria, then
|
|
28
|
+
check the candidates against them *before* recommending, not after.
|
|
29
|
+
|
|
30
|
+
## Sub-disciplines
|
|
31
|
+
|
|
32
|
+
- **Instrument before interpreting.** When a behavioral test could fail
|
|
33
|
+
for more than one reason, make it observable first. Before concluding
|
|
34
|
+
"the feature didn't work", log whether it even fired — an ambiguous
|
|
35
|
+
negative ("wrong output") often means "ran, wrong shape", not "absent".
|
|
36
|
+
|
|
37
|
+
- **A third party's confidence is not your verification.** A subagent's
|
|
38
|
+
or document's assertion about platform behavior (an API shape, a
|
|
39
|
+
binary's contents, a version-gated feature) requires independent,
|
|
40
|
+
first-hand confirmation before it gates a build decision. Default to
|
|
41
|
+
skeptical when the source can't show its work.
|
|
42
|
+
|
|
43
|
+
- **A citation is a claim that you fetched it.** Never format a URL or
|
|
44
|
+
outlet name as a source unless you retrieved it this session, and
|
|
45
|
+
never state specifics — prices, dimensions, addresses, capacities —
|
|
46
|
+
from pattern-memory in a fact-shaped sentence. A plausible fabricated
|
|
47
|
+
citation is worse than "I haven't verified this": it launders a guess
|
|
48
|
+
into evidence. And when your recommendation shifts across a
|
|
49
|
+
conversation, name what changed and why — ten drifting answers with
|
|
50
|
+
no closed loop is the same failure, serialized.
|
|
51
|
+
|
|
52
|
+
- **Verify your own writes, not just your claims.** After you write a
|
|
53
|
+
value — a DB update, an action-note edit, a recorded decision, and
|
|
54
|
+
especially a number — read it back or quote the stored content before
|
|
55
|
+
announcing it done. A write announced from the call's success is not a
|
|
56
|
+
confirmed write; a silent gap between what was decided in conversation
|
|
57
|
+
and what actually landed is invisible until someone queries it.
|
|
58
|
+
|
|
59
|
+
- **Findings are not a coverage map.** When a search, query, or subagent
|
|
60
|
+
sweep returns results, "what it found" is not "all there is". Acting on
|
|
61
|
+
a sweep as if it were exhaustive — as if the territory it didn't
|
|
62
|
+
surface doesn't exist — is a verification gap in the *completeness*
|
|
63
|
+
dimension. Before treating returned findings as the whole picture, ask
|
|
64
|
+
what could be missing: a scope too narrow, a dimension not searched, a
|
|
65
|
+
source not read.
|
|
66
|
+
|
|
67
|
+
## The tell
|
|
68
|
+
|
|
69
|
+
If you're about to write "X is true / X already does Y" and you have not
|
|
70
|
+
looked this session — that sentence is a prompt to go look, not to send.
|
|
71
|
+
Catch yourself at the verb: "is", "does", "already handles", "won't".
|
|
72
|
+
|
|
73
|
+
## Why this is a rule
|
|
74
|
+
|
|
75
|
+
The confident-wrong-answer failure recurs across domains — code
|
|
76
|
+
behavior, external facts, and self-assessment alike (asserting how your
|
|
77
|
+
own tooling behaves before reading it). It is a judgment habit, so it
|
|
78
|
+
lives here as eager guidance rather than a hook; the discipline is to
|
|
79
|
+
make the check a reflex that fires *before* the claim leaves your hands.
|