From 59c9b40e5d45e82cc676061ca215feb6b56cd405 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sun, 29 Mar 2026 08:37:02 +0000 Subject: feat: register modal-shell project; document project registry Adds modal-shell to SeedProjects() and documents how to find and edit seed.go in .agent/design.md. --- .agent/design.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to '.agent') diff --git a/.agent/design.md b/.agent/design.md index 27c7601..0b61180 100644 --- a/.agent/design.md +++ b/.agent/design.md @@ -377,6 +377,37 @@ parent_task_id: "" # set by parent agent when creating subtasks Batch files wrap multiple tasks under a `tasks:` key and are accepted by `claudomator run`. +### Project Registry + +Projects are registered in **`internal/storage/seed.go`** — `SeedProjects()` — which is called on every server startup (`internal/cli/serve.go:125`). It upserts a hardcoded list of `task.Project` entries into the `projects` SQLite table. + +**To register a new project**, add an entry to the slice in `seed.go`: + +```go +{ + ID: "my-project", + Name: "my-project", + LocalPath: "/workspace/my-project", + RemoteURL: localBareRemote("/workspace/my-project"), + Type: "web", // "web" | "android" + DeployScript: "/workspace/my-project/scripts/deploy", // optional +}, +``` + +**`localBareRemote(dir)`** (`seed.go:47`) resolves the URL of the `local` git remote for the given directory, falling back to the directory path itself. By convention, bare repos live at `/site/git.terst.org/repos/.git` and each working copy has a `local` remote pointing there. + +**Setting up a new project's bare repo:** +```sh +git init --bare /site/git.terst.org/repos/.git +cd /workspace/ +git remote add local /site/git.terst.org/repos/.git +git push local main +``` + +The `task.Project` struct is defined in `internal/task/project.go`. Projects are exposed via `GET /api/projects` and `POST /api/projects`. + +--- + ### Storage Schema Two tables auto-migrated on `storage.Open()`: -- cgit v1.2.3