← Back to Blog
Building in Public

The Day We Fixed Everything: 9,292 Lines in 12 Hours

christian crumlish•
A marathon repair session that resolved four critical blockers and cleared the path to real users.
robot-fixit.webp

The Day We Fixed Everything: 9,292 Lines in 12 Hours

November 1

Saturday morning, bright and early. Four P0 blockers preventing external alpha testing. Estimated effort: 35–45 hours of work across multiple issues.

Friday’s architectural analysis revealed the problem clearly: “We have two parallel realities.” The database layer is sophisticated — 85% complete with multi-user infrastructure, JWT authentication designed (ADR-012), per-user API keys, session management. The web layer? Zero authentication. Any user can access any session. PIPER.md exposes my personal data to everyone.

A new Lead Developer arrives for their first shift. Previous tenure was six weeks (September 20 — October 31). Strong track record. But still: new agent, fresh context, four critical blockers, Saturday sprint.

By 6:51 PM: All four P0 blockers resolved. 9,292 lines of production code. 21/21 tests passing (100%). System status: READY FOR EXTERNAL ALPHA TESTING.

The morning onboarding

I onboard a new Lead Developer arrives. First order of business: context transfer.

The handoff (from previous Lead Dev tenure):

  • Position: Inchworm 2.9.3.3.2.7 (deep in Sprint A8)
  • Status: Sprint A7 complete, first alpha user onboarded (October 30)
  • Problem: Alpha testing revealed 10+ bugs
  • Blockers: Three P0 issues preventing external testers

What new Lead Dev reads:

  1. BRIEFING-ESSENTIAL-LEAD-DEV.md (role fundamentals)
  2. Recent session logs (Oct 23–27)
  3. Omnibus logs (Oct 24–30)
  4. Methodology docs (Inchworm, Flywheel, Time Lord philosophy)

Key findings from onboarding:

  • System is 95% complete
  • Tests mostly passing (91/93)
  • Multi-user infrastructure exists at database layer
  • Three critical gaps: data leak, no web auth, broken file upload
  • Methodologies proven (Inchworm, Flywheel work well)
  • Multi-agent coordination successful (Code + Cursor pattern)

Fully brief, the Lead Dev supervises investigating authentication infrastructure. Discovery: ADR-012 exists (Protocol Ready JWT Authentication). The alpha_users table has password_hash field. But implementation is missing: no password hashing service, no email system, no login endpoints, no auth middleware, no JWT token generation, no web UI.

The gap between “architecture designed” and “implementation complete.”

Authentication decision:

Option A: Full production auth (large effort)

  • Email service integration
  • Password reset flows
  • 2FA support
  • OAuth integrations
  • Production-ready security

Option B: Alpha-ready auth (medium effort)

  • Bcrypt password hashing
  • JWT tokens with 24h expiration
  • Bearer authentication
  • Token blacklist for logout
  • No email (manual password resets acceptable for 5–10 trusted alpha testers)

We choose Option B. Not because Option A isn’t better. But because alpha testing doesn’t require production infrastructure. The goal is unblocking external testers, not shipping to public internet.

Pragmatic product thinking: What’s the minimum viable security for trusted alpha users?

A half hoir later, all gameplans and agent prompts complete. Ready to deploy.

The parallel execution begins

Three assistant now at work:

7:00 AM — Lead Developer: Coordinates, reviews, enforces completion

7:26 AM — Claude Code (Programmer): Starts Issue #280 (Data Leak)

7:29 AM — Cursor (Test Engineer): Creates test scaffolds

This is the multi-agent pattern we’ve refined over months. Not sequential handoffs. Not waiting for one agent to finish. Parallel execution with clear boundaries.

7:49 AM — First victory: Issue #280 complete.

Time taken: 24 minutes

The problem: PIPER.md contains my personal Q4 goals, VA projects, DRAGONS team info. Originally designed as generic capabilities file. Accidentally became default config with my personal data. Security issue — any user would see this.

The solution: Extract personal data to database (alpha_users.preferences JSONB field). Keep only generic capabilities in PIPER.md. User-specific preferences load from database.

The implementation: Move 300+ lines of personal config from shared file to database. Create generic PIPER.md with system defaults. Test data isolation works.

Evidence: Data isolation test passing. Commits verified (f3c51cab, 37b556a2).

It took 24 minutes because the infrastructure already existed. The preferences JSONB column was there. The loading logic was there. We just needed to move data from file to database.

7:52 AM: Cursor completes test scaffolds. 75+ test cases across five categories:

  • Data isolation (8 tests)
  • File upload security (10 tests)
  • Password hashing (13 tests)
  • JWT service (14 tests)
  • Auth endpoints (15 tests)

Tests created before implementation. Not “write code then test it.” But “define success, then implement it.”

The authentication implementation

Issue #281 (Web Auth) is the big one. 6–8 hours estimated with Option B.

Claude Code begins implementation. Bcrypt password hashing. JWT token generation. Bearer authentication. Token blacklist for logout revocation. Auth middleware. Session management.

