doubled-graph 3.0.4__tar.gz → 3.0.6__tar.gz

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.
Files changed (150) hide show
  1. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/PKG-INFO +21 -19
  2. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/README.md +20 -18
  3. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/pyproject.toml +1 -1
  4. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/cli.py +75 -4
  5. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/health.py +23 -1
  6. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/integrations/cgc.py +74 -31
  7. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/migrations/grace3_to_grace4.py +0 -53
  8. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/setup.py +202 -172
  9. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/tools/analyze.py +29 -1
  10. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/tools/detect_changes.py +5 -0
  11. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_bom_support.py +15 -3
  12. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_cgc_contract.py +52 -1
  13. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_cli_daemon.py +51 -0
  14. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_cli_entrypoint.py +3 -3
  15. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_cli_surface.py +124 -1
  16. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_crossref_drift.py +3 -0
  17. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_e2e_acceptance.py +44 -0
  18. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_health.py +65 -0
  19. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_migration_coverage.py +13 -9
  20. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_migration_grace3_to_grace4.py +35 -6
  21. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_setup_coverage.py +152 -115
  22. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_setup_failure_semantics.py +2 -0
  23. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_smoke.py +123 -8
  24. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/.gitignore +0 -0
  25. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/ARTICLE.md +0 -0
  26. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/INDEX.md +0 -0
  27. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/LICENSE +0 -0
  28. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/for-ai-existing-project/README.md +0 -0
  29. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/for-ai-maintenance/README.md +0 -0
  30. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/for-ai-new-project/README.md +0 -0
  31. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/for-humans/FAQ.md +0 -0
  32. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/for-humans/deep-dive.md +0 -0
  33. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/for-humans/getting-started.md +0 -0
  34. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/README.md +0 -0
  35. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/approval-checkpoints.md +0 -0
  36. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/artifacts.md +0 -0
  37. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/auto-scaling.md +0 -0
  38. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/ci-templates/github-actions.yml +0 -0
  39. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/ci-templates/gitlab-ci.yml +0 -0
  40. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/drift-and-priority.md +0 -0
  41. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/language-adapters/_template.md +0 -0
  42. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/language-adapters/csharp.md +0 -0
  43. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/language-adapters/go.md +0 -0
  44. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/language-adapters/java.md +0 -0
  45. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/language-adapters/python.md +0 -0
  46. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/language-adapters/rust.md +0 -0
  47. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/language-adapters/swift.md +0 -0
  48. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/language-adapters/typescript.md +0 -0
  49. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/principles.md +0 -0
  50. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/roles.md +0 -0
  51. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/runtime-adapters/_template.md +0 -0
  52. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/runtime-adapters/claude-code.md +0 -0
  53. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/runtime-adapters/codex.md +0 -0
  54. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/runtime-adapters/continue.md +0 -0
  55. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/runtime-adapters/cursor.md +0 -0
  56. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/runtime-adapters/local-llm.md +0 -0
  57. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/runtime-adapters/windsurf.md +0 -0
  58. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/tools.md +0 -0
  59. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/methodology/workflow.md +0 -0
  60. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/maintenance/on-after-edit.md +0 -0
  61. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/maintenance/on-before-edit.md +0 -0
  62. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/maintenance/on-drift-detected.md +0 -0
  63. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/maintenance/on-user-manual-edit.md +0 -0
  64. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/migrate-existing-project/00-entry-prompt.md +0 -0
  65. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/migrate-existing-project/01-discover.md +0 -0
  66. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/migrate-existing-project/02-reconstruct-intent.md +0 -0
  67. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/migrate-existing-project/03-draft-plan.md +0 -0
  68. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/migrate-existing-project/04-markup-codebase.md +0 -0
  69. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/migrate-existing-project/05-verification-and-logs.md +0 -0
  70. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/migrate-existing-project/06-validation-gates.md +0 -0
  71. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/new-project/00-entry-prompt.md +0 -0
  72. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/new-project/01-intent-interview.md +0 -0
  73. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/new-project/02-requirements.md +0 -0
  74. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/new-project/03-technology.md +0 -0
  75. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/new-project/04-development-plan.md +0 -0
  76. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/new-project/05-verification-plan.md +0 -0
  77. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/new-project/06-generate.md +0 -0
  78. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/new-project/07-post-init-sync.md +0 -0
  79. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/upgrade-methodology/00-entry-prompt.md +0 -0
  80. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/prompts/upgrade-methodology/01-content-gaps.md +0 -0
  81. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/__init__.py +0 -0
  82. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/__main__.py +0 -0
  83. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/config.py +0 -0
  84. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/daemon/__init__.py +0 -0
  85. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/daemon/main.py +0 -0
  86. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/daemon/server.py +0 -0
  87. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/data/skills/doubled-graph-after-edit/SKILL.md +0 -0
  88. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/data/skills/doubled-graph-before-edit/SKILL.md +0 -0
  89. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/data/skills/doubled-graph-drift/SKILL.md +0 -0
  90. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/data/skills/doubled-graph-guide/SKILL.md +0 -0
  91. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/data/skills/doubled-graph-manual-edit/SKILL.md +0 -0
  92. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/data/skills/doubled-graph-refactor/SKILL.md +0 -0
  93. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/data/skills/doubled-graph-verify/SKILL.md +0 -0
  94. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/graphs/__init__.py +0 -0
  95. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/graphs/anchors.py +0 -0
  96. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/graphs/crossref.py +0 -0
  97. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/graphs/declared.py +0 -0
  98. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/graphs/grace4.py +0 -0
  99. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/hooks_installer.py +0 -0
  100. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/integrations/__init__.py +0 -0
  101. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/integrations/grace_cli.py +0 -0
  102. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/integrations/graphd.py +0 -0
  103. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/integrations/service.py +0 -0
  104. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/migrations/__init__.py +0 -0
  105. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/policy/__init__.py +0 -0
  106. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/policy/agents_md.py +0 -0
  107. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/policy/phase.py +0 -0
  108. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/server.py +0 -0
  109. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/storage/__init__.py +0 -0
  110. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/storage/paths.py +0 -0
  111. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/tools/__init__.py +0 -0
  112. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/tools/_meta.py +0 -0
  113. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/tools/context.py +0 -0
  114. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/tools/impact.py +0 -0
  115. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/tools/post_tool.py +0 -0
  116. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/tools/provenance.py +0 -0
  117. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/src/doubled_graph/uninstall.py +0 -0
  118. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/__init__.py +0 -0
  119. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/conftest.py +0 -0
  120. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_anchors.py +0 -0
  121. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_cgc_backend.py +0 -0
  122. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_cgc_lifecycle.py +0 -0
  123. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_daemon.py +0 -0
  124. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_daemon_main.py +0 -0
  125. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_declared_coverage.py +0 -0
  126. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_grace4_artifacts.py +0 -0
  127. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_grace_cli_coverage.py +0 -0
  128. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_grace_cli_engine.py +0 -0
  129. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_graphd_client.py +0 -0
  130. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_hook_public_coverage.py +0 -0
  131. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_mcp_transport.py +0 -0
  132. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_mcp_validation.py +0 -0
  133. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_mutation_gate_script.py +0 -0
  134. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_mutation_kill_analyze.py +0 -0
  135. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_mutation_kill_cgc_edges.py +0 -0
  136. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_mutation_kill_cgc_fallback.py +0 -0
  137. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_mutation_kill_cgc_misc.py +0 -0
  138. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_mutation_kill_context.py +0 -0
  139. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_mutation_kill_crossref.py +0 -0
  140. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_mutation_kill_hooks.py +0 -0
  141. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_mutation_kill_impact.py +0 -0
  142. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_mutation_probes.py +0 -0
  143. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_packaging.py +0 -0
  144. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_platform_branches.py +0 -0
  145. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_provenance.py +0 -0
  146. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_release_script.py +0 -0
  147. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_repo_hygiene.py +0 -0
  148. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_service.py +0 -0
  149. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_setup_artifacts.py +0 -0
  150. {doubled_graph-3.0.4 → doubled_graph-3.0.6}/tests/test_uninstall.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: doubled-graph
