Skip to content

Add --mode deep support to graphify extract CLI. - #1030

Closed
dobryakov wants to merge 2 commits into
Graphify-Labs:v8from
dobryakov:feat/cli-mode-deep
Closed

dobryakov wants to merge 2 commits into
Graphify-Labs:v8from
dobryakov:feat/cli-mode-deep

Conversation

@dobryakov

Copy link
Copy Markdown

Wire deep_mode through the LLM extraction pipeline so headless runs and Gemini fast-path skill flows match slash-command deep extraction behavior.

Wire deep_mode through the LLM extraction pipeline so headless runs and
Gemini fast-path skill flows match slash-command deep extraction behavior.

Co-authored-by: Cursor <[email protected]>
@safishamsi

Copy link
Copy Markdown
Member

Good addition — threading deep_mode through the call chain is the right approach and the default-off design is correct. A few things to address before merge:

Missing test coverage: _call_claude_cli and _call_bedrock are touched by the PR but not covered in tests/test_deep_mode.py. Please add or parameterize tests for those two backends.

Print fires too late: The "deep mode enabled" confirmation print is inside if uncached_paths: — on a fully-cached run it never fires, so the user gets no feedback that --mode deep was recognized. Move it before the cache check.

_DEEP_EXTRACTION_SUFFIX wording: "latent couplings" is vague enough that different models will interpret it very differently, and more edges means more token output → more bisection retries → higher cost. Worth tightening the language and noting the cost tradeoff in the PR description/changelog.

Minor: the --mode flag isn't mentioned in the top-level help output alongside other extract flags — worth adding for discoverability.

Otherwise looks good. Fix the above and this is ready to merge.

Add backend-specific deep_mode tests for claude-cli and bedrock, print deep mode before cache checks, and tighten deep prompt wording with explicit cost tradeoff notes.

Co-authored-by: Cursor <[email protected]>
@dobryakov

Copy link
Copy Markdown
Author

Addressed feedback in follow-up commit 1ccc75a:

  • Added deep_mode coverage for claude-cli and bedrock paths in tests/test_deep_mode.py.
  • Moved deep-mode confirmation print before semantic cache check, so fully-cached runs still show mode recognition.
  • Tightened DEEP_MODE prompt wording toward concrete architectural signals.
  • Added changelog note about deep mode potentially increasing token usage/cost and adaptive bisection retries.

@safishamsi

Copy link
Copy Markdown
Member

Implemented manually on v8 to avoid merge conflicts with recent changes (amp platform, OpenCode path fix, cluster-only remap). The --mode deep flag is now fully wired: parsing in __main__.py, _DEEP_EXTRACTION_SUFFIX / _extraction_system(deep=) in llm.py, and deep_mode threaded through all four LLM backends and extract_corpus_parallel. Thanks for the contribution!

@safishamsi safishamsi closed this May 27, 2026
safishamsi added a commit that referenced this pull request May 27, 2026
…, #1030)

- Feat: extract_dm (tree-sitter-dm), extract_dmi (PNG icon states),
  extract_dmm (tile dict uses edges), extract_dmf (window/elem hierarchy)
  for .dm .dme .dmi .dmm .dmf; 26 tests, fixtures, pyproject.toml dep
- Feat: graphify extract --mode deep flag; deep_mode threaded through all
  four LLM backends via extract_corpus_parallel
- Fix: CHANGELOG 0.8.21 entries for #1050, #1046, #1047 that were missing

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
PerryLin-0420 pushed a commit to PerryLin-0420/graphify-decouple that referenced this pull request Aug 13, 2026
…aphify-Labs#884, Graphify-Labs#1030)

- Feat: extract_dm (tree-sitter-dm), extract_dmi (PNG icon states),
  extract_dmm (tile dict uses edges), extract_dmf (window/elem hierarchy)
  for .dm .dme .dmi .dmm .dmf; 26 tests, fixtures, pyproject.toml dep
- Feat: graphify extract --mode deep flag; deep_mode threaded through all
  four LLM backends via extract_corpus_parallel
- Fix: CHANGELOG 0.8.21 entries for Graphify-Labs#1050, Graphify-Labs#1046, Graphify-Labs#1047 that were missing

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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.

2 participants