Skip to content

Strengthen continuation brief directives - #268

Merged
hffmnnj merged 2 commits into
feat/compaction-prompt-replacementfrom
feat/compaction-prompt-strengthening
Aug 3, 2026
Merged

hffmnnj merged 2 commits into
feat/compaction-prompt-replacementfrom
feat/compaction-prompt-strengthening

Conversation

@hffmnnj

@hffmnnj hffmnnj commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

Adds four directives to the shared continuation-prompt formatter and covers them with tests.

Changes

  • continuation-prompt.ts (+4): New directives in the generated brief:
    • Prohibit verbatim reproduction of earlier continuation briefs; use them only as the anchored baseline.
    • State that the workspace and GoopSpecDB persist and are authoritative; re-query with goop_status and goop_read_db rather than relying on the brief alone.
    • Prohibit tool use during continuation-brief generation (reply with brief text only).
    • Prioritize the most recent user instructions and last explicit task direction near-verbatim, above older details, preserving exact identifiers, paths, and commands.
  • continuation-prompt.test.ts (+56): Five new test cases covering each directive plus a guard that the frozen formatter caps remain unchanged.

Scope

Only the shared formatter and its co-located tests are touched. No hook, type, capability, or DB-read changes. The V2 skipped list still excludes experimental.session.compacting, and no factory registers experimental.compaction.autocontinue.

Verification

  • bun test packages/opencode-plugin/src/shared/ packages/opencode-plugin/src/hooks/ --bail=3 --timeout=10000 — 455 pass, 0 fail
  • bun run --cwd packages/opencode-plugin typecheck — clean
  • bun run --cwd packages/opencode-plugin lint — 0 errors (warnings follow the existing non-null-assertion pattern in the test file)

hffmnnj added 2 commits August 2, 2026 10:51
Make continuation handoffs preserve the latest instruction context and verify durable state after resuming. Prevent recursive brief copying while clarifying that the summarization response contains only the generated brief.
Lock the strengthened continuation brief contract in focused behavioral tests. Verify recency, authoritative re-query, no-tool-use guidance, and the frozen formatter caps without changing production code.
Base automatically changed from feat/compaction-degradation-wiring to feat/compaction-prompt-replacement August 3, 2026 01:36
@hffmnnj
hffmnnj merged commit 515e5c1 into feat/compaction-prompt-replacement Aug 3, 2026
@hffmnnj
hffmnnj deleted the feat/compaction-prompt-strengthening branch August 3, 2026 01:36
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