fast-queries ยท diff
git:20260715.605c0d4 to git:20260807.71a1b14
17 added, 33 removed. Audit A to A.
---
name: fast-queries
- description: Use when diagnosing an issue, checking system health, or validating infrastructure state before starting a task
+ description: Use when diagnosing an issue, checking system health, or validating state before deeper investigation
---
- # Fast-Query Diagnostics
-
- A 10-second triage run surfaces 80% of issues that would otherwise take
- minutes of manual commands to discover. Running triage first means your
- investigation starts from known state, not assumptions about what is healthy.
-
- ## Available Scripts
-
- Run from project root. Use absolute path if calling from a different directory.
-
- | Script | Command | Duration |
- |--------|---------|----------|
- | **All systems** | `bash .claude/tools/fast-queries/run_triage.sh [domain]` | 8-15s |
- | **GitOps/K8s** | `bash .claude/tools/fast-queries/gitops/quicktriage_gitops_operator.sh [ns]` | 2-3s |
- | **Terraform** | `bash .claude/tools/fast-queries/terraform/quicktriage_terraform_architect.sh [dir]` | 3-4s |
- | **AWS** | `bash .claude/tools/fast-queries/cloud/aws/quicktriage_aws_troubleshooter.sh` | 4-5s |
- | **GCP** | `bash .claude/tools/fast-queries/cloud/gcp/quicktriage_gcp_troubleshooter.sh [project]` | 4-5s |
-
- **Domains for triage:** `all`, `gitops`, `terraform`, `cloud`, `appservices`
-
- Use domain-specific scripts when you know the area. Use `all` only for
- general status checks -- it runs every domain and takes longer.
+ # Fast Queries
- ## Exit Codes
+ Start with supplied evidence, not a fixed diagnostic script.
- | Code | Meaning | Action |
- |------|---------|--------|
- | `0` OK | All healthy | Proceed with task |
- | `1` WARNING | Warnings found | Review each; not necessarily blocking |
- | `2` ERROR | Errors found | Report to user, investigate flagged issues before continuing |
- | `3` SCRIPT_ERROR | Script failure | Check tool availability and permissions |
+ 1. Read the injected dispatch kernel (`# Your Contract`: goal, `project`,
+ your `can_read` menu). Project context is NOT preloaded.
+ 2. Pull what the goal needs from the persistent substrate: a narrowly scoped
+ `gaia context get --section <s>` (within `can_read`), then
+ `gaia context show` or `gaia context query` for wider reads.
+ 3. Run the smallest authoritative read-only CLI query for the surfaced domain.
+ Use native output/filter flags and one command per call.
+ 4. Record the query, result, and uncertainty in the contract checkpoint.
+ 5. Deep-dive only where the evidence identifies a gap or inconsistency.
- Deep-dive only on flagged issues (exit 1 or 2). Exit 0 means the
- environment is healthy -- spending time re-verifying what triage already
- confirmed wastes investigation budget on non-problems.
+ Do not invoke helpers from `.claude/`; that tree is an installed/protected
+ surface, not Gaia source. Do not treat a broad health command's exit code as
+ proof of a specific desired state. If investigation forecasts mutation, switch
+ to `investigation` and collect predictable exact T3 commands before requesting
+ consent.