From 246166171364b4b61662b8f994a1294be86fbe1a Mon Sep 17 00:00:00 2001 From: Lawrence Lane Date: Mon, 6 Jul 2026 16:30:32 -0400 Subject: [PATCH] refactor: clean tracked agent artifacts --- .cursor/skills/README.md | 14 ++++ .dori/events/d17d7bd0.json | 15 ---- .dori/local/logs/2026-02-06.jsonl | 26 ------- .dori/local/logs/2026-02-07.jsonl | 9 --- .gitignore | 12 ++++ reports/type-baseline.md | 111 ------------------------------ 6 files changed, 26 insertions(+), 161 deletions(-) create mode 100644 .cursor/skills/README.md delete mode 100644 .dori/events/d17d7bd0.json delete mode 100644 .dori/local/logs/2026-02-06.jsonl delete mode 100644 .dori/local/logs/2026-02-07.jsonl delete mode 100644 reports/type-baseline.md diff --git a/.cursor/skills/README.md b/.cursor/skills/README.md new file mode 100644 index 00000000..7500cbba --- /dev/null +++ b/.cursor/skills/README.md @@ -0,0 +1,14 @@ +# Kida Cursor Skills + +The directories here are project-owned guidance for people using Cursor to work +with Kida. They document Kida-specific template syntax, static-analysis +expectations, migration practices, and integrations with Bengal and Chirp. + +Kida maintainers own these skills. Update the relevant `SKILL.md` whenever a +change makes its examples or guidance inaccurate, and review it against the +root `AGENTS.md` plus the closest scoped `AGENTS.md`. Repository-local Cursor +settings, caches, and other workspace state are intentionally ignored. + +The root `context7.json` is also intentional project configuration: it +registers Kida's public Context7 documentation source and is not local agent +state. diff --git a/.dori/events/d17d7bd0.json b/.dori/events/d17d7bd0.json deleted file mode 100644 index 21a04394..00000000 --- a/.dori/events/d17d7bd0.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "id": "d17d7bd0", - "type": "docs_staged", - "timestamp": "2026-02-07T05:00:47.878559Z", - "message": "2 doc(s) staged for commit", - "suggested_action": "::a", - "acknowledged": false, - "metadata": { - "file_count": 2 - }, - "files": [ - "site/content/docs/advanced/_index.md", - "site/content/docs/advanced/analysis.md" - ] -} \ No newline at end of file diff --git a/.dori/local/logs/2026-02-06.jsonl b/.dori/local/logs/2026-02-06.jsonl deleted file mode 100644 index 32e72f68..00000000 --- a/.dori/local/logs/2026-02-06.jsonl +++ /dev/null @@ -1,26 +0,0 @@ -{"schema_version": "2.0", "event_id": "59781767-013d-4b4c-aee4-fff8752dcddf", "event_type": "config_loaded", "timestamp": "2026-02-06T22:39:16.394998", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "2f8d19b3-a4e7-4232-ac5a-545eeb869f00", "event_type": "config_loaded", "timestamp": "2026-02-06T22:39:23.627348", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "c865223d-e2b9-4a6e-8928-bc73a71deed5", "event_type": "config_loaded", "timestamp": "2026-02-06T22:41:11.191050", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "b301b369-fb92-4bd6-a2d1-42d66a95a437", "event_type": "config_loaded", "timestamp": "2026-02-06T22:42:35.140104", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "a7eb9737-3664-4caa-9033-eafd13558b30", "event_type": "config_loaded", "timestamp": "2026-02-06T22:48:20.179312", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "11c6396c-dfc9-4674-b781-3c934f5b73e2", "event_type": "config_loaded", "timestamp": "2026-02-06T22:49:54.004071", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "c2b3e468-981b-43fc-a138-6e0525833788", "event_type": "config_loaded", "timestamp": "2026-02-06T22:58:24.623322", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "cd8f48a2-7fa2-44d3-8621-6bc6e728076a", "event_type": "config_loaded", "timestamp": "2026-02-06T22:59:04.297996", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "56d15f48-e16d-42cc-abd8-d646259878b1", "event_type": "config_loaded", "timestamp": "2026-02-06T22:59:36.703445", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "d7f72224-7bc0-4939-a697-cb51ace1c7f1", "event_type": "config_loaded", "timestamp": "2026-02-06T23:00:39.143016", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "90eea442-eebe-4f86-8a08-e29cf2108529", "event_type": "config_loaded", "timestamp": "2026-02-06T23:05:29.021967", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "4085dac5-0896-4c14-99f7-bd16cee07dfb", "event_type": "config_loaded", "timestamp": "2026-02-06T23:11:46.881857", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "fd97beac-27bd-4429-9f90-432ae40b7780", "event_type": "config_loaded", "timestamp": "2026-02-06T23:12:44.883812", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "43ce2491-481f-49b9-9711-a87169dac1e4", "event_type": "config_loaded", "timestamp": "2026-02-06T23:15:31.455213", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "84d5ad58-a331-4351-aac4-c6cb54a5de2a", "event_type": "config_loaded", "timestamp": "2026-02-06T23:16:12.992974", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "b8cf2d6e-6569-48d5-b787-0dd59057a76b", "event_type": "config_loaded", "timestamp": "2026-02-06T23:18:24.527215", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "135b0d93-ca47-4d34-9824-ff5fb2737310", "event_type": "config_loaded", "timestamp": "2026-02-06T23:19:45.237607", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "a4073db0-c9f5-4917-bba2-e69063f871da", "event_type": "config_loaded", "timestamp": "2026-02-06T23:21:45.277035", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "f32b6490-ed9d-4913-93c2-b8ba04aba2a2", "event_type": "config_loaded", "timestamp": "2026-02-06T23:25:44.332623", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "deb0e9ec-60f3-436f-9bbb-6ad1c7345404", "event_type": "config_loaded", "timestamp": "2026-02-06T23:29:00.655572", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "2b023a61-e15c-4198-bfce-d37fa73ea470", "event_type": "config_loaded", "timestamp": "2026-02-06T23:32:30.889029", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "8b8245e7-adb2-4d2c-a57f-07e4c217c4dc", "event_type": "config_loaded", "timestamp": "2026-02-06T23:44:33.809643", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "90f0bab8-ba88-4afb-a947-42a3dd0405c4", "event_type": "config_loaded", "timestamp": "2026-02-06T23:52:26.362572", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "0a4b9a71-4f83-40d0-8b0f-e0651c8dcdd3", "event_type": "config_loaded", "timestamp": "2026-02-06T23:54:16.641506", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "985bd887-3ccf-41d4-a5df-9871887d5ae6", "event_type": "config_loaded", "timestamp": "2026-02-06T23:56:21.315140", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "fde7bdbf-97d6-4d88-b86b-580cca8e8efc", "event_type": "config_loaded", "timestamp": "2026-02-06T23:57:57.465126", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} diff --git a/.dori/local/logs/2026-02-07.jsonl b/.dori/local/logs/2026-02-07.jsonl deleted file mode 100644 index ef1d6a66..00000000 --- a/.dori/local/logs/2026-02-07.jsonl +++ /dev/null @@ -1,9 +0,0 @@ -{"schema_version": "2.0", "event_id": "b0f06b7c-b999-4841-8a35-917382597f2b", "event_type": "config_loaded", "timestamp": "2026-02-07T00:00:48.057313", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "cc09b4fb-f3a1-4019-85af-942fb9ecc5c2", "event_type": "config_loaded", "timestamp": "2026-02-07T00:06:07.495058", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "64e9b576-ea6d-48b0-97c0-85b0a08ab2c1", "event_type": "config_loaded", "timestamp": "2026-02-07T00:09:12.103141", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "d49327ad-6127-4f2d-9493-cbcd6850660f", "event_type": "config_loaded", "timestamp": "2026-02-07T00:28:38.599128", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "7bc5b69f-f59a-46b4-ab3d-aa05311ee2f5", "event_type": "config_loaded", "timestamp": "2026-02-07T00:31:49.881691", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "4737599e-9aac-47fa-adb7-ad162e4bcaee", "event_type": "config_loaded", "timestamp": "2026-02-07T00:35:12.775530", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "8c130618-74bd-46c9-8a91-7aa6af0cfce7", "event_type": "config_loaded", "timestamp": "2026-02-07T00:36:31.719259", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "2e84b072-b7eb-4bec-a5dd-407043c2856a", "event_type": "config_loaded", "timestamp": "2026-02-07T12:21:00.106428", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} -{"schema_version": "2.0", "event_id": "c92033f5-c163-4052-90f7-a55c2327974a", "event_type": "config_loaded", "timestamp": "2026-02-07T12:44:00.445185", "agent": {"name": "dori", "version": "0.1.0"}, "context": {}, "payload": {"action": "loaded", "path": "/Users/llane/Documents/github/python/kida/.dori/config.yaml"}} diff --git a/.gitignore b/.gitignore index 908b0002..b8f27bfc 100644 --- a/.gitignore +++ b/.gitignore @@ -59,6 +59,15 @@ coverage.lcov *.swo *~ +# Cursor (project-owned skills are the only tracked Cursor assets) +.cursor/* +!.cursor/skills/ +.cursor/skills/* +!.cursor/skills/README.md +!.cursor/skills/*/ +.cursor/skills/*/* +!.cursor/skills/*/SKILL.md + # OS .DS_Store Thumbs.db @@ -82,5 +91,8 @@ benchmarks/output/ .dori/local/ .dori/events/ +# Generated audit reports +reports/type-baseline.md + # AMP (collected agent output is ephemeral) .amp/collected/ diff --git a/reports/type-baseline.md b/reports/type-baseline.md deleted file mode 100644 index fb3c60eb..00000000 --- a/reports/type-baseline.md +++ /dev/null @@ -1,111 +0,0 @@ -# Type Refinement Baseline - -**Date**: 2026-02-08 -**Tool**: ty (Astral) v0.0.11+ -**Python**: 3.14t - -## ty Status - -| Metric | Count | Notes | -|--------|-------|-------| -| Total diagnostics | 116 | Full codebase (src + tests + benchmarks) | -| src/ diagnostics | ~28 | Library code only | -| benchmarks/ diagnostics | ~77 | Benchmark scripts (excluded from ty scope) | -| tests/ diagnostics | ~11 | Test files | -| Checked files | 65 | `src/kida/` | - -### Error Distribution by Rule - -| Rule | Count | Root Cause | -|------|-------|------------| -| `unresolved-attribute` | 35 | Mixin cross-references in compiler/parser | -| `invalid-argument-type` | 32 | Mostly benchmarks; some real type mismatches | -| `not-subscriptable` | 22 | Benchmark files using generics ty can't resolve | -| `unsupported-operator` | 5 | Operator overload issues | -| `invalid-return-type` | 5 | Return type mismatches | -| `unknown-argument` | 2 | Unexpected keyword arguments | -| `not-iterable` | 1 | Iteration over non-iterable | -| `invalid-assignment` | 1 | Type mismatch in assignment | -| `call-non-callable` | 1 | Calling non-callable object | - -### Error Hotspots (by file) - -| File | Errors | Category | -|------|--------|----------| -| `benchmarks/test_benchmark_optimization_levers.py` | 46 | benchmark | -| `benchmarks/test_benchmark_escape.py` | 27 | benchmark | -| `src/kida/compiler/core.py` | 10 | src (mixin) | -| `tests/test_tstring_r.py` | 6 | test | -| `src/kida/compiler/statements/functions.py` | 5 | src (mixin) | -| `tests/test_kida_bytecode_cache.py` | 4 | test | -| `src/kida/template/loop_context.py` | 4 | src | -| `benchmarks/benchmark_cold_start.py` | 4 | benchmark | -| `src/kida/template/core.py` | 3 | src | -| `src/kida/environment/core.py` | 2 | src | - -## Type Annotation Counts - -| Metric | Count | Target | -|--------|-------|--------| -| `: Any` annotations | ~298 | <100 | -| `-> Any` returns | ~39 | <10 | -| `dict[str, Any]` | ~44 | <20 | -| `type: ignore` comments | ~13 | <5 | -| `noqa: ANN` suppressions | 4 | 0 | - -### Top `: Any` Files - -| File | `: Any` Count | -|------|---------------| -| `analysis/dependencies.py` | 63 | -| `analysis/purity.py` | 49 | -| `environment/filters.py` | 46 | -| `environment/tests.py` | 17 | -| `utils/html.py` | 12 | -| `compiler/statements/control_flow.py` | 10 | -| `compiler/statements/variables.py` | 10 | -| `template/core.py` | 9 | -| `compiler/expressions.py` | 8 | - -### Top `-> Any` Files - -| File | `-> Any` Count | -|------|----------------| -| `environment/filters.py` | 19 | -| `template/loop_context.py` | 8 | -| `template/helpers.py` | 4 | -| `template/cached_blocks.py` | 4 | -| `template/core.py` | 2 | -| `utils/html.py` | 1 | -| `environment/protocols.py` | 1 | - -## Existing Type Infrastructure - -- 60 files use `from __future__ import annotations` -- 35 files use `TYPE_CHECKING` imports -- 0 `TypedDict` definitions -- 7 `Protocol` definitions (across 4 files) -- `py.typed` marker present - -## Prior Type Work - -- **Pyright → mypy migration** (RFC implemented, Jan 2026) -- **mypy → ty migration** (completed, pyproject.toml updated) -- **Type suppression reduction** (Phase 1+2 complete under mypy; Phase 3 pending) -- **Mixin protocol typing RFC** (Draft, not started) - -## Configuration - -Current `[tool.ty]` in pyproject.toml: -```toml -[tool.ty.environment] -python-version = "3.14" - -[tool.ty.src] -exclude = ["dist/", "build/"] - -[[tool.ty.overrides]] -include = ["src/kida/utils/html.py"] -[tool.ty.overrides.rules] -invalid-method-override = "ignore" -```