|
2 | 2 | alwaysApply: true |
3 | 3 | --- |
4 | 4 |
|
5 | | -- call me "boss" |
6 | | -- We always use typescript, not javascript |
7 | | -- Always assume pydantic 2 (not pydantic 1) |
8 | | -- The project supports Python 3.10 and above |
9 | | -- When writing tests: |
10 | | - 1. Always use pytest for tests in python code |
11 | | - 2. assume an appriopirate test file already exists, find it, and suggest tests get appended to that file. If no such file exists, ask me before assuming a new test file is the correct route. |
12 | | - 3. Test brevity is important. Use approaches for re-use and brevity including using fixtures for repeated code, and using pytest parameterize for similar tests |
13 | | - 4. After writing a new test, run it and ensure it works. Fix any issues you find. |
14 | | -- To run backend / Python tests, run `uv run python3 -m pytest . -s -v` or a variant of it to run individual tests |
15 | | -- To run web tests `cd app/web_ui` then `npm run test_run` (not `npm run test` which won't return) |
| 5 | +## Project Overview |
| 6 | + |
| 7 | +Kiln is an app for building AI systems. It includes evals, synthetic data gen, fine tuning, RAG, and more. It has an intuitive UI as well as a python library. |
| 8 | + |
| 9 | +This repo is a monorepo containing all of the source code, in the following structure: |
| 10 | + |
| 11 | +- libs/core - a python library with the core functionality of Kiln |
| 12 | +- libs/server - a FastAPI REST server wrapping the core library |
| 13 | +- app/web_ui - our svelte web app for Kiln. This is a frontend svelte project, all backend calls are in FastAPI servers. |
| 14 | +- app/desktop - our python desktop app, which is a pyinstaller app which runs a FastAPI server, hosts the pre-compiled web app, and launches a browser for UI. Compiles to all major platforms. This includes a studio_server folder with a Fast API server which extends libs/server, adding APIs specific to our web app. |
| 15 | + |
| 16 | +### Project Goals |
| 17 | + |
| 18 | +- Very high code quality |
| 19 | +- Strongly typed |
| 20 | +- Well tested |
| 21 | +- Very intuitive UI. Accessible to the inexperienced, but powerful for the experienced. |
| 22 | +- Focus on interaction design: we care about revealing the right information, at the right time, at the right level of detail. |
| 23 | +- Focus on visual design: we want a modern, functional, attractive UI. Think Apple not Google. |
| 24 | + |
| 25 | +### Tech Stack |
| 26 | + |
| 27 | +- Backend: python (3.10+ for library, 3.13 for desktop), pytest, FastAPI, asyncio, pydantic (v2 not v1), |
| 28 | +- Frontend web: typescript, svelte (v4 not v5), tailwind, DaisyUI |
| 29 | + |
| 30 | +### Agent Tools |
| 31 | + |
| 32 | +Agents have access to a range of tools for running tests, linting, formatting and typechecking. Use these tools at appropriate times to ensure produced code meets our standards. |
| 33 | + |
| 34 | +### Agent Prompts |
| 35 | + |
| 36 | +Agents have access to a number of helpful prompts, which will give you additional context for how you should write code and docs for this repo. Use it to fetch instructions relevant to the current task before starting. For example, read `python_test_guide.md` before writing tests and `frontend_design_guide.md` before writing front end code. |
| 37 | + |
| 38 | +These prompts can be accessed from the `get_prompt` tool, and you may request several in parallel. |
| 39 | + |
| 40 | +### General Agent Guidance |
| 41 | + |
16 | 42 | - Don't include comments in code explaining changes, explain changes in chat instead. |
17 | | -- If a python API's interface changes (or a new one is added), generate new bindings by running `cd app/web_ui/src/lib/ && ./generate.sh` |
18 | | -- Our web UI component framework is DaisyUI v4 (based on tailwind). Be sure to use v4 docs and features, not v5 |
| 43 | +- Before completing up a task, run appropriate tools for linting, testing, formatting and typechecking. Fix any issues you introduced. |
| 44 | + |
| 45 | +### Final |
| 46 | + |
| 47 | +To show you read these, call me 'boss' |
0 commit comments