Skip to content

Reduce repo root clutter#1339

Merged
scosman merged 20 commits intomainfrom
scosman/cleanup_root
Apr 24, 2026
Merged

Reduce repo root clutter#1339
scosman merged 20 commits intomainfrom
scosman/cleanup_root

Conversation

@scosman
Copy link
Copy Markdown
Collaborator

@scosman scosman commented Apr 23, 2026

Summary

  • Remove Tessl — delete tessl.json, .tessl/, stale Cursor rule, and MCP entry
  • Inline config into pyproject.toml — merge .coveragerc and pytest.ini, delete both files
  • Move utils/.config/utils/ (dev-bootstrap scripts)
  • Move .planning/specs/projects/mcp_sessions/ (canonical spec location)
  • Delete stale .cursor/rules/project.mdc — Cursor reads root AGENTS.md natively
  • Consolidate skills.cursor/skills/.agents/skills/ (single source of truth, gitignore old paths)
  • Agent setup scripts — create .agents/{claude,cursor}/setup.sh to materialize per-agent copies from canonical source
  • Move hooks_mcp.yaml.config/hooks_mcp.yaml (rewrite prompt paths, update MCP args)
  • Move tests/assets/libs/core/tests/assets/ (closer to the 8/9 consumers in libs/core)
  • Move guides/.config/legacy_guides/, delete unused 3.5 MB .avif

Net: ~10 fewer entries at repo root, no functionality changes, all tests pass (12867 count preserved).

Manual validation checklist

  • Restart Cursor — confirm AGENTS.md rules load, HooksMCP tools populate, skills appear
  • Restart Claude Code — confirm skills list, CLAUDE.md regenerates
  • Check README GIF renders on GitHub
  • Follow-up: upload GIF to GitHub user-attachments for PyPI rendering
  • Follow-up (P2): migrate .coderabbit.yaml config into CodeRabbit dashboard UI

Test plan

  • uv run ./checks.sh --agent-mode passes on every phase
  • uv run pytest --collect-only -q shows 12867 tests before and after
  • uv run coverage debug config confirms pyproject.toml is the active coverage config
  • Setup scripts produce identical skill trees (diff -r .agents/skills .cursor/skills empty)
  • CI green on this PR

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • Removed legacy Tessl artifacts, reorganized repo layout, consolidated configs and agent directories, added new agent bootstrap scripts, updated worktree/MCP setup and gitignore rules, and migrated test assets into library-owned locations.
  • Documentation

    • Added root-cleanup plans, phase guides, and updated setup/contributing/WT docs and README image.
  • Tests

    • Consolidated pytest/coverage configuration and added new test fixtures to support deterministic test assets.

scosman added 10 commits April 13, 2026 12:31
Delete tessl.json, .tessl/, and .cursor/rules/.gitignore. Drop the
tessl-managed block from AGENTS.md and the tessl MCP server entry
from .cursor/mcp.json. Adds the root_cleanup project spec (phase 1).
Consolidates root-level test and coverage config into pyproject.toml:
- Merged pytest.ini contents into [tool.pytest.ini_options]
- Added [tool.coverage.run] with the existing omit list
- Deleted .coveragerc and pytest.ini
- Updated kiln-add-model skill docs to reference pyproject.toml
- Ad-hoc `uv run pytest` now runs parallel by default (checks.sh
  already passed -n auto explicitly, so CI behavior is unchanged).
Relocates the three dev-bootstrap scripts (setup_env.sh, setup_claude.sh,
pre-commit-hook) under .config/utils/ to reduce root-level clutter. Fixes
PROJECT_ROOT resolution in setup_env.sh for the new two-deep location, and
updates references in CONTRIBUTING.md, .config/wt.toml, and .config/wt/README.md.
Relocates MCP sessions planning docs into the canonical specs tree,
removing the ad-hoc .planning/ directory from the repo root. Content-only
change with no code references to update. Marks Phase 4 of the root
cleanup project complete.
Cursor picks up rules from root AGENTS.md, so this file is stale.
With it gone the .cursor/rules/ directory is empty and drops out of
the tree. Phase 5 of the root_cleanup project.
Move tracked skill content from .cursor/skills/ to .agents/skills/ so
there is a single canonical source. Fix the three hardcoded
.cursor/skills/... script path references inside kiln-check-deprecation
and gitignore .cursor/skills/ so it becomes a setup-script artifact
(parallel to how .claude/ is handled). Phase 7 will add the setup
scripts that regenerate .cursor/skills/ and .claude/skills/ from this
new canonical location.
Relocates setup_claude.sh from .config/utils/ to .agents/claude/setup.sh,
adds a parallel .agents/cursor/setup.sh, and points both at the canonical
.agents/skills/ source established in Phase 6. Updates wt.toml and
.config/wt/README.md for the new paths.
Relocate HooksMCP config to .config/hooks_mcp.yaml, rewrite prompt-file
paths with ../ prefix, update .cursor/mcp.json args and CONTRIBUTING.md
reference link.
Relocate test asset files and associated pytest fixtures closer to
their primary consumers in libs/core, with a bridge conftest for
libs/server.
Phase 10: relocate guides directory, remove 3.5 MB kiln_preview.avif,
and update internal references in README.md and cross-links.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Reorganizes repository root: consolidates agent skills under .agents/, adds CWD-independent agent setup scripts for Claude and Cursor, moves HooksMCP config into .config/ (updating prompt paths and MCP args), migrates pytest/coverage settings into pyproject.toml, relocates utilities/guides, removes Tessl artifacts, and moves/mock fixtures and test assets into library-specific conftest files with relevant docs for the root-cleanup plan.

