Problem
When re-invoking an agent for revision (plan-critic returns REVISE) or remediation (reviewer returns BLOCKING), the coordinator constructs the re-invocation prompt as only the new feedback, without the full baseline agent context. The prompt-integrity hook detects this as shrinkage and fires, requiring the coordinator to manually reconstruct the full context before retrying.
This is a distinct failure mode from #1002 (which covers research-skip pipelines where the planner template itself is not reloaded). The revision/remediation case is: agent was invoked correctly the first time (full context), plan-critic/reviewer returned feedback, and the coordinator passed ONLY the feedback to the second invocation instead of baseline + feedback.
Evidence
Issue #991 pipeline run (2026-05-24):
- STEP 5.5 plan-critic returned REVISE with ADR-1 falsified. Coordinator re-invoked planner with 661-word prompt vs 1537-word baseline → prompt-integrity fired
- STEP 11 reviewer BLOCKING fix: re-invoked implementer with 680-word prompt vs 1380-word baseline → prompt-integrity fired
- Both required manual context reconstruction before the re-invocation succeeded
Pattern: every revision/remediation cycle costs 1 extra agent invocation (the blocked attempt) plus coordinator overhead to reconstruct.
Suggested Fix
Add a helper function to plugins/autonomous-dev/lib/prompt_integrity.py:
def construct_revision_prompt(agent_type: str, baseline_context: str, feedback: str) -> str:
\"\"\"Construct a revision/remediation prompt that passes prompt-integrity checks.
Combines the full baseline context with the feedback suffix, ensuring the
resulting prompt meets the minimum word count threshold the prompt-integrity
hook measures against.
\"\"\"
return f\"{baseline_context}\\n\\n## REVISION FEEDBACK\\n{feedback}\"
The coordinator implement.md STEP 5.5b (plan revision) and STEP 11 (remediation cycle) should document that re-invocations MUST pass baseline_context + feedback, not just feedback. A COORDINATOR FORBIDDEN note: "Passing only feedback to revision/remediation re-invocations — always include full agent baseline context."
This is analogous to the existing pattern in STEP 4 (research skip) where the coordinator must explicitly reconstruct the planner template.
Repo: autonomous-dev
Session: 2026-05-24T01:17:32
Related: #1002 (research-skip shrinkage — different trigger, same hook)
Plugin Version: 3.50.0 (fcfec4b)
Filed automatically by continuous-improvement-analyst
Problem
When re-invoking an agent for revision (plan-critic returns REVISE) or remediation (reviewer returns BLOCKING), the coordinator constructs the re-invocation prompt as only the new feedback, without the full baseline agent context. The prompt-integrity hook detects this as shrinkage and fires, requiring the coordinator to manually reconstruct the full context before retrying.
This is a distinct failure mode from #1002 (which covers research-skip pipelines where the planner template itself is not reloaded). The revision/remediation case is: agent was invoked correctly the first time (full context), plan-critic/reviewer returned feedback, and the coordinator passed ONLY the feedback to the second invocation instead of baseline + feedback.
Evidence
Issue #991 pipeline run (2026-05-24):
Pattern: every revision/remediation cycle costs 1 extra agent invocation (the blocked attempt) plus coordinator overhead to reconstruct.
Suggested Fix
Add a helper function to
plugins/autonomous-dev/lib/prompt_integrity.py:The coordinator
implement.mdSTEP 5.5b (plan revision) and STEP 11 (remediation cycle) should document that re-invocations MUST passbaseline_context + feedback, not justfeedback. A COORDINATOR FORBIDDEN note: "Passing only feedback to revision/remediation re-invocations — always include full agent baseline context."This is analogous to the existing pattern in STEP 4 (research skip) where the coordinator must explicitly reconstruct the planner template.
Repo: autonomous-dev
Session: 2026-05-24T01:17:32
Related: #1002 (research-skip shrinkage — different trigger, same hook)
Plugin Version: 3.50.0 (fcfec4b)
Filed automatically by continuous-improvement-analyst