Guiding AI development with SDD and OpenSpec: how a requirement reaches verified delivery

Using the instructor application and matching workflow on GoodPair as an example, this note shows how defining boundaries, tasks, and automated checks before coding pairs with multi-viewport UI verification for different kinds of release risk.

In this note

When you ask an AI to modify a complex system workflow, it can often produce code in minutes. What determines whether the release holds up after launch is whether the boundaries were spelled out before coding started: which historical records must stay untouched, which high-risk flows stay out of scope, whether an instructor can re-apply after withdrawing, and exactly when private contact details become visible.

During the build of GoodPair, we used SDD (Spec-Driven Development) alongside OpenSpec to manage every change. GoodPair is a two-sided senior-education instructor-matching platform where Collective 353 delivered the system architecture, frontend, backend, and operations back office; it launched in October 2026 with 63 archived changes, 77 specification files, and 157 automated test files on record.

This note breaks down one core requirement from GoodPair, cleaning up the application and matching lifecycle, to trace how a change touching data rules, dual-role permissions, and privacy-gated contact unlock moves from specification to automated verification. At the end, we contrast it with a separate mobile Figma frontend refresh to show when multi-viewport checks and a written list of intentional deviations are needed instead.

Why verbal prompts fall short on real workflows: GoodPair’s matching lifecycle

In one sentence, the request sounds ordinary: “Clean up application and matching states. When a client accepts one instructor, other applications on that case expire automatically; an instructor who withdraws can apply again; once a valid match is confirmed, both sides can view contact details on a dedicated page.”

Passing that single sentence straight to an AI usually triggers four predictable failures.

The first two involve scope creep and historical records. Account suspension and forced case takedown also invalidate confirmed matches, yet they carry far more risk than routine matching. Before writing code, we wrote down what stayed out of scope and split suspension and forced takedown into a separate change so the AI would not touch moderation permissions by accident. On the data side, the system originally allowed only one application per case and instructor pair. Overwriting the old row would erase withdrawal history, while inserting a new row directly would trip the uniqueness rule. We locked in the rule upfront: re-applying must create a new record while preserving withdrawal history, limiting each pair to at most one active or pending match at a time.

The other two boundaries protect terminal states and personal data. When a client accepts an instructor, only sibling pending applications expire; existing rejected, withdrawn, and expired records cannot change. Being rejected by the client blocks that instructor from applying to the same case again, whereas self-withdrawal lets an instructor re-apply as long as the case is not already matched, taken offline, cancelled, or past its deadline. Finally, GoodPair hides phone numbers and emails until a match is confirmed. To prevent later suspension or takedown changes from leaking contact information, visibility on the contact details page is enforced through one centralized rule.

Putting all four rules in writing before implementation meant the AI executed against a fixed contract instead of filling gaps by guessing.

Mapping specs, design decisions, tasks, and verification line by line

What happens when an instructor reapplies?
  1. Specify

    Keep the withdrawn application and allow the instructor to apply for the same case again.

  2. Implement

    Create a new record. Limit each case and instructor pair to one active application.

  3. Verify

    Withdraw, then reapply. Check that the old record is withdrawn and the new one is pending.

In every change record, we align specification scenarios, design decisions, implementation focus, and automated tests line by line so future reviews and handoffs can trace each rule directly:

Spec scenario Design decision Implementation focus Verification evidence
Accepting one instructor expires sibling pending applications on the same case; existing rejected, withdrawn, and expired records stay untouched Expire sibling pending rows inside the same write transaction as acceptance Complete the atomic update and display a fixed “expired” reason in the UI Automated tests verify sibling pending expiration, unchanged terminal states, and blocking further accepts once matched
Self-withdrawn instructors can re-apply while preserving history; rejected instructors or matched, offline, cancelled, or expired cases are blocked Insert a new row instead of overwriting history, enforcing at most one active match per pair at a time Update uniqueness rules and implement withdraw, re-apply, and blocking guards Automated tests confirm withdrawal history stays intact and block duplicate matches, rejected re-applications, and closed cases
Withdrawing inside the “Applying” tab keeps the instructor on that tab and exposes a “Withdrawn history” tab Preserve the active tab across redirects and add a withdrawn-history tab Route back to the original tab after withdrawal and render the history list Automated tests verify tab switching and expired-reason display
Only participants in a valid confirmed match can view the contact details page (name, phone, email, available hours), with stray copy cleaned up Centralize contact-detail access under one rule shared with suspension and takedown flows Build the contact details page, standardize left-aligned layout, and fix stray copy Automated tests confirm access is restricted to valid matched parties, alongside formatting and spec checks

