contextpilot-ai 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. contextpilot_ai-0.1.0/.claude/settings.local.json +8 -0
  2. contextpilot_ai-0.1.0/.cursor/agents/changelog-archivist.md +24 -0
  3. contextpilot_ai-0.1.0/.cursor/agents/structure-guardian.md +18 -0
  4. contextpilot_ai-0.1.0/.cursor/agents/workstream-coordinator.md +18 -0
  5. contextpilot_ai-0.1.0/.cursor/rules/clean-structure.mdc +12 -0
  6. contextpilot_ai-0.1.0/.cursor/rules/contextpilot-project.mdc +30 -0
  7. contextpilot_ai-0.1.0/.cursor/skills/log-code-changes/SKILL.md +20 -0
  8. contextpilot_ai-0.1.0/.cursor/skills/parallel-work-plan/SKILL.md +29 -0
  9. contextpilot_ai-0.1.0/.gitignore +67 -0
  10. contextpilot_ai-0.1.0/AGENTS.md +13 -0
  11. contextpilot_ai-0.1.0/CLAUDE.md +133 -0
  12. contextpilot_ai-0.1.0/Doc/contextpilot_full_system_architecture.svg +219 -0
  13. contextpilot_ai-0.1.0/Doc/contextpilot_functional_v12.docx +0 -0
  14. contextpilot_ai-0.1.0/Doc/contextpilot_technical_v12.docx +0 -0
  15. contextpilot_ai-0.1.0/Logs/phase-1-foundation.md +100 -0
  16. contextpilot_ai-0.1.0/Logs/phase-1-remaining.md +91 -0
  17. contextpilot_ai-0.1.0/PKG-INFO +160 -0
  18. contextpilot_ai-0.1.0/README.md +121 -0
  19. contextpilot_ai-0.1.0/contextpilot/__init__.py +43 -0
  20. contextpilot_ai-0.1.0/contextpilot/adapters/__init__.py +0 -0
  21. contextpilot_ai-0.1.0/contextpilot/adapters/anthropic_adapter.py +38 -0
  22. contextpilot_ai-0.1.0/contextpilot/adapters/openai_adapter.py +39 -0
  23. contextpilot_ai-0.1.0/contextpilot/analyzer.py +185 -0
  24. contextpilot_ai-0.1.0/contextpilot/cli.py +161 -0
  25. contextpilot_ai-0.1.0/contextpilot/compressor.py +64 -0
  26. contextpilot_ai-0.1.0/contextpilot/config.py +64 -0
  27. contextpilot_ai-0.1.0/contextpilot/middleware.py +36 -0
  28. contextpilot_ai-0.1.0/contextpilot/migrate.py +228 -0
  29. contextpilot_ai-0.1.0/contextpilot/pipeline.py +89 -0
  30. contextpilot_ai-0.1.0/contextpilot/proxy.py +171 -0
  31. contextpilot_ai-0.1.0/contextpilot/quality.py +73 -0
  32. contextpilot_ai-0.1.0/contextpilot/shadow.py +62 -0
  33. contextpilot_ai-0.1.0/contextpilot/strategies/__init__.py +0 -0
  34. contextpilot_ai-0.1.0/contextpilot/strategies/agent_memory.py +72 -0
  35. contextpilot_ai-0.1.0/contextpilot/strategies/dedup.py +36 -0
  36. contextpilot_ai-0.1.0/contextpilot/strategies/history.py +54 -0
  37. contextpilot_ai-0.1.0/contextpilot/strategies/rag_pruner.py +64 -0
  38. contextpilot_ai-0.1.0/contextpilot/strategies/structural.py +40 -0
  39. contextpilot_ai-0.1.0/contextpilot/telemetry.py +113 -0
  40. contextpilot_ai-0.1.0/contextpilot/wrapper.py +6 -0
  41. contextpilot_ai-0.1.0/contextpilot.yaml.example +16 -0
  42. contextpilot_ai-0.1.0/examples/smoke_test.py +178 -0
  43. contextpilot_ai-0.1.0/pyproject.toml +57 -0
  44. contextpilot_ai-0.1.0/tests/__init__.py +0 -0
  45. contextpilot_ai-0.1.0/tests/mock_server.py +85 -0
  46. contextpilot_ai-0.1.0/tests/test_analyzer.py +99 -0
  47. contextpilot_ai-0.1.0/tests/test_config.py +50 -0
  48. contextpilot_ai-0.1.0/tests/test_live_integration.py +178 -0
  49. contextpilot_ai-0.1.0/tests/test_middleware.py +44 -0
  50. contextpilot_ai-0.1.0/tests/test_migrate.py +255 -0
  51. contextpilot_ai-0.1.0/tests/test_pipeline.py +107 -0
  52. contextpilot_ai-0.1.0/tests/test_proxy.py +203 -0
  53. contextpilot_ai-0.1.0/tests/test_quality.py +73 -0
  54. contextpilot_ai-0.1.0/tests/test_strategies.py +191 -0
  55. contextpilot_ai-0.1.0/tests/test_wrapper.py +184 -0
