@ericrisco/rsc 1.0.9 → 1.0.11
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 +15 -13
- package/manifest.json +133 -2
- package/package.json +6 -4
- package/scripts/consult.js +75 -42
- package/scripts/drift-check.js +316 -0
- package/scripts/lib/default-skill-floor.js +11 -0
- package/scripts/lib/domains.js +3 -3
- package/scripts/lib/recommend.js +1 -0
- package/scripts/lib/text-rank.js +112 -0
- package/scripts/lib/ui.js +3 -3
- package/scripts/routing-audit.js +163 -0
- package/scripts/rsc.js +11 -10
- package/skills/author-skill/references/rsc-conventions.md +1 -1
- package/skills/bro/SKILL.md +68 -0
- package/skills/bro/evals/README.md +22 -0
- package/skills/bro/evals/cases.yaml +58 -0
- package/skills/data-cleaning/references/normalization-recipes.md +1 -1
- package/skills/decision-challenge/SKILL.md +113 -0
- package/skills/decision-challenge/evals/README.md +3 -0
- package/skills/decision-challenge/evals/cases.yaml +42 -0
- package/skills/deprecation/SKILL.md +123 -0
- package/skills/deprecation/evals/README.md +3 -0
- package/skills/deprecation/evals/cases.yaml +42 -0
- package/skills/harness/references/wiki-gaps-template.md +4 -0
- package/skills/idea-refinement/SKILL.md +121 -0
- package/skills/idea-refinement/evals/README.md +3 -0
- package/skills/idea-refinement/evals/cases.yaml +42 -0
- package/skills/observability/SKILL.md +6 -0
- package/skills/observability/evals/cases.yaml +2 -0
- package/skills/performance/SKILL.md +13 -0
- package/skills/performance/evals/cases.yaml +2 -0
- package/skills/simplify-code/SKILL.md +101 -0
- package/skills/simplify-code/evals/README.md +3 -0
- package/skills/simplify-code/evals/cases.yaml +42 -0
- package/skills/solid-js/references/router-and-start.md +1 -1
- package/skills/source-grounded-development/SKILL.md +108 -0
- package/skills/source-grounded-development/evals/README.md +3 -0
- package/skills/source-grounded-development/evals/cases.yaml +42 -0
- package/skills/suggest/evals/cases.yaml +1 -1
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: idea-refinement
|
|
3
|
+
description: "Use when a rough product, service, workflow or feature idea needs divergent options and assumption pressure-testing before it becomes a spec. Produces a decision brief with alternatives, evidence gaps, Not Now and a cheap experiment. NOT requirements or acceptance criteria (`specify`), NOT market sizing (`market-research`)."
|
|
4
|
+
tags: [ideation, idea-refinement, product-discovery, assumptions, decision-brief]
|
|
5
|
+
recommends: [specify, market-research, competitor-watch, ab-testing]
|
|
6
|
+
profiles: [core, full]
|
|
7
|
+
origin: risco
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# idea-refinement — make the idea earn its direction
|
|
11
|
+
|
|
12
|
+
Use this before `specify`, while the question is still “which version of this idea is worth pursuing?” The output is not a backlog or a polished pitch. It is a short decision brief that widens the option space, exposes what is merely assumed, and recommends the cheapest sensible direction to test.
|
|
13
|
+
|
|
14
|
+
Inspect any brief, notes, product or repository already supplied before asking questions. Ask one question at a time only when the answer would change the option space. The user may delegate a choice; “use your judgment” is valid authority when the decision is reversible and the assumptions are made visible.
|
|
15
|
+
|
|
16
|
+
## The refinement loop
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
FRAME → DIVERGE → CHALLENGE → CONVERGE → TEST
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### 1. FRAME the real opportunity
|
|
23
|
+
|
|
24
|
+
Write five lines, no solution language yet:
|
|
25
|
+
|
|
26
|
+
- **Actor:** who is struggling, in what situation?
|
|
27
|
+
- **Current workaround:** what do they do now, including “do nothing”?
|
|
28
|
+
- **Desired progress:** what observable change would make this useful?
|
|
29
|
+
- **Constraints:** time, money, channel, trust, regulation, existing product.
|
|
30
|
+
- **Known / assumed:** separate evidence already seen from hypotheses that only sound plausible.
|
|
31
|
+
|
|
32
|
+
If the idea is phrased as a feature (“an AI dashboard”), reframe it as a problem and outcome (“operators need to spot failed jobs before customers report them”). Keep the original idea as one candidate, not as the conclusion.
|
|
33
|
+
|
|
34
|
+
### 2. DIVERGE deliberately
|
|
35
|
+
|
|
36
|
+
Produce **five to eight meaningfully different directions**. Variants that only change colors, names, pricing tiers or implementation technology count as one direction.
|
|
37
|
+
|
|
38
|
+
Choose two lenses that attack the largest uncertainty:
|
|
39
|
+
|
|
40
|
+
- **Remove / replace / combine / reverse:** change the mechanism, not the wording.
|
|
41
|
+
- **Job and workaround:** improve, automate or eliminate the thing people already do.
|
|
42
|
+
- **Constraint inversion:** assume the budget, time, data or integration is unavailable.
|
|
43
|
+
- **Trust ladder:** begin with advice, then approval, then automation; do not jump to full autonomy.
|
|
44
|
+
- **Pre-mortem:** imagine the idea failed in six months and design away the most likely cause.
|
|
45
|
+
- **Narrow wedge:** find the smallest audience and moment where the pain is strongest.
|
|
46
|
+
|
|
47
|
+
For each direction give: target actor, promised progress, mechanism, largest assumption, and what makes it distinct. Do not advocate yet.
|
|
48
|
+
|
|
49
|
+
### 3. CHALLENGE the attractive options
|
|
50
|
+
|
|
51
|
+
Take the three strongest directions and try to disprove them. Check:
|
|
52
|
+
|
|
53
|
+
- Does the pain happen often and cost enough to change behaviour?
|
|
54
|
+
- Does the user control the data, budget and permissions the idea requires?
|
|
55
|
+
- Is the proposal replacing a habit or tool with a worse switching cost?
|
|
56
|
+
- What dependency, incentive or trust failure could make the value impossible?
|
|
57
|
+
- Which claim could be tested this week without building the product?
|
|
58
|
+
|
|
59
|
+
State the strongest objection fairly. If an option survives only because a critical fact is unknown, label it **unverified**, not “promising.” Route market-size and demand evidence to `../market-research/SKILL.md`; route a named-rival comparison to `../competitor-watch/SKILL.md`.
|
|
60
|
+
|
|
61
|
+
### 4. CONVERGE with explicit criteria
|
|
62
|
+
|
|
63
|
+
Choose three to five criteria that fit the situation, then compare the finalists on the same scale. Typical criteria are user value, evidence strength, time to learning, reversibility, distribution access and operational risk. Weight only when one criterion genuinely dominates; decorative arithmetic is not evidence.
|
|
64
|
+
|
|
65
|
+
Make one recommendation with:
|
|
66
|
+
|
|
67
|
+
- the direction and the dominant reason;
|
|
68
|
+
- confidence: high / medium / low;
|
|
69
|
+
- assumptions it depends on;
|
|
70
|
+
- what was rejected and why;
|
|
71
|
+
- the fact that would most likely reverse the choice.
|
|
72
|
+
|
|
73
|
+
If two options remain genuinely tied, recommend the experiment that distinguishes them. Do not ask the user to choose between indistinguishable summaries.
|
|
74
|
+
|
|
75
|
+
### 5. TEST before specifying
|
|
76
|
+
|
|
77
|
+
Name the cheapest next test that can change the decision: five problem interviews, a concierge workflow, a fake-door measure with consent, a manual prototype, a pricing conversation, or a data audit. Define the signal that would support the direction and the signal that would kill it.
|
|
78
|
+
|
|
79
|
+
Only after a direction survives does it hand off to `../specify/SKILL.md` for goals, scope, behaviour and acceptance criteria.
|
|
80
|
+
|
|
81
|
+
## Decision brief
|
|
82
|
+
|
|
83
|
+
```markdown
|
|
84
|
+
# Idea decision — <working title>
|
|
85
|
+
|
|
86
|
+
## Opportunity
|
|
87
|
+
Actor · workaround · desired progress · constraints
|
|
88
|
+
|
|
89
|
+
## Evidence and assumptions
|
|
90
|
+
- Seen: ...
|
|
91
|
+
- Assumed: ...
|
|
92
|
+
|
|
93
|
+
## Directions considered
|
|
94
|
+
1. ...
|
|
95
|
+
|
|
96
|
+
## Comparison
|
|
97
|
+
Same criteria across the three finalists.
|
|
98
|
+
|
|
99
|
+
## Recommendation
|
|
100
|
+
Direction · confidence · deciding reason · reversal fact.
|
|
101
|
+
|
|
102
|
+
## Not Now
|
|
103
|
+
Ideas deliberately excluded from the first test.
|
|
104
|
+
|
|
105
|
+
## Next experiment
|
|
106
|
+
Method · audience · support signal · kill signal · timebox.
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Anti-patterns
|
|
110
|
+
|
|
111
|
+
| Smell | Correction |
|
|
112
|
+
|---|---|
|
|
113
|
+
| Brainstorming becomes an implementation plan | Stop at direction + falsifier; `plan` comes after an approved spec. |
|
|
114
|
+
| A long questionnaire precedes any thinking | Inspect first; ask one decision-changing question at a time. |
|
|
115
|
+
| A score hides missing evidence | Put the evidence gap beside the score and lower confidence. |
|
|
116
|
+
| The starting idea returns as cosmetic variants | Change mechanism, trust, audience, workflow or constraint. |
|
|
117
|
+
| Ideation continues after direction and falsifier are clear | Stop and run the cheapest distinguishing experiment. |
|
|
118
|
+
|
|
119
|
+
## Orientación (siempre)
|
|
120
|
+
|
|
121
|
+
Cierra cada turno con el **bloque-brújula** (📍 dónde estás · ✅ qué hiciste · 🧭 por qué · ➡️ siguiente, terminando en pregunta), calibrado al dial de `02-DOCS/wiki/harness/user-profile.md`. **Nunca termines en seco.** Protocolo completo: skill `orient` → `skills/orient/references/orientation-contract.md`. (Defiere a `suggest` el “¿instalo la skill que falta?”.)
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Evals — idea-refinement
|
|
2
|
+
|
|
3
|
+
Routing must distinguish exploration before commitment from `specify`, market evidence, competitor monitoring, task breakdown and experiment statistics. The capability case passes only when the answer widens the idea space, attacks assumptions, converges transparently and ends with a falsifiable cheap experiment rather than a polished feature spec.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
skill: idea-refinement
|
|
2
|
+
|
|
3
|
+
should_trigger:
|
|
4
|
+
- prompt: "I have a vague idea for helping remote teams share what they know; explore several versions before we spec it."
|
|
5
|
+
why: "A rough product idea needs divergent directions and a choice before requirements."
|
|
6
|
+
- prompt: "No quiero que me des la razón: abre opciones y destroza los supuestos de esta idea de onboarding."
|
|
7
|
+
why: "Spanish request for option generation and assumption pressure-testing."
|
|
8
|
+
- prompt: "Tenemos una idea de automatizar soporte, pero aún no sabemos si debería aconsejar, pedir aprobación o actuar sola."
|
|
9
|
+
why: "The trust ladder is the key unresolved product direction."
|
|
10
|
+
- prompt: "Fes un pre-mortem de la idea i proposa cinc enfocaments realment diferents abans de triar-ne un."
|
|
11
|
+
why: "Catalan request for pre-mortem plus meaningful divergence."
|
|
12
|
+
- prompt: "Turn this feature-shaped idea into a problem, alternatives, Not Now list, and the cheapest experiment."
|
|
13
|
+
why: "Names the complete refinement artifact and test handoff."
|
|
14
|
+
- prompt: "We keep circling three product concepts; compare them on evidence, reversibility, and time to learning."
|
|
15
|
+
why: "Convergence across explicit criteria is owned here."
|
|
16
|
+
|
|
17
|
+
should_not_trigger:
|
|
18
|
+
- prompt: "Write the approved feature spec with user stories and acceptance criteria."
|
|
19
|
+
route_to: specify
|
|
20
|
+
why: "The direction is chosen and now needs the WHAT/WHY contract."
|
|
21
|
+
- prompt: "Size the European payroll market with TAM, SAM, SOM and dated sources."
|
|
22
|
+
route_to: market-research
|
|
23
|
+
why: "Defensible market sizing and demand evidence, not ideation."
|
|
24
|
+
- prompt: "Track what Notion and Slite shipped this quarter and compare their moves."
|
|
25
|
+
route_to: competitor-watch
|
|
26
|
+
why: "Standing named-competitor intelligence."
|
|
27
|
+
- prompt: "Break the notifications spec into dependency-ordered implementation tasks."
|
|
28
|
+
route_to: tasks
|
|
29
|
+
why: "Execution decomposition occurs after spec and plan."
|
|
30
|
+
- prompt: "Design the sample size and guardrail metrics for our landing-page experiment."
|
|
31
|
+
route_to: ab-testing
|
|
32
|
+
why: "The direction is already an experiment needing statistical design."
|
|
33
|
+
|
|
34
|
+
capability:
|
|
35
|
+
- scenario: "Refine a rough idea for an AI assistant that helps small agencies capture project knowledge without creating more admin work."
|
|
36
|
+
must_include:
|
|
37
|
+
- "Reframes the feature idea as actor, current workaround, desired progress, constraints, and separate evidence versus assumptions."
|
|
38
|
+
- "Produces five to eight materially different directions, including different trust or workflow mechanisms rather than cosmetic variants."
|
|
39
|
+
- "Pressure-tests the strongest directions for adoption, data, permission, switching-cost, dependency, and failure assumptions."
|
|
40
|
+
- "Compares finalists against the same explicit criteria and recommends one with confidence and a fact that could reverse the decision."
|
|
41
|
+
- "Includes a Not Now list so discarded scope does not leak into the first experiment."
|
|
42
|
+
- "Defines one cheap next experiment with both a support signal and a kill signal, then hands the survivor to specify."
|
|
@@ -14,6 +14,10 @@ You are wiring the *inside* view of a service: when something breaks at 3am, an
|
|
|
14
14
|
|
|
15
15
|
**Every signal carries the same correlation identity: `trace_id`, `service.name`, `deployment.environment`.** A log line you cannot pivot to its trace, or a spiking metric you cannot pivot to an exemplar span, doubles your mean-time-to-resolution — you are back to grepping. Three signals that don't share keys are three disconnected tools; three that do are one queryable system. Set the resource once at SDK init, inject `trace_id`/`span_id` into every log, and never emit a metric you can't tie back to a service and environment.
|
|
16
16
|
|
|
17
|
+
## Start from the operator's questions
|
|
18
|
+
|
|
19
|
+
Before choosing signals, write **two to four questions on-call must answer during the likely incident**. For example: “Are payment retries recovering?”, “Which dependency and failure class drives exhaustion?”, “Can one payment be charged twice?”, “Which customer-visible operations need intervention now?” Then assign the cheapest signal: metrics say **that/how much**, traces show **where/causal path**, logs explain **why for this event**. If a proposed event or label answers none of the questions, do not emit it.
|
|
20
|
+
|
|
17
21
|
## The three pillars — when each earns its place
|
|
18
22
|
|
|
19
23
|
Don't emit all three of everything. Each signal answers a different question at a different cost.
|
|
@@ -227,3 +231,5 @@ The instrumentation above makes these *possible* — defining them is your job;
|
|
|
227
231
|
## Verify
|
|
228
232
|
|
|
229
233
|
Run `scripts/verify.sh` against the directory holding your Collector config + SDK init. It checks the config is valid, that every defined exporter is actually wired into a pipeline (the classic "defined but unused" footgun), that `service.name` is set, and warns on high-cardinality metric labels. It is read-only and exits 0 when there's nothing to check.
|
|
234
|
+
|
|
235
|
+
Then prove the wire with one safe induced failure in a test/staging path. Confirm the expected error-rate metric changes, the trace records the failing operation and error status, and the structured log carries the same `trace_id` without PII. Query the backend/Collector output; “the instrumentation code ran” is not evidence that usable telemetry arrived. Live paging and escalation proof remains `../monitoring/SKILL.md`.
|
|
@@ -47,3 +47,5 @@ capability:
|
|
|
47
47
|
- a multi-window SLO burn-rate alert defined from the emitted metrics
|
|
48
48
|
- respects the cardinality rule (no user_id/request_id/email as a metric label) and logs no PII (opaque ids, redaction in the Collector)
|
|
49
49
|
- exports through a Collector via OTLP, not straight to a vendor
|
|
50
|
+
- starts from two to four concrete on-call questions and maps metrics to that/how much, traces to where, and logs to why
|
|
51
|
+
- induces one safe failure and proves the correlated metric, error trace, and structured log actually arrive without PII
|
|
@@ -41,6 +41,16 @@ You have two kinds of measurement and they answer different questions. Use both,
|
|
|
41
41
|
|
|
42
42
|
The output of Step 0 is **one sentence naming the bottleneck**: "LCP is 3.8 s and 2.1 s of it is resource load delay because the hero image is lazy-loaded." Do not proceed without that sentence. Tool runbooks (Lighthouse CI flags, reading a flame chart, the Profiler workflow, wiring `web-vitals` for RUM) live in `references/profiling-playbook.md`.
|
|
43
43
|
|
|
44
|
+
**Measurement honesty:** static source can identify a *plausible* bottleneck, never a measured LCP/INP/CLS, latency win or byte saving. If runtime/field data is unavailable, label the finding `POTENTIAL`, name the exact trace/benchmark needed, and make no numeric improvement claim. Do not turn code inspection into fictional telemetry.
|
|
45
|
+
|
|
46
|
+
Keep one experiment card per change:
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
metric + conditions | baseline distribution | one hypothesis/change | after distribution | keep/revert | next
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Use the same device, data volume, cache state, build mode and sampling method before and after. Repeat enough runs to see ordinary variance; a one-off result inside that noise is neutral. Keep a change only when it moves the target beyond the noise without violating another budget. Revert a neutral or worse experiment with a targeted edit and preserve the card — failed attempts prevent the next person from paying for the same guess.
|
|
53
|
+
|
|
44
54
|
## CWV "good" thresholds (field p75)
|
|
45
55
|
|
|
46
56
|
| Metric | Good | Needs improvement | Poor |
|
|
@@ -210,6 +220,9 @@ Use **streaming SSR with `<Suspense>`** to flush the static shell immediately an
|
|
|
210
220
|
| Images/embeds with no reserved space | content reflows on load → CLS | explicit width/height or `aspect-ratio` |
|
|
211
221
|
| Micro-optimizing a non-bottleneck phase | effort moves a number off the critical path | fix only the phase the trace points at |
|
|
212
222
|
| "Done" without re-measuring | the fix may not have moved the metric | re-measure against the threshold, then stop |
|
|
223
|
+
| Reporting source-only review as a measured win | no trace/field/benchmark ran, so the number is invented | label POTENTIAL and name the measurement |
|
|
224
|
+
| Changing three levers in one experiment | you cannot attribute the result or reuse the learning | one hypothesis/change per card, then re-measure |
|
|
225
|
+
| Keeping a neutral optimization | complexity rose but the target did not beat normal variance | targeted revert; retain the failed-experiment record |
|
|
213
226
|
|
|
214
227
|
## Stop rule
|
|
215
228
|
|
|
@@ -45,3 +45,5 @@ capability:
|
|
|
45
45
|
- "Proposes a concrete bundle cut — replace/remove a heavy dep, dynamic import() for non-critical UI, or fix a whole-library import — in payoff order."
|
|
46
46
|
- "Does NOT blanket-memoize React components (notes React 19 compiler auto-memoizes) and does not guess fixes without the profile."
|
|
47
47
|
- "Re-measures against the numeric targets (LCP ≤ 2.5s field p75 and a bundle budget) and stops at 'good' rather than gold-plating."
|
|
48
|
+
- "Never reports source inspection as a measured result; without runtime/field data it labels findings POTENTIAL and names the exact trace or benchmark required."
|
|
49
|
+
- "Records baseline conditions and variance, changes one lever, re-measures under the same conditions, and targeted-reverts neutral or worse experiments while preserving the failed-attempt record."
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: simplify-code
|
|
3
|
+
description: "Use when correct working code is unnecessarily hard to read, change or verify and needs behaviour-preserving simplification in a bounded scope. Characterizes the observable contract, removes accidental complexity one concept at a time and proves equivalence. NOT fixing a failure (`debug`), NOT read-only diff judgment (`review`/`code-review`)."
|
|
4
|
+
tags: [code-simplification, refactoring, readability, complexity, behavior-preservation]
|
|
5
|
+
recommends: [code-review, review, verify, debug, performance]
|
|
6
|
+
profiles: [core, full]
|
|
7
|
+
origin: risco
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# simplify-code — fewer moving parts, same contract
|
|
11
|
+
|
|
12
|
+
Use this when the code already works and the desired change is easier reasoning, not new behaviour. The output is a smaller or clearer implementation plus proof that callers cannot tell the difference.
|
|
13
|
+
|
|
14
|
+
Default scope is the files or symbols the user named, or the recently changed slice. Expanding into adjacent cleanup requires a concrete dependency and must be stated. Never “clean the whole repository” as a side effect.
|
|
15
|
+
|
|
16
|
+
## The equivalence loop
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
BOUND → CHARACTERIZE → BASELINE → REDUCE → VERIFY → EXPLAIN
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### 1. BOUND the work
|
|
23
|
+
|
|
24
|
+
Record:
|
|
25
|
+
|
|
26
|
+
- target files/symbols and why they are difficult;
|
|
27
|
+
- callers and public interfaces that must remain stable;
|
|
28
|
+
- generated/vendor code and project-marked protected regions to leave alone;
|
|
29
|
+
- performance, ordering, compatibility or serialization constraints;
|
|
30
|
+
- unrelated dirty-worktree changes that belong to someone else.
|
|
31
|
+
|
|
32
|
+
Respect protected regions through repository instructions and explicit comments. Do not hide them by rewriting files on disk, swapping placeholders in and out, or relying on a cleanup hook to restore them later.
|
|
33
|
+
|
|
34
|
+
### 2. CHARACTERIZE the observable contract
|
|
35
|
+
|
|
36
|
+
Tests are necessary but may be incomplete. Write down what must remain the same:
|
|
37
|
+
|
|
38
|
+
- return values and data shapes;
|
|
39
|
+
- thrown/rejected error types, messages when contractual, and timing;
|
|
40
|
+
- ordering, deduplication and mutation behaviour;
|
|
41
|
+
- I/O, logs, analytics and other side effects;
|
|
42
|
+
- async/concurrency semantics;
|
|
43
|
+
- hot-path allocations or latency when performance is part of the contract.
|
|
44
|
+
|
|
45
|
+
If the behaviour cannot be stated or observed, add characterization tests before refactoring. When the current behaviour is a bug, stop and route to `../debug/SKILL.md`; simplification must not smuggle in a fix.
|
|
46
|
+
|
|
47
|
+
### 3. BASELINE current evidence
|
|
48
|
+
|
|
49
|
+
Run the narrow tests first and preserve their output. Then run type/lint/build checks appropriate to the slice. For a performance-sensitive path, capture a representative benchmark under named conditions. A baseline proves what “same” means and prevents a cleaner-looking regression.
|
|
50
|
+
|
|
51
|
+
### 4. REDUCE one source of accidental complexity
|
|
52
|
+
|
|
53
|
+
Prefer changes with a visible reasoning payoff:
|
|
54
|
+
|
|
55
|
+
- remove dead branches, duplicate calculations or needless state;
|
|
56
|
+
- replace nested control flow with guard clauses when ordering stays identical;
|
|
57
|
+
- extract a name for a real concept, not every three lines;
|
|
58
|
+
- collapse pass-through wrappers that enforce no policy;
|
|
59
|
+
- replace clever compact expressions with direct ones;
|
|
60
|
+
- make data flow single-directional and ownership explicit;
|
|
61
|
+
- reuse an existing local abstraction when it is simpler than both copies.
|
|
62
|
+
|
|
63
|
+
Change one concept at a time and inspect the diff. Complexity moved into a new helper, generic abstraction or dependency is not removed. Lines of code are supporting evidence, never the target.
|
|
64
|
+
|
|
65
|
+
Do not redesign a public API, rename unrelated symbols, update formatting across untouched files, add features, change error policy, or create a speculative framework “for future reuse.”
|
|
66
|
+
|
|
67
|
+
### 5. VERIFY after every coherent step
|
|
68
|
+
|
|
69
|
+
Run the focused characterization tests, then the relevant repository gate. Compare benchmark conditions when applicable; keep a performance claim only when the difference exceeds normal run-to-run noise. Review the diff specifically for contract drift and accidental scope growth.
|
|
70
|
+
|
|
71
|
+
If a step is neutral or worse for understandability, revert **that step only** using a targeted edit. Never use `git reset --hard`, overwrite the working tree, or discard unrelated user changes. Do not commit automatically.
|
|
72
|
+
|
|
73
|
+
### 6. EXPLAIN the gain
|
|
74
|
+
|
|
75
|
+
Report:
|
|
76
|
+
|
|
77
|
+
- scope simplified;
|
|
78
|
+
- complexity removed, not merely relocated;
|
|
79
|
+
- observable contract preserved;
|
|
80
|
+
- tests/checks/benchmark run and results;
|
|
81
|
+
- anything intentionally left complex and the invariant that justifies it.
|
|
82
|
+
|
|
83
|
+
“Cleaner” is too vague. Prefer: “removed three mutable states and one duplicate parse; preserved error type/message, insertion order and one-read I/O semantics; 18 focused tests plus full typecheck pass.”
|
|
84
|
+
|
|
85
|
+
## Stop rule
|
|
86
|
+
|
|
87
|
+
Stop when another edit would trade one defensible style for another without lowering the number of states, branches, concepts or proof obligations. Readability has diminishing returns. A bounded, verified improvement is done even if neighbouring legacy code remains ugly.
|
|
88
|
+
|
|
89
|
+
## Anti-patterns
|
|
90
|
+
|
|
91
|
+
| Smell | Correction |
|
|
92
|
+
|---|---|
|
|
93
|
+
| A failing behaviour is “cleaned up” | Diagnose with `debug`; simplification must not smuggle in a fix. |
|
|
94
|
+
| A read-only review starts editing | Keep verdict work in `review`/`code-review`. |
|
|
95
|
+
| A speed hunch justifies a refactor | `performance` measures first; preserve a benchmark when speed is contractual. |
|
|
96
|
+
| An odd public behaviour is silently normalized | Preserve it until a behaviour change is explicitly authorized. |
|
|
97
|
+
| Cleanup commits, pushes, resets or deploys on its own | These are separate authorized operations; use targeted edits only. |
|
|
98
|
+
|
|
99
|
+
## Orientación (siempre)
|
|
100
|
+
|
|
101
|
+
Cierra cada turno con el **bloque-brújula** (📍 dónde estás · ✅ qué hiciste · 🧭 por qué · ➡️ siguiente, terminando en pregunta), calibrado al dial de `02-DOCS/wiki/harness/user-profile.md`. **Nunca termines en seco.** Protocolo completo: skill `orient` → `skills/orient/references/orientation-contract.md`. (Defiere a `suggest` el “¿instalo la skill que falta?”.)
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Evals — simplify-code
|
|
2
|
+
|
|
3
|
+
The cases distinguish correct-but-complex code from debugging, review, verification, performance and API redesign. The capability case requires an explicit behavioural contract, characterization baseline, one-concept reductions, full evidence and safe worktree handling.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
skill: simplify-code
|
|
2
|
+
|
|
3
|
+
should_trigger:
|
|
4
|
+
- prompt: "This parser works and its tests are green, but the nested branches are impossible to follow; simplify it without changing behavior."
|
|
5
|
+
why: "Correct code needs bounded behaviour-preserving simplification."
|
|
6
|
+
- prompt: "Simplifica esta función, pero conserva exactamente errores, orden y efectos laterales."
|
|
7
|
+
why: "Spanish request explicitly names observable contract preservation."
|
|
8
|
+
- prompt: "The feature is done; now remove the accidental complexity from only the files we changed."
|
|
9
|
+
why: "Post-feature bounded cleanup is the default scope."
|
|
10
|
+
- prompt: "Fes el codi menys enginyós i més directe, amb tests de caracterització abans de tocar-lo."
|
|
11
|
+
why: "Catalan request for characterization-led simplification."
|
|
12
|
+
- prompt: "Collapse these pass-through wrappers and duplicate state if callers cannot observe a difference."
|
|
13
|
+
why: "Specific removable complexity with an equivalence condition."
|
|
14
|
+
- prompt: "Refactor this hot path for clarity, but keep the benchmark and allocation profile within noise."
|
|
15
|
+
why: "Performance is part of the observable simplification contract."
|
|
16
|
+
|
|
17
|
+
should_not_trigger:
|
|
18
|
+
- prompt: "The parser throws on valid quoted values; reproduce the bug and fix it."
|
|
19
|
+
route_to: debug
|
|
20
|
+
why: "Behaviour is incorrect, so diagnosis precedes any cleanup."
|
|
21
|
+
- prompt: "Review this pull request and list correctness issues, but do not edit it."
|
|
22
|
+
route_to: code-review
|
|
23
|
+
why: "Read-only spec-less diff judgment."
|
|
24
|
+
- prompt: "Verify the finished SDD implementation against every acceptance criterion."
|
|
25
|
+
route_to: verify
|
|
26
|
+
why: "Evidence gate rather than code editing."
|
|
27
|
+
- prompt: "The page is slow; profile Core Web Vitals and fix the measured bottleneck."
|
|
28
|
+
route_to: performance
|
|
29
|
+
why: "Measured speed work owns the task."
|
|
30
|
+
- prompt: "Redesign the public API and migrate all callers to the new contract."
|
|
31
|
+
route_to: api-design
|
|
32
|
+
why: "The requested behaviour/interface change is not simplification."
|
|
33
|
+
|
|
34
|
+
capability:
|
|
35
|
+
- scenario: "Simplify an 80-line configuration parser whose current tests cover the happy path but whose callers depend on comment handling, quoting, numeric conversion, insertion order and ignored malformed lines."
|
|
36
|
+
must_include:
|
|
37
|
+
- "Bounds the target and inspects callers, dirty-worktree state, generated code, and explicit protected regions without mutating files to hide content."
|
|
38
|
+
- "States the observable contract including return shape, ignored input, type conversion, order, errors and side effects."
|
|
39
|
+
- "Adds characterization cases for uncovered contract edges and records a green baseline before refactoring."
|
|
40
|
+
- "Removes one source of complexity at a time without adding features, redesigning public APIs, or relocating complexity into speculative abstractions."
|
|
41
|
+
- "Runs focused tests plus relevant lint/type/build gates after coherent steps and compares a benchmark when performance is contractual."
|
|
42
|
+
- "Uses targeted edits for a bad step and never resets, auto-commits, pushes, deploys, or discards unrelated changes."
|
|
@@ -87,7 +87,7 @@ export default function Todos() {
|
|
|
87
87
|
|
|
88
88
|
- **Deployment**: SolidStart uses Nitro-style adapters; for Vercel/Netlify/Node
|
|
89
89
|
targets configure the adapter in `app.config.ts`. Deployment specifics →
|
|
90
|
-
[
|
|
90
|
+
[`vercel`](../../vercel/SKILL.md).
|
|
91
91
|
|
|
92
92
|
Version note: SolidStart 1.x is the maintained stable line; **2.0.0-alpha** tracks
|
|
93
93
|
Solid 2.0. Default to 1.x unless the task targets the alpha.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: source-grounded-development
|
|
3
|
+
description: "Use when implementation or review depends on current version-specific framework, SDK, protocol or platform behaviour and memory is unsafe. Detects exact local versions, verifies primary sources, tests applicability and marks unknowns. NOT a standalone cited memo (`research-ops`), NOT diagnosis of a reproduced failure (`debug`)."
|
|
4
|
+
tags: [official-docs, primary-sources, version-detection, implementation, verification]
|
|
5
|
+
recommends: [research-ops, decision-records, debug, technical-writing]
|
|
6
|
+
profiles: [core, full]
|
|
7
|
+
origin: risco
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# source-grounded-development — make current facts part of the change
|
|
11
|
+
|
|
12
|
+
Use this when correctness depends on what a framework, SDK, API, standard or hosted platform **does now for the exact version in this repository**. The deliverable is still code, a review or an implementation decision; sources are the evidence behind it, not a separate essay.
|
|
13
|
+
|
|
14
|
+
This is narrower than `../research-ops/SKILL.md`: research-ops answers an open question with a cited memo. Here, the question exists because a concrete change cannot safely proceed from memory.
|
|
15
|
+
|
|
16
|
+
## The loop
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
DETECT → QUESTION → SOURCE → APPLY → PROVE → REPORT
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### 1. DETECT the actual version and environment
|
|
23
|
+
|
|
24
|
+
Read the repository before the web:
|
|
25
|
+
|
|
26
|
+
- lockfiles and manifests, not only a README;
|
|
27
|
+
- runtime and compiler configuration;
|
|
28
|
+
- generated client/server versions;
|
|
29
|
+
- deployment target and enabled compatibility flags;
|
|
30
|
+
- existing wrapper code that may override documented defaults.
|
|
31
|
+
|
|
32
|
+
Record an evidence line such as: `Next 16.2.1 from pnpm-lock.yaml; Node 24 from .nvmrc; App Router; deployed to Vercel.` If versions conflict, stop treating the docs as applicable until the conflict is resolved.
|
|
33
|
+
|
|
34
|
+
### 2. QUESTION only the claims that can change the implementation
|
|
35
|
+
|
|
36
|
+
Build a small claim ledger. Each row is one decision-sensitive statement:
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
claim | exact component/version | evidence needed | source | applicability | status
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Examples: whether a callback is invoked on retry, the default cookie policy, an API’s idempotency semantics, a deprecated option’s replacement, or a browser feature’s support boundary. Do not cite obvious local code or generic programming facts just to make the list longer.
|
|
43
|
+
|
|
44
|
+
### 3. SOURCE by authority and freshness
|
|
45
|
+
|
|
46
|
+
Prefer, in order:
|
|
47
|
+
|
|
48
|
+
1. the repository and installed type definitions for local truth;
|
|
49
|
+
2. official versioned documentation and migration/release notes;
|
|
50
|
+
3. specifications, RFCs or provider API references;
|
|
51
|
+
4. upstream source or tests when documentation is ambiguous;
|
|
52
|
+
5. reputable secondary material only as a lead, never as the final authority for a disputed behaviour.
|
|
53
|
+
|
|
54
|
+
Use the current page that matches the detected version. A search snippet, an undated blog, a forum answer or remembered API shape is not proof. When two primary sources disagree, show the disagreement and test the behaviour; do not average them into false certainty.
|
|
55
|
+
|
|
56
|
+
### 4. APPLY the source to this repository
|
|
57
|
+
|
|
58
|
+
For every useful source, state why it applies here:
|
|
59
|
+
|
|
60
|
+
- same major/minor version or a documented compatibility range;
|
|
61
|
+
- same runtime, router, transport, deployment mode or feature flag;
|
|
62
|
+
- no local wrapper/configuration that changes the default;
|
|
63
|
+
- publication or update date appropriate to a fast-moving claim.
|
|
64
|
+
|
|
65
|
+
Then make the smallest implementation decision that the evidence supports. Do not turn examples from docs into architecture by cargo cult. Examples demonstrate an API; the repository still determines ownership, boundaries and error policy.
|
|
66
|
+
|
|
67
|
+
### 5. PROVE behaviour locally
|
|
68
|
+
|
|
69
|
+
Documentation tells you intended behaviour. A local test proves the integration:
|
|
70
|
+
|
|
71
|
+
- add or run a focused contract/regression test;
|
|
72
|
+
- compile against installed types;
|
|
73
|
+
- exercise a minimal reproduction when defaults or runtime order matter;
|
|
74
|
+
- run the stack’s normal verification gate after the focused proof.
|
|
75
|
+
|
|
76
|
+
If local evidence contradicts the source, preserve the reproduction and investigate version/config drift. Do not silently choose whichever result is more convenient.
|
|
77
|
+
|
|
78
|
+
### 6. REPORT without polluting the code
|
|
79
|
+
|
|
80
|
+
End with:
|
|
81
|
+
|
|
82
|
+
- versions and environment detected;
|
|
83
|
+
- material claims verified and their primary links;
|
|
84
|
+
- implementation choices those claims changed;
|
|
85
|
+
- local evidence run;
|
|
86
|
+
- assumptions still **UNVERIFIED**, with the consequence if wrong.
|
|
87
|
+
|
|
88
|
+
Put source links in the final report, PR description or a durable decision record when the rationale must outlive the task. Do not scatter documentation URLs through source comments unless the code’s invariant genuinely cannot be understood without that external contract.
|
|
89
|
+
|
|
90
|
+
## Stop conditions
|
|
91
|
+
|
|
92
|
+
Stop searching when every decision-sensitive claim is verified, contradicted or explicitly marked unverified and the local proof is green. Search breadth is not quality. A fifth article repeating the official reference adds no evidence.
|
|
93
|
+
|
|
94
|
+
Do not use this skill as a reason to delay reversible work indefinitely. If a primary source is unavailable, name the uncertainty, choose the safest reversible option, add a proof/guard, and state what would trigger revisiting it.
|
|
95
|
+
|
|
96
|
+
## Anti-patterns
|
|
97
|
+
|
|
98
|
+
| Smell | Correction |
|
|
99
|
+
|---|---|
|
|
100
|
+
| A reproduced bug is replaced by a docs tour | `debug` owns diagnosis; use this only for the disputed versioned claim. |
|
|
101
|
+
| A broad open question is forced into implementation | Route the cited memo to `research-ops`. |
|
|
102
|
+
| A lasting architecture choice disappears into a task summary | Preserve it in `decision-records` with this ledger as evidence. |
|
|
103
|
+
| A search result or secondary article is presented as official | Follow it to the primary source or mark the claim unverified. |
|
|
104
|
+
| “Latest docs” are read before the lockfile | Detect the local version and mode first; then choose applicable docs. |
|
|
105
|
+
|
|
106
|
+
## Orientación (siempre)
|
|
107
|
+
|
|
108
|
+
Cierra cada turno con el **bloque-brújula** (📍 dónde estás · ✅ qué hiciste · 🧭 por qué · ➡️ siguiente, terminando en pregunta), calibrado al dial de `02-DOCS/wiki/harness/user-profile.md`. **Nunca termines en seco.** Protocolo completo: skill `orient` → `skills/orient/references/orientation-contract.md`. (Defiere a `suggest` el “¿instalo la skill que falta?”.)
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Evals — source-grounded-development
|
|
2
|
+
|
|
3
|
+
The routing cases separate version-sensitive implementation evidence from general research, debugging, ADRs, docs and security review. The capability rubric requires the full local-version → primary-source → applicability → local-proof chain and treats unverified deployment assumptions as visible risk.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
skill: source-grounded-development
|
|
2
|
+
|
|
3
|
+
should_trigger:
|
|
4
|
+
- prompt: "Before changing sessions, verify the installed Express and express-session versions against their official production guidance."
|
|
5
|
+
why: "A concrete implementation depends on current version-specific framework behaviour."
|
|
6
|
+
- prompt: "No te fíes de memoria: mira el lockfile y la documentación oficial de Stripe para comprobar la semántica de reintentos."
|
|
7
|
+
why: "Spanish request for local version detection and primary-source verification."
|
|
8
|
+
- prompt: "This SDK changed between majors; prove which callback contract applies to the version in this repo."
|
|
9
|
+
why: "A version boundary changes implementation correctness."
|
|
10
|
+
- prompt: "Comprova amb fonts primàries si aquesta opció està deprecada en la versió instal·lada i quin reemplaçament toca."
|
|
11
|
+
why: "Catalan request for official deprecation evidence tied to the installed version."
|
|
12
|
+
- prompt: "Implement the browser API only after checking its current specification and support boundary, then test the fallback."
|
|
13
|
+
why: "Protocol/browser behaviour requires primary evidence plus local proof."
|
|
14
|
+
- prompt: "Review this integration and cite the official pages behind every provider-specific claim that affects the verdict."
|
|
15
|
+
why: "A review depends on current provider contracts rather than recalled assumptions."
|
|
16
|
+
|
|
17
|
+
should_not_trigger:
|
|
18
|
+
- prompt: "Research whether passkeys improve consumer login conversion and deliver a cited memo."
|
|
19
|
+
route_to: research-ops
|
|
20
|
+
why: "The artifact is a standalone research memo, not an implementation grounded in an installed version."
|
|
21
|
+
- prompt: "The checkout test fails on every third retry; reproduce it and find the root cause."
|
|
22
|
+
route_to: debug
|
|
23
|
+
why: "A concrete failure needs diagnosis; documentation may support but does not own the workflow."
|
|
24
|
+
- prompt: "Record why we selected Kafka over SQS and preserve the rejected alternatives."
|
|
25
|
+
route_to: decision-records
|
|
26
|
+
why: "Durable decision rationale is an ADR."
|
|
27
|
+
- prompt: "Write the public setup guide for our SDK users."
|
|
28
|
+
route_to: technical-writing
|
|
29
|
+
why: "The deliverable is documentation, not source-grounded implementation."
|
|
30
|
+
- prompt: "Audit this webhook handler for SSRF and secret leakage."
|
|
31
|
+
route_to: secure-coding
|
|
32
|
+
why: "Security threat/control review owns the task."
|
|
33
|
+
|
|
34
|
+
capability:
|
|
35
|
+
- scenario: "Implement production session cookies for an application whose framework and session-library versions are pinned but whose deployment proxy behaviour is unclear."
|
|
36
|
+
must_include:
|
|
37
|
+
- "Reads lockfiles, runtime configuration, deployment target, and local wrappers before choosing documentation."
|
|
38
|
+
- "Creates a bounded claim ledger covering cookie defaults, proxy trust, secure transport, secret handling, and session-store production requirements."
|
|
39
|
+
- "Uses version-matching official docs, release/migration notes, specifications, or upstream source; secondary sources are not treated as final authority."
|
|
40
|
+
- "Explains why each material source applies to this runtime and flags deployment facts that remain unverified."
|
|
41
|
+
- "Adds or runs focused local proof plus the repository's normal verification gate instead of trusting documentation alone."
|
|
42
|
+
- "Reports citations in the result or decision record without filling ordinary source comments with URLs."
|
|
@@ -59,7 +59,7 @@ capability:
|
|
|
59
59
|
- "Checks what is already installed (npx @ericrisco/rsc list) and never proposes a skill the user already has"
|
|
60
60
|
- "Makes at most one suggestion and does not interrupt the flow for nice-to-haves"
|
|
61
61
|
|
|
62
|
-
- scenario: "Mid-conversation, after base install, the user says 'quiero montar una pagina web para vender cursos online'. `init`, `harness`, `orient`, and `
|
|
62
|
+
- scenario: "Mid-conversation, after base install, the user says 'quiero montar una pagina web para vender cursos online'. `init`, `harness`, `orient`, `suggest`, and `bro` are already installed; `nextjs` is not. Show how rsc-suggest behaves."
|
|
63
63
|
must_include:
|
|
64
64
|
- "Treats the message as in-agent capability intent, not as a CLI-only consult task"
|
|
65
65
|
- "Runs `npx @ericrisco/rsc catalog --available` to see the not-installed skills (already excludes installed `init`/`harness`)"
|