cursordoctrine 0.2.2 → 0.2.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cursordoctrine",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Thin self-review hooks for Cursor — the model is the auditor. Intent-trace final review (Tier 0), unified 13-item anti-slop checklist, operational slop detection.",
5
5
  "bin": {
6
6
  "cursordoctrine": "bin/cli.mjs"
@@ -635,13 +635,15 @@ def collect_defs(rel: str, lines: list[str]) -> list[Finding]:
635
635
  nb = normalize_body(raw, lang)
636
636
  sb = structural_body(raw, lang)
637
637
  # Non-blank lines only: the brace walk pads raw with edge newlines,
638
- # and counting them would let `super(props);` pass the 3-line floor.
638
+ # and counting them would let `super(props);` pad its body_line count.
639
639
  body_lines = sum(1 for s in raw.splitlines() if s.strip()) or 1
640
- # Exact-dup hash needs substance (>=3 lines or >=60 chars): one-line
641
- # boilerplate like `super(props);` is not knowledge worth consolidating.
640
+ # Exact-dup hash needs substance (>=12 normalized chars). An earlier
641
+ # >=3-lines-or->=60-chars floor excluded the skill's own marquee case -
642
+ # tiny predicates like isRecord/isObject (1 line, ~40 chars) whose
643
+ # byte-identical bodies are exactly the duplication worth surfacing.
644
+ # Boilerplate like `return;`/`return x;` stays under the 12-char floor.
642
645
  # A truncated body is a prefix, not the function - never call it exact.
643
- hash_exact = (not truncated and len(nb) >= 12
644
- and (body_lines >= 3 or len(nb) >= 60))
646
+ hash_exact = (not truncated and len(nb) >= 12)
645
647
  defs.append({
646
648
  "name": name, "file": rel, "line": i + 1,
647
649
  "exported": _is_exported(name, ln, lang),