@laitszkin/apollo-toolkit 3.11.8 → 3.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/AGENTS.md +6 -6
  2. package/CHANGELOG.md +20 -2
  3. package/README.md +9 -10
  4. package/align-project-documents/SKILL.md +20 -69
  5. package/align-project-documents/references/templates/standardized-docs-template.md +1 -1
  6. package/analyse-app-logs/scripts/__pycache__/filter_logs_by_time.cpython-312.pyc +0 -0
  7. package/analyse-app-logs/scripts/__pycache__/log_cli_utils.cpython-312.pyc +0 -0
  8. package/analyse-app-logs/scripts/__pycache__/search_logs.cpython-312.pyc +0 -0
  9. package/archive-specs/SKILL.md +18 -70
  10. package/commit-and-push/SKILL.md +22 -52
  11. package/develop-new-features/SKILL.md +15 -60
  12. package/docs-to-voice/scripts/__pycache__/docs_to_voice.cpython-312.pyc +0 -0
  13. package/enhance-existing-features/SKILL.md +24 -61
  14. package/generate-spec/SKILL.md +15 -18
  15. package/generate-spec/references/templates/coordination.md +0 -1
  16. package/generate-spec/scripts/__pycache__/create-specscpython-312.pyc +0 -0
  17. package/implement-specs/SKILL.md +27 -62
  18. package/implement-specs-with-subagents/SKILL.md +28 -71
  19. package/implement-specs-with-worktree/SKILL.md +38 -62
  20. package/init-project-html/SKILL.md +26 -116
  21. package/iterative-code-performance/SKILL.md +1 -1
  22. package/iterative-code-quality/SKILL.md +1 -1
  23. package/katex/scripts/__pycache__/render_katex.cpython-312.pyc +0 -0
  24. package/maintain-project-constraints/SKILL.md +21 -79
  25. package/maintain-project-constraints/references/constraint-file-reference.md +58 -0
  26. package/merge-changes-from-local-branches/SKILL.md +26 -100
  27. package/open-github-issue/scripts/__pycache__/open_github_issue.cpython-312.pyc +0 -0
  28. package/open-source-pr-workflow/SKILL.md +4 -7
  29. package/optimise-skill/SKILL.md +9 -9
  30. package/optimise-skill/references/definition.md +6 -5
  31. package/optimise-skill/references/example_skill.md +9 -9
  32. package/package.json +1 -1
  33. package/read-github-issue/scripts/__pycache__/find_issues.cpython-312.pyc +0 -0
  34. package/read-github-issue/scripts/__pycache__/read_issue.cpython-312.pyc +0 -0
  35. package/resolve-review-comments/scripts/__pycache__/review_threads.cpython-312.pyc +0 -0
  36. package/review-spec-related-changes/SKILL.md +24 -67
  37. package/ship-github-issue-fix/SKILL.md +2 -2
  38. package/solve-issues-found-during-review/SKILL.md +11 -74
  39. package/spec-to-project-html/SKILL.md +26 -75
  40. package/submission-readiness-check/SKILL.md +26 -62
  41. package/systematic-debug/SKILL.md +48 -64
  42. package/test-case-strategy/SKILL.md +38 -85
  43. package/text-to-short-video/scripts/__pycache__/enforce_video_aspect_ratio.cpython-312.pyc +0 -0
  44. package/update-project-html/SKILL.md +25 -94
  45. package/version-release/SKILL.md +39 -74
  46. package/archive-specs/references/templates/architecture.md +0 -21
  47. package/archive-specs/references/templates/docs-index.md +0 -39
  48. package/archive-specs/references/templates/features.md +0 -25
  49. package/archive-specs/references/templates/principles.md +0 -28
  50. package/discover-edge-cases/CHANGELOG.md +0 -19
  51. package/discover-edge-cases/LICENSE +0 -21
  52. package/discover-edge-cases/README.md +0 -87
  53. package/discover-edge-cases/SKILL.md +0 -91
  54. package/discover-edge-cases/agents/openai.yaml +0 -4
  55. package/discover-edge-cases/references/architecture-edge-cases.md +0 -41
  56. package/discover-edge-cases/references/code-edge-cases.md +0 -46
  57. package/discover-security-issues/CHANGELOG.md +0 -32
  58. package/discover-security-issues/LICENSE +0 -21
  59. package/discover-security-issues/README.md +0 -35
  60. package/discover-security-issues/SKILL.md +0 -88
  61. package/discover-security-issues/agents/openai.yaml +0 -4
  62. package/discover-security-issues/references/agent-attack-catalog.md +0 -117
  63. package/discover-security-issues/references/common-software-attack-catalog.md +0 -168
  64. package/discover-security-issues/references/red-team-extreme-scenarios.md +0 -81
  65. package/discover-security-issues/references/risk-checklist.md +0 -78
  66. package/discover-security-issues/references/security-test-patterns-agent.md +0 -101
  67. package/discover-security-issues/references/security-test-patterns-finance.md +0 -88
  68. package/discover-security-issues/references/test-snippets.md +0 -73
  69. package/recover-missing-plan/SKILL.md +0 -85
  70. package/recover-missing-plan/agents/openai.yaml +0 -4
  71. package/review-change-set/LICENSE +0 -21
  72. package/review-change-set/README.md +0 -55
  73. package/review-change-set/SKILL.md +0 -96
  74. package/review-change-set/agents/openai.yaml +0 -4
  75. package/review-codebases/LICENSE +0 -21
  76. package/review-codebases/README.md +0 -69
  77. package/review-codebases/SKILL.md +0 -103
  78. package/review-codebases/agents/openai.yaml +0 -4
  79. package/scheduled-runtime-health-check/LICENSE +0 -21
  80. package/scheduled-runtime-health-check/README.md +0 -107
  81. package/scheduled-runtime-health-check/SKILL.md +0 -135
  82. package/scheduled-runtime-health-check/agents/openai.yaml +0 -4
  83. package/scheduled-runtime-health-check/references/output-format.md +0 -20
