codedebrief 0.11.0__tar.gz → 0.12.0__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 (109) hide show
  1. {codedebrief-0.11.0 → codedebrief-0.12.0}/CHANGELOG.md +20 -0
  2. {codedebrief-0.11.0 → codedebrief-0.12.0}/PKG-INFO +16 -7
  3. {codedebrief-0.11.0 → codedebrief-0.12.0}/README.md +15 -6
  4. {codedebrief-0.11.0 → codedebrief-0.12.0}/pyproject.toml +1 -1
  5. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/install.py +33 -21
  6. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/mcp_server.py +50 -9
  7. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/render/assets/panels.js +7 -1
  8. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/render/assets/styles.css +5 -0
  9. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_artifacts_query_install.py +11 -4
  10. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_cli.py +11 -4
  11. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_mcp.py +9 -0
  12. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_render_html.py +4 -1
  13. {codedebrief-0.11.0 → codedebrief-0.12.0}/.gitignore +0 -0
  14. {codedebrief-0.11.0 → codedebrief-0.12.0}/CODE_OF_CONDUCT.md +0 -0
  15. {codedebrief-0.11.0 → codedebrief-0.12.0}/CONTRIBUTING.md +0 -0
  16. {codedebrief-0.11.0 → codedebrief-0.12.0}/LICENSE +0 -0
  17. {codedebrief-0.11.0 → codedebrief-0.12.0}/NOTICE +0 -0
  18. {codedebrief-0.11.0 → codedebrief-0.12.0}/SECURITY.md +0 -0
  19. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/src/ViewerApp.tsx +0 -0
  20. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/src/codedebrief-model.ts +0 -0
  21. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/src/flow-detail-layout.ts +0 -0
  22. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/src/flowchart-layout.ts +0 -0
  23. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/src/index.ts +0 -0
  24. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/src/mount.tsx +0 -0
  25. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/src/react-flow-adapter.ts +0 -0
  26. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/src/standalone.tsx +0 -0
  27. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/src/viewer-layout.ts +0 -0
  28. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/src/viewer-store.ts +0 -0
  29. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/tests/certifexp-local.test.tsx +0 -0
  30. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/tests/codedebrief-model.test.ts +0 -0
  31. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/tests/flowchart-layout.test.ts +0 -0
  32. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/tests/mount.test.tsx +0 -0
  33. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/tests/node-builtins.d.ts +0 -0
  34. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/tests/standalone.test.tsx +0 -0
  35. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/tests/viewer-app.test.tsx +0 -0
  36. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/tests/viewer-layout.test.ts +0 -0
  37. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/tsconfig.json +0 -0
  38. {codedebrief-0.11.0 → codedebrief-0.12.0}/frontend/vite.config.ts +0 -0
  39. {codedebrief-0.11.0 → codedebrief-0.12.0}/package-lock.json +0 -0
  40. {codedebrief-0.11.0 → codedebrief-0.12.0}/package.json +0 -0
  41. {codedebrief-0.11.0 → codedebrief-0.12.0}/schema/codedebrief.schema.json +0 -0
  42. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/__init__.py +0 -0
  43. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/__init__.py +0 -0
  44. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/common.py +0 -0
  45. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/discovery.py +0 -0
  46. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/languages/__init__.py +0 -0
  47. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/languages/_common.py +0 -0
  48. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/languages/c.py +0 -0
  49. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/languages/cpp.py +0 -0
  50. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/languages/csharp.py +0 -0
  51. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/languages/go.py +0 -0
  52. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/languages/java.py +0 -0
  53. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/languages/php.py +0 -0
  54. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/languages/ruby.py +0 -0
  55. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/languages/rust.py +0 -0
  56. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/project.py +0 -0
  57. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/python.py +0 -0
  58. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/registry.py +0 -0
  59. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/treesitter.py +0 -0
  60. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/analysis/typescript.py +0 -0
  61. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/artifacts.py +0 -0
  62. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/cli.py +0 -0
  63. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/config.py +0 -0
  64. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/doctor.py +0 -0
  65. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/model.py +0 -0
  66. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/py.typed +0 -0
  67. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/quality.py +0 -0
  68. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/query.py +0 -0
  69. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/render/__init__.py +0 -0
  70. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/render/assets/generated/codedebrief-viewer-runtime.iife.js +0 -0
  71. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/render/assets/shell.js +0 -0
  72. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/render/assets/tree.js +0 -0
  73. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/render/html.py +0 -0
  74. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/render/markdown.py +0 -0
  75. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/render/payload.py +0 -0
  76. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/render/snapshot.py +0 -0
  77. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/util.py +0 -0
  78. {codedebrief-0.11.0 → codedebrief-0.12.0}/src/codedebrief/validation.py +0 -0
  79. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_c_rust.py +0 -0
  80. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_call_resolver.py +0 -0
  81. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_certifexp_local.py +0 -0
  82. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_cross_flow_foundation.py +0 -0
  83. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_csharp_php.py +0 -0
  84. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_discovery.py +0 -0
  85. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_doctor.py +0 -0
  86. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_domain_modeling.py +0 -0
  87. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_go.py +0 -0
  88. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_ir_foundation.py +0 -0
  89. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_is_test_classification.py +0 -0
  90. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_java.py +0 -0
  91. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_javascript.py +0 -0
  92. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_markdown_render.py +0 -0
  93. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_match_dispatch.py +0 -0
  94. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_packaging.py +0 -0
  95. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_project.py +0 -0
  96. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_python_analyzer.py +0 -0
  97. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_quality.py +0 -0
  98. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_query.py +0 -0
  99. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_query_consumption.py +0 -0
  100. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_query_ranking.py +0 -0
  101. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_registry.py +0 -0
  102. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_render_payload.py +0 -0
  103. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_robustness.py +0 -0
  104. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_ruby.py +0 -0
  105. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_scopes.py +0 -0
  106. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_self_exclude.py +0 -0
  107. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_semantic_precision.py +0 -0
  108. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_snapshots.py +0 -0
  109. {codedebrief-0.11.0 → codedebrief-0.12.0}/tests/test_typescript_analyzer.py +0 -0