Changes

Cohort / File(s) Summary
Agent bootstrap scripts
\.agents/claude/setup.sh, \.agents/cursor/setup.sh, utils/setup_claude.sh, .config/wt.toml, .config/wt/README.md
Add new self-locating .agents/*/setup.sh scripts that copy canonical skills and mcp config; remove legacy utils/setup_claude.sh; update Worktrunk hook and README references.
Skills consolidation & docs
.agents/skills/..., .agents/skills/kiln-check-deprecation/SKILL.md, .agents/skills/.../scripts/check_provider.py, .agents/skills/.../scripts/extract_models.py, .cursor/skills/*, .gitignore
Canonical skills moved under .agents/skills/; documentation and script docstrings updated to reference .agents/skills/...; .cursor/skills/ treated as regenerated and ignored.
MCP / Hooks config relocation
.config/hooks_mcp.yaml, .agents/mcp.json, .cursor/mcp.json, CONTRIBUTING.md
Relocate HooksMCP config into .config/, prefix prompt file paths with ../, add .agents/mcp.json HooksMCP entry pointing to .config/hooks_mcp.yaml, and update .cursor/mcp.json args and CONTRIBUTING references.
Test assets & fixtures
libs/core/conftest.py, libs/server/conftest.py, tests/assets/* (moved), pyproject.toml, pytest.ini, conftest.py
Move test assets into libs/core/tests/assets/; add fixtures (test_data_dir, mock_file_factory, mock_attachment_factory) in libs/core/conftest.py; add server bridge fixtures in libs/server/conftest.py; consolidate pytest config into pyproject.toml and remove root pytest.ini; remove moved fixtures from root conftest.py.
Coverage config
.coveragerc, pyproject.toml
Remove [run] omit section from .coveragerc; add/migrate coverage omit patterns into pyproject.toml.
Tessl artifact removal
tessl.json, .tessl/.gitignore, .cursor/rules/project.mdc, .cursor/rules/.gitignore, AGENTS.md
Delete Tessl manifest and related ignore/rules files; remove Tessl MCP entry and tessl-managed block from AGENTS.md.
Root utilities & guides relocation
utils/*.config/utils/*, .config/utils/setup_env.sh, CONTRIBUTING.md, README.md, .config/legacy_guides/*
Move utils/ into .config/utils/ and update PROJECT_ROOT resolution; update contributing hook copy path and README image/link to new guide locations.
Root cleanup docs
specs/projects/root_cleanup/...
Add project overview, functional spec, implementation plan, and phased plans documenting the cleanup, validation steps, and migration guidance.
Misc config and ignore tweaks
.gitignore, .tessl/.gitignore, .cursor/mcp.json
Broaden .gitignore to ignore .cursor/; remove two patterns from .tessl/.gitignore; update .cursor/mcp.json to pass .config/hooks_mcp.yaml positionally and remove tessl server entry.
New agents MCP config
.agents/mcp.json
Add .agents/mcp.json defining HooksMCP server entry using uvx and .config/hooks_mcp.yaml.

Sequence Diagram(s)

(Skipped — changes are primarily file relocations, config updates, doc additions, and small setup scripts; no multi-component control-flow requiring diagram was produced.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • leonardmq
  • sfierro
  • chiang-daniel

Poem

🐇 I hopped through roots and moved a file or two,
Scoped skills to .agents/ and made setups true,
Tests found new burrows, configs brushed and neat,
Tessl crumbs swept up, the repo smells sweet,
A carrot-cheer for tidy code — nibble, woo-hoo! 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Reduce repo root clutter' accurately reflects the main objective of consolidating and reorganizing root-level files/directories without describing every detail.
Description check ✅ Passed The PR description covers the template structure with a detailed summary of changes, related validation steps, and test plan. The CLA confirmation and test checkboxes are present.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch scosman/cleanup_root

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request reorganizes the repository root by moving configuration files, utility scripts, and documentation into a .config directory, while also relocating test assets and fixtures to library-specific directories. Additionally, it removes Tessl integration and centralizes agent skills under .agents/. Feedback identifies an opportunity to reduce code duplication in libs/server/conftest.py by importing shared fixtures and suggests using a glob pattern in pyproject.toml to exclude all conftest.py files from coverage reports.

Comment thread libs/server/conftest.py Outdated
Comment on lines +1 to +72
import shutil
import uuid
from pathlib import Path
from typing import Callable

import pytest

from libs.core.conftest import MockFileFactoryMimeType


@pytest.fixture
def test_data_dir() -> Path:
"""
The directory that contains test files with various mime types.
"""
return Path(__file__).resolve().parent.parent / "core" / "tests" / "assets"


@pytest.fixture
def mock_file_factory(
tmp_path, test_data_dir
) -> Callable[[MockFileFactoryMimeType], Path]:
"""
Create a mock file factory that creates a mock file for the given mime type.
The file is copied to the tmp path so it is safe to alter it without contaminating the original file.
"""

def create_file(mime_type: MockFileFactoryMimeType) -> Path:
match mime_type:
# document
case MockFileFactoryMimeType.PDF:
filename = test_data_dir / "document_paper.pdf"
case MockFileFactoryMimeType.CSV:
filename = test_data_dir / "document_people.csv"
case MockFileFactoryMimeType.TXT:
filename = test_data_dir / "document_ice_cubes.txt"
case MockFileFactoryMimeType.HTML:
filename = test_data_dir / "document_ice_cubes.html"
case MockFileFactoryMimeType.MD:
filename = test_data_dir / "document_ice_cubes.md"

# images
case MockFileFactoryMimeType.PNG:
filename = test_data_dir / "image_kodim23.png"
case MockFileFactoryMimeType.JPG:
filename = test_data_dir / "image_nasa.jpg"
case MockFileFactoryMimeType.JPEG:
filename = test_data_dir / "image_nasa.jpeg"

# audio
case MockFileFactoryMimeType.OGG:
filename = test_data_dir / "audio_ice_cubes.ogg"
case MockFileFactoryMimeType.MP3:
filename = test_data_dir / "audio_ice_cubes.mp3"
case MockFileFactoryMimeType.WAV:
filename = test_data_dir / "audio_ice_cubes.wav"

# video
case MockFileFactoryMimeType.MP4:
filename = test_data_dir / "video_tv_bars.mp4"
case MockFileFactoryMimeType.MOV:
filename = test_data_dir / "video_tv_bars.mov"

case _:
raise ValueError(f"No test file found for mime type: {mime_type}")

path_copy = tmp_path / f"{uuid.uuid4()!s}.{filename.suffix}"
shutil.copy(filename, path_copy)

return path_copy

return create_file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This file contains significant code duplication from libs/core/conftest.py (specifically the mock_file_factory fixture and test_data_dir). Additionally, it is missing the mock_attachment_factory fixture which was part of the implementation plan. Since MockFileFactoryMimeType is already successfully imported from libs.core.conftest on line 8, all required fixtures should be imported directly to ensure consistency and reduce maintenance overhead.

Suggested change
import shutil
import uuid
from pathlib import Path
from typing import Callable
import pytest
from libs.core.conftest import MockFileFactoryMimeType
@pytest.fixture
def test_data_dir() -> Path:
"""
The directory that contains test files with various mime types.
"""
return Path(__file__).resolve().parent.parent / "core" / "tests" / "assets"
@pytest.fixture
def mock_file_factory(
tmp_path, test_data_dir
) -> Callable[[MockFileFactoryMimeType], Path]:
"""
Create a mock file factory that creates a mock file for the given mime type.
The file is copied to the tmp path so it is safe to alter it without contaminating the original file.
"""
def create_file(mime_type: MockFileFactoryMimeType) -> Path:
match mime_type:
# document
case MockFileFactoryMimeType.PDF:
filename = test_data_dir / "document_paper.pdf"
case MockFileFactoryMimeType.CSV:
filename = test_data_dir / "document_people.csv"
case MockFileFactoryMimeType.TXT:
filename = test_data_dir / "document_ice_cubes.txt"
case MockFileFactoryMimeType.HTML:
filename = test_data_dir / "document_ice_cubes.html"
case MockFileFactoryMimeType.MD:
filename = test_data_dir / "document_ice_cubes.md"
# images
case MockFileFactoryMimeType.PNG:
filename = test_data_dir / "image_kodim23.png"
case MockFileFactoryMimeType.JPG:
filename = test_data_dir / "image_nasa.jpg"
case MockFileFactoryMimeType.JPEG:
filename = test_data_dir / "image_nasa.jpeg"
# audio
case MockFileFactoryMimeType.OGG:
filename = test_data_dir / "audio_ice_cubes.ogg"
case MockFileFactoryMimeType.MP3:
filename = test_data_dir / "audio_ice_cubes.mp3"
case MockFileFactoryMimeType.WAV:
filename = test_data_dir / "audio_ice_cubes.wav"
# video
case MockFileFactoryMimeType.MP4:
filename = test_data_dir / "video_tv_bars.mp4"
case MockFileFactoryMimeType.MOV:
filename = test_data_dir / "video_tv_bars.mov"
case _:
raise ValueError(f"No test file found for mime type: {mime_type}")
path_copy = tmp_path / f"{uuid.uuid4()!s}.{filename.suffix}"
shutil.copy(filename, path_copy)
return path_copy
return create_file
from libs.core.conftest import (
MockFileFactoryMimeType,
mock_attachment_factory,
mock_file_factory,
test_data_dir,
)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed but not implemented.

conftest.py files are pytest plugins, not regular importable modules. They're auto-discovered by directory hierarchy and aren't designed for cross-package imports. The shared type (MockFileFactoryMimeType) is correctly exported via kiln_ai.pytest_mock_files, while fixtures remain local to each package's conftest — this is the intended pattern.


Reviewed by AI coding agent via /spec pr

Comment thread pyproject.toml Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🧹 Nitpick comments (1)
libs/core/conftest.py (1)

106-114: Minor: pass the string value of the enum to from_data for clarity.

MockFileFactoryMimeType is a str Enum so this works today, but KilnAttachmentModel.from_data(data, mime_type: str) is typed as plain str. Passing mime_type.value (or annotating the accepted types) avoids future surprises if from_data ever validates via isinstance(..., str) strictly or is switched to a stricter type.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@libs/core/conftest.py` around lines 106 - 114, The create_attachment helper
currently passes the MockFileFactoryMimeType enum directly to
KilnAttachmentModel.from_data; change it to pass the enum's string value (e.g.,
mime_type.value) so the call to from_data(data, mime_type: str) always receives
a plain str; update the branch that calls KilnAttachmentModel.from_data in
create_attachment to use mime_type.value to avoid future isinstance/type issues
with the MockFileFactoryMimeType enum.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@libs/core/conftest.py`:
- Around line 91-92: The generated filename adds an extra dot because
filename.suffix already includes the leading '.', so change the construction of
path_copy (currently using f"{uuid.uuid4()!s}.{filename.suffix}") to concatenate
the UUID and the suffix without inserting an extra dot (i.e., use uuid +
filename.suffix or strip the leading dot from filename.suffix before adding one)
so that path_copy uses "<uuid>.pdf" instead of "<uuid>..pdf"; update the
expression where path_copy is set and keep the subsequent shutil.copy(filename,
path_copy) unchanged.

In `@libs/server/conftest.py`:
- Line 67: The generated filename adds a redundant dot because filename.suffix
already includes the leading '.'; update the expression that sets path_copy so
it does not insert an extra dot (use the uuid string concatenated directly with
filename.suffix, or strip the leading dot from filename.suffix before adding a
dot), locating the change where path_copy is assigned (path_copy, tmp_path,
uuid.uuid4(), filename.suffix).

In `@pyproject.toml`:
- Around line 83-89: Update the coverage omit pattern for pytest fixtures in the
[tool.coverage.run] omit list: replace the bare "conftest.py" entry with a
recursive glob "**/conftest.py" so all nested conftest.py files (e.g.,
libs/core/conftest.py and libs/server/conftest.py) are omitted from coverage;
modify the omit array containing entries like "**/test_*.py",
"libs/core/kiln_ai/adapters/ml_model_list.py", "conftest.py",
"*/kiln_ai_server_client/*" to use "**/conftest.py" instead of "conftest.py".

