ecoportal-api-graphql 1.3.13 → 1.3.16

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 (275) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +87 -0
  3. data/lib/ecoportal/api/common/graphql/client.rb +0 -2
  4. data/lib/ecoportal/api/common/graphql/http_client.rb +6 -0
  5. data/lib/ecoportal/api/graphql/base/ai_summary_version.rb +17 -17
  6. data/lib/ecoportal/api/graphql/base/file_container.rb +14 -14
  7. data/lib/ecoportal/api/graphql/base/location_classification_type.rb +15 -15
  8. data/lib/ecoportal/api/graphql/base/location_structure.rb +27 -27
  9. data/lib/ecoportal/api/graphql/base/organization.rb +15 -15
  10. data/lib/ecoportal/api/graphql/base/page/task.rb +24 -0
  11. data/lib/ecoportal/api/graphql/base/page.rb +17 -16
  12. data/lib/ecoportal/api/graphql/base/template.rb +35 -0
  13. data/lib/ecoportal/api/graphql/base.rb +37 -35
  14. data/lib/ecoportal/api/graphql/builder/contractor_entity.rb +41 -41
  15. data/lib/ecoportal/api/graphql/compat/response.rb +35 -35
  16. data/lib/ecoportal/api/graphql/connection/action.rb +11 -11
  17. data/lib/ecoportal/api/graphql/connection/action_category.rb +11 -11
  18. data/lib/ecoportal/api/graphql/connection/contractor_entity.rb +11 -11
  19. data/lib/ecoportal/api/graphql/connection/page.rb +11 -11
  20. data/lib/ecoportal/api/graphql/connection/person_member.rb +11 -11
  21. data/lib/ecoportal/api/graphql/connection/preview_page.rb +11 -11
  22. data/lib/ecoportal/api/graphql/connection.rb +17 -17
  23. data/lib/ecoportal/api/graphql/file_upload/client.rb +21 -10
  24. data/lib/ecoportal/api/graphql/fragment/field_configuration.rb +38 -0
  25. data/lib/ecoportal/api/graphql/fragment/force.rb +14 -10
  26. data/lib/ecoportal/api/graphql/fragment/location_node.rb +26 -26
  27. data/lib/ecoportal/api/graphql/fragment/page_task.rb +39 -0
  28. data/lib/ecoportal/api/graphql/fragment/template.rb +51 -0
  29. data/lib/ecoportal/api/graphql/fragment.rb +3 -0
  30. data/lib/ecoportal/api/graphql/input/contractor_entity.rb +14 -14
  31. data/lib/ecoportal/api/graphql/input/preset_view/update.rb +16 -16
  32. data/lib/ecoportal/api/graphql/input/workflow_command/add_stage.rb +18 -18
  33. data/lib/ecoportal/api/graphql/input/workflow_command/edit_field_configuration.rb +21 -21
  34. data/lib/ecoportal/api/graphql/input/workflow_command/edit_page.rb +28 -28
  35. data/lib/ecoportal/api/graphql/input/workflow_command/edit_page_creator_permissions.rb +18 -18
  36. data/lib/ecoportal/api/graphql/input/workflow_command/field_config/cross_reference.rb +23 -23
  37. data/lib/ecoportal/api/graphql/input/workflow_command/field_config/date.rb +20 -20
  38. data/lib/ecoportal/api/graphql/input/workflow_command/field_config/image_gallery.rb +20 -20
  39. data/lib/ecoportal/api/graphql/input/workflow_command/field_config/people.rb +24 -24
  40. data/lib/ecoportal/api/graphql/input/workflow_command/field_config/plain_text.rb +20 -20
  41. data/lib/ecoportal/api/graphql/input/workflow_command/field_config/rich_text.rb +20 -20
  42. data/lib/ecoportal/api/graphql/input/workflow_command/field_config/select.rb +20 -20
  43. data/lib/ecoportal/api/graphql/input/workflow_command/move_field.rb +18 -18
  44. data/lib/ecoportal/api/graphql/input/workflow_command/reorder_forces.rb +18 -18
  45. data/lib/ecoportal/api/graphql/input/workflow_command/reorder_section.rb +18 -18
  46. data/lib/ecoportal/api/graphql/input/workflow_command.rb +251 -251
  47. data/lib/ecoportal/api/graphql/input.rb +24 -24
  48. data/lib/ecoportal/api/graphql/logic/connection.rb +34 -34
  49. data/lib/ecoportal/api/graphql/model/page/task.rb +16 -0
  50. data/lib/ecoportal/api/graphql/model/page.rb +16 -15
  51. data/lib/ecoportal/api/graphql/model/person_member.rb +15 -15
  52. data/lib/ecoportal/api/graphql/model/template.rb +15 -0
  53. data/lib/ecoportal/api/graphql/model.rb +32 -30
  54. data/lib/ecoportal/api/graphql/mutation/ai_summary/generate.rb +45 -45
  55. data/lib/ecoportal/api/graphql/mutation/ai_summary/submit_feedback.rb +40 -40
  56. data/lib/ecoportal/api/graphql/mutation/contractor_entity.rb +14 -14
  57. data/lib/ecoportal/api/graphql/mutation/page/approve_review_task.rb +40 -40
  58. data/lib/ecoportal/api/graphql/mutation/page/batch_update_review_task.rb +38 -40
  59. data/lib/ecoportal/api/graphql/mutation/page/create_draft.rb +38 -40
  60. data/lib/ecoportal/api/graphql/mutation/page/delete_draft.rb +38 -40
  61. data/lib/ecoportal/api/graphql/mutation/page/execute_force_commands.rb +7 -7
  62. data/lib/ecoportal/api/graphql/mutation/page/execute_workflow_commands.rb +8 -7
  63. data/lib/ecoportal/api/graphql/mutation/page/publish_draft.rb +38 -40
  64. data/lib/ecoportal/api/graphql/mutation/page/reject_review_task.rb +40 -40
  65. data/lib/ecoportal/api/graphql/mutation/page/restart_review_task.rb +40 -40
  66. data/lib/ecoportal/api/graphql/mutation/page/undo_review_task.rb +40 -40
  67. data/lib/ecoportal/api/graphql/mutation/preset_view/destroy.rb +34 -35
  68. data/lib/ecoportal/api/graphql/mutation/register/destroy.rb +35 -35
  69. data/lib/ecoportal/api/graphql/mutation/smart_fill/generate.rb +36 -36
  70. data/lib/ecoportal/api/graphql/mutation/smart_fill/submit_feedback.rb +40 -40
  71. data/lib/ecoportal/api/graphql/mutation/smart_fill.rb +13 -13
  72. data/lib/ecoportal/api/graphql/mutation/template/create_related_page.rb +46 -46
  73. data/lib/ecoportal/api/graphql/mutation/template/destroy_related_page.rb +1 -1
  74. data/lib/ecoportal/api/graphql/mutation/template/update_information.rb +1 -1
  75. data/lib/ecoportal/api/graphql/mutation.rb +20 -20
  76. data/lib/ecoportal/api/graphql/payload/contractor_entity.rb +14 -14
  77. data/lib/ecoportal/api/graphql/payload/ok_payload.rb +36 -21
  78. data/lib/ecoportal/api/graphql/payload/page/draft.rb +26 -13
  79. data/lib/ecoportal/api/graphql/payload/page/review_task.rb +13 -13
  80. data/lib/ecoportal/api/graphql/payload/page/review_task_batch.rb +23 -0
  81. data/lib/ecoportal/api/graphql/payload/page.rb +20 -19
  82. data/lib/ecoportal/api/graphql/payload/preset_view.rb +15 -11
  83. data/lib/ecoportal/api/graphql/payload/register.rb +15 -11
  84. data/lib/ecoportal/api/graphql/payload/template/create_related_page.rb +1 -1
  85. data/lib/ecoportal/api/graphql/payload/template/destroy_related_page.rb +1 -1
  86. data/lib/ecoportal/api/graphql/payload/template/update_information.rb +1 -1
  87. data/lib/ecoportal/api/graphql/payload.rb +23 -23
  88. data/lib/ecoportal/api/graphql/query/location_structures.rb +57 -57
  89. data/lib/ecoportal/api/graphql/query/page.rb +45 -45
  90. data/lib/ecoportal/api/graphql/query/page_with_forces.rb +9 -3
  91. data/lib/ecoportal/api/graphql/query/pages_workflow_commands.rb +9 -3
  92. data/lib/ecoportal/api/graphql/query/register_preset_views.rb +78 -78
  93. data/lib/ecoportal/api/graphql/query.rb +27 -27
  94. data/lib/ecoportal/api/graphql.rb +9 -5
  95. data/lib/ecoportal/api/graphql_version.rb +1 -1
  96. metadata +9 -180
  97. data/.ai-assistance/bridge/CLAUDE.md +0 -338
  98. data/.ai-assistance/bridge/archive/.gitkeep +0 -0
  99. data/.ai-assistance/bridge/archive/oscar-a1b2c3d-gitlab-mcp-doc-update.inbox.md +0 -29
  100. data/.ai-assistance/bridge/archive/oscar-a1b2c3d-gitlab-mcp-doc-update.outbox.md +0 -18
  101. data/.ai-assistance/bridge/archive/oscar-c912c25-gemini-design-review.inbox.md +0 -42
  102. data/.ai-assistance/bridge/archive/oscar-c912c25-gemini-design-review.outbox.md +0 -115
  103. data/.ai-assistance/bridge/context/gemini-review-prompt.txt +0 -48
  104. data/.ai-assistance/bridge/context/gemini-review-response.md +0 -104
  105. data/.ai-assistance/bridge/context/project.md +0 -42
  106. data/.ai-assistance/bridge/inbox/.gitkeep +0 -0
  107. data/.ai-assistance/bridge/outbox/.gitkeep +0 -0
  108. data/.ai-assistance/bridge/outbox/request-for-standards-discovery.md +0 -48
  109. data/.ai-assistance/bridge/queue/.gitkeep +0 -1
  110. data/.ai-assistance/capabilities/CLAUDE.md +0 -27
  111. data/.ai-assistance/capabilities/assumptions-log.md +0 -80
  112. data/.ai-assistance/capabilities/code.md +0 -47
  113. data/.ai-assistance/capabilities/connectors.md +0 -37
  114. data/.ai-assistance/capabilities/cowork.md +0 -55
  115. data/.ai-assistance/code/OVERVIEW.md +0 -155
  116. data/.ai-assistance/code/data_fields.md +0 -242
  117. data/.ai-assistance/code/dependencies.md +0 -151
  118. data/.ai-assistance/code/diff_as_input.md +0 -234
  119. data/.ai-assistance/code/diff_pairing_engine.md +0 -243
  120. data/.ai-assistance/code/diff_service_deep_dive.md +0 -192
  121. data/.ai-assistance/code/ecoPortal_architecture/00_overview_and_index.md +0 -55
  122. data/.ai-assistance/code/ecoPortal_architecture/01_terminology_dictionary.md +0 -181
  123. data/.ai-assistance/code/ecoPortal_architecture/02_data_model.md +0 -192
  124. data/.ai-assistance/code/ecoPortal_architecture/03_api_layers.md +0 -147
  125. data/.ai-assistance/code/ecoPortal_architecture/04_graphql_queries_mutations.md +0 -277
  126. data/.ai-assistance/code/ecoPortal_architecture/05_page_workflows.md +0 -200
  127. data/.ai-assistance/code/ecoPortal_architecture/06_search_and_filters.md +0 -228
  128. data/.ai-assistance/code/ecoPortal_architecture/07_data_fields.md +0 -197
  129. data/.ai-assistance/code/ecoPortal_architecture/08_stages_sections.md +0 -243
  130. data/.ai-assistance/code/ecoPortal_architecture/09_people_contractors_locations.md +0 -196
  131. data/.ai-assistance/code/ecoPortal_architecture/10_forces_workflow_builder.md +0 -132
  132. data/.ai-assistance/code/ecoPortal_architecture/11_integration_gems.md +0 -187
  133. data/.ai-assistance/code/ecoPortal_architecture/12_ai_documentation_sources_gaps.md +0 -236
  134. data/.ai-assistance/code/ecoPortal_architecture/13_ai_infrastructure.md +0 -183
  135. data/.ai-assistance/code/ecoportal_schema_reference.md +0 -240
  136. data/.ai-assistance/code/filter_contract_matrix.md +0 -177
  137. data/.ai-assistance/code/graphql_domain_knowledge.md +0 -240
  138. data/.ai-assistance/code/refactoring/datafield-readwrite-shape-asymmetry.md +0 -71
  139. data/.ai-assistance/code/refactoring/opportunities.md +0 -251
  140. data/.ai-assistance/code/schema_analysis.md +0 -321
  141. data/.ai-assistance/code/search_filters.md +0 -868
  142. data/.ai-assistance/code/spec_coverage.md +0 -73
  143. data/.ai-assistance/code/template_diff_pairing_domain.md +0 -175
  144. data/.ai-assistance/code/workflow-command-guide.md +0 -466
  145. data/.ai-assistance/code/workflow-space.md +0 -353
  146. data/.ai-assistance/conventions/CLAUDE.md +0 -30
  147. data/.ai-assistance/conventions/code-working-tree-protocol.md +0 -199
  148. data/.ai-assistance/conventions/gitignore-rules.md +0 -42
  149. data/.ai-assistance/conventions/permission-guidance.md +0 -120
  150. data/.ai-assistance/integrations/README.md +0 -70
  151. data/.ai-assistance/integrations/gitkraken-mcp.md +0 -107
  152. data/.ai-assistance/integrations/gitlab-mcp.md +0 -123
  153. data/.ai-assistance/integrations/local-git.md +0 -60
  154. data/.ai-assistance/local_paths.example.md +0 -17
  155. data/.ai-assistance/projects/TODO.md +0 -118
  156. data/.ai-assistance/projects/api-v2-to-graphql-migration/DECISIONS.md +0 -168
  157. data/.ai-assistance/projects/api-v2-to-graphql-migration/INTENT.md +0 -60
  158. data/.ai-assistance/projects/api-v2-to-graphql-migration/TODO.md +0 -267
  159. data/.ai-assistance/projects/api-v2-to-graphql-migration/UPSTREAM.md +0 -53
  160. data/.ai-assistance/projects/api-v2-to-graphql-migration/notes/csv-template-pipeline-design.md +0 -102
  161. data/.ai-assistance/projects/api-v2-to-graphql-migration/notes/cutover-usecase-gap-audit.md +0 -139
  162. data/.ai-assistance/projects/compat-layer-audit/COMPAT_AUDIT.md +0 -244
  163. data/.ai-assistance/projects/dynamic-model-generation/INTENT.md +0 -93
  164. data/.ai-assistance/projects/eco-helpers-compat/INTENT.md +0 -244
  165. data/.ai-assistance/projects/eco-helpers-compat/MIGRATION_GUIDE.md +0 -266
  166. data/.ai-assistance/projects/eco-helpers-compat/TODO.md +0 -86
  167. data/.ai-assistance/projects/ecoportal-api-v2-doublemodel-review/INTENT.md +0 -101
  168. data/.ai-assistance/projects/graphql-agent/GAP_ANALYSIS.md +0 -177
  169. data/.ai-assistance/projects/ooze-graphql-native-migration/DECISIONS.md +0 -161
  170. data/.ai-assistance/projects/ooze-graphql-native-migration/INTENT.md +0 -125
  171. data/.ai-assistance/projects/ooze-graphql-native-migration/INVENTORY.md +0 -136
  172. data/.ai-assistance/projects/ooze-graphql-native-migration/RISKS.md +0 -126
  173. data/.ai-assistance/projects/ooze-graphql-native-migration/TODO.md +0 -261
  174. data/.ai-assistance/projects/ooze-graphql-native-migration/analysis/2026-06-30-cutover-workflow-deep-review.md +0 -122
  175. data/.ai-assistance/projects/ooze-graphql-native-migration/analysis/2026-07-01-forces-via-workflow-commands-miss-rca.md +0 -148
  176. data/.ai-assistance/projects/page-model/DECISIONS.md +0 -245
  177. data/.ai-assistance/projects/page-model/TODO.md +0 -190
  178. data/.ai-assistance/projects/qa-services-delivery/DECISIONS.md +0 -93
  179. data/.ai-assistance/projects/qa-services-delivery/INTENT.md +0 -76
  180. data/.ai-assistance/projects/qa-services-delivery/PHASE3-SCOPE.md +0 -115
  181. data/.ai-assistance/projects/qa-services-delivery/ROADMAP.md +0 -99
  182. data/.ai-assistance/projects/qa-services-delivery/TODO.md +0 -81
  183. data/.ai-assistance/projects/search-filter-builder/INTENT.md +0 -107
  184. data/.ai-assistance/projects/search-filter-builder/TODO.md +0 -131
  185. data/.ai-assistance/projects/template-automatic-build-maintenance/INTENT.md +0 -87
  186. data/.ai-assistance/projects/template-automatic-build-maintenance/TODO.md +0 -108
  187. data/.ai-assistance/projects/template-diff-deploy/INTENT.md +0 -12
  188. data/.ai-assistance/projects/template-diff-deploy/TODO.md +0 -9
  189. data/.ai-assistance/projects/template-maintenance/DESIGN.md +0 -134
  190. data/.ai-assistance/projects/template-maintenance/PHASE0-FINDINGS.md +0 -93
  191. data/.ai-assistance/projects/template-maintenance/README.md +0 -14
  192. data/.ai-assistance/projects/template-model-logic/CATEGORY_CATALOG.md +0 -236
  193. data/.ai-assistance/projects/template-model-logic/CLASSIFICATION_SPIKE.md +0 -243
  194. data/.ai-assistance/projects/template-model-logic/DESIGN_NOTE.md +0 -154
  195. data/.ai-assistance/projects/workflow-space/TODO.md +0 -213
  196. data/.ai-assistance/reinstall-claude-desktop-windows.md +0 -136
  197. data/.ai-assistance/scripts/CLAUDE.md +0 -150
  198. data/.ai-assistance/scripts/bridge-inbox-check.sh +0 -75
  199. data/.ai-assistance/scripts/bridge-init.sh +0 -86
  200. data/.ai-assistance/scripts/bridge-status.sh +0 -44
  201. data/.ai-assistance/scripts/capabilities-check.ts +0 -104
  202. data/.ai-assistance/scripts/check-outbox.sh +0 -43
  203. data/.ai-assistance/scripts/dep_graph.rb +0 -91
  204. data/.ai-assistance/scripts/lock-acquire.sh +0 -103
  205. data/.ai-assistance/scripts/lock-multi.sh +0 -124
  206. data/.ai-assistance/scripts/lock-queue.sh +0 -94
  207. data/.ai-assistance/scripts/setup-mcps.test.ts +0 -188
  208. data/.ai-assistance/scripts/setup-mcps.ts +0 -234
  209. data/.ai-assistance/scripts/task-complete.ts +0 -74
  210. data/.ai-assistance/scripts/task-create.ts +0 -75
  211. data/.ai-assistance/scripts/task-read.ts +0 -125
  212. data/.ai-assistance/scripts/token-logger.js +0 -220
  213. data/.ai-assistance/scripts/token-report.ts +0 -158
  214. data/.ai-assistance/scripts/token-session-start.js +0 -66
  215. data/.ai-assistance/skills/ai-instructions/SKILL.md +0 -48
  216. data/.ai-assistance/skills/code-specs/SKILL.md +0 -69
  217. data/.ai-assistance/skills/corporate-policies/SKILL.md +0 -201
  218. data/.ai-assistance/skills/dep-graph/SKILL.md +0 -139
  219. data/.ai-assistance/skills/ep-ai-manager/SKILL.md +0 -417
  220. data/.ai-assistance/skills/gemini-assist/SKILL.md +0 -63
  221. data/.ai-assistance/skills/gemini-assist/gemini-mcp-server.js +0 -205
  222. data/.ai-assistance/skills/gemini-assist/gemini_ask.py +0 -1
  223. data/.ai-assistance/skills/gemini-assist/gemini_ask.rb +0 -240
  224. data/.ai-assistance/skills/gemini-assist/prompts/cycle_end_review.txt +0 -25
  225. data/.ai-assistance/skills/graphql-schema-analysis/SKILL.md +0 -261
  226. data/.ai-assistance/skills/procedural-memory/SKILL.md +0 -319
  227. data/.ai-assistance/skills/project-cycle/SKILL.md +0 -177
  228. data/.ai-assistance/skills/project-self-docs/SKILL.md +0 -181
  229. data/.ai-assistance/skills/project-self-docs/scripts/self_docs_scan.py +0 -378
  230. data/.ai-assistance/skills/refactor/SKILL.md +0 -62
  231. data/.ai-assistance/skills/rubocop/SKILL.md +0 -93
  232. data/.ai-assistance/skills/ruby-scripting/SKILL.md +0 -215
  233. data/.ai-assistance/skills/spec-generation/SKILL.md +0 -72
  234. data/.ai-assistance/standards-version.json +0 -22
  235. data/.ai-assistance/token-budget.json +0 -32
  236. data/.ai-assistance/version.json +0 -39
  237. data/.claude/settings.json +0 -150
  238. data/.env.example +0 -18
  239. data/.gitattributes +0 -15
  240. data/.gitignore +0 -37
  241. data/.gitlab-ci.yml +0 -45
  242. data/.markdownlint.json +0 -4
  243. data/.rspec +0 -3
  244. data/.rubocop.yml +0 -121
  245. data/.ruby-version +0 -1
  246. data/.yardopts +0 -10
  247. data/CLAUDE.md +0 -243
  248. data/Gemfile +0 -30
  249. data/Rakefile +0 -90
  250. data/bin/console +0 -14
  251. data/bin/setup +0 -8
  252. data/bin/setup.ps1 +0 -6
  253. data/docs/self-docs/ARCHITECTURE.md +0 -88
  254. data/docs/self-docs/CHANGES.jsonl +0 -12
  255. data/docs/self-docs/COMPLIANCE.md +0 -79
  256. data/docs/self-docs/CONVENTIONS.md +0 -74
  257. data/docs/self-docs/INTEGRATIONS.md +0 -65
  258. data/docs/self-docs/OPERATIONS.md +0 -76
  259. data/docs/self-docs/OVERVIEW.md +0 -64
  260. data/docs/self-docs/STATUS.md +0 -73
  261. data/docs/self-docs/self-docs-index.json +0 -51
  262. data/docs/worklog.md +0 -977
  263. data/ecoportal-api-graphql.gemspec +0 -40
  264. data/scripts/auto-worker-scheduler.sh +0 -386
  265. data/tests/actions_get.rb +0 -7
  266. data/tests/contractor_entities_get.rb +0 -20
  267. data/tests/contractor_entity_create.rb +0 -19
  268. data/tests/contractor_entity_udpate.rb +0 -20
  269. data/tests/dump_page_model.rb +0 -74
  270. data/tests/dump_template_model.rb +0 -90
  271. data/tests/loc_structure_get.rb +0 -10
  272. data/tests/loc_structure_update.rb +0 -51
  273. data/tests/loc_structures_get.rb +0 -15
  274. data/tests/local_libs.rb +0 -20
  275. data/tests/validate_queries.rb +0 -127
@@ -1,353 +0,0 @@
1
- # Workflow Space — Code Spec
2
-
3
- *Read this before working on `PagesWorkflow`, `Model::PagesWorkflow`, or `Input::WorkflowCommand`.*
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- The Workflow Space covers two distinct subsystems that share the word "workflow":
10
-
11
- 1. **The read model** (`PagesWorkflow`) — queried as `page.workflow` — describes the
12
- automation configuration attached to a template or page (stages, fields, callbacks).
13
- 2. **The command bus** (`executeWorkflowCommands`) — a single mutation that accepts an
14
- array of `WorkflowCommandInput` objects to structurally modify a template or page
15
- (add/rename stages, add fields, configure field options, set up callbacks, etc.).
16
-
17
- These are deeply related but separate code areas.
18
-
19
- ---
20
-
21
- ## SCHEMA_VERSION
22
-
23
- All files in this area carry:
24
-
25
- ```ruby
26
- SCHEMA_VERSION = '20260605'.freeze
27
- ```
28
-
29
- This constant tracks the introspection snapshot used to derive the type list:
30
- `20260605T101224_live_ep_graphql_schema.graphql.json`.
31
-
32
- **When to update:** Re-run schema introspection and update this constant (across all
33
- affected files) when engineering reports schema changes to the Workflow Builder types.
34
- Use `grep -r SCHEMA_VERSION lib/` to find all files that need updating.
35
- Do not update the constant speculatively — only after verified re-introspection.
36
-
37
- ---
38
-
39
- ## W1 — Read Model: PagesWorkflow
40
-
41
- ### What it is
42
-
43
- `PagesWorkflow` is the workflow configuration embedded on every page (and template).
44
- It is available at `page.workflow` when the `PagesWorkflowFields` fragment is included
45
- in the query. It is NOT automatically included in `CommonPageUnion` — callers must
46
- request it explicitly.
47
-
48
- ### Type hierarchy
49
-
50
- ```
51
- PagesWorkflow
52
- autoPageCreationEnabled: Boolean!
53
- fields: [RegisterField!]! — field registry (key/name/type/total)
54
- stages: [Stage!]! — stage list (id, name, ordering, state, active, started)
55
- commands: PagesWorkflowCommandInterfaceConnection! — paginated command log (deferred F.2)
56
- ```
57
-
58
- **CallbackType** — attached to stages (requires `PagesWorkflowCallbackFields` fragment
59
- on Stage — see gap F.3):
60
-
61
- ```
62
- PagesWorkflowCallbackType
63
- id, triggerCondition: CallbackTriggerConditionEnum!
64
- triggers: [PagesWorkflowTriggerInterface!]!
65
- operations: [PagesWorkflowOperationInterface!]!
66
- ```
67
-
68
- **OperationInterface** — dispatches to three concrete types via `__typename`:
69
-
70
- ```
71
- PagesWorkflowOperationInterface
72
- id, timeDelayPassed: Boolean!, timeDelayConfig, delayedExecuteAt
73
-
74
- PagesWorkflowOperationsAssignTo — task assignment automation
75
- targetTaskType, lastFulfilled, strategies, escalationLevels
76
-
77
- PagesWorkflowOperationsCreatePage — auto-create a page on trigger
78
- templateId, crossReferenceFieldId
79
-
80
- PagesWorkflowOperationsSendNotification — notification dispatch
81
- recurring, recurrenceActive, emailConfig, inSystemConfig, recipientConfig, ...
82
- ```
83
-
84
- **TriggerInterface** — dispatches to one concrete type:
85
-
86
- ```
87
- PagesWorkflowTriggerInterface
88
- id
89
-
90
- PagesWorkflowTriggersConditionalLogic — field-value conditions
91
- filters: [StoredEsFilter!]!
92
- ```
93
-
94
- **CommandInterface** — the paginated command log (audit trail), dispatches to three:
95
-
96
- ```
97
- PagesWorkflowCommandInterface
98
- id, commandAction, createdAt, patchVer, ownerId, stageId, stageName, taskId
99
-
100
- PagesWorkflowCommandChange — structured diff changes
101
- changes: [Change!]!
102
- PagesWorkflowCommandChangeMessage — free-text change messages
103
- changeMessages: [String!]!
104
- PagesWorkflowCommandEsChange — ES filter changes
105
- changes: [StoredEsFilterChange!]!
106
- ```
107
-
108
- ### Ruby implementation
109
-
110
- | Layer | Class | File |
111
- |---|---|---|
112
- | Base model | `Base::PagesWorkflow` | `lib/ecoportal/api/graphql/base/pages_workflow.rb` |
113
- | Read model | `Model::PagesWorkflow` | `lib/ecoportal/api/graphql/model/pages_workflow.rb` |
114
- | Callback | `Base::PagesWorkflow::CallbackType` | `base/pages_workflow/callback_type.rb` |
115
- | Operation base | `Base::PagesWorkflow::OperationInterface` | `base/pages_workflow/operation_interface.rb` |
116
- | AssignTo | `Base::PagesWorkflow::Operations::AssignTo` | `base/pages_workflow/operations/assign_to.rb` |
117
- | CreatePage | `Base::PagesWorkflow::Operations::CreatePage` | `base/pages_workflow/operations/create_page.rb` |
118
- | SendNotification | `Base::PagesWorkflow::Operations::SendNotification` | `base/pages_workflow/operations/send_notification.rb` |
119
- | Trigger base | `Base::PagesWorkflow::TriggerInterface` | `base/pages_workflow/trigger_interface.rb` |
120
- | ConditionalLogic | `Base::PagesWorkflow::Triggers::ConditionalLogic` | `base/pages_workflow/triggers/conditional_logic.rb` |
121
- | Command base | `Base::PagesWorkflow::CommandInterface` | `base/pages_workflow/command_interface.rb` |
122
- | CommandChange | `Base::PagesWorkflow::CommandChange` | `base/pages_workflow/command_change.rb` |
123
- | CommandChangeMessage | `Base::PagesWorkflow::CommandChangeMessage` | `base/pages_workflow/command_change_message.rb` |
124
- | CommandEsChange | `Base::PagesWorkflow::CommandEsChange` | `base/pages_workflow/command_es_change.rb` |
125
-
126
- Supporting value objects: `RegisterField`, `TimeDelayConfig`, `EscalationLevel`,
127
- `EmailConfig`, `InSystemConfig`, `RecipientConfig`, `UserSelection`,
128
- `PeopleFieldSelection`, `TaskConfigSelection`, `ActionTypeSelection`,
129
- `MailboxFieldSelection`.
130
-
131
- ### Fragments
132
-
133
- Three fragments are defined in `lib/ecoportal/api/graphql/fragment/pages_workflow.rb`:
134
-
135
- | Fragment constant | GraphQL fragment name | Purpose |
136
- |---|---|---|
137
- | `:PagesWorkflowFields` | `PagesWorkflowFields on PagesWorkflow` | Core read model (autoPageCreationEnabled, fields, stages) |
138
- | `:PagesWorkflowCallbackFields` | `PagesWorkflowCallbackFields on PagesWorkflowCallbackType` | Full callback with triggers + operations (all three operation types) |
139
- | `:PagesWorkflowCommandFields` | `PagesWorkflowCommandFields on PagesWorkflowCommandInterface` | Command log entries |
140
-
141
- ### How to access workflow on a page
142
-
143
- The `workflow` field on `BasePageInterface` is mapped but NOT included in
144
- `CommonPageUnion`. You must query it explicitly with the `PagesWorkflowFields` fragment:
145
-
146
- ```ruby
147
- page = graphql.currentOrganization.page(id: page_id) do
148
- spread :PagesWorkflowFields # adds workflow { autoPageCreationEnabled fields { ... } stages { ... } }
149
- id
150
- name
151
- patchVer
152
- end
153
-
154
- page.workflow.auto_page_creation_enabled # => Boolean
155
- page.workflow.stages # => Array of raw Stage hashes (id, name, ordering, state)
156
- page.workflow.fields # => Array of RegisterField instances
157
- ```
158
-
159
- **Note:** `page.workflow.stages` returns raw stage data, not `Base::Page::Phased::Stage`
160
- instances. For full stage access (sections, components, tasks), use the normal page query
161
- with `CommonPageUnion`.
162
-
163
- ### How to read callbacks (via stage)
164
-
165
- Stage-level callbacks require the `PagesWorkflowCallbackFields` fragment to be spread
166
- on the `Stage` type. This is not yet wired into the standard stage fragment — see F.3.
167
-
168
- When available:
169
-
170
- ```ruby
171
- stage = page.stages['Risk Assessment']
172
- stage.workflow_callbacks.each do |cb|
173
- puts cb.trigger_condition
174
- cb.operations.each { |op| puts op.class.name }
175
- end
176
- ```
177
-
178
- ---
179
-
180
- ## W2-W5 — Write Model: Command Bus
181
-
182
- ### What it is
183
-
184
- `executeWorkflowCommands` is the single mutation used for all structural changes to
185
- a template or page workflow. Rather than individual mutations per action, it accepts
186
- an ordered array of `WorkflowCommandInput` objects — each is a one-key hash dispatching
187
- to a typed sub-input.
188
-
189
- ### Mutation signature
190
-
191
- ```graphql
192
- mutation ExecuteWorkflowCommands($input: ExecuteWorkflowCommandsInput!) {
193
- executeWorkflowCommands(input: $input) {
194
- patchVer
195
- item { autoPageCreationEnabled fields { ... } stages { ... } }
196
- errors { details fullMessages }
197
- }
198
- }
199
- ```
200
-
201
- `ExecuteWorkflowCommandsInput`:
202
- - `id: ID!` — the page or template ID
203
- - `patchVer: Int!` — optimistic concurrency lock (required, not optional)
204
- - `commands: [WorkflowCommandInput!]!` — the command array
205
-
206
- ### Ruby classes
207
-
208
- | Class | File | Purpose |
209
- |---|---|---|
210
- | `Mutation::Page::ExecuteWorkflowCommands` | `mutation/page/execute_workflow_commands.rb` | Executes the mutation |
211
- | `Payload::ExecuteWorkflowCommands` | `payload/execute_workflow_commands.rb` | Wraps response: `patchVer`, `item` (PagesWorkflow), `success?`, `error?`, `body` |
212
- | `Input::WorkflowCommand` | `input/workflow_command.rb` | Dispatcher: `COMMAND_MAP` + `.build(key, **kwargs)` |
213
- | `Input::WorkflowCommand::*` | `input/workflow_command/*.rb` | ~83 sub-input modules (one per command key) |
214
- | `Connection::PagesWorkflowCommand` | `connection/pages_workflow_command.rb` | Paginated command log connection |
215
-
216
- ### Input::WorkflowCommand — dispatcher
217
-
218
- `Input::WorkflowCommand` is a pure factory — no instances, only class methods:
219
-
220
- ```ruby
221
- # Build a single command hash
222
- cmd = Input::WorkflowCommand.build(:editPage, name: 'New Title')
223
- # => { editPage: { name: 'New Title' } }
224
-
225
- # Build multiple commands
226
- cmds = [
227
- Input::WorkflowCommand.build(:editPage, name: 'New Title', icon: 'star'),
228
- Input::WorkflowCommand.build(:editStage, stageId: 's1', name: 'Phase 1'),
229
- ]
230
-
231
- # Execute all commands in one mutation call
232
- payload = Mutation::Page::ExecuteWorkflowCommands.new(client).query(
233
- id: page_id,
234
- patch_ver: page.patchVer,
235
- commands: cmds
236
- )
237
-
238
- raise "Workflow command failed: #{payload.body}" unless payload.success?
239
- new_patch_ver = payload.patchVer
240
- ```
241
-
242
- **Important:** `patchVer` is required and non-optional on `ExecuteWorkflowCommandsInput`.
243
- Always fetch the current page before calling this mutation.
244
-
245
- ### `Builder::Page` integration
246
-
247
- The low-level mutation class `Mutation::Page::ExecuteWorkflowCommands` exists and is
248
- functional. `Builder::Page#execute_workflow_commands` is a **deferred item** (see F.4)
249
- — the convenience wrapper on `Builder::Page` is not yet present.
250
-
251
- Until it is wired, call the mutation directly:
252
-
253
- ```ruby
254
- payload = Mutation::Page::ExecuteWorkflowCommands.new(client).query(
255
- id: page_id,
256
- patch_ver: page.patchVer,
257
- commands: cmds
258
- )
259
- ```
260
-
261
- ### Template mutations
262
-
263
- Template structural mutations use the same `executeWorkflowCommands` mutation and the
264
- same `WorkflowCommandInput` command bus. Engineering has confirmed the back-end is ready.
265
-
266
- Template mutations are guarded by an `allow_template_mutations` flag (planned for
267
- `Builder::Page` — see F.4). Until that guard is implemented, take care when targeting
268
- template IDs — structural changes to templates affect all pages created from them.
269
-
270
- ### Payload
271
-
272
- `Payload::ExecuteWorkflowCommands` provides:
273
-
274
- ```ruby
275
- payload.success? # => Boolean — true if no errors
276
- payload.error? # => Boolean — true if errors array is non-empty
277
- payload.body # => raw errors array (for logging)
278
- payload.patchVer # => Integer — updated patchVer after commands applied
279
- payload.item # => Model::PagesWorkflow — read back the updated workflow state
280
- ```
281
-
282
- ---
283
-
284
- ## Concerns::Deprecation — warn_once Pattern
285
-
286
- `Concerns::Deprecation` provides a process-level warning deduplicator used in this
287
- and other areas of the gem:
288
-
289
- ```ruby
290
- Concerns::Deprecation.warn_once(:some_key, 'This method is deprecated — use X instead.')
291
- # Prints once to stderr; subsequent calls with the same key are silenced.
292
- ```
293
-
294
- The `SCHEMA_VERSION` constant on `Concerns::Deprecation` tracks the same introspection
295
- snapshot as the workflow command classes.
296
-
297
- ---
298
-
299
- ## Gap Table — PageInput vs WorkflowCommand
300
-
301
- These fields are NOT settable via `UpdatePageInput → page: PageInput` but ARE settable
302
- via `WorkflowCommand.build(:editPage, ...)`:
303
-
304
- | Goal | NOT in PageInput | Use instead |
305
- |------|------------------|-------------|
306
- | Change page icon | | `editPage: { icon: 'star' }` |
307
- | Change theme | | `editPage: { themeId: 'THEME_ID' }` |
308
- | Enable/disable counter | | `editPage: { counterEnabled: true, counterPrefix: 'REC-' }` |
309
- | Set counter value | | `editPage: { counter: 42 }` |
310
- | Show/hide creator field | | `editPage: { showCreator: true }` |
311
- | Toggle comments | | `editPage: { disableComments: false }` |
312
- | Enable dashboard import | | `editPage: { enableDashboardImport: true }` |
313
- | Mobile layout settings | | `editPage: { mobileEnabled: true, useSectionsOnMobile: true }` |
314
- | Restricted stage display | | `editPage: { showStrategyForRestrictedStages: true }` |
315
- | Manage folder membership | | `editPage: { addFolders: ['F1'], removeFolders: ['F2'] }` |
316
-
317
- ---
318
-
319
- ## Gap Table — DataFieldInput vs WorkflowCommand
320
-
321
- These field configuration properties are NOT settable via `DataFieldInput` (the per-field
322
- value update in `updatePage`) but ARE settable via
323
- `WorkflowCommand.build(:editFieldConfiguration, ...)`:
324
-
325
- | Goal | NOT in DataFieldInput | Use instead |
326
- |------|----------------------|-------------|
327
- | Rename a field label | | `editFieldConfiguration: { dataFieldId: 'F', label: 'New Name' }` |
328
- | Set field tooltip/description | | `editFieldConfiguration: { dataFieldId: 'F', tooltip: '...', description: '...' }` |
329
- | Hide field in view | | `editFieldConfiguration: { dataFieldId: 'F', hideView: true }` |
330
- | Configure people field type | | `editFieldConfiguration: { dataFieldId: 'F', byType: { people: { singular: true, personSchemaId: 'S' } } }` |
331
- | Configure select options | | `addSelectFieldOption`, `editSelectFieldOption`, `removeSelectFieldOption` commands |
332
- | Configure gauge stops | | `addGaugeFieldStop`, `editGaugeFieldStop`, `removeGaugeFieldStop` commands |
333
- | Configure cross-reference | | `editFieldConfiguration: { dataFieldId: 'F', byType: { crossReference: { registerId: 'R', singleSelectMode: true } } }` |
334
- | Configure date (show time) | | `editFieldConfiguration: { dataFieldId: 'F', byType: { date: { showTime: true } } }` |
335
- | Configure image gallery layout | | `editFieldConfiguration: { dataFieldId: 'F', byType: { imageGallery: { layout: 'GRID' } } }` |
336
- | Set linked field config | | `addLinkedFieldConfig: { dataFieldId: 'F', sourceFieldKey: 'key', crossReferenceId: 'CR' }` |
337
-
338
- ---
339
-
340
- ## Related Files
341
-
342
- ```
343
- lib/ecoportal/api/graphql/base/pages_workflow.rb ← Base model root
344
- lib/ecoportal/api/graphql/model/pages_workflow.rb ← Model with class_resolver wiring
345
- lib/ecoportal/api/graphql/input/workflow_command.rb ← Dispatcher + COMMAND_MAP
346
- lib/ecoportal/api/graphql/input/workflow_command/ ← ~83 sub-input modules
347
- lib/ecoportal/api/graphql/mutation/page/execute_workflow_commands.rb
348
- lib/ecoportal/api/graphql/payload/execute_workflow_commands.rb
349
- lib/ecoportal/api/graphql/fragment/pages_workflow.rb ← 3 fragments
350
- lib/ecoportal/api/graphql/concerns/deprecation.rb ← warn_once
351
- .ai-assistance/code/workflow-command-guide.md ← porting guide with full command table
352
- .ai-assistance/projects/workflow-space/TODO.md ← W1-W5 phase tracking
353
- ```
@@ -1,30 +0,0 @@
1
- # Conventions — AI Instruction Files
2
-
3
- ## Rule: every subfolder that contains AI-readable instructions must have its own CLAUDE.md
4
-
5
- The root `.ai-assistance/CLAUDE.md` is the entry point only. It does not duplicate rules — it
6
- references subfolders. Each subfolder owns its own rules.
7
-
8
- ## Subfolder registry
9
-
10
- | Folder | CLAUDE.md purpose |
11
- |--------|-------------------|
12
- | `.ai-assistance/` | Startup sequence, env detection, delegation rule |
13
- | `.ai-assistance/bridge/` | Bridge protocol: file format, task lifecycle, who processes what |
14
- | `.ai-assistance/capabilities/` | How to read/update capability and connector files |
15
- | `.ai-assistance/conventions/` | This file — rules for instruction file structure |
16
- | `.ai-assistance/scripts/` | Index of scripts, when to call each, expected I/O |
17
-
18
- ## Rules for adding new subfolders
19
-
20
- 1. Create the folder
21
- 2. Add a `CLAUDE.md` describing its purpose and any rules specific to it
22
- 3. Register it in this file (the table above)
23
- 4. Reference it from the root `.ai-assistance/CLAUDE.md` if startup behaviour is needed
24
-
25
- ## Rules for CLAUDE.md files
26
-
27
- - Be explicit, not implicit — assume the reading agent has no prior context
28
- - No cross-referencing rules from memory — link to the file
29
- - Keep each CLAUDE.md focused on its folder only
30
- - Date-stamp any assumptions so the capabilities-check agent can identify stale content
@@ -1,199 +0,0 @@
1
- # Code Working Tree Protocol
2
-
3
- When Claude Code needs to make changes to files **outside** `bridge/inbox/`, it must
4
- follow this protocol. This prevents Code's changes from mixing with in-progress CoWork
5
- edits and ensures a clean, traceable commit history.
6
-
7
- ---
8
-
9
- ## When this applies
10
-
11
- Any time Code intends to modify files in the working tree that are not bridge task files
12
- (i.e., not `.ai-assistance/bridge/inbox/` or `.ai-assistance/bridge/outbox/`).
13
-
14
- This includes: editing source files, updating documentation, changing scripts,
15
- modifying capabilities files, etc.
16
-
17
- ---
18
-
19
- ## Protocol
20
-
21
- ### 0. Check for a lock
22
-
23
- ```bash
24
- cat .ai-assistance/bridge/LOCK 2>/dev/null || echo "NO_LOCK"
25
- ```
26
-
27
- - **No lock:** proceed to step 1
28
- - **Lock exists, EXPIRES is in the future:** stop. Tell the user:
29
- > "Working tree is locked by [AGENT] ([USER]) since [ACQUIRED], working on: [INTENT].
30
- > Expires at [EXPIRES]. Please wait or check if the other session is still active."
31
- - **Lock exists, EXPIRES is in the past:** stale lock — safe to overwrite, proceed to step 1
32
-
33
- ---
34
-
35
- ### 1. Acquire the lock
36
-
37
- Write `.ai-assistance/bridge/LOCK` with full watermark:
38
-
39
- ```
40
- AGENT: code
41
- USER: [git config user.name, lowercased]
42
- ACQUIRED: [ISO 8601 now]
43
- EXPIRES: [ISO 8601 now + 30 minutes]
44
- INTENT: [one sentence — what you are about to change and why]
45
- FILES: [comma-separated list of files you plan to modify]
46
- ```
47
-
48
- Example:
49
- ```
50
- AGENT: code
51
- USER: oscar
52
- ACQUIRED: 2026-06-04T10:00:00Z
53
- EXPIRES: 2026-06-04T10:30:00Z
54
- INTENT: Update gitlab-mcp.md with new PAT scopes and rotation info
55
- FILES: .ai-assistance/integrations/gitlab-mcp.md
56
- ```
57
-
58
- ---
59
-
60
- ### 2. Check for unstaged changes that overlap with your planned files
61
-
62
- ```bash
63
- git status --short
64
- ```
65
-
66
- If the working tree is clean, skip to step 3.
67
-
68
- If there are unstaged/staged changes, compare them against the files listed in your LOCK:
69
-
70
- ```bash
71
- git diff --name-only HEAD
72
- git diff --cached --name-only
73
- ```
74
-
75
- - **No overlap with your FILES:** proceed — the changes are unrelated and won't pollute history
76
- - **Overlap with one or more of your FILES:** commit the unstaged changes first.
77
- Derive the commit message by running `git diff HEAD` on the overlapping files and
78
- writing a short imperative summary of what actually changed — do not use a generic
79
- message. Format: `wip: <what changed, e.g. "rename .claude to .ai-assistance across scripts">`
80
-
81
- ```bash
82
- git add -A
83
- git commit -m "wip: <derived from actual diff>"
84
- ```
85
-
86
- This keeps Code's subsequent commit clean and ensures both sets of changes build
87
- on the correct base. On a feature branch, `wip:` commits are fine — squash before MR.
88
-
89
- ---
90
-
91
- ### 3. Apply your changes
92
-
93
- Make the intended file edits. Stay within the scope declared in INTENT and FILES
94
- when you acquired the lock. If scope expands, update the LOCK file before proceeding.
95
-
96
- ---
97
-
98
- ### 4. Commit your changes
99
-
100
- ```bash
101
- git add -A
102
- git commit -m "[descriptive message — what Code changed and why]"
103
- ```
104
-
105
- Commit message should be specific enough that a teammate can understand the change
106
- without reading the diff. Example:
107
- ```
108
- docs: update gitlab-mcp.md scopes and rotation info for new PAT (April 2027 expiry)
109
- ```
110
-
111
- **Commit authorship — developer only by default:**
112
-
113
- Commits are authored by the developer alone (git's `user.name` / `user.email` config).
114
- Do NOT add `Co-Authored-By: Claude ...` to commit messages unless the developer
115
- explicitly requests it.
116
-
117
- Rationale: the commit history is the developer's professional record. Co-authorship is
118
- opt-in, not opt-out. If the developer wants to attribute AI involvement, they can add
119
- it themselves or ask Claude to include it for a specific commit.
120
-
121
- Before adding any co-authorship attribution, ask:
122
- > "Would you like to add AI co-authorship to this commit, or keep it as your commit alone?"
123
-
124
- Default answer if not asked: **developer only**.
125
-
126
- ---
127
-
128
- ### 5. Release the lock
129
-
130
- ```bash
131
- rm .ai-assistance/bridge/LOCK
132
- ```
133
-
134
- ---
135
-
136
- ## External-fork branch protocol
137
-
138
- When the task involves a **fork of an external gem** (not team-managed), an extra check
139
- applies **before step 1** above:
140
-
141
- 1. Look up the gem in `.ai-assistance/code/dependencies.md`.
142
- 2. Read the `Git workflow` row. If it says **"ALWAYS use a feature branch"** or
143
- **"upstream-contribution only"**, you MUST:
144
- - Create a dedicated feature/fix branch (e.g. `feature/<description>`) — NEVER commit to `master`.
145
- - If the branch name was not specified by the developer, derive one from the work and
146
- **tell the developer what branch you created** before committing anything.
147
- 3. If the `Git workflow` row is absent or ambiguous, **ask the developer** which branch
148
- to use before proceeding. Do not guess.
149
-
150
- This rule applies even inside background agents — the branch strategy must be resolved
151
- in the prompt given to the agent, not inferred at runtime.
152
-
153
- **Why:** Commits on `master` of an external fork pollute the base from which upstream
154
- PRs are diffed. A feature branch produces a clean, reviewable diff against upstream's
155
- `master`.
156
-
157
- ---
158
-
159
- ## Quick reference
160
-
161
- ```bash
162
- # 0. Check lock
163
- cat .ai-assistance/bridge/LOCK 2>/dev/null || echo "NO_LOCK"
164
-
165
- # 1. Acquire lock
166
- cat > .ai-assistance/bridge/LOCK << EOF
167
- AGENT: code
168
- USER: oscar
169
- ACQUIRED: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
170
- EXPIRES: $(date -u -d "+30 minutes" +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null || date -u -v+30M +"%Y-%m-%dT%H:%M:%SZ")
171
- INTENT: <what you are changing>
172
- FILES: <files>
173
- EOF
174
-
175
- # 2. Check for overlapping unstaged changes
176
- git diff --name-only HEAD && git diff --cached --name-only
177
- # If any of those files overlap with your planned FILES → commit them first:
178
- git add -A && git commit -m "wip: <description of CoWork's in-progress work>"
179
- # If no overlap → skip, proceed directly
180
-
181
- # 3. Apply changes
182
- # ... make edits ...
183
-
184
- # 4. Commit your changes
185
- git add -A && git commit -m "<descriptive message>"
186
-
187
- # 5. Release lock
188
- rm .ai-assistance/bridge/LOCK
189
- ```
190
-
191
- ---
192
-
193
- ## Notes
194
-
195
- - If Code crashes mid-protocol, the LOCK will expire naturally (30 min timeout)
196
- - The `wip:` commit prefix signals to teammates that this was an auto-committed
197
- in-progress state — safe to squash or amend later
198
- - This protocol does not apply to bridge task processing (reading inbox, writing outbox)
199
- — those are read/write of bridge files only and don't touch the working tree
@@ -1,42 +0,0 @@
1
- # .gitignore Rules for .ai-assistance/
2
-
3
- ## What stays local (never commit)
4
-
5
- | Pattern | Reason |
6
- |---------|--------|
7
- | `bridge/inbox/*.draft.md` | Work-in-progress tasks not ready to share |
8
- | `bridge/inbox/*.local.md` | Tasks intended only for local Code session |
9
- | `bridge/LOCK` | Working tree lock — local only, never committed |
10
- | `capabilities/.env` | Any credential or token file |
11
- | `scripts/*.env` | Script-level secrets |
12
- | `scripts/node_modules/` | Dependencies, not source |
13
-
14
- ## What gets committed
15
-
16
- Everything else under `.ai-assistance/` is committed. This includes:
17
-
18
- - All `CLAUDE.md` files
19
- - `bridge/inbox/[username]-[uuid]-[slug].md` — pushed tasks are intentionally shared
20
- - `bridge/outbox/` — completed results are shared
21
- - `bridge/archive/` — history is useful, keep it
22
- - `capabilities/*.md` — shared knowledge
23
- - `conventions/*.md` — shared rules
24
- - `scripts/*.sh`, `scripts/*.ts` — shared tooling
25
-
26
- ## Why archive/ is committed
27
-
28
- Completed task pairs in `archive/` are the audit trail of AI-assisted work.
29
- They answer: what did we ask, what did we get back, when. Keep them.
30
- Prune manually if the folder grows unwieldy.
31
-
32
- ## Gitignore entries (copy these to your project root .gitignore)
33
-
34
- ```
35
- # AI assistance — local-only files
36
- .ai-assistance/bridge/inbox/*.draft.md
37
- .ai-assistance/bridge/inbox/*.local.md
38
- .ai-assistance/bridge/LOCK
39
- .ai-assistance/capabilities/.env
40
- .ai-assistance/scripts/*.env
41
- .ai-assistance/scripts/node_modules/
42
- ```