@colin4k1024/tsp 2.4.5 → 2.4.6

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 (236) hide show
  1. package/README.md +16 -20
  2. package/bin/lib/install-surface.js +3 -3
  3. package/bin/lib/source-installer.js +2 -2
  4. package/commands/team-help.md +2 -2
  5. package/commands/team-plan.md +1 -1
  6. package/commands/update-codemaps.md +3 -3
  7. package/manifests/install-components.json +1 -1
  8. package/manifests/install-modules.json +17 -3
  9. package/manifests/install-profiles.json +2 -0
  10. package/package.json +6 -3
  11. package/schemas/ecc-install-config.schema.json +6 -1
  12. package/schemas/install-modules.schema.json +4 -1
  13. package/scripts/codegraph-preflight.js +179 -0
  14. package/scripts/gitnexus-preflight.js +8 -0
  15. package/scripts/install-apply.js +10 -8
  16. package/scripts/install-codegraph.js +158 -0
  17. package/scripts/install-plan.js +28 -11
  18. package/scripts/lib/install/apply.js +256 -5
  19. package/scripts/lib/install/request.js +3 -2
  20. package/scripts/lib/install-audit-manifest.js +3 -0
  21. package/scripts/lib/install-executor.js +14 -5
  22. package/scripts/lib/install-lifecycle.js +2 -2
  23. package/scripts/lib/install-manifests.js +23 -4
  24. package/scripts/lib/install-targets/codex-home.js +187 -1
  25. package/scripts/lib/install-targets/opencode-home.js +135 -2
  26. package/scripts/lib/install-targets/registry.js +23 -1
  27. package/scripts/lib/release-health.js +19 -4
  28. package/scripts/lib/team-skills-data.json +6 -6
  29. package/scripts/release-health-summary.js +1 -1
  30. package/scripts/workflow-help.js +3 -3
  31. package/skills/codegraph/SKILL.md +57 -0
  32. package/skills/codegraph/agents/openai.yaml +4 -0
  33. package/docs/.vitepress/config.mts +0 -199
  34. package/docs/adr/ADR-001-doc-architecture-integration.md +0 -33
  35. package/docs/guides/README.md +0 -5
  36. package/docs/guides/installation.md +0 -33
  37. package/docs/guides/user-guide.md +0 -36
  38. package/docs/index.md +0 -65
  39. package/docs/memory/backlog.md +0 -10
  40. package/docs/memory/decisions.md +0 -43
  41. package/docs/memory/lessons-learned.md +0 -87
  42. package/docs/plans/2026-04-03-python-remnants-audit.md +0 -265
  43. package/docs/plans/2026-04-03-scripts-python-to-js-migration.md +0 -372
  44. package/docs/plans/2026-04-03-solo-delivery-execution-checklist.md +0 -413
  45. package/docs/plans/2026-04-03-solo-delivery-gap-plan.md +0 -377
  46. package/docs/plans/2026-04-03-team-skills-workflow-gates.md +0 -548
  47. package/docs/plans/2026-04-21-open-source-readiness-gap-plan.md +0 -217
  48. package/docs/plans/llm-surface-reduction-audit.md +0 -147
  49. package/docs/plans/llm-surface-reduction-execution-checklist.md +0 -217
  50. package/docs/plans/llm-surface-reduction-execution-history.md +0 -124
  51. package/docs/plans/team-skills-platform-migration.md +0 -54
  52. package/docs/presentation/README.md +0 -42
  53. package/docs/presentation/audience-presentation-route-map.md +0 -84
  54. package/docs/presentation/executive-briefing-talk-track.md +0 -50
  55. package/docs/presentation/generate_capability_matrix.py +0 -396
  56. package/docs/presentation/generate_ppt.py +0 -354
  57. package/docs/presentation/implementation-onboarding-brief.md +0 -38
  58. package/docs/presentation/presentation-talk-track.md +0 -97
  59. package/docs/presentation/vertical-scenario-route-map.md +0 -99
  60. package/docs/presentation/workshop-facilitator-guide.md +0 -47
  61. package/docs/runbooks/actionlint-workflow-gates.md +0 -80
  62. package/docs/runbooks/agent-governance.md +0 -131
  63. package/docs/runbooks/ai-eval-platform-demo-execution-log.md +0 -147
  64. package/docs/runbooks/ai-eval-platform-demo-script.md +0 -136
  65. package/docs/runbooks/ai-eval-platform-walkthrough.md +0 -113
  66. package/docs/runbooks/ai-pr-review-automation.md +0 -56
  67. package/docs/runbooks/api-breaking-change-gates.md +0 -58
  68. package/docs/runbooks/api-design-evolution-walkthrough.md +0 -42
  69. package/docs/runbooks/api-lint-gates.md +0 -57
  70. package/docs/runbooks/api-mocking-strategy-and-lifecycle-guide.md +0 -47
  71. package/docs/runbooks/architect-daily-operations.md +0 -63
  72. package/docs/runbooks/architect-design-conversation-example.md +0 -83
  73. package/docs/runbooks/artifact-attestation-gates.md +0 -75
  74. package/docs/runbooks/artifact-persistence.md +0 -257
  75. package/docs/runbooks/backend-engineer-daily-operations.md +0 -63
  76. package/docs/runbooks/batch-optimization-completion-checklist.md +0 -104
  77. package/docs/runbooks/biz-service-designer-end-to-end-conversation-example.md +0 -5
  78. package/docs/runbooks/biz-service-designer-toolkit.md +0 -5
  79. package/docs/runbooks/bug-fix-complete-walkthrough.md +0 -60
  80. package/docs/runbooks/build-failure-recovery-walkthrough.md +0 -40
  81. package/docs/runbooks/canary-decision-matrix.md +0 -41
  82. package/docs/runbooks/canary-staging-release-walkthrough.md +0 -46
  83. package/docs/runbooks/checkov-iac-gates.md +0 -104
  84. package/docs/runbooks/claude-code-review-workflow.md +0 -72
  85. package/docs/runbooks/claude-conversation-prompt-recipes.md +0 -132
  86. package/docs/runbooks/claude-end-to-end-conversation-example.md +0 -198
  87. package/docs/runbooks/claude-feature-development-guide.md +0 -112
  88. package/docs/runbooks/claude-quick-start.md +0 -227
  89. package/docs/runbooks/claude-usage-scenarios.md +0 -176
  90. package/docs/runbooks/code-review-collaboration-walkthrough.md +0 -65
  91. package/docs/runbooks/codeql-pr-security-gates.md +0 -64
  92. package/docs/runbooks/codex-end-to-end-conversation-example.md +0 -166
  93. package/docs/runbooks/codex-multi-agent-orchestration.md +0 -65
  94. package/docs/runbooks/codex-parallel-prompt-recipes.md +0 -131
  95. package/docs/runbooks/codex-quick-start.md +0 -223
  96. package/docs/runbooks/codex-usage-scenarios.md +0 -168
  97. package/docs/runbooks/codex-workflow-essentials.md +0 -88
  98. package/docs/runbooks/command-and-capability-matrix.md +0 -162
  99. package/docs/runbooks/conftest-policy-gates.md +0 -84
  100. package/docs/runbooks/consumer-driven-contract-testing-with-mock-alignment.md +0 -45
  101. package/docs/runbooks/contract-testing-playbook.md +0 -78
  102. package/docs/runbooks/cosign-signing-gates.md +0 -71
  103. package/docs/runbooks/cross-role-issue-triage-walkthrough.md +0 -47
  104. package/docs/runbooks/cursor-quick-start.md +0 -123
  105. package/docs/runbooks/custom-overlay.md +0 -115
  106. package/docs/runbooks/data-ml-pipeline-demo-execution-log.md +0 -141
  107. package/docs/runbooks/data-ml-pipeline-demo-script.md +0 -102
  108. package/docs/runbooks/data-ml-pipeline-walkthrough.md +0 -119
  109. package/docs/runbooks/data-observability-quality-demo-execution-log.md +0 -36
  110. package/docs/runbooks/data-observability-quality-demo-script.md +0 -42
  111. package/docs/runbooks/data-observability-quality-walkthrough.md +0 -86
  112. package/docs/runbooks/demo-deliverables-overview.md +0 -278
  113. package/docs/runbooks/demo-execution-log.md +0 -530
  114. package/docs/runbooks/demo-scenario.md +0 -129
  115. package/docs/runbooks/dependency-review-gates.md +0 -63
  116. package/docs/runbooks/dependency-update-automation.md +0 -83
  117. package/docs/runbooks/design-md-workflow.md +0 -185
  118. package/docs/runbooks/devops-engineer-daily-operations.md +0 -60
  119. package/docs/runbooks/devops-release-conversation-example.md +0 -88
  120. package/docs/runbooks/doc-architecture-integration.md +0 -59
  121. package/docs/runbooks/doc-architecture-quick-start.md +0 -122
  122. package/docs/runbooks/document-execution-audit.md +0 -32
  123. package/docs/runbooks/documentation-update-walkthrough.md +0 -37
  124. package/docs/runbooks/ecc-harness-usage.md +0 -93
  125. package/docs/runbooks/error-experience-usage.md +0 -116
  126. package/docs/runbooks/evolution-usage.md +0 -162
  127. package/docs/runbooks/executive-value-one-page.md +0 -55
  128. package/docs/runbooks/external-capability-approval-and-enablement-workflow.md +0 -39
  129. package/docs/runbooks/external-capability-intake.md +0 -160
  130. package/docs/runbooks/first-team-command-60-seconds.md +0 -96
  131. package/docs/runbooks/first-team-workflow-walkthrough.md +0 -245
  132. package/docs/runbooks/frontend-backend-integration-acceptance-checklist.md +0 -46
  133. package/docs/runbooks/frontend-backend-parallel-integration-walkthrough.md +0 -48
  134. package/docs/runbooks/frontend-bugfix-one-page.md +0 -82
  135. package/docs/runbooks/frontend-engineer-daily-operations.md +0 -60
  136. package/docs/runbooks/frontend-enterprise-style-profile.md +0 -5
  137. package/docs/runbooks/frontend-governance.md +0 -47
  138. package/docs/runbooks/frontend-refactor-walkthrough.md +0 -42
  139. package/docs/runbooks/git-pr-workflow.md +0 -63
  140. package/docs/runbooks/github-actions-supply-chain-demo-execution-log.md +0 -158
  141. package/docs/runbooks/github-actions-supply-chain-demo-script.md +0 -150
  142. package/docs/runbooks/github-actions-supply-chain-walkthrough.md +0 -117
  143. package/docs/runbooks/github-token-permissions-baseline.md +0 -92
  144. package/docs/runbooks/gitlab-manual-pipeline-release.md +0 -5
  145. package/docs/runbooks/gitlab-release-integration-playbook.md +0 -5
  146. package/docs/runbooks/gitnexus-code-intelligence-usage.md +0 -133
  147. package/docs/runbooks/graphify-knowledge-graph-usage.md +0 -88
  148. package/docs/runbooks/handoff-filling-guide-with-examples.md +0 -70
  149. package/docs/runbooks/handoff-governance.md +0 -250
  150. package/docs/runbooks/helm-unittest-playbook.md +0 -101
  151. package/docs/runbooks/hotfix-emergency-release-walkthrough.md +0 -60
  152. package/docs/runbooks/iac-kubernetes-platform-demo-execution-log.md +0 -144
  153. package/docs/runbooks/iac-kubernetes-platform-demo-script.md +0 -130
  154. package/docs/runbooks/iac-kubernetes-platform-walkthrough.md +0 -120
  155. package/docs/runbooks/implementation-onboarding-reading-path.md +0 -67
  156. package/docs/runbooks/in-toto-attestation-framework.md +0 -94
  157. package/docs/runbooks/incident-severity-triage-tree.md +0 -43
  158. package/docs/runbooks/incident-triage-one-page.md +0 -65
  159. package/docs/runbooks/internal-developer-platform-demo-execution-log.md +0 -36
  160. package/docs/runbooks/internal-developer-platform-demo-script.md +0 -42
  161. package/docs/runbooks/internal-developer-platform-walkthrough.md +0 -91
  162. package/docs/runbooks/karpathy-guidelines-usage.md +0 -27
  163. package/docs/runbooks/kubeconform-schema-gates.md +0 -100
  164. package/docs/runbooks/kubectl-server-dry-run-gates.md +0 -103
  165. package/docs/runbooks/kyverno-policy-gates.md +0 -90
  166. package/docs/runbooks/langfuse-and-observability-integration-guide.md +0 -43
  167. package/docs/runbooks/langfuse-coding-trace.md +0 -44
  168. package/docs/runbooks/mobile-miniapp-delivery-walkthrough.md +0 -112
  169. package/docs/runbooks/mobile-miniapp-demo-execution-log.md +0 -139
  170. package/docs/runbooks/mobile-miniapp-demo-script.md +0 -129
  171. package/docs/runbooks/multi-service-backend-integration-walkthrough.md +0 -61
  172. package/docs/runbooks/open-design-integration.md +0 -163
  173. package/docs/runbooks/open-source-release-checklist.md +0 -90
  174. package/docs/runbooks/opencode-quick-start.md +0 -128
  175. package/docs/runbooks/parallel-development-coordination-walkthrough.md +0 -47
  176. package/docs/runbooks/parallel-execution-usage.md +0 -179
  177. package/docs/runbooks/platform-capability-demo-execution-log.md +0 -184
  178. package/docs/runbooks/platform-capability-demo-script.md +0 -192
  179. package/docs/runbooks/plugin-extension-platform-demo-execution-log.md +0 -136
  180. package/docs/runbooks/plugin-extension-platform-demo-script.md +0 -102
  181. package/docs/runbooks/plugin-extension-platform-walkthrough.md +0 -111
  182. package/docs/runbooks/policy-controller-gates.md +0 -75
  183. package/docs/runbooks/post-rollback-verification-checklist.md +0 -37
  184. package/docs/runbooks/pre-release-checklist.md +0 -50
  185. package/docs/runbooks/product-manager-clarification-conversation-example.md +0 -90
  186. package/docs/runbooks/product-manager-daily-operations.md +0 -60
  187. package/docs/runbooks/production-incident-response-walkthrough.md +0 -50
  188. package/docs/runbooks/project-claude-design-rationale.md +0 -188
  189. package/docs/runbooks/project-manager-daily-operations.md +0 -61
  190. package/docs/runbooks/project-manager-planning-conversation-example.md +0 -82
  191. package/docs/runbooks/project-onboarding.md +0 -452
  192. package/docs/runbooks/qa-engineer-daily-operations.md +0 -63
  193. package/docs/runbooks/qa-review-conversation-example.md +0 -87
  194. package/docs/runbooks/release-closure-one-page.md +0 -65
  195. package/docs/runbooks/release-governance-reading-path.md +0 -56
  196. package/docs/runbooks/release-notes-automation.md +0 -48
  197. package/docs/runbooks/release-rollback-recovery-walkthrough.md +0 -47
  198. package/docs/runbooks/requirement-clarity-and-scope-walkthrough.md +0 -46
  199. package/docs/runbooks/reviewdog-pr-gates.md +0 -49
  200. package/docs/runbooks/role-prompt-recipes.md +0 -130
  201. package/docs/runbooks/rtk-integration-intake.md +0 -45
  202. package/docs/runbooks/rtk-token-optimization-usage.md +0 -107
  203. package/docs/runbooks/runner-egress-hardening.md +0 -81
  204. package/docs/runbooks/runtime-capabilities-overview.md +0 -113
  205. package/docs/runbooks/sbom-generation-gates.md +0 -71
  206. package/docs/runbooks/scorecard-supply-chain-gates.md +0 -82
  207. package/docs/runbooks/secret-scanning-gates.md +0 -85
  208. package/docs/runbooks/security-compliance-platform-demo-execution-log.md +0 -36
  209. package/docs/runbooks/security-compliance-platform-demo-script.md +0 -49
  210. package/docs/runbooks/security-compliance-platform-walkthrough.md +0 -98
  211. package/docs/runbooks/slsa-generator-patterns.md +0 -73
  212. package/docs/runbooks/slsa-verification-gates.md +0 -75
  213. package/docs/runbooks/solo-delivery-mode.md +0 -142
  214. package/docs/runbooks/solo-delivery-one-page.md +0 -111
  215. package/docs/runbooks/specialist-commands-playbook.md +0 -85
  216. package/docs/runbooks/sub-agent-invocation-map.md +0 -144
  217. package/docs/runbooks/system-architecture-design-walkthrough.md +0 -49
  218. package/docs/runbooks/team-closeout-example.md +0 -73
  219. package/docs/runbooks/team-command-output-contracts.md +0 -358
  220. package/docs/runbooks/team-commands-quick-prompts.md +0 -125
  221. package/docs/runbooks/team-execute-example.md +0 -63
  222. package/docs/runbooks/team-handoff-example.md +0 -49
  223. package/docs/runbooks/team-intake-example.md +0 -70
  224. package/docs/runbooks/team-plan-example.md +0 -62
  225. package/docs/runbooks/team-release-example.md +0 -63
  226. package/docs/runbooks/team-review-example.md +0 -61
  227. package/docs/runbooks/team-skills-test-run.md +0 -184
  228. package/docs/runbooks/team-skills-usage.md +0 -336
  229. package/docs/runbooks/team-training-reading-path.md +0 -64
  230. package/docs/runbooks/tech-lead-closure-conversation-example.md +0 -78
  231. package/docs/runbooks/tech-lead-daily-operations.md +0 -67
  232. package/docs/runbooks/trivy-security-gates.md +0 -79
  233. package/docs/runbooks/troubleshooting.md +0 -234
  234. package/docs/runbooks/vertical-scenario-capability-matrix.md +0 -107
  235. package/docs/runbooks/witness-policy-gates.md +0 -78
  236. package/docs/runbooks/zizmor-workflow-audits.md +0 -81
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  面向团队协作与平台治理的开源 Team Skills Platform,用于把单代理执行模式升级成“`Tech Lead` 编排 + 专业角色协作”的虚拟研发团队工作模型,并叠加 ECC 风格的 harness layer、specialist 命令与运行时增强能力。当前平台同时支持 `team mode` 与 `solo mode`,前者强调多人交接,后者强调单人闭环但保留同样的关键门禁。
4
4
 
