@kenkaiiii/ggcoder 4.3.29 → 4.3.30

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.
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-commands.d.ts","sourceRoot":"","sources":["../../src/core/prompt-commands.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,eAAe,EAAE,aAAa,EAse1C,CAAC;AAEF,gDAAgD;AAChD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAExE"}
1
+ {"version":3,"file":"prompt-commands.d.ts","sourceRoot":"","sources":["../../src/core/prompt-commands.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,eAAe,EAAE,aAAa,EA8mB1C,CAAC;AAEF,gDAAgD;AAChD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAExE"}
@@ -466,6 +466,140 @@ Replace all placeholders with the actual commands for the detected project type
466
466
  ## Step 3: Confirm
467
467
 
468
468
  Report that /update is now available with dependency updates, security audits, and deprecation fixes.`,
469
+ },
470
+ {
471
+ name: "simplify",
472
+ aliases: [],
473
+ description: "Review changed code for reuse, quality, and efficiency, then fix any issues found",
474
+ prompt: `# Simplify: Code Review and Cleanup
475
+
476
+ Review all changed files for reuse, quality, and efficiency. Fix any issues found.
477
+
478
+ ## Phase 1: Identify Changes
479
+
480
+ Run \`git diff\` (or \`git diff HEAD\` if there are staged changes) to see what changed. If there are no git changes, review the most recently modified files that the user mentioned or that you edited earlier in this conversation.
481
+
482
+ ## Phase 2: Launch Three Review Agents in Parallel
483
+
484
+ Use the subagent tool to launch all three agents concurrently in a single response (call the subagent tool 3 times in one message). Pass each agent the full diff so it has the complete context.
485
+
486
+ ### Agent 1: Code Reuse Review
487
+
488
+ For each change:
489
+
490
+ 1. **Search for existing utilities and helpers** that could replace newly written code. Look for similar patterns elsewhere in the codebase — common locations are utility directories, shared modules, and files adjacent to the changed ones.
491
+ 2. **Flag any new function that duplicates existing functionality.** Suggest the existing function to use instead.
492
+ 3. **Flag any inline logic that could use an existing utility** — hand-rolled string manipulation, manual path handling, custom environment checks, ad-hoc type guards, and similar patterns are common candidates.
493
+
494
+ ### Agent 2: Code Quality Review
495
+
496
+ Review the same changes for hacky patterns:
497
+
498
+ 1. **Redundant state**: state that duplicates existing state, cached values that could be derived, observers/effects that could be direct calls
499
+ 2. **Parameter sprawl**: adding new parameters to a function instead of generalizing or restructuring existing ones
500
+ 3. **Copy-paste with slight variation**: near-duplicate code blocks that should be unified with a shared abstraction
501
+ 4. **Leaky abstractions**: exposing internal details that should be encapsulated, or breaking existing abstraction boundaries
502
+ 5. **Stringly-typed code**: using raw strings where constants, enums (string unions), or branded types already exist in the codebase
503
+ 6. **Unnecessary JSX nesting**: wrapper Boxes/elements that add no layout value — check if inner component props (flexShrink, alignItems, etc.) already provide the needed behavior
504
+ 7. **Unnecessary comments**: comments explaining WHAT the code does (well-named identifiers already do that), narrating the change, or referencing the task/caller — delete; keep only non-obvious WHY (hidden constraints, subtle invariants, workarounds)
505
+
506
+ ### Agent 3: Efficiency Review
507
+
508
+ Review the same changes for efficiency:
509
+
510
+ 1. **Unnecessary work**: redundant computations, repeated file reads, duplicate network/API calls, N+1 patterns
511
+ 2. **Missed concurrency**: independent operations run sequentially when they could run in parallel
512
+ 3. **Hot-path bloat**: new blocking work added to startup or per-request/per-render hot paths
513
+ 4. **Recurring no-op updates**: state/store updates inside polling loops, intervals, or event handlers that fire unconditionally — add a change-detection guard so downstream consumers aren't notified when nothing changed. Also: if a wrapper function takes an updater/reducer callback, verify it honors same-reference returns (or whatever the "no change" signal is) — otherwise callers' early-return no-ops are silently defeated
514
+ 5. **Unnecessary existence checks**: pre-checking file/resource existence before operating (TOCTOU anti-pattern) — operate directly and handle the error
515
+ 6. **Memory**: unbounded data structures, missing cleanup, event listener leaks
516
+ 7. **Overly broad operations**: reading entire files when only a portion is needed, loading all items when filtering for one
517
+
518
+ ## Phase 3: Fix Issues
519
+
520
+ Wait for all three agents to complete. Aggregate their findings and fix each issue directly. If a finding is a false positive or not worth addressing, note it and move on — do not argue with the finding, just skip it.
521
+
522
+ When done, briefly summarize what was fixed (or confirm the code was already clean).`,
523
+ },
524
+ {
525
+ name: "batch",
526
+ aliases: [],
527
+ description: "Research and plan a large-scale change, then execute it in parallel across branch-isolated workers that each open a PR",
528
+ prompt: `# Batch: Parallel Work Orchestration
529
+
530
+ You are orchestrating a large, parallelizable change across this codebase.
531
+
532
+ ## Phase 1: Research
533
+
534
+ Launch one or more subagents using the subagent tool with \`agent: "researcher"\` to deeply research what this instruction touches. You need their results before proceeding, so wait for them to complete. Have them:
535
+
536
+ - Find ALL files, patterns, and call sites that need to change
537
+ - Understand existing conventions so the migration is consistent
538
+ - Quantify the surface area (how many files, how many call sites)
539
+ - Note any risks or complications
540
+
541
+ ## Phase 2: Plan
542
+
543
+ After research completes, call the enter_plan tool to enter plan mode. Using the research findings:
544
+
545
+ 1. **Decompose into independent units.** Break the work into 5–30 self-contained units. Each unit must:
546
+ - Be independently implementable on its own git branch (no shared state with sibling units)
547
+ - Be mergeable on its own without depending on another unit's PR landing first
548
+ - Be roughly uniform in size (split large units, merge trivial ones)
549
+
550
+ Scale the count to the actual work: few files → closer to 5; hundreds of files → closer to 30. Prefer per-directory or per-module slicing over arbitrary file lists.
551
+
552
+ 2. **Determine the test recipe.** Figure out how a worker can verify its change actually works — not just that unit tests pass. Look for:
553
+ - An existing e2e/integration test suite the worker can run
554
+ - A dev-server + curl pattern (for API changes)
555
+ - A CLI verification pattern (for CLI changes)
556
+
557
+ If you cannot find a concrete verification path, ask the user how to verify. Offer 2–3 specific options based on what the researcher found. Do not skip this — the workers cannot ask the user themselves.
558
+
559
+ 3. **Write the plan** to \`.gg/plans/batch.md\` with:
560
+ - Summary of research findings
561
+ - Numbered list of work units — each with: title, file list, one-line description
562
+ - The test recipe (or "skip e2e because …")
563
+ - Note that each worker will use the \`worker\` agent (branch-isolated)
564
+
565
+ 4. Call exit_plan to present the plan for approval.
566
+
567
+ ## Phase 3: Spawn Workers (After Plan Approval)
568
+
569
+ Record the current branch name first: \`git branch --show-current\`.
570
+
571
+ Spawn one subagent per work unit using the subagent tool with \`agent: "worker"\`. **Launch them all in a single message block so they run in parallel.**
572
+
573
+ For each worker, the task must be fully self-contained. Include:
574
+ - The overall goal (the user's instruction)
575
+ - The starting branch to branch from (the branch name you recorded above)
576
+ - This unit's specific task (title, file list, change description — copied verbatim from your plan)
577
+ - Any codebase conventions discovered during research
578
+ - The test recipe from your plan (or "skip e2e because …")
579
+ - These additional instructions, copied verbatim:
580
+
581
+ \`\`\`
582
+ After you finish implementing the change:
583
+ 1. Self-review your diff for code reuse, quality, and efficiency. Search the codebase for existing utilities that could replace new code. Fix any issues found.
584
+ 2. Run the project's test suite (check for package.json scripts, Makefile targets, or common commands like npm test, pnpm test, pytest, go test). If tests fail, fix them.
585
+ 3. Follow the e2e test recipe above. If it says to skip e2e, skip it.
586
+ 4. Commit all changes with a clear message, push the branch, and create a PR with gh pr create. Use a descriptive title.
587
+ 5. Switch back to the original branch with git checkout -.
588
+ 6. End with exactly: PR: <url> or PR: none — <reason>
589
+ \`\`\`
590
+
591
+ ## Phase 4: Track Results
592
+
593
+ After launching all workers, render an initial status table:
594
+
595
+ | # | Unit | Status | PR |
596
+ |---|------|--------|----|
597
+ | 1 | <title> | running | — |
598
+ | 2 | <title> | running | — |
599
+
600
+ As workers complete, parse the \`PR: <url>\` line from each result and re-render the table with updated status (\`done\` / \`failed\`) and PR links. Keep a brief failure note for any worker that did not produce a PR.
601
+
602
+ When all workers have reported, render the final table and a one-line summary (e.g., "22/24 units landed as PRs").`,
469
603
  },
470
604
  {
471
605
  name: "compare",
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-commands.js","sourceRoot":"","sources":["../../src/core/prompt-commands.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,MAAM,CAAC,MAAM,eAAe,GAAoB;IAC9C;QACE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,2CAA2C;QACxD,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uFAuC2E;KACpF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,6CAA6C;QAC1D,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8FAiDkF;KAC3F;IACD;QACE,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,yCAAyC;QACtD,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDA6DwC;KACjD;IACD;QACE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,+CAA+C;QAC5D,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2FAwC+E;KACxF;IACD;QACE,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,sDAAsD;QACnE,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8EA8DkE;KAC3E;IACD;QACE,IAAI,EAAE,cAAc;QACpB,OA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,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qFAgDyE;KAClF;IACD;QACE,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,EAAE;QACX,WAAW,EACT,wHAAwH;QAC1H,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mHA0EuG;KAChH;IACD;QACE,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,8DAA8D;QAC3E,MAAM,EAAE;;;;;;;;;;;;;;;iFAeqE;KAC9E;CACF,CAAC;AAEF,gDAAgD;AAChD,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,IAAI,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AACxF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kenkaiiii/ggcoder",
3
- "version": "4.3.29",
3
+ "version": "4.3.30",
4
4
  "type": "module",
5
5
  "description": "CLI coding agent with OAuth authentication for Anthropic and OpenAI",
6
6
  "license": "MIT",
@@ -37,8 +37,8 @@
37
37
  "wrap-ansi": "^10.0.0",
38
38
  "@kenkaiiii/agent-home-sdk": "^0.3.8",
39
39
  "zod": "^4.3.6",
40
- "@kenkaiiii/gg-agent": "4.3.29",
41
- "@kenkaiiii/gg-ai": "4.3.29"
40
+ "@kenkaiiii/gg-agent": "4.3.30",
41
+ "@kenkaiiii/gg-ai": "4.3.30"
42
42
  },
43
43
  "optionalDependencies": {
44
44
  "@huggingface/transformers": "^3.6.0",