@mycodemap/mycodemap 0.1.0 → 0.2.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 (283) hide show
  1. package/CHANGELOG.md +164 -6
  2. package/README.md +407 -141
  3. package/dist/cli/commands/ci.d.ts +7 -1
  4. package/dist/cli/commands/ci.d.ts.map +1 -1
  5. package/dist/cli/commands/ci.js +38 -0
  6. package/dist/cli/commands/ci.js.map +1 -1
  7. package/dist/cli/commands/cycles.d.ts.map +1 -1
  8. package/dist/cli/commands/cycles.js +2 -0
  9. package/dist/cli/commands/cycles.js.map +1 -1
  10. package/dist/cli/commands/export.d.ts +6 -0
  11. package/dist/cli/commands/export.d.ts.map +1 -0
  12. package/dist/cli/commands/export.js +108 -0
  13. package/dist/cli/commands/export.js.map +1 -0
  14. package/dist/cli/commands/generate.d.ts.map +1 -1
  15. package/dist/cli/commands/generate.js +96 -0
  16. package/dist/cli/commands/generate.js.map +1 -1
  17. package/dist/cli/commands/init.d.ts.map +1 -1
  18. package/dist/cli/commands/init.js +3 -1
  19. package/dist/cli/commands/init.js.map +1 -1
  20. package/dist/cli/commands/logs.d.ts +5 -0
  21. package/dist/cli/commands/logs.d.ts.map +1 -0
  22. package/dist/cli/commands/logs.js +189 -0
  23. package/dist/cli/commands/logs.js.map +1 -0
  24. package/dist/cli/commands/report.d.ts +12 -0
  25. package/dist/cli/commands/report.d.ts.map +1 -0
  26. package/dist/cli/commands/report.js +158 -0
  27. package/dist/cli/commands/report.js.map +1 -0
  28. package/dist/cli/commands/server.d.ts +9 -0
  29. package/dist/cli/commands/server.d.ts.map +1 -0
  30. package/dist/cli/commands/server.js +68 -0
  31. package/dist/cli/commands/server.js.map +1 -0
  32. package/dist/cli/commands/watch-foreground.d.ts.map +1 -1
  33. package/dist/cli/commands/watch-foreground.js +2 -0
  34. package/dist/cli/commands/watch-foreground.js.map +1 -1
  35. package/dist/cli/commands/watch.d.ts.map +1 -1
  36. package/dist/cli/commands/watch.js +2 -0
  37. package/dist/cli/commands/watch.js.map +1 -1
  38. package/dist/cli/first-run-guide.d.ts +23 -0
  39. package/dist/cli/first-run-guide.d.ts.map +1 -0
  40. package/dist/cli/first-run-guide.js +83 -0
  41. package/dist/cli/first-run-guide.js.map +1 -0
  42. package/dist/cli/index.js +85 -1
  43. package/dist/cli/index.js.map +1 -1
  44. package/dist/cli/platform-check.d.ts +21 -0
  45. package/dist/cli/platform-check.d.ts.map +1 -0
  46. package/dist/cli/platform-check.js +94 -0
  47. package/dist/cli/platform-check.js.map +1 -0
  48. package/dist/cli/tree-sitter-check.d.ts +35 -0
  49. package/dist/cli/tree-sitter-check.d.ts.map +1 -0
  50. package/dist/cli/tree-sitter-check.js +133 -0
  51. package/dist/cli/tree-sitter-check.js.map +1 -0
  52. package/dist/cli/utils/sanitize.d.ts +54 -0
  53. package/dist/cli/utils/sanitize.d.ts.map +1 -0
  54. package/dist/cli/utils/sanitize.js +131 -0
  55. package/dist/cli/utils/sanitize.js.map +1 -0
  56. package/dist/cli-new/commands/export.d.ts +15 -0
  57. package/dist/cli-new/commands/export.d.ts.map +1 -0
  58. package/dist/cli-new/commands/export.js +107 -0
  59. package/dist/cli-new/commands/export.js.map +1 -0
  60. package/dist/cli-new/commands/query.d.ts +14 -0
  61. package/dist/cli-new/commands/query.d.ts.map +1 -0
  62. package/dist/cli-new/commands/query.js +120 -0
  63. package/dist/cli-new/commands/query.js.map +1 -0
  64. package/dist/cli-new/commands/server.d.ts +13 -0
  65. package/dist/cli-new/commands/server.d.ts.map +1 -0
  66. package/dist/cli-new/commands/server.js +94 -0
  67. package/dist/cli-new/commands/server.js.map +1 -0
  68. package/dist/cli-new/index.d.ts +11 -0
  69. package/dist/cli-new/index.d.ts.map +1 -0
  70. package/dist/cli-new/index.js +63 -0
  71. package/dist/cli-new/index.js.map +1 -0
  72. package/dist/cli-new/types/index.d.ts +88 -0
  73. package/dist/cli-new/types/index.d.ts.map +1 -0
  74. package/dist/cli-new/types/index.js +7 -0
  75. package/dist/cli-new/types/index.js.map +1 -0
  76. package/dist/domain/entities/CodeGraph.d.ts +134 -0
  77. package/dist/domain/entities/CodeGraph.d.ts.map +1 -0
  78. package/dist/domain/entities/CodeGraph.js +316 -0
  79. package/dist/domain/entities/CodeGraph.js.map +1 -0
  80. package/dist/domain/entities/Dependency.d.ts +78 -0
  81. package/dist/domain/entities/Dependency.d.ts.map +1 -0
  82. package/dist/domain/entities/Dependency.js +132 -0
  83. package/dist/domain/entities/Dependency.js.map +1 -0
  84. package/dist/domain/entities/Module.d.ts +75 -0
  85. package/dist/domain/entities/Module.d.ts.map +1 -0
  86. package/dist/domain/entities/Module.js +151 -0
  87. package/dist/domain/entities/Module.js.map +1 -0
  88. package/dist/domain/entities/Project.d.ts +50 -0
  89. package/dist/domain/entities/Project.d.ts.map +1 -0
  90. package/dist/domain/entities/Project.js +99 -0
  91. package/dist/domain/entities/Project.js.map +1 -0
  92. package/dist/domain/entities/Symbol.d.ts +75 -0
  93. package/dist/domain/entities/Symbol.d.ts.map +1 -0
  94. package/dist/domain/entities/Symbol.js +130 -0
  95. package/dist/domain/entities/Symbol.js.map +1 -0
  96. package/dist/domain/events/DomainEvent.d.ts +76 -0
  97. package/dist/domain/events/DomainEvent.d.ts.map +1 -0
  98. package/dist/domain/events/DomainEvent.js +153 -0
  99. package/dist/domain/events/DomainEvent.js.map +1 -0
  100. package/dist/domain/index.d.ts +10 -0
  101. package/dist/domain/index.d.ts.map +1 -0
  102. package/dist/domain/index.js +18 -0
  103. package/dist/domain/index.js.map +1 -0
  104. package/dist/domain/repositories/CodeGraphRepository.d.ts +58 -0
  105. package/dist/domain/repositories/CodeGraphRepository.d.ts.map +1 -0
  106. package/dist/domain/repositories/CodeGraphRepository.js +37 -0
  107. package/dist/domain/repositories/CodeGraphRepository.js.map +1 -0
  108. package/dist/domain/services/CodeGraphBuilder.d.ts +50 -0
  109. package/dist/domain/services/CodeGraphBuilder.d.ts.map +1 -0
  110. package/dist/domain/services/CodeGraphBuilder.js +121 -0
  111. package/dist/domain/services/CodeGraphBuilder.js.map +1 -0
  112. package/dist/infrastructure/parser/implementations/GoParser.d.ts +25 -0
  113. package/dist/infrastructure/parser/implementations/GoParser.d.ts.map +1 -0
  114. package/dist/infrastructure/parser/implementations/GoParser.js +158 -0
  115. package/dist/infrastructure/parser/implementations/GoParser.js.map +1 -0
  116. package/dist/infrastructure/parser/implementations/PythonParser.d.ts +30 -0
  117. package/dist/infrastructure/parser/implementations/PythonParser.d.ts.map +1 -0
  118. package/dist/infrastructure/parser/implementations/PythonParser.js +201 -0
  119. package/dist/infrastructure/parser/implementations/PythonParser.js.map +1 -0
  120. package/dist/infrastructure/parser/implementations/TypeScriptParser.d.ts +63 -0
  121. package/dist/infrastructure/parser/implementations/TypeScriptParser.d.ts.map +1 -0
  122. package/dist/infrastructure/parser/implementations/TypeScriptParser.js +420 -0
  123. package/dist/infrastructure/parser/implementations/TypeScriptParser.js.map +1 -0
  124. package/dist/infrastructure/parser/index.d.ts +13 -0
  125. package/dist/infrastructure/parser/index.d.ts.map +1 -0
  126. package/dist/infrastructure/parser/index.js +32 -0
  127. package/dist/infrastructure/parser/index.js.map +1 -0
  128. package/dist/infrastructure/parser/interfaces/ParserBase.d.ts +124 -0
  129. package/dist/infrastructure/parser/interfaces/ParserBase.d.ts.map +1 -0
  130. package/dist/infrastructure/parser/interfaces/ParserBase.js +200 -0
  131. package/dist/infrastructure/parser/interfaces/ParserBase.js.map +1 -0
  132. package/dist/infrastructure/parser/registry/ParserRegistry.d.ts +68 -0
  133. package/dist/infrastructure/parser/registry/ParserRegistry.d.ts.map +1 -0
  134. package/dist/infrastructure/parser/registry/ParserRegistry.js +116 -0
  135. package/dist/infrastructure/parser/registry/ParserRegistry.js.map +1 -0
  136. package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.d.ts +44 -0
  137. package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.d.ts.map +1 -0
  138. package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.js +129 -0
  139. package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.js.map +1 -0
  140. package/dist/infrastructure/repositories/index.d.ts +3 -0
  141. package/dist/infrastructure/repositories/index.d.ts.map +1 -0
  142. package/dist/infrastructure/repositories/index.js +7 -0
  143. package/dist/infrastructure/repositories/index.js.map +1 -0
  144. package/dist/infrastructure/storage/StorageFactory.d.ts +53 -0
  145. package/dist/infrastructure/storage/StorageFactory.d.ts.map +1 -0
  146. package/dist/infrastructure/storage/StorageFactory.js +150 -0
  147. package/dist/infrastructure/storage/StorageFactory.js.map +1 -0
  148. package/dist/infrastructure/storage/adapters/FileSystemStorage.d.ts +52 -0
  149. package/dist/infrastructure/storage/adapters/FileSystemStorage.d.ts.map +1 -0
  150. package/dist/infrastructure/storage/adapters/FileSystemStorage.js +315 -0
  151. package/dist/infrastructure/storage/adapters/FileSystemStorage.js.map +1 -0
  152. package/dist/infrastructure/storage/adapters/KuzuDBStorage.d.ts +52 -0
  153. package/dist/infrastructure/storage/adapters/KuzuDBStorage.d.ts.map +1 -0
  154. package/dist/infrastructure/storage/adapters/KuzuDBStorage.js +235 -0
  155. package/dist/infrastructure/storage/adapters/KuzuDBStorage.js.map +1 -0
  156. package/dist/infrastructure/storage/adapters/MemoryStorage.d.ts +37 -0
  157. package/dist/infrastructure/storage/adapters/MemoryStorage.d.ts.map +1 -0
  158. package/dist/infrastructure/storage/adapters/MemoryStorage.js +229 -0
  159. package/dist/infrastructure/storage/adapters/MemoryStorage.js.map +1 -0
  160. package/dist/infrastructure/storage/adapters/Neo4jStorage.d.ts +49 -0
  161. package/dist/infrastructure/storage/adapters/Neo4jStorage.d.ts.map +1 -0
  162. package/dist/infrastructure/storage/adapters/Neo4jStorage.js +222 -0
  163. package/dist/infrastructure/storage/adapters/Neo4jStorage.js.map +1 -0
  164. package/dist/infrastructure/storage/index.d.ts +6 -0
  165. package/dist/infrastructure/storage/index.d.ts.map +1 -0
  166. package/dist/infrastructure/storage/index.js +13 -0
  167. package/dist/infrastructure/storage/index.js.map +1 -0
  168. package/dist/infrastructure/storage/interfaces/StorageBase.d.ts +76 -0
  169. package/dist/infrastructure/storage/interfaces/StorageBase.d.ts.map +1 -0
  170. package/dist/infrastructure/storage/interfaces/StorageBase.js +116 -0
  171. package/dist/infrastructure/storage/interfaces/StorageBase.js.map +1 -0
  172. package/dist/interface/config/index.d.ts +102 -0
  173. package/dist/interface/config/index.d.ts.map +1 -0
  174. package/dist/interface/config/index.js +7 -0
  175. package/dist/interface/config/index.js.map +1 -0
  176. package/dist/interface/types/index.d.ts +425 -0
  177. package/dist/interface/types/index.d.ts.map +1 -0
  178. package/dist/interface/types/index.js +8 -0
  179. package/dist/interface/types/index.js.map +1 -0
  180. package/dist/interface/types/parser.d.ts +103 -0
  181. package/dist/interface/types/parser.d.ts.map +1 -0
  182. package/dist/interface/types/parser.js +7 -0
  183. package/dist/interface/types/parser.js.map +1 -0
  184. package/dist/interface/types/storage.d.ts +98 -0
  185. package/dist/interface/types/storage.d.ts.map +1 -0
  186. package/dist/interface/types/storage.js +7 -0
  187. package/dist/interface/types/storage.js.map +1 -0
  188. package/dist/orchestrator/test-linker.js +1 -1
  189. package/dist/orchestrator/test-linker.js.map +1 -1
  190. package/dist/server/CodeMapServer.d.ts +51 -0
  191. package/dist/server/CodeMapServer.d.ts.map +1 -0
  192. package/dist/server/CodeMapServer.js +146 -0
  193. package/dist/server/CodeMapServer.js.map +1 -0
  194. package/dist/server/handlers/AnalysisHandler.d.ts +82 -0
  195. package/dist/server/handlers/AnalysisHandler.d.ts.map +1 -0
  196. package/dist/server/handlers/AnalysisHandler.js +196 -0
  197. package/dist/server/handlers/AnalysisHandler.js.map +1 -0
  198. package/dist/server/handlers/QueryHandler.d.ts +57 -0
  199. package/dist/server/handlers/QueryHandler.d.ts.map +1 -0
  200. package/dist/server/handlers/QueryHandler.js +260 -0
  201. package/dist/server/handlers/QueryHandler.js.map +1 -0
  202. package/dist/server/index.d.ts +7 -0
  203. package/dist/server/index.d.ts.map +1 -0
  204. package/dist/server/index.js +13 -0
  205. package/dist/server/index.js.map +1 -0
  206. package/dist/server/routes/api.d.ts +8 -0
  207. package/dist/server/routes/api.d.ts.map +1 -0
  208. package/dist/server/routes/api.js +372 -0
  209. package/dist/server/routes/api.js.map +1 -0
  210. package/dist/server/types/index.d.ts +171 -0
  211. package/dist/server/types/index.d.ts.map +1 -0
  212. package/dist/server/types/index.js +7 -0
  213. package/dist/server/types/index.js.map +1 -0
  214. package/dist/types/index.d.ts +6 -372
  215. package/dist/types/index.d.ts.map +1 -1
  216. package/dist/types/index.js +9 -3
  217. package/dist/types/index.js.map +1 -1
  218. package/docs/AI_ASSISTANT_SETUP.md +811 -0
  219. package/docs/PUBLISHING.md +162 -0
  220. package/docs/README.md +37 -0
  221. package/docs/SETUP_GUIDE.md +493 -0
  222. package/docs/ai-guide/COMMANDS.md +369 -0
  223. package/docs/ai-guide/INTEGRATION.md +513 -0
  224. package/docs/ai-guide/OUTPUT.md +465 -0
  225. package/docs/ai-guide/PATTERNS.md +409 -0
  226. package/docs/ai-guide/PROMPTS.md +414 -0
  227. package/docs/ai-guide/QUICKSTART.md +114 -0
  228. package/docs/ai-guide/README.md +66 -0
  229. package/docs/archive/AI_INTEGRATION_GUIDE_ARCHIVED.md +391 -0
  230. package/docs/archive/ARCHIVE.md +39 -0
  231. package/docs/archive/MYCLAUDE_GUIDE.md +305 -0
  232. package/docs/archive/PUBLISH_NPM_DESIGN_V1.md +1699 -0
  233. package/docs/archive/PUBLISH_NPM_DESIGN_V2.md +396 -0
  234. package/docs/archive/README.md +29 -0
  235. package/docs/archive/TASK_DESIGN_COVERAGE_REPORT.md +320 -0
  236. package/docs/archive/TEST_SUMMARY.md +140 -0
  237. package/docs/archive/comprehensive_test_report.md +337 -0
  238. package/docs/archive/design-docs/CI_GATEWAY_DESIGN.md +790 -0
  239. package/docs/archive/design-docs/PUBLISH_NPM_DESIGN_FINAL.md +491 -0
  240. package/docs/archive/design-docs/REFACTOR_ARCHITECTURE_OVERVIEW.md +558 -0
  241. package/docs/archive/design-docs/REFACTOR_CONFIDENCE_DESIGN.md +250 -0
  242. package/docs/archive/design-docs/REFACTOR_GIT_ANALYZER_DESIGN.md +791 -0
  243. package/docs/archive/design-docs/REFACTOR_ORCHESTRATOR_DESIGN.md +1071 -0
  244. package/docs/archive/design-docs/REFACTOR_RESULT_FUSION_DESIGN.md +321 -0
  245. package/docs/archive/design-docs/REFACTOR_TEST_LINKER_DESIGN.md +317 -0
  246. package/docs/archive/myclaude.md +1084 -0
  247. package/docs/archive/plans/2026-03-14-go-language-support-design.md +92 -0
  248. package/docs/archive/product-specs/REFACTOR_REQUIREMENTS.md +976 -0
  249. package/docs/archive/scenario-2-deps-analysis.md +353 -0
  250. package/docs/archive/test-report-symbol-search.md +384 -0
  251. package/docs/archive/test-scenario-4-complexity-analysis.md +460 -0
  252. package/docs/archive/test_report_scenario5.md +615 -0
  253. package/docs/archive/test_scenario_3_impact_analysis_report.md +520 -0
  254. package/docs/design-docs/README.md +26 -0
  255. package/docs/exec-plans/MVP3-IMPLEMENTATION-ROADMAP.md +524 -0
  256. package/docs/exec-plans/README.md +29 -0
  257. package/docs/exec-plans/active/.gitkeep +0 -0
  258. package/docs/exec-plans/completed/.gitkeep +0 -0
  259. package/docs/exec-plans/completed/2026-03-03-deps-path-extension-fix.md +186 -0
  260. package/docs/exec-plans/completed/2026-03-03-post-task-plan.md +135 -0
  261. package/docs/exec-plans/completed/harness-engineering-rollout.md +184 -0
  262. package/docs/exec-plans/tech-debt/.gitkeep +0 -0
  263. package/docs/exec-plans/tech-debt/2026-03-15-lint-guardrail-gap.md +30 -0
  264. package/docs/generated/README.md +19 -0
  265. package/docs/product-specs/MVP3-ARCHITECTURE-COMPARISON.md +504 -0
  266. package/docs/product-specs/MVP3-ARCHITECTURE-REDESIGN-PRD.md +322 -0
  267. package/docs/product-specs/MVP3-ARCHITECTURE-REDESIGN-TECH-PRD.md +1374 -0
  268. package/docs/product-specs/README.md +22 -0
  269. package/docs/references/README.md +15 -0
  270. package/docs/references/tmp.md +527 -0
  271. package/docs/rules/README.md +16 -0
  272. package/docs/rules/architecture-guardrails.md +349 -0
  273. package/docs/rules/code-quality-redlines.md +321 -0
  274. package/docs/rules/deployment.md +23 -0
  275. package/docs/rules/engineering-with-codex-openai.md +202 -0
  276. package/docs/rules/testing.md +73 -0
  277. package/docs/rules/validation.md +39 -0
  278. package/examples/README.md +61 -0
  279. package/examples/claude/codemap-skill.md +94 -0
  280. package/examples/codex/codemap-agent.md +66 -0
  281. package/examples/copilot/copilot-instructions.md +24 -0
  282. package/examples/kimi/codemap-skill.md +92 -0
  283. package/package.json +22 -7
