@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.
Files changed (97) hide show
  1. package/README.md +1 -1
  2. package/manifest.json +110 -86
  3. package/package.json +1 -1
  4. package/scripts/lib/domains.js +1 -1
  5. package/scripts/skill-migration-brief.md +192 -0
  6. package/skills/ab-testing/SKILL.md +9 -41
  7. package/skills/accessibility/SKILL.md +5 -7
  8. package/skills/ads/SKILL.md +9 -24
  9. package/skills/agent-eval/SKILL.md +7 -33
  10. package/skills/agent-safety/SKILL.md +7 -14
  11. package/skills/ai-media/SKILL.md +4 -20
  12. package/skills/analytics/SKILL.md +8 -30
  13. package/skills/analyze/SKILL.md +24 -59
  14. package/skills/angular/SKILL.md +12 -25
  15. package/skills/api-connector-builder/SKILL.md +10 -27
  16. package/skills/api-design/SKILL.md +7 -14
  17. package/skills/article-writing/SKILL.md +1 -18
  18. package/skills/astro/SKILL.md +36 -54
  19. package/skills/author-skill/SKILL.md +41 -74
  20. package/skills/author-skill/evals/README.md +5 -5
  21. package/skills/author-skill/evals/cases.yaml +8 -8
  22. package/skills/author-skill/references/description-recipe.md +25 -26
  23. package/skills/author-skill/references/eval-authoring.md +1 -1
  24. package/skills/author-skill/references/rsc-conventions.md +1 -1
  25. package/skills/automation-flows/SKILL.md +6 -16
  26. package/skills/automation-strategy/SKILL.md +1 -9
  27. package/skills/aws-essentials/SKILL.md +6 -23
  28. package/skills/backups/SKILL.md +1 -7
  29. package/skills/bash-scripting/SKILL.md +5 -9
  30. package/skills/bookkeeping/SKILL.md +2 -10
  31. package/skills/brand-identity/SKILL.md +18 -44
  32. package/skills/brand-voice/SKILL.md +4 -31
  33. package/skills/building-agents/SKILL.md +20 -103
  34. package/skills/business-intelligence/SKILL.md +9 -23
  35. package/skills/calendar-scheduling/SKILL.md +11 -27
  36. package/skills/case-studies/SKILL.md +3 -8
  37. package/skills/chatbot/SKILL.md +6 -23
  38. package/skills/chrome-extension/SKILL.md +2 -2
  39. package/skills/clarify/SKILL.md +31 -72
  40. package/skills/clickhouse-analytics/SKILL.md +2 -8
  41. package/skills/client-onboarding/SKILL.md +17 -19
  42. package/skills/cloudflare/SKILL.md +3 -8
  43. package/skills/code-review/SKILL.md +10 -23
  44. package/skills/codebase-onboarding/SKILL.md +2 -7
  45. package/skills/cold-outreach/SKILL.md +9 -30
  46. package/skills/community/SKILL.md +4 -31
  47. package/skills/competitor-watch/SKILL.md +20 -35
  48. package/skills/compliance/SKILL.md +10 -37
  49. package/skills/compose-multiplatform/SKILL.md +1 -1
  50. package/skills/constitution/SKILL.md +8 -35
  51. package/skills/content-engine/SKILL.md +4 -16
  52. package/skills/context-budget/SKILL.md +3 -21
  53. package/skills/continuous-learning/SKILL.md +10 -40
  54. package/skills/contracts/SKILL.md +6 -17
  55. package/skills/coolify/SKILL.md +8 -14
  56. package/skills/cost-tracking/SKILL.md +3 -11
  57. package/skills/course-builder/SKILL.md +17 -45
  58. package/skills/course-storytelling/SKILL.md +26 -94
  59. package/skills/cpp/SKILL.md +26 -71
  60. package/skills/csharp-dotnet/SKILL.md +19 -38
  61. package/skills/customer-support/SKILL.md +14 -37
  62. package/skills/dashboard/SKILL.md +6 -26
  63. package/skills/data-cleaning/SKILL.md +37 -63
  64. package/skills/data-policy/SKILL.md +8 -21
  65. package/skills/data-scraper/SKILL.md +1 -7
  66. package/skills/debug/SKILL.md +10 -49
  67. package/skills/deployment/SKILL.md +38 -101
  68. package/skills/design/SKILL.md +34 -116
  69. package/skills/fable-operator/SKILL.md +1 -4
  70. package/skills/fastapi/SKILL.md +50 -82
  71. package/skills/flutter/SKILL.md +41 -89
  72. package/skills/go/SKILL.md +57 -105
  73. package/skills/harness/SKILL.md +52 -68
  74. package/skills/implement/SKILL.md +1 -1
  75. package/skills/init/SKILL.md +152 -168
  76. package/skills/marketing/SKILL.md +30 -80
  77. package/skills/nextjs/SKILL.md +42 -116
  78. package/skills/orient/SKILL.md +25 -20
  79. package/skills/parallel/SKILL.md +9 -75
  80. package/skills/plan/SKILL.md +92 -165
  81. package/skills/postgresdb/SKILL.md +52 -72
  82. package/skills/presentations/SKILL.md +49 -87
  83. package/skills/python/SKILL.md +23 -72
  84. package/skills/react/SKILL.md +19 -67
  85. package/skills/review/SKILL.md +22 -52
  86. package/skills/rust/SKILL.md +40 -115
  87. package/skills/sdd-init/SKILL.md +9 -14
  88. package/skills/secure-coding/SKILL.md +80 -109
  89. package/skills/ship/SKILL.md +25 -55
  90. package/skills/tasks/SKILL.md +37 -61
  91. package/skills/typescript/SKILL.md +22 -55
  92. package/skills/verify/SKILL.md +8 -32
  93. package/skills/viral-score/SKILL.md +122 -0
  94. package/skills/viral-score/evals/README.md +16 -0
  95. package/skills/viral-score/evals/cases.yaml +50 -0
  96. package/skills/vue-nuxt/SKILL.md +45 -106
  97. package/skills/worktrees/SKILL.md +24 -69
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: go
3
- description: "Use when writing, reviewing, testing, securing, or shipping Go code or HTTP services - Go idioms (simplicity, useful zero value, accept-interfaces/return-structs, functional options, embedding), error wrapping with %w and errors.Is/As, goroutines/channels/context/errgroup concurrency, net/http with Go 1.22 routing, log/slog structured logging, graceful shutdown, cmd/-internal/-pkg/ layout, table-driven tests with httptest/-race/fuzz, and govulncheck/SQL-parametrization security. Triggers - \"write a Go service/handler\", \"review this Go code\", \"add tests\", \"fix a goroutine leak\", \"is this idiomatic Go\", .go files, go.mod, net/http, slog, chi, errgroup."
3
+ description: "Use when writing, reviewing, testing, or shipping Go code and HTTP services: idioms, `%w` error wrapping, goroutine/context/errgroup concurrency, net/http 1.22 routing, log/slog, project layout, table-driven tests, Go hardening. NOT language-agnostic threat modeling (that is `secure-coding`), NOT Dockerfile/CI shipping (that is `deployment`)."
4
4
  tags: [go, golang, http, backend, service]