5
- > English: Team Skills Platform (TSP) is an open-source framework for role-based AI delivery workflows. It packages role prompts, shared skills, commands, rules, hooks, examples, and install tooling for Claude Code, Codex, Cursor, and similar environments. Custom extensions can be layered on top via the overlay mechanism; the public repository ships only public capabilities.
5
+ > English: Team Skills Platform (TSP) is an open-source framework for role-based AI delivery workflows. It packages role prompts, shared skills, commands, rules, hooks, examples, and install tooling for Claude Code, Codex, and OpenCode. Custom extensions can be layered on top via the overlay mechanism; the public repository ships only public capabilities.
6
6
 
7
7
  ## Quick Start / 最小安装
8
8
 
@@ -53,7 +53,7 @@ TSP 采用 **角色 + 技能 + Agent + 规则 + Hooks + Workflow 引擎** 六层
53
53
  | 命令面 | `commands/` | 80+ 命令(团队主链 8 个 + specialist + 工具链) |
54
54
  | Workflow 引擎 | `workflows/` + `scripts/workflow-*.js` | YAML DAG 工作流,支持依赖解析、状态持久化、失败恢复 |
55
55
 
56
- 安装工具链支持 **10 个目标平台**:Claude、Cursor、Antigravity、Codex、Gemini、OpenCode、CodeBuddy、Copilot、Windsurf、Augment。
56
+ 安装工具链公开主线支持 **3 个 code agent**:Claude Code、Codex、OpenCode。其他历史 target 保留为隐藏兼容路径,不再作为公开 onboarding 主线。
57
57
 
