@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.
Files changed (134) hide show
  1. package/AGENTS.md +37 -27
  2. package/CHANGELOG.md +31 -0
  3. package/CLAUDE.md +37 -27
  4. package/README.md +15 -2
  5. package/assets/spec/rg13-1780435029246/test-questions.json +1 -0
  6. package/assets/spec/rg13-1780468345132/test-questions.json +1 -0
  7. package/package.json +3 -3
  8. package/packages/cli/dist/tool-registration.js +1 -0
  9. package/packages/cli/dist/tsconfig.tsbuildinfo +1 -1
  10. package/packages/cli/tool-registration.ts +1 -0
  11. package/packages/tools/architecture/dist/index.js +539 -2
  12. package/packages/tools/architecture/dist/index.test.d.ts +1 -0
  13. package/packages/tools/architecture/dist/index.test.js +229 -0
  14. package/packages/tools/architecture/dist/tsconfig.tsbuildinfo +1 -1
  15. package/packages/tools/architecture/index.test.ts +329 -0
  16. package/packages/tools/architecture/index.ts +607 -5
  17. package/packages/tools/codegraph/dist/index.d.ts +3 -0
  18. package/packages/tools/codegraph/dist/index.js +157 -0
  19. package/packages/tools/codegraph/dist/lib/cg-instance.d.ts +29 -0
  20. package/packages/tools/codegraph/dist/lib/cg-instance.js +59 -0
  21. package/packages/tools/codegraph/dist/lib/cg-instance.test.d.ts +1 -0
  22. package/packages/tools/codegraph/dist/lib/cg-instance.test.js +27 -0
  23. package/packages/tools/codegraph/dist/lib/cmd-explore.d.ts +5 -0
  24. package/packages/tools/codegraph/dist/lib/cmd-explore.js +95 -0
  25. package/packages/tools/codegraph/dist/lib/cmd-explore.test.d.ts +1 -0
  26. package/packages/tools/codegraph/dist/lib/cmd-explore.test.js +133 -0
  27. package/packages/tools/codegraph/dist/lib/cmd-flag-splice.test.d.ts +1 -0
  28. package/packages/tools/codegraph/dist/lib/cmd-flag-splice.test.js +83 -0
  29. package/packages/tools/codegraph/dist/lib/cmd-init.d.ts +5 -0
  30. package/packages/tools/codegraph/dist/lib/cmd-init.js +50 -0
  31. package/packages/tools/codegraph/dist/lib/cmd-init.test.d.ts +1 -0
  32. package/packages/tools/codegraph/dist/lib/cmd-init.test.js +51 -0
  33. package/packages/tools/codegraph/dist/lib/cmd-list-apis.d.ts +5 -0
  34. package/packages/tools/codegraph/dist/lib/cmd-list-apis.js +64 -0
  35. package/packages/tools/codegraph/dist/lib/cmd-list-apis.test.d.ts +1 -0
  36. package/packages/tools/codegraph/dist/lib/cmd-list-apis.test.js +69 -0
  37. package/packages/tools/codegraph/dist/lib/cmd-search.d.ts +5 -0
  38. package/packages/tools/codegraph/dist/lib/cmd-search.js +21 -0
  39. package/packages/tools/codegraph/dist/lib/cmd-search.test.d.ts +1 -0
  40. package/packages/tools/codegraph/dist/lib/cmd-search.test.js +30 -0
  41. package/packages/tools/codegraph/dist/lib/cmd-status.d.ts +4 -0
  42. package/packages/tools/codegraph/dist/lib/cmd-status.js +44 -0
  43. package/packages/tools/codegraph/dist/lib/cmd-status.test.d.ts +1 -0
  44. package/packages/tools/codegraph/dist/lib/cmd-status.test.js +72 -0
  45. package/packages/tools/codegraph/dist/lib/cmd-survey.d.ts +36 -0
  46. package/packages/tools/codegraph/dist/lib/cmd-survey.js +142 -0
  47. package/packages/tools/codegraph/dist/lib/cmd-survey.test.d.ts +1 -0
  48. package/packages/tools/codegraph/dist/lib/cmd-survey.test.js +136 -0
  49. package/packages/tools/codegraph/dist/lib/cmd-sync.d.ts +4 -0
  50. package/packages/tools/codegraph/dist/lib/cmd-sync.js +51 -0
  51. package/packages/tools/codegraph/dist/lib/cmd-sync.test.d.ts +1 -0
  52. package/packages/tools/codegraph/dist/lib/cmd-sync.test.js +30 -0
  53. package/packages/tools/codegraph/dist/lib/cmd-verify.d.ts +4 -0
  54. package/packages/tools/codegraph/dist/lib/cmd-verify.js +134 -0
  55. package/packages/tools/codegraph/dist/lib/cmd-verify.test.d.ts +1 -0
  56. package/packages/tools/codegraph/dist/lib/cmd-verify.test.js +139 -0
  57. package/packages/tools/codegraph/dist/lib/formatter.d.ts +67 -0
  58. package/packages/tools/codegraph/dist/lib/formatter.js +107 -0
  59. package/packages/tools/codegraph/dist/lib/formatter.test.d.ts +1 -0
  60. package/packages/tools/codegraph/dist/lib/formatter.test.js +41 -0
  61. package/packages/tools/codegraph/dist/lib/survey/grouper.d.ts +19 -0
  62. package/packages/tools/codegraph/dist/lib/survey/grouper.js +194 -0
  63. package/packages/tools/codegraph/dist/lib/survey/grouper.test.d.ts +1 -0
  64. package/packages/tools/codegraph/dist/lib/survey/grouper.test.js +62 -0
  65. package/packages/tools/codegraph/dist/lib/survey/scanner.d.ts +31 -0
  66. package/packages/tools/codegraph/dist/lib/survey/scanner.js +50 -0
  67. package/packages/tools/codegraph/dist/lib/verify/checker.d.ts +32 -0
  68. package/packages/tools/codegraph/dist/lib/verify/checker.js +146 -0
  69. package/packages/tools/codegraph/dist/lib/verify/checker.test.d.ts +1 -0
  70. package/packages/tools/codegraph/dist/lib/verify/checker.test.js +128 -0
  71. package/packages/tools/codegraph/dist/tsconfig.tsbuildinfo +1 -0
  72. package/packages/tools/codegraph/env.d.ts +56 -0
  73. package/packages/tools/codegraph/index.ts +173 -0
  74. package/packages/tools/codegraph/lib/cg-instance.test.ts +36 -0
  75. package/packages/tools/codegraph/lib/cg-instance.ts +66 -0
  76. package/packages/tools/codegraph/lib/cmd-explore.test.ts +195 -0
  77. package/packages/tools/codegraph/lib/cmd-explore.ts +129 -0
  78. package/packages/tools/codegraph/lib/cmd-flag-splice.test.ts +94 -0
  79. package/packages/tools/codegraph/lib/cmd-init.test.ts +68 -0
  80. package/packages/tools/codegraph/lib/cmd-init.ts +60 -0
  81. package/packages/tools/codegraph/lib/cmd-list-apis.test.ts +80 -0
  82. package/packages/tools/codegraph/lib/cmd-list-apis.ts +90 -0
  83. package/packages/tools/codegraph/lib/cmd-search.test.ts +37 -0
  84. package/packages/tools/codegraph/lib/cmd-search.ts +32 -0
  85. package/packages/tools/codegraph/lib/cmd-status.test.ts +86 -0
  86. package/packages/tools/codegraph/lib/cmd-status.ts +53 -0
  87. package/packages/tools/codegraph/lib/cmd-survey.test.ts +161 -0
  88. package/packages/tools/codegraph/lib/cmd-survey.ts +199 -0
  89. package/packages/tools/codegraph/lib/cmd-sync.test.ts +41 -0
  90. package/packages/tools/codegraph/lib/cmd-sync.ts +62 -0
  91. package/packages/tools/codegraph/lib/cmd-verify.test.ts +162 -0
  92. package/packages/tools/codegraph/lib/cmd-verify.ts +145 -0
  93. package/packages/tools/codegraph/lib/formatter.test.ts +47 -0
  94. package/packages/tools/codegraph/lib/formatter.ts +130 -0
  95. package/packages/tools/codegraph/lib/survey/grouper.test.ts +72 -0
  96. package/packages/tools/codegraph/lib/survey/grouper.ts +226 -0
  97. package/packages/tools/codegraph/lib/survey/scanner.ts +89 -0
  98. package/packages/tools/codegraph/lib/verify/checker.test.ts +140 -0
  99. package/packages/tools/codegraph/lib/verify/checker.ts +172 -0
  100. package/packages/tools/codegraph/package.json +23 -0
  101. package/packages/tools/codegraph/tsconfig.json +22 -0
  102. package/resources/project-architecture/atlas/atlas.history.log +32 -0
  103. package/resources/project-architecture/atlas/atlas.history.undo.json +356 -28
  104. package/resources/project-architecture/atlas/atlas.history.undo.stack.json +14350 -0
  105. package/resources/project-architecture/atlas/atlas.index.yaml +76 -12
  106. package/resources/project-architecture/atlas/features/codegraph.yaml +95 -0
  107. package/resources/project-architecture/atlas/features/eval-ci-gate.yaml +6 -1
  108. package/resources/project-architecture/atlas/features/eval-cli.yaml +16 -1
  109. package/resources/project-architecture/atlas/features/eval-executor.yaml +12 -2
  110. package/resources/project-architecture/atlas/features/eval-isolation.yaml +6 -1
  111. package/resources/project-architecture/atlas/features/eval-optimizer.yaml +17 -2
  112. package/resources/project-architecture/atlas/features/eval-question.yaml +12 -2
  113. package/resources/project-architecture/atlas/features/eval-reporter.yaml +6 -1
  114. package/resources/project-architecture/atlas/features/eval-scorer.yaml +12 -2
  115. package/resources/project-architecture/features/codegraph/cg-discovery.html +47 -0
  116. package/resources/project-architecture/features/codegraph/cg-lifecycle.html +48 -0
  117. package/resources/project-architecture/features/codegraph/cg-validation.html +47 -0
  118. package/resources/project-architecture/features/codegraph/index.html +58 -0
  119. package/resources/project-architecture/features/eval-ci-gate/workflow-trigger.html +6 -1
  120. package/resources/project-architecture/features/eval-cli/cli-handler.html +8 -1
  121. package/resources/project-architecture/features/eval-executor/exec-api-client.html +6 -1
  122. package/resources/project-architecture/features/eval-executor/trace-recorder.html +6 -1
  123. package/resources/project-architecture/features/eval-isolation/tool-dispatcher.html +6 -1
  124. package/resources/project-architecture/features/eval-optimizer/dedup-engine.html +6 -1
  125. package/resources/project-architecture/features/eval-optimizer/issue-extractor.html +7 -1
  126. package/resources/project-architecture/features/eval-question/question-loader.html +6 -1
  127. package/resources/project-architecture/features/eval-question/variant-generator.html +6 -1
  128. package/resources/project-architecture/features/eval-reporter/report-composer.html +6 -1
  129. package/resources/project-architecture/features/eval-scorer/judge-api-client.html +6 -1
  130. package/resources/project-architecture/features/eval-scorer/judge-prompt-builder.html +6 -1
  131. package/resources/project-architecture/index.html +200 -94
  132. package/skills/design/SKILL.md +33 -0
  133. package/skills/init-project-html/SKILL.md +12 -11
  134. package/tsconfig.json +1 -0
