From c86baba439765ee56d1d39dff86fcd1a8fd56550 Mon Sep 17 00:00:00 2001 From: Jer Miller Date: Sat, 18 Apr 2026 10:23:13 -0600 Subject: [PATCH] update docs and fixtures for activities naming and schema --- docs/APPS.md | 4 ++-- docs/SOLCLI.md | 8 ++++---- talent/journal/references/facets.md | 12 +++++++++--- .../facets/full-featured/activities/20260214.jsonl | 4 ++-- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/docs/APPS.md b/docs/APPS.md index 22d347705..a98f7e590 100644 --- a/docs/APPS.md +++ b/docs/APPS.md @@ -128,7 +128,7 @@ Define custom routes for your app (API endpoints, form handlers, navigation rout **Reference implementations:** - API endpoints: `apps/search/routes.py` (search APIs, no index route) - Form handlers: `apps/todos/routes.py` (POST handlers, validation, flash messages) -- Navigation: `apps/calendar/routes.py` (date-based routes with custom context) +- Navigation: `apps/activities/routes.py` (date-based routes with custom context) - Redirects: `apps/todos/routes.py` index route (redirects `/` to today's date) @@ -703,7 +703,7 @@ def handle_action(): **Examples:** - Standard: `apps/home/workspace.html`, `apps/todos/workspace.html`, `apps/entities/workspace.html` -- Wide: `apps/search/workspace.html`, `apps/calendar/_day.html`, `apps/import/workspace.html` +- Wide: `apps/search/workspace.html`, `apps/activities/_day.html`, `apps/import/workspace.html` ### CSS Variables diff --git a/docs/SOLCLI.md b/docs/SOLCLI.md index 49057ea56..2fc469a82 100644 --- a/docs/SOLCLI.md +++ b/docs/SOLCLI.md @@ -82,7 +82,7 @@ COMMANDS: dict[str, str] = { **Auto-discovered apps** — scans `apps/*/call.py` at import time: ``` apps/todos/call.py → sol call todos ... -apps/calendar/call.py → sol call calendar ... +apps/activities/call.py → sol call activities ... apps/entities/call.py → sol call entities ... ``` @@ -265,8 +265,8 @@ solstone/ │ │ ├── call.py # sol call todos (auto-discovered) │ │ ├── todo.py # Data models │ │ └── talent/todos/SKILL.md # Agent skill doc -│ ├── calendar/ -│ │ ├── call.py # sol call calendar (auto-discovered) +│ ├── activities/ +│ │ ├── call.py # sol call activities (auto-discovered) │ │ └── talent/calendar/SKILL.md │ ├── entities/call.py │ ├── speakers/call.py @@ -306,7 +306,7 @@ solstone/ | App | Source | Commands | |-----|--------|----------| | `todos` | `apps/todos/call.py` | list, add, done, cancel, move, upcoming, list-nudges-due, dispatch-nudges | -| `calendar` | `apps/calendar/call.py` | list, add, update, cancel, move, import-day | +| `activities` | `apps/activities/call.py` | list, get, create, update, mute, unmute | | `entities` | `apps/entities/call.py` | list, show, search, observe, merge | | `speakers` | `apps/speakers/call.py` | list, show, detect-owner, confirm-owner, clusters, suggest | | `transcripts` | `apps/transcripts/call.py` | list, read, segments | diff --git a/talent/journal/references/facets.md b/talent/journal/references/facets.md index 4af57bf51..34fd68a66 100644 --- a/talent/journal/references/facets.md +++ b/talent/journal/references/facets.md @@ -196,8 +196,8 @@ facets/work/activities/20260209/coding_095809_303/session_review.md # Generated Each day file contains one JSON object per line, where each record represents a completed activity span: ```jsonl -{"id": "coding_095809_303", "activity": "coding", "segments": ["095809_303", "100313_303", "100816_303", "101320_302"], "level_avg": 0.88, "description": "Developed extraction prompts using Claude Code and VS Code", "active_entities": ["Claude Code", "VS Code", "sunstone"], "created_at": 1770435619415} -{"id": "meeting_090953_303", "activity": "meeting", "segments": ["090953_303", "091457_303", "092001_304", "092506_304", "093010_304"], "level_avg": 1.0, "description": "Sprint planning meeting with the engineering team", "active_entities": ["Alice", "Bob"], "created_at": 1770435619420} +{"id": "coding_095809_303", "activity": "coding", "segments": ["095809_303", "100313_303", "100816_303", "101320_302"], "level_avg": 0.88, "title": "Prompt Refactor Session", "description": "Developed extraction prompts using Claude Code and VS Code", "details": "Iterated on the extraction flow and validated generated output paths.", "active_entities": ["Claude Code", "VS Code", "sunstone"], "hidden": false, "source": "cogitate", "edits": [{"timestamp": "2026-02-09T18:20:19Z", "actor": "cogitate:activities", "fields": ["title", "description", "details"], "note": "synthesized activity summary"}], "created_at": 1770435619415} +{"id": "meeting_090953_303", "activity": "meeting", "segments": ["090953_303", "091457_303", "092001_304", "092506_304", "093010_304"], "level_avg": 1.0, "title": "Sprint Planning", "description": "Sprint planning meeting with the engineering team", "details": "", "active_entities": ["Alice", "Bob"], "hidden": false, "source": "user", "edits": [], "created_at": 1770435619420} ``` ### Record ID scheme @@ -210,8 +210,13 @@ Activity record IDs follow the format `{activity_type}_{segment_key}` where `seg - `activity` (string) – Activity type ID from the facet's configured activities - `segments` (array of strings) – Ordered list of segment keys where this activity was active - `level_avg` (float) – Average engagement level across all segments (high=1.0, medium=0.5, low=0.25) +- `title` (string) – Human title for the activity span; newer records set this explicitly, older records may fall back to `description` - `description` (string) – AI-synthesized description of the full activity span +- `details` (string) – Optional longer-form narrative detail for the span - `active_entities` (array of strings) – Merged and deduplicated entity names from all segments +- `hidden` (boolean) – When `true`, the record is muted from default list views +- `source` (string) – Origin of the record, currently `cogitate` or `user` +- `edits` (array of objects) – Append-only edit history with `timestamp`, `actor`, `fields`, and `note` - `created_at` (integer) – Unix timestamp in milliseconds when the record was created ### Lifecycle @@ -223,7 +228,8 @@ Activity records are created by the `activities` segment agent when it detects t 3. When an activity ends (explicitly, implicitly, or via timeout), the agent walks the segment chain to collect all data 4. A record is written to the facet's day file with preliminary description 5. An LLM synthesizes all per-segment descriptions into a unified narrative -6. The record description is updated with the synthesized version +6. The synthesized summary updates the record's `description`, and may also fill `title` and `details` +7. Later CLI edits append to the record's `edits` log and may hide/unhide the record without changing its ID **Segment flush:** If no new segments arrive for an extended period (1 hour), the supervisor triggers `sol think --flush` on the last segment. Agents that declare `hook.flush: true` (like `activities`) run with `flush=True` in their context, treating all remaining active activities as ended. This ensures activities are recorded promptly even when the owner stops working, and prevents cross-day data loss. diff --git a/tests/fixtures/journal/facets/full-featured/activities/20260214.jsonl b/tests/fixtures/journal/facets/full-featured/activities/20260214.jsonl index e1ffd6f59..9617f4760 100644 --- a/tests/fixtures/journal/facets/full-featured/activities/20260214.jsonl +++ b/tests/fixtures/journal/facets/full-featured/activities/20260214.jsonl @@ -1,2 +1,2 @@ -{"id": "coding_093000_300", "activity": "coding", "segments": ["093000_300", "093500_300", "094000_300", "094500_300"], "level_avg": 0.88, "description": "Refactored activity output path storage to use facet-scoped directories", "active_entities": ["sunstone", "claude"], "created_at": 1739523600000} -{"id": "meeting_140000_300", "activity": "meeting", "segments": ["140000_300", "140500_300"], "level_avg": 0.5, "description": "Sprint planning for next iteration", "active_entities": ["alice", "bob"], "created_at": 1739541600000} +{"id": "coding_093000_300", "activity": "coding", "segments": ["093000_300", "093500_300", "094000_300", "094500_300"], "level_avg": 0.88, "title": "Activity Output Refactor", "description": "Refactored activity output path storage to use facet-scoped directories", "details": "Moved generated artifacts under facets/{facet}/activities/{day}/{activity_id}/ and verified the session review path.", "active_entities": ["sunstone", "claude"], "hidden": false, "source": "cogitate", "edits": [{"timestamp": "2025-02-14T17:00:00Z", "actor": "cogitate:activities", "fields": ["title", "description", "details"], "note": "synthesized activity summary"}], "created_at": 1739523600000} +{"id": "meeting_140000_300", "activity": "meeting", "segments": ["140000_300", "140500_300"], "level_avg": 0.5, "title": "Sprint Planning", "description": "Sprint planning for next iteration", "details": "", "active_entities": ["alice", "bob"], "hidden": false, "source": "user", "edits": [], "created_at": 1739541600000} -- 2.51.2