diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-29 08:37:02 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-29 08:37:02 +0000 |
| commit | 59c9b40e5d45e82cc676061ca215feb6b56cd405 (patch) | |
| tree | 79b1581054721912bc8781a99d837414fd712dbe /.agent/design.md | |
| parent | 3c5206a927fa7c71c6d77dbac4eb4f274b7a5a77 (diff) | |
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.
Diffstat (limited to '.agent/design.md')
| -rw-r--r-- | .agent/design.md | 31 |
1 files changed, 31 insertions, 0 deletions
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: "<task-uuid>" # 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/<name>.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/<name>.git +cd /workspace/<name> +git remote add local /site/git.terst.org/repos/<name>.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()`: |