3
- Version: 3.0.4
3
+ Version: 3.0.6
4
4
  Summary: MCP facade over CodeGraphContext + GRACE 4 (.grace artifacts): impact, context, drift-detect, migration for LLM-driven codebases.
5
5
  Project-URL: Homepage, https://github.com/rour/doubled-graph-mcp
6
6
  Project-URL: Repository, https://github.com/rour/doubled-graph-mcp
@@ -88,30 +88,29 @@ pipx ensurepath
88
88
 
89
89
  ### 2. Установить doubled-graph
90
90
 
91
- На PyPI сейчас опубликована **3.0.1**. Версии **3.0.2, 3.0.3 и 3.0.4 в PyPI
92
- ещё не опубликованы**, поэтому `pipx install doubled-graph` (без версии) на
93
- поддерживаемом Python поставит 3.0.1, а `doubled-graph --version` покажет не
94
- 3.0.4. Чтобы поставить именно
95
- 3.0.4 из этого репозитория, соберите wheel поддерживаемым интерпретатором
91
+ На PyPI сейчас опубликована **3.0.5**. Версия **3.0.6 ещё не опубликована**,
92
+ поэтому `pipx install doubled-graph` (без версии) на поддерживаемом Python
93
+ поставит 3.0.5. Чтобы поставить именно
94
+ 3.0.6 из этого репозитория, соберите wheel поддерживаемым интерпретатором
96
95
  (3.11–3.14) и установите его **с явным `--python`**: если сам pipx запущен
97
96
  на 3.15, его venv тоже будет 3.15, и pip откажется ставить пакет.
98
97
 
99
98
  ```bash
100
99
  python3.14 -m pip install build
101
100
  python3.14 -m build --wheel
102
- pipx install --python python3.14 --force dist/doubled_graph-3.0.4-py3-none-any.whl
101
+ pipx install --python python3.14 --force dist/doubled_graph-3.0.6-py3-none-any.whl
103
102
  ```
104
103
 
105
104
  Подойдёт любой минор из 3.11–3.14; `--python python3.14` — пример. После
106
105
  публикации релиза команда станет обычной и точной:
107
106
 
108
107
  ```bash
109
- pipx install --python python3.14 doubled-graph==3.0.4 # до релиза — wheel выше
108
+ pipx install --python python3.14 doubled-graph==3.0.6 # до релиза — wheel выше
110
109
  ```
111
110
 
112
111
  > Уже работаете в своём venv или conda-окружении? `python3.14 -m pip install
113
- > doubled-graph` из PyPI тоже поставит 3.0.1; для 3.0.4 используйте wheel:
114
- > `python3.14 -m pip install dist/doubled_graph-3.0.4-py3-none-any.whl`.
112
+ > doubled-graph` из PyPI тоже поставит 3.0.5; для 3.0.6 используйте wheel:
113
+ > `python3.14 -m pip install dist/doubled_graph-3.0.6-py3-none-any.whl`.
115
114
 
116
115
  ---
117
116
 
@@ -121,7 +120,8 @@ pipx install --python python3.14 doubled-graph==3.0.4 # до релиза —
121
120
 
122
121
  ```bash
123
122
  cd your-project
124
- doubled-graph setup
123
+ doubled-graph setup # статусы шагов; полный отчёт — в .doubled-graph/logs/setup-<ts>.json
124
+ doubled-graph setup --json # тот же отчёт в stdout
125
125
  ```
126
126
 
127
127
  Одна команда:
@@ -165,8 +165,8 @@ doubled-graph setup
165
165
  > отсутствующих колёс для текущего Python, шаг 2 «CGC dep self-heal» вызывает
166
166
  > `pipx install --python python3.12|3.13|3.14 --force doubled-graph==<установленная
167
167
  > версия>` (`setup.py::_auto_reinstall_on_working_python`). Версия
168
- > **запинена**: команда без версии поставила бы опубликованную 3.0.1 и молча
169
- > откатила текущую версию (3.0.4). Это единственная сетевая переустановка пакета; при `--dry-run`
168
+ > **запинена**: команда без версии поставила бы опубликованную 3.0.5 и молча
169
+ > откатила текущую версию (3.0.6). Это единственная сетевая переустановка пакета; при `--dry-run`
170
170
  > она только репортится (`status: "dry_run_reinstall"`), а при `pip install` в
171
171
  > venv/CI не выполняется вовсе (`_looks_like_pipx_install()`). Если сети нет
172
172
  > или такой версии ещё нет на PyPI, шаг честно возвращает `reinstall_failed`
@@ -223,7 +223,7 @@ head -1 "$(which doubled-graph)" # вывести shebang — это и ест
223
223
  ### 4. Проверить, что всё встало
224
224
 
225
225
  ```bash
