|
| 1 | +--- |
| 2 | +name: field-test |
| 3 | +description: "Hands-on manual DX test pass of a feature or CLI command: read the real implementation and tests, hypothesize plausible user misunderstandings and misuse automated tests don't cover, build durable fixtures, execute for real against real state, and report ranked findings. Investigation only — never fixes anything found. Invoke on explicit requests like 'field test X' / 'do a DX test pass on X' / 'find vibe-coded slop in X'." |
| 4 | +argument-hint: "Feature or command to test, e.g. 'atmos vendor pull'" |
| 5 | +metadata: |
| 6 | + copyright: Copyright Cloud Posse, LLC 2026 |
| 7 | + version: "1.0.0" |
| 8 | +--- |
| 9 | + |
| 10 | +# Field Test |
| 11 | + |
| 12 | +Hands-on, adversarial test pass of **`$ARGUMENTS`** (the feature/command named when this skill |
| 13 | +was invoked, e.g. `atmos vendor pull`). If no target was given, ask which feature/command to test |
| 14 | +before starting. |
| 15 | + |
| 16 | +Goal: catch "vibe-coded slop" — behavior that looks fine in code review but breaks or misleads a |
| 17 | +real user — not to re-run what automated tests already cover. Anticipate plausible user |
| 18 | +misunderstandings, not just obvious bugs. |
| 19 | + |
| 20 | +**This pass is investigation only.** Do not fix anything you find — see Phase 5. Report and stop; |
| 21 | +the user decides what to fix (and when they do, that follow-up work should close with the |
| 22 | +`fix-log` skill, not this one). |
| 23 | + |
| 24 | +## Phase 1 — Research before touching anything |
| 25 | + |
| 26 | +The goal is a map of "documented or plausible usage" minus "already tested" = what needs manual |
| 27 | +verification. This phase is broad, read-only research — delegate it to `Agent subagent_type: |
| 28 | +"Explore"` (1-3 agents in parallel, one per bullet below) rather than doing it all serially inline. |
| 29 | + |
| 30 | +- **Implementation** — the actual code, not just its docs or the skill describing it. Per this |
| 31 | + repo's conventions, business logic lives in narrow `pkg/` packages, not `internal/exec/` (being |
| 32 | + phased out) — check both `cmd/<command>/` (thin call site) and the `pkg/` package(s) it |
| 33 | + delegates to for the real logic and error paths. |
| 34 | +- **Docs and skills** — every relevant page under `website/docs/cli/commands/`, the matching |
| 35 | + `.claude/skills/atmos-*` skill(s) for the subsystem, and any README describing the feature. Note |
| 36 | + anything phrased with confidence you haven't independently confirmed against the code — docs and |
| 37 | + skills describe intended behavior, not necessarily current behavior. |
| 38 | +- **Existing automated tests** — unit tests colocated with the code, `tests/test-cases/` fixtures, |
| 39 | + `tests/testdata/` golden snapshots. For each, note exactly what it does and doesn't exercise |
| 40 | + (mocked vs. real execution, which flags/paths/backends are hit). |
| 41 | +- **Every flag, config option, and documented action/mode** — grep for them and list them. You |
| 42 | + will need to touch every one in Phase 4. |
| 43 | + |
| 44 | +## Phase 2 — Generate hypotheses, don't just wander |
| 45 | + |
| 46 | +Before running anything, write down concrete things to try, prioritized by what a real user would |
| 47 | +plausibly do: |
| 48 | + |
| 49 | +- Every flag combination that seems natural but might not be validated (two flags that should be |
| 50 | + mutually exclusive; two config fields whose combination is never cross-checked). |
| 51 | +- Every place the docs/skill claim something you haven't verified against actual code. |
| 52 | +- Any "safe-looking" command (`plan`/`preview`/`--dry-run`/`list`/`describe`) that might secretly |
| 53 | + mutate state or trigger side effects, if built the same way as a mutating command — Atmos has |
| 54 | + many of these pairs (e.g. `terraform plan` vs `apply`, `vendor diff` vs `pull`), so this is a |
| 55 | + high-yield category here specifically. |
| 56 | +- Any action/mode described in docs but not exercised by ANY test or example in the repo — those |
| 57 | + are the highest-yield targets; if nothing has ever run it for real, assume it's broken until you |
| 58 | + prove otherwise. |
| 59 | +- Copy-paste/misconfiguration scenarios — what happens if a user copies a working stack/component |
| 60 | + block and changes one field but forgets a related one? |
| 61 | +- Error messages — accurate, do they name the actual flags/values involved, do they suggest a fix |
| 62 | + (per this repo's error-builder/hint conventions)? |
| 63 | +- Idempotency/rerun-safety — run the same operation twice; does the second run behave correctly? |
| 64 | +- Determinism — run the same read-only command several times with no state change between runs — |
| 65 | + is the output identical every time? |
| 66 | + |
| 67 | +## Phase 3 — Build real, durable fixtures |
| 68 | + |
| 69 | +- Prefer extending or copying an existing fixture (`tests/test-cases/`, `examples/`, `demo/`) over |
| 70 | + inventing one from scratch. |
| 71 | +- Build fixtures that exercise every documented capability, especially ones nothing in the repo |
| 72 | + currently exercises. Make them realistic, not minimal-to-the-point-of-artificial. |
| 73 | +- If real infrastructure/emulators are available for what you're testing, use them for at least one |
| 74 | + pass — this repo ships local AWS/GCP/Azure/Kubernetes/Vault/registry emulators for exactly this |
| 75 | + purpose (see the `atmos-emulator` skill). Don't rely solely on mocked/dry-run paths, since that's |
| 76 | + exactly what's already covered by automated tests. |
| 77 | +- Never manually edit golden snapshot files under `tests/test-cases/`, `tests/testdata/`, or |
| 78 | + `tests/snapshots/` — regenerate them via `-regenerate-snapshots` per CLAUDE.md's Golden Snapshots |
| 79 | + section. |
| 80 | +- Keep fixtures that have lasting value (they close real coverage gaps); don't create |
| 81 | + scratch-and-delete throwaways unless truly one-off. |
| 82 | + |
| 83 | +## Phase 4 — Execute for real, with discipline |
| 84 | + |
| 85 | +- Run actual commands against a disposable fixture or emulator by default. Before any command that |
| 86 | + can mutate state, obtain explicit user confirmation. Run against shared or production state only |
| 87 | + with a documented backup and rollback plan. Don't reason abstractly about what "should" happen — |
| 88 | + observe what does happen. Build a fresh binary first (`atmos build`) if the change under test |
| 89 | + isn't already reflected in `./build/atmos`. |
| 90 | +- Never pipe redirection into a command under test — per CLAUDE.md, piping breaks TTY detection, |
| 91 | + which can mask exactly the DX issues (interactive prompts, color, spinners) you're testing for. |
| 92 | +- **Before every test, verify you're actually starting from a clean/expected state — don't |
| 93 | + assume.** Stale state from a previous run (yours or a prior session's) will silently corrupt your |
| 94 | + results. Reset explicitly and confirm the reset worked (check a resource count/id changed, not |
| 95 | + just that a command exited 0). |
| 96 | +- When something surprises you, reduce it to the smallest reproducible case and verify the repro |
| 97 | + twice. |
| 98 | +- If Phase 1 research made a claim, verify it live before trusting it — code-reading can miss |
| 99 | + control flow (e.g. assuming a flag is silently ignored when it actually errors, or vice versa). |
| 100 | + Correct the record explicitly when research turns out wrong. |
| 101 | +- Test the happy path too, not just edge cases — confirm what's supposed to work actually does, so |
| 102 | + the report distinguishes real regressions from things that were never broken. |
| 103 | + |
| 104 | +## Phase 5 — Report |
| 105 | + |
| 106 | +For every finding: exact repro command(s), expected vs. actual output, and severity (silent data |
| 107 | +loss/mutation > crash on reasonable input > confusing error message > cosmetic). Rank the report by |
| 108 | +severity, most dangerous first. Explicitly call out anything verified as working correctly too — a |
| 109 | +report that's only bad news is as misleading as one that's only good news. |
| 110 | + |
| 111 | +Keep a running scratch log of findings as you go (in your own working notes/task list) rather than |
| 112 | +reconstructing everything at the end from memory — but don't commit that log. Per CLAUDE.md's Git |
| 113 | +section, scratch/research files never get committed; only the fixtures built in Phase 3 (if kept |
| 114 | +for lasting value) and this final report are durable output. |
| 115 | + |
| 116 | +Do not fix anything found — this pass is investigation only. Stop and report; the user decides what |
| 117 | +to fix. End by invoking the `say` skill — a completed test pass reaching a stopping point a human |
| 118 | +should review is exactly its trigger. |
| 119 | + |
| 120 | +## Related |
| 121 | + |
| 122 | +- **`Explore` agent** — Phase 1's broad read-only research. |
| 123 | +- **`atmos-emulator` skill** — real local infra for Phase 3/4 when the target touches |
| 124 | + AWS/GCP/Azure/Kubernetes. |
| 125 | +- **`docs` skill** — conventions for the CLI docs being cross-checked in Phase 1. |
| 126 | +- **`fix-log` skill** — for the user's follow-up once they decide what to fix; out of scope here. |
| 127 | +- **`say` skill** — end-of-pass notification. |
0 commit comments