@laitszkin/apollo-toolkit 3.11.8 → 3.12.0
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/CHANGELOG.md +15 -0
- 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 +24 -52
- package/develop-new-features/SKILL.md +15 -60
- package/discover-edge-cases/SKILL.md +16 -75
- package/discover-security-issues/SKILL.md +49 -83
- package/docs-to-voice/scripts/__pycache__/docs_to_voice.cpython-312.pyc +0 -0
- package/enhance-existing-features/SKILL.md +36 -57
- package/generate-spec/SKILL.md +14 -14
- 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 +27 -115
- package/katex/scripts/__pycache__/render_katex.cpython-312.pyc +0 -0
- package/maintain-project-constraints/SKILL.md +24 -78
- package/maintain-project-constraints/references/constraint-file-reference.md +58 -0
- package/merge-changes-from-local-branches/SKILL.md +36 -99
- package/open-github-issue/scripts/__pycache__/open_github_issue.cpython-312.pyc +0 -0
- package/optimise-skill/SKILL.md +1 -1
- package/optimise-skill/references/definition.md +5 -5
- package/optimise-skill/references/example_skill.md +1 -1
- 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-change-set/SKILL.md +41 -91
- package/review-codebases/SKILL.md +42 -99
- package/review-spec-related-changes/SKILL.md +42 -77
- package/solve-issues-found-during-review/SKILL.md +38 -66
- package/spec-to-project-html/SKILL.md +27 -76
- package/submission-readiness-check/SKILL.md +35 -55
- package/systematic-debug/SKILL.md +37 -53
- 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
|
@@ -1,82 +1,47 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: review-spec-related-changes
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
Use for “does this PR satisfy coordination.md + spec.md R2?” or a user-pinned `{change}` folder.
|
|
6
|
-
Do not mutate repos, bury missing goals, skip the tertiary bundle on code-bearing diffs, or rest on intent without evidence; FORBIDDEN to lead with refactor comments while R1 is failing. GOOD: pair every Not-met cite with a `spec.md` ref + concrete path:test gap.
|
|
4
|
+
面向spec合規性的只讀審查技能。先唯一確定本次變更受哪一套 `docs/plans/...` 規劃文件約束,再按業務目標逐條判定 `Met`、`Partially met`、`Not met` 或 `Deferred/N/A`;`tasks.md` 的勾選不算證據。若範圍涉及代碼實作,完成業務結論後還必須對同一範圍追加 `review-change-set`、`discover-edge-cases` 與 `discover-security-issues`,並保持固定報告順序。
|
|
7
5
|
---
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
## Workflow
|
|
52
|
-
|
|
53
|
-
**Chain-of-thought:** Answer **`Pause →`** after **each** step before moving down the list or calling dependent skills.
|
|
54
|
-
|
|
55
|
-
1. **Spec baseline** — Read governing docs end-to-end. Extract goals, acceptance criteria, non-goals, deferrals, required verifications. Build a compact claim list provable from repo evidence. Keep “what the product must do” separate from “how clean the code is.”
|
|
56
|
-
- **Pause →** Which items are **mandatory** acceptance vs explicitly **out of scope** or deferred?
|
|
57
|
-
- **Pause →** What observable failure would make me change a `Met` to `Not met` for the top risk requirement?
|
|
58
|
-
|
|
59
|
-
2. **Implementation evidence** — Read the relevant diff/staged/commits/files. Trace the minimum code path to validate claims. Run spec-named checks when available and safe. When the spec contains **independent requirement clusters** (disjoint owned paths, disjoint spec sections), **MAY** dispatch one read-only subagent per cluster to score Met/Partial/Not-met with cited evidence; the main agent reconciles cross-requirement effects and owns the final verdict ordering. Tightly coupled requirements stay on the main agent.
|
|
60
|
-
- **Pause →** What is the **smallest** code path I have not yet read that could still falsify a `Met`?
|
|
61
|
-
- **Pause →** Am I about to score `Met` from **intent** or from **tests/commands** I actually ran or inspected?
|
|
62
|
-
- **Pause →** If I clustered, is every cluster genuinely disjoint, or am I about to lose a cross-requirement contradiction by running them in isolation?
|
|
63
|
-
|
|
64
|
-
3. **Business-goal verdict first** — Emit every `Not met` / `Partially met` **before** secondary findings, with **exact** spec cites and code/test evidence. While required goals stay failed, **MUST NOT** frame archival, release, or “done” narratives that imply compliance.
|
|
65
|
-
- **Pause →** If I sorted findings by “interesting” instead of business impact, which line would unfairly rise above a missing goal?
|
|
66
|
-
- **Pause →** For each `Partially met`, what single **missing proof** (test, wire-up, error path) am I naming explicitly?
|
|
67
|
-
|
|
68
|
-
4. **Secondary reviews (code-affecting)** — On the same scope: `review-change-set` (architecture/simplification), `discover-edge-cases` (reproducible edge/observability risks), `discover-security-issues` (reproducible security). **Prefer dispatching one read-only subagent per skill in parallel** so each runs in its own context with the full SKILL.md it owns; hand each subagent the same diff scope and the structured-report contract from that skill. The main agent waits for every subagent to return, then keeps outputs labeled so they do not read as business-goal substitutions. Trivial single-file diffs may run inline without subagents. The main agent **MUST NOT** re-run a secondary skill it already delegated, and subagents **MUST NOT** mutate the repository.
|
|
69
|
-
- **Pause →** Does this secondary finding **force** a business re-score—if yes, did I revise step 3 before publishing?
|
|
70
|
-
- **Pause →** Is the diff scope identical to what I used for business mapping (no silent file creep)?
|
|
71
|
-
- **Pause →** Did every dispatched secondary subagent return — or am I about to publish from partial summaries?
|
|
72
|
-
|
|
73
|
-
5. **Final report (fixed order)** — (1) Business-goal failures (always top severity for required gaps). (2) Edge-case. (3) Security. (4) Code-review / maintainability. (5) Passing evidence for goals confirmed `Met`. (6) Residual uncertainty (skipped commands, unmapped spec text, unverifiable externals). If nothing actionable: state that explicitly **and** still cite docs and evidence reviewed.
|
|
74
|
-
- **Pause →** What commands or spec paragraphs remain **unverified**—are they all listed under residual uncertainty?
|
|
75
|
-
|
|
76
|
-
## Sample hints
|
|
77
|
-
|
|
78
|
-
- **Business claim record**:
|
|
79
|
-
- `R3.2 refresh token rotation` → `Not met` — spec `spec.md` §3.2 requires one-time use; `src/auth/refresh.rs:40` still accepts same jti on replay; test `refresh_replay` not present.
|
|
80
|
-
- **Wrong ordering** — starting with “nice simplification in `foo.ts`” while `R1.0` is unmet: **wrong**; lead with the `R1.0` gap.
|
|
81
|
-
- **Tasks checked but behavior missing** — `tasks.md` shows `[x] implement rate limit` but no call site in `src/api/*` and no test: verdict stays **`Not met` / `Partially met`**, not `Met`.
|
|
82
|
-
- **Ambiguous scope** — two directories `docs/plans/2026-05-01/foo/` and `…/batch-a/foo/` both plausible; **stop** with “need user to name path” instead of picking one.
|
|
7
|
+
## 目標
|
|
8
|
+
輸出一份只讀的spec合規審查報告,先回答「這次變更是否真的滿足規劃中的業務要求」,再補充邊界、安全與代碼審查發現。報告需要對每條關鍵需求給出可追溯的狀態判定、證據來源、缺口說明、通過證據與剩餘不確定性;本技能不負責修改代碼或更新規劃文件。
|
|
9
|
+
|
|
10
|
+
## 驗收條件
|
|
11
|
+
- 在給出任何合規結論前,已唯一確定 governing spec;若存在兩個同樣合理的規劃根目錄且無法由倉庫證據消歧,必須停止並報告歧義,不能猜測。
|
|
12
|
+
- 每條業務目標或驗收項只能根據可驗證證據判定為 `Met`、`Partially met`、`Not met` 或 `Deferred/N/A`;證據可來自代碼、測試、命令、日誌或追蹤,`tasks.md` 勾選本身不算證據。
|
|
13
|
+
- 未滿足或部分滿足的必選業務要求永遠是最高嚴重度,報告排序中不得被安全、邊界或可維護性意見壓過。
|
|
14
|
+
- 若範圍涉及代碼實作,完成業務結論後必須在同一範圍追加 `review-change-set`、`discover-edge-cases` 與 `discover-security-issues`;任一依賴不可用時,不得輸出「完整通過」結論。
|
|
15
|
+
- 全流程保持只讀:不得修改實作、測試、spec、archive、commit、push、tag 或 release。
|
|
16
|
+
- 最終交付物固定按以下順序輸出:業務缺口 → 邊界情況 → 安全問題 → 代碼審查問題 → 已滿足要求的通過證據 → 剩餘不確定性。
|
|
17
|
+
|
|
18
|
+
## 工作流程
|
|
19
|
+
1. 確定 governing spec。
|
|
20
|
+
- 若使用者已指定具體路徑,直接以該規劃目錄為準,閱讀 `spec.md`、`tasks.md`、`checklist.md`、`contract.md`、`design.md`,以及存在時的 `coordination.md`。
|
|
21
|
+
- 若使用者未指定,需根據 `git status`、diff、相關路徑、近期提交與計劃目錄證據回推出唯一 spec;若仍有歧義,立即停止。
|
|
22
|
+
2. 建立spec基線。
|
|
23
|
+
- 從 governing spec 中抽取業務目標、驗收條件、非目標、已明示的延期項與要求執行的驗證。
|
|
24
|
+
- 將「產品必須做到什麼」和「代碼寫得是否漂亮」明確分開。
|
|
25
|
+
3. 蒐集實作證據並先做業務判定。
|
|
26
|
+
- 閱讀最小必要代碼路徑、相關 diff、提交與測試,必要時執行 spec 點名且安全可跑的驗證命令。
|
|
27
|
+
- 對每條需求給出 `Met`、`Partially met`、`Not met` 或 `Deferred/N/A`,並附上精確 spec 引用與代碼/測試證據。
|
|
28
|
+
- 若 spec 中存在完全獨立的需求群組,可用只讀 subagent 並行評分;但最終排序、嚴重度與跨需求衝突整理由主代理負責。
|
|
29
|
+
4. 對代碼範圍追加次級審查。
|
|
30
|
+
- 若審查對象包含代碼實作,必須在同一範圍追加 `review-change-set`、`discover-edge-cases` 與 `discover-security-issues`。
|
|
31
|
+
- 優先以一個只讀 subagent 對應一個次級技能並行執行,主代理只負責聚合結果,不重跑已委派分析。
|
|
32
|
+
- 若次級審查結果反過來影響某條業務需求的判定,必須先回寫業務結論,再輸出最終報告。
|
|
33
|
+
5. 生成固定順序的最終報告。
|
|
34
|
+
- 先列出 `Not met` 與 `Partially met` 的業務缺口,再依序列出邊界情況、安全問題、代碼審查問題。
|
|
35
|
+
- 接著補上所有已確認 `Met` 的通過證據。
|
|
36
|
+
- 最後列出未驗證命令、無法映射的 spec 段落、外部依賴不可驗證處與其他剩餘不確定性。
|
|
37
|
+
|
|
38
|
+
## 使用範例
|
|
39
|
+
- 「這個 PR 有沒有滿足 `coordination.md` 和 `spec.md`?」-> 先唯一確定 governing spec,再按業務要求逐條打分,最後補上同範圍的邊界、安全與變更集審查。
|
|
40
|
+
- 「請檢查 `docs/plans/2026-05-01/foo/` 對應的實作是否完成」-> 直接以指定目錄為準做只讀合規審查,不依賴聊天上下文猜測。
|
|
41
|
+
- 「`tasks.md` 都打勾了,應該算完成吧?」-> 不能直接採信,仍需用代碼、測試、命令或追蹤證據重新驗證每條要求。
|
|
42
|
+
- 「先跟我講哪個 requirement 沒達成,再看程式碼好不好」-> 報告必須先輸出業務缺口,不能先用重構或風格意見掩蓋未滿足的spec要求。
|
|
43
|
+
|
|
44
|
+
## 參考資料索引
|
|
45
|
+
- `review-change-set`:在相同代碼範圍上補做架構與簡化審查,避免將spec合規與代碼品質混為一談。
|
|
46
|
+
- `discover-edge-cases`:在相同範圍上補做可重現邊界情況審查,補齊失敗路徑、併發與可觀測性風險。
|
|
47
|
+
- `discover-security-issues`:在相同範圍上補做可重現安全審查,補齊攻擊面、授權與資料外洩風險。
|
|
@@ -1,86 +1,58 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: solve-issues-found-during-review
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Use for concrete review excerpts; STOP if vague. Bad: refactor while Critical SSRF open. Good: minimal patch, tests green, evidence cited.
|
|
4
|
+
用於根據已確認的 review finding 清單逐項修復問題。必須按嚴重度排序、最小化修改、
|
|
5
|
+
每項修完立即驗證,並在結束前證明 spec 合規與相關安全 / edge-case finding 已真正清乾淨。
|
|
7
6
|
---
|
|
8
7
|
|
|
9
|
-
#
|
|
8
|
+
# 修復審查發現的問題
|
|
10
9
|
|
|
11
10
|
## Dependencies
|
|
12
11
|
|
|
13
|
-
- Required:
|
|
14
|
-
- Conditional: `review-spec-related-changes
|
|
15
|
-
-
|
|
16
|
-
- Fallback:
|
|
12
|
+
- Required: 使用者必須提供既有 review 報告或可重建的 finding 清單
|
|
13
|
+
- Conditional: `review-spec-related-changes`、`review-change-set`、`systematic-debug`、`discover-security-issues`、`discover-edge-cases`、`commit-and-push`
|
|
14
|
+
- Optional: 無
|
|
15
|
+
- Fallback: 若沒有可重建的 finding 清單就必須停止;若 `review-change-set` 不可用,至少要用針對性測試與 diff 證據補足;若使用者要求提交或推送但 `commit-and-push` 不可用,也必須停止
|
|
17
16
|
|
|
18
|
-
##
|
|
17
|
+
## Standards
|
|
19
18
|
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
- This skill **defaults to product code**; **MUST NOT** edit specs, docs, or `AGENTS.md`/`CLAUDE.md` unless the **finding text** explicitly requires it.
|
|
25
|
-
- If a finding cannot be reproduced after investigation, **MUST** record `Could not reproduce` with evidence and **MUST** continue the queue without silently dropping the item.
|
|
19
|
+
- Evidence: 每個修改都要能對應到一條已確認 finding、受影響程式碼與驗證證據
|
|
20
|
+
- Execution: 依嚴重度由高到低處理,每項 finding 修完就驗證,再進入下一項;最後再做全域重驗證
|
|
21
|
+
- Quality: 僅修確認問題,不夾帶順手重構或推測性 hardening;不能重現時必須留下 `Could not reproduce` 證據
|
|
22
|
+
- Output: 交付逐項狀態、驗證證據、spec 合規結果、 ancillary review 清理結果,以及是否真正完成本輪修復
|
|
26
23
|
|
|
27
|
-
##
|
|
24
|
+
## 技能目標
|
|
28
25
|
|
|
29
|
-
|
|
26
|
+
把 review 報告中的 confirmed findings 轉成一條可追蹤、可驗證、可收斂的修復流程,避免只做表面修改,並在結束前證明相關spec、安全與 edge-case 要求沒有留下實質風險。
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
2. **Ancillary reviews fully cleared**: Confirmed findings from **security audits**, **edge-case / hardening reviews**, and any other labeled review streams in the inbound package **MUST** reach **`Fixed`** (or documented **`Could not reproduce`** with reproducible rationale) **with** reruns or scoped proofs that show no remaining reproducible exploit or edge-case failure **in scope**. **MUST NOT** declare completion while Critical / High-class security issues or correctness-class edge regressions remain open. **`Deferred`** is incompatible with declaring completion unless the caller explicitly rescopes (“out of this pass”) **in writing** in the conversation; otherwise **MUST** keep working or stop with a blocker report listing what still fails completion §2.
|
|
28
|
+
## 驗收條件
|
|
33
29
|
|
|
34
|
-
|
|
30
|
+
- 每個程式碼改動都能對應到明確的 finding,且沒有混入無關修補
|
|
31
|
+
- 所有 finding 均按嚴重度順序處理,並在每項修復後留下通過的驗證證據
|
|
32
|
+
- 若此範圍受 `docs/plans/...`、`spec.md`、`tasks.md`、`checklist.md` 或 contract 約束,最終已有 spec 合規證據
|
|
33
|
+
- 安全、edge-case 與其他隨附 review finding 已被修復或以可重現證據標記 `Could not reproduce`;若仍有 `Deferred`,只有在使用者明確縮 scope 時才能宣稱本輪完成
|
|
35
34
|
|
|
36
|
-
##
|
|
35
|
+
## 工作流程
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
1. 先完整閱讀 report 與受影響程式碼;若使用者只說「修 review finding」但沒提供內容,先嘗試從近期輸出或 diff 重建清單,重建失敗就停止
|
|
38
|
+
2. 擷取每條 finding 的嚴重度、標題、證據位置與重現方式,並排除沒有被 reviewer 明確確認的猜測性項目
|
|
39
|
+
3. 按 Critical -> High -> Medium -> Low 排序;只有在工作空間完全隔離且檔案不重疊時,才允許平行處理不同群組,否則一律串行
|
|
40
|
+
4. 逐條處理 finding:先讀程式碼與重現路徑,再用最小修改修復,立刻執行最窄且足夠的驗證;若驗證結果不清楚,交給 `systematic-debug`
|
|
41
|
+
5. 全部 finding 處理完後,對修改範圍做整體重驗證;若是 code-affecting 變更,重新跑 `review-change-set`
|
|
42
|
+
6. 若存在綁定 spec 或計劃檔,使用 `review-spec-related-changes` 證明已重新符合要求;若 inbound package 含安全或 edge-case finding,使用 `discover-security-issues` 或 `discover-edge-cases` 的 rerun / scoped proof 證明該維度已清空
|
|
43
|
+
7. 向使用者輸出逐項狀態、驗證命令、殘留阻塞與本輪是否真的完成;若要求提交或推送,再交給 `commit-and-push`
|
|
42
44
|
|
|
43
|
-
##
|
|
45
|
+
## 使用範例
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
- 「修這份 review 裡的 HIGH SSRF finding」-> 只修該 finding 對應路徑,跑針對性測試與重現命令,確認通過後才處理下一條
|
|
48
|
+
- 「report 裡還有 edge-case 與 security finding」-> 修完主問題後,還要補 rerun / scoped proof,不能只靠口頭說明就宣稱完成
|
|
49
|
+
- 「reviewer 指的路徑現在不存在」-> 記錄檢查過的 commit 與路徑,若無法重現則標成 `Could not reproduce`,而不是虛構一個修復
|
|
46
50
|
|
|
47
|
-
|
|
51
|
+
## 參考資料索引
|
|
48
52
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Sort into Critical → High → Medium → Low. Optionally group by **module** or **business chain** for parallel work **only** if sub-agents with **isolated workspaces** exist and groups do not share half-applied state.
|
|
56
|
-
|
|
57
|
-
**Parallel path** — One package per independent group; each worker fixes its findings **in severity order locally**, validates, returns branch/diff + status. Merge packages one at a time; on conflict, preserve both fix intents; prefer the **more conservative** behavior unless the finding required aggressiveness; **MUST** flag unresolvable conflicts instead of silently dropping a fix. After merge, run consolidated tests.
|
|
58
|
-
|
|
59
|
-
**Serial path (default)** — For each finding in global severity order: read code and repro → apply minimal fix → validate (`systematic-debug` if failures are unclear) → record status → next finding.
|
|
60
|
-
- **Pause →** Am I respecting **tier closure**—no High work started until every Critical has a settled status (`Fixed`, `Deferred`, `Could not reproduce`)?
|
|
61
|
-
- **Pause →** If parallelizing: could two workers touch **overlapping** symbols or files midway through—if unsure, serialize.
|
|
62
|
-
|
|
63
|
-
### 3) Full-scope re-validation
|
|
64
|
-
|
|
65
|
-
After all findings are processed: run relevant tests over touched areas; if code changed and `review-change-set` is available, run it on the post-fix diff; capture `git diff --stat` (or equivalent). **MUST** confirm no confirmed finding remains open without a recorded reason (`Deferred`, `Could not reproduce`, etc.).
|
|
66
|
-
**Before** declaring the engagement complete: apply **Completion criteria**—**(§1)** spec/plan conformance evidence (`review-spec-related-changes` or equivalent cited requirement IDs + commands); **(§2)** reruns or scoped proofs so security / edge-case (and sibling) confirmed issues are **`Fixed`** or evidenced `Could not reproduce`, with nothing Critical/High-class left open unless the caller explicitly rescopes.
|
|
67
|
-
- **Pause →** Would the **same** reviewer still see **actionable proof** closed for each `Fixed`, or did I rationalize failures away?
|
|
68
|
-
- **Pause →** Did my consolidated diff sneak in **bonus** unrelated changes—if yes, peel them back?
|
|
69
|
-
- **Pause →** Would **§1 + §2** pass an external spot-check—is spec coverage documented and ancillary dimensions clean?
|
|
70
|
-
|
|
71
|
-
### 4) Report
|
|
72
|
-
|
|
73
|
-
Deliver: (1) Summary by severity. (2) Per finding: `Fixed` / `Could not reproduce` / `Deferred` + location + validation evidence. (3) **Completion criteria block**: §1 spec conformance (tool or checklist + requirement IDs + commands); §2 security/edge-case (and other ancillary) closure with rerun evidence or explicit caller rescope for any intentional exception. (4) Final re-validation (review tool result if any, tests, diff stat). (5) Residual/deferred with reasons—if present, state whether completion was declared or blocked. (6) User-facing next checks before merge (manual QA, integration, etc.).
|
|
74
|
-
- **Pause →** Could the user rerun **exactly one** cited command per `Fixed` to trust me—is that cited?
|
|
75
|
-
- **Pause →** Does the report prove **§1 + §2** without hand-waving?
|
|
76
|
-
|
|
77
|
-
## Notes
|
|
78
|
-
|
|
79
|
-
- Hypotheses or “might be risky” lines in a report that were **not** confirmed as findings stay **out of scope** for fixes.
|
|
80
|
-
|
|
81
|
-
## Sample hints
|
|
82
|
-
|
|
83
|
-
- **Inbound finding slice** — `HIGH | SSRF via webhook URL | src/net/fetch.rs:112 | curl user-controlled URL without allowlist`.
|
|
84
|
-
- **Serial flow** — fix `HIGH #1`, run `cargo test net_fetch` (or the project’s narrowest test), mark `Fixed` **only after green** → then proceed to `HIGH #2`; do **not** batch three HIGH fixes then test once unless a single coherent patch is unavoidable and validation still proves each finding closed.
|
|
85
|
-
- **Status line**: `HIGH SSRF fetch · Fixed · fetch.rs:105-128 · Verified: cargo test net::fetch + manual blocklisted host`.
|
|
86
|
-
- **`Could not reproduce`**: reviewer cited `middleware.ts:77` leak; current tree shows no such path/commit — note commit inspected and bail with evidence, do **not** invent a finding to satisfy the report.
|
|
53
|
+
- `review-spec-related-changes`:驗證修復後仍符合 spec / plan
|
|
54
|
+
- `review-change-set`:修復後的 code-affecting 差異重審
|
|
55
|
+
- `systematic-debug`:修復過程中遇到不明測試或 runtime 問題時使用
|
|
56
|
+
- `discover-security-issues`:清理安全 finding 時的 scoped proof
|
|
57
|
+
- `discover-edge-cases`:清理 edge-case / hardening finding 時的 scoped proof
|
|
58
|
+
- `commit-and-push`:使用者要求提交或推送時的最終交付流程
|
|
@@ -1,91 +1,42 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: spec-to-project-html
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
4
|
+
使用 `apltk architecture --spec <spec_dir>` 將專案 HTML 架構圖同步到活躍規劃文件。單個 spec 寫入 `<spec_dir>/architecture_diff/`,批量 spec 寫入 `coordination.md` 旁的共享 overlay;每個受影響功能由一個可寫子 agent 負責功能內 overlay 更新,主 agent 必須等待全部子 agent 完成後,才能補跨功能邊、渲染並驗證。基礎 atlas 不得被此技能修改。
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# 規劃文件同步到專案 HTML 架構圖
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## 技能目標
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
- Conditional: **`recover-missing-plan`** if a spec pointer is missing.
|
|
13
|
-
- Conditional: **`generate-spec`** / **`implement-specs*`** terminology for requirement IDs.
|
|
14
|
-
- Optional: **`review-spec-related-changes`** when verifying diagram updates against specs.
|
|
15
|
-
- Fallback: spec demands components that are absent from code → declare them but use `TBD` strings or a `gap` token in the role/purpose/dataflow fields; **MUST NOT** mark them as implemented.
|
|
11
|
+
根據 `docs/plans/...` 下的規劃文件,為專案架構圖生成或更新 spec overlay,使評審者能夠透過 `apltk architecture diff` 直接查看 proposed-after 架構變化,同時保持基礎 atlas 不被污染。
|
|
16
12
|
|
|
17
|
-
##
|
|
13
|
+
## 驗收條件
|
|
18
14
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- **MUST** reconcile deltas through the CLI families described in **`apltk architecture --help`**. Keep the meaning in this skill, but take the exact verbs, subverbs, and flags from the CLI itself.
|
|
25
|
-
- **MUST NOT** drop modules that are still present in code just because the spec omits them — keep them, or rewrite role/purpose to flag “out of spec scope”.
|
|
26
|
-
- **MUST** scope reads to the **affected feature modules** from the spec/design diff (plus any feature owning the other end of a cross-feature edge into an affected one). **Subagents own intra-feature overlay writes; the main agent owns cross-feature seams — after all subagents finish:**
|
|
27
|
-
- Dispatch **one write-capable subagent per affected feature**. Each applies every intra-feature overlay mutation via `apltk architecture ... --spec <spec_dir>` (exact flags: **`--help`**). Each returns **ONLY** a structured summary: sub-module change list, outbound boundary changes (cross-feature edges to add/change/remove), and any `planned` / `gap` markers.
|
|
28
|
-
- **MUST** wait until **every** dispatched subagent has completed before running any cross-feature **`edge`** mutation, overlay-wide **`meta`** that stitches multiple features, or shared **`actor`** that exists only for cross-feature context.
|
|
29
|
-
- **Forbidden:** loading every affected feature’s source into the main agent before delegating — that explodes context and produces contradictory overlays.
|
|
30
|
-
- **MUST** run `apltk architecture validate --spec <spec_dir>` after the final mutation. Resolve every reported error before reporting completion.
|
|
15
|
+
- 只透過 `apltk architecture --spec <spec_dir>` 寫入 overlay;單個 spec 產物位於 `<spec_dir>/architecture_diff/`,批量 spec 則寫入 `coordination.md` 同級的共享 overlay;不得手改 `architecture_diff/**/*.html`。
|
|
16
|
+
- 讀取規劃文件時遵循 `spec.md` → `design.md` → `contract.md` → `coordination.md` 的順序;所有重要宣告都能同時回溯到 spec 語句和相關程式碼或設計證據。
|
|
17
|
+
- 對於程式碼尚未實作、但規劃中已經提出的結構,必須顯式使用 `planned`、`gap` 或 `TBD` 標記,而不能偽裝成已落地實作。
|
|
18
|
+
- 按「每個受影響功能一個可寫子 agent」執行 overlay 更新;主 agent 必須等全部子 agent 完成後,才允許補跨功能邊、共享 `meta` 或共享 `actor`。
|
|
19
|
+
- `apltk architecture validate --spec <spec_dir>` 通過,且 `apltk architecture diff` 中的頁面配對正確,沒有懸空邊、孤兒頁面或錯誤的 add/remove 配對。
|
|
31
20
|
|
|
32
|
-
##
|
|
21
|
+
## 工作流程
|
|
33
22
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
23
|
+
1. 先定位本次規劃目錄;使用者明確給出路徑時優先使用,否則結合 `coordination.md` 或 `recover-missing-plan` 找到正確 plan 集,並整理相關需求編號用於追蹤。
|
|
24
|
+
2. 執行 `apltk architecture --help` 取得最新命令形態,然後按 `spec.md`、`design.md`、`contract.md`、`coordination.md` 的順序讀取內容,確定哪些功能、子模組、邊、變數或錯誤語義會發生變化。
|
|
25
|
+
3. 先只列出受影響功能,不要提前把所有原始碼塞進主 agent。除了直接變更的功能,也要納入跨功能邊另一端的功能,確保 overlay 中的跨邊界關係完整。
|
|
26
|
+
4. 為每個受影響功能派發一個可寫子 agent。每個子 agent 只負責自己功能內的 overlay 寫入:子模組、函式、變數、資料流、錯誤,以及功能內邊;若規劃領先於程式碼,則在角色、用途或資料流文案中明確標註 `planned`、`gap` 或 `TBD`。
|
|
27
|
+
5. 子 agent 只返回功能內變更摘要、跨功能邊界變化和待記錄的 `planned/gap` 標記;主 agent 不得重讀已委派功能原始碼,也不得重複寫功能內元件。
|
|
28
|
+
6. 等全部子 agent 完成後,主 agent 統一補跨功能 `edge`、必要的共享 `meta` / `actor`,再執行 `apltk architecture validate --spec <spec_dir>`,並透過 `apltk architecture diff` 檢查 overlay 頁面是否正確映射到 before/after 視圖。
|
|
29
|
+
7. 最終報告至少包含:觸及的 overlay 檔案或 CLI 變更類別、`modified` / `added` / `removed` 數量、所有子 agent 已完成後才開始跨功能連線的確認、未解決的 spec 與程式碼差距,以及後續跟進行動。
|
|
38
30
|
|
|
39
|
-
##
|
|
31
|
+
## 使用範例
|
|
40
32
|
|
|
41
|
-
|
|
33
|
+
- 「把這份新 spec 的架構變化渲染成 before/after HTML 對照。」 -> 「讀取 plan 集,按受影響功能分派子 agent,寫入 `architecture_diff/` overlay,並用 `apltk architecture diff` 驗證。」
|
|
34
|
+
- 「批量規劃下多個 spec 共用一份架構 overlay。」 -> 「仍以成員 spec 路徑呼叫 `--spec`,但讓 CLI 自動彙總到 `coordination.md` 同級的共享 overlay 根目錄。」
|
|
42
35
|
|
|
43
|
-
|
|
44
|
-
2. **Each touched sub-module’s internal overlay diagram clearly shows the function-level interactions inside it**, including function references and variable reads/writes on `dataflow` steps. Declare `function` / `variable` before referencing them so `validate --spec` passes.
|
|
36
|
+
## 參考資料索引
|
|
45
37
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
### 2) List the affected feature modules (no function bodies yet)
|
|
53
|
-
|
|
54
|
-
Derive from the spec/design diff which feature modules change: new sub-modules, edge changes, variable changes, error changes, retired sub-modules… **Also** include any feature owning the other end of a cross-feature edge that is being changed (even if that feature’s own spec is untouched). Record only `slug + change-kind`; do not enter function bodies yet.
|
|
55
|
-
|
|
56
|
-
### 3) Subagents patch features; orchestrator patches cross-feature seams **after** all workers finish
|
|
57
|
-
|
|
58
|
-
Dispatch one **write-capable subagent per affected feature**. Each subagent owns every intra-feature overlay write and reports outbound boundaries upward. Use **`apltk architecture --help`** for exact `add|set|remove|reorder` spelling.
|
|
59
|
-
|
|
60
|
-
> **Feature `<slug>` subagent contract (overlay)**
|
|
61
|
-
> - Read this feature’s affected sub-modules and the cited spec passages / requirement IDs.
|
|
62
|
-
> - Apply every intra-feature overlay mutation with `--spec <spec_dir>`: structural (`feature` / `submodule`), rows (`function`, `variable`, `dataflow`, `error`), and intra-feature **`edge`** changes (including failure / rollback between this feature’s own sub-modules). Order `dataflow` so **variable state** reads end-to-end.
|
|
63
|
-
> - Run `apltk architecture validate --spec <spec_dir>` before returning.
|
|
64
|
-
> - **Return ONLY**: (i) sub-module change list, (ii) outbound boundary changes (cross-feature edges add/change/remove with endpoints and suggested kind/label), (iii) any `planned` / `gap` flags for `meta.summary`.
|
|
65
|
-
|
|
66
|
-
**After every subagent has completed**, the main agent declares **only** the cross-feature seams through `apltk architecture ... --spec <spec_dir>`, then renders and validates the overlay.
|
|
67
|
-
|
|
68
|
-
- **Pause →** Do `planned` / `gap` markers read consistently across affected sub-modules?
|
|
69
|
-
- The main agent **MUST NOT** re-declare a subagent’s intra-feature components, and **MUST NOT** open source files for any feature it delegated.
|
|
70
|
-
|
|
71
|
-
- **Pause →** Does `apltk architecture diff` pair every changed page correctly? If a page shows as add + remove instead of modified, you renamed a slug somewhere — re-check.
|
|
72
|
-
|
|
73
|
-
### 4) Traceability (suggested)
|
|
74
|
-
|
|
75
|
-
Use `feature-trace` (or `meta.summary` for spec-only changes) to map spec IDs to implementation status: `met` / `partial` / `planned` / `gap`.
|
|
76
|
-
|
|
77
|
-
### 5) Report
|
|
78
|
-
|
|
79
|
-
List overlay files touched (or verb families used), the diff counts (`modified` / `added` / `removed`) from `apltk architecture diff`, confirmation that **all subagents finished before cross-feature wiring**, unresolved spec-vs-code gaps, and any follow-ups.
|
|
80
|
-
|
|
81
|
-
## Sample hints
|
|
82
|
-
|
|
83
|
-
- **Batch merge**: each member spec still calls `--spec <member_dir>`, but the CLI resolves writes to the shared batch-root overlay beside `coordination.md`; `diff` shows the batch as one combined architecture delta.
|
|
84
|
-
- **Spec shrinks scope**: prefer `submodule set --role "deprecated: ..."` before `submodule remove` so reviewers see intent.
|
|
85
|
-
- **Design-only change**: still review edges — order shifts surface as edge mutations; `validate --spec` catches dangling references.
|
|
86
|
-
|
|
87
|
-
## References
|
|
88
|
-
|
|
89
|
-
- `init-project-html/SKILL.md` — semantic contracts and acceptance criteria.
|
|
90
|
-
- `init-project-html/references/TEMPLATE_SPEC.md` — schema cheat sheet (fields/enums), not a command list.
|
|
91
|
-
- **`apltk architecture --help`** — live CLI reference.
|
|
38
|
+
- `init-project-html/SKILL.md`:基礎語義規則、邊類型與子模組表達約束。
|
|
39
|
+
- `references/TEMPLATE_SPEC.md`:overlay 模式下的欄位、列舉與 diff 配對規則速查表。
|
|
40
|
+
- `recover-missing-plan`:當 plan 路徑缺失或不明確時用於恢復正確 spec 集。
|
|
41
|
+
- `generate-spec`、`implement-specs*`:需求編號和規劃流程的上游來源。
|
|
42
|
+
- `apltk architecture --help`:`--spec` 模式命令與參數的唯一真源。
|
|
@@ -1,75 +1,55 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: submission-readiness-check
|
|
3
|
-
description:
|
|
3
|
+
description: >-
|
|
4
|
+
用於在 commit、push、PR 或 release 前做最後同步檢查。會確認 `CHANGELOG.md`、
|
|
5
|
+
專案文件、`AGENTS.md` / `CLAUDE.md` 與已完成的 planning artifacts 是否都已更新到可提交狀態。
|
|
4
6
|
---
|
|
5
7
|
|
|
6
|
-
#
|
|
8
|
+
# 提交前就緒檢查
|
|
7
9
|
|
|
8
10
|
## Dependencies
|
|
9
11
|
|
|
10
|
-
- Required: `align-project-documents
|
|
11
|
-
- Conditional: `archive-specs`
|
|
12
|
-
- Optional:
|
|
13
|
-
- Fallback:
|
|
12
|
+
- Required: `align-project-documents`、`maintain-project-constraints`
|
|
13
|
+
- Conditional: `archive-specs`
|
|
14
|
+
- Optional: 無
|
|
15
|
+
- Fallback: 若必需技能不可用,或明確需要 spec 歸檔但 `archive-specs` 不可用,必須停止並回報,不得給出虛假的 ready verdict
|
|
14
16
|
|
|
15
17
|
## Standards
|
|
16
18
|
|
|
17
|
-
- Evidence:
|
|
18
|
-
- Execution:
|
|
19
|
-
- Quality:
|
|
20
|
-
- Output:
|
|
19
|
+
- Evidence: 以實際 git diff、staged set、planning artifacts、`CHANGELOG.md` 與現有專案文件作為就緒判斷依據
|
|
20
|
+
- Execution: 先確認下游提交類型,再處理 spec 歸檔、文件同步與 changelog,最後才給出 ready 或 blocking verdict
|
|
21
|
+
- Quality: 所有命中的條件 gate 都必須真正完成;不能把 stale changelog、未同步文件或仍活躍的 plan set 當成小問題略過
|
|
22
|
+
- Output: 回傳清楚的可提交判定,列出已同步項目與仍阻塞下游提交流程的問題
|
|
21
23
|
|
|
22
|
-
##
|
|
24
|
+
## 技能目標
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
在任何提交、推送、開 PR 或發版前,先把 repository 的外部說明、內部約束與 planning artifacts 同步到一致狀態,避免把未整理完成的變更交給下一個提交流程。
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
- Check whether the repository has root `CHANGELOG.md`, top-level `AGENTS.md/CLAUDE.md`, and categorized project docs already in use.
|
|
28
|
-
- Inventory planning artifacts across the repository, not only staged files, so completed plan sets are not missed.
|
|
29
|
-
- Classify the intended downstream flow:
|
|
30
|
-
- `commit-push`
|
|
31
|
-
- `pull-request`
|
|
32
|
-
- `release`
|
|
28
|
+
## 驗收條件
|
|
33
29
|
|
|
34
|
-
|
|
30
|
+
- 已盤點真實的提交面,包括 git 狀態、staged diff、現有 docs、planning artifacts 與目標提交流程
|
|
31
|
+
- 當 spec 已完成且應轉成長期文件時,已先完成 `archive-specs`,而不是把它留給後續流程猜測處理
|
|
32
|
+
- `docs/`、`AGENTS.md` / `CLAUDE.md` 與必要的 `README.md` 已根據實際行為與工作流程同步
|
|
33
|
+
- `CHANGELOG.md` 的 `Unreleased` 區塊已準確對應這次將提交、開 PR 或發版的真實範圍
|
|
34
|
+
- 最終輸出的是明確的 ready / blocking verdict,而不是模糊警告
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
- Run `$archive-specs` when the relevant plan set reflects the delivered outcome, or when project docs still need normalization into the standard categorized structure.
|
|
38
|
-
- Keep a plan set live when it still documents unfinished implementation, unresolved design work, or same-scope follow-up that is intentionally not shipping yet.
|
|
39
|
-
- If the archive scenario is met, treat `$archive-specs` as blocking before returning a ready-to-submit verdict.
|
|
36
|
+
## 工作流程
|
|
40
37
|
|
|
41
|
-
|
|
38
|
+
1. 先讀取 git 狀態、staged / unstaged diff,並盤點 repo 是否有 `CHANGELOG.md`、`AGENTS.md`、`CLAUDE.md`、標準化 `docs/` 結構,以及任何 `docs/plans/...` 計劃集
|
|
39
|
+
2. 判斷下游流程屬於 `commit-push`、`pull-request` 或 `release`,因為不同流程對 changelog 與發版資料的要求不同
|
|
40
|
+
3. 檢查 planning artifacts 是否應轉檔;只要 plan set 已對應本次交付成果,或專案文件仍未標準化,就必須先跑 `archive-specs`
|
|
41
|
+
4. 在 spec 歸檔判斷完成後,同步專案文件;必要時執行 `align-project-documents` 更新 `docs/`,再用 `maintain-project-constraints` 更新 `AGENTS.md` / `CLAUDE.md`
|
|
42
|
+
5. 檢查 `CHANGELOG.md`:對 commit / PR 流程,要讓 `Unreleased` 精準反映這次待提交內容,同時保留其他未出貨工作;對 release 流程,`Unreleased` 必須非空且已整理成可直接切版的 release notes
|
|
43
|
+
6. 彙整哪些項目已同步、哪些仍阻塞;若還有未完成的 gate,明確回報 blocking item,而不是把責任留給下一個技能
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
- Run `$maintain-project-constraints` immediately before the owning submission workflow mutates git history.
|
|
45
|
-
- Apply the resulting doc and `AGENTS.md/CLAUDE.md` updates when behavior, operator workflow, or standing project rules changed.
|
|
45
|
+
## 使用範例
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
- 「準備提交這批變更」-> 檢查是否有未同步 changelog、文件與已完成但尚未歸檔的 spec
|
|
48
|
+
- 「準備開 PR」-> 確保 `Unreleased` 反映當前 PR 範圍,並把 `AGENTS.md` / `CLAUDE.md` 與 docs 同步好
|
|
49
|
+
- 「準備發版」-> 確保 `Unreleased` 非空且可直接作為 release notes,並先完成任何必要的 spec 歸檔與文件標準化
|
|
48
50
|
|
|
49
|
-
|
|
50
|
-
- For `commit-push` and `pull-request` flows:
|
|
51
|
-
- Keep `Unreleased` aligned with the actual pending change set.
|
|
52
|
-
- Add or update only the bullets that correspond to the current work.
|
|
53
|
-
- Preserve unrelated pending bullets from other unshipped work.
|
|
54
|
-
- Remove or rewrite stale bullets when the current implementation supersedes them.
|
|
55
|
-
- If `Unreleased` is missing the current code-affecting or user-visible change, edit `CHANGELOG.md` now instead of returning a warning for another workflow to maybe fix later.
|
|
56
|
-
- For `release` flows:
|
|
57
|
-
- Require a non-empty `Unreleased` section before the release continues.
|
|
58
|
-
- Ensure the release workflow will cut notes directly from curated changelog content instead of reconstructing them from `git diff`.
|
|
59
|
-
- Confirm the `Unreleased` bullets are release-ready before handing control back: they must describe the exact release scope that will be versioned and tagged next.
|
|
60
|
-
- If code-affecting or user-visible changes are about to ship and `CHANGELOG.md` does not reflect them, stop and fix the changelog before continuing.
|
|
51
|
+
## 參考資料索引
|
|
61
52
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
-
|
|
65
|
-
- project docs
|
|
66
|
-
- `AGENTS.md/CLAUDE.md`
|
|
67
|
-
- `CHANGELOG.md`
|
|
68
|
-
- archived plan sets
|
|
69
|
-
- If anything remains unsynchronized, report it as a blocking item rather than letting the submit workflow continue optimistically.
|
|
70
|
-
|
|
71
|
-
## Notes
|
|
72
|
-
|
|
73
|
-
- Do not create commits, tags, pushes, PRs, or releases inside this skill.
|
|
74
|
-
- Treat scenario-matched conditional gates such as spec archival, docs synchronization, and changelog updates as blocking readiness work, not optional follow-up.
|
|
75
|
-
- Use this skill as a shared preflight for submit workflows rather than duplicating the same finalization checklist in multiple skills.
|
|
53
|
+
- `align-project-documents`:同步 `docs/features/`、`docs/architecture/`、`docs/principles/`
|
|
54
|
+
- `maintain-project-constraints`:同步 `AGENTS.md` / `CLAUDE.md`
|
|
55
|
+
- `archive-specs`:在符合條件時轉檔並歸檔 planning artifacts
|