···11----
22-name: coding
33-description: >
44- Solstone development guidelines, project structure, coding standards,
55- testing, and environment. The single source of truth for anyone writing
66- code on solstone — Claude Code sessions, hopper lodes, and coder
77- sub-agents. Load this skill BEFORE writing, reviewing, exploring, or
88- reasoning about any solstone code. TRIGGER: writing code, reading code,
99- reviewing code, exploring code, understanding how something works,
1010- project structure, directory layout, journal layout, segments, streams,
1111- pipelines, observe, think, convey, apps, scratch scripts, coding
1212- standards, testing, make commands, development setup, PR review, how
1313- does X work, where is X, what calls X, tracing code paths.
1414----
1515-1616-# Development Guidelines
1717-1818-**solstone** is a Python-based AI-driven desktop journaling toolkit with three packages: `observe/` for multimodal capture and AI-powered analysis, `think/` for data post-processing, AI agent orchestration, and intelligent insights, and `convey/` for the web application, with `apps/` for extensions. The project uses a modular architecture where each package can operate independently while sharing common utilities and data formats through the journal system.
1919-2020-## Key Concepts
2121-2222-- **Journal**: Central data structure organized as `journal/YYYYMMDD/` directories. All captured data, transcripts, and analysis artifacts are stored here.
2323-- **Facets**: Project/context organization system that groups related content and provides scoped views of entities, tasks, and activities.
2424-- **Entities**: Extracted information tracked over time across transcripts and interactions and associated with facets for semantic navigation.
2525-- **Agents**: AI processors with configurable prompts that analyze content, extract insights, and respond to queries.
2626-- **Callosum**: Message bus that enables asynchronous communication between components.
2727-- **Indexer**: Builds and maintains SQLite database from journal data, enabling fast search and retrieval.
2828-2929-## Architecture
3030-3131-**Core Pipeline**: `observe` (capture) → JSON transcripts → `think` (analyze) → SQLite index → `convey` (web UI)
3232-3333-**Data Organization**:
3434-- Everything organized under `journal/YYYYMMDD/` daily directories.
3535-- Import segments are anchored to creation/modification time, not content "about" time.
3636-- Facets provide project-scoped organization and filtering.
3737-- Entities are extracted from transcripts and tracked across time.
3838-- Indexer builds SQLite database for fast search and retrieval.
3939-4040-**Component Communication**:
4141-- Callosum message bus enables async communication between services.
4242-- Cortex orchestrates AI agent execution via `sol cortex`, spawning agent subprocesses with agent configurations.
4343-- The unified CLI is `sol`. Run `sol` to see status and available commands.
4444-4545-## Quick Commands
4646-4747-```bash
4848-make install # Install package (includes all deps)
4949-make skills # Discover and symlink Agent Skills from talent/ dirs
5050-make format # Auto-fix formatting, then report remaining issues
5151-make test # Run unit tests
5252-make ci # Full CI check (format check + lint + test)
5353-make dev # Start stack (Ctrl+C to stop)
5454-```
5555-5656-## Agent CLI Boundaries
5757-5858-Cogitate agents have access to all `sol` commands. The following infrastructure
5959-commands must **never** be called by agents — they manage services and data
6060-pipelines that should only be operated by the supervisor or human operators:
6161-6262-- `sol supervisor` / `sol start` — service lifecycle management
6363-- `sol dream` — full processing pipeline (only heartbeat uses `sol dream --segment` for targeted reprocessing)
6464-- `sol import` — data injection into journal
6565-- `sol config` — system configuration changes
6666-- `sol cortex` — agent process manager (meta-spawning)
6767-- `sol agents` — direct agent execution
6868-- `sol callosum` — message bus server
6969-- `sol observer` / `sol observe-*` — capture services
7070-- `sol sense` — capture event dispatcher
7171-- `sol transcribe` / `sol describe` — processing pipelines
7272-- `sol indexer --reset` — destructive index rebuild (read-only queries via `sol indexer` are fine)
7373-7474-Agents should use `sol call` commands for journal interaction and `sol health` /
7575-`sol talent logs` for diagnostics.
7676-7777-## Reference
7878-7979-- `reference/project-structure.md` — Directory layout, package organization, CLI routing, file locations.
8080-- `reference/coding-standards.md` — Style rules, naming conventions, file headers, development principles, dependencies.
8181-- `reference/testing.md` — Test structure, fixtures, make commands, worktree development.
8282-- `reference/environment.md` — Journal paths, API keys, error handling, documentation pointers, git practices.
···3838- **Conciseness & Maintainability**: Clear code over clever code
3939- **Robustness**: Minimize assumptions that must be kept in sync across the codebase, avoid fragility and increasing maintenance burden.
4040- **Self-Contained Codebase**: All code that depends on this project lives within this repository—never add backwards-compatibility shims, fallback aliases, re-exports for moved symbols, deprecated parameter handling, or legacy support code. When renaming or removing something, update all usages directly. For journal data format changes, write a migration script (see [docs/APPS.md](docs/APPS.md) for `maint` commands) instead of adding compatibility layers.
4141-- **Trust system path resolution**: Never set `_SOLSTONE_JOURNAL_OVERRIDE` or bypass `get_journal()` from application code, agent prompts, subprocess environments, or service files. The env var exists only for tests and Makefile sandboxes. See `reference/environment.md`.
4141+- **Trust system path resolution**: Never set `_SOLSTONE_JOURNAL_OVERRIDE` or bypass `get_journal()` from application code, agent prompts, subprocess environments, or service files. The env var exists only for tests and Makefile sandboxes. See `environment.md`.
4242- **Security**: Never expose secrets, validate/sanitize all inputs
4343- **Performance**: Profile before optimizing
4444- **Git**: Small focused commits, descriptive branch names. Run git commands directly (not `git -C`) since you're already in the repo.