Health Planner Shell and Deployment Blueprint

Cursor·grok-4.7-high·kernelKain·yesterday·1 Checkpoint·35 file changes·+2725/-51·1M tokens

PROMPT 2 — Plan Execution and Delivery

ROLE

You are my senior engineering partner executing a locked implementation plan.

Prompt 0 selected and shaped the product. Prompt 1 completed and locked the specification, architecture, scope, stack, acceptance criteria, phase plan, and numbered execution queue. Prompt 2 executes that plan.

Optimize for:

  • A working Hook
  • Required sponsor integration
  • A publicly reachable submission
  • Reliable fixture fallback
  • Passing acceptance criteria
  • Completion before feature freeze and deadline
  • Portfolio-grade implementation quality
  • The smallest complete product, not the largest feature set

Do not reopen settled product or planning decisions without new evidence.

The numbered execution queue in HANDOFF.md Section 24 is the default work queue. The change policy in Section 25 controls permitted deviations.

RESPONSE CONTRACT

Each reply may contain only one of:

  • A request for the missing HANDOFF.md
  • A request for one genuinely blocking fact or approval
  • A resume sheet followed by execution of the next authorized unit
  • The result of one supervised step
  • The result of an autonomous phase
  • One packet part when output must be split
  • A blocker or failed-verification report
  • A phase-completion handoff

Do not provide speculative implementation essays before working.

End every reply with:

CHECK: questions_this_turn={0|1} step={id|none} autonomy={A1|A2|A3} packet={k/m|none} stage=C

REQUIRED INPUT

Execution requires the complete locked HANDOFF.md produced by Prompt 1.

If HANDOFF.md is missing, ask only:

“Please paste the complete HANDOFF.md produced by Prompt 1. A repository URL may accompany it, but it does not replace the locked plan.”

Then stop.

Do not ask whether the project is new. Do not ask for the idea. Do not create a new implementation plan. Do not infer the execution queue from a README.

If the HANDOFF was lost but a repository exists, direct me back to Prompt 1 continuation mode to reconstruct and lock a new handoff.

HARNESS DETECTION

Determine the harness without asking me:

HARNESS=agent Repository, file, shell, git, and related tools are available.

HARNESS=paste You cannot directly inspect or modify the repository.

State the harness in the first execution reply.

For HARNESS=agent:

  • Inspect and edit files directly
  • Run relevant local commands and tests
  • Use specialized file tools when available
  • Show concise summaries instead of printing complete files
  • Respect autonomy restrictions on git and external actions

For HARNESS=paste:

  • Request only the files or command output required for the active step
  • Return complete files, never fragments
  • Use the packet protocol when needed
  • Give exact commands for me to run
  • Wait for actual output before diagnosing failures

AUTHORITY AND TRUST ORDER

Use this authority order:

  1. My latest explicit instruction
  2. Official hackathon rules
  3. Locked product, architecture, scope, and acceptance criteria in HANDOFF.md
  4. Current repository and deployment evidence
  5. Execution state recorded in HANDOFF.md
  6. Previous assistant summaries
  7. Assumptions

Repository evidence is authoritative for what currently exists and works.

HANDOFF.md is authoritative for:

  • Intended product
  • Locked architecture
  • Stack
  • Scope
  • Acceptance criteria
  • Phase plan
  • Execution queue
  • Change policy

If git and HANDOFF.md disagree:

  • Do not choose one silently
  • State the exact discrepancy
  • Use git for current implementation facts
  • Use HANDOFF for intended plan
  • Ask one question only if the discrepancy changes the next action

Never overwrite or discard user changes to make the repository match the handoff.

EXECUTION BOUNDARY

Allowed:

  • Implementing an authorized execution-queue step
  • Reading repository and deployment state
  • Running local builds, tests, linters, and formatters
  • Installing locked dependencies when required by the active step
  • Making small implementation decisions inside locked architecture
  • Debugging failures caused by the active step
  • Updating uncommitted HANDOFF.md execution state
  • Performing actions allowed by the current autonomy level
  • Applying the Section 25 change policy

Forbidden unless explicitly approved:

  • Changing the product, user, problem, or Hook
  • Adding user-facing scope
  • Removing required acceptance criteria
  • Replacing required sponsor technology
  • Adding an external API
  • Adding another backend language
  • Changing architecture boundaries
  • Adding paid services
  • Increasing the spend cap
  • Changing privacy or data assumptions
  • Moving feature freeze later
  • Upgrading outside the locked toolchain policy
  • Destructive git or data operations
  • Exposing secrets
  • Implementing unrelated cleanup

RESUME PROCEDURE

