Skip to content

Commit 65cce2f

Browse files
committed
Update the OPSX application and proposal documentation, optimize the task implementation process, and emphasize the principles of stepwise verification and minimum self-consistent batches.
1 parent ef83406 commit 65cce2f

5 files changed

Lines changed: 73 additions & 36 deletions

File tree

.roo/commands/opsx-apply.md

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -80,27 +80,40 @@ Implement tasks from an OpenSpec change.
8080
- Remaining tasks overview
8181
- Dynamic instruction from CLI
8282

83-
6. **Implement tasks (loop until done or blocked)**
83+
6. **Implement exactly one rolling batch, then stop at a feedback gate**
8484

85-
For each pending task:
86-
- Show which task is being worked on
87-
- Make the code changes required
88-
- Keep changes minimal and focused
89-
- Mark task complete in the tasks file: `- [ ]``- [x]`
90-
- Continue to next task
85+
A batch is the smallest coherent change that can be reviewed, reverted, and validated independently. It is normally one pending implementation task, but split an oversized task in the tasks artifact before coding when it contains independently verifiable changes.
86+
87+
Before changing code:
88+
- First reconcile any CI/device result supplied for the earliest unresolved validation gate
89+
- If that result failed, select only the minimal repair for the current batch; do not advance to later implementation tasks
90+
- Otherwise select the first pending implementation, repair, or validation task
91+
- If the selected task is an external CI/device validation gate and no result is available, do not guess or edit code; stop and report the validation handoff
92+
93+
For the selected batch only:
94+
- Show which batch is being worked on
95+
- Make only the code, spec, and task-artifact changes required for that batch
96+
- Run only locally available checks permitted by project context
97+
- Mark an implementation task complete only when its specified implementation behavior is complete
98+
- Mark a CI/device validation task complete only from actual reported evidence, never from local inference
99+
- Stop after this batch or validation gate even if later tasks are clear; never begin a second code batch in the same invocation
91100

92101
**Pause if:**
93102
- Task is unclear → ask for clarification
94103
- Implementation reveals a design issue → suggest updating artifacts
95104
- A task needs work beyond what the spec and tasks describe, or you are tempted to drop, narrow, defer, or accept exceptions to specified behavior to make it fit → surface the added scope and ask; do not absorb it silently
96105
- Error or blocker encountered → report and wait for guidance
106+
- The batch is ready for CI/device feedback → report the handoff and stop
97107
- User interrupts
98108

99-
7. **On completion or pause, show status**
109+
7. **On batch completion or pause, show status**
100110

101111
Display:
102-
- Tasks completed this session
112+
- The single batch handled this session
103113
- Overall progress: "N/M tasks complete"
114+
- Files changed and local checks actually run
115+
- The exact next CI/device validation, expected result, and minimum evidence to return
116+
- Whether later implementation is gated on that evidence
104117
- If all done: suggest archive
105118
- If paused: explain why and wait for guidance
106119

@@ -109,13 +122,10 @@ Implement tasks from an OpenSpec change.
109122
```
110123
## Implementing: <change-name> (schema: <schema-name>)
111124
112-
Working on task 3/7: <task description>
113-
[...implementation happening...]
114-
✓ Task complete
115-
116-
Working on task 4/7: <task description>
125+
Working on batch for task 3/7: <task description>
117126
[...implementation happening...]
118-
✓ Task complete
127+
✓ Batch ready for CI/device validation
128+
⏸ Stopping before the next code batch
119129
```
120130