@@ -1,7 +1,11 @@
1
1
  meta:
2
- title: Project architecture
3
- summary: ''
4
- updatedAt: '2026-05-29T13:27:30.595Z'
2
+ title: Project architecture (+ codegraph integration overlay)
3
+ summary: >
4
+ 完整 C4 架構圖:eval 評測系統 (8 features) + codegraph 程式碼分析 (1 feature, 3 submodules)。
5
+ 外部 actor: Judge Model API, GitHub Actions CI, Developer, Skill Files,
6
+ @colbymchenry/codegraph (npm), @laitszkin/tool-registry, @laitszkin/tui。
7
+ Eval 管線包含完整資料流: CLI → Executor → Scorer → Reporter → CI Gate。
8
+ updatedAt: '2026-06-03T13:18:57.448Z'
5
9
  actors:
6
10
  - id: judge-model-api
7
11
  label: Judge Model API
@@ -11,7 +15,14 @@ actors:
11
15
  label: Developer
12
16
  - id: skill-files
13
17
  label: Skill Files (SKILL.md, scripts/, references/, assets/)
18
+ - id: codegraph-npm
19
+ label: '@colbymchenry/codegraph npm package'
20
+ - id: tool-registry
21
+ label: Tool Registry (@laitszkin/tool-registry)
22
+ - id: tui-lib
23
+ label: TUI Library (@laitszkin/tui)
14
24
  features:
