feat: add true terminal states to all workflows#284
Merged
Conversation
…struction Remove all outgoing transitions from final states of 14 workflows to make them truly terminal. Add $DONE_DEFAULT placeholder that instructs agents to present results and create PRs (on GitHub repos) without transitioning to any other state. Key changes: - Updated ProjectDocsManager to include $DONE_DEFAULT with explicit 'do NOT transition' instruction - Removed all transitions from final states in 13 workflows - Added explicit 'done' state to TDD workflow (exits TDD cycle) - Deleted obsolete state-machine.ts (100% dead code) - Updated test expectations for new $DONE_DEFAULT value All 385+286+64 tests pass.
f0e9558 to
61dac6a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
$DONE_DEFAULTinstruction that explicitly tells agents to present results and create PRs without transitioning to any other statestate-machine.ts(100% dead code with zero usage)Changes
Core
ProjectDocsManager.getVariableSubstitutions()to include$DONE_DEFAULTwith explicit "do NOT transition" instructionpackages/core/src/state-machine.ts(dead code)packages/core/src/index.tsWorkflows (14 final states updated)
All final states now have
transitions: []and$DONE_DEFAULTin theirdefault_instructions:donestate;feature_completenow transitions todoneinstead of looping back toexploreTests
project-docs-manager.test.tsto match new$DONE_DEFAULTvalueKey Decision
The
$DONE_DEFAULTinstruction now explicitly states: "Do NOT transition to any other state — this is a terminal state." This ensures agents understand they should not attempt to proceed to another phase when reaching a final state.