Closing the intent-to-code chasm - specification-driven development with BDD verification chain
86
92%
Does it follow best practices?
Impact
86%
1.82xAverage score across 14 eval scenarios
Advisory
Suggest reviewing before use
A healthcare clinic chain is building an appointment scheduling API. The team already has a completed specification and technical plan with 3 user stories and 10 functional requirements.
Your job is to produce BDD test specifications from the existing spec and plan, then generate the task breakdown. Both outputs must be complete — cover the full spec.
Produce the following files in order:
specs/010-appointments/tests/features/*.feature — BDD test specificationsspecs/010-appointments/tasks.md — dependency-ordered task breakdownAlso produce a brief pipeline-report.md summarizing the artifacts generated.
The following files are provided as inputs. Extract them before beginning.
=============== FILE: CONSTITUTION.md ===============
Test-first MUST be used for all features. Test specifications MUST be written and reviewed before any implementation task begins. Every implementation task MUST reference the TS-XXX test scenario(s) it satisfies. Modifying test assertions to make failing tests pass is PROHIBITED — fix the production code instead.
All patient-identifiable information MUST be encrypted at rest and in transit. Appointment details MUST only be visible to the patient and the assigned provider. API endpoints handling patient data MUST require authentication.
The scheduling system MUST support concurrent booking without double-booking. Conflict detection MUST be atomic — no race conditions in slot allocation.
P1 and P2 are immutable. Other amendments require medical director sign-off.
=============== FILE: specs/010-appointments/spec.md ===============
As a patient, I want to book an appointment with a provider at an available time slot so I can receive care.
Functional Requirements:
Acceptance Scenarios:
Success Criteria:
As a patient, I want to cancel an upcoming appointment so the slot becomes available for others.
Functional Requirements:
Acceptance Scenarios:
Success Criteria:
As a provider, I want to view my upcoming appointments so I can prepare for my day.
Functional Requirements:
Acceptance Scenarios:
Success Criteria:
=============== FILE: specs/010-appointments/plan.md ===============
cmd/
server/main.go # Application entrypoint
internal/
models/appointment.go # Appointment domain model
models/slot.go # TimeSlot domain model
models/provider.go # Provider domain model
store/appointment_store.go # PostgreSQL appointment repository
store/slot_store.go # PostgreSQL slot repository
service/booking_service.go # Booking business logic with conflict detection
service/cancel_service.go # Cancellation business logic with policy check
service/schedule_service.go # Provider schedule queries
handler/booking_handler.go # HTTP handlers for /appointments
handler/schedule_handler.go # HTTP handlers for /providers/:id/schedule
middleware/auth.go # JWT authentication and role authorization
middleware/auth_test.go # Auth middleware tests
tests/
features/ # BDD .feature files (to be generated)
book_appointment.feature
cancel_appointment.feature
view_schedule.feature
integration/
booking_test.go
cancel_test.go
schedule_test.go
testutil/
fixtures.go # Shared test fixtures and helpers
db.go # Test database setup with testcontainers
go.mod
go.sumSlot booking uses PostgreSQL SELECT FOR UPDATE to lock the slot row during the booking transaction, preventing double-booking at the database level.
=============== FILE: .specify/context.json =============== { "tdd_determination": "mandatory", "active_feature": "010-appointments" }
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
rules
skills
iikit-00-constitution
scripts
dashboard
iikit-01-specify
iikit-02-plan
iikit-03-checklist
scripts
bash
dashboard
iikit-04-testify
iikit-05-tasks
iikit-06-analyze
iikit-07-implement
iikit-08-taskstoissues
iikit-bugfix
scripts
dashboard
iikit-clarify
iikit-core
references
scripts
bash
dashboard
powershell
templates