226
- doubled-graph --version # 3.0.4 (после wheel-установки выше; 3.0.1 при pipx install из PyPI)
226
+ doubled-graph --version # 3.0.6 (после wheel-установки выше; 3.0.5 при pipx install из PyPI)
227
227
  doubled-graph status --repo . # artifacts.project_kind = grace4, grace_engine.upgrade_required = false
228
228
  doubled-graph daemon status # installed = true, running = true
229
229
  doubled-graph health --repo . # cgc.ok = true (демон ответил)
@@ -236,6 +236,8 @@ doubled-graph migrate check --repo . # map_pending / placeholders — что
236
236
  Если `daemon.running` = `false`, а `health.cgc.ok` = `false` — демон не запущен: выполните `doubled-graph setup` в обычном шелле (из песочницы `launchctl`/`systemctl` могут быть запрещены), затем `daemon status`. Без демона графовые команды возвращают `CGC_BACKEND_FAIL` и rc=1 — это не «пустой граф».
237
237
  Если `daemon status` показывает `installed: false`, `plist_present: true`, `loaded: false` — plist/unit записан, но job не загружен (launchd отключил сервис, `bootstrap` отклонён, остался stale-lock/сокет). С 3.0.3 это лечится само: `setup` и `daemon restart` останавливают старый процесс, удаляют discovery и stale-lock только при мёртвом PID-владельце, при необходимости выполняют `launchctl enable`/`systemctl unmask`, переписывают unit и делают `bootstrap`, а при отказе показывают реальный stderr супервизора и подсказку `log show --last 1m`. Ручная чистка `~/.doubled-graph` не требуется.
238
238
  Если `health.cgc.diagnostic` = `FalkorDB Lite previously failed to start…` — в 3.0.0 это была памятка о прошлой неудаче, а не причина. В 3.0.1 кэш сбрасывается перед каждой попыткой, а мёртвый `falkordb.sock` и осиротевший `graph.settings` удаляются автоматически: первый `analyze`/`setup` чинит репозиторий сам, `health.cgc.repaired` перечисляет удалённое (в 3.0.3 этот список приходит из демона, а не всегда пуст). В 3.0.3 также `setup` всегда перезапускает демон, поэтому обновление не оставляет старый процесс со старым кэшем.
239
+ С 3.0.5 `scan.exclude` — общий фильтр: full/incremental/`--paths` в `analyze` видят те же исключения, что `detect-changes`, и scratch-каталоги (`.dg-tmp/**`, `node_modules/**`) не попадают в граф. `setup` печатает по шагу только `ok`/`failed (причина)`/`skipped`, а счётчики и списки `per_ide` оставляет в JSON (в `--dry-run` — прогноз `would write/overwrite/append`). `detect-changes` получил `files_examined_count` (список — с `--verbose`), `health` — `modules.without_verification_breakdown: {missing, placeholder}`, а `migrate` в консоли печатает только `created`/`markup_pending` (полный отчёт — `migrate ... --json`).
240
+
239
241
  Если после этого движок всё равно падает с `Connection refused`, а `redis-server` в логах пишет `Can't handle RDB format version 13`, виновата сама база: файл `<db_path>` записан новее, чем умеет читать текущий `redis-server`. С 3.0.4 `_ensure` после двух неудач **переименовывает** его в `<db_path>.incompatible-<UTC timestamp>` (никогда не удаляет), один раз повторяет запуск на свежей базе, а `analyze` эмитит `CGC_ENGINE_DB_QUARANTINED`. `health.cgc.quarantined` перечисляет такие файлы, `health.cgc.repaired` — и их, и удалённые stale-файлы, а `setup` показывает `quarantined` в отчёте шага analyze (и `quarantine_candidate` в `--dry-run`). Если и третий запуск не удался, `CGCUnavailable` перечисляет все попытки и путь карантина; дальше — `daemon logs` и `cgc.backend`.
240
242
  Если `lint` вернул `markup.module-map-missing` — это содержательная работа, промпт `prompts/upgrade-methodology/01-content-gaps.md`.
241
243
 
@@ -452,10 +454,10 @@ Bun/Node-пакет 4.x: `bun remove -g @osovv/grace-cli` или
452
454
 
453
455
  Пошагово с 2.x (или 1.9.x, если проект ещё на `docs/*.xml`):
454
456
 
