@ripla/godd-mcp 1.0.4-canary.8 → 1.0.4

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 (348) hide show
  1. package/README.md +89 -94
  2. package/dist/godd.cjs +349 -233
  3. package/dist/godd.js +2193 -838
  4. package/dist/index.js +152 -122
  5. package/{notes-api → notes/api}/.env.example +6 -1
  6. package/{notes-api → notes/api}/README.md +6 -5
  7. package/{notes-api → notes/api}/app/main.py +29 -2
  8. package/{notes-api → notes/api}/app/routers/auth.py +6 -1
  9. package/{notes-api → notes/api}/app/routers/issues.py +157 -1
  10. package/{notes-api → notes/api}/app/routers/pr.py +2 -2
  11. package/{notes-api → notes/api}/app/services/github_app_token.py +32 -1
  12. package/{notes-api → notes/api}/app/services/github_issues.py +101 -11
  13. package/{notes-api → notes/api}/app/services/github_pr.py +6 -1
  14. package/{notes-api → notes/api}/tests/test_github_app_token.py +49 -1
  15. package/{notes-api → notes/api}/tests/test_github_service.py +42 -0
  16. package/notes/api/tests/test_health.py +52 -0
  17. package/{notes-api → notes/api}/tests/test_issues.py +216 -0
  18. package/{notes-api → notes/api}/tests/test_pr.py +24 -0
  19. package/{notes-api → notes/api}/tests/test_pr_chain.py +19 -0
  20. package/{notes-api → notes/api}/uv.lock +178 -2
  21. package/notes/app/DESIGN.md +273 -0
  22. package/{notes-app → notes/app}/README.md +4 -1
  23. package/notes/app/docker/Dockerfile.e2e +19 -0
  24. package/notes/app/docker/Dockerfile.prod +15 -0
  25. package/notes/app/docker/Dockerfile.test +17 -0
  26. package/notes/app/e2e/file-tree.spec.ts +26 -0
  27. package/notes/app/e2e/file-view.spec.ts +25 -0
  28. package/notes/app/e2e/fixtures.ts +28 -0
  29. package/{notes-app → notes/app}/e2e/global-setup.ts +5 -7
  30. package/notes/app/e2e/login.spec.ts +25 -0
  31. package/notes/app/e2e/pages/login-page.ts +29 -0
  32. package/notes/app/e2e/pages/main-page.ts +29 -0
  33. package/notes/app/e2e/panel-resize-handle.spec.ts +213 -0
  34. package/{notes-app → notes/app}/eslint.config.js +9 -0
  35. package/{notes-app → notes/app}/package.json +0 -3
  36. package/{notes-app → notes/app}/pnpm-workspace.yaml +1 -0
  37. package/notes/app/src/components/CommentPanel.test.tsx +194 -0
  38. package/{notes-app → notes/app}/src/components/CommentPanel.tsx +119 -10
  39. package/notes/app/src/components/CommentSelectionPopover.tsx +26 -0
  40. package/notes/app/src/components/EditToolbar.test.tsx +102 -0
  41. package/{notes-app → notes/app}/src/components/EditToolbar.tsx +5 -54
  42. package/notes/app/src/components/FileInfoPanel.branch-tab.test.tsx +250 -0
  43. package/notes/app/src/components/FileInfoPanel.history-tab.test.tsx +146 -0
  44. package/notes/app/src/components/FileInfoPanel.test.tsx +101 -0
  45. package/{notes-app → notes/app}/src/components/FileInfoPanel.tsx +135 -20
  46. package/notes/app/src/components/IssueCommentThread.test.tsx +93 -0
  47. package/notes/app/src/components/IssueCommentThread.tsx +156 -0
  48. package/notes/app/src/components/IssueDetailView.test.tsx +1118 -0
  49. package/notes/app/src/components/IssueDetailView.tsx +476 -0
  50. package/notes/app/src/components/IssueList.test.tsx +545 -0
  51. package/notes/app/src/components/IssueList.tsx +374 -0
  52. package/{notes-app → notes/app}/src/components/LabelSelector.test.tsx +94 -8
  53. package/notes/app/src/components/LabelSelector.tsx +452 -0
  54. package/{notes-app → notes/app}/src/components/MarkdownEditor.tsx +140 -2
  55. package/notes/app/src/components/PanelResizeHandle.test.tsx +481 -0
  56. package/notes/app/src/components/PanelResizeHandle.tsx +96 -0
  57. package/{notes-app → notes/app}/src/hooks/useEditSession.test.ts +171 -23
  58. package/{notes-app → notes/app}/src/hooks/useEditSession.ts +49 -62
  59. package/notes/app/src/hooks/useMdUpLayout.test.ts +10 -0
  60. package/notes/app/src/hooks/useMdUpLayout.ts +27 -0
  61. package/notes/app/src/hooks/usePeriodicSync.test.ts +244 -0
  62. package/notes/app/src/hooks/usePeriodicSync.ts +83 -0
  63. package/notes/app/src/hooks/useResizablePanelWidth.test.ts +251 -0
  64. package/notes/app/src/hooks/useResizablePanelWidth.ts +167 -0
  65. package/{notes-app → notes/app}/src/lib/api.test.ts +81 -1
  66. package/{notes-app → notes/app}/src/lib/api.ts +98 -4
  67. package/notes/app/src/lib/commentAnchor.test.ts +22 -0
  68. package/notes/app/src/lib/commentAnchor.ts +28 -0
  69. package/notes/app/src/lib/commentHighlight.test.ts +110 -0
  70. package/notes/app/src/lib/commentHighlight.ts +44 -0
  71. package/notes/app/src/lib/github-sync.test.ts +126 -0
  72. package/notes/app/src/lib/github-sync.ts +89 -0
  73. package/notes/app/src/lib/issue-list-utils.test.ts +275 -0
  74. package/notes/app/src/lib/issue-list-utils.ts +135 -0
  75. package/notes/app/src/lib/issue-mobile-layout.test.ts +17 -0
  76. package/notes/app/src/lib/issue-mobile-layout.ts +20 -0
  77. package/notes/app/src/lib/issue-url-sync.test.ts +73 -0
  78. package/notes/app/src/lib/issue-url-sync.ts +43 -0
  79. package/notes/app/src/lib/main-page-default-view.test.ts +37 -0
  80. package/notes/app/src/lib/main-page-default-view.ts +15 -0
  81. package/notes/app/src/lib/resizable-panel.test.ts +199 -0
  82. package/notes/app/src/lib/resizable-panel.ts +136 -0
  83. package/notes/app/src/pages/LoginPage.test.tsx +17 -0
  84. package/notes/app/src/pages/MainPage.branch-modal.test.tsx +226 -0
  85. package/notes/app/src/pages/MainPage.issue-sync.test.tsx +145 -0
  86. package/notes/app/src/pages/MainPage.sidebar.test.tsx +361 -0
  87. package/{notes-app → notes/app}/src/pages/MainPage.tsx +406 -61
  88. package/{notes-app → notes/app}/src/pages/SettingsPage.test.tsx +32 -23
  89. package/{notes-app → notes/app}/src/pages/UserManagementPage.test.tsx +8 -18
  90. package/notes/app/src/test/mocks.ts +156 -0
  91. package/notes/app/src/test/render.tsx +27 -0
  92. package/package.json +3 -5
  93. package/notes-api/tests/test_health.py +0 -11
  94. package/notes-app/docker/Dockerfile.e2e +0 -14
  95. package/notes-app/docker/Dockerfile.prod +0 -12
  96. package/notes-app/docker/Dockerfile.test +0 -12
  97. package/notes-app/e2e/file-tree.spec.ts +0 -29
  98. package/notes-app/e2e/file-view.spec.ts +0 -24
  99. package/notes-app/e2e/login.spec.ts +0 -32
  100. package/notes-app/src/components/IssueDetailView.test.tsx +0 -201
  101. package/notes-app/src/components/IssueDetailView.tsx +0 -318
  102. package/notes-app/src/components/IssueList.test.tsx +0 -93
  103. package/notes-app/src/components/IssueList.tsx +0 -169
  104. package/notes-app/src/components/LabelSelector.tsx +0 -276
  105. package/notes-app/src/pages/LoginPage.test.tsx +0 -29
  106. package/stacks/django-vue.yaml +0 -33
  107. package/stacks/fastapi-react.yaml +0 -160
  108. package/stacks/flutter-firebase.yaml +0 -58
  109. package/stacks/nextjs-prisma.yaml +0 -33
  110. package/stacks/schema.json +0 -144
  111. package/templates/agents/architect.hbs +0 -183
  112. package/templates/agents/auto-documenter.hbs +0 -36
  113. package/templates/agents/backend-developer.hbs +0 -175
  114. package/templates/agents/code-reviewer.hbs +0 -29
  115. package/templates/agents/database-developer.hbs +0 -52
  116. package/templates/agents/debug-specialist.hbs +0 -39
  117. package/templates/agents/environment-setup.hbs +0 -41
  118. package/templates/agents/frontend-developer.hbs +0 -45
  119. package/templates/agents/integration-qa.hbs +0 -26
  120. package/templates/agents/performance-qa.hbs +0 -24
  121. package/templates/agents/pr-writer.hbs +0 -53
  122. package/templates/agents/quality-lead.hbs +0 -26
  123. package/templates/agents/requirements-analyst.hbs +0 -26
  124. package/templates/agents/security-analyst.hbs +0 -21
  125. package/templates/agents/security-reviewer.hbs +0 -20
  126. package/templates/agents/ssot-updater.hbs +0 -45
  127. package/templates/agents/technical-writer.hbs +0 -28
  128. package/templates/agents/unit-test-engineer.hbs +0 -19
  129. package/templates/agents/user-clone.hbs +0 -43
  130. package/templates/github-actions/aws/deploy-notes.yml.hbs +0 -117
  131. package/templates/github-actions/azure/deploy-notes.yml.hbs +0 -78
  132. package/templates/github-actions/gcp/deploy-notes.yml.hbs +0 -76
  133. package/templates/github-actions/vercel-railway/deploy-notes.yml.hbs +0 -49
  134. package/templates/mindsets/agent-stdio.hbs +0 -51
  135. package/templates/mindsets/dart.hbs +0 -39
  136. package/templates/mindsets/ddd-clean-architecture.hbs +0 -52
  137. package/templates/mindsets/electron.hbs +0 -41
  138. package/templates/mindsets/fastapi.hbs +0 -40
  139. package/templates/mindsets/flutter.hbs +0 -56
  140. package/templates/mindsets/kotlin.hbs +0 -46
  141. package/templates/mindsets/postgresql.hbs +0 -39
  142. package/templates/mindsets/python.hbs +0 -39
  143. package/templates/mindsets/react.hbs +0 -51
  144. package/templates/mindsets/swift.hbs +0 -46
  145. package/templates/mindsets/terraform.hbs +0 -53
  146. package/templates/mindsets/typescript.hbs +0 -34
  147. package/templates/mindsets/vite.hbs +0 -37
  148. package/templates/notes-compose.yml +0 -82
  149. package/templates/partials/cogito-geo.hbs +0 -84
  150. package/templates/partials/cogito-godd.hbs +0 -22
  151. package/templates/partials/cogito-grammar.hbs +0 -105
  152. package/templates/partials/cogito-particle.hbs +0 -76
  153. package/templates/partials/cogito-root-ai.hbs +0 -79
  154. package/templates/partials/cogito-root-arch.hbs +0 -75
  155. package/templates/partials/cogito-root-core.hbs +0 -75
  156. package/templates/partials/cogito-root-daily.hbs +0 -58
  157. package/templates/partials/cogito-root-dev.hbs +0 -71
  158. package/templates/partials/cogito-root-devops.hbs +0 -71
  159. package/templates/partials/cogito-root-framework.hbs +0 -80
  160. package/templates/partials/cogito-root-lang.hbs +0 -74
  161. package/templates/partials/godd-core.hbs +0 -50
  162. package/templates/partials/project-context.hbs +0 -52
  163. package/templates/partials/ssot-header.hbs +0 -40
  164. package/templates/partials/ssot-rules.hbs +0 -30
  165. package/templates/prompts/adr.hbs +0 -39
  166. package/templates/prompts/agent-dev-workflow.hbs +0 -34
  167. package/templates/prompts/analyze-report.hbs +0 -36
  168. package/templates/prompts/auto-documentation.hbs +0 -37
  169. package/templates/prompts/check.hbs +0 -52
  170. package/templates/prompts/commit.hbs +0 -96
  171. package/templates/prompts/dev.hbs +0 -127
  172. package/templates/prompts/docs-init.hbs +0 -101
  173. package/templates/prompts/docs-update.hbs +0 -51
  174. package/templates/prompts/git-workflow.hbs +0 -125
  175. package/templates/prompts/impact-analysis.hbs +0 -43
  176. package/templates/prompts/install.hbs +0 -40
  177. package/templates/prompts/new-branch.hbs +0 -61
  178. package/templates/prompts/notes-deploy.hbs +0 -138
  179. package/templates/prompts/pr-analyze.hbs +0 -44
  180. package/templates/prompts/pr-create.hbs +0 -125
  181. package/templates/prompts/push-execute.hbs +0 -83
  182. package/templates/prompts/push.hbs +0 -24
  183. package/templates/prompts/release-notes.hbs +0 -38
  184. package/templates/prompts/requirements-to-business-flow.hbs +0 -29
  185. package/templates/prompts/requirements-to-tickets.hbs +0 -26
  186. package/templates/prompts/review.hbs +0 -126
  187. package/templates/prompts/setup.hbs +0 -247
  188. package/templates/prompts/spec.hbs +0 -35
  189. package/templates/prompts/specification-to-tickets.hbs +0 -24
  190. package/templates/prompts/submit.hbs +0 -143
  191. package/templates/prompts/sync.hbs +0 -63
  192. package/templates/prompts/test-plan.hbs +0 -56
  193. package/templates/scripts/aws/terraform-backend-setup.sh.hbs +0 -149
  194. package/templates/terraform/aws/alb.tf.hbs +0 -58
  195. package/templates/terraform/aws/backend.tf.hbs +0 -10
  196. package/templates/terraform/aws/cloudfront.tf.hbs +0 -96
  197. package/templates/terraform/aws/ecr.tf.hbs +0 -30
  198. package/templates/terraform/aws/ecs.tf.hbs +0 -142
  199. package/templates/terraform/aws/iam.tf.hbs +0 -88
  200. package/templates/terraform/aws/local.tf.hbs +0 -34
  201. package/templates/terraform/aws/output.tf.hbs +0 -49
  202. package/templates/terraform/aws/provider.tf.hbs +0 -26
  203. package/templates/terraform/aws/rds.tf.hbs +0 -38
  204. package/templates/terraform/aws/s3.tf.hbs +0 -34
  205. package/templates/terraform/aws/secrets.tf.hbs +0 -53
  206. package/templates/terraform/aws/security_groups.tf.hbs +0 -81
  207. package/templates/terraform/aws/vpc.tf.hbs +0 -63
  208. package/templates/terraform/azure/backend.tf.hbs +0 -8
  209. package/templates/terraform/azure/iam.tf.hbs +0 -36
  210. package/templates/terraform/azure/main.tf.hbs +0 -203
  211. package/templates/terraform/azure/output.tf.hbs +0 -19
  212. package/templates/terraform/azure/provider.tf.hbs +0 -19
  213. package/templates/terraform/gcp/backend.tf.hbs +0 -6
  214. package/templates/terraform/gcp/iam.tf.hbs +0 -47
  215. package/templates/terraform/gcp/main.tf.hbs +0 -175
  216. package/templates/terraform/gcp/output.tf.hbs +0 -15
  217. package/templates/terraform/gcp/provider.tf.hbs +0 -19
  218. package/templates/terraform/vercel-railway/main.tf.hbs +0 -64
  219. package/templates/terraform/vercel-railway/output.tf.hbs +0 -11
  220. /package/{notes-api → notes/api}/.dockerignore +0 -0
  221. /package/{notes-api → notes/api}/alembic/README +0 -0
  222. /package/{notes-api → notes/api}/alembic/env.py +0 -0
  223. /package/{notes-api → notes/api}/alembic/script.py.mako +0 -0
  224. /package/{notes-api → notes/api}/alembic/versions/001_initial_notes_tables.py +0 -0
  225. /package/{notes-api → notes/api}/alembic/versions/002_add_performance_indexes.py +0 -0
  226. /package/{notes-api → notes/api}/alembic/versions/003_add_yjs_documents.py +0 -0
  227. /package/{notes-api → notes/api}/alembic/versions/004_add_comments.py +0 -0
  228. /package/{notes-api → notes/api}/alembic/versions/005_add_github_username.py +0 -0
  229. /package/{notes-api → notes/api}/alembic/versions/006_add_check_constraints.py +0 -0
  230. /package/{notes-api → notes/api}/alembic.ini +0 -0
  231. /package/{notes-api → notes/api}/app/__init__.py +0 -0
  232. /package/{notes-api → notes/api}/app/config.py +0 -0
  233. /package/{notes-api → notes/api}/app/database.py +0 -0
  234. /package/{notes-api → notes/api}/app/http_client.py +0 -0
  235. /package/{notes-api → notes/api}/app/models/__init__.py +0 -0
  236. /package/{notes-api → notes/api}/app/models/audit.py +0 -0
  237. /package/{notes-api → notes/api}/app/models/base.py +0 -0
  238. /package/{notes-api → notes/api}/app/models/collab.py +0 -0
  239. /package/{notes-api → notes/api}/app/models/comment.py +0 -0
  240. /package/{notes-api → notes/api}/app/models/session.py +0 -0
  241. /package/{notes-api → notes/api}/app/models/setting.py +0 -0
  242. /package/{notes-api → notes/api}/app/models/user.py +0 -0
  243. /package/{notes-api → notes/api}/app/path_validation.py +0 -0
  244. /package/{notes-api → notes/api}/app/routers/__init__.py +0 -0
  245. /package/{notes-api → notes/api}/app/routers/collab.py +0 -0
  246. /package/{notes-api → notes/api}/app/routers/comments.py +0 -0
  247. /package/{notes-api → notes/api}/app/routers/files.py +0 -0
  248. /package/{notes-api → notes/api}/app/routers/settings.py +0 -0
  249. /package/{notes-api → notes/api}/app/routers/tree.py +0 -0
  250. /package/{notes-api → notes/api}/app/routers/upload.py +0 -0
  251. /package/{notes-api → notes/api}/app/routers/users.py +0 -0
  252. /package/{notes-api → notes/api}/app/schemas/__init__.py +0 -0
  253. /package/{notes-api → notes/api}/app/schemas/auth.py +0 -0
  254. /package/{notes-api → notes/api}/app/schemas/user.py +0 -0
  255. /package/{notes-api → notes/api}/app/security.py +0 -0
  256. /package/{notes-api → notes/api}/app/services/__init__.py +0 -0
  257. /package/{notes-api → notes/api}/app/services/audit.py +0 -0
  258. /package/{notes-api → notes/api}/app/services/business_date.py +0 -0
  259. /package/{notes-api → notes/api}/app/services/collab.py +0 -0
  260. /package/{notes-api → notes/api}/app/services/github.py +0 -0
  261. /package/{notes-api → notes/api}/app/services/pr_chain.py +0 -0
  262. /package/{notes-api → notes/api}/app/startup.py +0 -0
  263. /package/{notes-api → notes/api}/docker/Dockerfile +0 -0
  264. /package/{notes-api → notes/api}/docker/Dockerfile.test +0 -0
  265. /package/{notes-api → notes/api}/pyproject.toml +0 -0
  266. /package/{notes-api → notes/api}/tests/conftest.py +0 -0
  267. /package/{notes-api → notes/api}/tests/test_audit.py +0 -0
  268. /package/{notes-api → notes/api}/tests/test_auth.py +0 -0
  269. /package/{notes-api → notes/api}/tests/test_business_date.py +0 -0
  270. /package/{notes-api → notes/api}/tests/test_collab.py +0 -0
  271. /package/{notes-api → notes/api}/tests/test_comments.py +0 -0
  272. /package/{notes-api → notes/api}/tests/test_config_ssl.py +0 -0
  273. /package/{notes-api → notes/api}/tests/test_config_warnings.py +0 -0
  274. /package/{notes-api → notes/api}/tests/test_files.py +0 -0
  275. /package/{notes-api → notes/api}/tests/test_path_validation.py +0 -0
  276. /package/{notes-api → notes/api}/tests/test_security.py +0 -0
  277. /package/{notes-api → notes/api}/tests/test_settings.py +0 -0
  278. /package/{notes-api → notes/api}/tests/test_tree.py +0 -0
  279. /package/{notes-api → notes/api}/tests/test_upload.py +0 -0
  280. /package/{notes-api → notes/api}/tests/test_users.py +0 -0
  281. /package/{notes-app → notes/app}/.dockerignore +0 -0
  282. /package/{notes-app → notes/app}/index.html +0 -0
  283. /package/{notes-app → notes/app}/nginx.conf +0 -0
  284. /package/{notes-app → notes/app}/package-lock.json +0 -0
  285. /package/{notes-app → notes/app}/playwright.config.ts +0 -0
  286. /package/{notes-app → notes/app}/pnpm-lock.yaml +0 -0
  287. /package/{notes-app → notes/app}/src/App.tsx +0 -0
  288. /package/{notes-app → notes/app}/src/components/BranchSelectorModal.tsx +0 -0
  289. /package/{notes-app → notes/app}/src/components/CodeBlockView.test.tsx +0 -0
  290. /package/{notes-app → notes/app}/src/components/CodeBlockView.tsx +0 -0
  291. /package/{notes-app → notes/app}/src/components/CollabStatus.tsx +0 -0
  292. /package/{notes-app → notes/app}/src/components/DiffPreview.tsx +0 -0
  293. /package/{notes-app → notes/app}/src/components/DrawioEditor.tsx +0 -0
  294. /package/{notes-app → notes/app}/src/components/DrawioViewer.tsx +0 -0
  295. /package/{notes-app → notes/app}/src/components/ErrorBoundary.test.tsx +0 -0
  296. /package/{notes-app → notes/app}/src/components/ErrorBoundary.tsx +0 -0
  297. /package/{notes-app → notes/app}/src/components/FileContentView.tsx +0 -0
  298. /package/{notes-app → notes/app}/src/components/FileContextMenu.test.tsx +0 -0
  299. /package/{notes-app → notes/app}/src/components/FileContextMenu.tsx +0 -0
  300. /package/{notes-app → notes/app}/src/components/FileDialogs.test.tsx +0 -0
  301. /package/{notes-app → notes/app}/src/components/FileDialogs.tsx +0 -0
  302. /package/{notes-app → notes/app}/src/components/SaveStatusIndicator.test.tsx +0 -0
  303. /package/{notes-app → notes/app}/src/components/SaveStatusIndicator.tsx +0 -0
  304. /package/{notes-app → notes/app}/src/components/Skeleton.tsx +0 -0
  305. /package/{notes-app → notes/app}/src/components/SpreadsheetEditor.test.tsx +0 -0
  306. /package/{notes-app → notes/app}/src/components/SpreadsheetEditor.tsx +0 -0
  307. /package/{notes-app → notes/app}/src/components/TextEditor.tsx +0 -0
  308. /package/{notes-app → notes/app}/src/components/ToastContainer.tsx +0 -0
  309. /package/{notes-app → notes/app}/src/components/TreeNode.tsx +0 -0
  310. /package/{notes-app → notes/app}/src/contexts/AuthContext.test.tsx +0 -0
  311. /package/{notes-app → notes/app}/src/contexts/AuthContext.tsx +0 -0
  312. /package/{notes-app → notes/app}/src/contexts/ToastContext.test.ts +0 -0
  313. /package/{notes-app → notes/app}/src/contexts/ToastContext.tsx +0 -0
  314. /package/{notes-app → notes/app}/src/hooks/useAutoSave.test.ts +0 -0
  315. /package/{notes-app → notes/app}/src/hooks/useAutoSave.ts +0 -0
  316. /package/{notes-app → notes/app}/src/hooks/useCollaboration.ts +0 -0
  317. /package/{notes-app → notes/app}/src/hooks/useComments.ts +0 -0
  318. /package/{notes-app → notes/app}/src/hooks/useYText.ts +0 -0
  319. /package/{notes-app → notes/app}/src/lib/branch-diff.test.ts +0 -0
  320. /package/{notes-app → notes/app}/src/lib/branch-diff.ts +0 -0
  321. /package/{notes-app → notes/app}/src/lib/created-file.test.ts +0 -0
  322. /package/{notes-app → notes/app}/src/lib/created-file.ts +0 -0
  323. /package/{notes-app → notes/app}/src/lib/csv-utils.test.ts +0 -0
  324. /package/{notes-app → notes/app}/src/lib/csv-utils.ts +0 -0
  325. /package/{notes-app → notes/app}/src/lib/deepLinkPathToSearch.test.ts +0 -0
  326. /package/{notes-app → notes/app}/src/lib/deepLinkPathToSearch.ts +0 -0
  327. /package/{notes-app → notes/app}/src/lib/draft-storage.test.ts +0 -0
  328. /package/{notes-app → notes/app}/src/lib/draft-storage.ts +0 -0
  329. /package/{notes-app → notes/app}/src/lib/mermaid-render.ts +0 -0
  330. /package/{notes-app → notes/app}/src/lib/postLoginRedirect.test.ts +0 -0
  331. /package/{notes-app → notes/app}/src/lib/postLoginRedirect.ts +0 -0
  332. /package/{notes-app → notes/app}/src/lib/tree-utils.ts +0 -0
  333. /package/{notes-app → notes/app}/src/lib/user-colors.ts +0 -0
  334. /package/{notes-app → notes/app}/src/lib/xlsx-utils.test.ts +0 -0
  335. /package/{notes-app → notes/app}/src/lib/xlsx-utils.ts +0 -0
  336. /package/{notes-app → notes/app}/src/main.tsx +0 -0
  337. /package/{notes-app → notes/app}/src/pages/LoginPage.tsx +0 -0
  338. /package/{notes-app → notes/app}/src/pages/MainPage.insertChildEntry.test.ts +0 -0
  339. /package/{notes-app → notes/app}/src/pages/SettingsPage.tsx +0 -0
  340. /package/{notes-app → notes/app}/src/pages/UserManagementPage.tsx +0 -0
  341. /package/{notes-app → notes/app}/src/styles/globals.css +0 -0
  342. /package/{notes-app → notes/app}/src/types.ts +0 -0
  343. /package/{notes-app → notes/app}/src/vite-env.d.ts +0 -0
  344. /package/{notes-app → notes/app}/tsconfig.json +0 -0
  345. /package/{notes-app → notes/app}/tsconfig.node.json +0 -0
  346. /package/{notes-app → notes/app}/vite.config.js +0 -0
  347. /package/{notes-app → notes/app}/vite.config.ts +0 -0
  348. /package/{notes-app → notes/app}/vitest.config.ts +0 -0
