Skip to content
Back to skills

Goals Test

ASecurity

Goals checks: write criteria a check could fail, make them `auto` checks the engine runs, and strengthen weak tests until a wrong answer fails. Use when writing criteria (P1), proving a change (P3) or testing whether checks catch bugs (P4). Not for making the change (goals-build) or a full review.

  • 17 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 5, 2026
ai-agentsgoc#bashtesting

Security analysis

A100/100

Scanned December 5, 2026

npx -y skills add ShivamGupta42/goals --skill goals-test --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Goals Test?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Goals Test
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/shivamgupta42-goals-test/badge)](https://www.skillsdirectory.com/skills/shivamgupta42-goals-test)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: goals-test
description: "Goals checks: write criteria a check could fail, make them `auto` checks the engine runs, and strengthen weak tests until a wrong answer fails. Use when writing criteria (P1), proving a change (P3) or testing whether checks catch bugs (P4). Not for making the change (goals-build) or a full review."
---

# Goals Test

A check that cannot fail proves nothing.

## Outcome rules, never traded away

| Rule | Measured by |
|---|---|
| 1. Every criterion names an exact input and its expected result. | Each has an id (`DP-`, `A-` or `P#.C#`); none says only "works". |
| 2. Every criterion has a passing `auto` check, or a `manual` one that says why. | `goals phase verify <PHASE>` and `goals phase review <PHASE>` pass. |
| 3. Each key check turns red when the code is wrong. | `notes` lists two planted bugs per key check, both caught. |
| 4. No failure is hidden. | `notes` labels every failure; flaky tests are in `known_gaps`. |
| 5. No result is invented. | Passes come only from the engine; "nothing found" names what was checked. |

## Steps

1. **Write criteria a check could fail.** Name an exact input and expected
   result for each. Cover the main path, one edge (empty, limit, bad input) and
   one thing that must stay the same. Record each with
   `goals assess want "<criterion>" --proof auto --phase <PHASE>`, naming the
   phase that proves it (usually P3), so its gate demands a check for the `DP-`
   id. Changing what the user confirmed needs their yes. A criterion you
   cannot pin down goes in `ambiguous` (review fails until settled) with a
   checkpoint (last section); write the rest.
2. **Take a baseline.** Run the suite first to see old failures.
3. **Turn each criterion into an `auto` check** whose `covers` is its id. For
   login, use a seeded test account, never real secrets. For UI, add a
   keyboard-only path and a contrast check.
4. **Plant bugs on purpose.** For every key check, use a throwaway copy of the
   project, never the real working folder. Make two different, valid mistakes
   (an off-by-one, an inverted condition) and run the check after each.
   It must fail both times. A syntax error, import error or setup crash does
   not count as caught. Still green means weak: tighten it, plant again.
   Note each bug in `notes`; delete the copy.
5. **Strengthen weak tests.** Asserts that only prove the code ran, compare a
   value with itself, or mock away the thing under test cannot fail. Fix each,
   then search for the same pattern. Fix the matches within this goal's scope;
   list the rest in `known_gaps`.
6. **Sort every failure:** broken code, broken test, flaky test or environment.
   Fix the code or the test, saying which in `notes`. Report a flaky test in
   `known_gaps`; never rerun it until green. Never weaken a check to pass.
7. **When nothing can pass or fail** (writing, design, ranking), choose a bar
   you could lose to, like real examples on disk, and hold some back. A
   reviewer with fresh context compares old and new blind. Score the held-back
   examples a single time, after building, and report that score even if
   worse, as a `manual` check.

## Recording proof

Add checks to the evidence draft `goals next` names:

```json
{
  "verifications": [
    {"covers": "DP-1a2b3c4d", "kind": "auto", "command": "pytest tests/test_parse.py -q"},
    {"covers": "P4.C1", "kind": "manual", "rationale": "Taste, not pass/fail; blind review won 4 of 5 held-back."}
  ],
  "ambiguous": ["Does a blank line count as a record?"],
  "known_gaps": ["Same always-true assert in tests/test_export.py; out of scope."],
  "notes": "Removed the empty-input guard: red. Flipped < to <=: red."
}
```

```bash
goals phase evidence <PHASE> --file <evidence-draft>
goals phase verify <PHASE>
```

- Only the engine sets `ran` and `passed`; rerun verify after any change.
- `DP-` and `A-` ids accept only a passing `auto` check. A `manual` check covers
  only `P#.C#` and never counts under `GOALS_UNATTENDED`.

## When nobody is watching

- An open question must never just sit in chat. Find facts on your own.
- For a routine choice, take the safe default that can be undone and log it:
  `goals decision record "<question>" --choice "<what you chose>" --by agent`.
- If the decision belongs to the user, write the question down before you ask:
  `goals checkpoint record <PHASE> <id> --kind approval --status needs_user --needs-user --title "<the question>" --summary "<your recommended answer; what it blocks>"`.
  Use `--kind understanding` for questions about meaning.
- Next, complete everything the answer cannot change, then hand the turn back.
- Only the user's reply closes that checkpoint. Silence never counts as agreement.
- Reach for `--unverified` only on the user's instruction, such as when the
  host has no way to record their answer.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.