@@ -12,23 +12,23 @@ description: Use prompt engineering to optimise agent skill. Use it when you nee
12
12
 
13
13
  ## 工作流程
14
14
 
15
- 1. 識別交付物
15
+ ### 1. 識別交付物
16
16
  完整閱讀整個技能的 `SKILL.md` 文檔,以及其引用的所有額檔案,包括但不限於 `references/` , `scripts/` 。基於獲取到的技能上下文資訊,總結出該技能的最終交付產物。
17
17
 
18
- 2. 制定驗收條件
18
+ ### 2. 制定驗收條件
19
19
  制定驗收條件,從而確保LLM能夠穩定、可復現地按照驗收條件產出符合要求高質量最終交付物
20
20
 
21
- 3. 重寫技能
21
+ ### 3. 重寫技能
22
22
  將整個技能的 `SKILL.md` 重寫。重寫後的技能應該只包含以下幾個關鍵組成部分:
23
- - 技能目標
24
- - 技能驗收條件
25
- - 技能工作流程
26
- - 技能使用範例
27
- - 技能參考資料索引
23
+ - 目標
24
+ - 驗收條件
25
+ - 工作流程
26
+ - 範例
27
+ - 參考資料
28
28
  對於技能有幫助的內但不符合上述技能架構規範,則應該被分類放置在 `references/` 下的markdown檔案。
29
29
 
30
30
  ## 範例
31
- - "一個專注在提示LLM agent進行自我迭代,並為代碼庫帶來性能優化的技能需要被優化" -> "定義驗收條件為優化後性能相較優化前至少提升X個百分比,並且項目之中不存在任何O(n^2)級別時間複雜度的函式和邏輯,並按照標準架構重寫技能。"
31
+ - "一個專注在提示LLM agent進行自我迭代,並為repo帶來性能優化的技能需要被優化" -> "定義驗收條件為優化後性能相較優化前至少提升X個百分比,並且項目之中不存在任何O(n^2)級別時間複雜度的函式和邏輯,並按照標準架構重寫技能。"
32
32
  - "一個有大量前端開發範例被包含在 `SKILL.md` 之中的前端開發技能需要被優化" -> "定義驗收條件為前端頁面 `reference` 之中提供的大量建議範例重寫且不包含任何建議示例之中明確拒絕的設計,然後按照技能優化流程對技能進行全面的重寫。"
33
33
 
34
34
  ## 參考資料
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laitszkin/apollo-toolkit",
3
- "version": "3.11.8",
3
+ "version": "3.12.1",
4
4
  "description": "Apollo Toolkit npm installer for managed skill copying across Codex, OpenClaw, and Trae.",
5
5
  "license": "MIT",
6
6
  "author": "LaiTszKin",
@@ -1,82 +1,39 @@
1
1
  ---
2
2
  name: review-spec-related-changes
3
- description: >-
4
- Read-only spec compliance vs governing docs/plans: score every business requirement Met/Partial/Not-met from code/tests/commands—checked `tasks.md` boxes never count; ambiguity between two plan roots halts execution; on code-bearing diffs run **`review-change-set`**, **`discover-edge-cases`**, **`discover-security-issues`** on the same scope afterward — **prefer one read-only subagent per secondary skill in parallel** so the main agent aggregates without re-reading. Independent requirement clusters may also be scored by parallel read-only subagents.
5
- Use for “does this PR satisfy coordination.md + spec.md R2?” or a user-pinned `{change}` folder.
6
- Do not mutate repos, bury missing goals, skip the tertiary bundle on code-bearing diffs, or rest on intent without evidence; FORBIDDEN to lead with refactor comments while R1 is failing. GOOD: pair every Not-met cite with a `spec.md` ref + concrete path:test gap.
3
+ description: 當你需要審查規格文檔相關變更時,調用此技能
7
4
  ---
8
5
 
9
- # Review Spec Related Changes
6
+ ## 目標
10
7
 
11
- ## Dependencies
8
+ 輸出一份 spec 相關變更審查報告,先回答「這次變更是否真的滿足規劃中的業務要求」,再補充邊界、安全與代碼審查發現。每條關鍵需求需給出可追溯的狀態判定、證據來源、缺口說明與剩餘不確定性;不負責修改代碼或更新規劃文件。
12
9
 
13
- - Required: `review-change-set`, `discover-edge-cases`, and `discover-security-issues` whenever the scope includes **code-affecting** implementation to assess.
14
- - Conditional: none.
15
- - Optional: none.
16
- - Fallback: If any required dependency is unavailable for a **code-affecting** review, **MUST** stop and report the gap. **MUST NOT** emit a “full pass” verdict without those three passes when code is in scope.
10
+ ## 驗收條件
17
11
 
18
- ## Non-negotiables
12
+ - 生成完整的 code review report,內容涵蓋6個維度的代碼審查結果及改進建議。
19
13
 
