@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,114 +1,51 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: merge-changes-from-local-branches
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
將使用者指定的本地分支合併回當前分支,按既定順序完成衝突處理、驗證、
|
|
5
|
+
安全清理與最終提交準備;除非本次對話中有明確要求,否則不推送遠端。
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## 目標
|
|
9
|
+
在工作開始時的當前本地分支上,整合使用者指定的本地分支,或由現有 spec / batch
|
|
10
|
+
規劃可無歧義對應出的本地分支,完成合併、驗證、清理與提交流程銜接,並確保整合結果
|
|
11
|
+
可安全交由 `commit-and-push` 收尾。
|
|
9
12
|
|
|
10
|
-
##
|
|
13
|
+
## 驗收條件
|
|
14
|
+
- 所有實際合併的變更都落在流程開始時的原始當前分支,且不會未經使用者允許改換目標分支。
|
|
15
|
+
- 合併範圍只包含使用者明確指定,或可由 `coordination.md` / spec 上下文無歧義映射出的分支;若映射不清楚,流程會停止並回報。
|
|
16
|
+
- 當 batch 規劃存在 `Merge order` / landing order 時,實際整合順序與規劃一致;若順序衝突或不明確,不會猜測執行。
|
|
17
|
+
- 所有衝突都以保留正確行為為原則完成解決,並在刪除來源分支或交給 `commit-and-push` 前完成必要驗證。
|
|
18
|
+
- 只清理已成功合併且已驗證的來源分支或 worktree;不會強制刪除尚未真正合入目標分支的來源。
|
|
19
|
+
- 最終交付是原始當前分支上的整合結果與簡潔摘要,並只在使用者於本次對話明確要求時才推送遠端;本技能不單獨執行 `archive-specs`。
|
|
11
20
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- Fallback: If **`commit-and-push`** is unavailable, **MUST** stop and report—**MUST NOT** improvise readiness or use a bare `git commit` shortcut. If git merge operations fail irreparably, stop and report.
|
|
21
|
+
## 工作流程
|
|
22
|
+
1. 確認目標分支與合併範圍
|
|
23
|
+
將流程開始時的當前分支視為唯一權威目標分支。優先使用使用者明確提供的分支名稱建立合併集合;只有在 spec 或 batch `coordination.md` 能無歧義對應時,才可從規劃文件補足分支映射與整合順序。
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
2. 確認可安全開始整合
|
|
26
|
+
在原始目標分支上確認工作樹適合執行合併。若存在會干擾整合的未提交變更,停止並回報;不要自行 stash、丟棄變更,或切換到其他目標分支。
|
|
18
27
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- **MUST** read active batch **`coordination.md`** when present and honor a documented **`Merge order` / landing order**; if multiple batches conflict or branch-to-spec mapping is ambiguous, **MUST** stop and report instead of guessing order.
|
|
22
|
-
- **MUST** resolve conflicts by reading both sides and editing merged results that preserve shipped behavior—**MUST NOT** rely on blanket **`-X ours` / `-X theirs`** or timestamp guesses as the primary strategy.
|
|
23
|
-
- **`archive-specs`**: **MUST NOT** invoke **`archive-specs`** from this skill. Any archival or doc-sync routing belongs to **`commit-and-push`** (via **`submission-readiness-check`**) when that workflow’s gates require it—not a separate mandated step immediately after merges here.
|
|
24
|
-
- **MUST** verify the merged tree (targeted checks after conflictful merges; broader **`npm test` / equivalent** when the repo provides a standard command) before deleting source branches or handing off to **`commit-and-push`**.
|
|
25
|
-
- **MUST NOT** **`git push`**, tag, or release **from this skill**; **`commit-and-push`** owns push **only** when the user explicitly requested remote publication in this thread (**same rule as **`commit-and-push`** step 7**).
|
|
26
|
-
- **MUST** finalize through **`commit-and-push`** after staging the post-merge intent—**MUST NOT** bypass **`submission-readiness-check`** / mandated gates with a stray local commit path.
|
|
27
|
-
- **MUST NOT** force-delete merged branches (**`-D`**) when **`-d`** refuses; **MUST** stop and report branches that are not actually merged into the target.
|
|
28
|
+
3. 依既定順序逐一合併
|
|
29
|
+
按照使用者指定順序,或 `coordination.md` 中明確記錄的 landing order,逐一整合 in-scope 分支。對沒有新增內容或已經合入的分支,跳過並記錄原因。發生衝突時,閱讀雙方內容並編輯出能保留正確行為的結果;必要時使用 `merge-conflict-resolver`。若衝突無法在不猜測意圖的前提下解決,停止並回報。
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
4. 驗證整合結果
|
|
32
|
+
先對衝突區域或高風險改動執行對應驗證,再對整體整合結果執行倉庫慣用的標準驗證。任何驗證失敗都必須先在當前分支修正,之後才能進入清理或提交階段。
|
|
30
33
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- **Quality**: Scope strictly to named / mapped branches; no unrelated branch sweeps; no push-by-default from this workflow.
|
|
34
|
-
- **Output**: Integrated current branch ready for **`commit-and-push`**; concise report of merged/skipped branches, conflicts resolved, verification commands.
|
|
34
|
+
5. 清理已成功整合的來源
|
|
35
|
+
僅清理已完成合併且已通過驗證的來源分支與對應 worktree。若安全刪除被拒絕,保留來源並回報,不使用強制刪除。
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
6. 交給 `commit-and-push` 完成收尾
|
|
38
|
+
整理合併後的最終提交意圖,並交由 `commit-and-push` 執行必要審查、submission-readiness gate 與最終本地提交。若 `commit-and-push` 不可用,必須停止並回報,不可改走裸 `git commit`。本技能不負責 push、tag、release,也不另外觸發 `archive-specs`;只有使用者在本次對話中明確要求遠端更新時,才允許後續推送。
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
7. 回報結果
|
|
41
|
+
總結已合併與跳過的分支、使用的順序依據、衝突處理原則、驗證結果,以及流程最終停在本地 `HEAD` 還是包含遠端推送。
|
|
39
42
|
|
|
40
|
-
|
|
43
|
+
## 範例
|
|
44
|
+
- 「把 `feature/api-layer` 和 `feature/cli-wrapper` 合回目前分支」 -> 以目前分支為唯一目標,依指定順序完成整合、驗證與安全清理,再交給 `commit-and-push` 做最終本地提交。
|
|
45
|
+
- 「根據這個 batch 的 `coordination.md` 把各 worktree 分支合回來,但先不要 push」 -> 先從 batch 規劃確認無歧義分支映射與 landing order,再依序合併、驗證、清理,最後只做到本地提交。
|
|
46
|
+
- 「把那幾個應該相關的分支一起合一下」 -> 若無法從使用者輸入或規劃文件明確判定分支集合與順序,停止並回報需要補充資訊,而不是依 ancestry 或名稱猜測。
|
|
41
47
|
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
- Per branch, note: name, match rationale, commits ahead, `git log -1 --oneline`.
|
|
47
|
-
- **Pause →** Is every in-scope branch matched **unambiguously**, not by “probably related” ancestry?
|
|
48
|
-
- **Pause →** If **`coordination.md`** gives a merge order, does my sequence match it literally?
|
|
49
|
-
|
|
50
|
-
### 1.5) Resolve merge order from active batch specs
|
|
51
|
-
|
|
52
|
-
- When **`coordination.md`** defines **`Merge order` / landing order**, merge **only** in that order after mapping branch names to specs/worktrees without guessing.
|
|
53
|
-
- When multiple active batches disagree or mapping is unclear, stop and report.
|
|
54
|
-
- When no explicit order exists, use the user’s branch list order sequentially.
|
|
55
|
-
- **Pause →** Would merging in a different order violate a written batch plan?
|
|
56
|
-
|
|
57
|
-
### 2) Ensure clean state on the original current branch
|
|
58
|
-
|
|
59
|
-
- Inspect `git status`. If unrelated uncommitted changes block a safe merge, stop and report—**MUST NOT** stash or discard without user direction.
|
|
60
|
-
- **Pause →** Am I still on the **same** authoritative target branch I started with?
|
|
61
|
-
|
|
62
|
-
### 3) Merge branches sequentially in the resolved order
|
|
63
|
-
|
|
64
|
-
For each in-scope branch:
|
|
65
|
-
|
|
66
|
-
1. `git checkout <current-branch>`
|
|
67
|
-
2. `git merge <branch-name> --no-ff -m "Merge branch '<branch-name>' into <current-branch>"`
|
|
68
|
-
3. On conflicts: use **`merge-conflict-resolver`**; then `git add` resolved paths.
|
|
69
|
-
4. If resolution is ambiguous, prefer behavior that preserves tests, documented intent, and minimal semantic drift.
|
|
70
|
-
5. Complete the merge commit if Git did not auto-complete.
|
|
71
|
-
|
|
72
|
-
### 4) Verify merged state
|
|
73
|
-
|
|
74
|
-
- After conflictful merges, run the most relevant targeted tests or builds for touched areas.
|
|
75
|
-
- After all merges, run the repo’s usual validation (`npm test`, `cargo test`, etc.) when applicable.
|
|
76
|
-
- **Pause →** Did verification fail? **MUST** fix on the current branch before pruning or **`commit-and-push`**—**do not** hide red tests behind a merge report.
|
|
77
|
-
|
|
78
|
-
### 5) Prune merged sources (after verified success only)
|
|
79
|
-
|
|
80
|
-
- `git worktree list`; remove worktrees for successfully merged branches when safe.
|
|
81
|
-
- `git branch -d <branch-name>` only for verified merges; refuse **`-D`** when **`-d`** fails—report instead.
|
|
82
|
-
- **Never** delete the original target branch, the checked-out branch, or branches that failed / were skipped.
|
|
83
|
-
|
|
84
|
-
### 6) Submit via **`commit-and-push`** (local commit; push optional)
|
|
85
|
-
|
|
86
|
-
- Stage the post-merge / fix-up intent per user scope.
|
|
87
|
-
- Run **`commit-and-push`** through **commit**: inspect, classify gates, mandated reviews where applicable, **`submission-readiness-check`**, then commit with conventional message—**omit push** unless the user explicitly requested remote update in this thread ( **`commit-and-push`** step **7**).
|
|
88
|
-
- **MUST NOT** reintroduce **`archive-specs`** as a sibling step controlled by **this** skill; if **`submission-readiness-check`** routes archival work, **`commit-and-push`** owns that decision.
|
|
89
|
-
- **Pause →** Am I about to push without an explicit user request for remote publication?
|
|
90
|
-
- **Pause →** Does `git diff --cached` match intended merge scope—no stray unrelated paths?
|
|
91
|
-
|
|
92
|
-
### 7) Report
|
|
93
|
-
|
|
94
|
-
- List merged vs skipped branches and why.
|
|
95
|
-
- Current branch name; confirmation merges landed on original target.
|
|
96
|
-
- Conflicts resolved and brief rationale.
|
|
97
|
-
- Verification commands executed.
|
|
98
|
-
- State whether completion stopped at **local HEAD** (**no push**) or included push per explicit user ask.
|
|
99
|
-
|
|
100
|
-
## Sample hints
|
|
101
|
-
|
|
102
|
-
- **Skip**: candidate shows no commits ahead of current—record “already merged / empty”.
|
|
103
|
-
- **`coordination.md`**: landing order **`api-layer`** then **`cli-wrapper`** ⇒ merge matching branches in that sequence even if creation dates differ.
|
|
104
|
-
- **`commit-and-push` without push**: user said “merge and commit locally”—run **`commit-and-push`** gates and commit; report `HEAD` hash; **no** **`git push`**.
|
|
105
|
-
|
|
106
|
-
## Working Rules
|
|
107
|
-
|
|
108
|
-
- Never force-push from this workflow.
|
|
109
|
-
- Preserve functionality over winning either branch’s raw diff verbatim.
|
|
110
|
-
- Do not merge ambiguously matched or unrelated branches.
|
|
111
|
-
- Do not delete merged sources until merge commit **and** verification succeed.
|
|
112
|
-
- When batch merge-order documentation applies, follow it unless you stop with evidence it is stale.
|
|
113
|
-
|
|
114
|
-
Resolve conflicts using **`merge-conflict-resolver`**.
|
|
48
|
+
## 參考資料
|
|
49
|
+
- `commit-and-push/SKILL.md`:最終提交、submission-readiness 與是否允許推送的權威流程。
|
|
50
|
+
- `merge-conflict-resolver/SKILL.md`:衝突需要精確合成時的輔助技能。
|
|
51
|
+
- `docs/plans/**/coordination.md`:batch 規劃存在時的 landing order 與分支映射依據。
|
|
Binary file
|
package/optimise-skill/SKILL.md
CHANGED
|
@@ -28,7 +28,7 @@ description: Use prompt engineering to optimise agent skill. Use it when you nee
|
|
|
28
28
|
對於技能有幫助的內但不符合上述技能架構規範,則應該被分類放置在 `references/` 下的markdown檔案。
|
|
29
29
|
|
|
30
30
|
## 範例
|
|
31
|
-
- "一個專注在提示LLM agent
|
|
31
|
+
- "一個專注在提示LLM agent進行自我迭代,並為repo帶來性能優化的技能需要被優化" -> "定義驗收條件為優化後性能相較優化前至少提升X個百分比,並且項目之中不存在任何O(n^2)級別時間複雜度的函式和邏輯,並按照標準架構重寫技能。"
|
|
32
32
|
- "一個有大量前端開發範例被包含在 `SKILL.md` 之中的前端開發技能需要被優化" -> "定義驗收條件為前端頁面 `reference` 之中提供的大量建議範例重寫且不包含任何建議示例之中明確拒絕的設計,然後按照技能優化流程對技能進行全面的重寫。"
|
|
33
33
|
|
|
34
34
|
## 參考資料
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
**建議實踐**:
|
|
5
5
|
- "嚴格遵守風格規範的前端頁面"
|
|
6
|
-
- "
|
|
6
|
+
- "嚴格遵從模板生成的spec"
|
|
7
7
|
- "代碼審查的完整報告總結及改進建議"
|
|
8
8
|
|
|
9
9
|
**錯誤實踐**:
|
|
10
|
-
- "
|
|
10
|
+
- "完成所有spec的閱讀,並理解用戶需求。" - spec的閱讀是執行步驟,而不是最終的交付產物。
|
|
11
11
|
- "所有風格規範已經被閱讀。" - 同上
|
|
12
12
|
- "所有代碼已經被仔細審查" - 這看似是驗收條件,但實際上因為不可量化,並不是一個好的驗收條件。代碼審查的報告和改進建議是能夠被直觀衡量的交付產物。
|
|
13
13
|
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
**建議實踐**:
|
|
18
18
|
- "按照本次變更的實際內容,創建符合通用開發規範的git分支並在分支上提交變更。"
|
|
19
19
|
- "在結束任務之前閱讀並確認所有檢查項目是否被勾選為完成。"
|
|
20
|
-
- "
|
|
20
|
+
- "閱讀spec之中的 `spec.md` 來完整理解用戶需求"
|
|
21
21
|
|
|
22
22
|
**錯誤實踐**:
|
|
23
23
|
- "使用 `git diff --stat` 閱讀目前變更。然後使用 `git branch -b <branch_name>` 來創建專屬分支。最後通過 `git commit -m "<commit_message>"` 完成提交。"
|
|
24
24
|
- "在結束任務之前,使用 `cd completion-criteria/` 進入檢查項目所處目錄,通過 `cat checklist.md` 來閱讀整個檢查項目清單,並確認當中的markdown checkboxes是否被勾選為完成。"
|
|
25
|
-
- "使用 `ls`
|
|
25
|
+
- "使用 `ls` 找到spec目錄,並使用 `cd spec/` 進入spec所出目錄。然後使用 `cat spec.md` 來理解用戶的需求。"
|
|
26
26
|
|
|
27
27
|
## 範例
|
|
28
28
|
範例是一個技能之中讓效果達到預期的重要基礎。其本質上是通過**對比交付產物在執行工作流程前及執行工作流程後的狀態**,讓agent在調用工作流程自行工作的時候對目標有著清晰的認知,從而避免在執行時成為無頭蒼蠅並在上下文之中迷失。
|
|
29
29
|
|
|
30
30
|
**建議實踐**:
|
|
31
31
|
用一個用於優化提示詞技能的技能作為示例:
|
|
32
|
-
- "一個專注在提示LLM agent
|
|
32
|
+
- "一個專注在提示LLM agent進行自我迭代,並為repo帶來性能優化的技能需要被優化" -> "定義驗收條件為優化後性能相較優化前至少提升X個百分比,並且項目之中不存在任何O(n^2)級別時間複雜度的函式和邏輯,並按照標準架構重寫技能。"
|
|
33
33
|
- "一個有大量前端開發範例被包含在 `SKILL.md` 之中的前端開發技能需要被優化" -> "定義驗收條件為前端頁面 `reference` 之中提供的大量建議範例重寫且不包含任何建議示例之中明確拒絕的設計,然後按照技能優化流程對技能進行全面的重寫。"
|
|
34
34
|
|
|
35
35
|
**錯誤實踐**:
|
|
@@ -28,7 +28,7 @@ description: Use prompt engineering to optimise agent skill. Use it when you nee
|
|
|
28
28
|
對於技能有幫助的內但不符合上述技能架構規範,則應該被分類放置在 `references/` 下的markdown檔案。
|
|
29
29
|
|
|
30
30
|
## 範例
|
|
31
|
-
- "一個專注在提示LLM agent
|
|
31
|
+
- "一個專注在提示LLM agent進行自我迭代,並為repo帶來性能優化的技能需要被優化" -> "定義驗收條件為優化後性能相較優化前至少提升X個百分比,並且項目之中不存在任何O(n^2)級別時間複雜度的函式和邏輯,並按照標準架構重寫技能。"
|
|
32
32
|
- "一個有大量前端開發範例被包含在 `SKILL.md` 之中的前端開發技能需要被優化" -> "定義驗收條件為前端頁面 `reference` 之中提供的大量建議範例重寫且不包含任何建議示例之中明確拒絕的設計,然後按照技能優化流程對技能進行全面的重寫。"
|
|
33
33
|
|
|
34
34
|
## 參考資料
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,96 +1,46 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: review-change-set
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
Use for pre-commit/pre-PR review, refactor/abstraction second opinion, “review my branch” **STOP** greenfield feature design from scratch—use planning skills… BAD style-only nits… GOOD evidence + named abstraction target…
|
|
4
|
+
面向當前 `git diff` 的只讀審查技能。先從架構與模組邊界切入,再檢查是否存在真正能降低複雜度的簡化機會;忽略對話偏見,不做 style-only 評論。當變更跨多個檔案或模組時,優先按 scope cluster 派發只讀 subagent,各自讀完整個責任區後回傳結構化發現,由主代理統一去重與彙總。
|
|
6
5
|
---
|
|
7
6
|
|
|
8
|
-
|
|
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
|
-
> **Cluster `<scope>` subagent contract**
|
|
50
|
-
> - Read every file in this cluster E2E plus the minimum callers/callees/config needed to interpret behavior.
|
|
51
|
-
> - Discard authorship bias; behavior comes from code/tests/config, not chat memory.
|
|
52
|
-
> - Return ONLY a structured findings block:
|
|
53
|
-
> - `Architecture`: list of `{ title, evidence (path:line), abstraction target, why current shape is weaker }`.
|
|
54
|
-
> - `Simplification`: list of `{ title, evidence (path:line), candidate change, behavior-preserving benefit }`.
|
|
55
|
-
> - `Outbound concerns`: any boundary issue that touches another cluster (so the orchestrator can deduplicate).
|
|
56
|
-
> - No source dumps, no opinions about tasks outside this cluster, no security/edge-case fabrication.
|
|
57
|
-
|
|
58
|
-
- **Pause →** Did I cluster correctly so that one subagent owns each coherent boundary, or am I about to split a duplicated helper across two subagents and miss the dedup signal?
|
|
59
|
-
|
|
60
|
-
### 3) Baseline (inline path) or aggregate (subagent path)
|
|
61
|
-
|
|
62
|
-
- Inline: read every changed file E2E; pull in minimal callers/callees/config to interpret moves and interfaces.
|
|
63
|
-
- Subagent: wait for **every** cluster subagent to return. Aggregate their findings, then deduplicate any architecture finding two clusters reported via their `Outbound concerns` block.
|
|
64
|
-
- Behavior from **code, tests, config, execution**—not from chat memory.
|
|
65
|
-
- **Pause →** Can I quote **one concrete behavior** change this diff introduces—not intent?
|
|
66
|
-
|
|
67
|
-
### 4) Architecture first
|
|
68
|
-
|
|
69
|
-
Flag only if evidence-backed: duplicated workflows, cross-layer leakage, wrong helper ownership, repeated condition trees, unstable interfaces.
|
|
70
|
-
Each finding **MUST** name abstraction target **and** why current shape is weaker.
|
|
71
|
-
- **Pause →** Is this “different style” or a real **boundary** problem?
|
|
72
|
-
|
|
73
|
-
### 5) Simplification second
|
|
74
|
-
|
|
75
|
-
Redundant branches/wrappers, deep nesting, duplicated validation, oversize functions, dead compat—**only** if it truly reduces complexity.
|
|
76
|
-
- **Pause →** Would this refactor just **move** lines between files?
|
|
77
|
-
|
|
78
|
-
### 6) Report
|
|
79
|
-
|
|
80
|
-
1. **Scope** — staged/unstaged; extra context paths read; cluster list when subagents were used.
|
|
81
|
-
2. **Architecture** — title, evidence (`path:line`), candidate, why weaker.
|
|
82
|
-
3. **Simplification** — title, evidence, candidate, benefit.
|
|
83
|
-
4. **Residual uncertainty** — hypotheses / follow-up checks.
|
|
84
|
-
|
|
85
|
-
If nothing actionable: `No actionable abstraction or simplification finding identified`.
|
|
86
|
-
|
|
87
|
-
## Sample hints
|
|
88
|
-
|
|
89
|
-
- **Staged only**: User ran `git add -p` → findings tagged **staged** vs **unstaged** separately.
|
|
90
|
-
- **Rename-heavy**: Read old→new path mapping before calling “duplication.”
|
|
91
|
-
- **Tiny diff**: One-file guard clause → architecture section may be empty; reviewed inline without subagents.
|
|
92
|
-
- **Wide refactor across packages**: cluster by package; one read-only subagent per package; dedupe duplicated-helper findings on the main agent.
|
|
93
|
-
|
|
94
|
-
## References
|
|
95
|
-
|
|
96
|
-
- Downstream consumers (e.g. `commit-and-push`, `version-release`, `review-spec-related-changes`) decide independently when to add security or edge-case passes; this skill no longer wires them.
|
|
7
|
+
## 目標
|
|
8
|
+
輸出一份針對活躍變更集的審查報告,聚焦真正有價值的架構問題與可維護性簡化機會,而不是風格雜訊。報告需要標明審查範圍、staged/unstaged 狀態、已確認的架構問題、已確認的簡化建議,以及剩餘不確定性。
|
|
9
|
+
|
|
10
|
+
## 驗收條件
|
|
11
|
+
- 已完整覆蓋本次活躍變更集;若 staged 與 unstaged 同時存在,必須明確區分哪些發現命中哪一部分。
|
|
12
|
+
- 每個發現都基於完整 diff 與最小必要上下文,並附帶 `path:line` 證據;不得只靠對話記憶、作者意圖或主觀風格偏好下結論。
|
|
13
|
+
- 架構與責任邊界問題優先於 style-only 建議;抽象必須能消除重複、釐清歸屬或穩定邊界。
|
|
14
|
+
- 簡化建議必須是行為等價且真正降低複雜度的改動,不能只是把複雜度搬到別處。
|
|
15
|
+
- 對於跨多檔、多模組或大變更,應按 coherent scope cluster 使用只讀 subagent;主代理只負責聚合、去重與整理,不重讀已委派檔案。
|
|
16
|
+
- 若沒有可操作發現,最終需明確輸出 `No actionable abstraction or simplification finding identified`。
|
|
17
|
+
|
|
18
|
+
## 工作流程
|
|
19
|
+
1. 檢查 git 狀態。
|
|
20
|
+
- 先確認 `git status`、staged diff 與 unstaged diff,避免只審其中一半。
|
|
21
|
+
- 若目前沒有活躍變更集,直接輸出 `No active git change set to review`。
|
|
22
|
+
2. 決定閱讀策略。
|
|
23
|
+
- 單檔或很小的同模組變更可直接 inline 審查。
|
|
24
|
+
- 多檔、多模組或跨層變更需先按功能、套件、層級或邏輯關切點切成 scope cluster,並優先以一個只讀 subagent 對應一個 cluster。
|
|
25
|
+
3. 建立基線並收斂上下文。
|
|
26
|
+
- Inline 路徑下,讀完整個變更檔案與最小必要的 caller、callee、配置。
|
|
27
|
+
- Subagent 路徑下,等待所有 cluster 結果返回,再根據共享邊界與 outbound concerns 做去重。
|
|
28
|
+
- 所有判斷都必須回到代碼、測試、配置與可觀察行為本身。
|
|
29
|
+
4. 先做架構審查。
|
|
30
|
+
- 只報告有明確證據支撐的問題,例如跨層洩漏、重複工作流、錯誤 helper 歸屬、重複條件樹、脆弱介面或責任模糊。
|
|
31
|
+
- 每條架構發現都要指出候選抽象或責任落點,以及當前寫法為何更弱。
|
|
32
|
+
5. 再做簡化審查。
|
|
33
|
+
- 只在確定不改變行為的前提下,指出多餘分支、包裝層、深巢狀、重複驗證、過大函式或歷史相容殘骸。
|
|
34
|
+
- 若建議只是把複雜度移位,則不應作為有效簡化發現。
|
|
35
|
+
6. 輸出報告。
|
|
36
|
+
- 先交代審查範圍、staged/unstaged 區分、補讀的上下文與 cluster 情況。
|
|
37
|
+
- 再依序輸出架構發現、簡化發現與剩餘不確定性。
|
|
38
|
+
|
|
39
|
+
## 使用範例
|
|
40
|
+
- 「幫我 review 這次 branch 的變更」-> 先完整覆蓋 staged 與 unstaged diff,再按架構問題與簡化機會輸出報告。
|
|
41
|
+
- 「我想知道這次重構有沒有真正變簡單」-> 聚焦行為等價的簡化空間,而不是風格偏好。
|
|
42
|
+
- 「這次改動跨很多 package,請不要漏看邊界」-> 先按 package 或邏輯責任分 cluster,用只讀 subagent 分治後再由主代理去重彙總。
|
|
43
|
+
- 「如果沒有值得改的地方,直接講沒有」-> 若無可操作發現,明確輸出 `No actionable abstraction or simplification finding identified`。
|
|
44
|
+
|
|
45
|
+
## 參考資料索引
|
|
46
|
+
- 下游工作流如 `commit-and-push`、`version-release`、`review-spec-related-changes` 會自行決定是否追加安全或邊界情況審查;本技能只負責變更集的架構與簡化分析。
|
|
@@ -1,103 +1,46 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: review-codebases
|
|
3
|
-
description:
|
|
3
|
+
description: >-
|
|
4
|
+
面向整個倉庫的只讀代碼審查技能。要求先讀完整個人類編寫的repo,再按「架構 → 代碼品質 → 邊界情況」的優先順序做判斷;一旦在更高層級發現已確認問題,就停止下探。若需要對外追蹤,為每個已確認且非重複的發現建立 GitHub issue,否則至少輸出可直接發布的草稿內容。
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
5. Review edge cases last
|
|
47
|
-
- Run this step only when there are no architecture or code-quality findings.
|
|
48
|
-
- Check null or empty inputs, boundary values, partial failures, retries, concurrency, ordering assumptions, idempotency, and invalid state transitions.
|
|
49
|
-
6. Check for duplicate issues before publication
|
|
50
|
-
- When findings will be published, use `read-github-issue` to search the target repository for open and recently closed issues that match the same module, failure mode, or architectural boundary.
|
|
51
|
-
- Treat an existing issue as a duplicate when the underlying root cause, affected boundary, and requested outcome materially overlap, even if the wording differs.
|
|
52
|
-
- If a duplicate exists, cite it in the final report and do not publish a new issue for that finding.
|
|
53
|
-
7. Publish each confirmed non-duplicate finding
|
|
54
|
-
- Invoke `open-github-issue` once per finding.
|
|
55
|
-
- Use a tier-specific title prefix:
|
|
56
|
-
- `[Architecture] <short finding>`
|
|
57
|
-
- `[Code Quality] <short finding>`
|
|
58
|
-
- `[Edge Case] <short finding>`
|
|
59
|
-
- Pass these fields to the dependency skill:
|
|
60
|
-
- `title`
|
|
61
|
-
- `problem-description`: symptom, impact, and repository evidence
|
|
62
|
-
- `suspected-cause`: file references, causal chain, and confidence
|
|
63
|
-
- `reproduction`: concrete trigger or conditions when known; otherwise leave empty
|
|
64
|
-
- `repo`: target repository in `owner/repo` format when known
|
|
65
|
-
- If invoking the publisher CLI directly, pass finding details through `apltk open-github-issue --payload-file <json>` or `@file` inputs rather than inline shell arguments so code snippets and backticks survive unchanged.
|
|
66
|
-
|
|
67
|
-
## Evidence standard
|
|
68
|
-
|
|
69
|
-
Each finding must include:
|
|
70
|
-
|
|
71
|
-
- affected files or modules
|
|
72
|
-
- why the current design or code is problematic
|
|
73
|
-
- impact on correctness, maintenance, performance, or future change safety
|
|
74
|
-
- confidence level with a short reason
|
|
75
|
-
|
|
76
|
-
If evidence is incomplete, keep it as a hypothesis and do not publish a GitHub issue for it.
|
|
77
|
-
|
|
78
|
-
## Output format
|
|
79
|
-
|
|
80
|
-
Use this structure in responses:
|
|
81
|
-
|
|
82
|
-
1. Codebase coverage
|
|
83
|
-
- reviewed areas
|
|
84
|
-
- explicit exclusions
|
|
85
|
-
2. Review tier reached
|
|
86
|
-
- architecture / code quality / edge cases
|
|
87
|
-
- why lower tiers were skipped, if applicable
|
|
88
|
-
3. Confirmed findings
|
|
89
|
-
- title
|
|
90
|
-
- affected files
|
|
91
|
-
- evidence and reasoning
|
|
92
|
-
- impact
|
|
93
|
-
- confidence
|
|
94
|
-
4. GitHub issue publication status
|
|
95
|
-
- duplicate-check status and any matching existing issue URLs
|
|
96
|
-
- publication mode (`gh-cli` / `github-token` / `draft-only`)
|
|
97
|
-
- created issue URL or draft output per finding
|
|
98
|
-
5. Deferred follow-up
|
|
99
|
-
- list lower-tier checks that were intentionally not performed because a higher-tier issue already exists
|
|
100
|
-
|
|
101
|
-
## Resources
|
|
102
|
-
|
|
103
|
-
- Dependency skill: `open-github-issue` for deterministic GitHub issue publication with auth fallback and README language detection.
|
|
7
|
+
## 目標
|
|
8
|
+
輸出一份面向整個倉庫的審查報告,先交付最有價值的根因級問題,而不是零散表象。報告需要說明覆蓋範圍、實際審查到的層級、已確認發現、是否已檢查重複 issue、是否已發布 issue,以及因高優先級問題而延後的後續檢查。
|
|
9
|
+
|
|
10
|
+
## 驗收條件
|
|
11
|
+
- 在做任何設計或實作判斷前,已完整閱讀所有會影響行為的人類編寫檔案,包括原始碼、測試、配置、建置腳本、遷移與關鍵文檔。
|
|
12
|
+
- 對生成檔、vendor 檔與 snapshot 檔先確認其性質;只有在性質明確時才可排除深讀,且必須在報告中明確列出排除項與原因。
|
|
13
|
+
- 每個發現都附帶具體檔案與因果說明,不做無證據推測;同一根因導致的多個症狀必須合併成一條發現。
|
|
14
|
+
- 審查順序固定為「架構 → 代碼品質 → 邊界情況」;若在較高層級已確認問題,必須停止更低層級審查並在報告中說明原因。
|
|
15
|
+
- 若需要發布 issue,必須先做重複檢查;每個已確認且非重複的發現都要有發布結果,若無法發布則提供可直接使用的草稿內容。
|
|
16
|
+
- 最終交付物必須包含覆蓋範圍、審查層級、已確認發現、issue 發布狀態與延後檢查項。
|
|
17
|
+
|
|
18
|
+
## 工作流程
|
|
19
|
+
1. 映射倉庫。
|
|
20
|
+
- 先識別頂層目錄、入口點、核心模組、測試區、配置、腳本與疑似生成/vendor 區域。
|
|
21
|
+
- 同時記錄哪些內容會被排除深讀,以及排除理由。
|
|
22
|
+
2. 完整閱讀repo。
|
|
23
|
+
- 逐個讀完所有相關的人類編寫檔案。
|
|
24
|
+
- 建立全倉視角的模組邊界、資料流、責任歸屬、不變式與失敗處理模型。
|
|
25
|
+
3. 先做架構審查。
|
|
26
|
+
- 優先尋找模組邊界錯位、跨層洩漏、循環依賴、重複工作流、抽象滲漏、責任混亂與領域模型不一致。
|
|
27
|
+
- 若已確認任何架構問題,直接停止後續較低層級審查,專注輸出架構發現。
|
|
28
|
+
4. 若架構層沒有問題,再做代碼品質審查。
|
|
29
|
+
- 檢查可讀性、重複代碼、死碼、錯誤處理、危險狀態變更、契約不清與關鍵邏輯缺少測試保護等問題。
|
|
30
|
+
- 若已確認任何代碼品質問題,停止邊界情況審查。
|
|
31
|
+
5. 僅在前兩層都沒有問題時,才審查邊界情況。
|
|
32
|
+
- 檢查空值、邊界值、部分失敗、重試、併發、順序假設、冪等性與非法狀態轉移。
|
|
33
|
+
6. 需要發布時,先做重複檢查再逐條發布。
|
|
34
|
+
- 使用 `read-github-issue` 檢查是否已有相同根因、相同邊界或相同結果導向的 open / recently closed issue。
|
|
35
|
+
- 對每個已確認且非重複的發現,使用 `open-github-issue` 發布;若發布依賴不可用,改為返回對應 issue 草稿。
|
|
36
|
+
- issue 標題前綴遵循審查層級,例如 `[Architecture]`、`[Code Quality]`、`[Edge Case]`。
|
|
37
|
+
|
|
38
|
+
## 使用範例
|
|
39
|
+
- 「幫我做一次整倉 code review」-> 先讀完整個人類編寫的repo,再按架構、代碼品質、邊界情況的順序輸出審查報告。
|
|
40
|
+
- 「幫我做 maintainability audit,找到最值得開 issue 的問題」-> 聚焦根因級問題,必要時先做 duplicate check,再為每個非重複發現準備或發布 issue。
|
|
41
|
+
- 「請做 architecture review,不要陷入 style nit」-> 先完成全倉閱讀,只報告有明確邊界與責任證據的架構問題。
|
|
42
|
+
- 「如果 issue 發布不了,也要把內容整理好」-> 仍然完成重複檢查,並輸出可直接發布的 issue 草稿,而不是臨時改用其他未定義發佈方式。
|
|
43
|
+
|
|
44
|
+
## 參考資料索引
|
|
45
|
+
- `read-github-issue`:在發布前檢查目標倉庫中是否已存在相同根因的 issue,避免重複建單。
|
|
46
|
+
- `open-github-issue`:為每個已確認且非重複的發現建立 GitHub issue;若不可用,則返回 issue 草稿內容。
|