Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ codec_dispatch.py Skill trigger matching for voice/wake-word path
codec_memory.py SQLite + FTS5 + public API
codec_memory_upgrade.py Facts table, CCF compression, tiered retrieval
codec_compaction.py Context compaction β€” summarize old turns when window fills
codec_daybreak.py Daybreak: morning kickoff briefing + working-threads live memory (threads = temporal facts; docs/DAYBREAK-DESIGN.md)
codec_audit.py Structured audit log (see Β§6)
codec_audit_analyzer.py Audit summary skill (audit_report)
codec_hooks.py Plugin lifecycle hooks (Phase 1 Step 2 β€” see Β§3)
Expand Down Expand Up @@ -379,7 +380,7 @@ close() -> None
```

### Facts table
Temporal KV with `valid_from`, `valid_until`, `superseded_by`. Supports `valid_at(timestamp)` queries β€” time-travel over user state.
Temporal KV with `valid_from`, `valid_until`, `superseded_by`. NOTE (2026-06-09 correction): a `valid_at(timestamp)` time-travel query does NOT exist in code β€” currently-active facts are `valid_until IS NULL` (`query_valid_facts`); full timelines via `get_fact_history`; close-without-replace via `expire_fact` (added for Daybreak). Daybreak working threads live here as `key="thread:{kind}:{slug}"`, `fact_type="thread"` (docs/DAYBREAK-DESIGN.md).

### CCF (Conversational Context Fragmentation)
Rule-based compressor for memory writes that need shrinking. Entity abbreviation + filler stripping. Personal entity entries belong in `~/.codec/entity_map.json` (private), not in source.
Expand Down Expand Up @@ -570,6 +571,16 @@ Three event names, all info-level. `agent_message_sent` and `agent_message_recei

Single-emit, fresh or session cid. Think-mode tool calls need no new events β€” they route through the skill `Tool` wrappers β†’ `run_with_hooks` β†’ existing `tool_call`/`tool_result` envelope.

#### Daybreak events (morning kickoff + working threads β€” docs/DAYBREAK-DESIGN.md)

Three event names, all info-level, single-emit with fresh cid. `DAYBREAK_EVENTS` frozenset exposed. Thread text never enters audit lines (keys/lengths only).

| Event | Source | level | extra fields |
|---|---|---|---|
| `daybreak_completed` | `codec-daybreak` | info | `sections_included` (0-4), `skipped_sources` (list), `open_threads_count`, `word_count`; `duration_ms` top-level |
| `daybreak_thread_saved` | `codec-daybreak` | info | `kind` (`working_on` \| `waiting_on` \| `priority` \| `follow_up`), `key`, `superseded` (bool), `text_len` |
| `daybreak_thread_closed` | `codec-daybreak` | info | `key`, `rows_expired` |

### Notifications (`~/.codec/notifications.json`)
Four sources can produce notifications: scheduler (crew completion), heartbeat (threshold alert), autopilot (ambient trigger), and Phase 1 Step 3's AskUserQuestion (`type="question"`). All write through `routes/_shared.py:51-127` except AskUserQuestion which writes via `codec_ask_user._write_question_notification`.

Expand Down
12 changes: 12 additions & 0 deletions codec_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,18 @@ def _new_correlation_id() -> str:
PROACTIVE_SUGGESTION_DISMISSED,
})

# ─────────────────────────────────────────────────────────────────────────────
# Daybreak β€” morning kickoff + working-threads live memory
# (docs/DAYBREAK-DESIGN.md). All single-emit, info level, fresh cid.
# ─────────────────────────────────────────────────────────────────────────────
DAYBREAK_COMPLETED = "daybreak_completed"
DAYBREAK_THREAD_SAVED = "daybreak_thread_saved"
DAYBREAK_THREAD_CLOSED = "daybreak_thread_closed"

DAYBREAK_EVENTS = frozenset({
DAYBREAK_COMPLETED, DAYBREAK_THREAD_SAVED, DAYBREAK_THREAD_CLOSED,
})

SHIFT_REPORT_EXTRA_FIELDS = (
"trigger_kind", # "time" | "idle" | "manual"
"sections_included", # int β€” how many of the 5 sections rendered
Expand Down
1 change: 1 addition & 0 deletions codec_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ async def vibe_page():
[SKILL:file_ops:read file ~/notes.txt]
[SKILL:pm2_control:pm2 list]
[SKILL:google_calendar:what's on my calendar today]
"good morning" / "where did we leave off?" / "start my day" β†’ [SKILL:daily_kickoff:morning kickoff]
The skill's real output replaces the tag automatically β€” emit the tag and stop, never fabricate the result.

## Slash commands
Expand Down
Loading