Skip to content

Commit 4ba409a

Browse files
author
Bryan Howard
committed
Reorganize documentation structure and streamline CLAUDE.md
- Restructure docs/ with logical organization: - architecture/ for technical design docs - specifications/ for feature specs - development/ for testing guides and implementation notes - Break down monolithic TODO.md into focused documents: - roadmap.md for feature priorities - competitive-analysis.md for missing features analysis - development/implementation-notes.md for technical priorities - Update testing documentation to match current 18+ test suite - Streamline CLAUDE.md from 190 to 62 lines (67% reduction) - Fix documentation errors: module counts, test infrastructure, architecture - Add comprehensive navigation guide (docs/README.md)
1 parent 2fd90b9 commit 4ba409a

13 files changed

Lines changed: 937 additions & 320 deletions

CLAUDE.md

Lines changed: 37 additions & 165 deletions
Original file line numberDiff line numberDiff line change
@@ -1,189 +1,61 @@
11
# CLAUDE.md
22

3-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4-
53
## Project Overview
64

7-
PyFlowGraph is a universal node-based visual scripting editor built with Python and PySide6. It allows users to create, connect, and execute Python code as nodes in a data-driven graph. The project follows a "Code as Nodes" philosophy where pins are automatically generated by parsing Python function signatures.
8-
9-
## Common Commands
10-
11-
### Running the Application
12-
13-
- **Windows**: `run.bat` or `.\run.bat`
14-
- **Linux/macOS**: `./run.sh`
15-
- Both scripts automatically activate the virtual environment and run `src/main.py`
16-
17-
### Environment Setup
18-
19-
1. Create virtual environment: `python3 -m venv venv`
20-
2. Activate environment:
21-
- Windows: `venv\Scripts\activate`
22-
- Linux/macOS: `source venv/bin/activate`
23-
3. Install dependencies: `pip install PySide6`
24-
25-
### Virtual Environment Management
26-
27-
- The application creates project-specific virtual environments in the `venvs/` directory
28-
- Each graph can have its own isolated environment with custom pip dependencies
29-
- Use "Run > Manage Environment" in the application to configure environments
30-
31-
## Architecture Overview
5+
PyFlowGraph: Universal node-based visual scripting editor built with Python and PySide6. "Code as Nodes" philosophy with automatic pin generation from Python function signatures.
326

33-
### Core Application Structure
7+
## Commands
348

35-
All source code is organized in the `src/` directory:
9+
**Running**: `run.bat` (Windows) or `./run.sh` (Linux/macOS)
10+
**Testing**: `run_test_gui.bat` - Professional GUI test runner
11+
**Dependencies**: `pip install PySide6`
3612

37-
- **src/main.py**: Entry point, loads Font Awesome fonts and QSS stylesheet
38-
- **src/node_editor_window.py**: Main QMainWindow with menus, toolbars, and dock widgets
39-
- **src/node_editor_view.py**: QGraphicsView handling mouse/keyboard interactions (pan, zoom, copy/paste)
40-
- **src/node_graph.py**: QGraphicsScene managing nodes, connections, and clipboard operations
41-
- **src/graph_executor.py**: Execution engine that runs node graphs using subprocess isolation
13+
## Architecture
4214

43-
### Node System
15+
**Core**: `src/` contains 25+ Python modules
16+
- `main.py` - Entry point with Font Awesome fonts/QSS
17+
- `node_editor_window.py` - Main QMainWindow
18+
- `node_editor_view.py` - QGraphicsView (pan/zoom/copy/paste)
19+
- `node_graph.py` - QGraphicsScene (nodes/connections/clipboard)
20+
- `graph_executor.py` - Execution engine with subprocess isolation
21+
- `commands/` - Command pattern for undo/redo system
4422

45-
- **src/node.py**: Main Node class with automatic pin generation from Python function parsing
46-
- **src/pin.py**: Input/output connection points with type-based coloring
47-
- **src/connection.py**: Bezier curve connections between pins
48-
- **src/reroute_node.py**: Simple organizational nodes for connection routing
49-
50-
### Code Editing
51-
52-
- **src/code_editor_dialog.py**: Modal dialog containing the code editor
53-
- **src/python_code_editor.py**: Core editor widget with line numbers and smart indentation
54-
- **src/python_syntax_highlighter.py**: Python syntax highlighting implementation
55-
56-
### Event System
57-
58-
- **src/event_system.py**: Event-driven execution system for interactive applications with live mode support
59-
60-
### Utilities
61-
62-
- **src/color_utils.py**: Color manipulation utilities
63-
- **src/environment_manager.py**: Virtual environment management dialog
64-
- **src/settings_dialog.py**: Application settings configuration
65-
- **src/node_properties_dialog.py**: Node property editing interface
66-
- **src/ui_utils.py**: Common UI utility functions and helpers
67-
- **src/view_state_manager.py**: View state management for zoom and pan operations
68-
- **src/execution_controller.py**: Central execution control and coordination
69-
- **src/file_operations.py**: File loading, saving, and import/export operations
70-
- **src/flow_format.py**: Markdown flow format parsing and serialization
71-
- **src/test_runner_gui.py**: Professional GUI-based test runner for development
23+
**Node System**: `node.py`, `pin.py`, `connection.py`, `reroute_node.py`
24+
**Code Editing**: `code_editor_dialog.py`, `python_code_editor.py`, `python_syntax_highlighter.py`
25+
**Event System**: `event_system.py` - Live mode execution support
7226

