diff --git a/backend/examples/boundary_quickstart.py b/backend/examples/boundary_quickstart.py index 581346d..b88c726 100644 --- a/backend/examples/boundary_quickstart.py +++ b/backend/examples/boundary_quickstart.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=13:6 imports_exports=3:1 calls_definitions=5:1 """Copy-pasteable edcmbone-backend smoke demo. Usage: @@ -26,3 +27,4 @@ def main() -> None: if __name__ == "__main__": main() +# ratios: loc_comments=13:6 imports_exports=3:1 calls_definitions=5:1 diff --git a/backend/src/edcmbone_backend/__init__.py b/backend/src/edcmbone_backend/__init__.py index 6963ce7..0a5e5d7 100644 --- a/backend/src/edcmbone_backend/__init__.py +++ b/backend/src/edcmbone_backend/__init__.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=71:95 imports_exports=1:7 calls_definitions=17:14 """MSDMD-compliant UCNS-only backend. The backend models the smallest useful EDCM boundary surface: @@ -199,3 +200,4 @@ def serialize_boundary(boundary): "merge_boundaries", "serialize_boundary", ] +# ratios: loc_comments=71:95 imports_exports=1:7 calls_definitions=17:14 diff --git a/backend/src/ucns/__init__.py b/backend/src/ucns/__init__.py index 8614068..03ed295 100644 --- a/backend/src/ucns/__init__.py +++ b/backend/src/ucns/__init__.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=118:50 imports_exports=5:6 calls_definitions=40:14 """ ucns_v04 — UCNS Engine (turn-fraction angle convention) ======================================================== @@ -204,3 +205,4 @@ def multiply(A: UCNSObject, B: UCNSObject) -> UCNSObject: anchors_pos=tuple(new_anchors), faces_pos=tuple(new_faces), ) +# ratios: loc_comments=118:50 imports_exports=5:6 calls_definitions=40:14 diff --git a/backend/src/ucns/ucns_v04.py b/backend/src/ucns/ucns_v04.py index 8614068..03ed295 100644 --- a/backend/src/ucns/ucns_v04.py +++ b/backend/src/ucns/ucns_v04.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=118:50 imports_exports=5:6 calls_definitions=40:14 """ ucns_v04 — UCNS Engine (turn-fraction angle convention) ======================================================== @@ -204,3 +205,4 @@ def multiply(A: UCNSObject, B: UCNSObject) -> UCNSObject: anchors_pos=tuple(new_anchors), faces_pos=tuple(new_faces), ) +# ratios: loc_comments=118:50 imports_exports=5:6 calls_definitions=40:14 diff --git a/closed_tokens.py b/closed_tokens.py index b84a62f..3726c09 100644 --- a/closed_tokens.py +++ b/closed_tokens.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=348:129 imports_exports=6:3 calls_definitions=69:8 """ edcmbone — Closed-Token UCNS Encoder @@ -557,3 +558,4 @@ def feature_payload_of(obj: UCNSObject) -> Optional[UCNSObject]: if len(obj.anchors_pos) != 2: return None return obj.anchors_pos[1].payload +# ratios: loc_comments=348:129 imports_exports=6:3 calls_definitions=69:8 diff --git a/core/behavioral/__init__.py b/core/behavioral/__init__.py index d2be199..2c35354 100644 --- a/core/behavioral/__init__.py +++ b/core/behavioral/__init__.py @@ -1 +1,3 @@ +# ratios: loc_comments=0:1 imports_exports=0:0 calls_definitions=0:0 # core/behavioral/__init__.py +# ratios: loc_comments=0:1 imports_exports=0:0 calls_definitions=0:0 diff --git a/core/behavioral/behavioral_metrics.py b/core/behavioral/behavioral_metrics.py index 858e99e..2da88b6 100644 --- a/core/behavioral/behavioral_metrics.py +++ b/core/behavioral/behavioral_metrics.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=271:32 imports_exports=7:4 calls_definitions=88:7 # core/behavioral/behavioral_metrics.py # hmmm: implements behavioral_formulas_v1.md deterministically. @@ -339,3 +340,4 @@ def _get_weight(metric: str, key: str, default: float) -> float: } return out, feature_vec, Iwin +# ratios: loc_comments=271:32 imports_exports=7:4 calls_definitions=88:7 diff --git a/core/behavioral/behavioral_window.py b/core/behavioral/behavioral_window.py index 18b909f..6c8f5b7 100644 --- a/core/behavioral/behavioral_window.py +++ b/core/behavioral/behavioral_window.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=33:2 imports_exports=3:1 calls_definitions=6:1 # core/behavioral/behavioral_window.py # hmmm: rolling windows over CLOSED rounds only by default. @@ -40,3 +41,4 @@ def compute_behavioral_windows( outputs.append(out) return outputs +# ratios: loc_comments=33:2 imports_exports=3:1 calls_definitions=6:1 diff --git a/core/behavioral/marker_matcher.py b/core/behavioral/marker_matcher.py index 734ecfc..78a630a 100644 --- a/core/behavioral/marker_matcher.py +++ b/core/behavioral/marker_matcher.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=54:9 imports_exports=4:2 calls_definitions=12:3 # core/behavioral/marker_matcher.py # hmmm: longest-phrase-first matching, non-overlapping per text. @@ -68,3 +69,4 @@ def match_phrases_in_turn_tokens( end_token=i+L-1 )) return hits +# ratios: loc_comments=54:9 imports_exports=4:2 calls_definitions=12:3 diff --git a/core/behavioral/structural_proxies.py b/core/behavioral/structural_proxies.py index ef63562..81400b9 100644 --- a/core/behavioral/structural_proxies.py +++ b/core/behavioral/structural_proxies.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=47:5 imports_exports=3:5 calls_definitions=15:5 # core/behavioral/structural_proxies.py # hmmm: behavioral v1 uses structural proxies as frozen in formulas. @@ -58,3 +59,4 @@ def detect_list_growth_pattern(user_turn: Dict[str, Any], assistant_turn: Dict[s a = assistant_turn.get("raw_text", "").splitlines() count = sum(1 for line in a if line.strip().startswith(("1)", "2)", "3)", "4)", "5)", "6)", "-", "*"))) return 1 if count >= 6 else 0 +# ratios: loc_comments=47:5 imports_exports=3:5 calls_definitions=15:5 diff --git a/core/behavioral/ucns_marker_store.py b/core/behavioral/ucns_marker_store.py index 7bff181..9baf7bd 100644 --- a/core/behavioral/ucns_marker_store.py +++ b/core/behavioral/ucns_marker_store.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=70:19 imports_exports=4:2 calls_definitions=19:2 # core/behavioral/ucns_marker_store.py # Phase 1: UCNSStore-backed marker lookup for algebraic comparison with phrase matching. @@ -107,3 +108,4 @@ def ucns_hits_for_turn(store: Any, tokens: List[str]) -> Dict[str, int]: counts[key] = counts.get(key, 0) + 1 return counts +# ratios: loc_comments=70:19 imports_exports=4:2 calls_definitions=19:2 diff --git a/core/bridge/__init__.py b/core/bridge/__init__.py index dc6ee45..3b1c2b0 100644 --- a/core/bridge/__init__.py +++ b/core/bridge/__init__.py @@ -1 +1,3 @@ +# ratios: loc_comments=0:1 imports_exports=0:0 calls_definitions=0:0 # core/bridge/__init__.py +# ratios: loc_comments=0:1 imports_exports=0:0 calls_definitions=0:0 diff --git a/core/bridge/bridge_engine.py b/core/bridge/bridge_engine.py index 7b3cf4e..41b23a8 100644 --- a/core/bridge/bridge_engine.py +++ b/core/bridge/bridge_engine.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=181:24 imports_exports=4:1 calls_definitions=35:4 # core/bridge/bridge_engine.py # hmmm: observational only. Correlations + divergence flags. @@ -235,3 +236,4 @@ def _op_vec(o: Dict[str, Any]) -> List[float]: }) return outs +# ratios: loc_comments=181:24 imports_exports=4:1 calls_definitions=35:4 diff --git a/core/bridge/math_utils.py b/core/bridge/math_utils.py index 55d71be..394e8df 100644 --- a/core/bridge/math_utils.py +++ b/core/bridge/math_utils.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=17:1 imports_exports=3:2 calls_definitions=9:2 # core/bridge/math_utils.py from __future__ import annotations @@ -19,3 +20,4 @@ def pearson(x: List[float], y: List[float]) -> float: if denx == 0 or deny == 0: return 0.0 return max(-1.0, min(1.0, num/(denx*deny))) +# ratios: loc_comments=17:1 imports_exports=3:2 calls_definitions=9:2 diff --git a/core/operator/__init__.py b/core/operator/__init__.py index f189f9a..d98af45 100644 --- a/core/operator/__init__.py +++ b/core/operator/__init__.py @@ -1 +1,3 @@ +# ratios: loc_comments=0:1 imports_exports=0:0 calls_definitions=0:0 # core/operator/__init__.py +# ratios: loc_comments=0:1 imports_exports=0:0 calls_definitions=0:0 diff --git a/core/operator/inventories.py b/core/operator/inventories.py index 48b2a1f..7ef8ee3 100644 --- a/core/operator/inventories.py +++ b/core/operator/inventories.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=47:15 imports_exports=2:2 calls_definitions=27:2 # core/operator/inventories.py # hmmm: flexible loader; supports canon_eng bones/affixes JSON shapes. @@ -75,3 +76,4 @@ def load_affixes(affixes_inv: Dict[str, Any]) -> Tuple[Dict[str, str], Dict[str, suf[ks[4:]] = v return pref, suf +# ratios: loc_comments=47:15 imports_exports=2:2 calls_definitions=27:2 diff --git a/core/operator/matcher.py b/core/operator/matcher.py index 81767aa..b2749e8 100644 --- a/core/operator/matcher.py +++ b/core/operator/matcher.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=68:25 imports_exports=3:6 calls_definitions=16:6 # core/operator/matcher.py # hmmm: whole-word precedence; affix stripping only if no whole-word bone match. @@ -105,3 +106,4 @@ def match_affixes(tok: str, prefix_map: Dict[str, str], suffix_map: Dict[str, st return [], t return fams, root +# ratios: loc_comments=68:25 imports_exports=3:6 calls_definitions=16:6 diff --git a/core/operator/operator_extractor.py b/core/operator/operator_extractor.py index 83f4e70..ef517be 100644 --- a/core/operator/operator_extractor.py +++ b/core/operator/operator_extractor.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=165:13 imports_exports=4:3 calls_definitions=31:7 # core/operator/operator_extractor.py # hmmm: computes operator outputs over rolling k-turn windows. @@ -199,3 +200,4 @@ def compute_operator_windows( outputs.append(out) return outputs +# ratios: loc_comments=165:13 imports_exports=4:3 calls_definitions=31:7 diff --git a/core/parsing/__init__.py b/core/parsing/__init__.py index 8862df7..e3ba13d 100644 --- a/core/parsing/__init__.py +++ b/core/parsing/__init__.py @@ -1 +1,3 @@ +# ratios: loc_comments=0:1 imports_exports=0:0 calls_definitions=0:0 # core/parsing/__init__.py +# ratios: loc_comments=0:1 imports_exports=0:0 calls_definitions=0:0 diff --git a/core/parsing/normalizer.py b/core/parsing/normalizer.py index 42600b5..11e2021 100644 --- a/core/parsing/normalizer.py +++ b/core/parsing/normalizer.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=9:3 imports_exports=1:1 calls_definitions=4:1 # core/parsing/normalizer.py # hmmm: normalization for matching; raw_text remains lossless elsewhere. @@ -12,3 +13,4 @@ def normalize_text_for_matching(s: str) -> str: .replace("‛", "'") # single high-reversed-9 quotation mark -> ASCII apostrophe .lower() ) +# ratios: loc_comments=9:3 imports_exports=1:1 calls_definitions=4:1 diff --git a/core/parsing/parsing_pipeline.py b/core/parsing/parsing_pipeline.py index 82a4d78..d2f87c1 100644 --- a/core/parsing/parsing_pipeline.py +++ b/core/parsing/parsing_pipeline.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=12:2 imports_exports=4:1 calls_definitions=2:1 # core/parsing/parsing_pipeline.py # hmmm: orchestrates utterances -> turns -> rounds (no IO). @@ -15,3 +16,4 @@ def parse_utterances_to_turns_rounds( turns = build_turns_from_utterances(raw_utterances) rounds = build_rounds_from_turns(turns, exclude_sys_tool_from_rounds=exclude_sys_tool_from_rounds) return turns, rounds +# ratios: loc_comments=12:2 imports_exports=4:1 calls_definitions=2:1 diff --git a/core/parsing/round_builder.py b/core/parsing/round_builder.py index 7a38cf3..230c9ae 100644 --- a/core/parsing/round_builder.py +++ b/core/parsing/round_builder.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=60:6 imports_exports=2:1 calls_definitions=9:2 # core/parsing/round_builder.py # hmmm: initiator-return round closure, SYS/TOOL exclusion by default. @@ -75,3 +76,4 @@ def build_rounds_from_turns( }) return rounds +# ratios: loc_comments=60:6 imports_exports=2:1 calls_definitions=9:2 diff --git a/core/parsing/tokenizer.py b/core/parsing/tokenizer.py index a2bf108..8a0034e 100644 --- a/core/parsing/tokenizer.py +++ b/core/parsing/tokenizer.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=11:29 imports_exports=3:1 calls_definitions=9:1 # core/parsing/tokenizer.py # hmmm: must satisfy tokenization invariants from spec appendix: # - preserve punctuation as separate tokens @@ -42,3 +43,4 @@ def tokens_surface(text: str) -> List[str]: if not toks: toks = text.split() return toks +# ratios: loc_comments=11:29 imports_exports=3:1 calls_definitions=9:1 diff --git a/core/parsing/turn_builder.py b/core/parsing/turn_builder.py index d4e0954..5ce778b 100644 --- a/core/parsing/turn_builder.py +++ b/core/parsing/turn_builder.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=70:8 imports_exports=3:1 calls_definitions=15:3 # core/parsing/turn_builder.py # hmmm: turn merge doctrine + forced boundary markers. @@ -93,3 +94,4 @@ def new_turn(turn_id: str, actor_id: str) -> Dict[str, Any]: t["tokens_surface"] = tokens_surface(t["raw_text"]) return turns +# ratios: loc_comments=70:8 imports_exports=3:1 calls_definitions=15:3 diff --git a/core/windowing/__init__.py b/core/windowing/__init__.py index c8acddd..d2c7430 100644 --- a/core/windowing/__init__.py +++ b/core/windowing/__init__.py @@ -1 +1,3 @@ +# ratios: loc_comments=0:1 imports_exports=0:0 calls_definitions=0:0 # core/windowing/__init__.py +# ratios: loc_comments=0:1 imports_exports=0:0 calls_definitions=0:0 diff --git a/edcmbone/__init__.py b/edcmbone/__init__.py index f6dcc4b..50629d9 100644 --- a/edcmbone/__init__.py +++ b/edcmbone/__init__.py @@ -1,5 +1,7 @@ +# ratios: loc_comments=2:1 imports_exports=1:1 calls_definitions=0:0 """Top-level package for EDCMBone.""" from version import __version__ __all__ = ["__version__"] +# ratios: loc_comments=2:1 imports_exports=1:1 calls_definitions=0:0 diff --git a/edcmbone/edcmbone/__init__.py b/edcmbone/edcmbone/__init__.py index f2bf348..76558e2 100644 --- a/edcmbone/edcmbone/__init__.py +++ b/edcmbone/edcmbone/__init__.py @@ -1,5 +1,7 @@ +# ratios: loc_comments=2:1 imports_exports=1:1 calls_definitions=0:0 """Canonical edcmbone package namespace.""" from version import __version__ __all__ = ["__version__"] +# ratios: loc_comments=2:1 imports_exports=1:1 calls_definitions=0:0 diff --git a/edcmbone/edcmbone/behavioral/__init__.py b/edcmbone/edcmbone/behavioral/__init__.py index c871e76..a84a918 100644 --- a/edcmbone/edcmbone/behavioral/__init__.py +++ b/edcmbone/edcmbone/behavioral/__init__.py @@ -1,3 +1,5 @@ +# ratios: loc_comments=2:0 imports_exports=1:1 calls_definitions=0:0 from .snapshot.metrics import score_window, BehavioralSnapshot __all__ = ["score_window", "BehavioralSnapshot"] +# ratios: loc_comments=2:0 imports_exports=1:1 calls_definitions=0:0 diff --git a/edcmbone/edcmbone/behavioral/snapshot/__init__.py b/edcmbone/edcmbone/behavioral/snapshot/__init__.py index 8fd74a1..7f68e44 100644 --- a/edcmbone/edcmbone/behavioral/snapshot/__init__.py +++ b/edcmbone/edcmbone/behavioral/snapshot/__init__.py @@ -1,4 +1,6 @@ +# ratios: loc_comments=3:0 imports_exports=2:1 calls_definitions=0:0 from .metrics import score_window, BehavioralSnapshot from .markers import score_turn __all__ = ["score_window", "score_turn", "BehavioralSnapshot"] +# ratios: loc_comments=3:0 imports_exports=2:1 calls_definitions=0:0 diff --git a/edcmbone/edcmbone/behavioral/snapshot/markers.py b/edcmbone/edcmbone/behavioral/snapshot/markers.py index e67c1cb..7f68041 100644 --- a/edcmbone/edcmbone/behavioral/snapshot/markers.py +++ b/edcmbone/edcmbone/behavioral/snapshot/markers.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=159:37 imports_exports=2:2 calls_definitions=46:5 """ Behavioral snapshot marker engine. Implements behavioral_markers_v1.json (frozen v1.0.0) pattern matching. @@ -229,3 +230,4 @@ def score_turn(text: str) -> TurnScores: I_ack=float(I_ack), I_tier_b=I_tb, ) +# ratios: loc_comments=159:37 imports_exports=2:2 calls_definitions=46:5 diff --git a/edcmbone/edcmbone/behavioral/snapshot/metrics.py b/edcmbone/edcmbone/behavioral/snapshot/metrics.py index ddea25f..5a5ebfb 100644 --- a/edcmbone/edcmbone/behavioral/snapshot/metrics.py +++ b/edcmbone/edcmbone/behavioral/snapshot/metrics.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=73:42 imports_exports=3:2 calls_definitions=38:6 """ Behavioral snapshot 9D vector. Aggregates TurnScores over a round window (W_round m=4) into BehavioralSnapshot. @@ -137,3 +138,4 @@ def _sum(field: str) -> float: I = _clamp((1.0 - ack_ratio) * 0.7 + I_tb / (n * 2.0) * 0.3) return BehavioralSnapshot(C=C, R=R, D=D, N=N, L=L, O=O, F=F, E=E, I=I) +# ratios: loc_comments=73:42 imports_exports=3:2 calls_definitions=38:6 diff --git a/edcmbone/edcmbone/bridge/__init__.py b/edcmbone/edcmbone/bridge/__init__.py index 90b0045..258c3d2 100644 --- a/edcmbone/edcmbone/bridge/__init__.py +++ b/edcmbone/edcmbone/bridge/__init__.py @@ -1,4 +1,6 @@ +# ratios: loc_comments=3:0 imports_exports=2:1 calls_definitions=0:0 from .correlate import correlate, BridgeCorrelations from .divergence import flag_divergence, DivergenceFlags __all__ = ["correlate", "BridgeCorrelations", "flag_divergence", "DivergenceFlags"] +# ratios: loc_comments=3:0 imports_exports=2:1 calls_definitions=0:0 diff --git a/edcmbone/edcmbone/bridge/correlate.py b/edcmbone/edcmbone/bridge/correlate.py index a3c8b47..8162753 100644 --- a/edcmbone/edcmbone/bridge/correlate.py +++ b/edcmbone/edcmbone/bridge/correlate.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=43:17 imports_exports=5:2 calls_definitions=14:6 """ Bridge-layer cross-layer correlations (ternary: O↔B, O↔C, B↔C). Bridge is read-only — never modifies any layer. (Canon v1 rule, carried forward.) @@ -72,3 +73,4 @@ def correlate( OC=_pearson(ops, cons), BC=_pearson(behs, cons), ) +# ratios: loc_comments=43:17 imports_exports=5:2 calls_definitions=14:6 diff --git a/edcmbone/edcmbone/bridge/divergence.py b/edcmbone/edcmbone/bridge/divergence.py index 710baf4..adb0e68 100644 --- a/edcmbone/edcmbone/bridge/divergence.py +++ b/edcmbone/edcmbone/bridge/divergence.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=17:12 imports_exports=3:2 calls_definitions=4:2 """ Bridge-layer divergence flags. Threshold-based: correlation < threshold ⇒ layer pair flagged as divergent. @@ -33,3 +34,4 @@ def flag_divergence( OC_divergent=abs(correlations.OC) < threshold, BC_divergent=abs(correlations.BC) < threshold, ) +# ratios: loc_comments=17:12 imports_exports=3:2 calls_definitions=4:2 diff --git a/edcmbone/edcmbone/content/__init__.py b/edcmbone/edcmbone/content/__init__.py index 1463d9c..f8e7f00 100644 --- a/edcmbone/edcmbone/content/__init__.py +++ b/edcmbone/edcmbone/content/__init__.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=10:0 imports_exports=4:1 calls_definitions=0:0 from .vector import ContentVector, null_vector, average_ratings from .status import StatusFlags, TruthStatus, VerificationStatus, FoundationStatus, SpeechAct from .rating import ContentRatings @@ -9,3 +10,4 @@ "ContentRatings", "ContentWindow", "aggregate_window", ] +# ratios: loc_comments=10:0 imports_exports=4:1 calls_definitions=0:0 diff --git a/edcmbone/edcmbone/content/rating.py b/edcmbone/edcmbone/content/rating.py index d9e63c0..29b5264 100644 --- a/edcmbone/edcmbone/content/rating.py +++ b/edcmbone/edcmbone/content/rating.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=9:6 imports_exports=2:1 calls_definitions=0:1 """ Content-layer scalar ratings (6 per claim, each in [0, 1]). Reference frame: receiver-relative, conversation-scoped (provisional default per §3.2). @@ -15,3 +16,4 @@ class ContentRatings(NamedTuple): aesthetic: float # form quality (0 = poor, 1 = excellent) psychological: float # appropriateness for the receiver epistemic: float # knowledge-quality: warranted, well-grounded, hedged +# ratios: loc_comments=9:6 imports_exports=2:1 calls_definitions=0:1 diff --git a/edcmbone/edcmbone/content/status.py b/edcmbone/edcmbone/content/status.py index 262ea5b..6f98af9 100644 --- a/edcmbone/edcmbone/content/status.py +++ b/edcmbone/edcmbone/content/status.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=27:5 imports_exports=3:5 calls_definitions=0:5 """ Content-layer status flag types (4 categorical per claim). Source: canon_eng/canon_v2_proposal.md §1.5, frozen pending v2 freeze. @@ -40,3 +41,4 @@ class StatusFlags(NamedTuple): verification_status: VerificationStatus foundation_status: FoundationStatus speech_act: SpeechAct +# ratios: loc_comments=27:5 imports_exports=3:5 calls_definitions=0:5 diff --git a/edcmbone/edcmbone/content/vector.py b/edcmbone/edcmbone/content/vector.py index 500eee3..5968588 100644 --- a/edcmbone/edcmbone/content/vector.py +++ b/edcmbone/edcmbone/content/vector.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=36:11 imports_exports=4:3 calls_definitions=12:3 """ 10D content vector: StatusFlags (4 categorical) + ContentRatings (6 scalar). UCNS recursion depth: 3 (content = depth-3 in the layer–depth unification). @@ -52,3 +53,4 @@ def average_ratings(vectors: list[ContentVector]) -> ContentRatings: psychological=sum(v.ratings.psychological for v in vectors) / n, epistemic=sum(v.ratings.epistemic for v in vectors) / n, ) +# ratios: loc_comments=36:11 imports_exports=4:3 calls_definitions=12:3 diff --git a/edcmbone/edcmbone/content/window.py b/edcmbone/edcmbone/content/window.py index 4c47190..9ccab2c 100644 --- a/edcmbone/edcmbone/content/window.py +++ b/edcmbone/edcmbone/content/window.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=28:6 imports_exports=5:2 calls_definitions=10:3 """ Content-layer window aggregation. Aggregates ContentVectors from multiple claims over a turn/round window. @@ -38,3 +39,4 @@ def _dist(enum_cls, attr: str) -> dict: foundation_distribution=_dist(FoundationStatus, "foundation_status"), speech_act_distribution=_dist(SpeechAct, "speech_act"), ) +# ratios: loc_comments=28:6 imports_exports=5:2 calls_definitions=10:3 diff --git a/edcmbone/edcmbone/operator/__init__.py b/edcmbone/edcmbone/operator/__init__.py index 06b38ee..130677e 100644 --- a/edcmbone/edcmbone/operator/__init__.py +++ b/edcmbone/edcmbone/operator/__init__.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=11:18 imports_exports=3:1 calls_definitions=0:0 # === MODULE_BUILD === # id: operator_public_surface # module_name: operator package exports @@ -28,3 +29,4 @@ "aggregate", "OperatorVector", ] +# ratios: loc_comments=11:18 imports_exports=3:1 calls_definitions=0:0 diff --git a/edcmbone/edcmbone/operator/aggregate.py b/edcmbone/edcmbone/operator/aggregate.py index 293bd68..191ea8c 100644 --- a/edcmbone/edcmbone/operator/aggregate.py +++ b/edcmbone/edcmbone/operator/aggregate.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=22:24 imports_exports=2:2 calls_definitions=8:2 # === MODULE_BUILD === # id: operator_vector_aggregate # module_name: operator aggregate @@ -49,3 +50,4 @@ def aggregate(counts: dict[str, int]) -> OperatorVector: S=counts.get("S", 0) / total, total=total, ) +# ratios: loc_comments=22:24 imports_exports=2:2 calls_definitions=8:2 diff --git a/edcmbone/edcmbone/operator/count.py b/edcmbone/edcmbone/operator/count.py index 1af110e..494c79c 100644 --- a/edcmbone/edcmbone/operator/count.py +++ b/edcmbone/edcmbone/operator/count.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=20:29 imports_exports=2:2 calls_definitions=2:2 # === MODULE_BUILD === # id: operator_family_count # module_name: operator family count @@ -54,3 +55,4 @@ def count_window( for f in FAMILIES: window[f] += tc.get(f, 0) return window +# ratios: loc_comments=20:29 imports_exports=2:2 calls_definitions=2:2 diff --git a/edcmbone/edcmbone/operator/tokenize.py b/edcmbone/edcmbone/operator/tokenize.py index 11b9f93..c06ba65 100644 --- a/edcmbone/edcmbone/operator/tokenize.py +++ b/edcmbone/edcmbone/operator/tokenize.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=115:44 imports_exports=2:1 calls_definitions=25:3 # === MODULE_BUILD === # id: operator_tokenization # module_name: operator tokenizer @@ -184,3 +185,4 @@ def tokenize_turn(text: str) -> list[tuple[str, Optional[str]]]: out.extend([("?", "Q")] * trailing_q) return out +# ratios: loc_comments=115:44 imports_exports=2:1 calls_definitions=25:3 diff --git a/edcmbone/edcmbone/protocols/bone_embd_v1_1_0alpha.py b/edcmbone/edcmbone/protocols/bone_embd_v1_1_0alpha.py index 8c0ac30..f64335f 100644 --- a/edcmbone/edcmbone/protocols/bone_embd_v1_1_0alpha.py +++ b/edcmbone/edcmbone/protocols/bone_embd_v1_1_0alpha.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=26:37 imports_exports=1:4 calls_definitions=2:8 from typing import Protocol, Sequence, Tuple, NamedTuple @@ -79,3 +80,4 @@ def canon_version(self) -> str: v1.1-compliant implementations return BONE_CANON_VERSION. """ ... +# ratios: loc_comments=26:37 imports_exports=1:4 calls_definitions=2:8 diff --git a/edcmbone/edcmbone/protocols/claim_extractor.py b/edcmbone/edcmbone/protocols/claim_extractor.py index f201613..fbc4b0a 100644 --- a/edcmbone/edcmbone/protocols/claim_extractor.py +++ b/edcmbone/edcmbone/protocols/claim_extractor.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=15:17 imports_exports=1:2 calls_definitions=0:3 from typing import Protocol, Sequence, NamedTuple @@ -38,3 +39,4 @@ def extract( flesh_text is the open-class content within each claim boundary. """ ... +# ratios: loc_comments=15:17 imports_exports=1:2 calls_definitions=0:3 diff --git a/edcmbone/edcmbone/protocols/content_embedder.py b/edcmbone/edcmbone/protocols/content_embedder.py index ef4573f..347e273 100644 --- a/edcmbone/edcmbone/protocols/content_embedder.py +++ b/edcmbone/edcmbone/protocols/content_embedder.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=23:17 imports_exports=1:4 calls_definitions=0:5 from typing import Protocol, Sequence, NamedTuple @@ -49,3 +50,4 @@ def embed( enabling detection of scaffold/fill divergence. """ ... +# ratios: loc_comments=23:17 imports_exports=1:4 calls_definitions=0:5 diff --git a/edcmbone/edcmbone/protocols/transcript_embedder.py b/edcmbone/edcmbone/protocols/transcript_embedder.py index 9e159c8..75f75d7 100644 --- a/edcmbone/edcmbone/protocols/transcript_embedder.py +++ b/edcmbone/edcmbone/protocols/transcript_embedder.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=11:24 imports_exports=2:2 calls_definitions=0:4 from typing import Protocol, Sequence, NamedTuple, Tuple from .bone_embd_v1_1_0alpha import BoneEmbedding @@ -44,3 +45,4 @@ def embed(self, transcript: str) -> TranscriptEmbedding: def zero(self) -> BoneEmbedding: """The Mobius twist reference point for this transcript embedding.""" ... +# ratios: loc_comments=11:24 imports_exports=2:2 calls_definitions=0:4 diff --git a/edcmbone/operator/__init__.py b/edcmbone/operator/__init__.py index 06b38ee..130677e 100644 --- a/edcmbone/operator/__init__.py +++ b/edcmbone/operator/__init__.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=11:18 imports_exports=3:1 calls_definitions=0:0 # === MODULE_BUILD === # id: operator_public_surface # module_name: operator package exports @@ -28,3 +29,4 @@ "aggregate", "OperatorVector", ] +# ratios: loc_comments=11:18 imports_exports=3:1 calls_definitions=0:0 diff --git a/edcmbone/operator/aggregate.py b/edcmbone/operator/aggregate.py index 293bd68..191ea8c 100644 --- a/edcmbone/operator/aggregate.py +++ b/edcmbone/operator/aggregate.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=22:24 imports_exports=2:2 calls_definitions=8:2 # === MODULE_BUILD === # id: operator_vector_aggregate # module_name: operator aggregate @@ -49,3 +50,4 @@ def aggregate(counts: dict[str, int]) -> OperatorVector: S=counts.get("S", 0) / total, total=total, ) +# ratios: loc_comments=22:24 imports_exports=2:2 calls_definitions=8:2 diff --git a/edcmbone/operator/count.py b/edcmbone/operator/count.py index 1af110e..494c79c 100644 --- a/edcmbone/operator/count.py +++ b/edcmbone/operator/count.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=20:29 imports_exports=2:2 calls_definitions=2:2 # === MODULE_BUILD === # id: operator_family_count # module_name: operator family count @@ -54,3 +55,4 @@ def count_window( for f in FAMILIES: window[f] += tc.get(f, 0) return window +# ratios: loc_comments=20:29 imports_exports=2:2 calls_definitions=2:2 diff --git a/edcmbone/operator/tokenize.py b/edcmbone/operator/tokenize.py index e56b250..6f5a38b 100644 --- a/edcmbone/operator/tokenize.py +++ b/edcmbone/operator/tokenize.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=115:43 imports_exports=2:1 calls_definitions=25:3 # === MODULE_BUILD === # id: operator_tokenization # module_name: operator tokenizer @@ -183,3 +184,4 @@ def tokenize_turn(text: str) -> list[tuple[str, Optional[str]]]: out.extend([("?", "Q")] * trailing_q) return out +# ratios: loc_comments=115:43 imports_exports=2:1 calls_definitions=25:3 diff --git a/edcmbone/ucns_g/__init__.py b/edcmbone/ucns_g/__init__.py index 863c742..0dc7cf7 100644 --- a/edcmbone/ucns_g/__init__.py +++ b/edcmbone/ucns_g/__init__.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=40:14 imports_exports=2:1 calls_definitions=0:0 """ edcmbone.ucns_g ~~~~~~~~~~~~~~~ @@ -58,3 +59,4 @@ "PRIMITIVE_METRIC_AXES", "prime_for_axis", ] +# ratios: loc_comments=40:14 imports_exports=2:1 calls_definitions=0:0 diff --git a/edcmbone/ucns_g/primes.py b/edcmbone/ucns_g/primes.py index 6069cc4..1692cb1 100644 --- a/edcmbone/ucns_g/primes.py +++ b/edcmbone/ucns_g/primes.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=32:37 imports_exports=3:1 calls_definitions=3:1 """ edcmbone.ucns_g.primes ~~~~~~~~~~~~~~~~~~~~~~ @@ -83,3 +84,4 @@ def prime_for_axis(axis: str) -> int: f"{axis!r} is not a primitive UCNS-G axis; " f"valid axes: {sorted(PRIME_AXIS_ASSIGNMENT)}" ) from exc +# ratios: loc_comments=32:37 imports_exports=3:1 calls_definitions=3:1 diff --git a/edcmbone/ucns_g/schema.py b/edcmbone/ucns_g/schema.py index 6805df7..1ea335e 100644 --- a/edcmbone/ucns_g/schema.py +++ b/edcmbone/ucns_g/schema.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=187:145 imports_exports=7:7 calls_definitions=62:20 """ edcmbone.ucns_g.schema ~~~~~~~~~~~~~~~~~~~~~~ @@ -415,3 +416,4 @@ def state_for_axis(self, axis: MetricAxis) -> MetricDiskState: if state.axis == axis: return state raise KeyError(f"axis {axis!r} is not present in this grain tensor") +# ratios: loc_comments=187:145 imports_exports=7:7 calls_definitions=62:20 diff --git a/engine.py b/engine.py index aca96c4..e5a5362 100644 --- a/engine.py +++ b/engine.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=124:34 imports_exports=10:3 calls_definitions=20:5 # engine.py # GPT generated; context, prompt Erin Spencer # EDCMBone v1.0.0 library engine (framework-agnostic). @@ -188,3 +189,4 @@ def analyze_transcript( ] } } +# ratios: loc_comments=124:34 imports_exports=10:3 calls_definitions=20:5 diff --git a/frequency_probe.py b/frequency_probe.py index e6ee61a..547aff0 100644 --- a/frequency_probe.py +++ b/frequency_probe.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +# ratios: loc_comments=160:47 imports_exports=4:10 calls_definitions=94:10 """ frequency_probe.py — one pass over real text, THREE payloads. @@ -247,3 +247,4 @@ def main(): if __name__ == "__main__": main() +# ratios: loc_comments=160:47 imports_exports=4:10 calls_definitions=94:10 diff --git a/operational_widening_probe.py b/operational_widening_probe.py index 3d995e4..f1312f6 100644 --- a/operational_widening_probe.py +++ b/operational_widening_probe.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +# ratios: loc_comments=129:38 imports_exports=8:6 calls_definitions=73:6 """ operational_widening_probe.py — spend the leverage the frequency probe exposed. @@ -191,3 +191,4 @@ def main(): if __name__ == "__main__": main() +# ratios: loc_comments=129:38 imports_exports=8:6 calls_definitions=73:6 diff --git a/phi_compose_probe.py b/phi_compose_probe.py index c1d7cba..11b8e9c 100644 --- a/phi_compose_probe.py +++ b/phi_compose_probe.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +# ratios: loc_comments=164:58 imports_exports=8:9 calls_definitions=78:10 """ phi_compose_probe.py — The keystone test. @@ -261,3 +261,4 @@ def main(): if __name__ == "__main__": main() +# ratios: loc_comments=164:58 imports_exports=8:9 calls_definitions=78:10 diff --git a/phi_compose_probe_v2.py b/phi_compose_probe_v2.py index 1987e83..7a4ef17 100644 --- a/phi_compose_probe_v2.py +++ b/phi_compose_probe_v2.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +# ratios: loc_comments=126:39 imports_exports=6:5 calls_definitions=73:5 """ phi_compose_probe_v2.py — keystone, order-aware. @@ -195,3 +195,4 @@ def main(): if __name__ == "__main__": main() +# ratios: loc_comments=126:39 imports_exports=6:5 calls_definitions=73:5 diff --git a/phi_compose_probe_v3.py b/phi_compose_probe_v3.py index ea89bf4..23a6616 100644 --- a/phi_compose_probe_v3.py +++ b/phi_compose_probe_v3.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +# ratios: loc_comments=193:50 imports_exports=5:9 calls_definitions=92:9 """ phi_compose_probe_v3.py — keystone, full depth (payload + face). @@ -283,3 +283,4 @@ def main(): if __name__ == "__main__": main() +# ratios: loc_comments=193:50 imports_exports=5:9 calls_definitions=92:9 diff --git a/prime5_widening_probe.py b/prime5_widening_probe.py index 41d1b25..f11a647 100644 --- a/prime5_widening_probe.py +++ b/prime5_widening_probe.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +# ratios: loc_comments=114:33 imports_exports=5:7 calls_definitions=79:8 """ prime5_widening_probe.py — the test that can BREAK the finiteness result. @@ -173,3 +173,4 @@ def main(): if __name__ == "__main__": main() +# ratios: loc_comments=114:33 imports_exports=5:7 calls_definitions=79:8 diff --git a/prime_carpet_probe.py b/prime_carpet_probe.py index e23bf4e..34f63d9 100644 --- a/prime_carpet_probe.py +++ b/prime_carpet_probe.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +# ratios: loc_comments=61:15 imports_exports=3:4 calls_definitions=36:4 """ prime_carpet_probe.py — validate the per-sublattice finiteness law across the first 53 prime carrier axes (2..241), generalizing the prime-5 result. @@ -85,3 +85,4 @@ def factors(n): else: print("VERDICT: FAILED — at least one axis escaped its expected sublattice.") raise SystemExit(1) +# ratios: loc_comments=61:15 imports_exports=3:4 calls_definitions=36:4 diff --git a/ternary_widening_probe.py b/ternary_widening_probe.py index a24888b..f6644f9 100644 --- a/ternary_widening_probe.py +++ b/ternary_widening_probe.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +# ratios: loc_comments=127:33 imports_exports=6:6 calls_definitions=85:6 """ ternary_widening_probe.py — the correction: THREE composable together. @@ -188,3 +188,4 @@ def main(): if __name__ == "__main__": main() +# ratios: loc_comments=127:33 imports_exports=6:6 calls_definitions=85:6 diff --git a/ucns.py b/ucns.py index 4c3faf0..3b148da 100644 --- a/ucns.py +++ b/ucns.py @@ -1,5 +1,7 @@ +# ratios: loc_comments=2:1 imports_exports=1:1 calls_definitions=0:0 """Compatibility name for the UCNS v0.4 engine.""" from ucns_v04 import AnchorPayload, UCNSObject, is_unit_payload, multiply, unit_obj __all__ = ["AnchorPayload", "UCNSObject", "is_unit_payload", "multiply", "unit_obj"] +# ratios: loc_comments=2:1 imports_exports=1:1 calls_definitions=0:0 diff --git a/ucns_v04.py b/ucns_v04.py index 8614068..03ed295 100644 --- a/ucns_v04.py +++ b/ucns_v04.py @@ -1,3 +1,4 @@ +# ratios: loc_comments=118:50 imports_exports=5:6 calls_definitions=40:14 """ ucns_v04 — UCNS Engine (turn-fraction angle convention) ======================================================== @@ -204,3 +205,4 @@ def multiply(A: UCNSObject, B: UCNSObject) -> UCNSObject: anchors_pos=tuple(new_anchors), faces_pos=tuple(new_faces), ) +# ratios: loc_comments=118:50 imports_exports=5:6 calls_definitions=40:14 diff --git a/version.py b/version.py index f493ea4..5fb0298 100644 --- a/version.py +++ b/version.py @@ -1,3 +1,5 @@ +# ratios: loc_comments=1:1 imports_exports=0:0 calls_definitions=0:0 """Repository-wide version constant.""" __version__ = "1.0.1" +# ratios: loc_comments=1:1 imports_exports=0:0 calls_definitions=0:0