@@ -1,38 +0,0 @@
1
- {{> ssot-header }}
2
-
3
- {{> godd-core }}
4
-
5
- {{> ssot-rules }}
6
-
7
- {{> project-context }}
8
-
9
- {{> cogito-grammar }}
10
- {{> cogito-root-core }}
11
- {{> cogito-particle }}
12
- {{> cogito-godd }}
13
- {{> cogito-root-daily }}
14
-
15
- ## Purpose
16
- Create release notes that clearly communicate changes, migrations, and known issues.
17
- The audience is end users and operators — write for clarity and actionability.
18
-
19
- ## Input
20
- - Changes (additions / modifications / fixes)
21
- - Compatibility / migration requirements
22
- - Known issues
23
-
24
- ## Output
25
- Markdown release notes with the following sections:
26
- - **Version**: Version number and release date
27
- - **Highlights**: 1-3 sentence summary of the most important changes
28
- - **Added**: New features and capabilities
29
- - **Changed**: Modifications to existing behavior (include migration steps if needed)
30
- - **Fixed**: Bug fixes with brief description of the issue and resolution
31
- - **Deprecated**: Features scheduled for removal (include timeline and alternatives)
32
- - **Removed**: Features that were removed in this release
33
- - **Security**: Security-related changes (CVEs, vulnerability fixes)
34
- - **Breaking Changes**: Changes that require user action (migration guide must be included)
35
- - **Known Issues**: Outstanding problems with workarounds if available
36
- - **Migration Guide**: Step-by-step instructions for upgrading (if applicable)
37
-
38
- Fill every applicable section. Mark empty sections as "None in this release."
@@ -1,29 +0,0 @@
1
- {{> ssot-header }}
2
-
3
- {{> cogito-grammar }}
4
- {{> cogito-root-core }}
5
- {{> cogito-particle }}
6
- {{> cogito-godd }}
7
- {{> cogito-root-daily }}
8
-
9
- {{> ssot-rules }}
10
-
11
- {{> project-context }}
12
-
13
- ## Purpose
14
- Transform requirements (natural language) into business flows (As-Is / To-Be) and use cases.
15
-
16
- ## Output
17
-
18
- ### As-Is (Current Flow)
19
- -
20
-
21
- ### To-Be (Target Flow)
22
- -
23
-
24
- ### Use Case List
25
- - Purpose/Trigger/Main success scenario/Alternative scenario/Exceptions
26
-
27
- ### Spec Mapping
28
- - List the required Spec templates (UI/API/DB/Feature/Usecase/Error Codes) and recommend which to create
29
- - Specs are placed under `docs/003_requirements/spec/`
@@ -1,26 +0,0 @@
1
- {{> ssot-header }}
2
-
3
- {{> cogito-grammar }}
4
- {{> cogito-root-core }}
5
- {{> cogito-particle }}
6
- {{> cogito-godd }}
7
- {{> cogito-root-daily }}
8
-
9
- {{> ssot-rules }}
10
-
11
- {{> project-context }}
12
-
13
- ## Purpose
14
- Break down requirements into implementation tasks (tickets).
15
-
16
- ## Output
17
- - Ticket list (1 line = 1 ticket)
18
- - Title
19
- - Purpose (Done criteria)
20
- - Impact scope ({{#if frontend}}Front/{{/if}}{{#if backend}}Back/{{/if}}Agent/Infra)
21
- - Dependencies (Specs/tasks required first)
22
- - Verification method (minimal)
23
-
24
- ## Rules
25
- - If Specs are not yet created/finalized, add a "Create Spec" ticket as the highest priority
26
- - If there are breaking changes, always include a "Migration/Rollback" ticket
@@ -1,126 +0,0 @@
1
- {{> ssot-header }}
2
-
3
- {{> godd-core }}
4
-
5
- {{> ssot-rules }}
6
-
7
- {{> project-context }}
8
-
9
- {{> cogito-grammar }}
10
- {{> cogito-root-core }}
11
- {{> cogito-particle }}
12
- {{> cogito-godd }}
13
- {{> cogito-root-dev }}
14
-
15
- ## Purpose
16
- Perform a **CTO-level code review** that goes beyond syntax and style. Evaluate changes from strategic, architectural, and business-impact perspectives while maintaining rigorous technical standards.
17
-
18
- ## Review Perspective (CTO Level)
19
-
20
- You review as a CTO who:
21
- - Thinks about **long-term maintainability** and **team scalability**
22
- - Evaluates **architectural alignment** with the project's overall direction
23
- - Considers **business impact** and **operational risk**
24
- - Prioritizes **security** and **data integrity** as non-negotiable
25
- - Balances **pragmatism** with **engineering excellence**
26
-
27
- ## Review Criteria
28
-
29
- ### 1. Architecture & Design
30
- - Separation of concerns, dependency direction{{#if backend}} ({{backend.dependency_direction}}){{/if}}, SOLID principles
31
- - **Architectural consistency**: Does this change align with existing patterns or introduce divergence?
32
- - **Scalability**: Will this approach hold up as the codebase and team grow?
33
- - **Technical debt**: Does this add, reduce, or leave tech debt neutral?
34
- - **Abstraction quality**: Right level of abstraction? Over-engineering or under-engineering?
35
-
36
- ### 2. Type Safety & Code Quality
37
- - No `any`, treat external input as `unknown`, proper validation at boundaries
38
- - **Readability**: Can a new team member understand this without extensive context?
39
- - **Complexity**: Cyclomatic complexity, nesting depth, function length
40
- - **Naming**: Domain-accurate naming that communicates intent
41
-
42
- ### 3. Testing & Reliability
43
- - Sufficient test coverage for changes, boundary values & error cases covered
44
- - New features: Are acceptance tests present (ATDD)?
45
- - Bug fixes: Is there a reproduction test?
46
- - **Determinism**: Are tests independent and repeatable?
47
- - **Test architecture**: AAA pattern, no test-to-test dependencies
48
-
49
- ### 4. Error Handling & Resilience
50
- - Failure paths handled first? Early returns for clean flow?
51
- - **Graceful degradation**: How does the system behave under partial failure?
52
- - **Error messages**: Actionable, specific, no secret leakage
53
-
54
- ### 5. Security
55
- - Secret leaks, SQL injection, XSS, improper access control
56
- - **Data exposure**: PII/sensitive data in logs, responses, or error messages?
57
- - **Authentication/Authorization**: Proper boundary enforcement?
58
- - **Dependency risk**: Known vulnerabilities in added dependencies?
59
-
60
- ### 6. Performance & Operations
61
- - **N+1 queries**, unnecessary full-table scans, missing indexes
62
- - **Resource management**: Memory leaks, connection pool exhaustion, file handle leaks
63
- - **Observability**: Adequate logging, metrics, health checks
64
- - **Migration/Rollback**: Is the change reversible? Data migration plan?
65
-
66
- ### 7. Business Impact
67
- - **User experience**: Does this change affect UX positively/negatively?
68
- - **Backward compatibility**: API contract changes? Client impact?
69
- - **Feature completeness**: Edge cases handled? Accessibility considered?
70
-
71
- ### 8. Commit & PR Hygiene
72
- - 1 commit = 1 responsibility? No Front/Back mixed commits?
73
- - **PR scope**: Is the PR focused or doing too many things?
74
-
75
- ## Output Format
76
-
77
- ### Severity Classification
78
-
79
- Use these severity levels for each finding:
80
-
81
- - **CRITICAL**: Must fix before merge. Security vulnerability, data loss risk, or production-breaking bug.
82
- - **MAJOR**: Should fix before merge. Architectural issue, significant performance concern, or missing test coverage.
83
- - **MINOR**: Nice to fix. Code quality improvement, naming suggestion, or style consistency.
84
- - **SUGGESTION**: Optional improvement. Alternative approach, future optimization, or pattern recommendation.
85
-
86
- ### Output Structure
87
-
88
- ```
89
- ## Summary
90
- Overall assessment (2-3 lines). Risk level: LOW / MEDIUM / HIGH / CRITICAL.
91
-
92
- ## Findings
93
-
94
- ### CRITICAL
95
- - [Finding]: Description + suggested fix + rationale
96
-
97
- ### MAJOR
98
- - [Finding]: Description + suggested fix + rationale
99
-
100
- ### MINOR
101
- - [Finding]: Description + suggested fix
102
-
103
- ### SUGGESTION
104
- - [Finding]: Description + alternative approach
105
-
106
- ## Positive Points
107
- - What was done well (encourage good practices)
108
-
109
- ## Architecture Notes
110
- - Impact on overall system architecture
111
- - Technical debt assessment (+/- /neutral)
112
- - Scalability considerations
113
-
114
- ## Questions for Author
115
- - Points needing clarification before approval
116
- ```
117
-
118
- {{#if frontend.mindset}}
119
- ## Frontend Review Criteria
120
- {{{frontend.mindset}}}
121
- {{/if}}
122
-
123
- {{#if backend.mindset}}
124
- ## Backend Review Criteria
125
- {{{backend.mindset}}}
126
- {{/if}}
@@ -1,247 +0,0 @@
1
- {{> ssot-header }}
2
-
3
- {{> godd-core }}
4
-
5
- {{> ssot-rules }}
6
-
7
- {{> project-context }}
8
-
9
- {{> cogito-grammar }}
10
- {{> cogito-root-core }}
11
- {{> cogito-particle }}
12
- {{> cogito-godd }}
13
- {{> cogito-root-dev }}
14
- {{> cogito-root-daily }}
15
-
16
- ## Purpose
17
- **Actually set up** this project's local environment by running commands and creating files. The Agent executes everything — not just a guide.
18
-
19
- ## Critical Prerequisites (MUST)
20
- - When this tool is called, GoDD MCP Server is already running (= `config.godd` and `.cursor/mcp.json` are minimally functional)
21
- - However, the configuration **may be incomplete or templated**. Detect gaps and fill them
22
- - **Actually execute runnable commands**. Do not just list instructions
23
- - **Do not overwrite existing files**. Report differences and ask the user for confirmation
24
-
25
- ---
26
-
27
- ## Phase 1: GoDD MCP Config Verification & Generation
28
-
29
- Check the following files and create/fix if missing or incomplete:
30
-
31
- ### 1-1. `godd-mcp-server/config.godd`
32
- ```yaml
33
- # GoDD MCP Server config
34
- license_key: "<set your license key here>"
35
- stack_profile: "{{profile_name}}"
36
- language: "en" # ja | en
37
- ```
38
-
39
- - File does not exist → Create with the above content
40
- - `license_key` is unset (empty or placeholder) → Ask the user for input
41
- - `stack_profile` doesn't match current profile (`{{profile_name}}`) → Warn and confirm
42
-
43
- ### 1-2. `.cursor/mcp.json`(project root)
44
- ```json
45
- {
46
- "mcpServers": {
47
- "godd": {
48
- "command": "npx",
49
- "args": ["tsx", "godd-mcp-server/src/index.ts"],
50
- "env": {
51
- "GODD_CONFIG": "./godd-mcp-server/config.godd",
52
- "GODD_PROJECT_ROOT": "."
53
- }
54
- }
55
- }
56
- }
57
- ```
58
-
59
- - `.cursor/` directory does not exist → Create with `mkdir .cursor`
60
- - `mcp.json` does not exist → Create with the above content
61
- - Already exists with `godd` key → Compare and report differences (do not overwrite)
62
- - Already exists without `godd` key → Add `godd` entry (preserve existing entries)
63
-
64
- ### 1-3. GoDD MCP Server dependencies
65
- ```bash
66
- cd godd-mcp-server && pnpm install
67
- ```
68
- - `node_modules/` does not exist → Run `pnpm install`
69
- - Exists → Skip
70
-
71
- ---
72
-
73
- ## Phase 2: Project Environment Setup
74
-
75
- ### 2-1. Environment Variable Files
76
- {{#if project.env_templates.length}}
77
- The following templates were detected. Copy to create `.env` if it doesn't exist:
78
-
79
- {{#each project.env_templates}}
80
- - `{{this}}`:
81
- {{/each}}
82
-
83
- **Specific steps:**
84
- 1. Copy `.env.example` → `.env` (project root)
85
- 2. Copy `env.electron.example` → `frontend/.env.local` (if exists)
86
- 3. After copying, verify defaults work (DB password etc. can use template values for local dev)
87
- 4. If `.env` already exists → Report diff with template and confirm missing keys with user
88
- {{/if}}
89
-
90
- ### 2-2. Required Tools Verification
91
- **Actually execute** the following commands to verify each tool is installed:
92
-
93
- ```bash
94
- git --version
95
- docker --version
96
- docker compose version
97
- {{#each project.detected_stacks}}
98
- {{#if (eq this.id "react")}}node --version # v20+ 必須
99
- pnpm --version{{/if}}
100
- {{#if (eq this.id "fastapi")}}python --version # 3.11+ 必須
101
- uv --version{{/if}}
102
- {{/each}}
103
- ```
104
-
105
- - If a tool is missing, **provide installation instructions** and install after user approval
106
- - Also warn if versions are insufficient
107
-
108
- ### 2-3. Frontend Dependencies
109
- {{#if frontend}}
110
- ```bash
111
- pnpm -C {{frontend.root_dir}} install
112
- ```
113
- - `{{frontend.root_dir}}/node_modules/` does not exist → Execute
114
- - Exists → Skip
115
- {{/if}}
116
-
117
- ### 2-4. Backend Dependencies
118
- {{#if backend}}
119
- ```bash
120
- cd {{backend.root_dir}} && uv sync
121
- ```
122
- - `{{backend.root_dir}}/.venv/` does not exist → Execute
123
- - Exists → Skip
124
- {{/if}}
125
-
126
- ### 2-5. Docker Services Startup
127
- {{#if project.docker_services.length}}
128
- The following services are defined in `docker-compose.yml`:
129
- {{#each project.docker_services}}
130
- - `{{this}}`
131
- {{/each}}
132
-
133
- ```bash
134
- docker compose up -d
135
- docker compose ps # 全サービスが healthy か確認
136
- ```
137
- - Already running → Report `docker compose ps` result and skip
138
- - Not running → Execute `docker compose up -d` and wait for healthcheck
139
- - Healthcheck fails → Check `docker compose logs <service>` and report error
140
- {{/if}}
141
-
142
- ### 2-6. DB Migration
143
- {{#if backend}}
144
- Once Postgres is healthy, check and run migrations:
145
-
146
- ```bash
147
- cd {{backend.root_dir}} && uv run alembic upgrade head
148
- ```
149
- - Skip if no migration files exist
150
- - Report "Already up to date" if current
151
- {{/if}}
152
-
153
- {{#if project.vendor_items.length}}
154
- ### 2-7. Vendor / OSS Subprojects
155
- The following vendor tools are available. After initializing submodules, run each setup:
156
-
157
- ```bash
158
- git submodule update --init --recursive
159
- ```
160
-
161
- {{#each project.vendor_items}}
162
- - **vendor/{{this.name}}**: `cd vendor/{{this.name}} && {{this.setupHint}}`
163
- {{/each}}
164
- - If submodules are empty → Run `git submodule update --init --recursive`
165
- - If already set up → Skip
166
- {{/if}}
167
-
168
- ---
169
-
170
- ## Phase 3: Smoke Test
171
-
172
- After all setup is complete, **actually execute** the following smoke tests:
173
-
174
- ### 3-1. Docker Service Connectivity
175
- ```bash
176
- docker compose ps
177
- ```
178
- - All services should be `healthy` or `running`
179
-
180
- {{#if backend}}
181
- ### 3-2. API Connectivity
182
- ```bash
183
- curl -s http://localhost:${API_PORT:-8000}/health || echo "API unreachable"
184
- ```
185
- - 200 OK = success. On failure, investigate with `docker compose logs api`
186
- {{/if}}
187
-
188
- {{#if frontend}}
189
- ### 3-3. Frontend Build Check
190
- ```bash
191
- {{frontend.build_command}}
192
- ```
193
- - Build success means frontend environment is OK
194
- {{/if}}
195
-
196
- {{#if quality_gate}}
197
- ### 3-4. Quality Gate (Optional)
198
- Optionally run the quality gate to verify overall health:
199
- {{#if quality_gate.frontend}}
200
- - Frontend: `{{quality_gate.frontend}}`
201
- {{/if}}
202
- {{#if quality_gate.backend}}
203
- - Backend: `{{quality_gate.backend}}`
204
- {{/if}}
205
- {{/if}}
206
-
207
- ---
208
-
209
- ## Execution Scope by Mode
210
-
211
- | Mode | Phase 1 (GoDD) | Phase 2 (Project) | Phase 3 (Smoke) |
212
- |---|---|---|---|
213
- | `full` | ✅ | ✅ | ✅ |
214
- | `godd-only` | ✅ | ⏭ Skip | ⏭ Skip |
215
- | `project-only` | ⏭ Skip | ✅ | ✅ |
216
-
217
- ---
218
-
219
- ## Notes
220
- - Do not edit CI/CD configurations (`.github/workflows/`)
221
- - Do not commit `.env` files (`.gitignore` target)
222
- - Treat `config.godd` license key as sensitive information
223
- - **Tests run inside Docker containers** — quality gate uses `docker compose --profile test run --rm <service>-test`. Host-local test execution is not supported
224
-
225
- ## Required Output on Completion (MUST)
226
-
227
- After setup completion, **always** report the following to the user:
228
-
229
- ### 1. Setup Result Summary
230
- ```
231
- ✅ Successful:
232
- - config.godd created
233
- - .cursor/mcp.json created
234
- - ...
235
-
236
- ⚠️ Needs attention:
237
- - License key is still placeholder
238
- - ...
239
-
240
- ❌ Failed:
241
- - Docker startup failed (error: ...)
242
- - ...
243
- ```
244
-
245
- ### 2. Next Steps
246
- - If GoDD MCP is healthy → Guide with "You can start development with `godd_dev`"
247
- - If there are issues → Provide specific fix steps
@@ -1,35 +0,0 @@
1
- {{> ssot-header }}
2
-
3
- {{> godd-core }}
4
-
5
- {{> ssot-rules }}
6
-
7
- {{> project-context }}
8
-
9
- {{> cogito-grammar }}
10
- {{> cogito-root-core }}
11
- {{> cogito-particle }}
12
- {{> cogito-godd }}
13
- {{> cogito-root-dev }}
14
- {{> cogito-root-daily }}
15
-
16
- ## Purpose
17
- Transform requirements into implementation-ready Spec (SSOT) at appropriate granularity.
18
- The Spec must be complete enough that any developer (human or Agent) can implement without guessing.
19
-
20
- ## Process
21
- 1. First, list **"missing information (questions)"** (up to 5-10, in priority order) using the Question Template
22
- 2. Next, select the required Spec types and draft based on standard templates:
23
- - **API Spec**: Endpoints, request/response schemas, error codes, auth requirements
24
- - **UI Spec**: Screens, components, state management, user flows, accessibility
25
- - **DB Spec**: Tables, relationships, indexes, migrations, constraints
26
- - **Feature Spec**: Business rules, acceptance criteria (Given-When-Then), edge cases
27
- - **Usecase Spec**: Actor, preconditions, main flow, alternative flows, postconditions
28
- - **Error Codes Spec**: Error taxonomy, user-facing messages, recovery actions
29
- 3. Always fill in **compatibility/migration/rollback** (use placeholders + mark as TBD if unknown)
30
-
31
- ## Output
32
- - **Questions** (if any) — using the Question Template format
33
- - **Spec document** in Markdown, with all sections filled
34
- - Mark unknown items as **TBD** with a note on what information is needed
35
- - Include **acceptance criteria** in Given-When-Then format for each feature/behavior
@@ -1,24 +0,0 @@
1
- {{> ssot-header }}
2
-
3
- {{> cogito-grammar }}
4
- {{> cogito-root-core }}
5
- {{> cogito-particle }}
6
- {{> cogito-godd }}
7
- {{> cogito-root-daily }}
8
-
9
- {{> ssot-rules }}
10
-
11
- {{> project-context }}
12
-
13
- ## Purpose
14
- Transform Specs (`docs/003_requirements/spec/`) into an implementable task list.
15
-
16
- ## Input
17
- - Target Spec (API/UI/DB/Feature/Usecase/Error Codes)
18
-
19
- ## Output
20
- - Task list (ordered)
21
- - Impact layer ({{#if backend}}Backend: {{backend.architecture}}{{#if backend.dependency_direction}} ({{backend.dependency_direction}}){{/if}}{{/if}}{{#if frontend}}, Front: UI/hooks/services{{/if}}, Agent/Infra)
22
- - Estimated files to add/change
23
- - Test perspective (unit/integration/e2e)
24
- - Risks (compatibility/migration/security/performance)
@@ -1,143 +0,0 @@
1
- {{> ssot-header }}
2
-
3
- {{> cogito-grammar }}
4
- {{> cogito-root-core }}
5
- {{> cogito-particle }}
6
- {{> cogito-godd }}
7
- {{> cogito-root-dev }}
8
-
9
- {{> ssot-rules }}
10
-
11
- {{> project-context }}
12
-
13
- ## Purpose
14
- Execute the **complete submission workflow**: pre-submission checks → git push → PR creation, as a single unified command. The developer only needs to invoke this tool — the Agent handles everything.
15
-
16
- ## References (detailed specs for each step)
17
- - Pre-submission check + Push: `godd_push_execute` tool
18
- - PR creation: `godd_pr_create` tool
19
-
20
- ## Auto-confirm Mode
21
- {{#if auto_confirm}}
22
- **auto_confirm is ENABLED** — All phases run without user confirmation. Check results, push, and PR creation proceed automatically. Results are reported afterward.
23
- {{else}}
24
- **auto_confirm is DISABLED (default)** — Each phase pauses for user confirmation when decisions are needed.
25
- {{/if}}
26
-
27
- ## Draft Mode
28
- {{#if draft}}
29
- **draft is ENABLED** — The PR will be created as a Draft PR.
30
- {{else}}
31
- **draft is DISABLED (default)** — The PR will be created as a regular (ready for review) PR.
32
- {{/if}}
33
-
34
- ## Agent Steps (MUST)
35
-
36
- ### Phase 1: Pre-submission Checks
37
-
38
- 1. Run `git status` to verify:
39
- - Current branch is NOT the default branch (main/master) — **abort if on default branch**
40
- - There are commits to push
41
- - No uncommitted changes remain (warn if any exist)
42
- 2. Run `git log origin/<current-branch>..HEAD --oneline` to list unpushed commits
43
- - If remote branch does not exist yet, run `git log --oneline -10` instead
44
- 3. Execute pre-submission checks:
45
- - **Quality gate**: Run project's quality gate commands
46
- - **Spec reflection**: Check if `docs/003_requirements/spec/` needs updates
47
- - **Secret check**: Scan for potential secrets in committed content
48
- - **Breaking changes**: Verify migration docs if breaking changes exist
49
- 4. Present check results
50
-
51
- {{#if auto_confirm}}
52
- **Auto-confirm**: If all checks pass, proceed directly to Phase 2. If checks fail, attempt to fix and re-run before aborting.
53
- {{else}}
54
- **Pause**: Present results and wait for user confirmation before proceeding
55
- {{/if}}
56
-
57
- ### Phase 2: Push to Remote
58
-
59
- 1. Determine push command:
60
- - If remote tracking branch exists: `git push`
61
- - If no remote tracking branch: `git push -u origin HEAD`
62
- 2. Execute push
63
- 3. Verify push result:
64
- - `git status` confirms branch is up to date with remote
65
- - No unpushed commits remain
66
-
67
- {{#if auto_confirm}}
68
- **Auto-confirm**: On success, proceed directly to Phase 3. On failure, report error and abort.
69
- {{else}}
70
- **Pause**: Report push result. On success, ask if user wants to proceed to PR creation.
71
- {{/if}}
72
-
73
- ### Phase 3: PR Creation
74
-
75
- 1. Gather information:
76
- - Current branch name, base branch (user-specified or `main`)
77
- - `git log origin/<base>..HEAD --oneline` for commit list
78
- - `git diff origin/<base>...HEAD --stat` for change summary
79
- 2. Generate PR content:
80
- - **Title**: Use user-provided title, or derive from branch name and changes
81
- - **Body**: Follow PR template (`docs/006_development_workflow/pr.template.md`) — fill ALL sections
82
- 3. Present PR title and body for review
83
-
84
- {{#if auto_confirm}}
85
- **Auto-confirm**: Skip review and create PR immediately
86
- {{else}}
87
- **Pause**: Wait for user review and approval of PR content
88
- {{/if}}
89
-
90
- 4. Create PR:
91
- ```
92
- gh pr create --title "<title>" --base <base_branch> --head <current_branch> --body "<body>"{{#if draft}} --draft{{/if}}
93
- ```
94
- 5. Report PR URL and metadata
95
-
96
- ## Flow Overview
97
-
98
- ```
99
- [Start]
100
- |
101
- v
102
- Phase 1: Pre-submission Checks
103
- | |- Check failed -> fix and re-run (or abort)
104
- | '- All checks passed
105
- v
106
- Phase 2: Push to Remote
107
- | |- Push failed -> report error and abort
108
- | '- Push succeeded
109
- v
110
- Phase 3: PR Creation
111
- | |- Generate PR content from changes
112
- | |- Present for review (unless auto_confirm)
113
- | '- Create PR via gh CLI
114
- v
115
- [Complete]
116
- ```
117
-
118
- ## Output
119
- Report results progressively for each phase:
120
-
121
- ### Phase 1 Result
122
- - Check results: Each item with pass/fail status
123
- - Commits to push (count and list)
124
-
125
- ### Phase 2 Result
126
- - Push result: Success (remote URL + branch) or failure reason
127
- - Post-push state: `git status` summary
128
-
129
- ### Phase 3 Result
130
- - PR title and body (for user review)
131
- - PR URL after creation
132
- - PR metadata: number, state, base/head branches
133
-
134
- ### Final Summary
135
- ```
136
- [submit complete]
137
- - Checks: All passed (N items)
138
- - Push: Pushed N commits to origin/<branch>
139
- - PR: Created #<number> (<url>)
140
- - Title: <title>
141
- - Base: <base> ← Head: <head>
142
- - State: Open{{#if draft}} (Draft){{/if}}
143
- ```