58
58
  发布为 npm 包 `@colin4k1024/tsp`,内置 Rust bridge 预构建二进制,安装零依赖。
59
59
 
@@ -65,6 +65,7 @@ TSP 整合了多个社区开源框架的精华能力,而非从零构建:
65
65
  |------|------|--------------|
66
66
  | **ECC** (Everything Claude Code) | 社区 | 125+ specialist skills、27 specialist agents、language rules packs、runtime hooks、安装工具链 |
67
67
  | **BMAD** | 方法来源(已吸收) | 单入口主链(`/team-help`)、Requirement Challenge、Design Review、Implementation Readiness、Story Slice、`artifact:persist` 落盘、Release→Closeout 收口 |
68
+ | **CodeGraph** | 社区(`colbymchenry/codegraph`) | 默认内置 MCP-backed 代码图谱能力(符号搜索、调用链、impact、focused context),以 npm 依赖 + target-scoped installer wrapper + 本地 skill 接入 |
68
69
  | **Graphify** | 社区(`safishamsi/graphify`) | 可选知识图谱能力(brownfield 结构扫描、依赖路径分析、架构问答证据),以 runbook + 本地 skill 接入,不替换 workflow-engine |
69
70
  | **GitNexus** | 社区(`abhigyanpatwari/GitNexus`) | 受控可选代码智能能力(MCP 查询、impact、detect_changes、多仓图谱证据),以 runbook + thin skill 接入,不内置依赖 |
70
71
  | **Open Design** | 社区(`nexu-io/open-design`) | 受控可选设计工作台能力(本地优先原型、deck、dashboard、mobile flow、`DESIGN.md`、导出 artifact),以 runbook + thin skill 接入,不内置 daemon |
@@ -208,6 +209,7 @@ TSP 的公开能力是在多个社区项目、技能仓库和工程方法论的
208
209
  | 仓库 | 在 TSP 中的关系 | 说明 |
209
210
  |------|------|------|
