relay-workflow 2.0.0 → 2.0.2

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.
@@ -39,9 +39,7 @@ to run **/relay-brainstorm** first.
39
39
  # Feature: [Title]
40
40
 
41
41
  *Created: [YYYY-MM-DD]*
42
- *Brainstorm: [link to brainstorm file — include both paths:
43
- Active: .relay/features/[topic]_brainstorm.md
44
- Archived: .relay/archive/features/[topic]_brainstorm.md]*
42
+ *Brainstorm: [[topic]_brainstorm.md]([topic]_brainstorm.md)*
45
43
  *Status: DESIGNED*
46
44
 
47
45
  ## Summary
@@ -19,30 +19,51 @@ verdict is not COMPLETE, STOP and tell the user:
19
19
  Before creating the notebook, verify the notebook execution dependencies
20
20
  are available:
21
21
 
22
- 1. Check if `nbclient`, `nbformat`, and `nbconvert` are importable:
22
+ 1. Determine the correct Python command for this platform:
23
+ - If a virtual environment exists (`.venv/`, `venv/`): use its Python
24
+ directly (e.g., `.venv/Scripts/python` on Windows, `.venv/bin/python`
25
+ on Linux/macOS)
26
+ - Otherwise: try `python3` first, fall back to `python`
27
+ Use whichever works for ALL subsequent Python/pip commands in this skill.
28
+
29
+ Check if `nbclient`, `nbformat`, and `nbconvert` are importable:
23
30
  ```
24
- python3 -c "import nbclient, nbformat, nbconvert"
31
+ <python> -c "import nbclient, nbformat, nbconvert"
25
32
  ```
26
33
  Also check that IPython 7+ is available (required for top-level
27
34
  `await` directly in notebook cells):
28
35
  ```
29
- python3 -c "import IPython; v=tuple(int(x) for x in IPython.__version__.split('.')[:2]); assert v>=(7,0), f'IPython 7+ required for top-level await, found {IPython.__version__}'"
36
+ <python> -c "import IPython; v=tuple(int(x) for x in IPython.__version__.split('.')[:2]); assert v>=(7,0), f'IPython 7+ required for top-level await, found {IPython.__version__}'"
30
37
  ```
31
38
  If the IPython check fails, upgrade before proceeding:
32
- `pip install --upgrade ipython ipykernel`
39
+ `<python> -m pip install --upgrade ipython ipykernel`
33
40
 
34
- 2. If all checks pass, proceed to Part A.
41
+ 2. Register the virtual environment as a Jupyter kernel so notebooks
42
+ can find it (both for programmatic execution and IDE use):
43
+ ```
44
+ <python> -m ipykernel install --user --name=<project> --display-name="<project> (.venv)"
45
+ ```
46
+ Where `<project>` is the project directory name (basename of the
47
+ working directory, e.g., `mnemos2`, `my-app`). If no venv exists
48
+ (system Python), skip this step — the default `python3` kernel works.
49
+
50
+ Verify the kernel is registered:
51
+ ```
52
+ <python> -m jupyter kernelspec list
53
+ ```
54
+
55
+ 3. If all checks pass (deps importable + kernel registered), proceed to Part A.
35
56
 
36
- 3. If they are NOT available:
57
+ 4. If deps are NOT available:
37
58
  a. Look for an existing virtual environment (`.venv/`, `venv/`, or
38
59
  check if already running inside one via `sys.prefix != sys.base_prefix`).
39
60
  b. If a venv exists: activate it and run
40
- `pip install nbclient nbformat nbconvert`, then proceed to Part A.
61
+ `<python> -m pip install nbclient nbformat nbconvert ipython ipykernel`, then proceed to Part A.
41
62
  c. If no venv exists but Python 3 is available: ask the user before
42
63
  installing globally: "No virtual environment found. Install
43
- nbclient/nbformat/nbconvert into the system Python? (Or create a
44
- venv first with `python3 -m venv .venv`)"
45
- If the user approves, run `pip install nbclient nbformat nbconvert`,
64
+ notebook dependencies into the system Python? (Or create a
65
+ venv first with `<python> -m venv .venv`)"
66
+ If the user approves, run `<python> -m pip install nbclient nbformat nbconvert ipython ipykernel`,
46
67
  then proceed to Part A.
47
68
  d. If Python 3 is not available: tell the user
48
69
  "Python 3 is required for verification notebooks. Install Python 3
@@ -55,18 +76,36 @@ Naming: Use the SAME name as the issue/feature file, but with .ipynb
55
76
  extension instead of .md.
56
77
  e.g., `delete_entity_not_atomic.md` → `delete_entity_not_atomic.ipynb`
57
78
 
