docs: clarify framework-first positioning

2026-05-15 13:27:29 +09:00
parent 6c15d737cc
commit 5ce0fde821
5 changed files with 20 additions and 20 deletions

@@ -64,7 +64,7 @@ Side effects:
- refreshes the in-memory availability snapshot
- emits `persona.schedule.daily.generated`
Current deterministic mapping:
Default deterministic mapping:
- message containing travel/trip/여행 -> daytime `travel`
- message containing study/exam/공부/시험 -> daytime `study`
@@ -97,7 +97,7 @@ Deletes or marks schedule entries before a caller-provided cutoff.
Behavior depends on the memory store:
- `InMemoryMemoryStore` physically removes entries whose `endAt <= cutoffExclusive` and returns the deleted count.
- `IdentityDbMemoryStore` currently cannot physically delete schedule facts through IdentityDB's public append-oriented API, so it returns `0` at the store layer.
- `IdentityDbMemoryStore` does not physically delete schedule facts through IdentityDB's public append-oriented API, so it returns `0` at the store layer.
- The `Persona` layer always records a fact with topic `persona.schedule.deleted` and source `boxbrain.schedule.prune`.
### `deleteSchedulesOlderThan(datetime)`
@@ -144,7 +144,7 @@ options.models.conversation
Pipeline:
1. Await persona readiness.
2. Load current availability.
2. Load active availability.
3. Build mandatory conversation context:
- formatted `messageHistory`
- schedule entries from yesterday through tomorrow
@@ -199,7 +199,7 @@ options.models.memoryExtraction
Pipeline:
1. Find current context facts tagged with `persona`, the persona display name, or `user`.
1. Find relevant context facts tagged with `persona`, the persona display name, or `user`.
2. Format the provided message history.
3. Call `models.memoryExtraction.extract` with the objectivization instruction.
4. Persist each returned fact through `memory.addFact`.

@@ -153,7 +153,7 @@ await persona.createMonthlySchedule(
);
```
Current schedule generation is deterministic:
The default schedule helper is deterministic:
- sleep before 07:00 and after 23:00
- meal blocks around 07:00, 12:00, and 18:00

18
Home.md

@@ -11,7 +11,7 @@ The framework is intentionally not a messenger bot, UI, or one-provider chatbot
- sleep-time memory extraction into durable facts
- debug hooks for observing the framework flow and persona reasoning pipeline
> Source of truth: this wiki is written against the current compact MVP source tree (`src/types.ts`, `src/memory.ts`, `src/schedule.ts`, `src/conversation.ts`, `src/persona.ts`, `src/index.ts`) at repository commit `49f75af`.
> Source of truth: this wiki is written against the framework source tree (`src/types.ts`, `src/memory.ts`, `src/schedule.ts`, `src/conversation.ts`, `src/persona.ts`, `src/index.ts`) at repository commit `49f75af`.
## Why BoxBrain exists
@@ -25,11 +25,11 @@ BoxBrain exists to design the harness around the illusion of an ongoing person:
4. **A persona forgets unless memory is explicitly retrieved.** Mandatory memory retrieval tells the response model what was actually found; if nothing is found, the context explicitly says `기억이 없음`.
5. **The host app controls delivery realism.** BoxBrain returns outgoing message drafts. The application should add typing indicators, status updates, delays, and delivery policy.
## Current implementation status
## Framework surface
BoxBrain currently implements the framework core, not a complete human simulator.
BoxBrain is a framework by design. It provides reusable primitives that a host application composes into a human-like persona experience.
Implemented today:
Core primitives:
- `Persona` constructor overloads for creating/loading a persona space
- `InMemoryMemoryStore`
@@ -42,12 +42,12 @@ Implemented today:
- `sleepMemory` extraction pipeline
- debug events
Important current limitations:
Framework boundaries and default behaviors:
- Schedule generation is deterministic and rule-based in the current source, not yet an LLM-generated planner.
- BoxBrain does not send messages itself. It returns `OutgoingMessageDraft.messages`; the host messenger integration must deliver them.
- Typing indicators and typing delays are not built into the library yet. They should be implemented by the host app using the returned draft messages and availability snapshot.
- The IdentityDB-backed store uses IdentityDB facts as its persistence layer. Schedule entries are stored in fact metadata. Because the public IdentityDB API is append-oriented, `IdentityDbMemoryStore.deleteScheduleEntriesBefore` currently returns `0`; the `Persona` layer records a deletion fact, while the in-memory store physically prunes entries.
- Schedule generation is a deterministic default helper. The framework exposes schedule entries and memory-store contracts so applications can layer their own planning policy around them.
- BoxBrain does not send messages itself by design. It returns `OutgoingMessageDraft.messages`; the host messenger integration owns delivery.
- Typing indicators, typing delays, presence display, and notification policy belong to the host app. BoxBrain supplies the draft messages and availability snapshot those policies need.
- The IdentityDB-backed store uses IdentityDB facts as its persistence layer. Schedule entries are stored in fact metadata. Because the public IdentityDB API is append-oriented, schedule pruning is represented as a deletion fact at the `Persona` layer; the in-memory store physically prunes entries.
## Reading order

@@ -43,7 +43,7 @@ The availability snapshot is stored in memory, not separately persisted. If the
### During the day
- On inbound user messages, call `sendMessage`.
- Before delivering replies, check current availability.
- Before delivering replies, check active availability.
- If `offline`, defer or suppress unless your product wants emergency replies.
- If `do-not-disturb`, reply more slowly or only for high-priority messages.
- If `online`, reply normally.
@@ -147,7 +147,7 @@ Map it to platform presence like this:
| `do-not-disturb` | busy/DND/idle | slower replies, fewer proactive messages |
| `offline` | offline/invisible | defer replies and suppress proactive messages |
The current snapshot gives ranges, not a single `currentMode` helper. Host apps should compute the active range for `now`.
The snapshot gives ranges, not a single active-mode helper. Host apps should compute the active range for `now`.
## Proactive conversations
@@ -178,7 +178,7 @@ if (active.mode === 'online' && minutesSinceLastMessage > 90) {
}
```
Good proactive openers usually refer to current context lightly instead of demanding attention:
Good proactive openers usually refer to immediate context lightly instead of demanding attention:
- after study/work: "I'm finally done for a bit."
- during rest/free time: "It's weirdly quiet today."
@@ -231,7 +231,7 @@ Avoid storing:
- transient small talk
- one-off jokes with no future use
- raw message dumps
- facts contradicted by the current conversation unless the model explains the update
- facts contradicted by the analyzed conversation unless the model explains the update
## Debug hooks for observability

@@ -1,6 +1,6 @@
# Source Layout
BoxBrain's current implementation is intentionally compact. The repository focuses on a framework core rather than a full chatbot product.
BoxBrain's implementation is intentionally compact because the project is a framework core, not a full chatbot product.
## Root files
@@ -71,7 +71,7 @@ Schedule entries in the IdentityDB store are saved as facts with `metadata.sched
### Schedule and availability
`src/schedule.ts` currently uses a deterministic routine:
`src/schedule.ts` provides a deterministic default routine:
- 144 ten-minute blocks for a daily schedule
- 30 day-level entries for monthly schedules