# Verify

Self-test the Citadel hook pipeline from within a live session.

- Repository: https://github.com/SethGammon/Citadel (927 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add SethGammon/Citadel --skill verify -g -a claude-code -y`
Codex: `npx skills add SethGammon/Citadel --skill verify -g -a codex -y`
Cursor: `npx skills add SethGammon/Citadel --skill verify -g -a cursor -y`
Gemini CLI: `npx skills add SethGammon/Citadel --skill verify -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add SethGammon/Citadel`

## Description

Self-test the Citadel hook pipeline from within a live session. Exercises real tool calls (Write, Edit, Bash, Read) and checks that hooks fired, telemetry accumulated, and no errors occurred. Reports HOOK HEALTH: PASS or HOOK HEALTH: FAIL with a per-hook breakdown.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# /verify, Hook Pipeline Self-Test

Use this when:
- Hooks were recently updated and you want a live sanity check
- Something feels wrong (tools seem too slow, quality-gate not firing)
- After installing Citadel in a new project

## Protocol

### Step 1: Baseline

Read the current telemetry state:
```
.planning/telemetry/hook-timing.jsonl  → count lines (baseline_timing)
.planning/telemetry/audit.jsonl        → count lines (baseline_audit)
.planning/telemetry/hook-errors.log    → size in bytes (baseline_errors)
```

If telemetry directory doesn't exist, note it (init-project may not have run).

### Step 2: Exercise hooks

Run these tool calls in sequence. Each exercises a different hook:

1. **Write** a temp file at `.planning/verify-temp.ts`:
   ```typescript
   // citadel verify probe
   export const verifyProbe = true;
   ```
   → Exercises: PreToolUse (protect-files, governance), PostToolUse (post-edit)

2. **Edit** the same file, change `true` to `false`:
   → Exercises: PreToolUse (protect-files, governance), PostToolUse (post-edit)

3. **Bash** a harmless read command: `echo "verify-probe"`
   → Exercises: PreToolUse (governance)

4. **Read** the temp file back
   → Exercises: PreToolUse (protect-files, should allow, it's not .env)

5. **Delete** the temp file: `rm .planning/verify-temp.ts` or equivalent
   → Cleanup

### Step 3: Check side effects

After all tool calls complete, read telemetry again:

| Check | Expected | Result |
|---|---|---|
| hook-timing.jsonl grew | +2 or more lines (Write + Edit post-hooks) | PASS/FAIL |
| audit.jsonl grew | +3 or more lines (Write + Edit + Bash pre-hooks) | PASS/FAIL |
| hook-errors.log unchanged | same size as baseline | PASS/FAIL |

### Step 4: Report

Output a results block:

```
=== HOOK HEALTH CHECK ===

hook-timing.jsonl:  +N lines  [PASS / FAIL]
audit.jsonl:        +N lines  [PASS / FAIL]
hook-errors.log:    no errors [PASS / FAIL, N new errors]

HOOK HEALTH: PASS
```

Or if any check fails:

The rest: https://github.com/SethGammon/Citadel/blob/HEAD/skills/verify/SKILL.md