20
- - **MUST NOT** edit implementation code, tests, or planning docs during this skill (read-only review).
21
- - **MUST NOT** archive specs, commit, push, tag, or release from this skill.
22
- - **MUST** resolve which spec set governs the change **before** concluding; if multiple candidates fit equally and cannot be disambiguated from repo evidence, **MUST** stop and report ambiguity—**MUST NOT** guess.
23
- - **MUST** classify each business goal / acceptance item as `Met`, `Partially met`, `Not met`, or `Deferred/N/A` **only** using verifiable evidence (code, tests, commands, traces)—checked boxes in `tasks.md` are **not** proof by themselves.
24
- - **MUST** treat **unmet or partially met required business goals** as **highest severity**. **MUST NOT** let edge-case, security, or style findings **outrank** those gaps in the reported order or implied priority.
25
- - **MUST** finish the business-goal verdict **before** invoking secondary skills; **MUST** still run `review-change-set`, `discover-edge-cases`, and `discover-security-issues` on the **same** implementation scope when code is involved (after step 1 verdict is written).
26
- - **SHOULD** parallelize the secondary reviews when code is involved by dispatching **one read-only subagent per secondary skill** (one for `review-change-set`, one for `discover-edge-cases`, one for `discover-security-issues`). Each subagent receives the same diff scope, follows that skill’s own SKILL.md, and returns ONLY its structured findings; the main agent aggregates them in the fixed report order without re-running the underlying analysis. Single-file or trivial diffs may be reviewed inline without subagents.
27
- - For business-goal scoring itself, **MAY** parallelize by dispatching one read-only subagent per **independent requirement cluster** (requirements that share no owned paths and no shared spec section), each returning Met/Partial/Not-met with cited evidence. The main agent owns final ordering, severity, and any cross-requirement reconciliation. Tightly coupled requirements stay on the main agent.
28
- - **MUST NOT** rest conclusions on author intent, branch names, or chat memory unless **repository evidence** agrees.
29
- - **MUST NOT** let subagents mutate repositories, archive specs, or commit — every dispatched subagent runs in **read-only** mode.
30
- - Prefer **fewer confirmed findings** over broad speculation; unproven items belong under **Residual uncertainty**, not as faux defects.
14
+ ## 工作流程
31
15
 
32
- ## Standards (summary)
16
+ ### 1. 建立審查範圍
33
17
 
34
- - **Evidence**: Full read of governing docs + minimal code/diff context + spec-named verification commands when safe to run.
35
- - **Execution**: Scope resolution → business compliance (optionally fanned out by independent requirement cluster) → parallel secondary reviews via per-skill read-only subagents → aggregated ordered report.
36
- - **Quality**: Business-first severity; secondary findings separated unless they also block an acceptance criterion; subagent reports stay strictly within their assigned skill’s scope.
37
- - **Output**: Ordered list: business gaps → edge cases → security → code review → passing summary → residual uncertainty.
18
+ 閱讀用戶指定的 spec ,並按照 spec 之中定義的實作範圍,檢索並閱讀相關代碼。
19
+ 如果外部環境允許使用 subagents,建議通過調度 subagents 完成代碼的深度閱讀。
38
20
 
39
- ## Scope resolution
21
+ ### 2. 進行多維度審查
40
22
 
41
- **Chain-of-thought:** Before **`Workflow`**, answer **`Pause →`** for the governing spec you will use; equally plausible paths without disambiguation ⇒ **stop**.
23
+ 對所有實作代碼多維度的審查,確保代碼:
24
+ - 無幻覺代碼
25
+ - 無冗余代碼
26
+ - 代碼無與 spec 之間的實作偏移
27
+ - 無 spec 實作遺漏
28
+ - 無架構瑕疵
29
+ - 無性能隱患
42
30
 
43
- **User-named path** — Read `spec.md`, `tasks.md`, `checklist.md`, `contract.md`, `design.md`, and batch `coordination.md` when present unless the user narrowed the list. Treat as authoritative unless the user pointed at a **newer** superseding plan. Map implementation via tasks, owned paths, diff, branch, commits.
44
- - **Pause →** Did the user give a **filesystem path** or only a nickname that could map to multiple `docs/plans/...` trees?
45
- - **Pause →** For each major business verdict later, what **exact** spec heading or requirement ID will I cite?
31
+ 如果有代碼違反了上述6個原則,將他們紀錄在案。
32
+ 如果外部環境允許使用 subagents,建議通過調度 subagents 完成對代碼的多維度審查。
46
33
 
47
- **User did not name a spec** — Inspect `git status -sb`, `git diff --name-only`, `git diff --cached --name-only`; search `docs/plans/`, `docs/archive/plans/`, or repo-documented plan dirs. If no plan file moved, infer from recent commits and plausible plan dirs; **if still ambiguous, stop** (see Non-negotiables).
48
- - **Pause →** What **three** independent clues tie this implementation to **one** plan—not chat memory alone?
49
- - **Pause →** If I withheld the conversation transcript, could another reviewer replicate my chosen spec folder from repo evidence?
34
+ ### 3. 生成 code review report
50
35
 
