@fifine/aim-studio 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +159 -0
  3. package/bin/aim.js +3 -0
  4. package/dist/cli/index.d.ts +3 -0
  5. package/dist/cli/index.d.ts.map +1 -0
  6. package/dist/cli/index.js +89 -0
  7. package/dist/cli/index.js.map +1 -0
  8. package/dist/commands/init.d.ts +13 -0
  9. package/dist/commands/init.d.ts.map +1 -0
  10. package/dist/commands/init.js +513 -0
  11. package/dist/commands/init.js.map +1 -0
  12. package/dist/commands/update.d.ts +27 -0
  13. package/dist/commands/update.d.ts.map +1 -0
  14. package/dist/commands/update.js +1275 -0
  15. package/dist/commands/update.js.map +1 -0
  16. package/dist/configurators/claude.d.ts +32 -0
  17. package/dist/configurators/claude.d.ts.map +1 -0
  18. package/dist/configurators/claude.js +98 -0
  19. package/dist/configurators/claude.js.map +1 -0
  20. package/dist/configurators/index.d.ts +51 -0
  21. package/dist/configurators/index.d.ts.map +1 -0
  22. package/dist/configurators/index.js +113 -0
  23. package/dist/configurators/index.js.map +1 -0
  24. package/dist/configurators/shared.d.ts +12 -0
  25. package/dist/configurators/shared.d.ts.map +1 -0
  26. package/dist/configurators/shared.js +21 -0
  27. package/dist/configurators/shared.js.map +1 -0
  28. package/dist/configurators/workflow.d.ts +28 -0
  29. package/dist/configurators/workflow.d.ts.map +1 -0
  30. package/dist/configurators/workflow.js +147 -0
  31. package/dist/configurators/workflow.js.map +1 -0
  32. package/dist/constants/paths.d.ts +68 -0
  33. package/dist/constants/paths.d.ts.map +1 -0
  34. package/dist/constants/paths.js +77 -0
  35. package/dist/constants/paths.js.map +1 -0
  36. package/dist/constants/version.d.ts +9 -0
  37. package/dist/constants/version.d.ts.map +1 -0
  38. package/dist/constants/version.js +15 -0
  39. package/dist/constants/version.js.map +1 -0
  40. package/dist/index.d.ts +9 -0
  41. package/dist/index.d.ts.map +1 -0
  42. package/dist/index.js +9 -0
  43. package/dist/index.js.map +1 -0
  44. package/dist/migrations/index.d.ts +54 -0
  45. package/dist/migrations/index.d.ts.map +1 -0
  46. package/dist/migrations/index.js +160 -0
  47. package/dist/migrations/index.js.map +1 -0
  48. package/dist/migrations/manifests/0.0.1.json +9 -0
  49. package/dist/migrations/manifests/0.1.9.json +30 -0
  50. package/dist/migrations/manifests/0.2.0.json +49 -0
  51. package/dist/migrations/manifests/0.2.12.json +9 -0
  52. package/dist/migrations/manifests/0.2.13.json +9 -0
  53. package/dist/migrations/manifests/0.2.14.json +175 -0
  54. package/dist/migrations/manifests/0.2.15.json +33 -0
  55. package/dist/migrations/manifests/0.3.0-beta.0.json +278 -0
  56. package/dist/migrations/manifests/0.3.0-beta.1.json +9 -0
  57. package/dist/migrations/manifests/0.3.0-beta.10.json +9 -0
  58. package/dist/migrations/manifests/0.3.0-beta.11.json +9 -0
  59. package/dist/migrations/manifests/0.3.0-beta.12.json +9 -0
  60. package/dist/migrations/manifests/0.3.0-beta.13.json +9 -0
  61. package/dist/migrations/manifests/0.3.0-beta.14.json +9 -0
  62. package/dist/migrations/manifests/0.3.0-beta.15.json +9 -0
  63. package/dist/migrations/manifests/0.3.0-beta.16.json +9 -0
  64. package/dist/migrations/manifests/0.3.0-beta.2.json +9 -0
  65. package/dist/migrations/manifests/0.3.0-beta.3.json +9 -0
  66. package/dist/migrations/manifests/0.3.0-beta.4.json +9 -0
  67. package/dist/migrations/manifests/0.3.0-beta.5.json +9 -0
  68. package/dist/migrations/manifests/0.3.0-beta.6.json +9 -0
  69. package/dist/migrations/manifests/0.3.0-beta.7.json +11 -0
  70. package/dist/migrations/manifests/0.3.0-beta.8.json +9 -0
  71. package/dist/migrations/manifests/0.3.0-beta.9.json +9 -0
  72. package/dist/migrations/manifests/0.3.0-rc.0.json +9 -0
  73. package/dist/migrations/manifests/0.3.0-rc.1.json +9 -0
  74. package/dist/migrations/manifests/0.3.0-rc.2.json +9 -0
  75. package/dist/templates/CLAUDE.md +71 -0
  76. package/dist/templates/aim/gitignore.txt +29 -0
  77. package/dist/templates/aim/index.d.ts +49 -0
  78. package/dist/templates/aim/index.d.ts.map +1 -0
  79. package/dist/templates/aim/index.js +92 -0
  80. package/dist/templates/aim/index.js.map +1 -0
  81. package/dist/templates/aim/scripts/__init__.py +5 -0
  82. package/dist/templates/aim/scripts/add_session.py +392 -0
  83. package/dist/templates/aim/scripts/common/__init__.py +80 -0
  84. package/dist/templates/aim/scripts/common/cli_adapter.py +435 -0
  85. package/dist/templates/aim/scripts/common/developer.py +190 -0
  86. package/dist/templates/aim/scripts/common/git_context.py +383 -0
  87. package/dist/templates/aim/scripts/common/paths.py +347 -0
  88. package/dist/templates/aim/scripts/common/phase.py +253 -0
  89. package/dist/templates/aim/scripts/common/registry.py +366 -0
  90. package/dist/templates/aim/scripts/common/task_queue.py +255 -0
  91. package/dist/templates/aim/scripts/common/task_utils.py +178 -0
  92. package/dist/templates/aim/scripts/common/worktree.py +219 -0
  93. package/dist/templates/aim/scripts/create_bootstrap.py +290 -0
  94. package/dist/templates/aim/scripts/get_context.py +16 -0
  95. package/dist/templates/aim/scripts/get_developer.py +26 -0
  96. package/dist/templates/aim/scripts/init_developer.py +51 -0
  97. package/dist/templates/aim/scripts/multi_agent/__init__.py +5 -0
  98. package/dist/templates/aim/scripts/multi_agent/cleanup.py +403 -0
  99. package/dist/templates/aim/scripts/multi_agent/create_pr.py +329 -0
  100. package/dist/templates/aim/scripts/multi_agent/plan.py +233 -0
  101. package/dist/templates/aim/scripts/multi_agent/start.py +461 -0
  102. package/dist/templates/aim/scripts/multi_agent/status.py +817 -0
  103. package/dist/templates/aim/scripts/task.py +1068 -0
  104. package/dist/templates/aim/scripts-shell-archive/add-session.sh +384 -0
  105. package/dist/templates/aim/scripts-shell-archive/common/developer.sh +129 -0
  106. package/dist/templates/aim/scripts-shell-archive/common/git-context.sh +263 -0
  107. package/dist/templates/aim/scripts-shell-archive/common/paths.sh +208 -0
  108. package/dist/templates/aim/scripts-shell-archive/common/phase.sh +150 -0
  109. package/dist/templates/aim/scripts-shell-archive/common/registry.sh +247 -0
  110. package/dist/templates/aim/scripts-shell-archive/common/task-queue.sh +142 -0
  111. package/dist/templates/aim/scripts-shell-archive/common/task-utils.sh +151 -0
  112. package/dist/templates/aim/scripts-shell-archive/common/worktree.sh +128 -0
  113. package/dist/templates/aim/scripts-shell-archive/create-bootstrap.sh +299 -0
  114. package/dist/templates/aim/scripts-shell-archive/get-context.sh +7 -0
  115. package/dist/templates/aim/scripts-shell-archive/get-developer.sh +15 -0
  116. package/dist/templates/aim/scripts-shell-archive/init-developer.sh +34 -0
  117. package/dist/templates/aim/scripts-shell-archive/multi-agent/cleanup.sh +396 -0
  118. package/dist/templates/aim/scripts-shell-archive/multi-agent/create-pr.sh +241 -0
  119. package/dist/templates/aim/scripts-shell-archive/multi-agent/plan.sh +207 -0
  120. package/dist/templates/aim/scripts-shell-archive/multi-agent/start.sh +317 -0
  121. package/dist/templates/aim/scripts-shell-archive/multi-agent/status.sh +828 -0
  122. package/dist/templates/aim/scripts-shell-archive/task.sh +1204 -0
  123. package/dist/templates/aim/tasks/.gitkeep +0 -0
  124. package/dist/templates/aim/workflow.md +258 -0
  125. package/dist/templates/aim/worktree.yaml +47 -0
  126. package/dist/templates/claude/agents/check.md +122 -0
  127. package/dist/templates/claude/agents/debug.md +106 -0
  128. package/dist/templates/claude/agents/dispatch.md +230 -0
  129. package/dist/templates/claude/agents/implement.md +96 -0
  130. package/dist/templates/claude/agents/plan.md +396 -0
  131. package/dist/templates/claude/agents/research.md +120 -0
  132. package/dist/templates/claude/agents/story.md +53 -0
  133. package/dist/templates/claude/commands/aim/before-backend-dev.md +13 -0
  134. package/dist/templates/claude/commands/aim/before-frontend-dev.md +13 -0
  135. package/dist/templates/claude/commands/aim/break-loop.md +153 -0
  136. package/dist/templates/claude/commands/aim/check-backend.md +13 -0
  137. package/dist/templates/claude/commands/aim/check-cross-layer.md +153 -0
  138. package/dist/templates/claude/commands/aim/check-frontend.md +13 -0
  139. package/dist/templates/claude/commands/aim/check-story.md +59 -0
  140. package/dist/templates/claude/commands/aim/create-command.md +154 -0
  141. package/dist/templates/claude/commands/aim/export.md +187 -0
  142. package/dist/templates/claude/commands/aim/finish-work.md +104 -0
  143. package/dist/templates/claude/commands/aim/integrate-skill.md +219 -0
  144. package/dist/templates/claude/commands/aim/onboard.md +358 -0
  145. package/dist/templates/claude/commands/aim/parallel.md +217 -0
  146. package/dist/templates/claude/commands/aim/portrait.md +170 -0
  147. package/dist/templates/claude/commands/aim/record-session.md +92 -0
  148. package/dist/templates/claude/commands/aim/start.md +112 -0
  149. package/dist/templates/claude/commands/aim/story.md +140 -0
  150. package/dist/templates/claude/commands/aim/update-spec.md +285 -0
  151. package/dist/templates/claude/commands/aim/visualize.md +182 -0
  152. package/dist/templates/claude/commands/trellis/before-backend-dev.md +13 -0
  153. package/dist/templates/claude/commands/trellis/before-frontend-dev.md +13 -0
  154. package/dist/templates/claude/commands/trellis/break-loop.md +125 -0
  155. package/dist/templates/claude/commands/trellis/check-backend.md +13 -0
  156. package/dist/templates/claude/commands/trellis/check-cross-layer.md +153 -0
  157. package/dist/templates/claude/commands/trellis/check-frontend.md +13 -0
  158. package/dist/templates/claude/commands/trellis/create-command.md +154 -0
  159. package/dist/templates/claude/commands/trellis/finish-work.md +129 -0
  160. package/dist/templates/claude/commands/trellis/integrate-skill.md +219 -0
  161. package/dist/templates/claude/commands/trellis/onboard.md +358 -0
  162. package/dist/templates/claude/commands/trellis/parallel.md +193 -0
  163. package/dist/templates/claude/commands/trellis/record-session.md +62 -0
  164. package/dist/templates/claude/commands/trellis/start.md +280 -0
  165. package/dist/templates/claude/commands/trellis/update-spec.md +285 -0
  166. package/dist/templates/claude/hooks/inject-subagent-context.py +772 -0
  167. package/dist/templates/claude/hooks/ralph-loop.py +388 -0
  168. package/dist/templates/claude/hooks/session-start.py +142 -0
  169. package/dist/templates/claude/index.d.ts +54 -0
  170. package/dist/templates/claude/index.d.ts.map +1 -0
  171. package/dist/templates/claude/index.js +85 -0
  172. package/dist/templates/claude/index.js.map +1 -0
  173. package/dist/templates/claude/settings.json +41 -0
  174. package/dist/templates/extract.d.ts +68 -0
  175. package/dist/templates/extract.d.ts.map +1 -0
  176. package/dist/templates/extract.js +128 -0
  177. package/dist/templates/extract.js.map +1 -0
  178. package/dist/templates/markdown/agents.md +25 -0
  179. package/dist/templates/markdown/gitignore.txt +12 -0
  180. package/dist/templates/markdown/index.d.ts +32 -0
  181. package/dist/templates/markdown/index.d.ts.map +1 -0
  182. package/dist/templates/markdown/index.js +58 -0
  183. package/dist/templates/markdown/index.js.map +1 -0
  184. package/dist/templates/markdown/spec/backend/database-guidelines.md.txt +51 -0
  185. package/dist/templates/markdown/spec/backend/directory-structure.md.txt +54 -0
  186. package/dist/templates/markdown/spec/backend/error-handling.md.txt +51 -0
  187. package/dist/templates/markdown/spec/backend/index.md +40 -0
  188. package/dist/templates/markdown/spec/backend/index.md.txt +38 -0
  189. package/dist/templates/markdown/spec/backend/logging-guidelines.md.txt +51 -0
  190. package/dist/templates/markdown/spec/backend/quality-guidelines.md.txt +51 -0
  191. package/dist/templates/markdown/spec/backend/script-conventions.md +467 -0
  192. package/dist/templates/markdown/spec/frontend/component-guidelines.md.txt +59 -0
  193. package/dist/templates/markdown/spec/frontend/directory-structure.md.txt +54 -0
  194. package/dist/templates/markdown/spec/frontend/hook-guidelines.md.txt +51 -0
  195. package/dist/templates/markdown/spec/frontend/index.md.txt +39 -0
  196. package/dist/templates/markdown/spec/frontend/quality-guidelines.md.txt +51 -0
  197. package/dist/templates/markdown/spec/frontend/state-management.md.txt +51 -0
  198. package/dist/templates/markdown/spec/frontend/type-safety.md.txt +51 -0
  199. package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md +118 -0
  200. package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +92 -0
  201. package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +94 -0
  202. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md +394 -0
  203. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +319 -0
  204. package/dist/templates/markdown/spec/guides/index.md.txt +89 -0
  205. package/dist/templates/markdown/spec/story/character.md.txt +95 -0
  206. package/dist/templates/markdown/spec/story/index.md.txt +31 -0
  207. package/dist/templates/markdown/spec/story/script.md.txt +313 -0
  208. package/dist/templates/markdown/spec/story/world.md.txt +92 -0
  209. package/dist/templates/markdown/workspace-index.md +123 -0
  210. package/dist/templates/markdown/worktree.yaml.txt +58 -0
  211. package/dist/templates/trellis/gitignore.txt +29 -0
  212. package/dist/templates/trellis/index.d.ts +49 -0
  213. package/dist/templates/trellis/index.d.ts.map +1 -0
  214. package/dist/templates/trellis/index.js +92 -0
  215. package/dist/templates/trellis/index.js.map +1 -0
  216. package/dist/templates/trellis/scripts/__init__.py +5 -0
  217. package/dist/templates/trellis/scripts/add_session.py +392 -0
  218. package/dist/templates/trellis/scripts/common/__init__.py +80 -0
  219. package/dist/templates/trellis/scripts/common/cli_adapter.py +435 -0
  220. package/dist/templates/trellis/scripts/common/developer.py +190 -0
  221. package/dist/templates/trellis/scripts/common/git_context.py +383 -0
  222. package/dist/templates/trellis/scripts/common/paths.py +347 -0
  223. package/dist/templates/trellis/scripts/common/phase.py +253 -0
  224. package/dist/templates/trellis/scripts/common/registry.py +366 -0
  225. package/dist/templates/trellis/scripts/common/task_queue.py +255 -0
  226. package/dist/templates/trellis/scripts/common/task_utils.py +178 -0
  227. package/dist/templates/trellis/scripts/common/worktree.py +219 -0
  228. package/dist/templates/trellis/scripts/create_bootstrap.py +290 -0
  229. package/dist/templates/trellis/scripts/get_context.py +16 -0
  230. package/dist/templates/trellis/scripts/get_developer.py +26 -0
  231. package/dist/templates/trellis/scripts/init_developer.py +51 -0
  232. package/dist/templates/trellis/scripts/multi_agent/__init__.py +5 -0
  233. package/dist/templates/trellis/scripts/multi_agent/cleanup.py +403 -0
  234. package/dist/templates/trellis/scripts/multi_agent/create_pr.py +329 -0
  235. package/dist/templates/trellis/scripts/multi_agent/plan.py +233 -0
  236. package/dist/templates/trellis/scripts/multi_agent/start.py +461 -0
  237. package/dist/templates/trellis/scripts/multi_agent/status.py +817 -0
  238. package/dist/templates/trellis/scripts/task.py +1056 -0
  239. package/dist/templates/trellis/scripts-shell-archive/add-session.sh +384 -0
  240. package/dist/templates/trellis/scripts-shell-archive/common/developer.sh +129 -0
  241. package/dist/templates/trellis/scripts-shell-archive/common/git-context.sh +263 -0
  242. package/dist/templates/trellis/scripts-shell-archive/common/paths.sh +208 -0
  243. package/dist/templates/trellis/scripts-shell-archive/common/phase.sh +150 -0
  244. package/dist/templates/trellis/scripts-shell-archive/common/registry.sh +247 -0
  245. package/dist/templates/trellis/scripts-shell-archive/common/task-queue.sh +142 -0
  246. package/dist/templates/trellis/scripts-shell-archive/common/task-utils.sh +151 -0
  247. package/dist/templates/trellis/scripts-shell-archive/common/worktree.sh +128 -0
  248. package/dist/templates/trellis/scripts-shell-archive/create-bootstrap.sh +299 -0
  249. package/dist/templates/trellis/scripts-shell-archive/get-context.sh +7 -0
  250. package/dist/templates/trellis/scripts-shell-archive/get-developer.sh +15 -0
  251. package/dist/templates/trellis/scripts-shell-archive/init-developer.sh +34 -0
  252. package/dist/templates/trellis/scripts-shell-archive/multi-agent/cleanup.sh +396 -0
  253. package/dist/templates/trellis/scripts-shell-archive/multi-agent/create-pr.sh +241 -0
  254. package/dist/templates/trellis/scripts-shell-archive/multi-agent/plan.sh +207 -0
  255. package/dist/templates/trellis/scripts-shell-archive/multi-agent/start.sh +317 -0
  256. package/dist/templates/trellis/scripts-shell-archive/multi-agent/status.sh +828 -0
  257. package/dist/templates/trellis/scripts-shell-archive/task.sh +1204 -0
  258. package/dist/templates/trellis/tasks/.gitkeep +0 -0
  259. package/dist/templates/trellis/workflow.md +416 -0
  260. package/dist/templates/trellis/worktree.yaml +47 -0
  261. package/dist/types/ai-tools.d.ts +48 -0
  262. package/dist/types/ai-tools.d.ts.map +1 -0
  263. package/dist/types/ai-tools.js +32 -0
  264. package/dist/types/ai-tools.js.map +1 -0
  265. package/dist/types/migration.d.ts +86 -0
  266. package/dist/types/migration.d.ts.map +1 -0
  267. package/dist/types/migration.js +8 -0
  268. package/dist/types/migration.js.map +1 -0
  269. package/dist/utils/compare-versions.d.ts +12 -0
  270. package/dist/utils/compare-versions.d.ts.map +1 -0
  271. package/dist/utils/compare-versions.js +76 -0
  272. package/dist/utils/compare-versions.js.map +1 -0
  273. package/dist/utils/file-writer.d.ts +23 -0
  274. package/dist/utils/file-writer.d.ts.map +1 -0
  275. package/dist/utils/file-writer.js +140 -0
  276. package/dist/utils/file-writer.js.map +1 -0
  277. package/dist/utils/project-detector.d.ts +16 -0
  278. package/dist/utils/project-detector.d.ts.map +1 -0
  279. package/dist/utils/project-detector.js +188 -0
  280. package/dist/utils/project-detector.js.map +1 -0
  281. package/dist/utils/template-fetcher.d.ts +51 -0
  282. package/dist/utils/template-fetcher.d.ts.map +1 -0
  283. package/dist/utils/template-fetcher.js +174 -0
  284. package/dist/utils/template-fetcher.js.map +1 -0
  285. package/dist/utils/template-hash.d.ts +78 -0
  286. package/dist/utils/template-hash.d.ts.map +1 -0
  287. package/dist/utils/template-hash.js +239 -0
  288. package/dist/utils/template-hash.js.map +1 -0
  289. package/package.json +87 -0