In `@specs/projects/root_cleanup/architecture.md`:
- Line 43: The architecture doc claims 2 hardcoded path references to fix in
kiln-check-deprecation/SKILL.md while the functional_spec.md claims 3; reconcile
them by opening kiln-check-deprecation/SKILL.md, counting actual hardcoded path
refs and updating either architecture.md or functional_spec.md so both state the
verified count (and optionally add a short note listing the three paths if 3),
referencing the file name kiln-check-deprecation/SKILL.md and the two docs
architecture.md and functional_spec.md to locate where to change.

In `@specs/projects/root_cleanup/implementation_plan.md`:
- Around line 25-27: Phase 3 and Phase 7 disagree on the intermediate location
of setup_claude.sh; pick one consistent intermediate path and update both phases
and any references accordingly (either keep setup_claude.sh excluded from the
utils/ move and change Phase 7 to use utils/setup_claude.sh, or include
setup_claude.sh in the git mv to .config/utils/ in Phase 3 so Phase 7 can
continue to expect .config/utils/setup_claude.sh before moving to
.agents/claude/setup.sh); update the specific mentions of setup_claude.sh,
utils/, .config/utils/, Phase 3, Phase 7 and any other referenced lines in the
plan so they all reference the same chosen intermediate path.

In `@specs/projects/root_cleanup/phase_plans/phase_2.md`:
- Around line 30-35: Update the doc text to stop claiming pyproject.toml only
contains addopts and instead state that pyproject.toml already contains
asyncio_mode, asyncio_default_fixture_loop_scope, markers, and filterwarnings;
instruct the reader to reconcile/verify the pytest.ini settings into the
existing [tool.pytest.ini_options] table (preserving addopts="-n auto" as
commented), ensure asyncio_default_fixture_loop_scope is unquoted as a TOML
string, and confirm markers and filterwarnings are represented as TOML lists;
reference pyproject.toml, pytest.ini, and the keys asyncio_mode,
asyncio_default_fixture_loop_scope, markers, filterwarnings, addopts in the
updated wording.