25
+ - codegraph
15
26
  - eval-optimizer
16
27
  - eval-cli
17
28
  - eval-ci-gate
@@ -21,24 +32,77 @@ features:
21
32
  - eval-scorer
22
33
  - eval-reporter
23
34
  edges:
24
- - id: e-101
35
+ - id: cg-e-001
25
36
  from:
26
- feature: eval-cli
37
+ feature: codegraph
38
+ submodule: cg-lifecycle
27
39
  to:
28
- feature: eval-optimizer
40
+ feature: codegraph
41
+ submodule: cg-discovery
42
+ kind: data-row
43
+ label: survey/list-apis 依賴已索引的資料庫
44
+ - id: cg-e-002
45
+ from:
46
+ feature: codegraph
47
+ submodule: cg-discovery
48
+ to:
49
+ feature: codegraph
50
+ submodule: cg-validation
51
+ kind: data-row
52
+ label: verify 使用 discovery 的搜尋能力
53
+ - id: cg-e-003
54
+ from:
55
+ feature: codegraph
56
+ submodule: cg-lifecycle
57
+ to:
58
+ feature: eval-cli
29
59
  kind: call
30
- label: trigger optimization after scoring
31
- - id: e-102
60
+ label: codegraph init --index 與 eval-cli 共用 CLI 工具基礎架構
61
+ - id: eval-cli-exec
32
62
  from:
33
63
  feature: eval-cli
64
+ submodule: cli-handler
65
+ to:
66
+ feature: eval-executor
67
+ submodule: trace-recorder
68
+ kind: call
69
+ label: evalHandler 觸發 runSingleTest
70
+ - id: eval-exec-iso
71
+ from:
72
+ feature: eval-executor
73
+ submodule: trace-recorder
34
74
  to:
35
75
  feature: eval-isolation
76
+ submodule: tool-dispatcher
36
77
  kind: call
