kiro-10x-better 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -12,6 +12,8 @@ Run inside any project directory (Node.js 18+):
12
12
  npx kiro-10x-better
13
13
  ```
14
14
 
15
+ > Using `pnpm`? You can also run `pnpm dlx kiro-10x-better`.
16
+
15
17
  Or install globally into `~/.kiro/`:
16
18
 
17
19
  ```bash
@@ -31,7 +33,10 @@ npx kiro-10x-better --global
31
33
  ## What Gets Installed
32
34
 
33
35
  - **Steering (`steering/core-rules.md`):** Karpathy-style minimal diffs, fast CLI preferences (`rg`, `ast-grep`, `jq`, `gh`), token-saving rules, and verification honesty.
34
- - **Skill (`skills/pro-workflow/SKILL.md`):** Git worktree isolation, 4-step root-cause debugging, loop engineering (1 hypothesis → 1 edit → 1 targeted check, 2–3 iteration cap), subagent context handoff, and verification before completion.
36
+ - **Skills (`skills/`):**
37
+ - `pro-workflow/SKILL.md`: Git worktree isolation, 4-step root-cause debugging, loop engineering (1 hypothesis → 1 edit → 1 targeted check, 2–3 iteration cap), subagent context handoff, and verification before completion.
38
+ - `code-review/SKILL.md`: Three-axis diff review (Spec & Correctness, Standards & Security, Simplification Opportunities) with `file:line` findings and anti-recursion subagent guard.
39
+ - `codebase-design/SKILL.md`: Deep-module architecture vocabulary, Deletion Test, Seam & Adapter rule, and bounded design interview / architecture review modes.
35
40
  - **Hooks (`hooks/`):**
36
41
  - `security-guard.json` + `scripts/guard.cjs` (`PreToolUse`): Hard-blocks destructive commands (`rm -rf`, `git push --force`, `git reset --hard`, `DROP TABLE`) and writes to `.env` or private key files.
37
42
  - `auto-lint.json` (`PostFileSave`): Auto-detects `pnpm`/`yarn`/`npm` and `biome`/`eslint`/`prettier` from your project (or disables itself if none are found).
@@ -42,7 +47,7 @@ npx kiro-10x-better --global
42
47
  ## Recommended Kiro CLI V3 Settings
43
48
 
44
49
  1. Enable **Approve for me** and **Workflows** (`chat.enableWorkflows`).
45
- 2. Set `/effort high` (or `xhigh`) on complex tasks and restart your `kiro-cli` session.
50
+ 2. Use `/effort medium` as your daily default to save Kiro credits, and switch to `/effort high` only for complex debugging or architecture tasks. Restart your `kiro-cli` session after setup.
46
51
 
47
52
  ## License
48
53
 
package/bin/cli.mjs CHANGED
@@ -113,6 +113,20 @@ function copyTemplateFile(relTemplatePath, destPath, ctx) {
113
113
  return writeTargetFile(destPath, content, ctx);
114
114
  }
115
115
 