@@ -6,6 +6,26 @@ The project follows Semantic Versioning.
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 0.12.0 - 2026-06-21
10
+
11
+ ### Added
12
+
13
+ - Published the `codedebrief` package on PyPI and made `uv tool install codedebrief` the
14
+ primary README install path.
15
+ - Added a README screenshot for the manual `codedebrief view` canvas.
16
+
17
+ ### Changed
18
+
19
+ - Updated generated agent guidance so workflow artifacts are refreshed after
20
+ workflow-relevant changes before finalizing or committing.
21
+ - Made CodeDebrief workflow visuals vertical by default, with horizontal output reserved
22
+ for explicit compact-overview requests.
23
+
24
+ ### Fixed
25
+
26
+ - Fixed the manual viewer details rail so the Analysis Health panel no longer leaves a
27
+ stale empty source panel when no flow source is selected.
28
+
9
29
  ## 0.11.0 - 2026-06-21
10
30
 
11
31
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codedebrief
3
- Version: 0.11.0
3
+ Version: 0.12.0
4
4
  Summary: Visual code workflow explorer for coding agents. Builds deterministic, source-grounded Mermaid flowcharts via MCP, local-first, with no API key.
5
5
  Project-URL: Homepage, https://github.com/ferdinandobons/CodeDebrief
6
6
  Project-URL: Documentation, https://github.com/ferdinandobons/CodeDebrief#readme
@@ -75,7 +75,7 @@ user explicitly asks for a compact overview.
75
75
  > Status: pre-1.0 alpha. The model is versioned, but schema and MCP payloads may evolve
76
76
  > before 1.0.
77
77
  >
