Skip to content

Commit 19a8a40

Browse files
committed
add skill for setting up local testing
1 parent 1ca36f3 commit 19a8a40

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

.agents/skills/add-command-spec/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ Format the JSON spec with `npm run format -- command-signatures/json/<command>.j
6868

6969
Run `script/presubmit` to verify formatting, linting, and tests all pass (this runs `cargo fmt --check`, `cargo clippy`, and `cargo test`).
7070

71+
To verify completions end-to-end in a real Warp session, use the **test-local-warp** skill, which covers building and running Warp against a local checkout of this repo. This requires computer use to be enabled since Warp is a GUI application.
72+
7173
## Reference Examples
7274

7375
- **Simple spec with generator**: `json/kill.json` + `src/generators/kill.rs` — minimal example showing `generatorName` usage for process and signal completions
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: test-local-warp
3+
description: Test command-signatures changes locally by running Warp terminal against a local build of this crate. Use when the user wants to verify completion spec changes, generator changes, or other modifications in a real Warp session before merging.
4+
---
5+
6+
# Testing command-signatures with a Local Warp Build
7+
8+
## Overview
9+
10+
`warp-command-signatures` is consumed by `warp-internal` as a git dependency. To test changes locally, temporarily point `warp-internal` at a local checkout of this repo, then build and run Warp.
11+
12+
## Prerequisites
13+
14+
- A local checkout of both `warp-internal` and `command-signatures`.
15+
- **Computer use must be enabled** — Warp is a GUI application, so verifying completions requires screen interaction.
16+
17+
## Steps
18+
19+
### 1. Patch the dependency in warp-internal
20+
21+
In the `warp-internal` repo's root `Cargo.toml`, find the `warp-command-signatures` line under `[workspace.dependencies]`:
22+
23+
```toml
24+
warp-command-signatures = { git = "ssh://git@github.com/warpdotdev/command-signatures.git", rev = "...", default-features = false }
25+
```
26+
27+
Replace it with a local path. Adjust the relative path based on where the two repos are checked out:
28+
29+
```toml
30+
warp-command-signatures = { path = "../command-signatures/command-signatures", default-features = false }
31+
```
32+
33+
Note the nested `command-signatures/command-signatures` — the outer directory is the repo root (Cargo workspace), the inner one is the `warp-command-signatures` crate.
34+
35+
### 2. Build and run Warp
36+
37+
From the `warp-internal` repo:
38+
39+
```sh
40+
cargo run --features fast_dev
41+
```
42+
43+
### 3. Verify changes
44+
45+
Open the locally-built Warp and test completions for the commands you modified. Type the command and trigger tab completion to confirm specs and generators behave as expected.
46+
47+
### 4. Clean up
48+
49+
Revert the `Cargo.toml` change in `warp-internal` before committing. The local path override should never be checked in.
50+
51+
### 5. Release
52+
53+
After your command-signatures PR is merged, update the `rev` in `warp-internal/Cargo.toml` to the new commit hash on `main` and open a PR in `warp-internal` to pick up the changes.

0 commit comments

Comments
 (0)