feat(loop): allow run_loop.sh to automatically load existing plan if --plan is omitted
This commit is contained in:
@@ -147,7 +147,7 @@ import os, json
|
||||
d = json.loads(os.environ.get('MAM_STATE_JSON', '{}'))
|
||||
target_agent = os.environ.get('TARGET_AGENT')
|
||||
reviewers = [s.get('name') for s in d.get('tmux_sessions', [])
|
||||
if s.get('role') == 'reviewer' and s.get('name') != target_agent]
|
||||
if 'reviewer' in s.get('role', '') and s.get('name') != target_agent]
|
||||
print(','.join(reviewers))
|
||||
"
|
||||
}
|
||||
@@ -185,9 +185,9 @@ resolve_planner_session() {
|
||||
MAM_STATE_JSON="$(load_state_json)" python3 -c "
|
||||
import os, json
|
||||
d = json.loads(os.environ.get('MAM_STATE_JSON', '{}'))
|
||||
planner = 'canary-projects-multi-agent-mux-planner-claude'
|
||||
planner = 'canary-projects-multi-agent-mux-planner-reviewer-claude'
|
||||
for s in d.get('tmux_sessions', []):
|
||||
if s.get('role') == 'planner':
|
||||
if 'planner' in s.get('role', ''):
|
||||
planner = s.get('name')
|
||||
break
|
||||
print(planner)
|
||||
@@ -312,6 +312,11 @@ if [ "$PLAN_MODE" = true ]; then
|
||||
log_success "Interactive planning completed. Plan finalized."
|
||||
else
|
||||
log_info "=== Phase 1: Self-Planning Mode (Direct Execution) ==="
|
||||
EXISTING_PLAN_FILE=".agents/reports/canary-projects-multi-agent-mux-planner-reviewer-claude/report-final.md"
|
||||
if [ -f "$EXISTING_PLAN_FILE" ]; then
|
||||
log_info "Found existing promoted plan at '$EXISTING_PLAN_FILE'. Loading plan..."
|
||||
CURRENT_PLAN=$(cat "$EXISTING_PLAN_FILE")
|
||||
fi
|
||||
fi
|
||||
|
||||
# ===========================================================================
|
||||
@@ -324,8 +329,8 @@ log_info "=== Phase 2: Code Implementation ==="
|
||||
BASE_COMMIT=$(git rev-parse HEAD 2>/dev/null || echo "")
|
||||
|
||||
EXECUTION_PROMPT="다음 작업 목표를 완성해주세요: $TASK"
|
||||
if [ "$PLAN_MODE" = true ]; then
|
||||
EXECUTION_PROMPT="최종 합의된 다음 계획서에 입각하여 코드를 수정 및 구현해주세요. 계획서:\n$CURRENT_PLAN"
|
||||
if [ -n "$CURRENT_PLAN" ]; then
|
||||
EXECUTION_PROMPT="이미 수립된 다음 계획서에 입각하여 작업자의 판단하에 코드를 구현하고 작업 목표를 완성해주세요. 계획서:\n$CURRENT_PLAN\n\n작업 목표: $TASK"
|
||||
fi
|
||||
|
||||
EXEC_JOB_OUTPUT=$(bash .agents/skills/multi-agent-mux-delegate-job/multi-agent-mux-delegate-job submit \
|
||||
|
||||
Reference in New Issue
Block a user