@laitszkin/apollo-toolkit 3.12.1 → 3.13.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 +38 -107
- package/CHANGELOG.md +28 -0
- package/CLAUDE.md +38 -0
- package/README.md +9 -16
- 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 +0 -6
- package/commit-and-push/SKILL.md +3 -9
- package/docs-to-voice/scripts/__pycache__/docs_to_voice.cpython-312.pyc +0 -0
- package/generate-spec/SKILL.md +30 -11
- package/generate-spec/references/definition.md +12 -0
- package/generate-spec/scripts/__pycache__/create-specscpython-312.pyc +0 -0
- package/init-project-html/SKILL.md +18 -22
- package/init-project-html/references/definition.md +12 -0
- package/katex/scripts/__pycache__/render_katex.cpython-312.pyc +0 -0
- package/maintain-project-constraints/SKILL.md +11 -19
- package/merge-changes-from-local-branches/SKILL.md +11 -24
- package/open-github-issue/scripts/__pycache__/open_github_issue.cpython-312.pyc +0 -0
- package/optimise-skill/SKILL.md +10 -2
- package/optimise-skill/references/example_skill.md +10 -2
- 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/solve-issues-found-during-review/SKILL.md +1 -1
- package/systematic-debug/SKILL.md +11 -38
- package/test-case-strategy/SKILL.md +10 -37
- package/text-to-short-video/scripts/__pycache__/enforce_video_aspect_ratio.cpython-312.pyc +0 -0
- package/update-project-html/SKILL.md +19 -24
- package/update-project-html/references/definition.md +12 -0
- package/version-release/SKILL.md +16 -37
- package/iterative-code-performance/LICENSE +0 -21
- package/iterative-code-performance/README.md +0 -34
- package/iterative-code-performance/SKILL.md +0 -116
- package/iterative-code-performance/agents/openai.yaml +0 -4
- package/iterative-code-performance/references/algorithmic-complexity.md +0 -58
- package/iterative-code-performance/references/allocation-and-hot-loops.md +0 -53
- package/iterative-code-performance/references/caching-and-memoization.md +0 -64
- package/iterative-code-performance/references/concurrency-and-pipelines.md +0 -61
- package/iterative-code-performance/references/coupled-hot-path-strategy.md +0 -78
- package/iterative-code-performance/references/io-batching-and-queries.md +0 -55
- package/iterative-code-performance/references/iteration-gates.md +0 -133
- package/iterative-code-performance/references/job-selection.md +0 -92
- package/iterative-code-performance/references/measurement-and-benchmarking.md +0 -78
- package/iterative-code-performance/references/module-coverage.md +0 -133
- package/iterative-code-performance/references/repository-scan.md +0 -69
- package/iterative-code-quality/LICENSE +0 -21
- package/iterative-code-quality/README.md +0 -45
- package/iterative-code-quality/SKILL.md +0 -112
- package/iterative-code-quality/agents/openai.yaml +0 -4
- package/iterative-code-quality/references/coupled-core-file-strategy.md +0 -73
- package/iterative-code-quality/references/iteration-gates.md +0 -127
- package/iterative-code-quality/references/job-selection.md +0 -78
- package/iterative-code-quality/references/logging-alignment.md +0 -67
- package/iterative-code-quality/references/module-boundaries.md +0 -83
- package/iterative-code-quality/references/module-coverage.md +0 -126
- package/iterative-code-quality/references/naming-and-simplification.md +0 -73
- package/iterative-code-quality/references/repository-scan.md +0 -65
- package/iterative-code-quality/references/testing-strategy.md +0 -95
- package/merge-conflict-resolver/SKILL.md +0 -46
- package/merge-conflict-resolver/agents/openai.yaml +0 -5
- package/spec-to-project-html/SKILL.md +0 -42
- package/spec-to-project-html/agents/openai.yaml +0 -11
- package/spec-to-project-html/references/TEMPLATE_SPEC.md +0 -113
- package/submission-readiness-check/SKILL.md +0 -39
- package/submission-readiness-check/agents/openai.yaml +0 -4
package/optimise-skill/SKILL.md
CHANGED
|
@@ -1,36 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: optimise-skill
|
|
3
|
-
description:
|
|
3
|
+
description: 當你需要優化 agent skills 的 `SKILL.md` 時,調用這個技能。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## 目標
|
|
7
|
+
|
|
7
8
|
在不影響被優化技能整體流程前提下,利用提示詞工程,對技能進行優化,減少冗余表達,增強agent對技能的理解能力以及實際工作中的使用效率。
|
|
8
9
|
|
|
9
10
|
## 驗收條件
|
|
11
|
+
|
|
10
12
|
- 被優化技能的最終交付產物不受影響
|
|
11
13
|
- 被優化技能有顯著冗余削減,且具備精確提示能力,盡最大可能釋放LLM的性能
|
|
12
14
|
|
|
13
15
|
## 工作流程
|
|
14
16
|
|
|
15
17
|
### 1. 識別交付物
|
|
18
|
+
|
|
16
19
|
完整閱讀整個技能的 `SKILL.md` 文檔,以及其引用的所有額檔案,包括但不限於 `references/` , `scripts/` 。基於獲取到的技能上下文資訊,總結出該技能的最終交付產物。
|
|
17
20
|
|
|
18
21
|
### 2. 制定驗收條件
|
|
22
|
+
|
|
19
23
|
制定驗收條件,從而確保LLM能夠穩定、可復現地按照驗收條件產出符合要求高質量最終交付物
|
|
20
24
|
|
|
21
25
|
### 3. 重寫技能
|
|
26
|
+
|
|
22
27
|
將整個技能的 `SKILL.md` 重寫。重寫後的技能應該只包含以下幾個關鍵組成部分:
|
|
23
28
|
- 目標
|
|
24
29
|
- 驗收條件
|
|
25
30
|
- 工作流程
|
|
26
|
-
-
|
|
31
|
+
- 範例(選用)
|
|
27
32
|
- 參考資料
|
|
33
|
+
|
|
28
34
|
對於技能有幫助的內但不符合上述技能架構規範,則應該被分類放置在 `references/` 下的markdown檔案。
|
|
29
35
|
|
|
30
36
|
## 範例
|
|
37
|
+
|
|
31
38
|
- "一個專注在提示LLM agent進行自我迭代,並為repo帶來性能優化的技能需要被優化" -> "定義驗收條件為優化後性能相較優化前至少提升X個百分比,並且項目之中不存在任何O(n^2)級別時間複雜度的函式和邏輯,並按照標準架構重寫技能。"
|
|
32
39
|
- "一個有大量前端開發範例被包含在 `SKILL.md` 之中的前端開發技能需要被優化" -> "定義驗收條件為前端頁面 `reference` 之中提供的大量建議範例重寫且不包含任何建議示例之中明確拒絕的設計,然後按照技能優化流程對技能進行全面的重寫。"
|
|
33
40
|
|
|
34
41
|
## 參考資料
|
|
42
|
+
|
|
35
43
|
- `references/example_skill.md` - 優化後的技能範例,在進行技能優化時必須閱讀並嚴格遵照當中格式 **(必讀)**
|
|
36
44
|
- `references/definition.md` - 技能之中各個區塊的定義 **(必讀)**
|
|
@@ -1,36 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: optimise-skill
|
|
3
|
-
description:
|
|
3
|
+
description: 當你需要優化 agent skills 的 `SKILL.md` 時,調用這個技能。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## 目標
|
|
7
|
+
|
|
7
8
|
在不影響被優化技能整體流程前提下,利用提示詞工程,對技能進行優化,減少冗余表達,增強agent對技能的理解能力以及實際工作中的使用效率。
|
|
8
9
|
|
|
9
10
|
## 驗收條件
|
|
11
|
+
|
|
10
12
|
- 被優化技能的最終交付產物不受影響
|
|
11
13
|
- 被優化技能有顯著冗余削減,且具備精確提示能力,盡最大可能釋放LLM的性能
|
|
12
14
|
|
|
13
15
|
## 工作流程
|
|
14
16
|
|
|
15
17
|
### 1. 識別交付物
|
|
18
|
+
|
|
16
19
|
完整閱讀整個技能的 `SKILL.md` 文檔,以及其引用的所有額檔案,包括但不限於 `references/` , `scripts/` 。基於獲取到的技能上下文資訊,總結出該技能的最終交付產物。
|
|
17
20
|
|
|
18
21
|
### 2. 制定驗收條件
|
|
22
|
+
|
|
19
23
|
制定驗收條件,從而確保LLM能夠穩定、可復現地按照驗收條件產出符合要求高質量最終交付物
|
|
20
24
|
|
|
21
25
|
### 3. 重寫技能
|
|
26
|
+
|
|
22
27
|
將整個技能的 `SKILL.md` 重寫。重寫後的技能應該只包含以下幾個關鍵組成部分:
|
|
23
28
|
- 目標
|
|
24
29
|
- 驗收條件
|
|
25
30
|
- 工作流程
|
|
26
|
-
-
|
|
31
|
+
- 範例(選用)
|
|
27
32
|
- 參考資料
|
|
33
|
+
|
|
28
34
|
對於技能有幫助的內但不符合上述技能架構規範,則應該被分類放置在 `references/` 下的markdown檔案。
|
|
29
35
|
|
|
30
36
|
## 範例
|
|
37
|
+
|
|
31
38
|
- "一個專注在提示LLM agent進行自我迭代,並為repo帶來性能優化的技能需要被優化" -> "定義驗收條件為優化後性能相較優化前至少提升X個百分比,並且項目之中不存在任何O(n^2)級別時間複雜度的函式和邏輯,並按照標準架構重寫技能。"
|
|
32
39
|
- "一個有大量前端開發範例被包含在 `SKILL.md` 之中的前端開發技能需要被優化" -> "定義驗收條件為前端頁面 `reference` 之中提供的大量建議範例重寫且不包含任何建議示例之中明確拒絕的設計,然後按照技能優化流程對技能進行全面的重寫。"
|
|
33
40
|
|
|
34
41
|
## 參考資料
|
|
42
|
+
|
|
35
43
|
- `references/example_skill.md` - 優化後的技能範例,在進行技能優化時必須閱讀並嚴格遵照當中格式 **(必讀)**
|
|
36
44
|
- `references/definition.md` - 技能之中各個區塊的定義 **(必讀)**
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,55 +1,28 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: systematic-debug
|
|
3
|
-
description:
|
|
4
|
-
用於系統化排查程式問題。先釐清預期與實際行為,再對所有合理原因做可重現驗證,
|
|
5
|
-
找出真正根因並以最小修復完成驗證;凡是出現 observed-vs-expected mismatch 都應優先使用。
|
|
3
|
+
description: 當你需要系統性排查用戶指出的非預期行為時,調用這個技能。
|
|
6
4
|
---
|
|
7
5
|
|
|
8
|
-
# 系統化除錯
|
|
9
|
-
|
|
10
|
-
## Dependencies
|
|
11
|
-
|
|
12
|
-
- Required: 無
|
|
13
|
-
- Conditional: 視情況可搭配 `test-case-strategy`、`analyse-app-logs`
|
|
14
|
-
- Optional: 無
|
|
15
|
-
- Fallback: 無
|
|
16
|
-
|
|
17
|
-
## Standards
|
|
18
|
-
|
|
19
|
-
- Evidence: 先收集預期與實際行為、程式碼路徑、測試輸出與單一可信 runtime artifact,再判斷原因
|
|
20
|
-
- Execution: 為每個合理假設建立可重現證據,定位最後一個成功階段,再區分工具鏈、測試契約、測試隔離與產品邏輯問題
|
|
21
|
-
- Quality: 修復只針對真實根因;不能重現的假設必須明確排除;不得混用不同執行批次的證據
|
|
22
|
-
- Output: 產出根因候選、重現方式、最終分類、最小修復、驗證結果,以及在 runtime 問題中使用的 canonical evidence
|
|
23
|
-
|
|
24
6
|
## 技能目標
|
|
25
7
|
|
|
26
|
-
|
|
8
|
+
用流程化的方式重現用戶發現的非預期行為,並通過回歸測試避免該問題再次出現。
|
|
27
9
|
|
|
28
10
|
## 驗收條件
|
|
29
11
|
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
- 已區分問題屬於工具鏈 / 平台、測試契約過期、測試干擾、流程編排,還是真正的產品邏輯缺陷
|
|
33
|
-
- 最終修復是最小且聚焦的,並由失敗後轉成功的測試或 bounded rerun 證明有效
|
|
12
|
+
- 非預期行為被修復。
|
|
13
|
+
- 相關回歸測試被建立。
|
|
34
14
|
|
|
35
15
|
## 工作流程
|
|
36
16
|
|
|
37
|
-
1.
|
|
38
|
-
2. 把流程拆成具體階段,例如 setup、startup、readiness、steady-state、persistence、shutdown,找出最後一個已確定成功的階段
|
|
39
|
-
3. 為每個合理根因建立重現方式;能用測試重現就優先用測試,涉及真實執行流程時則用相同模式的 bounded rerun,而不是中途切換到不同 fidelity 的環境
|
|
40
|
-
4. 若失敗只在平行執行、共享 shell-out、共享暫存路徑或舊報告路徑下出現,先調查測試隔離、共享狀態與 artifact routing 問題
|
|
41
|
-
5. 用重現證據確認真正根因,並明確排除非原因;若測試失敗其實來自 stale assertion 或 fixture drift,先修正測試契約,不要反向削弱產品行為
|
|
42
|
-
6. 實作最小修復並反覆驗證,直到所有重現案例、相關測試或 bounded rerun 都通過
|
|
43
|
-
7. 向使用者回報根因清單、最終分類、修復摘要、驗證結果,以及任何仍受限於執行環境或資料品質的部分
|
|
17
|
+
### 1. 分析問題
|
|
44
18
|
|
|
45
|
-
|
|
19
|
+
按照用戶給出的資訊,結合相關代碼實作片段閱讀,排查可能導致問題的原因。
|
|
46
20
|
|
|
47
|
-
|
|
48
|
-
- 「測試單獨跑會過,但整個 suite 會 flaky」-> 優先排查共享狀態、鎖、暫存目錄與環境污染,而不是先改產品邏輯
|
|
49
|
-
- 「bounded run 幾乎沒有事件發生」-> 先沿著 lifecycle funnel 判斷停在哪個階段,再確認是 profile 過度破壞、編排錯誤,還是實際業務邏輯問題
|
|
21
|
+
### 2. 滲透測試
|
|
50
22
|
|
|
51
|
-
|
|
23
|
+
整理所有可能導致問題的原因,撰寫測試案例嘗試重現該問題。
|
|
24
|
+
如果你發現所有你構思的可能性均無法重現該非預期行為,你需要重新構思,直至該非預期行為被測試有效重現。
|
|
52
25
|
|
|
53
|
-
|
|
54
|
-
- `analyse-app-logs`:問題主要來自應用日誌時使用
|
|
26
|
+
### 3. 修復代碼
|
|
55
27
|
|
|
28
|
+
對代碼進行修復,直至重現測試全數通過。
|
|
@@ -1,56 +1,29 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: test-case-strategy
|
|
3
|
-
description:
|
|
4
|
-
為實作工作選擇最小且足夠的測試組合。當 spec、功能開發、功能增強、重構或 bug 修復
|
|
5
|
-
需要明確決定單元、回歸、property、integration、E2E、對抗性測試或 drift check 時使用。
|
|
3
|
+
description: 當你需要設計測試策略時,調用這個技能。
|
|
6
4
|
---
|
|
7
5
|
|
|
8
|
-
# 測試案例策略
|
|
9
|
-
|
|
10
|
-
## Dependencies
|
|
11
|
-
|
|
12
|
-
- Required: 無
|
|
13
|
-
- Conditional: 無
|
|
14
|
-
- Optional: 無
|
|
15
|
-
- Fallback: 無
|
|
16
|
-
|
|
17
|
-
## Standards
|
|
18
|
-
|
|
19
|
-
- Evidence: 只根據需求、風險、受影響模組、依賴形態與現有覆蓋情況選擇測試,不為了湊數加測試
|
|
20
|
-
- Execution: 先盤點風險與 oracle,再選最小可證明風險的測試層級,必要時才升級到更重的測試
|
|
21
|
-
- Quality: 每個測試都要有可重現、可驗證的明確 oracle,而不是從新寫出的實作反推
|
|
22
|
-
- Output: 產出可直接執行的測試決策,包含測試 ID、目標、層級、oracle、fixture/mock 策略、驗證命令與 `N/A` 理由
|
|
23
|
-
|
|
24
6
|
## 技能目標
|
|
25
7
|
|
|
26
|
-
|
|
8
|
+
基於當前需求,規劃完整的測試策略。
|
|
27
9
|
|
|
28
10
|
## 驗收條件
|
|
29
11
|
|
|
30
|
-
-
|
|
31
|
-
- 每個測試決策都選擇了最小但足以證明風險的測試層級,而不是預設往大測試堆
|
|
32
|
-
- 每個測試都有明確 oracle、fixture 或 mock 策略,以及可執行的驗證方式
|
|
33
|
-
- 若某種測試層級不適用,已留下具體 `N/A` 理由而非含糊跳過
|
|
12
|
+
- 所有需求及實作任務存在關鍵性驗證測試
|
|
34
13
|
|
|
35
14
|
## 工作流程
|
|
36
15
|
|
|
37
|
-
1.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
4. 在實作前先定義 oracle,來源只能是 `spec.md`、`design.md`、`contract.md`、官方文件或既有正確行為,不能從新實作反推
|
|
41
|
-
5. 對每個非平凡原子任務補上 unit drift check;若做不到,必須記錄最小替代檢查與具體原因
|
|
42
|
-
6. 用統一格式記錄測試決策,讓後續技能可以直接執行與驗證
|
|
16
|
+
### 1. 理解用戶需求並閱讀相關代碼
|
|
17
|
+
|
|
18
|
+
理解用戶需求。同時,閱讀相關代碼實作,了解可用測試方式。
|
|
43
19
|
|
|
44
|
-
|
|
20
|
+
### 2. 設計測試策略
|
|
45
21
|
|
|
46
|
-
|
|
47
|
-
- 「新增排序與去重邏輯」-> 使用 property-based tests 驗證單調性、資料保留與重播不變量
|
|
48
|
-
- 「改動 repository、service 與 API handler 的協作」-> 使用 integration tests 驗證跨模組資料流與錯誤處理
|
|
49
|
-
- 「高價值結帳流程可能被權限與狀態機影響」-> 僅在 unit / integration 不足以證明風險時才加最小 E2E
|
|
22
|
+
閱讀相關參考資料,了解在不同場景下常見的測試策略,並由此設計用戶需求及實作任務的驗證測試。
|
|
50
23
|
|
|
51
|
-
##
|
|
24
|
+
## 參考資料
|
|
52
25
|
|
|
53
26
|
- `references/unit-tests.md`:單元測試與 drift check 設計
|
|
54
27
|
- `references/property-based-tests.md`:property tests 的選擇與 oracle 設計
|
|
55
28
|
- `references/integration-tests.md`:整合測試與外部狀態場景設計
|
|
56
|
-
- `references/e2e-tests.md`:E2E 決策與替代規則
|
|
29
|
+
- `references/e2e-tests.md`:E2E 決策與替代規則
|
|
Binary file
|
|
@@ -1,40 +1,35 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: update-project-html
|
|
3
|
-
description:
|
|
4
|
-
使用 `apltk architecture` 按真實程式碼 diff 刷新基礎專案 HTML 架構圖譜。先確定 diff 範圍並過濾出真正影響執行時行為的變更,再按受影響功能分派可寫子 agent 處理功能內更新;主 agent 必須等待全部子 agent 完成後,才能補跨功能邊並執行 `render` 與 `validate`。該技能只更新基礎 atlas,不使用 `--spec`。
|
|
3
|
+
description: 當你發現項目架構圖過時,與實際代碼實作脫節,需要更新時,調用這個技能。
|
|
5
4
|
---
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## 技能目標
|
|
6
|
+
## 目標
|
|
10
7
|
|
|
11
8
|
根據目前分支、工作區或指定提交範圍內的真實程式碼變更,增量刷新 `resources/project-architecture/` 下的基礎 atlas 與渲染 HTML,使圖譜持續和實際程式碼保持一致。
|
|
12
9
|
|
|
13
10
|
## 驗收條件
|
|
14
11
|
|
|
15
|
-
-
|
|
16
|
-
- 在讀取原始碼前就明確本次 diff 範圍,並在報告中保留所執行的原始命令;過濾掉純文件、靜態資源、鎖檔、生成物和純格式化變更,同時記錄被跳過的類別與原因。
|
|
17
|
-
- 選定範圍內每個真正影響行為的 hunk,都要麼體現在功能內元件更新或跨功能邊變化上,要麼在交付報告中明確標註「對圖譜無影響」及原因。
|
|
18
|
-
- 按「每個受影響功能一個可寫子 agent」執行;主 agent 必須等全部子 agent 完成後,才允許修改跨功能 `edge`、共享 `meta` 或補充跨功能上下文。
|
|
19
|
-
- 更新後的圖譜繼續滿足 `init-project-html` 的語義要求,且 `apltk architecture validate` 通過。
|
|
12
|
+
- 所有架構圖已經貼合最新的代碼實作狀態。
|
|
20
13
|
|
|
21
14
|
## 工作流程
|
|
22
15
|
|
|
23
|
-
1.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
### 1. 查看現有架構圖
|
|
17
|
+
|
|
18
|
+
閱讀現有架構圖,整理當前功能模塊之間的關係、子模塊之間的關係等重要資訊。
|
|
19
|
+
|
|
20
|
+
### 2. 對照代碼庫及當前架構圖
|
|
21
|
+
|
|
22
|
+
閱讀當前 repo,驗證當前架構圖是否存在錯誤、遺漏。
|
|
23
|
+
如果外部環境允許使用 subagents,建議通過調度 subagents 完成代碼與架構圖的對照任務。
|
|
29
24
|
|
|
30
|
-
|
|
25
|
+
### 3. 通過 `apltk` cli 工具更新當前架構圖
|
|
31
26
|
|
|
32
|
-
|
|
33
|
-
-
|
|
27
|
+
使用 `apltk` cli工具,協助完成整個架構圖的更新,確保架構圖完全描述了:
|
|
28
|
+
- 功能模塊之間的關係
|
|
29
|
+
- 子模塊之間的關係
|
|
30
|
+
- 項目資料庫、錯誤處理
|
|
34
31
|
|
|
35
|
-
##
|
|
32
|
+
## 參考資料
|
|
36
33
|
|
|
37
|
-
- `
|
|
38
|
-
- `
|
|
39
|
-
- `README.md`:本技能的簡要用途說明。
|
|
40
|
-
- `apltk architecture --help`:命令、參數和子命令的唯一真源。
|
|
34
|
+
- `references/definition.md` - 功能模塊與子模塊的定義
|
|
35
|
+
- `apltk architecture --help` - cli 工具的指引
|
package/version-release/SKILL.md
CHANGED
|
@@ -1,53 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: version-release
|
|
3
|
-
description:
|
|
4
|
-
用於明確的 semver 發版流程。必須先完成 `commit-and-push` 共用 gate 與
|
|
5
|
-
`submission-readiness-check`,再決定版本、更新 changelog、建立 tag、推送並發布 GitHub Release。
|
|
3
|
+
description: 當你需要協助用戶完成版本發佈時,使用這個技能。
|
|
6
4
|
---
|
|
7
5
|
|
|
8
|
-
# 版本發佈
|
|
9
|
-
|
|
10
|
-
## Dependencies
|
|
11
|
-
|
|
12
|
-
- Required: `commit-and-push`、`submission-readiness-check`
|
|
13
|
-
- Conditional: `archive-specs`
|
|
14
|
-
- Optional: 無
|
|
15
|
-
- Fallback: 缺少必需技能時必須停止,不能憑印象手動補一個發版流程
|
|
16
|
-
|
|
17
|
-
## Standards
|
|
18
|
-
|
|
19
|
-
- Evidence: 以版本檔、`CHANGELOG.md`、本地/remote tag、既有 GitHub Release 與使用者明確的 bump 意圖作為依據
|
|
20
|
-
- Execution: 先確認這真的是 release 請求,再完成所有 gate,之後才更新版本、切 changelog、打 tag、推送與發布 Release
|
|
21
|
-
- Quality: 不猜版本、不重複發版、不用原始 diff 臨時拼 release notes;所有版本入口必須同步一致
|
|
22
|
-
- Output: 交付可驗證的版本發佈結果,包含版本號、tag、remote驗證與 GitHub Release URL
|
|
23
|
-
|
|
24
6
|
## 技能目標
|
|
25
7
|
|
|
26
|
-
|
|
8
|
+
幫用戶完成自動化版本發佈流程
|
|
27
9
|
|
|
28
10
|
## 驗收條件
|
|
29
11
|
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
- `submission-readiness-check` 與必要的 `archive-specs` 都已完成,且 `CHANGELOG.md` 的 `Unreleased` 內容足以支撐本次發版
|
|
33
|
-
- 最終已同步版本檔、發布說明、commit、tag、remote refs 與 GitHub Release;若使用者明確要求不發布 Release,需在結果中清楚註明
|
|
12
|
+
- `CHANGELOG.md`, `docs/` 下所有項目文檔已經被同步到最新狀態
|
|
13
|
+
- Github release, Github version tag 被完成創建
|
|
34
14
|
|
|
35
15
|
## 工作流程
|
|
36
16
|
|
|
37
|
-
1.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
17
|
+
### 1. 檢查並確認 repo 狀態
|
|
18
|
+
|
|
19
|
+
閱讀目前的 repo 狀態。查看是否依然存在未提交變更。如有,使用 `commit-and-push` 技能將目前為提交的變更暫存並提交。推送到 remote。
|
|
20
|
+
|
|
21
|
+
### 2. 更新項目文檔狀態
|
|
22
|
+
|
|
23
|
+
完整閱讀上一次發佈版本至今的所有變更,並檢查文檔之中的表述是否存在錯誤或遺漏。如有,使用 `align-project-documents`, `maintain-project-constraints` 這兩個技能將所有項目文檔同步到最新狀態。
|
|
24
|
+
如果外部環境允許使用 subagents,建議通過調度subagents完成變更的逐行深度閱讀。
|
|
45
25
|
|
|
46
|
-
|
|
26
|
+
### 3. 發佈版本
|
|
47
27
|
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
|
|
28
|
+
確認所有文檔都已經被更新之後,更新 repo 的版本文件(如 pyproject.toml, cargo.toml)。
|
|
29
|
+
使用 `commit-and-push` 技能將所有變更提交並推送到 remote。
|
|
30
|
+
最後,將用戶要求的版本所對應的 version tag 推送到 remote 並建立 github release。
|
|
51
31
|
|
|
52
32
|
## 參考資料索引
|
|
53
33
|
|
|
@@ -56,4 +36,3 @@ description: >-
|
|
|
56
36
|
- `references/branch-naming.md`:分支命名慣例
|
|
57
37
|
- `references/changelog-writing.md`:`CHANGELOG.md` 與 `Unreleased` 維護規則
|
|
58
38
|
- `references/readme-writing.md`:README 只在必要時同步更新
|
|
59
|
-
- `commit-and-push`:共享的 git 檢查、提交與推送 discipline
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 LaiTszKin
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# iterative-code-performance
|
|
2
|
-
|
|
3
|
-
Improve an existing repository through a strict three-step loop of full-codebase performance scan, module-scoped optimization, and final documentation/constraint sync while preserving intended business behavior and the system's top-level macro architecture.
|
|
4
|
-
|
|
5
|
-
## Core capabilities
|
|
6
|
-
|
|
7
|
-
- Runs a repository-wide performance scan before every optimization round and refreshes a concrete bottleneck backlog.
|
|
8
|
-
- Uses a strict three-step loop: scan the codebase, choose this round's jobs and optimize, then update docs/constraints only when no actionable gap remains.
|
|
9
|
-
- Builds a module inventory and coverage ledger so every in-scope module receives a performance-oriented deep-read iteration before completion.
|
|
10
|
-
- Defines deep-read as a job-oriented scan across measurement, algorithmic complexity, repeated work, IO, batching, query behavior, caching, allocation churn, hot loops, concurrency, and staged unlock opportunities.
|
|
11
|
-
- Prioritizes measured or clearly complexity-backed bottlenecks over speculative micro-optimizations.
|
|
12
|
-
- Adds or updates benchmark, characterization, regression, load, or integration guardrails when optimization risk requires them.
|
|
13
|
-
- Requires confidence decisions to combine the agent's self-assessed ability, task complexity, guardrail strength, rollback or repair paths, and whether strong tests or benchmarks can safely drive broken optimizations back to green.
|
|
14
|
-
- Reduces avoidable repeated computation, unnecessary serialization/parsing, allocation churn, IO round trips, inefficient query patterns, and unbounded concurrency.
|
|
15
|
-
- Introduces caching or memoization only when ownership, invalidation, size bounds, and failure behavior are clear.
|
|
16
|
-
- Treats large coupled hot paths as staged unlock problems, not as automatic stop signals.
|
|
17
|
-
- Re-scans the full repository after every iteration and repeats while any known in-scope actionable performance issue or unvisited in-scope module remains.
|
|
18
|
-
- Synchronizes project docs and `AGENTS.md/CLAUDE.md` through `align-project-documents` and `maintain-project-constraints` after implementation.
|
|
19
|
-
|
|
20
|
-
## Repository structure
|
|
21
|
-
|
|
22
|
-
- `SKILL.md`: Main three-step loop, dependencies, guardrails, and output contract.
|
|
23
|
-
- `agents/openai.yaml`: Agent interface metadata and default prompt.
|
|
24
|
-
- `references/`: Focused guides for scanning, module coverage, job selection, measurement, algorithmic complexity, IO, caching, hot loops, concurrency, unlock work, and iteration gates.
|
|
25
|
-
|
|
26
|
-
## Typical usage
|
|
27
|
-
|
|
28
|
-
```text
|
|
29
|
-
Use $iterative-code-performance to improve this repository's speed end to end without changing business behavior or macro architecture.
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## License
|
|
33
|
-
|
|
34
|
-
MIT. See `LICENSE`.
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: iterative-code-performance
|
|
3
|
-
description: >-
|
|
4
|
-
Improve an existing codebase through repeated evidence-based repository-wide
|
|
5
|
-
performance scans, module-by-module deep-read coverage, and behavior-safe
|
|
6
|
-
speed optimizations until no known in-scope actionable bottleneck or unvisited
|
|
7
|
-
in-scope module remains: measure hot paths, reduce algorithmic complexity,
|
|
8
|
-
remove avoidable repeated work, optimize IO and batching, control allocation
|
|
9
|
-
churn, improve caching only where invalidation is clear, and add benchmark or
|
|
10
|
-
regression guardrails while preserving intended business behavior and the
|
|
11
|
-
system's macro architecture. Use when users ask for comprehensive speed,
|
|
12
|
-
latency, throughput, CPU, memory-allocation, query, batching, or hot-path
|
|
13
|
-
optimization across a repository.
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
# Iterative Code Performance
|
|
17
|
-
|
|
18
|
-
## Dependencies
|
|
19
|
-
|
|
20
|
-
- Required: `align-project-documents` and `maintain-project-constraints` after the repository is truly iteration-complete.
|
|
21
|
-
- Conditional: `systematic-debug` when a performance test, benchmark, load run, or production trace exposes a real business-logic defect that must be fixed at the true owner; `improve-observability` when profiling signals are missing or measurement requires durable logs, metrics, or traces.
|
|
22
|
-
- Optional: `improve-observability` for profiling signals or durable metrics needed during optimization.
|
|
23
|
-
- Fallback: If required completion dependencies are unavailable, finish performance work and validation first, then report exactly which documentation, constraint-sync, or observability action could not run.
|
|
24
|
-
|
|
25
|
-
## Standards
|
|
26
|
-
|
|
27
|
-
- Evidence: Read repository docs, project constraints, source, tests, logs, benchmarks, profiler output, build scripts, entrypoints, and nearby abstractions before editing; every optimization must be justified by measured evidence or clear complexity analysis tied to a plausible hot path.
|
|
28
|
-
- Execution: Run a continuous three-step loop of full-codebase performance scan → choose this round's jobs and optimize → if and only if the latest full-codebase scan is clear, update docs and constraints; otherwise return to scanning immediately. Maintain a module inventory and coverage ledger so every in-scope module receives a performance-oriented deep-read iteration before completion. Do not treat jobs as workflow steps. Do not produce a completion report while any known in-scope actionable bottleneck or unvisited in-scope module remains.
|
|
29
|
-
- Quality: Resolve as many inherited performance problems as safely possible without changing intended behavior or the system's macro architecture. Do not optimize by guessing, weakening correctness, adding stale caches, hiding failures, or moving cost to another critical path without evidence.
|
|
30
|
-
- Output: Return iteration-by-iteration decisions, selected jobs, module coverage status, changed files, speedup or complexity evidence, behavior-preservation evidence, benchmark and regression guardrails, validation results, and docs/constraint sync status only after the latest scan shows no remaining known actionable in-scope bottleneck and no unvisited in-scope module.
|
|
31
|
-
|
|
32
|
-
## Mission
|
|
33
|
-
|
|
34
|
-
Leave the repository materially faster by continuously scanning the whole codebase, landing the highest-value safe performance optimizations available at each moment, and repeating until there is no known in-scope actionable performance gap left to fix.
|
|
35
|
-
|
|
36
|
-
For this skill, `macro architecture` means the system's top-level runtime shape and overall operating logic: major subsystems, top-level execution model, deployment/runtime boundaries, persistence model, service boundaries, and the end-to-end way the whole system works. Ordinary module interactions, helper extraction, local data-structure changes, internal batching, query shaping, memoization inside an owner, and local hot-path decomposition do not count as macro-architecture changes by themselves.
|
|
37
|
-
|
|
38
|
-
## Three-Step Loop
|
|
39
|
-
|
|
40
|
-
### 1) Scan the repository
|
|
41
|
-
|
|
42
|
-
- Read root guidance first: `AGENTS.md/CLAUDE.md`, `README*`, package manifests, task runners, CI/test config, benchmark tooling, profiler setup, and major project docs.
|
|
43
|
-
- Map runtime entrypoints, domain modules, external integrations, persistence/query boundaries, queue or job workers, request paths, hot loops, and current performance guardrails.
|
|
44
|
-
- Exclude generated, vendored, lock, build-output, fixture, snapshot, or minified files unless evidence shows they are human-maintained source.
|
|
45
|
-
- Build or refresh a concrete repository-wide backlog of known actionable performance issues.
|
|
46
|
-
- Build or refresh a module inventory and coverage ledger; every in-scope module starts as unvisited until it has received a performance-oriented deep-read iteration with callers, callees, tests, logs, benchmarks, relevant contracts, and each available job lens inspected.
|
|
47
|
-
- Re-scan the full codebase after every landed iteration, not only the files just changed.
|
|
48
|
-
- Load `references/repository-scan.md` for the scan checklist and performance-backlog shaping rules.
|
|
49
|
-
- Load `references/module-coverage.md` for module inventory, performance deep-read coverage, easy-first ordering, and completion rules.
|
|
50
|
-
|
|
51
|
-
### 2) Choose this round's jobs and optimize
|
|
52
|
-
|
|
53
|
-
- Choose jobs only after the latest full-codebase performance scan. Jobs are optional execution directions, not ordered workflow steps.
|
|
54
|
-
- Treat module scanning and job choice as one linked activity: inspect the selected module through every available performance job lens before deciding which jobs actually land in this round.
|
|
55
|
-
- Select the smallest set of jobs that can safely improve the currently selected module or module cluster under current correctness and measurement guardrails.
|
|
56
|
-
- Before choosing or deferring an optimization, explicitly assess implementation confidence as a combination of the agent's own ability to understand and complete the change, the objective safety net from tests, benchmarks, and other guardrails, the clarity of rollback or repair paths, and the task's inherent difficulty. Do not treat difficulty alone as low confidence; when strong tests and benchmarks guard the behavior, use them to support bolder changes because failures can be driven back to green.
|
|
57
|
-
- Prefer evidence-first ordering: start with bottlenecks that are measured, user-visible, high-frequency, or have clear algorithmic waste; use easy-first module ordering when it builds profiling context, tests, benchmarks, or seams that make harder hot paths safer later.
|
|
58
|
-
- Do not keep revisiting familiar modules while other in-scope modules remain unvisited unless the familiar module blocks the next unvisited module's safe performance deep read.
|
|
59
|
-
- Prefer smaller, high-confidence optimizations that reduce latency, CPU, memory churn, IO round trips, or repeated work without broad behavior risk.
|
|
60
|
-
- If a desired optimization is high-risk and weakly guarded, make benchmark, characterization, or regression guardrail-building part of this round instead of stopping.
|
|
61
|
-
- If a file feels too coupled, too central, or too risky for a direct hot-path rewrite, do staged unlock work rather than declaring the area blocked.
|
|
62
|
-
- Read all directly affected callers, tests, interfaces, logs, persistence/query contracts, cache invalidation rules, and concurrency assumptions before editing.
|
|
63
|
-
- Validate from narrow to broad after each bounded round, then perform a full-codebase stage-gate decision:
|
|
64
|
-
- if any known in-scope actionable bottleneck still remains or any in-scope module has not received a deep-read iteration, return to Step 1;
|
|
65
|
-
- only continue to Step 3 when the latest scan is clear.
|
|
66
|
-
|
|
67
|
-
Load references for this step only as needed:
|
|
68
|
-
|
|
69
|
-
- `references/module-coverage.md` for choosing the next module and proving every in-scope module has been deeply read through the available performance-job lenses.
|
|
70
|
-
- `references/job-selection.md` for next-job choice conditions and tie-breakers.
|
|
71
|
-
- `references/measurement-and-benchmarking.md` for profiling, benchmark, baseline, and before/after comparison rules.
|
|
72
|
-
- `references/algorithmic-complexity.md` for complexity, data-structure, and repeated-work optimization.
|
|
73
|
-
- `references/io-batching-and-queries.md` for database, network, filesystem, external API, and batching optimization.
|
|
74
|
-
- `references/caching-and-memoization.md` for safe cache introduction, cache removal, and invalidation rules.
|
|
75
|
-
- `references/allocation-and-hot-loops.md` for CPU loops, allocation churn, serialization, parsing, and memory-pressure cleanup.
|
|
76
|
-
- `references/concurrency-and-pipelines.md` for bounded parallelism, async pipelines, backpressure, and queue throughput.
|
|
77
|
-
- `references/coupled-hot-path-strategy.md` for staged unlock work on large coupled or apparently core hot-path files.
|
|
78
|
-
- `references/iteration-gates.md` for validation cadence, stage-gate rules, and stop criteria.
|
|
79
|
-
|
|
80
|
-
### 3) Update project documents and constraints
|
|
81
|
-
|
|
82
|
-
Only enter this step when the latest full-codebase scan confirms there is no remaining known actionable in-scope performance issue and every in-scope module has received a deep-read iteration, except items explicitly classified as blocked, unsafe, speculative, low-value, excluded, approval-dependent, or requiring production-only measurement that is unavailable.
|
|
83
|
-
|
|
84
|
-
- Run `align-project-documents` when README, architecture notes, setup docs, benchmark docs, performance budgets, operational docs, or test guidance may have drifted.
|
|
85
|
-
- Run `maintain-project-constraints` to verify `AGENTS.md/CLAUDE.md` still matches the repository's real architecture, business flow, commands, and conventions.
|
|
86
|
-
- Update only the documentation and constraints that changed in reality because of the optimization.
|
|
87
|
-
|
|
88
|
-
## Hard Guardrails
|
|
89
|
-
|
|
90
|
-
- Do not change intended business logic while optimizing, except to fix a real defect exposed by tests and verified at the true owner.
|
|
91
|
-
- Do not change the system's macro architecture unless the user explicitly expands scope.
|
|
92
|
-
- Do not optimize from vibes alone; require measurement, traces, logs, benchmark baselines, complexity analysis, or repeatable workload evidence.
|
|
93
|
-
- Do not add caches without explicit ownership, invalidation, size bounds, failure behavior, and tests or equivalent validation.
|
|
94
|
-
- Do not improve one metric by silently worsening a more important user-visible path, correctness invariant, memory ceiling, or operator workflow.
|
|
95
|
-
- Do not use one-off scripts to rewrite product code.
|
|
96
|
-
- Do not stop early just because a hot path is large, central, or historically fragile; if a safe unlock step exists, that is the next job.
|
|
97
|
-
- Do not stop before every in-scope module has been inventoried, deeply read, and either improved, validated as clear, or explicitly deferred/excluded with evidence.
|
|
98
|
-
- Do not weaken tests, benchmarks, timeouts, or assertions to make an optimization pass; fix the real defect, stabilize the benchmark, or update stale expectations to stable invariants.
|
|
99
|
-
- Do not add micro-optimizations that make code harder to maintain unless evidence shows the path is hot enough to justify the tradeoff.
|
|
100
|
-
|
|
101
|
-
## Completion Report
|
|
102
|
-
|
|
103
|
-
Only report completion after Step 3 is done, the latest Step 1 scan is clear, and the module coverage ledger has no unvisited in-scope module.
|
|
104
|
-
|
|
105
|
-
Return:
|
|
106
|
-
|
|
107
|
-
1. Iterations completed and the jobs selected in each iteration.
|
|
108
|
-
2. Stage-gate verdict after each full-codebase re-scan.
|
|
109
|
-
3. Module coverage ledger summary: modules deep-read, improved, validated-clear, deferred, or excluded.
|
|
110
|
-
4. Key files changed and the performance issue each change resolved.
|
|
111
|
-
5. Speedup evidence, complexity change, or bottleneck-removal evidence, including baseline and after measurements where available.
|
|
112
|
-
6. Business behavior preservation evidence.
|
|
113
|
-
7. Benchmarks, regression tests, or other guardrails added or updated, including property/integration/E2E/load-test `N/A` reasons where relevant.
|
|
114
|
-
8. Validation commands and results.
|
|
115
|
-
9. Documentation and `AGENTS.md/CLAUDE.md` synchronization status.
|
|
116
|
-
10. Remaining blocked, production-measurement-only, or approval-dependent items, if any.
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "Iterative Code Performance"
|
|
3
|
-
short_description: "Optimize latency, throughput, CPU, IO, caching, and hot paths in repeated safe passes"
|
|
4
|
-
default_prompt: "Use $iterative-code-performance as a strict three-step loop. Step 1: scan the full repository for performance evidence, refresh the actionable bottleneck backlog, and maintain a module inventory plus performance coverage ledger. Step 2: choose this round's module or bounded module cluster, scan it through every available performance job lens, and only then decide which jobs actually land now; prioritize measured or clearly complexity-backed hot paths, jobs are selectable directions rather than workflow steps, and assess optimization confidence from your own ability to understand and complete the change, task complexity, guardrail strength, rollback or repair paths, and whether tests or benchmarks can drive accidental breakage back to green. If a high-risk hot path is weakly guarded add benchmarks, characterization tests, or other guardrails instead of stopping; if strong tests and benchmarks guard the behavior, use them to justify bolder safe optimizations rather than avoiding the work. If a file is too coupled or too central for direct optimization, switch to staged unlock work and keep progressing. After validation, run a full-codebase stage-gate; if any known in-scope actionable bottleneck remains or any in-scope module has not received a performance-oriented deep-read iteration, go back to Step 1 immediately. Step 3: only when the latest full-codebase performance scan is clear and every in-scope module is deeply read through the available-job lenses, run $align-project-documents and $maintain-project-constraints to synchronize docs and AGENTS.md/CLAUDE.md. Preserve intended business behavior and the system's macro architecture, keep correctness guardrails green, and do not write a completion report while actionable bottlenecks or unvisited modules still exist."
|