@kenkaiiii/ggcoder 5.85.0 → 5.86.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 (147) hide show
  1. package/assets/skills/bulletproof/SKILL.md +69 -130
  2. package/assets/skills/bulletproof/references/agent-surface.md +22 -1
  3. package/assets/skills/bulletproof/references/audit-protocol.md +23 -6
  4. package/assets/skills/bulletproof/references/platform-playbooks.md +12 -0
  5. package/assets/skills/bulletproof/references/provenance.md +19 -2
  6. package/assets/skills/bulletproof/references/secure-defaults.md +13 -1
  7. package/assets/skills/bulletproof/references/supply-chain.md +8 -5
  8. package/assets/skills/bulletproof/references/threat-landscape.md +46 -57
  9. package/assets/skills/clarify/SKILL.md +2 -2
  10. package/assets/skills/code-review/SKILL.md +5 -11
  11. package/assets/skills/compliance-guard/SKILL.md +59 -212
  12. package/assets/skills/compliance-guard/references/artifacts.md +14 -1
  13. package/assets/skills/compliance-guard/references/eu-uk.md +17 -7
  14. package/assets/skills/compliance-guard/references/exposure-triage.md +16 -0
  15. package/assets/skills/compliance-guard/references/full-review.md +155 -0
  16. package/assets/skills/compliance-guard/references/lawsuit-vectors.md +14 -2
  17. package/assets/skills/compliance-guard/references/provenance.md +33 -2
  18. package/assets/skills/compliance-guard/references/sector-gates.md +15 -1
  19. package/assets/skills/compliance-guard/references/security-baseline.md +21 -34
  20. package/assets/skills/compliance-guard/references/trigger-map.md +15 -1
  21. package/assets/skills/compliance-guard/references/us.md +32 -8
  22. package/assets/skills/durable/SKILL.md +22 -29
  23. package/assets/skills/durable/references/agent-db-safety.md +2 -2
  24. package/assets/skills/durable/references/backups-and-runtime.md +6 -6
  25. package/assets/skills/durable/references/migrations-and-schema.md +5 -4
  26. package/assets/skills/evidence-led-ui/LICENSES.md +3 -4
  27. package/assets/skills/evidence-led-ui/SKILL.md +9 -14
  28. package/assets/skills/evidence-led-ui/references/archetypes.md +1 -1
  29. package/assets/skills/evidence-led-ui/references/direction.md +4 -12
  30. package/assets/skills/evidence-led-ui/references/methodology.md +3 -11
  31. package/assets/skills/evidence-led-ui/references/observed-patterns.md +1 -1
  32. package/assets/skills/evidence-led-ui/references/production-contract.md +2 -2
  33. package/assets/skills/evidence-led-ui/references/provenance.md +14 -14
  34. package/assets/skills/lean/SKILL.md +34 -50
  35. package/assets/skills/lean/references/playbooks.md +9 -7
  36. package/assets/skills/refactoring/SKILL.md +35 -50
  37. package/assets/skills/root-cause/SKILL.md +2 -2
  38. package/assets/skills/shared-language/SKILL.md +3 -3
  39. package/dist/app-sidecar/progress-manager.d.ts +20 -2
  40. package/dist/app-sidecar/progress-manager.js +15 -2
  41. package/dist/app-sidecar/progress-manager.js.map +1 -1
  42. package/dist/app-sidecar/royale-bug.d.ts +19 -0
  43. package/dist/app-sidecar/royale-bug.js +112 -0
  44. package/dist/app-sidecar/royale-bug.js.map +1 -0
  45. package/dist/app-sidecar/royale-deploy.d.ts +5 -0
  46. package/dist/app-sidecar/royale-deploy.js +76 -0
  47. package/dist/app-sidecar/royale-deploy.js.map +1 -0
  48. package/dist/app-sidecar/royale.d.ts +38 -0
  49. package/dist/app-sidecar/royale.js +251 -0
  50. package/dist/app-sidecar/royale.js.map +1 -0
  51. package/dist/app-sidecar.js +57 -3
  52. package/dist/app-sidecar.js.map +1 -1
  53. package/dist/core/agent-session.js +4 -2
  54. package/dist/core/agent-session.js.map +1 -1
  55. package/dist/core/bundled-agents.js +2 -2
  56. package/dist/modes/agent-home-mode.js +5 -5
  57. package/dist/modes/agent-home-mode.js.map +1 -1
  58. package/dist/modes/serve-mode.js +5 -5
  59. package/dist/modes/serve-mode.js.map +1 -1
  60. package/dist/system-prompt.js +1 -1
  61. package/dist/system-prompt.js.map +1 -1
  62. package/dist/tools/bash.js +8 -2
  63. package/dist/tools/bash.js.map +1 -1
  64. package/dist/tools/routine-output.d.ts +30 -0
  65. package/dist/tools/routine-output.js +203 -0
  66. package/dist/tools/routine-output.js.map +1 -0
  67. package/dist/tools/skill.d.ts +2 -0
  68. package/dist/tools/skill.js +18 -1
  69. package/dist/tools/skill.js.map +1 -1
  70. package/package.json +4 -4
  71. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/LICENSE +0 -21
  72. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/airbnb/DESIGN.md +0 -545
  73. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/airtable/DESIGN.md +0 -554
  74. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/apple/DESIGN.md +0 -562
  75. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/binance/DESIGN.md +0 -634
  76. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/bmw/DESIGN.md +0 -544
  77. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/bmw-m/DESIGN.md +0 -503
  78. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/bugatti/DESIGN.md +0 -454
  79. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/cal/DESIGN.md +0 -542
  80. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/claude/DESIGN.md +0 -589
  81. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/clay/DESIGN.md +0 -541
  82. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/clickhouse/DESIGN.md +0 -544
  83. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/cohere/DESIGN.md +0 -451
  84. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/coinbase/DESIGN.md +0 -570
  85. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/composio/DESIGN.md +0 -506
  86. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/cursor/DESIGN.md +0 -537
  87. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/dell-1996/DESIGN.md +0 -632
  88. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/elevenlabs/DESIGN.md +0 -504
  89. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/expo/DESIGN.md +0 -526
  90. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/ferrari/DESIGN.md +0 -531
  91. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/figma/DESIGN.md +0 -578
  92. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/framer/DESIGN.md +0 -544
  93. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/hashicorp/DESIGN.md +0 -575
  94. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/hp/DESIGN.md +0 -670
  95. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/ibm/DESIGN.md +0 -550
  96. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/intercom/DESIGN.md +0 -546
  97. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/kraken/DESIGN.md +0 -125
  98. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/lamborghini/DESIGN.md +0 -288
  99. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/linear.app/DESIGN.md +0 -548
  100. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/lovable/DESIGN.md +0 -298
  101. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/mastercard/DESIGN.md +0 -365
  102. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/meta/DESIGN.md +0 -683
  103. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/minimax/DESIGN.md +0 -746
  104. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/mintlify/DESIGN.md +0 -852
  105. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/miro/DESIGN.md +0 -825
  106. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/mistral.ai/DESIGN.md +0 -773
  107. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/mongodb/DESIGN.md +0 -767
  108. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/nike/DESIGN.md +0 -575
  109. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/nintendo-2001/DESIGN.md +0 -649
  110. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/notion/DESIGN.md +0 -821
  111. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/nvidia/DESIGN.md +0 -640
  112. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/ollama/DESIGN.md +0 -539
  113. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/opencode.ai/DESIGN.md +0 -521
  114. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/pinterest/DESIGN.md +0 -597
  115. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/playstation/DESIGN.md +0 -661
  116. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/posthog/DESIGN.md +0 -690
  117. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/raycast/DESIGN.md +0 -669
  118. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/renault/DESIGN.md +0 -589
  119. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/replicate/DESIGN.md +0 -616
  120. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/resend/DESIGN.md +0 -585
  121. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/revolut/DESIGN.md +0 -636
  122. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/runwayml/DESIGN.md +0 -244
  123. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/sanity/DESIGN.md +0 -357
  124. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/sentry/DESIGN.md +0 -551
  125. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/shopify/DESIGN.md +0 -516
  126. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/slack/DESIGN.md +0 -482
  127. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/spacex/DESIGN.md +0 -363
  128. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/spotify/DESIGN.md +0 -246
  129. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/starbucks/DESIGN.md +0 -580
  130. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/stripe/DESIGN.md +0 -487
  131. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/supabase/DESIGN.md +0 -462
  132. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/superhuman/DESIGN.md +0 -448
  133. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/tesla/DESIGN.md +0 -286
  134. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/theverge/DESIGN.md +0 -339
  135. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/together.ai/DESIGN.md +0 -633
  136. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/uber/DESIGN.md +0 -636
  137. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/vercel/DESIGN.md +0 -736
  138. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/vodafone/DESIGN.md +0 -538
  139. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/voltagent/DESIGN.md +0 -521
  140. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/warp/DESIGN.md +0 -526
  141. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/webflow/DESIGN.md +0 -588
  142. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/wired/DESIGN.md +0 -497
  143. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/wise/DESIGN.md +0 -544
  144. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/x.ai/DESIGN.md +0 -465
  145. package/assets/skills/evidence-led-ui/corpus/awesome-design-md/design-md/zapier/DESIGN.md +0 -537
  146. package/assets/skills/evidence-led-ui/data/corpus-manifest.json +0 -768
  147. package/assets/skills/evidence-led-ui/data/observations.json +0 -47053
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Contents
4
4
 