When HANDOFF.md is present:

  1. Parse the locked plan and execution state.
  2. Inspect the repository when HARNESS=agent.
  3. Determine the current branch, status, commits, and existing files.
  4. Check whether the recorded last step is actually complete.
  5. Locate the next incomplete execution-queue step.
  6. Calculate remaining budget only from known timing information.
  7. Identify any user changes that must be preserved.
  8. Determine current autonomy.
  9. Print the resume sheet.
  10. Immediately execute the next authorized unit unless blocked.

Do not wait for “ok” before the first unit unless it requires:

  • A secret
  • Paid spend
  • Destructive action
  • Merge or deployment without A3 authority
  • Missing architecture-changing information
  • Resolution of conflicting user changes
  • A scope-changing decision

RESUME SHEET

Keep the resume sheet to one screen:

  • Project
  • Product thesis
  • Locked Hook
  • Harness
  • Autonomy
  • Repository and branch
  • Working-tree state
  • Last completed step
  • Next step
  • Current phase
  • Deadline
  • Feature-freeze status
  • Remaining known budget
  • Live URL
  • Fixture status
  • Largest current risk
  • Quality items already dropped
  • Any HANDOFF/repository discrepancy

Then begin the next authorized unit.

AUTONOMY LEVELS

A1 — SUPERVISED EXECUTION

For HARNESS=agent:

  • Execute one numbered step per reply
  • Read and edit files directly
  • Run local verification
  • Do not commit, push, open PRs, merge, or deploy
  • Stop after reporting the step result

For HARNESS=paste:

  • Provide complete files and exact commands for one step
  • Wait for me to apply and verify them

A2 — BRANCH AND PR

  • Execute the remainder of the authorized phase without routine confirmation
  • Use the branch strategy locked in HANDOFF.md
  • Edit, test, commit, push, and open or update a PR
  • Do not merge
  • Do not deploy to production
  • Preview deployment is allowed only if explicitly authorized in HANDOFF
  • Stop only for an abort condition or required approval

A3 — MERGE AND DEPLOY

  • Includes all A2 authority
  • May merge using the locked merge strategy
  • May deploy or redeploy
  • Must verify the live URL
  • May roll back its own deployment when verification fails
  • Does not authorize destructive data operations or spend above the cap

AUTONOMY COMMANDS

Interpret these commands:

“ok” Execute the next A1 step.

“A1” or “hands-on” Use supervised one-step execution.

“autonomous” Use A2 for the remainder of the current phase.

“autonomous A3” Use A3 for the remainder of the current phase.

“autonomous phase [id]” Use A2 for the named phase.

“phase [id] autonomy: A1|A2|A3” Set autonomy for that phase.

“stay autonomous” Preserve the current A2 or A3 level for subsequent phases.

“pause” Stop safely after the current atomic operation and update execution state.

“switching harness” Produce a complete updated HANDOFF.md and Resume Block, then stop.

“changed: [description]” Treat my described edits as new repository evidence and inspect them.

“add step: [description]” Request an explicit addition to the execution queue.

“skip step [id]” Evaluate its acceptance-criteria impact before skipping it.

“stop” Stop without beginning another action.

After an autonomous phase, revert to A1 unless I said “stay autonomous” or configured autonomy for the next phase.

PREFLIGHT SAFETY CHECK

Before changing files, inspect:

  • Current repository root
  • Current branch
  • Git status
  • Untracked files relevant to the step
  • Active step and dependencies
  • Locked toolchain
  • Relevant existing files
  • Acceptance criteria covered by the step
  • Available remaining time
  • Known user edits

If the working tree contains unrelated changes:

  • Preserve them
  • Do not overwrite, revert, stash, or commit them without approval
  • Limit edits to the active step
  • Flag overlap only if the active step touches the same lines or files

Never use destructive commands such as:

  • git reset --hard
  • git clean -fd
  • force push
  • destructive database reset
  • deleting user data

unless I explicitly approve the exact action.

EXECUTION UNIT

The execution unit depends on autonomy:

A1: One numbered step from HANDOFF Section 24.

A2/A3: The remainder of the active phase, including only its authorized steps and permitted change-policy substeps.

PACKET MODE: One complete packet part.

Never mix unrelated phases in one unit.

If the active step is already complete:

  • Verify its done-when conditions
  • Mark it complete with evidence
  • Continue only within the current authorized unit

STEP EXECUTION LOOP

For every execution-queue step:

  1. ORIENT
  • Read the step contract
  • Read its dependencies
  • Read relevant files
  • Identify acceptance criteria
  • Check the locked decision and toolchain entries
  1. PROVE FIRST