79
+ Kernel metadata: Set the notebook's `kernelspec` to the kernel registered
80
+ in Part 0 step 2. In the notebook JSON metadata:
81
+ ```json
82
+ "kernelspec": {
83
+ "name": "<project>",
84
+ "display_name": "<project> (.venv)",
85
+ "language": "python"
86
+ }
87
+ ```
88
+ If no venv was registered (system Python), use `"name": "python3"` instead.
89
+ This ensures both programmatic execution and IDE opening use the correct
90
+ Python environment.
91
+
58
92
  For each issue/feature file in the phase:
59
93
 
60
94
  1. HEADER CELL (markdown):
61
95
  - Title: `# [Item Title]: Verification`
62
96
  - Brief description of what was changed and what this notebook tests
63
97
  - Table of what changed (before/after, or list of changes)
64
- - Reference to the item file (use repo-root-relative paths so links
65
- work both before and after the notebook is archived):
98
+ - Reference to the item file using **relative paths from the notebook's
99
+ directory** (NOT project-root paths). Because `.relay/` mirrors its own
100
+ structure under `.relay/archive/`, the relative path `../issues/` or
101
+ `../features/` works both before and after archival:
66
102
  ```
67
- **Item file**: [.relay/issues/FILENAME.md](.relay/issues/FILENAME.md) or [.relay/features/FILENAME.md](.relay/features/FILENAME.md)
68
- (after resolution: [.relay/archive/issues/FILENAME.md](.relay/archive/issues/FILENAME.md) or [.relay/archive/features/FILENAME.md](.relay/archive/features/FILENAME.md))
103
+ **Item file**: [FILENAME.md](../issues/FILENAME.md) or [FILENAME.md](../features/FILENAME.md)
69
104
  ```
105
+ Explanation: notebooks live in `.relay/notebooks/`, so `../issues/`
106
+ resolves to `.relay/issues/`. After archival, notebooks are in
107
+ `.relay/archive/notebooks/`, so `../issues/` resolves to
108
+ `.relay/archive/issues/`. Same relative path, correct in both locations.
70
109
  - Prerequisites (database, env vars, install steps)
71
110
 
72
111
  2. SETUP CELL:
@@ -157,6 +196,15 @@ For each issue/feature file in the phase:
157
196
 
158
197
  ## Part B — Run, Validate, and Iterate
159
198
 
199
+ **Execution method**: Execute the notebook **in-place** so cell outputs are
200
+ persisted in the source `.ipynb` file. Use one of these approaches:
201
+ - **Preferred**: `<python> -m jupyter nbconvert --to notebook --execute --inplace <notebook>.ipynb`
202
+ - **Alternative**: Use `nbclient` programmatically — load with `nbformat.read()`,
203
+ execute with `nbclient.NotebookClient(...).execute()`, write back with
204
+ `nbformat.write()` to the **same file path**.
205
+ - **NEVER** use `--output-dir` pointing to a temp directory — this discards
206
+ outputs from the source notebook.
207
+
160
208
  After creating the notebook, execute every cell sequentially. For each cell
161
209
  that errors or produces a FAIL:
162
210
 
@@ -184,8 +232,7 @@ that errors or produces a FAIL:
184
232
  - Error: [the actual error]
185
233
  → In the notebook, mark the cell with a comment:
186
234
  ```python
187
- # KNOWN ISSUE: see .relay/issues/[new_issue_name].md
188
- # (after resolution: .relay/archive/issues/[new_issue_name].md)
235
+ # KNOWN ISSUE: see ../issues/[new_issue_name].md
189
236
  ```
190
237
  → Continue to the next cell.
191
238
 
@@ -255,7 +302,7 @@ When finished, tell the user:
255
302
 
256
303
  - Notebooks live in `.relay/notebooks/`, NOT in the project root `notebooks/` directory
257
304
  - Notebook filename matches the issue/feature filename (`.md` → `.ipynb`) for traceability
258
- - The header cell includes both the active and archived path so the link works before and after resolution
305
+ - The header cell uses relative paths (`../issues/` or `../features/`) so links work both before archival (from `.relay/notebooks/`) and after (from `.relay/archive/notebooks/`) without any path updates needed
259
306
  - When /relay-resolve archives the item, it also archives the notebook to `.relay/archive/notebooks/`
260
307
  - Every notebook should be self-contained: create its own fixtures, don't depend on other notebooks
261
308
  - If a phase has multiple item files, create one notebook per item file (not one giant notebook)
@@ -59,9 +59,11 @@ Close it out.
59
59
  - [list of files changed, with brief description of each change]
60
60
 
61
61
  ## Verification