7327
## Key Concepts
7428

75-
### Node Function Parsing
76-
77-
- Nodes automatically generate input pins from function parameters with type hints
78-
- Output pins are created from return type annotations
79-
- Supports single outputs (`-> str`) and multiple outputs (`-> Tuple[str, int]`)
80-
- Type hints determine pin colors: `int`, `str`, `float`, `bool`, `Tuple`
81-
82-
### Data Flow Execution
83-
84-
- Graph execution is data-driven, not control-flow based
85-
- Nodes execute when all input dependencies are satisfied
86-
- Each node runs in an isolated subprocess for security
87-
- Pin values are serialized/deserialized as JSON between nodes
88-
- Supports both **Batch Mode** (traditional sequential execution) and **Live Mode** (event-driven interactive execution)
89-
90-
### Graph Persistence
91-
92-
- Graphs save to clean JSON format in the `examples/` directory
93-
- Node positions, connections, and code are preserved
94-
- Virtual environment requirements are stored with each graph
29+
**Node Function Parsing**: Automatic pin generation from Python function signatures with type hints
30+
**Data Flow Execution**: Data-driven (not control-flow), subprocess isolation, JSON serialization
31+
**Graph Persistence**: Clean JSON format, saved to `examples/` directory
9532

9633
## File Organization
9734

98-
### Project Structure
99-
100-
The project follows a clean, organized structure:
101-
10235
```
10336
PyFlowGraph/
104-
├── src/ # All Python source code
105-
│ ├── resources/ # Font Awesome fonts embedded in src
106-
│ └── test_runner_gui.py # Professional GUI test runner
107-
├── tests/ # All test files
108-
├── docs/ # Static documentation
109-
├── test_reports/ # Generated test outputs and summaries
110-
├── examples/ # Sample graph files (10 examples)
111-
├── images/ # Screenshots and documentation images
112-
├── pre-release/ # Pre-built releases and binaries
113-
├── venv/ # Main application virtual environment
114-
├── venvs/ # Project-specific virtual environments
115-
├── .github/workflows/ # CI/CD pipeline
116-
├── run.bat, run.sh # Application launcher scripts
117-
├── run_test_gui.bat # Professional test runner GUI launcher
118-
├── dark_theme.qss # Application stylesheet
119-
├── requirements.txt # Python dependencies
120-
├── LICENSE.txt # Project license
121-
├── README.md # Project readme
122-
└── CLAUDE.md # This file
37+
├── src/ # 25+ Python modules + commands/
38+
├── tests/ # 18+ test files with GUI test runner
39+
├── docs/ # Organized documentation
40+
│ ├── architecture/ # Technical architecture docs
41+
│ ├── specifications/ # Feature specs (flow_spec.md, ui-ux, etc.)
42+
│ └── development/ # Testing guides, implementation notes
43+
├── examples/ # Sample .md graph files
44+
├── venv/ + venvs/ # Virtual environments
45+
└── run.bat, run_test_gui.bat # Launchers
12346
```
12447

125-
### Core Directories
126-
127-
- **`src/`**: All 24 Python modules organized in one location
128-
- **`tests/`**: 7 test files with comprehensive GUI and execution testing
129-
- **`docs/`**: Hand-written documentation (flow_spec.md, test guides)
130-
- **`test_reports/`**: Auto-generated test outputs and summaries
131-
- **`examples/`**: 10 sample .md graph files demonstrating features
132-
- **`images/`**: Screenshots and documentation images for project visualization
133-
- **`pre-release/`**: Pre-built application binaries and releases
134-
- **`venv/`**: Main application virtual environment
135-
- **`venvs/`**: Isolated Python environments for individual graph execution
136-
13748
## Testing
13849

