@kenkaiiii/ggcoder 5.39.4 → 5.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,164 @@
1
+ # United States
2
+
3
+ Snapshot **11 Aug 2026**. Markers: **[V]** verified against a primary/first-tier source · **[S]** snapshot, re-verify · **[U]** contested or fast-moving.
4
+
5
+ **PRA** = private right of action. This is the field that matters most for a small company: regulator-only laws are a compliance project, PRA laws are a lawsuit.
6
+
7
+ ---
8
+
9
+ ## 0. Scoping reality for a tiny startup
10
+
11
+ Most **comprehensive state privacy laws will not apply** to a pre-scale product — they need tens of thousands of residents' data or large revenue. But four categories apply **at any size**:
12
+
13
+ 1. FTC Act §5 and state unfair-and-deceptive-practices analogues (most state UDAPs *do* have a PRA).
14
+ 2. Breach-notification statutes in every state.
15
+ 3. Sector laws: COPPA, HIPAA, GLBA, TCPA, BIPA, consumer-health-data laws.
16
+ 4. No-threshold plaintiff statutes: CIPA, BIPA, MHMDA, TCPA, VPPA.
17
+
18
+ Also note **Texas and Nebraska have no revenue or volume threshold** — they apply to anyone doing business in-state who is not an SBA "small business", and even exempt small businesses may not sell sensitive personal data without consent **[V]**.
19
+
20
+ **Practical answer:** a US indie app under ~25k users in any single state usually falls outside the comprehensive laws — and is still fully exposed to everything in categories 1–4.
21
+
22
+ ---
23
+
24
+ ## 1. State comprehensive privacy laws
25
+
26
+ **In force in 2026: 20 states** (CA, VA, CO, CT, UT, TX, OR, MT, IA, DE, NE, NH, NJ, TN, MN, MD, IN, KY, RI, and Florida's narrower law which applies only above $1B revenue) **[V]**. Enforcement is AG-only; penalties commonly $7,500–$10,000 per violation **[V]**. Cure periods are expiring across states **[S]**.
27
+
28
+ Thresholds range from 25,000 consumers (Montana) to 175,000 (Tennessee); 10,000 consumers where a share of revenue comes from selling data (RI, DE, NH, MD); Maryland pairs a 35,000-consumer threshold with the strictest data-minimisation and sensitive-data rules, and bans the sale of sensitive data outright **[V]**.
29
+
30
+ **Universal opt-out / Global Privacy Control — the cheapest high-value engineering task.** As of 1 Jan 2026, twelve states require honouring it (CA, CO, CT, DE, MD, MN, MT, NE, NH, NJ, OR, TX); Virginia-template states do not **[V]**.
31
+
32
+ ```
33
+ Read the Sec-GPC: 1 request header and navigator.globalPrivacyControl.
34
+ Treat as an opt-out of sale/share + targeted advertising.
35
+ Apply BEFORE firing any ad pixel. Persist server-side against the user/device.
36
+ Disclose signal handling in the privacy notice.
37
+ ```
38
+ Honouring GPC for **every** visitor is the safe default: it satisfies the strictest state and violates none **[V]**.
39
+
40
+ **Why an ordinary ad pixel triggers everything.** "Sale" requires no money — any disclosure for other valuable consideration counts — and "sharing" expressly covers cross-context behavioural advertising **[V]**. Meta Pixel, GA4 with ad features, TikTok, Reddit and LinkedIn tags are a sale/share/targeted ad in nearly every state. Build: a tag inventory, consent-gated loading, and an opt-out that actually severs the pixel rather than filing a form.
41
+
42
+ **Sensitive data requires opt-in** in Virginia-model states (precise geolocation, race, religion, health, sex life/orientation, immigration status, biometrics, genetic data, children's data) **[V]**. California instead grants a right to limit use.
43
+
44
+ **Minors:** opt-in for targeted ads, sale, and profiling for known 13–16 year-olds; Maryland extends to under-18 on a "should have known" standard **[V]**.
45
+
46
+ **Rights and timing:** access, delete, correct, portability, opt-out, non-discrimination. **45 days, extendable by 45** **[V]**. Virginia-model states require an **appeal** mechanism. California requires two intake methods. Never identity-verify an opt-out — verification is for access/deletion.
47
+
48
+ **Notice content:** categories collected/sources/purposes/recipients, sensitive-data uses, **retention periods per category** (California), rights and how to exercise them, opt-out-signal handling, appeal process, contact, and a last-updated date with an annual refresh **[V]**.
49
+
50
+ **Assessments:** written data-protection assessments required in most Virginia-model states for targeted advertising, sale, sensitive data, and risky profiling; retained and producible to the AG **[V]**.
51
+
52
+ ---
53
+
54
+ ## 2. California specifics
55
+
56
+ **Applicability:** for-profit doing business in CA meeting any one of — annual gross revenue over ~$26.6M (CPI-adjusted), buying/selling/sharing PI of 100,000+ CA consumers or households a year, or 50%+ of revenue from selling/sharing PI **[V]**. Penalties per violation with a higher tier for intentional violations or those involving minors. **Consumers may sue only over certain breaches** ($107–$799 per consumer per incident) — there is no general PRA for policy or opt-out-link failures **[V]**.
57
+
58
+ **2026 regulations package (effective 1 Jan 2026)** **[V]**:
59
+ - *Risk assessments* — begin 1 Jan 2026, complete for ongoing activities by 31 Dec 2027, first certified reports 1 Apr 2028. Triggered by sensitive PI, targeted ads to minors, ADMT for significant decisions, or training ADMT.
60
+ - *ADMT* — pre-use notice, access, and opt-out for automated decision-making about significant decisions (including employees, contractors, applicants). **Compliance deadline 1 Jan 2027.**
61
+ - *Cyber audits* — only above revenue plus scale thresholds; first certifications from 2028. A pre-revenue startup is out of scope.
62
+
63
+ **Delete Act / DROP** — if you sell PI of consumers you have no direct relationship with, you are a data broker. **No revenue threshold.** Registration plus, **from 1 Aug 2026**, processing consumer deletion requests through the state mechanism every 45 days with downstream deletion directives; per-day penalties apply whether or not you registered **[V]**. Enforcement has already hit companies of exactly this size. Ask at design review: *do we sell PI of people who never used us?*
64
+
65
+ **Breach notice (SB 446)** — since 1 Jan 2026, notify affected California residents within **30 calendar days** of discovery, and report to the AG within **15 calendar days** of notifying individuals **[V]**.
66
+
67
+ **AI transparency (SB 942 as amended by AB 853)** — covered providers are generative-AI systems with **over 1M monthly users**; duties operative 2 Aug 2026, with hosting-platform duties from 1 Jan 2027 **[V]**. Most small devs are out of scope, but the hosting-platform duty catches anyone distributing GenAI systems.
68
+
69
+ **AB 2013 training-data transparency** — **no size threshold**. Developers of generative AI systems made available to Californians must publish training-data documentation; compliance required from 1 Jan 2026 and on substantial modification **[V]**. Catches small fine-tuners, not mere API consumers.
70
+
71
+ **SB 243 companion chatbots — the highest-risk new law for small AI apps.** Effective 1 Jan 2026. Applies to chatbots sustaining a relationship or human-like emotional engagement (excludes customer-service bots, limited game NPCs, voice assistants). Requires non-human disclosure, mental-health crisis protocols, and minor protections including blocking sexual content and enforcing breaks. **PRA: YES** — minimum $1,000 damages plus fees, and UCL pairing can reach individuals personally **[V]**.
72
+
73
+ **Employment ADS regulations** under state anti-discrimination law add notice and recordkeeping duties for automated decision systems **[S]**.
74
+
75
+ ---
76
+
77
+ ## 3. Children and teens
78
+
79
+ **COPPA amended Rule — full compliance date 22 Apr 2026** **[V]**. Trigger: a child-directed service, or actual knowledge of collecting personal information from under-13s. Mixed-audience services may age-screen. Concrete changes:
80
+
81
+ - **Separate** verifiable parental consent for disclosing children's data to third parties (including for targeted advertising).
82
+ - New **data-retention limits** and a **published written retention policy** — indefinite retention is prohibited.
83
+ - Broader definition of personal information now expressly including **biometric identifiers** (face templates, fingerprints, voiceprints), government identifiers, phone numbers, audio recordings, and certain geolocation.
84
+ - A written children's information security programme with vendor due diligence.
85
+ - Parent review/deletion flows must cover biometric data.
86
+
87
+ **App Store Accountability Acts (TX, UT, LA, AL, CA)** — these impose duties on **app developers**, not just the stores **[V]**. Texas SB 2420 is in effect after appellate and Supreme Court refusals to freeze it (which is not a ruling on constitutionality) **[V]**; Utah developer requirements from 6 May 2026; Louisiana 1 July 2026; California 1 Jan 2027 **[V]**. Build: consume the store's age-signal API, branch features on age category, store only a category flag, re-request consent on significant app changes. Some states allow private suits.
88
+
89
+ **NY SAFE for Kids** — final rules July 2026, effective **25 Jan 2027**, targeting platforms with addictive feeds **[V]**.
90
+
91
+ **Adult content age verification** — 26 states with live laws following the 2025 Supreme Court decision upholding Texas's law **[V]**. Typical trigger is ≥1/3 sexual material harmful to minors, a few with no threshold. Use a third-party verifier returning a boolean; retain nothing reconstructable; geo-route per state. Several states allow private suits.
92
+
93
+ **TAKE IT DOWN Act §3 (NCII) — enforced from 19 May 2026, and it reaches tiny platforms** **[V]**. Any site, app or service that hosts user content must publish a plain-language notice-and-removal process usable by **users and non-users**, and remove reported non-consensual intimate imagery — including AI-generated — plus known identical copies **within 48 hours**. Non-compliance is trivially detectable: a regulator just checks whether the notice exists. Build `/report/ncii`, an acknowledgement + 48h SLA timer, hash-based re-upload suppression, and a footer link.
94
+
95
+ **CSAM reporting** — providers must report apparent child sexual abuse material to the national tipline as soon as reasonably possible after obtaining actual knowledge, with a **one-year preservation** duty; there is no general proactive monitoring mandate **[V]**. Register a point of contact, define an escalation path, and never re-transmit the material except to the tipline or law enforcement.
96
+
97
+ ---
98
+
99
+ ## 4. Health, biometric, genetic, location
100
+
101
+ **HIPAA usually does *not* cover a direct-to-consumer wellness app** — it reaches covered entities and their business associates. You become a business associate the moment you handle PHI *on behalf of* a covered entity, which requires a BAA, Security Rule compliance, and 60-day breach notice **[V]**. If you are not HIPAA, you are in the consumer-health-data regime below.
102
+
103
+ **Washington My Health My Data Act — the top small-company landmine.** **No revenue or volume threshold**, in effect since 2024 **[V]**. "Consumer health data" is defined broadly enough to include precise location that could indicate seeking health services. Requires a **standalone** consumer-health-data privacy policy at its own link, **separate consent for collection**, **separate consent for sharing**, and a **distinct signed authorisation to sell**, plus a geofencing prohibition and processor contracts. **PRA: YES**, via the state consumer-protection act, up to $7,500 per violation **[V]**. The first class action targeted an ordinary ad SDK collecting location. Any period tracker, fitness, mental-health, or symptom app — or anything collecting precise location — is squarely in scope. Nevada has a similar regime without a PRA **[V]**.
104
+
105
+ **Illinois BIPA** — see `lawsuit-vectors.md` §3. Required **before first capture**: written notice of collection and specific purpose, notice of the retention schedule and destruction guidelines, a **written release**, a publicly available retention/destruction policy, no profiting from biometrics, and reasonable-care storage **[V]**. Texas and Washington have AG-enforced analogues.
106
+
107
+ **Genetic data** — roughly 14 states require separate express consent per purpose and per disclosure; some allow private suits **[S]**. Treat raw DNA as opt-in-per-purpose and get counsel.
108
+
109
+ **Precise geolocation** — sensitive/opt-in in every Virginia-model state, and health-linked location is consumer health data **[V]**. Request coarse location by default; never ship precise location to ad SDKs.
110
+
111
+ **FTC Health Breach Notification Rule** — applies to non-HIPAA health apps that can draw data from multiple sources (e.g. platform health data plus user input). Critically, a "breach" includes an **unauthorised disclosure** — firing a health event to an ad pixel is itself reportable **[V]**. 500+ affected means notifying the regulator within 60 days.
112
+
113
+ ---
114
+
115
+ ## 5. AI laws
116
+
117
+ - **Colorado** — the original AI Act was delayed and then repealed/replaced with a narrower automated-decision framework; assume a scaled-back regime effective **1 Jan 2027** and verify the enrolled text before building **[U]**.
118
+ - **Texas TRAIGA** — effective 1 Jan 2026, reaching out-of-state developers whose AI is accessible to Texas users. Intent-based liability for AI that promotes self-harm, facilitates crime, discriminates, or produces prohibited deepfakes. AG-only with a 60-day cure; **safe harbour for documented NIST AI RMF-aligned compliance** **[V]**. Practical step for a small dev: a one-page RMF-aligned policy plus retained prompt/eval logs.
119
+ - **Illinois HB 3773** — from 1 Jan 2026, using AI with a discriminatory *effect* in employment violates the state human-rights act; intent is no defence **[V]**.
120
+ - **NYC Local Law 144** — annual independent bias audit plus published summary and candidate notice for automated employment decision tools used for NYC roles **[V]**.
121
+ - **Mental-health AI** — Illinois bans AI delivering mental-health treatment or clinical decisions outright; Nevada, Utah and Tennessee restrict or require disclosure; treat "AI therapist" as a **hard gate** **[V]**.
122
+ - **Companion chatbots** — California (PRA), New York (AG-only), Oregon (PRA, from 2027), Washington (from 2027) **[V]**. **Baseline build for any consumer LLM chat:** persistent non-human disclosure, self-harm detection with a crisis interstitial, minor-mode content restrictions and break reminders, retained incident logs.
123
+ - **Frontier-model laws** target training compute far beyond any small developer **[V]**.
124
+ - **Federal posture** — a December 2025 executive order seeks to weaken state AI regulation via litigation and funding conditions, with a DOJ task force operating from January 2026 **[V]**. Do **not** advise a user to ignore state AI law on this basis; the laws remain in force unless and until enjoined.
125
+
126
+ ---
127
+
128
+ ## 6. Cross-cutting federal
129
+
130
+ - **FTC Act §5** — any statement in your privacy policy, marketing page, app-store listing or in-app copy that is not literally true of your code is deception. Dark patterns in consent and cancellation flows are deception/unfairness; failure to maintain reasonable security is unfairness **[V]**. No federal PRA, but most state UDAP analogues have one.
131
+ - **Consumer Reviews and Testimonials Rule** — prohibits fake, incentivised-by-sentiment, and undisclosed insider reviews, with civil penalties in the tens of thousands per violation; enforcement is active **[V]**.
132
+ - **Negative option / click-to-cancel** — the federal rule was vacated in 2025 and a new rulemaking is under way **[V]**. Do not tell a user they are safe: ROSCA and ~25 state auto-renewal laws still govern, and California's amended law broadened liability **[V]**.
133
+ - **TCPA** — see `lawsuit-vectors.md` §4. Consent records, revocation handling on any channel, quiet hours in the recipient's timezone, DNC scrubbing, carrier campaign registration **[V]**. Exact effective dates of the universal-revocation mandate are reported inconsistently **[U]**.
134
+ - **CAN-SPAM** — accurate headers and subject, advertising identification, **valid physical postal address**, working opt-out honoured within **10 business days** and functional for 30 days after send; you are liable for your sending platform and affiliates **[V]**.
135
+ - **State breach notification** — all states; deadlines and AG-notice thresholds vary; several sector rules add shorter clocks **[V]**.
136
+ - **ADA accessibility** — Title II has fixed rule deadlines for public entities; Title III private-business exposure is driven by private litigation rather than a technical rule **[V]**. WCAG 2.1 AA is the practical benchmark.
137
+ - **GLBA Safeguards Rule** — "financial institution" is far broader than banks and catches many fintech, lending, tax-prep and advisory products: written InfoSec programme, a named qualified individual, MFA, encryption, vendor oversight, and 30-day regulator notice for larger incidents **[V]**.
138
+ - **FCRA** — if you assemble or use consumer reports for employment, tenant, credit or insurance decisions: permissible purpose, **standalone** disclosure plus authorisation, pre-adverse-action packet with a waiting period, adverse-action notice. **PRA: YES**, with heavy class-action volume over standalone-disclosure defects **[V]**.
139
+ - **ECOA/Reg B and FHA** — adverse-action notices with **specific principal reasons** within 30 days. A black-box model that cannot articulate reasons is itself the violation **[V]**. **PRA: YES.**
140
+
141
+ ---
142
+
143
+ ## 7. PRA ranking — what actually produces suits against small companies
144
+
145
+ 1. California CIPA (trackers, pixels, chat widgets, session replay) — $5,000 per violation, no threshold **[V]**
146
+ 2. ADA Title III accessibility (plus state statutory damages) **[V]**
147
+ 3. TCPA/SMS — $500–$1,500 per message, uncapped **[V]**
148
+ 4. Illinois BIPA — per-person statutory damages, a single in-state user suffices **[V]**
149
+ 5. Washington MHMDA — up to $7,500 per violation, extremely broad health-data definition **[V]**
150
+ 6. Auto-renewal claims via state consumer statutes **[V]**
151
+ 7. CCPA breach claims — $107–$799 per consumer, filed reflexively after AG breach reports **[V]**
152
+ 8. California SB 243 companion chatbots — new, untested, minimum $1,000 plus fees **[V]**
153
+ 9. VPPA — video plus ad pixel, $2,500 per person, circuit split **[U]**
154
+ 10. FCRA — standalone-disclosure defects **[V]**
155
+ 11. State wiretap analogues beyond California **[U]** on the exact state list
156
+ 12. AI employment discrimination — low volume today, rising **[S]**
157
+
158
+ **Regulator-only (no PRA):** every state comprehensive privacy law except California's breach claim, COPPA, TAKE IT DOWN, TRAIGA, frontier-model laws, SB 942, NYC LL144, Nevada health law, the Delete Act, GLBA, CAN-SPAM, and FTC rules.
159
+
160
+ ---
161
+
162
+ ## 8. Verify before relying
163
+
164
+ Colorado's replacement AI law text and date · Vermont and Nebraska children's-code dates · the TCPA universal-revocation effective date · VPPA scope · state mini-TCPA and mini-wiretap lists · genetic-privacy specifics per state · SaaS sales-tax nexus.
@@ -26,6 +26,37 @@ describe("skill routing prompts", () => {
26
26
  expect(tool.description).toContain("matches its scope");
27
27
  expect(tool.description).toContain("respect explicit exclusions");
28
28
  });
29
+ it("counterbalances invocation pressure in both routing surfaces", () => {
30
+ // Every pro-invocation instruction needs a brake, or topic overlap alone
31
+ // pulls a skill in and burns context on work it would not change. The
32
+ // brake lives here rather than in each skill's description, so it also
33
+ // covers third-party skills written to maximize their own invocation.
34
+ const prompt = formatSkillsForPrompt([skill]);
35
+ expect(prompt).toContain("Match the work, not the topic");
36
+ expect(prompt).toContain("Skip the skill when the task is routine");
37
+ expect(prompt).toContain("Invoke at most one skill");
38
+ expect(prompt).toContain("do not re-invoke a skill");
39
+ const tool = createSkillTool([skill]);
40
+ expect(tool.description).toContain("Match the work rather than the topic");
41
+ expect(tool.description).toContain("skip it for routine or narrow changes");
42
+ expect(tool.description).toContain("do not re-invoke a skill already loaded");
43
+ });
44
+ it("gives every bundled skill an explicit exclusion clause", async () => {
45
+ const root = await fs.mkdtemp(path.join(os.tmpdir(), "bundled-skills-"));
46
+ try {
47
+ const skills = await discoverSkills({ globalSkillsDir: path.join(root, "global") });
48
+ const bundled = skills.filter((candidate) => candidate.source === "bundled");
49
+ expect(bundled.length).toBeGreaterThan(0);
50
+ for (const candidate of bundled) {
51
+ // A description that only says when to fire has no off switch, and the
52
+ // model resolves ambiguity by invoking.
53
+ expect(candidate.description, `${candidate.name} lacks an exclusion`).toMatch(/Do NOT use|Exclude|excluding/i);
54
+ }
55
+ }
56
+ finally {
57
+ await fs.rm(root, { recursive: true, force: true });
58
+ }
59
+ });
29
60
  it("keeps loaded skill instructions below project and file/module rules", async () => {
30
61
  const tool = createSkillTool([skill]);
31
62
  const result = await tool.execute({ skill: skill.name }, { signal: new AbortController().signal, toolCallId: "test" });
@@ -48,6 +79,71 @@ describe("skill routing prompts", () => {
48
79
  await fs.rm(root, { recursive: true, force: true });
49
80
  }
50
81
  });
82
+ it("discovers compliance-guard for a fresh user from bundled assets", async () => {
83
+ const root = await fs.mkdtemp(path.join(os.tmpdir(), "bundled-skills-"));
84
+ try {
85
+ const skills = await discoverSkills({ globalSkillsDir: path.join(root, "global") });
86
+ const complianceSkill = skills.find((candidate) => candidate.name === "compliance-guard");
87
+ expect(complianceSkill?.source).toBe("bundled");
88
+ expect(complianceSkill?.root).toContain(path.join("assets", "skills", "compliance-guard"));
89
+ expect(complianceSkill?.content).toContain("# Compliance Guard");
90
+ // The skill must never present itself as legal advice or certification.
91
+ expect(complianceSkill?.content).toContain("Never certify");
92
+ // A beginner will half-answer or ignore the intake questions, so the
93
+ // defaults ARE the analysis. Promising defaults without stating them
94
+ // lets the model invent a quieter reading than the user deserves.
95
+ expect(complianceSkill?.content).toContain("Default if unanswered");
96
+ expect(complianceSkill?.content).toContain("the cautious reading");
97
+ // Findings a novice cannot act on produce no fixes.
98
+ expect(complianceSkill?.content).toContain("never read a statute");
99
+ // Reading code shows intent; running it shows what ships. A review that
100
+ // asserts from grep alone misses runtime-injected tags entirely, and a
101
+ // fix reported without verification is worse than the original finding.
102
+ // Two-state "observed/inferred" was read as visible-in-code vs deduced,
103
+ // not ran vs read, so a static review reported itself as verified.
104
+ expect(complianceSkill?.content).toContain("RUNTIME");
105
+ expect(complianceSkill?.content).toContain("DEDUCED");
106
+ expect(complianceSkill?.content).toContain("Never relabel upward");
107
+ expect(complianceSkill?.content).toContain("Never report a fix you did not verify");
108
+ // Narrative review silently drops the boring blockers; the sweep is what
109
+ // turns "did I notice it" into "did I check it".
110
+ expect(complianceSkill?.content).toContain("coverage ledger");
111
+ // An item never written down is an item never checked: evaluation showed
112
+ // blockers 1 and 2 dropped while dramatic findings were reported.
113
+ expect(complianceSkill?.content).toContain("one row per numbered item");
114
+ // Audience and product claims live in prose, not in the schema.
115
+ expect(complianceSkill?.content).toContain("Read the prose, not only the code");
116
+ // Held-out evaluation: the code sweep reliably missed obligations that
117
+ // arise from the product model or from two facts combined, and it
118
+ // downgraded unlicensed-activity gates to BLOCKER.
119
+ expect(complianceSkill?.content).toContain("second pass on the product model");
120
+ expect(complianceSkill?.content).toContain("Severity rule for licensed activities");
121
+ // Held-out evaluation: the review named the first instantiation of a duty
122
+ // it thought of (DMCA, auto-renewal) and never reached the EU equivalent
123
+ // (DSA, withdrawal rights) for an EU-established company.
124
+ expect(complianceSkill?.content).toContain("Name every jurisdiction's version");
125
+ // Mandatory coverage lived only in the ledger, so a findings-only output
126
+ // format silently dropped it. Coverage must belong to the findings.
127
+ expect(complianceSkill?.content).toContain("coverage survives the output format");
128
+ // A prohibition reported as a disclosure duty authorises the banned
129
+ // feature; and leading with the wrong jurisdiction sends the user to the
130
+ // wrong kind of lawyer. Both were observed in evaluation runs.
131
+ expect(complianceSkill?.content).toContain("Check for an outright ban");
132
+ expect(complianceSkill?.content).toContain("Lead with the jurisdiction");
133
+ // A point-in-time register rots; a failing test does not.
134
+ expect(complianceSkill?.content).toContain("leave the check behind");
135
+ // Every referenced file must exist, since the skill routes the model to them by path.
136
+ const referenced = [...complianceSkill.content.matchAll(/`(references\/[\w.-]+\.md)`/g)].map((match) => match[1]);
137
+ expect(referenced.length).toBeGreaterThan(0);
138
+ const skillRoot = complianceSkill?.root ?? "";
139
+ for (const relative of new Set(referenced)) {
140
+ await expect(fs.access(path.join(skillRoot, ...relative.split("/")))).resolves.toBeUndefined();
141
+ }
142
+ }
143
+ finally {
144
+ await fs.rm(root, { recursive: true, force: true });
145
+ }
146
+ });
51
147
  it("lets project skills override global and bundled definitions by name", async () => {
52
148
  const root = await fs.mkdtemp(path.join(os.tmpdir(), "skill-precedence-"));
53
149
  const globalSkillsDir = path.join(root, "global");
@@ -1 +1 @@
1
- {"version":3,"file":"skills-routing.test.js","sourceRoot":"","sources":["../../src/core/skills-routing.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAc,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,KAAK,GAAU;IACnB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,8CAA8C;IAC3D,OAAO,EAAE,2BAA2B;IACpC,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,yBAAyB;CAChC,CAAC;AAEF,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;QAC5D,MAAM,MAAM,GAAG,qBAAqB,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QAE9C,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,yDAAyD,CAAC,CAAC;QACpF,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,C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EAAE;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAiBnB;AAuDD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CA0BtE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAc7D"}
1
+ {"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/core/skills.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAiBnB;AAuDD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CA0BtE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAiB7D"}
@@ -125,6 +125,9 @@ export function formatSkillsForPrompt(skills) {
125
125
  `Before acting, compare the user's request with every skill description below. ` +
126
126
  `When the request matches a skill's stated scope, invoke that skill with the **skill** tool before making decisions or edits. ` +
127
127
  `Respect explicit exclusions in the description. Matching skill instructions specialize this prompt but do not override project or file/module rules.\n\n` +
128
+ `Match the work, not the topic: a skill's subject matter appearing in the request is not a match when the actual change falls outside its scope. ` +
129
+ `Skip the skill when the task is routine, narrow, or already covered by existing patterns in the codebase \u2014 an unnecessary invocation costs context and slows the task. ` +
130
+ `Invoke at most one skill unless the task genuinely spans two, and do not re-invoke a skill whose instructions are already in this conversation.\n\n` +
128
131
  list);
129
132
  }
130
133
  //# sourceMappingURL=skills.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/core/skills.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAChE,MAAM,mBAAmB,GAAG;IAC1B,sEAAsE;IACtE,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC;IAClC,yDAAyD;IACzD,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,qBAAqB,CAAC;CAChD,CAAC;AAWF;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,OAGpC;IACC,MAAM,YAAY,GAAG,IAAI,GAAG,EAAiB,CAAC;IAC9C,MAAM,SAAS,GAAG,CAAC,MAAe,EAAQ,EAAE;QAC1C,KAAK,MAAM,KAAK,IAAI,MAAM;YAAE,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,CAAC;IAChF,CAAC,CAAC;IAEF,2EAA2E;IAC3E,wDAAwD;IACxD,SAAS,CAAC,MAAM,iBAAiB,EAAE,CAAC,CAAC;IACrC,SAAS,CAAC,MAAM,iBAAiB,CAAC,OAAO,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEtE,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;QACvB,M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,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;SACzE,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO,CACL,eAAe;QACf,gFAAgF;QAChF,+HAA+H;QAC/H,0JAA0J;QAC1J,kJAAkJ;QAClJ,8KAA8K;QAC9K,qJAAqJ;QACrJ,IAAI,CACL,CAAC;AACJ,CAAC"}
@@ -37,7 +37,8 @@ function generateSkillDescription(skills) {
37
37
  .map((s) => `- **${s.name}**: ${s.description || "No description"}`)
38
38
  .join("\n");
39
39
  return (`Invoke a skill by name to get specialized instructions for a task. ` +
40
- `Before acting, invoke a skill when the request matches its scope and respect explicit exclusions.\n\n` +
40
+ `Before acting, invoke a skill when the request matches its scope and respect explicit exclusions. ` +
41
+ `Match the work rather than the topic, skip it for routine or narrow changes, and do not re-invoke a skill already loaded in this conversation.\n\n` +
41
42
  `Available skills:\n${list}`);
42
43
  }
43
44
  //# sourceMappingURL=skill.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skill.js","sourceRoot":"","sources":["../../src/tools/skill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAC7D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;CACpF,CAAC,CAAC;AAEH,MAAM,UAAU,eAAe,CAAC,MAAe;IAC7C,uEAAuE;IACvE,qEAAqE;IACrE,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC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AAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACvD,OAAO,iBAAiB,KAAK,CAAC,KAAK,kCAAkC,SAAS,IAAI,MAAM,EAAE,CAAC;YAC7F,CAAC;YAED,MAAM,KAAK,GAAG,CAAC,wBAAwB,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC;YACvD,IAAI,KAAK,CAAC,IAAI;gBAAE,KAAK,CAAC,IAAI,CAAC,yBAAyB,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YAClE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;YAC9C,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;gBACf,KAAK,CAAC,IAAI,CAAC,mBAAmB,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YAC9C,CAAC;YACD,KAAK,CAAC,IAAI,CACR,yLAAyL,CAC1L,CAAC;YACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,wBAAwB,CAAC,MAAe;IAC/C,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,4DAA4D,CAAC;IACtE,CAAC;IAED,MAAM,IAAI,GAAG,MAAM;SAChB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,WAAW,IAAI,gBAAgB,EAAE,CAAC;SACnE,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO,CACL,qEAAqE;QACrE,oGAAoG;QACpG,oJAAoJ;QACpJ,sBAAsB,IAAI,EAAE,CAC7B,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kenkaiiii/ggcoder",
3
- "version": "5.39.4",
3
+ "version": "5.40.0",
4
4
  "type": "module",
5
5
  "description": "CLI coding agent with OAuth authentication for Anthropic, OpenAI, and Gemini",
6
6
  "license": "MIT",
@@ -115,9 +115,9 @@
115
115
  "typescript-language-server": "^5.3.0",
116
116
  "wrap-ansi": "^10.0.0",
117
117
  "zod": "^4.4.3",
118
- "@kenkaiiii/gg-ai": "5.39.4",
119
- "@kenkaiiii/gg-agent": "5.39.4",
120
- "@kenkaiiii/gg-core": "5.39.4"
118
+ "@kenkaiiii/gg-agent": "5.40.0",
119
+ "@kenkaiiii/gg-ai": "5.40.0",
120
+ "@kenkaiiii/gg-core": "5.40.0"
121
121
  },
122
122
  "optionalDependencies": {
123
123
  "@huggingface/transformers": "^3.6.0",