Applies the P0-P3 fixes from the multi-agent-mux-loop audit
(.mam/jobs/ab686e47/claude-reports/report-final.md):
- P0-1: capture BASE_COMMIT before Phase 2 and diff against it, so reviewer
diffs stay non-empty and cumulative even after the Creator commits per the
documented DoD (bare `git diff` alone showed nothing once committed).
- P0-2: has_verdict now matches only the report's last non-blank line, so a
stray [VERDICT: ...] token quoted mid-report as a formatting example can no
longer flip the outcome.
- P1-1: replace the English-only refactor/complex/design/architect keyword
sniff (dead code against Korean-language reviewer reports) with an explicit
[ESCALATE: PLANNER] tag the reviewer prompt now asks for.
- P1-2: resolve_all_reviewers/resolve_agent_type/resolve_planner_session now
read through lib.sh's load_state_json single source of truth instead of
each hand-rolling its own SQLite+YAML lookup; resolve_agent_type's name
fallback matches exact hyphen segments instead of a substring `in` check.
- P2-1: warn when --all-reviewer and --reviewer are both given, since the
latter is silently discarded.
- P2-2: correct the SKILL.md CLI-mapping table row that overstated an
automated lint gate and an unconditional Planner feedback loop.
- P3: fix lib.sh shellcheck SC2164 (unguarded cd in start_watchdog) and
annotate the intentional SC2317 dual source/exec guard.
Verified: shellcheck clean on both scripts, bash -n syntax OK, and the
rewritten has_verdict/resolve_* functions were unit-tested against this
repo's live .mam/agent-sessions state.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Update the multi-agent workflow guidelines to explicitly specify that
agent sessions should not be stopped automatically upon receiving a PASS
verdict. Instead, they must remain in a standby (running) state, awaiting
further task instructions from the user, consistent with the project's
lifecycle charter.
Implement a clean_surrogates helper inside lib.sh's load_state_json function
to recursively replace lone surrogates (e.g. from partial TUI screen dumps)
with replacement chars before printing, preventing UnicodeEncodeError on stdout.
Correct scripts/generate-env.sh -> deploy/generate-env.sh and update shellcheck unlinted count in both English and Korean versions, as eb733cf already resolved the generate-env.sh lint gap.
Addresses Reviewer Claude's non-blocking nit.
- Allow slow-starting node standalone CLI processes to boot without false-positive timeouts
- Mitigate disk I/O constraints on isolated DB provisioning
- Align symlink and copy paths directly under isolation root (no data/ intermediate directory)
- Correctly restore global settings and SQLite databases for standalone CLI execution
- Symlink all database files inside data/db/ under isolation root
- Prevent cline CLI from bouncing back to the initial Welcome provider selection screen
- Update default ISOLATE value to 1 in create_session.sh
- Add --no-isolate option to allow opting out of directory isolation if desired
- Keep --isolate flag for legacy syntax compatibility
- Align step label languages to Korean (R-2)
- Reintroduce -r $UUID and --dangerously-skip-permissions to claude spawn (R-1)
- Add isolation environment path mapping caveats pointing back to authorative SKILL.md (R-3)