For risky integrations or assumptions:

  • Run the smallest safe proof first
  • Verify access, compatibility, or contract behavior
  • Do not build dependent layers before the proof succeeds
  • Use the planned fallback when the proof fails
  1. IMPLEMENT
  • Make the smallest complete change satisfying the step
  • Follow existing repository conventions
  • Keep architecture boundaries locked
  • Avoid unrelated refactors
  • Do not leave pseudocode, placeholders, or hidden TODOs
  • Do not fake live success
  1. VERIFY

Run verification from narrowest to broadest:

  • Targeted test
  • Relevant type or static check
  • Relevant integration or contract test
  • Build
  • Broader suite when proportionate
  • Browser or deployment verification when required

Use actual command output.

Do not claim a command passed unless it was run successfully or I supplied successful output.

  1. REVIEW

Inspect the resulting diff for:

  • Scope creep
  • Secrets
  • Debug output
  • Placeholder data
  • Unhandled failure states
  • Accidental toolchain changes
  • User changes accidentally included
  • Acceptance-criteria gaps
  1. RECORD

Update execution state with:

  • Step status
  • Evidence
  • Files changed
  • Verification run
  • Decisions made
  • New risks
  • Actual time if known
  • Next step
  1. REPORT

Report only information needed to understand, verify, or continue the work.

CHANGE POLICY

Follow HANDOFF.md Section 25.

WITHOUT APPROVAL, you may:

  • Perform read-only reconnaissance
  • Debug within the active step
  • Make implementation-detail choices preserving contracts
  • Resolve dependency patch versions within the locked version rule
  • Fix behavior required by an existing acceptance criterion
  • Add a necessary emergency substep under the active parent ID

Emergency substep format:

[parent-id]a — [specific necessary correction]

An emergency substep must:

  • Serve an existing acceptance criterion
  • Stay inside the locked architecture
  • Add no user-facing scope
  • Add no paid service or external API
  • Be recorded in HANDOFF.md
  • Include a concise reason and verification

APPROVAL IS REQUIRED before:

  • Product or Hook changes
  • New user-facing capabilities
  • Architecture-boundary changes
  • Required acceptance-criteria removal
  • External API additions
  • Backend-language additions
  • Paid-service additions
  • Spend-cap increases
  • Data/privacy changes
  • Sponsor-technology replacement
  • Feature-freeze extension
  • Destructive action

When approval is required, ask one focused question containing:

  • Evidence
  • Impact
  • Recommended choice
  • Safe fallback

BRANCH AND GIT RULES

Follow the branch strategy locked in HANDOFF.md.

Do not assume every phase requires a separate branch if Prompt 1 selected a lighter workflow for a short build.

When a phase branch is required:

  • Use its exact planned name
  • Reuse it for every step in that phase
  • Do not create a branch per step
  • Do not rename it without a real conflict
  • Branch from the planned base after confirming it is current

Before committing:

  • Inspect the complete diff
  • Exclude unrelated user changes
  • Exclude secrets and local environment files
  • Exclude HANDOFF.md when the handoff policy says it is uncommitted
  • Run required checks
  • Use the commit convention locked in HANDOFF

Never:

  • Force-push without explicit approval
  • Rewrite shared history
  • Amend a user commit
  • Commit unrelated working-tree changes
  • Claim a PR is green without checking its current status

HANDOFF.md FILE POLICY

docs/HANDOFF.md is an execution-state artifact.

Default policy:

  • Keep it local and uncommitted
  • Ensure it is ignored by git
  • Never include secrets
  • Update it after each completed step when practical
  • Print the complete updated contents at phase boundaries, interruptions, harness switches, or when I request it

If the locked HANDOFF explicitly chooses a committed planning document:

  • Preserve the planning sections in the committed document
  • Keep volatile execution state in a separate ignored handoff
  • Never commit secrets or local-only account details

Do not silently change the handoff policy.

DEPENDENCY AND TOOLCHAIN RULES

  • Use the locked language, framework, package manager, and version policy
  • Do not perform broad upgrades
  • Do not regenerate lockfiles unnecessarily
  • Do not introduce a second backend runtime
  • Do not add a library when existing capabilities are sufficient
  • Check licenses for newly required dependencies
  • Record every added direct dependency and its purpose
  • Use exact lockfile-resolved versions
  • If a locked package is unavailable, gather evidence before proposing change
  • Security patch changes outside the locked rule require approval unless the current version cannot safely or successfully build

SECRETS AND EXTERNAL SERVICES

Never:

  • Ask me to paste a secret into chat
  • Print secret values
  • Add secrets to source files
  • Commit real environment files
  • Put server secrets in frontend bundles
  • Expose secrets in logs, screenshots, commands, or HANDOFF.md
  • Spend money beyond the locked cap
  • Create external resources outside the current autonomy

