@ericrisco/rsc 0.1.44 → 0.1.46
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/README.md +1 -1
- package/manifest.json +110 -86
- package/package.json +1 -1
- package/scripts/lib/domains.js +1 -1
- package/scripts/skill-migration-brief.md +192 -0
- package/skills/ab-testing/SKILL.md +9 -41
- package/skills/accessibility/SKILL.md +5 -7
- package/skills/ads/SKILL.md +9 -24
- package/skills/agent-eval/SKILL.md +7 -33
- package/skills/agent-safety/SKILL.md +7 -14
- package/skills/ai-media/SKILL.md +4 -20
- package/skills/analytics/SKILL.md +8 -30
- package/skills/analyze/SKILL.md +24 -59
- package/skills/angular/SKILL.md +12 -25
- package/skills/api-connector-builder/SKILL.md +10 -27
- package/skills/api-design/SKILL.md +7 -14
- package/skills/article-writing/SKILL.md +1 -18
- package/skills/astro/SKILL.md +36 -54
- package/skills/author-skill/SKILL.md +41 -74
- package/skills/author-skill/evals/README.md +5 -5
- package/skills/author-skill/evals/cases.yaml +8 -8
- package/skills/author-skill/references/description-recipe.md +25 -26
- package/skills/author-skill/references/eval-authoring.md +1 -1
- package/skills/author-skill/references/rsc-conventions.md +1 -1
- package/skills/automation-flows/SKILL.md +6 -16
- package/skills/automation-strategy/SKILL.md +1 -9
- package/skills/aws-essentials/SKILL.md +6 -23
- package/skills/backups/SKILL.md +1 -7
- package/skills/bash-scripting/SKILL.md +5 -9
- package/skills/bookkeeping/SKILL.md +2 -10
- package/skills/brand-identity/SKILL.md +18 -44
- package/skills/brand-voice/SKILL.md +4 -31
- package/skills/building-agents/SKILL.md +20 -103
- package/skills/business-intelligence/SKILL.md +9 -23
- package/skills/calendar-scheduling/SKILL.md +11 -27
- package/skills/case-studies/SKILL.md +3 -8
- package/skills/chatbot/SKILL.md +6 -23
- package/skills/chrome-extension/SKILL.md +2 -2
- package/skills/clarify/SKILL.md +31 -72
- package/skills/clickhouse-analytics/SKILL.md +2 -8
- package/skills/client-onboarding/SKILL.md +17 -19
- package/skills/cloudflare/SKILL.md +3 -8
- package/skills/code-review/SKILL.md +10 -23
- package/skills/codebase-onboarding/SKILL.md +2 -7
- package/skills/cold-outreach/SKILL.md +9 -30
- package/skills/community/SKILL.md +4 -31
- package/skills/competitor-watch/SKILL.md +20 -35
- package/skills/compliance/SKILL.md +10 -37
- package/skills/compose-multiplatform/SKILL.md +1 -1
- package/skills/constitution/SKILL.md +8 -35
- package/skills/content-engine/SKILL.md +4 -16
- package/skills/context-budget/SKILL.md +3 -21
- package/skills/continuous-learning/SKILL.md +10 -40
- package/skills/contracts/SKILL.md +6 -17
- package/skills/coolify/SKILL.md +8 -14
- package/skills/cost-tracking/SKILL.md +3 -11
- package/skills/course-builder/SKILL.md +17 -45
- package/skills/course-storytelling/SKILL.md +26 -94
- package/skills/cpp/SKILL.md +26 -71
- package/skills/csharp-dotnet/SKILL.md +19 -38
- package/skills/customer-support/SKILL.md +14 -37
- package/skills/dashboard/SKILL.md +6 -26
- package/skills/data-cleaning/SKILL.md +37 -63
- package/skills/data-policy/SKILL.md +8 -21
- package/skills/data-scraper/SKILL.md +1 -7
- package/skills/debug/SKILL.md +10 -49
- package/skills/deployment/SKILL.md +38 -101
- package/skills/design/SKILL.md +34 -116
- package/skills/fable-operator/SKILL.md +1 -4
- package/skills/fastapi/SKILL.md +50 -82
- package/skills/flutter/SKILL.md +41 -89
- package/skills/go/SKILL.md +57 -105
- package/skills/harness/SKILL.md +52 -68
- package/skills/implement/SKILL.md +1 -1
- package/skills/init/SKILL.md +152 -168
- package/skills/marketing/SKILL.md +30 -80
- package/skills/nextjs/SKILL.md +42 -116
- package/skills/orient/SKILL.md +25 -20
- package/skills/parallel/SKILL.md +9 -75
- package/skills/plan/SKILL.md +92 -165
- package/skills/postgresdb/SKILL.md +52 -72
- package/skills/presentations/SKILL.md +49 -87
- package/skills/python/SKILL.md +23 -72
- package/skills/react/SKILL.md +19 -67
- package/skills/review/SKILL.md +22 -52
- package/skills/rust/SKILL.md +40 -115
- package/skills/sdd-init/SKILL.md +9 -14
- package/skills/secure-coding/SKILL.md +80 -109
- package/skills/ship/SKILL.md +25 -55
- package/skills/tasks/SKILL.md +37 -61
- package/skills/typescript/SKILL.md +22 -55
- package/skills/verify/SKILL.md +8 -32
- package/skills/viral-score/SKILL.md +122 -0
- package/skills/viral-score/evals/README.md +16 -0
- package/skills/viral-score/evals/cases.yaml +50 -0
- package/skills/vue-nuxt/SKILL.md +45 -106
- package/skills/worktrees/SKILL.md +24 -69
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: marketing
|
|
3
|
-
description: "Use when
|
|
3
|
+
description: "Use when the words span a marketing surface — value proposition, section copy, microcopy, launch and email sequences, channel adaptation, SEO-aware structure — grounded in the brand study, which it stops and builds if missing. NOT one conversion page (that is `landing-copy`), NOT tone rules (that is `brand-voice`), NOT pixels (that is `design`)."
|
|
4
4
|
tags: [marketing, copywriting, landing, content]
|
|
5
5
|
recommends: [presentations, design]
|
|
6
6
|
origin: risco
|
|
@@ -10,26 +10,7 @@ origin: risco
|
|
|
10
10
|
|
|
11
11
|
*The words, not the pixels. Ground in the brand study first, then write copy that is specific, benefit-led, and unmistakably this brand.*
|
|
12
12
|
|
|
13
|
-
This skill owns **conversion copywriting**: value proposition, headlines, section-by-section landing copy, microcopy, CTAs, email/launch sequences, channel adaptation, and SEO-aware copy structure. The sibling `design` skill owns the visual/UX (type, color, layout, motion); `nextjs` owns the build. When asked for "a landing page", you write the copy
|
|
14
|
-
|
|
15
|
-
## When to use / When NOT to use
|
|
16
|
-
|
|
17
|
-
Use when:
|
|
18
|
-
|
|
19
|
-
- Writing or rewriting a landing page, marketing site, or pricing page — the copy.
|
|
20
|
-
- Crafting a value proposition or positioning statement.
|
|
21
|
-
- Writing headlines, subheads, section copy, microcopy, or CTAs.
|
|
22
|
-
- Building an email sequence, launch announcement, or nurture flow.
|
|
23
|
-
- Adapting one message across channels (X, LinkedIn, newsletter, ads).
|
|
24
|
-
- Rescuing copy that "sounds like AI" or reads generic.
|
|
25
|
-
|
|
26
|
-
Do NOT use when (delegate or decline):
|
|
27
|
-
|
|
28
|
-
- Choosing type/color/spacing/layout/motion, or the section visual anatomy → `design`.
|
|
29
|
-
- Implementing the page in React/Next.js (Metadata API, rendering, components) → `nextjs`.
|
|
30
|
-
- Implementing schema/Metadata in React/Next.js code → `nextjs` (this skill specifies the title/description/JSON-LD; `nextjs` renders it). Technical SEO, GEO, schema, and keyword research themselves are owned here → `references/seo-geo.md`.
|
|
31
|
-
- Capturing or persisting a project's brand/voice profile → that is THIS skill's brand-grounding step, persisted under `02-DOCS` per `harness`.
|
|
32
|
-
- Long-form articles, blog posts, or social content systems with no landing/web surface → that is a content job, not landing copy; this skill stays on landings, web pages, and the launch/email/channel copy around them.
|
|
13
|
+
This skill owns **conversion copywriting**: value proposition, headlines, section-by-section landing copy, microcopy, CTAs, email/launch sequences, channel adaptation, and SEO-aware copy structure. The sibling `design` skill owns the visual/UX (type, color, layout, motion); `nextjs` owns the build — including rendering in React the Metadata and JSON-LD this skill specifies. Long-form articles, blog posts, or social content systems with no landing/web surface are a content job, not landing copy. When asked for "a landing page", you write the copy.
|
|
33
14
|
|
|
34
15
|
## Brand grounding (read this first)
|
|
35
16
|
|
|
@@ -42,30 +23,15 @@ Run this gate before writing a single line of copy:
|
|
|
42
23
|
2. **Check completeness** against the checklist in `references/brand-grounding.md`. The study is complete only when every dimension is filled: brand name & one-line positioning; ICP / audience & their pains & desires; value proposition & differentiation; tone & voice WITH do/don't word lists and 3–5 voice samples pasted from the user's real writing; proof/credibility; offers & primary CTA; channels; SEO keywords. **Any empty dimension = INCOMPLETE.**
|
|
43
24
|
|
|
44
25
|
3. **If ABSENT or INCOMPLETE, STOP and interview the user.** Ask the targeted questions from `references/brand-grounding.md`, **one focused batch at a time** (do not dump all questions at once; ask, wait, then continue). Voice samples are mandatory — request 3–5 pieces of the user's real writing; never fabricate a voice. Then:
|
|
45
|
-
- **a.** Write/update the brand study into `02-DOCS/wiki/brand/` as wiki articles (one article per dimension or a single `index.md` plus per-dimension articles), following the wiki article format in `references/brand-grounding.md
|
|
46
|
-
- **b.** Add or update a `## Brand & voice` section in the root `CLAUDE.md` linking to the brand study. Create `CLAUDE.md` if absent (additive only — never delete existing sections). The exact snippet to insert is in `references/brand-grounding.md`.
|
|
26
|
+
- **a.** Write/update the brand study into `02-DOCS/wiki/brand/` as wiki articles (one article per dimension or a single `index.md` plus per-dimension articles), following the wiki article format in `references/brand-grounding.md`, and index it in `02-DOCS/wiki/index.md` (the Knowledge map). Save any raw text the user pastes verbatim into `02-DOCS/raw/brand/` and link to it from the article's `> Raw:` line. Create the directories if they do not exist.
|
|
27
|
+
- **b.** Add or update a `## Brand & voice` section in the root `CLAUDE.md` linking to the brand study — a short pointer only. Create `CLAUDE.md` if absent (additive only — never delete existing sections). The exact snippet to insert is in `references/brand-grounding.md`.
|
|
47
28
|
|
|
48
|
-
4. **Only once the study exists and is complete, proceed.** Cite which brand articles you used (e.g. "grounded in `02-DOCS/wiki/brand/value-proposition.md` and `voice.md`") so the user can trace every claim back to the study.
|
|
29
|
+
4. **Only once the study exists and is complete, proceed.** Cite which brand articles you used (e.g. "grounded in `02-DOCS/wiki/brand/value-proposition.md` and `voice.md`") so the user can trace every claim back to the study. Every line you then write must plausibly come from the brand's own writing; if it reads like a different author, rewrite.
|
|
49
30
|
|
|
50
31
|
If the user explicitly says "skip the brand study, just draft something rough", you may produce a clearly-labelled `DRAFT (ungrounded — not brand-checked)` and still recommend running the gate before anything ships. That is the only exception, and it must be labelled.
|
|
51
32
|
|
|
52
33
|
Full completeness checklist, the exact question script (batched), and the persistence format → `references/brand-grounding.md`.
|
|
53
34
|
|
|
54
|
-
## The non-negotiables
|
|
55
|
-
|
|
56
|
-
These are constraints, not preferences. Violating any one is a defect.
|
|
57
|
-
|
|
58
|
-
1. **Brand study first.** No copy before the grounding gate passes (above). Cite the articles you used.
|
|
59
|
-
2. **5-second value-prop test.** A stranger reads the hero and can say *what it is, who it's for, why it's better* — within 5 seconds. If not, rewrite before anything else.
|
|
60
|
-
3. **Specificity beats adjectives.** Replace "fast", "powerful", "seamless" with a number, a mechanism, or a receipt. "Fast" is a claim; "30 seconds" is evidence.
|
|
61
|
-
4. **Benefit-led, climbing feature → benefit → proof.** Stop at the rung the reader cares about (the benefit) and back it with proof.
|
|
62
|
-
5. **One primary CTA per viewport**, value on the button ("Start free", not "Submit"). Pair it with friction-reducing microcopy ("No credit card required").
|
|
63
|
-
6. **One claim per asset.** A post, an email, a section each carry one real claim — not five hedged ones.
|
|
64
|
-
7. **Match the voice samples.** Every line must plausibly come from the brand's own writing. If it reads like a different author, rewrite.
|
|
65
|
-
8. **The ban-list is enforced everywhere.** Hype words and AI tells are defects, not style. (See ban-list below; `scripts/verify.sh` greps for them.)
|
|
66
|
-
9. **No invented proof.** Never fabricate metrics, customers, quotes, or credentials. Mark `[[NEEDS PROOF]]` and ask.
|
|
67
|
-
10. **SEO-aware structure, not keyword stuffing.** One `<h1>`, scannable subheads that answer queries, benefit in the first 160 chars. Keyword stuffing *lowers* AI citation — full technical SEO/GEO is in `references/seo-geo.md`.
|
|
68
|
-
|
|
69
35
|
## Copy workflow (the one pass)
|
|
70
36
|
|
|
71
37
|
Run in order. Each step feeds the next; skipping one shows up as vague copy downstream.
|
|
@@ -74,13 +40,13 @@ Run in order. Each step feeds the next; skipping one shows up as vague copy down
|
|
|
74
40
|
2. **Lock the value proposition.** Fill the value-proposition canvas (jobs / pains / gains → pain-relievers / gain-creators → headline). → `references/copy-frameworks.md`.
|
|
75
41
|
3. **Pick the framework** by traffic temperature and funnel position: PAS for pain-aware cold traffic; AIDA for broad top-of-funnel; FAB/JTBD for feature → benefit; BAB for transformation/case-study. → `references/copy-frameworks.md`.
|
|
76
42
|
4. **Write section by section.** Each landing section has one job and one framework. Map your copy to the design skill's section anatomy. → `references/landing-copy.md`.
|
|
77
|
-
5. **Write the microcopy and CTAs.**
|
|
43
|
+
5. **Write the microcopy and CTAs.** One primary CTA per viewport — choice kills conversion — with a value verb on the button ("Start free", not "Submit"), reassurance under it ("No credit card required"), and human empty/loading/error states. → `references/copy-frameworks.md`.
|
|
78
44
|
6. **Adapt for channels** if the task spans more than the page (email sequence, launch, X/LinkedIn/newsletter). → `references/campaigns-and-channels.md`.
|
|
79
45
|
7. **Run the QA gate** (below) and `scripts/verify.sh`. Fix every flag or justify it.
|
|
80
46
|
|
|
81
47
|
## Headlines & value proposition in 60 seconds
|
|
82
48
|
|
|
83
|
-
The headline is the highest-leverage copy on the page. Build it from the canvas, not from a thesaurus.
|
|
49
|
+
The headline is the highest-leverage copy on the page. Build it from the canvas, not from a thesaurus. It has one test: a stranger reads the hero and can say *what it is, who it's for, why it's better* — within 5 seconds. If it fails, rewrite it before anything else on the page.
|
|
84
50
|
|
|
85
51
|
```text
|
|
86
52
|
VALUE-PROP CANVAS (fill before writing the headline)
|
|
@@ -98,7 +64,7 @@ Headline formula slots (pick one, fill with brand specifics):
|
|
|
98
64
|
- **Outcome + timeframe** — "Preview every branch in 30 seconds".
|
|
99
65
|
- **X without Y** — "Live previews without a staging queue".
|
|
100
66
|
- **JTBD** — "When you open a PR, get a live URL automatically".
|
|
101
|
-
- **Specificity** — replace an adjective with a number: "Cut review setup from 20 min to 30 sec".
|
|
67
|
+
- **Specificity** — replace an adjective with a number. "Fast" is a claim; "30 seconds" is evidence: "Cut review setup from 20 min to 30 sec".
|
|
102
68
|
|
|
103
69
|
```text
|
|
104
70
|
Bad — "Revolutionize your workflow with our seamless, cutting-edge platform"
|
|
@@ -109,7 +75,7 @@ Full canvas walk-through, PAS/AIDA/FAB/BAB/JTBD with Bad→Good rewrites, headli
|
|
|
109
75
|
|
|
110
76
|
## Landing copy by section
|
|
111
77
|
|
|
112
|
-
Each section earns its place by doing one job. Cut any section with no job. This maps 1:1 to the `design` skill's section anatomy — `design` owns the visual treatment, this skill owns the words inside it.
|
|
78
|
+
Each section earns its place by doing one job. Cut any section with no job. This maps 1:1 to the `design` skill's section anatomy — `design` owns the visual treatment, this skill owns the words inside it. Within every section, climb feature → benefit → proof, stop at the rung the reader cares about (the benefit), and back it with proof.
|
|
113
79
|
|
|
114
80
|
| Section | Copy job | Framework |
|
|
115
81
|
| --- | --- | --- |
|
|
@@ -133,21 +99,20 @@ Full per-section copy patterns, hero variants, social-proof formats, pricing cop
|
|
|
133
99
|
|
|
134
100
|
## Campaigns & channels
|
|
135
101
|
|
|
136
|
-
When the task is bigger than the page — a launch, an email sequence, cross-channel messaging.
|
|
102
|
+
When the task is bigger than the page — a launch, an email sequence, cross-channel messaging. One claim per asset: a post, an email, a section each carry one real claim, not five hedged ones.
|
|
137
103
|
|
|
138
104
|
- **Email sequences:** welcome email inside 5 minutes of opt-in (highest open rate of the whole flow); 4-touch starter cadence Day 1 welcome → Day 4 educational → Day 8 case study → Day 12 soft pitch; nurture runs 7–10 emails every 1–2 weeks. One purpose per email. Hold promo language ("free", "limited time") out of early emails to protect deliverability and trust.
|
|
139
105
|
- **Launch:** sequence the beats (tease → reveal → proof → urgency → recap), one claim per beat, every claim traceable to the brand study's proof.
|
|
140
106
|
- **Channel adaptation:** adapt the *format* to the platform, never resize the same copy. X opens with the sharpest claim; LinkedIn expands just enough for outsiders; newsletter does real work in the first screen.
|
|
141
|
-
- **SEO-aware structure:** one `<h1>`, scannable subheads as query answers, benefit in the first 160 chars; full technical SEO/GEO in `references/seo-geo.md`.
|
|
142
107
|
|
|
143
108
|
Full email templates, subject-line patterns, launch arc, X/LinkedIn/newsletter adaptation, SEO-aware structure → `references/campaigns-and-channels.md`.
|
|
144
109
|
|
|
145
110
|
## SEO & GEO
|
|
146
111
|
|
|
147
|
-
|
|
148
|
-
160 chars
|
|
149
|
-
cited by AI engines** — go to `references/seo-geo.md`. It owns
|
|
150
|
-
schema, per-engine GEO, and keyword/SERP research.
|
|
112
|
+
Keep copy *SEO-aware* by default: one `<h1>`, scannable subheads that answer queries, benefit in the
|
|
113
|
+
first 160 chars. Keyword stuffing *lowers* AI citation. When the task is the visibility layer itself
|
|
114
|
+
— ranking on Google/Bing **and getting cited by AI engines** — go to `references/seo-geo.md`. It owns
|
|
115
|
+
technical + on-page SEO, JSON-LD schema, per-engine GEO, and keyword/SERP research.
|
|
151
116
|
|
|
152
117
|
- **SEO** = rank in traditional results (**Google, Bing**). **GEO** (Generative Engine
|
|
153
118
|
Optimization) = get *cited* inside an AI answer (**ChatGPT, Perplexity, Gemini/AI Overviews,
|
|
@@ -157,9 +122,9 @@ schema, per-engine GEO, and keyword/SERP research.
|
|
|
157
122
|
attributed*, not clicked.
|
|
158
123
|
- **GEO and this skill agree.** The top GEO moves (Princeton, KDD 2024) are *cite sources, add
|
|
159
124
|
statistics, add quotations, authoritative tone* — the same "specificity beats adjectives, no
|
|
160
|
-
invented proof, one claim per asset" discipline
|
|
161
|
-
AI citation (~−10%). The proof rule is absolute: **never fabricate the stat or
|
|
162
|
-
the lift** — mark `[[NEEDS PROOF]]` and source it.
|
|
125
|
+
invented proof, one claim per asset" discipline this skill enforces everywhere else. Keyword
|
|
126
|
+
stuffing lowers AI citation (~−10%). The proof rule is absolute: **never fabricate the stat or
|
|
127
|
+
quote that earns the lift** — mark `[[NEEDS PROOF]]` and source it.
|
|
163
128
|
- **Audit first, free, no API:** `python3 scripts/seo_audit.py "https://yoursite.com"` reports
|
|
164
129
|
title/description lengths, single-`<h1>`, JSON-LD count, load time, robots/AI-bot access, sitemap.
|
|
165
130
|
- **Crawler reality (2026):** `OAI-SearchBot`/`Claude-SearchBot`/`PerplexityBot` (+ the `*-User`
|
|
@@ -171,7 +136,7 @@ and SEO/GEO QA gate → `references/seo-geo.md`. Implementing schema/Metadata in
|
|
|
171
136
|
|
|
172
137
|
## The ban-list
|
|
173
138
|
|
|
174
|
-
State once, enforce everywhere. These signal AI-template copy and erode trust. `scripts/verify.sh` greps for them.
|
|
139
|
+
State once, enforce everywhere. These are defects, not style: they signal AI-template copy and erode trust. `scripts/verify.sh` greps for them.
|
|
175
140
|
|
|
176
141
|
`revolutionary` · `game-changer` · `cutting-edge` · `world-class` · `unlock` · `seamless` · `elevate` · `supercharge` · `next-level` · "In today's landscape" · "In today's fast-paced world" · bait questions ("Tired of slow deploys?") · "not X, just Y" / "not just X" · forced lowercase as a style · "Excited to share" · hollow proof ("thousands trust us") · generic CTAs ("Learn more", "Click here", "Submit") · fake urgency with no real deadline.
|
|
177
142
|
|
|
@@ -182,19 +147,19 @@ Good — "We rebuilt deploys around one CLI step. Here's what changed: 22 min
|
|
|
182
147
|
|
|
183
148
|
The brand study's do/don't word lists EXTEND this list per project — always apply both.
|
|
184
149
|
|
|
185
|
-
## Anti-patterns
|
|
150
|
+
## Anti-patterns
|
|
186
151
|
|
|
187
|
-
|
|
|
152
|
+
| Anti-pattern | Why it fails / the fix |
|
|
188
153
|
| --- | --- |
|
|
189
|
-
|
|
|
190
|
-
|
|
|
191
|
-
|
|
|
192
|
-
|
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
-
|
|
|
196
|
-
|
|
|
197
|
-
|
|
|
154
|
+
| Skipping the brand study because "I know the brand" | Your default voice is AI-median. Run the gate; cite the articles. |
|
|
155
|
+
| Leaning on the image and letting the copy stay vague | Copy carries the value prop. Pass the 5s test in words. |
|
|
156
|
+
| Reaching for adjectives to sound premium | They make it sound generic. Replace with a number or mechanism. |
|
|
157
|
+
| Listing every feature "so they see the value" | Feature dumps bury the benefit. Climb to benefit, back with proof. |
|
|
158
|
+
| Dropping in any testimonial to fill the proof slot | A vague rave < one hard number. Quantify and attribute. |
|
|
159
|
+
| Five CTAs "to give them options" | Choice kills conversion. One primary action per viewport. |
|
|
160
|
+
| Hype words because "they test well" | They erode trust and trip the ban-list. Specificity converts. |
|
|
161
|
+
| Inventing a plausible metric to fill a gap | Never. Mark `[[NEEDS PROOF]]` and ask the user. |
|
|
162
|
+
| Reusing the same copy on X and LinkedIn | Resize ≠ adapt. Different format per platform, same claim. |
|
|
198
163
|
|
|
199
164
|
## Copy QA gate
|
|
200
165
|
|
|
@@ -206,6 +171,7 @@ Run before claiming done. `scripts/verify.sh` automates the greppable subset.
|
|
|
206
171
|
- [ ] Every claim is specific (number / mechanism / receipt), not an adjective.
|
|
207
172
|
- [ ] Copy climbs feature → benefit → proof; lands on the benefit.
|
|
208
173
|
- [ ] One primary CTA per viewport; value on the button; reassurance microcopy present.
|
|
174
|
+
- [ ] One claim per asset — no post, email, or section carrying five hedged ones.
|
|
209
175
|
- [ ] No invented proof; every gap marked `[[NEEDS PROOF]]`.
|
|
210
176
|
- [ ] Voice matches the brand study's samples and do/don't lists.
|
|
211
177
|
- [ ] Ban-list words absent (global list + brand don't-words).
|
|
@@ -215,19 +181,3 @@ Run before claiming done. `scripts/verify.sh` automates the greppable subset.
|
|
|
215
181
|
- [ ] Title 50–60 chars, meta description 120–160, benefit in the first 160 chars.
|
|
216
182
|
|
|
217
183
|
Automate → `scripts/verify.sh` (read-only grep gate; warns by default, `--strict` to gate CI).
|
|
218
|
-
|
|
219
|
-
## Project grounding (02-DOCS + CLAUDE.md)
|
|
220
|
-
|
|
221
|
-
This skill's 02-DOCS record is the **brand & voice study** at `02-DOCS/wiki/brand/` — a hard
|
|
222
|
-
gate (see "Brand grounding" above): if the root `CLAUDE.md` lacks the link or the study is
|
|
223
|
-
incomplete (no voice samples, positioning, do/don't lists), ask until complete, persist it, and
|
|
224
|
-
index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short
|
|
225
|
-
pointer to it). Read it first on every use and ground all copy in it. Site and visual conventions
|
|
226
|
-
belong to the sibling `design` and `nextjs` articles in the same Knowledge map index.
|
|
227
|
-
|
|
228
|
-
## See Also
|
|
229
|
-
|
|
230
|
-
- `../design/SKILL.md` — the pixels: visual system, layout, section anatomy, motion, design QA.
|
|
231
|
-
- `../nextjs/SKILL.md` — the build: App Router, Metadata API, React 19 rendering.
|
|
232
|
-
- `../harness/SKILL.md` — the `02-DOCS` Karpathy-wiki convention this skill persists the brand study into.
|
|
233
|
-
- References: `references/brand-grounding.md`, `references/copy-frameworks.md`, `references/landing-copy.md`, `references/campaigns-and-channels.md`, `references/seo-geo.md` (technical SEO + GEO + schema + keyword research).
|
package/skills/nextjs/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: nextjs
|
|
3
|
-
description: "Use when building, reviewing, testing, securing, or optimizing a Next.js App Router app
|
|
3
|
+
description: "Use when building, reviewing, testing, securing, or optimizing a Next.js App Router app: Server vs Client boundaries, `use server` actions, route handlers, the v15 vs v16 `use cache` caching model, metadata/SEO, auth, and Core Web Vitals. NOT framework-agnostic React or a Vite SPA (that is `react`), and NOT visual/UI design (that is `design`)."
|
|
4
4
|
tags: [nextjs, react, frontend, web, seo, ssr]
|
|
5
5
|
recommends: [design, secure-coding, deployment]
|
|
6
6
|
origin: risco
|
|
@@ -8,28 +8,19 @@ origin: risco
|
|
|
8
8
|
|
|
9
9
|
# Next.js App Router — RSC, Server Actions, React 19, TypeScript
|
|
10
10
|
|
|
11
|
-
> Build, review, test, secure
|
|
12
|
-
> both the Next.js 15 (uncached-by-default) and Next.js 16 (`use cache`) caching models.
|
|
11
|
+
> Build, review, test, secure and optimize App Router apps, handling both the Next.js 15 (uncached-by-default) and Next.js 16 (`use cache`) caching models correctly.
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
> **SDD gate — read before writing code.** If this fired on a **new, non-trivial feature or
|
|
14
|
+
> behaviour change** and there is **no approved spec + plan** under `02-DOCS/wiki/sdd/`, STOP and
|
|
15
|
+
> hand off to `../specify/SKILL.md` (brainstorm → spec → plan → tasks); it routes back here once the
|
|
16
|
+
> plan is approved. Build directly only for a genuinely one-line / low-risk change. Method:
|
|
17
|
+
> `../sdd/SKILL.md`.
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
- Deciding Server vs Client Component, or fixing an RSC boundary / hydration mismatch.
|
|
22
|
-
- Writing server actions or route handlers; wiring `useActionState` + zod forms.
|
|
23
|
-
- Configuring caching/revalidation (either model), auth, middleware/`proxy.ts`, or CSP.
|
|
24
|
-
- Diagnosing waterfalls, bundle bloat, or Core Web Vitals regressions.
|
|
25
|
-
- Writing Vitest/Playwright tests for Next.js code.
|
|
26
|
-
|
|
27
|
-
**Do NOT use when (redirect target each):**
|
|
28
|
-
|
|
29
|
-
- Pages Router (`pages/`) work → note the difference, defer to the Next.js Pages docs.
|
|
30
|
-
- Pure React SPA (Vite/CRA) or React Native / Expo → use a generic React skill; out of scope here.
|
|
31
|
-
- Non-Next backend (FastAPI/Go) → see `../fastapi/SKILL.md`, `../go/SKILL.md`.
|
|
32
|
-
- Generic React-shape questions with no Next/RSC dimension → keep brief, point to `references/react.md`.
|
|
19
|
+
**Not this skill:** Pages Router (`pages/`) — note the difference, defer to the Next.js Pages docs.
|
|
20
|
+
A pure React SPA (Vite/CRA) → `../react/SKILL.md`; React Native / Expo → `../react-native/SKILL.md`;
|
|
21
|
+
a generic React question with no Next/RSC dimension → keep it brief, from `references/react.md`.
|
|
22
|
+
Non-Next backends → `../fastapi/SKILL.md`, `../go/SKILL.md`; the data layer behind the DAL →
|
|
23
|
+
`../postgresdb/SKILL.md`; framework-agnostic security → `../secure-coding/SKILL.md`, complemented here, never duplicated.
|
|
33
24
|
|
|
34
25
|
## First: detect the project's version & caching model
|
|
35
26
|
|
|
@@ -120,17 +111,15 @@ export async function renameProject(_prev: RenameResult | null, formData: FormDa
|
|
|
120
111
|
}
|
|
121
112
|
```
|
|
122
113
|
|
|
123
|
-
Two invocation modes:
|
|
124
|
-
|
|
125
|
-
- `<form action={renameProject}>` — progressive enhancement, works without JS.
|
|
126
|
-
- Imperative from a client handler wrapped in `startTransition(() => renameProject(null, fd))`.
|
|
127
|
-
|
|
128
|
-
Deep dives: `references/security.md` (auth/CSRF) and `references/data-and-caching.md` (mutations).
|
|
114
|
+
Two invocation modes: `<form action={renameProject}>` — progressive enhancement, works without JS —
|
|
115
|
+
or imperative from a client handler wrapped in `startTransition(() => renameProject(null, fd))`.
|
|
129
116
|
|
|
130
117
|
## Route Handlers (`route.ts`)
|
|
131
118
|
|
|
132
119
|
Use a Route Handler for: webhooks, a public JSON API, OAuth callbacks, streaming responses, and
|
|
133
|
-
non-form clients. Use a **Server Action instead** for internal form mutations.
|
|
120
|
+
non-form clients. Use a **Server Action instead** for internal form mutations. GET handlers are
|
|
121
|
+
uncached by default on v15 (control with `export const dynamic` / `runtime`), and every handler —
|
|
122
|
+
GET included — runs its own `auth()` check and scopes reads to the session user.
|
|
134
123
|
|
|
135
124
|
```ts
|
|
136
125
|
// app/api/projects/route.ts
|
|
@@ -139,14 +128,6 @@ import { z } from "zod";
|
|
|
139
128
|
import { auth } from "@/auth";
|
|
140
129
|
import { db } from "@/lib/db";
|
|
141
130
|
|
|
142
|
-
// GET handlers are uncached by default on v15. Control with: export const dynamic / runtime.
|
|
143
|
-
export async function GET(_req: NextRequest) {
|
|
144
|
-
const session = await auth();
|
|
145
|
-
if (!session?.user) return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
|
|
146
|
-
const projects = await db.project.findMany({ where: { ownerId: session.user.id } });
|
|
147
|
-
return NextResponse.json({ projects });
|
|
148
|
-
}
|
|
149
|
-
|
|
150
131
|
const CreateSchema = z.object({ name: z.string().min(1).max(120) });
|
|
151
132
|
|
|
152
133
|
export async function POST(req: NextRequest) {
|
|
@@ -170,19 +151,8 @@ export async function POST(req: NextRequest) {
|
|
|
170
151
|
| `not-found.tsx` | Rendered by `notFound()` and unmatched routes |
|
|
171
152
|
| `global-error.tsx` | Replaces the root layout when the root throws |
|
|
172
153
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
"use client";
|
|
176
|
-
export default function Error({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) {
|
|
177
|
-
return (
|
|
178
|
-
<div role="alert">
|
|
179
|
-
<h2>Could not load projects</h2>
|
|
180
|
-
<p>{error.message}</p>
|
|
181
|
-
<button onClick={() => reset()}>Try again</button>
|
|
182
|
-
</div>
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
```
|
|
154
|
+
An `error.tsx` is always `"use client"`, receives `{ error: Error & { digest?: string }, reset }`,
|
|
155
|
+
and should render `role="alert"` plus a button calling `reset()`.
|
|
186
156
|
|
|
187
157
|
```tsx
|
|
188
158
|
// app/dashboard/page.tsx — Good: stream the shell, Suspense the slow part
|
|
@@ -203,11 +173,10 @@ export default function Page() {
|
|
|
203
173
|
|
|
204
174
|
## Routing: groups, parallel, intercepting, dynamic, metadata
|
|
205
175
|
|
|
206
|
-
- Route groups `(marketing)/`
|
|
207
|
-
|
|
176
|
+
- Route groups `(marketing)/` organize without affecting the URL; dynamic `[id]`, catch-all
|
|
177
|
+
`[...slug]`, optional `[[...slug]]`.
|
|
208
178
|
- **`params` and `searchParams` are Promises on v15+ — `await` them.**
|
|
209
|
-
- Parallel routes `@modal` + `default.tsx
|
|
210
|
-
- Intercepting `(.)photo` — modal-on-navigation.
|
|
179
|
+
- Parallel routes `@modal` + `default.tsx`; intercepting `(.)photo` — modal-on-navigation.
|
|
211
180
|
- `generateMetadata` (async) + `generateStaticParams`.
|
|
212
181
|
|
|
213
182
|
```tsx
|
|
@@ -225,8 +194,9 @@ async function PageGood({ params }: { params: Promise<{ id: string }> }) {
|
|
|
225
194
|
## Metadata & SEO
|
|
226
195
|
|
|
227
196
|
The App Router emits `<title>`, `<meta>`, OpenGraph/Twitter tags, `sitemap.xml`, and `robots.txt`
|
|
228
|
-
from code (identical API on v15/v16). Build-side patterns → `references/metadata.md`; the
|
|
229
|
-
|
|
197
|
+
from code (identical API on v15/v16). Build-side patterns → `references/metadata.md`; the strategy
|
|
198
|
+
side — JSON-LD, GEO, keyword research — is `../marketing/SKILL.md`'s
|
|
199
|
+
(`../marketing/references/seo-geo.md`): this skill emits the tags, that one picks the content.
|
|
230
200
|
|
|
231
201
|
- `metadata`/`generateMetadata` are **Server-Component-only** — one or the other per file (static
|
|
232
202
|
object when known at build; async `generateMetadata` when it depends on `params`/data, wrapped in
|
|
@@ -261,8 +231,8 @@ export async function generateMetadata({ params }: { params: Promise<{ slug: str
|
|
|
261
231
|
|
|
262
232
|
## Caching & data fetching (both models)
|
|
263
233
|
|
|
264
|
-
Which block applies is decided by the detection gate above.
|
|
265
|
-
`references/data-and-caching.md`.
|
|
234
|
+
Which block applies is decided by the detection gate above. Optimistic UI, `useActionState` + zod
|
|
235
|
+
forms and the full mutation patterns are in `references/data-and-caching.md`.
|
|
266
236
|
|
|
267
237
|
**v15 model** — `fetch` is uncached by default; opt in explicitly.
|
|
268
238
|
|
|
@@ -275,7 +245,7 @@ const products = await fetch("https://api.example.com/products", {
|
|
|
275
245
|
next: { revalidate: 3600, tags: ["products"] },
|
|
276
246
|
}).then((r) => r.json());
|
|
277
247
|
|
|
278
|
-
// from a Server Action: invalidate the tag
|
|
248
|
+
// from a Server Action: invalidate the tag (or a route with revalidatePath)
|
|
279
249
|
import { revalidateTag } from "next/cache";
|
|
280
250
|
revalidateTag("products");
|
|
281
251
|
|
|
@@ -319,9 +289,6 @@ export async function getCart(cartId: string) {
|
|
|
319
289
|
}
|
|
320
290
|
```
|
|
321
291
|
|
|
322
|
-
For optimistic UI, `useActionState` + zod forms, and full mutation patterns →
|
|
323
|
-
`references/data-and-caching.md`.
|
|
324
|
-
|
|
325
292
|
## React 19 in the App Router (essentials)
|
|
326
293
|
|
|
327
294
|
The Next-relevant deltas (full discipline, hooks, state-location tree, composition →
|
|
@@ -380,9 +347,10 @@ on every review:
|
|
|
380
347
|
- Secure cookies: `httpOnly`, `secure`, `sameSite: "lax"`; rotate the session on any privilege change.
|
|
381
348
|
- CSRF: Server Actions verify `Origin`/`Host`; never expose a mutation as an unauthenticated GET;
|
|
382
349
|
set `serverActions.allowedOrigins` in `next.config.ts`.
|
|
383
|
-
- **Never put secrets in `NEXT_PUBLIC_*`** — they ship to the browser; proxy via a Route Handler
|
|
350
|
+
- **Never put secrets in `NEXT_PUBLIC_*`** — they ship to the browser; proxy via a Route Handler and
|
|
351
|
+
mark server-only modules with `import 'server-only'`.
|
|
384
352
|
- SSRF: allowlist host/scheme before `fetch` in Route Handlers; block internal/metadata ranges.
|
|
385
|
-
- CSP with a nonce via `proxy.ts`/headers. See also
|
|
353
|
+
- CSP with a nonce via `proxy.ts`/headers. See also `../secure-coding/SKILL.md`.
|
|
386
354
|
|
|
387
355
|
## Performance (deep dive → references/performance.md)
|
|
388
356
|
|
|
@@ -393,9 +361,9 @@ on every review:
|
|
|
393
361
|
- Long lists: `content-visibility: auto` + virtualize (`@tanstack/react-virtual`) past ~50 rows; warm assets with `react-dom` `preload`/`preconnect`; narrow store selectors (Zustand) cut re-renders. Full lever→metric map in `references/performance.md`.
|
|
394
362
|
- Core Web Vitals targets: **LCP < 2.5s, CLS < 0.1, INP < 200ms** (INP replaced FID).
|
|
395
363
|
|
|
396
|
-
## Anti-patterns
|
|
364
|
+
## Anti-patterns
|
|
397
365
|
|
|
398
|
-
|
|
|
366
|
+
| Common belief | Reality / STOP |
|
|
399
367
|
| ---------------------------------------------------------- | -------------------------------------------------------------------------- |
|
|
400
368
|
| "The client already checks the user, the action is safe" | Server Actions are public POST endpoints — authenticate inside the action |
|
|
401
369
|
| "`fetch` caches by default, skip `revalidate`" | v15: `fetch` is uncached by default; that's the v13/14 mental model |
|
|
@@ -408,27 +376,6 @@ on every review:
|
|
|
408
376
|
| "Middleware protects my dashboard, the data fetch is safe" | Middleware is not a security boundary; check in the DAL |
|
|
409
377
|
| "Snapshot-test the RSC page" | Async Server Components aren't jsdom-renderable; test data fns + Playwright |
|
|
410
378
|
|
|
411
|
-
## Quick reference
|
|
412
|
-
|
|
413
|
-
| Task | API / file | Note |
|
|
414
|
-
| ------------------------- | ------------------------------------------------ | ------------------------------ |
|
|
415
|
-
| New mutation | Server Action (`"use server"`) | auth + zod inside |
|
|
416
|
-
| Public JSON / webhook | Route Handler (`route.ts`) | uncached GET on v15 |
|
|
417
|
-
| Per-request dedupe | `React.cache(fn)` | one query per render |
|
|
418
|
-
| Cache cross-request (v15) | `fetch tags` / `unstable_cache` | opt-in |
|
|
419
|
-
| Cache (v16) | `"use cache"` + `cacheTag` | opt-in, `cacheLife()` |
|
|
420
|
-
| Invalidate | `revalidateTag` / `updateTag` / `revalidatePath` | from an action |
|
|
421
|
-
| Loading UI | `loading.tsx` / `<Suspense>` | stream the shell |
|
|
422
|
-
| Error UI | `error.tsx` | `"use client"`, gets `reset()` |
|
|
423
|
-
| Form | `useActionState` + zod | `isPending`, `role="alert"` |
|
|
424
|
-
| Optimistic UI | `useOptimistic` | auto-revert on error |
|
|
425
|
-
| Client island | `"use client"` leaf | keep small, push down |
|
|
426
|
-
| Secrets | server-only env (`import 'server-only'`) | never `NEXT_PUBLIC_*` |
|
|
427
|
-
| Image | `next/image` + `priority` | LCP image |
|
|
428
|
-
| Page metadata | `generateMetadata` / static `metadata` | server-only; set `metadataBase`|
|
|
429
|
-
| Sitemap / robots | `app/sitemap.ts` / `app/robots.ts` | `MetadataRoute.*` |
|
|
430
|
-
| Protect route | middleware redirect + DAL `auth()` | DAL is the real boundary |
|
|
431
|
-
|
|
432
379
|
## Verify
|
|
433
380
|
|
|
434
381
|
Run `bash scripts/verify.sh` from the Next.js project root. It runs ESLint, `tsc --noEmit`,
|
|
@@ -438,37 +385,16 @@ a failure). It reads the installed Next.js major version and only falls back to
|
|
|
438
385
|
never a false failure. The lint/type/test steps are read-only; the final `next build` writes the
|
|
439
386
|
`.next/` output directory. No installs, no network mutations. Safe to re-run.
|
|
440
387
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
- `references/react.md` — React 19 discipline for the App Router (hooks, boundaries, forms, state).
|
|
444
|
-
- `references/data-and-caching.md` — both caching models, mutations, end-to-end zod forms.
|
|
445
|
-
- `references/metadata.md` — `generateMetadata`, `sitemap.ts`, `robots.ts`, OpenGraph + `next/og`.
|
|
446
|
-
- `references/testing.md` — Vitest 3 + RTL + MSW 2 + Playwright; RSC testing reality.
|
|
447
|
-
- `references/performance.md` — Core Web Vitals, images, fonts, bundles, streaming.
|
|
448
|
-
- `references/security.md` — auth, CSRF, XSS, CSP, env leakage, SSRF.
|
|
388
|
+
Test strategy — Vitest 3 + RTL + MSW 2 for units, Playwright for pages, and the RSC testing reality
|
|
389
|
+
behind that last anti-pattern row: `references/testing.md`.
|
|
449
390
|
|
|
450
391
|
## Project grounding (02-DOCS + CLAUDE.md)
|
|
451
392
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
2. **If missing or stale**, create/update it with the project's real choices — the caching model in use (v15 fetch-cache vs v16 `use cache`), the auth approach, server-action and data-fetching conventions, runtime choices (edge/node), and the design-system hookup —
|
|
460
|
-
then index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a
|
|
461
|
-
short pointer to it).
|
|
462
|
-
3. **Read it first on every use** and stay consistent; when a convention changes, update the
|
|
463
|
-
article (bump its `Updated` date) in the same change.
|
|
464
|
-
|
|
465
|
-
No `02-DOCS/` layer? Skip silently (optionally suggest `harness`). Unlike the
|
|
393
|
+
In a project with a `02-DOCS/` layer (the [`harness`](../harness/SKILL.md) Karpathy wiki), this
|
|
394
|
+
project's app decisions live in `02-DOCS/wiki/stack/nextjs.md`, indexed from `02-DOCS/wiki/index.md`
|
|
395
|
+
(the Knowledge map; root `CLAUDE.md` keeps only a pointer). Read it first on every use and stay
|
|
396
|
+
consistent. Missing or stale → write the project's real choices there — caching model in use (v15
|
|
397
|
+
fetch-cache vs v16 `use cache`), auth approach, server-action and data-fetching conventions, runtime
|
|
398
|
+
(edge/node), design-system hookup — index it, and bump its `Updated` date in the same change as any
|
|
399
|
+
convention change. No `02-DOCS/` layer? Skip silently (optionally suggest `harness`). Unlike the
|
|
466
400
|
brand study, technical conventions are *recorded, not gated* — never block the task on this.
|
|
467
|
-
|
|
468
|
-
## See Also
|
|
469
|
-
|
|
470
|
-
- `../secure-coding/SKILL.md` — generic security; this skill complements, does not duplicate it.
|
|
471
|
-
- `../fastapi/SKILL.md` and `../go/SKILL.md` — the backend APIs the frontend calls.
|
|
472
|
-
- `../postgresdb/SKILL.md` — the data layer behind the DAL.
|
|
473
|
-
- `../marketing/SKILL.md` — SEO/GEO strategy, JSON-LD, AI-engine citation (`../marketing/references/seo-geo.md`); this skill emits the tags, that one decides the content.
|
|
474
|
-
- `../harness/SKILL.md` — workspace conventions.
|
package/skills/orient/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: orient
|
|
3
|
-
description: "Always-on. The brújula:
|
|
3
|
+
description: "Always-on. The brújula: close every turn by situating the person — where they are, what just happened, why it mattered, and the next step as a question, never a dead end. Reads the accompaniment and technical dials from 02-DOCS and calibrates how much it explains, rewriting the dial when the user asks for more or less. NOT the missing-skill installer (that is `suggest`)."
|
|
4
4
|
tags: [orient, guide, compass, dial, meta, always-on]
|
|
5
5
|
recommends: []
|
|
6
6
|
profiles: [minimal, core, full]
|
|
@@ -9,49 +9,54 @@ origin: risco
|
|
|
9
9
|
|
|
10
10
|
# orient — the brújula that never leaves the user lost
|
|
11
11
|
|
|
12
|
-
You are always loaded. Your one job: **after anything happens, keep the human oriented.** A tool
|
|
12
|
+
You are always loaded. Your one job: **after anything happens, keep the human oriented.** A tool
|
|
13
|
+
executes and falls silent; a mentor walks alongside. You are what makes the harness a mentor.
|
|
13
14
|
|
|
14
|
-
`suggest` keeps the *session* equipped ("you're missing a skill, install it?"). You keep the *person*
|
|
15
|
+
`suggest` keeps the *session* equipped ("you're missing a skill, install it?"). You keep the *person*
|
|
16
|
+
equipped ("you are here, you did this, for this reason, next is X — which?"). The install prompt is
|
|
17
|
+
its job, never yours.
|
|
15
18
|
|
|
16
19
|
## The one rule
|
|
17
20
|
|
|
18
|
-
**No turn ends in seco.**
|
|
21
|
+
**No turn ends in seco.** Any turn that finishes an action, reaches a fork, or could leave the user
|
|
22
|
+
unsure closes with the brújula block. One block, at the end — never interrupt mid-work to orient.
|
|
19
23
|
|
|
20
24
|
## The brújula block
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
Four intents. The wording adapts to the person; the intents do not.
|
|
23
27
|
|
|
24
|
-
```
|
|
28
|
+
```text
|
|
25
29
|
📍 Dónde estás — the project phase/state (the map)
|
|
26
30
|
✅ Qué acabas de hacer — one line, in the user's language
|
|
27
31
|
🧭 Por qué — the technical why, scaled to the dial
|
|
28
|
-
➡️ Siguiente — 1-3 concrete options, ending in a question
|
|
32
|
+
➡️ Siguiente — 1-3 concrete options, ending in a question
|
|
29
33
|
```
|
|
30
34
|
|
|
35
|
+
Situate them from what is **actually** built. If you are unsure of the project state, read the
|
|
36
|
+
Knowledge map or the repo before writing 📍 — an invented state is worse than a shorter block.
|
|
37
|
+
|
|
31
38
|
## Calibrate to the dial
|
|
32
39
|
|
|
33
|
-
Read `02-DOCS/wiki/harness/user-profile.md` before
|
|
40
|
+
Read `02-DOCS/wiki/harness/user-profile.md` before writing the block. Two fields combine:
|
|
41
|
+
`accompaniment_level` sets the depth, `technical_level` sets the vocabulary.
|
|
34
42
|
|
|
35
43
|
| accompaniment_level | How the block behaves |
|
|
36
44
|
|---------------------|-----------------------|
|
|
37
45
|
| L0 — cavernícola | Only `✅` + `➡️`. One next option, a yes/no question. |
|
|
38
46
|
| L1 — breve | The four lines; `🧭` is one line of why. |
|
|
39
47
|
| L2 — explica decisiones | The four lines; `🧭` justifies the relevant decision; offer real forks. |
|
|
40
|
-
| L3 — acompañamiento total | The four lines, full why,
|
|
41
|
-
|
|
42
|
-
`technical_level` is orthogonal: a `non-technical` user gets plain language and analogies even at L0; a `technical` user skips the 101 explanations even at L3. If the profile is missing, assume `non-technical` + **L3** (the non-technical-first default) and offer to set the dial.
|
|
43
|
-
|
|
44
|
-
## Spoken dial config
|
|
48
|
+
| L3 — acompañamiento total | The four lines, full why, each option explained in plain language. |
|
|
45
49
|
|
|
46
|
-
|
|
50
|
+
`technical_level` is orthogonal: a non-technical user gets plain language and analogies even at L0;
|
|
51
|
+
a technical user skips the 101 explanations even at L3. No profile yet → assume non-technical + L3
|
|
52
|
+
(the non-technical-first default) and offer to set the dial.
|
|
47
53
|
|
|
48
|
-
|
|
54
|
+
The dial is spoken, not configured: when the user says "explícame más / menos", "no me expliques
|
|
55
|
+
tanto" or "enséñame", update `accompaniment_level` in the profile, confirm in one line, and apply
|
|
56
|
+
the new depth from this turn on.
|
|
49
57
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- Ask before deciding at any real fork; do not decide alone when the user can choose.
|
|
53
|
-
- Never invent project state — situate the user from what is actually built (read the Knowledge map / repo if unsure).
|
|
54
|
-
- Defer the "install a missing skill?" prompt to `suggest`.
|
|
58
|
+
At a real fork, ask. Deciding alone is faster and wrong — the fork is the moment the person's
|
|
59
|
+
judgment is worth more than yours.
|
|
55
60
|
|
|
56
61
|
## See Also
|
|
57
62
|
|