Skip to content

Step 7.5: daily dream loop with task-shaped directives#12

Merged
rockfordlhotka merged 1 commit intomainfrom
step-7.5-dreams
Apr 23, 2026
Merged

Step 7.5: daily dream loop with task-shaped directives#12
rockfordlhotka merged 1 commit intomainfrom
step-7.5-dreams

Conversation

@rockfordlhotka
Copy link
Copy Markdown
Member

Replaces #11 (auto-closed when the step-7 branch was deleted after #10 merged). Rebased cleanly onto main; no code changes vs #11.

Summary

  • Wire agent.AddScheduling() + agent.WithDreaming() in Program.cs. Opt-in via ForagentDreams:Enabled — default false in appsettings.json so dotnet run smoke sessions don't burn tokens; docker-compose.yml sets it true.
  • Enable 5 task-shaped subtypes (main orchestrator, skill-optimize, skill-gap, sequence-skill, memory-mining); disable 8 personality-agent subtypes.
  • Author 5 directive markdowns under src/Foragent.Agent/directives/, shipped with the binary via CopyToOutputDirectory. DreamService resolves these relative to AgentProfileOptions.BasePath (confirmed via IL inspection — relative paths combine against AppContext.BaseDirectory).
  • ProtectedSkillPrefixes stays empty on purpose so operator primers (like the seeded sites/bsky.app/login) get improved by the dream rather than frozen.

Manual test plan

  • dotnet build clean, 51 agent + 10 browser unit tests still green.
  • dotnet build output contains all 5 directives at bin/Release/net10.0/directives/.
  • docker compose up --build — verify startup log shows ForagentDreams enabled; daily dream pass on schedule '0 3 * * *'.
  • docker compose exec foragent ls /app/directives/ lists all 5 markdowns.
  • ForagentDreams__Enabled=false path also logs correctly.
  • No automated tests for the dream loop itself — framework-owned.

Framework feedback

docs/framework-feedback.md gains a Step 7.5 section:

  • Dream directives ship nowhere in the framework (intentional — the framework can't know what a given consumer needs — but this means every new agent pays a ~300-line authoring cost).
  • Candidate non-ask offering: optional companion packages (RockBot.Host.Directives.Personality / RockBot.Host.Directives.Task) with selectable starter sets.
  • DreamService takes 17 ctor dependencies covering every subtype whether enabled or not — lower-priority refactor candidate.
  • ProtectedSkillPrefixes is literal-only (StartsWith); wildcard patterns would be a natural extension.

🤖 Generated with Claude Code

Wire agent.AddScheduling() + agent.WithDreaming() in Program.cs. Enable
five subtypes relevant to a browser worker (main orchestrator,
skill-optimize, skill-gap, sequence-skill, memory-mining); disable the
eight personality-agent subtypes (preference, episode, tier-routing,
entity, graph-consolidation, identity, DLQ, Wisp).

RockBot ships no default directive content — intentionally, since the
framework can't know what any given agent needs. Foragent authors its
own five directives under src/Foragent.Agent/directives/, shipped via
CopyToOutputDirectory so they land at /app/directives/ in the container.
DreamService resolves each directive relative to
AgentProfileOptions.BasePath, which Program.cs configures to
"directives" (resolved against AppContext.BaseDirectory for relative
values — confirmed by IL inspection).

Dreams are opt-in: ForagentDreams:Enabled defaults false so `dotnet
run` smoke tests don't burn tokens; docker-compose.yml sets it true for
the full harness. Cron defaults to daily 03:00 UTC — framework default
of every 12h is too frequent. ProtectedSkillPrefixes stays empty
deliberately so operator primers get improved rather than frozen.

framework-feedback.md step-7.5 entry captures the directive
intentionality, the AgentProfileOptions.BasePath resolution path, and
a candidate companion-package offering (Directives.Personality /
Directives.Task) that would reduce onboarding cost without compromising
the no-hardcoded-content principle.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rockfordlhotka rockfordlhotka merged commit e441157 into main Apr 23, 2026
1 check passed
@rockfordlhotka rockfordlhotka deleted the step-7.5-dreams branch April 23, 2026 02:44
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.

1 participant