Skip to content

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented May 23, 2025

Summary

  • Adds ARCHITECTURE_README.md combining codebase analysis with deepwiki documentation
  • Includes system diagrams, component descriptions, and extension examples

Adds ARCHITECTURE_README.md with detailed technical overview including:
- Core component descriptions and relationships
- System diagrams using Mermaid
- Event flow and execution model documentation
- Extension points with code examples
- Performance considerations and best practices
- Remove execution model details (keeping only node ordering/sorting)
- Remove WebGL references
- Fix widget system details (add KnobWidget, correct type names)
- Update node lifecycle to focus on callbacks instead of execution
- Clarify that computeExecutionOrder is for ordering/layout, not execution
@christian-byrne
Copy link
Contributor Author

@webfiltered Anything look wrong? This doc can

  • give context to LLM code assistant tools
  • help onboard new people
  • assist OS contributors

@webfiltered
Copy link
Contributor

First impression is that it needs a bit of work. If this is LLM output, can you please share the workflow / prompts / etc? Unless there is a good reason not to do so publicly, I think this should be done for all our generated documents.

Comment on lines +11 to +22
```mermaid
graph TD
LiteGraph[LiteGraph Global] --> LGraph[Graph Data Structure]
LGraph --> LGraphNode[Node System]
LGraph --> LLink[Link System]
LGraph --> LGraphGroup[Groups]
LGraph --> Reroute[Reroutes]
LGraphCanvas[Canvas Renderer] --> LGraph
LGraphNode --> Widgets[Widget System]
LGraphNode --> Slots[Slot System]
Subgraph --> LGraph
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can review this properly but this graph seems a bit weird to me; intentionally hiding the names of the components with things like "Node System". To me at least, it's confusing - Isn't this entire library a node system?

@christian-byrne
Copy link
Contributor Author

christian-byrne commented May 24, 2025

The prompt was essentially:

Fetch and review all pages of this wiki https://deepwiki.com/Comfy-Org/litegraph.js. Next, look through the codebase and verify which aspects are true and which are false, while also supplementing with missing information. Then, distill the overview into a single markdown file, maintaining the broad architecture and diagrams. Don't include the aspects of the execution system, and make sure to double-check all information about widgets as it can be complex

Ran with claude code launched from the root of this repo

@christian-byrne
Copy link
Contributor Author

You can leave any further review comments if you get a chance and I can have it read and iterate on them, then check manually.

@webfiltered
Copy link
Contributor

This is the exact type of thing I'm trying to avoid. Unless I am missing something, it seems like it is pushing the burden of effort onto me, only with an inefficient, multi-step process.

It is extremely valuable to know how much effort has already been spent reviewing, before jumping in to review myself. I assume you did more than a prompt and a cursory glance, but even if you had only done that - no problem, that's a good start, let me know and I can just take it from there.

Reasoning is simply that you already have my trust; if you've checked something already I will skim for more obvious things, rather than analyse (e.g. reading at spoken-word speed, sometimes even pausing to consume from a few different viewpoints).

@christian-byrne
Copy link
Contributor Author

I see what you're saying, will adjust going forward.

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.

3 participants