refactor: simplify scenario execution by removing complex turn manage…#166
Conversation
15dddc2 to
c3cf697
Compare
77a92af to
9fdb87c
Compare
…ment - Remove pendingRolesOnTurn, pendingAgentsOnTurn, and turn orchestration logic - Simplify user(), agent(), judge() methods to call agents directly - Replace complex proceed() with simple user→agent→judge loop - Remove scriptCallAgent and callAgent abstraction layers - Keep fail-fast judge evaluation behavior - Reduce code complexity from 682 lines to 136 lines in execution system This maintains the same functionality while dramatically simplifying the codebase.
- Create scenario-execution.utils.ts with ScenarioExecutionUtils export - Move convertAgentReturnTypesToMessages and extractErrorInfo to utils - Update scenario-execution.ts to import and use utils - Improve file structure compliance with single responsibility principle
- Simplify overly verbose class and method documentation - Remove implementation details from API docs - Focus on essential usage information - Keep docs concise and user-focused
912626a to
7d09aff
Compare
|
[grinder] BLOCKED — ACs not met, human decision needed This PR (Nov 2025) aimed to simplify scenario execution from 682 → 136 lines by removing complex turn management. The main branch has since expanded the same files to 1,614 lines with substantially different architecture (voice adapter pattern, progressive discovery tools, span collectors, etc.). During rebase, all 5 commits with conflicts in `scenario-execution.ts` were resolved in favor of HEAD — the simplification could not be applied without losing significant functionality added to main since Nov 2025. What was actually merged: utility/doc additions from non-conflicted commits
What was NOT applied: core simplification — user/agent/judge method rewrites, removal of turn orchestration. CI: green (zero failing, zero pending — ci-checks skipped) Options for Drew:
Keeping the `grinding` label pending your decision. |
|
[grinder] BLOCKED — ACs superseded, needs human decision This Nov 2025 simplification (682→136 lines) is superseded by HEAD's 1614-line evolution. Conflicts resolved in favor of HEAD throughout rebase but the core AC (reduce to 136 lines) is fundamentally unmet. Needs Drew to decide: close as superseded, or rewrite ACs to match current HEAD? Removing |
…ommands ScenarioExecutionStateLike is used (onTurn/onStep callbacks); the wider ScenarioExecutionLike was imported but never referenced. Flagged by github-code-quality bot on PR #166. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Automated low-risk assessment This PR was evaluated against the repository's Low-Risk Pull Requests procedure.
An approving review has been submitted by automation. The PR may merge once required CI checks pass. |
|
[grinder] Standing skip — per operator instructions This PR (#166) is listed in the grinder's skip list alongside #154 and #185. CI is green and it shows MERGEABLE, but the standing instruction from the session operator says to skip this PR entirely. Removing |
|
Closing as superseded by #561 (voice/TS consolidation). This PR modifies |
…ment
This maintains the same functionality while dramatically simplifying the codebase.