@laitszkin/apollo-toolkit 3.11.8 → 3.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +6 -6
- package/CHANGELOG.md +20 -2
- package/README.md +9 -10
- package/align-project-documents/SKILL.md +20 -69
- package/align-project-documents/references/templates/standardized-docs-template.md +1 -1
- package/analyse-app-logs/scripts/__pycache__/filter_logs_by_time.cpython-312.pyc +0 -0
- package/analyse-app-logs/scripts/__pycache__/log_cli_utils.cpython-312.pyc +0 -0
- package/analyse-app-logs/scripts/__pycache__/search_logs.cpython-312.pyc +0 -0
- package/archive-specs/SKILL.md +18 -70
- package/commit-and-push/SKILL.md +22 -52
- package/develop-new-features/SKILL.md +15 -60
- package/docs-to-voice/scripts/__pycache__/docs_to_voice.cpython-312.pyc +0 -0
- package/enhance-existing-features/SKILL.md +24 -61
- package/generate-spec/SKILL.md +15 -18
- package/generate-spec/references/templates/coordination.md +0 -1
- package/generate-spec/scripts/__pycache__/create-specscpython-312.pyc +0 -0
- package/implement-specs/SKILL.md +27 -62
- package/implement-specs-with-subagents/SKILL.md +28 -71
- package/implement-specs-with-worktree/SKILL.md +38 -62
- package/init-project-html/SKILL.md +26 -116
- package/iterative-code-performance/SKILL.md +1 -1
- package/iterative-code-quality/SKILL.md +1 -1
- package/katex/scripts/__pycache__/render_katex.cpython-312.pyc +0 -0
- package/maintain-project-constraints/SKILL.md +21 -79
- package/maintain-project-constraints/references/constraint-file-reference.md +58 -0
- package/merge-changes-from-local-branches/SKILL.md +26 -100
- package/open-github-issue/scripts/__pycache__/open_github_issue.cpython-312.pyc +0 -0
- package/open-source-pr-workflow/SKILL.md +4 -7
- package/optimise-skill/SKILL.md +9 -9
- package/optimise-skill/references/definition.md +6 -5
- package/optimise-skill/references/example_skill.md +9 -9
- package/package.json +1 -1
- package/read-github-issue/scripts/__pycache__/find_issues.cpython-312.pyc +0 -0
- package/read-github-issue/scripts/__pycache__/read_issue.cpython-312.pyc +0 -0
- package/resolve-review-comments/scripts/__pycache__/review_threads.cpython-312.pyc +0 -0
- package/review-spec-related-changes/SKILL.md +24 -67
- package/ship-github-issue-fix/SKILL.md +2 -2
- package/solve-issues-found-during-review/SKILL.md +11 -74
- package/spec-to-project-html/SKILL.md +26 -75
- package/submission-readiness-check/SKILL.md +26 -62
- package/systematic-debug/SKILL.md +48 -64
- package/test-case-strategy/SKILL.md +38 -85
- package/text-to-short-video/scripts/__pycache__/enforce_video_aspect_ratio.cpython-312.pyc +0 -0
- package/update-project-html/SKILL.md +25 -94
- package/version-release/SKILL.md +39 -74
- package/archive-specs/references/templates/architecture.md +0 -21
- package/archive-specs/references/templates/docs-index.md +0 -39
- package/archive-specs/references/templates/features.md +0 -25
- package/archive-specs/references/templates/principles.md +0 -28
- package/discover-edge-cases/CHANGELOG.md +0 -19
- package/discover-edge-cases/LICENSE +0 -21
- package/discover-edge-cases/README.md +0 -87
- package/discover-edge-cases/SKILL.md +0 -91
- package/discover-edge-cases/agents/openai.yaml +0 -4
- package/discover-edge-cases/references/architecture-edge-cases.md +0 -41
- package/discover-edge-cases/references/code-edge-cases.md +0 -46
- package/discover-security-issues/CHANGELOG.md +0 -32
- package/discover-security-issues/LICENSE +0 -21
- package/discover-security-issues/README.md +0 -35
- package/discover-security-issues/SKILL.md +0 -88
- package/discover-security-issues/agents/openai.yaml +0 -4
- package/discover-security-issues/references/agent-attack-catalog.md +0 -117
- package/discover-security-issues/references/common-software-attack-catalog.md +0 -168
- package/discover-security-issues/references/red-team-extreme-scenarios.md +0 -81
- package/discover-security-issues/references/risk-checklist.md +0 -78
- package/discover-security-issues/references/security-test-patterns-agent.md +0 -101
- package/discover-security-issues/references/security-test-patterns-finance.md +0 -88
- package/discover-security-issues/references/test-snippets.md +0 -73
- package/recover-missing-plan/SKILL.md +0 -85
- package/recover-missing-plan/agents/openai.yaml +0 -4
- package/review-change-set/LICENSE +0 -21
- package/review-change-set/README.md +0 -55
- package/review-change-set/SKILL.md +0 -96
- package/review-change-set/agents/openai.yaml +0 -4
- package/review-codebases/LICENSE +0 -21
- package/review-codebases/README.md +0 -69
- package/review-codebases/SKILL.md +0 -103
- package/review-codebases/agents/openai.yaml +0 -4
- package/scheduled-runtime-health-check/LICENSE +0 -21
- package/scheduled-runtime-health-check/README.md +0 -107
- package/scheduled-runtime-health-check/SKILL.md +0 -135
- package/scheduled-runtime-health-check/agents/openai.yaml +0 -4
- package/scheduled-runtime-health-check/references/output-format.md +0 -20
|
@@ -1,77 +1,40 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: enhance-existing-features
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
Use for backlog work that mutates production behavior; reroute pure regressions, copy/style-only tweaks, or single-pocket config nits that restore documented intent without new surface area.
|
|
6
|
-
Bad: multi-service permission change with zero spec… Good: contract captures external API limits + property tests cover invariants… Single-file pagination fix matching README → targeted regression only…
|
|
4
|
+
在既有系統上增強或調整產品行為。先讀懂受影響模組,再決定直接實作或走 generate-spec;所有非平凡變更必須經過 test-case-strategy。
|
|
7
5
|
---
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
## 技能目標
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
在不打亂既有系統邊界的前提下,為 brownfield 專案安全地增強功能或調整行為,以合適的 spec 流程與測試策略將風險控制在可驗證範圍內。
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
- Conditional: **`generate-spec`** when spec triggers below fire; **`recover-missing-plan`** when user-named `docs/plans/...` is missing/archived/mismatched; **`commit-and-push`** when the user requests **git commit** and/or **push** to persist completed work—**MUST** delegate final submission to **`commit-and-push`** (often via **`implement-specs`** / **`implement-specs-with-worktree`** when a spec path is active).
|
|
15
|
-
- Optional: none.
|
|
16
|
-
- Fallback: **`test-case-strategy`** unavailable ⇒ **stop**. Spec path required but **`generate-spec`** unavailable ⇒ **stop**. If the user requested **commit/push** and **`commit-and-push`** is unavailable, **MUST** stop and report.
|
|
11
|
+
## 驗收條件
|
|
17
12
|
|
|
18
|
-
|
|
13
|
+
- 變更範圍明確:已讀懂受影響模組、入口點、整合邊界與變更爆炸半徑。
|
|
14
|
+
- 已正確判斷直接實作或必須先走 `generate-spec`,並在不需要 spec 時給出明確理由。
|
|
15
|
+
- 每個非平凡變更都經過 `test-case-strategy`,留下清楚的 oracle、驗證方式與通過證據。
|
|
16
|
+
- 若使用 spec:批准、實作、回填與計劃文件狀態同步全部完成。
|
|
17
|
+
- 若未使用 spec:最終摘要足以說明風險、測試結果與剩餘限制。
|
|
18
|
+
- `test-case-strategy` 不可用時必須停止;需要 spec 但 `generate-spec` 不可用時必須停止。
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
- Spec path **when** any: new/changed **user-visible** behavior (not mere restore of old intent); ambiguity needing approval; multi-module alignment; critical/sensitive/irreversible/migration risk; traceability materially reduces error.
|
|
22
|
-
- **MUST NOT** open **`generate-spec`** for clearly tiny/localized work: pure regression to prior intent; polish-only UI copy/style; one-area config/constant/flag; narrow CRUD/validation tweak; internal refactor/observability **without** behavior change—**implement + `test-case-strategy` directly**.
|
|
23
|
-
- If specs: **MUST** complete **`generate-spec`** lifecycle (approval before code; backfill after); **≤3 modules** per spec set—split independent non-dependent sets + batch `coordination.md` when coordinated parallelism; **MUST NOT** code pre-approval.
|
|
24
|
-
- **MUST NOT** yield with approved in-scope **`tasks.md`/`checklist.md`** undone except user deferral or documented external blocker (record in plans).
|
|
25
|
-
- **`test-case-strategy` required** for non-trivial deltas—property/adversarial/integration etc. per risk; meaningful oracles; drift check or explicit **`N/A`** with reason per non-trivial logic task.
|
|
26
|
-
- External deps: **`contract.md`** records official-backed obligations when material.
|
|
20
|
+
## 工作流程
|
|
27
21
|
|
|
28
|
-
|
|
22
|
+
1. 完整閱讀受影響模組、資料流、整合點與現有測試,明確界定變更的爆炸半徑。
|
|
23
|
+
2. 判斷是否需要 spec:涉及新的或改變使用者可見行為、跨模組協調、高風險敏感流程、重大歧義時走 `generate-spec`。不需 spec 時明確說出理由。
|
|
24
|
+
3. 若需要 spec,必須等批准後才能改產品程式碼。
|
|
25
|
+
4. 查閱變更依賴的官方文件或 API spec,以最小差異實作需求,不順手做額外重構或範圍擴張。
|
|
26
|
+
5. 使用 `test-case-strategy` 選擇測試組合,跑測試並修正失敗。
|
|
27
|
+
6. 若使用 spec,回填所有計劃文件;若未使用,輸出簡潔的結果摘要、測試證據與剩餘限制。
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
- **Execution**: Explore → decide specs → docs/officials → implement → test → backfill/summary.
|
|
32
|
-
- **Quality**: No speculative scope expansion; reuse patterns.
|
|
33
|
-
- **Output**: Behavior matches ask; traceable tests; plans honest if specs used.
|
|
29
|
+
## 使用範例
|
|
34
30
|
|
|
35
|
-
|
|
31
|
+
- 「新增一套影響 API、資料庫與 UI 的權限模型」→ 先走 `generate-spec`,批准後再實作,並補上跨層測試。交付物包含已批准的 spec、通過的測試證據、回填完成的計劃文件。
|
|
32
|
+
- 「修正分頁 off-by-one,讓行為回到 README 描述」→ 不開 spec,直接修復並加回歸測試。交付物為修復後的代碼與測試通過證據。
|
|
36
33
|
|
|
37
|
-
**Chain-of-thought:** **`Pause →`** after explorations and spec decision—wrong classification wastes days.
|
|
38
34
|
|
|
39
|
-
|
|
35
|
+
## 參考資料索引
|
|
40
36
|
|
|
41
|
-
-
|
|
42
|
-
- **Pause →** Can I state **one paragraph** concrete change surface before editing?
|
|
37
|
+
- `generate-spec`:需要書面批准時的 spec 流程。
|
|
43
38
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
- Apply Non-negotiable triggers above; if doubt favors **implement-only** **only when** genuinely low-risk localized.
|
|
47
|
-
- If specs: broken path ⇒ **`recover-missing-plan`** then **`generate-spec`** (templates, clarification loop, approval). Parallel batch rules per **`generate-spec`**. If **not** specs: complete step 2 with “no specs” rationale, then continue with steps 3–6 (still run official-doc pass when external surfaces change).
|
|
48
|
-
- **Pause →** Am I dodging specs just to avoid bureaucracy while scope is multi-team/critical?
|
|
49
|
-
|
|
50
|
-
### 3) Authoritative docs
|
|
51
|
-
|
|
52
|
-
- Official docs / Context7 / web for libs used in change.
|
|
53
|
-
|
|
54
|
-
### 4) Implement
|
|
55
|
-
|
|
56
|
-
- Minimal diffs preserving behavior unless tasked otherwise; specs ⇒ every in-scope unchecked item delivered; intermediate milestones ≠ user’s final asked outcome unless rescoped.
|
|
57
|
-
|
|
58
|
-
### 5) Testing (always for non-trivial)
|
|
59
|
-
|
|
60
|
-
- **`test-case-strategy`**: inventory risk → tests with oracles → run/fix.
|
|
61
|
-
|
|
62
|
-
### 6) Completion
|
|
63
|
-
|
|
64
|
-
- With specs: backfill **`spec.md`/`tasks.md`/`checklist.md`/`contract.md`/`design.md`** (+ **`coordination.md`** if batch truth moved). **`spec.md`** requirement status honest. Strip template noise / `N/A` properly.
|
|
65
|
-
- Without specs: concise summary citing tests/results/`N/A` reasons.
|
|
66
|
-
|
|
67
|
-
## Sample hints
|
|
68
|
-
|
|
69
|
-
- **Spec yes**: Adds new permission model affecting API+DB+UI—the blast radius crosses layers.
|
|
70
|
-
- **Spec no**: Off-by-one in existing pagination restoring documented behavior—fix + regression test.
|
|
71
|
-
- **Split**: Touches auth, billing, infra—**three plans** capped modules, **`coordination.md`** collision map.
|
|
72
|
-
|
|
73
|
-
## References
|
|
74
|
-
|
|
75
|
-
- **`generate-spec`**: planning/backfill lifecycle
|
|
76
|
-
- **`test-case-strategy`**: tests + drift philosophy
|
|
77
|
-
- **`recover-missing-plan`**: heal missing dirs
|
|
39
|
+
- `test-case-strategy`:非平凡變更的測試選型與 oracle 設計。
|
|
40
|
+
- `commit-and-push`:使用者要求提交或推送時的最終交付流程。
|
package/generate-spec/SKILL.md
CHANGED
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: generate-spec
|
|
3
|
-
description:
|
|
4
|
-
Create or refresh approval-gated planning docs under `docs/plans/...` with
|
|
5
|
-
`apltk create-specs`, `test-case-strategy`, and optional batch coordination or
|
|
6
|
-
preparation files. Use for drafting or restructuring specs, not implementation.
|
|
3
|
+
description: 當你需要將用戶模糊的複雜需求拆解成有嚴格實作範圍的spec時,使用這個技能
|
|
7
4
|
---
|
|
8
5
|
|
|
9
|
-
# 生成規格
|
|
10
|
-
|
|
11
6
|
## 目標
|
|
12
|
-
|
|
7
|
+
將用戶需求轉化為明確、有清晰完成條件的spec。
|
|
13
8
|
|
|
14
9
|
## 驗收條件
|
|
15
|
-
-
|
|
16
|
-
-
|
|
10
|
+
- 已經產出了嚴格遵循模板格式的spec。
|
|
11
|
+
- 為spec當中的需求制定了明確的驗收條件及測試策略
|
|
17
12
|
|
|
18
13
|
## 工作流程
|
|
19
|
-
1.
|
|
20
|
-
|
|
21
|
-
如果外部環境存在subagents功能,建議通過調度subagents
|
|
14
|
+
1. 理解用戶需求並閱讀repo
|
|
15
|
+
分析用戶需求,並在 repo 之中搜索、列出可能相關的內容。完成搜索之後,深入閱讀相關代碼,識別變更範圍。
|
|
16
|
+
如果外部環境存在 subagents 功能,建議通過調度 subagents 來完成深入閱讀 repo 的任務。
|
|
22
17
|
|
|
23
18
|
2. 拆分用戶需求及設計業務架構
|
|
24
19
|
將用戶需求轉化、拆分為明確、存在邊界的工程需求。結合現有代碼,設計業務架構。在設計的過程中,你需要考慮包括但不限於以下設計事項:
|
|
@@ -26,7 +21,7 @@ description: >-
|
|
|
26
21
|
- 測試策略
|
|
27
22
|
- 模塊之間的呼叫、回傳
|
|
28
23
|
- 資料流
|
|
29
|
-
|
|
24
|
+
在這個階段,如果用戶有任何不清晰的需求,且該需求會影響你的設計方案,你需要紀錄並在稍後填入spec,等待用戶的回答。
|
|
30
25
|
|
|
31
26
|
3. 將整個設計方案拆分成可執行任務
|
|
32
27
|
將上一步之中你構思的完整設計方案拆分為精確到函式或檔案級別的任務。你必須確保每一個任務都是可以直接執行,且沒有歧義的。以此確保執行設計方案的開發者不會偏離設計方案。
|
|
@@ -35,13 +30,13 @@ description: >-
|
|
|
35
30
|
為任務制定基於測試的驗收條件,確保每一個任務在完成之後都能夠被驗證。
|
|
36
31
|
同時,為需求制定驗收條件,確保用戶需求能夠被測試清晰地驗收、檢驗成果。
|
|
37
32
|
|
|
38
|
-
5. 使用 `apltk` cli
|
|
39
|
-
使用cli
|
|
40
|
-
|
|
33
|
+
5. 使用 `apltk` cli工具協助完成spec及spec相關架構圖
|
|
34
|
+
使用 cli 工具,產生 spec 的模板。將你的完整計劃填入到模板之中,並通過 cli 工具生成完整的 architecture diff 讓用戶審閱本次spec的架構設計。
|
|
35
|
+
如果該 spec 設計超過三個模塊,則需要創建 batch spec。
|
|
41
36
|
|
|
42
37
|
## 範例
|
|
43
|
-
- "製作一個網頁德州撲克小遊戲" -> "
|
|
44
|
-
- "提升現有系統的性能" -> "
|
|
38
|
+
- "製作一個網頁德州撲克小遊戲" -> "拆分成多個模塊:遊戲本體邏輯、前端頁面渲染、前端頁面交互邏輯;制定單元測試、整合測試等策略,並製作一份單一的spec指導實作工作。"
|
|
39
|
+
- "提升現有系統的性能" -> "識別目前 repo 之中拖累性能的代碼。製作 batch spec 文檔,將 repo 的全量優化拆分為以三個模塊為一組的優化。對於必須改動業務邏輯才可以做到的性能提升,填寫 clarification questions,並等待用戶回答之後更新 spec。"
|
|
45
40
|
|
|
46
41
|
## 參考資料
|
|
47
42
|
- `scripts/create-specs` - `apltk create-specs` 背後使用的模板產生器。
|
|
@@ -54,3 +49,5 @@ description: >-
|
|
|
54
49
|
- `references/templates/preparation.md` - batch root 的前置工作模板。
|
|
55
50
|
- `references/TEMPLATE_SPEC.md` - `apltk` cli工具相關格式指引。
|
|
56
51
|
- `test-case-strategy/SKILL.md` - 測試策略選擇技能。
|
|
52
|
+
- `apltk create-specs --help` - spec生成相關cli工具的指引命令
|
|
53
|
+
- `apltk architecture --help` - 架構圖生成相關cli工具的指引命令
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
|
|
10
10
|
- Batch members: [[spec-name-1], [spec-name-2]]
|
|
11
11
|
- Shared outcome: [what the batch delivers when all spec sets land]
|
|
12
|
-
- Parallel readiness: [Yes / No; if No, list blocking items or link to preparation.md]
|
|
13
12
|
- Out of scope: [shared exclusions for the batch]
|
|
14
13
|
|
|
15
14
|
## Design Principles
|
|
Binary file
|
package/implement-specs/SKILL.md
CHANGED
|
@@ -1,83 +1,48 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: implement-specs
|
|
3
|
-
description:
|
|
4
|
-
Land approved `docs/plans/{YYYY-MM-DD}/{change}` (or batch member path) on the current branch: resolve path by user pointer or evidence-backed latest (no guesses); read spec→design→contract→checklist then run every `tasks.md` line and all `checklist.md` wrap-up; multi-directory work follows `coordination.md`—one directory fully done before the next; backfill plans; **`commit-and-push`** for final commit (no branch/worktree unless user rescopes). Isolation: **`implement-specs-with-worktree`**; delegation: **`implement-specs-with-subagents`**.
|
|
3
|
+
description: 當你需要在當前分支之中實作spec時,使用這個技能。
|
|
5
4
|
---
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
## 技能目標
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
實作用戶指定的spec。確保所有任務都被完成,用戶所有需求都被滿足。
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
- Conditional: `generate-spec` if spec files need clarification or updates; `recover-missing-plan` if the requested plan path is missing from the current checkout.
|
|
13
|
-
- Optional: none.
|
|
14
|
-
- Fallback: If **`commit-and-push`** is unavailable, **MUST** stop immediately and report the missing dependency. Do not improvise substitute standards or ungated `git commit`.
|
|
10
|
+
## 驗收條件
|
|
15
11
|
|
|
16
|
-
|
|
12
|
+
- 在所有被用戶要求實作的spec之中,所有的 `checklist.md`, `tasks.md`, `spec.md` 當中所有非用戶填寫的任務相關checkboxes全部被勾選為完成狀態
|
|
17
13
|
|
|
18
|
-
|
|
19
|
-
- **MUST** execute **every** **`tasks.md`** line in listed order—the **executable source of truth** for what to ship. **`design.md` / `contract.md`** **inform** decomposition and forbid contradictions (**`INT-###` / `EXT-###`** when present are **constraints/anchors referenced from tasks**, not a second queue). **MUST NOT** silently wire alternate module flows or vendor surfaces that conflict with approved **`design`** / **`contract`**; resolve conflicts via **`generate-spec`** / explicit approved plan edits first.
|
|
20
|
-
- **MUST** when multiple spec directories apply to one request, follow parent **`coordination.md`** merge / sequencing guidance (or the user’s explicit order if coordination is absent or defers to them) and **complete** one directory end-to-end—**all** of its `tasks.md` lines **and** **all** of its `checklist.md` wrap-up / acceptance work—**before** starting implementation work in the next directory. **MUST NOT** interleave partial implementation across sibling specs.
|
|
21
|
-
- **MUST NOT** create a branch, switch branches, or add or use a `git worktree` for this work unless the user explicitly changes the request in the same conversation.
|
|
22
|
-
- **`tasks.md` completeness (hard stop)**: **MUST** execute **every** actionable item listed in the in-scope `tasks.md` for this request—**no exceptions** for perceived size, duration, file count, refactor depth, or session length. **MUST NOT** stop early, “defer” unchecked tasks while claiming the spec is done, collapse multiple task lines into a partial summary, or substitute narrative progress for completing a remaining line. If a line is truly impossible under written contracts, **MUST** stop with evidence and **MUST NOT** treat the implementation pass as complete until the plan is amended through the governing planning workflow (`generate-spec` / user-approved update) and the revised `tasks.md` is then fully satisfied.
|
|
23
|
-
- **`checklist.md` wrap-up / acceptance (hard stop for “spec complete”)**: **MUST** complete **all** `checklist.md` obligations that constitute **wrap-up, acceptance, verification, release-prep, doc or index sync, or other closing/hand-off** work tied to this change—**same no-exemption bar as `tasks.md`** (workload, duration, or breadth **do not** waive checklist-only items). The **entire** in-scope spec is **not** **complete** until those checklist items are **actually satisfied** and truthfully marked. **MUST NOT** treat “implementation done” or proceed to final **`commit-and-push`** / completion reporting while checklist-defined closing work remains open or is waved away with narrative. If a checklist item is impossible under contracts or facts on the ground, **MUST** stop with evidence and **MUST NOT** declare the spec complete until the plan is amended through the governing workflow and the revised `checklist.md` is then fully satisfied.
|
|
24
|
-
- **MUST** treat the approved `tasks.md`, `checklist.md`, and contracts as the scope boundary: on top of the rules above, run the relevant checklist-backed verifications and tests, and **MUST** backfill the planning documents with factual completion status (no aspirational checkboxes).
|
|
25
|
-
- **MUST NOT** expand scope to unrelated sibling spec directories solely because they share a batch folder.
|
|
26
|
-
- **MUST** finalize the implementation through **`commit-and-push`** after staging the intended change set (shared readiness, reviews per that skill’s classification, conventional commit message); **MUST NOT** complete the deliverable with a bare `git commit`, IDE-only commit, or other shortcut that skips **`submission-readiness-check`** / mandated gates.
|
|
27
|
-
- **MUST NOT** `git push`, tag, or perform release steps **outside** **`commit-and-push`** (unless **`version-release`** / **`open-source-pr-workflow`** explicitly applies per user request).
|
|
28
|
-
- If the plan path is missing or ambiguous: **MUST** use `recover-missing-plan` or other verifiable repository evidence to locate the authoritative plan; **MUST NOT** substitute a nearby path by guess. After recovery, **MUST** re-read the recovered files before coding so implementation and backfill target the same snapshot.
|
|
14
|
+
## 工作流程
|
|
29
15
|
|
|
30
|
-
|
|
16
|
+
### 1. 定位實作範圍
|
|
31
17
|
|
|
32
|
-
|
|
33
|
-
- **Execution**: Current checkout only; **`tasks.md`** defines runnable order and file targets; **`spec`/`design`/`contract`** constrain meaning and forbid contradictory wiring—implement and test until obligations are met—no parallel branch or worktree (unless the user rescopes to another skill).
|
|
34
|
-
- **Quality**: **All** `tasks.md` lines **and** **all** `checklist.md` wrap-up / acceptance obligations for this scope satisfied (see Non-negotiables—workload is not an excuse); tests and checklist verifications executed as required; docs reflect reality; no scope creep into sibling specs.
|
|
35
|
-
- **Output**: Current branch contains a clean, reviewable implementation of this spec only.
|
|
18
|
+
閱讀用戶指定的spec:
|
|
36
19
|
|
|
37
|
-
|
|
20
|
+
- `spec.md` 定義了用戶的需求
|
|
21
|
+
- `tasks.md` 定義了詳細的實作任務
|
|
22
|
+
- `checklist.md` 定義了任務的完成和驗收條件
|
|
23
|
+
- `contract.md` 定義了spec的外部依賴
|
|
24
|
+
- `design.md` 定義了相關業務鏈路的架構設計
|
|
25
|
+
- `coordination.md`(如有)定義了batch spec之中各份spec各自的實作邊界
|
|
26
|
+
- `preparation.md`(如有)定義了實作batch spec之前各spec的共用準備工作
|
|
38
27
|
|
|
39
|
-
|
|
28
|
+
按照以上文件,閱讀repo,理解本次spec的實作範圍。
|
|
40
29
|
|
|
41
|
-
|
|
42
|
-
- **Pause →** Is this directory the **exact** scope—or ordered list—the user (or coordination) requires, verified by listing or viewing those five files—not a sibling “similar” folder?
|
|
43
|
-
- **Pause →** Have I explicitly linked each material requirement / task to evidence I understood from **spec** / **design** / **contract** (still no code edits)?
|
|
44
|
-
- **Pause →** If the path were missing or wrong, what **verifiable** step would locate the authoritative plan—and have I executed it?
|
|
30
|
+
### 2. 實作spec任務
|
|
45
31
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
- **Pause →** What dirty paths are **out of scope**, and how will I avoid touching them inadvertently?
|
|
49
|
-
- **Pause →** Is the integration target branch (where the user expects work) identical to what `git status -sb` shows?
|
|
32
|
+
嚴格按照 `tasks.md` 之中定義的任務,逐項完成實作。如果有多份 `tasks.md` 存在於多份spec之中,則依照 `coordination.md` 之中建議的merge順序進行實作。
|
|
33
|
+
在確認完成所有任務之後,將 `tasks.md` 之中的所有checkboxes勾選為完成。
|
|
50
34
|
|
|
51
|
-
|
|
52
|
-
- **Pause →** Have I listed **every** remaining `tasks.md` line—and is the count **zero** before I leave this step?
|
|
53
|
-
- **Pause →** For the next task item, what is the **single** concrete change and its **single** primary verification—before I type code?
|
|
54
|
-
- **Pause →** Am I about to touch a file that belongs to a **sibling** spec or an unrelated module without an in-scope task line?
|
|
55
|
-
- **Pause →** After this chunk of work, which test command **proves** I did not break the contract’s stated behavior?
|
|
35
|
+
如果實作的spec是batch spec,且有 `preparation.md`,在開始實作之前需要先完成 `preparation.md` 之中所規定的任務內容,並在驗收條件滿足之後回填 `preparation.md`。
|
|
56
36
|
|
|
57
|
-
|
|
58
|
-
- **Pause →** If I checked a box, can I point to **commit + test run** (or equivalent) that makes that check true—no wishful checking?
|
|
59
|
-
- **Pause →** Are **zero** checklist obligations that mean “before spec complete” still open—validated by re-reading `checklist.md`, not from memory?
|
|
60
|
-
- **Pause →** Did any scope shrink or shift during implementation; if so, is the plan text updated **honestly**?
|
|
37
|
+
### 3. 驗證實作
|
|
61
38
|
|
|
62
|
-
|
|
63
|
-
- **Pause →** Does `git diff --cached` (or the equivalent staged view) show only this spec’s intended surface, or do I need to unstage/revert noise first?
|
|
64
|
-
- **Pause →** Am I on the **same** branch I named in step 2, without a silent branch switch?
|
|
39
|
+
按照 `checklist.md` 之中定義的驗收標準,逐項驗收並檢查任務是否完成。對於未達到驗收標準的任務,必須重新實作及重新驗收,並在完成驗收之後將所有 `checklist.md` 之中的checkboxes勾選為完成。
|
|
65
40
|
|
|
66
|
-
|
|
67
|
-
- **Pause →** Would another engineer **reproduce** my conclusion from the branch name, commit hash, and test commands I listed alone?
|
|
41
|
+
### 4. 回填spec
|
|
68
42
|
|
|
69
|
-
|
|
43
|
+
確保所有實作任務完成並通過驗收之後,更新 `spec.md` 之中的需求checkboxes反應實際代碼實作狀態。
|
|
70
44
|
|
|
71
|
-
##
|
|
45
|
+
## 範例
|
|
72
46
|
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
- **Multi-directory batch (same branch)**: `coordination.md` says merge order `api-layer` then `cli-wrapper` — finish **`api-layer`** `tasks.md` **and** **`api-layer`** `checklist.md` completely, then start **`cli-wrapper`**; do not split half of each.
|
|
76
|
-
- **Branch sanity excerpt**: expect `git status -sb` like `## feature/x …` plus a dirty `README.md` you do **not** own — leave that file untouched; implement only paths from `tasks.md`.
|
|
77
|
-
- **Completion report sketch**: `Branch: feature/x · Commit: a1b2c3d · Tests: npm test -- lib/auth.test.js · Backfill: tasks.md (done), checklist.md (R1.3 → passed).`
|
|
78
|
-
- **Anti-pattern**: `git checkout -b impl/oauth-scope` for this skill — **wrong** unless the user changed scope mid-conversation.
|
|
79
|
-
|
|
80
|
-
## References
|
|
81
|
-
|
|
82
|
-
- `recover-missing-plan`: missing or mismatched plan recovery
|
|
83
|
-
- **`commit-and-push`**: final commit/readiness (push only when user requests remote update)
|
|
47
|
+
- "用戶指定了一份有四份spec的batch spec並要求實作這份batch spec。同時,`coordination.md` 之中建議merge順序是 spec 1 -> spec 2 -> spec 3 -> spec 4。" -> "從spec 1開始進行完整的實作流程,並在完成回填spec之後再開始實作spec 2,直至4份spec都被完成"
|
|
48
|
+
- "用戶指定了一份有2份spec的batch spec並要求實作這份batch spec。同時,`coordination.md` 之中的建議merge順序是spec 2 -> spec 1,並且 `preparation.md` 存在於該batch spec之中。" -> "先實作 `preparation.md` 之中要求的任務並按照當中的驗收標準進行驗收。確定完成之後,從spec 2開始完整的實作流程。並在完成spec 2之後再實作 spec 1。"
|
|
@@ -1,92 +1,49 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: implement-specs-with-subagents
|
|
3
|
-
description:
|
|
4
|
-
Coordinator-only workflow for multispec batches: ingest `coordination.md`/`preparation.md`, run prerequisite work yourself, derive topological phases, launch **`implement-specs-with-worktree`** workers (one `{change}` each; **full** `tasks.md` + **full** `checklist.md` wrap-up—no partial handoff), **`merge-changes-from-local-branches`** after every phase succeeds, ledger every branch/test/merge—not for solo specs unless user explicitly insists on delegation overload. **Multi-phase: do not declare done until every non-blocked spec is merged across all phases** (or pipeline stopped on explicit blocker).
|
|
5
|
-
Wrong tool for one directory without parallel mandate—pick **`implement-specs-with-worktree`** / **`implement-specs`** depending on isolation. Publication/versioning stays outside this orchestration layer unless another skill attaches.
|
|
6
|
-
Ledger sample: `oauth-scope | phase=1 | merged | npm test ✅`.
|
|
3
|
+
description: 當有多份規格文檔需要被實作時,且環境允許使用subagents,建議使用本技能調度subagents完成任務
|
|
7
4
|
---
|
|
8
5
|
|
|
9
|
-
|
|
6
|
+
## 目標
|
|
10
7
|
|
|
11
|
-
|
|
8
|
+
調度多個subagents完成規格文檔的實作。
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
- Conditional: `generate-spec` if the batch is not implementation-ready; `review-change-set` only when the user asks for post-merge review.
|
|
15
|
-
- Fallback: If independent subagents cannot run, **MUST** report that limitation. Serial `implement-specs-with-worktree` across specs is allowed **only** after the user explicitly approves that fallback.
|
|
10
|
+
## 驗收條件
|
|
16
11
|
|
|
17
|
-
|
|
12
|
+
- 在所有被用戶要求實作的spec之中,所有的 `checklist.md`, `tasks.md`, `spec.md` 當中所有非用戶填寫的checkboxes全部被勾選為完成狀態
|
|
13
|
+
- 所有變更已經從各個subagents的工作分支合併回當前所在分支
|
|
14
|
+
- 所有subagents創建的工作分支及工作樹已經被清理
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
- **MUST** enumerate exact in-scope spec directories **before** any subagent starts; **MUST NOT** delegate archived, sibling, or “nearest guess” directories unless the user explicitly includes them.
|
|
21
|
-
- **MUST** verify each delegated directory contains `spec.md`, `tasks.md`, `checklist.md`, `contract.md`, and `design.md` before launch.
|
|
22
|
-
- **MUST** complete, verify, and **finalize** documented shared preparation on the integration branch **through `commit-and-push`** before any implementation subagent starts when `preparation.md` exists or specs mandate pre-work; the coordinating agent **MUST NOT** delegate that preparation. Subagents **MUST NOT** start until this branch is clean at the preparation commit (or there is no required preparation).
|
|
23
|
-
- **MUST** build a directed dependency graph from `coordination.md` plus each spec’s `spec.md` / `design.md` (edges: *provider spec must merge before consumer spec*). **MUST** partition specs into phases by topological **layers**: Phase 1 = specs with **no** in-batch prerequisites; for *k* ≥ 2, Phase *k* = specs whose in-batch prerequisites all appear in phases before *k*. **MUST NOT** start phase *k* until phase *k − 1* is fully merged into the integration branch (or you have an explicit user override). If the graph has a cycle, **MUST** stop and report it.
|
|
24
|
-
- **MUST** assign **exactly one** spec directory per implementation subagent; **MUST NOT** assign multiple directories to one implementation subagent.
|
|
25
|
-
- **`tasks.md` + `checklist.md` completeness (hard stop)**: Every implementation subagent **MUST** finish **all** actionable items in its assigned directory’s `tasks.md` **and** **all** `checklist.md` wrap-up, acceptance, verification, and closing obligations before reporting success—**no** partial completion, **no** “good enough” stops for large batches, **no** deferrals disguised as done. The coordinating agent **MUST NOT** merge a phase branch, advance the ledger to **`merged`**, or treat a spec as complete while **any** in-scope `tasks.md` line **or** checklist-defined closing item remains undone unless the batch is explicitly **`blocked`** with documented user/contract halt. **MUST** repeat this mandate in **every** subagent envelope so workers cannot interpret scope loosely.
|
|
26
|
-
- **MUST** give each subagent only task-local context (repo root, exact spec path, `coordination.md` path if relevant, instruction to run `implement-specs-with-worktree`, explicit **`tasks.md` full-completion** and **`checklist.md` wrap-up full-completion** requirements, baseline commit when preparation exists, requirement to read the full bundle before edits, worktree isolation, tests, backfill, local commit, and reporting branch/worktree/commit/tests/blockers). **MUST NOT** leak unrelated reasoning or other subagents’ private diffs unless resolving a concrete conflict.
|
|
27
|
-
- After each phase: **MUST** merge every **completed** spec branch from that phase into the integration branch via `merge-changes-from-local-branches` before starting the next phase; **MUST** resolve conflicts using spec contracts as the correctness tie-breaker; **MUST** record merge result in the ledger; if merge is blocked, **MUST** stop the pipeline and report.
|
|
28
|
-
- **Multi-phase completion**: When the planned ledger has **more than one** phase, **MUST** loop steps **5→6→7** until **every** in-scope spec is either **`merged`** on the integration branch or explicitly **`blocked`** with a documented stop (user abort, irresolvable conflict, failed dependency, etc.). **MUST NOT** yield, summarize as “phase complete”, or imply the batch is finished while **any** phase still has a successful, unmerged branch or **`pending`** / **`in_progress`** rows for specs that should run—unless the coordinating agent is halted by a preceding Non-negotiable blocker **and** that halt is stated plainly.
|
|
29
|
-
- Model: If the user names a model, **MUST** use it for implementation subagents when the platform allows; if not supported, **MUST** state that fact and continue only if the default is acceptable to the user’s intent.
|
|
16
|
+
## 工作流程
|
|
30
17
|
|
|
31
|
-
|
|
18
|
+
### 1. 定位實作範圍
|
|
32
19
|
|
|
33
|
-
|
|
34
|
-
- **Execution**: Preparation → dependency graph → **repeat** (run phase *k* → merge phase *k*) until all phases reconciled on the integration branch; never skip merges between dependent phases; **multi-phase ⇒ no early “done” narrative** until ledger proves full merge-set (or documented blockers).
|
|
35
|
-
- **Quality**: No duplicate delegation; subagents base on the branch that already contains preparation (and prior phases); **every** spec lands with **complete** `tasks.md` execution **and** **complete** `checklist.md` wrap-up, or a documented **blocked** state—workload is never a merge excuse; pause on shared file collisions, batch-wide defects, or rate-limit pressure.
|
|
36
|
-
- **Output**: Concise ledger: per spec → phase, depends-on, subagent id/label, branch/worktree, commit or blocker, tests, merge status.
|
|
20
|
+
閱讀用戶指定的spec:
|
|
37
21
|
|
|
38
|
-
|
|
22
|
+
- `spec.md` 定義了用戶的需求
|
|
23
|
+
- `tasks.md` 定義了詳細的實作任務
|
|
24
|
+
- `checklist.md` 定義了任務的完成和驗收條件
|
|
25
|
+
- `contract.md` 定義了spec的外部依賴
|
|
26
|
+
- `design.md` 定義了相關業務鏈路的架構設計
|
|
27
|
+
- `coordination.md`(如有)定義了batch spec之中各份spec各自的實作邊界
|
|
28
|
+
- `preparation.md`(如有)定義了實作batch spec之前各spec的共用準備工作
|
|
39
29
|
|
|
40
|
-
|
|
30
|
+
按照以上文件,閱讀repo,理解本次spec的實作範圍。
|
|
41
31
|
|
|
42
|
-
|
|
43
|
-
- **Pause →** Can I quote **verbatim** why each enumerated directory is in scope—not “probably related”?
|
|
44
|
-
- **Pause →** What **exact sentence** from `coordination.md` gates parallel readiness, if any—or what absence did I infer from—and is that justified?
|
|
32
|
+
### 2. 完成前置準備工作(如有)
|
|
45
33
|
|
|
46
|
-
|
|
47
|
-
- **Pause →** Am I silently delegating preparation to a **subagent** when the coordinating agent owns it—is that happening?
|
|
48
|
-
- **Pause →** What **commit hash** and **clean-tree** confirmation will subagents inherit as baseline?
|
|
34
|
+
如果實作的batch spec 有 `preparation.md`,你需要在開始實作之前需要先完成 `preparation.md` 之中所規定的任務內容,並在驗收條件滿足之後回填 `preparation.md`。使用 `commit-and-push` 技能並遵守當中的流程將前置準備工作提交,不需要推送到remote。
|
|
49
35
|
|
|
50
|
-
3.
|
|
51
|
-
- **Pause →** For each edge (A must land before B), what **sentence** from spec/design/coordination supports it?
|
|
52
|
-
- **Pause →** If I flattened phases wrong, which later spec would start **without** its merged predecessor—how do I detect that now?
|
|
36
|
+
### 3. 規劃subagents調度順序
|
|
53
37
|
|
|
54
|
-
|
|
55
|
-
- **Pause →** Is there **exactly one** spec directory per queued subagent—never two in one prompt?
|
|
56
|
-
- **Pause →** What will I **repeat** in every subagent envelope so they cannot “improvise” the wrong skill or wrong path?
|
|
38
|
+
識別各份spec之間的依賴關係,並建立調度順序。將多份spec的實作切分為多個實作批次。每一個實作批次內部的spec之間沒有互相依賴。完成實作批次的建立之後,為每一個subagents分配僅一份spec,並且開始實作。
|
|
57
39
|
|
|
58
|
-
|
|
59
|
-
- **Pause →** Does every active subagent have a **distinct** spec directory assignment—no duplicate or overlapping paths?
|
|
60
|
-
- **Pause →** Did two running subagents report **overlapping** paths; if yes, did I stop launching until ownership is clear?
|
|
40
|
+
在開始實作一個新的實作批次之前,你需要使用 `merge-changes-from-local-branches` 技能,遵守當中的流程,將前一個實作批次的變更從本地其他分支合併回來。
|
|
61
41
|
|
|
62
|
-
|
|
63
|
-
- **Pause →** For **each** spec I am about to merge, can I cite **evidence** (branch + `tasks.md` **and** `checklist.md` state) that **zero** applicable task lines **and** **zero** outstanding checklist closing items remain—or is this a documented **`blocked`** outcome instead?
|
|
64
|
-
- **Pause →** Has **every** successful branch in this phase been merged into the **same** integration branch I will use to **start** phase *k+1*?
|
|
65
|
-
- **Pause →** If a merge conflict touches a **contract** field, which spec’s `contract.md` / `design.md` is the tie-breaker I will apply?
|
|
42
|
+
### 4. 驗收工作
|
|
66
43
|
|
|
67
|
-
|
|
68
|
-
- **Pause →** How many phases remain after this merge—is the count **zero**? If not, **immediately** plan step 5 for *k+1*.
|
|
69
|
-
- **Pause →** Before launching phase *k+1*, can I **name** the merge commit or branch state that contains **all** prerequisites for every spec in that phase?
|
|
70
|
-
- **Pause →** Can I cite **ledger lines** proving **merged** for every non-blocked spec in **every** phase?
|
|
44
|
+
完成所有實作批次的合併之後,你需要閱讀所有spec之中的 `checklist.md`, `tasks.md`, `spec.md`,並確保當中非用戶填寫的任務相關checkboxes都被勾選為完成。
|
|
71
45
|
|
|
72
|
-
##
|
|
46
|
+
## 範例
|
|
73
47
|
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
**Repository regression check:** The coordinating agent must complete and commit explicitly documented prerequisite preparation on the integration branch before launching implementation subagents when `preparation.md` or equivalent mandates it.
|
|
77
|
-
|
|
78
|
-
## Sample hints (subagent scheduling)
|
|
79
|
-
|
|
80
|
-
- **Parallel batch (independent specs)** — The batch has multiple member directories and `coordination.md` allows parallel implementation with **no** in-batch prerequisites. Treat them as **one phase**: assign **exactly one** spec per subagent, launch one **`implement-specs-with-worktree`** worker per spec, each finishing **all** of its directory’s **`tasks.md`** and **`checklist.md`** before reporting success; when **every** branch in the phase is green, run **`merge-changes-from-local-branches`** to bring **every** member into the integration branch **before** declaring the batch done or starting a follow-on phase.
|
|
81
|
-
|
|
82
|
-
- **Preparation plus A → {B, C}** — Specs **A**, **B**, and **C** share a batch with **`preparation.md`**; `coordination.md` / design shows **B** and **C** depend on merged work from **A**. Coordinating agent: (1) complete **preparation** on the integration branch and **`commit-and-push`** (push only if the user asked); (2) **Phase 1**: launch **one** subagent for **A** only; **`merge-changes-from-local-branches`** for **A** when it passes; (3) **Phase 2**: launch **two** subagents for **B** and **C** from the branch that already contains **A**’s merge; (4) merge **B** and **C** when both finish. **MUST NOT** start **B** or **C** until **A** is merged into the baseline they branch from.
|
|
83
|
-
|
|
84
|
-
- **Ledger reminder** — One row per spec remains mandatory (`phase`, `depends-on`, branch/worktree, `merged` / `blocked`, tests); see Non-negotiables for full fields.
|
|
85
|
-
|
|
86
|
-
## References
|
|
87
|
-
|
|
88
|
-
- `implement-specs-with-worktree`: per-spec execution environment
|
|
89
|
-
- `merge-changes-from-local-branches`: phase merge integration (and downstream submit flow when that skill is invoked)
|
|
90
|
-
- `generate-spec`: repair planning when the batch is not ready
|
|
91
|
-
- `coordination.md`, `preparation.md`: batch-level ordering and prerequisites
|
|
92
|
-
- `review-change-set`: optional post-merge review
|
|
48
|
+
- "用戶要求實作一份batch spec。該batch spec有5份spec。spec 2依賴於 spec 1,spec 4依賴於spec 3,spec 5依賴於spec 2, spec 4。" -> "將batch spec切分為3個實作批次。第一批,先派發兩個subagents各自實作spec 1, spec 3,並將變更合併回當前分支;第二批派發兩個subagents個字實作spec 2, spec 4,並將變更合併回當前分支;第三批派發subagent實作spec 5,並將變更合併回當前分支。完成驗證工作之後向用戶回報成果。"
|
|
49
|
+
- "用戶要求實作一份batch spec。該batch spec有3份spec,並且存在 `preparation.md`。3份spec之間各自無依賴關係。" -> "先完成 `preparation.md` 的實作並提交。然後啟動三個subagents並行完成三份spec的任務。完成之後,將變更合併回當前分支。完成驗證工作之後向用戶回報結果。"
|
|
@@ -1,84 +1,60 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: implement-specs-with-worktree
|
|
3
|
-
description:
|
|
4
|
-
Like **`implement-specs`** (same read order, full `tasks.md`/`checklist.md`, sequential multi-spec per `coordination.md`) but all writes in a dedicated worktree+feature branch; `pwd` must match `git rev-parse --show-toplevel`; parent checkout read-only for deliverables; honor `preparation.md` and `coordination.md` collision rules. Use when isolation is required; otherwise **`implement-specs`**.
|
|
3
|
+
description: 當你需要在獨立分支和工作樹之中實作spec時,使用這個技能。
|
|
5
4
|
---
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
## 技能目標
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
在獨立分支及工作樹實作用戶指定的spec。確保所有任務都被完成,用戶所有需求都被滿足。
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
- Conditional: `generate-spec` if spec files need clarification or updates.
|
|
13
|
-
- Fallback: If any required dependency skill is unavailable, **MUST** stop and report it.
|
|
10
|
+
## 驗收條件
|
|
14
11
|
|
|
15
|
-
|
|
12
|
+
- 在所有被用戶要求實作的spec之中,所有的 `checklist.md`, `tasks.md`, `spec.md` 當中所有非用戶填寫的任務相關checkboxes全部被勾選為完成狀態
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
- **MUST NOT** edit implementation files from the parent checkout except for creating or listing worktrees and read-only inspection; the parent checkout is write-prohibited for this spec’s deliverables.
|
|
19
|
-
- **MUST** follow the **`implement-specs` Workflow** for discovery, implementation, backfill, commit discipline, and completion reporting—**except** that branch/worktree restrictions in `implement-specs` Non-negotiables are replaced by this skill’s worktree rules.
|
|
20
|
-
- **MUST** create the implementation branch from the **same parent branch** the user/session identified as the baseline (often the branch that will receive the merge—not necessarily `main` unless that branch is verified as the base).
|
|
21
|
-
- **MUST** use the spec directory name (`change_name`) as the canonical basename for the worktree path and branch stem; branch **`type`/name** must follow `references/branch-naming.md`.
|
|
22
|
-
- **MUST** use `git show-ref` and `git worktree list --porcelain` (not shell guesses) when checking whether a branch or worktree already exists; if creation fails ambiguously, **MUST** re-query those commands before retrying.
|
|
23
|
-
- When `preparation.md` exists: **MUST** treat it as an already-committed shared baseline for parallel work; **MUST NOT** redo its tasks inside the member spec unless the preparation commit is missing or the document states the prerequisite is still blocked. If baseline assumptions break, **MUST** update `preparation.md` or stop for coordination—**MUST NOT** silently move prerequisite work into the member spec.
|
|
24
|
-
- **`tasks.md` completeness (hard stop)**: **MUST** satisfy the **`implement-specs` Non-negotiable** on **`tasks.md`**: execute **every** actionable line in the in-scope `tasks.md`, with **no** early exit for workload, duration, or breadth; partial task lists are **not** a mergeable or committable state. If a line cannot be met under contracts, **MUST** halt with evidence and resolve the plan through approved planning updates before claiming completion.
|
|
25
|
-
- **`checklist.md` wrap-up / acceptance (hard stop for “spec complete”)**: **MUST** satisfy the **`implement-specs` Non-negotiable** on **`checklist.md`**: the spec is **not** **complete** and **must not** be merged or treated as finished until **all** checklist-defined wrap-up, acceptance, and closing obligations for the change are **done** and honestly recorded—**no** workload exemption.
|
|
26
|
-
- **MUST** complete the same quality bar as `implement-specs`: on top of full `tasks.md` and **complete checklist wrap-up**, relevant tests, honest backfill, no sibling-spec scope creep, revert formatter-only noise outside owned files before commit.
|
|
27
|
-
- **MUST NOT** `git push` **outside** **`commit-and-push`** unless the user explicitly requests remote update through that workflow (or a release/PR skill the user named).
|
|
28
|
-
- For targeted Rust tests: **MUST** pass at most one positional `cargo test` filter per invocation; use separate commands or a broader confirmed filter when multiple selectors are needed.
|
|
14
|
+
## 工作流程
|
|
29
15
|
|
|
30
|
-
|
|
16
|
+
### 1. 定位實作範圍
|
|
31
17
|
|
|
32
|
-
|
|
33
|
-
- **Execution**: Isolated worktree only; branch naming per `references/branch-naming.md`; check sibling worktrees before editing shared boundaries in a parallel batch.
|
|
34
|
-
- **Quality**: Same as `implement-specs` (including **all** `tasks.md` items **and** **all** `checklist.md` wrap-up obligations—no workload excuse), plus collision awareness with sibling worktrees per `coordination.md`.
|
|
35
|
-
- **Output**: Clean local branch in the worktree with intended commits only; parent working tree unchanged by this implementation.
|
|
18
|
+
閱讀用戶指定的spec:
|
|
36
19
|
|
|
37
|
-
|
|
20
|
+
- `spec.md` 定義了用戶的需求
|
|
21
|
+
- `tasks.md` 定義了詳細的實作任務
|
|
22
|
+
- `checklist.md` 定義了任務的完成和驗收條件
|
|
23
|
+
- `contract.md` 定義了spec的外部依賴
|
|
24
|
+
- `design.md` 定義了相關業務鏈路的架構設計
|
|
25
|
+
- `coordination.md`(如有)定義了batch spec之中各份spec各自的實作邊界
|
|
26
|
+
- `preparation.md`(如有)定義了實作batch spec之前各spec的共用準備工作
|
|
38
27
|
|
|
39
|
-
|
|
28
|
+
按照以上文件,閱讀repo,理解本次spec的實作範圍。
|
|
40
29
|
|
|
41
|
-
###
|
|
30
|
+
### 2. 創建子分支及worktree
|
|
42
31
|
|
|
43
|
-
|
|
44
|
-
- Read `preparation.md` when present; apply the Non-negotiable baseline rule above.
|
|
45
|
-
- **Pause →** Where will authoritative plan text live **for this session**—parent tree, worktree after sync—and have I opened that copy end-to-end?
|
|
46
|
-
- **Pause →** Does `coordination.md` / `preparation.md` imply **anything** I must not redo or must assume stable before coding?
|
|
32
|
+
從當前分支創建子分支及worktree。分支以規格文檔的實際變更命名,並且需要符合通用開發規範(e.g. feat/event-bus-backend)
|
|
47
33
|
|
|
48
|
-
###
|
|
34
|
+
### 3. 實作spec任務
|
|
49
35
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- Derive `change_name`; branch pattern `<type>/<spec-name>` per `references/branch-naming.md`; worktree directory `../<spec-name>` (or an equivalent path the user approves).
|
|
53
|
-
- `git branch <branch-name> <parent-branch>` then `git worktree add <path> <branch-name>`; `cd` into it; verify `pwd` vs `git rev-parse --show-toplevel`.
|
|
54
|
-
- Before editing shared modules in a batch, check `git worktree list --porcelain` and `coordination.md` for sibling ownership; read sibling diffs when the same file is touched.
|
|
55
|
-
- **Pause →** Why is **`parent-branch`** definitely the correct baseline—not an unexamined assumption that `main` is default?
|
|
56
|
-
- **Pause →** Could this work duplicate an **already-merged** implementation; what **evidence** (`git log`, tests, code search) did I use to rule that in or out?
|
|
57
|
-
- **Pause →** After `cd`, do `pwd` and `git rev-parse --show-toplevel` **match**; if not, why am I not stopping before any write?
|
|
58
|
-
- **Pause →** Which sibling worktree might already own the shared file I am about to touch, and did I inspect their diff?
|
|
36
|
+
嚴格按照 `tasks.md` 之中定義的任務,逐項完成實作。如果有多份 `tasks.md` 存在於多份spec之中,則依照 `coordination.md` 之中建議的merge順序進行實作。
|
|
37
|
+
在確認完成所有任務之後,將 `tasks.md` 之中的所有checkboxes勾選為完成。
|
|
59
38
|
|
|
60
|
-
|
|
39
|
+
如果實作的spec是batch spec,且有 `preparation.md`,在開始實作之前需要先完成 `preparation.md` 之中所規定的任務內容,並在驗收條件滿足之後回填 `preparation.md`。
|
|
61
40
|
|
|
62
|
-
|
|
63
|
-
- In the report, **MUST** include branch name, worktree path, commit hash, tests run, backfilled docs, and an explicit statement that the parent checkout was not modified for implementation files.
|
|
64
|
-
- **Pause →** Am I honoring **implement-specs** step 3–6 **constraints** literally while respecting that all writes happen **only** under this worktree root?
|
|
65
|
-
- **Pause →** If I used Rust `cargo test` filters, did I violate the **single positional filter** rule; how would I split the commands?
|
|
41
|
+
### 4. 驗證實作
|
|
66
42
|
|
|
67
|
-
|
|
43
|
+
按照 `checklist.md` 之中定義的驗收標準,逐項驗收並檢查任務是否完成。對於未達到驗收標準的任務,必須重新實作及重新驗收,並在完成驗收之後將所有 `checklist.md` 之中的checkboxes勾選為完成。
|
|
68
44
|
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
pwd && git rev-parse --show-toplevel
|
|
72
|
-
```
|
|
73
|
-
- **Skeleton commands** (`change_name` `oauth-scope`, parent `feature/x`, type `feat`):
|
|
74
|
-
```bash
|
|
75
|
-
git branch feat/oauth-scope feature/x
|
|
76
|
-
git worktree add ../oauth-scope feat/oauth-scope
|
|
77
|
-
cd ../oauth-scope
|
|
78
|
-
```
|
|
79
|
-
- **Cargo** (two filters ⇒ two commands): run `cargo test parser::` **and separately** `cargo test cache::`, not `cargo test parser:: cache::`.
|
|
45
|
+
### 5. 回填spec
|
|
80
46
|
|
|
81
|
-
|
|
47
|
+
確保所有實作任務完成並通過驗收之後,更新 `spec.md` 之中的需求checkboxes反應實際代碼實作狀態。
|
|
82
48
|
|
|
83
|
-
|
|
84
|
-
|
|
49
|
+
### 6. 提交變更
|
|
50
|
+
|
|
51
|
+
使用 `commit-and-push` 將變更提交到子分支上。不需要將變更推送到remote。
|
|
52
|
+
|
|
53
|
+
## 範例
|
|
54
|
+
|
|
55
|
+
- "用戶指定了一份有四份spec的batch spec並要求實作這份batch spec。同時,`coordination.md` 之中建議merge順序是 spec 1 -> spec 2 -> spec 3 -> spec 4。" -> "創建子分支及工作樹;從spec 1開始進行完整的實作流程,並在完成回填spec之後再開始實作spec 2,直至4份spec都被完成"
|
|
56
|
+
- "用戶指定了一份有2份spec的batch spec並要求實作這份batch spec。同時,`coordination.md` 之中的建議merge順序是spec 2 -> spec 1,並且 `preparation.md` 存在於該batch spec之中。" -> "創建子分支及工作樹;先實作 `preparation.md` 之中要求的任務並按照當中的驗收標準進行驗收。確定完成之後,從spec 2開始完整的實作流程。並在完成spec 2之後再實作 spec 1。"
|
|
57
|
+
|
|
58
|
+
## 參考資料
|
|
59
|
+
|
|
60
|
+
- `references/branch-naming.md` - 建議分支命名方式
|