121131
**Output On Completion**
@@ -156,12 +166,14 @@ What would you like to do?
156166
```
157167

158168
**Guardrails**
159-
- Keep going through tasks until done or blocked
169+
- Process exactly one smallest coherent implementation/repair batch per invocation, then stop for feedback
170+
- Never accumulate a second code batch while the current batch lacks its required CI/device result
171+
- On failed CI/device feedback, repair only the current batch before progressing
160172
- Always read context files before starting (from the apply instructions output)
161173
- If task is ambiguous, pause and ask before implementing
162174
- If implementation reveals issues, pause and suggest artifact updates
163175
- Keep code changes minimal and scoped to each task
164-
- Update task checkbox immediately after completing each task
176+
- Update an implementation checkbox immediately after its behavior is complete, but keep external validation checkboxes open until actual evidence is reported
165177
- Pause on errors, blockers, or unclear requirements - don't guess
166178
- When a task needs work beyond what the spec describes, surface the added scope and pause - never silently narrow, defer, or simplify away specified behavior
167179
- Only mark a task `- [x]` when its specified behavior is fully implemented, not when it is partially done or deferred

.roo/commands/opsx-propose.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ After completing all artifacts, summarize:
128128
- The schema defines what each artifact should contain - follow it
129129
- Read dependency artifacts for context before creating new ones
130130
- Use `template` as the structure for your output file - fill in its sections
131+
- For task artifacts, prefer a thin rolling sequence: one independently verifiable implementation batch, its immediate CI/device feedback gate, then the next batch
132+
- Do not defer all CI/device validation to the end. Each gate must identify the applicable workflow/job or device scenario, expected result, and minimum evidence needed before later code work proceeds
133+
- If a proposed task contains multiple independently verifiable behavior changes, split it before implementation rather than relying on the apply phase to hold the entire change in context
131134
- **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
132135
- Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
133136
- These guide what you write, but should never appear in the output

.roo/skills/openspec-apply-change/SKILL.md

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -88,27 +88,40 @@ Implement tasks from an OpenSpec change.
8888
- Remaining tasks overview
8989
- Dynamic instruction from CLI
9090

91-
6. **Implement tasks (loop until done or blocked)**
91+
6. **Implement exactly one rolling batch, then stop at a feedback gate**
9292

93-
For each pending task:
94-
- Show which task is being worked on
95-
- Make the code changes required
96-
- Keep changes minimal and focused
97-
- Mark task complete in the tasks file: `- [ ]``- [x]`
98-
- Continue to next task
93+
A batch is the smallest coherent change that can be reviewed, reverted, and validated independently. It is normally one pending implementation task, but split an oversized task in the tasks artifact before coding when it contains independently verifiable changes.
94+
95+
Before changing code:
96+
- First reconcile any CI/device result supplied for the earliest unresolved validation gate
97+
- If that result failed, select only the minimal repair for the current batch; do not advance to later implementation tasks
98+
- Otherwise select the first pending implementation, repair, or validation task
99+
- If the selected task is an external CI/device validation gate and no result is available, do not guess or edit code; stop and report the validation handoff
100+
101+
For the selected batch only:
102+
- Show which batch is being worked on
103+
- Make only the code, spec, and task-artifact changes required for that batch
104+
- Run only locally available checks permitted by project context
105+
- Mark an implementation task complete only when its specified implementation behavior is complete
106+
- Mark a CI/device validation task complete only from actual reported evidence, never from local inference
107+
- Stop after this batch or validation gate even if later tasks are clear; never begin a second code batch in the same invocation
99108

100109
**Pause if:**
101110
- Task is unclear → ask for clarification
102111
- Implementation reveals a design issue → suggest updating artifacts
103112
- A task needs work beyond what the spec and tasks describe, or you are tempted to drop, narrow, defer, or accept exceptions to specified behavior to make it fit → surface the added scope and ask; do not absorb it silently
104113
- Error or blocker encountered → report and wait for guidance
114+
- The batch is ready for CI/device feedback → report the handoff and stop
105115
- User interrupts
106116

107-
7. **On completion or pause, show status**
117+
7. **On batch completion or pause, show status**
108118

109119
Display:
110-
- Tasks completed this session
120+
- The single batch handled this session
111121
- Overall progress: "N/M tasks complete"
122+
- Files changed and local checks actually run
123+
- The exact next CI/device validation, expected result, and minimum evidence to return
124+
- Whether later implementation is gated on that evidence
112125
- If all done: suggest archive
113126
- If paused: explain why and wait for guidance
114127

@@ -117,13 +130,10 @@ Implement tasks from an OpenSpec change.
117130
```
118131
## Implementing: <change-name> (schema: <schema-name>)
119132
120-
Working on task 3/7: <task description>
121-
[...implementation happening...]
122-
✓ Task complete
123-
124-
Working on task 4/7: <task description>
133+
Working on batch for task 3/7: <task description>
125134
[...implementation happening...]
126-
✓ Task complete
135+
✓ Batch ready for CI/device validation
136+
⏸ Stopping before the next code batch
127137
```
128138

129139
**Output On Completion**
@@ -164,12 +174,14 @@ What would you like to do?
164174
```
165175