78
- > Latest release: [v0.11.0](https://github.com/ferdinandobons/CodeDebrief/releases/tag/v0.11.0)
78
+ > Latest release: [v0.12.0](https://github.com/ferdinandobons/CodeDebrief/releases/tag/v0.12.0)
79
79
  > · [Changelog](CHANGELOG.md)
80
80
 
81
81
  ## Why It Exists
@@ -103,7 +103,7 @@ uv tool install codedebrief
103
103
  To install a pinned GitHub release instead:
104
104
 
105
105
  ```bash
106
- uv tool install "git+https://github.com/ferdinandobons/CodeDebrief.git@v0.11.0"
106
+ uv tool install "git+https://github.com/ferdinandobons/CodeDebrief.git@v0.12.0"
107
107
  ```
108
108
 
109
109
  Or install from a source checkout:
@@ -229,10 +229,14 @@ Mermaid visual returned by CodeDebrief:
229
229
  inspection; they are not the canonical chat visual.
230
230
 
231
231
  The model may choose the first visible depth, but the text inside shown blocks must come
232
- from CodeDebrief payloads. The answer should say that the diagram is a bounded summary and
233
- can be expanded. If the user wants a more language-friendly view, the agent may rewrite
234
- labels in the user's language as a separate presentation layer, preserving ids or source
235
- anchors and without adding facts.
232
+ from CodeDebrief payloads. After the visual, the answer should include a short
233
+ high-level written flow in the user's language, derived from ordered steps, selected
234
+ flows, decisions, domain logic, and source ranges. That written flow should explain the
235
+ happy path first and include only the branches needed by the request. The answer should
236
+ also say that the diagram is a bounded summary and can be expanded. If the user wants a
237
+ more language-friendly view, the agent may rewrite both labels and the written flow in
238
+ the user's language as a separate presentation layer, preserving ids or source anchors
239
+ and without adding facts.
236
240
 
237
241
  ## MCP Surface
238
242
 
@@ -276,6 +280,11 @@ codedebrief view
276
280
  codedebrief view --render-only --no-open
277
281
  ```
278
282
 
283
+ ![CodeDebrief manual viewer showing the interactive project flowchart](docs/assets/codedebrief-view-preview.png)
284
+
285
+ Example manual view: the interactive browser canvas for exploring scopes, files, entry
286
+ points, and connected workflow flows.
287
+
279
288
  Use the viewer when you need to inspect the whole project graph, navigate scopes, compare
280
289
  neighboring flows, or visually follow callers and callees. Use MCP when an agent should
281
290
  answer a bounded question with a focused `workflow_slice`.
@@ -27,7 +27,7 @@ user explicitly asks for a compact overview.
27
27
  > Status: pre-1.0 alpha. The model is versioned, but schema and MCP payloads may evolve
28
28
  > before 1.0.
29
29
  >
30
- > Latest release: [v0.11.0](https://github.com/ferdinandobons/CodeDebrief/releases/tag/v0.11.0)
30
+ > Latest release: [v0.12.0](https://github.com/ferdinandobons/CodeDebrief/releases/tag/v0.12.0)
31
31
  > · [Changelog](CHANGELOG.md)
32
32
 
33
33
  ## Why It Exists
@@ -55,7 +55,7 @@ uv tool install codedebrief
55
55
  To install a pinned GitHub release instead:
56
56
 
57
57
  ```bash
58
- uv tool install "git+https://github.com/ferdinandobons/CodeDebrief.git@v0.11.0"
58
+ uv tool install "git+https://github.com/ferdinandobons/CodeDebrief.git@v0.12.0"
59
59
  ```
60
60
 
61
61
  Or install from a source checkout:
@@ -181,10 +181,14 @@ Mermaid visual returned by CodeDebrief:
181
181
  inspection; they are not the canonical chat visual.
182
182
 
183
183
  The model may choose the first visible depth, but the text inside shown blocks must come
184
- from CodeDebrief payloads. The answer should say that the diagram is a bounded summary and
185
- can be expanded. If the user wants a more language-friendly view, the agent may rewrite
186
- labels in the user's language as a separate presentation layer, preserving ids or source
187
- anchors and without adding facts.
184
+ from CodeDebrief payloads. After the visual, the answer should include a short
185
+ high-level written flow in the user's language, derived from ordered steps, selected
186
+ flows, decisions, domain logic, and source ranges. That written flow should explain the
187
+ happy path first and include only the branches needed by the request. The answer should
188
+ also say that the diagram is a bounded summary and can be expanded. If the user wants a
189
+ more language-friendly view, the agent may rewrite both labels and the written flow in
190
+ the user's language as a separate presentation layer, preserving ids or source anchors
191
+ and without adding facts.
188
192
 
189
193
  ## MCP Surface
190
194
 
@@ -228,6 +232,11 @@ codedebrief view
228
232
  codedebrief view --render-only --no-open
229
233
  ```
230
234
 
235
+ ![CodeDebrief manual viewer showing the interactive project flowchart](docs/assets/codedebrief-view-preview.png)
236
+
237
+ Example manual view: the interactive browser canvas for exploring scopes, files, entry
238
+ points, and connected workflow flows.
239
+
231
240
  Use the viewer when you need to inspect the whole project graph, navigate scopes, compare
232
241
  neighboring flows, or visually follow callers and callees. Use MCP when an agent should
233
242
  answer a bounded question with a focused `workflow_slice`.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "codedebrief"
7
- version = "0.11.0"
7
+ version = "0.12.0"
8
8
  description = "Visual code workflow explorer for coding agents. Builds deterministic, source-grounded Mermaid flowcharts via MCP, local-first, with no API key."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -104,27 +104,33 @@ flusso, or similar code path:
104
104
  9. If neither exact canonical Mermaid nor a returned Mermaid artifact can be used, say
105
105
  that the deterministic visual cannot be shown in this client and provide `viewer_targets`;
106
106
  never create a replacement Mermaid diagram from prose or source reads.
107
- 10. Say that the displayed diagram is a bounded summary of the selected logic and can be
108
- expanded. If the user asks for a more language-friendly version, rewrite the technical
109
- block labels in simple wording using the language of the user's request. Present that
110
- as a human-friendly translation derived only from returned node, edge, decision, and
111
- source fields.
112
- 11. End with concise follow-up choices in the user's language: simplify the labels into
113
- language-friendly wording, expand omitted nodes/branches/adjacent flows, or explore a
114
- related area or deeper path.
115
- 12. Also provide the `viewer_targets` command and hash
107
+ 10. After the visual, include a short "High-level flow" section in the user's language.
108
+ Derive it only from `ordered_steps`, primary/supporting flows, decisions,
109
+ domain logic, source ranges, and focused follow-up payloads. Keep it to a compact
110
+ happy-path walkthrough with only the branches needed by the question.
111
+ 11. Say that the displayed diagram is a bounded summary of the selected logic and can be
112
+ expanded.
113
+ 12. If the user asks for a more language-friendly version, rewrite both the technical
114
+ block labels and the high-level written flow in simple wording using the language of
115
+ the user's request. Present that as a human-friendly translation derived only from
116
+ returned node, edge, decision, step, and source fields.
117
+ 13. End with concise follow-up choices in the user's language: simplify the labels and
118
+ written flow into language-friendly wording, expand omitted nodes/branches/adjacent
119
+ flows, or explore a related area or deeper path.
120
+ 14. Also provide the `viewer_targets` command and hash
116
121
  target so the user can open the same visual in `codedebrief view`.
117
- 13. Treat `workflow_slice.presentation` as supporting context for this request, not as the
122
+ 15. Treat `workflow_slice.presentation` as supporting context for this request, not as the
118
123
  primary output.
119
- 14. Keep the textual summary short and secondary. Do not answer with raw JSON or YAML unless
124
+ 16. Keep the written flow short and secondary to the deterministic visual. Do not answer
125
+ with raw JSON or YAML unless
120
126
  the user explicitly asks for it.
121
127
 
122
128
  ## Guardrails
123
129
 
124
130
  - MCP is local-first and deterministic; do not ask for provider keys for the primary
125
131
  workflow.
126
- - Treat language-friendly labels as a presentation layer derived from deterministic
127
- workflow facts.
132
+ - Treat language-friendly labels and high-level written flows as presentation layers
133
+ derived from deterministic workflow facts.
128
134
  - Use CodeDebrief to explain modeled code logic, not to present possible defects.
129
135
  - Use `codedebrief view` only for the human manual UI.
130
136
  """
@@ -159,6 +165,10 @@ For codebase questions about behavior, decisions, workflow structure, or changed
159
165
  Inspect the full returned `workflow_slice` before deciding what to show. Choose the
160
166
  first visible depth yourself: show the clearest useful subset, then say that the
161
167
  displayed diagram is a bounded summary and can be expanded.
168
+ After the visual, include a short high-level written flow in the user's language,
169
+ derived only from returned ordered steps, primary/supporting flows, decisions, domain
170
+ logic, source ranges, and focused follow-up payloads. Keep it compact and explain the
171
+ happy path first, adding only the branches needed by the request.
162
172
  If the CodeDebrief result is too large, saved externally, truncated, or missing the exact
163
173
  canonical visual, retry with a smaller `token_budget` and narrower `flow_id`, `symbol`,
164
174
  `current_file`, or `scope`; do not recover by listing flows and hand-building a
@@ -169,12 +179,13 @@ For codebase questions about behavior, decisions, workflow structure, or changed
169
179
  explanation after the deterministic visual is shown and must not change displayed
170
180
  nodes, edges, labels, or branches. If neither exact canonical Mermaid nor a returned
171
181
  Mermaid artifact can be used, say so and provide `viewer_targets` instead of creating
172
- a replacement Mermaid diagram. If the user asks for a more language-friendly version, rewrite the
173
- technical block labels in simple wording using the language of the user's request. This
174
- is allowed only as a separate presentation layer derived from returned node, edge,
175
- decision, and source fields. End visual answers with concise options in the user's
176
- language: simplify labels, expand omitted nodes/branches/adjacent flows, or explore a
177
- related area. Show raw JSON or YAML only when explicitly requested.
182
+ a replacement Mermaid diagram. If the user asks for a more language-friendly version,
183
+ rewrite the technical block labels and the high-level written flow in simple wording
184
+ using the language of the user's request. This is allowed only as a separate
185
+ presentation layer derived from returned node, edge, decision, step, and source fields.
186
+ End visual answers with concise options in the user's language: simplify labels and
187
+ written flow, expand omitted nodes/branches/adjacent flows, or explore a related area.
188
+ Show raw JSON or YAML only when explicitly requested.
178
189
  4. Use `expand_slice`, `workflow_path`, `snapshot_slice`, `explain_flow`, `explain_node`,
179
190
  or `explain_edge` only when the first slice needs more precise context.
180
191
  5. Use `codedebrief view ...` only when a human wants the manual UI flowchart.
@@ -185,8 +196,9 @@ When helping a user set up or learn CodeDebrief:
185
196
  command you plan to run or recommend.
186
197
  2. Use `codedebrief doctor` when install, dependency, or parser capability issues are
187
198
  unclear.
188
- 3. Do not ask for LLM provider keys for the primary workflow. Language-friendly labels
189
- are a presentation layer derived from deterministic workflow facts.
199
+ 3. Do not ask for LLM provider keys for the primary workflow. Language-friendly labels and
200
+ high-level written flows are presentation layers derived from deterministic workflow
201
+ facts.
190
202
  4. `codedebrief setup-agent <target>` updates only that target's files. Run the command
191
203
  separately for each agent surface you want to configure, preserving any target-specific
192
204
  frontmatter and local notes.
@@ -753,6 +753,17 @@ def _workflow_presentation_contract(
753
753
  "label": "Canonical Visual",
754
754
  "source_fields": ["presentation.canonical_visual"],
755
755
  },
756
+ {
757
+ "label": "High-Level Flow",
758
+ "source_fields": [
759
+ "ordered_steps",
760
+ "primary_flows",
761
+ "supporting_flows",
762
+ "decisions",
763
+ "domain_logic",
764
+ "source_ranges",
765
+ ],
766
+ },
756
767
  {"label": "Primary Flows", "source_fields": ["primary_flows"]},
757
768
  {"label": "Supporting Flows", "source_fields": ["supporting_flows"]},
758
769
  {"label": "Ordered Steps", "source_fields": ["ordered_steps"]},
@@ -767,11 +778,17 @@ def _workflow_presentation_contract(
767
778
  "this payload.",
768
779
  "Tell the user the shown diagram is a bounded summary of the selected "
769
780
  "logic and can be expanded.",
781
+ "After the visual, add a short high-level written flow in the user's "
782
+ "language. Derive it from ordered_steps, primary/supporting flows, "
783
+ "decisions, domain_logic, source_ranges, and focused follow-up tool "
784
+ "payloads; keep the happy path first and include only branches needed "
785
+ "by the request.",
770
786
  "End visual answers with concise follow-up choices: simplify labels in "
771
787
  "the user's language, expand omitted nodes or branches, or explore a "
772
788
  "related area.",
773
- "A separate human-friendly translation may rewrite labels in the user's "
774
- "language only from returned node, edge, source, and decision fields.",
789
+ "A separate human-friendly translation may rewrite labels and the "
790
+ "high-level written flow in the user's language only from returned "
791
+ "node, edge, source, step, and decision fields.",
775
792
  "Use ordered_steps as the canonical walkthrough and keep source anchors visible.",
776
793
  "Keep flow_id and node_id values visible so the slice can be expanded.",
777
794
  "Do not invent steps, constants, limits, error codes, or branches outside "
@@ -803,8 +820,29 @@ def _workflow_presentation_contract(
803
820
  "but it must preserve all displayed facts exactly from the selected "
804
821
  "workflow_slice or focused follow-up tool payloads."
805
822
  ),
823
+ "written_flow": {
824
+ "placement": "After the visual and before follow-up choices.",
825
+ "language": "Use the language of the user's request.",
826
+ "source_fields": [
827
+ "ordered_steps",
828
+ "primary_flows",
829
+ "supporting_flows",
830
+ "decisions",
831
+ "domain_logic",
832
+ "source_ranges",
833
+ ],
834
+ "style": (
835
+ "Keep it compact, high-level, and source-grounded. Explain the "
836
+ "happy path first, then only the branches needed by the user's "
837
+ "question. Do not introduce facts absent from the payload."
838
+ ),
839
+ "language_friendly_rewrite": (
840
+ "When simplifying diagram labels, rewrite this written flow with "
841
+ "the same simplified wording and language."
842
+ ),
843
+ },
806
844
  "closing_options": [
807
- "Offer a language-friendly rewrite of the graph labels in the user's language.",
845
+ "Offer a language-friendly rewrite of the graph labels and written flow.",
808
846
  "Offer to expand the diagram with omitted nodes, branches, or adjacent flows.",
809
847
  "Offer to explore another related area or deepen a specific path.",
810
848
  ],
@@ -817,8 +855,9 @@ def _workflow_presentation_contract(
817
855
  "human_friendly": (
818
856
  "A human-friendly translation may replace technical labels with "
819
857
  "clearer wording in the language used by the user, only as a separate "
820
- "presentation layer. Preserve ids or source anchors and do not add "
821
- "facts absent from the workflow_slice payload."
858
+ "presentation layer. Rewrite the high-level written flow with the "
859
+ "same simplified terminology. Preserve ids or source anchors and do "
860
+ "not add facts absent from the workflow_slice payload."
822
861
  ),
823
862
  },
824
863
  "media_policy": {
@@ -851,10 +890,12 @@ def _workflow_presentation_contract(
851
890
  "block as the primary visual unless the user asks for raw or copyable Mermaid. "
852
891
  "Do not render snapshot.svg inline by default; use SVG only when explicitly "
853
892
  "requested or for local inspection. Do not synthesize a new Mermaid diagram. "
854
- "Explain that the diagram is a bounded summary and can be expanded. End with "
855
- "options to simplify labels in the user's language, expand the graph with "
856
- "omitted details, or explore a related area. Open viewer_targets with "
857
- "codedebrief view for manual inspection."
893
+ "Explain that the diagram is a bounded summary and can be expanded. Add a "
894
+ "short high-level written flow in the user's language after the visual and "
895
+ "before follow-up options. End with options to simplify labels and the "
896
+ "written flow in the user's language, expand the graph with omitted details, "
897
+ "or explore a related area. Open viewer_targets with codedebrief view for "
898
+ "manual inspection."
858
899
  ),
859
900
  "canonical_visual": canonical_visual,
860
901
  "recommended_next_tools": {
@@ -17,6 +17,7 @@
17
17
  const sourcePanel = document.getElementById("sourcePanel");
18
18
  const sourceBody = document.getElementById("source");
19
19
  const sourceFileEl = document.getElementById("sourceFile");
20
+ const rightRail = document.getElementById("rightRail");
20
21
  const qualityPanel = document.getElementById("qualityPanel");
21
22
  const qualityBody = document.getElementById("quality");
22
23
  const qualityCountEl = document.getElementById("qualityCount");
@@ -36,6 +37,11 @@
36
37
  if (node) node.replaceChildren();
37
38
  }
38
39
 
40
+ function setSourcePanelVisible(visible) {
41
+ if (sourcePanel) sourcePanel.hidden = !visible;
42
+ if (rightRail) rightRail.toggleAttribute("data-source-hidden", !visible);
43
+ }
44
+
39
45
  function metricValue(value) {
40
46
  if (value == null || value === "") return "0";
41
47
  if (typeof value === "number") return String(value);
@@ -265,7 +271,7 @@
265
271
  const flow = sourceFlowFor(sel || {});
266
272
  clear(sourceBody);
267
273
  if (sourceFileEl) sourceFileEl.textContent = "";
268
- if (sourcePanel) sourcePanel.hidden = !flow;
274
+ setSourcePanelVisible(!!flow);
269
275
 
270
276
  if (!flow) {
271
277
  sourceBody.appendChild(el("p", "panel-empty", "Select a flow or node to view its source."));
@@ -1274,6 +1274,11 @@
1274
1274
  overflow: hidden;
1275
1275
  }
1276
1276
  .panel-quality { flex: 0 0 auto; max-height: 260px; border-bottom: 1px solid var(--line); }
1277
+ .right-rail[data-source-hidden] .panel-quality {
1278
+ flex: 1 1 auto;
1279
+ max-height: none;
1280
+ border-bottom: 0;
1281
+ }
1277
1282
  .panel-source { flex: 1 1 48%; border-bottom: 1px solid var(--line); }
1278
1283
  .panel[data-collapsed] {
1279
1284
  flex: 0 0 auto;
@@ -63,9 +63,13 @@ def _assert_current_agent_instructions(content: str) -> None:
63
63
  assert "hand-building a\n diagram" in content
64
64
  assert "bounded summary" in content
65
65
  assert "can be expanded" in content
66
+ assert "short high-level written flow" in content
67
+ assert "happy path first" in content
68
+ assert "only the branches needed by the request" in content
66
69
  assert "language-friendly" in content
70
+ assert "technical block labels and the high-level written flow" in content
67
71
  assert "language of the user's request" in content
68
- assert "simplify labels" in content
72
+ assert "simplify labels and\n written flow" in content
69
73
  assert "omitted nodes/branches/adjacent flows" in content
70
74
  assert "related area" in content
71
75
  assert "synthesize a new Mermaid" in content
@@ -123,10 +127,13 @@ def _assert_codedebrief_skill(content: str) -> None:
123
127
  assert "hand-building a diagram" in content
124
128
  assert "low-signal implementation node" in content
125
129
  assert "bounded summary" in content
130
+ assert 'short "High-level flow" section' in content
131
+ assert "compact\n happy-path walkthrough" in content
126
132
  assert "human-friendly" in content
127
133
  assert "language-friendly" in content
128
- assert "language of the user's request" in content
129
- assert "simplify the labels" in content
134
+ assert "block labels and the high-level written flow" in content
135
+ assert "language of\n the user's request" in content
136
+ assert "simplify the labels and\n written flow" in content
130
137
  assert "expand omitted" in content
131
138
  assert "related area or deeper path" in content
132
139
  assert "synthesize a new Mermaid" in content
@@ -138,7 +145,7 @@ def _assert_codedebrief_skill(content: str) -> None:
138
145
  assert "workflow_slice.handle.flow_ids" in content
139
146
  assert "`viewer_targets` command" in content
140
147
  assert "`workflow_slice.presentation` as supporting context" in content
141
- assert "Do not answer with raw JSON or YAML" in content
148
+ assert "Do not answer\n with raw JSON or YAML" in content
142
149
  assert "POTENTIAL_GAP" not in content
143
150
 
144
151
 
@@ -44,9 +44,13 @@ def _assert_current_agent_instructions(content: str) -> None:
44
44
  assert "hand-building a\n diagram" in content
45
45
  assert "bounded summary" in content
46
46
  assert "can be expanded" in content
47
+ assert "short high-level written flow" in content
48
+ assert "happy path first" in content
49
+ assert "only the branches needed by the request" in content
47
50
  assert "language-friendly" in content
51
+ assert "technical block labels and the high-level written flow" in content
48
52
  assert "language of the user's request" in content
49
- assert "simplify labels" in content
53
+ assert "simplify labels and\n written flow" in content
50
54
  assert "omitted nodes/branches/adjacent flows" in content
51
55
  assert "related area" in content
52
56
  assert "synthesize a new Mermaid" in content
@@ -103,10 +107,13 @@ def _assert_codedebrief_skill(content: str) -> None:
103
107
  assert "hand-building a diagram" in content
104
108
  assert "low-signal implementation node" in content
105
109
  assert "bounded summary" in content
110
+ assert 'short "High-level flow" section' in content
111
+ assert "compact\n happy-path walkthrough" in content
106
112
  assert "human-friendly" in content
107
113
  assert "language-friendly" in content
108
- assert "language of the user's request" in content
109
- assert "simplify the labels" in content
114
+ assert "block labels and the high-level written flow" in content
115
+ assert "language of\n the user's request" in content
116
+ assert "simplify the labels and\n written flow" in content
110
117
  assert "expand omitted" in content
111
118
  assert "related area or deeper path" in content
112
119
  assert "synthesize a new Mermaid" in content
@@ -117,7 +124,7 @@ def _assert_codedebrief_skill(content: str) -> None:
117
124
  assert "`workflow_slice` payload" in content
118
125
  assert "`viewer_targets` command" in content
119
126
  assert "`workflow_slice.presentation` as supporting context" in content
120
- assert "Do not answer with raw JSON or YAML" in content
127
+ assert "Do not answer\n with raw JSON or YAML" in content
121
128
 
122
129
 
123
130
  def test_top_level_help_prioritizes_flag_light_quickstart() -> None:
@@ -245,10 +245,19 @@ def test_workflow_slice_anchors_natural_query_to_one_primary_flow(tmp_path: Path
245
245
  assert "start-flow" in {flow["id"] for flow in workflow_slice["supporting_flows"]}
246
246
  assert workflow_slice["presentation"]["schema_version"] == "workflow_slice.presentation.v1"
247
247
  assert "bounded summary" in " ".join(workflow_slice["presentation"]["agent_guidance"])
248
+ assert "high-level written flow" in " ".join(workflow_slice["presentation"]["agent_guidance"])
249
+ assert "High-Level Flow" in {
250
+ section["label"] for section in workflow_slice["presentation"]["default_sections"]
251
+ }
252
+ written_flow_policy = workflow_slice["presentation"]["display_policy"]["written_flow"]
253
+ assert written_flow_policy["placement"] == "After the visual and before follow-up choices."
254
+ assert "ordered_steps" in written_flow_policy["source_fields"]
255
+ assert "same simplified wording" in written_flow_policy["language_friendly_rewrite"]
248
256
  assert "language-friendly rewrite" in " ".join(
249
257
  workflow_slice["presentation"]["display_policy"]["closing_options"]
250
258
  )
251
259
  assert "human-friendly" in workflow_slice["presentation"]["label_policy"]["human_friendly"]
260
+ assert "high-level written flow" in workflow_slice["presentation"]["visual_guidance"]
252
261
 
253
262
  canonical_visual = workflow_slice["presentation"]["canonical_visual"]
254
263
  assert canonical_visual["schema_version"] == "workflow_slice.canonical_visual.v1"
@@ -284,7 +284,10 @@ def test_render_html_wires_state_aware_viewer_controls(tmp_path: Path) -> None:
284
284
  # The Source panel is meaningful only when a file/flow is selected; scope/root views
285
285
  # keep the details rail focused on analysis health instead of placeholder source
286
286
  # content.
287
- assert "sourcePanel.hidden = !flow" in html
287
+ assert "sourcePanel.hidden = !visible" in html
288
+ assert 'rightRail.toggleAttribute("data-source-hidden", !visible)' in html
289
+ assert ".right-rail[data-source-hidden] .panel-quality" in html
290
+ assert "max-height: none" in html
288
291
 
289
292
  # Analysis-health metrics are surfaced in the details rail from generated metadata,
290
293
  # giving large-codebase exploration a visible analyzer coverage and precision snapshot.
File without changes
File without changes
File without changes
File without changes
File without changes