agentleFS
mystilleefmystilleef/spae-framework/skills/spae-fix/SKILL.md

spae-fix

Skill2 starsChanged 15 days agoMITView on GitHub

- STATE.json reads phase: fix: close the gaps FIX.md lists for the active task. - Close exactly the FIX.md ## Gaps items for the active task with minimal changes, test-first where behavior changes. - Advance the workstream to phase: check. Read only what the ## Gaps items require: - .spae/current/STATE.json; references/STATE.md holds field reference, directives, and snapshots. - .spae/current/FIX.md; it carries all task context: the task ID and title in its heading, ## Intent, and ## Gaps items with File,…

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 7 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read only what the ## Gaps items require:

    line 24
  2. Very specific:

    Read FIX.md in full.

    line 56
  3. Very specific:

    Write STATE.json per references/STATE.md exit snapshot.

    line 82
  4. Distinctive:

    Treat a failing test or check as ordinary fix work.

    line 98
  5. Distinctive:

    When closing a gap invalidates an existing test, update that test to the new contract.

    line 99
  6. Very specific:

    Version control and release: never execute git mutations (staging, commits, branches, tags, pushes) or release operations.

    line 116
  7. Distinctive:

    Autonomy: never ask users for input or clarification mid-execution.

    line 119
  8. Very specific:

    State schema: never introduce STATE.json fields outside references/STATE.md.

    line 123
  9. Very specific:

    Never suppress compiler or linter diagnostics—for example, @ts-ignore, eslint-disable, @SuppressWarnings, # type: ignore.

    line 143
  10. Very specific:

    Never weaken type contracts to silence errors—for example, as any, !

    line 146
  11. Very specific:

    Never edit build or tool configuration as a workaround.

    line 148
  12. Distinctive:

    Never weaken, skip, delete, or game a test to force a pass.

    line 150
  13. Distinctive:

    Every behavior gap carries a passing test covering expected behavior, failure modes, and edge cases.

    line 156
  14. Very specific:

    Every added or updated test passes the CI parity rules in references/testing-guide.md.

    line 159
  15. Very specific:

    No self-introduced artifact remains per references/cleanup-guide.md.

    line 161
  16. Distinctive:

    Keep prose terse while ensuring clarity.

    line 171
  17. Distinctive:

    Use lists and sub-lists for long sentences and dense paragraphs.

    line 174

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Fix (SPAE)

When to use

  • STATE.json reads phase: fix: close the gaps FIX.md lists for the active task.

Goal

  • Close exactly the FIX.md ## Gaps items for the active task with minimal changes, test-first where behavior changes.
  • Advance the workstream to phase: check.

Input

Read only what the ## Gaps items require:

  • .spae/current/STATE.json; references/STATE.md holds field reference, directives, and snapshots.
  • .spae/current/FIX.md; it carries all task context: the task ID and title in its heading, ## Intent, and ## Gaps items with File, Expected, Actual, and Evidence.
  • Repository source, tests, docs, and configuration the ## Gaps items touch.

Testing

See references/testing-guide.md for test structure, isolation, mocking, assertion, and performance standards.

Cleanup

See references/cleanup-guide.md for the self-introduced-artifact checklist and diff-only audit scope.

