diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-19 11:47:20 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-19 11:47:20 +0200 |
| commit | 18a589cb4ad8f42e5190318fd1b912abf017ea0d (patch) | |
| tree | 53f57d751f3ba720034f8c64d7fd845e4c9f083d /docs/superpowers/specs | |
| parent | 3737bc1b011510253a63fafb3e756dddb36cf37b (diff) | |
| download | desktop-assistant-18a589cb4ad8f42e5190318fd1b912abf017ea0d.tar.gz desktop-assistant-18a589cb4ad8f42e5190318fd1b912abf017ea0d.zip | |
docs: plan the new project tool, agent choice in the spec
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/superpowers/specs')
| -rw-r--r-- | docs/superpowers/specs/2026-10-19-project-tool-design.md | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/docs/superpowers/specs/2026-10-19-project-tool-design.md b/docs/superpowers/specs/2026-10-19-project-tool-design.md index e1b69e9..0fed3c5 100644 --- a/docs/superpowers/specs/2026-10-19-project-tool-design.md +++ b/docs/superpowers/specs/2026-10-19-project-tool-design.md @@ -7,8 +7,8 @@ Date: 2026-10-19. Status: approved, not implemented. Ask the assistant to start a new project and get a folder in `~/Programming/GIT` laid out like the user's other repos (AGENTS.md, CLAUDE.md pointing at it, README.md, LICENSE), a GPG-signed first commit, -and a kitty tab in that folder running Claude Code, already told what the -project is. +and a kitty tab in that folder running Claude Code or opencode (the +user's choice), already told what the project is. This tool writes more than one bit, so unlike `mode` it has a review step: the model repeats name, description and license and calls the tool only @@ -20,8 +20,8 @@ after the user says yes. A misheard name would otherwise become a folder. like the others. No change to `assistant.py`. ```toml -description = "Start a new programming project: a folder in ~/Programming/GIT with AGENTS.md, CLAUDE.md, README.md, LICENSE and a signed first commit, then a kitty tab running Claude Code in it. Before calling, tell the user the name, description and license you will use, and call only after they say yes." -command = ["project.sh", "{name}", "{license}", "{description}"] +description = "Start a new programming project: a folder in ~/Programming/GIT with AGENTS.md, CLAUDE.md, README.md, LICENSE and a signed first commit, then a kitty tab running a coding agent (Claude Code or opencode) in it. Before calling, tell the user the name, description, license and agent you will use, and call only after they say yes." +command = ["project.sh", "{name}", "{license}", "{description}", "{agent}"] timeout = 120 [params.name] @@ -35,6 +35,10 @@ description = "gpl2 (GPLv2 only, default), gpl2+ (GPLv2 or later), gpl3 or mit. [params.description] type = "string" description = "What the project is, one or two sentences, in the user's words" + +[params.agent] +type = "string" +description = "claude (Claude Code, default) or opencode. Empty means claude." ``` The 120 s timeout leaves room for the Nitrokey PIN dialog: gpg-agent uses @@ -45,7 +49,8 @@ The 120 s timeout leaves room for the Nitrokey PIN dialog: gpg-agent uses Bash, GPLv2 header like the other tool scripts. 1. **Validate.** Name matches `^[a-z0-9][a-z0-9._-]*$`; license in - `gpl2 gpl2+ gpl3 mit` (empty = gpl2); description not empty. Refuse + `gpl2 gpl2+ gpl3 mit` (empty = gpl2); description not empty; agent + `claude` or `opencode` (empty = claude). Refuse if `$PROJECTS_DIR/<name>` exists (`PROJECTS_DIR` defaults to `~/Programming/GIT`, overridable for the check). Each refusal is one line on stderr naming what is accepted, exit 1. @@ -71,17 +76,19 @@ Bash, GPLv2 header like the other tool scripts. disabled. If the commit fails (PIN cancelled, hook rejection), the folder stays and the output says so with git's first error line; the tab still opens. -4. **Open Claude Code.** Prompt: `New project: <description>. Fill in +4. **Open the agent.** `claude <prompt>` or `opencode --prompt + <prompt>`; both read AGENTS.md (CLAUDE.md points Claude Code at it). + Prompt: `New project: <description>. Fill in AGENTS.md and README.md from this, then wait.` - - Socket: newest `$XDG_RUNTIME_DIR/kitty-*` that answers - `kitty @ --to unix:<sock> ls`. Then `kitty @ --to unix:<sock> launch - --type=tab --cwd=<dir> claude <prompt>` and + - Sockets `$XDG_RUNTIME_DIR/kitty-*`, newest first: the first where + `kitty @ --to unix:<sock> launch --type=tab --cwd=<dir> <agent + command>` succeeds wins (a stale socket just fails), then `hyprctl dispatch focuswindow class:kitty`. - - No socket answers: `setsid -f kitty -d <dir> claude <prompt>`, a new + - No socket answers: `setsid -f kitty -d <dir> <agent command>`, a new window, detached. - `KITTY` env var overrides the `kitty` binary, for the check. 5. **Output**, one line: `created <path> (<license>), committed <short - sha> | not committed: <reason>, opened in a kitty tab | window`. + sha> | not committed: <reason>, opened <agent> in a kitty tab | window`. ## kitty-conf (separate repo) @@ -101,19 +108,19 @@ inside kitty cannot drive it. Takes effect after kitty restarts once. `PROJECTS_DIR`, `KITTY=true` so no tab opens. Asserts the four files and a signed commit (`git log --format=%G?` is `G`), then the refusals: bad name (`Foo`, `../x`, empty), existing folder, unknown license, empty -description. The commit is really signed: with a cold PIN cache the +description, unknown agent. The commit is really signed: with a cold PIN cache the dialog appears once. Live, against the running model: - 5 phrasings, Italian and English. The model must state name, description and license and wait: no tool call before the yes, 5/5. -- One creation end to end: folder, signed commit, kitty tab focused, - Claude Code started with the prompt. +- One creation end to end per agent: folder, signed commit, kitty tab + focused, Claude Code or opencode started with the prompt. - kitty not running: a new window opens instead. ## Not included Remotes (gitctl, gh, tea), language scaffolding, source-file headers -(there are no sources yet). The Claude Code session in the new tab +(there are no sources yet). The agent session in the new tab handles those. |