51
- ## Workflow
52
-
53
- **Chain-of-thought:** Answer **`Pause →`** after **each** step before moving down the list or calling dependent skills.
54
-
55
- 1. **Spec baseline** — Read governing docs end-to-end. Extract goals, acceptance criteria, non-goals, deferrals, required verifications. Build a compact claim list provable from repo evidence. Keep “what the product must do” separate from “how clean the code is.”
56
- - **Pause →** Which items are **mandatory** acceptance vs explicitly **out of scope** or deferred?
57
- - **Pause →** What observable failure would make me change a `Met` to `Not met` for the top risk requirement?
58
-
59
- 2. **Implementation evidence** — Read the relevant diff/staged/commits/files. Trace the minimum code path to validate claims. Run spec-named checks when available and safe. When the spec contains **independent requirement clusters** (disjoint owned paths, disjoint spec sections), **MAY** dispatch one read-only subagent per cluster to score Met/Partial/Not-met with cited evidence; the main agent reconciles cross-requirement effects and owns the final verdict ordering. Tightly coupled requirements stay on the main agent.
60
- - **Pause →** What is the **smallest** code path I have not yet read that could still falsify a `Met`?
61
- - **Pause →** Am I about to score `Met` from **intent** or from **tests/commands** I actually ran or inspected?
62
- - **Pause →** If I clustered, is every cluster genuinely disjoint, or am I about to lose a cross-requirement contradiction by running them in isolation?
63
-
64
- 3. **Business-goal verdict first** — Emit every `Not met` / `Partially met` **before** secondary findings, with **exact** spec cites and code/test evidence. While required goals stay failed, **MUST NOT** frame archival, release, or “done” narratives that imply compliance.
65
- - **Pause →** If I sorted findings by “interesting” instead of business impact, which line would unfairly rise above a missing goal?
66
- - **Pause →** For each `Partially met`, what single **missing proof** (test, wire-up, error path) am I naming explicitly?
67
-
68
- 4. **Secondary reviews (code-affecting)** — On the same scope: `review-change-set` (architecture/simplification), `discover-edge-cases` (reproducible edge/observability risks), `discover-security-issues` (reproducible security). **Prefer dispatching one read-only subagent per skill in parallel** so each runs in its own context with the full SKILL.md it owns; hand each subagent the same diff scope and the structured-report contract from that skill. The main agent waits for every subagent to return, then keeps outputs labeled so they do not read as business-goal substitutions. Trivial single-file diffs may run inline without subagents. The main agent **MUST NOT** re-run a secondary skill it already delegated, and subagents **MUST NOT** mutate the repository.
69
- - **Pause →** Does this secondary finding **force** a business re-score—if yes, did I revise step 3 before publishing?
70
- - **Pause →** Is the diff scope identical to what I used for business mapping (no silent file creep)?
71
- - **Pause →** Did every dispatched secondary subagent return — or am I about to publish from partial summaries?
72
-
73
- 5. **Final report (fixed order)** — (1) Business-goal failures (always top severity for required gaps). (2) Edge-case. (3) Security. (4) Code-review / maintainability. (5) Passing evidence for goals confirmed `Met`. (6) Residual uncertainty (skipped commands, unmapped spec text, unverifiable externals). If nothing actionable: state that explicitly **and** still cite docs and evidence reviewed.
74
- - **Pause →** What commands or spec paragraphs remain **unverified**—are they all listed under residual uncertainty?
75
-
76
- ## Sample hints
77
-
78
- - **Business claim record**:
79
- - `R3.2 refresh token rotation` → `Not met` — spec `spec.md` §3.2 requires one-time use; `src/auth/refresh.rs:40` still accepts same jti on replay; test `refresh_replay` not present.
80
- - **Wrong ordering** — starting with “nice simplification in `foo.ts`” while `R1.0` is unmet: **wrong**; lead with the `R1.0` gap.
81
- - **Tasks checked but behavior missing** — `tasks.md` shows `[x] implement rate limit` but no call site in `src/api/*` and no test: verdict stays **`Not met` / `Partially met`**, not `Met`.
82
- - **Ambiguous scope** — two directories `docs/plans/2026-05-01/foo/` and `…/batch-a/foo/` both plausible; **stop** with “need user to name path” instead of picking one.
36
+ 將上一步發現的所有問題代碼總結,並按照問題嚴重程度排序,生成code review report。report需要包含以下元素:
37
+ - 問題描述、嚴重度及影響
38
+ - 涉及的代碼檔案、行數
39
+ - 建議修正方案
@@ -7,7 +7,7 @@ description: Resolve a GitHub issue in an existing repository and submit the fix
7
7
 
8
8
  ## Dependencies
9
9
 
10
- - Required: `read-github-issue`, `enhance-existing-features`, `recover-missing-plan`, and `commit-and-push`.
10
+ - Required: `read-github-issue`, `enhance-existing-features`, and `commit-and-push`.
11
11
  - Conditional: `systematic-debug` when the issue is primarily a bug investigation or failing behavior report.
12
12
  - Optional: none.
13
13
  - Fallback: If any required dependency is unavailable, stop and report which dependency blocked the workflow.
@@ -32,7 +32,7 @@ description: Resolve a GitHub issue in an existing repository and submit the fix
32
32
  ### 2) Explore the codebase and decide whether specs are required
33
33
 
34
34
  - After reading the issue, inspect the real entrypoints, affected modules, tests, and existing planning files.
35
- - If the user references an expected `docs/plans/...` path that is missing or archived unexpectedly, run `$recover-missing-plan` before treating the issue as unspecced work.
35
+
36
36
  - Run `$enhance-existing-features` to decide whether specs are required from the actual change surface.
37
37
  - Default to direct implementation for clearly localized bug fixes, regressions, narrow optimizations, or small workflow corrections, even when the issue wording sounds broad.
38
38
  - Require specs when the explored change touches critical money movement, permissions, high-risk concurrency, or multi-module behavior changes that need approval traceability.
@@ -1,86 +1,23 @@
1
1
  ---
2
2
  name: solve-issues-found-during-review
3
- description: >-
4
- From a confirmed finding list: fix in severity order (Critical→Low) with minimal patches, validate after each item, forbid speculative polish; document Deferred/CNR with evidence.
5
- Done only when code matches governing specs/plans where they apply and security, edge-case, and other inbound review findings are fixed/verified with nothing material open.
6
- Use for concrete review excerpts; STOP if vague. Bad: refactor while Critical SSRF open. Good: minimal patch, tests green, evidence cited.
3
+ description: 當你需要修復 code review report 之中發現的問題時,調用這個技能。
7
4
  ---
8
5
 
9
- # Solve Issues Found During Review
6
+ ## 技能目標
10
7
 
11
- ## Dependencies
8
+ 遵照 code review report 之中的建議方案,逐一將所有發現的代碼問題修正。
12
9
 
13
- - Required: none (caller **MUST** supply an existing review report or reconstructable finding list).
14
- - Conditional: `review-spec-related-changes` when governing `docs/plans/...`, `spec.md`, `tasks.md`, contracts, or checklists bind the changed behavior—**MUST** satisfy **Completion criteria** §1 before declaring done; `review-change-set` for optional re-validation after **code-affecting** fixes; `systematic-debug` when a fix causes unexpected test or runtime failures; **`commit-and-push`** when the user requests **git commit** and/or **push** to persist fixes—**MUST** hand off that leg to **`commit-and-push`** (not bare `git commit` / ungated push).
15
- - Conditional (completion gate): **`discover-security-issues`** / **`discover-edge-cases`** when the inbound material includes security or edge-case findings, or when completion requires proving those dimensions clean—rerun or equivalent scoped proof **MUST** show no remaining confirmed in-scope issue (see **Completion criteria** §2).
16
- - Fallback: If `review-change-set` is unavailable after code fixes, **MUST** still verify via targeted tests and `git diff` (or equivalent) and **MUST** document exactly what was run. If the user requested **commit/push** and **`commit-and-push`** is unavailable, **MUST** stop and report.
10
+ ## 驗收條件
17
11
 