455
- 1. **Поставьте именно 3.0.4.** `pipx upgrade doubled-graph` сейчас даёт
456
- **3.0.1**, а не 3.0.4 (3.0.2, 3.0.3 и 3.0.4 ещё не в PyPI). Точный путь — wheel с явным
457
+ 1. **Поставьте именно 3.0.6.** `pipx upgrade doubled-graph` сейчас даёт
458
+ **3.0.5**, а не 3.0.6 (3.0.6 ещё не в PyPI). Точный путь — wheel с явным
457
459
  `--python`: см. [§Установка](#2-установить-doubled-graph). Убедитесь:
458
- `doubled-graph --version` → `3.0.4`.
460
+ `doubled-graph --version` → `3.0.6`.
459
461
  2. **`cd your-project && doubled-graph setup`** — в **обычном** шелле, не из
460
462
  песочницы. `setup` **всегда** останавливает и заново запускает сервис
461
463
  `graphd` (stop → install/update unit → start), регистрирует проект,
@@ -484,9 +486,9 @@ Bun/Node-пакет 4.x: `bun remove -g @osovv/grace-cli` или
484
486
  обновлением на 3.0:
485
487
 
486
488
  ```bash
487
- # 1. поставить 3.0.4 (pipx upgrade даст только 3.0.1 — см. §Установка)
489
+ # 1. поставить 3.0.6 (pipx upgrade даст только 3.0.5 — см. §Установка)
488
490
  python3.14 -m build --wheel
489
- pipx install --python python3.14 --force dist/doubled_graph-3.0.4-py3-none-any.whl
491
+ pipx install --python python3.14 --force dist/doubled_graph-3.0.6-py3-none-any.whl
490
492
  cd your-project
491
493
  doubled-graph setup # 2. движок, .grace и демон graphd — одной командой
492
494
  ```
@@ -47,30 +47,29 @@ pipx ensurepath
47
47
 
48
48
  ### 2. Установить doubled-graph
49
49
 
50
- На PyPI сейчас опубликована **3.0.1**. Версии **3.0.2, 3.0.3 и 3.0.4 в PyPI
51
- ещё не опубликованы**, поэтому `pipx install doubled-graph` (без версии) на
52
- поддерживаемом Python поставит 3.0.1, а `doubled-graph --version` покажет не
53
- 3.0.4. Чтобы поставить именно
54
- 3.0.4 из этого репозитория, соберите wheel поддерживаемым интерпретатором
50
+ На PyPI сейчас опубликована **3.0.5**. Версия **3.0.6 ещё не опубликована**,
51
+ поэтому `pipx install doubled-graph` (без версии) на поддерживаемом Python
52
+ поставит 3.0.5. Чтобы поставить именно
53
+ 3.0.6 из этого репозитория, соберите wheel поддерживаемым интерпретатором
55
54
  (3.11–3.14) и установите его **с явным `--python`**: если сам pipx запущен
56
55
  на 3.15, его venv тоже будет 3.15, и pip откажется ставить пакет.
57
56
 
58
57
  ```bash
59
58
  python3.14 -m pip install build
60
59
  python3.14 -m build --wheel
61
- pipx install --python python3.14 --force dist/doubled_graph-3.0.4-py3-none-any.whl
60
+ pipx install --python python3.14 --force dist/doubled_graph-3.0.6-py3-none-any.whl
62
61
  ```
63
62
 
64
63
  Подойдёт любой минор из 3.11–3.14; `--python python3.14` — пример. После
65
64
  публикации релиза команда станет обычной и точной:
66
65
 
67
66
  ```bash
68
- pipx install --python python3.14 doubled-graph==3.0.4 # до релиза — wheel выше
67
+ pipx install --python python3.14 doubled-graph==3.0.6 # до релиза — wheel выше
69
68
  ```
70
69
 
71
70
  > Уже работаете в своём venv или conda-окружении? `python3.14 -m pip install
72
- > doubled-graph` из PyPI тоже поставит 3.0.1; для 3.0.4 используйте wheel:
73
- > `python3.14 -m pip install dist/doubled_graph-3.0.4-py3-none-any.whl`.
71
+ > doubled-graph` из PyPI тоже поставит 3.0.5; для 3.0.6 используйте wheel:
72
+ > `python3.14 -m pip install dist/doubled_graph-3.0.6-py3-none-any.whl`.
74
73
 
75
74
  ---
76
75
 
@@ -80,7 +79,8 @@ pipx install --python python3.14 doubled-graph==3.0.4 # до релиза —
80
79
 
81
80
  ```bash
82
81
  cd your-project
83
- doubled-graph setup
82
+ doubled-graph setup # статусы шагов; полный отчёт — в .doubled-graph/logs/setup-<ts>.json
83
+ doubled-graph setup --json # тот же отчёт в stdout
84
84
  ```
85
85
 
86
86
  Одна команда:
@@ -124,8 +124,8 @@ doubled-graph setup
124
124
  > отсутствующих колёс для текущего Python, шаг 2 «CGC dep self-heal» вызывает
125
125
  > `pipx install --python python3.12|3.13|3.14 --force doubled-graph==<установленная
126
126
  > версия>` (`setup.py::_auto_reinstall_on_working_python`). Версия
127
- > **запинена**: команда без версии поставила бы опубликованную 3.0.1 и молча
128
- > откатила текущую версию (3.0.4). Это единственная сетевая переустановка пакета; при `--dry-run`
127
+ > **запинена**: команда без версии поставила бы опубликованную 3.0.5 и молча
128
+ > откатила текущую версию (3.0.6). Это единственная сетевая переустановка пакета; при `--dry-run`
129
129
  > она только репортится (`status: "dry_run_reinstall"`), а при `pip install` в
130
130
  > venv/CI не выполняется вовсе (`_looks_like_pipx_install()`). Если сети нет
131
131
  > или такой версии ещё нет на PyPI, шаг честно возвращает `reinstall_failed`
@@ -182,7 +182,7 @@ head -1 "$(which doubled-graph)" # вывести shebang — это и ест
182
182
  ### 4. Проверить, что всё встало
183
183
 
184
184
  ```bash
185
- doubled-graph --version # 3.0.4 (после wheel-установки выше; 3.0.1 при pipx install из PyPI)
185
+ doubled-graph --version # 3.0.6 (после wheel-установки выше; 3.0.5 при pipx install из PyPI)
186
186
  doubled-graph status --repo . # artifacts.project_kind = grace4, grace_engine.upgrade_required = false
187
187
  doubled-graph daemon status # installed = true, running = true
188
188
  doubled-graph health --repo . # cgc.ok = true (демон ответил)
@@ -195,6 +195,8 @@ doubled-graph migrate check --repo . # map_pending / placeholders — что
195
195
  Если `daemon.running` = `false`, а `health.cgc.ok` = `false` — демон не запущен: выполните `doubled-graph setup` в обычном шелле (из песочницы `launchctl`/`systemctl` могут быть запрещены), затем `daemon status`. Без демона графовые команды возвращают `CGC_BACKEND_FAIL` и rc=1 — это не «пустой граф».
196
196
  Если `daemon status` показывает `installed: false`, `plist_present: true`, `loaded: false` — plist/unit записан, но job не загружен (launchd отключил сервис, `bootstrap` отклонён, остался stale-lock/сокет). С 3.0.3 это лечится само: `setup` и `daemon restart` останавливают старый процесс, удаляют discovery и stale-lock только при мёртвом PID-владельце, при необходимости выполняют `launchctl enable`/`systemctl unmask`, переписывают unit и делают `bootstrap`, а при отказе показывают реальный stderr супервизора и подсказку `log show --last 1m`. Ручная чистка `~/.doubled-graph` не требуется.
197
197
  Если `health.cgc.diagnostic` = `FalkorDB Lite previously failed to start…` — в 3.0.0 это была памятка о прошлой неудаче, а не причина. В 3.0.1 кэш сбрасывается перед каждой попыткой, а мёртвый `falkordb.sock` и осиротевший `graph.settings` удаляются автоматически: первый `analyze`/`setup` чинит репозиторий сам, `health.cgc.repaired` перечисляет удалённое (в 3.0.3 этот список приходит из демона, а не всегда пуст). В 3.0.3 также `setup` всегда перезапускает демон, поэтому обновление не оставляет старый процесс со старым кэшем.
198
+ С 3.0.5 `scan.exclude` — общий фильтр: full/incremental/`--paths` в `analyze` видят те же исключения, что `detect-changes`, и scratch-каталоги (`.dg-tmp/**`, `node_modules/**`) не попадают в граф. `setup` печатает по шагу только `ok`/`failed (причина)`/`skipped`, а счётчики и списки `per_ide` оставляет в JSON (в `--dry-run` — прогноз `would write/overwrite/append`). `detect-changes` получил `files_examined_count` (список — с `--verbose`), `health` — `modules.without_verification_breakdown: {missing, placeholder}`, а `migrate` в консоли печатает только `created`/`markup_pending` (полный отчёт — `migrate ... --json`).
199
+
198
200
  Если после этого движок всё равно падает с `Connection refused`, а `redis-server` в логах пишет `Can't handle RDB format version 13`, виновата сама база: файл `<db_path>` записан новее, чем умеет читать текущий `redis-server`. С 3.0.4 `_ensure` после двух неудач **переименовывает** его в `<db_path>.incompatible-<UTC timestamp>` (никогда не удаляет), один раз повторяет запуск на свежей базе, а `analyze` эмитит `CGC_ENGINE_DB_QUARANTINED`. `health.cgc.quarantined` перечисляет такие файлы, `health.cgc.repaired` — и их, и удалённые stale-файлы, а `setup` показывает `quarantined` в отчёте шага analyze (и `quarantine_candidate` в `--dry-run`). Если и третий запуск не удался, `CGCUnavailable` перечисляет все попытки и путь карантина; дальше — `daemon logs` и `cgc.backend`.
199
201
  Если `lint` вернул `markup.module-map-missing` — это содержательная работа, промпт `prompts/upgrade-methodology/01-content-gaps.md`.
200
202
 
@@ -411,10 +413,10 @@ Bun/Node-пакет 4.x: `bun remove -g @osovv/grace-cli` или
411
413
 
412
414
  Пошагово с 2.x (или 1.9.x, если проект ещё на `docs/*.xml`):
413
415
 
414
- 1. **Поставьте именно 3.0.4.** `pipx upgrade doubled-graph` сейчас даёт
415
- **3.0.1**, а не 3.0.4 (3.0.2, 3.0.3 и 3.0.4 ещё не в PyPI). Точный путь — wheel с явным
416
+ 1. **Поставьте именно 3.0.6.** `pipx upgrade doubled-graph` сейчас даёт
417
+ **3.0.5**, а не 3.0.6 (3.0.6 ещё не в PyPI). Точный путь — wheel с явным
416
418
  `--python`: см. [§Установка](#2-установить-doubled-graph). Убедитесь:
417
- `doubled-graph --version` → `3.0.4`.
419
+ `doubled-graph --version` → `3.0.6`.
418
420
  2. **`cd your-project && doubled-graph setup`** — в **обычном** шелле, не из
419
421
  песочницы. `setup` **всегда** останавливает и заново запускает сервис
420
422
  `graphd` (stop → install/update unit → start), регистрирует проект,
@@ -443,9 +445,9 @@ Bun/Node-пакет 4.x: `bun remove -g @osovv/grace-cli` или
443
445
  обновлением на 3.0:
444
446
 
445
447
  ```bash
446
- # 1. поставить 3.0.4 (pipx upgrade даст только 3.0.1 — см. §Установка)
448
+ # 1. поставить 3.0.6 (pipx upgrade даст только 3.0.5 — см. §Установка)
447
449
  python3.14 -m build --wheel
448
- pipx install --python python3.14 --force dist/doubled_graph-3.0.4-py3-none-any.whl
450
+ pipx install --python python3.14 --force dist/doubled_graph-3.0.6-py3-none-any.whl
449
451
  cd your-project
450
452
  doubled-graph setup # 2. движок, .grace и демон graphd — одной командой
451
453
  ```
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "doubled-graph"
7
- version = "3.0.4"
7
+ version = "3.0.6"
8
8
  description = "MCP facade over CodeGraphContext + GRACE 4 (.grace artifacts): impact, context, drift-detect, migration for LLM-driven codebases."
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -40,9 +40,12 @@ import argparse
40
40
  import json
41
41
  import os
42
42
  import sys
43
+ from datetime import UTC, datetime
43
44
  from pathlib import Path
44
45
  from typing import Any
45
46
 
47
+ from doubled_graph.storage import paths as sp
48
+
46
49
 
47
50
  def _depth_1_to_10(value: str) -> int:
48
51
  """argparse type for `impact --depth`: same 1–10 contract as the MCP schema.
@@ -130,7 +133,16 @@ def _cmd_analyze(args: argparse.Namespace) -> int:
130
133
  session_id=getattr(args, "session_id", None),
131
134
  )
132
135
  if not args.silent:
133
- print(json.dumps(result.model_dump(), indent=2, default=str))
136
+ payload = result.model_dump()
137
+ if not getattr(args, "verbose", False):
138
+ # The per-file lists are inventories: they do not change the next
139
+ # action and can be thousands of lines. Counts stay in `stats`
140
+ # (`files_processed`/`files_deleted`); `--verbose` returns names.
141
+ stats = payload.get("stats")
142
+ if isinstance(stats, dict):
143
+ stats.pop("processed_files", None)
144
+ stats.pop("deleted_files", None)
145
+ print(json.dumps(payload, indent=2, default=str))
134
146
  # Unavailable backend is always a failure for the public command. The JSON
135
147
  # report (with its `CGC_BACKEND_FAIL` warning and install hint) is still
136
148
  # printed, so a CI log keeps the diagnosis; only the exit code is honest.
@@ -582,7 +594,19 @@ def _cmd_migrate(args: argparse.Namespace) -> int:
582
594
  report = check_migration(repo)
583
595
  else:
584
596
  report = apply_migration(repo, dry_run=args.dry_run, fix_markup=not args.no_markup_fix)
585
- print(json.dumps(report.as_dict(), indent=2, ensure_ascii=False))
597
+ if args.json:
598
+ print(json.dumps(report.as_dict(), indent=2, ensure_ascii=False))
599
+ else:
600
+ # The console is the next action: what was (or would be) created and
601
+ # what still needs the LINKS repair. `kept_existing` and the other
602
+ # inventories are in the JSON report (`--json` / the migration report).
603
+ print(f"created: {', '.join(report.created) if report.created else 'none'}")
604
+ print(
605
+ "markup_pending: "
606
+ f"{', '.join(report.markup_pending) if report.markup_pending else 'none'}"
607
+ )
608
+ for issue in report.errors:
609
+ print(f"{issue.code} ({issue.file}): {issue.message}", file=sys.stderr)
586
610
  return 0 if report.ok else 1
587
611
 
588
612
 
@@ -696,7 +720,12 @@ def _cmd_detect_changes(args: argparse.Namespace) -> int:
696
720
  since_ref=args.since_ref,
697
721
  include_unchanged=args.include_unchanged,
698
722
  )
699
- print(json.dumps(result.model_dump(mode="json"), indent=2, ensure_ascii=False))
723
+ payload = result.model_dump(mode="json")
724
+ if not getattr(args, "verbose", False):
725
+ # `files_examined` can be every source file in the repository; the
726
+ # count answers "how much was checked", the names are diagnostics.
727
+ payload.pop("files_examined", None)
728
+ print(json.dumps(payload, indent=2, ensure_ascii=False))
700
729
  # A dead backend/Daemon produces an *empty* snapshot, so `drift` is empty
701
730
  # even though nothing was actually compared. That must fail without any
702
731
  # flag: `detect-changes --scope all` returning rc=0 here let a CI script
@@ -807,9 +836,12 @@ def _cmd_uninstall(args: argparse.Namespace) -> int:
807
836
 
808
837
 
809
838
  def _cmd_setup(args: argparse.Namespace) -> int:
839
+ from doubled_graph import setup as setup_mod
810
840
  from doubled_graph.setup import run_setup
811
841
 
812
842
  repo = Path(args.repo or ".").resolve()
843
+ if getattr(args, "json", False):
844
+ setup_mod._JSON_MODE = True
813
845
  report = run_setup(
814
846
  repo_path=repo,
815
847
  ide=args.ide,
@@ -819,7 +851,20 @@ def _cmd_setup(args: argparse.Namespace) -> int:
819
851
  skip_skills=args.skip_skills,
820
852
  dry_run=args.dry_run,
821
853
  )
822
- print(json.dumps(report, indent=2, ensure_ascii=False))
854
+ # `setup` prints one result line per step on stdout. The full report
855
+ # (every written path) goes to a file, and to stdout only on request: a
856
+ # default JSON dump is noise that hides the one line the user needs.
857
+ stamp = datetime.now(UTC).strftime("%Y%m%dT%H%M%SZ")
858
+ try:
859
+ log_dir = sp.logs_dir(repo)
860
+ report_path = log_dir / f"setup-{stamp}.json"
861
+ report_path.write_text(json.dumps(report, indent=2, ensure_ascii=False), encoding="utf-8")
862
+ except OSError:
863
+ report_path = None
864
+ if getattr(args, "json", False):
865
+ print(json.dumps(report, indent=2, ensure_ascii=False))
866
+ elif report_path is not None:
867
+ print(f"report: {report_path}", file=sys.stderr)
823
868
  return 0 if report.get("ok") else 1
824
869
 
825
870
 
@@ -847,6 +892,11 @@ def main(argv_default: list[str] | None = None, argv: list[str] | None = None) -
847
892
  p_an.add_argument("--paths", nargs="*", default=None)
848
893
  p_an.add_argument("--force", action="store_true")
849
894
  p_an.add_argument("--silent", action="store_true")
895
+ p_an.add_argument(
896
+ "--verbose",
897
+ action="store_true",
898
+ help="include stats.processed_files/deleted_files (per-file lists) in the JSON",
899
+ )
850
900
  p_an.add_argument(
851
901
  "--strict",
852
902
  action="store_true",
@@ -975,6 +1025,11 @@ def main(argv_default: list[str] | None = None, argv: list[str] | None = None) -
975
1025
  "check", help="Read-only inventory: legacy artifacts, coverage gaps, markup to repair"
976
1026
  )
977
1027
  p_migrate_check.add_argument("--repo")
1028
+ p_migrate_check.add_argument(
1029
+ "--json",
1030
+ action="store_true",
1031
+ help="print the full MigrationReport JSON (kept_existing, placeholders, issues, …)",
1032
+ )
978
1033
  p_migrate_check.set_defaults(func=_cmd_migrate)
979
1034
  p_migrate_apply = migrate_sub.add_parser(
980
1035
  "apply", help="Write .grace from legacy docs (copy-and-validate; legacy untouched)"
@@ -986,6 +1041,11 @@ def main(argv_default: list[str] | None = None, argv: list[str] | None = None) -
986
1041
  action="store_true",
987
1042
  help="do not add M-* to MODULE_CONTRACT LINKS",
988
1043
  )
1044
+ p_migrate_apply.add_argument(
1045
+ "--json",
1046
+ action="store_true",
1047
+ help="print the full MigrationReport JSON (kept_existing, placeholders, issues, …)",
1048
+ )
989
1049
  p_migrate_apply.set_defaults(func=_cmd_migrate)
990
1050
 
991
1051
  # Phase policy — single writer/reader of AGENTS.md phase-block.
@@ -1043,6 +1103,11 @@ def main(argv_default: list[str] | None = None, argv: list[str] | None = None) -
1043
1103
  "a backend failure already exits 1 without this flag"
1044
1104
  ),
1045
1105
  )
1106
+ p_dc.add_argument(
1107
+ "--verbose",
1108
+ action="store_true",
1109
+ help="include files_examined (the per-file list) in the JSON; the count is always present",
1110
+ )
1046
1111
  p_dc.set_defaults(func=_cmd_detect_changes)
1047
1112
 
1048
1113
  # Graph daemon: OS-supervised engine owner. The client never starts it.
@@ -1114,6 +1179,12 @@ def main(argv_default: list[str] | None = None, argv: list[str] | None = None) -
1114
1179
  p_setup.add_argument("--skip-analyze", action="store_true", help="don't run first full analyze")
1115
1180
  p_setup.add_argument("--skip-skills", action="store_true", help="don't write per-IDE skill files")
1116
1181
  p_setup.add_argument("--dry-run", action="store_true", help="plan only; no fs/network changes")
1182
+ # The machine-readable report is opt-in: `setup` is a human-facing command,
1183
+ # and dumping it by default buried the step statuses under every path that
1184
+ # was written (prompts, methodology, per-IDE skill files).
1185
+ p_setup.add_argument(
1186
+ "--json", action="store_true", help="print the full JSON report (also written to .doubled-graph/logs/)"
1187
+ )
1117
1188
  p_setup.set_defaults(func=_cmd_setup)
1118
1189
 
1119
1190
  # Single removal path for everything `setup`/`daemon install` created.
@@ -136,8 +136,23 @@ def build_health_report(repo: Path) -> dict[str, Any]:
136
136
  for v in declared.verification.values()
137
137
  if v.module_id and v.described and not v.placeholder
138
138
  }
139
+ covered_module_ids = {
140
+ v.module_id for v in declared.verification.values() if v.module_id
141
+ }
142
+ # Two different gaps used to appear as two contradicting numbers in one
143
+ # report: `modules.without_verification` (nothing usable, including an
144
+ # empty placeholder) and `drift.by_type.missing_verification` (no V-* record
145
+ # at all). Name both counts explicitly; the list stays for compatibility.
146
+ modules_missing_verification = sorted(
147
+ mid for mid in declared.modules if mid not in covered_module_ids
148
+ )
149
+ modules_placeholder_verification = sorted(
150
+ mid
151
+ for mid in declared.modules
152
+ if mid in covered_module_ids and mid not in verified_module_ids
153
+ )
139
154
  modules_without_verification = sorted(
140
- mid for mid in declared.modules if mid not in verified_module_ids
155
+ set(modules_missing_verification) | set(modules_placeholder_verification)
141
156
  )
142
157
 
143
158
  # Any error-severity issue means the declared graph could not be read as a
@@ -258,6 +273,13 @@ def build_health_report(repo: Path) -> dict[str, Any]:
258
273
  "total": len(declared.modules),
259
274
  "verified": len(verified_module_ids & set(declared.modules.keys())),
260
275
  "without_verification": modules_without_verification,
276
+ # `missing` == drift.by_type.missing_verification; `placeholder`
277
+ # is a structurally valid but empty V-<M> (lint:
278
+ # verification.placeholder). Both make `ok` false.
279
+ "without_verification_breakdown": {
280
+ "missing": len(modules_missing_verification),
281
+ "placeholder": len(modules_placeholder_verification),
282
+ },
261
283
  },
262
284
  "verification": {"total_v_m_records": len(declared.verification)},
263
285
  "drift": {"total": drift_count, "by_type": drift_by_type},
@@ -924,13 +924,21 @@ class CGC:
924
924
  ``add_repository_to_graph`` (the old call) only registers a
925
925
  Repository node — no files are parsed. That was the root cause of
926
926
  ``analyze`` silently returning 0 symbols on every repo.
927
+
928
+ ``scan.exclude`` is passed to CGC as the *explicit* ignore file next
929
+ to the per-repo database (never written into the project). CGC merges
930
+ it with the project's own ``.cgcignore``, so full indexing and
931
+ ``detect_changes`` see the same universe of source files.
927
932
  """
928
933
  self._ensure()
929
934
  assert self._builder is not None
930
935
  assert self._loop is not None
936
+ ignore_path = self._managed_ignore_path()
931
937
  self._loop.run_until_complete(
932
938
  self._builder.build_graph_from_path_async(
933
- self.repo_path, is_dependency=False
939
+ self.repo_path,
940
+ is_dependency=False,
941
+ cgcignore_path=str(ignore_path),
934
942
  )
935
943
  )
936
944
  summary = getattr(self._builder, "last_index_summary", {}) or {}
@@ -948,13 +956,30 @@ class CGC:
948
956
  symbols = int(summary.get("function_nodes") or 0) + int(summary.get("class_nodes") or 0)
949
957
  return AnalyzeStats(
950
958
  files_processed=files,
951
- processed_files=self._full_index_processed_files(summary, files),
959
+ processed_files=self._full_index_processed_files(
960
+ summary, files, cgcignore_path=str(ignore_path)
961
+ ),
952
962
  symbols_added=symbols,
953
963
  edges_added=int(summary.get("call_edges") or 0),
954
964
  )
955
965
 
966
+ def _managed_ignore_path(self) -> Path:
967
+ """Ensure the daemon-side ``.cgcignore`` carries ``scan.exclude``.
968
+
969
+ The file lives next to the per-repo database, never in the project
970
+ tree, and is the single mechanism behind both CGC's discovery and
971
+ this product's ``DEFAULT_IGNORED_DIRS``. Loading config here (rather
972
+ than accepting an argument) keeps the daemon's ``analyze_full`` call
973
+ identical to the in-process one.
974
+ """
975
+ from doubled_graph.config import load_config
976
+
977
+ target = _repo_db_dir(self.repo_path, create=True) / ".cgcignore"
978
+ _ensure_managed_cgcignore(target, extra_patterns=load_config(self.repo_path).scan.exclude)
979
+ return target
980
+
956
981
  def _full_index_processed_files(
957
- self, summary: dict[str, Any], files: int
982
+ self, summary: dict[str, Any], files: int, cgcignore_path: str | None = None
958
983
  ) -> list[str]:
959
984
  """Per-file list for a full index (``TOOLS.md`` §1.2 promises names).
960
985
 
@@ -963,6 +988,10 @@ class CGC:
963
988
  the files that failed to parse. Best-effort by design: if discovery is
964
989
  unavailable or raises, the honest answer is an empty list, not a
965
990
  fabricated one — ``files_processed`` still reports the count.
991
+
992
+ ``cgcignore_path`` must be the same explicit file passed to the
993
+ builder: replaying discovery without it would list excluded scratch
994
+ files in the public stats even though the graph never received them.
966
995
  """
967
996
  if not files:
968
997
  return []
@@ -973,7 +1002,9 @@ class CGC:
973
1002
 
974
1003
  parser_extensions = set((getattr(self._builder, "parsers", {}) or {}).keys())
975
1004
  discovered, _ignore_root = discover_files_to_index(
976
- self.repo_path, supported_extensions=parser_extensions
1005
+ self.repo_path,
1006
+ cgcignore_path=cgcignore_path,
1007
+ supported_extensions=parser_extensions,
977
1008
  )
978
1009
  except Exception: # noqa: BLE001 — optional enrichment, not the index itself
979
1010
  return []
@@ -1991,7 +2022,7 @@ _CGCIGNORE_HEADER = (
1991
2022
  )
1992
2023
 
1993
2024
 
1994
- def _managed_cgcignore_patterns() -> list[str]:
2025
+ def _managed_cgcignore_patterns(extra_patterns: Iterable[str] = ()) -> list[str]:
1995
2026
  """Patterns the daemon-side ``.cgcignore`` always carries (P2-1, cycle 24).
1996
2027
 
1997
2028
  CGC's own defaults list 22 binary/media/venv patterns and knows nothing
@@ -2004,6 +2035,11 @@ def _managed_cgcignore_patterns() -> list[str]:
2004
2035
  The product already owns ``DEFAULT_IGNORED_DIRS`` for its own walks. Union
2005
2036
  it with CGC's defaults (as ``<dir>/`` patterns) so the two lists cannot
2006
2037
  drift: a directory this product prunes is never left for CGC to index.
2038
+
2039
+ ``extra_patterns`` is ``scan.exclude`` (``.dg-tmp/**``, ``node_modules/**``,
2040
+ …). It is appended last: CGC's matcher is last-match-wins, so an explicit
2041
+ project exclude cannot be re-included by a ``!pattern`` inherited from
2042
+ ``.gitignore``/the project's own ``.cgcignore``.
2007
2043
  """
2008
2044
  from codegraphcontext.tools.indexing.constants import ( # type: ignore
2009
2045
  DEFAULT_IGNORE_PATTERNS,
@@ -2016,38 +2052,41 @@ def _managed_cgcignore_patterns() -> list[str]:
2016
2052
  pattern = f"{name}/"
2017
2053
  if pattern not in patterns:
2018
2054
  patterns.append(pattern)
2055
+ for pattern in extra_patterns:
2056
+ normalized = pattern.strip()
2057
+ if normalized and normalized not in patterns:
2058
+ patterns.append(normalized)
2019
2059
  return patterns
2020
2060
 
2021
2061
 
2022
- def _ensure_managed_cgcignore(target: Path) -> None:
2023
- """Create or extend the daemon-side ignore file without losing user rules.
2062
+ def _ensure_managed_cgcignore(
2063
+ target: Path, extra_patterns: Iterable[str] = ()
2064
+ ) -> None:
2065
+ """Write the daemon-side ignore file with the current product patterns.
2024
2066
 
2025
2067
  The file lives next to the per-repo database (never in the project), so it
2026
- is product-owned; appending only the missing managed patterns keeps an
2027
- older file created by a previous version useful after an upgrade.
2068
+ is product-owned: project-specific rules belong in the repository's own
2069
+ ``.cgcignore``. Rewriting it (rather than append-only) matters for
2070
+ ``scan.exclude``: a pattern removed from the config must stop excluding
2071
+ files on the next analyze instead of persisting forever. An unreadable
2072
+ file is left untouched — discovery then falls back to CGC's defaults.
2028
2073
  """
2029
- patterns = _managed_cgcignore_patterns()
2074
+ patterns = _managed_cgcignore_patterns(extra_patterns)
2030
2075
  try:
2031
- if not target.exists():
2032
- target.write_text(
2033
- _CGCIGNORE_HEADER + "\n".join(patterns) + "\n",
2034
- encoding="utf-8",
2035
- )
2036
- return
2037
- existing = target.read_text(encoding="utf-8")
2038
- present = {
2039
- line.strip()
2040
- for line in existing.splitlines()
2041
- if line.strip() and not line.lstrip().startswith("#")
2042
- }
2043
- missing = [pattern for pattern in patterns if pattern not in present]
2044
- if not missing:
2045
- return
2046
- with target.open("a", encoding="utf-8") as handle:
2047
- if existing and not existing.endswith("\n"):
2048
- handle.write("\n")
2049
- handle.write("\n# doubled-graph product runtime directories\n")
2050
- handle.write("\n".join(missing) + "\n")
2076
+ if target.exists():
2077
+ existing = target.read_text(encoding="utf-8")
2078
+ present = {
2079
+ line.strip()
2080
+ for line in existing.splitlines()
2081
+ if line.strip() and not line.lstrip().startswith("#")
2082
+ }
2083
+ if present == set(patterns):
2084
+ return
2085
+ target.parent.mkdir(parents=True, exist_ok=True)
2086
+ target.write_text(
2087
+ _CGCIGNORE_HEADER + "\n".join(patterns) + "\n",
2088
+ encoding="utf-8",
2089
+ )
2051
2090
  except OSError:
2052
2091
  # The ignore file is an optimisation. A read-only/unwritable DB dir
2053
2092
  # will fail at backend start anyway; discovery must not crash here.
@@ -2087,8 +2126,12 @@ def _isolate_cgcignore() -> None:
2087
2126
  found = original(ignore_root, explicit_path=explicit_path)
2088
2127
  if found is not None:
2089
2128
  return found
2129
+ from doubled_graph.config import load_config
2130
+
2090
2131
  target = _repo_db_dir(Path(ignore_root)) / ".cgcignore"
2091
- _ensure_managed_cgcignore(target)
2132
+ _ensure_managed_cgcignore(
2133
+ target, extra_patterns=load_config(Path(ignore_root)).scan.exclude
2134
+ )
2092
2135
  return target
2093
2136
 
2094
2137
  _cgcignore.find_cgcignore = find_cgcignore