Skip to content

refactor(identity): remove DREAMING.md support - #2117

Open
aaf2tbz wants to merge 2 commits into
mainfrom
chore/2038-remove-dreaming-md
Open

aaf2tbz wants to merge 2 commits into
mainfrom
chore/2038-remove-dreaming-md

Conversation

@aaf2tbz

@aaf2tbz aaf2tbz commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

DREAMING.md was declared as the Dreaming prompt file, but nothing read it. resolveSpecialIdentityFiles in platform/core/src/identity.ts had no callers in the daemon, connectors, or surfaces, and Dreaming builds its prompt entirely in platform/daemon/src/pipeline/dreaming.ts (DREAMING_AGENT_PROMPT). Setup still wrote DREAMING.md into every managed workspace. Its guidance contradicts the current Dreaming contract, and edits to it had no effect.

This PR removes the file from the identity spec, the presets, setup, the dashboard, and the docs. Workspaces that still have it keep working.

Fixes #2038

Changes

  • platform/core/src/identity-spec.ts: removed the dreaming entry from IDENTITY_FILES and the DREAMING.md entries from every preset's special list. minimal, hermes, and custom now have special: []. IdentitySessionKind is now "heartbeat" | "bootstrap". Added isRetiredIdentitySpecialEntry, a pure predicate for kind: dreaming entries.
  • platform/core/src/identity.ts, index.ts: removed resolveSpecialIdentityFiles and its export, plus readSpecialIdentityEntry / readSpecialIdentityEntryList, which only it used. Added listRetiredIdentityEntries(agentsDir). It is used only for diagnostics and never resolves or reads the files.
  • surfaces/cli/templates/DREAMING.md.template: deleted. setup-migrate.ts no longer writes the file or the identity.special entry. Fresh setup gets this automatically from the presets.
  • surfaces/cli/src/features/setup-plan.ts: the plan schema no longer accepts kind: "dreaming", and rejects it with a message that names DREAMING.md as retired.
  • surfaces/cli/src/features/health.ts: signet doctor adds an info finding (retired_identity_file) when agent.yaml still has a kind: dreaming entry under identity.special. Doctor status is unchanged.
  • surfaces/dashboard/src/components/onboarding/{page,identity-step}.tsx: removed the template import, and onboarding now filters retired entries when it loads and saves identity config. Without the filter, re-saving identity on an existing workspace would have moved DREAMING.md into startup.load with no kind, so it would have been loaded into ordinary startup context (verified: the new test fails without this filter).
  • Docs: web/docs/.../getting-started/setup.mdx, web/docs/.../configuration/workspace-identity.md, skills/onboarding/SKILL.md, docs/specs/approved/dreaming-memory-consolidation.md, the success criterion in docs/specs/dependencies.yaml, and the web/marketing home mockup.

Decisions

The issue left two choices open:

  • identity.special dreaming entries in agent.yaml are ignored with a diagnostic, not failed. Every managed workspace created before this change has that entry. Failing would break all of them, which contradicts the acceptance criterion that existing workspaces behave the same. No code reads the entry. signet doctor reports it, and dashboard onboarding drops it the next time identity is saved. Signet does not rewrite agent.yaml on its own, and it never deletes DREAMING.md from disk.
  • Headless setup plans (signet setup --file) that ask for a dreaming special file fail validation explicitly. A plan is new, explicit input asking setup to create a retired file. Per AGENTS.md, retired inputs fail explicitly. The error names specialIdentityFiles.N.kind, says DREAMING.md is retired, and tells the user to remove the entry.

I kept IdentitySpecialFileEntry and the special preset field (narrowed rather than deleted). OpenClaw's HEARTBEAT.md and BOOTSTRAP.md still go through them for setup and agent.yaml. Nothing in Signet reads those two files either; OpenClaw reads them natively. Whether that mechanism should go too is outside this issue.

Type

  • feat — new user-facing feature (bumps minor)
  • fix — bug fix
  • refactor — restructure without behavior change
  • chore — build, deps, config, docs
  • perf — performance improvement
  • test — test coverage

Packages affected

  • @signet/core
  • @signet/daemon
  • @signet/cli / dashboard
  • @signet/sdk
  • @signet/connector-*
  • @signet/web
  • predictor
  • Other: skills/onboarding, docs/specs

Screenshots

No visual change. The dashboard edit only changes which identity config entries onboarding keeps. DREAMING.md was already hidden from the onboarding file picker through MANAGED_FILES.