139-
### Test Organization
140-
141-
The test suite is organized around PyFlowGraph's core functional components:
142-
143-
- **tests/test_node_system.py**: Core Node functionality (creation, properties, code management, serialization)
144-
- **tests/test_pin_system.py**: Pin creation, type detection, positioning, and connection compatibility
145-
- **tests/test_connection_system.py**: Connection/bezier curve creation, serialization, and reroute nodes
146-
- **tests/test_graph_management.py**: Graph operations (node/connection management, clipboard, clearing)
147-
- **tests/test_execution_engine.py**: Code execution, flow control, subprocess isolation, error handling
148-
- **tests/test_file_formats.py**: Markdown and JSON format parsing, conversion, and file operations
149-
- **tests/test_integration.py**: End-to-end workflows and real-world usage scenarios
150-
151-
### Running Tests
152-
153-
- **Test GUI**: `run_test_gui.bat` - Professional PySide6 test runner with visual interface
154-
- **Manual**: `python tests/test_name.py` - Individual test files
155-
- **Direct GUI**: `python src/test_runner_gui.py` - Run test GUI directly
156-
157-
### Test Runner Features
158-
159-
The new test runner GUI provides:
160-
- Automatic test discovery from the `tests/` directory
161-
- Visual test selection with checkboxes
162-
- Real-time status indicators (green/red circles for pass/fail)
163-
- Detailed test output viewing with syntax highlighting
164-
- Background execution with progress tracking
165-
- 5-second timeout per test for fast feedback
166-
- Professional dark theme matching the main application
167-
168-
### Test Design Principles
169-
170-
- **Focused Coverage**: Each test module covers a single core component
171-
- **Fast Execution**: All tests complete within 5 seconds total runtime
172-
- **Deterministic**: Tests are reliable and not flaky
173-
- **Comprehensive**: 100% coverage of fundamental functionality
174-
- **Integration Testing**: Real-world usage scenarios and error conditions
50+
**Current Suite**: 18+ test files covering node system, pins, connections, execution, file formats
51+
**GUI Runner**: `run_test_gui.bat` - Professional PySide6 interface with real-time status
52+
**Coverage**: Core components, command system, integration scenarios
17553

17654
## Development Notes
17755

178-
- This is an experimental AI-generated codebase for learning purposes
179-
- The application uses PySide6 for the Qt-based GUI
180-
- Font Awesome integration provides professional iconography
181-
- All nodes execute in isolated environments for security
182-
- Dependencies are managed via `requirements.txt` (PySide6, Nuitka for compilation)
183-
- Don't add claude attribution to git commits. Don't ever add that it was generated with claude at the end of comments. This is bloat! Stop that!
184-
- Don't use emoji's in code! it always fucks things up.
185-
186-
## Documentation and markdown files
187-
188-
- no emoji in code. no em dashes.
189-
- no marketing BS. Only clean, professional, technical
56+
- Experimental AI-generated codebase for learning
57+
- PySide6 Qt-based GUI with Font Awesome icons
58+
- Isolated subprocess execution for security
59+
- No Claude attribution in commits or code comments
60+
- No emojis in code - causes issues
61+
- Clean, professional, technical documentation only

docs/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# PyFlowGraph Documentation
2+
3+
This directory contains comprehensive documentation for the PyFlowGraph project, organized by purpose and audience.
4+
5+
## Quick Navigation
6+
7+
### For Product Strategy & Planning
8+
- **[PRD](prd.md)** - Product Requirements Document
9+
- **[Roadmap](roadmap.md)** - Feature development roadmap and priorities
10+
- **[Competitive Analysis](competitive-analysis.md)** - Missing features vs competitors
11+
12+
### For Architecture & Technical Design
13+
- **[Technical Architecture](architecture/technical_architecture.md)** - Core system architecture
14+
- **[Brownfield Architecture](architecture/brownfield-architecture.md)** - Legacy system considerations
15+
- **[Source Tree](architecture/source-tree.md)** - Codebase organization
16+
- **[Tech Stack](architecture/tech-stack.md)** - Technology choices and rationale
17+
- **[Coding Standards](architecture/coding-standards.md)** - Development guidelines
18+
19+
### For Feature Specifications
20+
- **[Flow Specification](specifications/flow_spec.md)** - Core flow format specification
21+
- **[UI/UX Specifications](specifications/ui-ux-specifications.md)** - Interface design specs
22+
- **[Priority 1 Features](specifications/priority-1-features-project-brief.md)** - Critical feature brief
23+
24+
### For Development & Implementation
25+
- **[Testing Guide](development/testing-guide.md)** - Test runner and testing strategies
26+
- **[Implementation Notes](development/implementation-notes.md)** - Technical implementation priorities
27+
- **[Fixes Directory](development/fixes/)** - Specific implementation and fix plans
28+
29+
## Document Organization
30+
31+
### Strategic Documents
32+
High-level product and business documentation for stakeholders and product planning.
33+
34+
### Architecture Documents
35+
Technical architecture, system design, and structural documentation for architects and senior developers.
36+
37+
### Specifications
38+
Detailed feature and interface specifications for development teams.
39+
40+
### Development Documentation
41+
Implementation guides, testing procedures, and development tooling for active contributors.
42+
43+
## Contributing to Documentation
44+
45+
When adding new documentation:
46+
- Place strategic docs in the root `docs/` directory
47+
- Place technical architecture in `architecture/`
48+
- Place feature specs in `specifications/`
49+
- Place implementation details in `development/`
50+
- Update this README with new document links

docs/TEST_RUNNER_README.md

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)