116
+ function copyDirRecursive(relTemplateDir, destDir, labelPrefix, ctx) {
117
+ const srcDir = path.join(TEMPLATES_DIR, relTemplateDir);
118
+ for (const entry of fs.readdirSync(srcDir, { withFileTypes: true })) {
119
+ const relChild = path.join(relTemplateDir, entry.name);
120
+ const destChild = path.join(destDir, entry.name);
121
+ const childLabel = `${labelPrefix}/${entry.name}`;
122
+ if (entry.isDirectory()) {
123
+ copyDirRecursive(relChild, destChild, childLabel, ctx);
124
+ } else {
125
+ copyTemplateFile(relChild, destChild, { ...ctx, label: childLabel });
126
+ }
127
+ }
128
+ }
129
+
116
130
  function buildAutoLintConfig(stack) {
117
131
  const config = JSON.parse(
118
132
  fs.readFileSync(path.join(TEMPLATES_DIR, "hooks", "auto-lint.json"), "utf8")
@@ -188,6 +202,47 @@ function updateGitignore(cwd, tracker) {
188
202
  console.log(" update .gitignore (added .kiro/)");
189
203
  }
190
204
 
205
+ function configureMediumEffort(homeKiroDir, tracker) {
206
+ const cliJsonPath = path.join(homeKiroDir, "settings", "cli.json");
207
+ if (!fs.existsSync(cliJsonPath)) {
208
+ return;
209
+ }
210
+
211
+ let cliConfig;
212
+ try {
213
+ const raw = fs.readFileSync(cliJsonPath, "utf8").replace(/^\uFEFF/, "");
214
+ cliConfig = JSON.parse(raw);
215
+ } catch {
216
+ console.log(" skip ~/.kiro/settings/cli.json (could not parse JSON)");
217
+ return;
218
+ }
219
+
220
+ const modelDefaults = cliConfig?.["chat.modelDefaults"];
221
+ if (!modelDefaults || typeof modelDefaults !== "object" || Array.isArray(modelDefaults)) {
222
+ return;
223
+ }
224
+
225
+ let updated = false;
226
+ for (const [modelName, entry] of Object.entries(modelDefaults)) {
227
+ if (
228
+ /(claude|opus)/i.test(modelName) &&
229
+ entry &&
230
+ typeof entry === "object" &&
231
+ !Array.isArray(entry) &&
232
+ !entry.effort
233
+ ) {
234
+ entry.effort = "medium";
235
+ updated = true;
236
+ }
237
+ }
238
+
239
+ if (updated) {
240
+ fs.writeFileSync(cliJsonPath, `${JSON.stringify(cliConfig, null, 2)}\n`, "utf8");
241
+ tracker.created.push("~/.kiro/settings/cli.json (set effort: medium)");
242
+ console.log(" update ~/.kiro/settings/cli.json (set default effort: medium)");
243
+ }
244
+ }
245
+
191
246
  async function promptYesNo(question) {
192
247
  const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
193
248
  try {
@@ -248,16 +303,17 @@ async function main() {
248
303
 
249
304
  console.log(`\nSetting up Kiro CLI V3 in ${targetKiroDir}\n`);
250
305
 
251
- // Copy core steering, skill, and guard script
306
+ // Copy core steering, skills (recursively), and guard script
252
307
  copyTemplateFile(
253
308
  path.join("steering", "core-rules.md"),
254
309
  path.join(targetKiroDir, "steering", "core-rules.md"),
255
310
  { force: flags.force, label: `${prefixLabel}/steering/core-rules.md`, tracker }
256
311
  );
257
- copyTemplateFile(
258
- path.join("skills", "pro-workflow", "SKILL.md"),
259
- path.join(targetKiroDir, "skills", "pro-workflow", "SKILL.md"),
260
- { force: flags.force, label: `${prefixLabel}/skills/pro-workflow/SKILL.md`, tracker }
312
+ copyDirRecursive(
313
+ "skills",
314
+ path.join(targetKiroDir, "skills"),
315
+ `${prefixLabel}/skills`,
316
+ { force: flags.force, tracker }
261
317
  );
262
318
  copyTemplateFile(
263
319
  path.join("hooks", "scripts", "guard.cjs"),
@@ -302,6 +358,7 @@ async function main() {
302
358
  path.join(homeKiroDir, "settings", "permissions.yaml"),
303
359
  { force: flags.force, label: "~/.kiro/settings/permissions.yaml", tracker }
304
360
  );
361
+ configureMediumEffort(homeKiroDir, tracker);
305
362
  }
306
363
 
307
364
  if (flags.withSkills) {
@@ -309,9 +366,15 @@ async function main() {
309
366
  }
310
367
 
311
368
  // Summary
369
+ const bundledSkills = fs
370
+ .readdirSync(path.join(TEMPLATES_DIR, "skills"), { withFileTypes: true })
371
+ .filter((entry) => entry.isDirectory())
372
+ .map((entry) => entry.name);
373
+
312
374
  console.log("\n--- Summary ---");
313
375
  console.log(`Created/Updated: ${tracker.created.length}`);
314
376
  console.log(`Skipped: ${tracker.skipped.length}`);
377
+ console.log(`Bundled Skills: ${bundledSkills.join(", ")}`);
315
378
  if (stack) {
316
379
  console.log(
317
380
  `Detected Stack: pm=${stack.pm}, linter=${stack.linter ?? "none (disabled)"}, typescript=${stack.typescript ? "yes" : "no (disabled)"}`
@@ -319,7 +382,7 @@ async function main() {
319
382
  }
320
383
  console.log("\nNext steps in Kiro CLI V3:");
321
384
  console.log(" 1. Enable \"Approve for me\" and Workflows (chat.enableWorkflows) in Kiro settings.");
322
- console.log(" 2. Set /effort high (or xhigh) and start a fresh kiro-cli session.");
385
+ console.log(" 2. Set /effort medium for daily work (or high for complex debugging) and start a fresh kiro-cli session.");
323
386
  }
324
387
 
325
388
  main().catch((err) => {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "kiro-10x-better",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Instant, zero-dependency CLI to set up a high-discipline Kiro CLI V3 environment with hooks, steering rules, skills, and permissions.",
5
5
  "type": "module",
6
6
  "bin": {
7
- "kiro-10x-better": "./bin/cli.mjs"
7
+ "kiro-10x-better": "bin/cli.mjs"
8
8
  },
9
9
  "files": [
10
10
  "bin",
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: code-review
3
+ description: Use when reviewing pull requests, branches, or recent git changes, or when asked to simplify, audit, or check code quality before committing.
4
+ ---
5
+
6
+ # Code Review & Simplify (Standards + Spec + Simplification)
7
+
8
+ ## 1. Scope the Diff First
9
+ - Identify the comparison base (`git diff main...HEAD` or `git diff` for unstaged changes) and `git log --oneline -n 10`.
10
+ - Read only changed files and their immediate callers (`rg`). Never scan unrelated directories.
11
+ - **Subagent Guard:** If delegating checks to a subagent, explicitly instruct it NOT to invoke `/code-review` recursively.
12
+
13
+ ## 2. Evaluate Along Three Focused Axes
14
+ 1. **Spec & Correctness:** Does the diff fulfill every requirement? Check edge cases, null/empty states, async race conditions, and error handling.
15
+ 2. **Standards & Security:** Does it match repo conventions (`core-rules.md`)? Flag hardcoded secrets, missing input validation, or unsafe shell/SQL/file operations.
16
+ 3. **Simplify Pass (Anti-Bloat):** Flag shallow pass-through wrappers, duplicated logic, dead code, or speculative abstractions that can be deleted or collapsed.
17
+
18
+ ## 3. Output Format
19
+ Report findings grouped under `## Correctness & Spec`, `## Standards & Security`, and `## Simplification Opportunities` with exact `file:line` references, severity (`High` / `Medium` / `Low`), and a concrete fix. End with a 1-line verdict.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: codebase-design
3
+ description: Use when designing a new module, planning architecture, refactoring shallow wrappers, defining interfaces/seams, or asking for a design interview before coding.
4
+ ---
5
+
6
+ # Codebase Design (Deep Modules & Bounded Architecture)
7
+
8
+ ## 1. Core Design Vocabulary
9
+ - **Module:** Any unit with an interface and an implementation (function, class, package, or feature slice).
10
+ - **Interface:** Everything a caller must know—type signature, invariants, ordering rules, error modes, and performance/config assumptions.
11
+ - **Deep Module (Goal):** High leverage—lots of complex behavior hidden behind a small, simple, stable interface.
12
+ - **Shallow Module (Smell):** Interface is nearly as complex as the implementation inside it.
13
+ - **The Deletion Test:** Imagine deleting the module. If complexity disappears, it was a useless pass-through. If complexity spills across N callers, the module was hiding real work.
14
+ - **Seam & Adapter Rule:** One adapter = a hypothetical seam (do not abstract yet). Two real adapters = a real seam worth cutting.
15
+
16
+ ## 2. Bounded Process (Never Refactor Without Approval)
17
+ When invoked, follow ONLY the mode that matches the user's request—do NOT edit files automatically:
18
+ - **Mode A — New Feature / Design Interview ("grill me"):** Ask 3–5 sharp, high-leverage questions about invariants, failure modes, and interface shape before proposing a module boundary.
19
+ - **Mode B — Architecture Review:** Inspect hot-spot files (`git log --oneline -n 20`) or the user's target folder, list the top **3 deepening candidates** with a brief Before/After interface sketch, and **STOP** to let the user pick one.