Beyond happy-path tests: catching batch updates that lock instructors out

Automated checks in spec-driven development do more than confirm the main flow works; they lock subtle risks found during implementation into permanent tests.

To keep withdrawal history alongside fresh applications while preventing duplicate matches, the system added an active-match lock on every open application. Auditing every state transition turned up an easy-to-miss trap: the codebase had several bulk-update paths, including instructor suspension, client suspension, case cancellation, case takedown, and sibling expiration when another instructor is accepted. If even one batch path forgot to release that lock, the affected instructor would be locked out permanently, unable to re-apply while seeing no open application on screen.

We added 9 dedicated regression tests confirming that suspension, cancellation, takedown, accepting another instructor, rejection, and withdrawal all clear the lock properly. Those tests also check that an actual state conflict returns an explicit conflict response instead of crashing the page, and that unrelated system errors are never misclassified as duplicate applications. Once encoded in tests, any future batch-path edit by an engineer or an AI fails immediately if it drops a lock release.

When backend tests aren’t enough: contrasting with a mobile Figma refresh

Because the application and matching change centered on data integrity, state transitions, and privacy gates, backend automated tests were the most direct proof of correctness.

When a change involves cross-page layout density, design fidelity, and mobile usability, passing backend tests says nothing about broken screens. In mid-2026, a separate GoodPair mobile Figma frontend refresh (with UI/UX visual design provided by an external designer, and frontend implementation and responsive delivery handled by Collective 353) used a very different acceptance process.

First, we wrote mobile verification as a repeatable checklist. Using that design version as the reference, automated browser checks inspected screens across 402×874, 390×844, and 768×1024 phone and tablet viewports. Alongside visual review, the checklist verified measurable structural rules such as zero horizontal overflow, four footer accordions, and eight tiles on the member dashboard.

Second, layout work stayed paired with privacy regression checks. Because case detail views and public cards changed, we re-ran 27 core regression tests covering public pages, organization certificates, and de-identification to verify that mobile layout adjustments did not break pre-match hiding of organization names or contact details.

Third, the acceptance checklist documented both what was intentionally not changed to match the mockup and what fell outside that verification round. We explicitly recorded keeping phone-number sign-in rather than switching to the national ID field shown in the mockup, refusing to invent fake search filters unsupported by the backend, and skipping an email typo in the design file. For review modals that depend on specific data states, the checklist explicitly stated that full interactive verification was not claimed in that round.

Keep verification at the right level so evidence stays clear

In a live product with over 60 archived changes, mixing per-change acceptance checks with site-wide test suites makes reviews hard to follow. Separating verification into three layers keeps responsibilities clear:

Verification layer Belongs to What it checks GoodPair example
Change-specific business-rule verification A change affecting state workflows, data constraints, or permissions Every scenario, guardrail, and bulk path defined in that change’s spec Dedicated workflow tests, batch lock-release tests, and spec consistency checks for the application and matching update
Change-specific visual & RWD verification A change touching cross-page layouts or mobile usability Design parity, multi-viewport layout integrity, state switching, and documented deviations The mobile Figma refresh acceptance checklist, three-viewport screenshots, and pre-match privacy regression checks
Project-wide regression suite The whole product (independent of any single change) Core flows that no release may break GoodPair’s 157 automated test files covering dual-role permissions, applications, case states, de-identification, and responsive layouts

Keeping each piece of evidence attached to the change that produced it means anyone looking back three months later, or onboarding onto the codebase, can open the archived record and see why the scope was cut that way, which edge cases are locked down by tests, and which deviations were deliberate.

How to start with spec-driven AI collaboration

Adopting spec-driven development does not start with a forty-page document. Writing down the exact boundaries where an AI is most likely to guess wrong is enough to begin.

Start by stating what stays out of scope, the way GoodPair split account suspension and forced takedown out of routine matching to keep each change contained. Replace vague requests with concrete scenarios, writing “when a client accepts instructor A, sibling pending applications expire while previously rejected records stay unchanged” instead of “clean up application states.” Match the proof to the risk: lock data rules, batch paths, and privacy gates with automated tests, and back cross-page UI refreshes with multi-viewport captures, privacy regressions, and an explicit list of intentional deviations.


Further reading & services