- fetch_pr_review_decision now sets REVIEW_DECISION/REVIEW_GUIDANCE globals
instead of printf to stdout (multiline guidance broke cut-based parsing)
- ACCEPT handler instructs model to update PR body with Design forks section
so fetch_pr_answers can detect the answers phase on subsequent runs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add bash precondition checks to skip model invocation when:
- No vision issues exist AND no open architect PRs to handle
- Already at max 3 open architect PRs AND no ACCEPT/REJECT responses to process
This avoids $0.28+ empty runs where the model reads context and concludes 'no work'.
The model is only invoked when there's actual work: new pitches or response processing.
When the architect processes human answers to design questions (answer_parsing step),
it now resumes the session from the research/questions run instead of starting fresh.
This preserves Claude's deep codebase understanding from the research phase, ensuring
sub-issues include specific file references and implementation details.
Changes:
- architect-run.sh: Added detect_questions_phase() to check if PR is in questions phase
(has `## Design forks` section and question comments). If so, resume the session
from SID_FILE to preserve context.
- formulas/run-architect.toml: Documented session resumption behavior in answer_parsing step.
Session is only preserved when PR is in questions-awaiting-answers phase. Fresh sessions
are started for new pitches (no stale context from old sprints).
Remove check_memory() from lib/formula-session.sh and update all *-run.sh scripts
to use memory_guard() from lib/env.sh.
Changes:
- lib/formula-session.sh: Removed check_memory() function and its documentation
- gardener/gardener-run.sh: Replaced check_memory(2000) with memory_guard(2000)
- planner/planner-run.sh: Replaced check_memory(2000) with memory_guard(2000)
- architect/architect-run.sh: Replaced check_memory(2000) with memory_guard(2000)
- predictor/predictor-run.sh: Replaced check_memory(2000) with memory_guard(2000)
- supervisor/supervisor-run.sh: Replaced check_memory(2000) with memory_guard(2000)
Benefits:
- Only one memory check function exists now
- All agents use the same function
- No dependency on free command - uses /proc/meminfo which is more portable