@ericrisco/rsc 4.1.11 → 4.2.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.
- package/manifest.json +6 -6
- package/package.json +2 -1
- package/scripts/lib/prompt-audit.js +110 -0
- package/scripts/prompt-audit.js +48 -0
- package/skills/ads/SKILL.md +7 -7
- package/skills/agent-safety/SKILL.md +1 -1
- package/skills/asdd/SKILL.md +2 -2
- package/skills/asdd/references/model-routing.md +5 -5
- package/skills/astro/SKILL.md +1 -1
- package/skills/astro/scripts/verify.sh +1 -1
- package/skills/author-skill/SKILL.md +5 -5
- package/skills/author-skill/references/eval-authoring.md +6 -7
- package/skills/automation-flows/SKILL.md +1 -1
- package/skills/building-agents/SKILL.md +17 -12
- package/skills/building-agents/references/agent-loops-and-harness.md +3 -2
- package/skills/building-agents/references/evals-and-observability.md +7 -5
- package/skills/building-agents/references/provider-abstraction.md +31 -30
- package/skills/chrome-extension/SKILL.md +1 -1
- package/skills/cold-outreach/SKILL.md +1 -1
- package/skills/cold-outreach/references/templates.md +7 -3
- package/skills/compliance/SKILL.md +8 -8
- package/skills/compliance/evals/README.md +1 -1
- package/skills/compliance/evals/cases.yaml +2 -2
- package/skills/compliance/references/frameworks.md +7 -7
- package/skills/content-engine/SKILL.md +1 -1
- package/skills/cost-tracking/SKILL.md +29 -21
- package/skills/cost-tracking/references/pricing-tables.md +6 -5
- package/skills/course-builder/SKILL.md +4 -3
- package/skills/course-builder/references/outcomes-and-blooms.md +1 -1
- package/skills/course-storytelling/SKILL.md +1 -1
- package/skills/course-storytelling/references/concept-landing-recipe.md +1 -1
- package/skills/csharp-dotnet/SKILL.md +2 -2
- package/skills/data-policy/SKILL.md +1 -1
- package/skills/db-migrations/SKILL.md +6 -5
- package/skills/deep-learning/SKILL.md +2 -2
- package/skills/deployment/SKILL.md +1 -1
- package/skills/deployment/references/dockerfiles-by-stack.md +1 -1
- package/skills/design/engine/RUN.md +1 -1
- package/skills/django/SKILL.md +1 -1
- package/skills/docker/SKILL.md +1 -1
- package/skills/document-processing/SKILL.md +2 -1
- package/skills/electron/SKILL.md +2 -1
- package/skills/email-connector/SKILL.md +2 -1
- package/skills/email-deliverability/SKILL.md +2 -2
- package/skills/embeddings-search/SKILL.md +3 -3
- package/skills/error-handling/SKILL.md +4 -2
- package/skills/expo/SKILL.md +1 -1
- package/skills/fable-operator/SKILL.md +2 -2
- package/skills/fal/SKILL.md +1 -1
- package/skills/fastapi/SKILL.md +18 -9
- package/skills/fastapi/references/database.md +19 -10
- package/skills/finance-ops/SKILL.md +1 -1
- package/skills/firebase/SKILL.md +1 -1
- package/skills/flutter/SKILL.md +1 -1
- package/skills/forecasting/SKILL.md +1 -1
- package/skills/forecasting/references/accuracy-and-backtesting.md +1 -1
- package/skills/forecasting/references/methods-cheatsheet.md +3 -3
- package/skills/ftd/SKILL.md +2 -3
- package/skills/fundraising/references/funnel-math.md +1 -1
- package/skills/gamedev-multiplayer/SKILL.md +2 -2
- package/skills/gamedev-multiplayer/references/unity-and-unreal-netcode.md +4 -4
- package/skills/gamedev-pathing/SKILL.md +1 -1
- package/skills/gamedev-physics/SKILL.md +3 -2
- package/skills/gamedev-physics/references/character-controllers.md +1 -1
- package/skills/gamedev-shaders/SKILL.md +2 -4
- package/skills/gamedev-shipping/SKILL.md +8 -5
- package/skills/gamedev-shipping/references/mobile-and-desktop.md +7 -3
- package/skills/gdpr-privacy/references/dpa-and-transfers.md +1 -1
- package/skills/git-workflow/SKILL.md +3 -3
- package/skills/go/SKILL.md +3 -3
- package/skills/harness/SKILL.md +4 -3
- package/skills/harness/references/daily-curation-automation.md +1 -1
- package/skills/harness/references/providers.yaml +4 -4
- package/skills/harness/references/wiki-protocol.md +2 -1
- package/skills/hiring/SKILL.md +3 -3
- package/skills/htmx/SKILL.md +4 -4
- package/skills/htmx/references/server-contract.md +2 -2
- package/skills/implement/SKILL.md +3 -3
- package/skills/init/SKILL.md +2 -3
- package/skills/init/references/accompaniment-and-profile.md +1 -1
- package/skills/init/references/recommend-skills.md +9 -9
- package/skills/invoicing/SKILL.md +8 -7
- package/skills/java/SKILL.md +3 -2
- package/skills/knowledge-ops/SKILL.md +3 -4
- package/skills/knowledge-ops/references/gardening-playbook.md +3 -3
- package/skills/kotlin-android/SKILL.md +10 -3
- package/skills/kotlin-android/references/gradle-setup.md +1 -4
- package/skills/landing-copy/SKILL.md +1 -1
- package/skills/laravel/SKILL.md +11 -11
- package/skills/lead-gen/SKILL.md +3 -3
- package/skills/linkedin-api/SKILL.md +1 -1
- package/skills/linkedin-api/references/api-reference.md +1 -1
- package/skills/linkedin-content/SKILL.md +1 -1
- package/skills/linkedin-outreach/SKILL.md +4 -4
- package/skills/linkedin-strategy/SKILL.md +2 -2
- package/skills/llm-pipeline/SKILL.md +2 -2
- package/skills/llm-pipeline/references/litellm-router.md +3 -3
- package/skills/logistics-ops/SKILL.md +6 -1
- package/skills/marketing/SKILL.md +1 -1
- package/skills/marketing/references/seo-geo.md +2 -2
- package/skills/mongodb/SKILL.md +3 -2
- package/skills/mongodb/references/aggregation.md +3 -2
- package/skills/mysql/SKILL.md +1 -1
- package/skills/mysql/references/mysql-vs-mariadb.md +1 -1
- package/skills/n8n/SKILL.md +1 -1
- package/skills/nextjs/SKILL.md +1 -1
- package/skills/observability/SKILL.md +1 -1
- package/skills/observability/references/instrumentation-recipes.md +1 -1
- package/skills/ollama/SKILL.md +1 -1
- package/skills/open-weights/SKILL.md +3 -4
- package/skills/orient/SKILL.md +4 -3
- package/skills/parallel/SKILL.md +1 -1
- package/skills/planetscale/SKILL.md +3 -3
- package/skills/planetscale/references/no-foreign-keys.md +3 -3
- package/skills/postgresdb/SKILL.md +4 -4
- package/skills/presentations/SKILL.md +1 -1
- package/skills/prompt-engineering/SKILL.md +6 -6
- package/skills/prompt-engineering/evals/cases.yaml +2 -2
- package/skills/prompt-engineering/references/output-contracts.md +18 -23
- package/skills/rag/references/pipeline.md +7 -5
- package/skills/review/SKILL.md +4 -4
- package/skills/roast-me/prompts/compute.md +5 -5
- package/skills/roast-me/prompts/roast.md +2 -2
- package/skills/sdd-init/SKILL.md +3 -3
- package/skills/ship/SKILL.md +7 -9
- package/skills/shopify/SKILL.md +6 -6
- package/skills/shopify/references/apps-graphql.md +3 -3
- package/skills/skill-scout/SKILL.md +1 -1
- package/skills/specify/SKILL.md +3 -3
- package/skills/specify/references/eliciting-requirements.md +3 -3
- package/skills/structured-extraction/SKILL.md +7 -3
- package/skills/structured-extraction/references/providers.md +8 -5
- package/skills/svelte/SKILL.md +1 -1
- package/skills/swift-ios/SKILL.md +4 -4
- package/skills/tasks/SKILL.md +1 -1
- package/skills/tauri/SKILL.md +4 -3
- package/skills/terms-conditions/SKILL.md +2 -2
- package/skills/translation-l10n/SKILL.md +2 -1
- package/skills/typescript/SKILL.md +5 -4
- package/skills/typescript/references/build-and-monorepo.md +2 -2
- package/skills/unslop/SKILL.md +1 -1
- package/skills/ux/SKILL.md +1 -1
- package/skills/vercel/SKILL.md +3 -2
- package/skills/vercel/references/vercel-json.md +8 -5
- package/skills/verify/SKILL.md +3 -3
- package/skills/vllm/SKILL.md +4 -2
- package/skills/vue-nuxt/SKILL.md +5 -5
- package/skills/webhooks/SKILL.md +10 -1
- package/skills/worktrees/SKILL.md +10 -8
- package/skills/youtube-ideation/SKILL.md +1 -1
- package/targets/agents.js +26 -17
- package/targets/commands.js +7 -7
package/skills/electron/SKILL.md
CHANGED
|
@@ -133,7 +133,8 @@ import { contextBridge, ipcRenderer } from 'electron';
|
|
|
133
133
|
contextBridge.exposeInMainWorld('api', {
|
|
134
134
|
readConfig: () => ipcRenderer.invoke('config:read'),
|
|
135
135
|
saveNote: (text: string) => ipcRenderer.invoke('note:save', text),
|
|
136
|
-
onSync: (cb: () => void) =>
|
|
136
|
+
onSync: (cb: (...args: unknown[]) => void) =>
|
|
137
|
+
ipcRenderer.on('sync:done', (_e, ...args) => cb(...args)), // events: send/on; never hand the event (its .sender) to the renderer
|
|
137
138
|
});
|
|
138
139
|
```
|
|
139
140
|
|
|
@@ -256,7 +256,8 @@ export async function POST(req: Request) {
|
|
|
256
256
|
|
|
257
257
|
```ts
|
|
258
258
|
// Before any send: skip suppressed addresses
|
|
259
|
-
const
|
|
259
|
+
const suppressed = await Promise.all(candidates.map((e) => db.suppressions.has(e)));
|
|
260
|
+
const recipients = candidates.filter((_, i) => !suppressed[i]); // filter() ignores a Promise: resolve first
|
|
260
261
|
```
|
|
261
262
|
|
|
262
263
|
Generic webhook hardening (replay windows, queueing, retries beyond email) is
|
|
@@ -33,8 +33,8 @@ and lose fast. Treat this as ops on a domain, not a code change.
|
|
|
33
33
|
## The three records that must align
|
|
34
34
|
|
|
35
35
|
SPF, DKIM, and DMARC are not three ways to do the same thing. DMARC is the
|
|
36
|
-
policy; it *passes*
|
|
37
|
-
the visible `From:` domain. Most "SPF is set but DMARC fails" tickets are an
|
|
36
|
+
policy; it *passes* when at least one of SPF or DKIM authenticates **and aligns**
|
|
37
|
+
with the visible `From:` domain. Most "SPF is set but DMARC fails" tickets are an
|
|
38
38
|
alignment miss, not a missing record.
|
|
39
39
|
|
|
40
40
|
| Record | What it asserts | Common break |
|
|
@@ -100,8 +100,8 @@ recall data says you should.
|
|
|
100
100
|
|
|
101
101
|
```python
|
|
102
102
|
# Asymmetric model: query and document use DIFFERENT input_type. Getting this wrong is silent.
|
|
103
|
-
q_vec = embed(text=user_question, input_type="search_query") # Cohere
|
|
104
|
-
d_vec = embed(text=passage, input_type="search_document")
|
|
103
|
+
q_vec = embed(text=user_question, input_type="search_query") # Cohere; Voyage: "query"
|
|
104
|
+
d_vec = embed(text=passage, input_type="search_document") # Voyage: "document"
|
|
105
105
|
# e5 / BGE convention is a textual prefix instead:
|
|
106
106
|
# query -> "query: how do refunds work"
|
|
107
107
|
# passage -> "passage: Refunds are processed within 14 days…"
|
|
@@ -173,7 +173,7 @@ flags hybrid/rerank artifacts that mention no recall/nDCG/MRR for exactly this r
|
|
|
173
173
|
| Anti-pattern | Why it bites | Do instead |
|
|
174
174
|
|---|---|---|
|
|
175
175
|
| Chunk size in characters | "512" means a different token count per language/model | Token-accurate count (`tiktoken`/model tokenizer) |
|
|
176
|
-
| Same `input_type` for query and document | Asymmetric models silently lose recall, no error | `search_query` vs `search_document` (or `query:`/`passage:`
|
|
176
|
+
| Same `input_type` for query and document | Asymmetric models silently lose recall, no error | `search_query` vs `search_document` (Cohere), `query` vs `document` (Voyage), or `query:`/`passage:` prefixes |
|
|
177
177
|
| Cosine model indexed/queried with L2 | Ranking is silently wrong | Match metric to model (cosine → `<=>`) |
|
|
178
178
|
| Add a reranker to fix bad recall | Reranker only reorders what retrieval returned | Fix recall (hybrid, chunking, model) first |
|
|
179
179
|
| No overlap on prose | Sentences cut mid-thought lose the answer | 10–20% overlap |
|
|
@@ -173,8 +173,10 @@ contained reaction. Place one at each level that can fail independently.
|
|
|
173
173
|
- **`global-error.tsx`** wraps the whole app and must render its own `<html>` and
|
|
174
174
|
`<body>` (it replaces the root layout when the root itself fails).
|
|
175
175
|
- **Boundaries only catch errors during *render*.** Errors in event handlers,
|
|
176
|
-
`async` callbacks, `setTimeout`, or
|
|
177
|
-
them — handle those with explicit `try/catch` + state.
|
|
176
|
+
`async` callbacks, `setTimeout`, or client-side fetches in effects are invisible
|
|
177
|
+
to them — handle those with explicit `try/catch` + state. An error thrown while a
|
|
178
|
+
Server Component renders (its data fetching included) does reach the nearest
|
|
179
|
+
`error.tsx`.
|
|
178
180
|
|
|
179
181
|
```tsx
|
|
180
182
|
"use client"; // app/dashboard/error.tsx — REQUIRED
|
package/skills/expo/SKILL.md
CHANGED
|
@@ -229,7 +229,7 @@ the fix is usually the plan, not the config. (Pricing per expo.dev/pricing, veri
|
|
|
229
229
|
| Testing a custom native module in Expo Go | Expo Go can't load arbitrary native code; build a dev client. |
|
|
230
230
|
| Upgrading the SDK and building straight to production | run `expo-doctor` + a preview build first; there is no Legacy-Arch fallback to catch a New-Arch-incompatible dep. |
|
|
231
231
|
| Setting `newArchEnabled: false` to dodge a broken native dep | the flag was removed in SDK 55 and the Legacy Architecture is gone; fix or replace the dep. |
|
|
232
|
-
| Committing the keystore so CI can sign | never; let EAS manage credentials or use EAS
|
|
232
|
+
| Committing the keystore so CI can sign | never; let EAS manage credentials or use EAS environment variables (secret visibility). |
|
|
233
233
|
| Putting the API key in `app.config` extra | app config ships in the public bundle; use EAS env vars / a backend. |
|
|
234
234
|
| Reaching for GitHub Actions to call `eas build` | EAS Workflows is the native CI; only reach for github-actions if explicitly required. |
|
|
235
235
|
|
|
@@ -19,7 +19,7 @@ Classify the request:
|
|
|
19
19
|
|
|
20
20
|
- **Casual** (conversation, taste, low-cost-if-wrong): answer directly, keep it short. Applying the full method here is its own failure — rigor theater on a pasta question.
|
|
21
21
|
- **Standard** (most technical questions, explanations, drafts): read the real request (§1), verify the load-bearing claim (§4), label the guesses (§5). Minutes, not ceremony.
|
|
22
|
-
- **Consequential** (the person will act on this and being wrong is expensive): the full method, including the adversarial pass (§
|
|
22
|
+
- **Consequential** (the person will act on this and being wrong is expensive): the full method, including the adversarial pass (§7) and the self-test.
|
|
23
23
|
- **Irreversible** (money moved, message sent, data deleted, health/legal decisions): full method, plus name the irreversibility out loud and make sure the person knows which claim the decision hinges on.
|
|
24
24
|
|
|
25
25
|
Stakes can escalate mid-task — a casual question that turns out to feed a real decision gets re-triaged, not grandfathered at casual.
|
|
@@ -93,7 +93,7 @@ When the task is "why is X happening" — a bug, an error, a slow query, a faili
|
|
|
93
93
|
1. **At least two hypotheses before touching anything.** If only one cause comes to mind, that's not diagnosis, that's recall — generate a second even if it feels forced. The forced one is right more often than comfortable.
|
|
94
94
|
2. **Seek the evidence that discriminates,** not the evidence that confirms. The right next test is the one whose outcome differs depending on which hypothesis is true. Evidence consistent with both hypotheses has taught you nothing, however satisfying it felt to collect.
|
|
95
95
|
3. **Reproduce before fixing, when possible.** A fix for a bug you never reproduced is a hypothesis wearing a fix's clothes — and "the error went away" after changing three things has confirmed nothing about which one mattered. Change one variable at a time.
|
|
96
|
-
4. **When the evidence kills the favorite, let it die.** Mid-investigation loyalty to hypothesis #1 is consistency loyalty (§
|
|
96
|
+
4. **When the evidence kills the favorite, let it die.** Mid-investigation loyalty to hypothesis #1 is consistency loyalty (§10) in its most expensive form.
|
|
97
97
|
|
|
98
98
|
*Prevents:* the confident wrong diagnosis — hours of the user's time spent fixing the cause that fit the pattern instead of the cause that fit the evidence.
|
|
99
99
|
|
package/skills/fal/SKILL.md
CHANGED
|
@@ -49,7 +49,7 @@ Rule: **never ship `FAL_KEY` to a browser bundle.** Proxy every call through you
|
|
|
49
49
|
|
|
50
50
|
## Pick a call mode
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
`subscribe` and `submit` go through the queue; `run` is a direct call that skips it. Choose by how long the job runs and where you call it from.
|
|
53
53
|
|
|
54
54
|
| Situation | Mode | Why |
|
|
55
55
|
| --- | --- | --- |
|
package/skills/fastapi/SKILL.md
CHANGED
|
@@ -83,7 +83,7 @@ from fastapi.middleware.cors import CORSMiddleware
|
|
|
83
83
|
|
|
84
84
|
from app.api.routers import health, users
|
|
85
85
|
from app.core.config import Settings, get_settings
|
|
86
|
-
from app.db.base import
|
|
86
|
+
from app.db.base import get_engine
|
|
87
87
|
from app.exceptions import register_exception_handlers
|
|
88
88
|
|
|
89
89
|
# Routers paired with their mount prefix + OpenAPI tag, declared once so the factory
|
|
@@ -99,7 +99,7 @@ async def lifespan(_app: FastAPI):
|
|
|
99
99
|
# Open pools/caches on startup (here), never at import time, so importing the module has
|
|
100
100
|
# no side effects (tests and Alembic import it freely).
|
|
101
101
|
yield
|
|
102
|
-
await
|
|
102
|
+
await get_engine().dispose() # release pooled DB connections so workers exit cleanly
|
|
103
103
|
|
|
104
104
|
|
|
105
105
|
def _install_cors(app: FastAPI, settings: Settings) -> None:
|
|
@@ -232,11 +232,11 @@ from typing import Annotated
|
|
|
232
232
|
from fastapi import Depends, Query
|
|
233
233
|
from sqlalchemy.ext.asyncio import AsyncSession
|
|
234
234
|
|
|
235
|
-
from app.db.base import
|
|
235
|
+
from app.db.base import get_sessionmaker
|
|
236
236
|
|
|
237
237
|
|
|
238
238
|
async def get_db() -> AsyncIterator[AsyncSession]:
|
|
239
|
-
session =
|
|
239
|
+
session = get_sessionmaker()()
|
|
240
240
|
try:
|
|
241
241
|
yield session
|
|
242
242
|
await session.commit() # commit only if the handler returned without raising
|
|
@@ -266,7 +266,7 @@ def get_pagination(
|
|
|
266
266
|
PageParams = Annotated[Pagination, Depends(get_pagination)]
|
|
267
267
|
```
|
|
268
268
|
|
|
269
|
-
→ [`references/database.md`](references/database.md) for
|
|
269
|
+
→ [`references/database.md`](references/database.md) for session-factory wiring; → [`references/security.md`](references/security.md)
|
|
270
270
|
for `get_current_user` and `require_roles`.
|
|
271
271
|
|
|
272
272
|
## Routers & endpoints
|
|
@@ -360,16 +360,25 @@ hierarchy in → [`references/production.md`](references/production.md) (AppErro
|
|
|
360
360
|
|
|
361
361
|
```python
|
|
362
362
|
from datetime import datetime
|
|
363
|
+
from functools import lru_cache
|
|
363
364
|
from uuid import UUID, uuid4
|
|
364
365
|
|
|
365
366
|
from sqlalchemy import func, select
|
|
366
|
-
from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine
|
|
367
|
+
from sqlalchemy.ext.asyncio import AsyncEngine, AsyncSession, async_sessionmaker, create_async_engine
|
|
367
368
|
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
|
|
368
369
|
|
|
369
370
|
from app.core.config import get_settings
|
|
370
371
|
|
|
371
|
-
|
|
372
|
-
|
|
372
|
+
|
|
373
|
+
@lru_cache
|
|
374
|
+
def get_engine() -> AsyncEngine:
|
|
375
|
+
# Built on first use, never at import time: tests and Alembic import this module freely.
|
|
376
|
+
return create_async_engine(str(get_settings().database_url), pool_pre_ping=True)
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
@lru_cache
|
|
380
|
+
def get_sessionmaker() -> async_sessionmaker[AsyncSession]:
|
|
381
|
+
return async_sessionmaker(get_engine(), expire_on_commit=False)
|
|
373
382
|
|
|
374
383
|
|
|
375
384
|
class Base(DeclarativeBase):
|
|
@@ -455,7 +464,7 @@ Dockerfile and CI/CD pipeline.
|
|
|
455
464
|
| `BackgroundTasks` for a payment-webhook retry | No durability/retry. Use a real broker. |
|
|
456
465
|
| Skipping `mypy --strict` because it is noisy | Strict catches the bugs FastAPI's runtime won't. Keep it. |
|
|
457
466
|
| Committing inside the handler | Let `get_db` own commit/rollback; handlers stay thin. |
|
|
458
|
-
| Default-mutable arg / engine built at import time | Mutable defaults bite; engine
|
|
467
|
+
| Default-mutable arg / engine built at import time | Mutable defaults bite; build the engine lazily (`get_engine()`), dispose it in lifespan. |
|
|
459
468
|
|
|
460
469
|
## Project grounding
|
|
461
470
|
|
|
@@ -9,23 +9,32 @@ a relationship in async** — eager-load everything you serialize.
|
|
|
9
9
|
|
|
10
10
|
```python
|
|
11
11
|
from collections.abc import AsyncIterator
|
|
12
|
+
from functools import lru_cache
|
|
12
13
|
|
|
13
|
-
from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine
|
|
14
|
+
from sqlalchemy.ext.asyncio import AsyncEngine, AsyncSession, async_sessionmaker, create_async_engine
|
|
14
15
|
|
|
15
16
|
from app.core.config import get_settings
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
|
|
19
|
+
@lru_cache
|
|
20
|
+
def get_engine() -> AsyncEngine:
|
|
21
|
+
# Built on first use, never at import time: tests and Alembic import this module freely.
|
|
22
|
+
return create_async_engine(
|
|
23
|
+
str(get_settings().database_url),
|
|
24
|
+
pool_size=10,
|
|
25
|
+
max_overflow=20,
|
|
26
|
+
pool_pre_ping=True,
|
|
27
|
+
pool_recycle=1800,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@lru_cache
|
|
32
|
+
def get_sessionmaker() -> async_sessionmaker[AsyncSession]:
|
|
33
|
+
return async_sessionmaker(get_engine(), expire_on_commit=False)
|
|
25
34
|
|
|
26
35
|
|
|
27
36
|
async def get_db() -> AsyncIterator[AsyncSession]:
|
|
28
|
-
async with
|
|
37
|
+
async with get_sessionmaker()() as session:
|
|
29
38
|
try:
|
|
30
39
|
yield session
|
|
31
40
|
await session.commit()
|
|
@@ -97,7 +97,7 @@ A line that is silently dropped is a hole in the books. `verify.sh` fails if any
|
|
|
97
97
|
- **Confirm the current-year numbers — never carry last year's.** As of the 2025/2026 anchors:
|
|
98
98
|
- Business standard mileage: **70¢/mile for 2025** (IRS Notice 2025-5), rising to **72.5¢/mile for 2026**. Re-confirm the year before applying.
|
|
99
99
|
- Business meals deductible at **50%** (book them at a rate that preserves the 50% haircut, e.g. category L24b).
|
|
100
|
-
- **1099-NEC
|
|
100
|
+
- **1099-NEC threshold: ≥ $600 for payments made in 2025, ≥ $2,000 for payments made in 2026** (IRS Instructions for Forms 1099-MISC and 1099-NEC; inflation-indexed from 2027). Re-confirm the year, and flag contractors crossing that line during categorization so nothing is missed at filing.
|
|
101
101
|
|
|
102
102
|
## Month-close
|
|
103
103
|
|
package/skills/firebase/SKILL.md
CHANGED
|
@@ -92,7 +92,7 @@ service cloud.firestore {
|
|
|
92
92
|
match /databases/{database}/documents {
|
|
93
93
|
match /posts/{postId} {
|
|
94
94
|
allow get: if resource.data.ownerId == request.auth.uid;
|
|
95
|
-
allow list: if request.auth
|
|
95
|
+
allow list: if resource.data.ownerId == request.auth.uid; // rejects any query not constrained by where(ownerId == uid)
|
|
96
96
|
allow create: if request.auth.uid == request.resource.data.ownerId;
|
|
97
97
|
allow update, delete: if resource.data.ownerId == request.auth.uid;
|
|
98
98
|
}
|
package/skills/flutter/SKILL.md
CHANGED
|
@@ -364,7 +364,7 @@ encapsulation → `references/i18n-and-dependencies.md`.
|
|
|
364
364
|
## Production checklist
|
|
365
365
|
|
|
366
366
|
- `FlutterError.onError` + `PlatformDispatcher.instance.onError` + `ErrorWidget.builder` wired to Crashlytics/Sentry.
|
|
367
|
-
-
|
|
367
|
+
- Build config via `--dart-define` / `--dart-define-from-file` — compiled into the binary, so never secrets; secrets stay on a backend; tokens in secure storage (Keychain / EncryptedSharedPreferences), **never plaintext**.
|
|
368
368
|
- HTTPS only.
|
|
369
369
|
- Strict `analysis_options.yaml`: `strict-casts` / `strict-inference` / `strict-raw-types` + `flutter_lints` or `very_good_analysis`.
|
|
370
370
|
- l10n via `flutter_localizations` + ARB (ICU plurals, RTL-safe geometry, locale-aware `intl` formatting);
|
|
@@ -39,7 +39,7 @@ Match the method to the *shape* of the history, not to what sounds sophisticated
|
|
|
39
39
|
|
|
40
40
|
| Data shape | Method | statsforecast call | Why |
|
|
41
41
|
|---|---|---|---|
|
|
42
|
-
| Flat, no trend or season | Moving average or SES | `
|
|
42
|
+
| Flat, no trend or season | Moving average or SES | `SimpleExponentialSmoothingOptimized()` / 3-period MA | Nothing to model; a mean is honest. |
|
|
43
43
|
| Trend, with or without season | ETS | `AutoETS(season_length=m)` | ETS captures level+trend+season cleanly, no manual order. |
|
|
44
44
|
| Strong known seasonality / autocorrelation | ARIMA | `AutoARIMA(season_length=m)` | Handles autocorrelated errors; ~20x faster than pmdarima. |
|
|
45
45
|
| Many zeros (intermittent / lumpy demand) | Croston / SBA | `CrostonOptimized()` | SES is *provably* wrong on sporadic demand (Croston 1972); SBA debiases it. |
|
|
@@ -86,7 +86,7 @@ Collapse to one row per model:
|
|
|
86
86
|
|
|
87
87
|
| model | WAPE | bias | MASE | verdict |
|
|
88
88
|
|---------------|------|-------|------|---------------------------------|
|
|
89
|
-
| SeasonalNaive | 0.18 | +0.02 | 1.00 | the bar (MASE
|
|
89
|
+
| SeasonalNaive | 0.18 | +0.02 | 1.00 | the bar (MASE ≈ 1: the scaling reference)|
|
|
90
90
|
| AutoETS | 0.12 | -0.01 | 0.67 | beats naive — ship this |
|
|
91
91
|
| AutoARIMA | 0.13 | +0.06 | 0.72 | beats naive but biased high |
|
|
92
92
|
|
|
@@ -28,12 +28,12 @@ SeasonalNaive(season_length=m)
|
|
|
28
28
|
## Moving average / simple exponential smoothing (SES)
|
|
29
29
|
|
|
30
30
|
Flat series with no trend or season. SES weights recent observations more. Honest
|
|
31
|
-
for a noisy mean; do not use SES on intermittent demand (see Croston). `
|
|
31
|
+
for a noisy mean; do not use SES on intermittent demand (see Croston). `SimpleExponentialSmoothingOptimized`
|
|
32
32
|
auto-tunes the smoothing.
|
|
33
33
|
|
|
34
34
|
```python
|
|
35
|
-
from statsforecast.models import
|
|
36
|
-
|
|
35
|
+
from statsforecast.models import SimpleExponentialSmoothingOptimized
|
|
36
|
+
SimpleExponentialSmoothingOptimized()
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
## ETS (error-trend-season)
|
package/skills/ftd/SKILL.md
CHANGED
|
@@ -19,12 +19,11 @@ and answer it.
|
|
|
19
19
|
|
|
20
20
|
## Why this lane exists
|
|
21
21
|
|
|
22
|
-
The constitution's seventh principle
|
|
22
|
+
The constitution's seventh principle sets the rule: *«la fricción es proporcional al
|
|
23
23
|
riesgo. Silencio para lo trivial, ceremonia solo donde el fallo es caro. Un sistema que molesta en el
|
|
24
24
|
80% inofensivo acaba apagado, y apagado no protege el 20% que importa.»*
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
through the whole chain. This lane is that principle finally implemented, not a new idea.
|
|
26
|
+
This lane applies it: ordinary authorised change does not go through the whole chain.
|
|
28
27
|
|
|
29
28
|
## The feature document
|
|
30
29
|
|
|
@@ -84,7 +84,7 @@ Cold slice (10 meetings @ ~2% cold conversion): ~500 cold outreaches ← bru
|
|
|
84
84
|
Decision: that cold slice is uneconomical. Re-weight to 80% warm:
|
|
85
85
|
20 warm meetings @ ~35% ⇒ ~57 warm outreaches
|
|
86
86
|
5 cold meetings @ ~2% ⇒ ~250 cold outreaches
|
|
87
|
-
Top-of-funnel: ~60 Tier-A/B warm targets + a
|
|
87
|
+
Top-of-funnel: ~60 Tier-A/B warm targets + a ~250-outreach cold tail for 5 meetings.
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
The lesson the math forces: **the cold tail is a rounding error of meetings for a mountain of work** — invest the time in manufacturing warm paths, not in scaling cold. Hand the resulting dilution and cap-table arithmetic to `../financial-model/SKILL.md`; hand the cold-message copy for the tail to `../cold-outreach/SKILL.md`.
|
|
@@ -30,7 +30,7 @@ Target the current APIs. **Never emit these deprecated / removed APIs:**
|
|
|
30
30
|
|
|
31
31
|
| Engine | Target | Banned (removed/legacy) | Emit instead |
|
|
32
32
|
|---|---|---|---|
|
|
33
|
-
| **Godot** | 4.x | `master`/`puppet`/`remote`/`sync` keywords, `
|
|
33
|
+
| **Godot** | 4.x | `master`/`puppet`/`remote`/`sync` keywords, `rset`, `NetworkedMultiplayerENet` | `@rpc(...)` annotation, `set_multiplayer_authority()`, `ENetMultiplayerPeer`, `MultiplayerSynchronizer` |
|
|
34
34
|
| **Unity** | Netcode for GameObjects (NGO) 1.x/2.x | UNet / HLAPI: `NetworkIdentity`, `[Command]`, `[SyncVar]`, `NetworkServer`, `UnityEngine.Networking` | NGO `NetworkObject`, `NetworkBehaviour`, `NetworkVariable<T>`, `[Rpc(SendTo.X)]` |
|
|
35
35
|
| **Unreal** | 5.x | replicating by polling in `Tick`, skipping `WithValidation` on gameplay RPCs | `UPROPERTY(Replicated / ReplicatedUsing=...)` + `GetLifetimeReplicatedProps`, `Server`/`Client`/`NetMulticast` `UFUNCTION`s |
|
|
36
36
|
|
|
@@ -187,7 +187,7 @@ void MulticastMuzzleFx(FVector At);
|
|
|
187
187
|
|
|
188
188
|
void AMyPawn::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& Out) const {
|
|
189
189
|
Super::GetLifetimeReplicatedProps(Out);
|
|
190
|
-
DOREPLIFETIME(AMyPawn, Health); //
|
|
190
|
+
DOREPLIFETIME(AMyPawn, Health); // DOREPLIFETIME_CONDITION for owner-only; DOREPLIFETIME_WITH_PARAMS_FAST (bIsPushBased) for push model
|
|
191
191
|
}
|
|
192
192
|
```
|
|
193
193
|
|
|
@@ -72,8 +72,8 @@ The **legacy** attributes still compile and enforce method-name suffixes:
|
|
|
72
72
|
[ClientRpc] void PlayFxClientRpc(Vector3 a) { } // name MUST end in ClientRpc
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
Prefer `[Rpc(SendTo.X)]` on new code; recognize the legacy pair in existing code. RPCs are
|
|
76
|
-
default
|
|
75
|
+
Prefer `[Rpc(SendTo.X)]` on new code; recognize the legacy pair in existing code. RPCs are reliable by
|
|
76
|
+
default — set `Delivery = RpcDelivery.Unreliable` on the attribute for cosmetic, high-frequency calls (FX, sounds).
|
|
77
77
|
|
|
78
78
|
### Transforms & movement
|
|
79
79
|
|
|
@@ -118,8 +118,8 @@ void AMyPawn::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& Out) const {
|
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
`ReplicatedUsing` (RepNotify) is how you react to a change — use it instead of polling the value in `Tick`.
|
|
121
|
-
The **push model** (`
|
|
122
|
-
high-count actors.
|
|
121
|
+
The **push model** (`FDoRepLifetimeParams` with `bIsPushBased = true` + `DOREPLIFETIME_WITH_PARAMS_FAST`, then
|
|
122
|
+
`MARK_PROPERTY_DIRTY_FROM_NAME` on each write) avoids per-frame comparison for high-count actors.
|
|
123
123
|
|
|
124
124
|
### RPCs
|
|
125
125
|
|
|
@@ -201,7 +201,7 @@ AICon->MoveToActor(TargetActor, /*AcceptanceRadius*/ 50.f); // or MoveToLocati
|
|
|
201
201
|
| Setting `agent.destination` and reading the path the same frame | Path is async (`pathPending`); gate on it before trusting `remainingDistance`. |
|
|
202
202
|
| Inflating `h` because a bigger heuristic seems smarter | Over-estimating `h` breaks A* optimality; keep it admissible (or weight it *knowingly*). |
|
|
203
203
|
| Trusting a path query that came back empty | Start/end are **off the navmesh** or in disconnected islands — snap to the nearest poly and check reachability first. |
|
|
204
|
-
|
|
|
204
|
+
| Leaving a jump-down link at its default | Links are **bidirectional by default** (Godot `NavigationLink3D.bidirectional = true`) — untick it for one-way drops, or agents path *up* a ledge they cannot climb. |
|
|
205
205
|
| Feeding raw grid paths to the mover | Smooth them (funnel / string-pull) or agents walk visible zig-zag staircases. |
|
|
206
206
|
|
|
207
207
|
## Related skills
|
|
@@ -163,7 +163,7 @@ Run queries from the **fixed physics tick** so results match the simulated state
|
|
|
163
163
|
`intersect_shape`, `cast_motion`. Node helpers: `RayCast2D/3D`, `ShapeCast2D/3D`. Queries respect
|
|
164
164
|
`collision_mask`.
|
|
165
165
|
- **Unity:** `Physics.Raycast`, `SphereCast`/`CapsuleCast`, `OverlapSphere`, `CheckSphere` (2D:
|
|
166
|
-
`Physics2D.*`). Always pass a `LayerMask`; prefer non-allocating `RaycastNonAlloc`/`RaycastAll
|
|
166
|
+
`Physics2D.*`). Always pass a `LayerMask`; prefer non-allocating `RaycastNonAlloc`/`OverlapSphereNonAlloc` (`RaycastAll` allocates).
|
|
167
167
|
- **Unreal:** `LineTraceSingleByChannel`, `SweepSingleByChannel`, `OverlapMultiByChannel` (and
|
|
168
168
|
`...ByObjectType`). Use a **trace channel**, set the query params (`bTraceComplex`).
|
|
169
169
|
|
|
@@ -178,7 +178,8 @@ The rules that keep physics from jittering, drifting, or tunneling:
|
|
|
178
178
|
tick. Never simulate in the render frame.
|
|
179
179
|
2. **Scale by delta.** Multiply forces/accelerations/manual position changes by the tick's `delta` /
|
|
180
180
|
`fixedDeltaTime` — but **not** the output of a helper that already integrates time (Godot
|
|
181
|
-
`move_and_slide()`, Unity `CharacterController.
|
|
181
|
+
`move_and_slide()`, Unity `CharacterController.SimpleMove`, which takes a per-second velocity). Unity `CharacterController.Move`
|
|
182
|
+
takes a per-frame displacement, so multiply its velocity by `Time.deltaTime`.
|
|
182
183
|
3. **CCD for fast/thin things.** Small fast projectiles + thin walls tunnel. Enable Continuous
|
|
183
184
|
Collision Detection: Godot `continuous_cd`, Unity `collisionDetectionMode = Continuous*`, Unreal
|
|
184
185
|
`Use CCD`. Enable only on the fast bodies (it costs). Or use a shapecast/raycast-then-move.
|
|
@@ -67,7 +67,7 @@ public class Player : MonoBehaviour {
|
|
|
67
67
|
|
|
68
68
|
void Awake() => cc = GetComponent<CharacterController>();
|
|
69
69
|
|
|
70
|
-
void Update() { // CharacterController
|
|
70
|
+
void Update() { // kinematic CharacterController: the documented exception to the fixed-tick rule
|
|
71
71
|
if (cc.isGrounded && vel.y < 0f) vel.y = -2f; // keep grounded
|
|
72
72
|
Vector3 wish = transform.right * Input.GetAxis("Horizontal")
|
|
73
73
|
+ transform.forward * Input.GetAxis("Vertical");
|
|
@@ -91,10 +91,8 @@ render_mode blend_add, cull_back;
|
|
|
91
91
|
uniform vec3 rim_color : source_color = vec3(0.2, 0.6, 1.0);
|
|
92
92
|
uniform float power : hint_range(0.0, 8.0) = 3.0;
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
void fragment() {
|
|
97
|
-
float f = pow(1.0 - dot(normalize(v_normal), normalize(VIEW)), power);
|
|
94
|
+
void fragment() { // NORMAL and VIEW are both view space here
|
|
95
|
+
float f = pow(1.0 - dot(normalize(NORMAL), normalize(VIEW)), power);
|
|
98
96
|
EMISSION = rim_color * f;
|
|
99
97
|
ALPHA = f;
|
|
100
98
|
}
|
|
@@ -19,13 +19,13 @@ project ──[engine export/build]──▶ artifact ──[per-platform sign/c
|
|
|
19
19
|
Godot templates·Unity Build Profiles·Unreal Shipping desktop·web·mobile Steam·Play·App Store·itch
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
## Version anchors (
|
|
22
|
+
## Version anchors (check the current stable release of each before pinning)
|
|
23
23
|
|
|
24
24
|
| Tool | Target | Ship note |
|
|
25
25
|
| --- | --- | --- |
|
|
26
|
-
| Godot | 4.
|
|
26
|
+
| Godot | 4.x, current stable | Export templates must match the editor build **exactly** (4.5.1 editor ⇒ 4.5.1 templates). **C#/.NET edition has NO web export** — GDScript/standard only. |
|
|
27
27
|
| Unity | Unity 6 (6000.x) | "Build Settings" is now **Build Profiles**. IL2CPP backend for iOS/Android/WebGL. |
|
|
28
|
-
| Unreal | 5.
|
|
28
|
+
| Unreal | 5.x, current stable | Ship in the **Shipping** config; test packaged builds in **Development**. |
|
|
29
29
|
| Android | JDK **17**, target a recent API level | AAB required for Google Play (new apps + updates). APK only for sideload/itch/direct. |
|
|
30
30
|
| iOS/macOS | Xcode 16+, `notarytool` | `altool` notarization is dead — use `xcrun notarytool`. |
|
|
31
31
|
|
|
@@ -98,14 +98,17 @@ and [references/stores-and-ci.md](references/stores-and-ci.md).
|
|
|
98
98
|
|
|
99
99
|
| OS | Sign? | Gotcha |
|
|
100
100
|
| --- | --- | --- |
|
|
101
|
-
| Windows | Optional (Authenticode; EV
|
|
101
|
+
| Windows | Optional (Authenticode; OV and EV both build SmartScreen reputation over downloads) | Unsigned still runs but SmartScreen warns; ship `.exe` + engine data next to it, or an installer. |
|
|
102
102
|
| Linux | No | Ship binary + data, or wrap as **AppImage**/**Flatpak** for a portable single file. |
|
|
103
103
|
| macOS | **Required** | Must codesign (Developer ID Application) **+ notarize + staple**, or Gatekeeper refuses to open it. |
|
|
104
104
|
|
|
105
105
|
macOS notarization (the step everyone forgets):
|
|
106
106
|
|
|
107
107
|
```bash
|
|
108
|
-
|
|
108
|
+
# sign nested code inside-out (dylibs, frameworks, helpers), then the .app; never --deep
|
|
109
|
+
find Game.app/Contents -type f \( -name '*.dylib' -o -perm -111 \) ! -path '*/MacOS/Game' -exec \
|
|
110
|
+
codesign --force --timestamp --options runtime --sign "Developer ID Application: Studio (TEAMID)" {} \;
|
|
111
|
+
codesign --force --timestamp --options runtime \
|
|
109
112
|
--sign "Developer ID Application: Studio (TEAMID)" Game.app
|
|
110
113
|
ditto -c -k --keepParent Game.app Game.zip
|
|
111
114
|
xcrun notarytool submit Game.zip --keychain-profile "AC" --wait # store creds once via store-credentials
|
|
@@ -70,8 +70,12 @@ Gatekeeper will refuse an unsigned/un-notarized app for end users. The full chai
|
|
|
70
70
|
notarize → staple, inside-out.
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
|
-
# 1. Sign every nested binary FIRST, then the outer .app (Hardened Runtime is mandatory)
|
|
74
|
-
|
|
73
|
+
# 1. Sign every nested binary FIRST, then the outer .app (Hardened Runtime is mandatory).
|
|
74
|
+
# Inside-out, without --deep: --deep applies one set of options to every nested item.
|
|
75
|
+
find Game.app/Contents -type f \( -name '*.dylib' -o -perm -111 \) ! -path '*/MacOS/Game' -exec \
|
|
76
|
+
codesign --force --timestamp --options runtime \
|
|
77
|
+
--sign "Developer ID Application: Studio Name (TEAMID)" {} \;
|
|
78
|
+
codesign --force --timestamp --options runtime \
|
|
75
79
|
--sign "Developer ID Application: Studio Name (TEAMID)" Game.app
|
|
76
80
|
|
|
77
81
|
# 2. Store notarization creds once (App Store Connect API key or Apple ID app-password)
|
|
@@ -102,7 +106,7 @@ spctl --assess --type execute -vvv Game.app # should say: accepted, source=Not
|
|
|
102
106
|
## Windows
|
|
103
107
|
|
|
104
108
|
- Signing is **optional** but recommended: an Authenticode code-signing certificate reduces the
|
|
105
|
-
SmartScreen "unknown publisher" warning.
|
|
109
|
+
SmartScreen "unknown publisher" warning. OV and EV certificates both build SmartScreen reputation over downloads.
|
|
106
110
|
|
|
107
111
|
```powershell
|
|
108
112
|
signtool sign /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 /a Game.exe
|
|
@@ -26,7 +26,7 @@ The Commission's modernised Standard Contractual Clauses (adopted 4 June 2021) c
|
|
|
26
26
|
|---|---|---|
|
|
27
27
|
| **Module 1 (C2C)** | Controller → Controller | EU company shares data with an independent third-party controller abroad |
|
|
28
28
|
| **Module 2 (C2P)** | Controller → Processor | EU company → a non-EEA vendor processing on its behalf (most common SaaS case) |
|
|
29
|
-
| **Module 3 (P2P)** | Processor → Sub-processor |
|
|
29
|
+
| **Module 3 (P2P)** | Processor → Sub-processor | An EEA processor engages a sub-processor outside the EEA |
|
|
30
30
|
| **Module 4 (P2C)** | Processor → Controller | A processor returns/sends data to a controller outside the EEA |
|
|
31
31
|
|
|
32
32
|
## Transfer Impact Assessment (TIA) skeleton
|
|
@@ -117,9 +117,9 @@ at position 0 and rejects the emoji prefix. Either widen its `headerPattern` —
|
|
|
117
117
|
`references/gitmoji.md` — or move the emoji behind the header (`feat(api): ✨ add cursor paging`),
|
|
118
118
|
which every parser accepts. Both forms satisfy this convention; dropping the gitmoji does not.
|
|
119
119
|
|
|
120
|
-
**Authorship is always
|
|
120
|
+
**Authorship is always the human author — the configured git user.** Never add a `Co-Authored-By: Claude` trailer, never a
|
|
121
121
|
"Generated with" footer, never any line crediting an AI tool — in a commit *or* a PR body. The work
|
|
122
|
-
is
|
|
122
|
+
is the author's; the agent is a tool, like the compiler.
|
|
123
123
|
|
|
124
124
|
## History hygiene — rebase, merge, or squash?
|
|
125
125
|
|
|
@@ -204,7 +204,7 @@ enough to hand over. Setting up the isolated checkout *before* you start coding
|
|
|
204
204
|
| `BREAKING CHANGE` lowercase | tooling won't detect it → wrong (too-low) bump | uppercase `BREAKING CHANGE:` in the footer |
|
|
205
205
|
| PR with no description | reviewer reverse-engineers intent from the diff | `--fill` plus a why, link the issue |
|
|
206
206
|
| Tagging a release with no notes | users can't tell what changed | `gh release create --generate-notes` |
|
|
207
|
-
| `Co-Authored-By: Claude` / "Generated with" footer | forges authorship onto a tool | author is
|
|
207
|
+
| `Co-Authored-By: Claude` / "Generated with" footer | forges authorship onto a tool | author is the configured git user; no AI attribution |
|
|
208
208
|
|
|
209
209
|
## Checklist — before a PR or a release
|
|
210
210
|
|
package/skills/go/SKILL.md
CHANGED
|
@@ -148,12 +148,12 @@ sentinel; service passes it through; handler classifies once and maps to a statu
|
|
|
148
148
|
only the unexpected.
|
|
149
149
|
|
|
150
150
|
```go
|
|
151
|
-
// repository: translate
|
|
151
|
+
// repository: translate pgx.ErrNoRows into a domain sentinel, keep the chain.
|
|
152
152
|
func (r *Repo) GetUser(ctx context.Context, id string) (*User, error) {
|
|
153
153
|
var u User
|
|
154
|
-
err := r.
|
|
154
|
+
err := r.pool.QueryRow(ctx, "SELECT id, name FROM users WHERE id = $1", id). // *pgxpool.Pool
|
|
155
155
|
Scan(&u.ID, &u.Name)
|
|
156
|
-
if errors.Is(err,
|
|
156
|
+
if errors.Is(err, pgx.ErrNoRows) {
|
|
157
157
|
return nil, fmt.Errorf("user %s: %w", id, ErrNotFound)
|
|
158
158
|
}
|
|
159
159
|
if err != nil {
|
package/skills/harness/SKILL.md
CHANGED
|
@@ -50,8 +50,9 @@ The **harness** is the control plane of a workspace. A workspace need not be cod
|
|
|
50
50
|
|
|
51
51
|
It compounds on its own: every Ingest, Sweep and Query triggers a Maintenance Pass (lint, score
|
|
52
52
|
recomputation, gap detection, Related sweep), a Micro-Improve runs every N interactions, and Deep
|
|
53
|
-
Improve runs on request or on
|
|
54
|
-
Claude Code, wire
|
|
53
|
+
Improve runs on request or on a weekly schedule, and a daily curation pass keeps the inbox and links
|
|
54
|
+
current (`references/daily-curation-automation.md` — on Claude Code, wire both via the `schedule`
|
|
55
|
+
skill). Protocol → `references/wiki-protocol.md`;
|
|
55
56
|
formats → `references/ingest-formats.md`; capture → `references/wiki-worklog-template.md`;
|
|
56
57
|
vault → `references/obsidian-scaffolding.md`.
|
|
57
58
|
- **The Knowledge map** — the `## Knowledge map` section of the root `CLAUDE.md` that indexes the wiki (including the `harness/` topic) and is read by every other skill before it works in its area.
|
|
@@ -272,7 +273,7 @@ a row per wiki article, appended by many skills, forever.
|
|
|
272
273
|
|
|
273
274
|
**The rule:** the **full** Knowledge map lives in `02-DOCS/wiki/index.md` (loaded on demand, grows
|
|
274
275
|
freely). Root `CLAUDE.md`'s `## Knowledge map` is a **short pointer** — only the read-first entries
|
|
275
|
-
(`harness/user-profile.md`, `sdd/constitution.md`) plus "full index → `02-DOCS/wiki/index.md`".
|
|
276
|
+
(`harness/user-profile.md`, `harness/decisions.md`, and `sdd/constitution.md` when it exists) plus "full index → `02-DOCS/wiki/index.md`".
|
|
276
277
|
|
|
277
278
|
**Offload when it bloats (a move, never a trim — no info lost):** when `CLAUDE.md` passes ~200 lines
|
|
278
279
|
(the SessionStart hook nudges you) or its `## Knowledge map` has grown past the read-first entries:
|
|
@@ -19,7 +19,7 @@ Run once per day, at a quiet hour, to keep the second brain alive:
|
|
|
19
19
|
record them in `wiki/.ingested.json`, and propose the ambiguous ones
|
|
20
20
|
- process pending `raw/worklog/` material into `wiki/`
|
|
21
21
|
- strengthen weak / low-score pages; fill one open gap
|
|
22
|
-
- repair links and the graph (
|
|
22
|
+
- repair links and the graph (convert any `[[...]]` wikilinks to markdown links, fix broken links, add `## Related` where proper nouns recur)
|
|
23
23
|
- mark `stale` pages whose sources moved on
|
|
24
24
|
- record what changed in `wiki/log.md`
|
|
25
25
|
|
|
@@ -809,9 +809,9 @@ providers:
|
|
|
809
809
|
imports: ["import anthropic", "from anthropic", "@anthropic-ai/sdk", "@ai-sdk/anthropic", "from langchain_anthropic"]
|
|
810
810
|
env_vars: ["ANTHROPIC_API_KEY"]
|
|
811
811
|
deps: ["anthropic", "@anthropic-ai/sdk", "@ai-sdk/anthropic", "langchain-anthropic"]
|
|
812
|
-
dashboard_url: "https://
|
|
812
|
+
dashboard_url: "https://platform.claude.com/settings/keys"
|
|
813
813
|
env_example: |
|
|
814
|
-
# ANTHROPIC — generate at https://
|
|
814
|
+
# ANTHROPIC — generate at https://platform.claude.com/settings/keys
|
|
815
815
|
ANTHROPIC_API_KEY=
|
|
816
816
|
files:
|
|
817
817
|
test_connection.sh: |
|
|
@@ -827,11 +827,11 @@ providers:
|
|
|
827
827
|
Claude API (Opus, Sonnet, Haiku).
|
|
828
828
|
## Setup
|
|
829
829
|
1. `cp .env.example .env && chmod 600 .env`
|
|
830
|
-
2. Key from https://
|
|
830
|
+
2. Key from https://platform.claude.com/settings/keys
|
|
831
831
|
3. `./test_connection.sh`
|
|
832
832
|
CREDENTIALS.md: |
|
|
833
833
|
# Credentials — ANTHROPIC
|
|
834
|
-
Dashboard: https://
|
|
834
|
+
Dashboard: https://platform.claude.com/settings/keys
|
|
835
835
|
`ANTHROPIC_API_KEY` — secret. Rotate on leak.
|
|
836
836
|
|
|
837
837
|
- id: GOOGLE_AI
|
|
@@ -788,7 +788,8 @@ doing anything but dropping files.
|
|
|
788
788
|
### Knowledge Gaps log — format
|
|
789
789
|
|
|
790
790
|
`wiki/gaps.md` accumulates wanted-but-missing topics. Append-only; gaps get
|
|
791
|
-
flagged `[FILLED YYYY-MM-DD]` when addressed
|
|
791
|
+
flagged `[FILLED YYYY-MM-DD]` when addressed. Open gaps are never deleted; the only
|
|
792
|
+
removal is Deep Improve's compaction of `[FILLED]` entries older than 90 days.
|
|
792
793
|
|
|
793
794
|
```
|
|
794
795
|
# Knowledge Gaps
|