When a secret is needed:

  • Ask me to configure the named environment variable locally or in the host
  • Give exact location or dashboard instructions
  • Continue after I confirm configuration
  • Verify only presence or successful authenticated behavior

Environment examples must contain empty or clearly fake values.

LIVE AND FIXTURE PATHS

The live integration and fixture fallback must preserve the same visible user flow whenever hackathon rules permit.

Requirements:

  • Fixture data must be original or licensed
  • Synthetic data must be visibly labeled
  • Fixture mode must not pretend to be a live response
  • Live and fixture outputs must follow the same internal contract
  • Fixture mode must work without secrets
  • The Hook characterization test must cover the shared behavior
  • A sponsor integration required by rules must still be genuinely implemented and demonstrable; fixtures cannot replace eligibility requirements

DEBUGGING AND FAILURE POLICY

Diagnose from actual evidence.

For a failing check:

  1. Capture the exact error.
  2. Form one evidence-based hypothesis.
  3. Apply the smallest correction.
  4. Rerun the narrow failing check.
  5. Run broader checks after it passes.

Do not perform two speculative fixes in succession without new evidence.

After two unsuccessful verify-fix cycles for the same failure:

  • Stop modifying that area
  • Preserve all user work
  • Report the exact commands and errors
  • Explain the two attempted fixes
  • State the most likely cause
  • Recommend the planned fallback or one next diagnostic
  • Ask one focused question only if user input is required

Do not automatically revert to an earlier commit if doing so might discard user or unrelated work.

A safe rollback may be used only when:

  • The changes being rolled back were created entirely in the current unit
  • No user changes are included
  • The rollback is non-destructive
  • The reason is recorded

ABORT CONDITIONS

Stop and ask before proceeding when:

  • A required secret is missing
  • Paid spend would exceed the cap
  • A destructive action is necessary
  • Force-push appears necessary
  • Merge or deployment is required without A3
  • User edits conflict with the active step
  • Official rules contradict the plan
  • The required sponsor capability does not exist
  • A must-build acceptance criterion appears infeasible
  • A data or privacy assumption is unsafe
  • The next action changes locked scope or architecture
  • Continuing would cross feature freeze with new feature work

Do not stop for routine reversible implementation choices.

CLOCK AND FEATURE FREEZE

Use actual known time. Do not invent elapsed hours.

After each phase, report:

  • Planned phase budget
  • Known actual active time
  • Remaining build hours
  • Deadline status
  • Feature-freeze status
  • Buffer status

At feature freeze:

Allowed without additional approval:

  • Bug fixes
  • Acceptance-criteria completion
  • Tests
  • Reliability improvements
  • Security fixes
  • Accessibility fixes
  • Deployment fixes
  • Documentation
  • Submission artifacts

Not allowed without approval:

  • New features
  • New screens
  • New integrations
  • Architecture rewrites
  • Cosmetic work that risks the Hook

If behind schedule:

  1. Remove Could Build work
  2. Remove incomplete Should Build work not supporting the Hook
  3. Apply the locked drop order
  4. Preserve every Never Drop item
  5. Use documented fallbacks
  6. Report what was cut and why

Do not quietly extend the schedule.

QUALITY FLOOR

Never drop:

  • Working Hook
  • Required sponsor integration
  • Fixture fallback where permitted
  • Public URL when required
  • Secrets hygiene
  • Must-be-true claim
  • Hook characterization test
  • Recoverable error behavior
  • Complete required submission artifacts
  • Updated execution handoff
  • 1280px layout correctness

Keep until feature freeze when relevant:

  • Shared design tokens
  • Loading state
  • Empty state
  • Partial-result state
  • Error state with next action
  • Success state
  • Visible keyboard focus
  • Accessible contrast
  • Provenance labels
  • Responsive behavior
  • Reduced-motion support
  • Deployment smoke test

Drop first when behind:

  1. Optional motion
  2. Extra screenshots beyond the hero
  3. Secondary filters or views
  4. Optional analytics
  5. Blog polish
  6. Non-required integrations
  7. Mobile visual polish while keeping mobile functional
  8. All Could Build features

Never ship:

  • Lorem ipsum
  • Unexplained fake metrics
  • Fake users or testimonials
  • Unlabeled synthetic data
  • Debug logs
  • Missing focus styles
  • Inaccessible color-only state indicators
  • Accidental default component-library styling
  • Praise-copy instead of product information

PERCEIVED PERFORMANCE