37
- label: setup tool mock + context isolation
38
- - id: e-103
78
+ label: 執行隔離環境中的工具調用
79
+ - id: eval-exec-scorer
39
80
  from:
40
- feature: eval-ci-gate
81
+ feature: eval-executor
82
+ submodule: trace-recorder
83
+ to:
84
+ feature: eval-scorer
85
+ submodule: judge-prompt-builder
86
+ kind: data-row
87
+ label: trace events 送入評分
88
+ - id: eval-scorer-reporter
89
+ from:
90
+ feature: eval-scorer
91
+ to:
92
+ feature: eval-reporter
93
+ kind: data-row
94
+ label: ScoreResult 送入報告組合
95
+ - id: eval-exec-optimizer
96
+ from:
97
+ feature: eval-executor
41
98
  to:
99
+ feature: eval-optimizer
100
+ kind: data-row
101
+ label: 執行結果觸發優化
102
+ - id: eval-cli-ci
103
+ from:
42
104
  feature: eval-cli
105
+ to:
106
+ feature: eval-ci-gate
43
107
  kind: call
44
- label: invoke apltk eval --mode standard
108
+ label: CI 模式下觸發 PR 回報
@@ -0,0 +1,95 @@
1
+ slug: codegraph
2
+ title: CodeGraph Integration
3
+ story: >
4
+ Provide LLM agents with deterministic code structure data through apltk CLI. Replaces manual
5
+ grep/Read discovery with tree-sitter parsed knowledge graph queries.
6
+ dependsOn:
7
+ - eval-cli
8
+ submodules:
9
+ - slug: cg-lifecycle
10
+ kind: service
11
+ role: Manage CodeGraph index lifecycle — init, sync, status, search
12
+ functions:
13
+ - name: init
14
+ in: 'projectRoot: string'
15
+ out: CodeGraph instance
16
+ side: io
17
+ purpose: Initialize .codegraph/ directory and optionally run full index
18
+ - name: sync
19
+ in: 'projectRoot: string'
20
+ out: SyncResult
21
+ side: io
22
+ purpose: Incremental update of existing index
23
+ - name: status
24
+ in: 'projectRoot: string'
25
+ out: GraphStats
26
+ side: pure
27
+ purpose: Query index statistics
28
+ - name: search
29
+ in: 'query: string'
30
+ out: SearchResult[]
31
+ side: pure
32
+ purpose: Full-text symbol search via FTS5
33
+ variables: []
34
+ dataflow: []
35
+ errors: []
36
+ - slug: cg-discovery
37
+ kind: service
38
+ role: Explore and survey code structure — explore, survey, list-apis
39
+ functions:
40
+ - name: explore
41
+ in: 'query: string'
42
+ out: Context (source grouped by file + relationship map)
43
+ side: pure
44
+ purpose: Get full context for symbols matching a query
45
+ - name: survey
46
+ in: 'dirPath: string'
47
+ out: SurveyReport (submodule suggestions + edge suggestions)
48
+ side: pure
49
+ purpose: Survey a directory and produce atlas-compatible structure report
50
+ - name: listApis
51
+ in: 'featureSlug: string'
52
+ out: APIDirectory (public functions + params + callers)
53
+ side: pure
54
+ purpose: List public API surface of a feature area
55
+ variables: []
56
+ dataflow: []
57
+ errors: []
58
+ - slug: cg-validation
59
+ kind: service
60
+ role: Verify architecture proposals and batch-apply atlas mutations
61
+ functions:
62
+ - name: verify
63
+ in: 'specOverlayPath: string'
64
+ out: VerifyReport (passed/failed items)
65
+ side: pure
66
+ purpose: Validate that spec overlay references match actual code
67
+ - name: applyBatch
68
+ in: 'proposalYaml: string'
69
+ out: ApplyResult
70
+ side: io
71
+ purpose: Execute multiple atlas mutations from a single YAML file
72
+ - name: generateTemplate
73
+ in: 'specMdPath: string'
74
+ out: proposalYaml path
75
+ side: io
76
+ purpose: Generate empty proposal skeleton from SPEC.md
77
+ variables: []
78
+ dataflow: []
79
+ errors: []
80
+ edges:
81
+ - id: cg-fe-001
82
+ from: cg-lifecycle
83
+ to: cg-discovery
84
+ kind: data-row
85
+ label: survey/list-apis 依賴已索引的資料庫
86
+ - id: cg-fe-002
87
+ from: cg-discovery
88
+ to: cg-validation
89
+ kind: data-row
90
+ label: verify 使用 discovery 的搜尋能力
91
+ - id: cg-fe-003
92
+ from: cg-validation
93
+ to: cg-lifecycle
94
+ kind: data-row
95
+ label: apply 非索引操作,不需 lifecycle — 但 template 可搭配 list-apis
@@ -6,7 +6,12 @@ submodules:
6
6
  - slug: workflow-trigger
7
7
  kind: service
8
8
  role: GitHub Actions workflow on PR skill file change
