ecoportal-api-graphql 1.3.13 → 1.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +87 -0
- data/lib/ecoportal/api/common/graphql/client.rb +0 -2
- data/lib/ecoportal/api/common/graphql/http_client.rb +6 -0
- data/lib/ecoportal/api/graphql/base/ai_summary_version.rb +17 -17
- data/lib/ecoportal/api/graphql/base/file_container.rb +14 -14
- data/lib/ecoportal/api/graphql/base/location_classification_type.rb +15 -15
- data/lib/ecoportal/api/graphql/base/location_structure.rb +27 -27
- data/lib/ecoportal/api/graphql/base/organization.rb +15 -15
- data/lib/ecoportal/api/graphql/base/page/task.rb +24 -0
- data/lib/ecoportal/api/graphql/base/page.rb +17 -16
- data/lib/ecoportal/api/graphql/base/template.rb +35 -0
- data/lib/ecoportal/api/graphql/base.rb +37 -35
- data/lib/ecoportal/api/graphql/builder/contractor_entity.rb +41 -41
- data/lib/ecoportal/api/graphql/compat/response.rb +35 -35
- data/lib/ecoportal/api/graphql/connection/action.rb +11 -11
- data/lib/ecoportal/api/graphql/connection/action_category.rb +11 -11
- data/lib/ecoportal/api/graphql/connection/contractor_entity.rb +11 -11
- data/lib/ecoportal/api/graphql/connection/page.rb +11 -11
- data/lib/ecoportal/api/graphql/connection/person_member.rb +11 -11
- data/lib/ecoportal/api/graphql/connection/preview_page.rb +11 -11
- data/lib/ecoportal/api/graphql/connection.rb +17 -17
- data/lib/ecoportal/api/graphql/file_upload/client.rb +21 -10
- data/lib/ecoportal/api/graphql/fragment/field_configuration.rb +38 -0
- data/lib/ecoportal/api/graphql/fragment/force.rb +14 -10
- data/lib/ecoportal/api/graphql/fragment/location_node.rb +26 -26
- data/lib/ecoportal/api/graphql/fragment/page_task.rb +39 -0
- data/lib/ecoportal/api/graphql/fragment/template.rb +51 -0
- data/lib/ecoportal/api/graphql/fragment.rb +3 -0
- data/lib/ecoportal/api/graphql/input/contractor_entity.rb +14 -14
- data/lib/ecoportal/api/graphql/input/preset_view/update.rb +16 -16
- data/lib/ecoportal/api/graphql/input/workflow_command/add_stage.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_field_configuration.rb +21 -21
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_page.rb +28 -28
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_page_creator_permissions.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/cross_reference.rb +23 -23
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/date.rb +20 -20
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/image_gallery.rb +20 -20
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/people.rb +24 -24
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/plain_text.rb +20 -20
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/rich_text.rb +20 -20
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/select.rb +20 -20
- data/lib/ecoportal/api/graphql/input/workflow_command/move_field.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/reorder_forces.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/reorder_section.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command.rb +251 -251
- data/lib/ecoportal/api/graphql/input.rb +24 -24
- data/lib/ecoportal/api/graphql/logic/connection.rb +34 -34
- data/lib/ecoportal/api/graphql/model/page/task.rb +16 -0
- data/lib/ecoportal/api/graphql/model/page.rb +16 -15
- data/lib/ecoportal/api/graphql/model/person_member.rb +15 -15
- data/lib/ecoportal/api/graphql/model/template.rb +15 -0
- data/lib/ecoportal/api/graphql/model.rb +32 -30
- data/lib/ecoportal/api/graphql/mutation/ai_summary/generate.rb +45 -45
- data/lib/ecoportal/api/graphql/mutation/ai_summary/submit_feedback.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/contractor_entity.rb +14 -14
- data/lib/ecoportal/api/graphql/mutation/page/approve_review_task.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page/batch_update_review_task.rb +38 -40
- data/lib/ecoportal/api/graphql/mutation/page/create_draft.rb +38 -40
- data/lib/ecoportal/api/graphql/mutation/page/delete_draft.rb +38 -40
- data/lib/ecoportal/api/graphql/mutation/page/execute_force_commands.rb +7 -7
- data/lib/ecoportal/api/graphql/mutation/page/execute_workflow_commands.rb +8 -7
- data/lib/ecoportal/api/graphql/mutation/page/publish_draft.rb +38 -40
- data/lib/ecoportal/api/graphql/mutation/page/reject_review_task.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page/restart_review_task.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page/undo_review_task.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/preset_view/destroy.rb +34 -35
- data/lib/ecoportal/api/graphql/mutation/register/destroy.rb +35 -35
- data/lib/ecoportal/api/graphql/mutation/smart_fill/generate.rb +36 -36
- data/lib/ecoportal/api/graphql/mutation/smart_fill/submit_feedback.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/smart_fill.rb +13 -13
- data/lib/ecoportal/api/graphql/mutation/template/create_related_page.rb +46 -46
- data/lib/ecoportal/api/graphql/mutation/template/destroy_related_page.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/template/update_information.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation.rb +20 -20
- data/lib/ecoportal/api/graphql/payload/contractor_entity.rb +14 -14
- data/lib/ecoportal/api/graphql/payload/ok_payload.rb +36 -21
- data/lib/ecoportal/api/graphql/payload/page/draft.rb +26 -13
- data/lib/ecoportal/api/graphql/payload/page/review_task.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/page/review_task_batch.rb +23 -0
- data/lib/ecoportal/api/graphql/payload/page.rb +20 -19
- data/lib/ecoportal/api/graphql/payload/preset_view.rb +15 -11
- data/lib/ecoportal/api/graphql/payload/register.rb +15 -11
- data/lib/ecoportal/api/graphql/payload/template/create_related_page.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/template/destroy_related_page.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/template/update_information.rb +1 -1
- data/lib/ecoportal/api/graphql/payload.rb +23 -23
- data/lib/ecoportal/api/graphql/query/location_structures.rb +57 -57
- data/lib/ecoportal/api/graphql/query/page.rb +45 -45
- data/lib/ecoportal/api/graphql/query/page_with_forces.rb +9 -3
- data/lib/ecoportal/api/graphql/query/pages_workflow_commands.rb +9 -3
- data/lib/ecoportal/api/graphql/query/register_preset_views.rb +78 -78
- data/lib/ecoportal/api/graphql/query.rb +27 -27
- data/lib/ecoportal/api/graphql.rb +9 -5
- data/lib/ecoportal/api/graphql_version.rb +1 -1
- metadata +9 -180
- data/.ai-assistance/bridge/CLAUDE.md +0 -338
- data/.ai-assistance/bridge/archive/.gitkeep +0 -0
- data/.ai-assistance/bridge/archive/oscar-a1b2c3d-gitlab-mcp-doc-update.inbox.md +0 -29
- data/.ai-assistance/bridge/archive/oscar-a1b2c3d-gitlab-mcp-doc-update.outbox.md +0 -18
- data/.ai-assistance/bridge/archive/oscar-c912c25-gemini-design-review.inbox.md +0 -42
- data/.ai-assistance/bridge/archive/oscar-c912c25-gemini-design-review.outbox.md +0 -115
- data/.ai-assistance/bridge/context/gemini-review-prompt.txt +0 -48
- data/.ai-assistance/bridge/context/gemini-review-response.md +0 -104
- data/.ai-assistance/bridge/context/project.md +0 -42
- 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 +0 -48
- data/.ai-assistance/bridge/queue/.gitkeep +0 -1
- data/.ai-assistance/capabilities/CLAUDE.md +0 -27
- data/.ai-assistance/capabilities/assumptions-log.md +0 -80
- data/.ai-assistance/capabilities/code.md +0 -47
- data/.ai-assistance/capabilities/connectors.md +0 -37
- data/.ai-assistance/capabilities/cowork.md +0 -55
- data/.ai-assistance/code/OVERVIEW.md +0 -155
- data/.ai-assistance/code/data_fields.md +0 -242
- data/.ai-assistance/code/dependencies.md +0 -151
- data/.ai-assistance/code/diff_as_input.md +0 -234
- data/.ai-assistance/code/diff_pairing_engine.md +0 -243
- data/.ai-assistance/code/diff_service_deep_dive.md +0 -192
- data/.ai-assistance/code/ecoPortal_architecture/00_overview_and_index.md +0 -55
- data/.ai-assistance/code/ecoPortal_architecture/01_terminology_dictionary.md +0 -181
- data/.ai-assistance/code/ecoPortal_architecture/02_data_model.md +0 -192
- data/.ai-assistance/code/ecoPortal_architecture/03_api_layers.md +0 -147
- data/.ai-assistance/code/ecoPortal_architecture/04_graphql_queries_mutations.md +0 -277
- data/.ai-assistance/code/ecoPortal_architecture/05_page_workflows.md +0 -200
- data/.ai-assistance/code/ecoPortal_architecture/06_search_and_filters.md +0 -228
- data/.ai-assistance/code/ecoPortal_architecture/07_data_fields.md +0 -197
- data/.ai-assistance/code/ecoPortal_architecture/08_stages_sections.md +0 -243
- data/.ai-assistance/code/ecoPortal_architecture/09_people_contractors_locations.md +0 -196
- data/.ai-assistance/code/ecoPortal_architecture/10_forces_workflow_builder.md +0 -132
- data/.ai-assistance/code/ecoPortal_architecture/11_integration_gems.md +0 -187
- data/.ai-assistance/code/ecoPortal_architecture/12_ai_documentation_sources_gaps.md +0 -236
- data/.ai-assistance/code/ecoPortal_architecture/13_ai_infrastructure.md +0 -183
- data/.ai-assistance/code/ecoportal_schema_reference.md +0 -240
- data/.ai-assistance/code/filter_contract_matrix.md +0 -177
- data/.ai-assistance/code/graphql_domain_knowledge.md +0 -240
- data/.ai-assistance/code/refactoring/datafield-readwrite-shape-asymmetry.md +0 -71
- data/.ai-assistance/code/refactoring/opportunities.md +0 -251
- data/.ai-assistance/code/schema_analysis.md +0 -321
- data/.ai-assistance/code/search_filters.md +0 -868
- data/.ai-assistance/code/spec_coverage.md +0 -73
- data/.ai-assistance/code/template_diff_pairing_domain.md +0 -175
- data/.ai-assistance/code/workflow-command-guide.md +0 -466
- data/.ai-assistance/code/workflow-space.md +0 -353
- data/.ai-assistance/conventions/CLAUDE.md +0 -30
- data/.ai-assistance/conventions/code-working-tree-protocol.md +0 -199
- data/.ai-assistance/conventions/gitignore-rules.md +0 -42
- data/.ai-assistance/conventions/permission-guidance.md +0 -120
- data/.ai-assistance/integrations/README.md +0 -70
- data/.ai-assistance/integrations/gitkraken-mcp.md +0 -107
- data/.ai-assistance/integrations/gitlab-mcp.md +0 -123
- data/.ai-assistance/integrations/local-git.md +0 -60
- data/.ai-assistance/local_paths.example.md +0 -17
- data/.ai-assistance/projects/TODO.md +0 -118
- data/.ai-assistance/projects/api-v2-to-graphql-migration/DECISIONS.md +0 -168
- data/.ai-assistance/projects/api-v2-to-graphql-migration/INTENT.md +0 -60
- data/.ai-assistance/projects/api-v2-to-graphql-migration/TODO.md +0 -267
- data/.ai-assistance/projects/api-v2-to-graphql-migration/UPSTREAM.md +0 -53
- data/.ai-assistance/projects/api-v2-to-graphql-migration/notes/csv-template-pipeline-design.md +0 -102
- data/.ai-assistance/projects/api-v2-to-graphql-migration/notes/cutover-usecase-gap-audit.md +0 -139
- data/.ai-assistance/projects/compat-layer-audit/COMPAT_AUDIT.md +0 -244
- data/.ai-assistance/projects/dynamic-model-generation/INTENT.md +0 -93
- data/.ai-assistance/projects/eco-helpers-compat/INTENT.md +0 -244
- data/.ai-assistance/projects/eco-helpers-compat/MIGRATION_GUIDE.md +0 -266
- data/.ai-assistance/projects/eco-helpers-compat/TODO.md +0 -86
- data/.ai-assistance/projects/ecoportal-api-v2-doublemodel-review/INTENT.md +0 -101
- data/.ai-assistance/projects/graphql-agent/GAP_ANALYSIS.md +0 -177
- data/.ai-assistance/projects/ooze-graphql-native-migration/DECISIONS.md +0 -161
- data/.ai-assistance/projects/ooze-graphql-native-migration/INTENT.md +0 -125
- data/.ai-assistance/projects/ooze-graphql-native-migration/INVENTORY.md +0 -136
- data/.ai-assistance/projects/ooze-graphql-native-migration/RISKS.md +0 -126
- data/.ai-assistance/projects/ooze-graphql-native-migration/TODO.md +0 -261
- data/.ai-assistance/projects/ooze-graphql-native-migration/analysis/2026-06-30-cutover-workflow-deep-review.md +0 -122
- data/.ai-assistance/projects/ooze-graphql-native-migration/analysis/2026-07-01-forces-via-workflow-commands-miss-rca.md +0 -148
- data/.ai-assistance/projects/page-model/DECISIONS.md +0 -245
- data/.ai-assistance/projects/page-model/TODO.md +0 -190
- data/.ai-assistance/projects/qa-services-delivery/DECISIONS.md +0 -93
- data/.ai-assistance/projects/qa-services-delivery/INTENT.md +0 -76
- data/.ai-assistance/projects/qa-services-delivery/PHASE3-SCOPE.md +0 -115
- data/.ai-assistance/projects/qa-services-delivery/ROADMAP.md +0 -99
- data/.ai-assistance/projects/qa-services-delivery/TODO.md +0 -81
- data/.ai-assistance/projects/search-filter-builder/INTENT.md +0 -107
- data/.ai-assistance/projects/search-filter-builder/TODO.md +0 -131
- data/.ai-assistance/projects/template-automatic-build-maintenance/INTENT.md +0 -87
- data/.ai-assistance/projects/template-automatic-build-maintenance/TODO.md +0 -108
- data/.ai-assistance/projects/template-diff-deploy/INTENT.md +0 -12
- data/.ai-assistance/projects/template-diff-deploy/TODO.md +0 -9
- data/.ai-assistance/projects/template-maintenance/DESIGN.md +0 -134
- data/.ai-assistance/projects/template-maintenance/PHASE0-FINDINGS.md +0 -93
- data/.ai-assistance/projects/template-maintenance/README.md +0 -14
- data/.ai-assistance/projects/template-model-logic/CATEGORY_CATALOG.md +0 -236
- data/.ai-assistance/projects/template-model-logic/CLASSIFICATION_SPIKE.md +0 -243
- data/.ai-assistance/projects/template-model-logic/DESIGN_NOTE.md +0 -154
- data/.ai-assistance/projects/workflow-space/TODO.md +0 -213
- data/.ai-assistance/reinstall-claude-desktop-windows.md +0 -136
- data/.ai-assistance/scripts/CLAUDE.md +0 -150
- data/.ai-assistance/scripts/bridge-inbox-check.sh +0 -75
- data/.ai-assistance/scripts/bridge-init.sh +0 -86
- data/.ai-assistance/scripts/bridge-status.sh +0 -44
- data/.ai-assistance/scripts/capabilities-check.ts +0 -104
- data/.ai-assistance/scripts/check-outbox.sh +0 -43
- data/.ai-assistance/scripts/dep_graph.rb +0 -91
- data/.ai-assistance/scripts/lock-acquire.sh +0 -103
- data/.ai-assistance/scripts/lock-multi.sh +0 -124
- data/.ai-assistance/scripts/lock-queue.sh +0 -94
- data/.ai-assistance/scripts/setup-mcps.test.ts +0 -188
- data/.ai-assistance/scripts/setup-mcps.ts +0 -234
- data/.ai-assistance/scripts/task-complete.ts +0 -74
- data/.ai-assistance/scripts/task-create.ts +0 -75
- data/.ai-assistance/scripts/task-read.ts +0 -125
- data/.ai-assistance/scripts/token-logger.js +0 -220
- data/.ai-assistance/scripts/token-report.ts +0 -158
- data/.ai-assistance/scripts/token-session-start.js +0 -66
- data/.ai-assistance/skills/ai-instructions/SKILL.md +0 -48
- data/.ai-assistance/skills/code-specs/SKILL.md +0 -69
- data/.ai-assistance/skills/corporate-policies/SKILL.md +0 -201
- data/.ai-assistance/skills/dep-graph/SKILL.md +0 -139
- data/.ai-assistance/skills/ep-ai-manager/SKILL.md +0 -417
- data/.ai-assistance/skills/gemini-assist/SKILL.md +0 -63
- data/.ai-assistance/skills/gemini-assist/gemini-mcp-server.js +0 -205
- data/.ai-assistance/skills/gemini-assist/gemini_ask.py +0 -1
- data/.ai-assistance/skills/gemini-assist/gemini_ask.rb +0 -240
- data/.ai-assistance/skills/gemini-assist/prompts/cycle_end_review.txt +0 -25
- data/.ai-assistance/skills/graphql-schema-analysis/SKILL.md +0 -261
- data/.ai-assistance/skills/procedural-memory/SKILL.md +0 -319
- data/.ai-assistance/skills/project-cycle/SKILL.md +0 -177
- data/.ai-assistance/skills/project-self-docs/SKILL.md +0 -181
- data/.ai-assistance/skills/project-self-docs/scripts/self_docs_scan.py +0 -378
- data/.ai-assistance/skills/refactor/SKILL.md +0 -62
- data/.ai-assistance/skills/rubocop/SKILL.md +0 -93
- data/.ai-assistance/skills/ruby-scripting/SKILL.md +0 -215
- data/.ai-assistance/skills/spec-generation/SKILL.md +0 -72
- data/.ai-assistance/standards-version.json +0 -22
- data/.ai-assistance/token-budget.json +0 -32
- data/.ai-assistance/version.json +0 -39
- data/.claude/settings.json +0 -150
- data/.env.example +0 -18
- data/.gitattributes +0 -15
- data/.gitignore +0 -37
- data/.gitlab-ci.yml +0 -45
- data/.markdownlint.json +0 -4
- data/.rspec +0 -3
- data/.rubocop.yml +0 -121
- data/.ruby-version +0 -1
- data/.yardopts +0 -10
- data/CLAUDE.md +0 -243
- data/Gemfile +0 -30
- data/Rakefile +0 -90
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/bin/setup.ps1 +0 -6
- data/docs/self-docs/ARCHITECTURE.md +0 -88
- data/docs/self-docs/CHANGES.jsonl +0 -12
- data/docs/self-docs/COMPLIANCE.md +0 -79
- data/docs/self-docs/CONVENTIONS.md +0 -74
- data/docs/self-docs/INTEGRATIONS.md +0 -65
- data/docs/self-docs/OPERATIONS.md +0 -76
- data/docs/self-docs/OVERVIEW.md +0 -64
- data/docs/self-docs/STATUS.md +0 -73
- data/docs/self-docs/self-docs-index.json +0 -51
- data/docs/worklog.md +0 -977
- data/ecoportal-api-graphql.gemspec +0 -40
- data/scripts/auto-worker-scheduler.sh +0 -386
- data/tests/actions_get.rb +0 -7
- data/tests/contractor_entities_get.rb +0 -20
- data/tests/contractor_entity_create.rb +0 -19
- data/tests/contractor_entity_udpate.rb +0 -20
- data/tests/dump_page_model.rb +0 -74
- data/tests/dump_template_model.rb +0 -90
- data/tests/loc_structure_get.rb +0 -10
- data/tests/loc_structure_update.rb +0 -51
- data/tests/loc_structures_get.rb +0 -15
- data/tests/local_libs.rb +0 -20
- data/tests/validate_queries.rb +0 -127
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# TASK: Gemini design review of CoWork↔Code bridge architecture
|
|
2
|
-
STATUS: PENDING
|
|
3
|
-
CREATED: 2026-06-03T00:00:00Z
|
|
4
|
-
FROM: cowork
|
|
5
|
-
TO: code
|
|
6
|
-
|
|
7
|
-
## Context
|
|
8
|
-
We have designed a file-based bridge system for bidirectional communication between
|
|
9
|
-
Claude in CoWork and Claude Code. The bridge lives in .claude/bridge/ inside a git repo.
|
|
10
|
-
|
|
11
|
-
Architecture summary:
|
|
12
|
-
- Inbox/outbox pattern with UUID+username prefixed filenames (no merge conflicts)
|
|
13
|
-
- Scripts (bash + TypeScript) handle file ops, env detection, UUID gen — offloading work from AI tokens
|
|
14
|
-
- CLAUDE.md files in each subfolder give each agent scoped instructions
|
|
15
|
-
- capabilities/ folder tracks what each environment can do, with a dated assumptions log
|
|
16
|
-
- conventions/ folder defines gitignore rules and instruction file structure
|
|
17
|
-
- capabilities-check.ts runs periodically using Haiku to flag stale assumptions
|
|
18
|
-
|
|
19
|
-
Key design decisions:
|
|
20
|
-
- Each agent checks capabilities before bridging (only bridge what you can't do yourself)
|
|
21
|
-
- Archive is committed to git — it's the audit trail
|
|
22
|
-
- Draft tasks (.draft.md) are gitignored — local-only until pushed
|
|
23
|
-
- Code processes only its own username-prefixed tasks
|
|
24
|
-
|
|
25
|
-
## Request
|
|
26
|
-
Use the Gemini connector (or Gemini API if available) to get an independent review of
|
|
27
|
-
this architecture. Ask Gemini:
|
|
28
|
-
|
|
29
|
-
1. What are the weaknesses or failure modes of this design?
|
|
30
|
-
2. Is the token-offloading strategy (scripts vs AI prose) well-scoped, or are there gaps?
|
|
31
|
-
3. Are there simpler or more robust alternatives for any part of this?
|
|
32
|
-
4. Anything we haven't considered — especially around git workflows, multi-agent coordination,
|
|
33
|
-
or long-term maintenance?
|
|
34
|
-
|
|
35
|
-
If Gemini connector is not available, use web search to find prior art on
|
|
36
|
-
file-based agent coordination patterns and report what you find.
|
|
37
|
-
|
|
38
|
-
## Expected output
|
|
39
|
-
- Gemini's (or research-based) critique: weaknesses, gaps, alternatives
|
|
40
|
-
- Your own assessment: do you agree with the critique? What would you change?
|
|
41
|
-
- Specific suggested amendments to the design (if any)
|
|
42
|
-
- Update capabilities/connectors.md with Gemini connector status after attempting this
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
# TASK: Gemini design review of CoWork↔Code bridge architecture
|
|
2
|
-
STATUS: DONE
|
|
3
|
-
COMPLETED: 2026-06-04T00:00:00Z
|
|
4
|
-
FROM: code
|
|
5
|
-
TO: cowork
|
|
6
|
-
|
|
7
|
-
## Result
|
|
8
|
-
|
|
9
|
-
### Gemini's Review (gemini-2.5-flash)
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## 1. Weaknesses and Failure Modes
|
|
14
|
-
|
|
15
|
-
1. **Race Condition / Partial Write during `IN_PROGRESS` Status Update**
|
|
16
|
-
- Description: If two Code instances concurrently pick up the same task, or if an agent crashes during status update, the inbox file could be corrupted or the status lost. The LOCK file only covers working tree changes, not bridge task processing.
|
|
17
|
-
- Likelihood: Medium
|
|
18
|
-
- Mitigation: Make the PENDING→IN_PROGRESS transition atomic by renaming the inbox file to `[name].IN_PROGRESS.md` (atomic filesystem op) before processing. Or have task-complete.ts handle the status update via temp-file-rename.
|
|
19
|
-
|
|
20
|
-
2. **Stale `IN_PROGRESS` Tasks**
|
|
21
|
-
- Description: If Code updates a task to IN_PROGRESS but crashes before writing the outbox, the task stays stuck indefinitely.
|
|
22
|
-
- Likelihood: Medium
|
|
23
|
-
- Mitigation: Enhance `bridge-init.sh` to flag IN_PROGRESS tasks whose timestamp is older than a threshold (e.g. 1 hour) as `STALE_IN_PROGRESS`.
|
|
24
|
-
|
|
25
|
-
3. **Non-atomic `LOCK` File Acquisition**
|
|
26
|
-
- Description: `cat > LOCK` is not atomic — two agents could both believe they've acquired the lock.
|
|
27
|
-
- Likelihood: Medium
|
|
28
|
-
- Mitigation: Use `flock` (Linux/Mac) or a temp-file-rename pattern for atomic lock acquisition.
|
|
29
|
-
|
|
30
|
-
4. **AI Misinterpretation of `git diff` for `wip:` Commits**
|
|
31
|
-
- Description: Summarizing raw diff output is an AI task prone to hallucination or generic messages. Likelihood: High.
|
|
32
|
-
- Mitigation: Provide a simple default message ("wip: in-progress changes before Code took over") or script a structured file-list summary instead of raw diff.
|
|
33
|
-
|
|
34
|
-
5. **Stale `bridge/STATUS` File**
|
|
35
|
-
- Description: Tasks created between SessionStart and Code's first action won't appear in STATUS.
|
|
36
|
-
- Likelihood: Low
|
|
37
|
-
- Mitigation: Check STATUS file timestamp; re-run bridge-init.sh if it's older than ~1 minute.
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## 2. Token-Offloading Assessment
|
|
42
|
-
|
|
43
|
-
Overall: **correct and effective**. Scripts handle all deterministic work well.
|
|
44
|
-
|
|
45
|
-
**Gaps still consuming unnecessary tokens:**
|
|
46
|
-
1. Parsing free-form Markdown sections from task files (Context, Request, Result) requires reasoning tokens — a `task-read.ts` outputting JSON would help agents consume this cheaply.
|
|
47
|
-
2. Parsing LOCK file fields (INTENT, FILES) — a `lock-read.ts` script would reduce this.
|
|
48
|
-
3. AI summarising `git diff` for `wip:` commits (covered in Q1).
|
|
49
|
-
|
|
50
|
-
**Over-automation:** None identified.
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## 3. Simpler/More Robust Alternatives
|
|
55
|
-
|
|
56
|
-
- **git notes:** Less transparent, harder for agents to inspect, concurrency issues remain. Not recommended.
|
|
57
|
-
- **Single TASKS.md:** Massive concurrency bottleneck and git merge conflict source. Strongly discouraged.
|
|
58
|
-
- **SQLite DB:** More robust for concurrency but incompatible with git-based sharing across machines. Not suitable for this use case.
|
|
59
|
-
- **Best small improvement:** Add `task-read.ts` for structured JSON output of task files. Improves agent efficiency without abandoning the git-friendly design.
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## 4. Blind Spots
|
|
64
|
-
|
|
65
|
-
1. **Git workflows (rebase, force-push, bisect, stash)** — Severity: HIGH
|
|
66
|
-
Archive is committed to git; rebase/cherry-pick/force-push can rewrite or break the audit trail. Bisect jumps to states where tasks may be incomplete. No instructions for handling these scenarios.
|
|
67
|
-
|
|
68
|
-
2. **Long-running multi-step tasks spanning multiple sessions** — Severity: MEDIUM
|
|
69
|
-
The task lifecycle (PENDING→IN_PROGRESS→DONE) is atomic for single requests. No support for multi-phase workflows requiring multiple sessions or human checkpoints.
|
|
70
|
-
|
|
71
|
-
3. **Multi-agent coordination beyond two environments** — Severity: LOW
|
|
72
|
-
Design is tightly coupled to CoWork↔Code. Extending to 3+ agents would require FROM/TO expansion and updated LOCK semantics.
|
|
73
|
-
|
|
74
|
-
4. **Archive scalability** — Severity: MEDIUM
|
|
75
|
-
Archive grows indefinitely; no pruning convention. Will increase repo size and clone time over time.
|
|
76
|
-
|
|
77
|
-
5. **Security: unrestricted shell + unverified bridge tasks** — Severity: HIGH
|
|
78
|
-
Code has unrestricted shell access, and `--dangerously-skip-permissions` bypasses human review. An attacker with repo write access could inject a malicious inbox task requesting arbitrary shell commands. The trust model assumes all bridge tasks are benign.
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
## Overall Assessment (Gemini)
|
|
83
|
-
|
|
84
|
-
The design is sound and highly practical for its stated purpose. The single most important fix is addressing the security implications of Code's unrestricted shell combined with potentially unverified bridge tasks — Code should always prompt the user before executing commands from a bridge task. Concurrently, making the IN_PROGRESS status update and LOCK acquisition atomic would significantly improve robustness.
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
### My Assessment (Claude Code)
|
|
89
|
-
|
|
90
|
-
**Findings I fully agree with:**
|
|
91
|
-
- **Security (#5)** — Most important. Even in a single-developer setup, the principle of always surfacing bridge-requested shell commands for confirmation is sound. The current `--dangerously-skip-permissions` note in CLAUDE.md should be tightened: use it only for file edits and connector calls, not arbitrary shell execution from inbox tasks.
|
|
92
|
-
- **Atomic IN_PROGRESS rename** — Simple, practical improvement. File rename is atomic on most filesystems.
|
|
93
|
-
- **Stale IN_PROGRESS detection** — Easy to add to bridge-init.sh, high value.
|
|
94
|
-
- **Archive scalability** — Real. Suggest adding a pruning convention (e.g. after 100 pairs, move to an `archive/old/` subdirectory or a separate git stash).
|
|
95
|
-
- **Multi-step tasks** — Genuine gap. The bridge has no concept of a task that requires multiple Code sessions. Worth documenting as an explicit non-goal, or adding a `PARENT_TASK` field for task chaining.
|
|
96
|
-
|
|
97
|
-
**Findings I'd moderate:**
|
|
98
|
-
- **LOCK race conditions (Medium)** — In practice this is a single-developer, rarely-concurrent setup. The real risk is a crashed session leaving a stale lock, which is already handled (EXPIRES field). Still worth fixing, but lower real-world priority than Gemini rates it.
|
|
99
|
-
- **task-read.ts / lock-read.ts** — Nice-to-have, but the current task format is intentionally human-readable and simple. The overhead of adding/maintaining more scripts for marginal token savings isn't compelling yet. Revisit when task volume grows.
|
|
100
|
-
|
|
101
|
-
**One thing Gemini missed:**
|
|
102
|
-
- **Archive naming inconsistency** — `task-complete.ts` archives files as `inbox-[task].md` and `outbox-[task].md`, but the manual archiving convention (used for the GitLab task) uses `[task].inbox.md` and `[task].outbox.md`. This mismatch means scripts and manual archiving produce different filename formats in archive/. Should standardize on one pattern (recommend the script's format: `inbox-[task]` / `outbox-[task]`).
|
|
103
|
-
|
|
104
|
-
**Specific suggested amendments:**
|
|
105
|
-
1. Add stale IN_PROGRESS detection to `bridge-init.sh` (1-hour threshold flag)
|
|
106
|
-
2. Tighten the `--dangerously-skip-permissions` note in bridge/CLAUDE.md — scope to file edits/connector calls only, not arbitrary shell
|
|
107
|
-
3. Add an archive pruning convention (e.g. 100-pair threshold → `archive/old/`)
|
|
108
|
-
4. Document multi-step tasks as an explicit non-goal or add basic task chaining via `PARENT_TASK` field
|
|
109
|
-
5. Standardize archive naming to `inbox-[task].md` / `outbox-[task].md` (the script format)
|
|
110
|
-
|
|
111
|
-
## Notes
|
|
112
|
-
|
|
113
|
-
- Gemini connector confirmed working (gemini-2.5-flash via PowerShell Invoke-RestMethod, not the Ruby script — Ruby has an SSL cert issue on Windows that prevents the gemini_ask.rb script from connecting)
|
|
114
|
-
- Gemini response was substantive and accurate; cross-checked against actual bridge files — no hallucinations detected
|
|
115
|
-
- SSL fix for gemini_ask.rb on Windows: set SSL_CERT_FILE to a valid CA bundle (e.g. from curl's cert bundle), or use the PowerShell workaround documented in connectors.md
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
You are reviewing the design of a file-based bidirectional communication bridge between two Claude AI environments: "CoWork" (claude.ai project) and "Code" (Claude Code CLI). The bridge lives inside a git repository.
|
|
2
|
-
|
|
3
|
-
Architecture summary (from the attached files):
|
|
4
|
-
- Inbox/outbox pattern with UUID+username prefixed filenames to avoid merge conflicts
|
|
5
|
-
- Bash + TypeScript scripts handle file ops, env detection, UUID generation — offloading token-heavy work from AI prompts
|
|
6
|
-
- CLAUDE.md files in each subfolder give each agent scoped instructions
|
|
7
|
-
- capabilities/ folder tracks what each environment can do, with a dated assumptions log
|
|
8
|
-
- conventions/ folder defines gitignore rules and instruction file structure
|
|
9
|
-
- capabilities-check.ts runs periodically using Haiku to flag stale assumptions
|
|
10
|
-
- Code processes only its own username-prefixed tasks
|
|
11
|
-
- Each agent checks capabilities before bridging (only bridge what you can't do yourself)
|
|
12
|
-
- Archive is committed to git as the audit trail
|
|
13
|
-
- Draft tasks (.draft.md) are gitignored — local-only until pushed
|
|
14
|
-
|
|
15
|
-
Please answer the following four questions. Be specific and concrete. Where you identify a problem, propose a mitigation.
|
|
16
|
-
|
|
17
|
-
1. WEAKNESSES AND FAILURE MODES
|
|
18
|
-
What are the realistic failure modes of this design? Consider: file conflicts, git state issues, agent confusion, task loss, stale STATUS, partial writes, race conditions between concurrent sessions.
|
|
19
|
-
|
|
20
|
-
2. TOKEN-OFFLOADING STRATEGY
|
|
21
|
-
The design offloads file ops and UUID generation to scripts (Bash/TypeScript) rather than having the AI do them in prose. Is this scope correct? Are there gaps — things the scripts don't cover that still consume unnecessary AI tokens? Are there things scripts handle that would be better left to the AI?
|
|
22
|
-
|
|
23
|
-
3. SIMPLER OR MORE ROBUST ALTERNATIVES
|
|
24
|
-
Are there simpler or more robust alternatives for any component? Consider: replacing file-based with git notes, using a single TASKS.md instead of individual files, using a shared SQLite DB, or other patterns from prior art in multi-agent coordination.
|
|
25
|
-
|
|
26
|
-
4. BLIND SPOTS
|
|
27
|
-
What has this design not considered? Focus especially on:
|
|
28
|
-
- git workflows (rebasing, force-push, stash, bisect interacting with bridge files)
|
|
29
|
-
- long-running or multi-step tasks that span multiple sessions
|
|
30
|
-
- multi-agent coordination beyond two environments
|
|
31
|
-
- long-term maintenance as the bridge grows
|
|
32
|
-
- security (the bridge lives in a git repo — what risks does that introduce?)
|
|
33
|
-
|
|
34
|
-
Format your response as:
|
|
35
|
-
## 1. Weaknesses and Failure Modes
|
|
36
|
-
[numbered list, each with: description, likelihood (low/medium/high), suggested mitigation]
|
|
37
|
-
|
|
38
|
-
## 2. Token-Offloading Assessment
|
|
39
|
-
[assessment + specific gaps or over-automation]
|
|
40
|
-
|
|
41
|
-
## 3. Simpler/More Robust Alternatives
|
|
42
|
-
[alternatives with trade-offs — don't suggest change for change's sake]
|
|
43
|
-
|
|
44
|
-
## 4. Blind Spots
|
|
45
|
-
[numbered list of things not considered, with brief notes on severity]
|
|
46
|
-
|
|
47
|
-
## Overall Assessment
|
|
48
|
-
[2-3 sentences: is this design sound for its purpose? What's the single most important thing to fix?]
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
Here's a detailed review of the bridge protocol design:
|
|
2
|
-
|
|
3
|
-
## 1. Weaknesses and Failure Modes
|
|
4
|
-
|
|
5
|
-
1. **Race Condition / Partial Write during `IN_PROGRESS` Status Update:**
|
|
6
|
-
* **Description:** The bridge protocol states, "Code picks it up, updates STATUS to IN_PROGRESS in the inbox file." If two Code instances (e.g., from the same user) concurrently pick up the same task, or if an agent crashes during this update, the `inbox` file could be partially written or overwritten, leading to a corrupted status or lost task. The `LOCK` file only applies to *working tree changes*, not bridge task processing.
|
|
7
|
-
* **Likelihood:** Medium.
|
|
8
|
-
* **Mitigation:** The status update (PENDING to IN_PROGRESS) should be made atomic. This could be achieved by modifying `task-complete.ts` to *also* handle the `IN_PROGRESS` status update (writing to a temp file and renaming), or by having Code *first* rename the task file to `inbox/[username]-[uuid7]-[slug].IN_PROGRESS.md` (atomic file system operation), then read its content, process, and finally call `task-complete.ts`.
|
|
9
|
-
|
|
10
|
-
2. **Stale `IN_PROGRESS` Tasks:**
|
|
11
|
-
* **Description:** If Code updates a task to `IN_PROGRESS` but then crashes or gets interrupted before completing it and writing the `outbox` file, the task will remain stuck in `IN_PROGRESS` indefinitely, preventing it from being re-processed.
|
|
12
|
-
* **Likelihood:** Medium.
|
|
13
|
-
* **Mitigation:** Enhance `bridge-init.sh` or `bridge-status.sh` to detect `IN_PROGRESS` tasks whose `CREATED` or `LAST_MODIFIED` timestamp is older than a defined threshold (e.g., 1 hour). The script should flag these as `STALE_IN_PROGRESS` in its output, prompting the user to manually review, reset to `PENDING`, or fail the task.
|
|
14
|
-
|
|
15
|
-
3. **Non-atomic `LOCK` File Acquisition:**
|
|
16
|
-
* **Description:** The `LOCK` file acquisition (`cat > .ai-assistance/bridge/LOCK`) is not atomic. If two agents attempt to acquire the lock simultaneously, they could both believe they've succeeded, or one could overwrite the other's lock with a partial or incorrect state.
|
|
17
|
-
* **Likelihood:** Medium.
|
|
18
|
-
* **Mitigation:** Use a more robust, atomic locking mechanism. On Linux/macOS, `flock -xn .ai-assistance/bridge/LOCK_FILE_LOCK_HELPER -c "cat > .ai-assistance/bridge/LOCK << EOF..."` could be used. This ensures only one process obtains the exclusive lock to write the `LOCK` file.
|
|
19
|
-
|
|
20
|
-
4. **Agent Misinterpretation of Git Diff for `wip:` Commit:**
|
|
21
|
-
* **Description:** The `code-working-tree-protocol.md` instructs Code to derive a `wip:` commit message by summarizing `git diff` output. This summarization is an AI task prone to hallucinations or misinterpretation, potentially leading to a generic, incorrect, or misleading `wip:` commit message.
|
|
22
|
-
* **Likelihood:** High.
|
|
23
|
-
* **Mitigation:** Provide a simpler default for the `wip:` commit message (e.g., "wip: in-progress changes by CoWork before Code took over") or instruct Code to be highly verbose in these summaries to reduce the risk of critical information loss. Alternatively, a script could simply list affected files for the `wip:` commit rather than attempting summarization.
|
|
24
|
-
|
|
25
|
-
5. **Stale `bridge/STATUS` File:**
|
|
26
|
-
* **Description:** Although `bridge-init.sh` runs on `SessionStart`, if a task is created or completed *between* `SessionStart` and Code's first action, the `bridge/STATUS` file might be slightly stale. Code's prompt mentions running `bridge-init.sh` manually *if missing*, but not if potentially stale.
|
|
27
|
-
* **Likelihood:** Low, due to `SessionStart` hook.
|
|
28
|
-
* **Mitigation:** Instruct Code to explicitly check the timestamp of `bridge/STATUS` after reading it. If it's older than a very short threshold (e.g., 1 minute), Code should re-run `bridge-init.sh` to ensure it has the freshest information before responding to the user about pending tasks.
|
|
29
|
-
|
|
30
|
-
## 2. Token-Offloading Assessment
|
|
31
|
-
|
|
32
|
-
The token-offloading strategy is largely **correct and effective**. The choice to offload deterministic, repetitive, and format-specific tasks to scripts (Bash/TypeScript) is well-justified and saves significant AI tokens.
|
|
33
|
-
|
|
34
|
-
**Areas where scripts effectively offload tokens:**
|
|
35
|
-
* **UUID Generation and File Naming:** Completely eliminates AI overhead for unique identifiers and consistent file paths.
|
|
36
|
-
* **Boilerplate File Creation and Archiving:** `task-create.ts` and `task-complete.ts` ensure correct Markdown formatting, status updates, and file movement, preventing AI from generating or validating these structures.
|
|
37
|
-
* **Environment and User Detection:** `bridge-init.sh` handles dynamic environment variables and git config lookups, which would be tedious for an AI.
|
|
38
|
-
* **Status Counting and Last Activity:** `bridge-status.sh` uses efficient shell commands to quantify bridge state, avoiding AI parsing of file contents for simple counts.
|
|
39
|
-
* **Automated Capability Checks:** `capabilities-check.ts` leverages a cheaper Haiku model for periodic, low-stakes verification, which is an excellent token-saving measure for the main agent.
|
|
40
|
-
* **Date/Time Formatting:** Ensures consistent ISO 8601 timestamps without AI effort.
|
|
41
|
-
|
|
42
|
-
**Gaps – Things still consuming unnecessary AI tokens:**
|
|
43
|
-
|
|
44
|
-
1. **Parsing Markdown Content for Context/Request/Result:** While scripts create the structured Markdown, when CoWork needs to read the `Result` from an `outbox` or Code needs to read the `Context` and `Request` from an `inbox`, the AI still has to parse and interpret the free-form Markdown sections. This requires significant reasoning tokens.
|
|
45
|
-
* **Mitigation:** Create a new script, e.g., `task-read.ts`, which takes a task filename and outputs its sections (title, status, context, request, result, notes) in a structured format like JSON. Agents would then call this script and consume the JSON, reducing parsing and interpretation tokens.
|
|
46
|
-
|
|
47
|
-
2. **Interpreting `LOCK` file `INTENT` and `FILES`:** When an agent encounters an active `LOCK` file, it must parse the `INTENT` and `FILES` fields from the Markdown to understand what the other agent is doing.
|
|
48
|
-
* **Mitigation:** A dedicated script, e.g., `lock-read.ts`, could parse the `LOCK` file and output its contents as JSON for easier consumption by the AI.
|
|
49
|
-
|
|
50
|
-
3. **Summarizing `git diff` for `wip:` Commits:** As noted in Q1, the AI is explicitly instructed to summarize `git diff` output to create `wip:` commit messages. This is a complex natural language generation task that directly consumes tokens.
|
|
51
|
-
* **Mitigation:** A script could provide a more structured input to the AI (e.g., a list of changed files and line counts, rather than raw diff) or offer a fallback to a generic, less descriptive `wip:` message if summarization is too costly or complex.
|
|
52
|
-
|
|
53
|
-
**Over-automation (Things better left to AI):**
|
|
54
|
-
There are no apparent instances of over-automation. All scripted tasks are deterministic and non-creative, fitting well within the current offloading strategy.
|
|
55
|
-
|
|
56
|
-
## 3. Simpler/More Robust Alternatives
|
|
57
|
-
|
|
58
|
-
The current file-based approach is a **pragmatic balance** between simplicity, git-friendliness, and robustness for a two-agent system within a shared git repository. Significant changes would introduce new complexities or trade-offs.
|
|
59
|
-
|
|
60
|
-
* **Replacing file-based with git notes:**
|
|
61
|
-
* **Trade-offs:** Would be *less simple* for agents to directly inspect (requiring `git notes show`), and `git notes` is not designed for complex, structured, and rapidly changing data like task queues. While potentially more robust regarding git's atomicity for data storage, concurrency management (e.g., multiple agents trying to modify the same note concurrently) would still be an issue. It would also likely *increase* AI token usage as agents would need to parse git command output.
|
|
62
|
-
* **Conclusion:** Not recommended. The current file-based approach is more transparent and easier for agents to handle.
|
|
63
|
-
|
|
64
|
-
* **Using a single `TASKS.md` instead of individual files:**
|
|
65
|
-
* **Trade-offs:** This would be **significantly less robust**. A single file would be a massive concurrency bottleneck, leading to constant git merge conflicts, race conditions, and corrupted data if multiple agents tried to update it simultaneously. Parsing a large, dynamically changing Markdown file to find and update specific task entries would be complex and token-intensive for the AI.
|
|
66
|
-
* **Conclusion:** Strongly discouraged. Individual files are crucial for minimizing conflicts and simplifying task management.
|
|
67
|
-
|
|
68
|
-
* **Using a shared SQLite DB:**
|
|
69
|
-
* **Trade-offs:**
|
|
70
|
-
* **More Robust:** **Highly robust** for concurrent reads/writes and atomic updates at the database level. Solves many of the concurrency issues inherent in file-based systems.
|
|
71
|
-
* **Less Simple (for integration):** Requires database access logic in scripts, and the `.db` file would either need to be `gitignored` (making it local-only, not shared across environments/machines) or committed to git. If committed, merging `.db` files in git is impractical, necessitating careful external tooling or a "last writer wins" approach which is generally unsafe for shared state.
|
|
72
|
-
* **Conclusion:** While technically more robust for concurrency, it introduces significant friction for sharing the state via git. For a bridge that must exist *within* a git repository and be shareable across distinct environments/machines via git, the file-based approach is generally more suitable than a committed SQLite DB. If the bridge was purely local to a single Code instance, SQLite would be a strong contender.
|
|
73
|
-
|
|
74
|
-
**Recommended Small Improvement:**
|
|
75
|
-
|
|
76
|
-
* **Enhance existing scripts for JSON output:** Instead of a wholesale replacement, invest in the `task-read.ts` (as suggested in Q2) and `lock-read.ts` scripts to provide structured (JSON) output of task and lock data. This improves AI efficiency without abandoning the git-friendly file-based approach.
|
|
77
|
-
|
|
78
|
-
## 4. Blind Spots
|
|
79
|
-
|
|
80
|
-
1. **Git Workflows (Rebasing, Force-push, Stash, Bisect):**
|
|
81
|
-
* **Severity:** High.
|
|
82
|
-
* **Notes:** The `archive/` folder, containing the history of bridge interactions, is committed to git. Advanced git operations like `rebase`, `bisect`, `cherry-pick`, or `force-push` can rewrite or alter git history. This could lead to a non-linear, broken, or misleading audit trail of bridge tasks. `bisect` would jump to states where tasks might be incomplete or not yet created. `git stash` might hide bridge files from agents. There are no instructions on how agents should interact with these scenarios to maintain bridge history integrity.
|
|
83
|
-
|
|
84
|
-
2. **Long-running or Multi-step Tasks Spanning Multiple Sessions:**
|
|
85
|
-
* **Severity:** Medium.
|
|
86
|
-
* **Notes:** The current bridge task lifecycle (PENDING → IN_PROGRESS → DONE/FAILED) is atomic for single requests. However, it doesn't explicitly support a larger, multi-session, multi-step workflow for a complex feature or project. If a task requires multiple human interventions or distinct phases of execution (e.g., "Build X, get feedback, refine Y, deploy Z"), the agent would need to create multiple, disconnected bridge tasks, losing the overarching context. The 30-minute lock expiry also indicates short-lived operations.
|
|
87
|
-
|
|
88
|
-
3. **Multi-Agent Coordination Beyond Two Environments:**
|
|
89
|
-
* **Severity:** Low (not in scope, but a future blind spot).
|
|
90
|
-
* **Notes:** The design is tightly coupled to CoWork ↔ Code. Expanding to three or more distinct AI agents (e.g., a dedicated "Reviewer" agent, or an external specialized service) would require extending the `FROM`/`TO` fields, the `username` prefixing convention, and potentially the `LOCK` mechanism to handle more complex concurrency.
|
|
91
|
-
|
|
92
|
-
4. **Long-term Maintenance and Scalability of `archive/`:**
|
|
93
|
-
* **Severity:** Medium.
|
|
94
|
-
* **Notes:** The `archive/` folder is designed to grow indefinitely as an audit trail. Over time, it could become very large, increasing repository size, `git clone` times, and making it harder to search or parse the history effectively. There's no mechanism or convention for pruning old archived tasks.
|
|
95
|
-
|
|
96
|
-
5. **Security (Unrestricted Shell & Trust Model):**
|
|
97
|
-
* **Severity:** High.
|
|
98
|
-
* **Notes:** Code has "unrestricted shell" access, and `task-complete.ts` can run `--dangerously-skip-permissions`. This makes the `Request` field in an `inbox` task a critical security vulnerability. An attacker gaining write access to the git repository (or a compromised CoWork session) could submit a malicious task requesting arbitrary shell commands (e.g., `rm -rf /`, exfiltrate sensitive files, install malware). While the user is conceptually in the loop, an agent operating `--dangerously-skip-permissions` could bypass human review. The trust model assumes bridge tasks are always benign.
|
|
99
|
-
|
|
100
|
-
## Overall Assessment
|
|
101
|
-
|
|
102
|
-
This design is **sound and highly practical** for its stated purpose as a file-based, git-backed connector delegation service between Claude CoWork and Claude Code. It effectively leverages scripting to offload token-heavy, deterministic tasks and provides clear communication conventions.
|
|
103
|
-
|
|
104
|
-
The single most important thing to fix is addressing the **security implications of Code's unrestricted shell access** in combination with potentially unverified bridge tasks. This necessitates explicit rules for Code to *always* prompt the user before executing any command requested via a bridge task, or to strictly whitelist command types. Concurrently, making the `IN_PROGRESS` status update and `LOCK` acquisition atomic would significantly improve robustness against internal failure modes.
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# Project Context
|
|
2
|
-
|
|
3
|
-
Last updated: 2026-06-03
|
|
4
|
-
Maintained by: both CoWork and Code — update when you learn something new
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Repositories
|
|
9
|
-
|
|
10
|
-
| Repo | Location |
|
|
11
|
-
|------|----------|
|
|
12
|
-
| ecoportal-api-graphql | GitLab: `oscar/ecoportal-api-graphql` |
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Team
|
|
17
|
-
|
|
18
|
-
| Username | Environment preference |
|
|
19
|
-
|----------|----------------------|
|
|
20
|
-
| oscar | CoWork for planning/docs, Code for git/GitLab |
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## Tool boundaries
|
|
25
|
-
|
|
26
|
-
| Task | Use |
|
|
27
|
-
|------|-----|
|
|
28
|
-
| GitLab MRs, branches, pipelines, issues | Code + GitLab plugin |
|
|
29
|
-
| Git operations on local repo | Code |
|
|
30
|
-
| Documents, spreadsheets, research, planning | CoWork |
|
|
31
|
-
| Scheduling, file organisation, briefs | CoWork |
|
|
32
|
-
| Anything requiring machine-level access | Code |
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## Key architectural decisions
|
|
37
|
-
|
|
38
|
-
- Bridge lives in `.claude/bridge/` — tracked in git, co-located with code
|
|
39
|
-
- Task files are UUID + username prefixed — no merge conflicts on pull
|
|
40
|
-
- Scripts handle file ops and env detection — agents consume structured output, not raw files
|
|
41
|
-
- `capabilities/assumptions-log.md` tracks stale knowledge — review periodically
|
|
42
|
-
- Archive is committed — it's the audit trail of AI-assisted work
|
|
File without changes
|
|
File without changes
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Request for ep-ai-standards: Cross-Repo Skill Discovery
|
|
2
|
-
STATUS: DONE
|
|
3
|
-
COMPLETED: 2026-06-11
|
|
4
|
-
FROM: code (ep-ai-standards session)
|
|
5
|
-
TO: cowork / ecoportal-api-graphql session
|
|
6
|
-
|
|
7
|
-
## Result
|
|
8
|
-
|
|
9
|
-
All three components implemented and pushed to ep-ai-standards main.
|
|
10
|
-
|
|
11
|
-
### skills-library/discovery-manifest.yaml
|
|
12
|
-
Machine-readable index mapping 6 repo types to relevant skills + conventions:
|
|
13
|
-
- `org-integration` → ruby-scripting, code-specs, project-cycle + cross-platform + PII conventions
|
|
14
|
-
- `ruby-gem` → ruby-scripting, code-specs, refactor, dep-graph
|
|
15
|
-
- `ruby-scripts` → ruby-scripting, code-specs, project-cycle
|
|
16
|
-
- `rails-app` → code-specs, refactor, spec-generation, dep-graph
|
|
17
|
-
- `typescript-lib` → code-specs, refactor
|
|
18
|
-
- `aws-cdk` → code-specs, refactor
|
|
19
|
-
|
|
20
|
-
Detection signals Claude can evaluate: `file_exists`, `file_not_exists`, `file_any`,
|
|
21
|
-
`gemfile_includes`, `directory_any`. eP_AI_Manager always proposed regardless of type.
|
|
22
|
-
|
|
23
|
-
### templates/CLAUDE.thin-client.md.template
|
|
24
|
-
Minimal stub CLAUDE.md. Fill in: repo name, ep-ai-standards path, type, description.
|
|
25
|
-
The session-start instructions tell Claude to read the manifest, verify detection signals,
|
|
26
|
-
and propose skills with one-line reasons — never auto-apply.
|
|
27
|
-
|
|
28
|
-
### docs/guides/thin-client-repos.md
|
|
29
|
-
Full setup guide covering:
|
|
30
|
-
- Thin-client vs full scaffold decision table
|
|
31
|
-
- 3-step setup (copy template, declare type, verify at first session)
|
|
32
|
-
- multi_org_api worked example (type: org-integration)
|
|
33
|
-
- Reference-over-sync model explained
|
|
34
|
-
- Upgrade path to full scaffold via install.sh --mode retrofit
|
|
35
|
-
|
|
36
|
-
## Next steps (in TODO.md)
|
|
37
|
-
|
|
38
|
-
1. Deploy thin-client CLAUDE.md to `multi_org_api`
|
|
39
|
-
(C:/ruby_scripts/implementation/orgs/multi_org_api, type: org-integration)
|
|
40
|
-
2. Deploy to `training/` as second test case
|
|
41
|
-
3. Add thin-client detection to check-alignment.sh (avoids false MISSING for thin-client repos)
|
|
42
|
-
|
|
43
|
-
## Notes
|
|
44
|
-
|
|
45
|
-
The mechanism is entirely instruction-driven — the stub CLAUDE.md itself tells Claude what
|
|
46
|
-
to do at session start. No new script or skill install needed for the initial discovery phase.
|
|
47
|
-
The reference-over-sync model means multi_org_api will always see the latest skills as long
|
|
48
|
-
as ep-ai-standards is at the declared path.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# Capabilities
|
|
2
|
-
|
|
3
|
-
These files describe what each environment can do natively.
|
|
4
|
-
Before writing a bridge task, check your environment's file — if you can do it yourself, do it.
|
|
5
|
-
|
|
6
|
-
## Files
|
|
7
|
-
|
|
8
|
-
| File | Purpose |
|
|
9
|
-
|------|---------|
|
|
10
|
-
| `cowork.md` | What Claude in CoWork can do natively |
|
|
11
|
-
| `code.md` | What Claude Code can do natively |
|
|
12
|
-
| `connectors.md` | Connector registry — which env, auth status, last verified |
|
|
13
|
-
| `assumptions-log.md` | Dated log of assumptions and their verification status |
|
|
14
|
-
|
|
15
|
-
## Keeping these current
|
|
16
|
-
|
|
17
|
-
Capabilities change. The `capabilities-check.ts` script runs periodically and updates
|
|
18
|
-
`assumptions-log.md` with verification results.
|
|
19
|
-
|
|
20
|
-
If you notice a capability is wrong or stale during normal work:
|
|
21
|
-
1. Note it in `assumptions-log.md` with today's date and STATUS: NEEDS_REVIEW
|
|
22
|
-
2. Do not silently act on stale information
|
|
23
|
-
|
|
24
|
-
## Last full review
|
|
25
|
-
|
|
26
|
-
2026-06-04 — revised bridge scope (connector delegation only, not working tree changes);
|
|
27
|
-
updated cowork.md, code.md, connectors.md with confirmed auth status for GitLab/Gemini/GitKraken
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# Assumptions Log
|
|
2
|
-
|
|
3
|
-
Tracks assumptions baked into this setup and their verification status.
|
|
4
|
-
Updated by `scripts/capabilities-check.ts` and manually by any agent.
|
|
5
|
-
|
|
6
|
-
## Statuses
|
|
7
|
-
|
|
8
|
-
- `CONFIRMED` — verified against a live source, date noted
|
|
9
|
-
- `NEEDS_REVIEW` — time has passed or something seems off, check it
|
|
10
|
-
- `RESOLVED` — was a limitation, now fixed (note how)
|
|
11
|
-
- `INVALIDATED` — assumption was wrong, note what's actually true
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Log
|
|
16
|
-
|
|
17
|
-
### 2026-06-03 — GitLab plugin is Code-only
|
|
18
|
-
STATUS: CONFIRMED
|
|
19
|
-
Last checked: 2026-06-03
|
|
20
|
-
Source: claude.com/plugins/gitlab ("Install in Claude Code" label)
|
|
21
|
-
Notes: Plugin page explicitly states Code-only. CoWork must bridge to Code for all GitLab operations.
|
|
22
|
-
|
|
23
|
-
### 2026-06-03 — Model knowledge cutoff is May 2025
|
|
24
|
-
STATUS: CONFIRMED
|
|
25
|
-
Last checked: 2026-06-03
|
|
26
|
-
Source: claude-sonnet-4-6 system context
|
|
27
|
-
Notes: ~13 months behind current date (June 2026). Product features, connector availability,
|
|
28
|
-
and plugin ecosystem may have changed significantly. Always verify product claims against
|
|
29
|
-
live sources (claude.com/plugins, docs.claude.ai) rather than training data.
|
|
30
|
-
ACTION: When current model names, API versions, or library releases are needed, ask Gemini
|
|
31
|
-
via the gemini-assist skill or ask the user to run a live API check. Do NOT guess at current
|
|
32
|
-
model IDs (e.g. Gemini model strings) from training data — they change frequently.
|
|
33
|
-
|
|
34
|
-
### 2026-06-03 — CoWork sandbox has allowlisted (not open) network access
|
|
35
|
-
STATUS: CONFIRMED — CAUSE IDENTIFIED, BEING RESOLVED
|
|
36
|
-
Last checked: 2026-06-03
|
|
37
|
-
Source: CoWork system prompt + Gemini research (2026-06-03)
|
|
38
|
-
Notes: Sandbox restrictions are compounded by MSIX packaging (see entry below).
|
|
39
|
-
After switching to winget install, standard sandbox behaviour should apply.
|
|
40
|
-
GitLab API still not reachable without credentials regardless of install method.
|
|
41
|
-
|
|
42
|
-
### 2026-06-03 — Claude Desktop installed as MSIX causes silently virtualised AppData paths
|
|
43
|
-
STATUS: CONFIRMED — BEING RESOLVED
|
|
44
|
-
Last checked: 2026-06-03
|
|
45
|
-
Source: Gemini research citing github.com/anthropics/claude-code/issues/58421,
|
|
46
|
-
linkedin.com/pulse/windows-has-two-completely-different-install-claude-desktop-morrison
|
|
47
|
-
Notes: Anthropic ships the Windows desktop app as an MSIX package. Windows silently
|
|
48
|
-
redirects all AppData writes to a sandboxed container at:
|
|
49
|
-
AppData\Local\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\
|
|
50
|
-
instead of the documented AppData\Roaming\Claude\. This causes:
|
|
51
|
-
- MCP config "Edit Config" button opening the wrong path (silently ignored)
|
|
52
|
-
- Claude Code sandbox running inside an extra layer of Windows MSIX isolation
|
|
53
|
-
- Plugin skills loaded from wrong paths (GitHub issue 10 Feb 2026)
|
|
54
|
-
- CoWork VM bundle (claudevm.bundle / rootfs.vhdx) stored under LocalCache
|
|
55
|
-
FIX: Uninstall MSIX version, reinstall via winget (Anthropic.Claude) or standalone
|
|
56
|
-
.exe with "Choose where to get apps" set to Anywhere in Windows settings.
|
|
57
|
-
After fix, config lives at the documented path: AppData\Roaming\Claude\
|
|
58
|
-
Session data migration: copy LocalCache\Roaming\Claude\ → AppData\Roaming\Claude\
|
|
59
|
-
Resolution confirmed by user oscar@ecoportal.co.nz on 2026-06-03.
|
|
60
|
-
|
|
61
|
-
### 2026-06-03 — CoWork and Code sessions share no automatic context
|
|
62
|
-
STATUS: CONFIRMED
|
|
63
|
-
Last checked: 2026-06-03
|
|
64
|
-
Source: Architecture — separate processes, separate auth
|
|
65
|
-
Notes: The bridge folder is the only reliable shared context mechanism.
|
|
66
|
-
Account-level "Access your Claude Code sessions" permission scope not confirmed
|
|
67
|
-
to provide cross-session history access.
|
|
68
|
-
|
|
69
|
-
### 2026-06-03 — Gemini connector is available in Code (not CoWork)
|
|
70
|
-
STATUS: NEEDS_REVIEW
|
|
71
|
-
Last checked: 2026-06-03
|
|
72
|
-
Source: Plugin search — not definitively confirmed
|
|
73
|
-
Notes: Assumed based on Code's broader plugin ecosystem. Verify at claude.com/plugins.
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## Review schedule
|
|
78
|
-
|
|
79
|
-
Run `scripts/capabilities-check.ts` monthly, or whenever a task fails due to a
|
|
80
|
-
capability assumption. The script flags entries older than 30 days as NEEDS_REVIEW.
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# Code Native Capabilities
|
|
2
|
-
|
|
3
|
-
Last verified: 2026-06-04
|
|
4
|
-
Environment: Claude Code CLI (terminal / VS Code / desktop app Code mode)
|
|
5
|
-
|
|
6
|
-
## Can do natively
|
|
7
|
-
|
|
8
|
-
- Full local machine access (read/write any file, run any command)
|
|
9
|
-
- Git operations (clone, pull, push, branch, merge, diff, log)
|
|
10
|
-
- Install software and packages
|
|
11
|
-
- Run scripts in any language (Ruby, TypeScript, Python, Bash, etc.)
|
|
12
|
-
- Spawn parallel subagents (fan-out tasks)
|
|
13
|
-
- Scheduled via /schedule, /loop, or Routines (run on Anthropic infra, laptop off)
|
|
14
|
-
- Remote control via mobile app
|
|
15
|
-
- Claude SDK (TypeScript) for programmatic agent creation
|
|
16
|
-
|
|
17
|
-
## Connectors available in Code
|
|
18
|
-
|
|
19
|
-
See `connectors.md` for the full registry.
|
|
20
|
-
|
|
21
|
-
Confirmed available (2026-06-04):
|
|
22
|
-
- GitLab (`gitlab-mr-mcp` via PAT — expiry April 2027, rotation enabled)
|
|
23
|
-
- GitKraken (via `gk mcp` CLI — requires `gk auth login`)
|
|
24
|
-
- Gemini (via `gemini-mcp-server.js` + `GEMINI_API_KEY` in `.env`)
|
|
25
|
-
- GitHub (if installed)
|
|
26
|
-
- Playwright (browser automation, if installed)
|
|
27
|
-
|
|
28
|
-
## Cannot do
|
|
29
|
-
|
|
30
|
-
- CoWork-specific artifacts (live HTML widgets persisted in CoWork UI)
|
|
31
|
-
- CoWork scheduled tasks (require desktop app UI)
|
|
32
|
-
- Access CoWork conversation history directly
|
|
33
|
-
|
|
34
|
-
## Role in the bridge
|
|
35
|
-
|
|
36
|
-
Code is the **bridge execution environment** — it receives connector delegation tasks
|
|
37
|
-
from CoWork and calls the required external service. When Code picks up a bridge task:
|
|
38
|
-
|
|
39
|
-
1. Check `connectors.md` — confirm the required connector is available and authenticated
|
|
40
|
-
2. If connector is missing or needs-setup: write a FAILED outbox immediately, explain what's needed
|
|
41
|
-
3. If connector is available: call it, write the result to outbox
|
|
42
|
-
4. Do not make working tree changes as part of a bridge task unless the task explicitly requests it
|
|
43
|
-
|
|
44
|
-
## When to bridge to CoWork
|
|
45
|
-
|
|
46
|
-
Write a bridge task to CoWork only when the task requires CoWork-specific features
|
|
47
|
-
(artifacts, scheduled tasks, CoWork-only connectors). This is rare — Code can do most things directly.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# Connector Registry
|
|
2
|
-
|
|
3
|
-
Each row is a connector/plugin. Update `last-verified` when you confirm its status.
|
|
4
|
-
Run `scripts/capabilities-check.ts` to automate verification.
|
|
5
|
-
|
|
6
|
-
## Format
|
|
7
|
-
|
|
8
|
-
| Connector | CoWork | Code | Auth status | Last verified |
|
|
9
|
-
|-----------|--------|------|-------------|---------------|
|
|
10
|
-
| name | ✓/✗ | ✓/✗ | ok / needs-setup / unknown | YYYY-MM-DD |
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Registry
|
|
15
|
-
|
|
16
|
-
| Connector | CoWork | Code | Auth status | Notes | Last verified |
|
|
17
|
-
|-----------|--------|------|-------------|-------|---------------|
|
|
18
|
-
| GitLab | ✗ | ✓ | ok | PAT configured in `.env` + `claude_desktop_config.json`. Expiry April 2027, rotation enabled. Scopes: read_api, read_repository, create_runner, ai_features. CoWork ✗ confirmed — even with config entry, gitlab-mr-mcp does not connect in CoWork. Bridge to Code. | 2026-06-04 |
|
|
19
|
-
| GitKraken | ✗ | ✓ | ok | `gk mcp` confirmed working in Code (branch lookup verified). Config written to `claude_desktop_config.json` but CoWork ✗ — MCP servers in Desktop config do not surface as CoWork connectors. Bridge to Code for git context. | 2026-06-04 |
|
|
20
|
-
| Gemini | ✗ | ✓ | ok | `gemini-mcp-server.js` + `GEMINI_API_KEY` in `.env`. Model: gemini-2.5-flash. **Note:** `gemini_ask.rb` fails on Windows (SSL cert issue) — use PowerShell `Invoke-RestMethod` or the MCP server instead. MCP server path in global settings may point to `.ai-assistance/skills/` — verify if MCP tool becomes unavailable. | 2026-06-04 |
|
|
21
|
-
| GitHub | ✗ | ✓ | unknown | Not tested in this project | 2026-06-03 |
|
|
22
|
-
| Slack | ✓ | ✗ | unknown | Not authenticated in this project | 2026-06-03 |
|
|
23
|
-
| Notion | ✓ | ✗ | unknown | Not authenticated in this project | 2026-06-03 |
|
|
24
|
-
| Google Drive | ✓ | ✗ | unknown | Not authenticated in this project | 2026-06-03 |
|
|
25
|
-
| Gmail | ✓ | ✗ | unknown | Not authenticated in this project | 2026-06-03 |
|
|
26
|
-
| HubSpot | ✓ | ✗ | unknown | Not authenticated in this project | 2026-06-03 |
|
|
27
|
-
| Asana | ✓ | ✗ | unknown | Not authenticated in this project | 2026-06-03 |
|
|
28
|
-
| Linear | ✓ | ✓ | unknown | Not authenticated in this project | 2026-06-03 |
|
|
29
|
-
|
|
30
|
-
## Notes
|
|
31
|
-
|
|
32
|
-
- ✗ does not mean permanently unavailable — check claude.com/plugins for current availability
|
|
33
|
-
- Auth status `unknown` = not tested in this project yet
|
|
34
|
-
- Auth status `needs-setup` = connector present but credentials missing — write a bridge task to Code to complete setup (Code handles OAuth flows; CoWork cannot)
|
|
35
|
-
- Auth status `ok` = confirmed working in at least one session
|
|
36
|
-
- Bridge-eligible connectors (CoWork ✗, Code ✓) are the ones CoWork delegates to via the bridge
|
|
37
|
-
- Source for CoWork vs Code availability: claude.com/plugins/[name] → "Install in" label
|