@stigmer/coding-agent-plugin 0.0.0-stage → 0.3.0
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/LICENSE +194 -0
- package/README.md +189 -2
- package/index.d.ts +4 -0
- package/index.js +3 -0
- package/package.json +29 -4
- package/plugin/.agents/plugins/marketplace.json +12 -0
- package/plugin/.claude-plugin/marketplace.json +15 -0
- package/plugin/.claude-plugin/plugin.json +29 -0
- package/plugin/.codex-plugin/plugin.json +37 -0
- package/plugin/.cursor-plugin/marketplace.json +13 -0
- package/plugin/.cursor-plugin/plugin.json +22 -0
- package/plugin/.mcp.json +8 -0
- package/plugin/README.md +68 -0
- package/plugin/assets/logo.png +0 -0
- 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 +248 -0
- 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/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Stigmer for coding agents
|
|
2
|
+
|
|
3
|
+
This repository is published from [stigmer/stigmer](https://github.com/stigmer/stigmer)'s
|
|
4
|
+
`coding-agents/` folder at each release; change it there.
|
|
5
|
+
|
|
6
|
+
Stigmer runs AI agents for the users of your own product. This plugin makes your
|
|
7
|
+
coding agent Stigmer's expert, in Claude Code, Codex and Cursor. Ask it in plain
|
|
8
|
+
words, and it:
|
|
9
|
+
|
|
10
|
+
- **answers any question about Stigmer** (what it is, whether it fits, the
|
|
11
|
+
editions, pricing, how it compares) from the live docs at stigmer.ai/docs, and
|
|
12
|
+
links the page it read;
|
|
13
|
+
- **sets Stigmer up for your project**: signing in, an agent for your app's users,
|
|
14
|
+
a first run, and the agent's chat in your own app;
|
|
15
|
+
- **designs and builds agents**: instructions, skills, tools and MCP servers,
|
|
16
|
+
approvals, secrets, channels such as Slack and WhatsApp, routines;
|
|
17
|
+
- **runs, fixes and checks them**: runs an agent on a file in your project, reads
|
|
18
|
+
what a run did and why it failed, answers an approval, scores runs before you
|
|
19
|
+
ship a change;
|
|
20
|
+
- **puts them in your product**: calls from your backend in TypeScript, Python, Go
|
|
21
|
+
or Java, the chat in your React app, one organization per customer, your users'
|
|
22
|
+
sign-in;
|
|
23
|
+
- **runs your own server and organization**: Docker, Compose or Kubernetes, sign-in
|
|
24
|
+
with your identity provider, runners, upgrades, roles, keys for CI, usage.
|
|
25
|
+
|
|
26
|
+
It asks you before anything that can't be undone or is yours to give: deleting an
|
|
27
|
+
agent or skill, cancelling a run, answering a run's approval, or a `stigmer`
|
|
28
|
+
command forced past its own question. It never asks for a key in the chat.
|
|
29
|
+
|
|
30
|
+
## Install
|
|
31
|
+
|
|
32
|
+
It needs the Stigmer command line: `npm install -g @stigmer/cli` (or
|
|
33
|
+
`brew install stigmer/tap/stigmer`), signed in with `stigmer auth login`, or
|
|
34
|
+
`stigmer up` for a local Stigmer.
|
|
35
|
+
|
|
36
|
+
- **Claude Code**: `claude plugin install stigmer --marketplace stigmer/coding-agent-plugin`
|
|
37
|
+
- **Codex**: `codex plugin marketplace add stigmer/coding-agent-plugin`, then
|
|
38
|
+
`codex plugin add stigmer@stigmer`
|
|
39
|
+
- **Cursor**: `git clone https://github.com/stigmer/coding-agent-plugin ~/.cursor/plugins/local/stigmer`,
|
|
40
|
+
then Reload Window
|
|
41
|
+
|
|
42
|
+
You don't need the plugin to start. Paste this into your coding agent:
|
|
43
|
+
|
|
44
|
+
> Set up Stigmer for this project. Install its command line
|
|
45
|
+
> (`npm install -g @stigmer/cli`, or `brew install stigmer/tap/stigmer`), run
|
|
46
|
+
> `stigmer coding-agent`, and follow what it prints.
|
|
47
|
+
|
|
48
|
+
An app with no terminal, such as Claude Desktop, connects to Stigmer Cloud's
|
|
49
|
+
hosted server instead: https://stigmer.ai/docs/guides/editors/connect-mcp
|
|
50
|
+
|
|
51
|
+
## What it runs and what it reaches
|
|
52
|
+
|
|
53
|
+
- **The `stigmer` command line**, which you install. The plugin starts its tool
|
|
54
|
+
server (`stigmer mcp-server`), and your coding agent runs `stigmer` commands.
|
|
55
|
+
Both act on the Stigmer you signed the command line in to: Stigmer Cloud
|
|
56
|
+
(`*.stigmer.ai`), your own server at its own address, or `stigmer up` on your
|
|
57
|
+
machine. They use that sign-in; the plugin holds no credential.
|
|
58
|
+
- **stigmer.ai**, for the docs it reads and cites.
|
|
59
|
+
- **A Node script** (`hooks/guard.mjs`, in Claude Code) that reads the call your
|
|
60
|
+
coding agent is about to make and, for the acts above, asks you first. It reads
|
|
61
|
+
nothing else, writes nothing and reaches no network.
|
|
62
|
+
- **Skills**: Markdown instructions your coding agent reads.
|
|
63
|
+
|
|
64
|
+
Nothing else. The manifest's `network.hosts` names stigmer.ai; your own server's
|
|
65
|
+
address is whatever you signed in to.
|
|
66
|
+
|
|
67
|
+
Docs: https://stigmer.ai/docs/guides/editors/connect-mcp · Privacy:
|
|
68
|
+
https://stigmer.ai/privacy · Issues: https://github.com/stigmer/stigmer/issues
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"hooks": {}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version": 1, "hooks": {}}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
// What the plugin's Claude Code guard (guard.mjs, a PreToolUse hook) decides
|
|
2
|
+
// about one tool call: ask the person first, or say nothing and let Claude
|
|
3
|
+
// Code's own permissions decide.
|
|
4
|
+
//
|
|
5
|
+
// It asks before an act that can't be undone, or that is the person's to
|
|
6
|
+
// give, even when they once chose "always allow" for the plugin's tools:
|
|
7
|
+
//
|
|
8
|
+
// - the plugin's own tool server's destructive tools (every tool marked
|
|
9
|
+
// destructiveHint in @stigmer/mcp-server), named the way Claude Code
|
|
10
|
+
// names a plugin's server's tools, mcp__plugin_<plugin>_<server>__<tool>;
|
|
11
|
+
// - answering a run's approval with allow or allow_all (a deny passes:
|
|
12
|
+
// refusing is always safe), by the tool or by `stigmer runs approve`;
|
|
13
|
+
// - a `stigmer` command whose --force skips the CLI's own confirmation or
|
|
14
|
+
// overwrites files. A plain `stigmer delete` passes: without a terminal
|
|
15
|
+
// the CLI's own question aborts it. `-f` is matched only on those
|
|
16
|
+
// commands, since it means --file on `apply` and --follow on `logs`.
|
|
17
|
+
//
|
|
18
|
+
// Both lists are held by tests against their sources (the tool server's
|
|
19
|
+
// roster, the CLI's command tree), so a new destructive tool or forced
|
|
20
|
+
// command can't ship unguarded. The reason is written for two readers: the
|
|
21
|
+
// person, who sees it in the prompt, and the agent, which reads it in the
|
|
22
|
+
// tool result when no one is there to answer (a `claude -p` run denies an
|
|
23
|
+
// `ask` and hands the agent the reason).
|
|
24
|
+
//
|
|
25
|
+
// Pure, and dependency-free: the plugin installs from GitHub with no
|
|
26
|
+
// node_modules.
|
|
27
|
+
|
|
28
|
+
/** The tool server's destructive tools, as the hook's matcher names them. */
|
|
29
|
+
export const DESTRUCTIVE_TOOLS = ["delete_agent", "delete_skill", "cancel_run"];
|
|
30
|
+
|
|
31
|
+
/** The tool that answers a run's approval. */
|
|
32
|
+
export const APPROVAL_TOOL = "submit_run_approval";
|
|
33
|
+
|
|
34
|
+
/** How Claude Code names this plugin's server's tools. */
|
|
35
|
+
export const TOOL_PREFIX = "mcp__plugin_stigmer_stigmer__";
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The CLI commands whose force flag skips a confirmation or overwrites,
|
|
39
|
+
* each with the flags that mean force on it.
|
|
40
|
+
*/
|
|
41
|
+
export const FORCE_COMMANDS = [
|
|
42
|
+
{ path: ["delete"], flags: ["-f", "--force"] },
|
|
43
|
+
{ path: ["provider-key", "delete"], flags: ["-f", "--force"] },
|
|
44
|
+
{ path: ["service-account", "delete"], flags: ["-f", "--force"] },
|
|
45
|
+
{ path: ["vault", "remove-secret"], flags: ["-f", "--force"] },
|
|
46
|
+
{ path: ["vault", "remove-connection"], flags: ["-f", "--force"] },
|
|
47
|
+
{ path: ["reset"], flags: ["--force"] },
|
|
48
|
+
{ path: ["example", "get"], flags: ["-f", "--force"] },
|
|
49
|
+
{ path: ["app-handover"], flags: ["-f", "--force"] },
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
/** The CLI command that answers a run's approval, and its flag naming the answer. */
|
|
53
|
+
export const APPROVE_COMMAND = { path: ["runs", "approve"], flag: "--action" };
|
|
54
|
+
|
|
55
|
+
/** Global options that take a value, so the value is never read as a command word. */
|
|
56
|
+
const VALUE_GLOBALS = new Set(["--org", "--api-key"]);
|
|
57
|
+
|
|
58
|
+
const AGENT_LINE = "If the person hasn't approved exactly this in the conversation, stop and ask them first.";
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The hook's answer to one PreToolUse input: an `ask` with its reason, or
|
|
62
|
+
* `null` to say nothing. Never throws.
|
|
63
|
+
*/
|
|
64
|
+
export function decide(input) {
|
|
65
|
+
try {
|
|
66
|
+
if (input === null || typeof input !== "object") return null;
|
|
67
|
+
const tool = typeof input.tool_name === "string" ? input.tool_name : "";
|
|
68
|
+
const args = input.tool_input !== null && typeof input.tool_input === "object" ? input.tool_input : {};
|
|
69
|
+
if (tool === "Bash") {
|
|
70
|
+
const command = typeof args.command === "string" ? args.command : "";
|
|
71
|
+
const reason = shellReason(command);
|
|
72
|
+
return reason === null ? null : ask(reason);
|
|
73
|
+
}
|
|
74
|
+
if (!tool.startsWith(TOOL_PREFIX)) return null;
|
|
75
|
+
const reason = toolReason(tool.slice(TOOL_PREFIX.length), args);
|
|
76
|
+
return reason === null ? null : ask(reason);
|
|
77
|
+
} catch {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function ask(reason) {
|
|
83
|
+
return {
|
|
84
|
+
hookSpecificOutput: {
|
|
85
|
+
hookEventName: "PreToolUse",
|
|
86
|
+
permissionDecision: "ask",
|
|
87
|
+
permissionDecisionReason: `${reason} ${AGENT_LINE}`,
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function text(value) {
|
|
93
|
+
return typeof value === "string" && value !== "" ? value : "?";
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function named(args) {
|
|
97
|
+
const org = typeof args.org === "string" && args.org !== "" ? `${args.org}/` : "";
|
|
98
|
+
return `${org}${text(args.slug)}`;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** The reason to ask before one of the tool server's tools, or null. */
|
|
102
|
+
function toolReason(name, args) {
|
|
103
|
+
switch (name) {
|
|
104
|
+
case "delete_agent":
|
|
105
|
+
return `Stigmer: this deletes the agent ${named(args)} and every version of it. It can't be undone.`;
|
|
106
|
+
case "delete_skill":
|
|
107
|
+
return `Stigmer: this deletes the skill ${named(args)} and every version of it. It can't be undone.`;
|
|
108
|
+
case "cancel_run":
|
|
109
|
+
return `Stigmer: this cancels run ${text(args.run_id)}: every unfinished turn of its conversation stops, and can't be resumed.`;
|
|
110
|
+
case APPROVAL_TOOL: {
|
|
111
|
+
const decision = args.decision;
|
|
112
|
+
if (decision !== "allow" && decision !== "allow_all") return null;
|
|
113
|
+
return `Stigmer: this answers run ${text(args.run_id)}'s approval with "${decision}", and the run then goes ahead. An approval is the person's to give.`;
|
|
114
|
+
}
|
|
115
|
+
default:
|
|
116
|
+
return DESTRUCTIVE_TOOLS.includes(name) ? `Stigmer: ${name} can't be undone.` : null;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** The reason to ask before a shell line, or null: the first `stigmer` command in it that needs asking. */
|
|
121
|
+
export function shellReason(line) {
|
|
122
|
+
for (const words of commands(line)) {
|
|
123
|
+
const at = words.findIndex(isStigmer);
|
|
124
|
+
if (at === -1) continue;
|
|
125
|
+
const rest = words.slice(at + 1);
|
|
126
|
+
const path = commandWords(rest);
|
|
127
|
+
const shown = words.slice(at).join(" ");
|
|
128
|
+
const forced = FORCE_COMMANDS.find((entry) => startsWith(path, entry.path));
|
|
129
|
+
if (forced !== undefined && rest.some((word) => isForceFlag(word, forced.flags))) {
|
|
130
|
+
return `Stigmer: \`${shown}\` skips the CLI's own question with --force, and what it deletes or overwrites can't be undone.`;
|
|
131
|
+
}
|
|
132
|
+
if (startsWith(path, APPROVE_COMMAND.path)) {
|
|
133
|
+
const answer = optionValue(rest, APPROVE_COMMAND.flag) ?? "allow";
|
|
134
|
+
if (answer !== "deny") {
|
|
135
|
+
return `Stigmer: \`${shown}\` answers a run's approval with "${answer}", and the run then goes ahead. An approval is the person's to give.`;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/** Whether a word runs the stigmer CLI: `stigmer`, a path to it, or the npm package. */
|
|
143
|
+
function isStigmer(word) {
|
|
144
|
+
const base = word.split("/").pop() ?? "";
|
|
145
|
+
return base === "stigmer" || base === "stigmer.exe" || /^@stigmer\/cli(@.*)?$/.test(word);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** The command words after `stigmer`: every word that is not a flag or a global flag's value. */
|
|
149
|
+
function commandWords(rest) {
|
|
150
|
+
const words = [];
|
|
151
|
+
for (let i = 0; i < rest.length; i += 1) {
|
|
152
|
+
const word = rest[i];
|
|
153
|
+
if (word === "--") break;
|
|
154
|
+
if (word.startsWith("-")) {
|
|
155
|
+
if (VALUE_GLOBALS.has(word)) i += 1;
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
words.push(word);
|
|
159
|
+
}
|
|
160
|
+
return words;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function startsWith(words, prefix) {
|
|
164
|
+
return prefix.every((word, i) => words[i] === word);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function isForceFlag(word, flags) {
|
|
168
|
+
if (flags.includes(word)) return true;
|
|
169
|
+
if (flags.includes("--force") && word.startsWith("--force=")) return word !== "--force=false";
|
|
170
|
+
// A cluster of short flags (`-yf`) carries -f too.
|
|
171
|
+
return flags.includes("-f") && /^-[A-Za-z]{2,}$/.test(word) && word.includes("f");
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function optionValue(words, flag) {
|
|
175
|
+
for (let i = 0; i < words.length; i += 1) {
|
|
176
|
+
if (words[i] === flag) return words[i + 1];
|
|
177
|
+
if (words[i].startsWith(`${flag}=`)) return words[i].slice(flag.length + 1);
|
|
178
|
+
}
|
|
179
|
+
return undefined;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* A shell line's simple commands, each as its words: split at `;`, `&`,
|
|
184
|
+
* `|`, `&&`, `||`, newlines and parentheses outside quotes, with quotes
|
|
185
|
+
* removed. Leading `VAR=value` assignments are dropped. Not a full shell
|
|
186
|
+
* parser: a line it misreads at worst asks once more than it needs to.
|
|
187
|
+
*/
|
|
188
|
+
export function commands(line) {
|
|
189
|
+
const out = [];
|
|
190
|
+
let words = [];
|
|
191
|
+
let word = "";
|
|
192
|
+
let inWord = false;
|
|
193
|
+
let quote = "";
|
|
194
|
+
const endWord = () => {
|
|
195
|
+
if (inWord) words.push(word);
|
|
196
|
+
word = "";
|
|
197
|
+
inWord = false;
|
|
198
|
+
};
|
|
199
|
+
const endCommand = () => {
|
|
200
|
+
endWord();
|
|
201
|
+
const start = words.findIndex((w) => !/^[A-Za-z_][A-Za-z0-9_]*=/.test(w));
|
|
202
|
+
if (start !== -1) out.push(words.slice(start));
|
|
203
|
+
words = [];
|
|
204
|
+
};
|
|
205
|
+
for (let i = 0; i < line.length; i += 1) {
|
|
206
|
+
const c = line[i];
|
|
207
|
+
if (quote !== "") {
|
|
208
|
+
if (c === quote) quote = "";
|
|
209
|
+
else if (c === "\\" && quote === '"' && i + 1 < line.length) word += line[++i];
|
|
210
|
+
else word += c;
|
|
211
|
+
continue;
|
|
212
|
+
}
|
|
213
|
+
if (c === "'" || c === '"') {
|
|
214
|
+
quote = c;
|
|
215
|
+
inWord = true;
|
|
216
|
+
} else if (c === "\\" && i + 1 < line.length) {
|
|
217
|
+
word += line[++i];
|
|
218
|
+
inWord = true;
|
|
219
|
+
} else if (c === " " || c === "\t") {
|
|
220
|
+
endWord();
|
|
221
|
+
} else if (c === ";" || c === "&" || c === "|" || c === "\n" || c === "(" || c === ")") {
|
|
222
|
+
endCommand();
|
|
223
|
+
} else {
|
|
224
|
+
word += c;
|
|
225
|
+
inWord = true;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
endCommand();
|
|
229
|
+
return out;
|
|
230
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Claude Code's PreToolUse hook for Stigmer's plugin: reads the call from
|
|
2
|
+
// stdin and prints decide()'s answer (decide.mjs). It fails open: on any
|
|
3
|
+
// error of its own it prints nothing and exits 0, never 2, which Claude Code
|
|
4
|
+
// would read as a block.
|
|
5
|
+
import { decide } from "./decide.mjs";
|
|
6
|
+
|
|
7
|
+
/* v8 ignore start -- @preserve: Claude Code's entry, which __tests__/guard.test.ts runs in a child process that this suite's coverage can't see */
|
|
8
|
+
let input = "";
|
|
9
|
+
process.stdin.setEncoding("utf8");
|
|
10
|
+
process.stdin.on("data", (chunk) => (input += chunk));
|
|
11
|
+
process.stdin.on("end", () => {
|
|
12
|
+
try {
|
|
13
|
+
const answer = decide(JSON.parse(input));
|
|
14
|
+
if (answer !== null) process.stdout.write(`${JSON.stringify(answer)}\n`);
|
|
15
|
+
} catch {
|
|
16
|
+
// Fail open: Claude Code's own permissions still decide.
|
|
17
|
+
}
|
|
18
|
+
process.exitCode = 0;
|
|
19
|
+
});
|
|
20
|
+
/* v8 ignore stop */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Stigmer asks the person before an act that can't be undone or is theirs to give: deleting an agent or skill, cancelling a run, answering a run's approval, or a stigmer command forced past its own question.",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"PreToolUse": [
|
|
5
|
+
{
|
|
6
|
+
"matcher": "^mcp__plugin_stigmer_stigmer__(delete_agent|delete_skill|cancel_run|submit_run_approval)$",
|
|
7
|
+
"hooks": [{ "type": "command", "command": "node", "args": ["${CLAUDE_PLUGIN_ROOT}/hooks/guard.mjs"] }]
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"matcher": "Bash",
|
|
11
|
+
"hooks": [{ "type": "command", "if": "Bash(stigmer *)", "command": "node", "args": ["${CLAUDE_PLUGIN_ROOT}/hooks/guard.mjs"] }]
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stigmer
|
|
3
|
+
description: >
|
|
4
|
+
Stigmer's front door: answers any question about Stigmer from its live
|
|
5
|
+
docs, cited, and holds the rules for acting on Stigmer for the person. Use whenever the person asks what Stigmer is,
|
|
6
|
+
whether it fits, its editions, pricing and who pays the model bill, how
|
|
7
|
+
an Agent, Session, File, Vault, Skill, plugin, tool, approval, Channel,
|
|
8
|
+
Routine, Organization or runner works, how Stigmer compares with an
|
|
9
|
+
agent SDK or Claude Managed Agents, how to do something with the CLI or
|
|
10
|
+
SDKs, or why something fails or hangs; and before deleting, cancelling
|
|
11
|
+
or approving anything in their Stigmer. To set Stigmer up here, use
|
|
12
|
+
stigmer-setup; to run their agents or read runs, stigmer-run; to put
|
|
13
|
+
their agent in their product (backend calls, the chat, their users'
|
|
14
|
+
sign-in), stigmer-integrate; to design an agent or connect it to people
|
|
15
|
+
(keys, tools, approvals, Slack, WhatsApp, routines), stigmer-build; to
|
|
16
|
+
run their own server or organization (sign-in, runners, upgrades, roles,
|
|
17
|
+
CI keys, access history, usage), stigmer-operate.
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Stigmer
|
|
21
|
+
|
|
22
|
+
You are the person's guide to Stigmer inside their own coding agent. Be
|
|
23
|
+
their fastest path to a correct, verifiable answer: read from the live
|
|
24
|
+
documentation, cited, true for the Stigmer they have installed, and honest
|
|
25
|
+
about what the docs don't cover.
|
|
26
|
+
|
|
27
|
+
## How to answer
|
|
28
|
+
|
|
29
|
+
1. **Read the live page before answering anything specific.** Steps,
|
|
30
|
+
editions and prices, YAML fields, CLI flags, SDK calls, limits, error
|
|
31
|
+
causes: find the page and answer from what it says today (see "Reading
|
|
32
|
+
the live docs"). Never answer from memory, and never from the
|
|
33
|
+
repository's source, issues or pull requests: the docs are what a
|
|
34
|
+
person can rely on.
|
|
35
|
+
2. **Read each page whole.** The fact that decides an answer is often
|
|
36
|
+
past the first screen. Never cut a page short with `head`, `cut` or a
|
|
37
|
+
grep before you have read it.
|
|
38
|
+
3. **Cite the page** as a full `https://stigmer.ai/docs/...` URL, so the
|
|
39
|
+
person can check it and go deeper. Never cite a GitHub link to the
|
|
40
|
+
docs' source, an issue or a pull request in its place.
|
|
41
|
+
4. **Lead with the direct answer**, in plain words, then the commands or
|
|
42
|
+
fields the person needs to act, checked against what they have
|
|
43
|
+
installed (see "Which version"). When comparing Stigmer with something
|
|
44
|
+
else, first say in a sentence what each one is. When you suggest a
|
|
45
|
+
setting that turns a safety step off (approving every call, `--force`),
|
|
46
|
+
say what it skips. When the person asks why something fails, waits or
|
|
47
|
+
hangs, give the cause the page gives before the fix.
|
|
48
|
+
5. **Never invent product behaviour.** If the docs don't answer it, say so,
|
|
49
|
+
answer the part you can, and point to the issue tracker (below).
|
|
50
|
+
6. **Point to the next step**: the page or command that takes the person
|
|
51
|
+
further, or the setup skill when they want to start.
|
|
52
|
+
|
|
53
|
+
## Which skill for which job
|
|
54
|
+
|
|
55
|
+
- Questions about Stigmer, and acting on their Stigmer agents and skills:
|
|
56
|
+
this skill.
|
|
57
|
+
- Setting Stigmer up in this project, from signing in to the agent's chat
|
|
58
|
+
in their own app: the stigmer-setup skill. Load it when the person wants
|
|
59
|
+
to start.
|
|
60
|
+
- Running their agents and reading their runs (an agent on a file, the last
|
|
61
|
+
run, its output files, why it failed, approvals, follow-ups, scores and
|
|
62
|
+
evals): the stigmer-run skill.
|
|
63
|
+
- Putting their agent in their own product, whatever the stack (calling it
|
|
64
|
+
from their backend, streaming its reply, the chat in their app and its
|
|
65
|
+
look, their users' sign-in, an organization per customer, approvals in
|
|
66
|
+
their own screens, moving from Claude Managed Agents): the
|
|
67
|
+
stigmer-integrate skill.
|
|
68
|
+
- Designing or changing an agent (where its keys go, its MCP servers and
|
|
69
|
+
which tools it may use, what waits for a person's yes, the packages and
|
|
70
|
+
network of its sandbox, their own skills and plugins) and connecting it
|
|
71
|
+
to people (a chat link, Slack, WhatsApp, staff taking over, a routine on
|
|
72
|
+
a schedule or started by another system): the stigmer-build skill. How
|
|
73
|
+
these pieces work, asked as a question, stays here.
|
|
74
|
+
- Running their own Stigmer server or administering their organization
|
|
75
|
+
(the shape to run, turning sign-in on with their provider, runners and
|
|
76
|
+
tracing, upgrades and backups, who may run or change which agent, a key
|
|
77
|
+
for CI, the access history, agent hours and the plan's limits): the
|
|
78
|
+
stigmer-operate skill.
|
|
79
|
+
|
|
80
|
+
## What Stigmer is
|
|
81
|
+
|
|
82
|
+
Every Stigmer page describes Stigmer in the same words. Use them, close to
|
|
83
|
+
verbatim, whenever someone asks what Stigmer is or who it is for:
|
|
84
|
+
|
|
85
|
+
> Stigmer is the open-source backend for the agents in your product. It runs behind your app, the way your database does.
|
|
86
|
+
|
|
87
|
+
**Who it is for**: the developer adding agents to their product. They already
|
|
88
|
+
ship a product with customers, they want each customer to get an agent that
|
|
89
|
+
does real work inside that product, and they don't want to build the
|
|
90
|
+
machinery that runs it.
|
|
91
|
+
|
|
92
|
+
**What each customer's agent has**, in this order:
|
|
93
|
+
|
|
94
|
+
- its own computer, a sandbox that keeps its files between turns;
|
|
95
|
+
- it works on a job for hours, not one request;
|
|
96
|
+
- it asks before acting on anything the developer marks as needing a yes;
|
|
97
|
+
- each customer's agents, files and keys stay apart from every other
|
|
98
|
+
customer's. On the editions that include it, each customer gets an
|
|
99
|
+
Organization of their own
|
|
100
|
+
(https://stigmer.ai/docs/getting-started/one-organization-per-customer); on
|
|
101
|
+
the open-source server, each customer's keys live in a vault of their own
|
|
102
|
+
(https://stigmer.ai/docs/guides/authentication/customer-keys);
|
|
103
|
+
- it runs on the developer's own model keys, on their servers (open source,
|
|
104
|
+
Apache 2.0) or on Stigmer Cloud.
|
|
105
|
+
|
|
106
|
+
**An example** is a job done inside a customer's product: an accounting
|
|
107
|
+
product's customer uploads a ledger, and the agent works through it and hands
|
|
108
|
+
back a variance report as a file.
|
|
109
|
+
|
|
110
|
+
**Never** call Stigmer an "agent platform" or "agent infrastructure", give a
|
|
111
|
+
coding example (reviewing pull requests, writing code), or use hype
|
|
112
|
+
("revolutionary", "seamless", "unlock"). Stigmer is not
|
|
113
|
+
a coding agent: that is Claude Code's, Cursor's and Codex's world, and the
|
|
114
|
+
plugins built for them still work in Stigmer.
|
|
115
|
+
|
|
116
|
+
**Compared with Claude Managed Agents**, say what each does and never run
|
|
117
|
+
either down: Managed Agents is Anthropic's hosted agent harness, where
|
|
118
|
+
Anthropic runs the agents, on Claude, and their sandboxes too unless the
|
|
119
|
+
developer hosts those themselves. Stigmer is open
|
|
120
|
+
source, runs on the developer's servers or on Stigmer Cloud, runs on their
|
|
121
|
+
own model keys, and gives each of their customers their own Organization on
|
|
122
|
+
the editions that include it. Agents, Environments, Sessions and their events
|
|
123
|
+
carry the same names in both. Link the mapping,
|
|
124
|
+
https://stigmer.ai/docs/concepts/coming-from-claude-managed-agents, or the
|
|
125
|
+
side-by-side comparison, https://stigmer.ai/compare/claude-managed-agents.
|
|
126
|
+
|
|
127
|
+
## Map of the documentation
|
|
128
|
+
|
|
129
|
+
The sidebar follows the order a developer meets the pieces in. Stable anchor
|
|
130
|
+
pages, by group:
|
|
131
|
+
|
|
132
|
+
**Get started** — what Stigmer is, and one job from the terminal to your
|
|
133
|
+
product.
|
|
134
|
+
- What is Stigmer: https://stigmer.ai/docs/concepts/what-is-stigmer
|
|
135
|
+
- Your first agent job: https://stigmer.ai/docs/getting-started/quickstart
|
|
136
|
+
- Do the same job from your app: https://stigmer.ai/docs/getting-started/call-from-your-app
|
|
137
|
+
- Put the agent in your app: https://stigmer.ai/docs/getting-started/embed-agent
|
|
138
|
+
- One organization per customer: https://stigmer.ai/docs/getting-started/one-organization-per-customer
|
|
139
|
+
- Run it on your servers: https://stigmer.ai/docs/guides/self-hosting/overview
|
|
140
|
+
- Coming from Claude Managed Agents: https://stigmer.ai/docs/concepts/coming-from-claude-managed-agents
|
|
141
|
+
|
|
142
|
+
**How it works** — the job, its computer, the work and its keys.
|
|
143
|
+
- Agents: https://stigmer.ai/docs/concepts/agents
|
|
144
|
+
- Environments: https://stigmer.ai/docs/concepts/environments
|
|
145
|
+
- Sessions: https://stigmer.ai/docs/concepts/sessions
|
|
146
|
+
- Files: https://stigmer.ai/docs/concepts/files
|
|
147
|
+
- Vaults: https://stigmer.ai/docs/concepts/vaults
|
|
148
|
+
- Model provider keys: https://stigmer.ai/docs/guides/integrations/model-provider-keys
|
|
149
|
+
|
|
150
|
+
**What an agent can do** — what it knows, its tools, and where it asks first.
|
|
151
|
+
- Skills: https://stigmer.ai/docs/concepts/skills
|
|
152
|
+
- Plugins: https://stigmer.ai/docs/concepts/plugins
|
|
153
|
+
- Tools: https://stigmer.ai/docs/concepts/tools
|
|
154
|
+
- Integrations & marketplace: https://stigmer.ai/docs/guides/integrations/overview
|
|
155
|
+
- Your AI tools (Claude Code, Codex, Cursor, Claude Desktop): https://stigmer.ai/docs/guides/editors/connect-mcp
|
|
156
|
+
- Approval flows: https://stigmer.ai/docs/concepts/approval-flows
|
|
157
|
+
- Scores and evals: https://stigmer.ai/docs/concepts/scores,
|
|
158
|
+
https://stigmer.ai/docs/guides/evals/test-with-evals
|
|
159
|
+
|
|
160
|
+
**Reach an agent** — channels, routines and your own code.
|
|
161
|
+
- Channels (chat link, embed, Slack, WhatsApp): https://stigmer.ai/docs/concepts/channels,
|
|
162
|
+
then https://stigmer.ai/docs/guides/channels/create-a-chat-link,
|
|
163
|
+
https://stigmer.ai/docs/guides/channels/embed-an-agent,
|
|
164
|
+
https://stigmer.ai/docs/guides/channels/connect-slack
|
|
165
|
+
and https://stigmer.ai/docs/guides/channels/connect-whatsapp
|
|
166
|
+
- Routines: https://stigmer.ai/docs/concepts/routines
|
|
167
|
+
- From your app: https://stigmer.ai/docs/getting-started/call-from-your-app
|
|
168
|
+
|
|
169
|
+
**Access and organizations** — who may use what.
|
|
170
|
+
- Sharing and access: https://stigmer.ai/docs/concepts/sharing-and-access
|
|
171
|
+
- Organizations: https://stigmer.ai/docs/concepts/organizations
|
|
172
|
+
- Identity: https://stigmer.ai/docs/concepts/identity
|
|
173
|
+
- Authentication & federation: https://stigmer.ai/docs/guides/authentication/overview
|
|
174
|
+
|
|
175
|
+
**Editions and running it** — open source, Enterprise and Cloud, and where a
|
|
176
|
+
run executes.
|
|
177
|
+
- Editions: https://stigmer.ai/docs/guides/self-hosting/cloud-vs-self-hosted
|
|
178
|
+
- Billing: https://stigmer.ai/docs/concepts/billing
|
|
179
|
+
- Runners: https://stigmer.ai/docs/concepts/runners
|
|
180
|
+
- Harnesses: https://stigmer.ai/docs/concepts/harnesses
|
|
181
|
+
- Self-hosting: https://stigmer.ai/docs/guides/self-hosting/overview
|
|
182
|
+
|
|
183
|
+
**Reference** — lookup material.
|
|
184
|
+
- SDKs (TypeScript, React, Ink, Theme, Go, Python, Java): https://stigmer.ai/docs/sdk
|
|
185
|
+
- CLI (`stigmer` command reference): https://stigmer.ai/docs/cli
|
|
186
|
+
|
|
187
|
+
## Reading the live docs
|
|
188
|
+
|
|
189
|
+
Read the pages with the Stigmer command line, so nothing is summarised
|
|
190
|
+
away:
|
|
191
|
+
|
|
192
|
+
- **Find the page**: `stigmer docs search <words>` lists the pages that
|
|
193
|
+
match, best first, each with its URL and one line about it.
|
|
194
|
+
- **Read the page**: `stigmer docs read <page>` prints it whole, as
|
|
195
|
+
Markdown, opening with its `Source:` URL; `<page>` is its path after
|
|
196
|
+
`/docs/` (`concepts/tools`) or its full URL.
|
|
197
|
+
- With the Stigmer tools but no shell, `search_docs` and `read_doc` do the
|
|
198
|
+
same.
|
|
199
|
+
- When `stigmer docs` can't run (a CLI older than it answers "unknown
|
|
200
|
+
command") or can't reach stigmer.ai, read the same files with curl.
|
|
201
|
+
Behind a proxy, `NODE_USE_ENV_PROXY=1` makes the CLI use it too.
|
|
202
|
+
`curl -s https://stigmer.ai/llms.txt` is the index of every page with one
|
|
203
|
+
line about it; every page has a Markdown export at its URL plus `.md`, as
|
|
204
|
+
in `curl -s https://stigmer.ai/docs/concepts/tools.md` (the docs' front
|
|
205
|
+
page's is `https://stigmer.ai/docs/index.md`). Prefer either over
|
|
206
|
+
WebFetch, which hands back a summary, not the page.
|
|
207
|
+
- Two or three pages answer most questions; read more when the question
|
|
208
|
+
spans several. A question comparing Stigmer with an agent SDK or with
|
|
209
|
+
Claude Managed Agents reads the harnesses page
|
|
210
|
+
(https://stigmer.ai/docs/concepts/harnesses) as well as the comparison,
|
|
211
|
+
and says which of Stigmer's harnesses runs on that thing, on whose key.
|
|
212
|
+
|
|
213
|
+
## Which version
|
|
214
|
+
|
|
215
|
+
The docs follow Stigmer's main branch, so a page can describe what the
|
|
216
|
+
person's CLI or server doesn't have yet. When the answer depends on it:
|
|
217
|
+
|
|
218
|
+
- **A command, flag or field**: run the command with `--help` first. What
|
|
219
|
+
is installed wins for syntax.
|
|
220
|
+
- **When the page names something the installed help lacks**, say the
|
|
221
|
+
person's CLI is older than the docs or the feature is unreleased, and
|
|
222
|
+
give the upgrade line once, for however they installed it:
|
|
223
|
+
`brew upgrade stigmer/tap/stigmer` or
|
|
224
|
+
`npm install -g @stigmer/cli@latest`. `stigmer version` prints the
|
|
225
|
+
installed version.
|
|
226
|
+
- **A feature or an edition of the server**: `stigmer auth whoami` names
|
|
227
|
+
the server's version and edition on its `Server` line. Say when the
|
|
228
|
+
answer needs a newer server, or another edition.
|
|
229
|
+
|
|
230
|
+
Don't run these before a question that doesn't depend on them.
|
|
231
|
+
|
|
232
|
+
## Safety: acting on Stigmer for a person
|
|
233
|
+
|
|
234
|
+
- Reads run freely: search, get, list, and reading the docs.
|
|
235
|
+
- Deleting, overwriting, cancelling a run, a key, someone's access, or spending money the person didn't ask to spend: propose it first.
|
|
236
|
+
Name exactly what would go or change (each agent, skill or run by name, and that an agent or skill goes with every version of it), say when it can't be undone, and act only after the person says yes in this conversation.
|
|
237
|
+
"Delete everything" is a request to list what would go, not a yes.
|
|
238
|
+
- Put `-f`/`--force` on a `stigmer` command only when the person approved that exact command.
|
|
239
|
+
- A run's approval is the person's to give: answer `allow` or `allow_all` only when they said so, for that call.
|
|
240
|
+
- A key never passes through you or this chat. The person enters it where the CLI or the console asks for it.
|
|
241
|
+
- When a guard stops a call, say what was about to happen and why it stopped, then ask; never work around it.
|
|
242
|
+
|
|
243
|
+
## When the answer isn't in the docs
|
|
244
|
+
|
|
245
|
+
If neither this skill nor the live docs answer the question — or the reader
|
|
246
|
+
reports what looks like a bug or a documentation gap — say so plainly and
|
|
247
|
+
point them to the issue tracker at https://github.com/stigmer/stigmer/issues
|
|
248
|
+
so a human can pick it up. Do not speculate about undocumented behavior.
|