fix: harden /handoff command against DCP context compression - #58
Open
jflowers wants to merge 1 commit into
Open
fix: harden /handoff command against DCP context compression#58jflowers wants to merge 1 commit into
jflowers wants to merge 1 commit into
Conversation
- Add explicit step ordering constraint (MUST language) - Add forge precondition check (SHOULD, graceful degradation) - Add per-step dependency rationale to resist reordering - Inline handoff note template into org_session_end step - Remove separate "Handoff Note Template" section - Add structural content test (5 assertions) - Add OpenSpec change artifacts (proposal, design, spec, tasks) Fixes unbound-force#50 Assisted-by: claude-opus Generated with AI assistance (claude-opus)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hardens the
/handoffcommand prompt against DCP context compression to prevent step reordering, template loss, and unsafe reservation releases during compressed sessions.Under DCP context compression, the original handoff.md suffered three fragilities: numbered steps could be reordered or merged, the handoff note template section could be dropped entirely, and no precondition check prevented releasing reservations while forge workers were active. This is the same class of vulnerability as unbound-force/unbound-force#346 (review-pr confirmation gate bypass).
Fixes #50.
How to Test
Verify the following structural properties:
org_session_endstep sectionHow to Demo
Read the hardened
handoff.mdfile and observe the structural changes: explicit ordering constraint, forge precondition check (step 0), per-step dependency rationale, and inlined handoff note template in step 5. Run the test to see the 5 structural assertions pass.Key Files Changed
internal/agentkit/content/commands/handoff.mdinternal/agentkit/agentkit_test.goTestHandoffMD_StructuralHardeningwith 5 assertionsopenspec/changes/harden-handoff-dcp/proposal.mdopenspec/changes/harden-handoff-dcp/design.mdopenspec/changes/harden-handoff-dcp/specs/*.mdopenspec/changes/harden-handoff-dcp/tasks.mdThis PR was generated by /uf.finale (AI-assisted).