@su-record/vibe 2.14.0 → 2.15.0

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.
Files changed (39) hide show
  1. package/README.en.md +2 -2
  2. package/README.md +2 -2
  3. package/dist/cli/detect/matcher.d.ts +15 -0
  4. package/dist/cli/detect/matcher.d.ts.map +1 -0
  5. package/dist/cli/detect/matcher.js +278 -0
  6. package/dist/cli/detect/matcher.js.map +1 -0
  7. package/dist/cli/detect/signatures.d.ts +76 -0
  8. package/dist/cli/detect/signatures.d.ts.map +1 -0
  9. package/dist/cli/detect/signatures.js +175 -0
  10. package/dist/cli/detect/signatures.js.map +1 -0
  11. package/dist/cli/detect/workspace.d.ts +7 -0
  12. package/dist/cli/detect/workspace.d.ts.map +1 -0
  13. package/dist/cli/detect/workspace.js +112 -0
  14. package/dist/cli/detect/workspace.js.map +1 -0
  15. package/dist/cli/detect.characterization.test.d.ts +7 -0
  16. package/dist/cli/detect.characterization.test.d.ts.map +1 -0
  17. package/dist/cli/detect.characterization.test.js +294 -0
  18. package/dist/cli/detect.characterization.test.js.map +1 -0
  19. package/dist/cli/detect.d.ts.map +1 -1
  20. package/dist/cli/detect.js +64 -488
  21. package/dist/cli/detect.js.map +1 -1
  22. package/dist/cli/postinstall/constants.d.ts.map +1 -1
  23. package/dist/cli/postinstall/constants.js +1 -0
  24. package/dist/cli/postinstall/constants.js.map +1 -1
  25. package/dist/cli/setup/ProjectSetup.js +1 -1
  26. package/dist/cli/setup/ProjectSetup.js.map +1 -1
  27. package/dist/infra/lib/ui-ux/CsvDataLoader.d.ts +10 -1
  28. package/dist/infra/lib/ui-ux/CsvDataLoader.d.ts.map +1 -1
  29. package/dist/infra/lib/ui-ux/CsvDataLoader.js +11 -5
  30. package/dist/infra/lib/ui-ux/CsvDataLoader.js.map +1 -1
  31. package/dist/infra/lib/ui-ux/CsvDataLoader.test.js +8 -8
  32. package/dist/infra/lib/ui-ux/CsvDataLoader.test.js.map +1 -1
  33. package/dist/infra/lib/ui-ux/SearchService.test.js +1 -1
  34. package/dist/infra/lib/ui-ux/SearchService.test.js.map +1 -1
  35. package/hooks/scripts/__tests__/.vibe/command-log.txt +18 -0
  36. package/hooks/scripts/__tests__/.vibe/memories/memories.db-shm +0 -0
  37. package/hooks/scripts/__tests__/.vibe/memories/memories.db-wal +0 -0
  38. package/package.json +3 -2
  39. package/skills/yagni-ladder/SKILL.md +90 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@su-record/vibe",
3
- "version": "2.14.0",
4
- "description": "AI Coding Framework for Claude Code — 60+ agents, 69 skills, multi-LLM orchestration",
3
+ "version": "2.15.0",
4
+ "description": "AI Coding Framework for Claude Code — 42+ agents, 70 skills, multi-LLM orchestration",
5
5
  "type": "module",
6
6
  "main": "dist/cli/index.js",
7
7
  "exports": {
@@ -28,6 +28,7 @@
28
28
  "gen:skill-docs": "npx tsx scripts/gen-skill-docs.ts",
29
29
  "gen:skill-docs:check": "npx tsx scripts/gen-skill-docs.ts --check",
30
30
  "validate:skill-invocation": "npx tsx scripts/validate-skill-invocation.ts",
31
+ "validate:counts": "npx tsx scripts/validate-counts.ts",
31
32
  "test": "vitest run",
32
33
  "test:watch": "vitest",
33
34
  "prepublishOnly": "pnpm build",
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: yagni-ladder
3
+ user-invocable: false
4
+ invocation: [auto]
5
+ tier: core
6
+ description: "YAGNI Ladder — block writing code before checking 5 cheaper rungs. Sibling of rob-pike: rob-pike blocks premature optimization, this blocks premature code. Auto-activates when about to write non-trivial implementation code."
7
+ triggers: [add feature, implement, create a class, write a, build a, helper, utility, wrapper, abstraction, manager, handler, service for]
8
+ priority: 90
9
+ ---
10
+
11
+ # The YAGNI Ladder
12
+
13
+ `rob-pike` blocks premature *optimization*. This blocks premature *code*.
14
+
15
+ The agent's default failure mode is writing too much: a 50-line class for a
16
+ one-line job, a wrapper around something the stdlib already does, a config
17
+ system for a value that never changes. Catch it **before** generation, not in
18
+ review — once the code exists, deleting it costs more tokens than never writing
19
+ it.
20
+
21
+ ## The Ladder
22
+
23
+ Before writing implementation code, climb these rungs **in order** and stop at
24
+ the **first** one that satisfies the need:
25
+
26
+ 1. **Is it needed at all?** — Does the requirement actually ask for this, or am
27
+ I inventing it? If speculative ("might need it later"), stop. Don't build it.
28
+ 2. **Is it in the stdlib?** — Language standard library / built-ins. (`crypto`,
29
+ `Intl`, `Array.prototype`, `pathlib`, …)
30
+ 3. **Is it a native platform feature?** — The runtime/platform already does it.
31
+ (`<input type="date">`, CSS `:has()`, HTTP caching headers, DB constraints.)
32
+ 4. **Does an already-installed dependency do it?** — Check `package.json` /
33
+ lockfile first. Don't add a dependency for what an existing one covers.
34
+ 5. **Can it be one line?** — A single expression / call, no new file, no class.
35
+ 6. **Only now: write the minimal code** — and no more than rungs 1–5 left undone.
36
+
37
+ **Tie-break rule:** if two rungs both apply, take the **higher** rung (lower
38
+ number). Native feature beats a one-liner; stdlib beats a dependency.
39
+
40
+ ## Anti-Patterns to Block
41
+
42
+ | Impulse | Rung that catches it | Response |
43
+ |---|---|---|
44
+ | "I'll write a date-picker component" | 3 (native) | `<input type="date">`. One line. |
45
+ | "Add a `StringUtils.isEmpty()` helper" | 2 (stdlib) | `!s` / `not s`. The language already does this. |
46
+ | "Let me build a retry wrapper class" | 4 (installed dep) | Does an HTTP/util lib in the lockfile already retry? |
47
+ | "I'll add a config system for this value" | 1 (needed?) | It's one constant that never changes. A `const` is the config. |
48
+ | "A `CacheManager` class with TTL + eviction" | 1 / 5 | Is concurrency real yet? A `Map` + one `setTimeout` may be the whole job. |
49
+ | "Generic `DataProcessor(strategy, validator…)`" | 1 (needed?) | One concrete function. Generalize when a *second* caller exists. |
50
+ | "190-line animated dashboard" | 1 (needed?) | Did the task ask for animation, or just the number? Ship the 13 lines. |
51
+
52
+ ## When Writing The Code IS Justified
53
+
54
+ Proceed to rung 6 only when ALL are true:
55
+
56
+ - Rungs 1–5 genuinely don't cover it (you checked the lockfile, not guessed).
57
+ - The requirement explicitly asks for it — not "might need."
58
+ - You write the **minimum** that satisfies the requirement, nothing for "later."
59
+
60
+ ## Two Hard Rules That Override Simplicity
61
+
62
+ Simplification pressure must never erode these:
63
+
64
+ 1. **Never skip security or trust-boundary work.** Input validation, auth
65
+ checks, escaping, permission boundaries — these are *requirements*, not
66
+ optional complexity. "One line" is no excuse to drop a validation.
67
+ 2. **Leave a comment + upgrade path on deliberate simplifications.** When you
68
+ pick the simple option knowing a bigger one might be needed later, say so in
69
+ the code so the next reader sees it was a *choice*, not an oversight:
70
+
71
+ ```ts
72
+ // Global lock is enough at current throughput.
73
+ // Switch to per-account locking if write contention shows up.
74
+ const lock = new Mutex();
75
+ ```
76
+
77
+ ## Relationship to Other Skills
78
+
79
+ - **`rob-pike`** — same shape, optimization axis. Climb both ladders: don't
80
+ optimize without measuring, don't write code without climbing the rungs.
81
+ - **`simplicity-reviewer`** (review agent) — the *sufficiency net* after the
82
+ fact. This skill is the *generation gate* before the fact. If this skill did
83
+ its job, simplicity-reviewer finds nothing to delete.
84
+
85
+ ## Questions to Ask Before Writing
86
+
87
+ 1. "Does the stdlib or platform already do this?"
88
+ 2. "Is there a dependency already installed that covers it?"
89
+ 3. "Can this be one line instead of one file?"
90
+ 4. "Am I building for a requirement that exists, or one I imagined?"