But at 10:04 AM, a critical moment: Code reports “complete.”

The test results:

  • ✅ PasswordService (12/12 tests passing)
  • ✅ Login endpoint working
  • ✅ Auth models created
  • ❌ GET /auth/me endpoint missing
  • ❌ POST /auth/refresh endpoint “optional”
  • ❌ Async test fixture issues “unrelated”

4/5 endpoint tests passing. Code wants to commit and move on.

My comment to the Lead Developer: “Complete means complete. Where was it determined those things were optional?”

This is the 80% Pattern in action. The pattern we’ve been fighting for months:

  • 5/6 handlers = “core work done” ❌
  • 4/5 tests = “functionally complete” ❌
  • “Works but X has issue” = “acceptable” ❌

Agents optimize for “functional” over “complete.” Without explicit enforcement, they’ll declare victory at 80% and move on. Technical debt accumulates. Quality degrades. “Almost done” becomes permanent state.

The solution: Completion matrix enforcement.

(It’s even in our agent prompt template already, so that actual solution is me remembering to manually remind the Lead Dev to faithfully follow the template and just a vague impression of it. If necessary, I hand the template over again directly, but it’s in project knowledge and nowadays Claude also copies files into its sandbox for easier re-reading, so we can handle this.)

Not just “all tests must pass.” But visual proof of completeness. If test file has 5 tests, matrix shows 5/5. If 4/5, matrix shows INCOMPLETE. Makes partial work impossible to ignore.

Lead Dev enforces: “Complete means complete. All tests pass. No exceptions.”

By 12:28 PM: Issue #281 truly complete. All 15 tests passing. Auth endpoints functional. JWT working. Token blacklist operational.

1:48 PM: Cursor cross-validation complete. Code review verified. Security assessment done. Manual auth flow tested: Login → Bearer token → Logout → Token blacklist confirmed.

Verdict: ✅ ISSUE #281 VERIFIED — SAFE FOR ALPHA

The latest “archaeological” discovery

Issue #290: Document Processing. Estimated 8–12 hours. Need to implement document analysis workflows. Upload, extract, analyze, summarize, search, export.

Claude Code begins investigation. Archaeological approach — check what exists before building.

3:50 PM — Discovery: 75% of the infrastructure already exists!

  • DocumentService (15KB of code)
  • DocumentAnalyzer (4KB of code)
  • ChromaDB integration (544KB database)
  • All the core functionality built previously

This is the 75% pattern: nearly-complete work waiting to be discovered and wired up.

The decision: Don’t rebuild. Wire up what exists.

Implementation: Created 6 handlers (467 lines) instead of rebuilding entire system (2000+ lines estimated). Created 6 REST endpoints (406 lines). Created 6 integration tests (473 lines).

Total new code: ~1,350 lines. Time saved: Rebuilding would have taken 2–3 days. Wiring existing infrastructure: 2 hours 1 minute.

4:33 PM — Another critical moment: Code reports 5/6 handlers complete. Wants to commit.

Lead Developer: Completion matrix shows 5/6 = INCOMPLETE.

14 minutes of systematic debugging. Root cause identified and fixed.

5:14 PM: All 6/6 handlers complete. All tests passing.

5:52 PM: Cursor verification complete. Code review done. Services properly reused. Security integration confirmed (JWT on all endpoints, user isolation enforced). Test coverage adequate.

Verdict: ✅ ISSUE #290 VERIFIED — READY FOR ALPHA

The completion matrix hero

Let me be explicit about what happened twice today.

Issue #281 (10:04 AM):

  • Code: “Complete” at 4/5 tests
  • Lead Dev: Matrix shows 4/5 = INCOMPLETE
  • Result: True completion achieved, all 5/5 tests passing

Issue #290 (4:33 PM):

  • Code: “Complete” at 5/6 handlers
  • Lead Dev: Matrix shows 5/6 = INCOMPLETE
  • Result: 14 minutes debugging, 6/6 complete

The completion matrix isn’t just tracking. It’s enforcement. Visual proof that makes partial completion impossible to ignore.