210
211
  | [affaan-m/everything-claude-code](https://github.com/affaan-m/everything-claude-code) | 上游能力来源 | ECC harness layer、specialist agents、skills、runtime hooks 与安装工具链的重要参考来源 |
212
+ | [colbymchenry/codegraph](https://github.com/colbymchenry/codegraph) | 默认内置接入 | 为 brownfield 符号搜索、调用链、impact 和 focused context 提供本地 MCP-backed 代码图谱能力;TSP 通过 target-scoped wrapper 调用上游 installer |
211
213
  | [safishamsi/graphify](https://github.com/safishamsi/graphify) | 已吸收并本地化 | 为 brownfield 结构扫描、依赖路径分析与架构问答补充知识图谱能力 |
212
214
  | [abhigyanpatwari/GitNexus](https://github.com/abhigyanpatwari/GitNexus) | 受控可选接入 | 为 brownfield MCP 查询、impact、detect_changes 和多仓代码图谱证据提供外部能力;因许可证与 Node 20 要求,不内置依赖 |
213
215
  | [nexu-io/open-design](https://github.com/nexu-io/open-design) | 受控可选接入 | 为本地优先原型、deck、dashboard、mobile flow、`DESIGN.md` 与可导出视觉 artifact 提供外部设计工作台;不内置 daemon 或上游源码 |
@@ -272,12 +274,12 @@ TSP 的公开能力是在多个社区项目、技能仓库和工程方法论的
272
274
  - 文档生命周期字段用于明确责任与新鲜度:`doc_tier`、`owner`、`updated`、`last_verified`、`source_of_truth`。
273
275
  - 历史资料通过 `doc_tier: historical` 分层,避免与现行操作手册并列误用。
274
276
 
275
- ## 可选知识图谱能力(Graphify + GitNexus)
277
+ ## 代码图谱能力(CodeGraph + Graphify + GitNexus)
276
278
 
277
- - 定位:Graphify 作为轻量结构证据层,GitNexus 作为受控可选代码智能层;两者都不替代 workflow-engine 或 `/team-*` 主链。
278
- - 入口:Graphify 先执行 `npm run graphify:doctor`,GitNexus 先执行 `npm run gitnexus:doctor`;详细操作见 [graphify-knowledge-graph-usage.md](docs/runbooks/graphify-knowledge-graph-usage.md) 与 [gitnexus-code-intelligence-usage.md](docs/runbooks/gitnexus-code-intelligence-usage.md)。
279
- - 分发:通过安装模块 `knowledge-graph` 与组件 `capability:knowledge-graph` 提供;仅默认纳入 `research` 与 `full` profile
280
- - 治理边界:不在本仓库执行 Graphify/GitNexus 的自动 setup 类命令;GitNexus 不进入 TSP 依赖,且索引时必须保护既有 AGENTS/CLAUDE 契约。
279
+ - 定位:CodeGraph 作为默认内置 MCP-backed 代码图谱能力,Graphify 作为轻量结构证据层,GitNexus 作为受控可选深代码智能层;三者都不替代 workflow-engine 或 `/team-*` 主链。
280
+ - 入口:CodeGraph 先执行 `npm run codegraph:doctor`,Graphify 先执行 `npm run graphify:doctor`,GitNexus 先执行 `npm run gitnexus:doctor`;详细操作见 [codegraph-code-intelligence-usage.md](docs/runbooks/codegraph-code-intelligence-usage.md)、[graphify-knowledge-graph-usage.md](docs/runbooks/graphify-knowledge-graph-usage.md) 与 [gitnexus-code-intelligence-usage.md](docs/runbooks/gitnexus-code-intelligence-usage.md)。
281
+ - 分发:通过安装模块 `knowledge-graph` 与组件 `capability:knowledge-graph` 提供;默认纳入 `developer`、`team`、`research` 与 `full` profile,`core` 保持轻量。
282
+ - 治理边界:TSP 只通过 `scripts/install-codegraph.js` 以当前 target 调用 CodeGraph installer,不使用 `--target=auto`,也不在安装时运行 `codegraph init -i`;Graphify/GitNexus 的自动 setup 类命令仍不在本仓库执行。
281
283
 
282
284
  ## 近期新增功能(v2.0.0 → v2.3.0)
283
285
 
@@ -597,9 +599,6 @@ CODEX_HOME_DIR=/tmp/codex AGENTS_HOME_DIR=/tmp/agents ./scripts/install-codex.sh
597
599
  # 安装到 Claude(可通过环境变量覆盖目标目录)
598
600
  CLAUDE_HOME_DIR=/tmp/claude ./scripts/install-claude.sh
599
601
 
600
- # 安装到 Cursor(可通过环境变量覆盖目标目录)
601
- CURSOR_HOME_DIR=/tmp/cursor ./scripts/install-cursor.sh
602
-
603
602
  # 安装到 OpenCode(可通过环境变量覆盖目标目录)
604
603
  OPENCODE_CONFIG_DIR=/tmp/opencode ./scripts/install-opencode.sh
605
604
  ```
@@ -608,20 +607,18 @@ OPENCODE_CONFIG_DIR=/tmp/opencode ./scripts/install-opencode.sh
608
607
 
609
608
  无需克隆仓库,直接通过 npx 一键安装到目标平台。npm 包已包含所有平台(macOS/Linux/Windows)的预编译二进制文件,无需 Rust 工具链,无需 GitHub 访问:
610
609
 
611
- - `tsp` 当前公开支持的 targets:`claude`、`cursor`、`antigravity`、`codex`、`gemini`、`opencode`、`codebuddy`、`copilot`、`windsurf`、`augment`
610
+ - `tsp` 当前公开支持的 targets:`claude`(Claude Code)、`codex`、`opencode`;`claude-code` / `claudecode` 是 `claude` 的兼容别名
612
611
  - 当前公开支持的 profiles:`core`、`developer`、`security`、`research`、`team`、`full`
613
612
  - 自定义能力通过 overlay 机制扩展,不作为公开 `tsp` profile 暴露
614
613
 
615
- 支持深度不是所有 target 都完全一致,当前建议按下面理解:
614
+ 公开支持深度按三类 code agent 收敛,当前建议按下面理解:
616
615
 
617
616
  | Support level | Targets | `team` profile depth | Notes |
618
617
  |------|---------|----------------------|-------|
619
- | Recommended | `claude`, `cursor` | 14 / 14 modules | 完整公开 workflow 链路、最强回归覆盖、文档最全 |
620
- | Strong | `codex`, `opencode` | 10 / 14, 11 / 14 modules | 核心命令和大部分 workflow 可用,但仍有少量 target-specific gap |
621
- | Partial | `antigravity`, `codebuddy` | 8 / 14, 11 / 14 modules | 安装适配器可用,但 workflow parity / shared-skills 覆盖不完整 |
622
- | Baseline | `gemini`, `copilot`, `windsurf`, `augment` | 1-2 / 14 modules | 仅提供基础兼容入口和平台配置,不承诺完整 `/team-*` 对齐 |
618
+ | Recommended | `claude`, `codex`, `opencode` | 完整主链;仅跳过 target-intentional runtime gaps | 完整公开 workflow 链路、quick-start、安装验证与回归覆盖 |
619
+ | Hidden compatibility | `cursor`, `antigravity`, `gemini`, `codebuddy`, `copilot`, `windsurf`, `augment` | 不作为公开承诺 | 适配器可继续存在以兼容旧用户,但不进入公开 wizard / release matrix |
623
620
 
624
- 当前公开 quick-start / recipes / examples 主要覆盖 `claude`、`cursor`、`codex`、`opencode`。其他 targets 已进入公开 install surface,但应按上表理解为 partial 或 baseline 支持,而不是 full parity
621
+ 当前公开 quick-start / recipes / examples 聚焦 `claude`、`codex`、`opencode`。其他 targets 属于隐藏兼容,不应按 full parity 预期使用。
625
622
 
626
623
  ```bash
627
624
  # 交互式向导(推荐首次使用)
@@ -629,7 +626,7 @@ npx @colin4k1024/tsp
629
626
 
630
627
  # 非交互式,直接指定目标和 profile
631
628
  npx @colin4k1024/tsp --target claude --profile full
632
- npx @colin4k1024/tsp --target cursor --profile team
629
+ npx @colin4k1024/tsp --target claude-code --profile team
633
630
  npx @colin4k1024/tsp --target codex --profile full
634
631
  npx @colin4k1024/tsp --target opencode --profile full
635
632
 
@@ -652,7 +649,7 @@ npx @colin4k1024/tsp --from-source
652
649
  如果你是第一次使用这个平台,建议按下面的顺序进入:
653
650
 
654
651
  1. 运行 `node scripts/build-platform-artifacts.js` 生成最新产物。
655
- 2. 根据使用端执行对应的安装脚本:`./scripts/install-claude.sh`、`./scripts/install-codex.sh`、`./scripts/install-cursor.sh` 或 `./scripts/install-opencode.sh`。
652
+ 2. 根据使用端执行对应的安装脚本:`./scripts/install-claude.sh`、`./scripts/install-codex.sh` 或 `./scripts/install-opencode.sh`。
656
653
  3. 打开你的项目仓库,在对话中先跑一次 `/team-help` 判断入口,再按建议进入 `/team-intake`、`/team-plan`、`/team-execute`、`/team-review`、`/team-release` 或 `/team-closeout`。
657
654
  4. specialist 命令只负责给出专项结论,最终决策回到 `/handoff` 或 `/team-*` 主链。
658
655
 
@@ -660,7 +657,6 @@ npx @colin4k1024/tsp --from-source
660
657
 
661
658
  - 第一次安装,准备在 Claude 中试跑:看 [docs/runbooks/claude-quick-start.md](docs/runbooks/claude-quick-start.md)
662
659
  - 第一次安装,准备在 Codex 中试跑:看 [docs/runbooks/codex-quick-start.md](docs/runbooks/codex-quick-start.md)
663
- - 想在 Cursor 中上手:看 [docs/runbooks/cursor-quick-start.md](docs/runbooks/cursor-quick-start.md)
664
660
  - 想在 OpenCode 中上手:看 [docs/runbooks/opencode-quick-start.md](docs/runbooks/opencode-quick-start.md)
665
661
  - 想按场景查 Claude 怎么用:看 [docs/runbooks/claude-usage-scenarios.md](docs/runbooks/claude-usage-scenarios.md)
666
662
  - 想按场景查 Codex 怎么用:看 [docs/runbooks/codex-usage-scenarios.md](docs/runbooks/codex-usage-scenarios.md)
@@ -4,7 +4,7 @@ const path = require('path');
4
4
 
5
5
  const packageRoot = path.resolve(__dirname, '../..');
6
6
  const { listInstallProfiles } = require(path.join(packageRoot, 'scripts/lib/install-manifests'));
7
- const { listInstallTargetAdapters } = require(path.join(packageRoot, 'scripts/lib/install-targets/registry'));
7
+ const { listPublicInstallTargetAdapters } = require(path.join(packageRoot, 'scripts/lib/install-targets/registry'));
8
8
 
9
9
  const TARGET_METADATA = Object.freeze({
10
10
  claude: {
@@ -34,7 +34,7 @@ const TARGET_METADATA = Object.freeze({
34
34
  },
35
35
  opencode: {
36
36
  label: 'OpenCode',
37
- installPath: '~/.opencode/',
37
+ installPath: '~/.config/opencode/',
38
38
  scope: 'home-level',
39
39
  },
40
40
  codebuddy: {
@@ -92,7 +92,7 @@ function titleCase(value) {
92
92
  }
93
93
 
94
94
  function listPublicInstallTargets() {
95
- return listInstallTargetAdapters().map((adapter) => {
95
+ return listPublicInstallTargetAdapters().map((adapter) => {
96
96
  const metadata = TARGET_METADATA[adapter.target] || {};
97
97
  return {
98
98
  id: adapter.target,
@@ -14,7 +14,7 @@ const os = require('os');
14
14
  const ui = require('./ui');
15
15
  const { runPostInstallBridge } = require('./post-install-bridge');
16
16
 
17
- const DEFAULT_REPO_URL = 'https://github.com/Colin4k1024/harness-engineering.git';
17
+ const DEFAULT_REPO_URL = 'https://github.com/Colin4k1024/tsp.git';
18
18
  const DEFAULT_CLONE_DIR = path.join(os.homedir(), '.tsp-source');
19
19
 
20
20
  function listMissingProductionDependencies(projectRoot) {
@@ -112,7 +112,7 @@ async function runSourceInstall(intent) {
112
112
  try {
113
113
  ui.info('Installing claude-mem plugin ...');
114
114
  execSync('npx --yes claude-mem install', { stdio: 'inherit' });
115
- } catch (e) {
115
+ } catch (_e) {
116
116
  ui.warn('claude-mem install failed — run "npx claude-mem install" manually if needed.');
117
117
  }
118
118
  }
@@ -34,8 +34,8 @@
34
34
  2. 默认以 `karpathy-guidelines` 的方式先暴露歧义、范围边界与更简单路径,不在入口阶段静默替用户补全高风险假设。
35
35
  3. 检查现有证据是否齐备:PRD、delivery-plan、arch-design、handoff、execute-log、test-plan、launch-acceptance、deployment-context、release-plan、closeout-summary,以及 `docs/memory/project-context.md`。
36
36
  4. 若任务边界清晰、影响面小、风险低,优先推荐 `/quick`;否则继续沿 `/team-*` 主链推进。
37
- 5. 若是既有项目(brownfield)且现状上下文不足,优先建议执行 `/update-codemaps` 并启用 `doc-architecture`,需要轻量结构证据时选择 Graphify,需要跨模块影响面或 MCP 证据时选择 GitNexus,再把现有模块、集成点、关键数据流和历史包袱回落到 `delivery-plan.md` / `arch-design.md`。
37
+ 5. 若是既有项目(brownfield)且现状上下文不足,优先建议执行 `/update-codemaps` 并启用 `doc-architecture`;默认用 CodeGraph MCP-backed 符号、调用链和影响面证据,需要轻量结构证据时选择 Graphify,需要跨模块或多仓影响面时选择 GitNexus,再把现有模块、集成点、关键数据流和历史包袱回落到 `delivery-plan.md` / `arch-design.md`。
38
38
  6. 若需求规模较大或涉及多角色并行,实现前先要求把计划切成可独立验收、可独立 handoff 的 story-sized execution units,并确认 `artifact:persist` 已创建对应任务目录与关键 artifact,再进入 `/team-execute`。
39
39
  7. 若缺少 PRD 或需求边界,推荐 `/team-intake`;若缺少 challenge、design review 或 implementation-readiness,推荐 `/team-plan`;若 readiness proof 与 handoff 齐备,推荐 `/team-execute`;若已完成实现与自测,推荐 `/team-review`;若已获得放行,推荐 `/team-release`;若发布观察窗口结束,推荐 `/team-closeout`。
40
- 8. 若是既有项目且上下文不足,提示先补齐 brownfield / doc-architecture 类上下文;必要时用 Graphify 或 GitNexus 补图谱证据,再进入计划或执行。
40
+ 8. 若是既有项目且上下文不足,提示先补齐 brownfield / doc-architecture 类上下文;必要时用 CodeGraph、Graphify 或 GitNexus 补图谱证据,再进入计划或执行。
41
41
  9. 输出结构化建议:推荐命令、原因、阻塞项、降级路径,并说明是否需要先运行 `npm run workflow:readiness`。
@@ -40,7 +40,7 @@
40
40
  2. 默认把 `karpathy-guidelines` 作为计划收口护栏:要求显式写出假设、更简单备选路径、当前不做项,以及为什么本轮范围已经足够。
41
41
  3. 按任务特征装配动态讨论分组,先讨论再收敛,避免未经质疑直接进入计划冻结。
42
42
  4. 若启用 `doc-architecture`,补齐 Service Catalog、Communication Matrix、NFR Summary,并明确其 artifact 回落位置。
43
- 5. 若是既有项目(brownfield),先梳理现有模块边界、外部依赖、历史约束和缺失文档;必要时运行 `/update-codemaps`,需要轻量结构证据时选择 Graphify,需要跨模块影响面或 MCP 证据时选择 GitNexus,再把 brownfield snapshot 回落到 `delivery-plan.md` 与 `arch-design.md`。
43
+ 5. 若是既有项目(brownfield),先梳理现有模块边界、外部依赖、历史约束和缺失文档;必要时运行 `/update-codemaps`,默认用 CodeGraph MCP-backed 符号、调用链和影响面证据,需要轻量结构证据时选择 Graphify,需要跨模块或多仓影响面时选择 GitNexus,再把 brownfield snapshot 回落到 `delivery-plan.md` 与 `arch-design.md`。
44
44
  6. 若为企业内部应用,锁定应用等级、技术架构等级、关键组件偏离和资产入口要求,并判断是否必须输出 ADR。
45
45
  7. 为本次任务显式装配 shared 能力、ECC 增强与可选 enterprise overlay 组合,并说明哪些私有 overlay 能力、runbook 或 overlay 仅按场景启用。
46
46
  8. 若存在多参数、多角色、多配置或多终端组合,提前判断是否需要 `pairwise-test-design` 压缩测试矩阵。
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## 用途
6
6
 
7
- 扫描代码结构并生成 token-lean codemaps,适合作为 brownfield 项目的现状快照与 Graphify / GitNexus 图谱分析前置上下文。
7
+ 扫描代码结构并生成 token-lean codemaps,适合作为 brownfield 项目的现状快照与 CodeGraph / Graphify / GitNexus 图谱分析前置上下文。
8
8
 
9
9
  ## 主责角色
10
10
 
@@ -21,7 +21,7 @@
21
21
  - docs/CODEMAPS/ 下的结构化 codemap
22
22
  - .reports/codemap-diff.txt 差异摘要
23
23
  - 可供 `/team-help` / `/team-plan` 消费的 brownfield context
24
- - 可供 Graphify / GitNexus 继续深挖的结构化问题清单
24
+ - 可供 CodeGraph / Graphify / GitNexus 继续深挖的结构化问题清单
25
25
 
26
26
  输出字段定义与交付结构见 [team-command-output-contracts.md](../docs/runbooks/team-command-output-contracts.md)。
27
27
 
@@ -30,4 +30,4 @@
30
30
  1. 先识别仓库类型、源码目录、入口文件和主要依赖边界。
31
31
  2. 为 architecture/backend/frontend/data/dependencies 生成 token-lean 文档,不写实现细节噪音。
32
32
  3. 若已有 codemap,先比较变更比例;超过阈值时要求人工确认再覆盖。
33
- 4. 把结果作为 brownfield context snapshot 的辅助输入;若需要图谱证据,再选择 Graphify 或 GitNexus,并把结论回落到 `delivery-plan.md` / `arch-design.md`,不要形成平行事实源。
33
+ 4. 把结果作为 brownfield context snapshot 的辅助输入;若需要图谱证据,再选择 CodeGraph、Graphify 或 GitNexus,并把结论回落到 `delivery-plan.md` / `arch-design.md`,不要形成平行事实源。
@@ -140,7 +140,7 @@
140
140
  {
141
141
  "id": "capability:knowledge-graph",
142
142
  "family": "capability",
143
- "description": "Optional Graphify and GitNexus code-graph capabilities for repository structure reasoning, dependency paths, and impact analysis.",
143
+ "description": "Default CodeGraph plus optional Graphify and GitNexus code-graph capabilities for repository structure reasoning, dependency paths, and impact analysis.",
144
144
  "modules": [
145
145
  "knowledge-graph"
146
146
  ]
@@ -12,6 +12,8 @@
12
12
  "claude",
13
13
  "cursor",
14
14
  "antigravity",
15
+ "codex",
16
+ "opencode",
15
17
  "codebuddy",
16
18
  "copilot",
17
19
  "windsurf",
@@ -90,6 +92,7 @@
90
92
  "description": "Baseline platform configs, package-manager setup, and MCP catalog.",
91
93
  "paths": [
92
94
  ".claude-plugin",
95
+ ".codex-plugin",
93
96
  ".cursor",
94
97
  ".opencode-plugin",
95
98
  "mcp-configs"
@@ -293,13 +296,24 @@
293
296
  {
294
297
  "id": "knowledge-graph",
295
298
  "kind": "skills",
296
- "description": "Optional Graphify and GitNexus code-graph capabilities for brownfield structure discovery, architecture Q&A, impact analysis, and evidence capture.",
299
+ "description": "Default CodeGraph plus optional Graphify and GitNexus code-graph capabilities for brownfield structure discovery, architecture Q&A, impact analysis, and evidence capture.",
297
300
  "paths": [
301
+ "skills/codegraph",
298
302
  "skills/graphify",
299
303
  "skills/gitnexus",
304
+ "docs/runbooks/codegraph-code-intelligence-usage.md",
300
305
  "docs/runbooks/graphify-knowledge-graph-usage.md",
301
- "docs/runbooks/gitnexus-code-intelligence-usage.md"
306
+ "docs/runbooks/gitnexus-code-intelligence-usage.md",
307
+ "scripts/codegraph-preflight.js",
308
+ "scripts/install-codegraph.js"
302
309
  ],
310
+ "externalInstall": {
311
+ "id": "codegraph",
312
+ "description": "Run the upstream CodeGraph installer through a TSP target-scoped wrapper; never uses --target=auto and never initializes project indexes.",
313
+ "command": "node",
314
+ "script": "scripts/install-codegraph.js",
315
+ "args": []
316
+ },
303
317
  "targets": [
304
318
  "claude",
305
319
  "cursor",
@@ -311,7 +325,7 @@
311
325
  "dependencies": [
312
326
  "platform-configs"
313
327
  ],
314
- "defaultInstall": false,
328
+ "defaultInstall": true,
315
329
  "cost": "medium",
316
330
  "stability": "beta"
317
331
  },
@@ -23,6 +23,7 @@
23
23
  "workflow-quality",
24
24
  "framework-language",
25
25
  "database",
26
+ "knowledge-graph",
26
27
  "workflow-engine",
27
28
  "workflow-defaults",
28
29
  "orchestration"
@@ -101,6 +102,7 @@
101
102
  "workflow-quality",
102
103
  "framework-language",
103
104
  "database",
105
+ "knowledge-graph",
104
106
  "workflow-engine",
105
107
  "workflow-defaults",
106
108
  "design-prototyping",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colin4k1024/tsp",
3
- "version": "2.4.5",
3
+ "version": "2.4.6",
4
4
  "description": "Open-source Team Skills Platform for role-based AI delivery workflows, shared skills, hooks, commands, and multi-platform installs.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,6 +42,7 @@
42
42
  "validate:docs-freshness": "node scripts/validate-doc-freshness.js",
43
43
  "graphify:doctor": "node scripts/graphify-preflight.js",
44
44
  "gitnexus:doctor": "node scripts/gitnexus-preflight.js",
45
+ "codegraph:doctor": "node scripts/codegraph-preflight.js",
45
46
  "validate:skill-structure": "node scripts/validate-skill-structure.js",
46
47
  "validate:prebuilt": "node scripts/validate-prebuilt.js",
47
48
  "validate:tarball": "node scripts/validate-packed-tarball.js",
@@ -57,6 +58,7 @@
57
58
  "workflow:validate": "node scripts/validate-workflows.js",
58
59
  "audit:query": "node scripts/query-audit-logs.js",
59
60
  "install:claude": "node scripts/install-apply.js --profile full --target claude && npx --yes claude-mem install",
61
+ "install:claude-code": "node scripts/install-apply.js --profile full --target claude && npx --yes claude-mem install",
60
62
  "install:codex": "node scripts/install-apply.js --profile full --target codex",
61
63
  "install:cursor": "node scripts/install-apply.js --profile full --target cursor",
62
64
  "install:opencode": "node scripts/install-apply.js --profile full --target opencode",
@@ -90,7 +92,6 @@
90
92
  "commands/",
91
93
  "roles/",
92
94
  "templates/",
93
- "docs/",
94
95
  "hooks/",
95
96
  "contexts/",
96
97
  "examples/",
@@ -102,6 +103,7 @@
102
103
  "LICENSE"
103
104
  ],
104
105
  "dependencies": {
106
+ "@colbymchenry/codegraph": "^0.7.12",
105
107
  "@iarna/toml": "^2.2.5",
106
108
  "@inquirer/prompts": "^7.5.0",
107
109
  "ajv": "^8.18.0",
@@ -116,5 +118,6 @@
116
118
  "globals": "^17.1.0",
117
119
  "markdownlint-cli": "^0.48.0",
118
120
  "vitepress": "^1.6.4"
119
- }
121
+ },
122
+ "packageManager": "pnpm@11.0.9+sha512.34ce82e6780233cf9cad8685029a8f81d2e06196c5a9bad98879f7424940c6817c4e4524fb7d38b8553ceed48b9758b8ebaf1abd3600c232c4c8cf7366086f38"
120
123
  }
@@ -19,12 +19,17 @@
19
19
  "type": "string",
20
20
  "enum": [
21
21
  "claude",
22
+ "claude-code",
23
+ "claudecode",
22
24
  "cursor",
23
25
  "antigravity",
24
26
  "codex",
25
27
  "gemini",
26
28
  "opencode",
27
- "codebuddy"
29
+ "codebuddy",
30
+ "copilot",
31
+ "windsurf",
32
+ "augment"
28
33
  ]
29
34
  },
30
35
  "profile": {
@@ -53,7 +53,10 @@
53
53
  "codex",
54
54
  "gemini",
55
55
  "opencode",
56
- "codebuddy"
56
+ "codebuddy",
57
+ "copilot",
58
+ "windsurf",
59
+ "augment"
57
60
  ]
58
61
  }
59
62
  },
@@ -0,0 +1,179 @@
1
+ #!/usr/bin/env node
2
+ 'use strict'
3
+
4
+ const fs = require('fs')
5
+ const path = require('path')
6
+ const { spawnSync } = require('child_process')
7
+ const { buildInstallCommand, mapTarget } = require('./install-codegraph')
8
+
9
+ const MIN_NODE_MAJOR = 18
10
+ const MAX_NODE_MAJOR_EXCLUSIVE = 25
11
+ const PACKAGE_NAME = '@colbymchenry/codegraph'
12
+
13
+ function parseNodeVersion(text) {
14
+ const match = String(text || '').trim().match(/^v?(\d+)\.(\d+)\.(\d+)/)
15
+ if (!match) {
16
+ return null
17
+ }
18
+ return {
19
+ major: Number(match[1]),
20
+ minor: Number(match[2]),
21
+ patch: Number(match[3]),
22
+ raw: `${match[1]}.${match[2]}.${match[3]}`,
23
+ }
24
+ }
25
+
26
+ function isNodeSupported(version) {
27
+ return Boolean(
28
+ version
29
+ && version.major >= MIN_NODE_MAJOR
30
+ && version.major < MAX_NODE_MAJOR_EXCLUSIVE
31
+ )
32
+ }
33
+
34
+ function loadPackageMetadata() {
35
+ if (process.env.CODEGRAPH_PREFLIGHT_PACKAGE_JSON) {
36
+ return {
37
+ ok: true,
38
+ source: 'env',
39
+ metadata: JSON.parse(process.env.CODEGRAPH_PREFLIGHT_PACKAGE_JSON),
40
+ }
41
+ }
42
+
43
+ try {
44
+ const packageJsonPath = require.resolve(`${PACKAGE_NAME}/package.json`)
45
+ return {
46
+ ok: true,
47
+ source: packageJsonPath,
48
+ metadata: JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')),
49
+ }
50
+ } catch (error) {
51
+ return {
52
+ ok: false,
53
+ source: 'node-resolution',
54
+ warning: error.message || String(error),
55
+ }
56
+ }
57
+ }
58
+
59
+ function detectCli(target) {
60
+ if (process.env.CODEGRAPH_PREFLIGHT_SKIP_CLI === '1') {
61
+ return {
62
+ ok: true,
63
+ command: '(skipped)',
64
+ output: 'skipped by CODEGRAPH_PREFLIGHT_SKIP_CLI',
65
+ }
66
+ }
67
+
68
+ let install
69
+ try {
70
+ install = buildInstallCommand(target || 'codex')
71
+ } catch (error) {
72
+ return {
73
+ ok: false,
74
+ command: 'codegraph',
75
+ output: error.message || String(error),
76
+ }
77
+ }
78
+
79
+ if (!install.supported) {
80
+ return {
81
+ ok: true,
82
+ command: '(unsupported target skipped)',
83
+ output: install.reason,
84
+ }
85
+ }
86
+
87
+ const args = install.args.slice(0, install.args.length - 4).concat(['--help'])
88
+ const result = spawnSync(install.command, args, {
89
+ encoding: 'utf8',
90
+ timeout: 8000,
91
+ })
92
+
93
+ if (result.error || result.status !== 0) {
94
+ return {
95
+ ok: false,
96
+ command: install.command,
97
+ output: result.error ? result.error.message : `${result.stdout || ''}${result.stderr || ''}`.trim(),
98
+ }
99
+ }
100
+
101
+ return {
102
+ ok: true,
103
+ command: install.command,
104
+ output: 'codegraph --help',
105
+ }
106
+ }
107
+
108
+ function main() {
109
+ console.log('CodeGraph preflight check')
110
+ console.log('=========================')
111
+
112
+ const target = process.env.TSP_INSTALL_TARGET || process.env.CODEGRAPH_PREFLIGHT_TARGET || ''
113
+ const nodeVersion = parseNodeVersion(process.env.CODEGRAPH_PREFLIGHT_NODE_VERSION || process.version)
114
+ const packageInfo = loadPackageMetadata()
115
+ const cli = detectCli(target)
116
+ const mappedTarget = target ? mapTarget(target) : null
117
+ let hasFailure = false
118
+
119
+ if (!nodeVersion) {
120
+ hasFailure = true
121
+ console.log(`- Node: unable to detect version (requires >= ${MIN_NODE_MAJOR} and < ${MAX_NODE_MAJOR_EXCLUSIVE})`)
122
+ } else if (!isNodeSupported(nodeVersion)) {
123
+ hasFailure = true
124
+ console.log(`- Node: ${nodeVersion.raw} (requires >= ${MIN_NODE_MAJOR} and < ${MAX_NODE_MAJOR_EXCLUSIVE})`)
125
+ } else {
126
+ console.log(`- Node: ${nodeVersion.raw} (ok)`)
127
+ }
128
+
129
+ if (packageInfo.ok && packageInfo.metadata) {
130
+ const engine = packageInfo.metadata.engines && packageInfo.metadata.engines.node
131
+ ? packageInfo.metadata.engines.node
132
+ : '(not declared)'
133
+ console.log(`- CodeGraph package: ${packageInfo.metadata.version || '(unknown)'} (license ${packageInfo.metadata.license || '(unknown)'}, node ${engine})`)
134
+ } else {
135
+ hasFailure = true
136
+ console.log(`- CodeGraph package: unavailable (${packageInfo.warning || 'not installed'})`)
137
+ }
138
+
139
+ if (!cli.ok) {
140
+ hasFailure = true
141
+ console.log(`- CodeGraph CLI: unavailable (${cli.output || cli.command})`)
142
+ } else {
143
+ console.log(`- CodeGraph CLI: ${cli.output} (ok)`)
144
+ }
145
+
146
+ if (target) {
147
+ if (mappedTarget) {
148
+ console.log(`- TSP target: ${target} -> CodeGraph target ${mappedTarget} (ok)`)
149
+ } else {
150
+ console.log(`- TSP target: ${target} (unsupported by upstream installer; wrapper will skip)`)
151
+ }
152
+ } else {
153
+ console.log('- TSP target: not provided (doctor only)')
154
+ }
155
+
156
+ console.log('\nControlled integration boundaries:')
157
+ console.log('- TSP calls CodeGraph installer with the current target only; it never uses --target=auto.')
158
+ console.log('- TSP install does not run `codegraph init -i`; initialize indexes inside target projects only.')
159
+ console.log('- Do not commit `.codegraph/` databases as TSP artifacts.')
160
+
161
+ if (hasFailure) {
162
+ console.log('\nFix failed checks before applying the CodeGraph integration.')
163
+ process.exit(1)
164
+ }
165
+
166
+ console.log('\nRecommended next commands:')
167
+ console.log('- npm run codegraph:doctor')
168
+ console.log('- codegraph init -i')
169
+ console.log('- codegraph status')
170
+ }
171
+
172
+ if (require.main === module) {
173
+ main()
174
+ }
175
+
176
+ module.exports = {
177
+ isNodeSupported,
178
+ parseNodeVersion,
179
+ }
@@ -46,6 +46,14 @@ function isNodeSupported(version) {
46
46
  }
47
47
 
48
48
  function detectCommand(command) {
49
+ if (process.env.GITNEXUS_PREFLIGHT_SKIP_COMMANDS === '1') {
50
+ return {
51
+ ok: true,
52
+ command,
53
+ output: 'skipped by test fixture',
54
+ }
55
+ }
56
+
49
57
  const result = run(command, ['--version'])
50
58
  if (result.error || result.status !== 0) {
51
59
  return {
@@ -8,12 +8,10 @@
8
8
 
9
9
  const os = require('os');
10
10
  const {
11
- SUPPORTED_INSTALL_TARGETS,
12
11
  listLegacyCompatibilityLanguages,
13
12
  resolveInstallPlan,
14
13
  } = require('./lib/install-manifests');
15
14
  const {
16
- LEGACY_INSTALL_TARGETS,
17
15
  normalizeInstallRequest,
18
16
  parseInstallArgs,
19
17
  } = require('./lib/install/request');
@@ -24,6 +22,7 @@ const {
24
22
  uninstallInstalledStates,
25
23
  } = require('./lib/install-lifecycle');
26
24
  const { deriveInstallManifestPath } = require('./lib/install-audit-manifest');
25
+ const { PUBLIC_INSTALL_TARGETS } = require('./lib/install-targets/registry');
27
26
 
28
27
  const LIFECYCLE_COMMANDS = new Set(['plan', 'status', 'doctor', 'repair', 'uninstall']);
29
28
 
@@ -109,16 +108,19 @@ function evaluateCodexKnownRisk(planLike) {
109
108
 
110
109
  function getHelpText(command = 'all') {
111
110
  const languages = listLegacyCompatibilityLanguages();
111
+ const publicTargets = [...PUBLIC_INSTALL_TARGETS, 'claude-code', 'claudecode'];
112
112
  const planUsage = `
113
- Usage: install.sh [plan] [--target <${LEGACY_INSTALL_TARGETS.join('|')}>] [--dry-run] [--json] <language> [<language> ...]
114
- install.sh [plan] [--target <${SUPPORTED_INSTALL_TARGETS.join('|')}>] [--dry-run] [--json] [--overlay <id>]... --profile <name> [--with <component>]... [--without <component>]...
115
- install.sh [plan] [--target <${SUPPORTED_INSTALL_TARGETS.join('|')}>] [--dry-run] [--json] [--overlay <id>]... --modules <id,id,...> [--with <component>]... [--without <component>]...
113
+ Usage: install.sh [plan] [--target <${publicTargets.join('|')}>] [--dry-run] [--json] <language> [<language> ...]
114
+ install.sh [plan] [--target <${publicTargets.join('|')}>] [--dry-run] [--json] [--overlay <id>]... --profile <name> [--with <component>]... [--without <component>]...
115
+ install.sh [plan] [--target <${publicTargets.join('|')}>] [--dry-run] [--json] [--overlay <id>]... --modules <id,id,...> [--with <component>]... [--without <component>]...
116
116
  install.sh [plan] [--dry-run] [--json] --config <path>
117
117
 
118
118
  Targets:
119
- claude (default) - Install rules to ~/.claude/rules/
120
- cursor - Install rules, hooks, and bundled Cursor configs to ./.cursor/
121
- antigravity - Install rules, workflows, skills, and agents to ./.agent/
119
+ claude (default) - Install Claude Code assets to ~/.claude/
120
+ codex - Install Codex assets to ~/.codex/ and register the plugin
121
+ opencode - Install OpenCode assets to ~/.config/opencode/
122
+ claude-code - Alias for claude
123
+ claudecode - Alias for claude
122
124
 
123
125
  Options:
124
126
  --profile <name> Resolve and install a manifest profile