skill-rails 0.2.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.
Files changed (57) hide show
  1. package/.claude-plugin/marketplace.json +16 -0
  2. package/.claude-plugin/plugin.json +16 -0
  3. package/.mcp.json +8 -0
  4. package/LICENSE +21 -0
  5. package/README.md +255 -0
  6. package/bin/skill-rails.js +4 -0
  7. package/dist/api.d.ts +38 -0
  8. package/dist/api.js +73 -0
  9. package/dist/api.js.map +1 -0
  10. package/dist/cli.d.ts +2 -0
  11. package/dist/cli.js +112 -0
  12. package/dist/cli.js.map +1 -0
  13. package/dist/engine.d.ts +18 -0
  14. package/dist/engine.js +312 -0
  15. package/dist/engine.js.map +1 -0
  16. package/dist/expressions.d.ts +12 -0
  17. package/dist/expressions.js +44 -0
  18. package/dist/expressions.js.map +1 -0
  19. package/dist/flow.d.ts +11 -0
  20. package/dist/flow.js +137 -0
  21. package/dist/flow.js.map +1 -0
  22. package/dist/mcp.d.ts +5 -0
  23. package/dist/mcp.js +37 -0
  24. package/dist/mcp.js.map +1 -0
  25. package/dist/run.d.ts +6 -0
  26. package/dist/run.js +67 -0
  27. package/dist/run.js.map +1 -0
  28. package/dist/schema.d.ts +10 -0
  29. package/dist/schema.js +15 -0
  30. package/dist/schema.js.map +1 -0
  31. package/dist/state.d.ts +6 -0
  32. package/dist/state.js +24 -0
  33. package/dist/state.js.map +1 -0
  34. package/dist/testing.d.ts +50 -0
  35. package/dist/testing.js +233 -0
  36. package/dist/testing.js.map +1 -0
  37. package/dist/types.d.ts +200 -0
  38. package/dist/types.js +2 -0
  39. package/dist/types.js.map +1 -0
  40. package/docs/format.md +256 -0
  41. package/docs/testing.md +100 -0
  42. package/examples/hello/flow.yaml +32 -0
  43. package/examples/hello/tests/hello.test.yaml +22 -0
  44. package/examples/open-pr/flow.yaml +87 -0
  45. package/examples/open-pr/prompts/text.md +26 -0
  46. package/examples/open-pr/scripts/body-file.sh +10 -0
  47. package/examples/open-pr/scripts/context.sh +21 -0
  48. package/examples/open-pr/scripts/create.sh +6 -0
  49. package/examples/open-pr/scripts/push.sh +8 -0
  50. package/examples/open-pr/tests/open-pr.test.yaml +42 -0
  51. package/examples/open-pr/tests/stubs/gh +9 -0
  52. package/package.json +72 -0
  53. package/schema/flow.schema.json +440 -0
  54. package/skills/create-skill-rails/SKILL.md +72 -0
  55. package/skills/create-skill-rails/template/SKILL.md +24 -0
  56. package/skills/migrate-to-skill-rails/SKILL.md +78 -0
  57. package/skills/run-skill-rails/SKILL.md +63 -0
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: run-skill-rails
3
+ description: "Run a skill-rails flow file (flow.yaml) step by step: the runner gives one step at a time, you do it and report its output. Use when a skill tells you to run a flow, or when asked to run a skill-rails flow."
4
+ argument-hint: "<flow.yaml> [key=value ...]"
5
+ ---
6
+
7
+ # Run a skill-rails flow
8
+
9
+ The runner decides the order of the steps, runs the shell steps itself, and checks each output that you report.
10
+ You do only the step that it gives you, one at a time.
11
+
12
+ Use the MCP tools `flow_start` and `flow_done` when they are available.
13
+ Otherwise use the CLI: `npx -y skill-rails@0.2 <command>`.
14
+
15
+ ## Step 1: Start
16
+
17
+ ```bash
18
+ npx -y skill-rails@0.2 start <flow.yaml> [--input <key>=<value> ...]
19
+ ```
20
+
21
+ Give only the inputs that the caller or the invocation text gives.
22
+ Never guess an input.
23
+
24
+ ## Step 2: Do the steps
25
+
26
+ The runner prints one JSON object.
27
+ Act on its `status`:
28
+
29
+ - `step` → do the step (see "Step types"), then report its output:
30
+
31
+ ```bash
32
+ npx -y skill-rails@0.2 done <flow> <id> --output - <<'JSON'
33
+ {"title": "Add the flow runner"}
34
+ JSON
35
+ ```
36
+
37
+ With no `output` in the step, leave out `--output -` and the heredoc.
38
+ If you cannot do the step, run `done <flow> <id> --fail "<reason>"`.
39
+ - `invalid` → read `errors`, correct the output, and run `done` again.
40
+ - `done` → tell the user `message`, and stop.
41
+ - `failed` or `error` → tell the user `message` or `errors`, and stop.
42
+
43
+ When the object has `notes`, tell them to the user.
44
+
45
+ ### Step types
46
+
47
+ - `prompt` → do `instructions`.
48
+ - `skill` → invoke `skill` with `args`, then do `instructions`.
49
+ If the skill tells you to stop, report the step with `--fail`.
50
+ - `ask` → ask the user `questions` as they are, with your question tool, with each option `preview`.
51
+ Report one property per question `id`: the selected label, or the list of labels for `multiSelect`.
52
+ A question with `free: true` takes free text: ask it in a normal message, wait for the reply, and report the reply as text.
53
+ - `wait` → a step polls a command and needs more time.
54
+ Run `done <flow> <id>` again with no output, with a tool timeout of 10 minutes.
55
+
56
+ `output` is the JSON Schema of the output: report a JSON object that matches it.
57
+
58
+ ## Rules
59
+
60
+ - Do only the step that the runner gives you.
61
+ Never skip a step, change the order, or do a later step first.
62
+ - Do not run the shell steps of the flow yourself: the runner runs them.
63
+ - Do not show the runner commands or their JSON to the user.