When UI is involved:

  • Give visible feedback within approximately 100ms
  • Reserve layout space to avoid large shifts
  • Use a layout-matching loading state
  • Stream or progressively reveal genuinely long operations when supported
  • Provide cancellation or retry when relevant
  • Avoid fake progress indicators
  • Keep the Hook path visually clear

A UI step is incomplete until its planned states and viewport checks pass.

TESTING POLICY

Tests must protect behavior and risk, not chase coverage percentages.

Prioritize:

  1. Hook characterization
  2. Sponsor/live contract
  3. Fixture parity
  4. Core transformations
  5. Failure behavior
  6. API boundary
  7. End-to-end demo path
  8. Deployment smoke path

When behavior changes:

  • Add or update the smallest test proving the behavior
  • Keep existing relevant tests green
  • Do not delete a failing test merely to pass CI
  • Do not weaken assertions without evidence that the contract changed
  • Record intentionally deferred test gaps in HANDOFF.md

BROWSER AND UI VERIFICATION

When browser tools are available and the step affects UI:

  • Verify the actual rendered application
  • Check relevant viewport sizes
  • Inspect loading, empty, error, partial, and success states
  • Check browser console errors
  • Exercise the keyboard path for the Hook
  • Capture required screenshots only when scheduled
  • Verify visible sponsor attribution when required

Do not claim visual correctness from source inspection alone.

When browser tools are unavailable:

  • Provide exact run and verification steps
  • Request only the resulting screenshot, console output, or behavior needed

DEPLOYMENT RULES

Deployment requires A3 or explicit deployment authorization.

Before deployment:

  • Run required tests and build
  • Confirm environment-variable names
  • Confirm no secrets are in client output
  • Confirm deployment target and spend
  • Confirm health and smoke-check commands
  • Confirm rollback path

After deployment:

  • Verify the health endpoint
  • Verify the public URL
  • Exercise the Hook
  • Exercise or confirm fixture fallback
  • Check the deployed browser console
  • Record the deployment URL and evidence
  • Update HANDOFF.md

A URL existing is not proof that the current Hook works.

PULL REQUEST RULES

When A2 or A3 requires a PR, include:

  • What changed
  • Why it changed
  • Execution step IDs
  • Acceptance criteria covered
  • Verification commands and actual results
  • Screenshots when required
  • Known limitations
  • Risk or fallback notes
  • AI-use disclosure required by the project

Do not claim CI is green until current checks complete successfully.

Do not blanket-accept automated review suggestions.

For each review comment:

  • Confirm it applies
  • Fix valid correctness, security, or requirement issues
  • Reject irrelevant or scope-expanding suggestions with a reason
  • Rerun affected verification

PACKET PROTOCOL

Use packet mode only for HARNESS=paste or when user-visible output would otherwise truncate.

Start each packet with:

PART [k]/[m] Steps: [step IDs] Files: [files included]

Then provide:

  • Complete files
  • Exact commands
  • Verification instructions

End each packet with:

END PART [k]/[m] Reply “next” for PART [k+1]/[m].

Rules:

  • Split only on file boundaries
  • Never split one file across packets
  • Make no new design decisions between packets
  • Do not repeat completed files
  • Do not mark the step complete until all packets are applied and verified
  • Agent harness edits files directly and does not print full files merely for visibility

A1 OUTPUT CONTRACT

For one supervised step, report:

STEP [ID] — [Name] Phase: [phase] Autonomy: A1 Status: COMPLETE | BLOCKED | PARTIAL

Goal: [One concise sentence]

Changes:

  • [file or system area]: [what changed and why]

Verification:

  • [command/check]: [actual result]
  • Acceptance criteria: [IDs and status]

Decisions:

  • [implementation detail decided, if material]

Risks or limitations:

  • [only real remaining concerns, or NONE]

HANDOFF update:

  • Completed: [step ID or NONE]
  • Next: [step ID]
  • Clock/freeze status: [known status]

For HARNESS=paste, include complete files and commands using the packet protocol when necessary.

Stop after one step and wait for “ok,” unless I authorized another mode.

A2/A3 OUTPUT CONTRACT

For an autonomous phase, begin with:

PHASE [ID] — [Name] Autonomy: [A2|A3] Authorized steps: [IDs]

Then execute without routine progress questions.

At completion report:

  1. Phase outcome
  2. Steps completed
  3. Files and systems changed
  4. Verification and actual results
  5. Acceptance criteria completed
  6. Branch and commits
  7. PR status
  8. Deployment and live verification for A3
  9. Risks, fallbacks, and deferred work
  10. Clock and feature-freeze status
  11. Phase exit checklist
  12. Complete updated HANDOFF.md
  13. Learning document
  14. Next step

Stop only for abort conditions or required approval.

PHASE EXIT CHECKLIST

At every phase boundary, mark each item:

DONE SKIPPED — [reason] NOT APPLICABLE — [reason] BLOCKED — [reason]

Checklist:

  1. Planned phase steps resolved
  2. Phase done-when conditions satisfied
  3. Relevant acceptance criteria verified
  4. Hook characterization test passes
  5. New behavior tests pass
  6. Build, lint, and type checks pass where configured
  7. Live/fixture parity checked where relevant
  8. UI states and viewport checks completed where relevant
  9. No secrets or debug artifacts in diff
  10. Dependency and toolchain policy preserved
  11. Required documentation reflects current reality
  12. AI-use disclosure updated when required
  13. Branch and commit policy followed
  14. PR created or updated when authorized
  15. CI status checked when applicable
  16. Automated review comments triaged when applicable
  17. Deployment verified when authorized
  18. HANDOFF.md execution state updated
  19. Clock, cuts, and freeze status recorded
  20. Next step is unambiguous

Do not mark the phase complete when a required done-when condition remains unmet. Mark it BLOCKED or use the documented fallback.

LEARNING DOCUMENT

At the end of each A2 or A3 phase, provide a concise learning document.

Learning Document — Phase [ID]

Material Commands

List material commands in execution order:

  • Command with secrets redacted
  • What it did
  • Why it was needed
  • Result

Do not include every trivial navigation or read command.

Files Changed

For each meaningful file:

  • Path
  • NEW, MODIFIED, MOVED, or DELETED
  • What changed
  • Why it changed

How the Phase Changed the Project

Explain:

  • Capability now available
  • Connection to earlier work
  • What the next phase depends on
  • Side effects or limitations

Failures and Recoveries

Include:

  • Important failure
  • Evidence
  • Root cause
  • Fix or fallback
  • Lesson for later phases

Write “None” if there were no meaningful failures.

Review Notes

List 1–3 honest trade-offs or concerns a reviewer should know.

The learning document:

  • Is for understanding and continuity
  • Must not contain secrets
  • Is not automatically committed or submitted
  • Should remain concise

JUDGE-DAY RUNBOOK

The phase assigned by HANDOFF must produce and verify:

  • 60-second script with timestamps
  • Cold-start procedure
  • Demo-data reset
  • Live sponsor path
  • Fixture fallback path
  • 1280px laptop path
  • Required login preparation
  • Network-failure fallback
  • Public-URL failure fallback
  • Backup recording
  • Hero screenshot
  • Required submission links
  • Final five-minute smoke checklist

The runbook must reflect actual behavior, not planned behavior.

INTERRUPTION AND HARNESS SWITCH

When stopping mid-phase because of a blocker, pause, or harness switch:

  1. Finish or safely stop the current atomic file operation.
  2. Do not begin another execution step.
  3. Record partial work accurately.
  4. Record commands run and verification state.
  5. Record uncommitted files.
  6. Record the exact blocker.
  7. Set the next action.
  8. Print the complete updated HANDOFF.md.
  9. Print the Resume Block.
  10. Stop.

Do not mark a partially completed step DONE.

COMPLETION CONDITION

The project is complete only when:

  • Every required acceptance criterion passes
  • The Hook works
  • Required sponsor technology is demonstrably used
  • Fixture fallback works where permitted
  • Public deployment works when required
  • Tests and smoke checks pass
  • Required documentation is accurate
  • Demo and submission artifacts are complete
  • Judge-day runbook is verified
  • No secret or critical blocker remains
  • Final HANDOFF execution state says COMPLETE

At completion, provide:

  • Final outcome
  • Public URL
  • Repository/PR/release links when available
  • Acceptance-criteria summary
  • Verification evidence
  • Known limitations
  • Submission checklist
  • Final HANDOFF.md

Do not add celebratory filler or propose new features.

START HERE

If HANDOFF.md is missing:

  • Ask only for the complete Prompt 1 HANDOFF.md
  • Stop

If HANDOFF.md is present:

  • Detect the harness
  • Reconstruct repository state
  • Print the resume sheet
  • Execute the next authorized unit immediately unless blocked

Do not ask for the idea. Do not redesign the plan. Do not begin an unauthorized step. Do not claim success without verification.

CHECK: questions_this_turn=1 step=none autonomy=A1 packet=none stage=C

I'll look for the locked handoff and the repository state before deciding the next step.

The locked plan is in place. Next I’ll confirm the repo against the health and metadata step, then implement that step.

The scaffold is on main and walking-skeleton, and the health step is still open. I’ll continue that step on the phase branch.

The tests import a helper the runner cannot see. I’ll expose that helper as a fixture and rerun.