Testing

  • bun test passes
  • bun run typecheck passes
  • bun run lint passes
  • Tested against running daemon
  • N/A

What I ran:

  • bun test platform/core/src/__tests__/identity.test.ts: 38 pass. Covers: no preset or identity file declares DREAMING.md; an existing workspace with the retired entry and file still loads only AGENTS.md, and loadIdentityFilesSync no longer picks the file up; listRetiredIdentityEntries reports dreaming entries but not heartbeat or bootstrap ones.
  • bun test surfaces/cli/src/features/{health,setup-plan,setup}.test.ts: 159 pass. Covers: the minimal, custom, and openclaw presets no longer write DREAMING.md or the yaml entry, even when an old template is still present; a plan with a dreaming special file is rejected with the retired-file message; the doctor finding appears for a dreaming entry and not for a heartbeat entry.
  • bun test surfaces/dashboard/src/components/onboarding/page.test.tsx: passes. The new case re-saves identity on a workspace that has the retired entry. It confirms agent.yaml no longer mentions DREAMING.md and that the file's contents are untouched. This case fails on the old page.tsx, where DREAMING.md ends up in startup.load.
  • tsc --noEmit for @signet/core, signet-dashboard, and @signet/daemon; bunx biome check on the changed files; bun run comments:check.
  • bun scripts/spec-deps-check.ts fails, but with the same kimi-harness-provider-support error that main already has. Nothing in it comes from this change.

