@leing2021/super-pi 0.30.3 → 0.30.5

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.
@@ -408,11 +408,17 @@ export default function ceCoreExtension(pi: ExtensionAPI) {
408
408
  medium: "medium",
409
409
  high: "high",
410
410
  xhigh: "xhigh",
411
+ max: "max",
411
412
  "0": "low",
412
413
  "1": "medium",
413
414
  "2": "high",
414
415
  }
415
- const normalized = levelMap[targetThinking.toLowerCase()] ?? "medium"
416
+ const rawThinking = targetThinking.toLowerCase()
417
+ const knownLevel = levelMap[rawThinking]
418
+ const normalized = knownLevel ?? "medium"
419
+ if (!knownLevel && shouldNotify) {
420
+ ctx.ui.notify(`Unknown thinking level for ${stageKey}: ${targetThinking}, falling back to medium`, "warning")
421
+ }
416
422
  const currentLevel = pi.getThinkingLevel()
417
423
  if (currentLevel !== normalized) {
418
424
  pi.setThinkingLevel(normalized)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leing2021/super-pi",
3
- "version": "0.30.3",
3
+ "version": "0.30.5",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Pi-native Compound Engineering package for iterative development workflows",
@@ -40,8 +40,8 @@
40
40
  "typebox": ">=1.0.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@earendil-works/pi-coding-agent": "^0.80.0",
44
- "@earendil-works/pi-tui": "^0.80.0",
43
+ "@earendil-works/pi-coding-agent": "^0.84.1",
44
+ "@earendil-works/pi-tui": "^0.84.1",
45
45
  "bun-types": "^1.3.12"
46
46
  },
47
47
  "pi": {
@@ -32,6 +32,14 @@ Each entry reads *what it is* → *how to fix*. Match against the diff, not the
32
32
  - **Middle Man** — a class or function that mostly just delegates onward. → cut it, call the real target direct.
33
33
  - **Refused Bequest** — a subclass or implementer that ignores or overrides most of what it inherits. → drop the inheritance, use composition.
34
34
 
35
+ ## Dependency-axis tags (reinvented-wheel check)
36
+
37
+ The 12 smells above cover structure; these three catch **rebuilding what already exists**. Same binding rules apply (repo overrides, always a judgement call, default P2). One line per finding: location, what to cut, what replaces it.
38
+
39
+ - **`stdlib:`** — hand-rolled code the language's standard library already ships. → name the function that replaces it (e.g. a manual loop building a dict vs `dict(zip(keys, values))`; hand-rolled path joining vs `pathlib`).
40
+ - **`native:`** — a dependency or custom code doing what the platform already provides. → name the native feature (e.g. moment.js for one format call vs `Intl.DateTimeFormat`; a JS date-picker lib vs `<input type="date">`; app-level uniqueness checks vs a DB constraint).
41
+ - **`dependency:`** — a new package added for what a few lines or an already-installed dependency can do. → inline it or use the existing dep; add the new one only when the hand-rolled version grows real complexity.
42
+
35
43
  ## What is deliberately NOT here
36
44
 
37
45
  These are Fowler's file-level smells, **excluded from the review baseline** because they read against a whole file, not a diff — weak signal in a diff-based review. They belong in architecture audit (`references/module-design.md`) and `03-work` REFACTOR, not in `04-review` Standards axis:
@@ -32,6 +32,34 @@ Rationale: Immutable data prevents hidden side effects, makes debugging easier,
32
32
  - Avoid speculative generality
33
33
  - Start simple, then refactor when the pressure is real
34
34
 
35
+ ### The Ladder
36
+
37
+ Before writing code, stop at the **first rung that holds**:
38
+
39
+ 1. Does this need to exist at all? → No: skip it, say so in one line (YAGNI)
40
+ 2. Already in this codebase? → Reuse it. Search before writing; re-implementing what exists a few files over is the most common slop
41
+ 3. stdlib does it? → Use it
42
+ 4. Platform-native feature covers it? → Use it (native input over a picker lib, CSS over JS, DB constraint over app code)
43
+ 5. Already-installed dependency solves it? → Use it. Never add a new one for what a few lines can do
44
+ 6. Can it be one line? → One line
45
+ 7. Only then: the minimum code that works
46
+
47
+ Meta-rules:
48
+ - The ladder runs **after** understanding the problem, not instead of it. Lazy about writing, never about reading — trace every file the change touches first.
49
+ - Bug fix = **root cause**, not symptom. The root-cause fix is usually the smaller diff: one guard in the shared function beats a guard in every caller.
50
+
51
+ Never simplify away: trust-boundary validation, error handling that prevents data loss, security, accessibility, anything explicitly requested.
52
+
53
+ ### Debt marker
54
+
55
+ When deliberately cutting a corner with a known ceiling (global lock, O(n²) scan, naive heuristic), mark it:
56
+
57
+ ```
58
+ // debt: global lock, upgrade when per-account throughput matters
59
+ ```
60
+
61
+ Name the ceiling and the trigger. A `debt:` marker with no upgrade condition is rot risk, not minimalism. Audit with `rg 'debt:'`.
62
+
35
63
  ## File Organization
36
64
 
37
65
  MANY SMALL FILES > FEW LARGE FILES: