Skip to content

Feature/handoff folder derivation - #20

Merged
Vince-Oswalt merged 3 commits into
mainfrom
feature/handoff-folder-derivation
Jul 28, 2026
Merged

Vince-Oswalt merged 3 commits into
mainfrom
feature/handoff-folder-derivation

Conversation

@Vince-Oswalt

Copy link
Copy Markdown
Contributor

Handoff docs now land where your project actually keeps them. The checkpoint tool used to suggest a fixed docs/ folder that matched almost nobody's repo, so agents fell back to guessing from whatever folders they found lying around, and sometimes guessed wrong. It now reads the folder off your project's own previous handoff doc, so after one good checkpoint a project stays on its real convention without anyone configuring anything. The per-day sequence number is derived the same way, from the files rather than from a count that could drift.

The checkpoint tool hardcoded a docs/ handoff folder that matched no
repo: both circle-docs and founders-os-docs keep handoffs in handoffs/,
and neither has a docs/ directory. The wrong default plus a stray
checkpoints/ folder led an agent to hand-roll the wrong artifact on
2026-07-27.

- deriveHandoffFolder() reads the folder off the previous checkpoint's
  handoff pointer, so a project self-corrects after one good checkpoint.
  The handler now selects metadata, which it previously omitted, leaving
  the structured pointer unavailable.
- nextHandoffSeq() reads -NN from today's stored pointers instead of
  counting checkpoint records. The old count collided when a handoff was
  written without a record, silently overwriting in a shared repo.
- checkpointWarnings() flags a missing or non-canonical handoff_doc, and
  flags memory_store used for a checkpoint. Nothing previously noticed
  drift at the moment it happened.
- Both derivations ignore non-canonical paths, so earlier drift is never
  taught forward.
- Export the handoff helpers and rewire three describes in
  surfaces-logic.test.ts to import them. That file mirrored every helper
  inline, so its tests could pass while shipping code broke. The
  remaining describes still mirror; converting them is a separate pass.
- Surface the resolved timezone, so a wrong filename date is diagnosable
  on a hosted or scheduled run where the host zone is not the user's.
@Vince-Oswalt
Vince-Oswalt merged commit 09142e7 into main Jul 28, 2026
2 checks passed
@Vince-Oswalt
Vince-Oswalt deleted the feature/handoff-folder-derivation branch August 13, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant