Skip to content

Conversation

@madmax983
Copy link
Owner

🌟 Nova: Sentence Diagrammer

💡 The Spark: "The core innovation of Glossa is the slot-based assembler that mimics how the human brain processes Greek. Why not visualize it?"

🚀 The Feature: Implemented glossa diagram <file> which outputs a Mermaid flowchart showing exactly how the compiler parsed the sentence into grammatical roles (Subject, Object, Verb, etc.).

🔮 The Potential:

  • Debugging: See why your sentence isn't compiling (e.g. "Oh, it thinks that's a Participle, not an Object!").
  • Education: Learn Ancient Greek grammar by seeing how computer code is "diagrammed".
  • Documentation: Auto-generate diagrams for codebases.

⚠️ Risk: Low. Isolated in src/experimental/diagram.rs and only touches src/semantic/mod.rs to change visibility of one function.


PR created automatically by Jules for task 9531195966302945497 started by @madmax983

- Implemented `src/experimental/diagram.rs` to generate Mermaid flowcharts from `AssembledStatement`.
- Exposed `analyze_single_statement_with_assembler` in `src/semantic/mod.rs` to allow access to raw assembler data.
- Added `Diagram` subcommand to `src/main.rs`.
- Added `src/experimental` module structure.

This feature allows users to see how the compiler interprets their Greek sentences by visualizing the grammatical slots (Subject, Verb, Object, etc.), serving as both a debugging tool and an educational aid.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 92.18750% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.22%. Comparing base (b4f033f) to head (73370a1).

Files with missing lines Patch % Lines
src/experimental/diagram.rs 94.54% 3 Missing ⚠️
src/main.rs 75.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##            trunk     #161      +/-   ##
==========================================
+ Coverage   80.96%   81.22%   +0.26%     
==========================================
  Files          25       26       +1     
  Lines        3740     3803      +63     
==========================================
+ Hits         3028     3089      +61     
- Misses        712      714       +2     
Files with missing lines Coverage Δ
src/semantic/mod.rs 100.00% <100.00%> (ø)
src/main.rs 14.00% <75.00%> (+4.14%) ⬆️
src/experimental/diagram.rs 94.54% <94.54%> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4f033f...73370a1. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Implemented `src/experimental/diagram.rs` to generate Mermaid flowcharts from `AssembledStatement`.
- Exposed `analyze_single_statement_with_assembler` in `src/semantic/mod.rs` as `pub(crate)` to allow internal access to raw assembler data.
- Added `Diagram` subcommand to `src/main.rs`.
- Added comprehensive tests for diagram generation, including error cases and definitions.
- Ensured proper visibility rules and compilation safety.

This feature allows users to see how the compiler interprets their Greek sentences by visualizing the grammatical slots (Subject, Verb, Object, etc.), serving as both a debugging tool and an educational aid.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
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