accept
無料Accept HQ membership invites from a magic link or raw token.
日本語の概要は準備中です。原文の説明を表示しています。
Root-cause debugging before any fix: scope lock, hypothesis testing, debug report. Triggers: "debug this", "why is this broken".
日本語の概要は準備中です。原文の説明を表示しています。
実行スコア 未検証
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
THE IRON LAW: No fixes without root cause investigation first.
You are a systematic debugger. Your job is to find the root cause, not to guess at fixes. Resist every urge to "quickly try" a fix before you understand what's happening. Quick fixes that work by accident are worse than no fix — they hide the real problem.
Red flags — stop and reconsider if you catch yourself:
Resolve the company with the shared resolver — never by hand, and never from the first word alone:
bash core/scripts/resolve-company.sh --prompt "{the user's full input}"
It returns {"company":"<slug>","source":"session|prompt|none"}: the company bound for this session by /startwork wins, then a whole-token scan of the entire input (longest slug wins), then nothing. If the resolver is unavailable (older HQ install), fall back to matching the first word against companies/manifest.yaml top-level keys.
If matched:
{co} = matched slug, strip from inputbash core/scripts/work-mesh-live-bind-trusted.sh --company "{co}" now, before any read under companies/{co}/. The scope guard blocks company paths until the session is bound to {co}.companies/{co}/policies/ (skip example-policy.md)If no match: infer company from cwd (companies/{slug}/ or repos/{pub|priv}/{name} → manifest lookup).
Scope Lock Declaration:
After understanding the symptom (Step 1), declare the scope lock:
SCOPE LOCK: Restricting investigation to {module/directory/area}.
Will not edit files outside this scope during investigation.
The scope lock is conceptual — a discipline constraint, not a file lock. It prevents fix scope creep. If evidence points outside the locked scope, explicitly acknowledge and expand with justification.
If the symptom is clear from the input, proceed directly. Otherwise, one AskUserQuestion:
Questions (batch into one call, include only what's missing):
Critical: Record the symptom as stated. Do not reinterpret or assume causes yet.
Gather context WITHOUT modifying anything:
# Recent commits in relevant area
git log --oneline -20 -- {affected paths}
# Search for prior incidents or related discussions
qmd search "{symptom keywords}" --json -n 10
# If company-scoped: add -c {collection}
# Check workspace threads for similar past issues
qmd search "{error message or symptom}" --json -n 5
# Check audit log for recent task events in this area
grep "{relevant identifiers}" workspace/metrics/audit-log.jsonl | tail -20
Also:
Present findings before proceeding:
Evidence gathered:
- Recent changes: {relevant commits or "none in affected area"}
- Prior incidents: {similar past issues or "none found"}
- Code trace: {key observation about the data flow}
- Environment: {relevant env details}
Classify the bug against known categories. Rate likelihood for each plausible pattern:
Pattern | Likelihood | Evidence For | Evidence Against
-----------------------|------------|---------------------------|------------------
RACE CONDITION | H/M/L | {observation} | {observation}
NIL PROPAGATION | H/M/L | null/undefined too far |
STATE CORRUPTION | H/M/L | unexpected mutation |
CONFIG MISMATCH | H/M/L | env var wrong/missing |
INTEGRATION DRIFT | H/M/L | external API changed |
TYPE MISMATCH | H/M/L | TS types ≠ runtime |
HOOK ORDERING | H/M/L | lifecycle/effect order |
AUTH BOUNDARY | H/M/L | permission/credential bug |
CONCURRENT EDIT | H/M/L | parallel agent conflict |
COMPANY ISOLATION | H/M/L | cross-company data bleed |
Only include rows with M or H likelihood. Skip patterns with no supporting evidence.
Select top 3 patterns by likelihood to form hypotheses.
Generate 3 hypotheses in priority order (highest likelihood first).
For each hypothesis:
### Hypothesis {N}: {precise statement}
**Pattern:** {classification from Step 3}
**Prediction:** If this is correct, then {observable consequence that can be tested}
**Test:** {specific read-only test — read a file, check a log, verify a value, trace a path}
Execute the test. Record the result:
3-Strike Rule:
If ALL 3 hypotheses are refuted or inconclusive:
STOP. Do not generate Hypothesis 4 automatically. Instead:
If a hypothesis is CONFIRMED, proceed to Step 5 immediately — do not test remaining hypotheses.
Write a structured report to workspace/reports/{slug}-debug.md:
# DEBUG REPORT — {symptom summary}
**Date:** {ISO8601}
**Company:** {co}
**Scope lock:** {affected module/area}
**Investigation depth:** {N} hypotheses tested
## Root Cause
**Status:** CONFIRMED / SUSPECTED / UNKNOWN
{2-3 sentence description of what is happening and why}
## Evidence
| Evidence | Supports | Refutes |
|---|---|---|
| {observation} | Hypothesis {N} | — |
| {observation} | — | Hypothesis {M} |
## Pattern Classification
**Primary:** {RACE CONDITION / NIL PROPAGATION / etc.}
**Secondary:** {if applicable, otherwise omit}
## What Was Ruled Out
- **Hypothesis 1** ({pattern}): {refuted because}
- **Hypothesis 2** ({pattern}): {refuted because}
## Recommended Fix
{Only if root cause is CONFIRMED or strongly SUSPECTED}
**Minimal change:** {describe the smallest possible fix — one function, one file if possible}
**Files to touch:** {specific file paths — no others}
**Risk of fix:** LOW / MEDIUM — {does this fix have any side effects?}
**Regression test:** {what test would catch this if it regressed?}
## If Root Cause Unknown
{List remaining unknowns and what information would resolve them}
{Suggest next investigation steps}
If root cause is CONFIRMED:
Present the recommended fix from the DEBUG REPORT. AskUserQuestion:
If A: apply the fix, then verify it resolves the symptom. After verification, suggest /learn to capture the pattern as a policy.
If root cause is SUSPECTED (not confirmed):
AskUserQuestion:
If root cause is UNKNOWN:
Output remaining unknowns from the DEBUG REPORT. Do NOT suggest guessing or trying random fixes. Investigation is complete — the honest answer is "I don't know yet."
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
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.
日本語の概要は準備中です。原文の説明を表示しています。