@@ -0,0 +1,396 @@
1
+ # MyCodeMap NPM 发布设计方案
2
+
3
+ > 归档时间:2026-03-15
4
+ > 归档原因:历史发布方案草稿,记录迁移过程,不再作为当前发布依据。
5
+ > 当前依据:`docs/rules/deployment.md`、`package.json`、`.github/workflows/publish.yml`
6
+ > 状态:仅供历史对照,不作为当前执行依据。
7
+
8
+
9
+ > 版本: 2.0
10
+ > 日期: 2026-03-04
11
+ > 状态: 最终方案(待实施)
12
+
13
+ ---
14
+
15
+ ## 1. 概述
16
+
17
+ ### 1.1 目标
18
+
19
+ 将 CodeMap 工具发布到 NPM,使用户可以通过 `npx @mycodemap/mycodemap` 方式在其他项目中使用,同时建立完善的日志反馈机制便于问题排查。
20
+
21
+ ### 1.2 核心设计原则
22
+
23
+ 1. **开箱即用** - tree-sitter 自带预编译 binary,覆盖主流平台
24
+ 2. **友好引导** - 首次使用提供交互式配置向导
25
+ 3. **问题可追踪** - 完整的日志系统 + 一键上报机制
26
+ 4. **品牌一致** - 所有内容统一使用 `mycodemap`
27
+ 5. **日志增强** - 命令导出 + 错误提示
28
+
29
+ ---
30
+
31
+ ## 2. 包配置
32
+
33
+ ### 2.1 命名规范
34
+
35
+ | 项目 | 命名 |
36
+ |------|------|
37
+ | npm 包名 | `@mycodemap/mycodemap` |
38
+ | CLI 命令 | `mycodemap` |
39
+ | 配置文件 | `mycodemap.config.json` |
40
+ | Schema 文件 | `mycodemap.config.schema.json` |
41
+ | 输出目录 | `.mycodemap` |
42
+ | 日志目录 | `.mycodemap/logs` |
43
+
44
+ ### 2.2 package.json 变更
45
+
46
+ ```json
47
+ {
48
+ "name": "@mycodemap/mycodemap",
49
+ "version": "0.1.0",
50
+ "description": "TypeScript 代码地图工具 - 为 AI 辅助开发提供结构化上下文",
51
+ "main": "dist/index.js",
52
+ "type": "module",
53
+ "bin": {
54
+ "mycodemap": "./dist/cli/index.js"
55
+ },
56
+ "files": [
57
+ "dist/",
58
+ "LICENSE",
59
+ "README.md",
60
+ "mycodemap.config.schema.json",
61
+ "CHANGELOG.md"
62
+ ],
63
+ "scripts": {
64
+ "build": "tsc",
65
+ "dev": "tsc --watch",
66
+ "test": "vitest run",
67
+ "lint": "eslint src --ext .ts",
68
+ "typecheck": "tsc --noEmit",
69
+ "benchmark": "bash scripts/run-benchmark.sh",
70
+ "test:all": "npm run test && npm run benchmark",
71
+ "prepublishOnly": "npm run build && npm test"
72
+ },
73
+ "keywords": [
74
+ "typescript",
75
+ "mycodemap",
76
+ "codemap",
77
+ "code-analysis",
78
+ "ai",
79
+ "developer-tools",
80
+ "static-analysis"
81
+ ],
82
+ "author": "<需要填写>",
83
+ "license": "MIT",
84
+ "repository": {
85
+ "type": "git",
86
+ "url": "https://github.com/<your-github-username>/mycodemap.git"
87
+ },
88
+ "bugs": {
89
+ "url": "https://github.com/<your-github-username>/mycodemap/issues"
90
+ },
91
+ "homepage": "https://github.com/<your-github-username>/mycodemap#readme",
92
+ "engines": {
93
+ "node": ">=18.0.0"
94
+ },
95
+ "publishConfig": {
96
+ "access": "public",
97
+ "registry": "https://registry.npmjs.org/"
98
+ }
99
+ }
100
+ ```
101
+
102
+ ---
103
+
104
+ ## 3. 代码改动清单
105
+
106
+ ### 3.1 环境变量(全部重命名)
107
+
108
+ | 原名 | 新名 | 文件位置 |
109
+ |------|------|----------|
110
+ | `CODEMAP_RUNTIME_LOG_ENABLED` | `MYCODEMAP_RUNTIME_LOG_ENABLED` | src/cli/runtime-logger.ts |
111
+ | `CODEMAP_RUNTIME_LOG_DIR` | `MYCODEMAP_RUNTIME_LOG_DIR` | src/cli/runtime-logger.ts |
112
+ | `CODEMAP_RUNTIME_LOG_RETENTION_DAYS` | `MYCODEMAP_RUNTIME_LOG_RETENTION_DAYS` | src/cli/runtime-logger.ts |
113
+ | `CODEMAP_RUNTIME_LOG_MAX_FILES` | `MYCODEMAP_RUNTIME_LOG_MAX_FILES` | src/cli/runtime-logger.ts |
114
+ | `CODEMAP_RUNTIME_LOG_MAX_SIZE_MB` | `MYCODEMAP_RUNTIME_LOG_MAX_SIZE_MB` | src/cli/runtime-logger.ts |
115
+
116
+ ### 3.2 日志配置
117
+
118
+ | 项目 | 原值 | 新值 | 文件位置 |
119
+ |------|------|------|----------|
120
+ | 日志目录 | `.codemap/logs` | `.mycodemap/logs` | src/cli/runtime-logger.ts:10 |
121
+ | 日志前缀 | `codemap-` | `mycodemap-` | src/cli/runtime-logger.ts:14 |
122
+
123
+ ### 3.3 CLI 配置
124
+
125
+ | 项目 | 原值 | 新值 | 文件位置 |
126
+ |------|------|------|----------|
127
+ | CLI 名称 | `codemap` | `mycodemap` | src/cli/index.ts:25 |
128
+ | 默认输出目录 | `.codemap` | `.mycodemap` | src/cli/index.ts:39,47 |
129
+
130
+ ### 3.4 配置文件
131
+
132
+ | 项目 | 原值 | 新值 | 文件位置 |
133
+ |------|------|------|----------|
134
+ | 配置文件名 | `codemap.config.json` | `mycodemap.config.json` | src/cli/commands/init.ts:8,37 |
135
+ | Schema URL | `https://codemap.dev/schema.json` | `./mycodemap.config.schema.json` | src/cli/commands/init.ts:21 |
136
+ | 默认输出目录 | `.codemap` | `.mycodemap` | src/cli/commands/init.ts:31 |
137
+
138
+ ### 3.5 输出目录(所有引用)
139
+
140
+ | 文件 | 改动 |
141
+ |------|------|
142
+ | src/cli/commands/init.ts | 配置文件名、schema URL、输出目录、提示信息全部更新 |
143
+ | src/generator/index.ts | `codemap.json` → `mycodemap.json` |
144
+ | src/orchestrator/workflow/ci-executor.ts | `codemap.json` → `mycodemap.json` |
145
+ | src/cli/commands/generate.ts | `.codemap` → `.mycodemap` |
146
+ | src/cli/commands/watch.ts | `.codemap` → `.mycodemap` |
147
+ | src/cli/commands/watch-foreground.ts | `.codemap` → `.mycodemap` |
148
+ | src/cli/commands/query.ts | `.codemap` → `.mycodemap` |
149
+ | src/cli/commands/deps.ts | `.codemap` → `.mycodemap` |
150
+ | src/cli/commands/cycles.ts | `.codemap` → `.mycodemap` |
151
+ | src/cli/commands/complexity.ts | `.codemap` → `.mycodemap` |
152
+ | src/cli/commands/impact.ts | `.codemap` → `.mycodemap` |
153
+ | src/cli/commands/analyze.ts | `.codemap` → `.mycodemap` |
154
+ | src/cli/commands/init.ts | `.codemap` → `.mycodemap` |
155
+ | src/cache/index.ts | `.codemap` → `.mycodemap` |
156
+ | src/generator/file-describer.ts | `.codemap` → `.mycodemap` |
157
+ | src/orchestrator/adapters/codemap-adapter.ts | `.codemap` → `.mycodemap` |
158
+ | src/orchestrator/workflow/config.ts | `.codemap` → `.mycodemap` |
159
+ | src/orchestrator/workflow/workflow-persistence.ts | `.codemap` → `.mycodemap` |
160
+ | src/orchestrator/workflow/workflow-orchestrator.ts | `.codemap` → `.mycodemap` |
161
+ | src/orchestrator/workflow/templates.ts | `.codemap` → `.mycodemap` |
162
+ | src/orchestrator/workflow/ci-executor.ts | `.codemap` → `.mycodemap` |
163
+
164
+ ---
165
+
166
+ ## 4. 新增文件
167
+
168
+ ### 4.1 mycodemap.config.schema.json
169
+
170
+ ```json
171
+ {
172
+ "$schema": "http://json-schema.org/draft-07/schema#",
173
+ "title": "MyCodeMap Configuration",
174
+ "description": "Configuration schema for MyCodeMap - TypeScript code analysis tool",
175
+ "type": "object",
176
+ "additionalProperties": false,
177
+ "properties": {
178
+ "$schema": {
179
+ "type": "string",
180
+ "description": "JSON Schema reference"
181
+ },
182
+ "mode": {
183
+ "type": "string",
184
+ "enum": ["fast", "smart", "hybrid"],
185
+ "default": "hybrid",
186
+ "description": "Analysis mode: fast (regex), smart (AST), or hybrid (auto-select)"
187
+ },
188
+ "include": {
189
+ "type": "array",
190
+ "items": { "type": "string" },
191
+ "default": ["src/**/*.ts"],
192
+ "description": "Glob patterns for files to include in analysis"
193
+ },
194
+ "exclude": {
195
+ "type": "array",
196
+ "items": { "type": "string" },
197
+ "default": ["node_modules/**", "dist/**", "build/**", "*.test.ts", "*.spec.ts"],
198
+ "description": "Glob patterns for files to exclude from analysis"
199
+ },
200
+ "output": {
201
+ "type": "string",
202
+ "default": ".mycodemap",
203
+ "description": "Output directory for generated code maps"
204
+ },
205
+ "plugins": {
206
+ "type": "array",
207
+ "items": { "type": "string" },
208
+ "description": "List of plugins to enable"
209
+ },
210
+ "complexity": {
211
+ "type": "object",
212
+ "properties": {
213
+ "enabled": { "type": "boolean", "default": true },
214
+ "maxComplexity": { "type": "number", "default": 10 }
215
+ }
216
+ }
217
+ }
218
+ }
219
+ ```
220
+
221
+ ### 4.2 .npmignore
222
+
223
+ ```
224
+ # 开发/构建产物
225
+ src/
226
+ tests/
227
+ coverage/
228
+ *.ts
229
+ !*.d.ts
230
+ tsconfig*.json
231
+ vitest*.config.*
232
+ *.map
233
+
234
+ # 项目特有
235
+ .agents
236
+ .claude/
237
+ .git/
238
+ .githooks/
239
+ .github/
240
+ .gitignore
241
+ .vscode/
242
+ .idea/
243
+
244
+ # 临时文件
245
+ *.log
246
+ *.tmp
247
+ .DS_Store
248
+
249
+ # 文档(仅保留根目录的 README.md)
250
+ docs/
251
+ *.md
252
+ !README.md
253
+ ```
254
+
255
+ ### 4.3 CHANGELOG.md
256
+
257
+ ```markdown
258
+ # Changelog
259
+
260
+ ## [0.1.0] - 2026-03-04
261
+
262
+ ### Added
263
+ - 初始发布
264
+ - 双层解析模式 (fast/smart)
265
+ - 代码地图生成 (AI_MAP.md, mycodemap.json)
266
+ - 依赖图分析
267
+ - 复杂度分析
268
+ - 循环依赖检测
269
+ - 变更影响分析
270
+ - CI 门禁集成
271
+ - 运行日志系统
272
+ ```
273
+
274
+ ---
275
+
276
+ ## 5. 脚本和 CI 更新
277
+
278
+ ### 5.1 scripts/hooks/pre-commit
279
+
280
+ ```
281
+ npx mycodemap generate --quiet >/dev/null 2>&1 &
282
+ ```
283
+
284
+ ### 5.2 .githooks/pre-commit
285
+
286
+ ```
287
+ npx mycodemap generate --quiet >/dev/null 2>&1 &
288
+ ```
289
+
290
+ ### 5.2 .github/workflows/ci-gateway.yml
291
+
292
+ ```yaml
293
+ - run: npx mycodemap ci check-commits --range origin/main..HEAD
294
+ - run: npx mycodemap ci check-headers
295
+ - run: npx mycodemap generate
296
+ - run: npx mycodemap ci assess-risk --threshold=0.7
297
+ - run: npx mycodemap ci check-output-contract --schema-version v1.0.0 --top-k 8 --max-tokens 160
298
+ ```
299
+
300
+ ---
301
+
302
+ ## 6. .gitignore 更新
303
+
304
+ 添加以下条目:
305
+
306
+ ```
307
+ .mycodemap
308
+ .mycodemap/
309
+ *.mycodemap.json
310
+ ```
311
+
312
+ ---
313
+
314
+ ## 7. 日志功能增强
315
+
316
+ ### 7.1 命令行功能
317
+
318
+ ```bash
319
+ mycodemap logs # 查看日志列表
320
+ mycodemap logs export # 导出日志为 zip
321
+ mycodemap logs clear # 清理日志
322
+ ```
323
+
324
+ ### 7.2 错误提示增强
325
+
326
+ 当程序出错时,自动提示:
327
+
328
+ ```
329
+ ❌ 出错了!请将以下信息提交到 issue:
330
+ - 日志文件: .mycodemap/logs/mycodemap-2026-03-04.log
331
+ - 运行命令: mycodemap generate
332
+ - 复现步骤: ...
333
+ ```
334
+
335
+ ---
336
+
337
+ ## 8. 发布流程
338
+
339
+ ### 8.1 发布前检查清单
340
+
341
+ ```bash
342
+ # 1. 构建项目
343
+ npm run build
344
+
345
+ # 2. 运行测试
346
+ npm test
347
+
348
+ # 3. 生成代码地图(自检)
349
+ node dist/cli/index.js generate
350
+ ```
351
+
352
+ ### 8.2 发布命令
353
+
354
+ ```bash
355
+ # 登录 npm(首次需要)
356
+ npm login
357
+
358
+ # 发布
359
+ npm publish --access public
360
+ ```
361
+
362
+ ### 8.3 发布后验证
363
+
364
+ ```bash
365
+ # 验证包是否发布成功
366
+ npm view @mycodemap/mycodemap
367
+
368
+ # 本地测试 npx 方式运行
369
+ npx @mycodemap/mycodemap --version
370
+ ```
371
+
372
+ ---
373
+
374
+ ## 9. 改动统计
375
+
376
+ | 类别 | 数量 |
377
+ |------|------|
378
+ | 环境变量 | 5 |
379
+ | 日志配置 | 2 |
380
+ | CLI 配置 | 2 |
381
+ | 配置文件 | 2 |
382
+ | 输出目录 | ~20 |
383
+ | 脚本更新 | 2 |
384
+ | CI 更新 | 5 |
385
+ | 新增文件 | 3 |
386
+
387
+ ---
388
+
389
+ ## 10. 待填写信息
390
+
391
+ 发布前需要填写以下信息:
392
+
393
+ - [ ] author: npm 账号名称和邮箱
394
+ - [ ] repository.url: GitHub 仓库地址
395
+ - [ ] bugs.url: GitHub Issues 地址
396
+ - [ ] homepage: 项目主页地址
@@ -0,0 +1,29 @@
1
+ # docs/archive/
2
+
3
+ 本目录存放历史文档、迁移遗留和过期方案。这里的内容只用于复盘与对照,不作为当前执行依据。
4
+
5
+ ## 使用规则
6
+
7
+ - 归档文档必须写明:归档时间、归档原因、当前依据、状态。
8
+ - 当前事实优先顺序:`AGENTS.md` -> `CLAUDE.md` -> `ARCHITECTURE.md` -> `docs/rules/` -> `docs/exec-plans/` -> 代码与配置事实。
9
+ - 如果需要重启旧方案,不直接“复活”归档文档,而是在现行目录重新建文档并按当前模板收敛。
10
+
11
+ ## 归档索引
12
+
13
+ | 文件 | 归档时间 | 归档原因 | 当前依据 |
14
+ |---|---|---|---|
15
+ | `AI_INTEGRATION_GUIDE_ARCHIVED.md` | 2026-03-15 | 旧版 AI 集成指南,被当前统一指南替代 | `docs/AI_ASSISTANT_SETUP.md` |
16
+ | `MYCLAUDE_GUIDE.md` | 2026-03-15 | 外部工具调研笔记,非当前仓库规则 | `docs/references/README.md` |
17
+ | `PUBLISH_NPM_DESIGN_V1.md` | 2026-03-15 | 历史发布草案 | `docs/rules/deployment.md`、`package.json` |
18
+ | `PUBLISH_NPM_DESIGN_V2.md` | 2026-03-15 | 历史发布草案 | `docs/rules/deployment.md`、`package.json` |
19
+ | `TASK_DESIGN_COVERAGE_REPORT.md` | 2026-03-15 | 历史覆盖率报告,部分结论已过期 | `docs/exec-plans/completed/2026-03-03-post-task-plan.md`、`src/cli/commands/workflow.ts` |
20
+ | `design-docs/CI_GATEWAY_DESIGN.md` | 2026-03-15 | 历史 CI 设计稿 | `docs/rules/engineering-with-codex-openai.md`、`.github/workflows/ci-gateway.yml` |
21
+ | `design-docs/PUBLISH_NPM_DESIGN_FINAL.md` | 2026-03-15 | 历史迁移设计稿 | `docs/rules/deployment.md`、`.github/workflows/publish.yml` |
22
+ | `design-docs/REFACTOR_ARCHITECTURE_OVERVIEW.md` | 2026-03-15 | 历史重构概要设计,状态冲突 | `ARCHITECTURE.md`、`src/cli/commands/workflow.ts` |
23
+ | `design-docs/REFACTOR_CONFIDENCE_DESIGN.md` | 2026-03-15 | 历史置信度设计稿,结构已偏离实现 | `src/orchestrator/confidence.ts`、`src/orchestrator/types.ts` |
24
+ | `design-docs/REFACTOR_GIT_ANALYZER_DESIGN.md` | 2026-03-15 | 历史 Git 分析设计稿 | `src/orchestrator/git-analyzer.ts`、`docs/rules/engineering-with-codex-openai.md` |
25
+ | `design-docs/REFACTOR_ORCHESTRATOR_DESIGN.md` | 2026-03-15 | 历史编排设计稿,仍混入规划态与旧路径 | `src/cli/commands/workflow.ts`、`src/orchestrator/workflow/` |
26
+ | `design-docs/REFACTOR_RESULT_FUSION_DESIGN.md` | 2026-03-15 | 历史结果融合设计稿 | `src/orchestrator/result-fusion.ts`、`src/orchestrator/types.ts` |
27
+ | `design-docs/REFACTOR_TEST_LINKER_DESIGN.md` | 2026-03-15 | 历史测试关联设计稿 | `docs/rules/testing.md`、`src/orchestrator/test-linker.ts` |
28
+ | `plans/2026-03-14-go-language-support-design.md` | 2026-03-15 | 迁移遗留计划,原目录已废弃且方案未落地 | `docs/exec-plans/README.md` |
29
+ | `product-specs/REFACTOR_REQUIREMENTS.md` | 2026-03-15 | 历史需求草稿,状态仍为待实施 | `ARCHITECTURE.md`、`docs/rules/*`、`src/cli/index.ts` |