@crouton-kit/crouter 0.2.5 → 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/dist/builtin-skills/skills/crouter-development/marketplaces/SKILL.md +9 -9
- package/dist/builtin-skills/skills/crouter-development/plugins/SKILL.md +19 -19
- package/dist/cli.js +42 -37
- package/dist/commands/__tests__/human.test.d.ts +1 -0
- package/dist/commands/__tests__/human.test.js +214 -0
- package/dist/commands/__tests__/skill.test.d.ts +1 -0
- package/dist/commands/__tests__/skill.test.js +287 -0
- package/dist/commands/debug.d.ts +3 -0
- package/dist/commands/debug.js +179 -0
- package/dist/commands/flow.d.ts +2 -0
- package/dist/commands/flow.js +24 -0
- package/dist/commands/human.d.ts +2 -0
- package/dist/commands/human.js +480 -0
- package/dist/commands/job.d.ts +2 -0
- package/dist/commands/job.js +669 -0
- package/dist/commands/pkg.d.ts +2 -0
- package/dist/commands/pkg.js +1021 -0
- package/dist/commands/plan.d.ts +4 -2
- package/dist/commands/plan.js +306 -22
- package/dist/commands/skill.d.ts +2 -2
- package/dist/commands/skill.js +615 -459
- package/dist/commands/spec.d.ts +3 -2
- package/dist/commands/spec.js +283 -10
- package/dist/commands/sys.d.ts +2 -0
- package/dist/commands/sys.js +712 -0
- package/dist/core/__tests__/argv-parser.test.d.ts +1 -0
- package/dist/core/__tests__/argv-parser.test.js +199 -0
- package/dist/core/__tests__/flow-leaves.test.d.ts +1 -0
- package/dist/core/__tests__/flow-leaves.test.js +248 -0
- package/dist/core/__tests__/job.test.d.ts +1 -0
- package/dist/core/__tests__/job.test.js +346 -0
- package/dist/core/__tests__/pkg.test.d.ts +1 -0
- package/dist/core/__tests__/pkg.test.js +218 -0
- package/dist/core/__tests__/sys.test.d.ts +1 -0
- package/dist/core/__tests__/sys.test.js +208 -0
- package/dist/core/artifact.d.ts +29 -18
- package/dist/core/artifact.js +78 -221
- package/dist/core/auto-update.js +11 -3
- package/dist/core/command.d.ts +36 -0
- package/dist/core/command.js +287 -0
- package/dist/core/errors.d.ts +3 -0
- package/dist/core/errors.js +5 -0
- package/dist/core/fs-utils.d.ts +1 -0
- package/dist/core/fs-utils.js +4 -0
- package/dist/core/help.d.ts +98 -0
- package/dist/core/help.js +163 -0
- package/dist/core/io.d.ts +29 -0
- package/dist/core/io.js +83 -0
- package/dist/core/jobs.d.ts +87 -0
- package/dist/core/jobs.js +353 -0
- package/dist/core/pagination.d.ts +33 -0
- package/dist/core/pagination.js +89 -0
- package/dist/core/self-update.d.ts +21 -0
- package/dist/{commands/update.js → core/self-update.js} +28 -63
- package/dist/core/spawn.d.ts +47 -65
- package/dist/core/spawn.js +78 -228
- package/dist/prompts/agent.d.ts +10 -5
- package/dist/prompts/agent.js +51 -74
- package/dist/prompts/debug.d.ts +8 -0
- package/dist/prompts/debug.js +37 -0
- package/dist/prompts/review.js +4 -11
- package/dist/prompts/skill.d.ts +0 -1
- package/dist/prompts/skill.js +95 -149
- package/package.json +4 -2
- package/dist/commands/agent.d.ts +0 -2
- package/dist/commands/agent.js +0 -265
- package/dist/commands/config.d.ts +0 -2
- package/dist/commands/config.js +0 -146
- package/dist/commands/doctor.d.ts +0 -2
- package/dist/commands/doctor.js +0 -268
- package/dist/commands/marketplace.d.ts +0 -2
- package/dist/commands/marketplace.js +0 -365
- package/dist/commands/plugin.d.ts +0 -2
- package/dist/commands/plugin.js +0 -367
- package/dist/commands/update.d.ts +0 -4
- package/dist/prompts/plan.d.ts +0 -1
- package/dist/prompts/plan.js +0 -175
- package/dist/prompts/spec.d.ts +0 -1
- package/dist/prompts/spec.js +0 -153
package/dist/prompts/skill.js
CHANGED
|
@@ -1,108 +1,3 @@
|
|
|
1
|
-
export function skillPrompt() {
|
|
2
|
-
return `# Skills — durable agent memory
|
|
3
|
-
|
|
4
|
-
Skills are markdown the agent loads on demand. **Audience: future LLM agent
|
|
5
|
-
sessions, not humans.** Write for the model: terse, decision-first, dense.
|
|
6
|
-
The CLI is the index — \`crtr skill list/search/grep\` discovers what's saved.
|
|
7
|
-
|
|
8
|
-
## Route by intent
|
|
9
|
-
|
|
10
|
-
If a query follows this prompt, route based on it. Run the suggested command
|
|
11
|
-
first, then act on its output.
|
|
12
|
-
|
|
13
|
-
- **Capture** ("save", "remember", "build context for", "make a skill"):
|
|
14
|
-
\`crtr skill create [topic]\` — picks template, hints next command.
|
|
15
|
-
- **Find** ("what do we have on X", "skill for Y"):
|
|
16
|
-
\`crtr skill search <query>\` → \`crtr skill show <name>\` on best hit.
|
|
17
|
-
- **Load by name** ("show me X"): \`crtr skill show <name>\`.
|
|
18
|
-
- **List all**: \`crtr skill list\`.
|
|
19
|
-
- **No intent given / query empty**: ask the user what they want before running.
|
|
20
|
-
|
|
21
|
-
Don't load \`create\` and \`template\` outputs in the same turn — \`create\` decides
|
|
22
|
-
the type, then call \`template\`.
|
|
23
|
-
|
|
24
|
-
Locations (resolution order):
|
|
25
|
-
1. **Scope-direct** \`<scope-root>/skills/<name>/SKILL.md\` → \`user:<name>\` / \`project:<name>\`
|
|
26
|
-
2. **Plugin skills** \`<plugin>/skills/<name>/SKILL.md\` → \`<scope>:<plugin>/<name>\`
|
|
27
|
-
3. Project > user; non-marketplace plugins > marketplace.
|
|
28
|
-
|
|
29
|
-
Ambiguous names exit \`4\` — disambiguate with \`<plugin>:<name>\` or \`_:<name>\`.
|
|
30
|
-
|
|
31
|
-
## Discover
|
|
32
|
-
|
|
33
|
-
\`\`\`
|
|
34
|
-
crtr skill list # <qualifier> — <description>
|
|
35
|
-
crtr skill search <query> # ranked by name/description/keywords
|
|
36
|
-
crtr skill grep <pattern> # regex across SKILL.md bodies
|
|
37
|
-
\`\`\`
|
|
38
|
-
|
|
39
|
-
## Load
|
|
40
|
-
|
|
41
|
-
\`\`\`
|
|
42
|
-
crtr skill show <name> # body to stdout (default verb)
|
|
43
|
-
crtr skill show _:<name> # explicit scope-direct
|
|
44
|
-
crtr skill path <name> # absolute path
|
|
45
|
-
crtr skill where <name> # {scope, plugin, path} JSON
|
|
46
|
-
\`\`\`
|
|
47
|
-
|
|
48
|
-
## Author (progressive disclosure)
|
|
49
|
-
|
|
50
|
-
\`\`\`
|
|
51
|
-
crtr skill create [topic...] # pick a template type
|
|
52
|
-
crtr skill template <type> [topic] # workflow + skeleton for that type
|
|
53
|
-
crtr skill new <name> --type <type> # bare scaffold with typed frontmatter
|
|
54
|
-
\`\`\`
|
|
55
|
-
|
|
56
|
-
Five types — pick by what the agent does after reading:
|
|
57
|
-
|
|
58
|
-
- \`playbook\` — decide (judgment, heuristics, when-to-use)
|
|
59
|
-
- \`primer\` — navigate (codebase facts, architecture)
|
|
60
|
-
- \`reference\` — look up (stable facts, tables)
|
|
61
|
-
- \`runbook\` — execute (numbered procedure)
|
|
62
|
-
- \`freeform\` — none of the above (catchall)
|
|
63
|
-
|
|
64
|
-
Don't load \`create\` and \`template\` in the same turn — \`create\` decides the
|
|
65
|
-
type, then call \`template\`.
|
|
66
|
-
|
|
67
|
-
## Format
|
|
68
|
-
|
|
69
|
-
A skill is a directory; \`SKILL.md\` is its entry file. The dir IS the skill —
|
|
70
|
-
siblings are assets, nested dirs are themselves skills.
|
|
71
|
-
|
|
72
|
-
Frontmatter (required: \`name\`, \`type\`, \`description\`):
|
|
73
|
-
- \`name\` — must equal the dir path under \`skills/\`. Slashes for nested
|
|
74
|
-
(\`skills/web/frontend/design/SKILL.md\` → \`name: web/frontend/design\`).
|
|
75
|
-
- \`type\` — one of the five above.
|
|
76
|
-
- \`description\` — one sentence, front-load with "Use when…" — drives discovery.
|
|
77
|
-
- \`keywords\` (optional) — array of strings, improves \`crtr skill search\`.
|
|
78
|
-
|
|
79
|
-
Intermediate dirs (\`web/\`, \`web/frontend/\`) don't need their own SKILL.md —
|
|
80
|
-
nesting is purely path-based. Budget ~150 lines per SKILL.md body; spill
|
|
81
|
-
deeper material into sibling files (\`reference.md\`, \`examples.md\`).
|
|
82
|
-
|
|
83
|
-
Validate with \`crtr doctor\` — checks frontmatter, name-vs-path match, type
|
|
84
|
-
enum, sibling-link reachability.
|
|
85
|
-
|
|
86
|
-
## Neighbors auto-append
|
|
87
|
-
|
|
88
|
-
\`crtr skill show <name>\` appends a \`## Neighbors\` section listing siblings
|
|
89
|
-
(same parent dir) and nested skills. Skill bodies should write \`## Related\`
|
|
90
|
-
**only** for cross-plugin or distant refs — within-plugin links are redundant.
|
|
91
|
-
|
|
92
|
-
Suppress with \`crtr skill show <name> --no-neighbors\`.
|
|
93
|
-
|
|
94
|
-
## Toggle
|
|
95
|
-
|
|
96
|
-
\`\`\`
|
|
97
|
-
crtr skill enable <name>
|
|
98
|
-
crtr skill disable <name>
|
|
99
|
-
\`\`\`
|
|
100
|
-
|
|
101
|
-
## Exit codes
|
|
102
|
-
|
|
103
|
-
\`0\` success · \`3\` not found · \`4\` ambiguous (qualify name)
|
|
104
|
-
`;
|
|
105
|
-
}
|
|
106
1
|
export function skillCreatePrompt(topic) {
|
|
107
2
|
const topicLine = topic
|
|
108
3
|
? `Topic: **${topic}**`
|
|
@@ -133,13 +28,36 @@ Litmus: *"when X, do Y"* → playbook. *"these are the fields of Y"* →
|
|
|
133
28
|
reference. *"step 1, step 2, step 3"* → runbook. *"how X is built inside
|
|
134
29
|
this repo"* → primer.
|
|
135
30
|
|
|
31
|
+
A skill that *does* a thing is a \`runbook\` (ordered steps). A skill that
|
|
32
|
+
ships a helper script bundles it as a sibling file (see Format) — the type
|
|
33
|
+
is still chosen by what the agent does after reading, not by the script.
|
|
34
|
+
|
|
35
|
+
## Format (every type)
|
|
36
|
+
|
|
37
|
+
- A skill is a **directory**; \`SKILL.md\` is its entry file. Siblings are
|
|
38
|
+
assets; nested dirs are their own skills.
|
|
39
|
+
- Required frontmatter: \`name\`, \`type\`, \`description\`. \`name\` must equal the
|
|
40
|
+
dir path under \`skills/\` — slashes nest (\`web/frontend/design\`).
|
|
41
|
+
- \`description\`: one sentence, front-load "Use when…" — it drives discovery.
|
|
42
|
+
- Budget ~150 lines per \`SKILL.md\`; spill deeper material into sibling files.
|
|
43
|
+
- \`crtr skill author scaffold <n> --type <t> --scope <s> --description "<d>"\` writes correct frontmatter for you; \`crtr sys doctor\` validates.
|
|
44
|
+
|
|
45
|
+
## Voice (every type) — prescriptive or descriptive, never speculative
|
|
46
|
+
|
|
47
|
+
A skill states **what to do** or **what is true**. It never lists open
|
|
48
|
+
questions, debates, "things to consider", or unresolved tradeoffs. If a line
|
|
49
|
+
isn't prescriptive or descriptive, it isn't important — cut it. If you can't
|
|
50
|
+
state the answer, you're not ready to write that line: omit it or go ask.
|
|
51
|
+
Hedging is the tell — \`may\`, \`might\`, \`consider whether\`, \`it depends\`,
|
|
52
|
+
\`there's debate\`, \`one option is\`. Resolve it to a rule or delete it.
|
|
53
|
+
|
|
136
54
|
## Next
|
|
137
55
|
|
|
138
56
|
1. Pick a type. If unclear, use \`AskUserQuestion\` with your best guess first.
|
|
139
|
-
2. Run:
|
|
57
|
+
2. Run (output is JSON; read the \`guide\` field):
|
|
140
58
|
|
|
141
59
|
\`\`\`
|
|
142
|
-
crtr skill
|
|
60
|
+
crtr skill author guide --type <type>${topic ? ` --topic "${topic}"` : ''}
|
|
143
61
|
\`\`\`
|
|
144
62
|
|
|
145
63
|
That output contains the research methodology, SKILL.md skeleton, and
|
|
@@ -164,7 +82,7 @@ export function skillTemplatePrompt(type, topic) {
|
|
|
164
82
|
return runbookTemplatePrompt(topic);
|
|
165
83
|
if (t === 'freeform')
|
|
166
84
|
return freeformTemplatePrompt(topic);
|
|
167
|
-
return `unknown template type: ${type}\nvalid: playbook | primer | reference | runbook | freeform\nrun \`crtr skill
|
|
85
|
+
return `unknown template type: ${type}\nvalid: playbook | primer | reference | runbook | freeform\nrun \`crtr skill author guide\` to pick.\n`;
|
|
168
86
|
}
|
|
169
87
|
function topicLine(topic) {
|
|
170
88
|
return topic
|
|
@@ -185,7 +103,7 @@ ${topicLine(topic)}
|
|
|
185
103
|
- \`ls\` repo top level
|
|
186
104
|
- check stack manifests
|
|
187
105
|
- \`git log --oneline -15\` in this area
|
|
188
|
-
- \`crtr skill search <topic
|
|
106
|
+
- \`crtr skill find search "<topic>"\` / \`crtr skill find list\` — does a primer already exist?
|
|
189
107
|
|
|
190
108
|
If subsystem is small/self-evident, **stop**. Suggest a CLAUDE.md note. Primers
|
|
191
109
|
are for large, complicated, or unintuitive systems only.
|
|
@@ -193,7 +111,7 @@ are for large, complicated, or unintuitive systems only.
|
|
|
193
111
|
## 2. Scope + name
|
|
194
112
|
|
|
195
113
|
- **Scope**: \`project\` by default. \`user\` only if cross-repo.
|
|
196
|
-
- **Name**: kebab-case. Confirm no collision: \`crtr skill where <name
|
|
114
|
+
- **Name**: kebab-case. Confirm no collision: \`crtr skill read where <name>\` (returns \`.path\`, \`.scope\`, \`.plugin\`).
|
|
197
115
|
|
|
198
116
|
## 3. Parallel exploration
|
|
199
117
|
|
|
@@ -226,8 +144,10 @@ assumptions.**
|
|
|
226
144
|
|
|
227
145
|
## 5. Scaffold
|
|
228
146
|
|
|
147
|
+
Output is JSON; read the \`path\` field:
|
|
148
|
+
|
|
229
149
|
\`\`\`
|
|
230
|
-
crtr skill
|
|
150
|
+
crtr skill author scaffold <name> --type primer --scope project --description "<what+when, ≤250 chars, front-loaded triggers>"
|
|
231
151
|
\`\`\`
|
|
232
152
|
|
|
233
153
|
## 6. Write the body
|
|
@@ -258,7 +178,7 @@ Non-obvious coupling. Looks-broken-but-isn't. Past footguns.
|
|
|
258
178
|
\`\`\`
|
|
259
179
|
|
|
260
180
|
**No \`## Related\` for within-plugin siblings** — the CLI auto-appends a
|
|
261
|
-
\`## Neighbors\` section on \`crtr skill show
|
|
181
|
+
\`## Neighbors\` section on \`crtr skill read show <name>\`. Add a manual \`## Related\`
|
|
262
182
|
only for cross-plugin or distant refs.
|
|
263
183
|
|
|
264
184
|
**Density rules:**
|
|
@@ -266,14 +186,18 @@ only for cross-plugin or distant refs.
|
|
|
266
186
|
- Tables where structure fits
|
|
267
187
|
- Skip 30-second-skim-obvious
|
|
268
188
|
- No "this section covers…" meta
|
|
189
|
+
- Descriptive only — state what *is*. No "open questions", "we should probably", "unclear whether". Can't state it? Go find out or cut the line.
|
|
190
|
+
- No citations/source attributions — \`(Author 2025)\`, arXiv IDs, Sources tables are bloat
|
|
269
191
|
- Budget ~150 lines; deeper reference → sibling files
|
|
270
192
|
|
|
271
193
|
## 7. Verify
|
|
272
194
|
|
|
195
|
+
Output is JSON; \`.content\` has the body, \`.path\` has the location:
|
|
196
|
+
|
|
273
197
|
\`\`\`
|
|
274
|
-
crtr skill where <name>
|
|
275
|
-
crtr skill show <name>
|
|
276
|
-
crtr skill search <keyword>
|
|
198
|
+
crtr skill read where <name>
|
|
199
|
+
crtr skill read show <name>
|
|
200
|
+
crtr skill find search "<keyword>" # confirm description triggers discovery
|
|
277
201
|
\`\`\`
|
|
278
202
|
|
|
279
203
|
Sharpen description if discovery misses. Cut body if bloated.
|
|
@@ -299,7 +223,7 @@ ${topicLine(topic)}
|
|
|
299
223
|
|
|
300
224
|
If you'd write *"when X, do Y because Z"* → playbook. If you'd write tables
|
|
301
225
|
of fields/flags/events → reference material (put in sibling \`reference.md\`,
|
|
302
|
-
not SKILL.md). If neither fits → use \`crtr skill
|
|
226
|
+
not SKILL.md). If neither fits → use \`crtr skill author guide --type freeform${topic ? ` --topic "${topic}"` : ''}\` instead.
|
|
303
227
|
|
|
304
228
|
**Playbook markers:** teaches a framework · has "when (not) to use" · prose
|
|
305
229
|
over tables · reader makes better decisions after 30 seconds.
|
|
@@ -322,12 +246,14 @@ PR over many small ones for refactors here, because review churn dominates"*
|
|
|
322
246
|
|
|
323
247
|
- **Scope**: \`user\` for cross-project methodology. \`project\` for repo-specific.
|
|
324
248
|
- **Name**: kebab-case, verb-or-noun-phrase. Not "guide-to-X".
|
|
325
|
-
- Check \`crtr skill where <name
|
|
249
|
+
- Check \`crtr skill read where <name>\` (returns \`.path\`, \`.scope\`, \`.plugin\`).
|
|
326
250
|
|
|
327
251
|
## 3. Scaffold
|
|
328
252
|
|
|
253
|
+
Output is JSON; read the \`path\` field:
|
|
254
|
+
|
|
329
255
|
\`\`\`
|
|
330
|
-
crtr skill
|
|
256
|
+
crtr skill author scaffold <name> --type playbook --scope <user|project> --description "<what it teaches + when to load, ≤250 chars, front-loaded triggers>"
|
|
331
257
|
\`\`\`
|
|
332
258
|
|
|
333
259
|
## 4. Density rules
|
|
@@ -336,7 +262,9 @@ LLM reasoning degrades past ~3k tokens. **Budget ~150 lines for SKILL.md.**
|
|
|
336
262
|
|
|
337
263
|
- Decision-first. *"When you need X"* before *"how X works"*.
|
|
338
264
|
- One well-placed "don't" > three paragraphs of explanation.
|
|
265
|
+
- Prescriptive only — every line is a rule or the reason behind one. No "open debates", "considerations", "it depends" without the deciding factor. An unresolved tradeoff isn't judgment; resolve it to *"when A, X; when B, Y"* or cut it.
|
|
339
266
|
- Reasoning chains > example outputs. Show *how to think*, not *what to produce*.
|
|
267
|
+
- No citations or source attributions. State the heuristic directly — \`(Author 2025)\`, arXiv IDs, "research shows", and Sources tables are bloat that competes for the agent's context. (Only a \`reference\` skill cites: it links one source-of-truth so facts can be verified.)
|
|
340
268
|
- Section >20 lines without teaching judgment → move to \`reference.md\`.
|
|
341
269
|
|
|
342
270
|
**Test:** can someone reading 30 seconds make a better decision? If they need
|
|
@@ -369,7 +297,7 @@ to read the whole thing for value, you've buried the judgment.
|
|
|
369
297
|
\`\`\`
|
|
370
298
|
|
|
371
299
|
**No \`## Related\` for within-plugin siblings** — the CLI auto-appends a
|
|
372
|
-
\`## Neighbors\` section on \`crtr skill show
|
|
300
|
+
\`## Neighbors\` section on \`crtr skill read show <name>\`. Add a manual \`## Related\`
|
|
373
301
|
only for cross-plugin or distant refs.
|
|
374
302
|
|
|
375
303
|
## 6. Progressive disclosure
|
|
@@ -388,15 +316,17 @@ loads supporting files only when needed.
|
|
|
388
316
|
|
|
389
317
|
## 7. Verify
|
|
390
318
|
|
|
319
|
+
Output is JSON; \`.content\` has the body, \`.path\` has the location:
|
|
320
|
+
|
|
391
321
|
\`\`\`
|
|
392
|
-
crtr skill where <name>
|
|
393
|
-
crtr skill show <name>
|
|
394
|
-
crtr skill search <keyword>
|
|
322
|
+
crtr skill read where <name>
|
|
323
|
+
crtr skill read show <name>
|
|
324
|
+
crtr skill find search "<keyword>"
|
|
395
325
|
\`\`\`
|
|
396
326
|
|
|
397
327
|
## Constraints
|
|
398
328
|
|
|
399
|
-
- Topic fails litmus? → \`crtr skill
|
|
329
|
+
- Topic fails litmus? → \`crtr skill author guide --type freeform\`, \`crtr skill author guide --type reference\`, or \`crtr skill author guide --type runbook\`.
|
|
400
330
|
- No unconfirmed heuristics — if not from user experience or clear principle,
|
|
401
331
|
leave it out.
|
|
402
332
|
`;
|
|
@@ -426,12 +356,16 @@ No strict template; the shape just tells you what to ask for.
|
|
|
426
356
|
|
|
427
357
|
\`AskUserQuestion\` (≤4, multi-choice, best-guess first). Get only what you
|
|
428
358
|
need to write the skill. **No unconfirmed assumptions** — if not from user
|
|
429
|
-
or grep, omit it.
|
|
359
|
+
or grep, omit it. **Prescriptive or descriptive only** — the skill states
|
|
360
|
+
what to do or what is true. No "open questions", debates, or unresolved
|
|
361
|
+
tradeoffs; if you can't state the answer, cut the line.
|
|
430
362
|
|
|
431
363
|
## 3. Scope + name + scaffold
|
|
432
364
|
|
|
365
|
+
Output is JSON; read the \`path\` field:
|
|
366
|
+
|
|
433
367
|
\`\`\`
|
|
434
|
-
crtr skill
|
|
368
|
+
crtr skill author scaffold <name> --type freeform --scope <user|project> --description "<what+when, ≤250 chars, front-loaded triggers>"
|
|
435
369
|
\`\`\`
|
|
436
370
|
|
|
437
371
|
## 4. Body — pick the closest skeleton
|
|
@@ -446,10 +380,10 @@ crtr skill new <name> --type freeform --scope <user|project> --description "<wha
|
|
|
446
380
|
**Decision:**
|
|
447
381
|
\`\`\`markdown
|
|
448
382
|
# <decision> — <date>
|
|
449
|
-
## Context
|
|
450
|
-
## Decision
|
|
451
|
-
## Consequences
|
|
452
|
-
## Alternatives
|
|
383
|
+
## Context — the constraint that forced a choice (facts, not musing)
|
|
384
|
+
## Decision — what we do now, stated as a rule
|
|
385
|
+
## Consequences — what this commits us to (descriptive, not "we'll see")
|
|
386
|
+
## Alternatives rejected — each with the one reason it lost (not a pros/cons dump)
|
|
453
387
|
\`\`\`
|
|
454
388
|
|
|
455
389
|
**Runbook:**
|
|
@@ -473,10 +407,12 @@ Or invent your own. Stay tight — no padding.
|
|
|
473
407
|
|
|
474
408
|
## 5. Verify
|
|
475
409
|
|
|
410
|
+
Output is JSON; \`.content\` has the body, \`.path\` has the location:
|
|
411
|
+
|
|
476
412
|
\`\`\`
|
|
477
|
-
crtr skill where <name>
|
|
478
|
-
crtr skill show <name>
|
|
479
|
-
crtr skill search <keyword>
|
|
413
|
+
crtr skill read where <name>
|
|
414
|
+
crtr skill read show <name>
|
|
415
|
+
crtr skill find search "<keyword>"
|
|
480
416
|
\`\`\`
|
|
481
417
|
|
|
482
418
|
## Switch templates if needed
|
|
@@ -484,10 +420,10 @@ crtr skill search <keyword>
|
|
|
484
420
|
Content actually fits a typed template?
|
|
485
421
|
|
|
486
422
|
\`\`\`
|
|
487
|
-
crtr skill
|
|
488
|
-
crtr skill
|
|
489
|
-
crtr skill
|
|
490
|
-
crtr skill
|
|
423
|
+
crtr skill author guide --type playbook${topic ? ` --topic "${topic}"` : ''} # decide
|
|
424
|
+
crtr skill author guide --type primer${topic ? ` --topic "${topic}"` : ''} # navigate codebase
|
|
425
|
+
crtr skill author guide --type reference${topic ? ` --topic "${topic}"` : ''} # look up stable facts
|
|
426
|
+
crtr skill author guide --type runbook${topic ? ` --topic "${topic}"` : ''} # execute a procedure
|
|
491
427
|
\`\`\`
|
|
492
428
|
`;
|
|
493
429
|
}
|
|
@@ -507,7 +443,7 @@ ${topicLine(topic)}
|
|
|
507
443
|
|
|
508
444
|
If you'd skim end-to-end → it's not reference. If you'd jump straight to
|
|
509
445
|
the row you need → reference. If you'd make a decision after reading →
|
|
510
|
-
\`crtr skill
|
|
446
|
+
\`crtr skill author guide --type playbook\`. If you'd execute steps → \`crtr skill author guide --type runbook\`.
|
|
511
447
|
|
|
512
448
|
**Reference markers:** mostly tables · stable across releases · authoritative
|
|
513
449
|
source elsewhere · agent loads to *answer*, not to *think*.
|
|
@@ -528,12 +464,14 @@ field/flag/code values** — pull verbatim from source.
|
|
|
528
464
|
|
|
529
465
|
- **Scope**: \`user\` for cross-project facts. \`project\` for repo-specific.
|
|
530
466
|
- **Name**: noun-phrase. \`http-status-codes\` not \`learn-http-status\`.
|
|
531
|
-
- Check \`crtr skill where <name
|
|
467
|
+
- Check \`crtr skill read where <name>\` (returns \`.path\`, \`.scope\`, \`.plugin\`).
|
|
532
468
|
|
|
533
469
|
## 3. Scaffold
|
|
534
470
|
|
|
471
|
+
Output is JSON; read the \`path\` field:
|
|
472
|
+
|
|
535
473
|
\`\`\`
|
|
536
|
-
crtr skill
|
|
474
|
+
crtr skill author scaffold <name> --type reference --scope <user|project> --description "<what to look up + when to load, ≤250 chars>"
|
|
537
475
|
\`\`\`
|
|
538
476
|
|
|
539
477
|
## 4. Density rules
|
|
@@ -545,6 +483,7 @@ Reference skills are *load and scan*, not *load and read*. Optimize for jump-to-
|
|
|
545
483
|
- Source URL at the top — agent verifies before trusting cached facts.
|
|
546
484
|
- No prose paragraphs longer than 2 lines.
|
|
547
485
|
- Skip *why* — playbooks teach why. Reference teaches what.
|
|
486
|
+
- Every row is a settled fact. No "TBD", "varies", "may differ" rows — if a value isn't known, omit the row, don't hedge it.
|
|
548
487
|
|
|
549
488
|
## 5. Body skeleton
|
|
550
489
|
|
|
@@ -583,10 +522,12 @@ SKILL.md links to siblings (\`see [full-table.md](full-table.md)\`).
|
|
|
583
522
|
|
|
584
523
|
## 7. Verify
|
|
585
524
|
|
|
525
|
+
Output is JSON; \`.content\` has the body, \`.path\` has the location:
|
|
526
|
+
|
|
586
527
|
\`\`\`
|
|
587
|
-
crtr skill where <name>
|
|
588
|
-
crtr skill show <name>
|
|
589
|
-
crtr skill search <keyword>
|
|
528
|
+
crtr skill read where <name>
|
|
529
|
+
crtr skill read show <name>
|
|
530
|
+
crtr skill find search "<keyword>"
|
|
590
531
|
\`\`\`
|
|
591
532
|
|
|
592
533
|
Search must surface the skill on a typical lookup query. Sharpen the
|
|
@@ -595,8 +536,8 @@ description if it doesn't.
|
|
|
595
536
|
## Constraints
|
|
596
537
|
|
|
597
538
|
- No invented values. If you can't cite the source, leave the row out.
|
|
598
|
-
- Topic teaches *judgment*, not facts? → \`crtr skill
|
|
599
|
-
- Topic is a *procedure*? → \`crtr skill
|
|
539
|
+
- Topic teaches *judgment*, not facts? → \`crtr skill author guide --type playbook\`.
|
|
540
|
+
- Topic is a *procedure*? → \`crtr skill author guide --type runbook\`.
|
|
600
541
|
- Source updates faster than you'll update the skill? → don't capture; link.
|
|
601
542
|
`;
|
|
602
543
|
}
|
|
@@ -636,18 +577,21 @@ push to \\\`main\\\`, wait for green CI, click promote"* is a runbook step.
|
|
|
636
577
|
|
|
637
578
|
- **Scope**: \`project\` for repo-specific procedures. \`user\` for cross-project.
|
|
638
579
|
- **Name**: verb-phrase. \`deploy-to-prod\` not \`production-deployment-guide\`.
|
|
639
|
-
- Check \`crtr skill where <name
|
|
580
|
+
- Check \`crtr skill read where <name>\` (returns \`.path\`, \`.scope\`, \`.plugin\`).
|
|
640
581
|
|
|
641
582
|
## 3. Scaffold
|
|
642
583
|
|
|
584
|
+
Output is JSON; read the \`path\` field:
|
|
585
|
+
|
|
643
586
|
\`\`\`
|
|
644
|
-
crtr skill
|
|
587
|
+
crtr skill author scaffold <name> --type runbook --scope <user|project> --description "<when to run + outcome, ≤250 chars, front-loaded trigger>"
|
|
645
588
|
\`\`\`
|
|
646
589
|
|
|
647
590
|
## 4. Density rules
|
|
648
591
|
|
|
649
592
|
- Steps are commands, not advice. Each step is something the agent can verify.
|
|
650
593
|
- Decision points get explicit branches, not "use judgment."
|
|
594
|
+
- Prescriptive only. No "you may want to", "consider whether", "depending on" without the branch spelled out. If a step's outcome is uncertain, that's a decision point — write the branches, don't hedge the step.
|
|
651
595
|
- Verification belongs in-line, after the step that produces the change.
|
|
652
596
|
- Rollback is mandatory if the procedure changes prod state.
|
|
653
597
|
|
|
@@ -685,10 +629,12 @@ crtr skill new <name> --type runbook --scope <user|project> --description "<when
|
|
|
685
629
|
|
|
686
630
|
## 6. Verify
|
|
687
631
|
|
|
632
|
+
Output is JSON; \`.content\` has the body, \`.path\` has the location:
|
|
633
|
+
|
|
688
634
|
\`\`\`
|
|
689
|
-
crtr skill where <name>
|
|
690
|
-
crtr skill show <name>
|
|
691
|
-
crtr skill search <keyword>
|
|
635
|
+
crtr skill read where <name>
|
|
636
|
+
crtr skill read show <name>
|
|
637
|
+
crtr skill find search "<keyword>"
|
|
692
638
|
\`\`\`
|
|
693
639
|
|
|
694
640
|
Walk through the runbook mentally. Each step verifiable? Each decision
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crouton-kit/crouter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "crtr — fast access to skills, plugins, and marketplaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"build": "tsc && rm -rf dist/builtin-skills && cp -R src/builtin-skills dist/builtin-skills",
|
|
27
27
|
"dev": "tsx src/cli.ts",
|
|
28
28
|
"link": "npm link",
|
|
29
|
-
"prepublishOnly": "npm run build"
|
|
29
|
+
"prepublishOnly": "npm run build",
|
|
30
|
+
"test": "node --import tsx/esm --test 'src/core/__tests__/**/*.test.ts'"
|
|
30
31
|
},
|
|
31
32
|
"repository": {
|
|
32
33
|
"type": "git",
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
},
|
|
35
36
|
"license": "MIT",
|
|
36
37
|
"dependencies": {
|
|
38
|
+
"@crouton-kit/humanloop": "^0.3.6",
|
|
37
39
|
"commander": "^13.0.0"
|
|
38
40
|
},
|
|
39
41
|
"devDependencies": {
|
package/dist/commands/agent.d.ts
DELETED