You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add transition: marks code→test→review→merge stages as pass,
sets FlowRun to completed. Idempotent.
- Add op to flow_control tool.
- Goal complete validates FlowRun terminal state via .
Blocks completion if FlowRunRef exists and FlowRun is not finalized.
- Add hook to createGoalTool for pre-complete validation.
- Export for testing.
- Add 13 new tests (6 finalize + 7 blockers).
- Update docs: architecture.md, configuration.md.
Closes#80
@@ -184,15 +186,16 @@ function createFlowControlTool(
184
186
goalClient: ReturnType<typeofcreateGoalClient>,
185
187
){
186
188
returntool({
187
-
description: `Control the FlowRun lifecycle: start a FlowRun, transition stages, and start tasks.
189
+
description: `Control the FlowRun lifecycle: start a FlowRun, transition stages, start tasks, and finalize completed runs.
188
190
189
191
Operations:
190
192
- run-start: Transition FlowRun from planned → running. Binds Goal to FlowRun.
191
193
- stage-start: Start a stage (requirements/design/tasks/code). Requires prerequisites met.
192
194
- stage-complete: Complete a stage (requirements/design/tasks). Requires all checks pass.
193
-
- task-start: Start a task (pending/ready → running). Freezes TDD policy and sets execution binding.`,
195
+
- task-start: Start a task (pending/ready → running). Freezes TDD policy and sets execution binding.
196
+
- run-finalize: Mark code→test→review→merge stages as pass, set FlowRun to completed. Requires all Tasks merged. Idempotent.`,
194
197
args: {
195
-
op: tool.schema.enum(["run-start","stage-start","stage-complete","task-start"]).describe("Flow control operation"),
198
+
op: tool.schema.enum(["run-start","stage-start","stage-complete","task-start","run-finalize"]).describe("Flow control operation"),
196
199
parent_issue_number: tool.schema.number().describe("Parent GitHub Issue number containing the FlowRun"),
197
200
stage: tool.schema.enum(["requirements","design","tasks","code","test","review","merge"]).optional().describe("Stage name (for stage-start/stage-complete)"),
198
201
task_id: tool.schema.string().optional().describe("Task ID (for task-start)"),
0 commit comments