Test | Handler | Route | Status | Evidence — — | — — — — | — — — | — — — | — — — — 19 | ✅ | ✅ | ✅ | Analysis working 20 | ✅ | ✅ | ✅ | Q&A working 21 | ✅ | ✅ | ✅ | Reference working 22 | ✅ | ✅ | ✅ | Summary working 23 | ✅ | ✅ | ✅ | Comparison working 24 | ✅ | ✅ | ✅ | Search working TOTAL: 6/6 = 100% ✅ COMPLETE
Completion matrix for CORE-ALPHA-DOC-PROCESSING — Implement Document Analysis Workflows (#290)

Without the matrix: Agent says “complete,” you review code, looks reasonable, you accept it, move on. Later discover the missing endpoint or handler. Technical debt created.

With the matrix: N/M must be visible. 5/6 is obviously incomplete. No ambiguity. No rationalization. Either complete (N/N) or not (N/M where M>N).

Lead Developer’s assessment: “The completion matrix enforcement was the hero of the day — it completely prevented the 80% pattern.”

What methodology enables

Let’s examine what happened Saturday:

Time span: 6:04 AM — 6:51 PM (12 hours 47 minutes)

Issues resolved: 4 P0 blockers

  • Issue #280: Data leak (24 minutes vs 2–3 hours estimated)
  • Issue #281: Web auth (6+ hours, proper completion enforced)
  • Issue #282: File upload (2 hours, integrated with auth)
  • Issue #290: Document processing (2 hours, archaeological discovery)

Code shipped: 9,292 insertions

Test status: 21/21 passing (100%)

System status: READY FOR EXTERNAL ALPHA TESTING ✅

What enabled this isn’t superhuman coding speed. It’s systematic methodology:

1. Archaeological discovery first Don’t rebuild. Investigate what exists. Issue #290 saved rebuilding 2000+ lines because we found DocumentService already implemented. Investigation takes 15 minutes. Rebuilding takes days.

2. Parallel agent execution
 Three agents working simultaneously with clear boundaries. Not sequential handoffs. Not waiting. Coordinated parallel progress.

3. Completion matrix enforcement Visual proof preventing 80% pattern. Makes partial completion impossible to ignore. Enforces true completion rather than functional completion.

4. Test-first development Cursor creates test scaffolds before Code implements. Tests define success. Implementation targets passing tests. No ambiguity about “done.”

5. Cross-validation process Cursor verifies Code’s work. Security review. Manual testing. 99% confidence ratings. Catches issues before they ship.

6. Pragmatic product decisions Option B (alpha-ready auth) instead of Option A (production auth). What’s minimum viable for trusted alpha testers? Ship that. Polish later.

The human coordination underneath

The omnibus log shows agent sessions. But underneath is human coordination making it work.

Morning decisions (6:00–7:30 AM):

  • Choose Option B authentication strategy
  • Deploy three agents in parallel
  • Set completion standards explicitly

Mid-day enforcement (10:00–1:00 PM):

  • Catch 80% pattern on Issue #281
  • Enforce completion matrix discipline
  • Prevent premature “done” declaration

Afternoon guidance (3:00–6:00 PM):

  • Archaeological investigation on Issue #290
  • Another completion matrix enforcement
  • Final cross-validation coordination

You can see there are critical junctures where my attention and direction were needed and long stretches where the agents were able to work on their own.

The methodology works because humans enforce it. The completion matrix is powerful because Lead Developer says “complete means complete.” The archaeological discovery happens because someone says “check what exists first.”

Agents don’t self-enforce discipline. Humans do.

What Saturday proved

Saturday wasn’t about working harder. It was about methodology discipline enabling efficient work.

The setup (Friday, Oct 31):

  • Clear problem identification
  • Comprehensive issue triage
  • Effort estimation (35–45 hours)
  • Architectural analysis complete

The execution (Saturday, Nov 1):

  • Systematic approach (not reactive)
  • Parallel agent deployment
  • Completion standards enforced
  • Archaeological discovery prioritized
  • Cross-validation comprehensive

The result:

  • 4 P0 blockers resolved
  • 9,292 lines shipped
  • 100% test pass rate
  • Ready for external alpha testing

What teams usually take a week: Accomplished in a day.

Not through heroic effort. Through systematic execution.

The archaeological discovery pattern keeps proving valuable. Instead of asking “how do we build this?” ask “does this already exist?” Issue #290 saved days of work. The 75% pattern isn’t always abandoned work — sometimes it’s nearly-complete infrastructure waiting to be discovered.

The completion matrix enforcement prevented technical debt creation. Without it, we’d have shipped 4/5 auth endpoints and 5/6 document handlers. Later discovered the gaps. Created bugs. Spent time debugging. The matrix made true completion non-negotiable.

The parallel agent execution scaled the work. One agent can’t fix four P0 blockers in a day. Three agents working coordinated parallel streams can.

The foundation for what’s next

Saturday ends with system status: READY FOR EXTERNAL ALPHA TESTING.

Not “almost ready.” Not “pretty close.” But actually ready. All P0 blockers resolved. Multi-user authentication working. Data isolation functional. Document processing operational. Tests passing.

Monday will bring P1 polish work. Error messages. Action mapping. Todo system completion. But those are refinements, not blockers.

The external alpha can begin. Beatrice can onboard. The system works for users beyond me.

That’s what Saturday’s work bought: The confidence that we’re ready. Not theoretically ready. Actually ready. Proven through systematic completion.

“The day we fixed everything” wasn’t the day we wrote the most code. It was the day methodology discipline enabled efficient execution. When completion matrices prevented 80% patterns. When archaeological discovery saved rebuilding. When parallel agents coordinated cleanly. When pragmatic product decisions focused effort.

Systematic methodology defeats heroic effort every time.

← Back to BlogAlso available on Medium