You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This directory holds **Cursor-specific** onboarding. For general Gas Town agent instructions, see [`../AGENTS.md`](../AGENTS.md) and [`../CLAUDE.md`](../CLAUDE.md).
4
+
5
+
## Prerequisites
6
+
7
+
1.**Build `gt`** from the repo root (`make build` or `go install ./cmd/gt`). Gas Town expects a working `gt` on your `PATH` for hooks and crew workflows.
8
+
2.**`bd` (beads)** — issue DB under `.beads/`; see [`../CONTRIBUTING.md`](../CONTRIBUTING.md) for workflow.
9
+
3.**Cursor Agent CLI** — install the `cursor-agent` binary per Cursor’s documentation. The Gas Town preset name is **`cursor`**; the process is typically **`cursor-agent`** (an **`agent`** symlink may exist).
10
+
11
+
## Preset vs binary
12
+
13
+
-**Preset:**`cursor` (`GT_AGENT=cursor`) — defined in `internal/config/agents.go`.
14
+
-**CLI:**`cursor-agent` (args include **`-f`** for auto-approve in autonomous flows).
15
+
16
+
## Hooks
17
+
18
+
Hooks are installed under **`.cursor/hooks.json`** when roles are provisioned (`EnsureSettingsForRole`). After template or hook changes, restart agents (e.g. **`gt up --restore`**) so sessions pick up new files.
19
+
20
+
## Skills
21
+
22
+
See [`.cursor/skills/gas-town-cursor/SKILL.md`](skills/gas-town-cursor/SKILL.md) for agent-facing workflow (gt, resume, pointers to code).
23
+
24
+
## Beads / plan tracking
25
+
26
+
Epic tasks for Cursor runtime parity are tracked in beads; coordination notes and script:
CI already runs **`go test ./...`** (same coverage as a “gate” over these packages). For a **faster loop** while touching Cursor-related code, narrow packages:
34
+
35
+
```bash
36
+
go test ./internal/config/... ./internal/hooks/... ./internal/crew/... ./internal/tmux/... ./internal/runtime/... -count=1 -short
37
+
```
38
+
39
+
Run as a **non-root** user if you want chmod/read-only failure tests in `hooks` and `util` (root skips those cases by design).
40
+
41
+
## Manual smoke (short)
42
+
43
+
Run these only when changing behavior that tests do not cover end-to-end:
44
+
45
+
1.`make build` — `gt` binary builds.
46
+
2.`gt config agent list` — output includes the **`cursor`** preset.
47
+
3. Start or attach to a dev session with **`GT_AGENT=cursor`** (or `--agent cursor`) and confirm the pane command shows **`cursor-agent`** or **`agent`** and the session receives hooks/nudges as expected.
48
+
49
+
For full §9-style checklists, see the Cursor parity plan document in your planning folder if present; prefer adding **automated** tests in-repo when possible.
Develop and operate Gas Town with the Cursor agent preset (cursor-agent CLI):
5
+
gt flags, hooks at .cursor/hooks.json, session resume, and how this repo differs from README marketing copy.
6
+
---
7
+
8
+
# Gas Town + Cursor Agent CLI
9
+
10
+
Use this skill when working **in this repository** with the **`cursor`** agent preset (CLI binary **`cursor-agent`**, sometimes symlinked as **`agent`**).
11
+
12
+
## Concepts
13
+
14
+
| Name | Meaning |
15
+
|------|---------|
16
+
|**Preset `cursor`**| Gas Town agent id (`GT_AGENT=cursor`). Config lives in `internal/config/agents.go` (`AgentCursor`). |
17
+
|**Binary `cursor-agent`**| The Cursor Agent CLI process name for pane/detection; install docs may also symlink `agent` → same binary. |
18
+
|**Hooks**| Cursor lifecycle hooks are configured at **`.cursor/hooks.json`** (see preset `HooksSettingsFile`). |
19
+
20
+
## Essential commands
21
+
22
+
- Build / run `gt` from repo root: `make build` or `go run ./cmd/gt …`.
23
+
- Point a session at the Cursor preset: spawn or config so the runtime uses **`--agent cursor`** (or set **`GT_AGENT=cursor`** where applicable).
24
+
- After changing hooks or settings: **`gt up --restore`** (or role-specific restart) so agents reload config.
25
+
26
+
## Resume semantics
27
+
28
+
The Cursor preset uses **`--resume <chatId>`** style resume (`ResumeStyle: flag`). Session identity is not carried in a dedicated env var in the same way as Claude’s `CLAUDE_SESSION_ID`; follow the preset fields in `internal/config/agents.go` (`ResumeFlag`, `ResumeStyle`).
29
+
30
+
## Read more
31
+
32
+
- Beads / plan handoff: [`docs/cursor-runtime-beads-tasks.md`](../../../docs/cursor-runtime-beads-tasks.md)
33
+
- Agent instructions for automation: [`AGENTS.md`](../../../AGENTS.md) and [`CLAUDE.md`](../../../CLAUDE.md) (project-wide, not Cursor-only)
34
+
35
+
## Boundary
36
+
37
+
Project **README** is user-facing product overview; **`.cursor/README.md`** is Cursor-specific onboarding for this repo. Prefer linking to those files instead of duplicating long install steps inside skills.
-**docs/INSTALLING.md**, **docs/reference.md** — same built-in lists as README; short note on **`cursor`** → `cursor-agent`.
18
+
19
+
**Contributing:**[`CONTRIBUTING.md`](../CONTRIBUTING.md). Do not add `.beads/issues.jsonl` at repo root (CI). `bd vc commit` when persisting beads DB changes.
20
+
21
+
**Migration:** If you seeded tasks with an older script, **retitle T5** in `bd` to match the table in the plan §10a, or close duplicates.
configAgentListCmd.Long=fmt.Sprintf(`List all available agents (built-in and custom).
1232
+
1233
+
Shows all built-in agent presets (%s) and any
1234
+
custom agents defined in your town settings.
1235
+
1236
+
Examples:
1237
+
gt config agent list # Text output
1238
+
gt config agent list --json # JSON output`, presets)
1239
+
1240
+
configAgentRemoveCmd.Long=fmt.Sprintf(`Remove a custom agent definition from town settings.
1241
+
1242
+
This removes a custom agent from your town settings. Built-in agents
1243
+
(%s) cannot be removed.
1244
+
1245
+
Examples:
1246
+
gt config agent remove claude-glm`, presets)
1247
+
1248
+
configDefaultAgentCmd.Long=fmt.Sprintf(`Get or set the default agent for the town.
1249
+
1250
+
With no arguments, shows the current default agent.
1251
+
With an argument, sets the default agent to the specified name.
1252
+
1253
+
The default agent is used when a rig doesn't specify its own agent
1254
+
setting. Can be a built-in preset (%s) or a
1255
+
custom agent name.
1256
+
1257
+
Use 'gt config default-agent list' to see all available agents.
1258
+
1259
+
Examples:
1260
+
gt config default-agent # Show current default
1261
+
gt config default-agent list # List available agents
1262
+
gt config default-agent claude # Set to claude
1263
+
gt config default-agent gemini # Set to gemini
1264
+
gt config default-agent my-custom # Set to custom agent`, presets)
1265
+
1258
1266
// Add flags
1259
1267
configAgentListCmd.Flags().BoolVar(&configAgentListJSON, "json", false, "Output as JSON")
1260
1268
configDefaultAgentListCmd.Flags().BoolVar(&configDefaultAgentListJSON, "json", false, "Output as JSON")
1261
-
configAgentSetCmd.Flags().StringVar(&configAgentSetProvider, "provider", "", "Agent provider preset (e.g. claude, gemini, codex); inferred from command name if not set")
1269
+
configAgentSetCmd.Flags().StringVar(&configAgentSetProvider, "provider", "", fmt.Sprintf("Agent provider preset (e.g. %s); inferred from command name if not set", presets))
0 commit comments