@kenkaiiii/ggcoder 5.86.3 → 5.87.1

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 (105) hide show
  1. package/README.md +23 -32
  2. package/assets/skills/bulletproof/SKILL.md +3 -1
  3. package/assets/skills/compliance-guard/SKILL.md +1 -1
  4. package/assets/skills/durable/SKILL.md +1 -1
  5. package/assets/skills/lean/SKILL.md +3 -1
  6. package/dist/app-sidecar/progress-manager.d.ts +2 -20
  7. package/dist/app-sidecar/progress-manager.js +2 -15
  8. package/dist/app-sidecar/progress-manager.js.map +1 -1
  9. package/dist/app-sidecar/royale.d.ts +26 -24
  10. package/dist/app-sidecar/royale.js +85 -187
  11. package/dist/app-sidecar/royale.js.map +1 -1
  12. package/dist/app-sidecar.js +32 -40
  13. package/dist/app-sidecar.js.map +1 -1
  14. package/dist/config.d.ts +12 -0
  15. package/dist/config.js +24 -94
  16. package/dist/config.js.map +1 -1
  17. package/dist/core/autopilot-gate.js +2 -3
  18. package/dist/core/autopilot-gate.js.map +1 -1
  19. package/dist/core/bundled-agents.js +7 -27
  20. package/dist/core/bundled-agents.js.map +1 -1
  21. package/dist/core/checklist-items.d.ts +0 -8
  22. package/dist/core/checklist-items.js +0 -8
  23. package/dist/core/checklist-items.js.map +1 -1
  24. package/dist/core/code-retrieval.d.ts +1 -1
  25. package/dist/core/code-retrieval.js +2 -2
  26. package/dist/core/code-retrieval.js.map +1 -1
  27. package/dist/core/mcp/deferred-catalog.d.ts +1 -1
  28. package/dist/core/mcp/deferred-catalog.js +1 -1
  29. package/dist/core/prompt-commands.js +0 -99
  30. package/dist/core/prompt-commands.js.map +1 -1
  31. package/dist/core/skills.d.ts +6 -0
  32. package/dist/core/skills.js +11 -3
  33. package/dist/core/skills.js.map +1 -1
  34. package/dist/core/style-packs/packs.js +1 -1
  35. package/dist/core/subagent-policy.d.ts +6 -0
  36. package/dist/core/subagent-policy.js +21 -2
  37. package/dist/core/subagent-policy.js.map +1 -1
  38. package/dist/core/subagent-receipt.d.ts +2 -2
  39. package/dist/core/subagent-receipt.js +5 -8
  40. package/dist/core/subagent-receipt.js.map +1 -1
  41. package/dist/core/trophies/catalog-more.js +3 -23
  42. package/dist/core/trophies/catalog-more.js.map +1 -1
  43. package/dist/core/trophies/engine.js +0 -4
  44. package/dist/core/trophies/engine.js.map +1 -1
  45. package/dist/core/trophies/types.d.ts +1 -1
  46. package/dist/core/trophies/types.js +0 -2
  47. package/dist/core/trophies/types.js.map +1 -1
  48. package/dist/goals-agent/goal-team.js +3 -4
  49. package/dist/goals-agent/goal-team.js.map +1 -1
  50. package/dist/modes/acp-mode.js +0 -1
  51. package/dist/modes/acp-mode.js.map +1 -1
  52. package/dist/system-prompt.js +1 -0
  53. package/dist/system-prompt.js.map +1 -1
  54. package/dist/tools/index.d.ts +0 -2
  55. package/dist/tools/index.js +0 -6
  56. package/dist/tools/index.js.map +1 -1
  57. package/dist/tools/operations.js +1 -1
  58. package/dist/tools/operations.js.map +1 -1
  59. package/dist/tools/prompt-hints.js +0 -6
  60. package/dist/tools/prompt-hints.js.map +1 -1
  61. package/dist/tools/skill.js +11 -5
  62. package/dist/tools/skill.js.map +1 -1
  63. package/dist/tools/tool-tiers.d.ts +2 -1
  64. package/dist/tools/tool-tiers.js +2 -3
  65. package/dist/tools/tool-tiers.js.map +1 -1
  66. package/dist/ui/App.js +0 -1
  67. package/dist/ui/App.js.map +1 -1
  68. package/dist/ui/components/SkillsOverlay.js +2 -1
  69. package/dist/ui/components/SkillsOverlay.js.map +1 -1
  70. package/package.json +6 -5
  71. package/assets/skills/clarify/SKILL.md +0 -39
  72. package/assets/skills/code-review/SKILL.md +0 -82
  73. package/assets/skills/code-review/references/agent-diffs.md +0 -27
  74. package/assets/skills/code-review/references/tests.md +0 -19
  75. package/assets/skills/evidence-led-ui/LICENSES.md +0 -79
  76. package/assets/skills/evidence-led-ui/SKILL.md +0 -95
  77. package/assets/skills/evidence-led-ui/references/anti-defaults.md +0 -110
  78. package/assets/skills/evidence-led-ui/references/archetypes.md +0 -97
  79. package/assets/skills/evidence-led-ui/references/craft-rulings.md +0 -242
  80. package/assets/skills/evidence-led-ui/references/direction.md +0 -116
  81. package/assets/skills/evidence-led-ui/references/methodology.md +0 -64
  82. package/assets/skills/evidence-led-ui/references/observed-patterns.md +0 -68
  83. package/assets/skills/evidence-led-ui/references/production-contract.md +0 -148
  84. package/assets/skills/evidence-led-ui/references/provenance.md +0 -142
  85. package/assets/skills/evidence-led-ui/references/quality-rubric.md +0 -126
  86. package/assets/skills/evidence-led-ui/references/ui-libraries.md +0 -30
  87. package/assets/skills/refactoring/SKILL.md +0 -72
  88. package/assets/skills/refactoring/references/agent-pitfalls.md +0 -46
  89. package/assets/skills/refactoring/references/legacy.md +0 -70
  90. package/assets/skills/refactoring/references/smells.md +0 -71
  91. package/assets/skills/root-cause/SKILL.md +0 -46
  92. package/assets/skills/shared-language/SKILL.md +0 -32
  93. package/assets/skills/tdd/SKILL.md +0 -42
  94. package/dist/app-sidecar/royale-bug.d.ts +0 -19
  95. package/dist/app-sidecar/royale-bug.js +0 -112
  96. package/dist/app-sidecar/royale-bug.js.map +0 -1
  97. package/dist/app-sidecar/royale-deploy.d.ts +0 -5
  98. package/dist/app-sidecar/royale-deploy.js +0 -76
  99. package/dist/app-sidecar/royale-deploy.js.map +0 -1
  100. package/dist/tools/code-nav.d.ts +0 -29
  101. package/dist/tools/code-nav.js +0 -299
  102. package/dist/tools/code-nav.js.map +0 -1
  103. package/dist/tools/search-code.d.ts +0 -10
  104. package/dist/tools/search-code.js +0 -90
  105. package/dist/tools/search-code.js.map +0 -1
