Architecture Overview
~5,300 source lines of Python. Four layers.
Deep Dives
Package Structure
- cli.py
- sync.py
- config.py
- db.py
- models.py
- metrics.py
- base.py
- claude_code.py
- chatgpt.py
- github_.py
- gmail.py
- agentic_perceiver.py
- perceiver.py
- tools.py
- agent_prompts.py
- prompts.py
- formatters.py
- inject.py
- mcp_server.py
Key Design Decisions
The LLM does semantic understanding, not the database. Syke doesn’t need a vector DB. SQLite with WAL mode gives concurrent reads, ACID transactions, zero infrastructure. The perception agent does keyword search via tools — semantic understanding happens in Opus’s thinking.
Sessions, not messages. A Claude Code session about “refactoring auth” contains 50+ messages but represents one coherent activity. Per-message would bloat the timeline 50x and force the agent to spend tokens reconstructing context.
Privacy by design, not afterthought. The content filter runs before events enter SQLite. Credentials and private messages never touch the database. Content that never enters the timeline can never be sent to an LLM.
Hooks enforce quality for free. Coverage gating via PermissionResultDeny forces the agent to explore all sources before submitting. Zero extra API cost — hooks piggyback on existing turns.
Four formats for four consumers. JSON for programs, Markdown for humans, CLAUDE.md for Claude Code projects, USER.md for portable identity. Same UserProfile schema, different shapes.