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,177 @@
|
|
|
1
|
+
# SKILL: Project Preparation, Maintenance & Cycle
|
|
2
|
+
|
|
3
|
+
**Purpose:** Capture, organise, and track a development project from intent through completion, including upstream dependency decisions and cycle-end review.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
- A developer describes a new piece of work.
|
|
10
|
+
- Picking up an existing project after a gap.
|
|
11
|
+
- A cycle of changes is complete and needs a closing review.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Folder Structure
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
.ai-assistance/projects/<project-slug>/
|
|
19
|
+
INTENT.md What we're trying to achieve and why
|
|
20
|
+
TODO.md Ordered task list, ticked off as done
|
|
21
|
+
DECISIONS.md Key decisions made and why
|
|
22
|
+
UPSTREAM.md Upstream dependency changes needed (if any)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Project folders are **not git-ignored** — they should be committed so other developers can pick up context.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Starting a Project
|
|
30
|
+
|
|
31
|
+
1. Ask the developer: "What are we trying to change and why?"
|
|
32
|
+
2. Capture the answer in `INTENT.md` (see template below).
|
|
33
|
+
3. Present it back: "Here's my understanding — does this capture it?" Iterate until confirmed.
|
|
34
|
+
4. Break the intent into an ordered TODO list in `TODO.md`.
|
|
35
|
+
5. If upstream deps are involved, create `UPSTREAM.md` and present options (patch, fork, new version).
|
|
36
|
+
|
|
37
|
+
### INTENT.md template
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
# Project: <Name>
|
|
41
|
+
|
|
42
|
+
**Created:** YYYY-MM-DD
|
|
43
|
+
**Status:** [active | paused | complete]
|
|
44
|
+
**Branch:** feature/<slug>
|
|
45
|
+
**Target branch:** main
|
|
46
|
+
|
|
47
|
+
## Goal
|
|
48
|
+
One paragraph: what we want to achieve.
|
|
49
|
+
|
|
50
|
+
## Motivation
|
|
51
|
+
Why now? What problem does this solve?
|
|
52
|
+
|
|
53
|
+
## Scope
|
|
54
|
+
What's in scope. What's explicitly out of scope.
|
|
55
|
+
|
|
56
|
+
## Success Criteria
|
|
57
|
+
How we'll know it's done.
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## TODO.md format
|
|
63
|
+
|
|
64
|
+
```markdown
|
|
65
|
+
# TODOs — <Project Name>
|
|
66
|
+
|
|
67
|
+
- [ ] Task description <!-- add detail as needed -->
|
|
68
|
+
- [x] Completed task
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Tick items off as they're completed. Never delete items — the history matters.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## DECISIONS.md format
|
|
76
|
+
|
|
77
|
+
```markdown
|
|
78
|
+
# Decisions — <Project Name>
|
|
79
|
+
|
|
80
|
+
## [DATE] <Decision title>
|
|
81
|
+
|
|
82
|
+
**Context:** What made this decision necessary.
|
|
83
|
+
**Options considered:** Brief list.
|
|
84
|
+
**Decision:** What was chosen.
|
|
85
|
+
**Reason:** Why.
|
|
86
|
+
**Consequences:** What this means going forward.
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Session Start — Git Orientation (Always Do This)
|
|
92
|
+
|
|
93
|
+
Before any other work, run:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# 1. Confirm current branch
|
|
97
|
+
git branch --show-current
|
|
98
|
+
|
|
99
|
+
# 2. Check how far ahead of target branch
|
|
100
|
+
git rev-list --count main..HEAD
|
|
101
|
+
|
|
102
|
+
# 3. Get a cheap summary of what's changed
|
|
103
|
+
git diff main...HEAD --stat
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Cross-reference the diff stat against the active project's `TODO.md`:
|
|
107
|
+
- Changed files should map to ticked TODO items.
|
|
108
|
+
- Unticked TODOs with no corresponding changed files = work not yet started.
|
|
109
|
+
- Changed files with no corresponding TODO = untracked work, worth noting.
|
|
110
|
+
|
|
111
|
+
If **GitKraken MCP** is connected, use it instead — it returns the same information as structured data without a bash call.
|
|
112
|
+
|
|
113
|
+
If the branch in `INTENT.md` doesn't match the current branch, flag it to the developer before proceeding.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Cycle-End Review
|
|
118
|
+
|
|
119
|
+
When all TODOs are ticked:
|
|
120
|
+
|
|
121
|
+
1. **Git summary:** Run `git diff main...HEAD --name-only` to get the exact file list.
|
|
122
|
+
2. **Gemini review:** Pass changed files to `gemini-assist` using the `cycle_end_review.txt` prompt:
|
|
123
|
+
```bash
|
|
124
|
+
ruby .ai-assistance/skills/gemini-assist/gemini_ask.rb \
|
|
125
|
+
--prompt-file .ai-assistance/skills/gemini-assist/prompts/cycle_end_review.txt \
|
|
126
|
+
--output .ai-assistance/projects/<slug>/gemini_review.txt \
|
|
127
|
+
--files $(git diff main...HEAD --name-only | tr '\n' ' ')
|
|
128
|
+
```
|
|
129
|
+
3. Review Gemini's output — verify each claim against actual code before acting.
|
|
130
|
+
4. Propose fixes for genuine issues — confirm with developer.
|
|
131
|
+
5. **If GitLab MCP is connected:** Check `get_merge_request_pipelines` to confirm CI is green.
|
|
132
|
+
6. Update `INTENT.md` status to `complete`.
|
|
133
|
+
7. Prompt: "Ready to open the MR / start the next project?"
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Upstream Dependency Changes
|
|
138
|
+
|
|
139
|
+
If changes require modifying an upstream gem:
|
|
140
|
+
|
|
141
|
+
Options (present all three to developer):
|
|
142
|
+
|
|
143
|
+
1. **Local patch** — monkey-patch from this gem. Fast, messy, temporary.
|
|
144
|
+
2. **Fork change** — commit to our fork (for `graphlient` or `graphql-client`). Appropriate for lasting fixes we own.
|
|
145
|
+
3. **New version** — for `ecoportal-api` or `ecoportal-api-v2` (team-owned), cut a new version. For external forks, optionally contribute back upstream.
|
|
146
|
+
|
|
147
|
+
Document the decision in `UPSTREAM.md` and `DECISIONS.md`.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Session / Collaborator Setup (First Time on a Machine)
|
|
152
|
+
|
|
153
|
+
When starting a session and `.ai-assistance/local_paths.md` does not exist, run this setup flow **before** any project work:
|
|
154
|
+
|
|
155
|
+
1. Tell the developer: "I don't see a `local_paths.md` for your machine yet. This helps me cross-reference upstream and downstream gem code without fetching from remotes every time."
|
|
156
|
+
|
|
157
|
+
2. For each dependency in the table below, ask: "Do you have `<gem>` cloned locally?"
|
|
158
|
+
|
|
159
|
+
| Gem | Remote |
|
|
160
|
+
|-----|--------|
|
|
161
|
+
| `ecoportal-api` | https://gitlab.ecoportal.co.nz/ecoportal/ecoportal-api.git |
|
|
162
|
+
| `ecoportal-api-v2` | https://gitlab.ecoportal.co.nz/oscar/ecoportal-api-v2.git |
|
|
163
|
+
| `graphlient` | https://github.com/rellampec/graphlient.git |
|
|
164
|
+
| `graphql-client` | https://github.com/rellampec/graphql-client.git |
|
|
165
|
+
| `eco-helpers` | https://gitlab.ecoportal.co.nz/oscar/script_api_helpers.git |
|
|
166
|
+
|
|
167
|
+
3. For each one they have locally:
|
|
168
|
+
- In **Cowork**: ask them to connect the folder (via the folder picker), then record the confirmed path.
|
|
169
|
+
- In **Claude Code**: ask them to provide the path, or run `find ~ -name "<gemspec>" -maxdepth 6 2>/dev/null` to locate it.
|
|
170
|
+
|
|
171
|
+
4. Once all available paths are collected, create `.ai-assistance/local_paths.md` from `.ai-assistance/local_paths.example.md`, filling in only the repos they confirmed.
|
|
172
|
+
|
|
173
|
+
5. Also ask: "Do you have GitKraken MCP or GitLab MCP set up?" — if not, point them to `.ai-assistance/integrations/`.
|
|
174
|
+
|
|
175
|
+
6. Confirm: "Done — I've saved your local paths. You can update `.ai-assistance/local_paths.md` any time if your setup changes."
|
|
176
|
+
|
|
177
|
+
If a developer doesn't have a repo locally and the task requires reading it, offer: "I can fetch the relevant files from the remote — just note it'll be slower. Want me to proceed that way?"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# SKILL: Refactor
|
|
2
|
+
|
|
3
|
+
**Purpose:** Identify, log, and (with developer confirmation) apply refactoring opportunities. Never apply changes without explicit confirmation.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
- You notice a structural issue while working on something else — log it, don't fix it silently.
|
|
10
|
+
- The developer asks for a refactor audit of an area.
|
|
11
|
+
- A cycle-end review surfaces cleanup opportunities.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Criteria for a Refactor Candidate
|
|
16
|
+
|
|
17
|
+
Flag something when it fails one or more of:
|
|
18
|
+
|
|
19
|
+
- **Understandability:** Is it clear what this does and why?
|
|
20
|
+
- **Dependency tracking:** Are dependencies implicit or tangled?
|
|
21
|
+
- **Separation of concerns:** Is this class/method doing more than one thing?
|
|
22
|
+
- **Simplicity:** Could this be simpler without losing correctness?
|
|
23
|
+
- **Alignment:** Does this match the conventions of the rest of the codebase?
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Log Format
|
|
28
|
+
|
|
29
|
+
Refactoring opportunities are logged in `.ai-assistance/code/refactoring/<area>.md`.
|
|
30
|
+
|
|
31
|
+
Each entry:
|
|
32
|
+
|
|
33
|
+
```markdown
|
|
34
|
+
## [SHORT-ID] <Title>
|
|
35
|
+
|
|
36
|
+
- **File(s):** `lib/ecoportal/...`
|
|
37
|
+
- **Type:** [extract_class | extract_method | rename | simplify | reorganise | other]
|
|
38
|
+
- **Priority:** [high | medium | low]
|
|
39
|
+
- **Status:** [open | confirmed | applied | dismissed]
|
|
40
|
+
- **Identified:** YYYY-MM-DD
|
|
41
|
+
|
|
42
|
+
**Observation:**
|
|
43
|
+
What the issue is, concisely.
|
|
44
|
+
|
|
45
|
+
**Proposed change:**
|
|
46
|
+
What you'd do to fix it. High-level — not code unless it's very short.
|
|
47
|
+
|
|
48
|
+
**Risk:**
|
|
49
|
+
Any backwards-compat or downstream risk if applied.
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Workflow
|
|
55
|
+
|
|
56
|
+
1. Identify opportunity → log it in the appropriate refactoring file.
|
|
57
|
+
2. Present a summary to the developer: "I've logged N refactoring opportunities in `.ai-assistance/code/refactoring/`. Want to review them?"
|
|
58
|
+
3. Developer confirms which ones to apply → mark as `confirmed`.
|
|
59
|
+
4. Apply one at a time, update specs if needed, mark as `applied`.
|
|
60
|
+
5. If dismissed by developer → mark as `dismissed` with a brief reason.
|
|
61
|
+
|
|
62
|
+
**Never apply a refactor without a `confirmed` status.**
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# SKILL: Rubocop & Spec Runner
|
|
2
|
+
|
|
3
|
+
**Purpose:** Run Rubocop on in-scope files and `rake spec`, then surface only actionable
|
|
4
|
+
offences. Use this continuously as new/modified files accumulate — not deferred to the end.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## When to Use
|
|
9
|
+
|
|
10
|
+
- After writing or modifying any Ruby file.
|
|
11
|
+
- Before committing a change.
|
|
12
|
+
- Any time TODO 6.1 says "rubocop clean on all new/modified files".
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Running Rubocop on Specific Files
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
bundle exec rubocop --format json <file1> [file2 ...] | \
|
|
20
|
+
ruby -rjson -e '
|
|
21
|
+
data = JSON.parse($stdin.read)
|
|
22
|
+
offences = data["files"].flat_map do |f|
|
|
23
|
+
f["offenses"].map { |o| { file: f["path"], **o.transform_keys(&:to_sym) } }
|
|
24
|
+
end
|
|
25
|
+
offences.reject! { |o| o[:cop_name].start_with?("Lint/RedundantCopDisableDirective") }
|
|
26
|
+
if offences.empty?
|
|
27
|
+
puts "No offences."
|
|
28
|
+
else
|
|
29
|
+
offences.each do |o|
|
|
30
|
+
puts "#{o[:file]}:#{o[:location][:line]}:#{o[:location][:column]} " \
|
|
31
|
+
"[#{o[:severity]}] #{o[:cop_name]} — #{o[:message]}"
|
|
32
|
+
end
|
|
33
|
+
puts "\n#{offences.size} offence(s)."
|
|
34
|
+
end
|
|
35
|
+
'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Key flags:**
|
|
39
|
+
- `--format json` — machine-parseable output, avoids ANSI noise.
|
|
40
|
+
- No `--autocorrect` here — apply corrections explicitly when needed (see below).
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Auto-correcting Safe Offences
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
bundle exec rubocop --autocorrect --format json <file1> [file2 ...]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Only use `--autocorrect` (not `--autocorrect-all`) to limit to safe cops.
|
|
51
|
+
Always re-read the file after correction and verify the diff is sensible.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Running the Full Suite
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
bundle exec rake spec
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Run after a meaningful unit of work is complete. Failures must be resolved before moving on.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Workflow
|
|
66
|
+
|
|
67
|
+
1. Write or edit a file.
|
|
68
|
+
2. Run rubocop on that file (command above).
|
|
69
|
+
3. Fix all reported offences (except those covered by existing `# rubocop:disable` comments — the
|
|
70
|
+
disable is intentional; do not remove it).
|
|
71
|
+
4. Re-run rubocop to confirm zero offences.
|
|
72
|
+
5. When a group of files is complete, run `rake spec` to confirm no regressions.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Rules
|
|
77
|
+
|
|
78
|
+
- **Do not second-guess `rubocop:disable` inline comments.** They are intentional suppressions
|
|
79
|
+
chosen by the developer or a previous agent. Leave them in place.
|
|
80
|
+
- **Do not add new `rubocop:disable` comments** unless the developer explicitly instructs it.
|
|
81
|
+
Fix the offence instead.
|
|
82
|
+
- **Surface every remaining offence** — do not filter by severity. Let the developer decide
|
|
83
|
+
what to defer.
|
|
84
|
+
- `Lint/RedundantCopDisableDirective` offences are suppressed in the output above because
|
|
85
|
+
they appear when a disable comment is no longer needed; rubocop handles their cleanup itself.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Linked TODOs
|
|
90
|
+
|
|
91
|
+
- **6.0** — This skill (done once built).
|
|
92
|
+
- **6.1** — Run continuously on all new/modified files throughout the migration.
|
|
93
|
+
- **6.2** — `rake spec` coverage for `HttpClient#execute`, `Fragment.assemble`, end-to-end query.
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ruby-scripting
|
|
3
|
+
version: 0.1.0
|
|
4
|
+
description: >
|
|
5
|
+
AI coding assistant guidelines for internal Ruby scripts that consume ecoPortal's
|
|
6
|
+
Ruby gem stack (ecoportal-api-graphql, ecoportal-api, eco-helpers). Covers gem
|
|
7
|
+
authentication, GraphQL query patterns, mutation patterns, error handling, and
|
|
8
|
+
cross-platform script conventions (Windows/WSL/macOS/Linux).
|
|
9
|
+
triggers:
|
|
10
|
+
- ruby script
|
|
11
|
+
- internal script
|
|
12
|
+
- ecoportal-api
|
|
13
|
+
- graphql query
|
|
14
|
+
- ruby-scripting
|
|
15
|
+
- write a ruby script
|
|
16
|
+
applicable_to:
|
|
17
|
+
- ruby
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# SKILL: Ruby Scripting (ecoPortal Internal)
|
|
21
|
+
|
|
22
|
+
**Purpose:** Guidelines for AI-assisted authoring of internal Ruby scripts that use the ecoPortal gem stack. These scripts run internally — no customer access; Ruby is not a customer-facing language at ecoPortal.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## When to Use
|
|
27
|
+
|
|
28
|
+
- Writing a new script that queries or mutates ecoPortal data via the GraphQL API
|
|
29
|
+
- Debugging or extending an existing script in `ruby_scripts/` or similar
|
|
30
|
+
- Any task involving `ecoportal-api-graphql`, `ecoportal-api`, or `eco-helpers`
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Gem Stack
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
ecoportal-api-graphql ← GraphQL client layer (mutations, queries, models)
|
|
38
|
+
↑
|
|
39
|
+
ecoportal-api / ecoportal-api-v2 ← REST API + base model infrastructure
|
|
40
|
+
↑
|
|
41
|
+
eco-helpers ← Utility helpers (pagination, bulk ops, etc.)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Before writing any API call**, check:
|
|
45
|
+
1. Does `eco-helpers` already have a helper for this operation? (It often does.)
|
|
46
|
+
2. Does `ecoportal-api-graphql` already have a model/mutation class?
|
|
47
|
+
3. Read `.ai-assistance/code/dependencies.md` in `ecoportal-api-graphql` for local paths.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Authentication
|
|
52
|
+
|
|
53
|
+
```ruby
|
|
54
|
+
require 'ecoportal/api'
|
|
55
|
+
|
|
56
|
+
api = Ecoportal::API::V2.new(
|
|
57
|
+
key: ENV.fetch('EP_API_KEY'),
|
|
58
|
+
host: ENV.fetch('EP_API_HOST', 'live.ecoportal.com')
|
|
59
|
+
)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Always use `ENV.fetch` (not `ENV[]`) — raises on missing key rather than silently using nil.
|
|
63
|
+
Store credentials in `.env` (gitignored). Never hardcode.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## GraphQL Query Pattern
|
|
68
|
+
|
|
69
|
+
```ruby
|
|
70
|
+
# Read models via GraphQL
|
|
71
|
+
result = api.graphql.query do |q|
|
|
72
|
+
q.current_organization do |org|
|
|
73
|
+
org.name
|
|
74
|
+
org.users(first: 50) do |conn|
|
|
75
|
+
conn.nodes do |user|
|
|
76
|
+
user.id
|
|
77
|
+
user.email
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Check for errors before using data
|
|
84
|
+
raise result.errors.map(&:message).join(', ') if result.errors.any?
|
|
85
|
+
users = result.data.current_organization.users.nodes
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Pagination:** use `eco-helpers` pagination helpers for large result sets rather than
|
|
89
|
+
writing manual cursor loops.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Mutation Pattern
|
|
94
|
+
|
|
95
|
+
```ruby
|
|
96
|
+
# Mutations require patchVer for types that use optimistic locking
|
|
97
|
+
# Always fetch before mutate for those types
|
|
98
|
+
current = api.graphql.query { ... }.data.some_item
|
|
99
|
+
result = api.graphql.mutate do |m|
|
|
100
|
+
m.update_item(input: {
|
|
101
|
+
id: current.id,
|
|
102
|
+
patch_ver: current.patch_ver, # required for patchVer types
|
|
103
|
+
name: "New Name"
|
|
104
|
+
}) do |payload|
|
|
105
|
+
payload.item { |i| i.id; i.name }
|
|
106
|
+
payload.errors { |e| e.message; e.path }
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
raise result.errors.map(&:message).join(', ') if result.errors.any?
|
|
111
|
+
raise result.data.update_item.errors.map(&:message).join(', ') \
|
|
112
|
+
if result.data.update_item.errors.any?
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**patchVer rule:** any schema type with a `patchVer` field requires reading current value
|
|
116
|
+
before any update. See `graphql-schema-analysis` skill for detection.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Cross-Platform Script Conventions
|
|
121
|
+
|
|
122
|
+
These scripts run on developer machines (Windows/WSL, macOS, Linux CI):
|
|
123
|
+
|
|
124
|
+
```ruby
|
|
125
|
+
# ✅ Safe: Ruby's File/Pathname handles separators cross-platform
|
|
126
|
+
require 'pathname'
|
|
127
|
+
base = Pathname.new(File.dirname(__FILE__))
|
|
128
|
+
data_file = base / 'data' / 'input.json'
|
|
129
|
+
|
|
130
|
+
# ❌ Unsafe: hardcoded separators, or shell assumptions
|
|
131
|
+
data_file = "#{__dir__}\\data\\input.json" # breaks on Linux
|
|
132
|
+
`cat #{data_file}` # assumes Unix shell
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Environment detection:**
|
|
136
|
+
```ruby
|
|
137
|
+
WINDOWS = Gem.win_platform?
|
|
138
|
+
# Use for platform-specific paths only — prefer Pathname for everything else
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Output:** use `$stdout.puts` not `print` for script output. Use `$stderr.puts` for
|
|
142
|
+
errors. This allows the script to be piped and combined cleanly.
|
|
143
|
+
|
|
144
|
+
**Exit codes:** always `exit 0` on success, `exit 1` on error. Never let an unhandled
|
|
145
|
+
exception be the exit mechanism in production scripts.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Error Handling
|
|
150
|
+
|
|
151
|
+
```ruby
|
|
152
|
+
begin
|
|
153
|
+
# API calls here
|
|
154
|
+
rescue Ecoportal::API::Errors::ApiError => e
|
|
155
|
+
$stderr.puts "API error: #{e.message} (status: #{e.status})"
|
|
156
|
+
exit 1
|
|
157
|
+
rescue => e
|
|
158
|
+
$stderr.puts "Unexpected error: #{e.class}: #{e.message}"
|
|
159
|
+
$stderr.puts e.backtrace.first(5).join("\n")
|
|
160
|
+
exit 1
|
|
161
|
+
end
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Script Structure Template
|
|
167
|
+
|
|
168
|
+
```ruby
|
|
169
|
+
#!/usr/bin/env ruby
|
|
170
|
+
# frozen_string_literal: true
|
|
171
|
+
#
|
|
172
|
+
# Script: <name>.rb
|
|
173
|
+
# Purpose: <one sentence>
|
|
174
|
+
# Usage: ruby <name>.rb [options]
|
|
175
|
+
# Dependencies: ecoportal-api-graphql, dotenv
|
|
176
|
+
#
|
|
177
|
+
# Run from repo root: bundle exec ruby scripts/<name>.rb
|
|
178
|
+
|
|
179
|
+
require 'bundler/setup'
|
|
180
|
+
require 'dotenv/load'
|
|
181
|
+
require 'ecoportal/api'
|
|
182
|
+
# ... other requires
|
|
183
|
+
|
|
184
|
+
api = Ecoportal::API::V2.new(
|
|
185
|
+
key: ENV.fetch('EP_API_KEY'),
|
|
186
|
+
host: ENV.fetch('EP_API_HOST', 'live.ecoportal.com')
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
begin
|
|
190
|
+
# main logic here
|
|
191
|
+
rescue => e
|
|
192
|
+
$stderr.puts "Error: #{e.class}: #{e.message}"
|
|
193
|
+
exit 1
|
|
194
|
+
end
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## What NOT to do
|
|
200
|
+
|
|
201
|
+
- Don't write raw HTTP calls to the EcoPortal API — use the gem stack
|
|
202
|
+
- Don't paginate manually — use `eco-helpers` pagination
|
|
203
|
+
- Don't hardcode API keys, hosts, or org identifiers
|
|
204
|
+
- Don't use `pp` or `binding.pry` in committed scripts — use structured logging
|
|
205
|
+
- Don't assume a Unix shell — use Ruby cross-platform file handling
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## v0.1.0 limitations
|
|
210
|
+
|
|
211
|
+
This skill covers general patterns. For area-specific details (specific GraphQL models,
|
|
212
|
+
available mutation inputs, schema patterns), consult:
|
|
213
|
+
- `ecoportal-api-graphql/.ai-assistance/code/` for code specs
|
|
214
|
+
- `ecoportal-api-graphql/.ai-assistance/skills/graphql-schema-analysis/SKILL.md`
|
|
215
|
+
- Live schema introspection (see graphql-schema-analysis skill)
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# SKILL: Spec Generation
|
|
2
|
+
|
|
3
|
+
**Purpose:** Add RSpec specs that guard backwards compatibility and document expected behaviour, placed in the correct spec folder mirroring the lib/ structure.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
- A change could break downstream consumers (primarily `eco-helpers`).
|
|
10
|
+
- A public method or interface is being added, changed, or removed.
|
|
11
|
+
- A bug is fixed — add a regression spec.
|
|
12
|
+
- A new class is added that other code will depend on.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Placement Rules
|
|
17
|
+
|
|
18
|
+
Spec files **mirror `lib/` structure** under `spec/`:
|
|
19
|
+
|
|
20
|
+
| Code file | Spec file |
|
|
21
|
+
|-----------|----------|
|
|
22
|
+
| `lib/ecoportal/api/graphql/model/action.rb` | `spec/ecoportal/api/graphql/model/action_spec.rb` |
|
|
23
|
+
| `lib/ecoportal/api/graphql/input/location_structure/draft.rb` | `spec/ecoportal/api/graphql/input/location_structure/draft_spec.rb` |
|
|
24
|
+
|
|
25
|
+
Create the folder path if it doesn't exist.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Spec Requirements
|
|
30
|
+
|
|
31
|
+
Each spec file for a changed area must have:
|
|
32
|
+
|
|
33
|
+
1. A description of the class/module under test.
|
|
34
|
+
2. At least one spec covering the public interface being changed.
|
|
35
|
+
3. For backwards-compat specs: a comment `# backwards-compat` so they're easily searched.
|
|
36
|
+
|
|
37
|
+
**Minimum spec template:**
|
|
38
|
+
|
|
39
|
+
```ruby
|
|
40
|
+
# frozen_string_literal: true
|
|
41
|
+
|
|
42
|
+
RSpec.describe Ecoportal::API::Graphql::<ClassName> do
|
|
43
|
+
# backwards-compat
|
|
44
|
+
describe '#<method>' do
|
|
45
|
+
subject { described_class.new(<args>) }
|
|
46
|
+
|
|
47
|
+
it '<expected behaviour>' do
|
|
48
|
+
expect(subject.<method>).to <matcher>
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Linked to Code Specs for AI
|
|
57
|
+
|
|
58
|
+
Whenever a spec file is created or updated for an area, check the corresponding `.ai-assistance/code/<area>.md` doc:
|
|
59
|
+
- Does it mention this class/method?
|
|
60
|
+
- Does it reflect the current expected behaviour?
|
|
61
|
+
|
|
62
|
+
If not — update it. This redundancy is intentional: it saves AI agents from having to parse spec files to understand expected behaviour.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Gemini Assist Integration
|
|
67
|
+
|
|
68
|
+
When generating specs for a large area, you may use `gemini-assist` to:
|
|
69
|
+
- Get a first-pass draft of spec cases given the source file.
|
|
70
|
+
- Check for edge cases you may have missed.
|
|
71
|
+
|
|
72
|
+
Always verify the generated specs run and match actual behaviour before committing.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ep-ai-standards-version": "1.5.0",
|
|
3
|
+
"applied-at": "2026-06-13",
|
|
4
|
+
"project-type": [
|
|
5
|
+
"ruby"
|
|
6
|
+
],
|
|
7
|
+
"deferred": [],
|
|
8
|
+
"installed-components": {
|
|
9
|
+
"skills/code-specs": "0.0.0",
|
|
10
|
+
"skills/ep-ai-manager": "2.1.0",
|
|
11
|
+
"skills/dep-graph": "0.0.0",
|
|
12
|
+
"skills/corporate-policies": "1.0.0",
|
|
13
|
+
"skills/ai-instructions": "0.0.0",
|
|
14
|
+
"skills/spec-generation": "0.0.0",
|
|
15
|
+
"skills/gemini-assist": "0.0.0",
|
|
16
|
+
"skills/ruby-scripting": "0.1.0",
|
|
17
|
+
"skills/refactor": "0.0.0",
|
|
18
|
+
"skills/project-cycle": "0.0.0",
|
|
19
|
+
"skills/graphql-schema-analysis": "0.0.0"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "1.0",
|
|
3
|
+
"project": {
|
|
4
|
+
"name": "ecoportal-api-graphql",
|
|
5
|
+
"priority": "medium",
|
|
6
|
+
"developer": "oscar@ecoportal.co.nz"
|
|
7
|
+
},
|
|
8
|
+
"weekly_quota": {
|
|
9
|
+
"total_tokens": null,
|
|
10
|
+
"target_utilization_pct": 75,
|
|
11
|
+
"reset_day": "monday"
|
|
12
|
+
},
|
|
13
|
+
"project_allocation": {
|
|
14
|
+
"priority_weights": { "high": 50, "medium": 30, "low": 20 }
|
|
15
|
+
},
|
|
16
|
+
"session_logging": {
|
|
17
|
+
"enabled": true,
|
|
18
|
+
"log_dir": ".ai-assistance/local/kpi",
|
|
19
|
+
"warn_at_pct": 80,
|
|
20
|
+
"prompt_category_at_stop": true
|
|
21
|
+
},
|
|
22
|
+
"task_categories": [
|
|
23
|
+
"coding", "bug_fixing", "bug_prevention",
|
|
24
|
+
"documentation", "communication", "post_release",
|
|
25
|
+
"troubleshooting", "integration_delivery", "skills_development"
|
|
26
|
+
],
|
|
27
|
+
|
|
28
|
+
"auto_worker": {
|
|
29
|
+
"enabled": true,
|
|
30
|
+
"dangerously_skip_permissions": false
|
|
31
|
+
}
|
|
32
|
+
}
|