18
- ## Non-negotiables
12
+ - 所有 code review report 之中明確列出的問題都已經被完全修復。
19
13
 
20
- - **MUST** read the **full** report and the affected code **before** editing. **MUST** tie every code change to a **confirmed** finding (explicit severity/title/evidence). **MUST NOT** fix speculative, hypothetical, or “nice-to-have” items unless the report elevated them to confirmed findings.
21
- - **MUST** process findings in strict severity order: complete **all** Critical before **any** High, then Medium, then Low—**MUST NOT** skip ahead for convenience. Within a tier, follow the reviewer’s stated ordering when present; if severities are missing, treat business-goal / correctness breaks as **High–Critical class** and cosmetic simplification as **Low**.
22
- - **MUST** validate after each finding’s fix (tests, repro steps, or agreed oracle) **before** starting the next finding at the same or lower priority. **MUST NOT** mark a finding fixed without passing validation.
23
- - **MUST** keep each fix **minimal** and scoped to the finding: **MUST NOT** bundle unrelated refactors, style sweeps, or scope expansion.
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.
14
+ ## 工作流程
26
15
 
27
- ## Completion criteria
16
+ ### 1. 完整閱讀 code review report
28
17
 
29
- Declare this workflow **finished** only when **both** clauses below hold. Partial closure of the finding queue is insufficient.
18
+ 完整閱讀 code review report,並深入閱讀相關受影響代碼,理解建議修復方案。
19
+ 如果外部環境允許使用 subagents,建議通過subagents完成對代碼的深度閱讀。
30
20
 
31
- 1. **Specification conformance**: Every behavior touched by fixes **MUST** match the authoritative specification documents (`spec.md`, `tasks.md`, `checklist.md`, `contract.md`, governing `docs/plans/{change}` prose, plus any checklist items the caller names). **MUST** run **`review-spec-related-changes`** (or an equivalent checklist walk tied to cited requirement IDs plus tests/commands) whenever such docs exist or the user points at a plan path; cite **Met** (or repaired **Partial**) outcomes with file/test evidence in the closing report. If the caller asserts **no** binding spec for the scope, **MUST** state that assumption explicitly and anchor compliance to the issue/report text plus passing validation—**MUST NOT** silently invent spec obligations.
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.
21
+ ### 2. 修復發現的問題
33
22
 
34
- `Could not reproduce` on a formerly cited line **counts** toward §2 cleared **only if** investigation evidence excludes stale reports; if reproducibility disagrees between spec §1 and a security/edge claim, **priority is correctness and safety**: resolve the conflict before completion.
35
-
36
- ## Standards (summary)
37
-
38
- - **Evidence**: Confirmed finding → code path → minimal patch → validation artifact; closure adds spec traceability and ancillary-review clean signal.
39
- - **Execution**: Order by severity; optional parallel module groups only when isolation is real; merge without losing fix intent; completion gates §1–§2 after the queue settles.
40
- - **Quality**: No speculative hardening; conflicts resolved conservatively unless the finding demands an aggressive change.
41
- - **Output**: Per-finding status, validation proof, **completion-criteria checklist** (spec + ancillary reviews), final re-validation summary, residual/blockers only when completion is explicitly waived by caller rescope.
42
-
43
- ## Workflow
44
-
45
- **Chain-of-thought:** After **each** phase, **`Pause →`** guards against speculative fixes and order violations—answer them before edits or merges.
46
-
47
- ### 1) Ingest findings
48
-
49
- Read the supplied report. If the user says “fix review findings” but attached nothing, reconstruct from git/recent outputs; if **no** reconstructable list exists, **MUST** stop and report. Extract each finding: severity, title, evidence (`path:line` or equivalent), reproduction notes.
50
- - **Pause →** Can I attach **severity + excerpt + repro** per row—is anything still vague “looks bad”?
51
- - **Pause →** Is this finding **explicitly confirmed** by the reviewer, or only a hypothesis I must shelve?
52
-
53
- ### 2) Order and (optional) parallelize
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.
23
+ 按照 code review report之中的嚴重度排序,從最高嚴重度的問題開始建議方案修復。
@@ -1,91 +1,42 @@
1
1
  ---
2
2
  name: spec-to-project-html
3
3
  description: >-
4
- Sync the project HTML architecture atlas to active planning specs by driving `apltk architecture --spec <spec_dir>`. Single specs write overlay YAML under `<spec_dir>/architecture_diff/atlas/`; batch member paths resolve to the shared batch-root `architecture_diff/` beside `coordination.md`. The CLI re-renders only the affected proposed-after HTML pages — macro SVG and per-sub-module internal-dataflow diagrams stay zoomable like the base atlas — so `apltk architecture diff` pairs before/after by path under `docs/plans/**/architecture_diff/`. Preserve the two-layer rule and the responsibility split: **subagents only** — each subagent reads ONE affected feature and declares EVERY intra-feature overlay change; the main agent **waits until all subagents finish**, then aggregates outbound summaries and declares **only** cross-feature edges. **Exact CLI spelling:** always `apltk architecture --help`. Ground every declaration in repo evidence; mark `TBD` when code is missing.
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
- # Spec To Project HTML
7
+ # 規劃文件同步到專案 HTML 架構圖
8
8
 
9
- ## Dependencies
9
+ ## 技能目標
10
10
 
11
- - Required: **`init-project-html`** its `SKILL.md` is the semantic rulebook; **`apltk architecture --help`** is the verb/flag source of truth. Reuse the same CLI here with `--spec`.
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
- ## Non-negotiables
13
+ ## 驗收條件
18
14
 
