Skip to content

Commit af45a92

Browse files
author
NagyVikt
committed
new
1 parent b9d1b4c commit af45a92

8 files changed

Lines changed: 19 additions & 12 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ Use `openspec/plan/README.md` as the operational runbook and `openspec/plan/PLAN
238238
Default quick flow:
239239
1. Create/maintain `openspec/plan/<plan-slug>/`.
240240
2. Keep role `tasks.md` files current (`planner`, `architect`, `critic`, `executor`, `writer`, `verifier`).
241-
3. Keep checklist headings visible: `## 1. Spec`, `## 2. Tests`, `## 3. Implementation`, `## 4. Checkpoints`.
241+
3. Keep checklist headings visible: `## 1. Spec`, `## 2. Tests`, `## 3. Implementation`, `## 4. Checkpoints`, plus a final cleanup section (`## 5. Cleanup` or `## 6. Cleanup`).
242242
4. Update checkboxes continuously while work progresses.
243243
5. Execute from approved `planner/plan.md` with role ownership.
244244
6. Verify with evidence before archive/finish.

frontend/scripts/openspec/init-change-workspace.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ if [[ ! -f "${CHANGE_DIR}/tasks.md" ]]; then
6767
- [ ] 3.2 Run \`openspec validate ${CHANGE_SLUG} --type change --strict\`.
6868
- [ ] 3.3 Run \`openspec validate --specs\`.
6969
70-
## 4. Completion
70+
## 4. Cleanup
7171
7272
- [ ] 4.1 Finish the agent branch via PR merge + cleanup (\`gx finish --via-pr --wait-for-merge --cleanup\` or \`bash scripts/agent-branch-finish.sh --branch <agent-branch> --base <base-branch> --via-pr --wait-for-merge --cleanup\`).
7373
- [ ] 4.2 Record PR URL + final \`MERGED\` state in the completion handoff.

frontend/scripts/openspec/init-plan-workspace.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,11 @@ You are the \`${role}\` lane for shared plan \`${PLAN_SLUG}\`.
150150
- [ ] Leave a role handoff with files changed, verification, and risks.
151151
- [ ] Owner records \`accept\`, \`revise\`, or \`reject\` for joined output, or marks \`N/A\` if no helper joined.
152152
153-
## 6. Completion
153+
## 6. Cleanup
154154
155-
- [ ] Keep sandbox cleanup blocked until change tasks 4.1-4.3 are complete.
155+
- [ ] If this role owns finish, run \`gx finish --via-pr --wait-for-merge --cleanup\` or \`bash scripts/agent-branch-finish.sh --branch <agent-branch> --base <base-branch> --via-pr --wait-for-merge --cleanup\`.
156+
- [ ] Record PR URL + final \`MERGED\` state in the role handoff or owner change task.
157+
- [ ] Confirm sandbox cleanup, or capture a \`BLOCKED:\` handoff if finish is still pending.
156158
"
157159
done
158160

scripts/openspec/init-change-workspace.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ if [[ ! -f "${CHANGE_DIR}/tasks.md" ]]; then
6767
- [ ] 3.2 Run \`openspec validate ${CHANGE_SLUG} --type change --strict\`.
6868
- [ ] 3.3 Run \`openspec validate --specs\`.
6969
70-
## 4. Completion
70+
## 4. Cleanup
7171
7272
- [ ] 4.1 Finish the agent branch via PR merge + cleanup (\`gx finish --via-pr --wait-for-merge --cleanup\` or \`bash scripts/agent-branch-finish.sh --branch <agent-branch> --base <base-branch> --via-pr --wait-for-merge --cleanup\`).
7373
- [ ] 4.2 Record PR URL + final \`MERGED\` state in the completion handoff.

scripts/openspec/init-plan-workspace.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,11 @@ You are the \`${role}\` lane for shared plan \`${PLAN_SLUG}\`.
150150
- [ ] Leave a role handoff with files changed, verification, and risks.
151151
- [ ] Owner records \`accept\`, \`revise\`, or \`reject\` for joined output, or marks \`N/A\` if no helper joined.
152152
153-
## 6. Completion
153+
## 6. Cleanup
154154
155-
- [ ] Keep sandbox cleanup blocked until change tasks 4.1-4.3 are complete.
155+
- [ ] If this role owns finish, run \`gx finish --via-pr --wait-for-merge --cleanup\` or \`bash scripts/agent-branch-finish.sh --branch <agent-branch> --base <base-branch> --via-pr --wait-for-merge --cleanup\`.
156+
- [ ] Record PR URL + final \`MERGED\` state in the role handoff or owner change task.
157+
- [ ] Confirm sandbox cleanup, or capture a \`BLOCKED:\` handoff if finish is still pending.
156158
"
157159
done
158160

templates/scripts/openspec/init-change-workspace.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ if [[ ! -f "${CHANGE_DIR}/tasks.md" ]]; then
6767
- [ ] 3.2 Run \`openspec validate ${CHANGE_SLUG} --type change --strict\`.
6868
- [ ] 3.3 Run \`openspec validate --specs\`.
6969
70-
## 4. Completion
70+
## 4. Cleanup
7171
7272
- [ ] 4.1 Finish the agent branch via PR merge + cleanup (\`gx finish --via-pr --wait-for-merge --cleanup\` or \`bash scripts/agent-branch-finish.sh --branch <agent-branch> --base <base-branch> --via-pr --wait-for-merge --cleanup\`).
7373
- [ ] 4.2 Record PR URL + final \`MERGED\` state in the completion handoff.

templates/scripts/openspec/init-plan-workspace.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,11 @@ You are the \`${role}\` lane for shared plan \`${PLAN_SLUG}\`.
150150
- [ ] Leave a role handoff with files changed, verification, and risks.
151151
- [ ] Owner records \`accept\`, \`revise\`, or \`reject\` for joined output, or marks \`N/A\` if no helper joined.
152152
153-
## 6. Completion
153+
## 6. Cleanup
154154
155-
- [ ] Keep sandbox cleanup blocked until change tasks 4.1-4.3 are complete.
155+
- [ ] If this role owns finish, run \`gx finish --via-pr --wait-for-merge --cleanup\` or \`bash scripts/agent-branch-finish.sh --branch <agent-branch> --base <base-branch> --via-pr --wait-for-merge --cleanup\`.
156+
- [ ] Record PR URL + final \`MERGED\` state in the role handoff or owner change task.
157+
- [ ] Confirm sandbox cleanup, or capture a \`BLOCKED:\` handoff if finish is still pending.
156158
"
157159
done
158160

test/install.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4126,7 +4126,8 @@ test('OpenSpec plan workspace scaffold creates expected role/task structure', ()
41264126
assert.match(plannerTasks, /## 3\. Implementation/);
41274127
assert.match(plannerTasks, /## 4\. Checkpoints/);
41284128
assert.match(plannerTasks, /## 5\. Collaboration/);
4129-
assert.match(plannerTasks, /## 6\. Completion/);
4129+
assert.match(plannerTasks, /## 6\. Cleanup/);
4130+
assert.match(plannerTasks, /gx finish --via-pr --wait-for-merge --cleanup/);
41304131
assert.match(plannerTasks, /Claim this role's files in the shared owner branch\/worktree before editing/);
41314132

41324133
const plannerPrompt = fs.readFileSync(path.join(planDir, 'planner', 'prompt.md'), 'utf8');
@@ -4156,7 +4157,7 @@ test('OpenSpec change workspace scaffold creates proposal/tasks/spec defaults',
41564157
assert.equal(fs.existsSync(path.join(changeDir, 'specs', capabilitySlug, 'spec.md')), true, 'spec.md missing');
41574158

41584159
const tasksContent = fs.readFileSync(path.join(changeDir, 'tasks.md'), 'utf8');
4159-
assert.match(tasksContent, /## 4\. Completion/);
4160+
assert.match(tasksContent, /## 4\. Cleanup/);
41604161
assert.match(tasksContent, /gx finish --via-pr --wait-for-merge --cleanup/);
41614162
assert.match(tasksContent, /Record PR URL \+ final `MERGED` state in the completion handoff\./);
41624163
assert.match(tasksContent, /Confirm sandbox cleanup/);

0 commit comments

Comments
 (0)