5
5
  recommends: [postgresdb, secure-coding, deployment]
6
6
  origin: risco
@@ -8,55 +8,27 @@ origin: risco
8
8
 
9
9
  # Idiomatic Go services
10
10
 
11
- Write, review, test, secure, and ship idiomatic Go HTTP services.
12
-
13
11
  Targets **Go 1.22+** (Go 1.26 is the current stable release): enhanced `net/http` routing
14
12
  (`mux.HandleFunc("GET /users/{id}", h)` + `r.PathValue`), `log/slog` structured
15
13
  logging, and fixed loop-variable semantics (no more `tt := tt`).
16
14
 
17
- ## When to use / When NOT to use
18
-
19
15
  > **⚠️ SDD new-feature gate — read this first.** If this skill fired on a **new, non-trivial feature or behaviour change** and there is **no approved spec + plan** under `02-DOCS/wiki/sdd/`, STOP — do **not** write feature code yet. Hand off to `../specify/SKILL.md` first: it runs brainstorm → spec → plan → tasks before any code, then routes back here once the plan is approved. Build here directly only for a genuinely one-line / low-risk change. Method: `../sdd/SKILL.md`.
20
16
 
21
- **Use when:**
17
+ ## Boundary
22
18
 
23
- - Authoring, reviewing, or testing any `.go` file.
24
- - Designing or wiring a Go HTTP API (`net/http`, chi, middleware, handlers).
25
- - Debugging concurrency: goroutine leaks, data races, deadlocks, context plumbing.
26
- - Structuring a Go module (`cmd/`, `internal/`, `pkg/`, constructor injection).
27
- - Hardening or shipping a Go binary (timeouts, TLS, `govulncheck`, graceful shutdown).
19
+ Go error handling and HTTP contract design (status-code taxonomy, REST resource naming) live
20
+ **here** — this skill is the canonical authority for both in Go. Delegate outward:
28
21
 
29
- **When NOT to use (delegate):**
22
+ - Language-agnostic abuse/authz review, threat modeling, OWASP-class bugs ->
23
+ [`secure-coding`](../secure-coding/SKILL.md). This skill keeps the Go-specific controls:
24
+ SQL params, server timeouts, `govulncheck`, TLS defaults.
25
+ - Containerfile / k8s / CI pipeline authoring -> [`deployment`](../deployment/SKILL.md).
26
+ This skill ships only a Docker note + `ldflags`.
27
+ - Recording per-project conventions in a workspace wiki -> [`harness`](../harness/SKILL.md)
28
+ (see "Project grounding" below).
30
29
 