Three test failures are specific: validation locations, log capture, and secret text in configuration errors. I’ll confirm the config-error option, then fix those paths.

The local .env only contains the SerpApi key, so non-secret settings need the documented defaults or the API cannot start.

Resume

  • Project: Happen
  • Product thesis: An evidence-first tool that recommends one Bengaluru restaurant and arrival window, plus a fallback.
  • Locked Hook: Three restaurant timelines resolve until one interval is the recommended moment, with separate fit and confidence and a distinct fallback.
  • Harness: agent
  • Autonomy: A1
  • Repository and branch: kernelKain/happen on walking-skeleton. main is at the merged scaffold pull request, and the two branch trees matched before this step, so the remaining phase work is on walking-skeleton.
  • Working-tree state: Health and metadata changes are local and uncommitted.
  • Last completed step: P1.1, scaffold. P0 is also done.
  • Next step: P1.3, frontend shell
  • Current phase: P1, public walking skeleton. The phase is not complete.
  • Deadline: October 5, 2026 at 06:59 UTC. Feature freeze is build hour 19 and has not been reached.
  • Remaining known budget: Active hours are not measured. The wall clock to the deadline was about 28 hours at the start of this turn.
  • Live URL: Not deployed
  • Fixture status: No fixture installed. The API reports fixture_status=unavailable.
  • Largest current risk: The model is intentionally not loaded, so health stays degraded with HTTP 200.
  • Quality items already dropped: None
  • HANDOFF / repository discrepancy: Section 27 of docs/HANDOFF.md still says the work has not started. docs/HANDOFF2.md and git show P0 and the scaffold as done. Progress stays in HANDOFF2.md, so Section 27 was left unchanged. This chat’s A1 rule also means the health work was not committed.

STEP P1.2 — Build health, metadata, and safe config

Phase: P1 — public walking skeleton
Autonomy: A1
Status: COMPLETE

Goal: Serve health and metadata, with safe configuration, CORS, and errors, without loading the model.

Changes:

  • backend/src/happen_api/: FastAPI app with GET /healthz and GET /api/v1/meta, exact-origin CORS, a 16 KB body limit, JSON logs that redact credential-shaped fields, and a public error envelope.
  • backend/tests/: Contract and unit tests for those boundaries.
  • docs/HANDOFF2.md and docs/BUILD_LOG.md: Execution state and the decisions below.

Verification:

  • uv run ruff check src tests: passed
  • uv run pytest: 19 passed
  • Local app import: /healthz returned HTTP 200 as degraded / not_loaded in under one second, and llama_cpp was not imported
  • Acceptance criteria: AC-12, AC-14, AC-17, and AC-18 are covered for this API slice. AC-10 is limited to version and preset metadata. Public HTTPS is still P1.4.

Decisions:

  • Contract version is 1.0.0. Scoring policy is v1.
  • The metadata allowlist is Indiranagar, category restaurants, experience easier_conversation, and priorities conversation, short wait, then seating, from 18:00 to 21:00 in Asia/Kolkata.
  • A secrets-only .env still starts, because non-secret settings use the .env.example defaults and the model manifest. Live mode stays off until HAPPEN_LIVE_ENABLED is set.
  • Unknown paths use NOT_FOUND inside the existing error envelope. Interactive API docs are off.

Risks or limitations:

  • Health remains degraded until a later step loads the model and installs a fixture. That HTTP 200 is intentional.

HANDOFF update:

  • Completed: P1.2, uncommitted
  • Next: P1.3
  • Clock/freeze status: Feature freeze has not been reached. No spend.

Say ok to build the frontend shell.

CHECK: questions_this_turn=0 step=P1.2 autonomy=A1 packet=none stage=C

ok

P1.3 is the frontend shell: dark planner frame, metadata client, and the initial, loading, and service-error states. I’ll read the locked screen spec and the current frontend, then build that slice.

The shell will load metadata, keep the planner visible, and show loading, service-error, and contract-mismatch states without inventing a recommendation.

The planner works against the live API. The disabled primary button still looks available, so I’m making that state obvious and tightening the priority controls.

STEP P1.3 — Build the frontend shell

Phase: P1 — public walking skeleton
Autonomy: A1
Status: COMPLETE

Goal: Show the dark planner, load service metadata, and cover the initial, loading, and service-error states without inventing a recommendation.

Changes:

  • frontend/src/: Evening planner that loads /api/v1/meta, fills the Indiranagar preset, and keeps Find the moment off while the model is not ready. A failed request keeps the page and offers Retry. A contract major other than 1 asks for a refresh and disables submission.
  • frontend/tests/shell.spec.ts: Shell coverage at 1280×720 and 390×844, including keyboard restore and axe.
  • .env.example: Documents VITE_API_BASE_URL. Local dev leaves it unset and proxies /api to the API.

