agentleFS
exasol-labsexasol-labs/speq-skill/.claude/skills/speq-code-guardrails/SKILL.md

speq-code-guardrails

Skill56 starsChanged 14 days agoMITView on GitHub

TDD cycle and the code rules speq holds stricter than the usual defaults, for /speq-implement, /speq-patch, and the code-review sub-agent. Not for general coding.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Test first: No production code without a failing test.

    line 10
  2. Distinctive:

    Evidence: No claim without evidence: run the command, show the output, then claim.

    line 11
  3. Distinctive:

    Dependencies: No new dependency until the standard library and the installed dependencies are ruled out.

    line 12
  4. Distinctive:

    No boolean or selector arguments: split the function.

    line 32
  5. Distinctive:

    No role-suffix names without a responsibility (Manager, Processor, Handler, Util).

    line 35
  6. Distinctive:

    No TODO, FIXME, or ticket references in code.

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Code Guardrails

Rules

  • Test first. No production code without a failing test. Before you change untested code, add a test that captures its current behavior.
  • Evidence. No claim without evidence: run the command, show the output, then claim.
  • Dependencies. No new dependency until the standard library and the installed dependencies are ruled out.

TDD Cycle

RED: write the test, run it, show the failure. GREEN: the least code that passes, run the test. REFACTOR: clean up, run the test and the linter. Run only the tests you touched, not the full suite.

Running Suites

Redirect each build, test, or lint command's output to a log: mkdir -p target && <command> > target/speq-<suite>.log 2>&1. Judge the result by the exit code. Quote at most tail -n 30 of a log in a report.

Tests

  • Pure logic is tested without doubles. Orchestration is tested with doubles at its own abstractions. Adapters are tested against the real thing; a temporary directory is fine.
  • Tests are repeatable: no shared mutable state, real clock, network, or unseeded randomness.
  • Cover each failure path and the boundaries, not only the happy path.
  • Assert observable behavior, never internal state.
  • A skipped or ignored test is a defect. Fix it or delete it.

Code

  • No boolean or selector arguments: split the function.
  • Signal failure with the language's error mechanism, never a sentinel value. An error states what was attempted, the input, and the violated constraint.
  • Translate a third-party error into the module's own error type at the boundary.
  • No role-suffix names without a responsibility (Manager, Processor, Handler, Util). Keep transport, vendor, and storage format out of names.
  • No TODO, FIXME, or ticket references in code.
  • Inline an abstraction with one implementation, unless it is a seam over I/O, nondeterminism, or a third party.

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.