Projects
Typically a project is a git repository.
It has a name and one or more folders on your Mac, and it is where sessions do their work. Everything a session needs to work well in that codebase belongs to the project, so every session that runs there starts with it.
Sessions in a project are its domain experts
Section titled “Sessions in a project are its domain experts”A session that runs in a project is not a general assistant that happens to be pointed at some files. It starts inside that project, with what the project gives it:
- The code itself. The session works in a copy of the repository, and reads the instructions the repository keeps for agents.
- The project’s agent setup. The tools and instructions you have set for agents working here.
- The project’s environment. Its environment variables, and a setup script that gets each fresh working copy ready to run (see Setup and teardown scripts).
- The project’s saved actions. The commands you use to run, test and build it.
So a session in your API project knows how the API is built and tested, and a session in your iOS app knows the app. Each is the expert on its own project, and only on that one.
This is the idea the rest of Kestrel is built on. When a task reaches into another project, the session does not reach in and edit unfamiliar code. It asks a session in that project, the expert there, to make the change. See Workstreams.
Setup and teardown scripts
Section titled “Setup and teardown scripts”A fresh working copy of a repository is not ready to run: it has no installed dependencies, no local configuration, nothing started. A project can carry two scripts so that every session’s copy is ready to go, without you or the agent doing it by hand each time.
| Script | When it runs | Typical use |
|---|---|---|
| Setup | When a session’s working copy is made | Install dependencies, copy a local config file, prepare a database |
| Teardown | Before a session is archived | Stop what was started, remove what setup created |
Set them in the project’s Settings → Scripts. With a setup script in place, a session can build, run and test your app from its first message.
Adding a project
Section titled “Adding a project”Choose the + beside Projects in the sidebar, or right-click an empty part of the sidebar and choose Create project…. The page has two tabs:
- One project. Give it a name and add its folders. The name follows the first folder until you type one.
- Several from a folder. Pick a parent folder and tick the projects inside it.
You can also drop a folder on Kestrel’s Dock icon, or choose Browse for project… in the project picker when starting a session.
A project can have several folders. One is the default, where new sessions start.
Folders that are not repositories
Section titled “Folders that are not repositories”A plain folder can be a project too, with less:
| Git repository | Plain folder | |
|---|---|---|
| Where a session works | In a working copy of its own | In the folder itself |
| Sessions editing at once | As many as you like | One at a time |
| Change history in the Changes pane | Yes | Not yet |
If a second session tries to edit a plain folder, it is told which session is already editing it, and waits until that one is finished or stopped.
The project page
Section titled “The project page”Click the arrow on a project’s row to open its page. It has two tabs, Sessions and Settings. Settings is where you give the project’s sessions their context:
| Section | What it is for |
|---|---|
| General | The name, and New sessions start from: Ask each time, Latest default branch, or Checked-out branch, as it is |
| Folders | Add, remove and reorder folders, and choose the default |
| Git | Git defaults, when working copies are cleaned up, and whether reviews start on their own here |
| Actions | Saved commands you can run from the ▶ button in the Terminal pane |
| Scripts | The setup script, run when a working copy is made, and the teardown script, run before a session is archived |
| Environment | Environment variables for this project’s sessions |
| Agent setup | Instructions and tools for agents working in this project |
Removing a project
Section titled “Removing a project”Right-click the project and choose Remove. It is available once the project has no sessions. The folder on disk is not touched. Archive hides a project without removing it.