Skip to content

Commit 1cce38a

Browse files
committed
feat: rename skill from run-stitch to stitch and restructure menu flow
- Rename skill directories and frontmatter from `run-stitch` to `stitch` for both Claude and Codex, making `/stitch` the unified entry point for install and operation - Restructure the interactive menu into a shallow question tree with at most three options per step to ensure consistent rendering on Codex's `request_user_input` (which caps at 2–3 choices) - Split the initial four-option menu into three tiers: start/stop/inspect, then inspect branches to status/parameters/approvals, then approvals branches to approvals/upgrade - Update skill documentation to clarify the question-driven flow: always ask the operator one question at a time instead of inferring actions from vague requests - Add installation-check logic: confirm installation intent with a single question before showing the menu, or skip directly to the menu if already installed - Restructure README quick start to lead with the skill installation (recommended for Claude Code and Codex), with the raw prompt as a fallback for other agents - Update version to 0.1.38 and monorepo source reference
1 parent 5457be8 commit 1cce38a

7 files changed

Lines changed: 124 additions & 35 deletions

File tree

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,56 @@
11
---
2-
name: run-stitch
2+
name: stitch
33
description: Operate Stitch, the Textile operator bot — start, stop, restart, check status, tail logs, upgrade, change pool parameters (spreads, liquidity), and manage Permit2 approvals. Falls back to install if Stitch isn't set up yet. Use when asked to "start/stop/restart stitch", "run the bot", "check the bot", "stitch logs", "upgrade stitch", "change the spread/liquidity", or "install stitch".
44
---
55

66
# Operate Stitch
77

