- Home
- Skills
- Workflow Automation
- spec-first-development-enforcer
More screenshots
Works with the AI Agents you already use
Spec First Development Enforcer
Make your agent write the tests first: a hard gate blocks implementation until failing tests define the behavior, edge cases included.
Free
spec-first-development-enforcer
Example session with this skill installed
"Add a payment processor that handles Visa, Mastercard, and AMEX with idempotency"
- Read your context and instructions
- Compiled the spec-first-development-enforcer
"Before implementing, I need a spec. Here's what I'm creating:
tests/test_payment_processor.pywith 5 test cases:- Valid card charges successfully
- Expired card raises CardExpiredError
- Insufficient funds raises InsufficientFundsError
- Duplicate transaction IDs are rejected (idempotency)
- Zero-amount transactions raise ValueError
- Spec document defining interface:
process_payment(transaction) -> PaymentResult - Each implementation change maps to one test. Implementation proceeds only after spec validation passes."
Connects securely to your tools. The creator never sees your data.
About this skill
The Problem
Your AI coding agent generates 200 lines of code, declares victory, and you discover at review time that it missed three edge cases, ignored input validation, and built the wrong interface. By then, you've spent more time reviewing bad code than writing a spec would have taken. The agent never wrote a test — because nothing forced it to.
What You Get
- Pre-hook gate that blocks code edits until a test file or spec document exists for the feature being built
- Spec validation engine that checks edge case coverage, behavioral completeness, and internal consistency before implementation begins
- Spec-anchored implementation — every code change maps to exactly one spec item, keeping agent output contractually bounded
- Post-implementation audit that runs the full test suite, checks for regressions, and verifies every code path has a matching spec entry
- Multi-language enforcement — works with TypeScript (describe/it), Python (pytest), Go (testing.T), Rust (#[test]), and Java (@Test) test frameworks
- Anti-retrofit detection — identifies when an agent writes code first and backfills tests, which is TDD theater, not real TDD
Why This Beats Prompting It Yourself
"Write tests first" is the most ignored instruction in AI coding. The agent acknowledges it, then writes code anyway because nothing structurally prevents it. This skill inserts a hard gate — no spec, no code — so compliance isn't optional. Without it, your prompt becomes a suggestion the agent forgets by line 10.
Example Session
You: "Add a payment processor that handles Visa, Mastercard, and AMEX with idempotency"
Agent: "Before implementing, I need a spec. Here's what I'm creating:
tests/test_payment_processor.pywith 5 test cases:- Valid card charges successfully
- Expired card raises CardExpiredError
- Insufficient funds raises InsufficientFundsError
- Duplicate transaction IDs are rejected (idempotency)
- Zero-amount transactions raise ValueError
- Spec document defining interface:
process_payment(transaction) -> PaymentResult - Each implementation change maps to one test. Implementation proceeds only after spec validation passes."
Use Cases
- Starting a new API endpoint where input validation edge cases matter
- Building data processing pipelines that must handle malformed input gracefully
- Enforcing TDD discipline on a team where AI agents generate 50%+ of code
- Adding payment, auth, or other security-critical features that demand exhaustive coverage
- CI/CD integration where test coverage is a merge gate and you need spec-level accountability
Known Limitations
This skill adds a thinking step before every implementation — for trivial one-line fixes or config changes, it will slow you down. Skip it for tasks under 20 lines where the behavioral contract is obvious. The spec document format works best for imperative code; highly reactive or event-driven architectures may need adapted spec formats.
This skill adds a thinking step before every implementation — for trivial one-line fixes or config changes, it will slow you down. Skip it for tasks under 20 lines where the behavioral contract is obvious. The spec document format works best for imperative code; highly reactive or event-driven architectures may need adapted spec formats.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
7 uses
Times used to date
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 3 months ago
- Free with an Agensi account
Permissions
No special permissions declared or detected