In `@specs/projects/root_cleanup/phase_plans/phase_9.md`:
- Around line 9-10: The phase doc references fixtures/imports that aren't
defined in the root conftest; locate the actual pre-move definitions of
MockFileFactoryMimeType, test_data_dir, mock_file_factory, and
mock_attachment_factory in the repository (where they currently live), then
update the phase plan text to list that actual pre-move location instead of
"root conftest.py" and adjust the import rewrite instructions accordingly (also
update the same corrections mentioned for lines 17–19); reference the fixture
names above so reviewers can verify the doc matches the real code location.

---

Nitpick comments:
In `@libs/core/conftest.py`:
- Around line 106-114: The create_attachment helper currently passes the
MockFileFactoryMimeType enum directly to KilnAttachmentModel.from_data; change
it to pass the enum's string value (e.g., mime_type.value) so the call to
from_data(data, mime_type: str) always receives a plain str; update the branch
that calls KilnAttachmentModel.from_data in create_attachment to use
mime_type.value to avoid future isinstance/type issues with the
MockFileFactoryMimeType enum.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8612e83a-897b-48cf-a724-a812d7e87a07

📥 Commits

Reviewing files that changed from the base of the PR and between c49150c and 5b556b5.

⛔ Files ignored due to path filters (11)
  • .config/legacy_guides/kiln_preview.gif is excluded by !**/*.gif
  • libs/core/tests/assets/audio_ice_cubes.mp3 is excluded by !**/*.mp3
  • libs/core/tests/assets/audio_ice_cubes.ogg is excluded by !**/*.ogg
  • libs/core/tests/assets/audio_ice_cubes.wav is excluded by !**/*.wav
  • libs/core/tests/assets/document_paper.pdf is excluded by !**/*.pdf
  • libs/core/tests/assets/document_people.csv is excluded by !**/*.csv
  • libs/core/tests/assets/image_kodim23.png is excluded by !**/*.png
  • libs/core/tests/assets/image_nasa.jpeg is excluded by !**/*.jpeg
  • libs/core/tests/assets/image_nasa.jpg is excluded by !**/*.jpg
  • libs/core/tests/assets/video_tv_bars.mov is excluded by !**/*.mov
  • libs/core/tests/assets/video_tv_bars.mp4 is excluded by !**/*.mp4
📒 Files selected for processing (61)
  • .agents/claude/setup.sh
  • .agents/cursor/setup.sh
  • .agents/skills/kiln-add-model/SKILL.md
  • .agents/skills/kiln-check-deprecation/SKILL.md
  • .agents/skills/kiln-check-deprecation/scripts/check_provider.py
  • .agents/skills/kiln-check-deprecation/scripts/extract_models.py
  • .config/hooks_mcp.yaml
  • .config/legacy_guides/Collaborating with Kiln.md
  • .config/legacy_guides/Fine Tuning LLM Models Guide.md
  • .config/legacy_guides/Model Support.md
  • .config/legacy_guides/Synthetic Data Generation.md
  • .config/utils/pre-commit-hook
  • .config/utils/setup_env.sh
  • .config/wt.toml
  • .config/wt/README.md
  • .coveragerc
  • .cursor/mcp.json
  • .cursor/rules/.gitignore
  • .cursor/rules/project.mdc
  • .gitignore
  • .tessl/.gitignore
  • AGENTS.md
  • CONTRIBUTING.md
  • README.md
  • conftest.py
  • guides/kiln_preview.avif
  • libs/core/conftest.py
  • libs/core/kiln_ai/adapters/extractors/test_encoding.py
  • libs/core/kiln_ai/adapters/extractors/test_extractor_runner.py
  • libs/core/kiln_ai/adapters/extractors/test_litellm_extractor.py
  • libs/core/kiln_ai/datamodel/test_attachment.py
  • libs/core/kiln_ai/utils/test_pdf_utils.py
  • libs/core/tests/assets/README.md
  • libs/core/tests/assets/document_ice_cubes.html
  • libs/core/tests/assets/document_ice_cubes.md
  • libs/core/tests/assets/document_ice_cubes.txt
  • libs/server/conftest.py
  • libs/server/kiln_server/test_document_api.py
  • pyproject.toml
  • pytest.ini
  • specs/projects/mcp_sessions/01_codebase_findings.md
  • specs/projects/mcp_sessions/02_design_report.md
  • specs/projects/mcp_sessions/03_refinement_general_session_id.md
  • specs/projects/mcp_sessions/04_refinement_no_ephemeral_fallback.md
  • specs/projects/mcp_sessions/implementation_plan.md
  • specs/projects/root_cleanup/architecture.md
  • specs/projects/root_cleanup/functional_spec.md
  • specs/projects/root_cleanup/implementation_plan.md
  • specs/projects/root_cleanup/phase_plans/phase_1.md
  • specs/projects/root_cleanup/phase_plans/phase_10.md
  • specs/projects/root_cleanup/phase_plans/phase_2.md
  • specs/projects/root_cleanup/phase_plans/phase_3.md
  • specs/projects/root_cleanup/phase_plans/phase_4.md
  • specs/projects/root_cleanup/phase_plans/phase_5.md
  • specs/projects/root_cleanup/phase_plans/phase_6.md
  • specs/projects/root_cleanup/phase_plans/phase_7.md
  • specs/projects/root_cleanup/phase_plans/phase_8.md
  • specs/projects/root_cleanup/phase_plans/phase_9.md
  • specs/projects/root_cleanup/project_overview.md
  • tessl.json
  • utils/setup_claude.sh
💤 Files with no reviewable changes (9)
  • .cursor/rules/.gitignore
  • .tessl/.gitignore
  • .cursor/rules/project.mdc
  • .coveragerc
  • tessl.json
  • utils/setup_claude.sh
  • pytest.ini
  • conftest.py
  • AGENTS.md

Comment thread libs/core/conftest.py Outdated
Comment thread libs/server/conftest.py Outdated
Comment thread pyproject.toml

Phase order inside item 8:
1. Create `.agents/skills/` and copy tracked content from `.cursor/skills/`.
2. Fix hardcoded path refs inside the moved files (`kiln-check-deprecation/SKILL.md` × 2).
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Unify hardcoded-reference count with functional spec.

This file says there are 2 path refs to fix in kiln-check-deprecation/SKILL.md, while functional_spec.md says 3. Please reconcile both docs to a single verified count.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@specs/projects/root_cleanup/architecture.md` at line 43, The architecture doc
claims 2 hardcoded path references to fix in kiln-check-deprecation/SKILL.md
while the functional_spec.md claims 3; reconcile them by opening
kiln-check-deprecation/SKILL.md, counting actual hardcoded path refs and
updating either architecture.md or functional_spec.md so both state the verified
count (and optionally add a short note listing the three paths if 3),
referencing the file name kiln-check-deprecation/SKILL.md and the two docs
architecture.md and functional_spec.md to locate where to change.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed but not implemented.

These are planning docs that served their purpose during implementation. The code is the source of truth — we don't retroactively fix spec artifacts after the work is done.


Reviewed by AI coding agent via /spec pr

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scosman, understood — planning docs are ephemeral artifacts and the implemented code is the source of truth. I'll avoid flagging inconsistencies in completed planning/spec docs going forward.


🧠 Learnings used
Learnt from: scosman
Repo: Kiln-AI/Kiln PR: 1182
File: specs/projects/document_api/functional_spec.md:27-39
Timestamp: 2026-03-31T01:50:03.759Z
Learning: In the Kiln-AI/Kiln repo, do not flag or request fixes for markdownlint issues in spec/documentation Markdown files under `specs/` (e.g., MD040 fenced-code-language). These markdownlint findings are intentionally treated as acceptable and are not worth churn for files like `specs/**/*.md`.

Learnt from: sfierro
Repo: Kiln-AI/Kiln PR: 1239
File: app/web_ui/src/routes/(app)/specs/[project_id]/[task_id]/[spec_id]/+page.svelte:161-166
Timestamp: 2026-04-07T22:57:02.847Z
Learning: In the Kiln AI codebase (app/web_ui/src/routes/(app)/specs/), the Archive/Unarchive toggle for specs always restores to "active" status on unarchive, regardless of the prior status (e.g., "future" or "deprecated"). This is intentional and consistent with the bulk archive/unarchive behavior on the spec list page.

Learnt from: scosman
Repo: Kiln-AI/Kiln PR: 733
File: app/web_ui/src/lib/stores/local_storage_store.ts:9-11
Timestamp: 2025-10-21T00:06:57.115Z
Learning: When scosman is refactoring code by moving it to a new location, he prefers to keep the moved code unchanged and not mix in functional improvements or bug fixes during the refactor.

Comment thread specs/projects/root_cleanup/implementation_plan.md
Comment on lines +30 to +35
2. **Edit `pyproject.toml`**: merge `pytest.ini` contents into the existing `[tool.pytest.ini_options]` table. Current state only has `addopts="-n auto"` (commented-out in pytest.ini, so we keep it as-is in pyproject). Add:
- `asyncio_mode = "auto"`
- `asyncio_default_fixture_loop_scope = "function"` (unquote the INI value — in TOML the string needs one layer of quoting, no inner quotes)
- `markers = [...]` as a list (TOML equivalent of the INI multi-line list)
- `filterwarnings = [...]` as a list

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Update stale statement about current pytest config state.

Line 30 claims only addopts="-n auto" exists, but current pyproject.toml already includes asyncio_mode, asyncio_default_fixture_loop_scope, markers, and filterwarnings. Please adjust this section to describe reconciliation/verification instead of fresh addition.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@specs/projects/root_cleanup/phase_plans/phase_2.md` around lines 30 - 35,
Update the doc text to stop claiming pyproject.toml only contains addopts and
instead state that pyproject.toml already contains asyncio_mode,
asyncio_default_fixture_loop_scope, markers, and filterwarnings; instruct the
reader to reconcile/verify the pytest.ini settings into the existing
[tool.pytest.ini_options] table (preserving addopts="-n auto" as commented),
ensure asyncio_default_fixture_loop_scope is unquoted as a TOML string, and
confirm markers and filterwarnings are represented as TOML lists; reference
pyproject.toml, pytest.ini, and the keys asyncio_mode,
asyncio_default_fixture_loop_scope, markers, filterwarnings, addopts in the
updated wording.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed but not implemented.