@@ -0,0 +1,41 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "startup",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "{{PYTHON_CMD}} .claude/hooks/session-start.py",
10
+ "timeout": 10
11
+ }
12
+ ]
13
+ }
14
+ ],
15
+ "PreToolUse": [
16
+ {
17
+ "matcher": "Task",
18
+ "hooks": [
19
+ {
20
+ "type": "command",
21
+ "command": "{{PYTHON_CMD}} .claude/hooks/inject-subagent-context.py",
22
+ "timeout": 30
23
+ }
24
+ ]
25
+ }
26
+ ],
27
+ "SubagentStop": [
28
+ {
29
+ "matcher": "check",
30
+ "hooks": [
31
+ {
32
+ "type": "command",
33
+ "command": "{{PYTHON_CMD}} .claude/hooks/ralph-loop.py",
34
+ "timeout": 10
35
+ }
36
+ ]
37
+ }
38
+ ]
39
+ },
40
+ "enabledPlugins": {}
41
+ }
@@ -0,0 +1,68 @@
1
+ type TemplateCategory = "scripts" | "markdown" | "commands";
2
+ /**
3
+ * Get the path to the aim templates directory.
4
+ *
5
+ * This reads from src/templates/aim/ (development) or dist/templates/aim/ (production).
6
+ * These are GENERIC templates, not the project's own .aim-studio/ configuration.
7
+ */
8
+ export declare function getAimTemplatePath(): string;
9
+ /**
10
+ * @deprecated Use getAimTemplatePath() instead.
11
+ * This function is kept for backwards compatibility but now returns the template path.
12
+ */
13
+ export declare function getAimSourcePath(): string;
14
+ /**
15
+ * Get the path to the claude templates directory.
16
+ *
17
+ * This reads from src/templates/claude/ (development) or dist/templates/claude/ (production).
18
+ */
19
+ export declare function getClaudeTemplatePath(): string;
20
+ /**
21
+ * @deprecated Use getClaudeTemplatePath() instead.
22
+ */
23
+ export declare function getClaudeSourcePath(): string;
24
+ /**
25
+ * Read a file from the .aim-studio directory
26
+ * @param relativePath - Path relative to .aim-studio/ (e.g., 'scripts/task.py')
27
+ * @returns File content as string
28
+ */
29
+ export declare function readAimFile(relativePath: string): string;
30
+ /**
31
+ * Read template content from a .txt file in commands directory
32
+ * @param category - Template category (only 'commands' uses .txt files now)
33
+ * @param filename - Template filename (e.g., 'common/finish-work.txt')
34
+ * @returns File content as string
35
+ */
36
+ export declare function readTemplate(category: TemplateCategory, filename: string): string;
37
+ /**
38
+ * Helper to read script template from .aim-studio/scripts/
39
+ * @param relativePath - Path relative to .aim-studio/scripts/ (e.g., 'task.py')
40
+ */
41
+ export declare function readScript(relativePath: string): string;
42
+ /**
43
+ * Helper to read markdown template from .aim-studio/
44
+ * @param relativePath - Path relative to .aim-studio/ (e.g., 'workflow.md')
45
+ */
46
+ export declare function readMarkdown(relativePath: string): string;
47
+ /**
48
+ * Helper to read command template (these still use .txt files in src/templates/commands/)
49
+ */
50
+ export declare function readCommand(filename: string): string;
51
+ /**
52
+ * Read a file from the .claude directory (dogfooding)
53
+ * @param relativePath - Path relative to .claude/ (e.g., 'commands/start.md')
54
+ * @returns File content as string
55
+ */
56
+ export declare function readClaudeFile(relativePath: string): string;
57
+ /**
58
+ * Copy a directory from .aim-studio/ to target, making scripts executable
59
+ * Uses writeFile to handle file conflicts with the global writeMode setting
60
+ * @param srcRelativePath - Source path relative to .aim-studio/ (e.g., 'scripts')
61
+ * @param destPath - Absolute destination path
62
+ * @param options - Copy options
63
+ */
64
+ export declare function copyAimDir(srcRelativePath: string, destPath: string, options?: {
65
+ executable?: boolean;
66
+ }): Promise<void>;
67
+ export {};
68
+ //# sourceMappingURL=extract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../src/templates/extract.ts"],"names":[],"mappings":"AAQA,KAAK,gBAAgB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5D;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAU3C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAS9C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAIxD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EAAE,MAAM,GACf,MAAM,CAGR;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAI3D;AAED;;;;;;GAMG;AACH,wBAAsB,UAAU,CAC9B,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GACjC,OAAO,CAAC,IAAI,CAAC,CAIf"}
@@ -0,0 +1,128 @@
1
+ import * as fs from "node:fs";
2
+ import * as path from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import { ensureDir, writeFile } from "../utils/file-writer.js";
5
+ const __filename = fileURLToPath(import.meta.url);
6
+ const __dirname = path.dirname(__filename);
7
+ /**
8
+ * Get the path to the aim templates directory.
9
+ *
10
+ * This reads from src/templates/aim/ (development) or dist/templates/aim/ (production).
11
+ * These are GENERIC templates, not the project's own .aim-studio/ configuration.
12
+ */
13
+ export function getAimTemplatePath() {
14
+ // Templates are in the same directory as this file
15
+ const templatePath = path.join(__dirname, "aim");
16
+ if (fs.existsSync(templatePath)) {
17
+ return templatePath;
18
+ }
19
+ throw new Error("Could not find aim templates directory. Expected at templates/aim/");
20
+ }
21
+ /**
22
+ * @deprecated Use getAimTemplatePath() instead.
23
+ * This function is kept for backwards compatibility but now returns the template path.
24
+ */
25
+ export function getAimSourcePath() {
26
+ return getAimTemplatePath();
27
+ }
28
+ /**
29
+ * Get the path to the claude templates directory.
30
+ *
31
+ * This reads from src/templates/claude/ (development) or dist/templates/claude/ (production).
32
+ */
33
+ export function getClaudeTemplatePath() {
34
+ const templatePath = path.join(__dirname, "claude");
35
+ if (fs.existsSync(templatePath)) {
36
+ return templatePath;
37
+ }
38
+ throw new Error("Could not find claude templates directory. Expected at templates/claude/");
39
+ }
40
+ /**
41
+ * @deprecated Use getClaudeTemplatePath() instead.
42
+ */
43
+ export function getClaudeSourcePath() {
44
+ return getClaudeTemplatePath();
45
+ }
46
+ /**
47
+ * Read a file from the .aim-studio directory
48
+ * @param relativePath - Path relative to .aim-studio/ (e.g., 'scripts/task.py')
49
+ * @returns File content as string
50
+ */
51
+ export function readAimFile(relativePath) {
52
+ const aimPath = getAimSourcePath();
53
+ const filePath = path.join(aimPath, relativePath);
54
+ return fs.readFileSync(filePath, "utf-8");
55
+ }
56
+ /**
57
+ * Read template content from a .txt file in commands directory
58
+ * @param category - Template category (only 'commands' uses .txt files now)
59
+ * @param filename - Template filename (e.g., 'common/finish-work.txt')
60
+ * @returns File content as string
61
+ */
62
+ export function readTemplate(category, filename) {
63
+ const templatePath = path.join(__dirname, category, filename);
64
+ return fs.readFileSync(templatePath, "utf-8");
65
+ }
66
+ /**
67
+ * Helper to read script template from .aim-studio/scripts/
68
+ * @param relativePath - Path relative to .aim-studio/scripts/ (e.g., 'task.py')
69
+ */
70
+ export function readScript(relativePath) {
71
+ return readAimFile(`scripts/${relativePath}`);
72
+ }
73
+ /**
74
+ * Helper to read markdown template from .aim-studio/
75
+ * @param relativePath - Path relative to .aim-studio/ (e.g., 'workflow.md')
76
+ */
77
+ export function readMarkdown(relativePath) {
78
+ return readAimFile(relativePath);
79
+ }
80
+ /**
81
+ * Helper to read command template (these still use .txt files in src/templates/commands/)
82
+ */
83
+ export function readCommand(filename) {
84
+ return readTemplate("commands", filename);
85
+ }
86
+ /**
87
+ * Read a file from the .claude directory (dogfooding)
88
+ * @param relativePath - Path relative to .claude/ (e.g., 'commands/start.md')
89
+ * @returns File content as string
90
+ */
91
+ export function readClaudeFile(relativePath) {
92
+ const claudePath = getClaudeSourcePath();
93
+ const filePath = path.join(claudePath, relativePath);
94
+ return fs.readFileSync(filePath, "utf-8");
95
+ }
96
+ /**
97
+ * Copy a directory from .aim-studio/ to target, making scripts executable
98
+ * Uses writeFile to handle file conflicts with the global writeMode setting
99
+ * @param srcRelativePath - Source path relative to .aim-studio/ (e.g., 'scripts')
100
+ * @param destPath - Absolute destination path
101
+ * @param options - Copy options
102
+ */
103
+ export async function copyAimDir(srcRelativePath, destPath, options) {
104
+ const aimPath = getAimSourcePath();
105
+ const srcPath = path.join(aimPath, srcRelativePath);
106
+ await copyDirRecursive(srcPath, destPath, options);
107
+ }
108
+ /**
109
+ * Recursively copy directory with options
110
+ * Uses writeFile to handle file conflicts
111
+ */
112
+ async function copyDirRecursive(src, dest, options) {
113
+ ensureDir(dest);
114
+ for (const entry of fs.readdirSync(src)) {
115
+ const srcPath = path.join(src, entry);
116
+ const destPath = path.join(dest, entry);
117
+ const stat = fs.statSync(srcPath);
118
+ if (stat.isDirectory()) {
119
+ await copyDirRecursive(srcPath, destPath, options);
120
+ }
121
+ else {
122
+ const content = fs.readFileSync(srcPath, "utf-8");
123
+ const isExecutable = options?.executable && (entry.endsWith(".sh") || entry.endsWith(".py"));
124
+ await writeFile(destPath, content, { executable: isExecutable });
125
+ }
126
+ }
127
+ }
128
+ //# sourceMappingURL=extract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../src/templates/extract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE/D,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAI3C;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB;IAChC,mDAAmD;IACnD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACjD,IAAI,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC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CAAC,CAAC;QACrD,CAAC;aAAM,CAAC;YACN,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAClD,MAAM,YAAY,GAChB,OAAO,EAAE,UAAU,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1E,MAAM,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,25 @@
1
+ <!-- AIM_STUDIO:START -->
2
+ # AIM Studio 开发指南
3
+
4
+ 本指南适用于在此项目中工作的 AI 助手 (Claude/Cursor)。
5
+
6
+ ## 核心指令
7
+ - **开始工作**: `/aim:start` (通用) 或 `/aim:story` (漫剧创作)。
8
+ - **结束工作**: `/aim:finish-work` (生成日志并更新进度)。
9
+ - **辅助创作**: `/aim:visualize` (生图提示词) / `/aim:export` (导出)。
10
+ - **质量检查**: `/aim:check-story` (剧情逻辑检查)。
11
+
12
+ ## 漫剧创作模式 (Story Mode)
13
+
14
+ ## 上下文索引
15
+ 请优先阅读 `.aim-studio/` 目录下的文档:
16
+ - **`workflow.md`**: 开发与写作工作流。
17
+ - **`spec/`**: 项目规范(含 `story/` 下的角色与世界观设定)。
18
+ - **`workspace/`**: 你的个人工作区与记忆存储。
19
+
20
+ > **💡 小说改编提示**:
21
+ > 如果用户提供了小说原文(例如《我真没想重生啊》),请建议用户将其存放在 `.aim-studio/materials/` 目录下。
22
+ > 读取原文后,先提取角色特征完善 `character.md`,再进行分章改编。
23
+
24
+ > 请保留此代码块,以便 `aim update` 自动更新指南。
25
+ <!-- AIM_STUDIO:END -->
@@ -0,0 +1,12 @@
1
+ # Trellis workflow gitignore
2
+ # Runtime files that should not be committed
3
+
4
+ # Developer identity (local to each developer)
5
+ .developer
6
+
7
+ # Current task pointer (local state)
8
+ .current-task
9
+
10
+ # Agent runtime files (in worktree)
11
+ .agent-log
12
+ .session-id
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Markdown templates for Trellis workflow
3
+ *
4
+ * These are GENERIC templates for new projects.
5
+ * Structure templates use .md.txt extension as they are generic templates.
6
+ */
7
+ export declare const agentsMdContent: string;
8
+ export declare const workspaceIndexContent: string;
9
+ export declare const agentProgressIndexContent: string;
10
+ export declare const workflowGitignoreContent: string;
11
+ export declare const backendIndexContent: string;
12
+ export declare const backendDirectoryStructureContent: string;
13
+ export declare const backendDatabaseGuidelinesContent: string;
14
+ export declare const backendLoggingGuidelinesContent: string;
15
+ export declare const backendQualityGuidelinesContent: string;
16
+ export declare const backendErrorHandlingContent: string;
17
+ export declare const frontendIndexContent: string;
18
+ export declare const frontendDirectoryStructureContent: string;
19
+ export declare const frontendTypeSafetyContent: string;
20
+ export declare const frontendHookGuidelinesContent: string;
21
+ export declare const frontendComponentGuidelinesContent: string;
22
+ export declare const frontendQualityGuidelinesContent: string;
23
+ export declare const frontendStateManagementContent: string;
24
+ export declare const guidesIndexContent: string;
25
+ export declare const guidesCrossLayerThinkingGuideContent: string;
26
+ export declare const guidesCodeReuseThinkingGuideContent: string;
27
+ export declare const guidesCrossPlatformThinkingGuideContent: string;
28
+ export declare const storyIndexContent: string;
29
+ export declare const storyCharacterContent: string;
30
+ export declare const storyWorldContent: string;
31
+ export declare const storyScriptContent: string;
32
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/markdown/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAqBH,eAAO,MAAM,eAAe,EAAE,MAAuC,CAAC;AAGtE,eAAO,MAAM,qBAAqB,EAAE,MACK,CAAC;AAG1C,eAAO,MAAM,yBAAyB,QAAwB,CAAC;AAG/D,eAAO,MAAM,wBAAwB,EAAE,MACH,CAAC;AAQrC,eAAO,MAAM,mBAAmB,EAAE,MAEjC,CAAC;AACF,eAAO,MAAM,gCAAgC,EAAE,MAE9C,CAAC;AACF,eAAO,MAAM,gCAAgC,EAAE,MAE9C,CAAC;AACF,eAAO,MAAM,+BAA+B,EAAE,MAE7C,CAAC;AACF,eAAO,MAAM,+BAA+B,EAAE,MAE7C,CAAC;AACF,eAAO,MAAM,2BAA2B,EAAE,MAEzC,CAAC;AAGF,eAAO,MAAM,oBAAoB,EAAE,MAElC,CAAC;AACF,eAAO,MAAM,iCAAiC,EAAE,MAE/C,CAAC;AACF,eAAO,MAAM,yBAAyB,EAAE,MAEvC,CAAC;AACF,eAAO,MAAM,6BAA6B,EAAE,MAE3C,CAAC;AACF,eAAO,MAAM,kCAAkC,EAAE,MAEhD,CAAC;AACF,eAAO,MAAM,gCAAgC,EAAE,MAE9C,CAAC;AACF,eAAO,MAAM,8BAA8B,EAAE,MAE5C,CAAC;AAGF,eAAO,MAAM,kBAAkB,EAAE,MAEhC,CAAC;AACF,eAAO,MAAM,oCAAoC,EAAE,MAElD,CAAC;AACF,eAAO,MAAM,mCAAmC,EAAE,MAEjD,CAAC;AACF,eAAO,MAAM,uCAAuC,EAAE,MAErD,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,MAE/B,CAAC;AACF,eAAO,MAAM,qBAAqB,EAAE,MAEnC,CAAC;AACF,eAAO,MAAM,iBAAiB,EAAE,MAE/B,CAAC;AACF,eAAO,MAAM,kBAAkB,EAAE,MAEhC,CAAC"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Markdown templates for Trellis workflow
3
+ *
4
+ * These are GENERIC templates for new projects.
5
+ * Structure templates use .md.txt extension as they are generic templates.
6
+ */
7
+ import { readFileSync } from "node:fs";
8
+ import { dirname, join } from "node:path";
9
+ import { fileURLToPath } from "node:url";
10
+ const __filename = fileURLToPath(import.meta.url);
11
+ const __dirname = dirname(__filename);
12
+ /**
13
+ * Read a template file from src/templates/markdown/
14
+ */
15
+ function readLocalTemplate(filename) {
16
+ const filePath = join(__dirname, filename);
17
+ return readFileSync(filePath, "utf-8");
18
+ }
19
+ // =============================================================================
20
+ // Root files for new projects
21
+ // =============================================================================
22
+ export const agentsMdContent = readLocalTemplate("agents.md");
23
+ // Workspace index template (developer work records)
24
+ export const workspaceIndexContent = readLocalTemplate("workspace-index.md");
25
+ // Backwards compatibility alias
26
+ export const agentProgressIndexContent = workspaceIndexContent;
27
+ // Gitignore (template file - .gitignore is ignored by npm)
28
+ export const workflowGitignoreContent = readLocalTemplate("gitignore.txt");
29
+ // =============================================================================
30
+ // Structure templates (generic templates from .txt files)
31
+ // These are NOT dogfooded - they are generic templates for new projects
32
+ // =============================================================================
33
+ // Backend structure (multi-doc format)
34
+ export const backendIndexContent = readLocalTemplate("spec/backend/index.md.txt");
35
+ export const backendDirectoryStructureContent = readLocalTemplate("spec/backend/directory-structure.md.txt");
36
+ export const backendDatabaseGuidelinesContent = readLocalTemplate("spec/backend/database-guidelines.md.txt");
37
+ export const backendLoggingGuidelinesContent = readLocalTemplate("spec/backend/logging-guidelines.md.txt");
38
+ export const backendQualityGuidelinesContent = readLocalTemplate("spec/backend/quality-guidelines.md.txt");
39
+ export const backendErrorHandlingContent = readLocalTemplate("spec/backend/error-handling.md.txt");
40
+ // Frontend structure (multi-doc format)
41
+ export const frontendIndexContent = readLocalTemplate("spec/frontend/index.md.txt");
42
+ export const frontendDirectoryStructureContent = readLocalTemplate("spec/frontend/directory-structure.md.txt");
43
+ export const frontendTypeSafetyContent = readLocalTemplate("spec/frontend/type-safety.md.txt");
44
+ export const frontendHookGuidelinesContent = readLocalTemplate("spec/frontend/hook-guidelines.md.txt");
45
+ export const frontendComponentGuidelinesContent = readLocalTemplate("spec/frontend/component-guidelines.md.txt");
46
+ export const frontendQualityGuidelinesContent = readLocalTemplate("spec/frontend/quality-guidelines.md.txt");
47
+ export const frontendStateManagementContent = readLocalTemplate("spec/frontend/state-management.md.txt");
48
+ // Guides structure
49
+ export const guidesIndexContent = readLocalTemplate("spec/guides/index.md.txt");
50
+ export const guidesCrossLayerThinkingGuideContent = readLocalTemplate("spec/guides/cross-layer-thinking-guide.md.txt");
51
+ export const guidesCodeReuseThinkingGuideContent = readLocalTemplate("spec/guides/code-reuse-thinking-guide.md.txt");
52
+ export const guidesCrossPlatformThinkingGuideContent = readLocalTemplate("spec/guides/cross-platform-thinking-guide.md.txt");
53
+ // Story structure
54
+ export const storyIndexContent = readLocalTemplate("spec/story/index.md.txt");
55
+ export const storyCharacterContent = readLocalTemplate("spec/story/character.md.txt");
56
+ export const storyWorldContent = readLocalTemplate("spec/story/world.md.txt");
57
+ export const storyScriptContent = readLocalTemplate("spec/story/script.md.txt");
58
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/markdown/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC;;GAEG;AACH,SAAS,iBAAiB,CAAC,QAAgB;IACzC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC3C,OAAO,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC;AAED,gFAAgF;AAChF,8BAA8B;AAC9B,gFAAgF;AAEhF,MAAM,CAAC,MAAM,eAAe,GAAW,iBAAiB,CAAC,WAAW,CAAC,CAAC;AAEtE,oDAAoD;AACpD,MAAM,CAAC,MAAM,qBAAqB,GAChC,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;AAE1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BAAkB,GAAW,iBAAiB,CACzD,0BAA0B,CAC3B,CAAC;AACF,MAAM,CAAC,MAAM,oCAAoC,GAAW,iBAAiB,CAC3E,+CAA+C,CAChD,CAAC;AACF,MAAM,CAAC,MAAM,mCAAmC,GAAW,iBAAiB,CAC1E,8CAA8C,CAC/C,CAAC;AACF,MAAM,CAAC,MAAM,uCAAuC,GAAW,iBAAiB,CAC9E,kDAAkD,CACnD,CAAC;AAEF,kBAAkB;AAClB,MAAM,CAAC,MAAM,iBAAiB,GAAW,iBAAiB,CACxD,yBAAyB,CAC1B,CAAC;AACF,MAAM,CAAC,MAAM,qBAAqB,GAAW,iBAAiB,CAC5D,6BAA6B,CAC9B,CAAC;AACF,MAAM,CAAC,MAAM,iBAAiB,GAAW,iBAAiB,CACxD,yBAAyB,CAC1B,CAAC;AACF,MAAM,CAAC,MAAM,kBAAkB,GAAW,iBAAiB,CACzD,0BAA0B,CAC3B,CAAC"}
@@ -0,0 +1,51 @@
1
+ # Database Guidelines
2
+
3
+ > Database patterns and conventions for this project.
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ <!--
10
+ Document your project's database conventions here.
11
+
12
+ Questions to answer:
13
+ - What ORM/query library do you use?
14
+ - How are migrations managed?
15
+ - What are the naming conventions for tables/columns?
16
+ - How do you handle transactions?
17
+ -->
18
+
19
+ (To be filled by the team)
20
+
21
+ ---
22
+
23
+ ## Query Patterns
24
+
25
+ <!-- How should queries be written? Batch operations? -->
26
+
27
+ (To be filled by the team)
28
+
29
+ ---
30
+
31
+ ## Migrations
32
+
33
+ <!-- How to create and run migrations -->
34
+
35
+ (To be filled by the team)
36
+
37
+ ---
38
+
39
+ ## Naming Conventions
40
+
41
+ <!-- Table names, column names, index names -->
42
+
43
+ (To be filled by the team)
44
+
45
+ ---
46
+
47
+ ## Common Mistakes
48
+
49
+ <!-- Database-related mistakes your team has made -->
50
+
51
+ (To be filled by the team)
@@ -0,0 +1,54 @@
1
+ # Directory Structure
2
+
3
+ > How backend code is organized in this project.
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ <!--
10
+ Document your project's backend directory structure here.
11
+
12
+ Questions to answer:
13
+ - How are modules/packages organized?
14
+ - Where does business logic live?
15
+ - Where are API endpoints defined?
16
+ - How are utilities and helpers organized?
17
+ -->
18
+
19
+ (To be filled by the team)
20
+
21
+ ---
22
+
23
+ ## Directory Layout
24
+
25
+ ```
26
+ <!-- Replace with your actual structure -->
27
+ src/
28
+ ├── ...
29
+ └── ...
30
+ ```
31
+
32
+ ---
33
+
34
+ ## Module Organization
35
+
36
+ <!-- How should new features/modules be organized? -->
37
+
38
+ (To be filled by the team)
39
+
40
+ ---
41
+
42
+ ## Naming Conventions
43
+
44
+ <!-- File and folder naming rules -->
45
+
46
+ (To be filled by the team)
47
+
48
+ ---
49
+
50
+ ## Examples
51
+
52
+ <!-- Link to well-organized modules as examples -->
53
+
54
+ (To be filled by the team)
@@ -0,0 +1,51 @@
1
+ # Error Handling
2
+
3
+ > How errors are handled in this project.
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ <!--
10
+ Document your project's error handling conventions here.
11
+
12
+ Questions to answer:
13
+ - What error types do you define?
14
+ - How are errors propagated?
15
+ - How are errors logged?
16
+ - How are errors returned to clients?
17
+ -->
18
+
19
+ (To be filled by the team)
20
+
21
+ ---
22
+
23
+ ## Error Types
24
+
25
+ <!-- Custom error classes/types -->
26
+
27
+ (To be filled by the team)
28
+
29
+ ---
30
+
31
+ ## Error Handling Patterns
32
+
33
+ <!-- Try-catch patterns, error propagation -->
34
+
35
+ (To be filled by the team)
36
+
37
+ ---
38
+
39
+ ## API Error Responses
40
+
41
+ <!-- Standard error response format -->
42
+
43
+ (To be filled by the team)
44
+
45
+ ---
46
+
47
+ ## Common Mistakes
48
+
49
+ <!-- Error handling mistakes your team has made -->
50
+
51
+ (To be filled by the team)
@@ -0,0 +1,40 @@
1
+ # Backend Development Guidelines
2
+
3
+ > Best practices for backend development in this project.
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ This directory contains guidelines for backend development. Fill in each file with your project's specific conventions.
10
+
11
+ ---
12
+
13
+ ## Guidelines Index
14
+
15
+ | Guide | Description | Status |
16
+ |-------|-------------|--------|
17
+ | [Directory Structure](./directory-structure.md) | Module organization and file layout | Done |
18
+ | [Script Conventions](./script-conventions.md) | Python script standards for .aim-studio/scripts/ | Done |
19
+ | [Error Handling](./error-handling.md) | Error types, handling strategies | Done |
20
+ | [Quality Guidelines](./quality-guidelines.md) | Code standards, forbidden patterns | Done |
21
+ | [Logging Guidelines](./logging-guidelines.md) | Structured logging, log levels | Done |
22
+ | [Migrations](./migrations.md) | Version migration system for template files | Done |
23
+ | [Database Guidelines](./database-guidelines.md) | ORM patterns, queries, migrations | N/A (CLI project) |
24
+
25
+ ---
26
+
27
+ ## How to Fill These Guidelines
28
+
29
+ For each guideline file:
30
+
31
+ 1. Document your project's **actual conventions** (not ideals)
32
+ 2. Include **code examples** from your codebase
33
+ 3. List **forbidden patterns** and why
34
+ 4. Add **common mistakes** your team has made
35
+
36
+ The goal is to help AI assistants and new team members understand how YOUR project works.
37
+
38
+ ---
39
+
40
+ **Language**: All documentation should be written in **English**.
@@ -0,0 +1,38 @@
1
+ # Backend Development Guidelines
2
+
3
+ > Best practices for backend development in this project.
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ This directory contains guidelines for backend development. Fill in each file with your project's specific conventions.
10
+
11
+ ---
12
+
13
+ ## Guidelines Index
14
+
15
+ | Guide | Description | Status |
16
+ |-------|-------------|--------|
17
+ | [Directory Structure](./directory-structure.md) | Module organization and file layout | To fill |
18
+ | [Database Guidelines](./database-guidelines.md) | ORM patterns, queries, migrations | To fill |
19
+ | [Error Handling](./error-handling.md) | Error types, handling strategies | To fill |
20
+ | [Quality Guidelines](./quality-guidelines.md) | Code standards, forbidden patterns | To fill |
21
+ | [Logging Guidelines](./logging-guidelines.md) | Structured logging, log levels | To fill |
22
+
23
+ ---
24
+
25
+ ## How to Fill These Guidelines
26
+
27
+ For each guideline file:
28
+
29
+ 1. Document your project's **actual conventions** (not ideals)
30
+ 2. Include **code examples** from your codebase
31
+ 3. List **forbidden patterns** and why
32
+ 4. Add **common mistakes** your team has made
33
+
34
+ The goal is to help AI assistants and new team members understand how YOUR project works.
35
+
36
+ ---
37
+
38
+ **Language**: All documentation should be written in **English**.