fix(workflows): persist read-only node outputs via bash bridges in archon-refactor-safely#1734
Conversation
…chon-refactor-safely The analyze-impact and plan-refactor nodes are intentionally read-only (denied_tools: [Write, Edit, Bash]) but their prompts instructed the AI to write files. This caused the AI to waste turns searching for unavailable tools, and the plan/analysis was never persisted to disk. The execute-refactor node then failed to read the plan file, resulting in zero work done despite the workflow reporting completed. Changes: - Update prompts to output analysis/plan directly (captured as node output) instead of attempting file writes - Add persist-impact and persist-plan bash nodes to bridge the context boundary by writing node outputs to $ARTIFACTS_DIR files - Update dependency chain: plan-refactor depends on persist-impact, execute-refactor depends on persist-plan Closes coleam00#1477
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe ChangesRefactor Workflow Output Persistence
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Review SummaryVerdict: ready-to-merge Your fix correctly resolves the issue where read-only nodes with Blocking issuesNone. Suggested fixesNone. Minor / nice-to-haveNone — this PR is clean. Compliments
Reviewed via maintainer-review-pr workflow (Pi/Minimax). Aspects run: code-review. |
Summary
The
archon-refactor-safelyworkflow silently drops the impact analysis and refactoring plan at context boundaries, causing the execute node to find no plan and report success with zero changes.Fixes #1477
Root Cause
The
analyze-impactandplan-refactornodes havedenied_tools: [Write, Edit, Bash](correctly — they should be read-only). However, their prompts instruct the AI to write files to$ARTIFACTS_DIR. The AI then wastes turns searching for unavailable tools, and the plan is never persisted. The downstreamexecute-refactornode tries to read the plan file — it doesn't exist.Changes
Updated prompts: Changed "Write to
$ARTIFACTS_DIR/..." → "Produce your output below" so the AI outputs the analysis/plan directly (captured as$node.output) instead of attempting unavailable file writes.Added
persist-impactbash node: Writes$analyze-impact.outputto$ARTIFACTS_DIR/impact-analysis.mdafter the analysis node completes.Added
persist-planbash node: Writes$plan-refactor.outputto$ARTIFACTS_DIR/refactor-plan.mdafter the plan node completes.Updated dependency chain:
plan-refactordepends onpersist-impact(so the file exists when the plan node reads it),execute-refactordepends onpersist-plan(so the plan file exists when execution begins).Regenerated bundled defaults (
bun run generate:bundled).Type of change
How Has This Been Tested?
bun run type-check— passesbun run generate:bundled— regenerated successfully (36 commands, 20 workflows)scan-scope → analyze-impact → persist-impact → plan-refactor → persist-plan → execute-refactor → validate → ...bun run testare pre-existing upstream (verified by running tests on clean upstream/dev)Checklist
Summary by CodeRabbit