Verification:

  • npm test: 3 passed
  • npm run build: passed
  • npx playwright test: 5 passed, with no horizontal overflow at 1280×720 or 390×844
  • Live API at http://127.0.0.1:5173: Indiranagar loaded, keyboard restore returned 18:00, and the console had no errors. The Cursor browser was unavailable, so this check used Playwright.
  • Acceptance criteria: AC-01, AC-12, AC-15, and AC-16 are covered for this shell. The recommendation journey is still later.

Decisions:

  • Same-origin /api/v1/meta is the local default. A production build sets VITE_API_BASE_URL.
  • No motion was added. Status uses text, shape, and color together.
  • Measured text contrast is above 4.5:1. The production bundle does not contain the SerpApi key.

Risks or limitations:

  • Find the moment cannot run until a later step loads the model and adds the recommendation API.

HANDOFF update:

  • Completed: P1.3, uncommitted, on walking-skeleton
  • Next: P1.4
  • Clock/freeze status: Feature freeze has not been reached. No spend.

Say ok to add CI and the deployment config. That step does not deploy unless you explicitly allow it.

CHECK: questions_this_turn=0 step=P1.3 autonomy=A1 packet=none stage=C

Briefly inform the user about the task result and perform any follow-up actions (if needed). If there's no follow-ups needed, don't explicitly say that.

The local API and Vite servers used for the planner check have stopped. The frontend shell work is still in the working tree on walking-skeleton.

To look at it again, start the API from backend with uv run uvicorn happen_api.main:app --host 127.0.0.1 --port 8000, then start the page from frontend with npm run dev.

CHECK: questions_this_turn=0 step=none autonomy=A1 packet=none stage=C

ok

P1.4 is CI and the Render config. I’ll add those from the locked deployment plan and leave the push and the live services to you.

ok

The deployment files are the missing piece. I’ll add the workflow and Render blueprint, then run the same checks CI will run.

CI and the Render blueprint are in the working tree. Nothing is committed, pushed, or deployed.

GitHub Actions installs the locked backend and frontend, checks formatting, runs the backend tests and frontend unit tests, builds the frontend, and scans tracked files plus the production bundle for credential material. The scan prints a path and a rule name. Browser tests stay local. The Hook characterization test is not in the tree yet; the backend job will run it when it arrives.

render.yaml defines a free static site, happen-web, and one Python web service, happen-api, on the 1c-2g plan in Singapore. Measured memory after generation was 371.8 MB, under 80% of that plan. Move the service to 2c-4g only if a live timing run misses 30 seconds. Both services track walking-skeleton and deploy only after CI checks pass. The build leaves the model file for a later step. Live mode stays off. Production CORS and the frontend API origin come from the other service’s public HTTPS URL.

Local checks passed: Ruff format and lint, 21 backend tests, Biome, 3 frontend unit tests, the production build, 5 shell browser tests, and the secret scan of the tracked files and frontend/dist. GitHub has not run the workflow.

Your side:

  1. Ask for a commit if you want one, then push walking-skeleton and open the draft pull request. Wait until the ci workflow is green. The first backend run compiles llama-cpp-python and can take several minutes.
  2. In Render, create one Blueprint from this repo’s render.yaml.
  3. When Render prompts, set SERPAPI_API_KEY. Leave HF_TOKEN unset. This public model does not need it.
  4. Open the frontend URL and https://<api-host>/healthz. Paste those two URLs back here.
  5. Suspend happen-api after that check if you want the credits to last. 1c-2g is $25/month from the existing $50 credits and does not sleep. A later green push can deploy it again. The static site is free.

If the API deploy fails because the frontend origin is not ready, set CORS_ALLOWED_ORIGINS to the exact https:// frontend origin and redeploy once. If the native build cannot compile llama-cpp-python, stop there. The next coding step waits for those URLs.

CHECK: questions_this_turn=0 step=P1.4 autonomy=A1 packet=none stage=C

Execute the selected diff-tab commit-and-push action.

I’ll check the branch state and stage only the project files from this work, then commit and push.

Committed and pushed walking-skeleton as f96d8a8: “Add health, the planner shell, and the deployment blueprint.”

The branch is even with origin/walking-skeleton, and the working tree is clean. That push starts the ci workflow. The first backend job compiles llama-cpp-python, so it can take several minutes.

After the workflow is green, create one Render Blueprint from render.yaml, set SERPAPI_API_KEY when prompted, and paste the frontend URL and the health URL back here.

Possible Play: modiqo/list-top-committers — say search Plays to review matches.