Skip to content

Commit 0ba73e3

Browse files
authored
Update README usage guidance (#282)
1 parent 491be80 commit 0ba73e3

1 file changed

Lines changed: 40 additions & 11 deletions

File tree

README.md

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,27 @@
88
gh skill install githubnext/rig
99
```
1010

11-
## Quick start
11+
## Use Rig in 2 ways
1212

13-
Save as `program.md`:
13+
### 1) As a skill for Rig programs that use the Copilot SDK
1414

15-
````md
16-
# Review Git Diff
15+
Pin the skill in your workflow:
16+
17+
```yaml
18+
engine:
19+
id: copilot
20+
copilot-sdk: true
21+
skills:
22+
- githubnext/rig/skills/rig/SKILL.md@<full-commit-sha>
23+
```
24+
25+
Then write a Rig program that configures the Copilot engine:
26+
27+
```ts
28+
import { agent, configureAgent, copilotEngine, p, s } from "rig";
29+
30+
configureAgent(copilotEngine());
1731

18-
```rig
1932
// Agent role: review the current diff and return prioritized findings.
2033
const reviewDiff = agent({
2134
model: "small",
@@ -28,15 +41,31 @@ const reviewDiff = agent({
2841

2942
export default reviewDiff;
3043
```
31-
````
3244

33-
## Full API reference
45+
### 2) Run a Rig program directly with `skills/rig/rig.ts`
46+
47+
Pipe an inline program to the launcher:
48+
49+
```bash
50+
cat <<'RIG' | node skills/rig/rig.ts
51+
// Agent role: summarize this repository in one sentence.
52+
export default "Summarize this repository in one sentence.";
53+
RIG
54+
```
55+
56+
Or run a program file:
3457

35-
See [skills/rig/SKILL.md](skills/rig/SKILL.md) for construction rules, schema helpers, prompt intents, addons, tools, dynamic workflows, engines, and the launcher CLI.
58+
```bash
59+
echo "Review this diff" | node skills/rig/rig.ts src/program.ts
60+
```
3661

37-
## Local development
62+
Use `--typecheck` to validate a program without running it:
3863

3964
```bash
40-
npm test
41-
npm run typecheck
65+
cat program.ts | node skills/rig/rig.ts --typecheck
4266
```
67+
68+
## Docs
69+
70+
See [skills/rig/SKILL.md](skills/rig/SKILL.md) for construction rules and
71+
[skills/rig/references/runtime.md](skills/rig/references/runtime.md) for launcher and engine details.

0 commit comments

Comments
 (0)