9
- functions: []
9
+ functions:
10
+ - name: detectSkillChanges
11
+ in: prFiles
12
+ out: string[]
13
+ side: pure
14
+ purpose: 檢測 PR 中技能檔案變更
10
15
  variables: []
11
16
  dataflow: []
12
17
  errors: []
@@ -6,7 +6,22 @@ submodules:
6
6
  - slug: cli-handler
7
7
  kind: service
8
8
  role: ToolDefinition註冊、參數解析、流程編排
9
- functions: []
9
+ functions:
10
+ - name: evalHandler
11
+ in: argv, context
12
+ out: exitCode
13
+ side: pure
14
+ purpose: CLI 入口:解析參數、調度評測流程
15
+ - name: parseArgs
16
+ in: argv
17
+ out: ParsedArgs
18
+ side: pure
19
+ purpose: 解析 CLI 參數與模式選擇
20
+ - name: tool
21
+ in: ToolDefinition
22
+ out: void
23
+ side: pure
24
+ purpose: 向 tool-registry 註冊 eval 命令
10
25
  variables: []
11
26
  dataflow: []
12
27
  errors: []
@@ -6,14 +6,24 @@ submodules:
6
6
  - slug: trace-recorder
7
7
  kind: service
8
8
  role: 多輪tool-use loop軌跡記錄:tool_call/tool_result事件序列、JSONL行號標記、.done完成標記
9
- functions: []
9
+ functions:
10
+ - name: runSingleTest
11
+ in: question, skillDir
12
+ out: TraceEvent[]
13
+ side: pure
14
+ purpose: 執行單一技能測試,記錄 tool call 軌跡
10
15
  variables: []
11
16
  dataflow: []
12
17
  errors: []
13
18
  - slug: exec-api-client
14
19
  kind: api
15
20
  role: Exec Model HTTP client with retry
16
- functions: []
21
+ functions:
22
+ - name: withRetry
23
+ in: fn, options
24
+ out: Result
25
+ side: io
26
+ purpose: HTTP client with retry for exec model
17
27
  variables: []
18
28
  dataflow: []
19
29
  errors: []
@@ -6,7 +6,12 @@ submodules:
6
6
  - slug: tool-dispatcher
7
7
  kind: service
8
8
  role: 工具調用攔截系統:讀取工具在workspace內真實執行、寫入工具模擬回傳、路徑穿越防護
9
- functions: []
9
+ functions:
10
+ - name: buildSystemPrompt
11
+ in: question
12
+ out: string
13
+ side: pure
14
+ purpose: 建立隔離環境的 system prompt
10
15
  variables: []
11
16
  dataflow: []
12
17
  errors: []
@@ -6,14 +6,29 @@ submodules:
6
6
  - slug: issue-extractor
7
7
  kind: service
8
8
  role: 從score.json提取問題、分類統計
9
- functions: []
9
+ functions:
10
+ - name: extractIssues
11
+ in: scores
12
+ out: RawIssue[]
13
+ side: pure
14
+ purpose: 從 score.json 提取問題與分類統計
15
+ - name: generateOptimizationPlan
16
+ in: issues
17
+ out: OptimizationPlan
18
+ side: pure
19
+ purpose: 從去重後問題生成 FIND/REPLACE 優化 diff
10
20
  variables: []
11
21
  dataflow: []
12
22
  errors: []
13
23
  - slug: dedup-engine
14
24
  kind: service
15
25
  role: Jaccard+Judge語意去重
16
- functions: []
26
+ functions:
27
+ - name: deduplicateIssues
28
+ in: issues
29
+ out: DedupedIssue[]
30
+ side: pure
31
+ purpose: Jaccard+Judge 語意去重
17
32
  variables: []
18
33
  dataflow: []
19
34
  errors: []
@@ -6,14 +6,24 @@ submodules:
6
6
  - slug: question-loader
7
7
  kind: service
8
8
  role: 題目載入與JSON Schema驗證
9
- functions: []
9
+ functions:
10
+ - name: loadQuestions
11
+ in: specDir
12
+ out: Question[]
13
+ side: pure
14
+ purpose: 載入題目並進行 JSON Schema 驗證
10
15
  variables: []
11
16
  dataflow: []
12
17
  errors: []
13
18
  - slug: variant-generator
14
19
  kind: service
15
20
  role: LLM變體生成,保留評分標準
16
- functions: []
21
+ functions:
22
+ - name: generateVariants
23
+ in: questions, count
24
+ out: Question[]
25
+ side: io
26
+ purpose: LLM 變體生成,保留評分標準
17
27
  variables: []
18
28
  dataflow: []
19
29
  errors: []
@@ -6,7 +6,12 @@ submodules:
6
6
  - slug: report-composer
7
7
  kind: service
8
8
  role: Markdown報告組合與渲染
9
- functions: []
9
+ functions:
10
+ - name: generateReport
11
+ in: scores
12
+ out: string
13
+ side: pure
14
+ purpose: 彙總評分結果產出結構化 Markdown 報告
10
15
  variables: []