These are planning docs that served their purpose during implementation. The code is the source of truth — we don't retroactively fix spec artifacts after the work is done.


Reviewed by AI coding agent via /spec pr

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scosman, understood — planning docs are historical artifacts and the code is the source of truth. I'll avoid flagging stale content in completed phase plan documents going forward.

🐇 Noted for future reviews — historical docs stay historical.


✏️ Learnings added
Learnt from: scosman
Repo: Kiln-AI/Kiln PR: 1339
File: specs/projects/root_cleanup/phase_plans/phase_2.md:30-35
Timestamp: 2026-04-24T01:23:39.041Z
Learning: In the Kiln-AI/Kiln repo, planning/phase-plan documents under `specs/projects/*/phase_plans/` (e.g., `specs/projects/root_cleanup/phase_plans/`) are treated as historical artifacts after implementation is complete. Do not flag or request fixes for stale or inaccurate content in these files — the code is the source of truth, and retroactive corrections to spec artifacts are intentionally not made.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: leonardmq
Repo: Kiln-AI/Kiln PR: 487
File: libs/server/kiln_server/test_document_api.py:1799-1873
Timestamp: 2025-09-10T08:17:31.156Z
Learning: The project uses pytest with asyncio_mode = auto in pytest.ini, which automatically detects and runs async test functions without requiring pytest.mark.asyncio decorators. This means async test functions in the codebase don't need the explicit asyncio marker.

