@laitszkin/apollo-toolkit 3.11.7 → 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 +33 -0
- package/README.md +0 -2
- 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/SKILL.md +3 -30
- 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 +51 -130
- 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 -137
- package/init-project-html/lib/atlas/cli.js +897 -43
- package/init-project-html/scripts/architecture.js +4 -25
- package/katex/scripts/__pycache__/render_katex.cpython-312.pyc +0 -0
- package/lib/cli.js +166 -20
- package/lib/tool-runner.js +418 -2
- 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/SKILL.md +7 -98
- package/open-github-issue/scripts/__pycache__/open_github_issue.cpython-312.pyc +0 -0
- package/optimise-skill/SKILL.md +7 -6
- package/optimise-skill/references/definition.md +38 -0
- package/optimise-skill/references/example_skill.md +7 -6
- package/package.json +1 -1
- package/read-github-issue/SKILL.md +6 -46
- 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/SKILL.md +4 -26
- 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/scripts/validate_openai_agent_config.py +16 -1
- package/scripts/validate_skill_frontmatter.py +16 -1
- package/solve-issues-found-during-review/SKILL.md +38 -66
- package/spec-to-project-html/SKILL.md +27 -88
- 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 -110
- package/version-release/SKILL.md +39 -74
- package/weekly-financial-event-report/scripts/extract_pdf_text_pdfkit.swift +32 -4
- package/archive-specs/references/templates/architecture.md +0 -21
- package/archive-specs/references/templates/docs-index.md +0 -39
- package/archive-specs/references/templates/features.md +0 -25
- package/archive-specs/references/templates/principles.md +0 -28
- package/maintain-skill-catalog/README.md +0 -18
- package/maintain-skill-catalog/SKILL.md +0 -72
- package/maintain-skill-catalog/agents/openai.yaml +0 -4
|
@@ -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,103 +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 **`--help`**:
|
|
25
|
-
- Structural changes → `feature` / `submodule` (**add** / **set** / **remove** as appropriate).
|
|
26
|
-
- Per-sub-module rows → `function`, `variable`, `dataflow`, `error` (**add** / **remove** / **reorder** for dataflow where supported).
|
|
27
|
-
- Seams → `edge` **add** / **remove** (prefer stable **`--id`** when you may remove the same edge later).
|
|
28
|
-
- **`submodule remove`** / **`feature remove`** in spec mode populate removal manifests so `diff` can show **removed** pages; renames are usually **remove old slug + add new slug** so the viewer shows remove + add rather than a silent overwrite.
|
|
29
|
-
- **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”.
|
|
30
|
-
- **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:**
|
|
31
|
-
- 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.
|
|
32
|
-
- **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.
|
|
33
|
-
- **Forbidden:** loading every affected feature’s source into the main agent before delegating — that explodes context and produces contradictory overlays.
|
|
34
|
-
- **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 配對。
|
|
35
20
|
|
|
36
|
-
##
|
|
21
|
+
## 工作流程
|
|
37
22
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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 與程式碼差距,以及後續跟進行動。
|
|
42
30
|
|
|
43
|
-
##
|
|
31
|
+
## 使用範例
|
|
44
32
|
|
|
45
|
-
|
|
33
|
+
- 「把這份新 spec 的架構變化渲染成 before/after HTML 對照。」 -> 「讀取 plan 集,按受影響功能分派子 agent,寫入 `architecture_diff/` overlay,並用 `apltk architecture diff` 驗證。」
|
|
34
|
+
- 「批量規劃下多個 spec 共用一份架構 overlay。」 -> 「仍以成員 spec 路徑呼叫 `--spec`,但讓 CLI 自動彙總到 `coordination.md` 同級的共享 overlay 根目錄。」
|
|
46
35
|
|
|
47
|
-
|
|
48
|
-
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
|
+
## 參考資料索引
|
|
49
37
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### 2) List the affected feature modules (no function bodies yet)
|
|
57
|
-
|
|
58
|
-
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.
|
|
59
|
-
|
|
60
|
-
### 3) Subagents patch features; orchestrator patches cross-feature seams **after** all workers finish
|
|
61
|
-
|
|
62
|
-
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.
|
|
63
|
-
|
|
64
|
-
> **Feature `<slug>` subagent contract (overlay)**
|
|
65
|
-
> - Read this feature’s affected sub-modules and the cited spec passages / requirement IDs.
|
|
66
|
-
> - 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.
|
|
67
|
-
> - Run `apltk architecture validate --spec <spec_dir>` before returning.
|
|
68
|
-
> - **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`.
|
|
69
|
-
|
|
70
|
-
**After every subagent has completed**, the main agent declares **only** cross-feature seams, then renders and validates:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
# exact flags per edge: see --help
|
|
74
|
-
apltk architecture edge add --spec <spec_dir> --from <featA>/<subA> --to <featB>/<subB> --kind call|return|data-row|failure --label "..." --no-render
|
|
75
|
-
apltk architecture edge remove --spec <spec_dir> --id <stable_id> --no-render
|
|
76
|
-
apltk architecture render --spec <spec_dir>
|
|
77
|
-
apltk architecture validate --spec <spec_dir>
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
- **Pause →** Do `planned` / `gap` markers read consistently across affected sub-modules?
|
|
81
|
-
- The main agent **MUST NOT** re-declare a subagent’s intra-feature components, and **MUST NOT** open source files for any feature it delegated.
|
|
82
|
-
|
|
83
|
-
- **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.
|
|
84
|
-
|
|
85
|
-
### 4) Traceability (suggested)
|
|
86
|
-
|
|
87
|
-
Use `feature-trace` (or `meta.summary` for spec-only changes) to map spec IDs to implementation status: `met` / `partial` / `planned` / `gap`.
|
|
88
|
-
|
|
89
|
-
### 5) Report
|
|
90
|
-
|
|
91
|
-
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.
|
|
92
|
-
|
|
93
|
-
## Sample hints
|
|
94
|
-
|
|
95
|
-
- **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.
|
|
96
|
-
- **Spec shrinks scope**: prefer `submodule set --role "deprecated: ..."` before `submodule remove` so reviewers see intent.
|
|
97
|
-
- **Design-only change**: still review edges — order shifts surface as edge mutations; `validate --spec` catches dangling references.
|
|
98
|
-
|
|
99
|
-
## References
|
|
100
|
-
|
|
101
|
-
- `init-project-html/SKILL.md` — semantic contracts and acceptance criteria.
|
|
102
|
-
- `init-project-html/references/TEMPLATE_SPEC.md` — schema cheat sheet (fields/enums), not a command list.
|
|
103
|
-
- **`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
|
|
@@ -1,71 +1,55 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: systematic-debug
|
|
3
|
-
description:
|
|
3
|
+
description: >-
|
|
4
|
+
用於系統化排查程式問題。先釐清預期與實際行為,再對所有合理原因做可重現驗證,
|
|
5
|
+
找出真正根因並以最小修復完成驗證;凡是出現 observed-vs-expected mismatch 都應優先使用。
|
|
4
6
|
---
|
|
5
7
|
|
|
6
|
-
#
|
|
8
|
+
# 系統化除錯
|
|
7
9
|
|
|
8
|
-
##
|
|
10
|
+
## Dependencies
|
|
9
11
|
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
12
|
+
- Required: 無
|
|
13
|
+
- Conditional: 視情況可搭配 `test-case-strategy`、`analyse-app-logs`、`scheduled-runtime-health-check`
|
|
14
|
+
- Optional: 無
|
|
15
|
+
- Fallback: 無
|
|
14
16
|
|
|
15
|
-
##
|
|
17
|
+
## Standards
|
|
16
18
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
- When comparing runtime runs, first verify the baseline run is complete enough for the requested comparison: same command or scenario, same runtime mode, same bounded duration, and matching structured artifacts. If the baseline is incomplete, report that the only proven change is artifact/run completeness and avoid drawing strategy or performance conclusions from missing data.
|
|
22
|
-
- When a repository has both scenario or harness runs and a production-like runtime, do not treat the lower-fidelity mode as proof about the higher-fidelity mode unless you explicitly state that limitation and the user agrees.
|
|
23
|
-
- When the failing flow crosses multiple layers, identify the last confirmed successful stage before assigning blame.
|
|
24
|
-
- When debugging a stress, chaos, or edge-case profile, keep the profile adversarial but not globally disabling: preserve at least one realistic path that can reach the target stage so the rerun measures product behavior under pressure instead of only proving the harness can self-sabotage.
|
|
25
|
-
- If a profile adjustment restores some execution but the target stage is still unobserved, classify the remaining blocker precisely by stage instead of reporting a blanket recovery.
|
|
26
|
-
- When tests fail, separate stale assertions and fixture drift from real implementation regressions before changing product code.
|
|
27
|
-
- If failures only appear under parallel execution or shared shell-out paths, investigate test isolation, shared locks, temp directories, run-name collisions, and environment leakage before blaming the product.
|
|
19
|
+
- Evidence: 先收集預期與實際行為、程式碼路徑、測試輸出與單一可信 runtime artifact,再判斷原因
|
|
20
|
+
- Execution: 為每個合理假設建立可重現證據,定位最後一個成功階段,再區分工具鏈、測試契約、測試隔離與產品邏輯問題
|
|
21
|
+
- Quality: 修復只針對真實根因;不能重現的假設必須明確排除;不得混用不同執行批次的證據
|
|
22
|
+
- Output: 產出根因候選、重現方式、最終分類、最小修復、驗證結果,以及在 runtime 問題中使用的 canonical evidence
|
|
28
23
|
|
|
29
|
-
##
|
|
24
|
+
## 技能目標
|
|
30
25
|
|
|
31
|
-
|
|
26
|
+
把「它應該做 X,實際卻做了 Y」這類問題轉成可驗證的除錯流程,避免靠猜測改碼,並確保最後交付的是已被重現、已被證明、已被驗證的修復。
|
|
32
27
|
|
|
33
|
-
|
|
34
|
-
- error, exception, crash, 4xx/5xx failure
|
|
35
|
-
- failing/flaky tests, intermittent failures, unstable behavior
|
|
36
|
-
- "why is this not working" style troubleshooting requests
|
|
37
|
-
- explicit or implicit observed-vs-expected mismatch ("it should do X but does Y")
|
|
28
|
+
## 驗收條件
|
|
38
29
|
|
|
39
|
-
|
|
30
|
+
- 已清楚記錄預期行為、實際行為、受影響路徑,以及 runtime 問題使用的單一 canonical 證據來源
|
|
31
|
+
- 所有合理根因都已被重現、驗證或明確排除,而不是只修第一個看起來像的原因
|
|
32
|
+
- 已區分問題屬於工具鏈 / 平台、測試契約過期、測試干擾、流程編排,還是真正的產品邏輯缺陷
|
|
33
|
+
- 最終修復是最小且聚焦的,並由失敗後轉成功的測試或 bounded rerun 證明有效
|
|
40
34
|
|
|
41
|
-
##
|
|
35
|
+
## 工作流程
|
|
42
36
|
|
|
43
|
-
1.
|
|
44
|
-
2.
|
|
45
|
-
3.
|
|
46
|
-
4.
|
|
47
|
-
5.
|
|
37
|
+
1. 先整理使用者回報、測試輸出、日誌與程式碼路徑,明確寫出預期與實際差異;若問題涉及 runtime artifact,先指定一個 canonical run 或輸出目錄
|
|
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. 向使用者回報根因清單、最終分類、修復摘要、驗證結果,以及任何仍受限於執行環境或資料品質的部分
|
|
48
44
|
|
|
49
|
-
##
|
|
45
|
+
## 使用範例
|
|
50
46
|
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
- If a hypothesized cause cannot be reproduced, document why and deprioritize it explicitly.
|
|
55
|
-
- For long-running or generated-artifact workflows, record the exact command, timestamps, and artifact paths before inspecting outputs so later comparisons stay on the same evidence set.
|
|
56
|
-
- Do not mix baseline data and rerun data casually; compare the same scenario or command across runs and call out when a conclusion comes from a rerun rather than the original failure.
|
|
57
|
-
- When rerun artifacts land in the wrong directory because a wrapper or inherited environment reused a previous report path, fix the evidence layout first and only then compare metrics; otherwise classify the result as an artifact-routing problem rather than a performance delta.
|
|
58
|
-
- For post-run "why did most events not happen" questions, derive the answer from a funnel over structured artifacts first, then corroborate with logs: discovered or eligible candidates, admission blocks, stale or skipped decisions, queue/governor outcomes, execution attempts, confirmations, retries, and persisted event rows.
|
|
59
|
-
- For speed questions, compute per-stage timings from available event timestamps and state which stages are measured versus unavailable; avoid treating wall-clock bounded duration as pipeline latency, and separately report bounded execute time versus provisioning/readiness/cleanup overhead when both are present.
|
|
60
|
-
- When a runtime profile adds extreme faults, distinguish "edge cases are present" from "the harness globally disabled execution"; if every candidate dies before the claimed stage, reduce only the globally disabling parts, keep representative faults, and rerun the same bounded scenario to prove the profile still exercises the target path.
|
|
61
|
-
- When test fixtures or assertions no longer match the implemented contract, update the tests instead of weakening the product behavior to satisfy stale expectations.
|
|
62
|
-
- When tests shell out to shared local infrastructure, add deterministic isolation such as mutexes, unique temp roots, or serialized sections before accepting flakes as inevitable.
|
|
47
|
+
- 「這個 API 應該回 200,現在卻變成 500」-> 先確認預期契約,再重現所有合理根因,最後定位是 handler 邏輯、依賴服務還是測試 fixture 問題
|
|
48
|
+
- 「測試單獨跑會過,但整個 suite 會 flaky」-> 優先排查共享狀態、鎖、暫存目錄與環境污染,而不是先改產品邏輯
|
|
49
|
+
- 「bounded run 幾乎沒有事件發生」-> 先沿著 lifecycle funnel 判斷停在哪個階段,再確認是 profile 過度破壞、編排錯誤,還是實際業務邏輯問題
|
|
63
50
|
|
|
64
|
-
##
|
|
51
|
+
## 參考資料索引
|
|
65
52
|
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
- Failure classification for each symptom: stale contract, harness interference, or real bug
|
|
70
|
-
- Fix summary mapped to failing-then-passing tests
|
|
71
|
-
- Final confirmation that all related tests pass
|
|
53
|
+
- `test-case-strategy`:需要補重現測試或 drift check 時使用
|
|
54
|
+
- `analyse-app-logs`:問題主要來自應用日誌時使用
|
|
55
|
+
- `scheduled-runtime-health-check`:需要有界執行與執行後分析時使用
|