11
16
  dataflow: []
12
17
  errors: []
@@ -6,14 +6,24 @@ submodules:
6
6
  - slug: judge-prompt-builder
7
7
  kind: service
8
8
  role: 評分提示詞構建:trace事件摘要含JSONL行號(L{N})引用、三維度評分指示
9
- functions: []
9
+ functions:
10
+ - name: buildJudgePrompt
11
+ in: trace, scoreCriteria
12
+ out: string
13
+ side: pure
14
+ purpose: 將 trace 事件摘要轉為評分提示詞
10
15
  variables: []
11
16
  dataflow: []
12
17
  errors: []
13
18
  - slug: judge-api-client
14
19
  kind: api
15
20
  role: Judge Model HTTP client with parse fallback
16
- functions: []
21
+ functions:
22
+ - name: callJudgeModel
23
+ in: prompt, options
24
+ out: ScoreResult
25
+ side: io
26
+ purpose: 呼叫 Judge Model API 進行評分
17
27
  variables: []
18
28
  dataflow: []
19
29
  errors: []
@@ -0,0 +1,47 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-atlas-page="submodule">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>CodeGraph Integration · cg-discovery</title>
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <meta name="color-scheme" content="dark">
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..600;1,9..144,300..500&family=Geist:wght@300..700&family=JetBrains+Mono:wght@400..600&display=swap">
11
+ <link rel="stylesheet" href="../../assets/architecture.css">
12
+ </head>
13
+ <body>
14
+ <header class="submodule-header">
15
+ <nav class="submodule-breadcrumb"><a href="../../index.html">← Atlas</a> · <a href="index.html">← CodeGraph Integration</a></nav>
16
+ <h1>cg-discovery <small class="submodule-kind">Service</small></h1>
17
+ <p class="submodule-role">Explore and survey code structure — explore, survey, list-apis</p>
18
+
19
+ </header>
20
+ <main class="submodule-main">
21
+ <section aria-label="Function I/O">
22
+ <h2>Function I/O</h2>
23
+ <table class="sub-table">
24
+ <thead><tr><th scope="col">Name</th><th scope="col">In</th><th scope="col">Out</th><th scope="col">Side</th><th scope="col">Purpose</th></tr></thead>
25
+ <tbody>
26
+ <tr><td>explore</td><td>query: string</td><td>Context (source grouped by file + relationship map)</td><td>pure</td><td>Get full context for symbols matching a query</td></tr>
27
+ <tr><td>survey</td><td>dirPath: string</td><td>SurveyReport (submodule suggestions + edge suggestions)</td><td>pure</td><td>Survey a directory and produce atlas-compatible structure report</td></tr>
28
+ <tr><td>listApis</td><td>featureSlug: string</td><td>APIDirectory (public functions + params + callers)</td><td>pure</td><td>List public API surface of a feature area</td></tr>
29
+ </tbody>
30
+ </table>
31
+ </section>
32
+ <section aria-label="Variables">
33
+ <h2>Variables</h2>
34
+ <p class="sub-section__empty">No variables recorded.</p>
35
+ </section>
36
+ <section aria-label="Internal data flow">
37
+ <h2>Internal data flow</h2>
38
+ <p class="sub-dataflow__empty">No internal dataflow steps recorded.</p>
39
+ </section>
40
+ <section aria-label="Errors">
41
+ <h2>Errors</h2>
42
+ <p class="sub-section__empty">No errors recorded.</p>
43
+ </section>
44
+ </main>
45
+ <script src="../../assets/viewer.client.js" defer></script>
46
+ </body>
47
+ </html>
@@ -0,0 +1,48 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-atlas-page="submodule">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>CodeGraph Integration · cg-lifecycle</title>
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <meta name="color-scheme" content="dark">
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..600;1,9..144,300..500&family=Geist:wght@300..700&family=JetBrains+Mono:wght@400..600&display=swap">
11
+ <link rel="stylesheet" href="../../assets/architecture.css">
12
+ </head>
13
+ <body>
14
+ <header class="submodule-header">
15
+ <nav class="submodule-breadcrumb"><a href="../../index.html">← Atlas</a> · <a href="index.html">← CodeGraph Integration</a></nav>
16
+ <h1>cg-lifecycle <small class="submodule-kind">Service</small></h1>
17
+ <p class="submodule-role">Manage CodeGraph index lifecycle — init, sync, status, search</p>
18
+
19
+ </header>
20
+ <main class="submodule-main">
21
+ <section aria-label="Function I/O">
22
+ <h2>Function I/O</h2>
23
+ <table class="sub-table">
24
+ <thead><tr><th scope="col">Name</th><th scope="col">In</th><th scope="col">Out</th><th scope="col">Side</th><th scope="col">Purpose</th></tr></thead>
25
+ <tbody>
26
+ <tr><td>init</td><td>projectRoot: string</td><td>CodeGraph instance</td><td>io</td><td>Initialize .codegraph/ directory and optionally run full index</td></tr>
27
+ <tr><td>sync</td><td>projectRoot: string</td><td>SyncResult</td><td>io</td><td>Incremental update of existing index</td></tr>
28
+ <tr><td>status</td><td>projectRoot: string</td><td>GraphStats</td><td>pure</td><td>Query index statistics</td></tr>
29
+ <tr><td>search</td><td>query: string</td><td>SearchResult[]</td><td>pure</td><td>Full-text symbol search via FTS5</td></tr>
30
+ </tbody>
31
+ </table>
32
+ </section>
33
+ <section aria-label="Variables">
34
+ <h2>Variables</h2>
35
+ <p class="sub-section__empty">No variables recorded.</p>
36
+ </section>
37
+ <section aria-label="Internal data flow">
38
+ <h2>Internal data flow</h2>
39
+ <p class="sub-dataflow__empty">No internal dataflow steps recorded.</p>
40
+ </section>
41
+ <section aria-label="Errors">
42
+ <h2>Errors</h2>
43
+ <p class="sub-section__empty">No errors recorded.</p>
44
+ </section>
45
+ </main>
46
+ <script src="../../assets/viewer.client.js" defer></script>
47
+ </body>
48
+ </html>
@@ -0,0 +1,47 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-atlas-page="submodule">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>CodeGraph Integration · cg-validation</title>
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <meta name="color-scheme" content="dark">
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..600;1,9..144,300..500&family=Geist:wght@300..700&family=JetBrains+Mono:wght@400..600&display=swap">
11
+ <link rel="stylesheet" href="../../assets/architecture.css">
12
+ </head>
13
+ <body>
14
+ <header class="submodule-header">
15
+ <nav class="submodule-breadcrumb"><a href="../../index.html">← Atlas</a> · <a href="index.html">← CodeGraph Integration</a></nav>
16
+ <h1>cg-validation <small class="submodule-kind">Service</small></h1>
17
+ <p class="submodule-role">Verify architecture proposals and batch-apply atlas mutations</p>
18
+
19
+ </header>
20
+ <main class="submodule-main">
21
+ <section aria-label="Function I/O">
22
+ <h2>Function I/O</h2>
23
+ <table class="sub-table">
24
+ <thead><tr><th scope="col">Name</th><th scope="col">In</th><th scope="col">Out</th><th scope="col">Side</th><th scope="col">Purpose</th></tr></thead>
25
+ <tbody>
26
+ <tr><td>verify</td><td>specOverlayPath: string</td><td>VerifyReport (passed/failed items)</td><td>pure</td><td>Validate that spec overlay references match actual code</td></tr>
27
+ <tr><td>applyBatch</td><td>proposalYaml: string</td><td>ApplyResult</td><td>io</td><td>Execute multiple atlas mutations from a single YAML file</td></tr>
28
+ <tr><td>generateTemplate</td><td>specMdPath: string</td><td>proposalYaml path</td><td>io</td><td>Generate empty proposal skeleton from SPEC.md</td></tr>
29
+ </tbody>
30
+ </table>
31
+ </section>
32
+ <section aria-label="Variables">
33
+ <h2>Variables</h2>
34
+ <p class="sub-section__empty">No variables recorded.</p>
35
+ </section>
36
+ <section aria-label="Internal data flow">
37
+ <h2>Internal data flow</h2>
38
+ <p class="sub-dataflow__empty">No internal dataflow steps recorded.</p>
39
+ </section>
40
+ <section aria-label="Errors">
41
+ <h2>Errors</h2>
42
+ <p class="sub-section__empty">No errors recorded.</p>
43
+ </section>
44
+ </main>
45
+ <script src="../../assets/viewer.client.js" defer></script>
46
+ </body>
47
+ </html>
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-atlas-page="feature">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>CodeGraph Integration</title>
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <meta name="color-scheme" content="dark">
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..600;1,9..144,300..500&family=Geist:wght@300..700&family=JetBrains+Mono:wght@400..600&display=swap">
11
+ <link rel="stylesheet" href="../../assets/architecture.css">
12
+ </head>
13
+ <body>
14
+ <header class="feature-header">
15
+ <nav class="feature-breadcrumb"><a href="../../index.html">← Atlas</a></nav>
16
+ <h1>CodeGraph Integration</h1>
17
+ <p class="feature-depends">Depends on: <a href="../eval-cli/index.html">eval-cli</a></p>
18
+ </header>
19
+ <main class="feature-main">
20
+ <section class="feature-story"><p>Provide LLM agents with deterministic code structure data through apltk CLI. Replaces manual grep/Read discovery with tree-sitter parsed knowledge graph queries.
21
+ </p></section>
22
+ <section class="feature-submodules" aria-label="Submodules">
23
+ <h2>Submodules</h2>
24
+ <ul class="submodule-nav">
25
+ <li class="submodule-card">
26
+ <a class="submodule-card__link" href="cg-lifecycle.html">
27
+ <span class="submodule-card__name">cg-lifecycle</span>
28
+ <span class="submodule-card__kind">Service</span>
29
+ </a>
30
+ <p class="submodule-card__role">Manage CodeGraph index lifecycle — init, sync, status, search</p>
31
+ </li>
32
+ <li class="submodule-card">
33
+ <a class="submodule-card__link" href="cg-discovery.html">
34
+ <span class="submodule-card__name">cg-discovery</span>
35
+ <span class="submodule-card__kind">Service</span>
36
+ </a>
37
+ <p class="submodule-card__role">Explore and survey code structure — explore, survey, list-apis</p>
38
+ </li>
39
+ <li class="submodule-card">
40
+ <a class="submodule-card__link" href="cg-validation.html">
41
+ <span class="submodule-card__name">cg-validation</span>
42
+ <span class="submodule-card__kind">Service</span>
43
+ </a>
44
+ <p class="submodule-card__role">Verify architecture proposals and batch-apply atlas mutations</p>
45
+ </li>
46
+ </ul>
47
+ </section>
48
+ <section class="feature-edges" aria-label="Intra-feature edges">
49
+ <h2>Intra-feature edges</h2>
50
+ <ul class="feature-edges__list">
51
+ <li class="feature-edges__item feature-edges__item--data-row"><span class="feature-edges__endpoints">cg-lifecycle → cg-discovery</span><span class="feature-edges__kind">data-row</span><span class="feature-edges__label">survey/list-apis 依賴已索引的資料庫</span></li>
52
+ <li class="feature-edges__item feature-edges__item--data-row"><span class="feature-edges__endpoints">cg-discovery → cg-validation</span><span class="feature-edges__kind">data-row</span><span class="feature-edges__label">verify 使用 discovery 的搜尋能力</span></li>
53
+ <li class="feature-edges__item feature-edges__item--data-row"><span class="feature-edges__endpoints">cg-validation → cg-lifecycle</span><span class="feature-edges__kind">data-row</span><span class="feature-edges__label">apply 非索引操作,不需 lifecycle — 但 template 可搭配 list-apis</span></li>
54
+ </ul>
55
+ </section>
56
+ </main>
57
+ </body>
58
+ </html>
@@ -20,7 +20,12 @@
20
20
  <main class="submodule-main">