19
- - **MUST** read specs in order unless the user directs otherwise: `spec.md` `design.md` `contract.md` → coordination notes.
20
- - **MUST** declare every change through the CLI with `--spec <spec_dir>` (exact verbs/flags: **`apltk architecture --help`**). Single specs write overlay YAML to `<spec_dir>/architecture_diff/atlas/` and re-render only the affected proposed-after HTML pages there. Batch member paths resolve to the shared batch-root `architecture_diff/` beside `coordination.md`, so the whole batch keeps one overlay and one rendered diff. **MUST NOT** hand-edit `architecture_diff/**/*.html` the renderer owns those files.
21
- - **MUST** obey the semantic rules from `init-project-html/SKILL.md`:
22
- - Sub-module pages stay self-only express cross-boundary interactions via **edges** (cross-feature or intra-feature), never as sub-module page prose.
23
- - Feature pages stay lightweight cross-sub-module choreography belongs in **edges**, not in `dataflow` prose that pretends to cross features.
24
- - **MUST** reconcile deltas through the CLI families described in **`apltk architecture --help`**. Keep the meaning in this skill, but take the exact verbs, subverbs, and flags from the CLI itself.
25
- - **MUST NOT** drop modules that are still present in code just because the spec omits them — keep them, or rewrite role/purpose to flag “out of spec scope”.
26
- - **MUST** scope reads to the **affected feature modules** from the spec/design diff (plus any feature owning the other end of a cross-feature edge into an affected one). **Subagents own intra-feature overlay writes; the main agent owns cross-feature seams — after all subagents finish:**
27
- - Dispatch **one write-capable subagent per affected feature**. Each applies every intra-feature overlay mutation via `apltk architecture ... --spec <spec_dir>` (exact flags: **`--help`**). Each returns **ONLY** a structured summary: sub-module change list, outbound boundary changes (cross-feature edges to add/change/remove), and any `planned` / `gap` markers.
28
- - **MUST** wait until **every** dispatched subagent has completed before running any cross-feature **`edge`** mutation, overlay-wide **`meta`** that stitches multiple features, or shared **`actor`** that exists only for cross-feature context.
29
- - **Forbidden:** loading every affected feature’s source into the main agent before delegating — that explodes context and produces contradictory overlays.
30
- - **MUST** run `apltk architecture validate --spec <spec_dir>` after the final mutation. Resolve every reported error before reporting completion.
15
+ - 只透過 `apltk architecture --spec <spec_dir>` 寫入 overlay;單個 spec 產物位於 `<spec_dir>/architecture_diff/`,批量 spec 則寫入 `coordination.md` 同級的共享 overlay;不得手改 `architecture_diff/**/*.html`。
16
+ - 讀取規劃文件時遵循 `spec.md` `design.md` `contract.md` `coordination.md` 的順序;所有重要宣告都能同時回溯到 spec 語句和相關程式碼或設計證據。
17
+ - 對於程式碼尚未實作、但規劃中已經提出的結構,必須顯式使用 `planned`、`gap` `TBD` 標記,而不能偽裝成已落地實作。
18
+ - 按「每個受影響功能一個可寫子 agent」執行 overlay 更新;主 agent 必須等全部子 agent 完成後,才允許補跨功能邊、共享 `meta` 或共享 `actor`。
19
+ - `apltk architecture validate --spec <spec_dir>` 通過,且 `apltk architecture diff` 中的頁面配對正確,沒有懸空邊、孤兒頁面或錯誤的 add/remove 配對。
31
20
 
32
- ## Standards (summary)
21
+ ## 工作流程
33
22
 
34
- - **Evidence**: cite the spec passage (design subsystem entry) alongside the code path; record the citation in `meta.summary` or in sub-module purposes when relevant.
35
- - **Execution**: locate the plan set → list affected feature modules → subagent fan-out → **all complete** → cross-feature edges → `render --spec` if batched → `validate --spec` → `diff` check → handover.
36
- - **Quality**: macro overlay still shows every cross-feature data-row the spec requires; sub-module declarations stay self-only; `apltk architecture diff` opens cleanly with no orphan pages; no dangling edges.
37
- - **Output**: single specs touch only `<spec_dir>/architecture_diff/atlas/**` (overlay state) and `<spec_dir>/architecture_diff/**/*.html` (renderer output); batch specs write the same artifacts under the batch root beside `coordination.md`. Base `resources/project-architecture/` is **NEVER** mutated.
23
+ 1. 先定位本次規劃目錄;使用者明確給出路徑時優先使用,否則結合 `coordination.md` 找到正確 plan 集,並整理相關需求編號用於追蹤。
24
+ 2. 執行 `apltk architecture --help` 取得最新命令形態,然後按 `spec.md`、`design.md`、`contract.md`、`coordination.md` 的順序讀取內容,確定哪些功能、子模組、邊、變數或錯誤語義會發生變化。
25
+ 3. 先只列出受影響功能,不要提前把所有原始碼塞進主 agent。除了直接變更的功能,也要納入跨功能邊另一端的功能,確保 overlay 中的跨邊界關係完整。
26
+ 4. 為每個受影響功能派發一個可寫子 agent。每個子 agent 只負責自己功能內的 overlay 寫入:子模組、函式、變數、資料流、錯誤,以及功能內邊;若規劃領先於程式碼,則在角色、用途或資料流文案中明確標註 `planned`、`gap` `TBD`。
27
+ 5. 子 agent 只返回功能內變更摘要、跨功能邊界變化和待記錄的 `planned/gap` 標記;主 agent 不得重讀已委派功能原始碼,也不得重複寫功能內元件。
28
+ 6. 等全部子 agent 完成後,主 agent 統一補跨功能 `edge`、必要的共享 `meta` / `actor`,再執行 `apltk architecture validate --spec <spec_dir>`,並透過 `apltk architecture diff` 檢查 overlay 頁面是否正確映射到 before/after 視圖。
29
+ 7. 最終報告至少包含:觸及的 overlay 檔案或 CLI 變更類別、`modified` / `added` / `removed` 數量、所有子 agent 已完成後才開始跨功能連線的確認、未解決的 spec 與程式碼差距,以及後續跟進行動。
38
30
 
