@laitszkin/apollo-toolkit 4.0.11 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +37 -27
- package/CHANGELOG.md +31 -0
- package/CLAUDE.md +37 -27
- package/README.md +15 -2
- package/assets/spec/rg13-1780435029246/test-questions.json +1 -0
- package/assets/spec/rg13-1780468345132/test-questions.json +1 -0
- package/package.json +3 -3
- package/packages/cli/dist/tool-registration.js +1 -0
- package/packages/cli/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/cli/tool-registration.ts +1 -0
- package/packages/tools/architecture/dist/index.js +539 -2
- package/packages/tools/architecture/dist/index.test.d.ts +1 -0
- package/packages/tools/architecture/dist/index.test.js +229 -0
- package/packages/tools/architecture/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/tools/architecture/index.test.ts +329 -0
- package/packages/tools/architecture/index.ts +607 -5
- package/packages/tools/codegraph/dist/index.d.ts +3 -0
- package/packages/tools/codegraph/dist/index.js +157 -0
- package/packages/tools/codegraph/dist/lib/cg-instance.d.ts +29 -0
- package/packages/tools/codegraph/dist/lib/cg-instance.js +59 -0
- package/packages/tools/codegraph/dist/lib/cg-instance.test.d.ts +1 -0
- package/packages/tools/codegraph/dist/lib/cg-instance.test.js +27 -0
- package/packages/tools/codegraph/dist/lib/cmd-explore.d.ts +5 -0
- package/packages/tools/codegraph/dist/lib/cmd-explore.js +95 -0
- package/packages/tools/codegraph/dist/lib/cmd-explore.test.d.ts +1 -0
- package/packages/tools/codegraph/dist/lib/cmd-explore.test.js +133 -0
- package/packages/tools/codegraph/dist/lib/cmd-flag-splice.test.d.ts +1 -0
- package/packages/tools/codegraph/dist/lib/cmd-flag-splice.test.js +83 -0
- package/packages/tools/codegraph/dist/lib/cmd-init.d.ts +5 -0
- package/packages/tools/codegraph/dist/lib/cmd-init.js +50 -0
- package/packages/tools/codegraph/dist/lib/cmd-init.test.d.ts +1 -0
- package/packages/tools/codegraph/dist/lib/cmd-init.test.js +51 -0
- package/packages/tools/codegraph/dist/lib/cmd-list-apis.d.ts +5 -0
- package/packages/tools/codegraph/dist/lib/cmd-list-apis.js +64 -0
- package/packages/tools/codegraph/dist/lib/cmd-list-apis.test.d.ts +1 -0
- package/packages/tools/codegraph/dist/lib/cmd-list-apis.test.js +69 -0
- package/packages/tools/codegraph/dist/lib/cmd-search.d.ts +5 -0
- package/packages/tools/codegraph/dist/lib/cmd-search.js +21 -0
- package/packages/tools/codegraph/dist/lib/cmd-search.test.d.ts +1 -0
- package/packages/tools/codegraph/dist/lib/cmd-search.test.js +30 -0
- package/packages/tools/codegraph/dist/lib/cmd-status.d.ts +4 -0
- package/packages/tools/codegraph/dist/lib/cmd-status.js +44 -0
- package/packages/tools/codegraph/dist/lib/cmd-status.test.d.ts +1 -0
- package/packages/tools/codegraph/dist/lib/cmd-status.test.js +72 -0
- package/packages/tools/codegraph/dist/lib/cmd-survey.d.ts +36 -0
- package/packages/tools/codegraph/dist/lib/cmd-survey.js +142 -0
- package/packages/tools/codegraph/dist/lib/cmd-survey.test.d.ts +1 -0
- package/packages/tools/codegraph/dist/lib/cmd-survey.test.js +136 -0
- package/packages/tools/codegraph/dist/lib/cmd-sync.d.ts +4 -0
- package/packages/tools/codegraph/dist/lib/cmd-sync.js +51 -0
- package/packages/tools/codegraph/dist/lib/cmd-sync.test.d.ts +1 -0
- package/packages/tools/codegraph/dist/lib/cmd-sync.test.js +30 -0
- package/packages/tools/codegraph/dist/lib/cmd-verify.d.ts +4 -0
- package/packages/tools/codegraph/dist/lib/cmd-verify.js +134 -0
- package/packages/tools/codegraph/dist/lib/cmd-verify.test.d.ts +1 -0
- package/packages/tools/codegraph/dist/lib/cmd-verify.test.js +139 -0
- package/packages/tools/codegraph/dist/lib/formatter.d.ts +67 -0
- package/packages/tools/codegraph/dist/lib/formatter.js +107 -0
- package/packages/tools/codegraph/dist/lib/formatter.test.d.ts +1 -0
- package/packages/tools/codegraph/dist/lib/formatter.test.js +41 -0
- package/packages/tools/codegraph/dist/lib/survey/grouper.d.ts +19 -0
- package/packages/tools/codegraph/dist/lib/survey/grouper.js +194 -0
- package/packages/tools/codegraph/dist/lib/survey/grouper.test.d.ts +1 -0
- package/packages/tools/codegraph/dist/lib/survey/grouper.test.js +62 -0
- package/packages/tools/codegraph/dist/lib/survey/scanner.d.ts +31 -0
- package/packages/tools/codegraph/dist/lib/survey/scanner.js +50 -0
- package/packages/tools/codegraph/dist/lib/verify/checker.d.ts +32 -0
- package/packages/tools/codegraph/dist/lib/verify/checker.js +146 -0
- package/packages/tools/codegraph/dist/lib/verify/checker.test.d.ts +1 -0
- package/packages/tools/codegraph/dist/lib/verify/checker.test.js +128 -0
- package/packages/tools/codegraph/dist/tsconfig.tsbuildinfo +1 -0
- package/packages/tools/codegraph/env.d.ts +56 -0
- package/packages/tools/codegraph/index.ts +173 -0
- package/packages/tools/codegraph/lib/cg-instance.test.ts +36 -0
- package/packages/tools/codegraph/lib/cg-instance.ts +66 -0
- package/packages/tools/codegraph/lib/cmd-explore.test.ts +195 -0
- package/packages/tools/codegraph/lib/cmd-explore.ts +129 -0
- package/packages/tools/codegraph/lib/cmd-flag-splice.test.ts +94 -0
- package/packages/tools/codegraph/lib/cmd-init.test.ts +68 -0
- package/packages/tools/codegraph/lib/cmd-init.ts +60 -0
- package/packages/tools/codegraph/lib/cmd-list-apis.test.ts +80 -0
- package/packages/tools/codegraph/lib/cmd-list-apis.ts +90 -0
- package/packages/tools/codegraph/lib/cmd-search.test.ts +37 -0
- package/packages/tools/codegraph/lib/cmd-search.ts +32 -0
- package/packages/tools/codegraph/lib/cmd-status.test.ts +86 -0
- package/packages/tools/codegraph/lib/cmd-status.ts +53 -0
- package/packages/tools/codegraph/lib/cmd-survey.test.ts +161 -0
- package/packages/tools/codegraph/lib/cmd-survey.ts +199 -0
- package/packages/tools/codegraph/lib/cmd-sync.test.ts +41 -0
- package/packages/tools/codegraph/lib/cmd-sync.ts +62 -0
- package/packages/tools/codegraph/lib/cmd-verify.test.ts +162 -0
- package/packages/tools/codegraph/lib/cmd-verify.ts +145 -0
- package/packages/tools/codegraph/lib/formatter.test.ts +47 -0
- package/packages/tools/codegraph/lib/formatter.ts +130 -0
- package/packages/tools/codegraph/lib/survey/grouper.test.ts +72 -0
- package/packages/tools/codegraph/lib/survey/grouper.ts +226 -0
- package/packages/tools/codegraph/lib/survey/scanner.ts +89 -0
- package/packages/tools/codegraph/lib/verify/checker.test.ts +140 -0
- package/packages/tools/codegraph/lib/verify/checker.ts +172 -0
- package/packages/tools/codegraph/package.json +23 -0
- package/packages/tools/codegraph/tsconfig.json +22 -0
- package/resources/project-architecture/atlas/atlas.history.log +32 -0
- package/resources/project-architecture/atlas/atlas.history.undo.json +356 -28
- package/resources/project-architecture/atlas/atlas.history.undo.stack.json +14350 -0
- package/resources/project-architecture/atlas/atlas.index.yaml +76 -12
- package/resources/project-architecture/atlas/features/codegraph.yaml +95 -0
- package/resources/project-architecture/atlas/features/eval-ci-gate.yaml +6 -1
- package/resources/project-architecture/atlas/features/eval-cli.yaml +16 -1
- package/resources/project-architecture/atlas/features/eval-executor.yaml +12 -2
- package/resources/project-architecture/atlas/features/eval-isolation.yaml +6 -1
- package/resources/project-architecture/atlas/features/eval-optimizer.yaml +17 -2
- package/resources/project-architecture/atlas/features/eval-question.yaml +12 -2
- package/resources/project-architecture/atlas/features/eval-reporter.yaml +6 -1
- package/resources/project-architecture/atlas/features/eval-scorer.yaml +12 -2
- package/resources/project-architecture/features/codegraph/cg-discovery.html +47 -0
- package/resources/project-architecture/features/codegraph/cg-lifecycle.html +48 -0
- package/resources/project-architecture/features/codegraph/cg-validation.html +47 -0
- package/resources/project-architecture/features/codegraph/index.html +58 -0
- package/resources/project-architecture/features/eval-ci-gate/workflow-trigger.html +6 -1
- package/resources/project-architecture/features/eval-cli/cli-handler.html +8 -1
- package/resources/project-architecture/features/eval-executor/exec-api-client.html +6 -1
- package/resources/project-architecture/features/eval-executor/trace-recorder.html +6 -1
- package/resources/project-architecture/features/eval-isolation/tool-dispatcher.html +6 -1
- package/resources/project-architecture/features/eval-optimizer/dedup-engine.html +6 -1
- package/resources/project-architecture/features/eval-optimizer/issue-extractor.html +7 -1
- package/resources/project-architecture/features/eval-question/question-loader.html +6 -1
- package/resources/project-architecture/features/eval-question/variant-generator.html +6 -1
- package/resources/project-architecture/features/eval-reporter/report-composer.html +6 -1
- package/resources/project-architecture/features/eval-scorer/judge-api-client.html +6 -1
- package/resources/project-architecture/features/eval-scorer/judge-prompt-builder.html +6 -1
- package/resources/project-architecture/index.html +200 -94
- package/skills/design/SKILL.md +33 -0
- package/skills/init-project-html/SKILL.md +12 -11
- package/tsconfig.json +1 -0
package/skills/design/SKILL.md
CHANGED
|
@@ -167,6 +167,10 @@ Each component should link to:
|
|
|
167
167
|
|
|
168
168
|
#### 5e. Generate the Diff and Validate
|
|
169
169
|
|
|
170
|
+
Two alternative workflows — use the **Classic flow** when `codegraph` is not installed, or the **CodeGraph-integrated flow** when it is available.
|
|
171
|
+
|
|
172
|
+
**Classic flow** (manual):
|
|
173
|
+
|
|
170
174
|
```bash
|
|
171
175
|
apltk architecture --spec <spec_dir> render
|
|
172
176
|
apltk architecture --spec <spec_dir> validate
|
|
@@ -178,6 +182,35 @@ Confirm validation passes, then use the diff command to produce a visual compari
|
|
|
178
182
|
apltk architecture diff
|
|
179
183
|
```
|
|
180
184
|
|
|
185
|
+
**New flow (CodeGraph-integrated):**
|
|
186
|
+
|
|
187
|
+
1. **Survey the existing API landscape**:
|
|
188
|
+
```bash
|
|
189
|
+
apltk codegraph list-apis --all
|
|
190
|
+
```
|
|
191
|
+
This returns the full project API directory (function names, file paths, callers) as a reference for integration points. Use this data to understand what existing modules, services, and functions your new feature will interact with.
|
|
192
|
+
|
|
193
|
+
2. **Fill the proposal skeleton**: Based on your design decisions from steps 5a-5d,
|
|
194
|
+
fill in the `proposal.yaml` file generated by `apltk architecture template`.
|
|
195
|
+
Define the feature, its submodules, their functions, and cross-feature edges.
|
|
196
|
+
|
|
197
|
+
3. **Apply batch mutations**:
|
|
198
|
+
```bash
|
|
199
|
+
apltk architecture apply <spec_dir>/architecture_diff/atlas/proposal.yaml --spec <spec_dir>
|
|
200
|
+
```
|
|
201
|
+
This processes all mutations in one call with undo protection.
|
|
202
|
+
|
|
203
|
+
4. **Verify correctness**:
|
|
204
|
+
```bash
|
|
205
|
+
apltk codegraph verify --spec <spec_dir>
|
|
206
|
+
```
|
|
207
|
+
This confirms every symbol and edge reference in the spec overlay exists in the actual code.
|
|
208
|
+
|
|
209
|
+
5. **Render and validate** (optional, for visual confirmation):
|
|
210
|
+
```bash
|
|
211
|
+
apltk architecture diff --spec <spec_dir>
|
|
212
|
+
```
|
|
213
|
+
|
|
181
214
|
**Single spec**: Produce one Architecture Diff for one SPEC.md.
|
|
182
215
|
**Batch spec**: Produce **one** unified Architecture Diff covering all SPEC.md files in the batch.
|
|
183
216
|
|
|
@@ -52,7 +52,7 @@ At load time, check the project state to select the correct mode:
|
|
|
52
52
|
|
|
53
53
|
適用模式:design(完整初始化)、record(快速記錄)
|
|
54
54
|
|
|
55
|
-
### 1.
|
|
55
|
+
### 1. 使用 codegraph survey 取得專案結構
|
|
56
56
|
|
|
57
57
|
在深入程式碼前,先建立系統的宏觀認知:
|
|
58
58
|
- 系統與哪些外部 actor 互動(使用者、第三方服務、其他系統)
|
|
@@ -60,18 +60,18 @@ At load time, check the project state to select the correct mode:
|
|
|
60
60
|
|
|
61
61
|
然後閱讀 `sample-demo/` 了解預期的輸出格式與抽象層級。
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
接著使用 `apltk codegraph survey` 取得專案的結構化調查報告:
|
|
64
|
+
- 專案目錄下的所有檔案清單與函式數量
|
|
65
|
+
- Entry points(被外部檔案呼叫的公開函式)
|
|
66
|
+
- 建議的 submodule 分組與跨邊界 edge
|
|
67
|
+
- 支援 `--json` 輸出供 LLM 程式化消費
|
|
66
68
|
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
69
|
+
根據 survey 報告,決定功能模塊的劃分(對應 C4 Container 層級):
|
|
70
|
+
- 將高度互相呼叫的函式群歸類為同一功能模塊的子模塊
|
|
71
|
+
- 識別功能模塊之間的邊界與跨模塊呼叫關係
|
|
72
|
+
- 記錄每個功能模塊對應的目錄路徑與 entry point
|
|
71
73
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
### 2. 使用 `apltk` cli 工具協助生成架構圖
|
|
74
|
+
### 2. 使用 `apltk architecture apply` 批次寫入 atlas
|
|
75
75
|
|
|
76
76
|
依照 C4 層級逐步產生:
|
|
77
77
|
在操作 CLI 前先閱讀 `references/architecture.md` 了解所有參數與 mutation 系列的使用方式。
|
|
@@ -81,6 +81,7 @@ At load time, check the project state to select the correct mode:
|
|
|
81
81
|
3. **Component 層級**:定義子模塊(submodule)及其內部元素(function、variable、dataflow、error)
|
|
82
82
|
4. **Code 層級**(選擇性):對關鍵路徑補充函式層級細節
|
|
83
83
|
|
|
84
|
+
使用 `apltk architecture apply <proposal.yaml>` 進行批次 atlas 寫入(取代逐一手動 mutation)。
|
|
84
85
|
將前一步獲取的代碼庫知識透過 CLI 工具轉化為清晰的架構圖。
|
|
85
86
|
完成後驗證架構圖格式正確且可渲染。
|
|
86
87
|
|
package/tsconfig.json
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
{ "path": "packages/tool-utils" },
|
|
22
22
|
{ "path": "packages/cli" },
|
|
23
23
|
{ "path": "packages/tools/architecture" },
|
|
24
|
+
{ "path": "packages/tools/codegraph" },
|
|
24
25
|
{ "path": "packages/tools/eval" },
|
|
25
26
|
{ "path": "packages/tools/create-review-report" },
|
|
26
27
|
{ "path": "packages/tools/create-specs" },
|