@@ -1,70 +0,0 @@
1
- # Legacy and Untested Code
2
-
3
- For codebases or areas where the baseline gate cannot be met: no tests, an unrunnable suite, or a migration too large to land as small commits. The prime directive still holds — observable behavior preserved, bugs included (log them; fixing them is separate work the user must choose).
4
-
5
- ## Sequence
6
-
7
- **1. Make the system runnable and observable.** Get it to start locally with realistic data. If you cannot execute it, say so and stop — static-only refactoring of critical legacy paths is a coin flip.
8
-
9
- **2. Build characterization tests (golden master).** Tests that assert what the code *actually does*, not what it should do:
10
-
11
- - Call the boundary (public API, CLI, event handler, exported function) with real inputs.
12
- - Capture the full observable output — return values, written files, emitted events, HTTP responses, log lines.
13
- - Assert the captured behavior, including wrong-looking output. If output looks like a bug, record the bug and pin the bug.
14
- - Sufficient coverage: the paths your refactor will touch and their immediate callers. 80% project coverage is not the bar; coverage of the change surface is.
15
-
16
- Approval (snapshot) testing is the cheap way to do this for complex outputs: serialize the output, approve it once as the golden file, and any later diff fails the test (ApprovalTests exists for many languages; Jest/Vitest `toMatchSnapshot` works too). Scrub nondeterministic fields (timestamps, IDs) before comparing, or the net is flaky.
17
-
18
- Gate: the characterization suite is **green against the unmodified system** before any refactoring. A red baseline proves nothing later.
19
-
20
- **3. Create seams before structure.** A seam is a place where behavior can be intercepted without editing the logic:
21
-
22
- - Extract an interface over the dependency, implement it twice (old, new).
23
- - Dependency injection for clocks, RNGs, IDs, filesystem, network — anything that makes behavior nondeterministic.
24
- - Adapter wrapping the legacy module so new code consumes the adapter, not the legacy internals.
25
-
26
- **4. Migrate by one of the incremental strategies below** — never big-bang.
27
-
28
- **5. Delete last.** The legacy path is removed only after the new path has provably carried the full behavior (characterization suite green against the new path). Before deleting anything old, check why it exists — `git blame` / changelog; code that looks pointless sometimes guards an incident (Chesterton's Fence).
29
-
30
- ## Incremental migration strategies
31
-
32
- ### Branch by Abstraction
33
- For replacing an internal implementation that many callers use. Create an abstraction over the old implementation → migrate callers to it one by one (each a working commit) → implement the new behind the abstraction → flip the default → delete the old. Hybrid states are acceptable and working at every commit.
34
-
35
- ### Parallel Change (expand–migrate–contract)
36
- For changing a live contract (API, storage schema, queue message) where old and new consumers coexist:
37
-
38
- 1. **Expand** — support both old and new forms side by side; write the new form.
39
- 2. **Migrate** — move every consumer to the new form, one by one.
40
- 3. **Contract** — after all readers are migrated and nothing reads the old form, remove it.
41
-
42
- Never skip the migration phase because tests pass — external consumers may exist that tests don't model.
43
-
44
- ### Strangler Fig
45
- For replacing a subsystem wholesale. Put a facade in front of the legacy system → route traffic through the facade → intercept one route/slice at a time, implementing it fresh behind the facade (guarded by a feature flag when the slice is risky) → when all slices are intercepted, the legacy core is unused; delete it. Each interception must keep the characterization suite green.
46
-
47
- ## Codemods (large mechanical changes)
48
-
49
- For one transformation applied across many files (rename, API migration, import moves). Tools: **ast-grep** (polyglot structural search/rewrite), **jscodeshift** (JS/TS transforms), **OpenRewrite** (recipes for large-scale refactoring, Java-first, also JS/TS). Use what is already installed; installing one needs the user's OK.
50
-
51
- 1. **Search before rewrite.** Run the pattern read-only; count matches; spot-check ~5 by hand, including the weird ones (comments, strings, dynamic access, re-exports).
52
- 2. **Dry run on one directory**, review the diff, run that package's tests.
53
- 3. **Apply repo-wide as its own commit** — the codemod commit contains only codemod output. Hand fixes for leftovers go in a separate commit, so reviewers can trust the mechanical one.
54
- 4. **Grep for survivors** the pattern missed (dynamic calls, string references, docs); list them, do not silently hand-edit beyond the plan.
55
- 5. Full suite + typecheck + lint across every consuming package.
56
-
57
- An agent hand-editing 50 files is a rewrite with 50 chances of drift; a codemod is one reviewable rule.
58
-
59
- ## Per-phase discipline (all strategies)
60
-
61
- Every phase ends with a **validation checkpoint**: characterization + full suite green, and a stated **rollback trigger** — the condition under which this phase is reverted (a commit, a flag flip, never a re-merge). Keep commits bisectable: one phase-step per commit, `git bisect` must stay usable for finding which step changed behavior.
62
-
63
- Feature flags guard risky slices, but flags are debt: each one gets a removal issue at creation, and is retired as soon as the new path is proven.
64
-
65
- ## Sources (SNAPSHOT, accessed 3 October 2026)
66
-
67
- - Parallel Change — https://martinfowler.com/bliki/ParallelChange.html
68
- - Strangler Fig — https://martinfowler.com/bliki/StranglerFigApplication.html
69
- - ApprovalTests — https://approvaltests.com/
70
- - ast-grep — https://ast-grep.github.io/ ; jscodeshift — https://jscodeshift.com/ ; OpenRewrite — https://docs.openrewrite.org/
@@ -1,71 +0,0 @@
1
- # Smells, Metrics, Prioritization
2
-
3
- Detection and targeting material for the refactoring skill. Thresholds are heuristics for *where to look*, never rules that a file crossing one must be refactored.
4
-
5
- ## Metrics quick reference
6
-
7
- Estimate without tooling: cyclomatic complexity ≈ count of decision points (`if`, `while`, `for`, `&&`, `||`, `case`, `catch`, ternary) + 1. Cognitive complexity adds weighting for nesting.
8
-
9
- | Metric | Comfortable | Refactor signal |
10
- |---|---|---|
11
- | Cyclomatic complexity (function) | < 10 | 16+ |
12
- | Cognitive complexity (function) | < 10 | 15+ |
13
- | Function length | < 30 lines | 50+ (or one screen) |
14
- | Class/module length | < 300 lines | 500+ |
15
- | Parameters | ≤ 3 | 6+ (or booleans that change behavior) |
16
- | Duplication | — | Same logic 3+ places (Rule of Three) |
17
-
18
- ## Smell catalog
19
-
20
- Work top of list first within a risk band. Each entry: signal → usual transformation.
21
-
22
- ### Bloaters
23
- - **Long method / function** — exceeds a screen, needs comments to explain sections → Extract Method; conditional blocks each become guard clauses or extracted methods.
24
- - **God class / module** — knows everything, changes for every reason → Extract Class by responsibility; move features to the module that owns the data (Feature Envy fix).
25
- - **Long parameter list** — callers pass the same cluster → Introduce Parameter Object; or pass the object the params came from.
26
- - **Primitive obsession** — coordinates, money, IDs as bare strings/numbers everywhere → Introduce Value Object with validation at creation.
27
-
28
- ### Change preventers
29
- - **Divergent change** — one module changed for many unrelated reasons → split by reason (Extract Class).
30
- - **Shotgun surgery** — one change scattered across many files → Move Function/Field until one module owns the concept.
31
- - **Parallel inheritance hierarchies** — two hierarchies that must move together → reference one from the other, or unify with a strategy.
32
-
33
- ### Dispensables
34
- - **Duplicate code** — same logic 3+ places (Rule of Three: tolerate twice, extract on the third) → Extract Function, share it. Two occurrences with divergence is a bug factory.
35
- - **Dead code** — unreached branches, unused exports, commented-out blocks → delete. Git history has it.
36
- - **Speculative generality** — abstraction with one caller, flags always passed the same value, "we might need it" → inline and delete. Treat as aggressively as bloat; agents generate this smell by default.
37
- - **Magic numbers** — unexplained literals → named constant placed where its meaning lives.
38
-
39
- ### Couplers
40
- - **Feature envy** — method mostly reads another module's data → Move Function to the data.
41
- - **Inappropriate intimacy** — modules poking each other's privates → Move Method/Field, or extract the shared concept.
42
- - **Message chains** — `a.b().c().d()` → hide the chain behind a method on the object you know.
43
- - **Middle man** — class that only forwards → remove it, let callers talk directly.
44
-
45
- ### Conditionals
46
- - **Deep nesting** — 3+ levels → guard clauses, then Extract Method per branch; Replace Nested Conditional with Guard Clauses.
47
- - **Complex switch repeated** — same switch on type in multiple places → Replace Conditional with Polymorphism (or a lookup table for the simple data case — do not build a class hierarchy to avoid an object literal).
48
- - **Boolean-flag parameters** — `doThing(x, true)` → split into two named functions.
49
-
50
- ## Transformation mechanics (the load-bearing ones)
51
-
52
- Each must be mechanically checkable — "does everything still compile/tests green" — before the next.
53
-
54
- - **Extract Method/Function**: create the new function, copy code, pass locals as params, replace body with a call. Pitfall: extraction that captures mutable local state — pass state explicitly or take smaller slices.
55
- - **Rename**: language-aware rename (LSP/IDE) only at any nontrivial scope; never textual find-replace on names shorter than the unique threshold. Renaming is the highest-value, lowest-risk transformation — do it early and often.
56
- - **Move Function**: move, fix references, adjust visibility. Best when the function's data lives in the destination (Feature Envy).
57
- - **Introduce Parameter Object**: group params into a record, migrate callers mechanically.
58
- - **Replace Conditional with Polymorphism**: only after the switch is duplicated in 2+ places; introduce subtype per branch, migrate case by case, delete the switch last.
59
- - **Replace Magic Number / Introduce Named Constant**: constant named by *meaning*, not value (`MAX_RETRIES`, not `THREE`).
60
-
61
- ## Prioritization
62
-
63
- Order targets by **risk-adjusted value**:
64
-
65
- 1. **Security** — smells near auth, input handling, crypto.
66
- 2. **Correctness** — duplication with divergence, boundary-handling drift, shared mutable state.
67
- 3. **Hotspots** — churn × complexity. `git log --format=%H <path>` / blame frequency identifies churn; complexity from the table above. A moderately messy file nobody touches is not worth your risk budget.
68
- 4. **Structure** blocking the change the user actually wants (preparatory refactoring).
69
- 5. **Duplication, naming** — cheapest, do opportunistically in touched files.
70
-
71
- Defer with a note when: no failing demand, near deletion, or the safety net cannot reach it this session.
@@ -1,46 +0,0 @@
1
- ---
2
- name: root-cause
3
- description: Use when a bug resists the obvious fix or is flaky. Do NOT use when the cause is obvious.
4
- ---
5
-
6
- # Root-Cause
7
-
8
- Build a feedback loop, then let evidence kill hypotheses. Each phase has a gate. Keep a hypothesis log as working notes (`H# | prediction | experiment | result | verdict`); show it in the final answer when the ask was "why", otherwise summarise it in one line.
9
-
10
- ## Phase 1 — Build the loop
11
-
12
- ONE command that reproduces the failure on demand. Cheapest first: failing test → curl/script → CLI run → headless browser script → trace replay → minimal harness.
13
-
14
- Gate: **red-capable**, **deterministic**, **fast** (seconds), **agent-runnable**. Run it red. No red command, no Phase 2.
15
-
16
- - **Flaky?** Run it N times (e.g. 20–50) and record the fail rate; that rate is the signal. Vary one thing at a time (order, seed, parallelism, timing) until it is deterministic or the rate moves.
17
- - **Worked before?** With a known-good commit and the loop as a script: `git bisect start <bad> <good>`, then `git bisect run <script>` (exit 0 = good, 125 = skip untestable commit, any other 1–127 = bad). Always `git bisect reset` after. Ask first if the tree has uncommitted work.
18
-
19
- ## Phase 2 — Shrink it
20
-
21
- Remove input, config, and code until removing anything more makes it pass (delta debugging: halve, test, keep the failing half). What survives is implicated. Already minimal? Say so.
22
-
23
- ## Phase 3 — Hypotheses
24
-
25
- 3–5 falsifiable one-liners, each naming the observation that would kill it. Rank by likelihood × cheapness. Show the list (non-blocking).
26
-
27
- ## Phase 4 — One variable
28
-
29
- Test one hypothesis at a time, cheapest first. Never change two things between runs. Instrument boundaries (inputs, outputs, timing), not everything; prefer existing logging/tracing or the debugger. Tag new debug output `[DBG-xxxx]` (random suffix) so removal is one grep.
30
-
31
- ## Phase 5 — Regression test before fix
32
-
33
- Write the failing regression test FIRST at a real seam. No honest seam? Record that as a finding and test at the nearest honest boundary. No suite and none requested? Keep the repro script as the check — never introduce a suite unasked.
34
-
35
- ## Phase 6 — Close out
36
-
37
- If the ask was "why", stop at the answer and the fix it implies — change code only when the user asks for the fix. Otherwise fix, run the loop green (flaky: N runs, zero failures), run the regression test, grep-remove every `[DBG-xxxx]`, and state the cause in one sentence: cause → mechanism → symptom. Label claims `RUNTIME` / `CODE` / `DEDUCED`.
38
-
39
- Hard rules: three failed fixes → the hypothesis list is wrong; return to Phase 3. Redact secrets from any quoted or committed log line.
40
-
41
- ## Scaling: one agent or several
42
-
43
- - Reproduction, shrinking, and experiments: main thread only — one variable at a time.
44
- - Wide codebase (several packages could own the bug): in Phase 3 you may send one read-only repo helper per hypothesis; brief = symptom, repro command, paths, "return file:line evidence for/against; do not run or edit". Treat replies as `CODE` leads to re-open, not verdicts. Helper types, brief contents and merge rules come with the skill loader.
45
-
46
- Sources (accessed 3 October 2026): https://git-scm.com/docs/git-bisect; https://www.debuggingbook.org/html/DeltaDebugger.html
@@ -1,32 +0,0 @@
1
- ---
2
- name: shared-language
3
- description: Use when domain terms drift (glossary, CONTEXT.md) or a hard-to-reverse decision needs an ADR (decision record). Do NOT use for renames.
4
- ---
5
-
6
- # Shared Language
7
-
8
- Two artifacts: the glossary (`CONTEXT.md`) and decision records (`docs/adr/`). On entry, read both if they exist, then act on the trigger: term settled → glossary; hard call made → offer ADR; change contradicts an ADR → surface it.
9
-
10
- ## The glossary — CONTEXT.md
11
-
12
- At the repo root. **A glossary and nothing else**: `term — 1–3 line definition`, plus `Avoid: <synonyms>` where drift exists. No file paths, implementation, or history.
13
-
14
- - Challenge fuzzy usage against it: "glossary says *cancellation* is pre-charge; this reads post-charge — which?"
15
- - Test a candidate term with an invented edge case before recording it ("is a no-show a cancellation?").
16
- - Update the moment a term settles; create the file lazily on the first settled term, never as an empty template.
17
- - Code, tests, and UI use glossary terms verbatim. Code and glossary disagree → one is wrong; ask which.
18
- - On creation, add to the repo's instruction file (AGENTS.md, or CLAUDE.md if that is what it uses): `Read CONTEXT.md before naming anything.` CONTEXT.md is not auto-loaded — that pointer is what makes it count in later sessions.
19
-
20
- ## Decision records — docs/adr/
21
-
22
- Only when a decision is **hard to reverse**, **surprising without context**, and **a real tradeoff** — all three. Offer it; don't write unasked.
23
-
24
- - Follow the repo's existing ADR format. None? Use the MADR 4 minimal shape: `NNNN-title-with-dashes.md` with Context and Problem Statement, Considered Options, Decision Outcome (chosen option + why), Consequences; `status: accepted` in front matter.
25
- - Immutable once accepted — supersede, never edit: new ADR notes `Supersedes NNNN`; the old one's status becomes `superseded by NNNN` (the only allowed change).
26
- - Before proposing a change that contradicts an ADR: honour it or raise the conflict. Never re-suggest a rejected option without new facts.
27
-
28
- ## Scaling: one agent or several
29
-
30
- Main thread only. On a large repo, one read-only repo helper may inventory competing terms across packages (occurrences with file:line); the main thread decides and edits. Helper types, brief contents and merge rules come with the skill loader.
31
-
32
- Sources (re-checked 22 October 2026): MADR 4.0.0, still the latest release (2024-09-17) — https://adr.github.io/madr/; ubiquitous language — https://martinfowler.com/bliki/UbiquitousLanguage.html
@@ -1,42 +0,0 @@
1
- ---
2
- name: tdd
3
- description: Use when asked for test-first development. Do NOT use for post-build tests.
4
- ---
5
-
6
- # TDD
7
-
8
- Red → green, one vertical slice at a time. Before the first test: agree seams (below). Then loop.
9
-
10
- ## Seams — agree before writing
11
-
12
- A **seam** is a public boundary where behaviour is observable: exported function, HTTP route, CLI invocation. Tests live at seams, never in internals. List the seams under test and confirm them with the user (one `ask_user` call, recommended set marked). No test at an unagreed seam.
13
-
14
- ## The loop
15
-
16
- 1. **Red.** One failing test at an agreed seam for the next smallest real behaviour. Run it; confirm it fails for the right reason (assertion, not import/syntax error).
17
- 2. **Green.** Least code that passes. Run the test and the touched suite.
18
- 3. **Repeat.** The next test follows from what the last cycle taught. Never write all tests first, then all code.
19
- 4. **Refactor** only on green, as a separate step; rerun tests after.
20
-
21
- ## Test integrity (agent guard)
22
-
23
- - **Tests are frozen during green.** Never edit, delete, skip, loosen, or `.only` a test to make it pass. If a test is wrong, stop, say why, and get agreement before changing it.
24
- - Never special-case test inputs in production code (hard-coded returns for the test's literal).
25
- - Before claiming done, `git diff` the test files; explain any change made during a green step.
26
-
27
- ## Test quality
28
-
29
- - **Expected values from an outside source of truth** — a known literal, worked example, or the spec. Never recompute the expected value the way the code does.
30
- - **Behaviour, not structure.** A test that breaks under a behaviour-preserving refactor is coupled to internals; rewrite it at the seam.
31
- - **Mock only external boundaries** (network, clock, filesystem), and only when slow or stateful.
32
- - **Name like a spec**: "user can check out with an empty cart".
33
- - **Property tests for rules over many inputs** (parsers, round-trips, invariants) when the project already has a property library (fast-check, Hypothesis, proptest); otherwise a table of examples.
34
- - **Optional strength check:** if a mutation tool is already installed (Stryker, mutmut, cargo-mutants), run it on the changed module; surviving mutants point to missing assertions. Do not install one unasked. Manual alternative: break one line of the new code, confirm a test goes red, revert.
35
-
36
- Never claim a cycle green that you did not run.
37
-
38
- ## Scaling: one agent or several
39
-
40
- Main thread only — the loop is sequential by design. Never parallelise red/green steps or let a child edit tests.
41
-
42
- Sources (accessed 3 October 2026): https://code.claude.com/docs/en/best-practices (failing test before the fix); https://stryker-mutator.io/docs/ (killed vs surviving mutants); https://hypothesis.readthedocs.io/
@@ -1,19 +0,0 @@
1
- export declare const ROYALE_BUG_CATEGORIES: readonly ["type", "null", "test", "build", "lint", "syntax", "timeout", "crash"];
2
- export type RoyaleBugCategory = (typeof ROYALE_BUG_CATEGORIES)[number];
3
- interface PartLike {
4
- type: string;
5
- id?: string;
6
- name?: string;
7
- args?: Record<string, unknown>;
8
- toolCallId?: string;
9
- content?: unknown;
10
- isError?: boolean;
11
- }
12
- export interface MessageLike {
13
- role: string;
14
- content: string | ReadonlyArray<PartLike>;
15
- }
16
- export declare function categorizeFailure(output: string, command: string): RoyaleBugCategory;
17
- /** Category of the first check that failed then later passed, or null. */
18
- export declare function classifyFixedCheck(messages: ReadonlyArray<MessageLike>): RoyaleBugCategory | null;
19
- export {};
@@ -1,112 +0,0 @@
1
- // ── GG Royale "bug fixed" classifier ────────────────────────────────────
2
- // Pure: given one run's transcript slice, decide whether a check-like shell
3
- // command (tests/build/typecheck/lint) failed and a later run of the SAME
4
- // command passed, and label the FAILED output with one coarse category.
5
- // Only the category label ever leaves the machine — never the command,
6
- // output, or paths.
7
- export const ROYALE_BUG_CATEGORIES = [
8
- "type",
9
- "null",
10
- "test",
11
- "build",
12
- "lint",
13
- "syntax",
14
- "timeout",
15
- "crash",
16
- ];
17
- const SHELL_TOOLS = new Set(["bash", "shell"]);
18
- const CHECK_RE = /\b(test|tests|vitest|jest|pytest|mocha|tsc|typecheck|build|lint|eslint|biome|ruff|clippy|mypy|pyright|check)\b/i;
19
- /** Ordered: first match wins (more specific before generic "test"/"build"). */
20
- const RULES = [
21
- ["timeout", /\btim(e|ed)[ -]?out\b|\btimeout\b/i],
22
- [
23
- "crash",
24
- /\bpanic(ked)?\b|segfault|segmentation fault|core dumped|\bcrash(ed)?\b|uncaught exception/i,
25
- ],
26
- ["syntax", /SyntaxError|unexpected token|parse error|parsing error/i],
27
- [
28
- "null",
29
- /Cannot read propert(y|ies) of (undefined|null)|\bis (undefined|null)\b|NoneType|nil pointer|NullPointerException|null pointer/i,
30
- ],
31
- ["type", /TypeError|type error|error TS\d{4}|\bTS2\d{3}\b|is not assignable to type/i],
32
- ["lint", /\blint\b|eslint|ruff|clippy|biome/i],
33
- ["test", /AssertionError|assert(ion)?|\bexpected\b|tests? failed|\bFAIL\b|failing/i],
34
- [
35
- "build",
36
- /build failed|compil(e|ation|er) (error|failed)|failed to compile|bundl|\berror\[E\d+\]/i,
37
- ],
38
- ];
39
- function textOf(content) {
40
- if (typeof content === "string")
41
- return content;
42
- if (!Array.isArray(content))
43
- return "";
44
- return content
45
- .map((c) => typeof c === "object" && c !== null && typeof c.text === "string"
46
- ? c.text
47
- : "")
48
- .join("\n");
49
- }
50
- /** Bash results begin "Exit code: N" (or TIMEOUT…). Unknown → null. */
51
- function exitOk(result, isError) {
52
- const m = /^Exit code: (\S+)/.exec(result);
53
- if (m)
54
- return m[1] === "0";
55
- return isError === true ? false : null;
56
- }
57
- function normalize(cmd) {
58
- return cmd.trim().replace(/\s+/g, " ");
59
- }
60
- export function categorizeFailure(output, command) {
61
- for (const [cat, re] of RULES)
62
- if (re.test(output))
63
- return cat;
64
- // Fall back to what kind of check it was.
65
- if (/\b(tsc|typecheck|mypy|pyright)\b/i.test(command))
66
- return "type";
67
- if (/\b(lint|eslint|ruff|clippy|biome)\b/i.test(command))
68
- return "lint";
69
- if (/\bbuild\b/i.test(command))
70
- return "build";
71
- return "test";
72
- }
73
- /** Category of the first check that failed then later passed, or null. */
74
- export function classifyFixedCheck(messages) {
75
- const commands = new Map();
76
- const runs = [];
77
- for (const m of messages) {
78
- if (typeof m.content === "string")
79
- continue;
80
- for (const part of m.content) {
81
- if (m.role === "assistant" && part.type === "tool_call" && part.id && part.name) {
82
- const cmd = part.args?.command;
83
- if (SHELL_TOOLS.has(part.name) && typeof cmd === "string" && CHECK_RE.test(cmd)) {
84
- commands.set(part.id, normalize(cmd));
85
- }
86
- }
87
- else if (m.role === "tool" && part.type === "tool_result" && part.toolCallId) {
88
- const command = commands.get(part.toolCallId);
89
- if (command === undefined)
90
- continue;
91
- const output = textOf(part.content);
92
- const ok = exitOk(output, part.isError);
93
- if (ok !== null)
94
- runs.push({ command, ok, output });
95
- }
96
- }
97
- }
98
- const failed = new Map();
99
- for (const r of runs) {
100
- if (!r.ok) {
101
- if (!failed.has(r.command))
102
- failed.set(r.command, r.output);
103
- }
104
- else {
105
- const out = failed.get(r.command);
106
- if (out !== undefined)
107
- return categorizeFailure(out, r.command);
108
- }
109
- }
110
- return null;
111
- }
112
- //# sourceMappingURL=royale-bug.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"royale-bug.js","sourceRoot":"","sources":["../../src/app-sidecar/royale-bug.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,4EAA4E;AAC5E,0EAA0E;AAC1E,wEAAwE;AACxE,uEAAuE;AACvE,oBAAoB;AAEpB,MAAM,CAAC,MAAM,qBAAqB,GA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,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;QAClE,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,5 +0,0 @@
1
- import type { MessageLike } from "./royale-bug.js";
2
- /** Whether a shell command (one tool call's text) deploys or publishes. */
3
- export declare function isDeployCommand(command: string): boolean;
4
- /** True when the run's shell ran a deploy (or publish) that exited 0. */
5
- export declare function detectDeploy(messages: ReadonlyArray<MessageLike>): boolean;
@@ -1,76 +0,0 @@
1
- // ── GG Royale "shipped it" detector ─────────────────────────────────────
2
- // Pure: given one run's transcript slice, decide whether a deploy (or a
3
- // package publish) command ran in the shell and succeeded. Only "a deploy
4
- // happened" ever leaves the machine: never the command, its output, the
5
- // site, or any path.
6
- const SHELL_TOOLS = new Set(["bash", "shell"]);
7
- /**
8
- * Commands that put something live. Each is matched within one command of a
9
- * pipeline or chain (no `;`, `|` or `&` in between), so "vercel env ls; echo
10
- * deploy" doesn't count.
11
- */
12
- const DEPLOY_RES = [
13
- /\bvercel\b[^;&|\n]*(\bdeploy\b|--prod\b)/i,
14
- /\bnetlify\b[^;&|\n]*\bdeploy\b/i,
15
- /\bwrangler\b[^;&|\n]*\b(deploy|publish)\b/i,
16
- /\bfly(ctl)?\b[^;&|\n]*\bdeploy\b/i,
17
- /\bfirebase\b[^;&|\n]*\bdeploy\b/i,
18
- /\brailway\b[^;&|\n]*\b(up|deploy)\b/i,
19
- /\bgcloud\b[^;&|\n]*\b(app|run|functions)\b[^;&|\n]*\bdeploy\b/i,
20
- /\b(sls|serverless|cdk|amplify)\b[^;&|\n]*\b(deploy|publish)\b/i,
21
- /\bgit\s+push\s+(heroku|dokku)\b/i,
22
- /\bsurge\b(\s|$)/i,
23
- // A project's own deploy script, and publishing a package.
24
- /\b(npm|pnpm|yarn|bun)\s+(run\s+)?deploy\b/i,
25
- /\b(npm|pnpm|yarn|bun)\s+publish\b/i,
26
- ];
27
- /** Rehearsals that don't ship anything. */
28
- const DRY_RE = /--dry-run\b|--dryrun\b|\bdry-run\b/i;
29
- /** Whether a shell command (one tool call's text) deploys or publishes. */
30
- export function isDeployCommand(command) {
31
- if (DRY_RE.test(command))
32
- return false;
33
- return DEPLOY_RES.some((re) => re.test(command));
34
- }
35
- /** Bash results begin "Exit code: N" (or TIMEOUT…). Unknown → null. */
36
- function exitOk(result, isError) {
37
- const m = /^Exit code: (\S+)/.exec(result);
38
- if (m)
39
- return m[1] === "0";
40
- return isError === true ? false : null;
41
- }
42
- function textOf(content) {
43
- if (typeof content === "string")
44
- return content;
45
- if (!Array.isArray(content))
46
- return "";
47
- return content
48
- .map((c) => typeof c === "object" && c !== null && typeof c.text === "string"
49
- ? c.text
50
- : "")
51
- .join("\n");
52
- }
53
- /** True when the run's shell ran a deploy (or publish) that exited 0. */
54
- export function detectDeploy(messages) {
55
- const deploys = new Set();
56
- for (const m of messages) {
57
- if (typeof m.content === "string")
58
- continue;
59
- for (const part of m.content) {
60
- if (m.role === "assistant" && part.type === "tool_call" && part.id && part.name) {
61
- const cmd = part.args?.command;
62
- if (SHELL_TOOLS.has(part.name) && typeof cmd === "string" && isDeployCommand(cmd)) {
63
- deploys.add(part.id);
64
- }
65
- }
66
- else if (m.role === "tool" && part.type === "tool_result" && part.toolCallId) {
67
- if (!deploys.has(part.toolCallId))
68
- continue;
69
- if (exitOk(textOf(part.content), part.isError) === true)
70
- return true;
71
- }
72
- }
73
- }
74
- return false;
75
- }
76
- //# sourceMappingURL=royale-deploy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"royale-deploy.js","sourceRoot":"","sources":["../../src/app-sidecar/royale-deploy.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,wEAAwE;AACxE,0EAA0E;AAC1E,wEAAwE;AACxE,qBAAqB;AAIrB,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAE/C;;;;GAIG;AACH,MAAM,UAAU,GAAsB;IACpC,2CAA2C;I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AAC;AAED,yEAAyE;AACzE,MAAM,UAAU,YAAY,CAAC,QAAoC;IAC/D,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAClC,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;QACzB,IAAI,OAAO,CAAC,CAAC,OAAO,KAAK,QAAQ;YAAE,SAAS;QAC5C,KAAK,MAAM,IAAI,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;YAC7B,IAAI,CAAC,CAAC,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;gBAChF,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC;gBAC/B,IAAI,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;oBAClF,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACvB,CAAC;YACH,CAAC;iBAAM,IAAI,CAAC,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gBAC/E,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;oBAAE,SAAS;gBAC5C,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI;oBAAE,OAAO,IAAI,CAAC;YACvE,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,29 +0,0 @@
1
- import { z } from "zod";
2
- import type { AgentTool } from "@kenkaiiii/gg-agent";
3
- import type { LspManager } from "../core/lsp/manager.js";
4
- import { type ToolOperations } from "./operations.js";
5
- declare const CodeNavParams: z.ZodObject<{
6
- op: z.ZodEnum<{
7
- references: "references";
8
- definition: "definition";
9
- symbols: "symbols";
10
- hover: "hover";
11
- }>;
12
- file: z.ZodString;
13
- line: z.ZodOptional<z.ZodNumber>;
14
- column: z.ZodOptional<z.ZodNumber>;
15
- symbol: z.ZodOptional<z.ZodString>;
16
- max_results: z.ZodOptional<z.ZodNumber>;
17
- }, z.core.$strip>;
18
- /**
19
- * Semantic code navigation, backed by the project's language server.
20
- *
21
- * One tool with an `op` enum rather than four tools: each tool in the live set
22
- * costs a full JSON schema on every request, and four near-identical schemas
23
- * would spend the budget this harness is trying to save.
24
- *
25
- * Rename is deliberately absent. A workspace-wide rename that half-applies is
26
- * worse than no rename at all, and nothing here can roll one back.
27
- */
28
- export declare function createCodeNavTool(cwd: string, lspManager: LspManager | undefined, ops?: ToolOperations): AgentTool<typeof CodeNavParams>;
29
- export {};