@ericrisco/rsc 4.1.11 → 4.2.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.
- package/manifest.json +6 -6
- package/package.json +2 -1
- package/scripts/lib/prompt-audit.js +110 -0
- package/scripts/lib/review-ledger.js +14 -3
- package/scripts/prompt-audit.js +48 -0
- package/scripts/rsc.js +4 -2
- 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/gcp-essentials/SKILL.md +11 -8
- package/skills/gcp-essentials/references/networking-and-sql.md +4 -4
- package/skills/gdpr-privacy/references/dpa-and-transfers.md +1 -1
- package/skills/git-workflow/SKILL.md +3 -3
- package/skills/github-actions/SKILL.md +12 -12
- package/skills/github-actions/evals/cases.yaml +1 -1
- package/skills/github-actions/references/caching-and-matrix.md +5 -5
- package/skills/github-actions/references/oidc-deploys.md +4 -4
- package/skills/go/SKILL.md +3 -3
- package/skills/google-workspace/SKILL.md +15 -11
- package/skills/google-workspace/references/api-recipes.md +2 -2
- package/skills/google-workspace/references/auth-setup.md +1 -1
- 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/hetzner/SKILL.md +13 -12
- package/skills/hetzner/references/cloud-init.md +4 -2
- package/skills/hetzner/references/plans-and-locations.md +15 -14
- 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/huggingface/SKILL.md +15 -15
- package/skills/huggingface/evals/cases.yaml +1 -1
- package/skills/huggingface/references/endpoints-and-spaces.md +5 -3
- package/skills/huggingface/references/hub-and-cli.md +4 -4
- package/skills/huggingface/references/inference-providers.md +1 -1
- package/skills/huggingface/scripts/verify.sh +3 -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/instagram-api/SKILL.md +9 -9
- package/skills/instagram-api/evals/cases.yaml +1 -1
- package/skills/instagram-api/references/insights-metrics.md +1 -1
- package/skills/instagram-api/references/publish-reel.md +8 -7
- 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 +3 -3
- package/skills/linkedin-api/evals/cases.yaml +1 -1
- package/skills/linkedin-api/references/api-reference.md +3 -3
- 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 +5 -5
- 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 +67 -19
- package/skills/typescript/evals/README.md +3 -3
- package/skills/typescript/evals/cases.yaml +4 -1
- package/skills/typescript/references/build-and-monorepo.md +82 -26
- package/skills/typescript/references/type-system.md +15 -4
- package/skills/typescript/scripts/verify.sh +20 -10
- 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/asdd-gate.mjs +9 -1
- package/targets/commands.js +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Hub & the `hf` CLI
|
|
2
2
|
|
|
3
|
-
The CLI
|
|
4
|
-
|
|
3
|
+
The CLI is **`hf`**, shaped `hf <resource> <action>`. `huggingface_hub` 2.0 removed the
|
|
4
|
+
`huggingface-cli` entry point and the singular `hf repo` group (now `hf repos`) — use `hf` everywhere.
|
|
5
5
|
|
|
6
6
|
## Command map
|
|
7
7
|
|
|
@@ -10,7 +10,7 @@ hf auth login # interactive token store; or export HF_TOKEN=...
|
|
|
10
10
|
hf auth whoami # confirm identity + token scope
|
|
11
11
|
hf download <repo> # pull a repo (model/dataset/space) to the local cache
|
|
12
12
|
hf upload <repo> <path> # push files to a repo
|
|
13
|
-
hf
|
|
13
|
+
hf repos create <repo> # create a new repo (--repo-type model|dataset|space)
|
|
14
14
|
hf jobs run <image> -- <cmd> # run a containerized/uv job on HF infra (PRO)
|
|
15
15
|
```
|
|
16
16
|
|
|
@@ -37,7 +37,7 @@ cfg = hf_hub_download("BAAI/bge-small-en-v1.5", filename="config.json")
|
|
|
37
37
|
## Upload patterns
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
hf
|
|
40
|
+
hf repos create my-org/my-model --repo-type model
|
|
41
41
|
hf upload my-org/my-model ./checkpoints --commit-message "v1 weights"
|
|
42
42
|
```
|
|
43
43
|
|
|
@@ -95,7 +95,7 @@ resp = client.chat.completions.create(
|
|
|
95
95
|
|
|
96
96
|
## Billing & org headers
|
|
97
97
|
|
|
98
|
-
- Monthly Inference-Providers credits: **Free
|
|
98
|
+
- Monthly Inference-Providers credits: **Free none** (buy credits first), **PRO $2.00**, **Team/Enterprise $2.00 per
|
|
99
99
|
seat** (shared across the org). Past credits → pay-as-you-go (you must purchase credits).
|
|
100
100
|
- A **Custom Provider Key** (your own key for a partner) bypasses HF billing — the provider bills
|
|
101
101
|
you directly and HF credits do not apply.
|
|
@@ -107,11 +107,12 @@ if printf '%s' "$URLHITS" | grep -q .; then
|
|
|
107
107
|
fi
|
|
108
108
|
fi
|
|
109
109
|
|
|
110
|
-
# ---
|
|
110
|
+
# --- HARD: huggingface-cli was removed in huggingface_hub 2.0 ---
|
|
111
111
|
CLIHITS="$(scan 'huggingface-cli ' || true)"
|
|
112
112
|
if printf '%s' "$CLIHITS" | grep -q .; then
|
|
113
|
-
|
|
113
|
+
fail_msg "'huggingface-cli' was removed in huggingface_hub 2.0 — use 'hf <resource> <action>':"
|
|
114
114
|
printf '%s\n' "$CLIHITS"
|
|
115
|
+
HARD=1
|
|
115
116
|
fi
|
|
116
117
|
|
|
117
118
|
if [ "$HARD" -ne 0 ]; then
|
|
@@ -66,7 +66,7 @@ GREEN → write the least code that makes that test pass. No extra features,
|
|
|
66
66
|
TRIANGULATE → add the smallest edge-case test that proves the behavior is not hard-coded
|
|
67
67
|
(only when config.testing.strict_tdd is true and the task has meaningful edge cases).
|
|
68
68
|
REFACTOR → with the test green, clean up names/duplication/shape. Re-run; still green. Only now.
|
|
69
|
-
COMMIT → commit this task as one logical unit (authorship =
|
|
69
|
+
COMMIT → commit this task as one logical unit (authorship = the human author, the configured git user; no AI attribution; see ship for the rule).
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
The order is load-bearing. **Red before green** is not a suggestion — a test you write *after* the
|
|
@@ -339,7 +339,7 @@ outranks the plan, and the plan outranks your in-the-moment preference.
|
|
|
339
339
|
- **Unresolved `analyze` findings** (contradiction between constitution ↔ spec ↔ plan ↔ tasks) →
|
|
340
340
|
resolve them before any code; they will only get more expensive after the diff exists.
|
|
341
341
|
- **A task forces a constitution violation** → surface it, stop, kick it back to `analyze`/`plan`.
|
|
342
|
-
- **You're on
|
|
342
|
+
- **You're on a closed default branch** → stop before the first commit and ask: this branch, a new one, or unlock (`worktrees`).
|
|
343
343
|
- **A test won't go red** for the right reason (import error, syntax) → stub the module, fix the test.
|
|
344
344
|
- **The combined suite is red after a parallel merge** → do not checkpoint as done; debug with
|
|
345
345
|
`debug` before continuing.
|
|
@@ -349,7 +349,7 @@ outranks the plan, and the plan outranks your in-the-moment preference.
|
|
|
349
349
|
## Checklist (copy per task)
|
|
350
350
|
|
|
351
351
|
```text
|
|
352
|
-
- [ ] a) RED for the right reason → GREEN → REFACTOR; committed as one unit (authorship =
|
|
352
|
+
- [ ] a) RED for the right reason → GREEN → REFACTOR; committed as one unit (authorship = the configured git user, no AI attribution)
|
|
353
353
|
- [ ] b) `rsc risk` on the task diff; tier recorded
|
|
354
354
|
- [ ] c) `review ledger round <slug>/<task>` before each review (≤ 3); by tier, fresh context, no pre-judging
|
|
355
355
|
- [ ] d) `review consolidate` + `finding-verifier`; `review ledger record`; outcomes closed
|
package/skills/init/SKILL.md
CHANGED
|
@@ -173,9 +173,8 @@ means the user starts clean.
|
|
|
173
173
|
### Phase 5 — HANDOFF
|
|
174
174
|
|
|
175
175
|
The profile is set, the discovery recorded, the skills installed. What is missing is the workspace
|
|
176
|
-
itself
|
|
177
|
-
|
|
178
|
-
user has just delegated precisely so they would not have to know what to type.
|
|
176
|
+
itself. The user delegated onboarding so they would not have to know what to type next, so do not
|
|
177
|
+
end with a request to run `harness`.
|
|
179
178
|
|
|
180
179
|
So **invoke `harness` yourself, now**, as the last step of this phase. Say what you are doing in one
|
|
181
180
|
line, then do it:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Register & Profile — the first-contact question and how it persists
|
|
2
2
|
|
|
3
|
-
This file holds the runtime detail behind the SKILL.md section "First contact". It defines: the first-contact question, the register it sets, the exact `02-DOCS` file formats, and the rule every downstream skill follows.
|
|
3
|
+
This file holds the runtime detail behind the SKILL.md section "First contact". It defines: the first-contact question, the register it sets, the exact `02-DOCS` file formats, and the rule every downstream skill follows.
|
|
4
4
|
|
|
5
5
|
## Why this matters
|
|
6
6
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Recommend Skills — the skill map, sample printouts & the "siempre 3 opciones" pattern
|
|
2
2
|
|
|
3
|
-
Phase 3 detail. Map discovery to individual rsc skills,
|
|
3
|
+
Phase 3 detail. Map discovery to individual rsc skills, propose the exact
|
|
4
4
|
`npx @ericrisco/rsc add` commands, and run the requirements-first 3-option decision pattern
|
|
5
|
-
for any significant choice.
|
|
6
|
-
|
|
5
|
+
for any significant choice. With a terminal, run them yourself after a one-word
|
|
6
|
+
confirm; only without a shell, print them for the user to run.
|
|
7
7
|
|
|
8
8
|
## The skill map
|
|
9
9
|
|
|
@@ -38,7 +38,7 @@ npx @ericrisco/rsc add <skill> [<skill> ...]
|
|
|
38
38
|
|
|
39
39
|
```text
|
|
40
40
|
Based on what you described (a web app with a backend, a Next.js UI, a landing
|
|
41
|
-
page, and you want to ship it securely), install these:
|
|
41
|
+
page, and you want to ship it securely), I'll install these:
|
|
42
42
|
|
|
43
43
|
npx @ericrisco/rsc add harness # the control plane — scaffolds and governs the workspace
|
|
44
44
|
npx @ericrisco/rsc add fastapi postgresdb # the API and the database
|
|
@@ -46,33 +46,33 @@ npx @ericrisco/rsc add nextjs design # the web UI people see
|
|
|
46
46
|
npx @ericrisco/rsc add marketing # the words for your landing page
|
|
47
47
|
npx @ericrisco/rsc add security-audit deployment # ship it safely
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Say yes and I'll install them, then build the project structure.
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
### Sample printout — non-code harness, running an agency's operations
|
|
53
53
|
|
|
54
54
|
```text
|
|
55
55
|
You're organizing how your agency runs — client emails, contracts, invoicing,
|
|
56
|
-
and you want it all findable. That's a non-code harness; install:
|
|
56
|
+
and you want it all findable. That's a non-code harness; I'll install:
|
|
57
57
|
|
|
58
58
|
npx @ericrisco/rsc add harness # your 01-TOOLS (connections) + 02-DOCS (your second brain)
|
|
59
59
|
npx @ericrisco/rsc add security-audit deployment # connect email, payments, drive — and keep credentials safe
|
|
60
60
|
npx @ericrisco/rsc add marketing # for the proposals, decks and copy you send clients
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
Say yes and I'll install them, then set up the structure that holds it all.
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
### Sample printout — greenfield AI agent
|
|
66
66
|
|
|
67
67
|
```text
|
|
68
|
-
You want an AI agent that answers questions over your own documents.
|
|
68
|
+
You want an AI agent that answers questions over your own documents. I'll install:
|
|
69
69
|
|
|
70
70
|
npx @ericrisco/rsc add harness # the control plane
|
|
71
71
|
npx @ericrisco/rsc add building-agents # agent loops, tools, RAG
|
|
72
72
|
npx @ericrisco/rsc add fastapi postgresdb # an API + database to serve it
|
|
73
73
|
npx @ericrisco/rsc add security-audit deployment # ship it safely
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
Say yes and I'll install them and set up the workspace.
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
## The "siempre 3 opciones" decision pattern
|
|
@@ -32,7 +32,7 @@ You cannot publish from a personal account. Confirm these before writing any cal
|
|
|
32
32
|
- Facebook Login for Business → IG account linked to a FB Page → host `graph.facebook.com`.
|
|
33
33
|
- Instagram Login (direct) → host `graph.instagram.com`.
|
|
34
34
|
Why: the host is not interchangeable per call; mixing tokens and hosts throws auth errors.
|
|
35
|
-
- **Scopes
|
|
35
|
+
- **Scopes depend on the login path:** Instagram Login uses `instagram_business_basic`, `instagram_business_content_publish` and `instagram_business_manage_insights`; Facebook Login for Business uses `instagram_basic`, `instagram_content_publish`, `instagram_manage_insights` and `pages_read_engagement`. Why: on Instagram Login the old `business_basic` / `business_content_publish` / `business_manage_insights` names were deprecated 2025-01-27 — requesting a scope from the wrong path grants nothing.
|
|
36
36
|
- **Long-lived token = 60 days**, refreshable before expiry. A short-lived user token lasts ~1h. Why: anything in a script needs the long-lived token or it dies within the hour.
|
|
37
37
|
|
|
38
38
|
Env block — generate code that reads these, never hard-code the token:
|
|
@@ -133,22 +133,22 @@ Full container field reference (reels / carousel / story), cover & thumb handlin
|
|
|
133
133
|
| `ERROR` | Failed (bad url, bad codec, eligibility) | Stop; read `status`, fix source |
|
|
134
134
|
| `EXPIRED` | Container unpublished too long | Stop; recreate from step 1 |
|
|
135
135
|
|
|
136
|
-
Why the 5-min ceiling:
|
|
136
|
+
Why the 5-min ceiling: Meta's guidance is to poll once per minute for no more than 5 minutes; a container still not `FINISHED` by then is stuck, so stop and inspect `status`. Containers left unpublished for 24h become `EXPIRED`. Cap retries.
|
|
137
137
|
|
|
138
138
|
## Limits — check before a batch
|
|
139
139
|
|
|
140
140
|
| Rule | How |
|
|
141
141
|
|---|---|
|
|
142
|
-
| **
|
|
143
|
-
| Over the cap | `media_publish` rejects with **error subcode
|
|
142
|
+
| **100 API-published posts per rolling 24h** per IG account | `GET /{IG_USER_ID}/content_publishing_limit?fields=quota_usage,config` |
|
|
143
|
+
| Over the cap | `media_publish` rejects with **error code 9, subcode 2207042** ("maximum number of posts") |
|
|
144
144
|
|
|
145
145
|
```bash
|
|
146
146
|
curl -s "https://$GRAPH_HOST/$GRAPH_VERSION/$IG_USER_ID/content_publishing_limit?fields=quota_usage" \
|
|
147
147
|
-d "access_token=$IG_ACCESS_TOKEN"
|
|
148
|
-
# -> {"data":[{"quota_usage": 12, "config": {"quota_total":
|
|
148
|
+
# -> {"data":[{"quota_usage": 12, "config": {"quota_total": 100}}]}
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
Why check first: in a batch, hitting
|
|
151
|
+
Why check first: in a batch, hitting the cap (subcode 2207042) mid-run leaves half your queue unpublished and no clean resume point. Read `quota_usage` and stop early.
|
|
152
152
|
|
|
153
153
|
## Fetch insights
|
|
154
154
|
|
|
@@ -229,10 +229,10 @@ current valid Reels set; no deprecated names requested.
|
|
|
229
229
|
| Requesting `plays` / `impressions` | 400s the whole insights call | Use `views`; consult the trap table |
|
|
230
230
|
| Leaving `GRAPH_VERSION` blank / using default | Metric set silently shifts on Meta's rollout | Pin `v25.0` in every call |
|
|
231
231
|
| Signed/auth-gated `video_url` | Container stalls in `ERROR` | Plain public MP4 for the full window |
|
|
232
|
-
| Batch publishing without cap check | Hit
|
|
233
|
-
|
|
|
232
|
+
| Batch publishing without cap check | Hit the cap (subcode 2207042) mid-run, half-published queue | `content_publishing_limit` before the loop |
|
|
233
|
+
| Pre-2025 Instagram Login scopes (`business_basic`, `business_content_publish`), or scopes from the other login path | Grant nothing (IG Login names deprecated 2025-01-27) | IG Login: `instagram_business_*`; FB Login: `instagram_basic` / `instagram_content_publish` |
|
|
234
234
|
| Storing the container id as "the post" | It's not the published media id | Persist the `media_publish` id |
|
|
235
235
|
| Sending a `graph.instagram.com` token to `graph.facebook.com` | Host is fixed by the login path, not chosen per call | Pick the host with the auth path and stay on it |
|
|
236
236
|
| Letting the 60-day long-lived token lapse | Every call fails with an auth error, not a 404 | Refresh before expiry |
|
|
237
|
-
| A source video outside Reel eligibility | Surfaces as container `ERROR`, not a clean validation message |
|
|
237
|
+
| A source video outside Reel eligibility | Surfaces as container `ERROR`, not a clean validation message | 3 s–15 min, ≤300 MB, H.264/HEVC + AAC, 9:16 recommended |
|
|
238
238
|
| Requesting the 2025–2026 additions (Reels skip rate, repost counts, crossposted views) blind | Version-gated — trips the same 400 trap as a deprecated name | Confirm they exist on `GRAPH_VERSION` first |
|
|
@@ -8,7 +8,7 @@ should_trigger:
|
|
|
8
8
|
- prompt: "My /insights call started returning an error when I ask for metric=plays"
|
|
9
9
|
why: Non-obvious — the deprecated-metric trap; plays was retired 2025-04-21, swap to views.
|
|
10
10
|
- prompt: "How many posts do we have left in the 24-hour Instagram publish window?"
|
|
11
|
-
why: content_publishing_limit check before a batch; the
|
|
11
|
+
why: content_publishing_limit check before a batch; the 100/24h cap.
|
|
12
12
|
- prompt: "Ingesta el rendimiento de los Reels en el wiki de shortform"
|
|
13
13
|
why: Spanish — ingest IG performance into 02-DOCS/wiki/shortform, the checkable artifact.
|
|
14
14
|
- prompt: "My media container is stuck IN_PROGRESS and never publishes"
|
|
@@ -48,7 +48,7 @@ Symptom of requesting any of these: the whole `/insights` call returns a 400, no
|
|
|
48
48
|
|
|
49
49
|
Added late 2025 / early 2026; present only on recent versions. Confirm against `GRAPH_VERSION` before requesting, or they trip the same 400:
|
|
50
50
|
|
|
51
|
-
- Reels **skip rate** / swipe-away signal.
|
|
51
|
+
- Reels **skip rate** / swipe-away signal (`reels_skip_rate`).
|
|
52
52
|
- **Repost** counts (`reposts`).
|
|
53
53
|
- **Crossposted** Reel views (`crossposted_views`, `facebook_views`).
|
|
54
54
|
|
|
@@ -39,7 +39,7 @@ Why the extra stage: children must each finish before the parent can be publishe
|
|
|
39
39
|
- `IN_PROGRESS` — keep polling (~60s cadence).
|
|
40
40
|
- `FINISHED` — publish now.
|
|
41
41
|
- `ERROR` — read `status` for the reason; do not retry the same source blindly.
|
|
42
|
-
- `EXPIRED` — container sat unpublished
|
|
42
|
+
- `EXPIRED` — container sat unpublished for 24h; recreate from step 1.
|
|
43
43
|
|
|
44
44
|
Poll ceiling ~5 minutes. Containers are not permanent.
|
|
45
45
|
|
|
@@ -47,10 +47,11 @@ Poll ceiling ~5 minutes. Containers are not permanent.
|
|
|
47
47
|
|
|
48
48
|
| Subcode | Meaning | Fix |
|
|
49
49
|
|---|---|---|
|
|
50
|
-
|
|
|
51
|
-
| 9007 | Media not ready / not `FINISHED` | Poll until `FINISHED` first |
|
|
52
|
-
| 2207003 | Media download
|
|
53
|
-
|
|
|
50
|
+
| 2207042 (code 9) | 24h publish limit reached (100/account) | Wait or read `content_publishing_limit` |
|
|
51
|
+
| 2207027 (code 9007) | Media not ready / not `FINISHED` | Poll until `FINISHED` first |
|
|
52
|
+
| 2207003 (code -2) | Media download took too long | Serve `video_url` from a fast, public host |
|
|
53
|
+
| 2207052 (code 9004) | Media could not be fetched | Make `video_url` truly public |
|
|
54
|
+
| 2207026 (code 352) | Unsupported video format | Re-encode H.264/HEVC + AAC, 3 s–15 min, ≤300 MB, 9:16 recommended |
|
|
54
55
|
|
|
55
56
|
## Retry / backoff snippet
|
|
56
57
|
|
|
@@ -77,13 +78,13 @@ def remaining_quota(base, uid, tok):
|
|
|
77
78
|
d = requests.get(f"{base}/{uid}/content_publishing_limit",
|
|
78
79
|
params={"fields": "quota_usage,config", "access_token": tok}
|
|
79
80
|
).json()["data"][0]
|
|
80
|
-
return d.get("config", {}).get("quota_total",
|
|
81
|
+
return d.get("config", {}).get("quota_total", 100) - d.get("quota_usage", 0)
|
|
81
82
|
|
|
82
83
|
def publish_batch(base, uid, tok, jobs):
|
|
83
84
|
published = []
|
|
84
85
|
for video_url, caption in jobs:
|
|
85
86
|
if remaining_quota(base, uid, tok) <= 0:
|
|
86
|
-
break # stop cleanly; don't trip subcode
|
|
87
|
+
break # stop cleanly; don't trip subcode 2207042
|
|
87
88
|
cid = requests.post(f"{base}/{uid}/media", data={
|
|
88
89
|
"media_type": "REELS", "video_url": video_url,
|
|
89
90
|
"caption": caption, "access_token": tok}).json()["id"]
|
|
@@ -110,20 +110,21 @@ Your legal lever (source: EU Directive 2011/7/EU on late payment; EC Late Paymen
|
|
|
110
110
|
When the user wants invoices sent by software rather than by hand, use Stripe. SDK is **stripe-node v19.1.0**; invoice status enum is `draft → open → paid | uncollectible | void` (source: Stripe API Reference; context7 /stripe/stripe-node v19.1.0; accessed 2026-06-02).
|
|
111
111
|
|
|
112
112
|
```javascript
|
|
113
|
-
// 1.
|
|
113
|
+
// 1. create the draft invoice, then 2. attach line items to it by id
|
|
114
|
+
const invoice = await stripe.invoices.create({
|
|
115
|
+
customer: customerId,
|
|
116
|
+
collection_method: 'send_invoice', // email the customer (vs charge_automatically)
|
|
117
|
+
days_until_due: 30, // due-date / payment terms
|
|
118
|
+
});
|
|
119
|
+
|
|
114
120
|
await stripe.invoiceItems.create({
|
|
115
121
|
customer: customerId,
|
|
122
|
+
invoice: invoice.id, // without it the item stays pending and the invoice is empty
|
|
116
123
|
amount: 120000, // cents — 12h consulting @ EUR 100/h
|
|
117
124
|
currency: 'eur',
|
|
118
125
|
description: '12h consulting',
|
|
119
126
|
});
|
|
120
127
|
|
|
121
|
-
const invoice = await stripe.invoices.create({
|
|
122
|
-
customer: customerId,
|
|
123
|
-
collection_method: 'send_invoice', // email the customer (vs charge_automatically)
|
|
124
|
-
days_until_due: 30, // due-date / payment terms
|
|
125
|
-
});
|
|
126
|
-
|
|
127
128
|
// 3. finalize assigns the sequential number, 4. send emails it
|
|
128
129
|
await stripe.invoices.finalizeInvoice(invoice.id);
|
|
129
130
|
await stripe.invoices.sendInvoice(invoice.id);
|
package/skills/java/SKILL.md
CHANGED
|
@@ -158,8 +158,9 @@ String describe(PaymentResult r) {
|
|
|
158
158
|
}
|
|
159
159
|
```
|
|
160
160
|
|
|
161
|
-
Java 25
|
|
162
|
-
extending exhaustiveness to primitives.
|
|
161
|
+
Java 25 previews **primitive type patterns** in `instanceof` and `switch` (e.g. `case int i`),
|
|
162
|
+
extending exhaustiveness to primitives. It is still a preview feature (JEP 507): it needs
|
|
163
|
+
`--enable-preview`, so keep it out of production code.
|
|
163
164
|
|
|
164
165
|
## Concurrency: virtual threads
|
|
165
166
|
|
|
@@ -55,9 +55,8 @@ Worked examples for each rung are in `references/gardening-playbook.md`.
|
|
|
55
55
|
|
|
56
56
|
- It carries **≥2 unrelated theses** (e.g. "Stripe retries" *and* "our refund SLA").
|
|
57
57
|
- Its `## Overview` cannot be written as **one honest paragraph**.
|
|
58
|
-
- It has grown past readability and the score signal flags it.
|
|
59
58
|
|
|
60
|
-
Why: one article = one thesis keeps scoring, linking, and retrieval meaningful. After a split, fix `> Sources:` and `> Raw:` on both halves and repair `## See Also` so they reference each other. Recipe in the playbook.
|
|
59
|
+
Length alone is a flag to review the article for a second thesis, not a reason to split. Why: one article = one thesis keeps scoring, linking, and retrieval meaningful. After a split, fix `> Sources:` and `> Raw:` on both halves and repair `## See Also` so they reference each other. Recipe in the playbook.
|
|
61
60
|
|
|
62
61
|
**Merge** near-duplicates into the **higher-scored** page; fold the loser's unique content in, then archive the loser to `wiki/<topic>/_archive/<loser>__YYYY-MM-DD.md` and redirect every inbound link to the survivor. Why: never lose history, never keep two competing truths.
|
|
63
62
|
|
|
@@ -81,7 +80,7 @@ Every article earns **≥1 inbound link** or is a conscious leaf you can justify
|
|
|
81
80
|
|
|
82
81
|
- **Conflicts:** you **flag** contradictions and the **human arbitrates**. Once they choose a winner, you may apply the resolution and annotate the loser — but you never auto-pick. Why: silently choosing a side is data corruption.
|
|
83
82
|
- **Stale answers:** mark a page or archived copy with a `> ⚠ Stale — superseded YYYY-MM-DD` note rather than rewriting history.
|
|
84
|
-
- **Compaction is bounded:**
|
|
83
|
+
- **Compaction is bounded:** a filled gap gets a `[FILLED YYYY-MM-DD]` stamp; only `[FILLED]` gaps **older than 90 days** may be removed from `gaps.md`, in Deep Improve, with a single compaction marker prepended to `log.md`. Open gaps are never deleted.
|
|
85
84
|
- **Log every prune** by prepending to `wiki/log.md`.
|
|
86
85
|
|
|
87
86
|
A full worked prune session (stale + superseded + conflict + gap compaction, all logged) is in `references/gardening-playbook.md`.
|
|
@@ -92,7 +91,7 @@ Inherited from `../harness/references/wiki-protocol.md` — do not override them
|
|
|
92
91
|
|
|
93
92
|
1. **Preserve before overwrite.** Never overwrite an article without first copying the old version to `wiki/<topic>/_archive/<article>__YYYY-MM-DD.md`.
|
|
94
93
|
2. **Never auto-resolve a conflict.** Flag it; the human arbitrates.
|
|
95
|
-
3. **The reserved files only grow.** Log every change in `wiki/log.md`, the OKF reserved change-log: new entries are **prepended at the top (newest first)**, ISO 8601 dates. `gaps.md` is the append-only one — new entries go at the bottom. Past entries in either are immutable: a gap gets a `[FILLED YYYY-MM-DD]` stamp, nothing is
|
|
94
|
+
3. **The reserved files only grow.** Log every change in `wiki/log.md`, the OKF reserved change-log: new entries are **prepended at the top (newest first)**, ISO 8601 dates. `gaps.md` is the append-only one — new entries go at the bottom. Past entries in either are immutable: a gap gets a `[FILLED YYYY-MM-DD]` stamp, and nothing is edited out or deleted except the bounded compaction above.
|
|
96
95
|
4. **Never touch an article whose `timestamp` is < 24h ago** without explicit user say-so. Why: it is likely still being worked. (`timestamp` is the OKF last-meaningful-edit field, ISO 8601 — see `../harness/references/wiki-protocol.md` "## Conventions".)
|
|
97
96
|
|
|
98
97
|
## Anti-patterns
|
|
@@ -84,8 +84,8 @@ unresolved conflict annotation, and a pile of old `[FILLED]` gaps.
|
|
|
84
84
|
claim with `> Superseded by [winner](./winner.md) per owner decision YYYY-MM-DD`
|
|
85
85
|
(standard markdown link, never a wikilink) and clear the conflict annotation. Log.
|
|
86
86
|
4. **Gap compaction:** only `[FILLED YYYY-MM-DD]` gaps **older than 90 days** may
|
|
87
|
-
be
|
|
88
|
-
|
|
87
|
+
be removed from `gaps.md`, recorded by a single marker line prepended to `log.md`
|
|
88
|
+
(newest first). Open gaps are never deleted.
|
|
89
89
|
|
|
90
90
|
## `wiki/log.md` entry shapes
|
|
91
91
|
|
|
@@ -117,7 +117,7 @@ Superseded by stripe-webhook-retry-policy.md. Removed from index.md.
|
|
|
117
117
|
Conflict on retry window arbitrated by owner: 3 days wins. Loser claim annotated. conflict_count cleared.
|
|
118
118
|
|
|
119
119
|
## [2026-06-02] prune | compact | gaps.md
|
|
120
|
-
Compacted 4 [FILLED] gaps older than 90 days into this marker. No gap
|
|
120
|
+
Compacted 4 [FILLED] gaps older than 90 days into this marker. No open gap deleted.
|
|
121
121
|
```
|
|
122
122
|
|
|
123
123
|
Keep entries terse and factual: date, op, target paths, one-line why. The log is
|
|
@@ -108,7 +108,7 @@ sealed interface ArticlesUiState {
|
|
|
108
108
|
|
|
109
109
|
@HiltViewModel
|
|
110
110
|
class ArticlesViewModel @Inject constructor(
|
|
111
|
-
repository: ArticleRepository,
|
|
111
|
+
private val repository: ArticleRepository,
|
|
112
112
|
) : ViewModel() {
|
|
113
113
|
val uiState: StateFlow<ArticlesUiState> =
|
|
114
114
|
repository.observeArticles()
|
|
@@ -119,6 +119,10 @@ class ArticlesViewModel @Inject constructor(
|
|
|
119
119
|
started = SharingStarted.WhileSubscribed(5_000),
|
|
120
120
|
initialValue = ArticlesUiState.Loading,
|
|
121
121
|
)
|
|
122
|
+
|
|
123
|
+
fun refresh() {
|
|
124
|
+
viewModelScope.launch { repository.refresh() }
|
|
125
|
+
}
|
|
122
126
|
}
|
|
123
127
|
```
|
|
124
128
|
|
|
@@ -127,9 +131,12 @@ off-screen:
|
|
|
127
131
|
|
|
128
132
|
```kotlin
|
|
129
133
|
@Composable
|
|
130
|
-
fun ArticlesRoute(
|
|
134
|
+
fun ArticlesRoute(
|
|
135
|
+
onOpen: (String) -> Unit,
|
|
136
|
+
viewModel: ArticlesViewModel = hiltViewModel(),
|
|
137
|
+
) {
|
|
131
138
|
val state by viewModel.uiState.collectAsStateWithLifecycle()
|
|
132
|
-
ArticlesScreen(state = state, onRetry = viewModel::refresh)
|
|
139
|
+
ArticlesScreen(state = state, onRetry = viewModel::refresh, onOpen = onOpen)
|
|
133
140
|
}
|
|
134
141
|
```
|
|
135
142
|
|
|
@@ -37,7 +37,6 @@ kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serializa
|
|
|
37
37
|
|
|
38
38
|
[plugins]
|
|
39
39
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
|
40
|
-
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
|
41
40
|
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } # the Compose compiler plugin
|
|
42
41
|
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
|
43
42
|
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
|
@@ -53,7 +52,6 @@ tracks the Kotlin version automatically.
|
|
|
53
52
|
```kotlin
|
|
54
53
|
plugins {
|
|
55
54
|
alias(libs.plugins.android.application) apply false
|
|
56
|
-
alias(libs.plugins.kotlin.android) apply false
|
|
57
55
|
alias(libs.plugins.kotlin.compose) apply false
|
|
58
56
|
alias(libs.plugins.kotlin.serialization) apply false
|
|
59
57
|
alias(libs.plugins.ksp) apply false
|
|
@@ -65,8 +63,7 @@ plugins {
|
|
|
65
63
|
|
|
66
64
|
```kotlin
|
|
67
65
|
plugins {
|
|
68
|
-
alias(libs.plugins.android.application)
|
|
69
|
-
alias(libs.plugins.kotlin.android)
|
|
66
|
+
alias(libs.plugins.android.application) // AGP 9 compiles Kotlin itself: no org.jetbrains.kotlin.android
|
|
70
67
|
alias(libs.plugins.kotlin.compose) // Compose compiler — replaces composeOptions
|
|
71
68
|
alias(libs.plugins.kotlin.serialization)
|
|
72
69
|
alias(libs.plugins.ksp) // KSP, never kapt, for Room + Hilt
|
|
@@ -71,7 +71,7 @@ The H1 carries the *what*; the subhead carries the *benefit*; both must stay con
|
|
|
71
71
|
|
|
72
72
|
```text
|
|
73
73
|
Bad — "Reimagine The Future Of Financial Operations" (clever, 6 words, says nothing)
|
|
74
|
-
Good — "Expense reports done in 30 seconds" (clear,
|
|
74
|
+
Good — "Expense reports done in 30 seconds" (clear, 6 words, names the outcome)
|
|
75
75
|
Subhead: For finance teams drowning in receipts — snap, submit, approved.
|
|
76
76
|
```
|
|
77
77
|
|
package/skills/laravel/SKILL.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: laravel
|
|
3
|
-
description: "Use when building or extending a Laravel 11
|
|
3
|
+
description: "Use when building or extending a Laravel 11+ app — Eloquent models, migrations and relationships, routing with controllers and Form Requests, queues and background jobs, framework-native security (validation, mass-assignment, policies, signed URLs, rate limiting), and Pest/PHPUnit feature tests. NOT pure PHP language or toolchain work (that is `php`)."
|
|
4
4
|
tags: [laravel, php, eloquent, queues, pest, artisan]
|
|
5
5
|
recommends: [php, mysql, redis, api-design, security-audit, testing-web]
|
|
6
6
|
origin: risco
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
# Laravel (11
|
|
9
|
+
# Laravel (11–13 era)
|
|
10
10
|
|
|
11
|
-
Build Laravel the way the framework ships **today** — Laravel
|
|
12
|
-
PHP 8.
|
|
11
|
+
Build Laravel the way the framework ships **today** — Laravel 13 (released 2026-03-17,
|
|
12
|
+
PHP 8.3–8.5), on the slimmed skeleton Laravel 11 introduced. That means **no
|
|
13
13
|
`app/Http/Kernel.php` and no `app/Console/Kernel.php`**: middleware, routing, exception
|
|
14
14
|
handling and providers are all configured in **`bootstrap/app.php`**, and scheduled tasks
|
|
15
15
|
live in **`routes/console.php`**. Generate that structure, not 2019 Laravel.
|
|
@@ -26,18 +26,18 @@ A wrong version assumption generates dead code. Detect the version and skeleton
|
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
composer show laravel/framework # exact installed version
|
|
29
|
-
ls bootstrap/app.php # present -> L11
|
|
29
|
+
ls bootstrap/app.php # present -> L11+ slim skeleton
|
|
30
30
|
ls app/Http/Kernel.php 2>/dev/null # present -> L10 or older (Kernel era)
|
|
31
31
|
php artisan --version # confirms runtime + version
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
If `bootstrap/app.php` exists and `app/Http/Kernel.php` does **not**, you are on L11
|
|
34
|
+
If `bootstrap/app.php` exists and `app/Http/Kernel.php` does **not**, you are on L11+ —
|
|
35
35
|
use the modern idioms below. Then pick your path:
|
|
36
36
|
|
|
37
37
|
| Situation | Do |
|
|
38
38
|
|---|---|
|
|
39
39
|
| Greenfield | `laravel new <app>`, then a starter kit: React (React 19 + TS + Inertia 2 + shadcn/ui), Vue (Vue 3 + Inertia 2 + shadcn-vue), or Livewire (Livewire 3 + Volt + Flux UI). Optional WorkOS AuthKit for auth. |
|
|
40
|
-
| Brownfield L11
|
|
40
|
+
| Brownfield L11+ | Follow the repo's existing conventions; do not "reorganize" into folders it dropped. |
|
|
41
41
|
| Pre-11 (Kernel era) | Migrate to `bootstrap/app.php` deliberately; move Kernel middleware to `withMiddleware()`, schedule to `routes/console.php`. Treat as a project, not an inline tweak. |
|
|
42
42
|
|
|
43
43
|
## The slim structure (where things live now)
|
|
@@ -55,7 +55,7 @@ app/Policies/ # authorization policies
|
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
```php
|
|
58
|
-
// Bad: hunting for or editing app/Http/Kernel.php to register middleware (L11
|
|
58
|
+
// Bad: hunting for or editing app/Http/Kernel.php to register middleware (L11+ deleted it).
|
|
59
59
|
// Good: bootstrap/app.php
|
|
60
60
|
return Application::configure(basePath: dirname(__DIR__))
|
|
61
61
|
->withRouting(web: __DIR__.'/../routes/web.php', commands: __DIR__.'/../routes/console.php')
|
|
@@ -191,7 +191,7 @@ Bus::batch([new ProcessOrder($a), new ProcessOrder($b)])
|
|
|
191
191
|
| Simple, low volume, no extra infra | `database` driver (a `jobs` table) |
|
|
192
192
|
| High throughput + a dashboard (retries, runtime, failures) | **Redis + Horizon** — Horizon manages the workers and gives you the monitor |
|
|
193
193
|
|
|
194
|
-
Schedule recurring work in `routes/console.php` (the L11
|
|
194
|
+
Schedule recurring work in `routes/console.php` (the L11+ home for the scheduler — there
|
|
195
195
|
is no `app/Console/Kernel.php`):
|
|
196
196
|
|
|
197
197
|
```php
|
|
@@ -269,14 +269,14 @@ over rolling your own.
|
|
|
269
269
|
| Pattern | Why it is bad | Do instead |
|
|
270
270
|
|---|---|---|
|
|
271
271
|
| `protected $guarded = []` on a user-facing model | any request column becomes mass-assignable (`is_admin`, `balance`) | explicit `$fillable` allowlist |
|
|
272
|
-
| Hunting for / re-creating `app/Http/Kernel.php` on L11
|
|
272
|
+
| Hunting for / re-creating `app/Http/Kernel.php` on L11+ | the file was deleted; your middleware never registers | configure in `bootstrap/app.php` `withMiddleware()` |
|
|
273
273
|
| Lazy access inside a loop/Blade (`$post->author` per row) | N+1 — one query per row | eager load with `with()` |
|
|
274
274
|
| Fat controllers / logic in `routes/web.php` | untestable, unreusable, no authz boundary | thin controller + Form Request + service/model |
|
|
275
275
|
| Asserting a queued job's *side effects* in a test | sync driver runs it inline — you test execution, not dispatch | `Queue::fake()` + `Queue::assertPushed()` |
|
|
276
276
|
| `env()` outside `config/*.php` | returns `null` once `config:cache` runs in prod | read via `config()`; `env()` only inside config files |
|
|
277
277
|
| `$tries` unset on a flaky job | one transient failure = permanent failure | set `$tries` + `backoff()` |
|
|
278
278
|
| Committing real secrets in `.env` | leaks credentials into history | `.env` is git-ignored; commit `.env.example` only |
|
|
279
|
-
| Old `$casts = [...]` array (
|
|
279
|
+
| Old `$casts = [...]` array (legacy form, still supported) | misses the L11+ `casts()` method idioms | the `casts(): array` method |
|
|
280
280
|
|
|
281
281
|
## Verify
|
|
282
282
|
|
package/skills/lead-gen/SKILL.md
CHANGED
|
@@ -10,9 +10,9 @@ origin: risco
|
|
|
10
10
|
|
|
11
11
|
*You turn "we sell X to Y" into a deduplicated, scored, compliance-cleared roster of named accounts and people. You define the target, you build the list, you rank it — then you stop. What you produce is a prioritized roster plus the rationale that ranked it; the hand-off is the finish line, not the campaign.*
|
|
12
12
|
|
|
13
|
-
## The pipeline — three phases
|
|
13
|
+
## The pipeline — three phases and a compliance gate
|
|
14
14
|
|
|
15
|
-
Run these in order. Each
|
|
15
|
+
Run these in order. Each phase is a hard stop: do not advance until the prior phase produced its artifact.
|
|
16
16
|
|
|
17
17
|
1. **Define the target** → a falsifiable ICP + persona. *Why: you cannot dedupe or score against a vibe; a vague ICP guarantees reps chase the wrong companies.*
|
|
18
18
|
2. **Build the list** → sourced, deduped, verified rows with provenance. *Why: an unverified or undocumented list is a deliverability and legal liability before a single email goes out.*
|
|
@@ -120,7 +120,7 @@ A list that ships without these fields is not done. Run both checklists; the str
|
|
|
120
120
|
- [ ] A documented **Legitimate Interest Assessment (LIA)** exists.
|
|
121
121
|
- [ ] Every email will carry the data-source disclosure + a privacy-policy link + a one-click opt-out.
|
|
122
122
|
- [ ] Objections will be honored.
|
|
123
|
-
- [ ] **No
|
|
123
|
+
- [ ] **No bought or scraped list emailed as-is** — every row, including rows from a data vendor (Apollo, ZoomInfo), carries documented provenance and falls under the LIA; a list with no provenance confers no lawful basis.
|
|
124
124
|
|
|
125
125
|
**CAN-SPAM (US).** *(ftc.gov CAN-SPAM compliance guide, accessed 2026-06-02.)*
|
|
126
126
|
|
|
@@ -80,13 +80,13 @@ Before publishing as an org, confirm the authed member holds an eligible **page
|
|
|
80
80
|
Current organic endpoint: `POST https://api.linkedin.com/rest/posts`. The legacy `/v2/ugcPosts` and `/v2/shares` are deprecated — migrate to the versioned `/rest/posts`. Pin the version **once**:
|
|
81
81
|
|
|
82
82
|
```bash
|
|
83
|
-
LINKEDIN_VERSION=
|
|
83
|
+
LINKEDIN_VERSION=202611 # supported until 2027-11-16; 202511 is sunset — pinning a sunset version breaks
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
Every versioned call carries **two** headers (omit either and you get 426/400):
|
|
87
87
|
|
|
88
88
|
```text
|
|
89
|
-
Linkedin-Version:
|
|
89
|
+
Linkedin-Version: 202611
|
|
90
90
|
X-Restli-Protocol-Version: 2.0.0
|
|
91
91
|
```
|
|
92
92
|
|
|
@@ -200,7 +200,7 @@ CTR ~4.4%. The "common 403 causes" hook outperformed the plain howto.
|
|
|
200
200
|
|
|
201
201
|
| Anti-pattern | Why it breaks | Do instead |
|
|
202
202
|
|---|---|---|
|
|
203
|
-
| Pinning `Linkedin-Version:
|
|
203
|
+
| Pinning `Linkedin-Version: 202511` | That version is sunset; calls start failing on cutover | Pin `202611` in one constant; bump deliberately |
|
|
204
204
|
| Sending only `Linkedin-Version`, dropping `X-Restli-Protocol-Version` | Versioned endpoints reject the request (426/400) | Always send both headers together |
|
|
205
205
|
| Expecting the API to scrape an article URL | Posts API never fetches OG tags; you get a bare link | Set `source`/`title`/`description` + an uploaded Image URN |
|
|
206
206
|
| Reading the new post id from the response body | The URN is in `x-restli-id`, body has no id | Read the `x-restli-id` response header |
|
|
@@ -32,7 +32,7 @@ capability:
|
|
|
32
32
|
- scenario: "Take an app from zero to a logged result: complete 3-legged OAuth, resolve the org author URN, publish a document post (Documents API upload -> document URN -> Posts API), pull organizationalEntityShareStatistics, and write 02-DOCS/wiki/linkedin/<post-id>.md with the metric front-matter."
|
|
33
33
|
must_include:
|
|
34
34
|
- "sends both required headers: Linkedin-Version and X-Restli-Protocol-Version: 2.0.0"
|
|
35
|
-
- "pins version
|
|
35
|
+
- "pins version 202611 (not the sunset 202511)"
|
|
36
36
|
- "sets lifecycleState: PUBLISHED in the post body"
|
|
37
37
|
- "reads the new post URN from the x-restli-id response header"
|
|
38
38
|
- "uploads the document via the Documents API to get urn:li:document: then references it in content.media.id"
|
|
@@ -4,11 +4,11 @@ Offloaded depth for `linkedin-api`. All paths assume the two versioned headers f
|
|
|
4
4
|
|
|
5
5
|
```text
|
|
6
6
|
Authorization: Bearer $LINKEDIN_TOKEN
|
|
7
|
-
Linkedin-Version:
|
|
7
|
+
Linkedin-Version: 202611
|
|
8
8
|
X-Restli-Protocol-Version: 2.0.0
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
`
|
|
11
|
+
`202611` (`li-lms-2026-11`) is the latest version, sunset 2027-11-16. LinkedIn ships a version each month and supports it for at least one year — check the [API migration status](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/migrations#api-migration-status) table before pinning or bumping. `202511` is sunset — do not pin it.
|
|
12
12
|
|
|
13
13
|
## Publish payloads — `POST /rest/posts`
|
|
14
14
|
|
|
@@ -83,7 +83,7 @@ Images / Documents / Videos use the same two-step shape: register an upload to g
|
|
|
83
83
|
# Images example
|
|
84
84
|
curl -X POST "https://api.linkedin.com/rest/images?action=initializeUpload" \
|
|
85
85
|
-H "Authorization: Bearer $LINKEDIN_TOKEN" \
|
|
86
|
-
-H "Linkedin-Version:
|
|
86
|
+
-H "Linkedin-Version: 202611" \
|
|
87
87
|
-H "X-Restli-Protocol-Version: 2.0.0" \
|
|
88
88
|
-H "Content-Type: application/json" \
|
|
89
89
|
-d '{ "initializeUploadRequest": { "owner": "urn:li:organization:12345" } }'
|