diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 0803c006..3436ee4a 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -6,11 +6,11 @@ "url": "https://github.com/Shakes-tzd" }, "description": "HTML-based agent observability + workflow analytics. Git-first JSONL event tracking with rebuildable SQLite index. Zero external dependencies, works offline, version control friendly.", - "version": "0.33.77", + "version": "0.33.79", "plugins": [ { "name": "htmlgraph", - "version": "0.33.77", + "version": "0.33.79", "source": "./packages/claude-plugin", "description": "HTML-based agent observability + workflow analytics (Git-first JSONL + rebuildable SQLite index)", "category": "Development Tools", diff --git a/.claude/rules/code-hygiene.md b/.claude/rules/code-hygiene.md index 2ad21e09..ee638a57 100644 --- a/.claude/rules/code-hygiene.md +++ b/.claude/rules/code-hygiene.md @@ -45,3 +45,47 @@ git commit -m "..." ``` **Remember: Fixing errors immediately is faster than letting them accumulate.** + +## Module Size & Complexity Standards + +### Line Count Limits + +| Metric | Target | Warning | Fail (new code) | +|--------|--------|---------|------------------| +| Module | 200-500 lines | >300 lines | >500 lines | +| Function | 10-20 lines | >30 lines | >50 lines | +| Class | 100-200 lines | >200 lines | >300 lines | + +### Principles + +1. **Single Responsibility**: Each module should have one clear purpose describable in one sentence +2. **No Duplication**: Check `src/python/htmlgraph/utils/` for shared utilities before writing new ones +3. **Prefer Existing Dependencies**: Check `pyproject.toml` and stdlib before custom implementations +4. **Import Direction**: Dependencies flow one way (services -> models, never models -> services) + +### Enforcement + +- **Script**: `python scripts/check-module-size.py` checks all modules against limits +- **Pre-commit**: Runs automatically on changed files +- **Grandfathered modules**: 15 existing modules >1000 lines are tracked but not blocking (see `scripts/check-module-size.py` for list) +- **Ratchet rule**: Any modification to a grandfathered module must not increase its line count +- **Refactoring track**: See `docs/tracks/MODULE_REFACTORING_TRACK.md` for planned splits + +### Quick Commands + +```bash +# Check all modules +python scripts/check-module-size.py + +# Check only changed files +python scripts/check-module-size.py --changed-only + +# Summary table of oversized modules +python scripts/check-module-size.py --summary + +# JSON output for CI +python scripts/check-module-size.py --json + +# Strict mode (warnings = failures) +python scripts/check-module-size.py --fail-on-warning +``` diff --git a/.htmlgraph/features/feat-335cb001.html b/.htmlgraph/features/feat-335cb001.html new file mode 100644 index 00000000..62a0d602 --- /dev/null +++ b/.htmlgraph/features/feat-335cb001.html @@ -0,0 +1,36 @@ + + +
+ + + +Display oplog sequence, pending conflicts, consumer count, and pipeline lag in a status bar
+Color-code work item badges by type: feature/bug/spike/task/chore/epic/track/insight
+Strip claude- prefix and reformat version numbers (claude-3-5-sonnet -> 3-5.sonnet)
+Add text input to filter activity feed by agent name with 500ms debounce
+Port 5-family subagent badge system from HTMX (researcher/haiku/opus/test+debug/claude)
+Replace direct SQLite queries in Phoenix LiveView with HtmlGraph Python SDK calls via Elixir Port, enabling full graph traversal, step attribution, and edge queries from a single server.
+Wire Phoenix LiveView dashboard to use HtmlGraph Python SDK instead of raw SQLite queries. Use Elixir Port with a stdio JSON protocol to keep a warm Python process for low-latency SDK calls.
+The Phoenix dashboard currently duplicates query logic in Elixir that already exists in the Python SDK. It misses graph edges, step attribution, and ready-step resolution. Running two servers (FastAPI + Phoenix) is unnecessary.
+visual comparison testexpand feature, check edges sectioncheck event rows for step badgesmeasure latency in logskill Python, verify auto-restartPort all application-level features from the HTMX/Jinja2 dashboard to the Phoenix LiveView dashboard, achieving feature parity
+The HTMX dashboard has 6 features that are not HTMX-specific but were implemented there first. These are pure application logic that should be ported to Phoenix LiveView to achieve feature parity.
+Comparison analysis showed LiveView is architecturally superior (recursive components, server-side state, WebSocket diffs) but the HTMX version had a head start on feature polish. All HTMX advantages are application logic, not framework capabilities.
+visual inspectionunit test format_model_name/1manual testvisual inspectionmanual test with active sync+ <%= Phoenix.Flash.get(@flash, :info) %> +
++ <%= Phoenix.Flash.get(@flash, :error) %> +
+Events will appear here as agents work. The feed updates in real-time.
+