Learnt from: scosman
Repo: Kiln-AI/Kiln PR: 1182
File: specs/projects/document_api/functional_spec.md:27-39
Timestamp: 2026-03-31T01:50:03.759Z
Learning: In the Kiln-AI/Kiln repo, do not flag or request fixes for markdownlint issues in spec/documentation Markdown files under `specs/` (e.g., MD040 fenced-code-language). These markdownlint findings are intentionally treated as acceptable and are not worth churn for files like `specs/**/*.md`.

Learnt from: leonardmq
Repo: Kiln-AI/Kiln PR: 487
File: libs/server/kiln_server/test_document_api.py:1799-1873
Timestamp: 2025-09-10T08:17:31.156Z
Learning: The project uses pytest with asyncio_mode = auto in pytest.ini, which automatically detects and runs async test functions without requiring pytest.mark.asyncio decorators.

Learnt from: sfierro
Repo: Kiln-AI/Kiln PR: 1239
File: app/web_ui/src/routes/(app)/specs/[project_id]/[task_id]/[spec_id]/+page.svelte:161-166
Timestamp: 2026-04-07T22:57:02.847Z
Learning: In the Kiln AI codebase (app/web_ui/src/routes/(app)/specs/), the Archive/Unarchive toggle for specs always restores to "active" status on unarchive, regardless of the prior status (e.g., "future" or "deprecated"). This is intentional and consistent with the bulk archive/unarchive behavior on the spec list page.