21
21
  <section aria-label="Function I/O">
22
22
  <h2>Function I/O</h2>
23
- <p class="sub-section__empty">No functions recorded.</p>
23
+ <table class="sub-table">
24
+ <thead><tr><th scope="col">Name</th><th scope="col">In</th><th scope="col">Out</th><th scope="col">Side</th><th scope="col">Purpose</th></tr></thead>
25
+ <tbody>
26
+ <tr><td>detectSkillChanges</td><td>prFiles</td><td>string[]</td><td>pure</td><td>檢測 PR 中技能檔案變更</td></tr>
27
+ </tbody>
28
+ </table>
24
29
  </section>
25
30
  <section aria-label="Variables">
26
31
  <h2>Variables</h2>
@@ -20,7 +20,14 @@
20
20
  <main class="submodule-main">
21
21
  <section aria-label="Function I/O">
22
22
  <h2>Function I/O</h2>
23
- <p class="sub-section__empty">No functions recorded.</p>
23
+ <table class="sub-table">
24
+ <thead><tr><th scope="col">Name</th><th scope="col">In</th><th scope="col">Out</th><th scope="col">Side</th><th scope="col">Purpose</th></tr></thead>
25
+ <tbody>
26
+ <tr><td>evalHandler</td><td>argv, context</td><td>exitCode</td><td>pure</td><td>CLI 入口:解析參數、調度評測流程</td></tr>
27
+ <tr><td>parseArgs</td><td>argv</td><td>ParsedArgs</td><td>pure</td><td>解析 CLI 參數與模式選擇</td></tr>
28
+ <tr><td>tool</td><td>ToolDefinition</td><td>void</td><td>pure</td><td>向 tool-registry 註冊 eval 命令</td></tr>
29
+ </tbody>
30
+ </table>
24
31
  </section>
25
32
  <section aria-label="Variables">
26
33
  <h2>Variables</h2>
@@ -20,7 +20,12 @@
20
20
  <main class="submodule-main">
21
21
  <section aria-label="Function I/O">
22
22
  <h2>Function I/O</h2>
23
- <p class="sub-section__empty">No functions recorded.</p>
23
+ <table class="sub-table">
24
+ <thead><tr><th scope="col">Name</th><th scope="col">In</th><th scope="col">Out</th><th scope="col">Side</th><th scope="col">Purpose</th></tr></thead>
25
+ <tbody>
26
+ <tr><td>withRetry</td><td>fn, options</td><td>Result</td><td>io</td><td>HTTP client with retry for exec model</td></tr>
27
+ </tbody>
28
+ </table>
24
29
  </section>
25
30
  <section aria-label="Variables">
26
31
  <h2>Variables</h2>