@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.
- package/AGENTS.md +6 -6
- package/CHANGELOG.md +20 -2
- package/README.md +9 -10
- 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 +22 -52
- package/develop-new-features/SKILL.md +15 -60
- package/docs-to-voice/scripts/__pycache__/docs_to_voice.cpython-312.pyc +0 -0
- package/enhance-existing-features/SKILL.md +24 -61
- package/generate-spec/SKILL.md +15 -18
- 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 +26 -116
- package/iterative-code-performance/SKILL.md +1 -1
- package/iterative-code-quality/SKILL.md +1 -1
- package/katex/scripts/__pycache__/render_katex.cpython-312.pyc +0 -0
- package/maintain-project-constraints/SKILL.md +21 -79
- package/maintain-project-constraints/references/constraint-file-reference.md +58 -0
- package/merge-changes-from-local-branches/SKILL.md +26 -100
- package/open-github-issue/scripts/__pycache__/open_github_issue.cpython-312.pyc +0 -0
- package/open-source-pr-workflow/SKILL.md +4 -7
- package/optimise-skill/SKILL.md +9 -9
- package/optimise-skill/references/definition.md +6 -5
- package/optimise-skill/references/example_skill.md +9 -9
- 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-spec-related-changes/SKILL.md +24 -67
- package/ship-github-issue-fix/SKILL.md +2 -2
- package/solve-issues-found-during-review/SKILL.md +11 -74
- package/spec-to-project-html/SKILL.md +26 -75
- package/submission-readiness-check/SKILL.md +26 -62
- package/systematic-debug/SKILL.md +48 -64
- 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
- package/discover-edge-cases/CHANGELOG.md +0 -19
- package/discover-edge-cases/LICENSE +0 -21
- package/discover-edge-cases/README.md +0 -87
- package/discover-edge-cases/SKILL.md +0 -91
- package/discover-edge-cases/agents/openai.yaml +0 -4
- package/discover-edge-cases/references/architecture-edge-cases.md +0 -41
- package/discover-edge-cases/references/code-edge-cases.md +0 -46
- package/discover-security-issues/CHANGELOG.md +0 -32
- package/discover-security-issues/LICENSE +0 -21
- package/discover-security-issues/README.md +0 -35
- package/discover-security-issues/SKILL.md +0 -88
- package/discover-security-issues/agents/openai.yaml +0 -4
- package/discover-security-issues/references/agent-attack-catalog.md +0 -117
- package/discover-security-issues/references/common-software-attack-catalog.md +0 -168
- package/discover-security-issues/references/red-team-extreme-scenarios.md +0 -81
- package/discover-security-issues/references/risk-checklist.md +0 -78
- package/discover-security-issues/references/security-test-patterns-agent.md +0 -101
- package/discover-security-issues/references/security-test-patterns-finance.md +0 -88
- package/discover-security-issues/references/test-snippets.md +0 -73
- package/recover-missing-plan/SKILL.md +0 -85
- package/recover-missing-plan/agents/openai.yaml +0 -4
- package/review-change-set/LICENSE +0 -21
- package/review-change-set/README.md +0 -55
- package/review-change-set/SKILL.md +0 -96
- package/review-change-set/agents/openai.yaml +0 -4
- package/review-codebases/LICENSE +0 -21
- package/review-codebases/README.md +0 -69
- package/review-codebases/SKILL.md +0 -103
- package/review-codebases/agents/openai.yaml +0 -4
- package/scheduled-runtime-health-check/LICENSE +0 -21
- package/scheduled-runtime-health-check/README.md +0 -107
- package/scheduled-runtime-health-check/SKILL.md +0 -135
- package/scheduled-runtime-health-check/agents/openai.yaml +0 -4
- package/scheduled-runtime-health-check/references/output-format.md +0 -20
|
@@ -1,130 +1,40 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: init-project-html
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
4
|
+
使用 `apltk architecture` 初始化專案 HTML 架構圖譜,生成基礎 atlas YAML 與渲染後的 HTML 頁面。所有宣告基於倉庫證據;每個功能模組由一個可寫子 agent 負責,主 agent 必須等待全部子 agent 完成後,才能補跨功能連接並執行 render 與 validate。
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 技能目標
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
透過 `apltk architecture` 為目前倉庫建立基礎專案架構圖譜,產出受 CLI 管理的 atlas 狀態檔與渲染後的 HTML 頁面。
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
- Conditional: `spec-to-project-html` when the same atlas needs spec-driven refresh — that skill uses the same CLI with `--spec`.
|
|
13
|
-
- Optional: `align-project-documents` when `docs/features` already names the user-visible capabilities.
|
|
14
|
-
- Fallback: codebase too large for one pass → use the **subagent** strategy below; document scanned roots and explicit omissions in `meta.summary`. **MUST NOT** declare components for code paths that were never read.
|
|
11
|
+
## 驗收條件
|
|
15
12
|
|
|
16
|
-
|
|
13
|
+
- 只透過 `apltk architecture` 修改圖譜;不得手改 `resources/project-architecture/**/*.html`。
|
|
14
|
+
- 所有宣告可追溯到真實程式碼、設定、SQL 或外部邊界;無法確認的部分用 `TBD` 或在 `meta.summary` 記錄遺漏原因。
|
|
15
|
+
- 宏觀圖完整表達功能與子模組關係;所有跨邊界互動使用 `call`、`return`、`data-row`、`failure` 邊表達。
|
|
16
|
+
- 每個非平凡子模組具備足夠內部結構:已宣告 `function`、`variable`、有序 `dataflow`、必要時的 `error`,且引用可通過校驗。
|
|
17
|
+
- 採用「每個功能一個可寫子 agent」分工;主 agent 等所有子 agent 完成後才補跨功能邊,且 `apltk architecture validate` 通過。
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
## 工作流程
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
1. 執行 `apltk architecture --help`,以 CLI 說明為唯一命令真源。
|
|
22
|
+
2. 做整倉淺層盤點,列出功能模組的 slug、使用者視角職責、入口點與主要邊界資源。
|
|
23
|
+
3. 為每個功能派發一個可寫子 agent,負責宣告該功能的全部子模組、函式、變數、資料流、本地錯誤與功能內邊。子 agent 返回子模組摘要及需要主 agent 補上的跨功能邊界資訊。
|
|
24
|
+
4. 主 agent 不得重讀已委派功能的原始碼,也不得重複宣告子 agent 已處理的功能內元件。
|
|
25
|
+
5. 全部子 agent 完成後,主 agent 統一補齊跨功能 edge、必要時補共享 meta 或 actor,然後執行 `apltk architecture render` 與 `apltk architecture validate`。
|
|
26
|
+
6. 抽查渲染結果,確認宏觀圖和至少一個代表性子模組頁滿足驗收條件,彙報功能數、子模組數、邊數量、未覆蓋路徑與原因。
|
|
21
27
|
|
|
22
|
-
|
|
28
|
+
## 使用範例
|
|
23
29
|
|
|
24
|
-
|
|
30
|
+
- 「替這個倉庫首次生成 HTML 架構圖」→ 梳理功能模組,按功能分派子 agent,彙總跨功能邊,生成基礎 atlas 與渲染頁面。交付物為 `resources/project-architecture/` 下的完整 atlas 狀態檔與通過驗證的 HTML 頁面。
|
|
31
|
+
- 「把系統的資料流、呼叫關係和回滾路徑視覺化」→ 使用 `call` / `return` / `data-row` / `failure` 邊表達跨邊界關係,為每個關鍵子模組補齊內部 `dataflow`。
|
|
25
32
|
|
|
26
|
-
|
|
27
|
-
- **Variables table** — business-purpose identifiers (`scope` enum and `purpose` text).
|
|
28
|
-
- **Internal dataflow** — ordered steps inside a pan/zoom viewport (+/−/Fit), same interaction model as the macro SVG. Steps may attach a declared function name and comma-separated read/write variable names; the renderer shows them as a function pill and read/write chips so **function-to-function flow** and **variable state** are visible in one diagram.
|
|
29
|
-
- **Local errors** — symbolic error rows (`when` / `means`).
|
|
33
|
+
## 參考資料索引
|
|
30
34
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
Cross-boundary narratives (“I call X”, “Y calls me”) **MUST** be **edges** between `feature/submodule` endpoints with a `kind` of `call`, `return`, `data-row`, or `failure` — never as extra prose on a sub-module page. There is no CLI path to smuggle cross-boundary text onto sub-module pages.
|
|
38
|
-
|
|
39
|
-
### Rule 3 — Read order: subagents only; wait for all workers before cross-feature wiring
|
|
40
|
-
|
|
41
|
-
Real production codebases dwarf the main agent’s context. **MUST** use this pattern only:
|
|
42
|
-
|
|
43
|
-
1. Enumerate the **feature-module list** (slug + entry + boundary resources only) — **no** function-body deep reads at this stage.
|
|
44
|
-
2. Dispatch **one write-capable subagent per feature** (every feature in scope that needs atlas work). Each subagent:
|
|
45
|
-
- deep-reads **only** its feature;
|
|
46
|
-
- declares **everything intra-feature** via `apltk architecture` scoped with `--feature <slug>` where the CLI allows (exact scoping flags: **`--help`**): sub-modules, per-sub-module functions / variables / ordered dataflow / errors, and **every intra-feature edge** (calls, returns, data-rows, failures, rollback/compensation **between sub-modules of the same feature**);
|
|
47
|
-
- returns **ONLY** a structured summary of (i) sub-module list (slug + kind + one-line role) and (ii) **outbound boundaries** the orchestrator must wire later (calls / data-rows / failures **to other features’** sub-modules — direction, endpoints, suggested kind/label).
|
|
48
|
-
|
|
49
|
-
3. **Gate — all subagents complete:** The main agent **MUST NOT** declare any **cross-feature** `edge`, shared `meta` that encodes multi-feature narrative, nor any `actor` that exists only to stitch features together, **until every dispatched subagent has finished** (success **or** an explicit failure report). Partial summaries are for note-taking only — **not** for mutating cross-feature atlas state.
|
|
50
|
-
|
|
51
|
-
4. After the gate: the main agent aggregates outbound boundary notes, declares **only** cross-feature edges (and optional shared `meta` / `actor` if needed), then runs **`apltk architecture render`** (if batched with `--no-render`) and **`apltk architecture validate`**.
|
|
52
|
-
|
|
53
|
-
The main agent **MUST NOT** re-read source for a delegated feature and **MUST NOT** re-declare intra-feature components a subagent already owns.
|
|
54
|
-
|
|
55
|
-
### Rule 4 — Evidence over invention
|
|
56
|
-
|
|
57
|
-
- **MUST** anchor every declared feature, sub-module, function, variable, dataflow step, and edge to a concrete path / symbol / SQL / config; record scanned roots and any deliberate omissions in `meta.summary` via the CLI (`meta` verbs — flags: **`--help`**).
|
|
58
|
-
- **MUST NOT** invent modules, integrations, or sub-modules just because the diagram “looks balanced”. Empty rows are valid; lies are not.
|
|
59
|
-
|
|
60
|
-
## Standards (summary)
|
|
61
|
-
|
|
62
|
-
- **Evidence**: every CLI declaration traces to a path/symbol/SQL/config; uncertain areas surface as `TBD` strings or are omitted with a recorded reason.
|
|
63
|
-
- **Execution**: shallow feature-module list → subagent fan-out per feature → **wait for all** → cross-feature edges / meta → `validate` → handover.
|
|
64
|
-
- **Quality**: macro SVG carries every cross-feature data-row edge that exists in the system; sub-module declarations are self-only; pan/zoom + Fit work in the rendered HTML; `apltk architecture validate` returns OK.
|
|
65
|
-
- **Output**: `resources/project-architecture/atlas/` (YAML state) + `resources/project-architecture/**/*.html` (renderer output) — both managed by the CLI.
|
|
66
|
-
|
|
67
|
-
## Acceptance criteria
|
|
68
|
-
|
|
69
|
-
The atlas is only complete when both of the following are demonstrably true on the rendered HTML (open `resources/project-architecture/index.html` and one representative sub-module page to verify):
|
|
70
|
-
|
|
71
|
-
1. **Macro diagram clearly shows the relationships between features and sub-modules**, including:
|
|
72
|
-
- **Data flow** — every cross-feature DB row, queue topic, or cache key hand-off is a `data-row` **edge** between producing and consuming sub-modules (not free-form prose).
|
|
73
|
-
- **Interaction logic** — synchronous request/response paths use paired **`call`** (outbound) and **`return`** edges with a label that names the call site or response shape.
|
|
74
|
-
- **Error handling and rollback** — every failure / compensation / retry path that crosses a sub-module boundary is a **`failure`** edge with a label that names what is rolled back or compensated.
|
|
75
|
-
- No cross-boundary interaction exists **only** in sub-module page prose — it **MUST** appear as an edge on the macro SVG.
|
|
76
|
-
2. **Each sub-module’s internal diagram clearly shows the function-level interactions inside the sub-module**, including:
|
|
77
|
-
- **Function-to-function flow** — non-trivial steps reference a declared function on that sub-module.
|
|
78
|
-
- **Variable state transitions** — variables read or written by a step are declared first, then referenced on the step; reading top-to-bottom traces lifecycle.
|
|
79
|
-
- **Local data flow** — ordered steps read as a directed flowchart to the sub-module boundary.
|
|
80
|
-
|
|
81
|
-
`apltk architecture validate` **MUST** return OK before reporting completion.
|
|
82
|
-
|
|
83
|
-
## CLI reference
|
|
84
|
-
|
|
85
|
-
Run **`apltk architecture --help`** and the deeper `apltk architecture <verb> [subverb] --help` pages for the authoritative command tree, required flags, examples, and expected results. This skill keeps only the semantic rules, acceptance criteria, and subagent coordination rules so the documentation does not drift when the CLI evolves.
|
|
86
|
-
|
|
87
|
-
**Cross-feature work timing:** only after **all** feature subagents have returned (Rule 3).
|
|
88
|
-
|
|
89
|
-
## Workflow
|
|
90
|
-
|
|
91
|
-
### 1) Whole-repo inventory — list feature modules, not function bodies
|
|
92
|
-
|
|
93
|
-
Scan the shipped source for **user-visible capabilities** (each one = one feature module): entry routes, CLI commands, UI pages, cron jobs, runners, event handlers, CDC streams. Record only kebab-case slug + one-line user story + boundary points (entry symbol, outbound DB tables / queue topics / external services).
|
|
94
|
-
|
|
95
|
-
- **Pause →** Is the list actually complete? Note skipped roots with reason; no silent skips.
|
|
96
|
-
- **Pause →** Did I dive into function bodies here? Roll back — keep only structural notes.
|
|
97
|
-
|
|
98
|
-
### 2) Subagent fan-out — workers own features; orchestrator owns cross-feature seams **after** all workers finish
|
|
99
|
-
|
|
100
|
-
Dispatch one **write-capable** subagent per feature. Hand each subagent: its feature slug, the feature-module list from step 1 (so it knows other features’ slugs for outbound edges), and **`apltk architecture --help`** as the flag reference.
|
|
101
|
-
|
|
102
|
-
> **Feature `<slug>` subagent contract**
|
|
103
|
-
> - Read every sub-module of this feature.
|
|
104
|
-
> - Declare the feature and its sub-modules (`feature` / `submodule` — exact flags: **`--help`**).
|
|
105
|
-
> - For every sub-module: add **function**, **variable**, ordered **dataflow**, and **error** rows as needed.
|
|
106
|
-
> - For every intra-feature interaction between sub-modules, add an **edge** whose endpoints stay **inside** this feature.
|
|
107
|
-
> - Run **`apltk architecture validate`** before returning (same project root; use **`--help`** for project/spec flags).
|
|
108
|
-
> - **Return ONLY**: (i) sub-module list (slug + kind + one-line role), (ii) outbound boundaries to *other* features’ sub-modules (direction + edge kind + suggested label). No source dumps.
|
|
109
|
-
|
|
110
|
-
**Orchestrator — after every subagent has completed:** declare only the cross-feature `apltk architecture` mutations reported by the workers, then render and validate once.
|
|
111
|
-
|
|
112
|
-
The main agent **MUST NOT** re-declare a subagent’s intra-feature components, and **MUST NOT** open source files for any feature it delegated.
|
|
113
|
-
|
|
114
|
-
### 3) Handover report
|
|
115
|
-
|
|
116
|
-
Report: feature count, sub-module count, macro edge counts (call / return / data-row / failure), uncovered paths + reasons, confirmation that **all subagents completed before cross-feature wiring**, and the location of the rendered atlas (`resources/project-architecture/index.html`).
|
|
117
|
-
|
|
118
|
-
## Sample hints
|
|
119
|
-
|
|
120
|
-
- Multiple SQL paths on `service ↔ db` → one **`edge`** per SQL path so the macro shows distinct strokes.
|
|
121
|
-
- Retry loops between `service ↔ generator(pure)` → **`call` / `return`** pair on the macro plus ordered **`dataflow`** steps on the service that show retry budget and persistence.
|
|
122
|
-
- Cross-feature DB hand-off (A writes, B reads) → both sides declare DB-oriented functions, then a **`data-row`** edge from producer to consumer.
|
|
123
|
-
- Rollback / compensation across sub-modules → **`failure`** edge with an explicit label; cleanup *inside* a single sub-module belongs in ordered **`dataflow`** steps.
|
|
124
|
-
- Third-party systems → **`external`** kind sub-modules so the trust boundary is visible in styling.
|
|
125
|
-
|
|
126
|
-
## References
|
|
127
|
-
|
|
128
|
-
- `lib/atlas/schema.js` — fields, enums, validation. `references/TEMPLATE_SPEC.md` mirrors the schema as a cheat sheet (not a substitute for **`apltk architecture --help`**).
|
|
129
|
-
- `lib/atlas/cli.js` — implementation of dispatch (`apltk architecture --help` prints usage).
|
|
130
|
-
- `init-project-html/sample-demo/` — end-to-end YAML + rendered HTML for two features.
|
|
35
|
+
- `references/TEMPLATE_SPEC.md`:atlas 欄位、列舉和 CLI 寫入形狀速查表。
|
|
36
|
+
- `lib/atlas/cli.js`:`apltk architecture` 的實作入口。
|
|
37
|
+
- `lib/atlas/schema.js`:圖譜資料結構與校驗規則。
|
|
38
|
+
- `sample-demo/`:完整示例輸出,用於理解基礎 atlas 的最終形態。
|
|
39
|
+
- `spec-to-project-html/SKILL.md`:面向規劃文件的 overlay 版本。
|
|
40
|
+
- `update-project-html/SKILL.md`:面向已存在基礎 atlas 的增量刷新版本。
|
|
@@ -19,7 +19,7 @@ description: >-
|
|
|
19
19
|
|
|
20
20
|
- Required: `align-project-documents` and `maintain-project-constraints` after the repository is truly iteration-complete.
|
|
21
21
|
- Conditional: `systematic-debug` when a performance test, benchmark, load run, or production trace exposes a real business-logic defect that must be fixed at the true owner; `improve-observability` when profiling signals are missing or measurement requires durable logs, metrics, or traces.
|
|
22
|
-
- Optional: `
|
|
22
|
+
- Optional: `improve-observability` for profiling signals or durable metrics needed during optimization.
|
|
23
23
|
- Fallback: If required completion dependencies are unavailable, finish performance work and validation first, then report exactly which documentation, constraint-sync, or observability action could not run.
|
|
24
24
|
|
|
25
25
|
## Standards
|
|
@@ -18,7 +18,7 @@ description: >-
|
|
|
18
18
|
|
|
19
19
|
- Required: `align-project-documents` and `maintain-project-constraints` after the repository is truly iteration-complete.
|
|
20
20
|
- Conditional: `systematic-debug` when a newly added or existing test exposes a real business-logic defect that must be fixed at the true owner.
|
|
21
|
-
- Optional: `
|
|
21
|
+
- Optional: `improve-observability` for non-trivial telemetry design.
|
|
22
22
|
- Fallback: If required completion dependencies are unavailable, finish code and validation first, then report exactly which documentation or constraint-sync action could not run.
|
|
23
23
|
|
|
24
24
|
## Standards
|
|
Binary file
|
|
@@ -1,93 +1,35 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maintain-project-constraints
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
Invoke after missing files, drift after refactors, or once `align-project-documents` reshapes `docs/`.
|
|
6
|
-
Bad: documenting `npm run magic` absent from `package.json`. Good: cite `npm test` with file reference. Bad: ten micro-features listed under Goals instead of the docs index…
|
|
4
|
+
依據倉庫現況刷新根目錄 `AGENTS.md` / `CLAUDE.md`,只保留 Common Development Commands、Project Business Goals、Project Documentation Index 三個可追溯區塊。
|
|
7
5
|
---
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
## 技能目標
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
基於當前倉庫證據,產出或刷新根目錄 `AGENTS.md` 與 `CLAUDE.md`,使其準確反映開發命令、專案商業目標與文件索引,不捏造任何內容。
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
- Conditional: none.
|
|
15
|
-
- Optional: none.
|
|
16
|
-
- Fallback: not applicable.
|
|
11
|
+
## 驗收條件
|
|
17
12
|
|
|
18
|
-
|
|
13
|
+
- 最終文件正文只包含三個區塊,順序固定:`Common Development Commands` → `Project Business Goals` → `Project Documentation Index`。
|
|
14
|
+
- `Common Development Commands` 中每條命令可追溯到 `package.json`、`Makefile`、`bin/`、`scripts/` 或 CI 設定等真實入口。
|
|
15
|
+
- `Project Business Goals` 只描述專案層級目的、服務對象與交付結果,不展開為功能清單。
|
|
16
|
+
- `Project Documentation Index` 覆蓋現存 `docs/features/`、`docs/architecture/`、`docs/principles/` 與重要根目錄文件,每項對應真實路徑。
|
|
17
|
+
- 過時路徑、虛構命令與多餘區塊已被移除。
|
|
18
|
+
- 若 `AGENTS.md` 與 `CLAUDE.md` 同時存在且未聲明故意分歧,兩者三個區塊內容一致。
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
- **`AGENTS.md` / `CLAUDE.md` content** is **exactly three sections**—no extra tutorials, architecture essays, or style guides (those belong in `docs/`):
|
|
22
|
-
1. **Common Development Commands**
|
|
23
|
-
2. **Project Business Goals**
|
|
24
|
-
3. **Project Documentation Index**
|
|
25
|
-
- **MUST** list **every** file under `docs/features/`, `docs/architecture/`, `docs/principles/` plus notable root docs (`README.md`, `CONTRIBUTING.md`, …) that exist; paths **MUST** exist on disk—**MUST NOT** stale links.
|
|
26
|
-
- If **both** `AGENTS.md` and `CLAUDE.md` exist, the three sections **MUST** be **identical** between them unless the repo documents an intentional divergence (otherwise keep parity).
|
|
27
|
-
- **Project Business Goals** = macro **why/for whom/outcome**—**MUST NOT** duplicate the feature inventory (index already points there).
|
|
20
|
+
## 工作流程
|
|
28
21
|
|
|
29
|
-
|
|
22
|
+
1. 從倉庫現況收集可驗證的命令入口、專案目的與現有文件清單,不以舊約束文件作為唯一真相。
|
|
23
|
+
2. 根據證據生成三個必需區塊,確保每條命令、商業目標與文件索引可被直接追溯。
|
|
24
|
+
3. 按專案慣例更新或補齊 `AGENTS.md` / `CLAUDE.md`,正文限制在三個規定區塊內。
|
|
25
|
+
4. 完成前逐項校驗命令來源、文件路徑與雙文件一致性,清除所有陳舊或多餘內容。
|
|
30
26
|
|
|
31
|
-
|
|
32
|
-
- **Execution**: Inventory → draft three sections → verify paths → prune stray sections.
|
|
33
|
-
- **Quality**: Scannable; no speculative architecture.
|
|
34
|
-
- **Output**: Fresh root constraint files aligned with repo.
|
|
27
|
+
## 使用範例
|
|
35
28
|
|
|
36
|
-
|
|
29
|
+
- 「重建 `docs/` 後,請同步刷新 `AGENTS.md` 和 `CLAUDE.md`」→ 根據當前腳本、入口與文件樹重寫兩個根目錄約束文件,只保留三個規定區塊並確保索引完整。
|
|
30
|
+
- 「這個專案的 `CLAUDE.md` 已經過時,請補一份對應的 `AGENTS.md`」→ 依據現有命令與文件結構建立缺失文件,讓兩份約束文件在預期一致時保持同構。
|
|
31
|
+
- 「請清理根目錄約束文件裡的舊命令與失效路徑」→ 驗證每條命令與索引路徑是否仍成立,只保留能被倉庫證據支持的內容。
|
|
37
32
|
|
|
38
|
-
|
|
33
|
+
## 參考資料索引
|
|
39
34
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
**Chain-of-thought:** **`Pause →`** before writing each section—if a command is uncertain, grep config before committing text.
|
|
43
|
-
|
|
44
|
-
### 1) Inventory
|
|
45
|
-
|
|
46
|
-
- Parse command surfaces (`package.json` scripts, `Makefile`, CI, CLIs).
|
|
47
|
-
- Enumerate `docs/features/`, `docs/architecture/`, `docs/principles/`; note root docs.
|
|
48
|
-
- **Pause →** Can I cite the **source line** (script name, target) for every command I plan to list?
|
|
49
|
-
|
|
50
|
-
### 2) Business goals
|
|
51
|
-
|
|
52
|
-
- Prefer `README` + `docs/features/` tone; else infer from user-facing entrypoints—still **product-level sentences**, not file lists.
|
|
53
|
-
|
|
54
|
-
### 3) Write / update files
|
|
55
|
-
|
|
56
|
-
- Create or overwrite **only** the three sections per file conventions (create missing file among `AGENTS.md`/`CLAUDE.md` per repo habit).
|
|
57
|
-
- **Pause →** Did any stray `## Installation` creep in—must delete if not part of repo’s mandated format?
|
|
58
|
-
|
|
59
|
-
### 4) Documentation index
|
|
60
|
-
|
|
61
|
-
- One line per file: `path — short purpose`. Mirror reality; drop deleted; add new.
|
|
62
|
-
|
|
63
|
-
### 5) Verification
|
|
64
|
-
|
|
65
|
-
- Each command reproducible from declared config; every indexed path exists; both files match if both present; strip extra sections.
|
|
66
|
-
|
|
67
|
-
## Sample hints
|
|
68
|
-
|
|
69
|
-
- **Command bad**: “`npm run magic` — deploy” when no script `magic` in `package.json`.
|
|
70
|
-
- **Command OK**: `` `npm test` — runs Node test suite (see `package.json`) ``.
|
|
71
|
-
- **Goals bad**: Listing ten micro-features → belongs in features index + separate files.
|
|
72
|
-
- **Goals OK**: “This repo ships X for Y operators; primary outcome Z.”
|
|
73
|
-
- **Index**: If `docs/features/auth.md` deleted, **remove** line same run.
|
|
74
|
-
|
|
75
|
-
## Template sketch
|
|
76
|
-
|
|
77
|
-
```markdown
|
|
78
|
-
## Common Development Commands
|
|
79
|
-
- `…` — …
|
|
80
|
-
|
|
81
|
-
## Project Business Goals
|
|
82
|
-
…
|
|
83
|
-
|
|
84
|
-
## Project Documentation Index
|
|
85
|
-
### Features (`docs/features/`)
|
|
86
|
-
- `…` — …
|
|
87
|
-
### Architecture (`docs/architecture/`)
|
|
88
|
-
- …
|
|
89
|
-
### Principles (`docs/principles/`)
|
|
90
|
-
- …
|
|
91
|
-
### Root Documents
|
|
92
|
-
- `README.md` — …
|
|
93
|
-
```
|
|
35
|
+
- `references/constraint-file-reference.md`:三區塊契約、撰寫規則、核對清單與輸出模板。
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# 約束文件參考
|
|
2
|
+
|
|
3
|
+
## 三區塊契約
|
|
4
|
+
|
|
5
|
+
根目錄 `AGENTS.md` 與 `CLAUDE.md` 的正文只應包含以下三個區塊,且順序固定:
|
|
6
|
+
|
|
7
|
+
1. `Common Development Commands`
|
|
8
|
+
2. `Project Business Goals`
|
|
9
|
+
3. `Project Documentation Index`
|
|
10
|
+
|
|
11
|
+
若專案未明確說明兩者應有差異,這三個區塊的內容應保持一致。
|
|
12
|
+
|
|
13
|
+
## 撰寫規則
|
|
14
|
+
|
|
15
|
+
### `Common Development Commands`
|
|
16
|
+
|
|
17
|
+
- 只收錄能被當前倉庫驗證的命令。
|
|
18
|
+
- 優先從 `package.json`、`Makefile`、`bin/`、`scripts/`、CI 設定或其他真實入口提取。
|
|
19
|
+
- 每條命令附上一句簡短用途說明,避免捏造不存在的工作流。
|
|
20
|
+
|
|
21
|
+
### `Project Business Goals`
|
|
22
|
+
|
|
23
|
+
- 只描述專案層級的目的、服務對象與最終價值。
|
|
24
|
+
- 保持宏觀,不展開成細碎功能列表。
|
|
25
|
+
- 若存在產品說明文件,僅在能被當前倉庫內容支撐時採納。
|
|
26
|
+
|
|
27
|
+
### `Project Documentation Index`
|
|
28
|
+
|
|
29
|
+
- 覆蓋現存 `docs/features/`、`docs/architecture/`、`docs/principles/` 下的所有文件。
|
|
30
|
+
- 補充重要且實際存在的根目錄文件,例如 `README.md`、`CONTRIBUTING.md`、`SECURITY.md`。
|
|
31
|
+
- 每個條目都應包含檔案路徑與一句用途說明。
|
|
32
|
+
|
|
33
|
+
## 核對清單
|
|
34
|
+
|
|
35
|
+
- [ ] 只保留三個規定區塊,且順序正確。
|
|
36
|
+
- [ ] 每條命令都能回溯到真實入口。
|
|
37
|
+
- [ ] 商業目標沒有退化成功能清單。
|
|
38
|
+
- [ ] 文件索引覆蓋所有現存標準化文檔。
|
|
39
|
+
- [ ] 已刪除失效路徑、舊命令與額外區塊。
|
|
40
|
+
- [ ] 若 `AGENTS.md` 與 `CLAUDE.md` 都存在,已確認它們在預期情況下保持一致。
|
|
41
|
+
|
|
42
|
+
## 輸出模板
|
|
43
|
+
|
|
44
|
+
```markdown
|
|
45
|
+
# <專案名稱或標題>
|
|
46
|
+
|
|
47
|
+
## Common Development Commands
|
|
48
|
+
|
|
49
|
+
- `<command>` - <用途說明>
|
|
50
|
+
|
|
51
|
+
## Project Business Goals
|
|
52
|
+
|
|
53
|
+
- <專案存在的原因、服務對象與交付結果>
|
|
54
|
+
|
|
55
|
+
## Project Documentation Index
|
|
56
|
+
|
|
57
|
+
- `<path>` - <文件用途說明>
|
|
58
|
+
```
|
|
@@ -1,114 +1,40 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: merge-changes-from-local-branches
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
Use when consolidating named local branch work into the current branch or preparing integration on that branch.
|
|
4
|
+
將使用者指定的本地分支合併回當前分支,依序完成衝突處理、驗證、安全清理與最終提交準備;除非本次對話明確要求,否則不推送遠端。
|
|
6
5
|
---
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## 技能目標
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
在工作開始時的當前本地分支上,整合使用者指定的本地分支(或由 spec / batch 規劃可無歧義對應出的分支),完成合併、驗證、清理,並讓整合結果可安全交由 `commit-and-push` 收尾。
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
- Conditional: **`merge-conflict-resolver`** when merge conflicts require deterministic resolution.
|
|
14
|
-
- Optional: none.
|
|
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.
|
|
11
|
+
## 驗收條件
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
- 所有合併變更落在流程開始時的原始當前分支,不會未經允許改換目標分支。
|
|
14
|
+
- 合併範圍只包含使用者明確指定,或可由 `coordination.md` / spec 無歧義映射出的分支;若映射不清楚則停止並回報。
|
|
15
|
+
- 當 batch 規劃存在 `Merge order` / landing order 時,實際整合順序與規劃一致;順序衝突或不明確時不猜測執行。
|
|
16
|
+
- 所有衝突以保留正確行為為原則解決,並在刪除來源分支或交給 `commit-and-push` 前完成驗證。
|
|
17
|
+
- 只清理已成功合併且已驗證的來源分支或 worktree;不強制刪除尚未真正合入的來源。
|
|
18
|
+
- 最終交付是原始當前分支上的整合結果與簡潔摘要;只有使用者於本次對話明確要求時才推送遠端。本技能不單獨執行 `archive-specs`。
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
- **MUST** determine in-scope branches from **explicit branch names** the user gives **or** from unambiguous mappings from active spec / `coordination.md` context—**MUST NOT** infer the merge set from ancestry heuristics alone when names already define intent.
|
|
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.
|
|
20
|
+
## 工作流程
|
|
28
21
|
|
|
29
|
-
|
|
22
|
+
1. 以流程開始時的當前分支為唯一目標分支,確認合併範圍(使用者明確指定的分支,或由 spec / `coordination.md` 無歧義映射出的分支與整合順序)。
|
|
23
|
+
2. 確認工作樹適合執行合併:若存在干擾整合的未提交變更,停止並回報,不自行 stash 或切換分支。
|
|
24
|
+
3. 依既定順序逐一合併 in-scope 分支。對已合入或無新增內容的分支,跳過並記錄原因。發生衝突時閱讀雙方內容編輯出正確結果;無法在不猜測意圖的前提下解決時停止並回報。必要時使用 `merge-conflict-resolver`。
|
|
25
|
+
4. 先對衝突區域或高風險改動執行針對性驗證,再對整體整合結果執行倉庫慣用的標準驗證。驗證失敗先在當前分支修正。
|
|
26
|
+
5. 僅清理已完成合併且通過驗證的來源分支與對應 worktree;安全刪除被拒絕時保留來源並回報,不使用強制刪除。
|
|
27
|
+
6. 交由 `commit-and-push` 完成必要審查、submission-readiness gate 與本地提交。若 `commit-and-push` 不可用則停止並回報,不走裸 `git commit`。
|
|
28
|
+
7. 總結已合併與跳過的分支、順序依據、衝突處理原則、驗證結果,以及流程最終停在本地 `HEAD` 還是包含遠端推送。
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
- **Execution**: Inventory → clean target branch → sequential merges → verify → prune merged branches/worktrees → **`commit-and-push`** through local commit (push only if user asked).
|
|
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.
|
|
30
|
+
## 使用範例
|
|
35
31
|
|
|
36
|
-
|
|
32
|
+
- 「把 `feature/api-layer` 和 `feature/cli-wrapper` 合回目前分支」→ 以目前分支為唯一目標,依指定順序完成整合、驗證與安全清理,再交給 `commit-and-push` 做本地提交。
|
|
33
|
+
- 「根據 batch 的 `coordination.md` 把各 worktree 分支合回來,但先不要 push」→ 從 batch 規劃確認無歧義分支映射與 landing order,依序合併、驗證、清理,只做到本地提交。
|
|
34
|
+
- 「把那幾個應該相關的分支一起合一下」→ 若無法從使用者輸入或規劃文件明確判定分支集合與順序,停止並回報需要補充資訊。
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
## 參考資料索引
|
|
39
37
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
- Inspect `docs/plans/` for active batch roots that include **`coordination.md`**; read merge-order guidance **before** choosing sequence.
|
|
44
|
-
- Build the merge set from **user branch names**, else from unambiguous spec-name / **`coordination.md`** mappings—if a required name cannot be matched, stop and report.
|
|
45
|
-
- For each candidate: `git log --oneline <current>..<candidate>` and `git diff --stat <current>...<candidate>` (or equivalent); skip empty / already-up-to-date branches and record why.
|
|
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`**.
|
|
38
|
+
- `commit-and-push/SKILL.md`:最終提交、submission-readiness 與是否允許推送的權威流程。
|
|
39
|
+
- `merge-conflict-resolver/SKILL.md`:衝突需要精確合成時的輔助技能。
|
|
40
|
+
- `docs/plans/**/coordination.md`:batch 規劃存在時的 landing order 與分支映射依據。
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: open-source-pr-workflow
|
|
3
|
-
description: PR-focused workflow for open-source repositories. Use when the user asks to prepare a PR branch from existing changes, draft/open/update a PR, or push a ready contribution branch. Do not use this skill for implementing product features or editing business logic; use it after code changes are already prepared. Enforce branch naming as codex/{change_type}/{changes}, open PRs directly by default without waiting for draft confirmation, show drafts only when the user explicitly asks to review them first, default forked repositories to open PRs against the upstream parent repository unless the user explicitly requests the fork, and write PR content in English by default with required sections for related issues or motivation, engineering decisions with rationale, and test results with commands. For code-affecting changes, run
|
|
3
|
+
description: PR-focused workflow for open-source repositories. Use when the user asks to prepare a PR branch from existing changes, draft/open/update a PR, or push a ready contribution branch. Do not use this skill for implementing product features or editing business logic; use it after code changes are already prepared. Enforce branch naming as codex/{change_type}/{changes}, open PRs directly by default without waiting for draft confirmation, show drafts only when the user explicitly asks to review them first, default forked repositories to open PRs against the upstream parent repository unless the user explicitly requests the fork, and write PR content in English by default with required sections for related issues or motivation, engineering decisions with rationale, and test results with commands. For code-affecting changes, run code-simplifier before opening the PR.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Open Source PR Workflow
|
|
@@ -8,7 +8,7 @@ description: PR-focused workflow for open-source repositories. Use when the user
|
|
|
8
8
|
## Dependencies
|
|
9
9
|
|
|
10
10
|
- Required: **`commit-and-push`** before publishing the contribution branch (any remaining changes **MUST** be committed/readiness-checked through that skill; **push** only when the user requested remote update—then continue to PR steps).
|
|
11
|
-
- Conditional: `
|
|
11
|
+
- Conditional: `code-simplifier` for code-affecting PRs before opening the PR.
|
|
12
12
|
- Optional: none.
|
|
13
13
|
- Fallback: If **`commit-and-push`** or a **required** code-affecting dependency is unavailable, stop and report the missing dependency instead of bypassing the quality gate.
|
|
14
14
|
|
|
@@ -54,10 +54,7 @@ git checkout -b codex/fix/add-rate-limit-retry
|
|
|
54
54
|
|
|
55
55
|
### 4) Run dependent skills for code-affecting changes
|
|
56
56
|
|
|
57
|
-
- If the PR includes code changes, run `
|
|
58
|
-
- Resolve any confirmed findings before continuing.
|
|
59
|
-
- Then run `code-simplifier` on the updated changes.
|
|
60
|
-
- Keep both passes minimal and focused on the current PR scope.
|
|
57
|
+
- If the PR includes code changes, run `code-simplifier` before opening the PR.
|
|
61
58
|
- Use these skills as internal quality gates only; do not include skill/tool names in PR content.
|
|
62
59
|
- If the PR has no code changes, explicitly note that these two skills were not required in internal notes only.
|
|
63
60
|
|
|
@@ -118,7 +115,7 @@ If tests cannot run locally, state why and provide the closest available validat
|
|
|
118
115
|
- If the user asked to review the draft, they confirmed the final draft before PR creation.
|
|
119
116
|
- If the repository is a fork, PR destination is the upstream parent unless the user explicitly requested the fork.
|
|
120
117
|
- PR body includes all required sections and focuses only on PR-related context.
|
|
121
|
-
- If code changes exist, run `
|
|
118
|
+
- If code changes exist, run `code-simplifier` before opening the PR.
|
|
122
119
|
- PR body does not mention internal skills/tools or agent workflow notes.
|
|
123
120
|
- Test commands and results are explicitly listed.
|
|
124
121
|
- Language defaults to English unless user requests otherwise.
|
package/optimise-skill/SKILL.md
CHANGED
|
@@ -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
|
|
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,20 @@
|
|
|
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
|
+
並非所有技能都需要範例。只有非常複雜的任務需要通過範例提示來確保 agent 理解工作流程。
|
|
29
30
|
|
|
30
31
|
**建議實踐**:
|
|
31
32
|
用一個用於優化提示詞技能的技能作為示例:
|
|
32
|
-
- "一個專注在提示LLM agent
|
|
33
|
+
- "一個專注在提示LLM agent進行自我迭代,並為repo帶來性能優化的技能需要被優化" -> "定義驗收條件為優化後性能相較優化前至少提升X個百分比,並且項目之中不存在任何O(n^2)級別時間複雜度的函式和邏輯,並按照標準架構重寫技能。"
|
|
33
34
|
- "一個有大量前端開發範例被包含在 `SKILL.md` 之中的前端開發技能需要被優化" -> "定義驗收條件為前端頁面 `reference` 之中提供的大量建議範例重寫且不包含任何建議示例之中明確拒絕的設計,然後按照技能優化流程對技能進行全面的重寫。"
|
|
34
35
|
|
|
35
36
|
**錯誤實踐**:
|