@stigmer/coding-agent-plugin 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +150 -9
- package/index.js +2 -2
- package/package.json +2 -2
- package/plugin/.claude-plugin/marketplace.json +5 -2
- package/plugin/.claude-plugin/plugin.json +15 -4
- package/plugin/.codex-plugin/plugin.json +12 -5
- package/plugin/.cursor-plugin/marketplace.json +4 -2
- package/plugin/.cursor-plugin/plugin.json +7 -4
- package/plugin/README.md +52 -10
- package/plugin/hooks/codex-hooks.json +1 -0
- package/plugin/hooks/cursor-hooks.json +1 -0
- package/plugin/hooks/decide.mjs +230 -0
- package/plugin/hooks/guard.mjs +20 -0
- package/plugin/hooks/hooks.json +15 -0
- package/plugin/skills/stigmer/SKILL.md +244 -201
- package/plugin/skills/stigmer-build/SKILL.md +239 -0
- package/plugin/skills/stigmer-integrate/SKILL.md +227 -0
- package/plugin/skills/stigmer-operate/SKILL.md +239 -0
- package/plugin/skills/stigmer-run/SKILL.md +258 -0
- package/plugin/skills/stigmer-setup/SKILL.md +232 -0
- /package/plugin/{.claude-plugin/icon.png → assets/logo.png} +0 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stigmer-setup
|
|
3
|
+
description: Sets up Stigmer for the project in front of you and keeps working with it. Stigmer runs AI agents for the users of the person's own app. Use when the person asks to set up Stigmer, to add an AI agent for their app's users, to put an agent's chat in their app, or to make, run, change or read Stigmer agents.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Set up Stigmer for this project
|
|
7
|
+
|
|
8
|
+
Stigmer runs AI agents for the people who use this app: an agent takes a file a
|
|
9
|
+
user hands it (a ledger, a ticket export, a contract) and hands back the work.
|
|
10
|
+
You will take the person from nothing to their agent's chat inside their own
|
|
11
|
+
app, in this order. Each step ends with something they can see; tell them what
|
|
12
|
+
it is in one line.
|
|
13
|
+
|
|
14
|
+
0. Find the command line
|
|
15
|
+
1. Where it runs, and signing in
|
|
16
|
+
2. What should your agent do for your users?
|
|
17
|
+
3. The model key
|
|
18
|
+
4. Watch it work
|
|
19
|
+
5. Make it yours
|
|
20
|
+
6. Put it in your app
|
|
21
|
+
7. Bring others in
|
|
22
|
+
|
|
23
|
+
## Rules for every step
|
|
24
|
+
|
|
25
|
+
- Use the person's own words for their product; call the people who use it
|
|
26
|
+
"users".
|
|
27
|
+
- Ask before writing anything outside `stigmer/`, `stigmer-output/`,
|
|
28
|
+
`.gitignore`, the stack's env file and the two files step 6 hands over.
|
|
29
|
+
- Never print, echo or ask for a key, and never put one on a command line. A
|
|
30
|
+
key travels only through stdin or a file the CLI writes itself.
|
|
31
|
+
- Never make a second service account or overwrite an existing agent without
|
|
32
|
+
asking.
|
|
33
|
+
- When a command fails, stop and say what failed in plain words, with the one
|
|
34
|
+
next thing to do. The CLI's own message usually says it; quote it. When the
|
|
35
|
+
server named a place to ask for help (a `Stuck? …` line), pass that line on
|
|
36
|
+
too, so the person knows where to ask.
|
|
37
|
+
- Commands that wait on the person (`stigmer auth login`) can take minutes. Run
|
|
38
|
+
them in the background where your tool allows it, or with the longest timeout
|
|
39
|
+
it allows, and tell the person what will open.
|
|
40
|
+
|
|
41
|
+
## 0. Find the command line
|
|
42
|
+
|
|
43
|
+
Run `stigmer version`. If it is missing, ask the person, then install it with
|
|
44
|
+
`npm install -g @stigmer/cli` (or `brew install stigmer/tap/stigmer` on a Mac
|
|
45
|
+
with Homebrew).
|
|
46
|
+
|
|
47
|
+
## 1. Where it runs, and signing in
|
|
48
|
+
|
|
49
|
+
If the prompt named a Stigmer address, use it: `https://api.stigmer.ai` is
|
|
50
|
+
Stigmer Cloud; `localhost:7234` is this computer; any other is a server at its
|
|
51
|
+
own address. Otherwise ask: Stigmer Cloud, their own Stigmer server (its
|
|
52
|
+
address), or this computer.
|
|
53
|
+
|
|
54
|
+
Later steps send the person to pages of Stigmer's console, written here as
|
|
55
|
+
`<console>`. Its address is the console the prompt named ("its console is
|
|
56
|
+
…"); otherwise `https://app.stigmer.ai` on Stigmer Cloud,
|
|
57
|
+
`http://localhost:7234` on this computer, and the server's own address for a
|
|
58
|
+
server at its own address.
|
|
59
|
+
|
|
60
|
+
- **Stigmer Cloud**: `stigmer config backend set cloud`.
|
|
61
|
+
- **A server at its own address**: `stigmer config backend add <name> --endpoint <host:port>`
|
|
62
|
+
(port 443 for https), then `stigmer config backend use <name>`.
|
|
63
|
+
- **This computer**: `stigmer up` (it starts Stigmer locally, with a console at
|
|
64
|
+
http://localhost:7234). Nothing to sign in to: skip to choosing the
|
|
65
|
+
organization below.
|
|
66
|
+
|
|
67
|
+
Then sign in: `stigmer auth login`. It prints an address and opens the browser;
|
|
68
|
+
the person signs in there. Where no browser can open (an SSH session, a remote
|
|
69
|
+
sandbox), run `stigmer auth login --device` and tell the person to open the
|
|
70
|
+
address it prints and enter the code. `stigmer auth whoami` says who they are
|
|
71
|
+
and which organization the CLI uses, and ends with a `Stuck? …` line when the
|
|
72
|
+
server names a place to ask for help: keep it for when something fails. If it says none is set and they belong to
|
|
73
|
+
several, ask which and run `stigmer config context set --org <slug>`.
|
|
74
|
+
|
|
75
|
+
## 2. What should your agent do for your users?
|
|
76
|
+
|
|
77
|
+
Read this repository first: the README, the routes and pages, the data models,
|
|
78
|
+
the nouns the code uses. Then run `stigmer example list` and suggest the
|
|
79
|
+
example that fits the app, saying why in one line ("Invoice match: your app
|
|
80
|
+
stores purchase orders and invoices"). If none fits, propose an agent of their
|
|
81
|
+
own from what the app does: a short name for its job (`ticket-triage`, not
|
|
82
|
+
`my-agent`), and instructions that say what file it takes and what it saves.
|
|
83
|
+
|
|
84
|
+
The person chooses. Then:
|
|
85
|
+
|
|
86
|
+
- **An example**: `stigmer example get <id>` writes its manifest and sample
|
|
87
|
+
files into `stigmer/<id>/`.
|
|
88
|
+
- **Their own**: write the manifest into `stigmer/<slug>.yaml`, in this shape,
|
|
89
|
+
and show it to them:
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
apiVersion: agentic.stigmer.ai/v1
|
|
93
|
+
kind: Agent
|
|
94
|
+
metadata:
|
|
95
|
+
name: <slug>
|
|
96
|
+
spec:
|
|
97
|
+
description: <one line>
|
|
98
|
+
instructions: |
|
|
99
|
+
<what it reads, what it does, and the file it hands back: "Hand back the summary as a file named summary.md">
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Make it with `stigmer apply -f <the manifest>`. Their agent is now a file in
|
|
103
|
+
their repository they can review and commit. If an agent with that slug already
|
|
104
|
+
exists, ask before applying over it.
|
|
105
|
+
|
|
106
|
+
## 3. The model key
|
|
107
|
+
|
|
108
|
+
Run `stigmer provider-key list`. If a provider is ready, this step is done.
|
|
109
|
+
|
|
110
|
+
If `ANTHROPIC_API_KEY` is set in your environment, pipe it to the CLI:
|
|
111
|
+
`printenv ANTHROPIC_API_KEY | stigmer provider-key set anthropic --key-stdin`
|
|
112
|
+
(on this computer, `printenv ANTHROPIC_API_KEY | stigmer setup --api-key-stdin`,
|
|
113
|
+
then `stigmer down` and `stigmer up`, so the runner takes the key).
|
|
114
|
+
|
|
115
|
+
Otherwise the person enters the key themselves, where you never see it. Never
|
|
116
|
+
ask them for it, and never suggest typing it, or a command that asks for it,
|
|
117
|
+
into this chat: what is typed here lands in your transcript. Ask the command
|
|
118
|
+
line where the key goes: `stigmer provider-key set anthropic < /dev/null`.
|
|
119
|
+
With nothing to read it asks for nothing and sends nothing, and says where:
|
|
120
|
+
|
|
121
|
+
- **The console**: it names the page, as `Add it in the console: …/models` or
|
|
122
|
+
as the console's Models & providers page, which is `<console>/models`. Give
|
|
123
|
+
the person that address, and open it for them with the system's opener (`open`
|
|
124
|
+
on a Mac, `xdg-open` on Linux, `start` on Windows) when you can. They paste
|
|
125
|
+
the key there, and the console checks it with the provider as they save it.
|
|
126
|
+
Wait for them to say it is saved, then run `stigmer provider-key list` and go
|
|
127
|
+
on when it reads "connected".
|
|
128
|
+
- **This computer**: it names `stigmer setup`. Ask the person to run
|
|
129
|
+
`stigmer setup` in a terminal window of their own, outside this coding agent:
|
|
130
|
+
it asks for the key at a hidden prompt. When they say it is done, run
|
|
131
|
+
`stigmer down` and `stigmer up`, so the runner takes the key.
|
|
132
|
+
- **The runners**: it says "This server's runners use the keys whoever runs them gives them".
|
|
133
|
+
The server keeps no keys. Say so, and who runs them. When
|
|
134
|
+
`stigmer provider-key list` reads "not known", the server cannot see its
|
|
135
|
+
runners' keys: go on to step 4, whose run shows whether a runner has one.
|
|
136
|
+
|
|
137
|
+
The key is checked with the provider. A key it rejects: quote the words the
|
|
138
|
+
person saw, and send them back to the same place.
|
|
139
|
+
|
|
140
|
+
## 4. Watch it work
|
|
141
|
+
|
|
142
|
+
Run the agent once on its sample, saving what it makes:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
stigmer run <slug> -m "<the example's first message>" --attach <each sample> --download stigmer-output/
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
`stigmer example get` printed the exact command for an example. For their own
|
|
149
|
+
agent with no sample, write a small made-up one in the shape their app uses,
|
|
150
|
+
and say it is made up. Add `stigmer-output/` to `.gitignore`.
|
|
151
|
+
|
|
152
|
+
Then show the person what came back: name the file it saved by its path
|
|
153
|
+
(`stigmer-output/variance-report.md`), offer to open it with the system's
|
|
154
|
+
opener, read it, and say in one line what it shows.
|
|
155
|
+
|
|
156
|
+
## 5. Make it yours
|
|
157
|
+
|
|
158
|
+
Offer one change, and make it if they want it: sharper instructions in the
|
|
159
|
+
manifest, a run on one of their own files, or the ready-made Spreadsheet export
|
|
160
|
+
skill. For the skill, run `stigmer example get spreadsheet-export`, then
|
|
161
|
+
`stigmer push skill stigmer/skills/spreadsheet-export`, then add these lines to
|
|
162
|
+
the agent's manifest, under `spec:`:
|
|
163
|
+
|
|
164
|
+
```yaml
|
|
165
|
+
skill_refs:
|
|
166
|
+
- kind: skill
|
|
167
|
+
slug: spreadsheet-export
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Apply the manifest again and run again; its runs now also hand back a `.csv`.
|
|
171
|
+
|
|
172
|
+
## 6. Put it in your app
|
|
173
|
+
|
|
174
|
+
1. Find the app's stack: Next.js, a Node, Python, Go or Java backend. The chat
|
|
175
|
+
is a React component.
|
|
176
|
+
2. **On Stigmer Cloud or their own server**, the app's backend signs its users
|
|
177
|
+
in to Stigmer with an admin service account's key:
|
|
178
|
+
- `stigmer service-account list`. If an admin account for the app exists
|
|
179
|
+
(`app-backend`), use it; never make a second without asking. Otherwise
|
|
180
|
+
`stigmer service-account create app-backend --role admin`.
|
|
181
|
+
- Pick the stack's env file (`.env.local` for Next.js, `.env` otherwise) and
|
|
182
|
+
check it is git-ignored (`git check-ignore <file>`); add it to
|
|
183
|
+
`.gitignore` if not. Then
|
|
184
|
+
`stigmer apikey create --service-account app-backend --name <the app's name> --save-to-env <that file>`.
|
|
185
|
+
The CLI writes `STIGMER_API_KEY` into the file and prints only where it
|
|
186
|
+
went.
|
|
187
|
+
- `stigmer embedding set --create-accounts-on-sign-in on --sign-in-role member`,
|
|
188
|
+
so a user's Stigmer account is made the first time the app signs them in.
|
|
189
|
+
3. `stigmer app-handover --stack <nextjs|node|python|go|java> --agent <slug> --write .`
|
|
190
|
+
writes the token route and the chat component, and says what to install.
|
|
191
|
+
4. Fit them into the app:
|
|
192
|
+
- In the route, replace `currentUser` with the app's own session read (its
|
|
193
|
+
auth library's way to get the signed-in user's id, email and name).
|
|
194
|
+
- Put `<StigmerAgentChat />` on the page where their users would use the
|
|
195
|
+
agent, and install what the handover said.
|
|
196
|
+
- Start the app, open that page, and tell the person where to look.
|
|
197
|
+
5. **On this computer** (`stigmer up`), the handover is the development chat
|
|
198
|
+
alone, with no token: there is nobody to sign in. Say that going live means
|
|
199
|
+
running the agent on Stigmer Cloud or a server that signs people in, and
|
|
200
|
+
running this step again there.
|
|
201
|
+
|
|
202
|
+
## 7. Bring others in
|
|
203
|
+
|
|
204
|
+
The last step is the person's, in the console: send them to
|
|
205
|
+
`<console>/settings/bring-others-in` (`<console>` is from step 1). There
|
|
206
|
+
they name their organization (Stigmer Cloud named it from their email), then
|
|
207
|
+
copy an invite link for their team and send it in their own chat or email. The
|
|
208
|
+
team sees the same agent, its runs and the files it made. On this computer
|
|
209
|
+
(`stigmer up`) nobody else can reach Stigmer, so say that bringing others in
|
|
210
|
+
needs Stigmer Cloud or a server that signs people in.
|
|
211
|
+
|
|
212
|
+
## After setup
|
|
213
|
+
|
|
214
|
+
The same tools keep working: make agents with manifests and `stigmer apply`,
|
|
215
|
+
run them with `stigmer run`, and read runs with `stigmer list runs --agent <agent>` and
|
|
216
|
+
`stigmer get session <id>`.
|
|
217
|
+
|
|
218
|
+
Once setup is done, and only then, offer once to keep Stigmer in their coding
|
|
219
|
+
agent for next time: Stigmer's plugin carries this guide as a skill and
|
|
220
|
+
Stigmer's MCP server (`stigmer mcp-server`) for making, running and reading
|
|
221
|
+
agents as typed tools. It is not needed for what was just done, and they can
|
|
222
|
+
say no. If this guide came from the plugin already, skip the offer. The line
|
|
223
|
+
for the tool you are in:
|
|
224
|
+
|
|
225
|
+
- Claude Code: `claude plugin install stigmer --marketplace stigmer/coding-agent-plugin`
|
|
226
|
+
- Codex: `codex plugin marketplace add stigmer/coding-agent-plugin`, then
|
|
227
|
+
`codex plugin add stigmer@stigmer`
|
|
228
|
+
- Cursor: `git clone https://github.com/stigmer/coding-agent-plugin ~/.cursor/plugins/local/stigmer`,
|
|
229
|
+
then Reload Window
|
|
230
|
+
|
|
231
|
+
With it installed, next time they only say "Set up Stigmer for this project",
|
|
232
|
+
or ask for what they want ("add an agent that drafts replies to tickets").
|
|
File without changes
|