verify

GitHub

用于在实时会话中自测 Citadel Hook 管道健康状态。通过执行 Write、Edit、Bash 等工具调用,检查 Telemetry 数据增长及错误日志,验证 Hooks 是否正常触发并报告 PASS/FAIL 结果。

skills/verify/SKILL.md SethGammon/Citadel

Trigger Scenarios

Hook 更新后需要快速验证 怀疑工具响应慢或质量门未触发 新项目安装 Citadel 后初始化检查

Install

npx skills add SethGammon/Citadel --skill verify -g -y
More Options

Use without installing

npx skills use SethGammon/Citadel@verify

指定 Agent (Claude Code)

npx skills add SethGammon/Citadel --skill verify -a claude-code -g -y

安装 repo 全部 skill

npx skills add SethGammon/Citadel --all -g -y

预览 repo 内 skill

npx skills add SethGammon/Citadel --list

SKILL.md

Frontmatter
{
    "name": "verify",
    "license": "MIT",
    "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.",
    "auto-trigger": false,
    "last-updated": 1774569600,
    "user-invocable": true,
    "trigger_keywords": [
        "verify",
        "verify hooks",
        "hook health",
        "self-test",
        "check hooks",
        "harness health"
    ]
}

/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:

    // 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:

HOOK HEALTH: FAIL

Failing checks:
- hook-timing.jsonl did not grow: PostToolUse hooks may not be firing
  → Verify hooks are installed: node scripts/verify-hooks.js
  → Check settings.json: cat .claude/settings.json | grep PostToolUse

- audit.jsonl did not grow: governance hook may not be firing
  → Check: node hooks_src/governance.js <<< '{}'

Edge Cases

No .planning/telemetry/ directory: Init-project may not have run. Output: "HOOK HEALTH: FAIL — .planning/telemetry/ not found. Run: node hooks_src/init-project.js"

Hooks installed but telemetry still zero: The project may have a harness.json that disables telemetry. Check features.telemetry in .claude/harness.json.

First-time run (no baseline): If the files don't exist before the test, they should be created during the test. Treat "file created" as equivalent to "grew".

What This Does NOT Test

  • Hook correctness on edge cases (use verify-hooks.js for that)
  • Full PreToolUse → tool → PostToolUse sequence isolation (use integration-test.js)
  • Skill output quality (use skill-bench.js --execute)

Quality Gates

  • All 3 telemetry checks must pass: timing grew, audit grew, no new errors
  • Temp file must be cleaned up regardless of pass/fail outcome
  • Report must include exact counts (+N lines), not just PASS/FAIL
  • If .planning/telemetry/ does not exist, FAIL immediately — do not fabricate counts

Contextual Gates

Disclosure: Creates and deletes .planning/verify-temp.ts during the test. No other files modified. Reversibility: green — temp file deleted on completion; no persistent changes. Trust gates: Any — no restrictions.

Exit Protocol

---HANDOFF---
- Hook pipeline: PASS / FAIL
- hook-timing.jsonl: +N lines
- audit.jsonl: +N lines
- hook-errors.log: N new errors (0 expected)
- Reversibility: green — no persistent changes; verify-temp.ts cleaned up
- Next: if FAIL, run node scripts/verify-hooks.js for deeper diagnostics
---

Version History

  • 4bac8cd Current 2026-07-25 08:46

Same Skill Collection

skills/architect/SKILL.md
skills/archon/SKILL.md
skills/ascii-diagram/SKILL.md
skills/autopilot/SKILL.md
skills/cost/SKILL.md
skills/create-app/SKILL.md
skills/create-skill/SKILL.md
skills/daemon/SKILL.md
skills/dashboard/SKILL.md
skills/decision-map/SKILL.md
skills/deploy-steward/SKILL.md
skills/design/SKILL.md
skills/do/SKILL.md
skills/doc-gen/SKILL.md
skills/evolve/SKILL.md
skills/experiment/SKILL.md
skills/fleet/SKILL.md
skills/grill/SKILL.md
skills/houseclean/SKILL.md
skills/improve/SKILL.md
skills/infra-audit/SKILL.md
skills/learn/SKILL.md
skills/live-preview/SKILL.md
skills/loop/SKILL.md
skills/map/SKILL.md
skills/marshal/SKILL.md
skills/merge-review/SKILL.md
skills/organize/SKILL.md
skills/postmortem/SKILL.md
skills/pr-watch/SKILL.md
skills/prd/SKILL.md
skills/qa/SKILL.md
skills/refactor/SKILL.md
skills/research-fleet/SKILL.md
skills/research/SKILL.md
skills/review/SKILL.md
skills/scaffold/SKILL.md
skills/schedule/SKILL.md
skills/session-handoff/SKILL.md
skills/setup/SKILL.md
skills/systematic-debugging/SKILL.md
skills/telemetry/SKILL.md
skills/test-gen/SKILL.md
skills/triage/SKILL.md
skills/unharness/SKILL.md
skills/watch/SKILL.md
skills/wiki/SKILL.md
skills/workspace/SKILL.md
scripts/fixtures/ecosystem/anthropics-template-skill/SKILL.md

Metadata

Files
0
Version
d33c70c
Hash
dd52b53b
Indexed
2026-07-25 08:46

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 07:47
浙ICP备14020137号-1 $Гость$