5
- - Included corpus and nature of observations
5
+ - Upstream corpus (not bundled) and nature of observations
6
6
  - Refero boundary
7
7
  - Accessibility standards
8
8
  - UI craft research
@@ -12,19 +12,19 @@
12
12
  - Q4 2026 refresh (3 October 2026): slop tells, platform status, legal dates
13
13
  - Refresh policy
14
14
 
15
- ## Included corpus
15
+ ## Upstream corpus (not bundled)
16
16
 
17
17
  - **Source:** [`VoltAgent/awesome-design-md`](https://github.com/VoltAgent/awesome-design-md)
18
18
  - **Pinned commit:** [`664b3e78fd1a298ba11973822da988483256d4b4`](https://github.com/VoltAgent/awesome-design-md/tree/664b3e78fd1a298ba11973822da988483256d4b4)
19
19
  - **Archive:** `https://codeload.github.com/VoltAgent/awesome-design-md/tar.gz/664b3e78fd1a298ba11973822da988483256d4b4`
20
20
  - **Retrieved:** 2026-07-13
21
- - **License:** MIT, copyright 2026 VoltAgent; retained at `corpus/awesome-design-md/LICENSE`
22
- - **Included:** all 74 `design-md/*/DESIGN.md` files present in the pinned archive
21
+ - **License:** MIT, copyright 2026 VoltAgent (see `LICENSES.md`)
22
+ - **Analyzed:** all 74 `design-md/*/DESIGN.md` files present in the pinned archive; removed from this package on 22 October 2026, only derived counts and slugs remain
23
23
  - **Excluded:** upstream previews, screenshots, media, fonts, website assets, private requests, and non-`DESIGN.md` content
24
24
 
25
- Every copied document has its own SHA-256, category, byte count, and parser status in `data/corpus-manifest.json`. The analyzer verifies hashes before producing observations.
25
+ The analyzer verified each document's SHA-256 before producing observations; the manifest was not kept after the corpus was unbundled.
26
26
 
27
- The pinned archive contains 74 documents. This differs from both the initial planning estimate of 75 and the upstream README badge of 73 at that commit. The manifest records the discrepancy rather than silently modifying the corpus.
27
+ The pinned archive contains 74 documents. This differs from both the initial planning estimate of 75 and the upstream README badge of 73 at that commit. The extraction recorded the discrepancy rather than silently modifying the corpus.
28
28
 
29
29
  ## Nature of the observations
30
30
 
@@ -48,7 +48,7 @@ Therefore this skill must not bulk-scrape Refero, call undocumented Refero endpo
48
48
  - **Web conformance floor:** [Web Content Accessibility Guidelines (WCAG) 2.2](https://www.w3.org/TR/WCAG22/), W3C Recommendation dated 12 December 2024 in the current publication fetched 2026-07-21. The [W3C WCAG overview](https://www.w3.org/WAI/standards-guidelines/wcag/) encourages the latest version and states that WCAG 2.2 conformance is backward compatible with WCAG 2.1 and 2.0.
49
49
  - **Native application guidance:** [WCAG2ICT](https://www.w3.org/TR/wcag2ict-22/) explains how Level A and AA criteria apply to non-web software. It is informative guidance, not a normative standard, and native work still needs platform and product-specific accessibility requirements.
50
50
  - **U.S. ADA context:** The Department of Justice [ADA web accessibility guidance](https://www.ada.gov/resources/web-guidance/) explains equal access and effective communication under Titles II and III. The current [Title II web and mobile app rule fact sheet](https://www.ada.gov/resources/2024-03-08-web-rule/) names WCAG 2.1 Level AA as its technical standard and documents scope, exceptions, and compliance timing. These sources were checked 2026-07-21.
51
- - **Not the conformance target:** [W3C Accessibility Guidelines (WCAG) 3.0](https://www.w3.org/TR/wcag-3.0/) is a W3C Working Draft (dated 10 September 2026 when re-checked 3 October 2026). W3C says publication as a Working Draft does not imply endorsement and that it is inappropriate to cite as anything other than work in progress.
51
+ - **Not the conformance target:** [W3C Accessibility Guidelines (WCAG) 3.0](https://www.w3.org/TR/wcag-3.0/) is a W3C Working Draft (dated 10 September 2026 when re-checked 22 October 2026). W3C says publication as a Working Draft does not imply endorsement and that it is inappropriate to cite as anything other than work in progress.
52
52
 
53
53
  WCAG 2.2 Level AA is the default engineering floor because it includes and extends WCAG 2.1, but technical WCAG conformance alone does not prove compliance with the ADA or another law. Project, procurement, contractual, platform, and jurisdictional requirements may exceed this floor. Use the current official standard and obtain qualified product or legal review before making a legal-compliance claim.
54
54
 
@@ -67,7 +67,7 @@ The binding rulings in `references/craft-rulings.md` use these current sources:
67
67
  - [Google Fonts CSS API](https://developers.google.com/fonts/docs/getting_started) and [web.dev font practices](https://web.dev/articles/font-best-practices): explicit families/weights, `font-display`, early discovery, preconnect for third-party origins, and layout-shift testing;
68
68
  - [Google Fonts metadata](https://fonts.google.com/metadata/fonts), fetched 14 July 2026: current family availability and popularity ordering used for the inspiration list.
69
69
 
70
- The motion recommendations were also checked against the pinned local corpus. Several observed systems use color, underline, border, surface, icon, or opacity feedback instead of generic scale/translate hover lift. These remain independent observations, not official brand guidance.
70
+ The motion recommendations were also checked against the pinned upstream corpus. Several observed systems use color, underline, border, surface, icon, or opacity feedback instead of generic scale/translate hover lift. These remain independent observations, not official brand guidance.
71
71
 
72
72
  Refero content was not accessed for this update because no authorized Refero MCP or user-provided export was available. The existing Refero boundary remains unchanged.
73
73
 
@@ -104,7 +104,7 @@ No source skill text is bundled or renamed. This skill rejects fixed palette/fon
104
104
 
105
105
  The package structure was checked against the [Agent Skills specification](https://agentskills.io/specification), [Anthropic skill-authoring best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices.md), [OpenAI Skills guidance](https://platform.openai.com/docs/guides/tools-skills), and [Agent Skills evaluation guidance](https://agentskills.io/skill-creation/evaluating-skills): loader-visible name/description metadata, a concise directly actionable `SKILL.md`, references one level from the root, focused on-demand documents, self-contained scripts, explicit validation, and evaluation-driven iteration. The installed GG Coder loader reads `name` and `description`; the portable `license` and `compatibility` fields are retained for other Agent Skills clients and safely ignored by GG Coder.
106
106
 
107
- `SKILL.md` remains below the recommended 500-line limit. Reference files over 100 lines include a contents overview so an agent preview exposes the file's scope. Detailed corpus data stays out of runtime context unless a specific claim requires it. The existing external A/B artifacts are unscored and predate the current contracts, so they are benchmark inputs rather than evidence that the current skill improves quality.
107
+ `SKILL.md` remains below the recommended 500-line limit. Reference files over 100 lines include a contents overview so an agent preview exposes the file's scope. Raw corpus data is not bundled; audits read the pinned upstream sources. The existing external A/B artifacts are unscored and predate the current contracts, so they are benchmark inputs rather than evidence that the current skill improves quality.
108
108
 
109
109
  ## Q4 2026 refresh (3 October 2026)
110
110
 
@@ -118,14 +118,14 @@ All accessed 3 October 2026 (SNAPSHOT).
118
118
 
119
119
  ### Platform status
120
120
 
121
- - Baseline statuses in `references/direction.md` § 8 read from the [`web-features`](https://www.npmjs.com/package/web-features) package v3.40.1 (published 1 Oct 2026), the data behind [webstatus.dev](https://webstatus.dev).
121
+ - Baseline statuses in `references/direction.md` § 8 originally read from the [`web-features`](https://www.npmjs.com/package/web-features) package v3.40.1 (1 Oct 2026). Re-checked 22 Oct 2026: CSS anchor positioning became Baseline Newly available with Firefox 147 ([web.dev, Jan 2026](https://web.dev/blog/web-platform-01-2026)); `progress()` and `alpha()` became Baseline Newly available in Sep 2026 ([web.dev, Sep 2026](https://web.dev/blog/web-platform-09-2026)). The table now keeps stable rows only and defers newer features to a live [webstatus.dev](https://webstatus.dev) check.
122
122
  - [Interop 2026 focus areas](https://github.com/web-platform-tests/interop/blob/main/2026/README.md) and [WebKit's announcement](https://webkit.org/blog/17818/announcing-interop-2026/): anchor positioning, scroll-driven animations, view transitions, dialogs and popovers, container style queries, among others.
123
- - [WCAG 2.2](https://www.w3.org/TR/WCAG22/) Recommendation 12 Dec 2024; [WCAG 3.0](https://www.w3.org/TR/wcag-3.0/) Working Draft 10 Sep 2026.
123
+ - [WCAG 2.2](https://www.w3.org/TR/WCAG22/) Recommendation 12 Dec 2024; [WCAG 3.0](https://www.w3.org/TR/wcag-3.0/) Working Draft 10 Sep 2026 (still latest on 22 Oct 2026).
124
124
  - [web.dev INP](https://web.dev/articles/inp): good at 200 ms or less, 75th percentile.
125
125
 
126
126
  ### Legal dates
127
127
 
128
- - ADA Title II: DOJ interim final rule published 20 April 2026 (91 Fed. Reg. 20902) extends compliance to 26 April 2027 / 26 April 2028; WCAG 2.1 AA unchanged. Secondary confirmations: [Reed Smith](https://www.reedsmith.com/articles/doj-extends-digital-accessibility-compliance-dates-under-title-ii-of-the-ada/), [Seyfarth](https://www.adatitleiii.com/2026/04/doj-extends-ada-title-ii-website-accessibility-deadlines-for-governmental-entities-but-litigation-and-compliance-risks-remain/). Primary: [ada.gov web rule](https://www.ada.gov/resources/2024-03-08-web-rule/).
128
+ - ADA Title II: DOJ interim final rule published 20 April 2026 (91 Fed. Reg. 20902) extends compliance to 26 April 2027 / 26 April 2028; WCAG 2.1 AA unchanged. Secondary confirmations: [Reed Smith](https://www.reedsmith.com/articles/doj-extends-digital-accessibility-compliance-dates-under-title-ii-of-the-ada/), [Seyfarth](https://www.adatitleiii.com/2026/04/doj-extends-ada-title-ii-website-accessibility-deadlines-for-governmental-entities-but-litigation-and-compliance-risks-remain/). Primary: [ada.gov web rule](https://www.ada.gov/resources/2024-03-08-web-rule/) (dates re-checked 22 Oct 2026). Pending challenge: NFB v. DOJ, D. Md., filed May 2026, no ruling found as of 12 Oct 2026 (secondary: [titleii.org](https://titleii.org/title-ii-updates)).
129
129
  - European Accessibility Act (Directive (EU) 2019/882): applies from 28 June 2025; [European Commission EAA page](https://commission.europa.eu/strategy-and-policy/policies/justice-and-fundamental-rights/disability/union-equality-strategy-rights-persons-disabilities-2021-2030/european-accessibility-act_en).
130
130
 
131
131
  ## Refresh policy
@@ -133,8 +133,8 @@ All accessed 3 October 2026 (SNAPSHOT).
133
133
  A corpus refresh must be explicit:
134
134
 
135
135
  1. choose and record a new upstream commit;
136
- 2. replace only the licensed `DESIGN.md` snapshot and upstream license;
137
- 3. regenerate every hash and parser status;
136
+ 2. read the licensed `DESIGN.md` files at that commit outside the package;
137
+ 3. record every hash and parser status;
138
138
  4. rerun analysis and inspect changed denominators/outliers;
139
139
  5. update synthesis claims and examples;
140
140
  6. rerun validation.
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: lean
3
- description: Use when speed or resource use matters. Do NOT use for correctness bugs.
3
+ description: "Use when speed or resource use matters: slow pages or startup, memory leaks, high CPU, bundle size, N+1 queries. Do NOT use for correctness bugs."
4
4
  license: Performance engineering guidance, not a benchmark certification. Sources and snapshot date are recorded at the foot of each reference file.
5
- compatibility: Snapshot dated 3 October 2026. Thresholds, tool names, and defaults decay — re-verify with web access before asserting them as current. Claims sourced to that date carry a SNAPSHOT marker.
5
+ compatibility: Snapshot dated 3 October 2026; Node release schedule, Core Web Vitals browser support and the current Next.js version re-verified 22 October 2026. Thresholds and tool names decay — re-verify before asserting them as current.
6
6
  ---
7
7
 
8
8
  # Lean
@@ -13,48 +13,40 @@ compatibility: Snapshot dated 3 October 2026. Thresholds, tool names, and defaul
13
13
  |---|---|---|
14
14
  | Writing or editing a feature (any size) | **Inline gate** | Apply *Binding defaults* + *AI-code traps* while you write. One line in the reply on what you did. No benchmarks, no spawning. |
15
15
  | Asked "make it faster / why slow / eating RAM / will it run smoothly", a regression, pre-ship | **Full pass** | Run *Full-pass workflow*. Read `references/playbooks.md` sections for the stacks found; `references/memory-and-processes.md` for any memory or process finding. |
16
- | About to run `kill`/`pkill`/`taskkill`, or "stop that stuck process" | **Process safety** | Obey *Never kill your own host* first. |
17
16
 
18
- Users rarely ask for performance: they ask for a feature, then leave when it eats RAM or takes five seconds to open. This skill is on from the first line of code. Do not ship the heavy version intending to "optimize later".
17
+ **Process safety:** kill only an exact PID you started (the bash tool's rule); a process using lots of CPU/RAM is a finding to report, not a target. Details: `references/memory-and-processes.md`.
18
+
19
+ On from the first line of code: never ship the heavy version intending to "optimize later".
19
20
 
20
21
  ## Governing rules
21
22
 
22
- 1. **Measure, then cut.** In a pass, never optimize from vibes: baseline → find the bottleneck → fix → re-measure. In build mode the binding defaults are pre-paid by platform evidence: apply them without benchmarking.
23
- 2. **Fix the shared cause once.** The N+1 belongs in the query layer, not a memo at each call site. Check every caller of the slow path.
24
- 3. **Optimize user time, not machine time.** Startup, first paint, navigation, hot interactions, the nightly job. Micro-tuning code nobody waits on is last.
25
- 4. **Memory should be flat.** After N cycles of the core loop, committed memory ≈ after 1. A climbing staircase is a leak until proven otherwise; a sawtooth returning to baseline is GC.
26
- 5. **Nothing outlives its job.** Timers, listeners, observers, subscriptions, watchers, child processes, temp files, locks — each has an owner that ends it on success *and* every failure path.
23
+ 1. **Measure, then cut.** In a pass, never optimize from vibes: baseline → find the bottleneck → fix → re-measure. Build-mode defaults apply without benchmarking.
24
+ 2. **Fix the shared cause once.** The N+1 belongs in the query layer, not a memo at each call site.
25
+ 3. **Optimize user time, not machine time.** Startup, first paint, navigation, hot interactions, the nightly job.
26
+ 4. **Memory should be flat.** After N cycles of the core loop, committed memory ≈ after 1. A climbing staircase is a leak; a sawtooth back to baseline is GC.
27
+ 5. **Nothing outlives its job.** Timers, listeners, subscriptions, watchers, child processes, temp files, locks: each has an owner that ends it on success *and* every failure path.
27
28
  6. **Bounded by default.** Cache, queue, buffer, retry, log, list render: cap and eviction policy at creation.
28
- 7. **Small is fast.** Dead code, unused deps, duplicate styles are shipped and paid for. Deleting is the cheapest optimization.
29
+ 7. **Small is fast.** Deleting dead code, unused deps and duplicate styles is the cheapest optimization.
29
30
  8. **Numbers or silence.** Before/after on the same machine and data, cold and warm. Say what moved, X → Y, and what you could not measure.
30
- 9. **No perf theater.** Complexity must pay for itself in measured user time, or revert it. Caching that adds staleness bugs for an unmeasured gain is a regression.
31
- 10. **Label evidence** on every claim: `RUNTIME` (measured), `CODE` (read in source), `DEDUCED` (inferred), `SNAPSHOT` (dated external source). Never present what you read as what you ran.
32
-
33
- ## Never kill your own host
34
-
35
- Agent sessions run *inside* a host process (GG Coder's daemon/sidecar, an editor, a terminal multiplexer). Killing it kills this session and every sibling session mid-turn. This has happened.
36
-
37
- - **Never kill by pattern.** No `pkill -f`, `killall`, `kill $(pgrep …)`, `taskkill /IM`, or loops over `ps | grep` output. Kill only an **exact PID or process group you started in this task** (you hold the PID from your own spawn or background-task handle).
38
- - **Before touching any PID you did not start:** walk its ancestry (`ps -o pid,ppid,command -p <pid>`, repeat up the PPID chain) and your own (`$$`, `$PPID` upward). If it is you, an ancestor, or another instance of the same host binary (e.g. another `app-sidecar`/daemon) — **do not kill. Report it.**
39
- - **A process using lots of CPU/RAM is a finding, not a target.** Report PID, command, RSS, age; recommend the fix. Orphan cleanup belongs to the app's startup sweep, never to a live session.
40
- - Unsure whether you own it? You don't. Ask the user.
31
+ 9. **No perf theater.** Complexity must pay for itself in measured user time, or revert it.
32
+ 10. **Label evidence** on every claim: `RUNTIME` (measured), `CODE` (read in source), `DEDUCED` (inferred), `SNAPSHOT` (dated external source).
41
33
 
42
34
  ## Binding defaults (build mode)
43
35
 
44
- - **Teardown ships with the feature.** Whatever you start is torn down in the same module, success and error paths. One cleanup handle per owner: an `AbortController` for a component's fetches and listeners, a `dispose()`, a `finally`.
36
+ - **Teardown ships with the feature.** Whatever you start is torn down in the same module, success and error paths. One cleanup handle per owner (`AbortController`, `dispose()`, `finally`).
45
37
  - **Cap every accumulation.** LRU/TTL cache, bounded queue, paginated query, virtualized long list, capped retries with backoff + jitter, rotating logs.
46
- - **Never block the interactive thread.** Work that can exceed a frame (web long-task threshold: 50 ms) is chunked (`scheduler.yield()` where supported, else `setTimeout` chunking), deferred, or moved to a worker / utility process / background thread. No sync fs/crypto/CPU spikes in request handlers or UI code.
47
- - **Lazy by default, eager only for the first screen.** Rare routes, heavy editors, charts, optional SDKs: dynamic `import()` / deferred `require`. Preload only what the critical path provably needs.
38
+ - **Never block the interactive thread.** Work that can exceed a frame (web long-task threshold: 50 ms) is chunked (`scheduler.yield()` where supported, else `setTimeout` chunking), deferred, or moved to a worker / utility process / background thread.
39
+ - **Lazy by default, eager only for the first screen.** Rare routes, heavy editors, charts, optional SDKs: dynamic `import()`.
48
40
  - **Right-size media.** AVIF/WebP with fallback, explicit `width`/`height`, `srcset`/`sizes`, `loading="lazy"` below the fold, `fetchpriority="high"` on the one LCP image only — never lazy-load it.
49
41
  - **Stream, don't hoard.** Stream files and large responses; cursor-paginate queries; chunk big jobs.
50
42
  - **Timeout everything external.** Network, subprocesses, locks, queues — and tear down on timeout.
51
43
  - **Price a dependency before adopting it** in anything user-facing (bundle impact client-side; `node --cpu-prof -e "require('mod')"` server/desktop).
52
44
  - **Batch I/O.** One query for N rows; DOM reads before writes; debounce/throttle expensive handlers.
53
- - **Events over polling.** Prefer push (WebSocket/SSE, fs watchers, DB notifications, webhooks). If you must poll: slowest interval the UX tolerates, back off when idle, pause on `visibilitychange` hidden, stop on unmount.
45
+ - **Events over polling.** Prefer push (WebSocket/SSE, watchers, webhooks). If you must poll: slowest tolerable interval, back off when idle, pause when hidden, stop on unmount.
54
46
 
55
47
  ## AI-code traps (check every generated diff)
56
48
 
57
- The patterns agents produce most. Scan your own diff for them before replying.
49
+ Scan your own diff before replying.
58
50
 
59
51
  | Trap | Detect | Fix |
60
52
  |---|---|---|
@@ -70,9 +62,9 @@ The patterns agents produce most. Scan your own diff for them before replying.
70
62
 
71
63
  ## Full-pass workflow
72
64
 
73
- 1. **Profile the target from the code.** Shape (manifests, lockfiles, build/CI configs), surfaces users wait on, scale (data sizes, session length), platform constraints (low-end devices matter more than the dev machine). Build the coverage ledger (see Scaling).
74
- 2. **Baseline, or say you cannot.** Load/startup time, p50/p99 latency, bundle sizes, RSS/heap at rest and after repeated cycles. Commands: `references/playbooks.md`. If nothing runs, do a `CODE`-labeled static pass and say plainly nothing was measured.
75
- 3. **Sweep the six areas, in order:**
65
+ 1. **Profile the target from the code.** Shape, surfaces users wait on, scale, platform constraints (low-end devices over the dev machine). Build the coverage ledger: areas × units.
66
+ 2. **Baseline, or say you cannot.** Startup, p50/p99 latency, bundle sizes, RSS/heap at rest and after repeated cycles (`references/playbooks.md`). If nothing runs, do a `CODE`-labeled static pass and say plainly nothing was measured.
67
+ 3. **Sweep the five areas, in order:**
76
68
 
77
69
  | # | Area | Hunting |
78
70
  |---|---|---|
@@ -80,10 +72,9 @@ The patterns agents produce most. Scan your own diff for them before replying.
80
72
  | 2 | Runtime responsiveness | Long tasks / long animation frames, layout thrash, re-render storms, N+1, sync hot paths, missing pagination/virtualization, allocation churn |
81
73
  | 3 | Memory | Forgotten timers/listeners/observers, detached DOM, unbounded maps, large captured closures, non-GC cycles, full-size media, whole-file loads |
82
74
  | 4 | Processes & lifecycle | Unreaped children, orphans (killed node not tree), no signal handling, leaked ports/fds/locks/temp files, no startup sweep |
83
- | 5 | Payload & dead weight | Unused deps/files/exports, dead CSS, two libs for one job, debug payloads shipped, tree-shaking blockers |
84
- | 6 | Styling consistency | Same visual thing built three ways, literals duplicating tokens (design decisions are evidence-led-ui's call) |
75
+ | 5 | Payload & dead weight | Unused deps/files/exports, dead or duplicate CSS, two libs for one job, debug payloads shipped, tree-shaking blockers |
85
76
 
86
- 4. **Rank by user impact; fix the top three to five.**
77
+ 4. **Rank by user impact; fix the top three to five**: straight away when the user asked to make it faster, otherwise report first and fix what they select.
87
78
 
88
79
  | Severity | Meaning |
89
80
  |---|---|
@@ -93,37 +84,30 @@ The patterns agents produce most. Scan your own diff for them before replying.
93
84
  | Low | Dead code/styles, micro-tuning — only when adjacent to a real fix |
94
85
 
95
86
  Record each baseline first. Prefer removing work over hiding it (delete the eager import > code-split it > defer it); prefer the platform primitive.
96
- 5. **Verify.** Re-measure exactly as baselined. Memory: cycle the path many times, force GC where possible, compare — flat wins. Number didn't move → revert and say so.
97
- 6. **Leave one guard.** Bundle budget (`size-limit`, Lighthouse CI assertions), slow-query threshold, repeated-cycle memory assertion, a test that fails if the eager import returns.
87
+ 5. **Verify.** Re-measure exactly as baselined. Memory: cycle the path, force GC, compare. Number didn't move → revert and say so.
88
+ 6. **Leave one guard** with tools already installed and the existing CI: bundle budget, slow-query threshold, repeated-cycle memory assertion, a test that fails if the eager import returns. A guard needing a new package or CI workflow (`size-limit`, Lighthouse CI) is a recommendation unless the user agrees.
98
89
  7. **Report.** Numbers first (X → Y, machine, data, date) → remaining findings ranked with file:line and fix → **not checked** list → changed vs recommended → dropped candidates (false positives). Label every claim.
99
90
 
100
91
  ## Scaling: one agent or several
101
92
 
102
- | Situation | Do |
103
- |---|---|
104
- | Inline gate, small edit, single fix | Main thread only. Never spawn. |
105
- | Full pass, one deployable, you can read every relevant file | Single-threaded; build the ledger yourself. |
106
- | Full pass, several deployables (e.g. web + API + desktop shell + mobile), or more ledger rows than you can read fully | Fan out **static review** by surface — frontend / backend / processes & lifecycle — in ONE `spawn_agent` call (≤ 6). |
107
- | A dated claim needs checking (threshold, tool status) | One `researcher` child. |
108
-
109
- - **Ledger:** rows = six areas × in-scope units. Each row ends checked-with-findings / checked-clean / not-checked(reason).
110
- - **Child brief (self-contained):** absolute skill root and which `references/*.md` sections to read; slice paths; owned ledger rows; evidence labels; output = findings (file:line, label, severity, fix) + explicit `checked` / `not checked` lists; "read-only: do not kill, start, or benchmark anything". Use `owl`, or a general-purpose child if it must load this skill.
111
- - **Measurement does not fan out on one machine.** Benchmarks, load tests, and memory-cycle runs stay in the main thread, or one child per *separate environment*, so numbers stay comparable (same machine, same data, same build). Never run benchmarks in parallel on the same machine — they distort each other.
112
- - **Merge:** a failed, timed-out, or silent child → its rows are `not checked`, never clean. Re-open every reported file:line before reporting it.
113
- - **Large pre-ship pass:** one fresh-context verifier child tries to disprove the top findings.
114
- - **Edits stay serialized** in the main thread (or `bee` children on strictly disjoint files); re-measure once after merging.
93
+ - Stay single-threaded for the inline gate, single fixes, and a full pass on one deployable you can read fully.
94
+ - Fan out static review for several deployables or more ledger rows (five areas × units) than you can read: read-only repo helpers, one per surface (frontend / backend / processes & lifecycle).
95
+ - One researcher for a dated threshold or tool-status claim.
96
+ - **Measurement does not fan out on one machine.** Benchmarks, load tests and memory-cycle runs stay in the main thread, or one per separate environment, so numbers stay comparable.
97
+ - Helpers never kill, start, or benchmark anything. Re-measure once after merging.
98
+
99
+ Helper types, brief contents and merge rules come with the skill loader.
115
100
 
116
101
  ## Honesty rules
117
102
 
118
103
  - Never state or imply the software is "fast", "optimized", or "leak-free". State what was measured, fixed, and left unchecked.
119
104
  - A lint rule, analyzer, or profiler is never proof of absence; tools find a minority of what matters.
120
105
  - Never invent a number, threshold, or version. Date-sensitive and unverified → `SNAPSHOT` or "verify this".
121
- - "I could not measure this" is a useful output. A fabricated confirmation is not.
122
106
  - Prototype with no users or load → say proportionality applies and stop early.
123
107
 
124
108
  ## Reference map
125
109
 
126
110
  Resolve paths from the installed skill root. Load only what the profile triggered.
127
111
 
128
- - `references/playbooks.md` — per-stack measurement and sweeps: web (Core Web Vitals, LoAF, React/Next/Vite), Node/backend, data & N+1, Electron, Tauri, mobile, native, Python, payload/dead-code tooling, styling consistency.
129
- - `references/memory-and-processes.md` — leak taxonomy and detection per runtime; process lifecycle: host-safety rule, zombies, orphans, tree kills, graceful shutdown, startup sweeps, container PID 1, leaked handles.
112
+ - `references/playbooks.md` — per-stack measurement and sweeps: web (Core Web Vitals, LoAF, React/Next/Vite), Node/backend, data & N+1, Electron, Tauri, mobile, native, Python, payload/dead-code tooling, duplicate styles.
113
+ - `references/memory-and-processes.md` — leak taxonomy and detection per runtime; process lifecycle: host-safety detail, zombies, orphans, tree kills, graceful shutdown, startup sweeps, container PID 1, leaked handles.
@@ -1,8 +1,10 @@
1
1
  # Lean — per-stack playbooks
2
2
 
3
- Load only the sections the profile triggered. Commands assume a POSIX shell unless noted. Claims sourced on the snapshot date (3 October 2026) carry `SNAPSHOT`; tool versions and thresholds decay — re-verify with web access before asserting as current.
3
+ Load only the sections the profile triggered. Commands assume a POSIX shell unless noted. Claims carry `SNAPSHOT` with their date (most 3 Oct 2026; Node, Next.js and Core Web Vitals support re-verified 22 Oct 2026); tool versions and thresholds decay — re-verify with web access before asserting as current.
4
4
 
5
- **Contents:** Web frontend · React / Next.js / Vite · Node.js / backend / API · Electron · Tauri · Mobile · Native / compiled · Python · Data & queries (N+1) · Payload & dead weight · Styling consistency
5
+ ## Contents
6
+
7
+ Web frontend · React / Next.js / Vite · Node.js / backend / API · Electron · Tauri · Mobile · Native / compiled · Python · Data & queries (N+1) · Payload & dead weight (incl. duplicate styles)
6
8
 
7
9
  ## Web frontend
8
10
 
@@ -19,7 +21,7 @@ SEO blogs claim 2026 "tightenings" (LCP 2.0 s, stricter INP). None appear on web
19
21
  **Measure:**
20
22
 
21
23
  - Lab: Lighthouse (DevTools, or `npx lighthouse <url> --output json`), DevTools Performance panel (long tasks, long animation frames, layout shifts), Network waterfall, Coverage tab for shipped-but-unused JS/CSS.
22
- - Field: the `web-vitals` npm package; use its **attribution build** (`import { onINP } from "web-vitals/attribution"`) to get INP phase breakdown (input delay / processing / presentation) and the **Long Animation Frames (LoAF)** entries for the slow interaction — LoAF names the script and function that blocked the frame. LoAF is Chromium-only (shipped Chrome 123); script attribution misses cross-origin iframes, workers, and extensions.
24
+ - Field: the `web-vitals` npm package; use its **attribution build** (`import { onINP } from "web-vitals/attribution"`) to get INP phase breakdown (input delay / processing / presentation) and the **Long Animation Frames (LoAF)** entries for the slow interaction — LoAF names the script and function that blocked the frame. LCP and INP are Baseline Newly available since Safari 26.2 (Dec 2025), so RUM collects them in Safari too; LoAF is still Chromium-only (`SNAPSHOT` 22 Oct 2026); script attribution misses cross-origin iframes, workers, and extensions.
23
25
  - SPAs: route changes after the first load are not separate page views in CrUX. Chrome's **Soft Navigations API** was in a final origin trial (Chrome 147–149) with a planned 2026 ship; how CrUX will use it is undecided (`SNAPSHOT`). Until it ships, measure SPA route transitions yourself (`performance.mark` around route change → next paint).
24
26
  - Regression gate: Lighthouse CI with assertions (budgets on LCP/CLS/TBT and resource sizes) and/or `size-limit` on bundle bytes.
25
27
 
@@ -39,12 +41,12 @@ SEO blogs claim 2026 "tightenings" (LCP 2.0 s, stricter INP). None appear on web
39
41
  ## React / Next.js / Vite
40
42
 
41
43
  - **React Compiler 1.0** (stable Oct 2025; works for React and React Native) auto-memoizes components and hooks. With it on, write plain code; React's guidance keeps `useMemo`/`useCallback` only as an escape hatch (e.g. a value used as an effect dependency). In existing code, don't mass-delete manual memo — removing it can change compiled output; remove only with tests. Without the compiler, memo only what the React DevTools Profiler implicates. The compiler does **not** fix effects: an effect that refetches on every render is still a bug.
42
- - **Next.js 16** (Oct 2025): Turbopack is the default bundler for dev and build. Caching is explicit — with `cacheComponents: true`, dynamic code runs per request and only `"use cache"` functions/components are cached (tune with `cacheLife`/`cacheTag`, invalidate with `revalidateTag`/`updateTag`). Perf checks: is expensive shared data cached? is per-user data kept out of shared cache (`"use cache: private"`)? is `"use client"` pushed down to leaves? are request waterfalls in server components parallelized? Turn on `reactCompiler: true` when the codebase passes the compiler's rules.
44
+ - **Next.js 16** (16.4 current, `SNAPSHOT` 22 Oct 2026): Turbopack is the default bundler for dev and build. Caching is explicit — with `cacheComponents: true`, dynamic code runs per request and only `"use cache"` functions/components are cached (tune with `cacheLife`/`cacheTag`, invalidate with `revalidateTag`/`updateTag`). Perf checks: is expensive shared data cached? is per-user data kept out of shared cache (`"use cache: private"`)? is `"use client"` pushed down to leaves? are request waterfalls in server components parallelized? Turn on `reactCompiler: true` when the codebase passes the compiler's rules.
43
45
  - **Vite 8** (stable 12 Mar 2026): Rolldown (Rust) replaces esbuild + Rollup as the single bundler; config key `build.rollupOptions` → `build.rolldownOptions`; needs Node 20.19+/22.12+. Vite 7 projects still use Rollup. Build-time wins are not runtime wins — measure the shipped bundle, not the build clock.
44
46
 
45
47
  ## Node.js / backend / API
46
48
 
47
- **Runtime:** Node 26 becomes Active LTS on 28 Oct 2026; Node 24 moves to maintenance on 20 Oct 2026 (EOL 30 Apr 2028); Node 22 EOL 30 Apr 2027 (`SNAPSHOT`, nodejs/Release schedule). New projects target 24 now, 26 once it is LTS. Bun/Deno: same rules apply; benchmark your workload before switching runtimes for speed — vendor benchmarks are not your app.
49
+ **Runtime:** Node 24 has been in maintenance since 20 Oct 2026 (EOL 30 Apr 2028); Node 26 becomes Active LTS on 28 Oct 2026; Node 22 EOL 30 Apr 2027. From 27.x Node ships one major per year and every major becomes LTS (`SNAPSHOT` 22 Oct 2026, nodejs/Release schedule). New projects target 26. Bun/Deno: same rules apply; benchmark your workload before switching runtimes for speed — vendor benchmarks are not your app.
48
50
 
49
51
  **Measure:** `autocannon` or `k6` for load (watch p99, not the average — the average lies), `clinic doctor` / `clinic flame` / `0x` for CPU and event-loop diagnosis, `--inspect` + Chrome DevTools for heap. DB: slow-query log, `EXPLAIN ANALYZE`.
50
52
 
@@ -123,10 +125,10 @@ Generators/streams instead of list-building for large data; vectorize hot loops
123
125
 
124
126
  **Sweep list:** `knip` in CI; duplicate dependencies (`pnpm why <pkg>`, `npm ls <pkg>`) — two versions of one library is double weight; "two of the same job" audit (two icon sets, two date libs, two CSS systems, a utility lib plus hand-rolled copies of its functions); polyfills for browsers no longer supported; debug/symbol payloads shipped in release (strip; source maps to a symbol server, not the bundle); largest-files audit (`du`, bundle analyzer) — the top ten files are usually the whole story; unused assets in repos (images, fonts nobody references).
125
127
 
126
- ## Styling consistency (payload view)
128
+ ## Duplicate styles (payload view)
127
129
 
128
130
  The rule: **one way to express one visual decision.** Hunt repeated rule blocks that differ by one value, spacing/color literals that duplicate existing design tokens, the same component styled three ways, utility classes wrapped around handwritten CSS doing the same job, dead rules for removed components. Each duplication is bytes today and divergence tomorrow. Kill the copies, keep the token. If resolving it requires a design *decision* (which of three styles is right), that call belongs to evidence-led-ui — coordinate rather than decide unilaterally.
129
131
 
130
132
  ---
131
133
 
132
- **Provenance:** snapshot 3 October 2026 (all URLs accessed 3 Oct 2026). Sources: https://web.dev/articles/vitals (thresholds); https://web.dev/articles/find-slow-interactions-in-the-field and https://developer.chrome.com/docs/web-platform/long-animation-frames (attribution build, LoAF); https://developer.chrome.com/blog/final-soft-navigations-origin-trial (Chrome 147–149, CrUX use undecided); Speculation Rules support from secondary 2026 coverage (corewebvitals.io, uploadcare.com — Chromium default, Safari 26.2 flag; re-verify on caniuse); https://react.dev/blog/2025/10/07/react-compiler-1; https://nextjs.org/docs/app/api-reference/directives/use-cache; https://vite.dev/blog/announcing-vite8; https://github.com/nodejs/Release/blob/main/schedule.json (Node release dates); https://docs.python.org/3/whatsnew/3.14.html (PEP 779); React Native 0.82 release coverage (New Architecture only, Hermes V1 experimental). Carried from the 17 Aug 2026 snapshot, not re-verified: Electron official performance tutorial (module cost, lazy loading, main-process blocking, profiling guidance), Rust std `process::Child` docs (zombie reaping), Knip documentation and 2026 ecosystem coverage (dead-code standard claim — `SNAPSHOT`), Valgrind/LeakCanary/Instruments/pprof public docs for tool usage. Version-specific flags and thresholds decay fastest; re-verify before asserting.
134
+ **Provenance:** snapshot 3 October 2026; re-verified 22 Oct 2026: Node schedule (https://github.com/nodejs/Release/blob/main/schedule.json , https://nodejs.org/en/blog/announcements/evolving-the-nodejs-release-schedule), LCP/INP Baseline (https://web.dev/blog/lcp-and-inp-are-now-baseline-newly-available), Next.js 16.4 (npm `next` latest). Other sources accessed 3 Oct 2026: https://web.dev/articles/vitals (thresholds); https://web.dev/articles/find-slow-interactions-in-the-field and https://developer.chrome.com/docs/web-platform/long-animation-frames (attribution build, LoAF); https://developer.chrome.com/blog/final-soft-navigations-origin-trial (Chrome 147–149, CrUX use undecided); Speculation Rules support from secondary 2026 coverage (corewebvitals.io, uploadcare.com — Chromium default, Safari 26.2 flag; re-verify on caniuse); https://react.dev/blog/2025/10/07/react-compiler-1; https://nextjs.org/docs/app/api-reference/directives/use-cache; https://vite.dev/blog/announcing-vite8; https://github.com/nodejs/Release/blob/main/schedule.json (Node release dates); https://docs.python.org/3/whatsnew/3.14.html (PEP 779); React Native 0.82 release coverage (New Architecture only, Hermes V1 experimental). Carried from the 17 Aug 2026 snapshot, not re-verified: Electron official performance tutorial (module cost, lazy loading, main-process blocking, profiling guidance), Rust std `process::Child` docs (zombie reaping), Knip documentation and 2026 ecosystem coverage (dead-code standard claim — `SNAPSHOT`), Valgrind/LeakCanary/Instruments/pprof public docs for tool usage. Version-specific flags and thresholds decay fastest; re-verify before asserting.
@@ -6,82 +6,67 @@ license: Behavior-preservation methodology synthesized from public sources (Fowl
6
6
 
7
7
  # Refactoring
8
8
 
9
- **Scope gate:** Decide from the requested behavior, not the word "refactor". A requested change to return values, error handling, or an API contract is implementation work, not a behavior-preserving cleanup. Use the normal implementation workflow: inspect the affected callers, make the requested contract and caller changes together, add regression coverage, and run the checks. Do not manufacture a separate pure-rename stage merely to enter this skill. Existing authorization and safety controls still apply. For a genuine behavior-preserving refactor, use the gated loop below unchanged.
9
+ **Scope gate:** Decide from the requested behavior, not the word "refactor". A requested change to return values, error handling, or an API contract is implementation work: inspect the callers, change the contract and callers together, add regression coverage, run the checks. Do not manufacture a separate pure-rename stage merely to enter this skill. Existing authorization and safety controls still apply. For a genuine behavior-preserving refactor, use the gated loop below unchanged.
10
10
 
11
11
  **Route first:**
12
12
 
13
13
  | Situation | Mode | Next |
14
14
  |---|---|---|
15
- | Tidy a module/function you are already touching, suite green | **1. In-the-small** | Execute loop, inline |
16
- | User wants a plan, architectural change, or competing approaches | **2. Plan-first** | Modes → 2 |
17
- | No/red/unrunnable tests, or migration bigger than one session | **3. Legacy** | `references/legacy.md` before any edit |
15
+ | Tidy code you are already touching, suite green | **In-the-small** | Execute loop, inline; keep cleanup to files you are touching |
16
+ | User wants a plan, architectural change, or competing approaches | **Plan-first** | Interview, verify claims in the repo, fix scope as in/out lists, check coverage (thin coverage is a question, not an assumption), then a plan of tiny commits that each leave the code working. No file paths or snippets in the plan; they go stale |
17
+ | No/red/unrunnable tests, or a migration bigger than one session | **Legacy** | `references/legacy.md` before any edit |
18
18
  | Same mechanical change across >~10 files or >~500 lines | **Codemod** | `references/legacy.md` → Codemods |
19
19
 
20
- Change the structure of code without changing what it does. Every observable behavior that exists before the refactoring — including the bugs — must exist after it. This skill exists because agents drift: without hard gates, "refactoring" silently becomes rewriting, and rewriting untested code is how behavior is lost.
21
-
22
- **Without tests, you're not refactoring — you're editing.**
20
+ Every observable behavior before the refactoring, bugs included, must exist after it. **Without tests, you're not refactoring — you're editing.**
23
21
 
24
22
  ## Governing rules
25
23
 
26
- 1. **Two hats.** You are either adding function or restructuring, never both in the same change. Mixing them makes each unprovable. If new behavior is genuinely required, finish the structural change first, prove it, then change behavior in a separate step.
27
- 2. **The baseline is a gate, not advice.** Before the first edit: the test suite runs green on unmodified code, or you build a safety net first (see mode 3). Record what you ran and its result. A suite that was already red tells you nothing — fix or quarantine the noise before counting on it.
28
- 3. **One named transformation per step.** Each step applies exactly one refactoring (Extract Method, Move Function, Introduce Parameter…) and has a name you can state. If you cannot name it, it is not a refactoring — it is a rewrite wearing a costume.
29
- 4. **Red means revert, not debug.** After each step, run the smallest relevant suite. Green ⇒ commit (when per-step commits were agreed — see the loop's checkpoint), message names the transformation. Red ⇒ revert the step immediately (`git restore`/`git checkout` the touched files). A red intermediate means the step was too big or wrong; debugging a broken step costs more than re-slicing it.
30
- 5. **Never touch tests to get green.** In a pure refactor, modifying, loosening, or deleting an assertion is the cardinal sin — it destroys the only proof you have. If a test blocks legitimate structural change (asserts private internals), convert it to assert observable behavior *before* the transformation, as its own commit. Any unexplained test change in a refactor diff is a red flag.
31
- 6. **Smallest suite per step, full suite per finish.** Iterate fast on the touched area, but before declaring done: full test suite + typecheck + lint, on the same commands CI runs.
32
- 7. **Prove it, don't vibe it.** The closing question is not "is this good code" but "can I prove nothing observable changed?" Answer with evidence: suites run, before/after outputs, mutation spot-checks when the boundary is critical. Say plainly what you could not verify.
33
- 8. **Make the change easy, then make the easy change** (Beck). Preparatory refactoring — small structural setup that makes the coming feature trivial — is the highest-ROI kind. Do it, then stop.
34
- 9. **Public API surface is observable behavior.** Renaming or reshaping an exported symbol, endpoint, or file layout preserves runtime behavior but breaks consumers. Inside the module: refactor freely. Across a published boundary: deprecate-and-alias, never hard-break, unless the user chose the break.
35
- 10. **Edit sources, not generated output.** `dist/`, vendored, or generated files are regenerated by their toolchain — hand-editing them is a change that the next build erases. Change the generator or the source, then regenerate.
36
-
37
- ## Modes
38
-
39
- **1. In-the-small** — tidy a module, extract a function, kill duplication while working. The execute loop below, inline, without ceremony. Keep litter-pickup bounded to files you are already touching; a boy-scout sweep across the repo is scope creep.
40
-
41
- **2. Plan-first** — the user asks for a refactor plan, the change is architectural, or multiple approaches compete. Interview the problem, explore the repo to verify claims, fix scope as in/out lists, check test coverage (thin coverage is a question to the user, not an assumption), then break the work into a plan of tiny commits — each commit leaves the codebase working. File it where the user wants (issue, doc, or just the reply). Do NOT embed file paths or code snippets in the plan — they go stale before the work starts.
42
-
43
- **3. Legacy / untested** — no tests, unrunnable suite, or a migration too large for one session. Do not proceed with the normal loop. Go to `references/legacy.md`: characterization tests capturing *actual* current behavior (bugs included — log them, don't silently fix them), seams, branch-by-abstraction, parallel change (expand–migrate–contract), strangler fig.
24
+ 1. **Two hats.** Add function or restructure, never both in one change. If new behavior is required, finish and prove the structural change first.
25
+ 2. **The baseline is a gate, not advice.** Before the first edit the suite runs green on unmodified code, or you build a safety net first (Legacy). Record what you ran. A suite that was already red tells you nothing.
26
+ 3. **One named transformation per step** (Extract Function, Move Function, Introduce Parameter…). If you cannot name it, it is a rewrite.
27
+ 4. **Red means revert, not debug.** After each step run the smallest relevant suite. Green ⇒ commit if per-step commits were agreed, message = transformation name. Red ⇒ undo that step at once and take a smaller step. Undo by reversing that step's edits; `git restore` only when every earlier step is committed, because without per-step commits it also wipes the earlier steps in those files.
28
+ 5. **Never touch tests to get green.** Modifying, loosening, or deleting an assertion in a pure refactor destroys the proof. A test that asserts private internals gets converted to observable behavior first, as its own step.
29
+ 6. **Smallest suite per step, full suite per finish**: full suite + typecheck + lint on the commands CI runs, including every package that imports what you touched.
30
+ 7. **Prove it.** The closing question is "can I prove nothing observable changed?": suites run, before/after outputs, a mutation spot-check on critical boundaries. Say what you could not verify.
31
+ 8. **Make the change easy, then make the easy change.** Preparatory refactoring is the highest-value kind. Do it, then stop.
32
+ 9. **Public API surface is observable behavior.** Across a published boundary (exports, endpoints, file layout): deprecate-and-alias unless the user chose the break.
33
+ 10. **Edit sources, not generated output** (`dist/`, vendored, generated files).
44
34
 
45
35
  ## Execute loop
46
36
 
47
- 1. **Baseline.** Run the suite on unmodified code; record green. If red or absent → mode 3. If the project has no VCS or the working tree is dirty with unrelated changes, say so and stop for direction — a dirty baseline destroys the revert safety.
48
- 2. **Commit checkpoint.** Refactoring is safest with per-step commits on a dedicated branch — ask the user once, up front: "I'll commit each verified step on a branch — good?" If they decline, keep steps small and separable and report the step list for review at the end. Never commit without authorization.
49
- 3. **Pick one target.** Ranked by risk-adjusted value, not by how interesting it is: security → correctness → structure → duplication → naming. Hotspots first — files where churn (recent edit frequency) meets complexity. Smell catalog and metrics thresholds: `references/smells.md`.
50
- 4. **Apply one named transformation.** Full mechanics per transformation live in `references/smells.md`. Prefer language-aware tooling (`code_nav` / IDE rename, AST codemods) over regex edits; at scale (>~10 files or >~500 lines), a codemod (ast-grep, jscodeshift, OpenRewrite) is the safe path and regex is the wrong one — workflow in `references/legacy.md`.
51
- 5. **Verify.** Smallest relevant suite → green ⇒ commit (message = transformation name) → next target. Red ⇒ rule 4 of the governing rules: revert, take a smaller step.
52
- 6. **Close.** Full suite + typecheck + lint, on the same commands CI runs — including every package that imports the code you touched, not just the one you edited (monorepos: respect build order). Report: transformations applied (named), before/after state, smells left and why, anything deferred. Agent-specific drift modes to check before closing: `references/agent-pitfalls.md`.
37
+ 1. **Baseline.** Run the suite on unmodified code; record green. Red or absent → Legacy. No VCS or a tree dirty with unrelated changes → say so and stop for direction.
38
+ 2. **Commit checkpoint.** Ask once: "I'll commit each verified step on a branch — good?" If declined, keep steps small and report the step list at the end. Never commit without authorization.
39
+ 3. **Pick one target** by risk-adjusted value: security → correctness → structure → duplication → naming; hotspots (churn × complexity) first. Smells and thresholds: `references/smells.md`.
40
+ 4. **Apply one named transformation.** Mechanics in `references/smells.md`. Prefer language-aware tools (`code_nav`, IDE rename, AST codemods) over regex.
41
+ 5. **Verify** per rule 4.
42
+ 6. **Close** per rule 6. Report transformations applied, before/after, smells left and why, anything deferred. Check `references/agent-pitfalls.md` before closing.
53
43
 
54
- ## Risk levels set the safety net
44
+ ## Risk sets the safety net
55
45
 
56
46
  | Risk | Touching | Minimum net before editing |
57
47
  |---|---|---|
58
48
  | Low | Pure internals, no I/O | Unit tests + types |
59
49
  | Medium | Module boundary, parsing, state | + contract tests at the seam |
60
- | High | Money, auth, concurrency, migrations, data | + integration tests, a rollback plan, and small phases |
50
+ | High | Money, auth, concurrency, migrations, data | + integration tests, a rollback plan, small phases |
61
51
 
62
- When unsure whether behavior could change: **do not apply — ask.**
52
+ Unsure whether behavior could change: **do not apply — ask.**
63
53
 
64
54
  ## When NOT to refactor
65
55
 
66
- - No failing demand: nothing to add, nothing hurting. Refactoring without a driver is gold-plating.
67
- - The code is about to be deleted or replaced. Deleting is cheaper.
68
- - You cannot run or construct any safety net and the risk is medium+. Report and stop.
69
- - The rewrite instinct hits ("this is all wrong, let me start fresh"). That is a different conversation with the user, not a refactor — and big-bang rewrites lose the one thing refactoring keeps: working software at every step.
56
+ - No driver: nothing to add, nothing hurting.
57
+ - The code is about to be deleted or replaced.
58
+ - No safety net can be built and the risk is medium or higher: report and stop.
59
+ - The rewrite instinct ("let me start fresh"): that is a separate conversation with the user, not a refactor.
70
60
 
71
61
  ## Scaling: one agent or several
72
62
 
73
- | Situation | Do |
74
- |---|---|
75
- | In-the-small, or one package you can fully read | Main thread only. Never spawn. |
76
- | Large codebase: changed symbol has many callers across packages | Impact map first: ONE `spawn_agent` call, ≤ 6 read-only `owl` children, one per package/directory. Brief: the symbol(s) and their definition file:line, the slice's paths, output = every caller/import/dynamic reference as file:line + `checked`/`not checked` lists. |
77
- | Dated claim needed (framework migration, deprecated API) | One `researcher` child; label result SNAPSHOT with source URL. |
78
- | Executing transformations | **Serialized in the main thread**, one named step at a time, revert-on-red. Never parallel edits on a shared tree. |
79
- | Truly independent modules (no shared files, no import edges) | Optionally one `worker` per module on its own branch; each runs the full loop and its own baseline. Merge one branch at a time, full suite after each. |
80
-
81
- Merge rule: a child that fails or omits a slice → that slice is `not checked`; treat its callers as unknown and do not change the public signature. Re-open each reported caller before relying on it.
63
+ - In-the-small, or one package you can fully read: main thread only.
64
+ - A changed symbol with many callers across packages: impact map first, one read-only repo helper per package returning every caller/import/dynamic reference as file:line. A slice not checked → treat its callers as unknown and keep the public signature.
65
+ - Transformations run serialized in the main thread, one named step at a time, revert-on-red; never parallel edits on a shared tree.
66
+ - Helper types, brief contents and merge rules come with the skill loader.
82
67
 
83
68
  ## References
84
69
 
85
- - `references/smells.md` — smell catalog, metrics thresholds, prioritization, transformation mechanics
86
- - `references/legacy.md` — characterization tests, seams, branch-by-abstraction, parallel change, strangler fig, per-phase checkpoints
87
- - `references/agent-pitfalls.md` — how LLM agents specifically break "behavior-preserving", and the layered proof that catches it
70
+ - `references/smells.md`: smell catalog, metrics thresholds, prioritization, transformation mechanics
71
+ - `references/legacy.md`: characterization tests, seams, branch-by-abstraction, parallel change, strangler fig, codemods
72
+ - `references/agent-pitfalls.md`: how agents break "behavior-preserving", and the layered proof that catches it
@@ -5,7 +5,7 @@ description: Use when a bug resists the obvious fix or is flaky. Do NOT use when
5
5
 
6
6
  # Root-Cause
7
7
 
8
- Build a feedback loop, then let evidence kill hypotheses. Each phase has a gate. Keep a hypothesis log in your replies: `H# | prediction | experiment | result | verdict`.
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
9
 
10
10
  ## Phase 1 — Build the loop
11
11
 
@@ -41,6 +41,6 @@ Hard rules: three failed fixes → the hypothesis list is wrong; return to Phase
41
41
  ## Scaling: one agent or several
42
42
 
43
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 `owl` per hypothesis in a single `spawn_agent` call; 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.
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
45
 
46
46
  Sources (accessed 3 October 2026): https://git-scm.com/docs/git-bisect; https://www.debuggingbook.org/html/DeltaDebugger.html
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: shared-language
3
- description: Use when domain terms drift or a decision needs an ADR. Do NOT use for renames.
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
4
  ---
5
5
 
6
6
  # Shared Language
@@ -27,6 +27,6 @@ Only when a decision is **hard to reverse**, **surprising without context**, and
27
27
 
28
28
  ## Scaling: one agent or several
29
29
 
30
- Main thread only. On a large repo, one `owl` may inventory competing terms across packages (occurrences with file:line); the main thread decides and edits.
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
31
 
32
- Sources (accessed 3 October 2026): MADR 4.0.0, latest release (2024-09-17) — https://adr.github.io/madr/; ubiquitous language — https://martinfowler.com/bliki/UbiquitousLanguage.html
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,10 +1,28 @@
1
+ import type { RoyaleBugCategory } from "./royale-bug.js";
2
+ /** What a finished run did, beyond its commits, for GG Royale. */
3
+ export interface RunExtras {
4
+ /** The goal this run worked on (its coordinator's run), if any. */
5
+ goalId?: string | null;
6
+ /** The run handed work to workers (spawn_agent). */
7
+ workers?: boolean;
8
+ /** A deploy or publish command ran and succeeded. */
9
+ deployed?: boolean;
10
+ }
11
+ /** One run's outcome as GG Royale hears it (counts and labels only). */
12
+ export interface RunOutcome extends RunExtras {
13
+ commits: number;
14
+ bug?: RoyaleBugCategory | null;
15
+ }
1
16
  import type { ProgressSnapshot } from "../core/progress/types.js";
2
17
  export interface ProgressManager {
3
18
  /** Current snapshot for GET /progress + the SSE ready path. */
4
19
  snapshot: () => ProgressSnapshot;
5
20
  /** Award XP for one successfully completed run (prompt + any new commits). */
6
- awardRun: (cwd: string, runStartedAt: number, originId?: string) => Promise<void>;
21
+ awardRun: (cwd: string, runStartedAt: number, originId?: string, bug?: RoyaleBugCategory | null, extras?: RunExtras) => Promise<void>;
7
22
  /** Close the ~/.gg fs.watch + clear any pending debounce (leak-free shutdown). */
8
23
  dispose: () => void;
9
24
  }
10
- export declare function createProgressManager(agentDir: string, broadcastAll: (snapshot: ProgressSnapshot, originId?: string) => void): Promise<ProgressManager>;
25
+ export declare function createProgressManager(agentDir: string, broadcastAll: (snapshot: ProgressSnapshot, originId?: string) => void,
26
+ /** Optional: called after each successful run award with the number of newly
27
+ * detected commits (0 if none). Must not throw (GG Royale reporting). */
28
+ onRunAwarded?: (outcome: RunOutcome) => void): Promise<ProgressManager>;
@@ -8,7 +8,10 @@ import { loadProgress, peekProgress, updateProgress } from "../core/progress/sto
8
8
  import { awardPrompt, awardCommits } from "../core/progress/engine.js";
9
9
  import { detectNewCommits, repoKey } from "../core/progress/git-xp.js";
10
10
  import { rebuildFromSessions } from "../core/progress/rebuild.js";
11
- export async function createProgressManager(agentDir, broadcastAll) {
11
+ export async function createProgressManager(agentDir, broadcastAll,
12
+ /** Optional: called after each successful run award with the number of newly
13
+ * detected commits (0 if none). Must not throw (GG Royale reporting). */
14
+ onRunAwarded) {
12
15
  // Boot: recovery chain main → backup → coding + chat session rebuild → empty.
13
16
  const coderSessionsDir = path.join(agentDir, "sessions");
14
17
  let file = await loadProgress({
@@ -26,9 +29,10 @@ export async function createProgressManager(agentDir, broadcastAll) {
26
29
  function snapshot() {
27
30
  return buildSnapshot(file);
28
31
  }
29
- async function awardRun(cwd, runStartedAt, originId) {
32
+ async function awardRun(cwd, runStartedAt, originId, bug, extras = {}) {
30
33
  try {
31
34
  const now = Date.now();
35
+ let newCommits = 0;
32
36
  const updated = await updateProgress(async (f) => {
33
37
  const levelBefore = levelForXp(f.xp);
34
38
  awardPrompt(f, now, cwd);
@@ -42,6 +46,7 @@ export async function createProgressManager(agentDir, broadcastAll) {
42
46
  const detected = await detectNewCommits(cwd, lastHead, runStartedAt);
43
47
  if (detected && detected.commits.length > 0) {
44
48
  awardCommits(f, detected.commits, now, cwd);
49
+ newCommits = detected.commits.length;
45
50
  }
46
51
  }
47
52
  f.repos[key] = { lastHead: probe.head };
@@ -57,6 +62,14 @@ export async function createProgressManager(agentDir, broadcastAll) {
57
62
  file = updated;
58
63
  lastSeenNonce = updated.lastEvent?.nonce ?? null;
59
64
  broadcastAll(buildSnapshot(updated), originId);
65
+ try {
66
+ onRunAwarded?.({ commits: newCommits, ...(bug ? { bug } : {}), ...extras });
67
+ }
68
+ catch (err) {
69
+ log("DEBUG", "app-sidecar", "run outcome hook failed", {
70
+ message: err instanceof Error ? err.message : String(err),
71
+ });
72
+ }
60
73
  }
61
74
  catch (err) {
62
75
  log("DEBUG", "app-sidecar", "progress award failed", {