31
- - Language-agnostic abuse/authz review, threat modeling, OWASP-class bugs -> `secure-coding`
32
- (this skill keeps Go-specific controls: SQL params, server timeouts, `govulncheck`, TLS defaults).
33
- - Containerfile / k8s / CI pipeline authoring -> `deployment` (this skill ships only a Docker note + `ldflags`).
34
- - Recording per-project conventions in a workspace wiki -> `harness` (see "Project grounding" below).
35
- - Non-service Go (CLI tooling, codegen, ML): patterns apply, but the HTTP/production half is irrelevant.
36
-
37
- Go error handling and HTTP contract design (status-code taxonomy, REST resource naming) live
38
- **here**, not in a separate skill — this skill is the canonical authority for both in Go.
39
-
40
- ## Decision rules
41
-
42
- Apply these on every Go edit:
43
-
44
- 1. Clear over clever; return early, keep the happy path unindented.
45
- 2. Accept interfaces, return concrete structs; define interfaces in the **consumer** package.
46
- 3. Make the zero value useful; never ship a type that panics before a constructor runs.
47
- 4. `context.Context` is the **first** param, never stored in a struct, never `nil` (use
48
- `context.TODO()` while wiring).
49
- 5. Wrap every crossed boundary with `fmt.Errorf("verb: %w", err)`; classify with
50
- `errors.Is`/`errors.As`, never string-match messages.
51
- 6. No package-level mutable state; inject dependencies through constructors.
52
- 7. Every goroutine needs a known exit path (context or a closed channel); a started
53
- goroutine you cannot stop is a leak.
54
- 8. Validate at the boundary; parametrize every SQL query; set all server timeouts; run
55
- `govulncheck` before shipping.
56
- 9. Tests are table-driven with subtests; run `-race` in CI; treat `go vet`/`staticcheck`
57
- failures as build failures.
58
- 10. Pick value-or-pointer receiver per type and stay consistent; mutating / large /
59
- contains-`sync` -> pointer.
30
+ Non-service Go (CLI tooling, codegen, ML): the patterns apply, but the HTTP/production half
31
+ is irrelevant.
60
32
 
61
33
  ## Idioms
62
34
 
