htmlgraph 0.27.4__py3-none-any.whl → 0.27.6__py3-none-any.whl
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.
- htmlgraph/__init__.py +1 -1
- htmlgraph/orchestrator-system-prompt-optimized.txt +20 -20
- htmlgraph/sdk/operations/mixin.py +60 -0
- {htmlgraph-0.27.4.dist-info → htmlgraph-0.27.6.dist-info}/METADATA +1 -1
- {htmlgraph-0.27.4.dist-info → htmlgraph-0.27.6.dist-info}/RECORD +12 -12
- {htmlgraph-0.27.4.data → htmlgraph-0.27.6.data}/data/htmlgraph/dashboard.html +0 -0
- {htmlgraph-0.27.4.data → htmlgraph-0.27.6.data}/data/htmlgraph/styles.css +0 -0
- {htmlgraph-0.27.4.data → htmlgraph-0.27.6.data}/data/htmlgraph/templates/AGENTS.md.template +0 -0
- {htmlgraph-0.27.4.data → htmlgraph-0.27.6.data}/data/htmlgraph/templates/CLAUDE.md.template +0 -0
- {htmlgraph-0.27.4.data → htmlgraph-0.27.6.data}/data/htmlgraph/templates/GEMINI.md.template +0 -0
- {htmlgraph-0.27.4.dist-info → htmlgraph-0.27.6.dist-info}/WHEEL +0 -0
- {htmlgraph-0.27.4.dist-info → htmlgraph-0.27.6.dist-info}/entry_points.txt +0 -0
htmlgraph/__init__.py
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
**DO NOT execute operations directly. Your job is to ROUTE WORK to specialized agents.**
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Act as a **strategic coordinator**, not a tactical executor. Make decisions about WHAT to do and WHO should do it. DO NOT do the work yourself.
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -45,12 +45,12 @@ Think of yourself as a **strategic coordinator**, not a tactical executor. You m
|
|
|
45
45
|
|
|
46
46
|
**If you catch yourself using tools like Read, Edit, Grep, Glob - STOP. You should have delegated.**
|
|
47
47
|
|
|
48
|
-
**Bash tool
|
|
48
|
+
**Use Bash tool ONLY for:**
|
|
49
49
|
- Simple, direct operations (ls, pwd, echo, cat)
|
|
50
50
|
- When Skill/Task delegation would be overkill
|
|
51
51
|
- Quick checks or validations
|
|
52
52
|
|
|
53
|
-
**For complex operations, use Skill() or Task() delegation.**
|
|
53
|
+
**For complex operations, MUST use Skill() or Task() delegation.**
|
|
54
54
|
|
|
55
55
|
---
|
|
56
56
|
|
|
@@ -99,7 +99,7 @@ Think of yourself as a **strategic coordinator**, not a tactical executor. You m
|
|
|
99
99
|
|
|
100
100
|
### What Are Spawners?
|
|
101
101
|
|
|
102
|
-
**Spawners**
|
|
102
|
+
**Use Spawners** as HtmlGraph-integrated ways to invoke external CLIs (Copilot, Gemini, Codex) with **full parent event context and subprocess tracking**.
|
|
103
103
|
|
|
104
104
|
**CRITICAL: Spawners are invoked DIRECTLY via Python SDK, NOT wrapped in Task(). Task() is ONLY for Claude subagents (Haiku, Sonnet, Opus).**
|
|
105
105
|
|
|
@@ -367,7 +367,7 @@ Task(
|
|
|
367
367
|
)
|
|
368
368
|
```
|
|
369
369
|
|
|
370
|
-
**Use Haiku
|
|
370
|
+
**Use Haiku for:**
|
|
371
371
|
- Single file, clear instructions
|
|
372
372
|
- Typo fixes, config updates
|
|
373
373
|
- Rename/move operations
|
|
@@ -396,7 +396,7 @@ Task(
|
|
|
396
396
|
)
|
|
397
397
|
```
|
|
398
398
|
|
|
399
|
-
**Use Sonnet
|
|
399
|
+
**Use Sonnet for:**
|
|
400
400
|
- Multi-file feature implementation
|
|
401
401
|
- Module-level refactors
|
|
402
402
|
- Component integration
|
|
@@ -426,7 +426,7 @@ Task(
|
|
|
426
426
|
)
|
|
427
427
|
```
|
|
428
428
|
|
|
429
|
-
**Use Opus
|
|
429
|
+
**Use Opus for:**
|
|
430
430
|
- System architecture design
|
|
431
431
|
- Large-scale refactors (10+ files)
|
|
432
432
|
- Performance optimization with profiling
|
|
@@ -458,15 +458,15 @@ Task(model="haiku", prompt="Design microservices architecture")
|
|
|
458
458
|
|
|
459
459
|
### When in Doubt
|
|
460
460
|
|
|
461
|
-
**
|
|
461
|
+
**ALWAYS default to Sonnet** - Best balance of capability and cost.
|
|
462
462
|
|
|
463
|
-
|
|
463
|
+
Escalate to Opus for the retry if Sonnet struggles or produces inadequate results.
|
|
464
464
|
|
|
465
465
|
---
|
|
466
466
|
|
|
467
467
|
## Configurable Thresholds
|
|
468
468
|
|
|
469
|
-
|
|
469
|
+
Use configurable thresholds instead of hardcoded values for delegation enforcement:
|
|
470
470
|
|
|
471
471
|
**Default Thresholds:**
|
|
472
472
|
- `exploration_calls: 5` - Consecutive Grep/Read/Glob before warning
|
|
@@ -487,10 +487,10 @@ uv run htmlgraph orchestrator config-reset
|
|
|
487
487
|
```
|
|
488
488
|
|
|
489
489
|
**Time-Based Decay:** Violations automatically expire after 2 minutes (configurable).
|
|
490
|
-
|
|
490
|
+
Prevent long-running sessions from accumulating stale violations.
|
|
491
491
|
|
|
492
492
|
**Rapid Sequence Collapsing:** Multiple violations within 10 seconds count as one.
|
|
493
|
-
|
|
493
|
+
Prevent "violation spam" when making quick exploratory mistakes.
|
|
494
494
|
|
|
495
495
|
---
|
|
496
496
|
|
|
@@ -553,7 +553,7 @@ When you call `Skill(skill=".claude-plugin:copilot")`, here's what happens:
|
|
|
553
553
|
3. **Embedded coordination** - Python code may check for external CLIs
|
|
554
554
|
4. **Guide execution** - Shows HOW to use Bash or Task() for actual work
|
|
555
555
|
|
|
556
|
-
**Skills
|
|
556
|
+
**Use Skills as teaching tools, NOT execution tools.**
|
|
557
557
|
|
|
558
558
|
### The Execution Model
|
|
559
559
|
|
|
@@ -637,13 +637,13 @@ Task(
|
|
|
637
637
|
|
|
638
638
|
### When to Use Skills
|
|
639
639
|
|
|
640
|
-
**Use Skills for:**
|
|
640
|
+
**Use Skills ONLY for:**
|
|
641
641
|
- ✅ Learning CLI syntax and options
|
|
642
642
|
- ✅ Understanding available commands
|
|
643
643
|
- ✅ Seeing example workflows
|
|
644
644
|
- ✅ Reference documentation
|
|
645
645
|
|
|
646
|
-
**
|
|
646
|
+
**NEVER use Skills for:**
|
|
647
647
|
- ❌ Actual execution (use Bash or Task instead)
|
|
648
648
|
- ❌ Creating PRs, issues, or repos (use Bash with gh commands)
|
|
649
649
|
- ❌ Code generation (use Task delegation)
|
|
@@ -755,7 +755,7 @@ This section is pre-computed from session history and contains max 5 actionable
|
|
|
755
755
|
- **Related Spikes** (🔍) - Relevant investigations. Check findings.
|
|
756
756
|
- **Recommendations** (💡) - Strategic next actions.
|
|
757
757
|
|
|
758
|
-
**
|
|
758
|
+
**ALWAYS use reflections to inform delegation prompts:**
|
|
759
759
|
```python
|
|
760
760
|
# Include relevant context in Task prompts
|
|
761
761
|
Task(
|
|
@@ -770,7 +770,7 @@ Task(
|
|
|
770
770
|
|
|
771
771
|
## What is HtmlGraph?
|
|
772
772
|
|
|
773
|
-
|
|
773
|
+
Use HtmlGraph as a lightweight graph database for AI coordination and human observability. HTML files = nodes, hyperlinks = edges, CSS selectors = queries. Zero dependencies, offline-first. MUST use SDK for ALL operations tracking.
|
|
774
774
|
|
|
775
775
|
## Operation Backbone: HtmlGraph + Git
|
|
776
776
|
|
|
@@ -831,9 +831,9 @@ When you call `Task()`, the system automatically:
|
|
|
831
831
|
|
|
832
832
|
## Speed & Testing
|
|
833
833
|
|
|
834
|
-
-
|
|
835
|
-
-
|
|
836
|
-
-
|
|
834
|
+
- ALWAYS use WebSearch for up-to-date information
|
|
835
|
+
- MUST test incrementally, not at the end
|
|
836
|
+
- MUST run quality gates: ruff, mypy, pytest (delegate via Task or Bash)
|
|
837
837
|
|
|
838
838
|
---
|
|
839
839
|
|
|
@@ -425,3 +425,63 @@ class OperationsMixin:
|
|
|
425
425
|
from htmlgraph.operations import analytics
|
|
426
426
|
|
|
427
427
|
return analytics.get_recommendations(graph_dir=self._directory)
|
|
428
|
+
|
|
429
|
+
def init_project(self, directory: Path | None = None) -> dict[str, Any]:
|
|
430
|
+
"""
|
|
431
|
+
Initialize HtmlGraph directory structure.
|
|
432
|
+
|
|
433
|
+
Creates .htmlgraph/ with subdirectories:
|
|
434
|
+
- features/, sessions/, tracks/, spikes/
|
|
435
|
+
- bugs/, patterns/, insights/, metrics/
|
|
436
|
+
- todos/, task-delegations/
|
|
437
|
+
|
|
438
|
+
Args:
|
|
439
|
+
directory: Base directory (defaults to current working directory)
|
|
440
|
+
|
|
441
|
+
Returns:
|
|
442
|
+
Dict with status ("created" or "already_exists") and directories list
|
|
443
|
+
|
|
444
|
+
Example:
|
|
445
|
+
>>> sdk = SDK(agent="claude")
|
|
446
|
+
>>> result = sdk.init_project()
|
|
447
|
+
>>> print(result['status']) # "created"
|
|
448
|
+
>>> print(result['directories']) # ['features', 'sessions', ...]
|
|
449
|
+
"""
|
|
450
|
+
from pathlib import Path
|
|
451
|
+
|
|
452
|
+
base_dir = directory or Path.cwd() / ".htmlgraph"
|
|
453
|
+
|
|
454
|
+
# Check if already initialized
|
|
455
|
+
if base_dir.exists():
|
|
456
|
+
existing_dirs = [d.name for d in base_dir.iterdir() if d.is_dir()]
|
|
457
|
+
return {
|
|
458
|
+
"status": "already_exists",
|
|
459
|
+
"directories": existing_dirs,
|
|
460
|
+
"path": str(base_dir),
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
# Create directory structure
|
|
464
|
+
dirs = [
|
|
465
|
+
"features",
|
|
466
|
+
"sessions",
|
|
467
|
+
"tracks",
|
|
468
|
+
"spikes",
|
|
469
|
+
"bugs",
|
|
470
|
+
"patterns",
|
|
471
|
+
"insights",
|
|
472
|
+
"metrics",
|
|
473
|
+
"todos",
|
|
474
|
+
"task-delegations",
|
|
475
|
+
]
|
|
476
|
+
|
|
477
|
+
created = []
|
|
478
|
+
for dirname in dirs:
|
|
479
|
+
dir_path = base_dir / dirname
|
|
480
|
+
dir_path.mkdir(parents=True, exist_ok=True)
|
|
481
|
+
created.append(dirname)
|
|
482
|
+
|
|
483
|
+
return {
|
|
484
|
+
"status": "created",
|
|
485
|
+
"directories": created,
|
|
486
|
+
"path": str(base_dir),
|
|
487
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: htmlgraph
|
|
3
|
-
Version: 0.27.
|
|
3
|
+
Version: 0.27.6
|
|
4
4
|
Summary: HTML is All You Need - Graph database on web standards
|
|
5
5
|
Project-URL: Homepage, https://github.com/Shakes-tzd/htmlgraph
|
|
6
6
|
Project-URL: Documentation, https://github.com/Shakes-tzd/htmlgraph#readme
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
htmlgraph/__init__.py,sha256=
|
|
1
|
+
htmlgraph/__init__.py,sha256=uOeA6rclaPyDSJry64EF_-hlCIcl0vNxeEXKD9juFKs,6407
|
|
2
2
|
htmlgraph/__init__.pyi,sha256=8JuFVuDll9jMx9s8ZQHt2tXic-geOJHiXUMB2YjmHhU,6683
|
|
3
3
|
htmlgraph/agent_detection.py,sha256=wEmrDv4hssPX2OkEnJZBHPbalxcaloiJF_hOOow_5WE,3511
|
|
4
4
|
htmlgraph/agent_registry.py,sha256=80TPYr4P0YMizPUbTH4N5wH6D84IKs-HPBLHGeeP6bY,9449
|
|
@@ -35,7 +35,7 @@ htmlgraph/learning.py,sha256=A3LU7VeK129sy5C0xjgVtZNI3dS6xEh9ow3GBnoq2JQ,28567
|
|
|
35
35
|
htmlgraph/mcp_server.py,sha256=Isha3F2Jk_YLsbchtr2wusmEy6LDrMH-3zF0jzvJmFk,24034
|
|
36
36
|
htmlgraph/models.py,sha256=rE1Arbb4CoC5HHKx_JXxtKfneH3rQVjOUVGrz-s1iMU,87352
|
|
37
37
|
htmlgraph/orchestration.md,sha256=7oCum1RtlkGfHjh9YQ1h24flPbHrEIKiSNjnt61CuG4,17874
|
|
38
|
-
htmlgraph/orchestrator-system-prompt-optimized.txt,sha256=
|
|
38
|
+
htmlgraph/orchestrator-system-prompt-optimized.txt,sha256=8ekZ19YWJE9npaAaAGTkTMfseOlA2rliGYc_ad2HaRc,31191
|
|
39
39
|
htmlgraph/orchestrator.py,sha256=vF7ovxsb2rIkQs_ifX-lKp7UJO9CCUq4ZQNOdNhdwJM,19698
|
|
40
40
|
htmlgraph/orchestrator_config.py,sha256=5EBnT81OAkJBsp6jNDNgBnhJmD8A4zV2REaop9qb8gc,10886
|
|
41
41
|
htmlgraph/orchestrator_mode.py,sha256=DXkG89uHe2VPz8wSx44JENn70lQiI5BLihKGpcPnNx8,10538
|
|
@@ -300,7 +300,7 @@ htmlgraph/sdk/mixins/__init__.py,sha256=IziHuV8N1sz65xYTO12JvdkGgP-5yDx8hjMTN6MY
|
|
|
300
300
|
htmlgraph/sdk/mixins/attribution.py,sha256=SA1k8ccF2ZIKcTPyzaeB3h4OKE0YGQJq9BvnsgsC0z8,4048
|
|
301
301
|
htmlgraph/sdk/mixins/mixin.py,sha256=sOSjY7tNkYQOIKkpmu1tDDy74Ci-_8OJsvt-QJQW6O4,13472
|
|
302
302
|
htmlgraph/sdk/operations/__init__.py,sha256=HxULDCxJz9jFFyzEfavgrMuwDZqEVMOFIzYzWDPfo8E,235
|
|
303
|
-
htmlgraph/sdk/operations/mixin.py,sha256=
|
|
303
|
+
htmlgraph/sdk/operations/mixin.py,sha256=0f2uySxZB-V9sjBOabrShL04zWBn-Std7IEmJfy3uWs,16124
|
|
304
304
|
htmlgraph/sdk/orchestration/__init__.py,sha256=cSYuiXEs1gedLgLTqPM5IkmGxQchReukjazklxpCi1A,442
|
|
305
305
|
htmlgraph/sdk/orchestration/coordinator.py,sha256=LcsCsraLkzV0uedCkCvCC2vJDDM9v9N9_tYfVH548uA,6771
|
|
306
306
|
htmlgraph/sdk/orchestration/spawner.py,sha256=Ei9-4qv7iSdoiJfRrkqHesSGmf6hVt9FYIGHKAI-YCg,7783
|
|
@@ -326,12 +326,12 @@ htmlgraph/templates/AGENTS.md.template,sha256=f96h7V6ygwj-v-fanVI48eYMxR6t_se4be
|
|
|
326
326
|
htmlgraph/templates/CLAUDE.md.template,sha256=h1kG2hTX2XYig2KszsHBfzrwa_4Cfcq2Pj4SwqzeDlM,1984
|
|
327
327
|
htmlgraph/templates/GEMINI.md.template,sha256=gAGzE53Avki87BM_otqy5HdcYCoLsHgqaKjVzNzPMX8,1622
|
|
328
328
|
htmlgraph/templates/orchestration-view.html,sha256=DlS7LlcjH0oO_KYILjuF1X42t8QhKLH4F85rkO54alY,10472
|
|
329
|
-
htmlgraph-0.27.
|
|
330
|
-
htmlgraph-0.27.
|
|
331
|
-
htmlgraph-0.27.
|
|
332
|
-
htmlgraph-0.27.
|
|
333
|
-
htmlgraph-0.27.
|
|
334
|
-
htmlgraph-0.27.
|
|
335
|
-
htmlgraph-0.27.
|
|
336
|
-
htmlgraph-0.27.
|
|
337
|
-
htmlgraph-0.27.
|
|
329
|
+
htmlgraph-0.27.6.data/data/htmlgraph/dashboard.html,sha256=MUT6SaYnazoyDcvHz5hN1omYswyIoUfeoZLf2M_iblo,251268
|
|
330
|
+
htmlgraph-0.27.6.data/data/htmlgraph/styles.css,sha256=oDUSC8jG-V-hKojOBO9J88hxAeY2wJrBYTq0uCwX_Y4,7135
|
|
331
|
+
htmlgraph-0.27.6.data/data/htmlgraph/templates/AGENTS.md.template,sha256=f96h7V6ygwj-v-fanVI48eYMxR6t_se4bet1H4ZsDpI,7642
|
|
332
|
+
htmlgraph-0.27.6.data/data/htmlgraph/templates/CLAUDE.md.template,sha256=h1kG2hTX2XYig2KszsHBfzrwa_4Cfcq2Pj4SwqzeDlM,1984
|
|
333
|
+
htmlgraph-0.27.6.data/data/htmlgraph/templates/GEMINI.md.template,sha256=gAGzE53Avki87BM_otqy5HdcYCoLsHgqaKjVzNzPMX8,1622
|
|
334
|
+
htmlgraph-0.27.6.dist-info/METADATA,sha256=tU22e3oeC3VapYYv-SmSDYIhkUCpUHOwwNHYhMPHmrI,10220
|
|
335
|
+
htmlgraph-0.27.6.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
336
|
+
htmlgraph-0.27.6.dist-info/entry_points.txt,sha256=Wmdo5cx8pt6NoMsssVE2mZH1CZLSUsrg_3iSWatiyn0,103
|
|
337
|
+
htmlgraph-0.27.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|