Live verification (PR daemon on an isolated port, HOME, and workspace; main's build on a second port for comparison):

  • Fresh signet setup --non-interactive from the PR CLI (minimal and openclaw presets) writes no DREAMING.md and no kind: dreaming entry. minimal gets special: []. openclaw keeps HEARTBEAT.md and BOOTSTRAP.md.
  • I created a workspace with main's setup, which writes DREAMING.md and the kind: dreaming entry, and added a marker string to DREAMING.md. The PR daemon booted clean on it: /health was healthy, and the only warning in the logs was the usual "Dashboard not found". PR signet doctor --json reports retired_identity_file at info and lists retiredIdentityEntries: ["DREAMING.md"]. Status stays healthy with exit code 0, the same as main's doctor on the same workspace, which doesn't report the finding. POST /api/hooks/session-start injects AGENTS.md but not the DREAMING.md marker.
  • signet setup --file with a kind: "dreaming" special file fails with exit 1: specialIdentityFiles.0.kind: the dreaming special file (DREAMING.md) is retired; remove this entry. Dreaming builds its own prompt, and nothing is written. Main accepts the same plan and writes DREAMING.md. A plan with a heartbeat special file still applies on the PR.
  • I replayed the onboarding identity load and save logic from page.tsx against the running daemon (GET /api/config, then POST /api/config with the stringified agent.yaml). With the filter, the minimal and custom presets both drop the entry, leaving startup.load: [AGENTS.md] and special: []. DREAMING.md on disk is byte-identical, session-start doesn't inject it, and doctor no longer reports the finding. Without the filter, the PR presets move DREAMING.md into startup.load and session-start injects its marker, which is the regression the filter prevents. The daemons shut down cleanly.

AI disclosure

  • No AI tools were used in this PR
  • AI tools were used (see Assisted-by tags in commits)

Notes

The commit bodies say Refs #2038. This PR fully covers the issue, hence Fixes #2038 above.

Summary by CodeRabbit

  • Changes
    • Dreaming now builds its task prompt internally and no longer reads DREAMING.md or other identity files.
    • Setup no longer creates or configures DREAMING.md. Existing files are ignored, and onboarding removes retired Dreaming entries from configuration while preserving file contents.
    • The health check now reports retired Dreaming identity entries and explains how to address them.
    • Updated setup guidance and workspace documentation to reflect these changes.

DREAMING.md was declared as the Dreaming prompt file, but nothing read
it. resolveSpecialIdentityFiles had no callers, and Dreaming builds its
prompt in platform/daemon/src/pipeline/dreaming.ts. Setup still wrote
the file into every managed workspace, and its guidance contradicts the
current Dreaming contract, so edits to it silently did nothing.

Remove the dreaming identity file, the DREAMING.md preset entries, the
template, resolveSpecialIdentityFiles and the identity.special parsing
that only it used. HEARTBEAT.md and BOOTSTRAP.md stay as OpenClaw
special-session files.

Existing workspaces keep working: a DREAMING.md on disk is ignored as
before. A kind: dreaming entry in agent.yaml is ignored, reported by
signet doctor as an info finding, and dropped when dashboard onboarding
re-saves identity. Without that filter onboarding would have promoted
DREAMING.md into startup.load. Headless setup plans that still request
a dreaming special file now fail validation explicitly.

Refs #2038

Assisted-by: Claude-Code:claude-opus-5-5
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4b651fcf-4fef-4d7a-a978-c7bd786dc0a4
📥 Commits

Reviewing files that changed from the base of the PR and between ea8e8b5 and f69bb78.

📒 Files selected for processing (20)
  • docs/specs/approved/dreaming-memory-consolidation.md
  • docs/specs/dependencies.yaml
  • platform/core/src/__tests__/identity.test.ts
  • platform/core/src/identity-spec.ts
  • platform/core/src/identity.ts
  • platform/core/src/index.ts
  • skills/onboarding/SKILL.md
  • surfaces/cli/src/features/health.test.ts
  • surfaces/cli/src/features/health.ts
  • surfaces/cli/src/features/setup-migrate.ts
  • surfaces/cli/src/features/setup-plan.test.ts
  • surfaces/cli/src/features/setup-plan.ts
  • surfaces/cli/src/features/setup.test.ts
  • surfaces/cli/templates/DREAMING.md.template
  • surfaces/dashboard/src/components/onboarding/identity-step.tsx
  • surfaces/dashboard/src/components/onboarding/page.test.tsx
  • surfaces/dashboard/src/components/onboarding/page.tsx
  • web/docs/src/content/docs/configuration/workspace-identity.md
  • web/docs/src/content/docs/getting-started/setup.mdx
  • web/marketing/public/redesign-home-mockup.html
💤 Files with no reviewable changes (2)
  • surfaces/cli/src/features/setup-migrate.ts
  • surfaces/cli/templates/DREAMING.md.template

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The changes remove DREAMING.md from identity declarations, presets, and setup flows. Existing kind: dreaming entries are filtered from onboarding selections and reported by the CLI. Documentation now describes Dreaming as using a daemon-built prompt.

Changes

DREAMING.md identity retirement

Layer / File(s) Summary
Remove dreaming identity support
platform/core/src/identity-spec.ts, platform/core/src/identity.ts, platform/core/src/index.ts, platform/core/src/__tests__/identity.test.ts
Identity types and presets no longer declare the dreaming session file. listRetiredIdentityEntries identifies existing retired entries and replaces the special-file resolver.
Remove DREAMING.md from setup and onboarding
surfaces/cli/src/features/setup-*, surfaces/cli/templates/*, surfaces/dashboard/src/components/onboarding/*, docs/specs/approved/*, docs/specs/dependencies.yaml, skills/onboarding/SKILL.md, web/docs/src/content/docs/*, web/marketing/public/redesign-home-mockup.html
CLI and dashboard setup no longer create or retain DREAMING.md identity entries. Setup validation rejects kind: dreaming. Specifications, onboarding guidance, and web content reflect the retired file and daemon-built prompt.
Report retired identity entries
surfaces/cli/src/features/health.ts, surfaces/cli/src/features/health.test.ts
The CLI status report includes retired entry names. Doctor reports an informational finding when it finds retired entries; tests also verify that a current HEARTBEAT.md entry does not trigger the finding.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor · Severity of issue fixed: Low

Suggested reviewers: nicholaivogel

Merge Risk: ⚪ Minimal · up to f69bb

The retirement appears ready to merge after normal checks; no actionable issue is established by the supplied evidence.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 12 files. (6 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #2038 is addressed. The head removes dreaming from IdentitySessionKind, IDENTITY_FILES, and presets. It removes resolveSpecialIdentityFiles and its export. Setup no longer creates `DREAM…
Out of Scope Changes check ✅ Passed The changes stay within issue #2038. The added tests verify the removal and compatibility behavior. Doctor diagnostics and dashboard filtering handle existing retired configuration. Documentation and …
Title check ✅ Passed The title clearly and concisely identifies the main change: removing DREAMING.md support from identity handling.
Description check ✅ Passed The description is complete and covers the summary, changes, decisions, affected packages, testing, AI disclosure, and migration behavior. It explains compatibility for existing workspaces and the rep…
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 12 files. (6 skipped: 6 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

A headless setup plan that still lists a kind: dreaming special file failed with zod's generic "expected one of heartbeat|bootstrap", which does not say the file was retired or what to do. Name DREAMING.md as retired and tell the user to remove the entry. Other invalid kinds keep the default message.

Refs #2038

Assisted-by: Claude-Code:claude-opus-5-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove DREAMING.md identity file support

1 participant