88
Stitch is the Textile operator bot (binary `stitch`): per-pool market making plus
9-
settlement closing. This skill is for running and tending a Stitch that's already
10-
installed. If it isn't installed yet, jump to [Not installed yet](#not-installed-yet).
9+
settlement closing. This skill both runs an existing Stitch and installs one that
10+
isn't set up yet.
11+
12+
## Always start here
13+
14+
1. **Find the run layout and whether it's installed** — the next section.
15+
2. **If it's not installed**, don't show the menu. Tell the operator, then with a
16+
single `AskUserQuestion` confirm they want to install now. On yes, install by
17+
reading `AI_INSTALL_PROMPT.md` and following it in full — see
18+
[Not installed yet](#not-installed-yet).
19+
3. **If it's installed**, ask the operator what they want to do with
20+
`AskUserQuestion`, **one question at a time**. Never guess the action from a
21+
vague request — ask. Wait for each answer before the next question or any
22+
command.
23+
24+
Question-tool rules (same as the install prompt): one question per call, multiple
25+
choice, most-likely option first, and the tool always adds a free-form answer so
26+
the operator can type something else. In Codex use `request_user_input` (Plan
27+
mode); if no question tool is available, ask the same thing in chat, still one at
28+
a time.
29+
30+
**The menu** — keep every `AskUserQuestion` to **at most three options**,
31+
most-likely first (so the same flow also renders on Codex's `request_user_input`,
32+
which caps at 2–3). The tool always adds a free-form answer, so the operator can
33+
type anything else.
34+
35+
First question — "What do you want to do with Stitch?":
36+
37+
- **Start / resume live**[Start](#start) (cloud: [AWS cloud](#aws-cloud-ecs-fargate))
38+
- **Stop / pause**[Stop](#stop)
39+
- **Inspect or change it** — status/logs, parameters, approvals, or upgrade
40+
41+
If they pick **Inspect or change it**, ask a second `AskUserQuestion`:
42+
43+
- **Status and logs**[Status and logs](#status-and-logs)
44+
- **Change parameters**[Change parameters](#change-parameters)
45+
- **Approvals or upgrade**
46+
47+
If they pick **Approvals or upgrade**, ask a third:
48+
49+
- **Run Permit2 approvals**[Permit2 approvals](#permit2-approvals)
50+
- **Upgrade**[Upgrade](#upgrade)
51+
52+
Then carry out the chosen action from the matching section, against the layout you
53+
detected, honoring the golden rules throughout.
1154

1255
## First: find the install and how it runs
1356

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: run-stitch
2+
name: stitch
33
description: Operate Stitch, the Textile operator bot — start, stop, restart, check status, tail logs, upgrade, change pool parameters (spreads, liquidity), and manage Permit2 approvals. Falls back to install if Stitch isn't set up yet. Use when asked to "start/stop/restart stitch", "run the bot", "check the bot", "stitch logs", "upgrade stitch", "change the spread/liquidity", or "install stitch".
44
metadata:
55
short-description: Operate the Stitch operator bot
@@ -8,8 +8,49 @@ metadata:
88
# Operate Stitch
99

1010
Stitch is the Textile operator bot (binary `stitch`): per-pool market making plus
11-
settlement closing. This skill is for running and tending a Stitch that's already
12-
installed. If it isn't installed yet, jump to [Not installed yet](#not-installed-yet).
11+
settlement closing. This skill both runs an existing Stitch and installs one that
12+
isn't set up yet.
13+
14+
## Always start here
15+
16+
1. **Find the run layout and whether it's installed** — the next section.
17+
2. **If it's not installed**, don't show the menu. Tell the operator, then with a
18+
single question confirm they want to install now. On yes, install by reading
19+
`AI_INSTALL_PROMPT.md` and following it in full — see
20+
[Not installed yet](#not-installed-yet).
21+
3. **If it's installed**, ask the operator what they want to do, **one question at
22+
a time**. Never guess the action from a vague request — ask. Wait for each
23+
answer before the next question or any command.
24+
25+
Question-tool rules (same as the install prompt): use `request_user_input` in Plan
26+
mode — one question per call, multiple choice, most-likely option first; it adds a
27+
free-form answer so the operator can type something else. If it isn't available
28+
(Default mode), ask the same thing in chat, still one at a time.
29+
30+
**The menu** — keep every question to **at most three options**, most-likely
31+
first (`request_user_input` caps at 2–3, and the install prompt warns more can
32+
fail to render or fall back to chat). The tool always adds a free-form answer, so
33+
the operator can type anything else.
34+
35+
First question — "What do you want to do with Stitch?":
36+
37+
- **Start / resume live**[Start](#start) (cloud: [AWS cloud](#aws-cloud-ecs-fargate))
38+
- **Stop / pause**[Stop](#stop)
39+
- **Inspect or change it** — status/logs, parameters, approvals, or upgrade
40+
41+
If they pick **Inspect or change it**, ask a second question:
42+
43+
- **Status and logs**[Status and logs](#status-and-logs)
44+
- **Change parameters**[Change parameters](#change-parameters)
45+
- **Approvals or upgrade**
46+
47+
If they pick **Approvals or upgrade**, ask a third:
48+
49+
- **Run Permit2 approvals**[Permit2 approvals](#permit2-approvals)
50+
- **Upgrade**[Upgrade](#upgrade)
51+
52+
Then carry out the chosen action from the matching section, against the layout you
53+
detected, honoring the golden rules throughout.
1354

1455
## First: find the install and how it runs
1556

.textile-monorepo-source

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5a1f4432525a7c5eff8d9c4228ce776599b5bcbd
1+
810786baa260dfa725947db9fce9f663ac6617c6

.textile-stitch-release-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.37
1+
0.1.38

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "stitch-bot"
3-
version = "0.1.37"
3+
version = "0.1.38"
44
edition = "2021"
55
description = "Stitch — Textile filler-network operator bot; signs UniswapX limit orders and closes settlement auctions."
66
license = "AGPL-3.0-or-later"

README.md

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,37 @@ Stitch does two jobs for each configured pool by default:
3131

3232
## Quick Start
3333

34-
The recommended way to install Stitch is to have an AI assistant guide the
35-
setup, collect the required operator settings, create the config, run a dry run,
36-
and only start live operation after you confirm.
34+
The recommended way to install and run Stitch is with an AI coding agent: it
35+
collects the operator settings, writes the config, runs a dry run, and starts
36+
live only after you confirm.
3737

38-
Use this short prompt to begin:
38+
### Claude Code or Codex (recommended)
39+
40+
Install the `stitch` skill once, then just talk to your agent. The skill installs
41+
Stitch when it's missing and runs it after — start, stop, logs, parameter
42+
changes, upgrades. Ask your agent to install it:
43+
44+
- **Claude Code** — paste:
45+
46+
> Install this skill into `~/.claude/skills/stitch/SKILL.md`:
47+
> https://raw.githubusercontent.com/textile-protocol/textile-stitch/main/.claude/skills/stitch/SKILL.md
48+
49+
Then run `/stitch`.
50+
51+
- **Codex** — paste:
52+
53+
> Install the stitch skill from
54+
> https://github.com/textile-protocol/textile-stitch/tree/main/.codex/skills/stitch
55+
56+
Codex's skill-installer drops it under `~/.codex/skills`. Restart Codex, then
57+
ask it to run or install Stitch and it picks up the skill.
58+
59+
With the repo checked out, Claude Code finds the skill automatically.
60+
61+
### Any other agent
62+
63+
No skill support? Paste this prompt into Claude, GPT, Gemini, or any agent with
64+
terminal access to the machine where Stitch should run:
3965

4066
```text
4167
Help me install and configure Textile Stitch.
@@ -50,27 +76,6 @@ STITCH_PRIVATE_KEY, run a dry run first, and do not start live operation until I
5076
confirm.
5177
```
5278

53-
On Claude Code or Codex? Install the `run-stitch` skill once and skip the prompt
54-
above next time. It guides install when Stitch isn't set up, and otherwise helps
55-
you run it — start, stop, logs, upgrades, parameter changes. No checkout needed,
56-
each is a single file in your user config:
57-
58-
```bash
59-
# Claude Code
60-
mkdir -p ~/.claude/skills/run-stitch
61-
curl -fsSL https://raw.githubusercontent.com/textile-protocol/textile-stitch/main/.claude/skills/run-stitch/SKILL.md \
62-
-o ~/.claude/skills/run-stitch/SKILL.md
63-
64-
# Codex (skills live under ~/.codex/skills; restart Codex after installing)
65-
mkdir -p ~/.codex/skills/run-stitch
66-
curl -fsSL https://raw.githubusercontent.com/textile-protocol/textile-stitch/main/.codex/skills/run-stitch/SKILL.md \
67-
-o ~/.codex/skills/run-stitch/SKILL.md
68-
```
69-
70-
In Claude Code, run `/run-stitch`. In Codex, restart it, then just ask to run or
71-
install Stitch and it picks up the skill. (With the repo checked out, Claude Code
72-
finds the skill automatically.)
73-
7479
For the full copyable prompt, open [AI_INSTALL_PROMPT.md](AI_INSTALL_PROMPT.md).
7580
For configuration reference, tuning, and troubleshooting, see
7681
[ADVANCED.md](ADVANCED.md).

0 commit comments

Comments
 (0)