feat(sdlc-analyze): 擴充為兩段式,第二段把共識變成工作包議題

第一段到共識摘要為止仍然完全不寫入;使用者點頭之後才進入第二段建立議題。
邊界條文隨之改寫成「共識摘要之前不對 Gitea 產生任何寫入」,並明列第二段
不做的事:不建相依、不掛 Milestone、不加看板、不寫人天估算——那些是後續
流程的工作,寫在這裡會讓兩顆工作包互相踩。

工作包的切法、標題規則(動詞加名詞、禁止 WP-01 這類流水編號)、待辦與驗收
的巢狀寫法(附可照抄的範例)、架構圖依性質三選一,都在這一段定下來。

邊界的斷言跟著條文一起改,因為條文換了語意;分開成兩顆 commit 的話中間那顆
會是紅的。另補一條斷言:第一段不得出現任何寫入型腳本的名字。

Closes #7

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-17 05:43:24 +00:00
co-authored by Claude Opus 5
parent 35bafcc928
commit 0cd25d49d4
2 changed files with 94 additions and 8 deletions
+9 -2
View File
@@ -76,13 +76,20 @@ test('正本規定最後輸出共識摘要,且摘要只印不寫', () => {
assert.match(prompt, /不寫回議題/);
});
test('正本把「不對 Gitea 寫入」寫成明確邊界', () => {
test('正本把「共識摘要之前不寫入」寫成明確邊界', () => {
const boundary = prompt.slice(prompt.indexOf('## 邊界'));
assert.match(boundary, /不對 Gitea 產生任何寫入/);
assert.match(boundary, /共識摘要之前不對 Gitea 產生任何寫入/);
assert.match(boundary, /不建議題/);
assert.match(boundary, /不留留言/);
});
test('第一段在共識摘要之前不叫用任何寫入型腳本', () => {
const analysis = prompt.slice(prompt.indexOf('## 第一段'), prompt.indexOf('## 第二段'));
for (const writer of ['issue-create', 'issue-update', 'issue-link', 'project-add', 'timer']) {
assert.equal(analysis.includes(writer), false, `第一段不該出現寫入型腳本 ${writer}`);
}
});
test('正本要求先看未處理留言數,不是 0 就提示先整併', () => {
assert.match(prompt, /未處理留言數/);
assert.match(prompt, /sdlc-sync/);