Skip to content

Commit 4f43963

Browse files
committed
CI + update docs
1 parent cb86410 commit 4f43963

5 files changed

Lines changed: 130 additions & 4 deletions

File tree

.github/workflows/rust_ci.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ jobs:
6060
with:
6161
components: clippy, rustfmt
6262

63+
- name: Install mdbook
64+
uses: peaceiris/actions-mdbook@v2
65+
with:
66+
mdbook-version: "0.4.40"
67+
6368
- name: Run cargo check
6469
run: cargo check --all-features
6570

rust/crates/sift_cli/assets/docs/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
# Agentic Tooling
2323

2424
- [MCP Server](./agents/mcp.md)
25+
- [Built-in Prompts](./agents/prompts.md)
2526
- [Agent Skills](./agents/skills.md)
2627

2728
# Reference

rust/crates/sift_cli/assets/docs/src/agents/mcp.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ not run interactively.
3434
A typical agent flow is `list_assets``list_channels``get_data``sql`,
3535
and `upload_dataset` to write results back.
3636

37+
## Built-in prompts
38+
39+
The server also ships [built-in prompts](./prompts.md): ready-made workflows
40+
that chain these tools to explore an asset, analyze a run, or derive and upload
41+
a new dataset.
42+
3743
## Configuring a client
3844

3945
Most MCP clients take a command and arguments. Point yours at the CLI:
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Built-in Prompts
2+
3+
The Sift MCP server ships with a set of built-in prompts: ready-made workflows
4+
that walk an agent through a complete task using the [MCP tools](./mcp.md). A
5+
prompt expands into step-by-step instructions tailored to the arguments you
6+
give it, so you start a focused session without writing the workflow yourself.
7+
8+
Prompts are served by `sift-cli mcp`, so the server must be
9+
[configured as a client](./mcp.md#configuring-a-client) first.
10+
11+
## Using a prompt
12+
13+
How you invoke a prompt depends on your MCP client, and on the name you
14+
registered the server under. Assuming you registered it as `sift` in your
15+
`.mcp.json`:
16+
17+
```json
18+
{
19+
"mcpServers": {
20+
"sift": {
21+
"command": "sift-cli",
22+
"args": ["mcp"]
23+
}
24+
}
25+
}
26+
```
27+
28+
then in Claude Code each prompt is available as a slash command of the form
29+
`/mcp__sift__<prompt>`:
30+
31+
- `/mcp__sift__explore_asset`
32+
- `/mcp__sift__analyze_run`
33+
- `/mcp__sift__derive_and_upload`
34+
35+
The `sift` in the command is your registered server name, so a different name
36+
in `.mcp.json` changes the prefix accordingly. Arguments are passed positionally
37+
after the command, separated by spaces; wrap any argument containing spaces in
38+
quotes. Other MCP clients discover the same prompts but may present them
39+
differently, so check your client's documentation for its invocation syntax.
40+
41+
## `explore_asset`
42+
43+
A read-only starting point for a session. It resolves an asset, lists its
44+
recent runs, and inventories its channels, without pulling any sample data.
45+
46+
| Argument | Required | Description |
47+
| -------- | -------- | -------------------------------------- |
48+
| `asset` | yes | Asset name to explore (exact or partial match). |
49+
50+
Example:
51+
52+
```
53+
/mcp__sift__explore_asset "Falcon 9 Booster"
54+
```
55+
56+
The agent resolves the asset, then reports its most recent runs and the channel
57+
inventory grouped by data type, surfacing the exact run and channel names so you
58+
can reuse them with the other prompts.
59+
60+
## `analyze_run`
61+
62+
Pulls a run's channel data and produces a per-channel statistical summary. You
63+
can target specific channels and pose a question for the agent to answer.
64+
65+
| Argument | Required | Description |
66+
| ---------- | -------- | ------------------------------------------------------------ |
67+
| `asset` | yes | Asset the run belongs to. |
68+
| `run` | yes | Run to analyze. |
69+
| `channels` | no | Channels to pull. Omit to let the agent choose a subset. |
70+
| `question` | no | A question for the agent to answer from the data. |
71+
72+
Analyze every channel on a run:
73+
74+
```
75+
/mcp__sift__analyze_run "Falcon 9 Booster" "Static Fire 2024-05-01"
76+
```
77+
78+
Target specific channels and ask a question:
79+
80+
```
81+
/mcp__sift__analyze_run "Falcon 9 Booster" "Static Fire 2024-05-01" "chamber_pressure,fuel_temp" "Did chamber pressure stay within nominal range?"
82+
```
83+
84+
The agent pulls the data with `get_data`, summarizes it with `sql` (row counts,
85+
min/max/mean, null rate), and reports the Parquet paths so you can continue the
86+
work.
87+
88+
## `derive_and_upload`
89+
90+
Derives a new dataset from an existing run via SQL and uploads it back to Sift.
91+
Because the upload is a write, the agent confirms the destination with you before
92+
running it.
93+
94+
| Argument | Required | Description |
95+
| -------------- | -------- | ----------------------------------------------------------------- |
96+
| `source_asset` | yes | Asset to read from. |
97+
| `source_run` | yes | Run to read from. |
98+
| `transform` | yes | Plain-language description of the transform to apply. |
99+
| `target_asset` | no | Asset to write to. The agent proposes a default if omitted. |
100+
| `target_run` | no | Run to create. The agent asks whether to create one if omitted. |
101+
102+
Derive a new dataset, letting the agent propose the destination:
103+
104+
```
105+
/mcp__sift__derive_and_upload "Falcon 9 Booster" "Static Fire 2024-05-01" "1-second average of chamber_pressure and fuel_temp"
106+
```
107+
108+
Specify the destination explicitly:
109+
110+
```
111+
/mcp__sift__derive_and_upload "Falcon 9 Booster" "Static Fire 2024-05-01" "1-second average of chamber_pressure" "Falcon 9 Booster-derived" "Static Fire 2024-05-01 1s-avg"
112+
```
113+
114+
The agent extracts the source data, applies the transform with `sql` (keeping
115+
`timestamp_unix_nanos` as the first column, as Sift requires), confirms the
116+
target asset, run, and any tags with you, then uploads the result with
117+
`upload_dataset`.

rust/crates/sift_cli/build.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ fn require_mdbook() {
3030
.unwrap_or(false);
3131

3232
if !installed {
33-
panic!(
34-
"`mdbook` not found on PATH. Install it with `cargo install mdbook --locked` \
35-
or run `make bootstrap`."
36-
);
33+
panic!("`mdbook` not found on PATH. Install it with `cargo install mdbook --locked`.");
3734
}
3835
}

0 commit comments

Comments
 (0)