agentsclimarketplace

Dream

Skill seldonframe/seldonframe/.claude/skills/dream

Daily out-of-band reflection — mine the last 24h of SeldonChat vision_check failures, cluster them, and PROPOSE (never auto-apply) lessons / tool-desc / schema-gap fixes, with a measured pass-rate delta. Run once/day via a schedule, or manually to reflect now. The Telescope→self-improvement loop, scoped to what we can verify honestly.From its SKILL.md

Install
npx -y skills add seldonframe/seldonframe --skill dream

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

3 things to look at

  • reads credentialsReads from 1 credential source: `CRON_SECRET`.
  • runs commandsInstructs the agent to run 1 command, including `curl -s -H "x-cron-secret: $CRON_SECRET" \ "https://app.seldonframe.com/api/cron/dream-collect?sinceHours=24"`.
  • fetches URLsInstructs the agent to fetch 1 URL, including https://app.seldonframe.com/api/cron/dream-collect?sinceHours=24.

SKILL.md

5.4 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it

/dream — the daily reflection loop

Turns the vision_check signal into systematic improvement instead of a human spotting bugs in screenshots. Runs AFTER the day's work (out-of-band), reads what failed, and hands back proposals a human approves — never silent self-edits.

Precondition: the signal must be truthful. /dream mines vision_check verdicts; if the verifier lies (false positives OR false negatives), the loop learns garbage. Never weaken the verifier to make a cluster go away.

The five guardrails (do not violate)

  1. Out-of-band. Runs on a schedule / on demand, never inside a live turn.
  2. Proposes, never auto-applies. No edits to CLAUDE.md / lessons / skills / tool descriptions without a human approving the diff. Wrong memory is worse than none.
  3. Measured or it didn't happen. Every run logs the daily vision pass-rate + delta. A dream that doesn't move the real metric is noise.
  4. Deterministic where possible. v1 clusters by trigger_tool + gap keywords (no embeddings — add them only when volume demands).
  5. Privacy. Work from instruction_summary (already truncated at persist); never surface raw end-customer PII in a report.

Steps

1. Collect

Pull the last 24h of reflection events from the CRON_SECRET-authed export endpoint (so this run needs NO database credentials — only the secret):

curl -s -H "x-cron-secret: $CRON_SECRET" \
  "https://app.seldonframe.com/api/cron/dream-collect?sinceHours=24"

It returns { since, window_hours, summary: { total, failures, skipped, pass_rate }, count, reflections: [...] }. The server already computes the metric (summary) via summarizeReflections; reflections are the raw rows to cluster. If CRON_SECRET is unset the endpoint 401s — report that and stop. If summary.failures === 0, log the metric and STOP (a clean day — nothing to propose). (CRON_SECRET is already set in Vercel; the run environment just needs the secret value, not DB access. The underlying query is collectRecentReflections / summarizeReflections in packages/crm/src/lib/vision/.)

2. Cluster (fan out — haiku)

Group failures by signature: trigger_tool + normalized gap phrasing. For each group, dispatch a haiku sub-agent that returns { cluster_label, count, exemplars[], likely_root_cause }. Keep it cheap — read the rows, return a gist. Only clusters with count >= 3 (a real pattern, not a one-off) go to step 3.

3. Classify + propose (one proposal per cluster)

For each qualifying cluster, classify the root cause into ONE of:

  • tool-bug → the tool wrote the wrong/dead model or lied. Propose a tasks/lessons.md entry + the offending file:line. (This is how today's slug='home' bug would have surfaced automatically.)
  • context-gap → the model picked the wrong field/tool. Propose a tool-description or cap.ts persona tweak (as a diff).
  • schema-gap → users keep asking for something the r1 schema can't express (e.g. "a video under the headline", "move the form left"). Propose a product ticket, NOT a code change — this is the demand-driven signal for which fields to widen next (the answer to "why not just add more tools": add them from data).
  • verifier-bug → the change actually worked but vision graded it false (e.g. a below-fold element the screenshot missed). Propose a fix to lib/vision/verify-page.ts. Highest priority — a lying verifier poisons this whole loop.
  • prompt-gap → propose a skill / instruction refinement (diff).

4. Write the report (human-gated)

Write docs/dreams/YYYY-MM-DD-dream.md: the metric, each cluster (label, count, root-cause class, exemplars), and the concrete proposed diff/ticket. Surface the diffs for approval (a PR, or spawn_task per proposal). Apply nothing.

5. Measure

Append one line to docs/dreams/self-reflection-log.md: date · total · passRate · Δ vs prior day · #clusters · #proposals · #approved-since-last. This is the loop's own scorecard — if passRate isn't trending up as proposals get approved, the loop isn't working and needs re-think, not more runs.

Scheduling

Run daily via a Claude Code routine: /schedule a once-a-day job whose prompt is "Run /dream". Late local time, after the day's traffic. Manual /dream any time to reflect on demand. (A Vercel cron can't do this — the clustering/synthesis needs the agent harness.)

Scope

v1 = the copilot builder surface (surface='copilot' in agent_reflection_events). Extending the same table + loop to deployed customer agents (self-improving Brain v2) is the higher-leverage product follow-up — deliberately deferred so v1 stays small and honest.

The self-referential proof

2026-07-07, by hand: vision_check caught SeldonChat's "Done ✅"-but-not-applied lie → clustered → root-caused (slug='home' vs 'r1') → fixed → captured the lesson → then caught the inverse (a below-fold false negative) → fixed the verifier. /dream automates the detect→cluster→propose steps so the next such class surfaces without a human noticing it in a screenshot first.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most quality gates skills give in ~1.3k tokens

Counted across 1,524 of the 2,830 authors here whose files we hold, read 2026-09-06

  • Read full output and check exit codein 45 of 1524, across 40 files
  • Verify output confirms the claimin 44 of 1524, across 39 files
  • Identify the command that proves the claimin 43 of 1524, across 39 files
  • Execute the full verification commandin 36 of 1524, across 30 files
  • Produce a verification reportin 34 of 1524, across 18 files
  • Review git diff changesin 30 of 1524, across 16 files
  • Fix build failures immediatelyin 29 of 1524, across 9 files
  • Group findings by severityin 28 of 1524
  • State claim only with evidencein 27 of 1524, across 22 files
  • Verify regression tests with red-green cyclein 26 of 1524, across 22 files
  • Run the full test suitein 26 of 1524, across 25 files
  • Run test suite with coveragein 25 of 1524, across 10 files

Said here and by no other author read

  • Run reflection out-of-band
  • Propose changes but never auto-apply
  • Cluster failures by trigger tool and gap keywords
  • Only process clusters with three or more failures
  • Classify root causes into defined categories
  • Write a report with metrics and proposed diffs

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.