fix(nextwave): harden Prime(post-flight) prompt against canonical-line drift under long CI#608
Merged
Conversation
Step 3e prompt template gains an Exit shape section (placed LAST so it is the most recent context when the agent emits its final message). Section declares the canonical line shape verbatim, lists three concrete PASS/FAIL/BLOCKED examples, and enumerates forbidden phrases — including the exact narration "Sleep is still running. Let me wait for the notification." that broke the contract on Plan #581 wave-2 flight-1. Adds polling-loop discipline (do not narrate between sleep iterations) and references the canonical-line regex so the agent can self-check. Regression coverage: TestPrimePostFlightCanonicalLineUnderLongCi in tests/test_nextwave_skill.py — 10 assertions over Exit shape position, verbatim shape, concrete examples, forbidden-phrase verbatim, polling discipline, Plan #581 reference, and regex citation. Closes #606
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 Prime(post-flight) sub-agent prompt in
skills/nextwave/SKILL.md(Step 3e) against the canonical-line failure observed during Plan #581 wave-2 flight-1 — where the sub-agent emitted"Sleep is still running. Let me wait for the notification."after aBash(sleep)returned, breaking the Orchestrator's regex parse and forcing manual recovery.Changes
skills/nextwave/SKILL.md— Added## Exit shapeas the LAST section of the Prime(post-flight) prompt template (Step 3e). Contains: canonical-line shape verbatim, three concrete PASS/FAIL/BLOCKED examples, forbidden-phrases list (incl. the exact Plan Plan: Wave-pattern hardening — operational backlog campaign A #581 narration), polling-loop discipline, regex citation, Plan Plan: Wave-pattern hardening — operational backlog campaign A #581 incident reference.tests/test_nextwave_skill.py— AddedTestPrimePostFlightCanonicalLineUnderLongCiclass with 10 regression tests.Test Plan
python3 -m pytest tests/test_nextwave_skill.py -v— 26 passed (16 pre-existing + 10 new)./scripts/ci/validate.sh— 126 passed, 0 failed (full gating subset)Reviewer Findings (non-blocking, follow-ups recommended)
skills/nextwave/SKILL.md:382-401has the SAME terminal-line shape and CI-poll exposure as Step 3e but wasn't hardened in this PR. Symmetric gap. Suggest follow-up to extract the Exit-shape block to a shared snippet referenced from both prompts.test_canonical_line_regex_citedregex is too loose — third alternative matches the canonical-line shape line itself, so the test passes even if the literal regex line is deleted. Worth tightening.Linked Issues
Closes #606