@@ -124,7 +96,8 @@ type Service struct {
124
96
  // Bad: deep type trees (Base -> Middle -> Leaf) modeling "is-a" inheritance - avoid.
125
97
  ```
126
98
 
127
- **Early return.** Invert the error and `return`; keep the happy path flat (no arrow code).
99
+ **Early return.** Clear over clever: invert the error and `return`; keep the happy path flat
100
+ (no arrow code).
128
101
 
129
102
  ```go
130
103
  // Good: each failure returns immediately; the success path is unindented.
@@ -144,13 +117,14 @@ func save(ctx context.Context, u *User) error {
144
117
  never a global `var db *sql.DB` opened in `init()` - globals couple everything and kill
145
118
  testability.
146
119
 
120
+ **Receivers.** Pick value or pointer per type and stay consistent across its method set;
121
+ mutating / large / contains-`sync` -> pointer.
122
+
147
123
  **Go 1.22 loopvar.** Loop variables are per-iteration now. Stop emitting the workaround:
148
124
  inside `for _, tt := range tests` the line `// tt := tt` is obsolete - DELETE it.
149
125
 
150
126
  ## Errors
151
127
 
152
- Go error handling is owned here — the sentinel/typed/wrap/classify model below is canonical.
153
-
154
128
  **Sentinel vs typed.** Sentinels for identity; typed errors for data.
155
129
 
156
130
  ```go
@@ -159,7 +133,7 @@ type ValidationError struct{ Field, Msg string } // typed: carries data
159
133
  func (e *ValidationError) Error() string { return fmt.Sprintf("%s: %s", e.Field, e.Msg) }
160
134
  ```
161
135
 
162
- **Wrap and classify.** Wrap with `%w`; never compare message strings.
136
+ **Wrap and classify.** Wrap every crossed boundary with `%w`; never compare message strings.
163
137
 
164
138
  ```go
165
139
  err := fmt.Errorf("find user %s: %w", id, ErrNotFound)
@@ -218,13 +192,12 @@ func read(name string) (err error) {
218
192
  }
219
193
  ```
220
194
 
221
- **Anti-patterns:** `if err.Error() == "not found"` (string match); `panic` for control flow;
222
- swallowing with `_ = err`.
223
-
224
195
  ## Concurrency (essentials)
225
196
 
226
- Bound work with a context deadline; bound concurrency with `errgroup` — the derived `ctx`
227
- cancels siblings on first error, and `g.SetLimit(n)` caps in-flight goroutines:
197
+ `context.Context` is the **first** param of every call, never stored in a struct, never `nil`
198
+ (use `context.TODO()` while wiring). Bound work with a context deadline; bound concurrency
199
+ with `errgroup` — the derived `ctx` cancels siblings on first error, and `g.SetLimit(n)` caps
200
+ in-flight goroutines:
228
201
 
229
202
  ```go
230
203
  g, ctx := errgroup.WithContext(ctx)
@@ -321,16 +294,18 @@ HTTP handlers via `httptest`: `req := httptest.NewRequest("GET", "/users/1", nil
321
294
  `w := httptest.NewRecorder()`; `h.ServeHTTP(w, req)`; then assert on `w.Code` / `w.Body`.
322
295
 
323
296
  Use `t.Helper()` in assertions, `t.TempDir()` for files, `t.Cleanup()` for teardown,
324
- `t.Setenv()` for env. Run `go test -race -cover ./...`. Stdlib `testing` is the default;
325
- reach for `testify/require` only for deep-equality or large suites.
297
+ `t.Setenv()` for env. Run `go test -race -cover ./...`, and treat `go vet` / `staticcheck`
298
+ failures as build failures. Stdlib `testing` is the default; reach for `testify/require` only
299
+ for deep-equality or large suites.
326
300
 
327
301
  Golden files, fuzzing, benchmarks, httptest matrices, interface fakes ->
328
302
  `references/testing.md`.
329
303
 
330
304
  ## Security (embedded)
331
305
 
332
- Parametrize SQL (PostgreSQL; prefer `pgx v5` over `database/sql`); cap request bodies and reject unknown
333
- fields; set a TLS floor and trust the `crypto/tls` defaults:
306
+ Validate at the boundary: parametrize SQL (PostgreSQL; prefer `pgx v5` over `database/sql`);
307
+ cap request bodies and reject unknown fields; set a TLS floor and trust the `crypto/tls`
308
+ defaults:
334
309
 
335
310
  ```go
336
311
  // Good // Bad: string interpolation = SQL injection.
@@ -372,26 +347,26 @@ timeout, 503 on failure). Graceful shutdown as shown above.
372
347
  Docker note: distroless/static base, `CGO_ENABLED=0`, multi-stage build. Full Containerfile
373
348
  -> `deployment`.
374
349
 
375
- ## Anti-patterns / rationalizations -> STOP
350
+ ## Anti-patterns
376
351
 
377
- | Rationalization | Reality / Do instead |
352
+ | Anti-pattern | Do instead |
378
353
  | --- | --- |
379
- | "I'll store ctx in the struct to avoid threading it" | No. `ctx` is the first arg of every call. |
380
- | "`_ = err` here, it can't fail" | Handle, log, or document why; `errcheck` catches it. |
381
- | "string-compare the error message" | `errors.Is`/`errors.As`; messages are not API. |
382
- | "global `db`/`logger` is simpler" | Inject via constructor; globals kill testability. |
383
- | "fire the goroutine, it'll finish" | Unbounded/unstoppable goroutine = leak; give it ctx + buffer. |
384
- | "I'll add `tt := tt` to be safe" | Go 1.22 fixed loopvar; it's noise now. |
385
- | "interface in the provider package, return the interface" | Return structs; interface lives with the consumer. |
386
- | "no timeouts, the LB handles it" | Set all four `http.Server` timeouts; Slowloris is real. |
387
- | "`panic` for this bad input" | Return an error; panic only for programmer bugs / `main` wiring. |
388
- | "skip `-race`, tests pass" | Race bugs are silent; `-race` in CI is mandatory. |
389
- | "`fmt.Sprintf` into SQL, the input's trusted" | Parametrize ($1...); trust nothing at the boundary. |
390
- | "testify everywhere" | Stdlib first; reach for testify only when it earns its weight. |
391
-
392
- ## Quick reference
393
-
394
- | Task | Idiom / command |
354
+ | Storing `ctx` in a struct to avoid threading it | `ctx` is the first arg of every call. |
355
+ | `_ = err` because it "can't fail" | Handle, log, or document why; `errcheck` catches it. |
356
+ | String-comparing the error message | `errors.Is` / `errors.As`; messages are not API. |
357
+ | Global `db` / `logger` because it's "simpler" | Inject via constructor; globals kill testability. |
358
+ | Fire-and-forget goroutine ("it'll finish") | Unbounded/unstoppable goroutine = leak; give it ctx + buffer. |
359
+ | `tt := tt` added "to be safe" | Go 1.22 fixed loopvar; it's noise now. |
360
+ | Interface in the provider package, returning the interface | Return structs; interface lives with the consumer. |
361
+ | No timeouts because "the LB handles it" | Set all four `http.Server` timeouts; Slowloris is real. |
362
+ | `panic` on bad input | Return an error; panic only for programmer bugs / `main` wiring. |
363
+ | Skipping `-race` because tests pass | Race bugs are silent; `-race` in CI is mandatory. |
364
+ | `fmt.Sprintf` into SQL on "trusted" input | Parametrize (`$1`...); trust nothing at the boundary. |
365
+ | `testify` everywhere | Stdlib first; reach for testify only when it earns its weight. |
366
+
367
+ ## Toolchain gate
368
+
369
+ | Task | Command |
395
370
  | --- | --- |
396
371
  | Format | `gofmt -w .` / `goimports -w .` |
397
372
  | Vet | `go vet ./...` |
@@ -399,40 +374,17 @@ Docker note: distroless/static base, `CGO_ENABLED=0`, multi-stage build. Full Co
399
374
  | Test (race+cover) | `go test -race -cover ./...` |
400
375
  | Fuzz | `go test -fuzz=Fuzz -fuzztime=30s` |
401
376
  | Vulns | `govulncheck ./...` |
402
- | Wrap error | `fmt.Errorf("verb: %w", err)` |
403
- | Classify error | `errors.Is` / `errors.As` |
404
- | Route | `mux.HandleFunc("GET /p/{id}", h)` + `r.PathValue("id")` |
405
- | Log | `slog.Info("msg", "key", val)` |
406
- | Shutdown | `signal.NotifyContext` + `srv.Shutdown(ctx)` |
407
- | Leak guard | buffered chan + `select { case ch<-v: case <-ctx.Done(): }` |
408
377
  | Local gate | `./scripts/verify.sh` (run in your module root) |
409
378
 
410
- ## Project grounding (02-DOCS + CLAUDE.md)
411
-
412
- When this skill runs in a project with a `02-DOCS/` layer (the
413
- [`harness`](../harness/SKILL.md) Karpathy wiki), record this
414
- project's service decisions there and index them in `02-DOCS/wiki/index.md`, so the next
415
- agent inherits the conventions instead of re-deriving them.
416
-
417
- 1. **Find the article** `02-DOCS/wiki/stack/go.md`, indexed in `02-DOCS/wiki/index.md` (the Knowledge map index; root `CLAUDE.md` points to it).
418
- 2. **If missing or stale**, create/update it with the project's real choices — the project layout, the router (stdlib 1.22 / chi), the error and `slog` logging conventions, and concurrency/timeout defaults —
419
- then index it in `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer to it).
420
- 3. **Read it first on every use** and stay consistent; when a convention changes, update the
421
- article (bump its `Updated` date) in the same change.
422
-
423
- No `02-DOCS/` layer? Skip silently (optionally suggest `harness`). Unlike the
424
- brand study, technical conventions are *recorded, not gated* — never block the task on this.
425
-
426
- ## See Also
427
-
428
- Sibling skills (all resolve under `skills/`):
429
-
430
- - [`secure-coding`](../secure-coding/SKILL.md) - threat modeling and language-agnostic authz/abuse/OWASP review (this skill keeps the Go-specific controls).
431
- - [`deployment`](../deployment/SKILL.md) - Docker multi-stage, GitHub Actions CI, Coolify/Vercel/Hetzner shipping (this skill ships only the Docker note + `ldflags`).
432
- - [`harness`](../harness/SKILL.md) - the `02-DOCS/` workspace wiki where per-project Go conventions are recorded (see "Project grounding").
379
+ ## Project grounding (02-DOCS)
433
380
 
434
- Local references (read when):
381
+ In a project with a `02-DOCS/` layer (the [`harness`](../harness/SKILL.md) Karpathy wiki), this
382
+ project's service decisions live in `02-DOCS/wiki/stack/go.md`, indexed from
383
+ `02-DOCS/wiki/index.md` (the Knowledge map; root `CLAUDE.md` keeps only a short pointer to it).
384
+ Read it first on every use and stay consistent. If it is missing or stale, write the project's
385
+ real choices there — the project layout, the router (stdlib 1.22 / chi), the error and `slog`
386
+ conventions, concurrency/timeout defaults — index it, and bump its `Updated` date in the same
387
+ change.
435
388
 
436
- - `references/concurrency.md` - goroutines, channels, errgroup, leaks, race detector.
437
- - `references/http-services.md` - routing, middleware, slog, graceful shutdown, full skeleton.
438
- - `references/testing.md` - table tests, httptest, fakes, golden files, fuzz, benchmarks.
389
+ No `02-DOCS/` layer? Skip silently (optionally suggest `harness`). Unlike the brand study,
390
+ technical conventions are *recorded, not gated* — never block the task on this.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: harness
3
- description: "Use when you want to control, govern or maintain the harness of a workspace — software OR a non-code base (a company, an ops desk, a personal knowledge vault). The harness is the CONTROL PLANE: the `01-TOOLS/` operational tooling layer + the `02-DOCS/` Karpathy chaos→knowledge engine + the root Knowledge map. Triggers: 'control the harness', 'gestiona el arnés', 'manage 01-TOOLS and 02-DOCS', 'audit my workspace', 'audita mi proyecto', 'procesa el inbox', 'sal a pasear', migrating numbered `XX-*` folders into the canonical structure, detecting external provider integrations (Stripe, Mailjet, Hetzner, Firebase, OAuth, Postgres…) and scaffolding connection-ready tools, generating root `CLAUDE.md`/`AGENTS.md`, or consolidating scattered docs into a living wiki. `init` is the bootstrap front door; THIS skill is the ongoing control. Brownfield-first; greenfield is the degenerate case."
3
+ description: "Use to control, govern or maintain a workspace's harness — software or non-code (a company, an ops desk, a knowledge vault). The harness is the control plane: the `01-TOOLS/` tooling layer, the `02-DOCS/` chaos→knowledge wiki, and the root Knowledge map. It audits, migrates legacy `XX-*` folders, scaffolds provider tooling, sweeps the inbox, and generates root CLAUDE.md/AGENTS.md. Brownfield-first. NOT the bootstrap front door (that is `init`, which hands off here)."
4
4
  tags: [harness, company, ops, docs, wiki, connect, tools, knowledge]
5
5
  recommends: [init]
6
6
  profiles: [minimal, core, full]
@@ -11,66 +11,65 @@ profiles: [minimal, core, full]
11
11
  The **harness** is the control plane of a workspace. A workspace need not be code: it can be a company, an ops desk, a legal archive, a personal knowledge vault. Whatever it is, the harness is the durable apparatus that keeps it operable and legible, made of three parts:
12
12
 
13
13
  - **`01-TOOLS/<PROVIDER>/`** — the operational tooling layer. One folder per external provider, co-locating credentials (`.env`) with the scripts that consume them. Each tool ships a working `test_connection` against the real API.
14
- - **`02-DOCS/`** — the **Karpathy chaos→knowledge engine**: a domain-agnostic LLM wiki (`inbox/` + `raw/` + `raw/worklog/` + `wiki/` + `wiki/index.md` + `wiki/log.md` + `wiki/gaps.md` + `wiki/scores.json` + the `.base` views), fully embedded in this skill. It feeds from **two on-ramps**: (1) the user drops **any raw file in any format** (PDF, image, CSV, JSON, txt, html…) into `inbox/`, and an **Auto-Ingest Sweep** ("the agent goes for a walk") extracts, classifies, cross-links, and compiles it — and goes further, **discovering un-ingested documents anywhere in the workspace** (a stray `/transcripts`, `/facturas`…), bounded by `.rscignore` and de-duplicated by the `wiki/.ingested.json` ledger, fired automatically at SessionStart (when the inbox has material) and by the daily cron. Ingest keeps the repo clean: a loose file it ingests at the workspace root (or anything in `inbox/`) is **moved into `raw/`** (relocated, never deleted — a dropped PDF ends up in `raw/`, not at the root), while files inside a user-maintained folder are copied and consolidation is proposed; removing a redundant folder needs explicit consent; (2) a **Worklog Sweep** captures **what we do** — every meaningful session of work is itself a `raw` source (`raw/worklog/`) compiled into the wiki, fired by a `PreCompact`/`SessionEnd` hook, by an explicit milestone (a commit), or by the daily curation automation (`references/daily-curation-automation.md`). The `wiki/` is a **100%-OKF-v0.1 bundle** (Google's [Open Knowledge Format](https://github.com/GoogleCloudPlatform/knowledge-catalog/tree/main/okf)) AND an **Obsidian-native** vault at the same time — standard markdown links, OKF-standard YAML frontmatter (Properties), readable filenames, and `.base` views give a real graph + live tables — structure, **not vector DB / embeddings / RAG**. The agent writes it; the human reads it in Obsidian. See `references/wiki-protocol.md` for the protocol, `references/ingest-formats.md` for the multiformat Fetch, `references/wiki-worklog-template.md` for the work capture, and `references/obsidian-scaffolding.md` for the vault scaffolding. Topics are inferred from content (`finanzas/`, `legal/`, `crm/`…), never hardcoded. The wiki **self-improves continuously**: every Ingest, Sweep and Query triggers a Maintenance Pass (deterministic lint, score recomputation, gap detection, Related/See-Also sweep), and every N interactions a Micro-Improve runs. Deep Improve runs on explicit request or via the scheduled daily curation. No external skill needed.
14
+ - **`02-DOCS/`** — the **Karpathy chaos→knowledge engine**: a domain-agnostic LLM wiki
15
+ (`inbox/`, `raw/`, `raw/worklog/`, `wiki/` with its `index.md` / `log.md` / `gaps.md` /
16
+ `scores.json` and `.base` views), embedded in this skill — no external sub-skill required.
17
+
18
+ Two on-ramps feed it. **Ingest**: the user drops any file in any format into `inbox/`, and the
19
+ Auto-Ingest Sweep extracts, classifies, cross-links and compiles it — then goes for a walk,
20
+ discovering un-ingested documents anywhere in the workspace, bounded by `.rscignore` and
21
+ de-duplicated through the `wiki/.ingested.json` ledger. **Worklog**: every meaningful session of
22
+ work is itself a raw source in `raw/worklog/`, captured on `PreCompact`/`SessionEnd`, at a commit
23
+ milestone, or by the daily curation pass.
24
+
25
+ Ingest relocates, never deletes: a loose file at the workspace root moves into `raw/`; a file
26
+ inside a folder the user maintains is copied, and consolidating that folder needs explicit consent.
27
+
28
+ The `wiki/` is simultaneously an OKF-v0.1 bundle
29
+ ([Open Knowledge Format](https://github.com/GoogleCloudPlatform/knowledge-catalog/tree/main/okf))
30
+ and an Obsidian-native vault: markdown links, YAML frontmatter, readable filenames, `.base` views
31
+ giving a real graph and live tables. **Structure, not vector DB / embeddings / RAG.** The agent
32
+ writes it; the human reads it in Obsidian. Topics are inferred from content (`finanzas/`, `legal/`,
33
+ `crm/`…), never hardcoded.
34
+
35
+ It compounds on its own: every Ingest, Sweep and Query triggers a Maintenance Pass (lint, score
36
+ recomputation, gap detection, Related sweep), a Micro-Improve runs every N interactions, and Deep
37
+ Improve runs on request or on the daily schedule. Protocol → `references/wiki-protocol.md`;
38
+ formats → `references/ingest-formats.md`; capture → `references/wiki-worklog-template.md`;
39
+ vault → `references/obsidian-scaffolding.md`.
15
40
  - **The Knowledge map** — the `## Knowledge map` section of the root `CLAUDE.md` that indexes the wiki (including the `harness/` topic) and is read by every other skill before it works in its area.
16
41
 
17
42
  `harness` is the **protagonist concept**. `init` is the bootstrap front door — it gauges the user, drafts the profile, and hands off the first scaffold. THIS skill (`harness`) is the **ongoing control**: it audits, migrates, scaffolds, sweeps the inbox, and keeps the wiki, the tooling and the Knowledge map honest over the life of the workspace. It also generates root `CLAUDE.md` and `AGENTS.md`, and migrates legacy `XX-*` numbered folders into the canonical layout.
18
43
 
19
- ## Core behavior of the whole harness — non-technical-first + accompaniment dial
44
+ ## How the harness talks to the user
20
45
 
21
- This is the behavior the **entire harness honors** and that every other skill reads back. It governs how the agent talks, how many questions it asks, and how it decides things — for every interaction, not just the first.
46
+ Read `02-DOCS/wiki/harness/user-profile.md` before you start and adapt verbosity and question count
47
+ to the `technical_level` and `accompaniment_level` you find. L0 means terse and almost silent; L3
48
+ means explain everything and ask a lot. No profile yet → assume non-technical, and let `init` run
49
+ first contact (it owns the two gauging questions and the dial; do not re-ask them here).
22
50
 
23
- ### 1. Always start assuming NON-TECHNICAL
51
+ Two files carry the state, both indexed from the root `CLAUDE.md` Knowledge map under `harness/`:
52
+ `user-profile.md` for the living portrait of the user, and `decisions.md` as an append-only log —
53
+ date, requirements gathered, options presented, choice, why. Log every significant decision you take.
24
54
 
25
- The system **always starts assuming the user is non-technical.** The **very first question on first contact** gauges technical level, framed kindly — for example:
55
+ `.rsc/.no-harness` is the user's explicit "no harness in this repo". Treat it as canonical: never
56
+ overwrite it, never delete it, never auto-start onboarding past it.
26
57
 
27
- > "¿Te manejas con código y términos técnicos, o prefieres que te lo explique todo en cristiano?"
58
+ For long SDD work, write the recovery note `02-DOCS/wiki/sdd/sessions/<date>-<slug>.md` before
59
+ context compacts or the work is handed off — active artifacts, phase, last verdict, next steps,
60
+ risks, commands. It is what lets the next agent resume without trusting chat history.
28
61
 
29
- Default to **non-technical framing** (plain language, no jargon, analogies over internals) until the user tells you otherwise. Never assume fluency.
62
+ ### Significant decisions: requirements first, then exactly three options
30
63
 
31
- ### 2. Immediately ask the accompaniment / explanation level
64
+ For any significant decision (deploy target, database, hosting, tooling), gather the requirements
65
+ that actually drive the choice *before* presenting anything — for a deploy: expected and concurrent
66
+ users, budget, data residency, the team's ops comfort, scaling needs. At L0 ask only the few that
67
+ change the answer; at L3 ask all of them, one at a time. Then present exactly three options with
68
+ honest trade-offs, recommend one in language matched to their level, and log it.
32
69
 
33
- Right after the technical-level question, ask the desired **accompaniment level**, describing each option clearly so the user can choose. It is a dial:
34
-
35
- - **L0 "Modo cavernícola"** — mínimas palabras. Hazlo y ya, casi sin explicar.
36
- - **L1 "Breve"** — una línea de *por qué* en cada paso.
37
- - **L2 "Explica decisiones"** — justifica cada decisión relevante al avanzar.
38
- - **L3 "Acompañamiento total"** — explica TODO, hace muchas preguntas para contextualizar cada cosa, razona cada decisión. Ideal para no-técnicos.
39
-
40
- ### 3. Persist the profile + adapt every skill to it
41
-
42
- Persist the technical level, the accompaniment level, and **all ongoing analysis of the user** (goals, context, constraints, decisions taken) into `02-DOCS`:
43
-
44
- - `02-DOCS/wiki/harness/user-profile.md` — technical level, accompaniment level, goals, context, constraints (the living portrait of the user).
45
- - `02-DOCS/wiki/harness/decisions.md` — an **append-only** log of every significant decision taken, with date, the requirements gathered, the 3 options presented, the choice, and the why.
46
-
47
- Both files are referenced from the root `CLAUDE.md` `## Knowledge map` under the `harness/` topic. **Every skill READS `user-profile.md`** at the start of its work and **ADAPTS its verbosity and how many questions it asks** to the technical + accompaniment level found there. L0 means terse and almost silent; L3 means explain everything and ask a lot. When the level is unknown (no profile yet), default to non-technical + ask the two gauging questions before proceeding.
48
-
49
- `harness` itself MUST: (a) READ `02-DOCS/wiki/harness/user-profile.md` and adapt its own verbosity/questioning to the technical + accompaniment level; (b) LOG every significant decision it takes to `02-DOCS/wiki/harness/decisions.md` (append-only); (c) use the "siempre 3 opciones" pattern below for any significant decision.
50
-
51
- For long SDD work, the harness also respects the SDD session-summary convention:
52
- when context is about to compact, pause, or hand off, write
53
- `02-DOCS/wiki/sdd/sessions/<date>-<slug>.md` with active artifacts, current
54
- phase, last verdict, next steps, risks, commands and skill_resolution. This is
55
- not a replacement for the wiki; it is the recovery note that lets the next
56
- agent resume without trusting chat history.
57
-
58
- **Opt-out marker.** When a workspace has no profile yet, a freshly-installed session auto-starts `init` (via the `suggest` Onboarding gate and claude's SessionStart hook). A `.rsc/.no-harness` file is the explicit opt-out: present → never auto-start onboarding in this repo, even without a profile. `harness` treats it as canonical and never overwrites or deletes it.
59
-
60
- ### 4. Decision pattern — "siempre 3 opciones"
61
-
62
- For **any significant decision** (deploy target, database, framework, hosting, tooling…):
63
-
64
- 1. **FIRST gather the relevant requirements by asking the user.** For a deploy decision, that means: expected number of users, concurrent users, budget, data region / residency, the team's ops comfort, scaling needs. Don't present options before you understand the constraints. (At L3, ask all of them, one kind question at a time; at L0, ask only the few that actually change the answer.)
65
- 2. **THEN present EXACTLY 3 options** with honest trade-offs and a **clear recommendation matched to their answers AND their accompaniment level.** Explain *why* each one, in language matched to the user's technical level.
66
-
67
- Canonical deploy example:
68
-
69
- 1. **Hetzner VPS + Coolify** — barato, control total, self-managed (tú llevas el mantenimiento).
70
- 2. **Vercel** — zero-ops, gestionado, escala solo; caro a escala.
71
- 3. **Una tercera según el caso** — Fly.io / Railway / cloud gestionado, elegida por las respuestas del usuario.
72
-
73
- `harness` decides whether a decision is in scope or belongs elsewhere: it applies the pattern itself for harness-level choices, but **defers concrete deploy specifics to `deployment`** (which owns the deploy mechanics). In every case the requirements-first → 3-options → recommendation shape, and the decisions.md log entry, are the same.
70
+ The canonical deploy trio is Hetzner+Coolify (cheap, total control, self-managed), Vercel (zero-ops,
71
+ scales itself, costly at scale), and a third chosen from their answers. Apply the pattern yourself
72
+ for harness-level choices, but defer concrete deploy mechanics to `deployment`, which owns them.
74
73
 
75
74
  ## Core principle
76
75
 
@@ -302,9 +301,10 @@ From then on, **new index entries go to `02-DOCS/wiki/index.md`**, not `CLAUDE.m
302
301
  and reversible; it honors the "never delete user content" rule (you relocate it, with a pointer).
303
302
  Opt out of the size nudge with `.rsc/.no-claudemd-check`.
304
303
 
305
- ## Iron rules (non-negotiable)
304
+ ## Invariants
306
305
 
307
- These rules cut across every phase. Violating any one of them aborts the run.
306
+ These are not style preferences you can weigh against convenience — each one exists because
307
+ breaking it destroys something the user cannot get back. Violating any aborts the run.
308
308
 
309
309
  1. **Audit before action.** Nothing is written before the AUDIT is rendered and CONSENT is given.
310
310
  2. **Explicit consent only.** Silence, ambiguity, "ok" all mean NO. Only the exact-form strings count as yes.
@@ -318,22 +318,6 @@ These rules cut across every phase. Violating any one of them aborts the run.
318
318
  10. **`references/wiki-protocol.md` is the source of truth for `02-DOCS`.** Do not invent a different wiki structure.
319
319
  11. **Subproject internals are out of scope.** `.env.example`, `requirements.txt`, `package.json`, source files inside subprojects are READ for detection only. They are NEVER moved, renamed, modified, or deleted. The skill operates exclusively on workspace-root artifacts (`CLAUDE.md`, `AGENTS.md`, `01-TOOLS/`, `02-DOCS/`, and `XX-*` legacy folders at the root level).
320
320
 
321
- ## Rationalizations — STOP
322
-
323
- These thoughts mean the skill is about to violate its own rules. Recognize them and abort:
324
-
325
- | Excuse | Reality |
326
- |--------|---------|
327
- | "The user clearly meant yes when they said 'ok'" | No. They didn't say the exact string. Re-prompt. |
328
- | "Just this one tool is obviously needed even without evidence" | No. Catalog says no detector hit = no tool. |
329
- | "I'll write the `.env` with placeholder values — it's not real credentials" | No. `.env` is reserved for real credentials. Use `.env.example` only. |
330
- | "The existing `CLAUDE.md` is clearly outdated, I'll rewrite it" | No. Merge additively. The user owns their `CLAUDE.md`. |
331
- | "These files in `00-TOOLS/RANDOM/` look like docs to me, I'll move them" | If the classification confidence isn't high, mark AMBIGUOUS and leave in place. |
332
- | "I'll delete the legacy folder since it's empty after migration" | Only after the second exact-string consent. Empty + no consent = preserve. |
333
- | "Let me also reorganize the subproject internals while I'm here" | No. The skill operates on workspace root only. Subproject internals are out of scope. |
334
- | "The wiki structure could be a bit different here" | No. Follow `references/wiki-protocol.md` verbatim. |
335
- | "The `01-TOOLS/_TEMPLATE/` should be flavored with the user's first detected tool" | No. `_TEMPLATE/` is generic boilerplate with placeholders. Detected tools come from the catalog, not the template. |
336
-
337
321
  ## Red flags — abort and re-plan
338
322
 
339
323
  If any of these occur, stop and report:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: implement
3
- description: "Use when an approved plan and task list exist and it is time to turn them into working, tested code — the SDD phase AFTER analyze and BEFORE verify. Enforces TDD discipline: a test fails before the code that makes it pass. Triggers: 'implement the plan', 'build out the tasks', 'start coding this feature', 'work through the task list', 'execute the implementation', 'write the code for this spec', 'do task 3', 'continue implementing', 'red-green-refactor this', 'implement with tests first'. Delegates concrete test tooling to the stack skill (fastapi/go/nextjs/flutter) and fans independent tasks out via `parallel`. NOT spec writing (that is `specify`), NOT planning (that is `plan`), NOT the final lint/test/audit gate (that is `verify`)."
3
+ description: "Use when an approved plan and task list exist and it is time to turn them into working, tested code — the SDD phase after `analyze` and before `verify`. Enforces TDD: a failing test comes before the code that makes it pass, one task at a time, appended to a progress ledger that survives compaction. Delegates test tooling to the stack skill and fans disjoint tasks out via `parallel`. NOT spec writing (that is `specify`), NOT planning (that is `plan`), NOT the final lint/test/audit gate (that is `verify`)."
4
4
  tags: [sdd, implement, code]
5
5
  recommends: [verify]
6
6
  profiles: [core, full]