Skip to content

Epic 5.9: ToolCatalog + Visual + Workspace — grounding/ package#47

Merged
Deepfreezechill merged 2 commits into
mainfrom
epic/5.9-tools-visual-workspace
Apr 6, 2026
Merged

Epic 5.9: ToolCatalog + Visual + Workspace — grounding/ package#47
Deepfreezechill merged 2 commits into
mainfrom
epic/5.9-tools-visual-workspace

Conversation

@Deepfreezechill

Copy link
Copy Markdown
Owner

Epic 5.9 — ToolCatalog + Visual + Workspace

What

Extract 8 methods from grounding_agent.py into 3 new modules:

  • grounding/tools.py (99 lines): _get_available_tools, _load_all_tools
  • grounding/visual.py (192 lines): visual analysis pipeline (callback, enhance, screenshot selection)
  • grounding/workspace.py (126 lines): workspace file scanning and artifact detection

Result

  • grounding_agent.py: 796 → 391 lines (67% total reduction from original 1,181)
  • All internal cross-function calls route through agent._method() for MRO preservation

Review

  • /8eyes impl: PASS (all delegates verified)
  • /8eyes sec: PASS (symlink traversal noted as pre-existing, deferred to P6)
  • /collab GPT-5.4: REQUEST CHANGES → fixed MRO routing for internal calls
  • 47 new tests, 1,683 total passed, 127 skipped

Brian Krafft and others added 2 commits April 6, 2026 10:36
Extract mid-layer methods from grounding_agent.py into 3 new modules:

- grounding/tools.py: _get_available_tools, _load_all_tools
- grounding/visual.py: _visual_analysis_callback,
  _enhance_result_with_visual_context, _select_key_screenshots
- grounding/workspace.py: _get_workspace_path, _scan_workspace_files,
  _check_workspace_artifacts

grounding_agent.py delegates to extracted functions via _impl aliases.
Pure functions (_select_key_screenshots, _get_workspace_path,
_scan_workspace_files) bound as staticmethod.

Removes unused BackendType and ScreenshotClient imports from
grounding_agent.py. Reduces file from ~796 to 391 lines.

47 new tests across 3 test files. All 107 grounding tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- tools.py: _get_available_tools fallback calls agent._load_all_tools()
- visual.py: _visual_analysis_callback calls agent._enhance_result_with_visual_context()
- workspace.py: _check_workspace_artifacts calls agent._get_workspace_path/scan
- Update test _FakeAgent classes with delegate methods
- Found by GPT-5.4 /collab review
- 1,683 passed, 127 skipped

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown

🔒 Phase Gate Enforcement — 🚫 FAIL

Check Result Detail
Issue linkage No linked issues found. PR must contain "Closes #N", "Fixes #N", or "Resolves #N".

Verdict: FAIL
Timestamp: 2026-04-06T17:48:21.769Z
Run: View workflow run


How to fix: Ensure all prerequisite phases are complete, or add emergency:bypass label with a ## Bypass Reason section in the PR body.

@Deepfreezechill Deepfreezechill merged commit 024c21c into main Apr 6, 2026
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant