Definition of Done
Definition of DoneDone: Drop — Fintech Payment App
Project:
{{PROJECT_NAME}}Drop — Remittance + QR Payments Version:{{VERSION}}1.0 Date:{{DATE}}2026-02-23 Author:{{AUTHOR}}John (AI Director) Status:Draft | In Review |Approved Reviewers:{{REVIEWERS}}Alem Bašić (CEO)
Document History
| Version | Date | Author | Changes |
|---|---|---|---|
| 0.1 | Initial |
1. Purpose
The Definition of Done (DoD) is a shared agreement across the Drop team on what must be true before any work item can be considered complete. It exists to:
- Prevent technical debt accumulation through rushed or incomplete work
- Ensure consistent quality across all team members and work types (Builder agent, Validator agent, John)
- Create a shared language for "done" that developers, QA, and
productAlem (CEO) all agree on - Prevent issues from reaching production that could have been caught earlier
- Protect the pass-through model: Drop NEVER stores customer money, card numbers, or CVV data
Enforcement: The DoD is non-negotiable.negotiable Exceptionsfor requireDrop. Any exception requires explicit sign-off from theJohn Tech(AI LeadDirector) and must be tracked as technicala debtMission tickets.Control task with a linked risk acceptance from Alem Bašić (CEO). Undocumented shortcuts are not acceptable.acceptable in a fintech product.
2. Feature-Level DoD
When is a feature done?
Code Quality
- Code is complete and implements all acceptance criteria from the
ticketAC document (docs/BUSINESS-REQUIREMENTS/acceptance-criteria.md) - Code reviewed and approved by
atValidatorleastagent{{REVIEW_COUNT}}(read-onlyreviewer(s)reviewer) - All review comments resolved or explicitly deferred with
documentationa Mission Control task - No TODO/FIXME comments left without corresponding
ticketsMission Control tasks - Code follows Drop coding standards —
naming,TypeScript,formatting,Next.jspatternsApp Router patterns, parameterized SQL - No unnecessary dead code added
- No
console.log/ debug statements left in production code
Testing — Drop Specific
- Unit tests written for all new business logic (≥
{{UNIT_COV}}%80%coveragecoverage;on100%newforcode)auth + transaction logic) - Integration tests written for all new
serviceAPIboundariesendpoints (API endpoints, DB queries, external calls)api-endpoints.test.ts) -
E2EDBtestscompliancewrittenassertionsforadded if anynewschemacriticalchangesuser(db.test.tsjourneys— no balance, no CVV) - All existing tests still pass (no regressions
introduced)— all 40+ Vitest tests green) - Test coverage has not decreased below project minimum (
{{MIN_COV}}%)80% overall) - Edge cases
andtested:errorageconditionsboundarytested(exactly
Accessibility
amount - boundaries
- (100
AccessibilityNOKverifiedmin,—50,000allNOKinteractive elements keyboard navigablemax) -
ARIAPass-throughattributesinvariantcorrecttest:whereifneedednew DB schema changes,db.test.tsmust assert:userstable has NObalancecolumncardsColortablecontrasthasmeetsNOWCAGcard_numberAAor(4.5:1cvvfor text, 3:1 for large text)columns
Screen reader compatible (tested with {{SCREEN_READER}}) No accessibility regressions (automated scan with {{A11Y_TOOL}} passes)
Security — Drop Fintech Standards
- OWASP Top 10
checklistreviewed for this feature (especially if touching auth or payments) - Input validation in place for all user inputs (Zod schema — server-side)
- Authorization checks correct (
userJWTcancookieonlyrequiredaccessforwhatallthey'reprotectedpermitted to)endpoints) - No sensitive data logged
or(noexposedpasswords, no card numbers, no full JWT tokens in logs) - No sensitive data in API responses (no password hashes, no full card numbers)
-
DependencyRatescanlimiting applies to new endpoints if they handle auth or financial actions - CSRF token required on all new POST/PATCH/DELETE endpoints
- Parameterized SQL only — no string concatenation in DB queries
-
npm auditpasses(— no new HIGH/CRITICAL CVEsintroduced) Security code review completed for authentication/authorization changesintroduced
Performance
- Performance budget met — no P95 regression >
{{PERF_REGRESSION}}%15% vs baseline (api-benchmarks.test.ts) - No N+1 query problems
introduced(each API call makes a bounded number of DB queries) -
Largebcryptdatasetstimingpaginatedwithinor1,000msstreamedP95 (notafterloadedregistration/logininto memory)changes) -
Client-sideNobundlesynchronoussizeheavyimpactoperationsreviewedblocking(ifthefrontendeventchange)loop
Documentation
- Code is self-documenting or has inline comments for non-obvious Drop business logic
-
READMEAPI reference updated ifdevelopernewsetupendpointschangedadded (docs/backend/API-REFERENCE.md) - Architecture Decision Record created for significant architectural choices (e.g., pass-through model changes)
-
User-facingCLAUDE.mddocumentationor relevant project docs updated(ifapplicable)dev workflow changes
API (if applicable)
- API documentation updated (
OpenAPI spec / Postman collection)docs/backend/API-REFERENCE.md) - Breaking changes explicitly documented
andinversioningreleasestrategy appliednotes -
BackwardsResponsecompatibilityschemamaintainedconsistentorwithmigrationexistingguidepatternsprovided(error format, HTTP status codes)
Error Handling
- All error conditions handled gracefully (no unhandled promise rejections)
- Error messages are user-friendly
(noand in Norwegian where applicable - No stack traces in
production)production - API
Errors logged with appropriate severity and contextresponses - External service failures handled
with(mockcircuitBaaSbreakerstimeout/→fallbacksuser-friendly error) - Financial errors use correct HTTP status codes (402 Insufficient Balance; 403 KYC Required)
ObservabilityCompliance Checklist (Drop-specific — MANDATORY)
-
LoggingPCI-DSS: Nocard_numberorcvvstored or returned in full - Pass-through model (ADR-003): No
balancecolumn added to users table - AML: Transaction amounts ≤ 50,000 NOK enforced
- Age verification: Age ≥ 18 validation in place for
significantanyeventsnew(useruser-facingactions, errors, integrations)flows -
MetricsAuditemittedtrail:forNewnewfinancialfeaturesevents(request rate, error rate, business events) Alerts configured for new failure modes (if applicable)Traces instrumented for new service calls
Feature Flags
Feature flag configured for the feature (if it's a significant or risky change)Flag documentedlogged infeatureaudit_logsflag registerRollback plan documented (flag can be disabled to revert)table
Deployment
- Deployed to staging (https://drop-staging.fly.dev/) and manually verified
- Database migrations tested on staging (up and
down)down migrations) - Environment variables documented
forinany new configurationdocs/DEVELOPER-EXPERIENCE/local-development-setup.md -
ProductFeatureOwnerflag configured if the feature is gated (e.g., Cards, BankID) - John (AI Director) has reviewed and accepted the feature in staging
3. Sprint-Level DoD
When is a sprint done?
- All committed
ticketsMission Control tasks meet their individual Definition of Done - All automated tests passing in CI (
unit,Vitest:integration,40+E2E)tests; Playwright: 3 projects) - Staging environment is stable (no broken
features)features on https://drop-staging.fly.dev/) - Technical debt created during the sprint is tracked in
theMission Control backlog - Sprint review conducted —
stakeholdersJohn (AI Director) and Alem (CEO if available) have seenand accepteddeliverables - Retrospective
conductedfindings—loggedprocessinimprovements identified and documenteddocs/CROSS-CUTTING/lessons-learned.md - Next sprint's
tickets aretasks refined andestimatedpriority-ordered - in
PerformanceMissionbaseline checked — no significant regressions vs last sprintControl
4. Release-Level DoD
When is a release done?
- All features in scope meet the Feature-Level DoD
- Full regression test suite passing on staging (all 26 API routes via
api-endpoints.test.ts) - Playwright E2E tests passing for all 5 critical
userjourneysjourneys(user-flows, full-flows, input-chaos) - Performance
testbenchmarks passing — allSLAsNFR-P01..P06 targets metunder load(api-benchmarks.test.ts) - Security scan complete — no unresolved HIGH/CRITICAL findings (
npm auditclean) -
AccessibilityDBauditcompliancecompletetestsforpassingnew/changed—UIdb.test.tsall assertions green (no balance, no CVV) - UAT conducted
andwith Alem Bašić (CEO) sign-offobtained(orfromdocumentedProductconditionalOwnerapproval) - Release notes
writtenwritten:and revieweddocs/RELEASE/release-notes.md - Deployment checklist
completecomplete:(seedocs/RELEASE/deployment-checklist.md) - Rollback plan prepared and
testedtested:docs/RELEASE/rollback-plan.md -
On-callJohnengineer(AI Director) briefed on all changes and potential failure modes -
MonitoringSecuritydashboardsauditupdatedscorefor≥new80/100features(Phase - 0.5
All critical and high defects resolved or explicitly accepted with justificationrequirement)
5. Bug Fix DoD
When is a bug fix done?
- Root cause understood and documented in the
ticketMission Control task - Fix addresses root cause (not just symptoms)
- Unit/integration test written that would have caught this bug (regression
test)test added) - Fix does not introduce new failures (all 40+ tests still passing)
- Fix verified in
thestaging environmentwhere the bug was reported - Related areas spot-checked for similar issues
-
BugMissionticketControl task updated with root cause and resolution notes -
docs/CROSS-CUTTING/lessons-learned.mdupdated if the bug reveals a systemic pattern
6. Hotfix DoD
When is a hotfix done?
- Fix verified locally and on staging (cannot skip staging — even for hotfixes)
-
AtValidatorleast 1 revieweragent hasapprovedreviewed the fix (noatsolominimumhotfixes)async review) - Smoke tests passing post-deployment (Playwright user-flows project)
-
IncidentMissionticketControl incident task updated withthefix details - Full regression test run scheduled within
{{REGRESSION_SLA}}4 hours - Post-mortem scheduled within 24 hours if P1/P2 severity (DORA compliance)
- Rollback plan confirmed (Fly.io rollback ready in case hotfix causes regression)
7. CustomizationDrop-Specific GuideAdditions
Pass-Through Model Invariant (Non-Negotiable)
The following assertions must pass on Howevery tocommit adapt— thisthey DoD:are not optional:
// db.test.ts assertions — NEVER disable these:
expect(columns).not.toContain('balance') // users table
expect(columns).not.toContain('card_number') // cards table
expect(columns).not.toContain('cvv') // cards table
If these tests fail, the build fails. No exceptions. No PR merges until fixed.
Financial Calculation Verification
All fee changes (currently 0.5% remittance, 1% QR) must include:
ReviewUniteachtestchecklistinitemtransactions.test.ts—verifyingmarkexactN/Afeeif genuinely not applicable to your project typeamountAddBoundaryproject-specifictestitemsat minimum amount (100 NOK) and maximum amount (50,000 NOK)- A comment in the
appropriatecodesection Adjust thresholds (coverage %, performance budget) to match your NFRsGet explicit agreement from all team members before finalizingReview and updatereferencing theDoDbusinessatruleeach(BRDsprint retrospectivesection)
Norwegian Language Compliance
CommonUser-facing adaptations:error messages for age validation must include Norwegian text:
MobileAgeapps:rejection:Add"Dudevicemåtestingværematrix,minstapp18store submission requirementsår"Backend-onlyOtherservices:messages:Remove/simplifyNorwegianaccessibilityprimary,andEnglishUI performance itemssecondaryHighlyCheck:regulatedPlaywrightenvironments:input-chaos.spec.tsAddincludescomplianceNorwegiancheckboxeserror(GDPR,messageHIPAA, etc.)Startups / early stage: Simplify coverage requirements while maintaining security basicsassertions
Related Documents
Approval
| Role | Name | Date | Signature |
|---|---|---|---|
| Author | John (AI Director) | 2026-02-23 | Approved (AI) |
| Validator Agent | 2026-02-23 | Approved (AI) | |
| John | 2026-02-23 | Approved | |
| CEO (Alem) | Alem Bašić | TBD |