39
- ## Acceptance criteria (mirrors `init-project-html`)
31
+ ## 使用範例
40
32
 
41
- Open the proposed-after viewer (`apltk architecture diff`) and verify both criteria on the overlay pages before reporting completion:
33
+ - 「把這份新 spec 的架構變化渲染成 before/after HTML 對照。」 -> 「讀取 plan 集,按受影響功能分派子 agent,寫入 `architecture_diff/` overlay,並用 `apltk architecture diff` 驗證。」
34
+ - 「批量規劃下多個 spec 共用一份架構 overlay。」 -> 「仍以成員 spec 路徑呼叫 `--spec`,但讓 CLI 自動彙總到 `coordination.md` 同級的共享 overlay 根目錄。」
42
35
 
43
- 1. **The macro overlay clearly shows the proposed-after feature × sub-module relationships**, including data flow (**`data-row`**), interaction logic (**`call`** + **`return`**), error handling and rollback (**`failure`**). Any new / changed / removed cross-boundary path the spec implies **MUST** exist as an edge mutation in the overlay — not as sub-module prose.
44
- 2. **Each touched sub-module’s internal overlay diagram clearly shows the function-level interactions inside it**, including function references and variable reads/writes on `dataflow` steps. Declare `function` / `variable` before referencing them so `validate --spec` passes.
36
+ ## 參考資料索引
45
37
 
46
- ## Workflow
38
+ - `init-project-html/SKILL.md`:基礎語義規則、邊類型與子模組表達約束。
39
+ - `references/TEMPLATE_SPEC.md`:overlay 模式下的欄位、列舉與 diff 配對規則速查表。
47
40
 
48
- ### 1) Resolve spec inputs
49
-
50
- User-pointed path wins; otherwise use the batch `coordination.md` or `recover-missing-plan` to find the most recent plan; collect `R…` / `INT-…` IDs for traceability.
51
-
52
- ### 2) List the affected feature modules (no function bodies yet)
53
-
54
- Derive from the spec/design diff which feature modules change: new sub-modules, edge changes, variable changes, error changes, retired sub-modules… **Also** include any feature owning the other end of a cross-feature edge that is being changed (even if that feature’s own spec is untouched). Record only `slug + change-kind`; do not enter function bodies yet.
55
-
56
- ### 3) Subagents patch features; orchestrator patches cross-feature seams **after** all workers finish
57
-
58
- Dispatch one **write-capable subagent per affected feature**. Each subagent owns every intra-feature overlay write and reports outbound boundaries upward. Use **`apltk architecture --help`** for exact `add|set|remove|reorder` spelling.
59
-
60
- > **Feature `<slug>` subagent contract (overlay)**
61
- > - Read this feature’s affected sub-modules and the cited spec passages / requirement IDs.
62
- > - Apply every intra-feature overlay mutation with `--spec <spec_dir>`: structural (`feature` / `submodule`), rows (`function`, `variable`, `dataflow`, `error`), and intra-feature **`edge`** changes (including failure / rollback between this feature’s own sub-modules). Order `dataflow` so **variable state** reads end-to-end.
63
- > - Run `apltk architecture validate --spec <spec_dir>` before returning.
64
- > - **Return ONLY**: (i) sub-module change list, (ii) outbound boundary changes (cross-feature edges add/change/remove with endpoints and suggested kind/label), (iii) any `planned` / `gap` flags for `meta.summary`.
65
-
66
- **After every subagent has completed**, the main agent declares **only** the cross-feature seams through `apltk architecture ... --spec <spec_dir>`, then renders and validates the overlay.
67
-
68
- - **Pause →** Do `planned` / `gap` markers read consistently across affected sub-modules?
69
- - The main agent **MUST NOT** re-declare a subagent’s intra-feature components, and **MUST NOT** open source files for any feature it delegated.
70
-
71
- - **Pause →** Does `apltk architecture diff` pair every changed page correctly? If a page shows as add + remove instead of modified, you renamed a slug somewhere — re-check.
72
-
73
- ### 4) Traceability (suggested)
74
-
75
- Use `feature-trace` (or `meta.summary` for spec-only changes) to map spec IDs to implementation status: `met` / `partial` / `planned` / `gap`.
76
-
77
- ### 5) Report
78
-
79
- List overlay files touched (or verb families used), the diff counts (`modified` / `added` / `removed`) from `apltk architecture diff`, confirmation that **all subagents finished before cross-feature wiring**, unresolved spec-vs-code gaps, and any follow-ups.
80
-
81
- ## Sample hints
82
-
83
- - **Batch merge**: each member spec still calls `--spec <member_dir>`, but the CLI resolves writes to the shared batch-root overlay beside `coordination.md`; `diff` shows the batch as one combined architecture delta.
84
- - **Spec shrinks scope**: prefer `submodule set --role "deprecated: ..."` before `submodule remove` so reviewers see intent.
85
- - **Design-only change**: still review edges — order shifts surface as edge mutations; `validate --spec` catches dangling references.
86
-
87
- ## References
88
-
89
- - `init-project-html/SKILL.md` — semantic contracts and acceptance criteria.
90
- - `init-project-html/references/TEMPLATE_SPEC.md` — schema cheat sheet (fields/enums), not a command list.
91
- - **`apltk architecture --help`** — live CLI reference.
41
+ - `generate-spec`、`implement-specs*`:需求編號和規劃流程的上游來源。
42
+ - `apltk architecture --help`:`--spec` 模式命令與參數的唯一真源。
@@ -1,75 +1,39 @@
1
1
  ---
2
2
  name: submission-readiness-check
