Borda/AI-Rig/plugins/codex-rig/skills/investigate/SKILL.md
investigate
Investigate code debugging and root-cause narrowing; use measurable gates before fixes.
- Source repository stars
- 25
- Declared platforms
- 1
- Static risk flags
- 1
- Last source update
- 2026-08-24
- Source checked
- 2026-08-28
Decision brief
What it does: where it fits
See the fixed recurrence and root-cause policy and reasoning-progress escalation policy for repeated-obstacle handling; record and validate reasoning-progress.json before another cycle after an escalation trigger.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Declared | Source record | Install path and trigger |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/Borda/AI-Rig --skill "plugins/codex-rig/skills/investigate"Inspect the Agent Skill "investigate" from https://github.com/Borda/AI-Rig/blob/1bb724c28af29d9037a9ad192551e9c7f83b65bf/plugins/codex-rig/skills/investigate/SKILL.md at commit 1bb724c28af29d9037a9ad192551e9c7f83b65bf. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Workflow
Run createrun.py --skill investigate per ../../shared/helper-cli-contract.md.
failing command or observed behaviorexpected behaviorlocal vs CI vs external context - 02
Input Schema
Review the “Input Schema” section in the pinned source before continuing.
Review and apply the “Input Schema” source section. - 03
01: Create run directory
Run createrun.py --skill investigate per ../../shared/helper-cli-contract.md.
Run createrun.py --skill investigate per ../../shared/helper-cli-contract.md. - 04
02: Capture symptom and reproduction context
failing command or observed behavior
failing command or observed behaviorexpected behaviorlocal vs CI vs external context - 05
03: Gather signals before forming hypotheses
Run git log --oneline -10 and python --version as separate argv commands. Write their complete outputs to /recent-commits.txt and /python-version.txt; record either collection failure rather than treating an empty file as successful evidence.
Run git log --oneline -10 and python --version as separate argv commands. Write their complete outputs to /recent-commits.txt and /python-version.txt; record either collection failure rather than treating an empty file…Inspect python PLUGINROOT/shared/collectdiff.py --help, collect working-tree scope into /baseline; record collection failure, never treat as empty diff.Add needed tool logs, CI excerpts, tracebacks, config, changed source. Absence of evidence ≠ evidence of absence.
Permission review
Static risk signals and limitations
Writes files
The documentation asks the agent to create, modify, or delete local files.
### 01: Create run directoryWrites files
The documentation asks the agent to create, modify, or delete local files.
Write `<run-directory>/symptom.md` with:Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 25 | Source | Repository attention, not individual Skill quality |
| Compatibility | 1 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- Borda/AI-Rig
- Skill path
- plugins/codex-rig/skills/investigate/SKILL.md
- Commit
- 1bb724c28af29d9037a9ad192551e9c7f83b65bf
- License
- Apache-2.0
- Collected
- 2026-08-28
- Default branch
- main
View the original SKILL.md
Investigate
See the fixed recurrence and root-cause policy and reasoning-progress escalation policy for repeated-obstacle handling; record and validate reasoning-progress.json before another cycle after an escalation trigger.
Diagnosis-first loop for unclear failures: failing tests, tracebacks, regressions, surprising runtime behavior. Produce root-cause claim with evidence, falsification, rejected alternatives before any fix. Use investigate until root cause established; then hand off to implement or code-remediate.
Input Schema
{
"symptom": "required failing command, traceback, runtime bug, CI failure, flaky behavior, or tool anomaly",
"scope": "optional path/module/tool/CI run",
"pace": "fast|full",
"done_when": "one root cause is confirmed or the remaining uncertainty is explicit"
}
Workflow
01: Create run directory
Run create_run.py --skill investigate per ../../shared/helper-cli-contract.md.
02: Capture symptom and reproduction context
Write <run-directory>/symptom.md with:
- failing command or observed behavior
- expected behavior
- local vs CI vs external context
- first known bad time or commit, if known
- whether the failure is deterministic, flaky, or unknown
03: Gather signals before forming hypotheses
Run git log --oneline -10 and python --version as separate argv commands. Write their complete outputs to <run-directory>/recent-commits.txt and <run-directory>/python-version.txt; record either collection failure rather than treating an empty file as successful evidence.
Inspect python PLUGIN_ROOT/shared/collect_diff.py --help, collect working-tree scope into <run-directory>/baseline; record collection failure, never treat as empty diff.
Add needed tool logs, CI excerpts, tracebacks, config, changed source. Absence of evidence ≠ evidence of absence.
Structural context (optional): when scope names a Python module/symbol, select one task-neutral route and probe codemap-py once: python PLUGIN_ROOT/shared/codemap_adapter.py context --category implementation --query-kind <kind> [--target <qname>] --out <run-directory>/codemap-context.json. Use skip when the failure is localized and no structural fact is unresolved, the matching single route (central, callers, blast, dependencies, test-impact, or coupling) for one unresolved fact, and standard for broad or unknown scope. Map direct, all, or production caller questions to callers; use blast only for explicitly transitive caller questions. An explicit user or tool request for structural evidence overrides skip. Per ../../shared/codemap-contract.md, absence/incompatibility is non-fatal — continue with the signals above. Persist the result once here, before hypothesis ranking; step 05 specialist probes consume <run-directory>/codemap-context.json, never a fresh query.
04: Rank hypotheses in <run-directory>/hypotheses.md
| Rank | Hypothesis | Supporting evidence | Falsification check | Status |
| --- | --- | --- | --- | --- |
Include ≥3 plausible hypotheses unless failing command + code/log directly prove root cause.
05: Orchestrate specialist probes when hypotheses split by domain
Read and apply ../../shared/specialist-orchestration.md only for multi-domain symptoms or useful parallel evidence; do not load it for a narrow deterministic failure with one obvious hypothesis.
Write <run-directory>/specialist-probes.md before fan-out: role, hypothesis, context path, expected falsification signal, mode (spawned, substituted, not_triggered).
Recommended probe routing:
qa-specialist: flaky tests, failing assertions, regression reproduction, missing edge-case evidence.cicd-steward: CI-only failure, matrix/cache/permission divergence, release workflow failures.linting-expert: ruff, mypy, pre-commit, tool version or suppression anomalies.security-auditor: only when the user expressly requests Sol or selects that role for auth, secret handling, deserialization, dependency, or permission-related failures; return its bounded read-only evidence artifact to the Terra parent/session for remediation and acceptance.data-steward: data split, leakage, augmentation, DataLoader, or reproducibility anomalies.squeezer: performance regressions, memory/OOM, throughput drops, GPU sync suspicion.scientist: metric instability, paper/method mismatch, experiment validity.web-explorer: volatile dependency or external API behavior.challenger: root-cause claim that would be damaging if wrong.
Each context pack: symptom slice, relevant logs/touched files/environment facts, exact falsification question. Specialists may request context; parent decides widening, consolidates outcomes, owns final root-cause claim.
06: Probe the top hypotheses
Use targeted probes confirming, ruling out, or narrowing one hypothesis at a time.
Each probe must have a clear outcome:
confirmedruled_outinconclusive
Persist probe commands and outputs under <run-directory>/probes/ or inline in <run-directory>/probes.md.
07: Run the anti-rationalization gate
A root-cause claim requires:
- supporting evidence from logs/code/commands
- one falsification check
- at least one rejected alternative
- explicit confidence
Low confidence: continue probing, no fix proposal.
Write <run-directory>/root-cause.md with:
EvidenceFalsificationRejected AlternativesConfidence
08: Run shared quality gates or targeted checks relevant to the failure
Inspect python PLUGIN_ROOT/shared/run_gates.py --help, run full/targeted gates needed to falsify hypotheses.
09: Decide gate result, write result.candidate.json, validate artifacts, and publish .reports/codex/investigate/<timestamp>/result.json
Follow ../../shared/helper-cli-contract.md and authoritative help. Write with INVESTIGATE_METADATA, validate as skill investigate, and promote only the validated candidate.
Fail-Fast Rules
- Missing symptom => fail.
- No evidence collected before hypotheses => fail.
- Root cause stated without falsification check => fail.
- Workaround presented as root cause => fail.
- Missing
root-cause.mdevidence, falsification, rejected alternatives, confidence => fail. - Broad multi-domain symptom without
specialist-probes.mdor an explicit single-agent rationale => fail. - Result artifact validator failure => fail.
- Result artifact missing => fail.
Quality Gates
Required checks:
review: hypothesis table, probe outcomes, rejected alternatives, andgit diff --check.artifact: shared validator confirms investigation artifacts, gate logs, and result JSON shape.
Conditional checks:
tests: failing or confirming reproduction command when available.lint,format,types: only when code/config changes are made as part of a probe.
Calibration Hooks
Update calibration when root-cause routing or workaround rejection changes:
- behavioral cases: symptom-first routing, rejected alternatives, low-confidence probe escalation, artifact validator bypass
- benchmark patterns:
investigate
Output Contract
Before writing the result candidate, follow ../../shared/final-handoff-contract.md: render and bind final-handoff.json, final.md, and final-handoff.validation.json; after both validators and promotion pass, emit final.md verbatim.
Use ../../shared/quality-gates.md.
Final chat
Final chat follows the shared frame with Next steps. Outcome: root-cause status/remediation readiness. Results: exactly Hypothesis | Evidence | Disposition | Next action, one row/hypothesis. Include probes/falsifiers; unresolved hypotheses or blocked evidence name owner.
Minimum artifact payload template: result-template.json.
Frequently asked questions
What to verify before installation and use
What does the investigate source document cover?
See the fixed recurrence and root-cause policy and reasoning-progress escalation policy for repeated-obstacle handling; record and validate reasoning-progress.json before another cycle after an escalation trigger.
How do I install investigate?
The source record exposes this install command: npx skills add https://github.com/Borda/AI-Rig --skill "plugins/codex-rig/skills/investigate". Inspect the command and pinned source before running it.
Which Agent platforms does the source record declare?
The pinned source record declares support for: codex.
Which permission-related actions were detected?
Static rules flagged write-files in the source; the page lists the matching lines and excerpts.
Alternatives
Compare before choosing
garrytan/gstack
investigate
Systematic debugging with root cause investigation. (gstack)
vasilyu1983/AI-Agents-public
qa-testing-ios
Guides iOS testing with XCTest, XCUITest, Swift Testing, simctl, and xcresult. Use when choosing destinations, controlling flakes, or parsing test artifacts for native apps.
vasilyu1983/AI-Agents-public
research-git
Scans public GitHub repos for agent skills, dev practices, and code patterns. Use when enriching skills, setting team policy, or researching a build domain.
lobu-ai/lobu
lobu
Set up new Lobu agents end to end and operate existing Lobu projects and memory: interview, scaffold, validate, authenticate, connect feeds, execute operations, and test Automations.