feat(v0.3): add --project flag, CTASK_TYPE env, project root semantics

ctask new gains --project, which:
  - records type=project on the workspace
  - defaults the category to "projects"
  - applies general + project seed overlays
  - uses CTASK_PROJECT_ROOT when set, with no doubled "projects/"
    path unless the user explicitly passes -c
  - exports CTASK_TYPE=project into the child session

EnvVars now takes a taskType arg and exports CTASK_TYPE. Empty
type defaults to "task" for safety. resume/open also pass
EffectiveType so the env var is correct on resume of a v0.2
workspace.

Git init for project mode is wired in the next commit.
This commit is contained in:
2026-04-10 14:40:06 -04:00
parent 3adfe62410
commit 8cda541f2c
5 changed files with 69 additions and 16 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ func doResume(query string, container, useShell bool, agentOverride string) erro
agent = ws.Meta.Agent
}
envVars := config.EnvVars(ws.Meta.Slug, ws.Meta.Mode, root, ws.Path, ws.Meta.Category)
envVars := config.EnvVars(ws.Meta.Slug, ws.Meta.Mode, root, ws.Path, ws.Meta.Category, workspace.EffectiveType(ws.Meta))
return session.Run(session.LaunchOpts{
WsDir: ws.Path,