-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsumd.json
More file actions
102 lines (102 loc) · 25.5 KB
/
Copy pathsumd.json
File metadata and controls
102 lines (102 loc) · 25.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{
"project_name": "op3 — Layered Operations Tree",
"description": "SUMD - Structured Unified Markdown Descriptor for AI-aware project refactorization",
"sections": [
{
"name": "contents",
"type": "unknown",
"content": "- [Metadata](#metadata)\n- [Architecture](#architecture)\n- [Workflows](#workflows)\n- [Dependencies](#dependencies)\n- [Call Graph](#call-graph)\n- [Refactoring Analysis](#refactoring-analysis)\n- [Intent](#intent)",
"level": 2
},
{
"name": "metadata",
"type": "metadata",
"content": "- **name**: `op3`\n- **version**: `0.2.0`\n- **python_requires**: `>=3.10`\n- **license**: Apache-2.0\n- **ai_model**: `openrouter/qwen/qwen3-coder-next`\n- **ecosystem**: SUMD + DOQL + testql + taskfile\n- **generated_from**: pyproject.toml, app.doql.less, goal.yaml, .env.example, project/(5 analysis files)",
"level": 2
},
{
"name": "architecture",
"type": "architecture",
"content": "```\nSUMD (description) → DOQL/source (code) → taskfile (automation) → testql (verification)\n```",
"level": 2
},
{
"name": "# doql application declaration (`app.doql.less`)",
"type": "unknown",
"content": "```less markpact:doql path=app.doql.less\n// LESS format — define @variables here as needed\n// Generated by sumd for op3\n\napp {\n name: op3;\n version: 0.2.0;\n}\n\ninterface[type=\"cli\"] {\n framework: click;\n}\n\nworkflow[name=\"install\"] {\n trigger: manual;\n step-1: run cmd=pip install -e .;\n}\n\nworkflow[name=\"dev\"] {\n trigger: manual;\n step-1: run cmd=pip install -e \".[dev]\";\n}\n\nworkflow[name=\"build\"] {\n trigger: manual;\n step-1: run cmd=python -m build;\n}\n\nworkflow[name=\"test\"] {\n trigger: manual;\n step-1: run cmd=pytest -q;\n}\n\nworkflow[name=\"lint\"] {\n trigger: manual;\n step-1: run cmd=ruff check .;\n}\n\nworkflow[name=\"fmt\"] {\n trigger: manual;\n step-1: run cmd=ruff format .;\n}\n\nworkflow[name=\"clean\"] {\n trigger: manual;\n step-1: run cmd=rm -rf build/ dist/ *.egg-info;\n}\n\nworkflow[name=\"help\"] {\n trigger: manual;\n step-1: run cmd=task --list;\n}\n\ndeploy {\n target: pip;\n}\n\nenvironment[name=\"local\"] {\n runtime: python;\n}\n```",
"level": 2
},
{
"name": "workflows",
"type": "workflows",
"content": "",
"level": 2
},
{
"name": "dependencies",
"type": "dependencies",
"content": "",
"level": 2
},
{
"name": "# runtime",
"type": "unknown",
"content": "```text markpact:deps python\nfraq>=0.2.15\npydantic>=2.0\npyyaml>=6.0\nclick>=8.0\njmespath>=1.0\nrich>=13.0\n```",
"level": 2
},
{
"name": "# development",
"type": "unknown",
"content": "```text markpact:deps python scope=dev\npytest>=7.0\npytest-cov>=4.0\nruff>=0.4\nmypy>=1.0\ngoal>=2.1.0\ncosts>=0.1.20\npfix>=0.1.60\n```",
"level": 2
},
{
"name": "call graph",
"type": "unknown",
"content": "*19 nodes · 17 edges · 5 modules · CC̄=1.1*",
"level": 2
},
{
"name": "# hubs (by degree)",
"type": "unknown",
"content": "| Function | CC | in | out | total |\n|----------|----|----|-----|-------|\n| `compute_variance` *(in src.opstree.fleet.scanner)* | 11 ⚠ | 1 | 18 | **19** |\n| `_diff_layer_data` *(in src.opstree.snapshot.diff)* | 1 | 1 | 14 | **15** |\n| `scan_fleet` *(in src.opstree.fleet.scanner)* | 5 | 0 | 12 | **12** |\n| `snapshot_diff` *(in src.opstree.snapshot.diff)* | 4 | 1 | 10 | **11** |\n| `_all_ok` *(in src.opstree.probes.builtin.rpi_diagnostics)* | 7 | 1 | 9 | **10** |\n| `_i2c_chip_missing_rules` *(in src.opstree.probes.builtin.rpi_diagnostics)* | 10 ⚠ | 0 | 8 | **8** |\n| `_backlight_power_off_rules` *(in src.opstree.probes.builtin.rpi_diagnostics)* | 4 | 0 | 7 | **7** |\n| `_backlight_chip_addr` *(in src.opstree.probes.builtin.rpi_diagnostics)* | 2 | 1 | 5 | **6** |\n\n```toon markpact:analysis path=project/calls.toon.yaml\n# code2llm call graph | /home/tom/github/semcod/op3\n# nodes: 19 | edges: 17 | modules: 5\n# CC̄=1.1\n\nHUBS[20]:\n src.opstree.fleet.scanner.compute_variance\n CC=11 in:1 out:18 total:19\n src.opstree.snapshot.diff._diff_layer_data\n CC=1 in:1 out:14 total:15\n src.opstree.fleet.scanner.scan_fleet\n CC=5 in:0 out:12 total:12\n src.opstree.snapshot.diff.snapshot_diff\n CC=4 in:1 out:10 total:11\n src.opstree.probes.builtin.rpi_diagnostics._all_ok\n CC=7 in:1 out:9 total:10\n src.opstree.probes.builtin.rpi_diagnostics._i2c_chip_missing_rules\n CC=10 in:0 out:8 total:8\n src.opstree.probes.builtin.rpi_diagnostics._backlight_power_off_rules\n CC=4 in:0 out:7 total:7\n src.opstree.probes.builtin.rpi_diagnostics._backlight_chip_addr\n CC=2 in:1 out:5 total:6\n src.opstree.fleet.scanner._flatten\n CC=5 in:2 out:4 total:6\n src.opstree.drift.detector.DriftDetector.detect\n CC=2 in:0 out:5 total:5\n src.opstree.probes.builtin.rpi_diagnostics._all_ok_rule\n CC=1 in:0 out:4 total:4\n src.opstree.probes.builtin.rpi_diagnostics._dsi_outputs\n CC=3 in:2 out:2 total:4\n src.opstree.probes.builtin.rpi_diagnostics._has_dsi_overlay\n CC=2 in:1 out:3 total:4\n src.opstree.probes.builtin.rpi_diagnostics._backlights\n CC=2 in:3 out:1 total:4\n src.opstree.probes.builtin.rpi_diagnostics._dsi_connected\n CC=2 in:1 out:3 total:4\n src.opstree.probes.registry.ProbeRegistry.all\n CC=2 in:1 out:2 total:3\n src.opstree.fleet.scanner._flatten_snapshot\n CC=2 in:1 out:2 total:3\n src.opstree.fleet.scanner._layer_of\n CC=2 in:1 out:2 total:3\n src.opstree.probes.builtin.rpi_diagnostics._i2c_buses\n CC=2 in:1 out:1 total:2\n\nMODULES:\n src.opstree.drift.detector [1 funcs]\n detect CC=2 out:5\n src.opstree.fleet.scanner [5 funcs]\n _flatten CC=5 out:4\n _flatten_snapshot CC=2 out:2\n _layer_of CC=2 out:2\n compute_variance CC=11 out:18\n scan_fleet CC=5 out:12\n src.opstree.probes.builtin.rpi_diagnostics [10 funcs]\n _all_ok CC=7 out:9\n _all_ok_rule CC=1 out:4\n _backlight_chip_addr CC=2 out:5\n _backlight_power_off_rules CC=4 out:7\n _backlights CC=2 out:1\n _dsi_connected CC=2 out:3\n _dsi_outputs CC=3 out:2\n _has_dsi_overlay CC=2 out:3\n _i2c_buses CC=2 out:1\n _i2c_chip_missing_rules CC=10 out:8\n src.opstree.probes.registry [1 funcs]\n all CC=2 out:2\n src.opstree.snapshot.diff [2 funcs]\n _diff_layer_data CC=1 out:14\n snapshot_diff CC=4 out:10\n\nEDGES:\n src.opstree.drift.detector.DriftDetector.detect → src.opstree.snapshot.diff.snapshot_diff\n src.opstree.probes.builtin.rpi_diagnostics._dsi_connected → src.opstree.probes.builtin.rpi_diagnostics._dsi_outputs\n src.opstree.probes.builtin.rpi_diagnostics._all_ok → src.opstree.probes.builtin.rpi_diagnostics._dsi_outputs\n src.opstree.probes.builtin.rpi_diagnostics._all_ok → src.opstree.probes.builtin.rpi_diagnostics._backlights\n src.opstree.probes.builtin.rpi_diagnostics._all_ok → src.opstree.probes.builtin.rpi_diagnostics._has_dsi_overlay\n src.opstree.probes.builtin.rpi_diagnostics._all_ok → src.opstree.probes.builtin.rpi_diagnostics._dsi_connected\n src.opstree.probes.builtin.rpi_diagnostics._all_ok → src.opstree.probes.registry.ProbeRegistry.all\n src.opstree.probes.builtin.rpi_diagnostics._backlight_power_off_rules → src.opstree.probes.builtin.rpi_diagnostics._backlights\n src.opstree.probes.builtin.rpi_diagnostics._i2c_chip_missing_rules → src.opstree.probes.builtin.rpi_diagnostics._backlights\n src.opstree.probes.builtin.rpi_diagnostics._i2c_chip_missing_rules → src.opstree.probes.builtin.rpi_diagnostics._backlight_chip_addr\n src.opstree.probes.builtin.rpi_diagnostics._i2c_chip_missing_rules → src.opstree.probes.builtin.rpi_diagnostics._i2c_buses\n src.opstree.probes.builtin.rpi_diagnostics._all_ok_rule → src.opstree.probes.builtin.rpi_diagnostics._all_ok\n src.opstree.fleet.scanner._flatten_snapshot → src.opstree.fleet.scanner._flatten\n src.opstree.fleet.scanner.compute_variance → src.opstree.fleet.scanner._flatten_snapshot\n src.opstree.fleet.scanner.compute_variance → src.opstree.fleet.scanner._layer_of\n src.opstree.fleet.scanner.scan_fleet → src.opstree.fleet.scanner.compute_variance\n src.opstree.snapshot.diff.snapshot_diff → src.opstree.snapshot.diff._diff_layer_data\n```",
"level": 2
},
{
"name": "refactoring analysis",
"type": "unknown",
"content": "*Pre-refactoring snapshot — use this section to identify targets. Generated from `project/` toon files.*",
"level": 2
},
{
"name": "# call graph & complexity (`project/calls.toon.yaml`)",
"type": "unknown",
"content": "```toon markpact:analysis path=project/calls.toon.yaml\n# code2llm call graph | /home/tom/github/semcod/op3\n# nodes: 19 | edges: 17 | modules: 5\n# CC̄=1.1\n\nHUBS[20]:\n src.opstree.fleet.scanner.compute_variance\n CC=11 in:1 out:18 total:19\n src.opstree.snapshot.diff._diff_layer_data\n CC=1 in:1 out:14 total:15\n src.opstree.fleet.scanner.scan_fleet\n CC=5 in:0 out:12 total:12\n src.opstree.snapshot.diff.snapshot_diff\n CC=4 in:1 out:10 total:11\n src.opstree.probes.builtin.rpi_diagnostics._all_ok\n CC=7 in:1 out:9 total:10\n src.opstree.probes.builtin.rpi_diagnostics._i2c_chip_missing_rules\n CC=10 in:0 out:8 total:8\n src.opstree.probes.builtin.rpi_diagnostics._backlight_power_off_rules\n CC=4 in:0 out:7 total:7\n src.opstree.probes.builtin.rpi_diagnostics._backlight_chip_addr\n CC=2 in:1 out:5 total:6\n src.opstree.fleet.scanner._flatten\n CC=5 in:2 out:4 total:6\n src.opstree.drift.detector.DriftDetector.detect\n CC=2 in:0 out:5 total:5\n src.opstree.probes.builtin.rpi_diagnostics._all_ok_rule\n CC=1 in:0 out:4 total:4\n src.opstree.probes.builtin.rpi_diagnostics._dsi_outputs\n CC=3 in:2 out:2 total:4\n src.opstree.probes.builtin.rpi_diagnostics._has_dsi_overlay\n CC=2 in:1 out:3 total:4\n src.opstree.probes.builtin.rpi_diagnostics._backlights\n CC=2 in:3 out:1 total:4\n src.opstree.probes.builtin.rpi_diagnostics._dsi_connected\n CC=2 in:1 out:3 total:4\n src.opstree.probes.registry.ProbeRegistry.all\n CC=2 in:1 out:2 total:3\n src.opstree.fleet.scanner._flatten_snapshot\n CC=2 in:1 out:2 total:3\n src.opstree.fleet.scanner._layer_of\n CC=2 in:1 out:2 total:3\n src.opstree.probes.builtin.rpi_diagnostics._i2c_buses\n CC=2 in:1 out:1 total:2\n\nMODULES:\n src.opstree.drift.detector [1 funcs]\n detect CC=2 out:5\n src.opstree.fleet.scanner [5 funcs]\n _flatten CC=5 out:4\n _flatten_snapshot CC=2 out:2\n _layer_of CC=2 out:2\n compute_variance CC=11 out:18\n scan_fleet CC=5 out:12\n src.opstree.probes.builtin.rpi_diagnostics [10 funcs]\n _all_ok CC=7 out:9\n _all_ok_rule CC=1 out:4\n _backlight_chip_addr CC=2 out:5\n _backlight_power_off_rules CC=4 out:7\n _backlights CC=2 out:1\n _dsi_connected CC=2 out:3\n _dsi_outputs CC=3 out:2\n _has_dsi_overlay CC=2 out:3\n _i2c_buses CC=2 out:1\n _i2c_chip_missing_rules CC=10 out:8\n src.opstree.probes.registry [1 funcs]\n all CC=2 out:2\n src.opstree.snapshot.diff [2 funcs]\n _diff_layer_data CC=1 out:14\n snapshot_diff CC=4 out:10\n\nEDGES:\n src.opstree.drift.detector.DriftDetector.detect → src.opstree.snapshot.diff.snapshot_diff\n src.opstree.probes.builtin.rpi_diagnostics._dsi_connected → src.opstree.probes.builtin.rpi_diagnostics._dsi_outputs\n src.opstree.probes.builtin.rpi_diagnostics._all_ok → src.opstree.probes.builtin.rpi_diagnostics._dsi_outputs\n src.opstree.probes.builtin.rpi_diagnostics._all_ok → src.opstree.probes.builtin.rpi_diagnostics._backlights\n src.opstree.probes.builtin.rpi_diagnostics._all_ok → src.opstree.probes.builtin.rpi_diagnostics._has_dsi_overlay\n src.opstree.probes.builtin.rpi_diagnostics._all_ok → src.opstree.probes.builtin.rpi_diagnostics._dsi_connected\n src.opstree.probes.builtin.rpi_diagnostics._all_ok → src.opstree.probes.registry.ProbeRegistry.all\n src.opstree.probes.builtin.rpi_diagnostics._backlight_power_off_rules → src.opstree.probes.builtin.rpi_diagnostics._backlights\n src.opstree.probes.builtin.rpi_diagnostics._i2c_chip_missing_rules → src.opstree.probes.builtin.rpi_diagnostics._backlights\n src.opstree.probes.builtin.rpi_diagnostics._i2c_chip_missing_rules → src.opstree.probes.builtin.rpi_diagnostics._backlight_chip_addr\n src.opstree.probes.builtin.rpi_diagnostics._i2c_chip_missing_rules → src.opstree.probes.builtin.rpi_diagnostics._i2c_buses\n src.opstree.probes.builtin.rpi_diagnostics._all_ok_rule → src.opstree.probes.builtin.rpi_diagnostics._all_ok\n src.opstree.fleet.scanner._flatten_snapshot → src.opstree.fleet.scanner._flatten\n src.opstree.fleet.scanner.compute_variance → src.opstree.fleet.scanner._flatten_snapshot\n src.opstree.fleet.scanner.compute_variance → src.opstree.fleet.scanner._layer_of\n src.opstree.fleet.scanner.scan_fleet → src.opstree.fleet.scanner.compute_variance\n src.opstree.snapshot.diff.snapshot_diff → src.opstree.snapshot.diff._diff_layer_data\n```",
"level": 2
},
{
"name": "# code analysis (`project/analysis.toon.yaml`)",
"type": "unknown",
"content": "```toon markpact:analysis path=project/analysis.toon.yaml\n# code2llm | 70f 9947L | python:44,yaml:12,md:10,toml:1,shell:1,txt:1,json:1 | 2026-04-21\n# CC̄=1.1 | critical:5/432 | dups:0 | cycles:1\n\nHEALTH[5]:\n 🟡 CC _list_containers CC=18 (limit:15)\n 🟡 CC _probe_wlr_randr CC=17 (limit:15)\n 🟡 CC render CC=16 (limit:15)\n 🟡 CC render CC=22 (limit:15)\n 🟡 CC scan CC=16 (limit:15)\n\nREFACTOR[2]:\n 1. split 5 high-CC methods (CC>15)\n 2. break 1 circular dependencies\n\nPIPELINES[101]:\n [1] Src [detect]: detect → snapshot_diff → _diff_layer_data\n PURITY: 100% pure\n [2] Src [_summarize_changes]: _summarize_changes\n PURITY: 100% pure\n [3] Src [to_dict]: to_dict\n PURITY: 100% pure\n [4] Src [__post_init__]: __post_init__\n PURITY: 100% pure\n [5] Src [evaluate]: evaluate\n PURITY: 100% pure\n\nLAYERS:\n src/ CC̄=3.7 ←in:0 →out:0\n │ !! rpi_diagnostics 528L 0C 12m CC=10 ←0\n │ !! physical_rpi 401L 2C 22m CC=17 ←0\n │ scanner 222L 0C 6m CC=11 ←0\n │ !! less 192L 1C 3m CC=22 ←0\n │ builtin 179L 14C 0m CC=0.0 ←0\n │ !! runtime_container 173L 1C 6m CC=18 ←0\n │ rules 149L 3C 6m CC=7 ←0\n │ os_linux 142L 2C 12m CC=7 ←0\n │ compat 119L 1C 1m CC=1 ←0\n │ !! migration_yaml 108L 1C 2m CC=16 ←0\n │ endpoint_http 107L 1C 5m CC=6 ←0\n │ business_health 98L 1C 5m CC=6 ←0\n │ context 97L 5C 4m CC=2 ←0\n │ service_containers 93L 1C 5m CC=4 ←0\n │ tree 88L 2C 6m CC=11 ←0\n │ diff 88L 1C 2m CC=4 ←1\n │ registry 80L 1C 7m CC=2 ←1\n │ detector 78L 2C 2m CC=4 ←0\n │ model 77L 2C 1m CC=1 ←0\n │ !! scan 69L 0C 1m CC=16 ←0\n │ snapshot_yaml 58L 1C 2m CC=5 ←0\n │ model 55L 3C 4m CC=1 ←2\n │ linear 54L 1C 3m CC=6 ←0\n │ convert 53L 0C 1m CC=11 ←0\n │ base 44L 3C 4m CC=2 ←0\n │ __init__ 44L 0C 0m CC=0.0 ←0\n │ drift 40L 0C 1m CC=5 ←0\n │ __init__ 40L 0C 0m CC=0.0 ←0\n │ registry 35L 1C 5m CC=1 ←0\n │ __init__ 24L 0C 0m CC=0.0 ←0\n │ main 23L 0C 1m CC=1 ←0\n │ __init__ 22L 0C 0m CC=0.0 ←0\n │ __init__ 12L 0C 0m CC=0.0 ←0\n │ _version 8L 0C 0m CC=0.0 ←0\n │ __init__ 8L 0C 0m CC=0.0 ←0\n │ __init__ 8L 0C 0m CC=0.0 ←0\n │ __init__ 8L 0C 0m CC=0.0 ←0\n │ __init__ 6L 0C 0m CC=0.0 ←0\n │ __init__ 6L 0C 0m CC=0.0 ←0\n │ __init__ 5L 0C 0m CC=0.0 ←0\n │ __init__ 1L 0C 0m CC=0.0 ←0\n │ __init__ 1L 0C 0m CC=0.0 ←0\n │ __init__ 1L 0C 0m CC=0.0 ←0\n │ __init__ 1L 0C 0m CC=0.0 ←0\n │\n ./ CC̄=0.0 ←in:0 →out:0\n │ !! SUMD.md 668L 0C 150m CC=0.0 ←0\n │ !! SUMR.md 586L 0C 0m CC=0.0 ←0\n │ !! goal.yaml 512L 0C 0m CC=0.0 ←0\n │ op3_poc.md 363L 0C 0m CC=0.0 ←0\n │ CHANGELOG.md 245L 0C 0m CC=0.0 ←0\n │ README.md 127L 0C 1m CC=0.0 ←0\n │ sumd.json 102L 0C 0m CC=0.0 ←0\n │ pyproject.toml 69L 0C 0m CC=0.0 ←0\n │ project.sh 36L 0C 0m CC=0.0 ←0\n │\n docs/ CC̄=0.0 ←in:0 →out:0\n │ !! README.md 556L 0C 1m CC=0.0 ←0\n │ API.md 431L 0C 1m CC=0.0 ←0\n │\n project/ CC̄=0.0 ←in:0 →out:0\n │ !! calls.yaml 589L 0C 0m CC=0.0 ←0\n │ !! context.md 570L 0C 0m CC=0.0 ←0\n │ map.toon.yaml 376L 0C 150m CC=0.0 ←0\n │ README.md 339L 0C 0m CC=0.0 ←0\n │ integration-roadmap.md 158L 0C 0m CC=0.0 ←0\n │ analysis.toon.yaml 113L 0C 0m CC=0.0 ←0\n │ calls.toon.yaml 88L 0C 0m CC=0.0 ←0\n │ duplication.toon.yaml 65L 0C 0m CC=0.0 ←0\n │ evolution.toon.yaml 64L 0C 0m CC=0.0 ←0\n │ project.toon.yaml 56L 0C 0m CC=0.0 ←0\n │ prompt.txt 47L 0C 0m CC=0.0 ←0\n │\n examples/ CC̄=0.0 ←in:0 →out:0\n │ snapshot.yaml 42L 0C 0m CC=0.0 ←0\n │ snapshot.yaml 41L 0C 0m CC=0.0 ←0\n │ snapshot.yaml 41L 0C 0m CC=0.0 ←0\n │ migration.yaml 18L 0C 0m CC=0.0 ←0\n │\n\nCOUPLING: no cross-package imports detected\n\nEXTERNAL:\n validation: run `vallm batch .` → validation.toon\n duplication: run `redup scan .` → duplication.toon\n```",
"level": 2
},
{
"name": "# duplication (`project/duplication.toon.yaml`)",
"type": "unknown",
"content": "```toon markpact:analysis path=project/duplication.toon.yaml\n# redup/duplication | 4 groups | 45f 3803L | 2026-04-21\n\nSUMMARY:\n files_scanned: 45\n total_lines: 3803\n dup_groups: 4\n dup_fragments: 11\n saved_lines: 37\n scan_ms: 4070\n\nHOTSPOTS[5] (files with most duplication):\n src/opstree/probes/builtin/os_linux.py dup=20L groups=2 frags=4 (0.5%)\n src/opstree/probes/builtin/endpoint_http.py dup=12L groups=2 frags=2 (0.3%)\n src/opstree/probes/builtin/service_containers.py dup=12L groups=2 frags=2 (0.3%)\n src/opstree/probes/builtin/runtime_container.py dup=10L groups=1 frags=2 (0.3%)\n src/opstree/probes/builtin/business_health.py dup=5L groups=1 frags=1 (0.1%)\n\nDUPLICATES[4] (ranked by impact):\n [7def61619c58cc79] EXAC _exec L=5 N=5 saved=20 sim=1.00\n src/opstree/probes/builtin/business_health.py:53-57 (_exec)\n src/opstree/probes/builtin/endpoint_http.py:55-59 (_exec)\n src/opstree/probes/builtin/runtime_container.py:61-65 (_exec)\n src/opstree/probes/builtin/runtime_container.py:92-96 (_exec)\n src/opstree/probes/builtin/service_containers.py:43-47 (_exec)\n [183bda4b6299c725] EXAC can_probe L=7 N=2 saved=7 sim=1.00\n src/opstree/probes/builtin/os_linux.py:13-19 (can_probe)\n src/opstree/probes/builtin/os_linux.py:90-96 (can_probe)\n [b805c0edf8ab951c] STRU can_probe L=7 N=2 saved=7 sim=1.00\n src/opstree/probes/builtin/endpoint_http.py:20-26 (can_probe)\n src/opstree/probes/builtin/service_containers.py:13-19 (can_probe)\n [12b23dacb5666fff] EXAC anomalies L=3 N=2 saved=3 sim=1.00\n src/opstree/probes/builtin/os_linux.py:80-82 (anomalies)\n src/opstree/probes/builtin/os_linux.py:140-142 (anomalies)\n\nREFACTOR[4] (ranked by priority):\n [1] ○ extract_function → src/opstree/probes/builtin/utils/_exec.py\n WHY: 5 occurrences of 5-line block across 4 files — saves 20 lines\n FILES: src/opstree/probes/builtin/business_health.py, src/opstree/probes/builtin/endpoint_http.py, src/opstree/probes/builtin/runtime_container.py, src/opstree/probes/builtin/service_containers.py\n [2] ○ extract_function → src/opstree/probes/builtin/utils/can_probe.py\n WHY: 2 occurrences of 7-line block across 1 files — saves 7 lines\n FILES: src/opstree/probes/builtin/os_linux.py\n [3] ○ extract_function → src/opstree/probes/builtin/utils/can_probe.py\n WHY: 2 occurrences of 7-line block across 2 files — saves 7 lines\n FILES: src/opstree/probes/builtin/endpoint_http.py, src/opstree/probes/builtin/service_containers.py\n [4] ○ extract_function → src/opstree/probes/builtin/utils/anomalies.py\n WHY: 2 occurrences of 3-line block across 1 files — saves 3 lines\n FILES: src/opstree/probes/builtin/os_linux.py\n\nQUICK_WINS[3] (low risk, high savings — do first):\n [1] extract_function saved=20L → src/opstree/probes/builtin/utils/_exec.py\n FILES: business_health.py, endpoint_http.py, runtime_container.py +1\n [2] extract_function saved=7L → src/opstree/probes/builtin/utils/can_probe.py\n FILES: os_linux.py\n [3] extract_function saved=7L → src/opstree/probes/builtin/utils/can_probe.py\n FILES: endpoint_http.py, service_containers.py\n\nEFFORT_ESTIMATE (total ≈ 1.2h):\n medium _exec saved=20L ~40min\n easy can_probe saved=7L ~14min\n easy can_probe saved=7L ~14min\n easy anomalies saved=3L ~6min\n\nMETRICS-TARGET:\n dup_groups: 4 → 0\n saved_lines: 37 lines recoverable\n```",
"level": 2
},
{
"name": "# evolution / churn (`project/evolution.toon.yaml`)",
"type": "unknown",
"content": "```toon markpact:analysis path=project/evolution.toon.yaml\n# code2llm/evolution | 432 func | 32f | 2026-04-21\n\nNEXT[6] (ranked by impact):\n [1] !! SPLIT src/opstree/probes/builtin/rpi_diagnostics.py\n WHY: 528L, 0 classes, max CC=10\n EFFORT: ~4h IMPACT: 5280\n\n [2] ! SPLIT-FUNC scan CC=16 fan=26\n WHY: CC=16 exceeds 15\n EFFORT: ~1h IMPACT: 416\n\n [3] ! SPLIT-FUNC LessAdapter.render CC=22 fan=13\n WHY: CC=22 exceeds 15\n EFFORT: ~1h IMPACT: 286\n\n [4] ! SPLIT-FUNC RuntimeContainerProbe._list_containers CC=18 fan=11\n WHY: CC=18 exceeds 15\n EFFORT: ~1h IMPACT: 198\n\n [5] ! SPLIT-FUNC RpiPhysicalDisplayProbe._probe_wlr_randr CC=17 fan=11\n WHY: CC=17 exceeds 15\n EFFORT: ~1h IMPACT: 187\n\n [6] ! SPLIT-FUNC MigrationYamlAdapter.render CC=16 fan=6\n WHY: CC=16 exceeds 15\n EFFORT: ~1h IMPACT: 96\n\n\nRISKS[1]:\n ⚠ Splitting src/opstree/probes/builtin/rpi_diagnostics.py may break 12 import paths\n\nMETRICS-TARGET:\n CC̄: 1.1 → ≤0.8\n max-CC: 22 → ≤11\n god-modules: 1 → 0\n high-CC(≥15): 5 → ≤2\n hub-types: 0 → ≤0\n\nPATTERNS (language parser shared logic):\n _extract_declarations() in base.py — unified extraction for:\n - TypeScript: interfaces, types, classes, functions, arrow funcs\n - PHP: namespaces, traits, classes, functions, includes\n - Ruby: modules, classes, methods, requires\n - C++: classes, structs, functions, #includes\n - C#: classes, interfaces, methods, usings\n - Java: classes, interfaces, methods, imports\n - Go: packages, functions, structs\n - Rust: modules, functions, traits, use statements\n\n Shared regex patterns per language:\n - import: language-specific import/require/using patterns\n - class: class/struct/trait declarations with inheritance\n - function: function/method signatures with visibility\n - brace_tracking: for C-family languages ({ })\n - end_keyword_tracking: for Ruby (module/class/def...end)\n\n Benefits:\n - Consistent extraction logic across all languages\n - Reduced code duplication (~70% reduction in parser LOC)\n - Easier maintenance: fix once, apply everywhere\n - Standardized FunctionInfo/ClassInfo models\n\nHISTORY:\n prev CC̄=1.2 → now CC̄=1.1\n```",
"level": 2
},
{
"name": "intent",
"type": "intent",
"content": "Layered operations tree — observe, diff, orchestrate infrastructure as data",
"level": 2
}
]
}