@rashidee/co2 1.2.5

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 (190) hide show
  1. package/dist/index.js +25449 -0
  2. package/drizzle/0000_remarkable_charles_xavier.sql +210 -0
  3. package/drizzle/0001_wise_wolf_cub.sql +13 -0
  4. package/drizzle/0002_secret_spyke.sql +16 -0
  5. package/drizzle/0003_workspace_config_singleton.sql +16 -0
  6. package/drizzle/0004_terminal_claim_v120.sql +11 -0
  7. package/drizzle/0005_brainstorm_v124.sql +10 -0
  8. package/drizzle/0006_project_v140.sql +6 -0
  9. package/drizzle/0007_prd_wizard_v124.sql +14 -0
  10. package/drizzle/0008_workflow_artifact_v126.sql +24 -0
  11. package/drizzle/0009_project_import_v150.sql +7 -0
  12. package/drizzle/0010_quality_v151.sql +3 -0
  13. package/drizzle/meta/0000_snapshot.json +1335 -0
  14. package/drizzle/meta/0001_snapshot.json +1416 -0
  15. package/drizzle/meta/0002_snapshot.json +1510 -0
  16. package/drizzle/meta/_journal.json +83 -0
  17. package/package.json +41 -0
  18. package/plugin/.claude-plugin/marketplace.json +36 -0
  19. package/plugin/.claude-plugin/plugin.json +22 -0
  20. package/plugin/README.md +625 -0
  21. package/plugin/SKILLS.md +350 -0
  22. package/plugin/co2.svg +5 -0
  23. package/plugin/commands/brainstorm-loop.md +129 -0
  24. package/plugin/skills/conductor-defect/SKILL.md +898 -0
  25. package/plugin/skills/conductor-feature-develop/SKILL.md +1383 -0
  26. package/plugin/skills/conductor-feature-develop/references/implementation-domain-template.md +131 -0
  27. package/plugin/skills/conductor-feature-develop/references/implementation-master-template.md +89 -0
  28. package/plugin/skills/conductor-feature-develop/references/playwright-setup.md +224 -0
  29. package/plugin/skills/conductor-feature-prepare/SKILL.md +604 -0
  30. package/plugin/skills/depgen-k8s/SKILL.md +468 -0
  31. package/plugin/skills/depgen-k8s/references/dockerfile-laravel.md +197 -0
  32. package/plugin/skills/depgen-k8s/references/dockerfile-nodejs.md +163 -0
  33. package/plugin/skills/depgen-k8s/references/dockerfile-spring-boot.md +174 -0
  34. package/plugin/skills/depgen-k8s/references/k8s-patterns.md +869 -0
  35. package/plugin/skills/mockgen-shadcn/SKILL.md +1067 -0
  36. package/plugin/skills/mockgen-shadcn/references/admin-layout-template.md +1467 -0
  37. package/plugin/skills/mockgen-shadcn/references/mockup-hub-template.md +498 -0
  38. package/plugin/skills/mockgen-shadcn/references/mockup-index-template.md +216 -0
  39. package/plugin/skills/mockgen-tailwind/SKILL.md +904 -0
  40. package/plugin/skills/mockgen-tailwind/references/admin-layout-template.md +720 -0
  41. package/plugin/skills/mockgen-tailwind/references/mockup-hub-template.md +498 -0
  42. package/plugin/skills/mockgen-tailwind/references/mockup-index-template.md +190 -0
  43. package/plugin/skills/modelgen-nosql/SKILL.md +617 -0
  44. package/plugin/skills/modelgen-nosql/references/model-extraction-methodology.md +497 -0
  45. package/plugin/skills/modelgen-nosql/references/nosql-design-guide.md +258 -0
  46. package/plugin/skills/modelgen-relational/SKILL.md +707 -0
  47. package/plugin/skills/modelgen-relational/references/model-extraction-methodology.md +499 -0
  48. package/plugin/skills/specgen-flutter-riverpod/SKILL.md +898 -0
  49. package/plugin/skills/specgen-flutter-riverpod/references/component-patterns.md +971 -0
  50. package/plugin/skills/specgen-flutter-riverpod/references/notification-patterns.md +457 -0
  51. package/plugin/skills/specgen-flutter-riverpod/references/routing-patterns.md +362 -0
  52. package/plugin/skills/specgen-flutter-riverpod/references/security-patterns.md +709 -0
  53. package/plugin/skills/specgen-flutter-riverpod/references/spec-template.md +1566 -0
  54. package/plugin/skills/specgen-flutter-riverpod/references/state-patterns.md +518 -0
  55. package/plugin/skills/specgen-flutter-riverpod/references/storage-patterns.md +370 -0
  56. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/SKILL.md +984 -0
  57. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/batch-patterns.md +359 -0
  58. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/messaging-patterns.md +468 -0
  59. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/modulith-patterns.md +461 -0
  60. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/reporting-patterns.md +803 -0
  61. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/security-patterns.md +501 -0
  62. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/spec-template.md +1268 -0
  63. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/web-patterns.md +301 -0
  64. package/plugin/skills/specgen-node-cli-web/SKILL.md +561 -0
  65. package/plugin/skills/specgen-node-cli-web/references/auth-patterns.md +293 -0
  66. package/plugin/skills/specgen-node-cli-web/references/cli-packaging-patterns.md +250 -0
  67. package/plugin/skills/specgen-node-cli-web/references/server-patterns.md +247 -0
  68. package/plugin/skills/specgen-node-cli-web/references/spec-template.md +401 -0
  69. package/plugin/skills/specgen-node-cli-web/references/testing-patterns.md +174 -0
  70. package/plugin/skills/specgen-react-mui/SKILL.md +789 -0
  71. package/plugin/skills/specgen-react-mui/references/component-patterns.md +1077 -0
  72. package/plugin/skills/specgen-react-mui/references/reporting-patterns.md +1998 -0
  73. package/plugin/skills/specgen-react-mui/references/routing-patterns.md +461 -0
  74. package/plugin/skills/specgen-react-mui/references/security-patterns.md +599 -0
  75. package/plugin/skills/specgen-react-mui/references/spec-template.md +1030 -0
  76. package/plugin/skills/specgen-react-mui/references/state-patterns.md +327 -0
  77. package/plugin/skills/specgen-react-tailwind/SKILL.md +859 -0
  78. package/plugin/skills/specgen-react-tailwind/references/component-patterns.md +1212 -0
  79. package/plugin/skills/specgen-react-tailwind/references/reporting-patterns.md +1529 -0
  80. package/plugin/skills/specgen-react-tailwind/references/routing-patterns.md +669 -0
  81. package/plugin/skills/specgen-react-tailwind/references/security-patterns.md +656 -0
  82. package/plugin/skills/specgen-react-tailwind/references/spec-template.md +1237 -0
  83. package/plugin/skills/specgen-react-tailwind/references/state-patterns.md +327 -0
  84. package/plugin/skills/specgen-sdk-java/SKILL.md +933 -0
  85. package/plugin/skills/specgen-sdk-java/references/api-extraction-patterns.md +247 -0
  86. package/plugin/skills/specgen-sdk-java/references/http-client-patterns.md +495 -0
  87. package/plugin/skills/specgen-sdk-java/references/packaging-patterns.md +366 -0
  88. package/plugin/skills/specgen-sdk-java/references/spec-template.md +956 -0
  89. package/plugin/skills/specgen-spring-jpa-jtehtmx/SKILL.md +1284 -0
  90. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/batch-patterns.md +1224 -0
  91. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/jasper-patterns.md +1638 -0
  92. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/messaging-patterns.md +512 -0
  93. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/modulith-patterns.md +354 -0
  94. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/security-patterns.md +551 -0
  95. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/spec-template.md +2502 -0
  96. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/web-patterns.md +503 -0
  97. package/plugin/skills/specgen-spring-jpa-restapi/SKILL.md +990 -0
  98. package/plugin/skills/specgen-spring-jpa-restapi/references/batch-patterns.md +1224 -0
  99. package/plugin/skills/specgen-spring-jpa-restapi/references/messaging-patterns.md +512 -0
  100. package/plugin/skills/specgen-spring-jpa-restapi/references/modulith-patterns.md +279 -0
  101. package/plugin/skills/specgen-spring-jpa-restapi/references/reporting-patterns.md +1536 -0
  102. package/plugin/skills/specgen-spring-jpa-restapi/references/restapi-patterns.md +722 -0
  103. package/plugin/skills/specgen-spring-jpa-restapi/references/security-patterns.md +351 -0
  104. package/plugin/skills/specgen-spring-jpa-restapi/references/spec-template.md +553 -0
  105. package/plugin/skills/specgen-ts-cli/SKILL.md +861 -0
  106. package/plugin/skills/specgen-ts-cli/references/async-patterns.md +1101 -0
  107. package/plugin/skills/specgen-ts-cli/references/command-patterns.md +383 -0
  108. package/plugin/skills/specgen-ts-cli/references/config-patterns.md +430 -0
  109. package/plugin/skills/specgen-ts-cli/references/database-patterns.md +750 -0
  110. package/plugin/skills/specgen-ts-cli/references/packaging-patterns.md +426 -0
  111. package/plugin/skills/specgen-ts-cli/references/spec-template.md +1391 -0
  112. package/plugin/skills/specgen-ts-cli/references/testing-patterns.md +909 -0
  113. package/plugin/skills/testgen-functional/SKILL.md +1381 -0
  114. package/plugin/skills/tracegen-matrix/SKILL.md +243 -0
  115. package/plugin/skills/util-preparek8senv/SKILL.md +422 -0
  116. package/plugin/skills/util-projectinit/SKILL.md +307 -0
  117. package/plugin/skills/util-projectinit/reference/brainstorm-loop.md +129 -0
  118. package/plugin/skills/util-projectinit/reference/brainstorm-protocol.md +144 -0
  119. package/plugin/skills/util-projectinit/reference/brainstorm-setup-guide.md +153 -0
  120. package/plugin/skills/util-projectinit/reference/brainstorm-template-appdev.md +87 -0
  121. package/plugin/skills/util-projectinit/reference/co2-context-generation-guide.md +761 -0
  122. package/plugin/skills/util-projectsync/SKILL.md +501 -0
  123. package/plugin/skills/util-updprd/SKILL.md +324 -0
  124. package/plugin/skills/util-usanalyzer/SKILL.md +307 -0
  125. package/plugin/skills/util-ustagger/SKILL.md +154 -0
  126. package/static/assets/abnfDiagram-VRR7QNED-DvPuwyCV.js +1 -0
  127. package/static/assets/arc-DRKw7sjs.js +1 -0
  128. package/static/assets/architectureDiagram-ZJ3FMSHR-CaNcxUbC.js +36 -0
  129. package/static/assets/blockDiagram-677ZJIJ3-Demd4AOK.js +132 -0
  130. package/static/assets/c4Diagram-LMCZKHZV-PVKUfc2x.js +10 -0
  131. package/static/assets/channel-C2nVbuwv.js +1 -0
  132. package/static/assets/chunk-2Q5K7J3B-CExf8ww_.js +1 -0
  133. package/static/assets/chunk-32BRIVSS-CFPaoONF.js +1 -0
  134. package/static/assets/chunk-5VM5RSS4-DE2esM67.js +15 -0
  135. package/static/assets/chunk-EX3LRPZG-SON_YdDG.js +231 -0
  136. package/static/assets/chunk-JWPE2WC7-Qxah8LNr.js +1 -0
  137. package/static/assets/chunk-MOJQB5TN-BcWGQV3j.js +88 -0
  138. package/static/assets/chunk-RYQCIY6F-DkDj-OR5.js +1 -0
  139. package/static/assets/chunk-V7JOEXUC-BlI1Mrah.js +206 -0
  140. package/static/assets/chunk-VR4S4FIN-Agf__duj.js +1 -0
  141. package/static/assets/chunk-XXDRQBXY-B5CfAh85.js +1 -0
  142. package/static/assets/classDiagram-OUVF2IWQ-DXJIljsR.js +1 -0
  143. package/static/assets/classDiagram-v2-EOCWNBFH-DXJIljsR.js +1 -0
  144. package/static/assets/cose-bilkent-JH36ORCC-DO0cQkcy.js +1 -0
  145. package/static/assets/cynefin-VYW2F7L2-CfOnsnXc.js +178 -0
  146. package/static/assets/cynefinDiagram-TSTJHNR4-BJ8tULAv.js +62 -0
  147. package/static/assets/cytoscape.esm-DTSO7Bv0.js +331 -0
  148. package/static/assets/dagre-VKFMJZFB-DfjwzHqP.js +4 -0
  149. package/static/assets/defaultLocale-DX6XiGOO.js +1 -0
  150. package/static/assets/diagram-FQU43EPY-CndSOIIM.js +3 -0
  151. package/static/assets/diagram-G47NLZAW-Czf5hN0Z.js +24 -0
  152. package/static/assets/diagram-NH7WQ7WH-COAyojGh.js +24 -0
  153. package/static/assets/diagram-OA4YK3LP-H8PoiN2m.js +30 -0
  154. package/static/assets/diagram-WEI45ONY-DzcaVzjp.js +41 -0
  155. package/static/assets/ebnfDiagram-CCIWWBDH-DPazGYLJ.js +1 -0
  156. package/static/assets/erDiagram-Q63AITRT-Bo-fubgF.js +85 -0
  157. package/static/assets/flowDiagram-23GEKE2U-CSvxUDwh.js +156 -0
  158. package/static/assets/ganttDiagram-NO4QXBWP-DnBveWX6.js +292 -0
  159. package/static/assets/gitGraphDiagram-IHSO6WYX-B3rVL8c-.js +106 -0
  160. package/static/assets/graph-C9eacEi8.js +1 -0
  161. package/static/assets/index-LZSQkLE2.css +41 -0
  162. package/static/assets/index-y7XDSgMG.js +495 -0
  163. package/static/assets/infoDiagram-FWYZ7A6U-CvWV9yy2.js +2 -0
  164. package/static/assets/init-Gi6I4Gst.js +1 -0
  165. package/static/assets/ishikawaDiagram-FXEZZL3T-DF28a1N6.js +70 -0
  166. package/static/assets/journeyDiagram-5HDEW3XC-CB6CugYk.js +139 -0
  167. package/static/assets/kanban-definition-HUTT4EX6-ResSLF6d.js +89 -0
  168. package/static/assets/katex-C5jXJg4s.js +257 -0
  169. package/static/assets/layout-DEXfKzaS.js +1 -0
  170. package/static/assets/linear-CLO--ryk.js +1 -0
  171. package/static/assets/map-Czzmt4hB.js +1 -0
  172. package/static/assets/mindmap-definition-LN4V7U3C-BvW3EbxX.js +96 -0
  173. package/static/assets/ordinal-Cboi1Yqb.js +1 -0
  174. package/static/assets/pegDiagram-2B236MQR-BHCgqrrM.js +1 -0
  175. package/static/assets/pieDiagram-ENE6RG2P-DVmCQ5FA.js +39 -0
  176. package/static/assets/quadrantDiagram-ABIIQ3AL-B3e5KR52.js +7 -0
  177. package/static/assets/railroadDiagram-RFXS5EU6-Csv5ysLc.js +1 -0
  178. package/static/assets/requirementDiagram-TGXJPOKE-DOMVzvnB.js +84 -0
  179. package/static/assets/sankeyDiagram-HTMAVEWB-B1dcTOvy.js +40 -0
  180. package/static/assets/sequenceDiagram-DBY2YBRQ-BY414yeO.js +162 -0
  181. package/static/assets/sizeCapture-X5ZJPWSS-CuJfrfBN.js +1 -0
  182. package/static/assets/stateDiagram-2N3HPSRC-FX4rJkzV.js +1 -0
  183. package/static/assets/stateDiagram-v2-6OUMAXLB-BVufbO_H.js +1 -0
  184. package/static/assets/swimlanes-5IMT3BWC-Sfy58mmv.js +2 -0
  185. package/static/assets/swimlanesDiagram-G3AALYLV-wDCDw08H.js +8 -0
  186. package/static/assets/timeline-definition-FHXFAJF6-CmV7by8p.js +120 -0
  187. package/static/assets/vennDiagram-L72KCM5P-FqIyFZFt.js +34 -0
  188. package/static/assets/wardleyDiagram-EHGQE667-BZ06O45i.js +78 -0
  189. package/static/assets/xychartDiagram-FW5EYKEG-BOkffR06.js +7 -0
  190. package/static/index.html +24 -0
