fix: harden forge command prompt against DCP context compression - #55
Open
jflowers wants to merge 1 commit into
Open
fix: harden forge command prompt against DCP context compression#55jflowers wants to merge 1 commit into
jflowers wants to merge 1 commit into
Conversation
Restructure forge.md to prevent the review-before-complete quality gate from being lost under context compression: - Add Critical Invariants section at top of file - Embed ordering constraint directly in step 7 text - Move review rule to 1st position in Rules section - Inline strategy selection into decompose step - Inline error recovery into monitoring step - Merge Completion section into step 8 sub-items - Add skip_review prohibition to invariants All original content preserved (17 MCP tool references verified). No behavioral changes to the forge workflow. Closes unbound-force#47 Assisted-by: claude-opus-4-6 Generated with AI assistance (claude-opus-4-6)
yvonnedevlinrh
force-pushed
the
opsx/forge-dcp-hardening
branch
from
August 4, 2026 16:12
643e740 to
b389f4b
Compare
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
Restructures the
/forgecommand prompt (internal/agentkit/content/commands/forge.md) to survive DCP context compression, fixing the quality gate vulnerability where the review-before-complete ordering constraint was lost under compression.Addresses all four fragilities identified in #47:
Additionally documents the
skip_review: trueAPI bypass discovered during spec review and adds a prohibition to the Critical Invariants section.How to Test
How to Demo
Read
internal/agentkit/content/commands/forge.mdand verify the restructured prompt:Key Files Changed
internal/agentkit/content/commands/forge.mdopenspec/changes/forge-dcp-hardening/proposal.mdopenspec/changes/forge-dcp-hardening/design.mdopenspec/changes/forge-dcp-hardening/specs/forge-prompt-structure.mdopenspec/changes/forge-dcp-hardening/tasks.mdThis PR was generated by /uf.finale (AI-assisted).