Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .claude/.idd/attachments/issue-512/_manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"issue": 512,
"fetched_at": "2026-11-12T06:00:58Z",
"fetched_by": "idd-diagnose",
"files": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
schema: spec-driven
created: 2026-11-12
created_by: che cheng <kiki830621@gmail.com>
created_with: claude
archived_by: che cheng <kiki830621@gmail.com>
archived_at: 2026-11-12
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
**GitHub-side tracker**: #512

## Problem

`idd-close` 的 Step 6.3(doc-sync 檢查)有一句「位置」,說這一步在結案摘要貼出之後、`gh issue close` 之前做。同一份 SKILL.md 的其他地方都是先關閉:Step 4 在同一個 bash 區塊裡貼摘要、接著關閉 issue;步驟的順序是 Step 4、Step 6、Step 6.3、Step 6.5;Step 0.5 的清單也是 `publish_and_close`、`auto_update_body`、`doc_sync_sweep`、`distribution_sync_chain_detection`。照步驟順序執行的人到 Step 6.3 時 issue 已經關了;照那一句執行的人要自己把 Step 4 的區塊拆開。兩種讀法做出來的順序不同。

## Root Cause

Step 6.3 加進來的時候(#220),「位置」那一句寫的是當時的打算,這一步實際被放在 Step 4 與 Step 6 之後。沒有任何檢查比對這一句、步驟的順序與清單,也沒有規格寫明這一步在什麼時候做,所以矛盾一直留著。

## Proposed Solution

- 維護者已決定(2026-11-11):doc-sync 檢查留在 issue 關閉之後,只改「位置」那一句,不把檢查移到貼出摘要之前。
- 那一句改成說狀態:issue 已關閉、結案摘要已貼出之後,在 Step 6 body sync 之後、Step 6.5 distribution sync 之前。
- 新增一條 requirement,寫明這個位置,以及 SKILL.md 講到它的三處要一致。
- doc-sync-sweep 的測試加一個檢查程式:讀 SKILL.md,比對步驟的順序、清單的順序與「位置」那一句;並用七份改壞的副本確認每一項檢查都抓得到。

## Non-Goals

- 把 doc-sync 檢查移到關閉之前,或讓它能擋下結案:維護者選了相反的做法。
- 改 Step 4、Step 6、Step 6.5 或 Step 0.5 清單的內容:它們已經一致。
- 寫明 `--retroactive` 模式跑不跑 Step 6.3:那張表沒有列這一步,是另一個問題,另開 issue。
- 檢查執行者實際照什麼順序跑:步驟由照 SKILL.md 執行的模型做,這次只檢查它讀的文字。
- ASSUMPTION: 不升版號,CHANGELOG 加在既有的 Unreleased 區塊。

## Success Criteria

- doc-sync-sweep 新增的檢查在改 SKILL.md 之前失敗(現行的檔案不通過),改之後通過;七份改壞的副本各自被抓到,原因是它改壞的那一項。
- doc-sync-sweep 原有的七個檢查照舊通過。
- run-all-tests 的全部 suite 與 spectra-archive-post-ic 通過。
- 連結檢查對新增的 requirement 回 ok。

## Capabilities

### New Capabilities

- `idd-close-doc-sync`: 寫明 `/idd-close` 的 doc-sync 檢查在什麼時候做(issue 關閉、結案摘要貼出之後),以及 SKILL.md 講到這個位置的幾處要一致。

### Modified Capabilities

(none)

## Impact

- Affected specs: idd-close-doc-sync(新增,ADDED requirement「The doc-sync sweep runs after the issue is closed」)
- Affected code:
- Modified: plugins/issue-driven-dev/skills/idd-close/SKILL.md
- Modified: plugins/issue-driven-dev/scripts/tests/doc-sync-sweep/test.sh
- Modified: plugins/issue-driven-dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Purpose

Defines when `/idd-close` runs its doc-sync sweep, the check of README and CLAUDE.md files for content the closed issue made stale: after the issue is closed and its closing summary is posted. It exists so that the places in `skills/idd-close/SKILL.md` that state this position cannot drift apart again.

## ADDED Requirements

### Requirement: The doc-sync sweep runs after the issue is closed

`/idd-close` SHALL run the doc-sync sweep (Step 6.3) only when the issue is closed and its closing summary is posted: after the step that posts the summary and closes the issue (Step 4), after the body sync (Step 6), and before the distribution sync (Step 6.5). `skills/idd-close/SKILL.md` states where the sweep sits in three places: the order of its step sections, the order of the stage task list of Step 0.5, and the sentence of Step 6.3 that states the position. The step sections and the task list SHALL both place the sweep after the close and the body sync and before the distribution sync. The sentence SHALL say that the issue is already closed and SHALL NOT say that the sweep comes before the issue is closed.

No executable check: the steps are carried out by a model that follows SKILL.md, so the order in which a run actually takes them is not checked. The Example checks the text the model follows.

#### Scenario: A close reaches the doc-sync sweep

- **GIVEN** `/idd-close` has posted the closing summary and closed the issue
- **WHEN** it reaches Step 6.3
- **THEN** the issue is already closed and its closing summary is already posted, so nothing the sweep finds holds the close back

##### Example: where the doc-sync sweep sits in idd-close

| `skills/idd-close/SKILL.md` | The check |
| --- | --- |
| as shipped | passes |
| the position sentence of Step 6.3 says the sweep comes before `gh issue close` | fails on the sentence |
| the position sentence of Step 6.3 does not say that the issue is closed | fails on the sentence |
| Step 6.3 has no position sentence | fails on the sentence |
| the Step 6.3 section is placed before Step 4 | fails on the step order |
| the Step 6.3 section is placed after Step 6.5 | fails on the step order |
| the task list names `doc_sync_sweep` before `publish_and_close` | fails on the task order |
| the task list names `doc_sync_sweep` after `distribution_sync_chain_detection` | fails on the task order |
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## 1. 測試先行

- [x] 1.1 doc-sync 檢查的位置有可執行的檢查:依 requirement「The doc-sync sweep runs after the issue is closed」的 Example「where the doc-sync sweep sits in idd-close」,doc-sync-sweep 加一個讀 idd-close SKILL.md 的檢查程式與 Example 八列各自的檢查,測試檔帶標記 spec-example: idd-close-doc-sync / where the doc-sync sweep sits in idd-close。現行的檔案要通過;七份改壞的副本(「位置」那一句說在關閉之前、那一句沒說 issue 已經關閉、沒有「位置」那一句、Step 6.3 移到 Step 4 之前、Step 6.3 移到 Step 6.5 之後、清單裡 doc_sync_sweep 排在 publish_and_close 之前、清單裡 doc_sync_sweep 排在 distribution_sync_chain_detection 之後)各自被抓到,而且抓到的原因是那一份改壞的地方。驗證:改 SKILL.md 之前,現行的檔案不通過,說在關閉之前的那份副本做不出來(與現行檔案相同),四份改順序的副本除了順序還帶著那一句的問題。

## 2. skill 文字

- [x] 2.1 改 idd-close Step 6.3 的「位置」那一句:寫成 issue 已關閉、closing summary 已貼出之後,在 Step 6 body sync 之後、Step 6.5 distribution sync 之前。步驟的順序與 Step 0.5 的清單不動。驗證:1.1 全部通過;doc-sync-sweep 原有的七個檢查照舊通過。

## 3. 收尾

- [x] 3.1 CHANGELOG 的 Unreleased 加 Fixed 條目(#512)。驗證:git diff 只有新增行,已發布版本的條目沒有改動。
- [x] 3.2 跑 doc-sync-sweep 與整套測試(run-all-tests.sh 與 spectra-archive-post-ic)。驗證:結束碼都是 0。
32 changes: 32 additions & 0 deletions openspec/specs/idd-close-doc-sync/spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# idd-close-doc-sync Specification

## Purpose

Defines when `/idd-close` runs its doc-sync sweep, the check of README and CLAUDE.md files for content the closed issue made stale: after the issue is closed and its closing summary is posted. It exists so that the places in `skills/idd-close/SKILL.md` that state this position cannot drift apart again.

## Requirements

### Requirement: The doc-sync sweep runs after the issue is closed

`/idd-close` SHALL run the doc-sync sweep (Step 6.3) only when the issue is closed and its closing summary is posted: after the step that posts the summary and closes the issue (Step 4), after the body sync (Step 6), and before the distribution sync (Step 6.5). `skills/idd-close/SKILL.md` states where the sweep sits in three places: the order of its step sections, the order of the stage task list of Step 0.5, and the sentence of Step 6.3 that states the position. The step sections and the task list SHALL both place the sweep after the close and the body sync and before the distribution sync. The sentence SHALL say that the issue is already closed and SHALL NOT say that the sweep comes before the issue is closed.

No executable check: the steps are carried out by a model that follows SKILL.md, so the order in which a run actually takes them is not checked. The Example checks the text the model follows.

#### Scenario: A close reaches the doc-sync sweep

- **GIVEN** `/idd-close` has posted the closing summary and closed the issue
- **WHEN** it reaches Step 6.3
- **THEN** the issue is already closed and its closing summary is already posted, so nothing the sweep finds holds the close back

##### Example: where the doc-sync sweep sits in idd-close

| `skills/idd-close/SKILL.md` | The check |
| --- | --- |
| as shipped | passes |
| the position sentence of Step 6.3 says the sweep comes before `gh issue close` | fails on the sentence |
| the position sentence of Step 6.3 does not say that the issue is closed | fails on the sentence |
| Step 6.3 has no position sentence | fails on the sentence |
| the Step 6.3 section is placed before Step 4 | fails on the step order |
| the Step 6.3 section is placed after Step 6.5 | fails on the step order |
| the task list names `doc_sync_sweep` before `publish_and_close` | fails on the task order |
| the task list names `doc_sync_sweep` after `distribution_sync_chain_detection` | fails on the task order |
7 changes: 7 additions & 0 deletions plugins/issue-driven-dev/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ Version number left to the release.
the job is cancelled. A longer limit buys little: at a load near 150 on the same machine, actionability-gate
alone took 193 s, so at that load the full run already fails on another suite. No other suite got a file:
apart from merge-completeness, none took more than 60 s in three full runs at ordinary load.
- **`idd-close` says in one way where its doc-sync sweep sits (#512).** The 「位置」 sentence of Step 6.3 said the
sweep runs before `gh issue close`, while the step order, the Step 0.5 task list and Step 4 (which posts the
summary and closes the issue in one block) all run it after the close. The sentence now says what the rest of
the skill does: the issue is closed and the closing summary is posted, then the body sync, then the sweep, then
the distribution sync. The order of the steps is unchanged. A new capability, `idd-close-doc-sync`, states the
position, and the doc-sync-sweep suite reads SKILL.md and compares the three places; it also runs the comparison
on copies broken on purpose, one for each thing it compares, so each part of the check is seen to fail.

## [4.0.1] - 2026-11-11

Expand Down
Loading
Loading