griffinwork40/agent-afk/src/bundled-plugins/awa-bundled/skills/ground-state/SKILL.md
ground-state
Before starting any non-trivial implementation, dispatch a parallel pre-flight reconnaissance wave to triangulate git state, project infrastructure, and prior-session memory. Wave 4 auto-assembles a verified grounding preamble — a session-scoped artifact the orchestrator pastes verbatim into every subsequent sub-agent brief — eliminating stale-worktree reads and silent wrong-path errors before the first edit.
- Source repository stars
- 45
- Declared platforms
- 0
- Static risk flags
- 0
- Last source update
- 2026-07-28
- Source checked
- 2026-07-28
Decision brief
What it does—and where it fits
Constraint: read-only reconnaissance. Surveyors and the synthesizer MUST NOT call editfile, writefile, or any mutating bash command (no git commit, git push, git checkout, mv, rm, file redirection, package installs, etc.). Read-only tools only: readfile, grep, glob, listdirector…
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 | Not declared | No explicit evidence | Portability before use |
| 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/griffinwork40/agent-afk --skill "src/bundled-plugins/awa-bundled/skills/ground-state"Inspect the Agent Skill "ground-state" from https://github.com/griffinwork40/agent-afk/blob/803066d4f1e0cd57e983658dc670d647fcd893c9/src/bundled-plugins/awa-bundled/skills/ground-state/SKILL.md at commit 803066d4f1e0cd57e983658dc670d647fcd893c9. 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
Sub-agent contract
Constraint: read-only reconnaissance. Surveyors and the synthesizer MUST NOT call editfile, writefile, or any mutating bash command (no git commit, git push, git checkout, mv, rm, file redirection, package installs, etc.). Read-only tools only: readfile, grep, glob, listdirector…
Branch: , , upstream:Recent work: last 3 commits or stash itemsInfrastructure: CI present? package scripts? authoritative configs for this task - 02
Wave 4 — Brief Anchor (auto-runs after synthesis)
After the 6-line snapshot is assembled, run a fourth step inline (no additional sub-agent dispatch required): construct the Brief Anchor — a path-verified grounding preamble the orchestrator pastes verbatim into every subsequent sub-agent brief.
From the state surveyor output, extract the verified cwd (absolute path from pwd), branch (from git symbolic-ref --short HEAD), and HEAD SHA (from git rev-parse HEAD).From the infrastructure surveyor output, extract the 2–4 canonical file paths most relevant to the task (primary config file, main entry point, test root, etc.). For each, run stat — include the path only if stat exits…Assemble the preamble block: - 03
Orchestrator grounding — read this first
4. Append to the snapshot output under the heading Brief Anchor so the orchestrator can copy it directly.
cwd:branch:HEAD:
Permission review
Static risk signals and limitations
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 79/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 45 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 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
- griffinwork40/agent-afk
- Skill path
- src/bundled-plugins/awa-bundled/skills/ground-state/SKILL.md
- Commit
- 803066d4f1e0cd57e983658dc670d647fcd893c9
- License
- Apache-2.0
- Collected
- 2026-07-28
- Default branch
- main
View the original SKILL.md
Sub-agent contract
/contract
Constraint: read-only reconnaissance. Surveyors and the synthesizer MUST NOT call edit_file, write_file, or any mutating bash command (no git commit, git push, git checkout, mv, rm, file redirection, package installs, etc.). Read-only tools only: read_file, grep, glob, list_directory, and read-only bash (git status, git log, git diff, cat, ls, find, etc.).
If the survey reveals a fix that's tempting to apply, return it as a recommendation in the snapshot — the orchestrator decides whether to act. Even if the invoking brief sounds prescriptive ("draft the edit", "apply the change"), this skill stops at the snapshot and the preamble artifact. The orchestrator dispatches a separate implementation step afterward.
Before any multi-step implementation (not single-file fixes, not pure Q&A), dispatch three parallel reconnaissance sub-agents, each with a narrow target. Adapt the first two surveyors to the domain:
State surveyor (domain-aware)
| Domain | What to survey |
|---|---|
software | Current branch, git log --oneline -5, git status -s, diff-summary vs origin/<default-branch>, stash list. Flag: diverged, uncommitted changes, stale upstream. |
research | Bibliography state (how many papers collected, citation manager in use), data pipeline status (raw data present? processed?), draft status (outline? partial draft? submitted?), publication target and deadline if known. |
design | Design system state (component library version, Figma project structure), brand guidelines version, current design phase (research? wireframes? high-fidelity? handoff?), recent design changes. |
business | Financial data freshness (last updated dates on models/reports), market data recency, stakeholder map (who's involved, who decides), current phase (research? proposal? execution?). |
| (other) | Scan for version-controlled artifacts, recent changes, current project phase, and any state that could cause conflicts. |
Infrastructure surveyor (domain-aware)
| Domain | What to scan |
|---|---|
software | CI configs (.github/workflows/, .gitlab-ci.yml, Jenkinsfile), package scripts (package.json, Makefile, pyproject.toml), existing linters/formatters, authoritative config file locations relevant to the task. Return 5-bullet inventory. |
research | Reference manager (Zotero, Mendeley, .bib files), LaTeX setup (template, build system), data analysis tools (Jupyter, R, Python scripts), collaboration tools (Overleaf, shared drives), submission system requirements. Return 5-bullet inventory. |
design | Design tools (Figma, Sketch, Adobe), prototyping tools (Framer, Principle), handoff tools (Zeplin, Storybook), asset pipeline (export scripts, optimization), accessibility testing tools. Return 5-bullet inventory. |
business | Modeling tools (Excel, Google Sheets, financial software), presentation tools (PowerPoint, Google Slides, Pitch), data sources (CRM, analytics platforms), collaboration tools (Notion, Confluence), approval workflows. Return 5-bullet inventory. |
| (other) | Scan for tooling, build/export pipelines, collaboration infrastructure, and config files relevant to the stated domain. Return 5-bullet inventory. |
When domain is unspecified, infer from the working directory contents.
Memory surveyor
Grep the user's auto-memory store (~/.claude/projects/-<cwd-slug>/memory/) + any project CLAUDE.md for keywords from the user's current request. Return relevant memory file pointers with 1-line summaries, or "no relevant memory found."
Synthesize into a 6-line ground-truth snapshot:
- Branch:
<current>,<clean|diverged>, upstream:<fresh|stale> - Recent work: last 3 commits or stash items
- Infrastructure: CI present? package scripts? authoritative configs for this task
- Memory hits: file refs or "none"
- Implementation risks: e.g. "branch is
main, don't edit directly"; "CI runs on push"; "memory says prior attempt used approach X" - Epistemic confidence:
<high|medium|low>— based on how much state could be verified. Flag if working directory is sparse, if domain is unfamiliar, or if key artifacts may be missing.
Surface the snapshot and stop. The orchestrator then uses these verified facts — not assumptions — to decide the next step. This skill never edits files.
Wave 4 — Brief Anchor (auto-runs after synthesis)
After the 6-line snapshot is assembled, run a fourth step inline (no additional sub-agent dispatch required): construct the Brief Anchor — a path-verified grounding preamble the orchestrator pastes verbatim into every subsequent sub-agent brief.
Construction procedure:
- From the state surveyor output, extract the verified
cwd(absolute path frompwd),branch(fromgit symbolic-ref --short HEAD), andHEADSHA (fromgit rev-parse HEAD). - From the infrastructure surveyor output, extract the 2–4 canonical file paths most relevant to the task (primary config file, main entry point, test root, etc.). For each, run
stat <path>— include the path only ifstatexits 0. Paths that failstatare omitted; if zero paths survive, set the list to(none verified). - Assemble the preamble block:
## Orchestrator grounding — read this first
- **cwd**: <absolute path>
- **branch**: <branch name>
- **HEAD**: <full SHA>
- **canonical paths** (stat each on entry; emit GROUNDING_FAILED:<path> and abort if missing):
- <verified_path_1>
- <verified_path_2> ← omit line if not applicable
- Append to the snapshot output under the heading
## Brief Anchorso the orchestrator can copy it directly.
Orchestrator usage contract:
- Prepend the Brief Anchor verbatim to every sub-agent brief that reads files, runs
git/ghcommands, or references explicit paths. Skip for pure-reasoning tasks (no filesystem reads, no path references). - Sub-agents receiving the anchor
stateach listed path on entry. A missing path returnsGROUNDING_FAILED:<path>— the orchestrator re-dispatches once with the corrected path. If the retry also returnsGROUNDING_FAILED, emitBRIEF_GROUND_ABORTwith both the expected and actual paths plus the corrective command the operator should run —git worktree listto find the intended checkout, thencd <correct-worktree>(or re-invoke the orchestrator from it) — and halt the wave so the operator resolves the worktree mismatch. - The anchor is session-scoped: one construction pass per
ground-stateinvocation. Do not re-invokeground-statemid-session to refresh it; instead pass the existing anchor through.
Skip when: Task is Q&A only; single-line fix on an already-identified file; user says "skip pre-flight".