62
- - Link to verification notebook (if created), include both paths:
63
- - Active: `.relay/notebooks/[file].ipynb`
64
- - Archived: `.relay/archive/notebooks/[file].ipynb`
62
+ - Link to verification notebook (if created) using relative path:
63
+ `[notebook](../notebooks/[file].ipynb)` (before archival)
64
+ or `[notebook](../archive/notebooks/[file].ipynb)` (after archival)
65
+ Since implementation docs never move, use the archived path as the
66
+ permanent link: `[notebook](../archive/notebooks/[file].ipynb)`
65
67
  - Test commands that confirm the change
66
68
 
67
69
  ## Caveats
@@ -29,14 +29,14 @@ Create this file to track the installed Relay version:
29
29
 
30
30
  | Field | Value |
31
31
  |-------|-------|
32
- | **Version** | 2.0.0 |
32
+ | **Version** | 2.0.2 |
33
33
  | **Installed** | [YYYY-MM-DD] |
34
34
  | **Source** | https://github.com/momobits/Relay |
35
35
  | **Format** | skills |
36
36
 
37
37
  ## Changelog
38
38
 
39
- ### 2.0.0 — Skills-based workflow
39
+ ### 2.0.2 — Skills-based workflow
40
40
  - Converted 14 prompts to Claude Code skills plus new `/relay-help` navigation skill (15 total)
41
41
  - Added `/relay-help` navigation skill
42
42
  - Skills are auto-discovered — no more `@file.md` references
@@ -271,14 +271,25 @@ resolved phase). The skills /relay-review, /relay-verify, and
271
271
 
272
272
  5. **Python environment for verification notebooks**:
273
273
  Verification notebooks (/relay-notebook) require Python 3 and
274
- the packages `nbclient`, `nbformat`, and `nbconvert` to execute.
275
- Set these up now so notebooks work when you reach the code pipeline:
276
-
277
- a. Check if Python 3 is available.
278
- b. Check for an existing virtual environment.
279
- c. Install notebook dependencies.
280
- d. Confirm the install succeeded.
281
- e. Ask if the user wants these added to the project's dev dependencies.
274
+ the packages `nbclient`, `nbformat`, `nbconvert`, `ipython`, and
275
+ `ipykernel` to execute. Set these up now so notebooks work when
276
+ you reach the code pipeline:
277
+
278
+ a. Determine the correct Python command for this platform:
279
+ - If a virtual environment exists (`.venv/`, `venv/`): use its
280
+ Python directly (e.g., `.venv/Scripts/python` on Windows,
281
+ `.venv/bin/python` on Linux/macOS)
282
+ - Otherwise: try `python3` first, fall back to `python`
283
+ Use whichever works for ALL subsequent Python/pip commands.
284
+ b. Check if Python 3 is available using the resolved command.
285
+ c. Check for an existing virtual environment.
286
+ d. Install all notebook dependencies:
287
+ `<python> -m pip install nbclient nbformat nbconvert ipython ipykernel`
288
+ e. Register the venv as a Jupyter kernel (skip if no venv):
289
+ `<python> -m ipykernel install --user --name=<project> --display-name="<project> (.venv)"`
290
+ Where `<project>` is the project directory name.
291
+ f. Confirm the install succeeded (import all five packages).
292
+ g. Ask if the user wants these added to the project's dev dependencies.
282
293
 
283
294
  ## Navigation
284
295
  When setup is complete, tell the user:
package/README.md CHANGED
@@ -48,7 +48,7 @@ Every AI session reads this documentation before acting. Every session writes ba
48
48
  ```bash
49
49
  # Install with npx (recommended)
50
50
  cd your-project
51
- npx relay-workflow install
51
+ npx relay-workflow@latest install
52
52
  ```
53
53
 
54
54
  Or install manually:
@@ -130,6 +130,12 @@ All paths converge on the same **code pipeline** for implementation, ensuring ev
130
130
 
131
131
  ## Skill Reference
132
132
 
133
+ ### Setup
134
+
135
+ | Skill | Purpose |
136
+ |-------|---------|
137
+ | **/relay-setup** | Initialize Relay in a new project. Creates `.relay/` directory, status files, and scans the project for customizations. |
138
+
133
139
  ### Prepare — Project status and maintenance
134
140
 
135
141
  | Skill | Purpose |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "relay-workflow",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Persistent memory for AI coding workflows — Claude Code skills that give agents memory of what was built, what broke, and what's next",
5
5
  "main": "tools/cli.js",
6
6
  "bin": {
package/tools/cli.js CHANGED
@@ -3,7 +3,7 @@
3
3
  const fs = require("fs");
4
4
  const path = require("path");
5
5
 
6
- const VERSION = "2.0.0";
6
+ const VERSION = "2.0.2";
7
7
  const SKILLS_DIR = ".claude/skills";
8
8
 
9
9
  const RELAY_SKILLS = [