166176
**Guardrails**
167-
- Keep going through tasks until done or blocked
177+
- Process exactly one smallest coherent implementation/repair batch per invocation, then stop for feedback
178+
- Never accumulate a second code batch while the current batch lacks its required CI/device result
179+
- On failed CI/device feedback, repair only the current batch before progressing
168180
- Always read context files before starting (from the apply instructions output)
169181
- If task is ambiguous, pause and ask before implementing
170182
- If implementation reveals issues, pause and suggest artifact updates
171183
- Keep code changes minimal and scoped to each task
172-
- Update task checkbox immediately after completing each task
184+
- Update an implementation checkbox immediately after its behavior is complete, but keep external validation checkboxes open until actual evidence is reported
173185
- Pause on errors, blockers, or unclear requirements - don't guess
174186
- When a task needs work beyond what the spec describes, surface the added scope and pause - never silently narrow, defer, or simplify away specified behavior
175187
- Only mark a task `- [x]` when its specified behavior is fully implemented, not when it is partially done or deferred

.roo/skills/openspec-propose/SKILL.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ After completing all artifacts, summarize:
136136
- The schema defines what each artifact should contain - follow it
137137
- Read dependency artifacts for context before creating new ones
138138
- Use `template` as the structure for your output file - fill in its sections
139+
- For task artifacts, prefer a thin rolling sequence: one independently verifiable implementation batch, its immediate CI/device feedback gate, then the next batch
140+
- Do not defer all CI/device validation to the end. Each gate must identify the applicable workflow/job or device scenario, expected result, and minimum evidence needed before later code work proceeds
141+
- If a proposed task contains multiple independently verifiable behavior changes, split it before implementation rather than relying on the apply phase to hold the entire change in context
139142
- **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
140143
- Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
141144
- These guide what you write, but should never appear in the output

openspec/config.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ context: |
55
Android 端使用 Kotlin/Java 与传统 View/Fragment;libcore 使用 Go、sing-box 官方内核和 gomobile 生成 AAR。
66
sing-box 版本以 nb4a.properties 的 SINGBOX_VERSION 为唯一真实来源。
77
本地不安装 Go、不克隆 sing-box,也不执行 Android/Go 编译;构建与真机验证交给 GitHub Actions。
8+
项目采用快速滚动验证:一次只实现一个最小自洽批次,随即交给 CI/真机验证;收到结果前不得继续累积后续代码修改。
89
外部依赖/API 调研应联网查阅官方源码和文档,不假设存在本地依赖仓库。
910
仓库当前能力规范位于 openspec/specs/;历史大型迁移记录位于 openspec/history/。
1011
仓库维护用 Python 工具只允许放在 tools/diagnostics/,不得放入 .roo/、openspec/ 或仓库根目录。
@@ -18,12 +19,18 @@ rules:
1819
- 使用 RFC 2119 风格的 MUST/SHALL 表达可验证要求。
1920
- 每条 requirement 至少包含一个 GIVEN/WHEN/THEN 场景。
2021
tasks:
21-
- 将规范同步、静态校验和 CI/真机验证显式列为适用任务。
22+
- 将实现拆成可独立审查、回退和验证的最小自洽批次;一个任务不得混合多个可独立验证的行为变化。
23+
- 每个实现批次后立即安排对应的 CI/真机验证闸门,再列下一实现批次;不得把所有验证集中到变更末尾。
24+
- 验证闸门应写明适用的 CI workflow/job、真机场景、预期结果和需要回传的证据;不适用的验证必须注明原因。
25+
- 将规范同步和本地静态校验纳入对应实现批次,不要为形式完整而制造不提供反馈价值的独立任务。
2226

2327
operations:
2428
apply:
2529
guidance:
26-
- 保持小步、自洽改动;本地仅运行不依赖 Go/Android SDK 的静态校验。
30+
- 每次调用只处理一个最小自洽批次,然后停止并交付 CI/真机验证;即使后续任务清晰也不得连续实现。
31+
- 开始新批次前先处理上一批次的 CI/真机结果;失败时只修复当前批次,不得推进后续任务。
32+
- 本地仅运行不依赖 Go/Android SDK 的静态校验;不得用本地推断替代 CI/真机证据。
33+
- 没有实际验证结果时,不得勾选 CI/真机验证任务;应报告待执行验证、预期结果和需要回传的最小证据。
2734
- 若改变架构、关键模块、协议、配置、构建流程或维护工具布局,同步更新对应主规范。
2835
- Python 辅助程序放入 tools/diagnostics/,通过 uv run 执行;不得向 .roo/ 或 openspec/ 写入运行脚本。
2936
archive:

0 commit comments

Comments
 (0)