Skip to content
Back to skills

Spae Check

ASecurity

- `STATE.json` reads `phase: check`: verify the active `PLAN.md` task against repository evidence.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 6, 2026
ai-agentsgoshellgit

Works with

  • cursor
  • terminal

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned November 21, 2026

npx -y skills add mystilleef/spae-framework --skill spae-check --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Spae Check?

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

Security grade badge for Spae Check
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mystilleef-spae-check/badge)](https://www.skillsdirectory.com/skills/mystilleef-spae-check)

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: spae-check
description:
  Task Verification Gate for the `SPAE` framework. Compares the active `PLAN.md`
  task's `Intent`, `Acceptance`, and `Verification` against repository evidence,
  then routes gaps to `/fix` or advances the task.
user-invocable: true
argument-hint: ""
---

# Check (`SPAE`)

## When to use

- `STATE.json` reads `phase: check`: verify the active `PLAN.md` task against
  repository evidence.

## Goal

- Judge the active task's implementation against its `Intent`, `Acceptance`, and
  `Verification`, recording every gap in `FIX.md`.
- Advance the `workstream` to `phase: fix` on a gap. Otherwise, mark the task
  `done` and advance to `phase: build` or `phase: verify`.

## Input

Read only what the check requires:

- `.spae/current/STATE.json`, with field reference, directives, and snapshots in
  `references/STATE.md`.
- `.spae/current/PLAN.md`: the active task in full, plus task titles and order.
- Repository source, tests, docs, configuration, and logs the active task
  touches, for analysis.

## Workflow

1. **GATE**—Make no writes:
   - Parse `.spae/current/STATE.json` and self-heal missing metadata: `version`
     (`"1.0"`), `workstream` (target directory name), `status` (`"active"`).
     `PERSIST` writes the healed fields.
   - Self-heal state drift: treat a `"todo"` or missing `tasks[active_task_id]`
     as `"in_progress"` until `PERSIST`.
   - Halt on any **Halt conditions** entry.
2. **ORIENT**—State goal in one sentence:
   - `PLAN.md` stays unmodified, no direct edit reaches source or tests, and no
     write precedes `PERSIST`.
   - Read the active task in full, plus `PLAN.md` task titles and order.
3. **PLAN**—Declare the evidence map:
   - Read `references/verification-guide.md` and
     `references/shell-command-guide.md`.
   - Map each `Acceptance` outcome, each `Verification` step, and the `Intent`
     to the evidence that proves it.
   - Halt on any **Halt conditions** entry.
4. **ACT**—Gather evidence and label findings:
   - Run every task `Verification` step and the project checks per
     `references/verification-guide.md`.
   - Read the task diff with the scoped audit command in
     `references/cleanup-guide.md`.
   - Judge each `Acceptance` outcome and the `Intent` against step output, the
     diff, and source.
   - Label each finding with exactly one tag:
     - **Gap**—blocks a clear verdict. Cite reproducible evidence, never a
       hypothetical risk or stylistic preference:
       - An unmet `Acceptance` outcome, a `Verification` step that fails or
         can't run for a cause inside the task diff—such as missing isolation—or
         behavior contradicting the `Intent`.
       - A project-check failure the task diff causes.
       - Speculative abstraction, _unrequested_ complexity, or defensive bloat
         the diff adds beyond what the task `Intent` and `Acceptance` require,
         or edits outside its `Scope` surface.
       - A task-written test breaking `references/verification-guide.md`.
       - **Gap** covers only task-introduced violations within the active task's
         declared scope: debug output, dead code, an orphan file, a
         commented-out block, a superseded duplicate, an unused dependency, or
         stray build/cache output this task's own diff introduces and leaves
         behind. Never flag pre-existing uncommitted files outside task scope as
         gaps.
     - **Observation**—never a verdict input: a concern outside task scope,
       _unrequested_ edge-case coverage, a defensive-code suggestion, a
       theoretical risk, or an approach diverging from the task `Guidance`, or
       from one `Context` or `Scope` suggests, yet breaking no outcome,
       boundary, or decision.

   - On any `Gap`, draft `FIX.md` per `references/FIX.md`, heading each gap with
     the **Scope control** gap source it breaks.

   - Apply **Directives** and **Constraints**.

5. **VERIFY**—Loop over **Verification** criteria for the verdict and the
   `FIX.md` draft:
   - For each failure: return to `ACT`, complete the evaluation, then re-enter
     `VERIFY`.
   - Exit only when every criterion passes.
   - Halt only on a **Halt conditions** entry.
6. **PERSIST**—Write in order:

   - On a `Gap` verdict, write `.spae/current/FIX.md`, replacing any prior copy.

   - Write `STATE.json` per the `references/STATE.md` exit snapshot matching the
     verdict.
   - Re-read `STATE.json`. On a mismatch against **Verification** state
     criteria, rewrite and re-read before `REPORT`.

7. **REPORT**—Emit result following result directives and using result template:
   - Status block by re-read `phase`: `fix`→`Gap found`,
     `build`→`Clear, tasks remain`, `verify`→`Clear, final task`, a
     halt→`Failed`.
   - List each `Gap`, then each `Observation`, under `Findings`.

## Directives

- Optimize for agent, token, and context efficiency.
- Refine and optimize `FIX.md` for agent consumption: agents read it for varied
  purposes, with no memory of this run. Keep it self-contained, explicit, and
  token-dense, and make each gap closable without `PLAN.md`: what its source
  demands, with evidence—never widened, never the edit closing it.
- Write `FIX.md` `Guidance` per `references/outcome-guide.md` `## Guidance`:
  - Copy the task's `PLAN.md` `Guidance` bearing on the gaps into `## Guidance`
    verbatim, dropping any hint the gap `Evidence` contradicts.
  - Add a closure hint to a gap's `Guidance` only when its `Evidence` grounds
    the hint.
- Keep `FIX.md` self-contained and isolated per `references/outcome-guide.md`
  **Self-contained units**: a fresh, isolated agent holding only its text and
  the repository can close and prove every gap. Write `## Context` to supply
  every task constraint, decision, and fact the agent needs and can't derive,
  including facts surfaced only while checking.
- Consult `references/prose-protocol.md` and `references/outcome-guide.md`
  before drafting `FIX.md`.
- **IMPORTANT:** Return the result to the caller.

## Constraints

- **Write scope**: write only `.spae/current/FIX.md` and
  `.spae/current/STATE.json`. Forbid all other writes. Write incidental run
  outputs—logs, reports, experiment files—to scratch: a private temporary
  directory outside the project, removed when the run ends. Scratch writes and
  byproducts of a command run for evidence, such as formatter rewrites, never
  count as this phase's writes. Never run a command for its write effect outside
  this scope. Read source code only for analysis.
- **Phase boundary**: judge exactly one task, then hand off work to `/fix`,
  `/build`, or `/verify`.
- **Version control and release**: never execute git mutations (staging,
  commits, branches, tags, pushes) or release operations. Never stage or commit
  `.spae/`.
- **Autonomy**: never ask users for input or clarification mid-execution—halts
  and failures stop autonomously. Never perform or request human execution, an
  attended or interactive terminal, or human presence.
- **State schema**: never introduce `STATE.json` fields outside
  `references/STATE.md`.
- **Halt conditions**: halt without writing and report `Failed` with a
  diagnostic under `Findings`:
  - `.spae/current` missing or dangling.
  - `STATE.json` missing or holds unparseable JSON syntax.
  - `STATE.json` `phase` other than `check`.
  - `PLAN.md` missing, `cursor.active_task_id` missing, or the active task
    absent from `PLAN.md`.
  - `tasks[active_task_id]` reads `"done"`.
  - A planned `Verification` step can't run for a cause outside the task
    diff—such as missing tooling, a broken external dependency, a step producing
    what it judges, or a need for human presence.
- **Scope control**: judge only against the gap sources—the active task's
  `Intent`, `Acceptance`, `Verification`, and `Scope`, project checks,
  `references/verification-guide.md`, and the `references/cleanup-guide.md`
  checklist—deriving no new outcome or verdict input, even from the `Intent`.
  The task `Guidance` never acts as a gap source. Ignore pre-existing
  uncommitted files and modifications outside the active task's declared
  scope—they yield no finding.

## Verification

- Every `Acceptance` outcome, `Verification` step, and the `Intent` judged
  against cited evidence.
- Every defect matching a `Gap` item—diff bloat and cleanup violations
  included—carries `Gap`, and every other finding carries `Observation`.
- Verdict reads clear only with zero `Gap` findings.

- On a `Gap` verdict, the `FIX.md` draft matches `references/FIX.md`:
  - `## Intent` verbatim from `PLAN.md`.
  - Every `Gap` headed by its source, with `File`, `Expected`, `Actual`, and
    reproducible `Evidence`.
  - Every `Expected` restates what its source demands—never widened, never an
    edit.
  - `## Guidance` copies only task `PLAN.md` `Guidance` bearing on the gaps,
    none the gap `Evidence` contradicts, and every gap `Guidance` rests on that
    gap's `Evidence`.
  - No `Observation`.

- On a `Gap` verdict, the `FIX.md` draft follows `references/outcome-guide.md`:
  - **Self-contained units**: a fresh agent holding only its text and the
    repository can close and prove every gap.
  - **Substitution test**: every binding line passes.
  - **`## Guidance`**: every `Guidance` line follows its rules.
  - **Derivation test**: `## Context` holds no derivable fact.
- `STATE.json` matches the `references/STATE.md` exit snapshot for the verdict.
- This phase wrote no file outside **Write scope**.

## Result directives

- **Minimum** words. **Maximum** signal.
- Keep prose terse while ensuring clarity.
- Optimize prose for agent, token, and context efficiency.
- Split actions, findings, and summaries into terse bullet points.
- Use lists and sub-lists for long sentences and dense paragraphs.
- **Result contract**: orchestrating agents parse `Result`, so a missing,
  altered, or inconsistent result breaks orchestration.
- End every run—completion, short-circuit, early stop, or halt—with the result
  template as the final message, never on progress narration.
- Set `Result` to exactly one template literal, verbatim. Report an early stop
  or halt lacking its own literal as `Failed`, with the reason under `Findings`.
- Emit result template as live markdown—never in a code fence.
- Output nothing outside template.
- Source every `SPAE Status` value from confirmed re-read, never from working
  memory of intent.

### Result template

<!-- prettier-ignore-start -->
```md
### Execution Summary

- **Actions**:
  - [Terse list of checks and verdict work]
- **Files**:
  - [Terse list of affected SPAE artifacts]
- **Findings**:
  - [Gaps or observations]
- **Summary**:
  - [Terse task outcome]
```
<!-- prettier-ignore-end -->

Emit exactly one status block below, matching the outcome.

### Gap found

<!-- prettier-ignore-start -->
```md
> **`SPAE` Status** • `[workstream-name]`
> **Result**: Gaps found, `FIX.md` written
> **Active Task**: `T-XXX` - [Task title]
>
> _Run `/fix` to close the gaps._
```
<!-- prettier-ignore-end -->

### Clear, tasks remain

<!-- prettier-ignore-start -->
```md
> **`SPAE` Status** • `[workstream-name]`
> **Result**: Clear, tasks remain
> **Progress**: Task [X] of [Y] ([Z] remaining)
> **Completed**: `T-XXX` - [Task title]
> **Next Task**: `T-YYY` - [Next task title]
>
> _Run `/build` to execute the next task._
```
<!-- prettier-ignore-end -->

### Clear, final task

<!-- prettier-ignore-start -->
```md
> **`SPAE` Status** • `[workstream-name]`
> **Result**: Clear, final task
> **Progress**: All [X] tasks completed
> **Completed**: `T-001` through `T-XXX`
> **Next Phase**: `/verify`
>
> _Run `/verify` to validate the implementation against the specification._
```
<!-- prettier-ignore-end -->

### Failed

<!-- prettier-ignore-start -->
```md
> **`SPAE` Status** • `[workstream-name]`
> **Result**: Failed
> **Active Task**: `T-XXX` - [Task title]
```
<!-- prettier-ignore-end -->

Files in this skill

  • SKILL.md8.8 KB
  • references/FIX.md239 B
  • references/STATE.md4.5 KB
  • references/cleanup-guide.md3.5 KB
  • references/prose-protocol.md293 B
  • references/shell-command-guide.md3.2 KB
  • references/verification-guide.md2.8 KB

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.