accept
無料Accept HQ membership invites from a magic link or raw token.
日本語の概要は準備中です。原文の説明を表示しています。
Score an HQ setup across hooks, context, gates, persistence, search, security, and cost.
日本語の概要は準備中です。原文の説明を表示しています。
実行スコア 未検証
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
Audit your HQ setup and score infrastructure quality across 7 categories: hook coverage, context efficiency, quality gates, session persistence, search infrastructure, security guardrails, and cost efficiency.
Arguments: Optional flags: --verbose (show all checks), --json (output JSON instead of text)
Total score: 70 points (10 points × 7 categories). Grade: A (63-70), B (56-62), C (49-55), D (42-48), F (0-41).
| Category | Points | What it Checks |
|---|---|---|
| Hook Coverage | 10 | Derived from hq doctor --json (wiring + firing + fixture coverage) |
| Context Efficiency | 10 | CLAUDE.md conciseness + lazy loading |
| Quality Gates | 10 | typecheck/lint/test infrastructure |
| Session Persistence | 10 | thread files + checkpoint infrastructure |
| Search Coverage | 10 | qmd installation + collections freshness |
| Security Guardrails | 10 | company isolation + secret detection + policies |
| Cost Efficiency | 10 | token caps + subagent model + auto-compaction |
This category delegates to hq doctor, the single source of truth for hook
wiring and firing (US-012). It runs hq doctor --json and maps the result onto
this 10-point score; the other six categories are unaffected.
What we check (via hq doctor --json):
results array reports per-hook wiring status across Claude,
Codex, and Grok, plus the runtime probe (did hooks actually fire this session)
and fixture coverage (which hooks are exercised vs merely wired).FAIL / UNKNOWN results mark broken or unverifiable wiring; UNTESTED
marks a hook that is wired but has no fixture; WARN / NA / KNOWN-DEFECT
are informational and never fail the command.Implementation:
hq doctor --json 2>/dev/null
Then derive the 10-point score from the parsed document:
fails = number of results[] whose status is FAIL or UNKNOWN.coverage = the fixture coverage ratio tested/total (from the
hooks.fixtures.coverage result, or the UNTESTED vs total registered count).Scoring (mapped onto 10 points):
fails == 0 and coverage >= 0.8 = 10 pointsfails == 0 and coverage >= 0.5 = 8 pointsfails == 0 (any coverage) = 7 pointsfails 1-2 = 5 pointsfails 3-5 = 2 pointsfails > 5 = 0 pointsRecord the specific FAIL/UNKNOWN check ids and the coverage line as the
category's details, and surface the doctor's remediation fields as the
improvement suggestions for this category.
Graceful fallback (hq CLI absent or too old): if hq doctor --json is not
available or does not emit a document with a results array, fall back to the
legacy static check — read .claude/settings.json for the PreToolUse,
PostToolUse, PreCompact, and Stop hook categories, list .claude/hooks/, and
score: all core hooks present + 4 categories = 10; 6-7 = 7; 4-5 = 5; 1-3 = 2;
0 = 0. Note in the report that the score used the fallback path.
What we check:
Scoring:
500 lines or heavy inline content = 0 points
Implementation: wc -l .claude/CLAUDE.md, grep for pointer, reference to, load only patterns (evidence of lazy loading), check for inline content (tables, lists repeated from source docs).
What we check:
/quality-gate command exists/tdd command exists (or equivalent)Scoring:
Implementation: Check .claude/skills/quality-gate/SKILL.md, .claude/skills/tdd/SKILL.md, scan repos/ for package.json scripts.
What we check:
workspace/threads/ (count > 50)workspace/checkpoints//handoff and /checkpoint skills existScoring:
Implementation: ls workspace/threads/ | wc -l, ls workspace/checkpoints/ | wc -l, check for .claude/skills/handoff/SKILL.md + .claude/skills/checkpoint/SKILL.md, grep settings.json for auto-checkpoint-trigger.
What we check:
qmd is installedScoring:
Implementation: which qmd, qmd collection list --json, parse updated timestamps.
What we check:
warn-cross-company-settings.sh exists (company isolation)detect-secrets.sh exists (secret detection)core/policies/ directory exists with policies (company-isolation, credential-access-protocol, etc.).gitignore covers .env*, credentials.json, tokens/, and the credential-shaped files under core/settings/ (core/settings/**/*.json except pure-ralph.json, *.env, secrets/). The directory itself ships tracked defaults and must not be ignored wholecompanies/manifest.yaml existsScoring:
Implementation: Check file existence, read .gitignore, verify manifest.yaml structure.
What we check:
Scoring:
Implementation: Read .claude/settings.json, check env vars, verify command and policy files exist.
After each category check, collect:
At the end, output:
HQ INFRASTRUCTURE AUDIT REPORT
==============================
CATEGORY SCORES:
1. Hook Coverage: 8/10 ✓ (7/8 hooks present)
2. Context Efficiency: 9/10 ✓ (196 lines, good lazy loading)
3. Quality Gates: 9/10 ✓ (both commands, 5+ repos with scripts)
4. Session Persistence: 10/10 ✓ (185 threads, 42 checkpoints, all commands)
5. Search Coverage: 10/10 ✓ (qmd installed, 6 collections, index fresh)
6. Security Guardrails: 8/10 ✗ (missing one policy file)
7. Cost Efficiency: 9/10 ✓ (tokens=10000, subagent=haiku, compaction=50)
TOTAL: 63/70 (A grade)
TOP 3 IMPROVEMENTS:
1. Add missing hook: /Users/{your-name}/Documents/HQ/.claude/hooks/observe-patterns.sh (S)
2. Write security policy: /Users/{your-name}/Documents/HQ/core/policies/company-isolation-validation.md (M)
3. Add /tdd skill at .claude/skills/tdd/SKILL.md (S)
NOTES:
- Hook coverage: Missing observe-patterns.sh (needed for Stop hook)
- All other infrastructure is robust and well-maintained
{
"audit_date": "2026-03-07T23:30:00Z",
"total_score": 63,
"max_score": 70,
"grade": "A",
"categories": [
{
"name": "Hook Coverage",
"score": 8,
"passed": 7,
"total": 8,
"details": "Missing observe-patterns.sh",
"files": [
".claude/hooks/block-hq-glob.sh",
".claude/hooks/block-hq-grep.sh"
]
},
...
],
"improvements": [
{
"rank": 1,
"description": "Add missing hook",
"file": ".claude/hooks/observe-patterns.sh",
"severity": "S",
"reason": "Needed for Stop hook in settings.json"
}
]
}
When running the audit, follow this process:
High Impact (Cost Efficiency + Security):
Medium Impact (Infrastructure):
qmd collection add for new repos/knowledge basesLow Impact (Nice-to-Have):
HQ INFRASTRUCTURE AUDIT REPORT
==============================
CATEGORY SCORES:
1. Hook Coverage: 10/10 (8/8 hooks installed, settings configured)
2. Context Efficiency: 0/10 (436 lines in CLAUDE.md — target <200)
3. Quality Gates: 8/10 (2/2 commands found, gates working)
4. Session Persistence: 10/10 (1032 threads, 2/2 commands, hook active)
5. Search Coverage: 10/10 (15 collections — excellent coverage)
6. Security Guardrails: 10/10 (4/4 security checks passed)
7. Cost Efficiency: 10/10 (all cost optimizations active)
TOTAL: 58/70 (B grade)
TOP IMPROVEMENTS:
1. Compress CLAUDE.md from 436 → <200 lines
- Extract "Knowledge Bases" section to core/knowledge/public/hq-core/quick-reference.md
- Replace inline company list with pointer to companies/manifest.yaml
- Replace inline worker list with pointer to core/workers/registry.yaml (auto-generated from each worker.yaml)
Impact: Saves ~200 lines, improves context efficiency score from 0 → 10
2. Expand search collections from 15 → 20+ (if planning new repos)
- Add collections for new monorepos or knowledge bases as they're created
- Current collections are well-maintained, no action needed
Impact: Maintains A/B+ grade if new infrastructure added
3. Keep all other categories at 10/10
- Hooks, security, persistence, cost efficiency all optimized
- No changes needed — setup is excellent
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
Accept HQ membership invites from a magic link or raw token.
日本語の概要は準備中です。原文の説明を表示しています。
Capture qualifying architecture decisions as ADRs in the right HQ or repo location.
日本語の概要は準備中です。原文の説明を表示しています。
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
日本語の概要は準備中です。原文の説明を表示しています。
Find shallow modules and propose deepening refactors, ranked with file refs; never edits code. Use when code is hard to change or planning a refactor.
日本語の概要は準備中です。原文の説明を表示しています。
Generate dark ASCII banner graphics for HQ and social launch assets.
日本語の概要は準備中です。原文の説明を表示しています。
Compare approaches to best-in-class prior art, merge existing work, verify cruft removal, and recommend the most durable design before PRD work.
日本語の概要は準備中です。原文の説明を表示しています。