3
- description: Prepare a repository for safe submission by synchronizing `CHANGELOG.md`, project docs, `AGENTS.md/CLAUDE.md`, and completed planning artifacts before commit, push, PR creation, or release. Use when a workflow is about to submit changes and must avoid missing finalization steps such as stale `Unreleased` notes, unarchived completed spec sets, or unsynchronized agent constraints.
3
+ description: >-
4
+ 用於在 commit、push、PR 或 release 前做最後同步檢查。會確認 `CHANGELOG.md`、
5
+ 專案文件、`AGENTS.md` / `CLAUDE.md` 與已完成的 planning artifacts 是否都已更新到可提交狀態。
4
6
  ---
5
7
 
6
- # Submission Readiness Check
8
+ ## 目標
7
9
 
8
- ## Dependencies
10
+ 在任何提交、推送、開 PR 或發版前,先把 repository 的外部說明、內部約束與 planning artifacts 同步到一致狀態,避免把未整理完成的變更交給下一個提交流程。
9
11
 
10
- - Required: `align-project-documents` and `maintain-project-constraints` before any git submission step.
11
- - Conditional: `archive-specs` when completed `spec.md` / `tasks.md` / `checklist.md` sets should be converted into categorized project docs and archived, or when existing project docs need normalization into the standard structure.
12
- - Optional: none.
13
- - Fallback: If a required dependency is unavailable, or if spec conversion is required but `archive-specs` is unavailable, stop and report the missing dependency instead of submitting partially synchronized changes.
12
+ ## 驗收條件
14
13
 
15
- ## Standards
14
+ - 已盤點真實的提交面,包括 git 狀態、staged diff、現有 docs、planning artifacts 與目標提交流程
15
+ - 當 spec 已完成且應轉成長期文件時,已先完成 `archive-specs`,而不是把它留給後續流程猜測處理
16
+ - `docs/`、`AGENTS.md` / `CLAUDE.md` 與必要的 `README.md` 已根據實際行為與工作流程同步
17
+ - `CHANGELOG.md` 的 `Unreleased` 區塊已準確對應這次將提交、開 PR 或發版的真實範圍
18
+ - 最終輸出的是明確的 ready / blocking verdict,而不是模糊警告
16
19
 
17
- - Evidence: Inspect the actual git diff, staged set, planning artifacts, `CHANGELOG.md`, and current project docs before declaring the repository ready to submit.
18
- - Execution: Decide whether the target flow is commit/push, PR, or release; normalize completed spec sets when appropriate; synchronize project docs plus `AGENTS.md/CLAUDE.md`; then enforce changelog readiness before any commit, tag, push, PR creation, or release publishing step.
19
- - Quality: Treat missing or stale changelog entries as blocking issues for submit workflows, preserve unrelated pending `Unreleased` bullets, do not archive active plan sets that still track unfinished scope, and do not hand back a ready verdict until every conditional gate whose scenario is met has actually been completed.
20
- - Output: Return a ready-to-submit verdict with the synchronized files and any blocking items that must be fixed before the owning submit workflow continues.
20
+ ## 工作流程
21
21
 
22
- ## Workflow
22
+ 1. 先讀取 git 狀態、staged / unstaged diff,並盤點 repo 是否有 `CHANGELOG.md`、`AGENTS.md`、`CLAUDE.md`、標準化 `docs/` 結構,以及任何 `docs/plans/...` 計劃集
23
+ 2. 判斷下游流程屬於 `commit-push`、`pull-request` 或 `release`,因為不同流程對 changelog 與發版資料的要求不同
24
+ 3. 檢查 planning artifacts 是否應轉檔;只要 plan set 已對應本次交付成果,或專案文件仍未標準化,就必須先跑 `archive-specs`
25
+ 4. 在 spec 歸檔判斷完成後,同步專案文件;必要時執行 `align-project-documents` 更新 `docs/`,再用 `maintain-project-constraints` 更新 `AGENTS.md` / `CLAUDE.md`
26
+ 5. 檢查 `CHANGELOG.md`:對 commit / PR 流程,要讓 `Unreleased` 精準反映這次待提交內容,同時保留其他未出貨工作;對 release 流程,`Unreleased` 必須非空且已整理成可直接切版的 release notes
27
+ 6. 彙整哪些項目已同步、哪些仍阻塞;若還有未完成的 gate,明確回報 blocking item,而不是把責任留給下一個技能
23
28
 
24
- ### 1) Inventory the real submission surface
29
+ ## 範例
25
30
 
26
- - Read `git status -sb`, `git diff --stat`, and `git diff --cached --stat`.
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`
31
+ - 「準備提交這批變更」-> 檢查是否有未同步 changelog、文件與已完成但尚未歸檔的 spec
32
+ - 「準備開 PR」-> 確保 `Unreleased` 反映當前 PR 範圍,並把 `AGENTS.md` / `CLAUDE.md` docs 同步好
33
+ - 「準備發版」-> 確保 `Unreleased` 非空且可直接作為 release notes,並先完成任何必要的 spec 歸檔與文件標準化
33
34
 
34
- ### 2) Decide whether planning artifacts should be converted
35
+ ## 參考資料
35
36
 
36
- - Treat live `spec.md`, `tasks.md`, and `checklist.md` sets semantically instead of mechanically.
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.
40
-
41
- ### 3) Synchronize project docs and constraints
42
-
43
- - Run `$align-project-documents` after spec conversion or doc inspection is complete.
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.
46
-
47
- ### 4) Enforce changelog readiness
48
-
49
- - Treat root `CHANGELOG.md` as the canonical user-facing submission summary when it exists.
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.
61
-
62
- ### 5) Hand back a submission verdict
63
-
64
- - Confirm which files were synchronized:
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.
37
+ - `align-project-documents`:同步 `docs/features/`、`docs/architecture/`、`docs/principles/`
38
+ - `maintain-project-constraints`:同步 `AGENTS.md` / `CLAUDE.md`
39
+ - `archive-specs`:在符合條件時轉檔並歸檔 planning artifacts