@@ -0,0 +1,210 @@
1
+ CREATE TABLE `applications` (
2
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
3
+ `project_id` integer NOT NULL,
4
+ `name` text NOT NULL,
5
+ `app_code` text NOT NULL,
6
+ `description` text,
7
+ `depends_on` text,
8
+ `requirement_id_app_code` text DEFAULT 'CO2' NOT NULL,
9
+ `is_deleted` integer DEFAULT 0 NOT NULL,
10
+ `deleted_at` text,
11
+ `created_at` text NOT NULL,
12
+ `updated_at` text NOT NULL
13
+ );
14
+ --> statement-breakpoint
15
+ CREATE TABLE `artifacts` (
16
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
17
+ `conductor_run_id` integer NOT NULL,
18
+ `application_id` integer NOT NULL,
19
+ `artifact_type` text NOT NULL,
20
+ `file_path` text NOT NULL,
21
+ `display_label` text NOT NULL,
22
+ `is_deleted` integer DEFAULT 0 NOT NULL,
23
+ `created_at` text NOT NULL,
24
+ `updated_at` text NOT NULL
25
+ );
26
+ --> statement-breakpoint
27
+ CREATE TABLE `brainstorm_references` (
28
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
29
+ `brainstorm_session_id` integer NOT NULL,
30
+ `name` text NOT NULL,
31
+ `storage_path` text NOT NULL,
32
+ `mime_type` text,
33
+ `size_bytes` integer NOT NULL,
34
+ `is_deleted` integer DEFAULT 0 NOT NULL,
35
+ `deleted_at` text,
36
+ `created_at` text NOT NULL
37
+ );
38
+ --> statement-breakpoint
39
+ CREATE TABLE `brainstorm_sessions` (
40
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
41
+ `project_id` integer NOT NULL,
42
+ `idea_markdown` text DEFAULT '' NOT NULL,
43
+ `current_round` integer DEFAULT 1 NOT NULL,
44
+ `claude_md_imported` integer DEFAULT false NOT NULL,
45
+ `created_at` text NOT NULL,
46
+ `updated_at` text NOT NULL
47
+ );
48
+ --> statement-breakpoint
49
+ CREATE UNIQUE INDEX `brainstorm_sessions_project_id_unique` ON `brainstorm_sessions` (`project_id`);--> statement-breakpoint
50
+ CREATE TABLE `bug_md_snapshots` (
51
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
52
+ `application_id` integer NOT NULL,
53
+ `prd_version_id` integer,
54
+ `content` text NOT NULL,
55
+ `generated_at` text NOT NULL,
56
+ `created_at` text NOT NULL
57
+ );
58
+ --> statement-breakpoint
59
+ CREATE TABLE `bug_reports` (
60
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
61
+ `project_id` integer NOT NULL,
62
+ `application_id` integer NOT NULL,
63
+ `title` text NOT NULL,
64
+ `description` text,
65
+ `severity` text NOT NULL,
66
+ `status` text DEFAULT 'open' NOT NULL,
67
+ `reported_by` integer NOT NULL,
68
+ `prd_version_id` integer,
69
+ `related_requirement_id` text,
70
+ `is_deleted` integer DEFAULT 0 NOT NULL,
71
+ `deleted_at` text,
72
+ `created_at` text NOT NULL,
73
+ `updated_at` text NOT NULL
74
+ );
75
+ --> statement-breakpoint
76
+ CREATE TABLE `conductor_runs` (
77
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
78
+ `project_id` integer NOT NULL,
79
+ `application_id` integer NOT NULL,
80
+ `conductor_type` text NOT NULL,
81
+ `prd_version_id` integer,
82
+ `execution_markdown_path` text,
83
+ `tracking_file_path` text NOT NULL,
84
+ `status` text DEFAULT 'pending' NOT NULL,
85
+ `started_by` integer,
86
+ `started_at` text,
87
+ `completed_at` text,
88
+ `created_at` text NOT NULL
89
+ );
90
+ --> statement-breakpoint
91
+ CREATE TABLE `documents` (
92
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
93
+ `project_id` integer NOT NULL,
94
+ `name` text NOT NULL,
95
+ `relative_path` text NOT NULL,
96
+ `mime_type` text,
97
+ `size_bytes` integer,
98
+ `document_type` text NOT NULL,
99
+ `is_deleted` integer DEFAULT 0 NOT NULL,
100
+ `deleted_at` text,
101
+ `created_at` text NOT NULL
102
+ );
103
+ --> statement-breakpoint
104
+ CREATE TABLE `execution_markdowns` (
105
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
106
+ `conductor_run_id` integer NOT NULL,
107
+ `relative_file_path` text NOT NULL,
108
+ `content` text NOT NULL,
109
+ `generated_at` text NOT NULL
110
+ );
111
+ --> statement-breakpoint
112
+ CREATE TABLE `notifications` (
113
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
114
+ `user_id` integer NOT NULL,
115
+ `type` text NOT NULL,
116
+ `title` text NOT NULL,
117
+ `body` text,
118
+ `related_entity_type` text,
119
+ `related_entity_id` integer,
120
+ `is_read` integer DEFAULT false NOT NULL,
121
+ `created_at` text NOT NULL
122
+ );
123
+ --> statement-breakpoint
124
+ CREATE TABLE `prd_requirements` (
125
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
126
+ `module_id` integer NOT NULL,
127
+ `prd_version_id` integer NOT NULL,
128
+ `facet` text NOT NULL,
129
+ `requirement_id` text NOT NULL,
130
+ `content` text NOT NULL,
131
+ `is_deprecated` integer DEFAULT false NOT NULL,
132
+ `deprecated_at` text,
133
+ `created_at` text NOT NULL,
134
+ `updated_at` text NOT NULL
135
+ );
136
+ --> statement-breakpoint
137
+ CREATE TABLE `prd_versions` (
138
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
139
+ `project_id` integer NOT NULL,
140
+ `semver` text NOT NULL,
141
+ `version_type` text NOT NULL,
142
+ `is_locked` integer DEFAULT false NOT NULL,
143
+ `locked_by` integer,
144
+ `locked_at` text,
145
+ `is_current` integer DEFAULT true NOT NULL,
146
+ `snapshot_prd_content` text,
147
+ `snapshot_bug_content` text,
148
+ `created_by` integer NOT NULL,
149
+ `created_at` text NOT NULL
150
+ );
151
+ --> statement-breakpoint
152
+ CREATE TABLE `project_modules` (
153
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
154
+ `application_id` integer NOT NULL,
155
+ `name` text NOT NULL,
156
+ `category` text NOT NULL,
157
+ `display_order` integer DEFAULT 0 NOT NULL,
158
+ `is_deleted` integer DEFAULT 0 NOT NULL,
159
+ `created_at` text NOT NULL
160
+ );
161
+ --> statement-breakpoint
162
+ CREATE TABLE `projects` (
163
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
164
+ `name` text NOT NULL,
165
+ `workspace_folder_name` text NOT NULL,
166
+ `workflow_phase` text DEFAULT 'brainstorm' NOT NULL,
167
+ `is_archived` integer DEFAULT false NOT NULL,
168
+ `archived_at` text,
169
+ `archived_by` integer,
170
+ `created_by` integer NOT NULL,
171
+ `created_at` text NOT NULL,
172
+ `updated_at` text NOT NULL
173
+ );
174
+ --> statement-breakpoint
175
+ CREATE UNIQUE INDEX `projects_name_unique` ON `projects` (`name`);--> statement-breakpoint
176
+ CREATE TABLE `sessions` (
177
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
178
+ `token_hash` text NOT NULL,
179
+ `user_id` integer NOT NULL,
180
+ `expires_at` text NOT NULL,
181
+ `created_at` text NOT NULL,
182
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
183
+ );
184
+ --> statement-breakpoint
185
+ CREATE UNIQUE INDEX `sessions_token_hash_unique` ON `sessions` (`token_hash`);--> statement-breakpoint
186
+ CREATE TABLE `terminal_claims` (
187
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
188
+ `project_id` integer NOT NULL,
189
+ `claimed_by` integer NOT NULL,
190
+ `claimed_at` text NOT NULL
191
+ );
192
+ --> statement-breakpoint
193
+ CREATE UNIQUE INDEX `terminal_claims_project_id_unique` ON `terminal_claims` (`project_id`);--> statement-breakpoint
194
+ CREATE TABLE `users` (
195
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
196
+ `username` text NOT NULL,
197
+ `display_name` text NOT NULL,
198
+ `password_hash` text NOT NULL,
199
+ `role` text DEFAULT 'user' NOT NULL,
200
+ `must_change_password` integer DEFAULT true NOT NULL,
201
+ `git_name` text,
202
+ `git_email` text,
203
+ `git_pat` text,
204
+ `is_deleted` integer DEFAULT 0 NOT NULL,
205
+ `deleted_at` text,
206
+ `created_at` text NOT NULL,
207
+ `updated_at` text NOT NULL
208
+ );
209
+ --> statement-breakpoint
210
+ CREATE UNIQUE INDEX `users_username_unique` ON `users` (`username`);
@@ -0,0 +1,13 @@
1
+ CREATE TABLE `project_assignments` (
2
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
3
+ `user_id` integer NOT NULL,
4
+ `project_id` integer NOT NULL,
5
+ `assigned_by` integer NOT NULL,
6
+ `assigned_at` text NOT NULL,
7
+ `is_active` integer DEFAULT 1 NOT NULL,
8
+ `created_at` text NOT NULL,
9
+ `updated_at` text NOT NULL
10
+ );
11
+ --> statement-breakpoint
12
+ ALTER TABLE `users` ADD `reactivated_at` text;--> statement-breakpoint
13
+ ALTER TABLE `users` ADD `reactivated_by` integer;
@@ -0,0 +1,16 @@
1
+ CREATE TABLE `workspace_devtool_configs` (
2
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
3
+ `project_id` integer NOT NULL,
4
+ `content` text DEFAULT '' NOT NULL,
5
+ `updated_at` text NOT NULL
6
+ );
7
+ --> statement-breakpoint
8
+ CREATE UNIQUE INDEX `workspace_devtool_configs_project_id_unique` ON `workspace_devtool_configs` (`project_id`);--> statement-breakpoint
9
+ CREATE TABLE `workspace_env_configs` (
10
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
11
+ `project_id` integer NOT NULL,
12
+ `content` text DEFAULT '' NOT NULL,
13
+ `updated_at` text NOT NULL
14
+ );
15
+ --> statement-breakpoint
16
+ CREATE UNIQUE INDEX `workspace_env_configs_project_id_unique` ON `workspace_env_configs` (`project_id`);
@@ -0,0 +1,16 @@
1
+ -- v1.3.0: Replace per-project workspace_env_configs + workspace_devtool_configs with a
2
+ -- workspace-level singleton table. CONSCO2159 — at most one row; getOrCreate() enforces this.
3
+ -- USCO200225 (workspace env/devtool authoring), USCO200228 (admin import audit trail).
4
+ CREATE TABLE `workspace_config` (
5
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
6
+ `environment_md` text,
7
+ `devtool_md` text,
8
+ `imported_at` text,
9
+ `imported_by` integer,
10
+ `created_at` text NOT NULL,
11
+ `updated_at` text NOT NULL
12
+ );
13
+ --> statement-breakpoint
14
+ DROP TABLE IF EXISTS `workspace_devtool_configs`;
15
+ --> statement-breakpoint
16
+ DROP TABLE IF EXISTS `workspace_env_configs`;
@@ -0,0 +1,11 @@
1
+ -- Workspace Terminal v1.2.0 (USCO200174 / USCO200177 / CONSCO2120).
2
+ -- Extend terminal_claims with soft-release + request/force-release + base-entity columns.
3
+ -- project_id keeps its v1.1.0 UNIQUE constraint: there is one logical lock row per project, so a
4
+ -- release soft-marks released_at (CONSCO2015 — never hard-deleted) and a re-claim UPDATEs the row.
5
+ -- All added columns are nullable, so these ADD COLUMNs need no defaults on the (empty-at-rest) table.
6
+ ALTER TABLE `terminal_claims` ADD `released_at` text;--> statement-breakpoint
7
+ ALTER TABLE `terminal_claims` ADD `pending_request_user_id` integer;--> statement-breakpoint
8
+ ALTER TABLE `terminal_claims` ADD `requested_at` text;--> statement-breakpoint
9
+ ALTER TABLE `terminal_claims` ADD `force_released_by` integer;--> statement-breakpoint
10
+ ALTER TABLE `terminal_claims` ADD `created_at` text;--> statement-breakpoint
11
+ ALTER TABLE `terminal_claims` ADD `updated_at` text;
@@ -0,0 +1,10 @@
1
+ -- Brainstorm Session v1.2.0 → v1.2.4 (USCO200168 / USCO200192 / CONSCO2105 / CONSCO2126 / CONSCO2129).
2
+ -- Extend brainstorm_sessions with the standalone + per-project-version scope columns.
3
+ -- project_id keeps its UNIQUE constraint: one logical brainstorm session per project (the service
4
+ -- upserts by project_id). All added columns are nullable — the service always sets them on insert,
5
+ -- so these ADD COLUMNs need no defaults on the (empty-at-rest) table.
6
+ ALTER TABLE `brainstorm_sessions` ADD `prd_version_id` integer;--> statement-breakpoint
7
+ ALTER TABLE `brainstorm_sessions` ADD `session_folder_path` text;--> statement-breakpoint
8
+ ALTER TABLE `brainstorm_sessions` ADD `session_type` text DEFAULT 'standalone';--> statement-breakpoint
9
+ ALTER TABLE `brainstorm_sessions` ADD `brainstorm_file_path` text;--> statement-breakpoint
10
+ ALTER TABLE `brainstorm_sessions` ADD `output_markdown_path` text;
@@ -0,0 +1,6 @@
1
+ -- v1.4.0 USCO200231 / NFRCO20201 / NFRCO20204: mandatory baseIdea, project code, and wizard
2
+ -- creation-status columns. All columns nullable for backward compat; service enforces non-empty
3
+ -- baseIdea at the API layer. Existing projects default to 'fully_created' (already functional).
4
+ ALTER TABLE `projects` ADD `code` text;--> statement-breakpoint
5
+ ALTER TABLE `projects` ADD `base_idea` text;--> statement-breakpoint
6
+ ALTER TABLE `projects` ADD `creation_status` text DEFAULT 'fully_created';
@@ -0,0 +1,14 @@
1
+ -- v1.2.4 USCO200195 / USCO200198 / CONSCO2132 / CONSCO2135: PRD Wizard standalone module.
2
+ -- One row per wizard change request, scoped per project + version (soft refs, no FKs —
3
+ -- CONSCO2015 soft-delete convention). status stays 'draft' until prd_updates.md is generated.
4
+ CREATE TABLE `prw_prd_wizard_requests` (
5
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
6
+ `project_id` integer NOT NULL,
7
+ `prd_version_id` integer NOT NULL,
8
+ `change_request` text NOT NULL,
9
+ `generated_markdown_path` text,
10
+ `status` text DEFAULT 'draft' NOT NULL,
11
+ `created_by` integer NOT NULL,
12
+ `created_at` text NOT NULL,
13
+ `updated_at` text NOT NULL
14
+ );
@@ -0,0 +1,24 @@
1
+ -- Unit 11 (Workflow Execution v1.0.0–v1.2.6 + Artifact Review v1.2.5).
2
+ -- USCO200222/NFRCO20183: one workflow markdown (workflow/<username>/<timestamp>.md) invoking a
3
+ -- single conductor across N applications; per-app runs stay on the canonical conductor_runs.
4
+ CREATE TABLE `wfe_workflow_markdowns` (
5
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
6
+ `project_id` integer NOT NULL,
7
+ `conductor_type` text NOT NULL,
8
+ `file_path` text NOT NULL,
9
+ `version_label` text,
10
+ `created_by` integer NOT NULL,
11
+ `created_by_name` text NOT NULL,
12
+ `created_at` text NOT NULL,
13
+ `updated_at` text NOT NULL
14
+ );--> statement-breakpoint
15
+ -- conductor_runs extensions: markdown link, v1.2.6 prior_phase_satisfied (default 1 — the
16
+ -- NFRCO20186 pre-filter guarantees pending-only), USCO200183/NFRCO20132 git-automation state.
17
+ ALTER TABLE `conductor_runs` ADD `workflow_markdown_id` integer;--> statement-breakpoint
18
+ ALTER TABLE `conductor_runs` ADD `prior_phase_satisfied` integer DEFAULT 1;--> statement-breakpoint
19
+ ALTER TABLE `conductor_runs` ADD `git_operation_status` text DEFAULT 'not_started';--> statement-breakpoint
20
+ ALTER TABLE `conductor_runs` ADD `git_branch_created` text;--> statement-breakpoint
21
+ ALTER TABLE `conductor_runs` ADD `git_commit_hash` text;--> statement-breakpoint
22
+ -- Artifact Review v1.2.5: module column for the Data Model tab / per-module filtering
23
+ -- (NFRCO20168, CONSCO2153). The 'data_model' enum widening is TypeScript-level only.
24
+ ALTER TABLE `artifacts` ADD `module` text;
@@ -0,0 +1,7 @@
1
+ -- Project Import v1.5.0: register an existing CO2 repo in place (read-only against the repo).
2
+ -- raw_claude_md keeps the imported CLAUDE.md verbatim so DB-driven regeneration preserves
3
+ -- prose buildClaudeMd cannot reconstruct; imported_at non-null marks an imported project;
4
+ -- imported_by is a soft ref -> users.id.
5
+ ALTER TABLE `projects` ADD `raw_claude_md` text;--> statement-breakpoint
6
+ ALTER TABLE `projects` ADD `imported_at` text;--> statement-breakpoint
7
+ ALTER TABLE `projects` ADD `imported_by` integer;
@@ -0,0 +1,3 @@
1
+ -- Quality v1.5.1: the CO2 BUG.md standard carries no severity level — drop the column
2
+ -- from bug_reports (UI filter/column and BUG.md generation drop it in the same release).
3
+ ALTER TABLE `bug_reports` DROP COLUMN `severity`;