@@ -0,0 +1,8 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(curl -s https://pypi.org/pypi/contextpilot/json)",
5
+ "Bash(python -c \"import sys,json; d=json.load\\(sys.stdin\\); print\\(d['info']['name'], d['info']['version'], d['info']['author']\\)\")"
6
+ ]
7
+ }
8
+ }
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: changelog-archivist
3
+ description: Maintains accurate records of code changes. Use when finishing a feature, before commits/PRs, or when the user asks for a changelog, release notes, or summary of what changed.
4
+ model: inherit
5
+ readonly: false
6
+ ---
7
+
8
+ You track **what** changed in code and **why**, without rewriting unrelated code.
9
+
10
+ When invoked:
11
+
12
+ 1. Inspect `git diff`, recent edits, or the described scope; list touched files and areas (modules, public APIs).
13
+ 2. Classify changes: feat / fix / refactor / perf / chore / docs — match the project’s existing changelog style if `CHANGELOG.md` exists.
14
+ 3. Produce a concise entry: date, bullet points with user-visible impact first, then internal/technical notes.
15
+ 4. Write the entry to a new file in `Logs/` — not a root `CHANGELOG.md`. Naming convention:
16
+ - Phase work → `Logs/phase-N-<slug>.md`
17
+ - Feature additions → `Logs/feat-<slug>.md`
18
+ - Bug fixes / refactors → `Logs/fix-<slug>.md`
19
+ Each file must include: date, changed items, FR references, and conventional commit lines.
20
+ 5. Optionally draft a conventional commit subject line (e.g. `feat(scope): …`) aligned with the actual diff.
21
+
22
+ Do not invent changes not present in the diff or conversation. Ask only if scope is ambiguous.
23
+
24
+ When describing library or dashboard behavior, you may reference **FR-xxx** IDs from `Doc/contextpilot_functional_doc.docx` if they clearly match the change.
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: structure-guardian
3
+ description: Improves and preserves clean architecture—modules, boundaries, naming, and readability. Use when refactoring for clarity, removing duplication, or when code feels messy or tightly coupled.
4
+ model: inherit
5
+ readonly: false
6
+ ---
7
+
8
+ You keep the codebase **structured and readable**, not sprawling or clever-at-the-cost-of-clarity.
9
+
10
+ When invoked:
11
+
12
+ 1. Map the relevant area: entry points, layers (e.g. SDK wrapper vs strategies vs telemetry), and dependencies. Prefer matching existing folder and naming patterns.
13
+ 2. Identify problems: oversized files, mixed concerns, unclear public APIs, circular imports, dead code, inconsistent naming.
14
+ 3. Propose **minimal, staged** refactors: extract modules or types, clarify boundaries, shorten functions—each step should preserve behavior.
15
+ 4. Avoid drive-by changes outside the requested scope; no cosmetic-only churn across unrelated files.
16
+ 5. After structural edits, note risks (breaking API, migration steps) and how to verify (tests, smoke paths).
17
+
18
+ ContextPilot lens: align with the **package layout and boundaries** in `Doc/contextpilot_technical_doc.docx` (§5)—`wrapper.py`, `analyzer.py`, `compressor.py`, `strategies/`, `quality.py`, `shadow.py`, `telemetry.py`, `config.py`, `adapters/`—and keep dashboard concerns separate from the core library unless the task is explicitly full-stack.
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: workstream-coordinator
3
+ description: Splits large work into parallel or sequential streams with clear ownership and handoffs. Use for multi-module tasks, epics, or when the user asks to distribute workload across agents or subtasks.
4
+ model: inherit
5
+ readonly: false
6
+ ---
7
+
8
+ You **decompose work** so multiple contributors or subagents can execute without overlap or gaps.
9
+
10
+ When invoked:
11
+
12
+ 1. Restate the goal and constraints (deadline, must-not-break areas, tech stack). For roadmap-sized work, align streams with **phase boundaries** in `Doc/contextpilot_functional_doc.docx` (§7) when helpful.
13
+ 2. Split into **independent workstreams** where possible (different directories, layers, or features). Mark dependencies: A before B, or parallelizable.
14
+ 3. For each stream, specify: scope, inputs needed, deliverables, verification (tests, commands), and merge order if conflicts are likely.
15
+ 4. Name suggested delegations explicitly (e.g. “Stream A: exploration”, “Stream B: implementation in `packages/foo`”) so the parent agent can launch Task/subagents in parallel where safe.
16
+ 5. Flag shared interfaces or contracts that must be agreed first to avoid integration churn.
17
+
18
+ Keep the plan actionable and short; avoid duplicate instructions across streams.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: Keeps refactors scoped and structure clean
3
+ globs: "**/*.{ts,tsx,js,jsx,py,rs,go}"
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Structure and cleanliness
8
+
9
+ - One primary responsibility per file; extract when a file mixes unrelated concerns.
10
+ - Match existing naming and folder layout in the touched area.
11
+ - Refactor in **minimal steps**; do not rename or reformat unrelated symbols.
12
+ - Prefer explicit module boundaries over cross-layer imports “for convenience.”
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: ContextPilot plan alignment—docs, privacy, layering, 4 surfaces
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # ContextPilot
7
+
8
+ **Plan**: `Doc/contextpilot_functional_v12.docx`, `Doc/contextpilot_technical_v12.docx`, diagram `Doc/contextpilot_full_system_architecture.svg`.
9
+
10
+ Open-source **Python 3.10+** middleware that deploys across four surfaces sharing one compression engine:
11
+
12
+ | Surface | Entry point |
13
+ |---------|-------------|
14
+ | Python library | `contextpilot.wrap(client)` |
15
+ | Local proxy | `contextpilot proxy --port 8432` + `ANTHROPIC_BASE_URL` |
16
+ | MCP server | `contextpilot mcp` |
17
+ | CLI migration | `contextpilot migrate ./src/` |
18
+
19
+ Pipeline: intercept payload → analyze (staleness, redundancy, relevance, density) → compress (history summarizer, system prompt dedup, RAG pruning, structural stripping, agent memory) → **quality gate** (default threshold **85**; fallback to uncompressed) → forward via provider adapters → **telemetry metadata only** (no prompts/responses/PII).
20
+
21
+ ## Non-negotiables
22
+
23
+ - Telemetry: numerical fields only (see technical doc §7 schema); TLS to dashboard; failure → silent drop/retry, library keeps working.
24
+ - Library must stay usable **without** dashboard connectivity.
25
+ - Each surface is a thin shell — the compression engine is surface-agnostic.
26
+ - Customer is whoever pays the LLM API bill and controls the code — not end users of ChatGPT/Claude.ai.
27
+
28
+ ## Structure target
29
+
30
+ Mirror the technical doc package tree: `wrapper`, `analyzer`, `compressor`, `strategies/*`, `quality`, `shadow`, `telemetry`, `config`, `adapters/*`, optional `_rust`. Dashboard lives in `dashboard/` — keep it separate from the core library.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: log-code-changes
3
+ description: Produces changelog entries, release notes bullets, and conventional commit lines from git diffs or described work. Use when the user asks to log changes, write CHANGELOG entries, or summarize what changed before commit or release.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Log code changes
8
+
9
+ ## Steps
10
+
11
+ 1. Determine scope: staged only (`git diff --cached`), working tree (`git diff`), or branch (`git diff main...HEAD`).
12
+ 2. Group by concern (feature area, bugfix, refactor). Map files to user-visible outcomes when possible.
13
+ 3. Output:
14
+ - **Changelog block** (bullets, semver section if applicable).
15
+ - **Commit suggestion**: `type(scope): summary` (Conventional Commits).
16
+
17
+ ## Rules
18
+
19
+ - Never claim changes not evidenced by diff or explicit user list.
20
+ - Prefer linking to issue IDs if the user provides them.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: parallel-work-plan
3
+ description: Breaks a task into parallel tracks with dependencies and verification. Use when splitting work across subagents, streams, or developers, or when the user asks how to divide a large task.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Parallel work plan
8
+
9
+ ## Output template
10
+
11
+ ```markdown
12
+ ## Goal
13
+ [One sentence]
14
+
15
+ ## Streams
16
+ | ID | Scope | Parallel? | Depends on | Done when |
17
+ |----|-------|-----------|------------|-----------|
18
+
19
+ ## Contracts (define first)
20
+ - Shared types/APIs: ...
21
+
22
+ ## Merge order
23
+ 1. ...
24
+ ```
25
+
26
+ ## Guidance
27
+
28
+ - Maximize parallelism only where files and APIs do not collide.
29
+ - Put risky or ambiguous contracts in “define first” before parallel implementation.
@@ -0,0 +1,67 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.pyo
6
+ *.pyd
7
+
8
+ # Distribution / packaging
9
+ dist/
10
+ build/
11
+ *.egg-info/
12
+ *.egg
13
+ .eggs/
14
+ MANIFEST
15
+
16
+ # Virtual environments
17
+ .venv/
18
+ venv/
19
+ env/
20
+ .env/
21
+
22
+ # Testing & coverage
23
+ .pytest_cache/
24
+ .coverage
25
+ .coverage.*
26
+ htmlcov/
27
+ coverage.xml
28
+ *.cover
29
+
30
+ # Type checking
31
+ .mypy_cache/
32
+ .dmypy.json
33
+ dmypy.json
34
+ .pytype/
35
+
36
+ # Ruff / linting cache
37
+ .ruff_cache/
38
+
39
+ # Jupyter
40
+ .ipynb_checkpoints/
41
+ *.ipynb
42
+
43
+ # Secrets & local config (never commit API keys)
44
+ .env
45
+ .env.local
46
+ *.env
47
+ contextpilot.yaml
48
+
49
+ # OS
50
+ .DS_Store
51
+ Thumbs.db
52
+ desktop.ini
53
+
54
+ # IDEs
55
+ .vscode/
56
+ .idea/
57
+ *.suo
58
+ *.user
59
+
60
+ # Rust build artefacts (optional _rust/ accelerator)
61
+ target/
62
+ Cargo.lock
63
+
64
+ # Dashboard (separate surface, may have its own build output)
65
+ dashboard/node_modules/
66
+ dashboard/.next/
67
+ dashboard/dist/
@@ -0,0 +1,13 @@
1
+ # Agents overview (Cursor subagents)
2
+
3
+ **Product/engineering plan**: `Doc/contextpilot_functional_v12.docx`, `Doc/contextpilot_technical_v12.docx`, and `Doc/contextpilot_full_system_architecture.svg`.
4
+
5
+ Project-defined subagents live in `.cursor/agents/`:
6
+
7
+ | Agent | Role |
8
+ |-------|------|
9
+ | `changelog-archivist` | Document what changed (changelog, release notes, commit lines). |
10
+ | `structure-guardian` | Refactor and organize code for clarity and stable boundaries. |
11
+ | `workstream-coordinator` | Split big tasks into streams for parallel work or delegation. |
12
+
13
+ See `CLAUDE.md` for usage notes, the 4 integration surfaces, and architecture reference.
@@ -0,0 +1,133 @@
1
+ # ContextPilot — AI assistant context
2
+
3
+ ## Authoritative plan documents (`Doc/`)
4
+
5
+ Treat these as the product and engineering source of truth:
6
+
7
+ | Document | Contents |
8
+ |----------|----------|
9
+ | `Doc/contextpilot_functional_v12.docx` | Customer definition, market analysis, 4 integration surfaces, AI-native distribution strategy, FR-001–FR-011, dashboard FRs FR-101+, user stories, roadmap phases, pricing, KPIs |
10
+ | `Doc/contextpilot_technical_v12.docx` | Architecture, 4-surface data flow, compression strategies, tech stack, package layout, API/config examples, telemetry schema, performance targets, security |
11
+ | `Doc/contextpilot_full_system_architecture.svg` | Visual system architecture |
12
+
13
+ If instructions conflict, prefer the **Word specs**, then this file, then ad‑hoc chat.
14
+
15
+ ---
16
+
17
+ ## Product snapshot
18
+
19
+ **ContextPilot** is an **MIT open-source Python library** that deploys across **four surfaces**:
20
+
21
+ | Surface | Entry point | Who it serves |
22
+ |---------|-------------|---------------|
23
+ | **A — Python library** | `pip install contextpilot` + `contextpilot.wrap(client)` | Backend developers building AI products |
24
+ | **B — Local proxy server** | `contextpilot proxy --port 8432` + `ANTHROPIC_BASE_URL` | AI coding tool users (Claude Code, GPT Codex, Aider) |
25
+ | **C — MCP server** | `contextpilot mcp` | Claude Desktop / Claude Code users |
26
+ | **D — CLI migration agent** | `contextpilot migrate ./src/` | Existing codebases with 50+ LLM API calls |
27
+
28
+ All surfaces share the same compression engine. The customer is always the entity that **pays the LLM API bill AND controls the code that makes the calls** — not end users of ChatGPT or Claude.ai.
29
+
30
+ The library intercepts LLM API calls, analyzes token payloads, runs a **compression pipeline**, applies a **quality gate** (fallback to original if score < threshold), optionally runs **A/B shadow testing**, and emits **metadata-only telemetry**. Monetization is an **optional hosted dashboard** — repo focus is the **core library** unless work explicitly targets `dashboard/`.
31
+
32
+ **AI-native distribution**: AI coding assistants (Claude, GPT) are a primary distribution channel — generated code includes `import contextpilot`. The 5 channels are: custom agents/system prompts, MCP server auto-integration, CLI migration agent, starter templates, and IDE snippets.
33
+
34
+ ---
35
+
36
+ ## Engineering principles (from technical architecture)
37
+
38
+ - **Zero-trust payload handling**: never transmit prompt text, response text, or PII in telemetry — only numeric metadata (token counts, latency, scores, model ids, timestamps).
39
+ - **Fail-safe**: compression failures or low predicted quality → send uncompressed payload; shadow mode compares embeddings when enabled.
40
+ - **Provider-agnostic**: unified adapters; gateways (Portkey, Helicone, etc.) remain compatible — ContextPilot is middleware, not a router.
41
+ - **Minimal integration**: pip install + wrap client for API users; set one env var for proxy users; connect MCP for Claude Code/Desktop users.
42
+ - **Performance budgets**: analysis **< 50 ms** for up to **100K tokens**; **< 10 ms @ 10K tokens** (see technical doc §8).
43
+
44
+ Functional dimensions for analysis: **staleness, redundancy, relevance, density** → classify blocks (essential / compressible / droppable).
45
+
46
+ ---
47
+
48
+ ## Intended package layout (implement toward this)
49
+
50
+ Align refactors with the tree in the technical doc (summarized):
51
+
52
+ ```text
53
+ contextpilot/
54
+ ├── contextpilot/
55
+ │ ├── wrapper.py
56
+ │ ├── analyzer.py
57
+ │ ├── compressor.py
58
+ │ ├── strategies/ # history, dedup, rag_pruner, structural, agent_memory
59
+ │ ├── quality.py
60
+ │ ├── shadow.py
61
+ │ ├── telemetry.py
62
+ │ ├── config.py
63
+ │ ├── adapters/ # openai, anthropic, google
64
+ │ └── _rust/ # optional acceleration
65
+ ├── dashboard/ # separate surface — keep library boundaries clean
66
+ ├── tests/, benchmarks/
67
+ ├── pyproject.toml
68
+ └── contextpilot.yaml.example
69
+ ```
70
+
71
+ **Stack**: Python **3.10+**, Pydantic + YAML config, httpx async telemetry, pytest + hypothesis, ruff/mypy per CI section — prefer matching these when adding tooling.
72
+
73
+ ---
74
+
75
+ ## Functional requirements summary
76
+
77
+ | FR | Surface | Summary |
78
+ |----|---------|---------|
79
+ | FR-001 | Library | SDK wrapper — drop-in for OpenAI, Anthropic, Google Vertex AI |
80
+ | FR-002 | Library | Context analysis engine — staleness, redundancy, relevance, density; < 50 ms @ 100K tokens |
81
+ | FR-003 | Library | Compression pipeline — history summary, system prompt dedup, RAG pruning, structural stripping |
82
+ | FR-004 | Library | Quality gate — predicted score 0–100, fallback if below threshold (default 85) |
83
+ | FR-005 | Library | A/B shadow testing — default 5% sample rate, cosine similarity comparison |
84
+ | FR-006 | Library | Telemetry — metadata only, async non-blocking |
85
+ | FR-007 | Library | Configuration — YAML, env vars, programmatic API |
86
+ | FR-008 | Library | Agent memory middleware — LangChain/CrewAI/AutoGen inter-agent handoff compression |
87
+ | FR-009 | Proxy | Local proxy server — OpenAI-compatible, `contextpilot proxy --port 8432` |
88
+ | FR-010 | MCP | MCP server — `optimize_context` tool, `get_savings` resource, `suggest_config` resource |
89
+ | FR-011 | CLI | Migration agent — AST-based, `--dry-run` / `--apply`, wraps existing LLM calls |
90
+ | FR-101+ | Dashboard | Token savings display, before/after comparison, cost projections, etc. |
91
+
92
+ ---
93
+
94
+ ## How to use bundled automation
95
+
96
+ ### Subagents (`.cursor/agents/`)
97
+
98
+ - **changelog-archivist** — Summarize diffs; changelog/release notes; conventional commits (especially after API or behavior-visible changes).
99
+ - **structure-guardian** — Refactors toward the package layout above; clear module boundaries; no scope creep.
100
+ - **workstream-coordinator** — Split large work (e.g. analyzer vs strategies vs adapters vs proxy vs mcp vs migration) across parallel streams.
101
+
102
+ ### Skills (`.cursor/skills/`)
103
+
104
+ - **log-code-changes** — Changelog/commit messaging from diffs.
105
+ - **parallel-work-plan** — Dependency-aware split for parallel implementation.
106
+
107
+ ### Rules (`.cursor/rules/`)
108
+
109
+ Project-wide and glob-scoped guardrails under `.cursor/rules/` — follow unless the task explicitly overrides.
110
+
111
+ ---
112
+
113
+ ## Change logging (`Logs/`)
114
+
115
+ Every meaningful session of work gets a log file in `Logs/`:
116
+
117
+ | Convention | Example |
118
+ |------------|---------|
119
+ | Phase work | `Logs/phase-1-foundation.md` |
120
+ | Feature additions | `Logs/feat-proxy-server.md` |
121
+ | Bug fixes / refactors | `Logs/fix-quality-gate.md` |
122
+
123
+ Each log file must include: date, what changed (user-visible first), FR references where applicable, and the conventional commit lines. Use the **changelog-archivist** subagent or **log-code-changes** skill to produce entries.
124
+
125
+ ---
126
+
127
+ ## Defaults for code work
128
+
129
+ - Preserve public wrapper semantics (**FR-001**: transparent SDK behavior).
130
+ - When adding a new surface (proxy / MCP / CLI), keep the core compression engine surface-agnostic — surfaces are thin shells over the shared pipeline.
131
+ - After any meaningful change, add or update a file in `Logs/` before closing the session.
132
+ - When touching **telemetry**, re-read the technical doc schema (§7) and **never** add content payload fields.
133
+ - Dashboard lives in `dashboard/` — keep it separate from the core library.