Workflow

  1. GATE—Make no writes:
    • Parse .spae/current/STATE.json; 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:
    • FIX.md stays unmodified until PERSIST deletes it; directly modify no code outside the ## Gaps items.
    • Read FIX.md in full.
    • Capture the pre-task baseline per references/cleanup-guide.md.
  3. PLAN—Declare the remediation path:
    • Read references/testing-guide.md and references/shell-command-guide.md.
    • Map each ## Gaps item to its minimal edit; for a behavior gap, map the test surface: expected behavior, failure modes, and edge cases.
    • Halt on any Halt conditions entry.
  4. ACT—Per ## Gaps item, repeat until re-checking its Evidence shows the Expected result:
    • Behavior gap—runtime behavior misses Expected: reproduce it with a failing test, reusing an existing test that already fails on it; then write the minimal code that passes it.
    • Any other gap—a leftover artifact, diff bloat, a defective test, or a static-check failure: make the minimal edit that closes it.
    • Apply Directives and Constraints.
  5. VERIFY—Loop over Verification criteria for the ## Gaps items:
    • Audit task edits against the pre-task baseline using the Self-cleanup checklist in references/cleanup-guide.md; remove every self-introduced artifact before proceeding.
    • For each failure: return to ACT, fix, then re-enter VERIFY.
    • Exit only when every criterion passes.
    • Halt only on a Halt conditions entry.
  6. PERSIST—Write in order:
    • Write STATE.json per references/STATE.md exit snapshot.
    • Re-read STATE.json; on a mismatch against Verification state criteria, rewrite and re-read before REPORT.
    • Delete .spae/current/FIX.md.
  7. REPORT—Emit result following result directives and using result template:
    • Result: Gaps addressed, FIX.md removed after PERSIST, else Failed.
    • List each closed gap under Findings.

Directives

  • Optimize for agent, token, and context efficiency.
  • Align with existing codebase patterns; avoid speculative design.
  • For a behavior gap, never write production code before its test exists.
  • Treat a failing test or check as ordinary fix work; drive it green.
  • When closing a gap invalidates an existing test, update that test to the new contract.
  • Re-check Evidence and run project checks per references/verification-guide.md; never discover, install, or calibrate tooling ad hoc.

Constraints

  • Write scope: edit only the source, tests, docs, and configuration the ## Gaps items require, plus .spae/current/STATE.json and the .spae/current/FIX.md deletion, both at PERSIST; forbid all other writes. Byproducts of a command run for evidence, such as a formatter's rewrites, never count as this phase's writes; never run a command for its write effect outside this scope. Never delete pre-existing uncommitted files.
  • Phase boundary: remediate exactly one task; hand off work to /check; never mark a task "done" or move the cursor.
  • 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 with no further STATE.json write; 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 fix.
    • cursor.active_task_id missing.
    • tasks[active_task_id] reads "done".
    • FIX.md missing, naming a task other than cursor.active_task_id, or listing no ## Gaps item.
    • A gap can't close within its scope: an Expected result infeasible or contradicting the ## Intent or another gap, a broken external dependency, an unrunnable Evidence command or project check, or a need for human presence.
  • Scope control: close each ## Gaps item as written and change nothing else; ## Intent guides design, never scope. No incidental refactoring, cleanup, formatting, or dependency churn.
  • Integrity: fix issues properly and idiomatically; no hacks, workarounds, or shortcuts:
    • Never suppress compiler or linter diagnostics—for example, @ts-ignore, eslint-disable, @SuppressWarnings, # type: ignore.
    • Never weaken type contracts to silence errors—for example, as any, ! non-null assertions, or broadened union types.
    • Never edit build or tool configuration as a workaround; change it only when a ## Gaps item requires it.
    • Never weaken, skip, delete, or game a test to force a pass.

Verification

  • Re-checking each ## Gaps item's Evidence shows its Expected result.
  • Every behavior gap carries a passing test covering expected behavior, failure modes, and edge cases.
  • Relevant project tests pass with no new failures.
  • Every added or updated test passes the CI parity rules in references/testing-guide.md.
  • No self-introduced artifact remains per references/cleanup-guide.md.
  • The task diff changes nothing beyond the ## Gaps items.
  • The task diff breaks no Integrity rule.
  • STATE.json specifies phase: "check", tasks[active_task_id]: "in_progress", and the entry cursor.
  • 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.
  • 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 -->
### Execution Summary

- **Actions**:
  - [Terse list of remediation actions]
- **Files**:
  - [Terse list of affected source and SPAE artifacts]
- **Findings**:
  - [Terse list of closed gaps or the failure diagnostic]
- **Summary**:
  - [Terse list of summary of changes]

> **`SPAE` Status** • `[workstream-name]`
> **Result**: [Gaps addressed, `FIX.md` removed | Failed]
> **Active Task**: `T-XXX` - [Task title]
>
> _Run `/check` to re-verify the task._  _(unless failed)_
<!-- prettier-ignore-end -->

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.