Learnt from: scosman
Repo: Kiln-AI/Kiln PR: 733
File: app/web_ui/src/lib/stores/local_storage_store.ts:9-11
Timestamp: 2025-10-21T00:06:57.115Z
Learning: When scosman is refactoring code by moving it to a new location, he prefers to keep the moved code unchanged and not mix in functional improvements or bug fixes during the refactor.

Comment on lines +9 to +10
Moves test asset files from the root `tests/assets/` directory into `libs/core/tests/assets/`, co-locating them with the core library that primarily consumes them. Migrates the associated pytest fixtures (`MockFileFactoryMimeType`, `test_data_dir`, `mock_file_factory`, `mock_attachment_factory`) from the root `conftest.py` into `libs/core/conftest.py`, and creates a bridge `libs/server/conftest.py` for the one server-side consumer.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Phase steps reference fixtures/imports that are not present in root conftest.py.

The plan says these fixtures are moved/removed from root and imports are rewritten from conftest, but the provided conftest.py context does not define MockFileFactoryMimeType, test_data_dir, mock_file_factory, or mock_attachment_factory. Please update this phase doc to match the real pre-move location of those symbols.

Also applies to: 17-19

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@specs/projects/root_cleanup/phase_plans/phase_9.md` around lines 9 - 10, The
phase doc references fixtures/imports that aren't defined in the root conftest;
locate the actual pre-move definitions of MockFileFactoryMimeType,
test_data_dir, mock_file_factory, and mock_attachment_factory in the repository
(where they currently live), then update the phase plan text to list that actual
pre-move location instead of "root conftest.py" and adjust the import rewrite
instructions accordingly (also update the same corrections mentioned for lines
17–19); reference the fixture names above so reviewers can verify the doc
matches the real code location.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed but not implemented.

These are planning docs that served their purpose during implementation. The code is the source of truth — we don't retroactively fix spec artifacts after the work is done.


Reviewed by AI coding agent via /spec pr

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scosman, understood — completed phase plan docs are historical artifacts and the implementation code is the source of truth. I'll drop this.


✏️ Learnings added
Learnt from: scosman
Repo: Kiln-AI/Kiln PR: 1339
File: specs/projects/root_cleanup/phase_plans/phase_9.md:9-10
Timestamp: 2026-04-24T01:23:38.309Z
Learning: In the Kiln-AI/Kiln repo, do not flag issues in completed planning/phase-plan spec documents under `specs/projects/*/phase_plans/` (or similar paths). These docs serve their purpose during implementation and are not retroactively corrected after the work is done; the code is the source of truth.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: scosman
Repo: Kiln-AI/Kiln PR: 1182
File: specs/projects/document_api/functional_spec.md:27-39
Timestamp: 2026-03-31T01:50:03.759Z
Learning: In the Kiln-AI/Kiln repo, do not flag or request fixes for markdownlint issues in spec/documentation Markdown files under `specs/` (e.g., MD040 fenced-code-language). These markdownlint findings are intentionally treated as acceptable and are not worth churn for files like `specs/**/*.md`.

Learnt from: sfierro
Repo: Kiln-AI/Kiln PR: 1239
File: app/web_ui/src/routes/(app)/specs/[project_id]/[task_id]/[spec_id]/+page.svelte:161-166
Timestamp: 2026-04-07T22:57:02.847Z
Learning: In the Kiln AI codebase (app/web_ui/src/routes/(app)/specs/), the Archive/Unarchive toggle for specs always restores to "active" status on unarchive, regardless of the prior status (e.g., "future" or "deprecated"). This is intentional and consistent with the bulk archive/unarchive behavior on the spec list page.

Learnt from: scosman
Repo: Kiln-AI/Kiln PR: 733
File: app/web_ui/src/lib/stores/local_storage_store.ts:9-11
Timestamp: 2025-10-21T00:06:57.115Z
Learning: When scosman is refactoring code by moving it to a new location, he prefers to keep the moved code unchanged and not mix in functional improvements or bug fixes during the refactor.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

📊 Coverage Report

Overall Coverage: 27%

Diff: origin/main...HEAD

No lines with coverage information in this diff.


Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@libs/core/conftest.py`:
- Around line 45-48: The case branch for MockFileFactoryMimeType.JPEG is
unreachable because JPEG is an alias of MockFileFactoryMimeType.JPG (both map to
"image/jpeg"), so callers requesting JPEG will never hit the JPEG case and will
get image_nasa.jpg; to fix, remove the dead `case MockFileFactoryMimeType.JPEG`
branch or refactor MockFileFactory to switch on the underlying string value (or
use a dict keyed by the mime string) so you can map "image/jpeg" to distinct
filenames (e.g., choose between image_nasa.jpg and image_nasa.jpeg) and update
the filename assignment logic around the filename variable/test_data_dir
accordingly, ensuring MockFileFactoryMimeType and the factory switch/dict are
consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a54480ab-0419-4972-b658-401e8ae320e2

📥 Commits

Reviewing files that changed from the base of the PR and between 66c154b and 4d7e3c0.

📒 Files selected for processing (4)
  • .config/hooks_mcp.yaml
  • conftest.py
  • libs/core/conftest.py
  • libs/server/conftest.py
💤 Files with no reviewable changes (1)
  • conftest.py
✅ Files skipped from review due to trivial changes (2)
  • libs/server/conftest.py
  • .config/hooks_mcp.yaml

Comment thread libs/core/conftest.py Outdated
@scosman scosman merged commit 8df3e3d into main Apr 24, 2026
13 of 14 checks passed
@scosman scosman deleted the scosman/cleanup_root branch April 24, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants