ecoportal-api-graphql 1.3.5 → 1.3.9
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.
- checksums.yaml +4 -4
- data/.ai-assistance/bridge/CLAUDE.md +338 -0
- data/.ai-assistance/bridge/archive/.gitkeep +0 -0
- data/.ai-assistance/bridge/archive/oscar-a1b2c3d-gitlab-mcp-doc-update.inbox.md +29 -0
- data/.ai-assistance/bridge/archive/oscar-a1b2c3d-gitlab-mcp-doc-update.outbox.md +18 -0
- data/.ai-assistance/bridge/archive/oscar-c912c25-gemini-design-review.inbox.md +42 -0
- data/.ai-assistance/bridge/archive/oscar-c912c25-gemini-design-review.outbox.md +115 -0
- data/.ai-assistance/bridge/context/gemini-review-prompt.txt +48 -0
- data/.ai-assistance/bridge/context/gemini-review-response.md +104 -0
- data/.ai-assistance/bridge/context/project.md +42 -0
- data/.ai-assistance/bridge/inbox/.gitkeep +0 -0
- data/.ai-assistance/bridge/outbox/.gitkeep +0 -0
- data/.ai-assistance/bridge/outbox/request-for-standards-discovery.md +48 -0
- data/.ai-assistance/bridge/queue/.gitkeep +1 -0
- data/.ai-assistance/capabilities/CLAUDE.md +27 -0
- data/.ai-assistance/capabilities/assumptions-log.md +80 -0
- data/.ai-assistance/capabilities/code.md +47 -0
- data/.ai-assistance/capabilities/connectors.md +37 -0
- data/.ai-assistance/capabilities/cowork.md +55 -0
- data/.ai-assistance/code/OVERVIEW.md +155 -0
- data/.ai-assistance/code/data_fields.md +242 -0
- data/.ai-assistance/code/dependencies.md +151 -0
- data/.ai-assistance/code/diff_as_input.md +234 -0
- data/.ai-assistance/code/diff_service_deep_dive.md +192 -0
- data/.ai-assistance/code/ecoPortal_architecture/00_overview_and_index.md +55 -0
- data/.ai-assistance/code/ecoPortal_architecture/01_terminology_dictionary.md +181 -0
- data/.ai-assistance/code/ecoPortal_architecture/02_data_model.md +192 -0
- data/.ai-assistance/code/ecoPortal_architecture/03_api_layers.md +147 -0
- data/.ai-assistance/code/ecoPortal_architecture/04_graphql_queries_mutations.md +277 -0
- data/.ai-assistance/code/ecoPortal_architecture/05_page_workflows.md +200 -0
- data/.ai-assistance/code/ecoPortal_architecture/06_search_and_filters.md +228 -0
- data/.ai-assistance/code/ecoPortal_architecture/07_data_fields.md +197 -0
- data/.ai-assistance/code/ecoPortal_architecture/08_stages_sections.md +243 -0
- data/.ai-assistance/code/ecoPortal_architecture/09_people_contractors_locations.md +196 -0
- data/.ai-assistance/code/ecoPortal_architecture/10_forces_workflow_builder.md +132 -0
- data/.ai-assistance/code/ecoPortal_architecture/11_integration_gems.md +187 -0
- data/.ai-assistance/code/ecoPortal_architecture/12_ai_documentation_sources_gaps.md +236 -0
- data/.ai-assistance/code/ecoPortal_architecture/13_ai_infrastructure.md +183 -0
- data/.ai-assistance/code/ecoportal_schema_reference.md +240 -0
- data/.ai-assistance/code/graphql_domain_knowledge.md +230 -0
- data/.ai-assistance/code/refactoring/datafield-readwrite-shape-asymmetry.md +71 -0
- data/.ai-assistance/code/refactoring/opportunities.md +251 -0
- data/.ai-assistance/code/schema_analysis.md +321 -0
- data/.ai-assistance/code/search_filters.md +868 -0
- data/.ai-assistance/code/spec_coverage.md +73 -0
- data/.ai-assistance/code/workflow-command-guide.md +438 -0
- data/.ai-assistance/code/workflow-space.md +353 -0
- data/.ai-assistance/conventions/CLAUDE.md +30 -0
- data/.ai-assistance/conventions/code-working-tree-protocol.md +199 -0
- data/.ai-assistance/conventions/gitignore-rules.md +42 -0
- data/.ai-assistance/conventions/permission-guidance.md +120 -0
- data/.ai-assistance/integrations/README.md +70 -0
- data/.ai-assistance/integrations/gitkraken-mcp.md +107 -0
- data/.ai-assistance/integrations/gitlab-mcp.md +123 -0
- data/.ai-assistance/integrations/local-git.md +60 -0
- data/.ai-assistance/local_paths.example.md +17 -0
- data/.ai-assistance/projects/TODO.md +97 -0
- data/.ai-assistance/projects/api-v2-to-graphql-migration/DECISIONS.md +168 -0
- data/.ai-assistance/projects/api-v2-to-graphql-migration/INTENT.md +60 -0
- data/.ai-assistance/projects/api-v2-to-graphql-migration/TODO.md +267 -0
- data/.ai-assistance/projects/api-v2-to-graphql-migration/UPSTREAM.md +53 -0
- data/.ai-assistance/projects/api-v2-to-graphql-migration/notes/csv-template-pipeline-design.md +102 -0
- data/.ai-assistance/projects/api-v2-to-graphql-migration/notes/cutover-usecase-gap-audit.md +139 -0
- data/.ai-assistance/projects/dynamic-model-generation/INTENT.md +93 -0
- data/.ai-assistance/projects/eco-helpers-compat/INTENT.md +244 -0
- data/.ai-assistance/projects/eco-helpers-compat/MIGRATION_GUIDE.md +266 -0
- data/.ai-assistance/projects/eco-helpers-compat/TODO.md +86 -0
- data/.ai-assistance/projects/ecoportal-api-v2-doublemodel-review/INTENT.md +101 -0
- data/.ai-assistance/projects/graphql-agent/GAP_ANALYSIS.md +177 -0
- data/.ai-assistance/projects/ooze-graphql-native-migration/DECISIONS.md +161 -0
- data/.ai-assistance/projects/ooze-graphql-native-migration/INTENT.md +125 -0
- data/.ai-assistance/projects/ooze-graphql-native-migration/RISKS.md +126 -0
- data/.ai-assistance/projects/ooze-graphql-native-migration/TODO.md +256 -0
- data/.ai-assistance/projects/ooze-graphql-native-migration/analysis/2026-06-30-cutover-workflow-deep-review.md +122 -0
- data/.ai-assistance/projects/ooze-graphql-native-migration/analysis/2026-07-01-forces-via-workflow-commands-miss-rca.md +148 -0
- data/.ai-assistance/projects/page-model/DECISIONS.md +245 -0
- data/.ai-assistance/projects/page-model/TODO.md +190 -0
- data/.ai-assistance/projects/search-filter-builder/INTENT.md +107 -0
- data/.ai-assistance/projects/search-filter-builder/TODO.md +131 -0
- data/.ai-assistance/projects/template-maintenance/DESIGN.md +134 -0
- data/.ai-assistance/projects/workflow-space/TODO.md +213 -0
- data/.ai-assistance/reinstall-claude-desktop-windows.md +136 -0
- data/.ai-assistance/scripts/CLAUDE.md +150 -0
- data/.ai-assistance/scripts/bridge-init.sh +86 -0
- data/.ai-assistance/scripts/bridge-status.sh +44 -0
- data/.ai-assistance/scripts/capabilities-check.ts +104 -0
- data/.ai-assistance/scripts/check-outbox.sh +43 -0
- data/.ai-assistance/scripts/dep_graph.rb +91 -0
- data/.ai-assistance/scripts/lock-acquire.sh +103 -0
- data/.ai-assistance/scripts/lock-multi.sh +124 -0
- data/.ai-assistance/scripts/lock-queue.sh +94 -0
- data/.ai-assistance/scripts/setup-mcps.test.ts +188 -0
- data/.ai-assistance/scripts/setup-mcps.ts +234 -0
- data/.ai-assistance/scripts/task-complete.ts +74 -0
- data/.ai-assistance/scripts/task-create.ts +75 -0
- data/.ai-assistance/scripts/task-read.ts +125 -0
- data/.ai-assistance/scripts/token-logger.js +220 -0
- data/.ai-assistance/scripts/token-report.ts +158 -0
- data/.ai-assistance/scripts/token-session-start.js +66 -0
- data/.ai-assistance/skills/ai-instructions/SKILL.md +48 -0
- data/.ai-assistance/skills/code-specs/SKILL.md +69 -0
- data/.ai-assistance/skills/corporate-policies/SKILL.md +201 -0
- data/.ai-assistance/skills/dep-graph/SKILL.md +139 -0
- data/.ai-assistance/skills/ep-ai-manager/SKILL.md +417 -0
- data/.ai-assistance/skills/gemini-assist/SKILL.md +63 -0
- data/.ai-assistance/skills/gemini-assist/gemini-mcp-server.js +205 -0
- data/.ai-assistance/skills/gemini-assist/gemini_ask.py +1 -0
- data/.ai-assistance/skills/gemini-assist/gemini_ask.rb +240 -0
- data/.ai-assistance/skills/gemini-assist/prompts/cycle_end_review.txt +25 -0
- data/.ai-assistance/skills/graphql-schema-analysis/SKILL.md +261 -0
- data/.ai-assistance/skills/project-cycle/SKILL.md +177 -0
- data/.ai-assistance/skills/refactor/SKILL.md +62 -0
- data/.ai-assistance/skills/rubocop/SKILL.md +93 -0
- data/.ai-assistance/skills/ruby-scripting/SKILL.md +215 -0
- data/.ai-assistance/skills/spec-generation/SKILL.md +72 -0
- data/.ai-assistance/standards-version.json +21 -0
- data/.ai-assistance/token-budget.json +32 -0
- data/.ai-assistance/version.json +39 -0
- data/.claude/settings.json +146 -0
- data/.env.example +18 -0
- data/.gitattributes +15 -0
- data/.gitignore +13 -0
- data/.rubocop.yml +121 -97
- data/CHANGELOG.md +673 -477
- data/CLAUDE.md +232 -0
- data/Gemfile +30 -6
- data/Rakefile +90 -38
- data/docs/worklog.md +574 -0
- data/ecoportal-api-graphql.gemspec +40 -40
- data/lib/ecoportal/api/common/graphql/CLAUDE.md +36 -0
- data/lib/ecoportal/api/common/graphql/client.rb +1 -1
- data/lib/ecoportal/api/common/graphql/http_client.rb +35 -3
- data/lib/ecoportal/api/common/graphql/model/CLAUDE.md +28 -0
- data/lib/ecoportal/api/common/graphql/model/as_input.rb +8 -5
- data/lib/ecoportal/api/common/graphql/model/diffable/classic_diff_service.rb +3 -1
- data/lib/ecoportal/api/common/graphql/model/diffable/diff_service.rb +31 -23
- data/lib/ecoportal/api/common/graphql/model/diffable/hash_diff_nesting.rb +54 -1
- data/lib/ecoportal/api/graphql/CLAUDE.md +37 -0
- data/lib/ecoportal/api/graphql/base/CLAUDE.md +50 -0
- data/lib/ecoportal/api/graphql/base/ai_summary_version.rb +17 -0
- data/lib/ecoportal/api/graphql/base/delta_result.rb +16 -0
- data/lib/ecoportal/api/graphql/base/force/binding.rb +19 -0
- data/lib/ecoportal/api/graphql/base/force/binding_collection.rb +62 -0
- data/lib/ecoportal/api/graphql/base/force/collection.rb +47 -0
- data/lib/ecoportal/api/graphql/base/force.rb +65 -0
- data/lib/ecoportal/api/graphql/base/kickstand/job.rb +17 -0
- data/lib/ecoportal/api/graphql/base/kickstand/workflow.rb +18 -0
- data/lib/ecoportal/api/graphql/base/kickstand.rb +13 -0
- data/lib/ecoportal/api/graphql/base/page/basic.rb +38 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/actions_list.rb +9 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/ai_summary.rb +18 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/checklist.rb +29 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/collection.rb +112 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/contractor_entities.rb +28 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/cross_reference.rb +54 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/date_field.rb +23 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/file_field.rb +25 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/gauge.rb +19 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/geo.rb +24 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/image_gallery.rb +24 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/law.rb +8 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/mailbox.rb +9 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/number.rb +20 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/people.rb +35 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/plain_text.rb +17 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/rich_text.rb +26 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/select.rb +41 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/signature.rb +9 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/smart_fill.rb +17 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/table.rb +9 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/tag_field.rb +21 -0
- data/lib/ecoportal/api/graphql/base/page/data_field.rb +137 -12
- data/lib/ecoportal/api/graphql/base/page/phased/stage.rb +68 -14
- data/lib/ecoportal/api/graphql/base/page/phased.rb +1 -0
- data/lib/ecoportal/api/graphql/base/page/section.rb +36 -0
- data/lib/ecoportal/api/graphql/base/page/section_collection.rb +79 -0
- data/lib/ecoportal/api/graphql/base/page.rb +2 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/action_type_selection.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/callback_type.rb +28 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/command_change.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/command_change_message.rb +15 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/command_es_change.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/command_interface.rb +36 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/email_config.rb +18 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/escalation_level.rb +19 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/in_system_config.rb +16 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/mailbox_field_selection.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/operation_interface.rb +39 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/operations/assign_to.rb +27 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/operations/create_page.rb +21 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/operations/send_notification.rb +30 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/people_field_selection.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/recipient_config.rb +34 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/register_field.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/task_config_selection.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/time_delay_config.rb +16 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/trigger_interface.rb +26 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/triggers/conditional_logic.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/user_selection.rb +16 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow.rb +35 -0
- data/lib/ecoportal/api/graphql/base/preset_view.rb +17 -0
- data/lib/ecoportal/api/graphql/base/preview_page.rb +23 -0
- data/lib/ecoportal/api/graphql/base/register.rb +18 -0
- data/lib/ecoportal/api/graphql/base.rb +11 -0
- data/lib/ecoportal/api/graphql/builder/CLAUDE.md +65 -0
- data/lib/ecoportal/api/graphql/builder/kickstand.rb +73 -0
- data/lib/ecoportal/api/graphql/builder/page.rb +210 -41
- data/lib/ecoportal/api/graphql/builder/register/preset_view.rb +84 -0
- data/lib/ecoportal/api/graphql/builder/register.rb +27 -19
- data/lib/ecoportal/api/graphql/builder/template.rb +80 -0
- data/lib/ecoportal/api/graphql/builder.rb +2 -0
- data/lib/ecoportal/api/graphql/compat/filter_translator.rb +107 -0
- data/lib/ecoportal/api/graphql/compat/page_reference.rb +23 -0
- data/lib/ecoportal/api/graphql/compat/pages.rb +212 -0
- data/lib/ecoportal/api/graphql/compat/registers.rb +84 -0
- data/lib/ecoportal/api/graphql/compat/response.rb +35 -0
- data/lib/ecoportal/api/graphql/compat/search_results.rb +33 -0
- data/lib/ecoportal/api/graphql/compat/stage_collection.rb +70 -0
- data/lib/ecoportal/api/graphql/compat/stage_view.rb +76 -0
- data/lib/ecoportal/api/graphql/compat.rb +17 -0
- data/lib/ecoportal/api/graphql/concerns/data_field_access.rb +71 -0
- data/lib/ecoportal/api/graphql/concerns/deprecation.rb +20 -0
- data/lib/ecoportal/api/graphql/concerns/fragment_definitions.rb +21 -28
- data/lib/ecoportal/api/graphql/concerns/page_compat.rb +51 -0
- data/lib/ecoportal/api/graphql/concerns/snake_camel_access.rb +60 -0
- data/lib/ecoportal/api/graphql/concerns.rb +4 -0
- data/lib/ecoportal/api/graphql/connection/page.rb +11 -0
- data/lib/ecoportal/api/graphql/connection/pages_workflow_command.rb +13 -0
- data/lib/ecoportal/api/graphql/connection/preset_view.rb +11 -0
- data/lib/ecoportal/api/graphql/connection/preview_page.rb +11 -0
- data/lib/ecoportal/api/graphql/connection.rb +4 -0
- data/lib/ecoportal/api/graphql/file_upload/client.rb +181 -0
- data/lib/ecoportal/api/graphql/file_upload.rb +10 -0
- data/lib/ecoportal/api/graphql/fragment/action.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/action_category.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/contractor_entity.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/force.rb +30 -0
- data/lib/ecoportal/api/graphql/fragment/location_draft.rb +2 -2
- data/lib/ecoportal/api/graphql/fragment/location_node.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/locations_error.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/page.rb +85 -0
- data/lib/ecoportal/api/graphql/fragment/pages/common_page_union.rb +395 -0
- data/lib/ecoportal/api/graphql/fragment/pages.rb +15 -0
- data/lib/ecoportal/api/graphql/fragment/pages_workflow.rb +172 -0
- data/lib/ecoportal/api/graphql/fragment/pagination.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment.rb +37 -27
- data/lib/ecoportal/api/graphql/input/contractor_entity/update.rb +25 -0
- data/lib/ecoportal/api/graphql/input/delta_input.rb +16 -0
- data/lib/ecoportal/api/graphql/input/page/archive.rb +14 -0
- data/lib/ecoportal/api/graphql/input/page/build_from_template.rb +13 -0
- data/lib/ecoportal/api/graphql/input/page/create_draft.rb +13 -0
- data/lib/ecoportal/api/graphql/input/page/create_from_template.rb +18 -0
- data/lib/ecoportal/api/graphql/input/page/delete_draft.rb +13 -0
- data/lib/ecoportal/api/graphql/input/page/publish_draft.rb +13 -0
- data/lib/ecoportal/api/graphql/input/page/review_task.rb +14 -0
- data/lib/ecoportal/api/graphql/input/page/unarchive.rb +14 -0
- data/lib/ecoportal/api/graphql/input/page/update.rb +140 -0
- data/lib/ecoportal/api/graphql/input/page.rb +26 -0
- data/lib/ecoportal/api/graphql/input/preset_view/create.rb +18 -0
- data/lib/ecoportal/api/graphql/input/preset_view/permission.rb +16 -0
- data/lib/ecoportal/api/graphql/input/preset_view/update.rb +16 -0
- data/lib/ecoportal/api/graphql/input/preset_view.rb +14 -0
- data/lib/ecoportal/api/graphql/input/register/create.rb +18 -0
- data/lib/ecoportal/api/graphql/input/register/update.rb +15 -0
- data/lib/ecoportal/api/graphql/input/register.rb +13 -0
- data/lib/ecoportal/api/graphql/input/search_conf/ai_generator.rb +234 -0
- data/lib/ecoportal/api/graphql/input/search_conf.rb +367 -0
- data/lib/ecoportal/api/graphql/input/variable_binding.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_action_tag.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_binding.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_comment_tagging_user_group.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_default_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_default_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_field.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_force.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_gauge_field_stop.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_linked_field_config.rb +23 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_linked_helper.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_operation.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_operation_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_operation_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_action_type.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_filter.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_people_field.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_task_config.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_scheduled_callback.rb +23 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_scheduled_callback_action.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_select_field_option.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_stage.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_stage_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_stage_tag.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_task.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_task_assignment_user_group.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_workflow_callback.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/collapse_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_binding.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_creator_permissions.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_default_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_field_configuration.rb +21 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_force.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_gauge_field_stop.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_linked_field_config.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_linked_helper.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_operation.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_operation_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_page.rb +28 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_page_creator_permissions.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_reminder.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_required_sign_offs.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_restrict_comment_tagging.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_restrict_task_assignment.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_scheduled_callback.rb +22 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_section_header.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_select_field_option.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_stage.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_task_due.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_trigger.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/expand_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/contractor_entities.rb +24 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/cross_reference.rb +23 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/date.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/gauge.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/image_gallery.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/location_field.rb +24 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/people.rb +24 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/plain_text.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/rich_text.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/select.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/signature.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/table.rb +25 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/move_field.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/move_stage.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_action_tag.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_binding.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_callback.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_comment_tagging_user_group.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_default_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_default_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_field.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_force.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_gauge_field_stop.rb +17 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_linked_field_config.rb +17 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_linked_helper.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_operation.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_operation_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_operation_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_action_type.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_filter.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_people_field.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_task_config.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_scheduled_callback.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_select_field_option.rb +17 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_stage.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_stage_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_stage_tag.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task_assignment_user_group.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task_due.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task_priority_level.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/reorder_forces.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/reorder_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command.rb +251 -0
- data/lib/ecoportal/api/graphql/input.rb +8 -0
- data/lib/ecoportal/api/graphql/interface/base_page.rb +100 -58
- data/lib/ecoportal/api/graphql/interface/location_structure/nodes.rb +27 -28
- data/lib/ecoportal/api/graphql/logic/base_model.rb +2 -0
- data/lib/ecoportal/api/graphql/logic/base_query.rb +45 -2
- data/lib/ecoportal/api/graphql/logic/input.rb +15 -0
- data/lib/ecoportal/api/graphql/model/ai_summary_version.rb +10 -0
- data/lib/ecoportal/api/graphql/model/organization.rb +65 -55
- data/lib/ecoportal/api/graphql/model/page/basic.rb +14 -0
- data/lib/ecoportal/api/graphql/model/page/phased.rb +82 -20
- data/lib/ecoportal/api/graphql/model/page.rb +1 -0
- data/lib/ecoportal/api/graphql/model/page_union.rb +21 -0
- data/lib/ecoportal/api/graphql/model/pages_workflow.rb +20 -0
- data/lib/ecoportal/api/graphql/model/preset_view.rb +10 -0
- data/lib/ecoportal/api/graphql/model/preview_page.rb +10 -0
- data/lib/ecoportal/api/graphql/model/register.rb +10 -0
- data/lib/ecoportal/api/graphql/model.rb +8 -0
- data/lib/ecoportal/api/graphql/mutation/ai_summary/generate.rb +45 -0
- data/lib/ecoportal/api/graphql/mutation/ai_summary/submit_feedback.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/ai_summary.rb +13 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/bulk_update_jobs.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/bulk_update_workflows.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/fail_job.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/fail_workflow.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/start_job.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/start_workflow.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/stop_workflow.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand.rb +18 -0
- data/lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb +3 -3
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/add_commands.rb +2 -2
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/create.rb +2 -2
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/drop_bad_commands.rb +3 -3
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/publish.rb +3 -3
- data/lib/ecoportal/api/graphql/mutation/page/approve_review_task.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/archive.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/batch_update_review_task.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/build_from_template.rb +50 -0
- data/lib/ecoportal/api/graphql/mutation/page/create_draft.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/create_from_template.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/page/delete_draft.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/execute_force_commands.rb +69 -0
- data/lib/ecoportal/api/graphql/mutation/page/execute_workflow_commands.rb +51 -0
- data/lib/ecoportal/api/graphql/mutation/page/publish_draft.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/reject_review_task.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/restart_review_task.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/unarchive.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/undo_review_task.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/update.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/update_variable_bindings.rb +44 -0
- data/lib/ecoportal/api/graphql/mutation/page.rb +28 -0
- data/lib/ecoportal/api/graphql/mutation/preset_view/create.rb +35 -0
- data/lib/ecoportal/api/graphql/mutation/preset_view/destroy.rb +35 -0
- data/lib/ecoportal/api/graphql/mutation/preset_view/permission.rb +37 -0
- data/lib/ecoportal/api/graphql/mutation/preset_view/update.rb +35 -0
- data/lib/ecoportal/api/graphql/mutation/preset_view.rb +15 -0
- data/lib/ecoportal/api/graphql/mutation/register/create.rb +35 -0
- data/lib/ecoportal/api/graphql/mutation/register/destroy.rb +35 -0
- data/lib/ecoportal/api/graphql/mutation/register/update.rb +35 -0
- data/lib/ecoportal/api/graphql/mutation/register.rb +14 -0
- data/lib/ecoportal/api/graphql/mutation/smart_fill/generate.rb +36 -0
- data/lib/ecoportal/api/graphql/mutation/smart_fill/submit_feedback.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/smart_fill.rb +13 -0
- data/lib/ecoportal/api/graphql/mutation/template/create.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/template/create_related_page.rb +46 -0
- data/lib/ecoportal/api/graphql/mutation/template/destroy_related_page.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/template/publish.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/template/unpublish.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/template/update.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/template/update_information.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/template.rb +18 -0
- data/lib/ecoportal/api/graphql/mutation.rb +8 -0
- data/lib/ecoportal/api/graphql/payload/ai_summary_generate.rb +12 -0
- data/lib/ecoportal/api/graphql/payload/execute_workflow_commands.rb +36 -0
- data/lib/ecoportal/api/graphql/payload/force_commands.rb +31 -0
- data/lib/ecoportal/api/graphql/payload/kickstand/bulk_update_jobs.rb +36 -0
- data/lib/ecoportal/api/graphql/payload/kickstand/bulk_update_workflows.rb +36 -0
- data/lib/ecoportal/api/graphql/payload/kickstand/job.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/kickstand/workflow.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/kickstand.rb +15 -0
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/create.rb +33 -34
- data/lib/ecoportal/api/graphql/payload/ok_payload.rb +21 -0
- data/lib/ecoportal/api/graphql/payload/page/archive.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/build_from_template.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/create_from_template.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/draft.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/review_task.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/unarchive.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/update.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/update_variable_bindings.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page.rb +19 -0
- data/lib/ecoportal/api/graphql/payload/preset_view.rb +11 -0
- data/lib/ecoportal/api/graphql/payload/register.rb +11 -0
- data/lib/ecoportal/api/graphql/payload/template/create.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/create_related_page.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/destroy_related_page.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/publish.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/unpublish.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/update.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/update_information.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template.rb +18 -0
- data/lib/ecoportal/api/graphql/payload.rb +11 -0
- data/lib/ecoportal/api/graphql/query/action.rb +1 -1
- data/lib/ecoportal/api/graphql/query/action_categories.rb +1 -1
- data/lib/ecoportal/api/graphql/query/actions.rb +2 -2
- data/lib/ecoportal/api/graphql/query/contractor_entities.rb +1 -1
- data/lib/ecoportal/api/graphql/query/file_upload_signature.rb +76 -0
- data/lib/ecoportal/api/graphql/query/location_structure/draft.rb +2 -2
- data/lib/ecoportal/api/graphql/query/location_structure.rb +1 -1
- data/lib/ecoportal/api/graphql/query/location_structures.rb +1 -1
- data/lib/ecoportal/api/graphql/query/page.rb +45 -0
- data/lib/ecoportal/api/graphql/query/page_delta.rb +47 -0
- data/lib/ecoportal/api/graphql/query/page_with_forces.rb +43 -0
- data/lib/ecoportal/api/graphql/query/pages.rb +59 -0
- data/lib/ecoportal/api/graphql/query/pages_workflow_commands.rb +59 -0
- data/lib/ecoportal/api/graphql/query/register_preset_views.rb +78 -0
- data/lib/ecoportal/api/graphql/query/register_preview_pages.rb +83 -0
- data/lib/ecoportal/api/graphql/query/templates.rb +53 -0
- data/lib/ecoportal/api/graphql/query.rb +11 -0
- data/lib/ecoportal/api/graphql.rb +60 -2
- data/lib/ecoportal/api/graphql_version.rb +5 -5
- data/scripts/auto-worker-scheduler.sh +386 -0
- data/tests/contractor_entity_create.rb +19 -19
- data/tests/contractor_entity_udpate.rb +20 -20
- data/tests/dump_page_model.rb +74 -0
- data/tests/loc_structure_get.rb +1 -2
- data/tests/loc_structure_update.rb +51 -51
- data/tests/loc_structures_get.rb +15 -15
- metadata +436 -5
|
@@ -0,0 +1,353 @@
|
|
|
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
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
|
@@ -0,0 +1,199 @@
|
|
|
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
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
```
|