relay-workflow 2.0.0 → 2.0.1
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: [
|
|
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,14 +19,21 @@ 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.
|
|
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
|
-
|
|
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
|
-
|
|
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
39
|
`pip install --upgrade ipython ipykernel`
|
|
@@ -37,12 +44,12 @@ are available:
|
|
|
37
44
|
a. Look for an existing virtual environment (`.venv/`, `venv/`, or
|
|
38
45
|
check if already running inside one via `sys.prefix != sys.base_prefix`).
|
|
39
46
|
b. If a venv exists: activate it and run
|
|
40
|
-
`pip install nbclient nbformat nbconvert`, then proceed to Part A.
|
|
47
|
+
`pip install nbclient nbformat nbconvert ipython ipykernel`, then proceed to Part A.
|
|
41
48
|
c. If no venv exists but Python 3 is available: ask the user before
|
|
42
49
|
installing globally: "No virtual environment found. Install
|
|
43
|
-
|
|
44
|
-
venv first with
|
|
45
|
-
If the user approves, run `pip install nbclient nbformat nbconvert`,
|
|
50
|
+
notebook dependencies into the system Python? (Or create a
|
|
51
|
+
venv first with `<python> -m venv .venv`)"
|
|
52
|
+
If the user approves, run `pip install nbclient nbformat nbconvert ipython ipykernel`,
|
|
46
53
|
then proceed to Part A.
|
|
47
54
|
d. If Python 3 is not available: tell the user
|
|
48
55
|
"Python 3 is required for verification notebooks. Install Python 3
|
|
@@ -61,12 +68,17 @@ For each issue/feature file in the phase:
|
|
|
61
68
|
- Title: `# [Item Title]: Verification`
|
|
62
69
|
- Brief description of what was changed and what this notebook tests
|
|
63
70
|
- Table of what changed (before/after, or list of changes)
|
|
64
|
-
- Reference to the item file
|
|
65
|
-
|
|
71
|
+
- Reference to the item file using **relative paths from the notebook's
|
|
72
|
+
directory** (NOT project-root paths). Because `.relay/` mirrors its own
|
|
73
|
+
structure under `.relay/archive/`, the relative path `../issues/` or
|
|
74
|
+
`../features/` works both before and after archival:
|
|
66
75
|
```
|
|
67
|
-
**Item file**: [
|
|
68
|
-
(after resolution: [.relay/archive/issues/FILENAME.md](.relay/archive/issues/FILENAME.md) or [.relay/archive/features/FILENAME.md](.relay/archive/features/FILENAME.md))
|
|
76
|
+
**Item file**: [FILENAME.md](../issues/FILENAME.md) or [FILENAME.md](../features/FILENAME.md)
|
|
69
77
|
```
|
|
78
|
+
Explanation: notebooks live in `.relay/notebooks/`, so `../issues/`
|
|
79
|
+
resolves to `.relay/issues/`. After archival, notebooks are in
|
|
80
|
+
`.relay/archive/notebooks/`, so `../issues/` resolves to
|
|
81
|
+
`.relay/archive/issues/`. Same relative path, correct in both locations.
|
|
70
82
|
- Prerequisites (database, env vars, install steps)
|
|
71
83
|
|
|
72
84
|
2. SETUP CELL:
|
|
@@ -184,8 +196,7 @@ that errors or produces a FAIL:
|
|
|
184
196
|
- Error: [the actual error]
|
|
185
197
|
→ In the notebook, mark the cell with a comment:
|
|
186
198
|
```python
|
|
187
|
-
# KNOWN ISSUE: see
|
|
188
|
-
# (after resolution: .relay/archive/issues/[new_issue_name].md)
|
|
199
|
+
# KNOWN ISSUE: see ../issues/[new_issue_name].md
|
|
189
200
|
```
|
|
190
201
|
→ Continue to the next cell.
|
|
191
202
|
|
|
@@ -255,7 +266,7 @@ When finished, tell the user:
|
|
|
255
266
|
|
|
256
267
|
- Notebooks live in `.relay/notebooks/`, NOT in the project root `notebooks/` directory
|
|
257
268
|
- Notebook filename matches the issue/feature filename (`.md` → `.ipynb`) for traceability
|
|
258
|
-
- The header cell
|
|
269
|
+
- 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
270
|
- When /relay-resolve archives the item, it also archives the notebook to `.relay/archive/notebooks/`
|
|
260
271
|
- Every notebook should be self-contained: create its own fixtures, don't depend on other notebooks
|
|
261
272
|
- 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)
|
|
63
|
-
|
|
64
|
-
|
|
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
|
|
@@ -271,13 +271,15 @@ 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`,
|
|
275
|
-
Set these up now so notebooks work when
|
|
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:
|
|
276
277
|
|
|
277
278
|
a. Check if Python 3 is available.
|
|
278
279
|
b. Check for an existing virtual environment.
|
|
279
|
-
c. Install notebook dependencies
|
|
280
|
-
|
|
280
|
+
c. Install all notebook dependencies:
|
|
281
|
+
`pip install nbclient nbformat nbconvert ipython ipykernel`
|
|
282
|
+
d. Confirm the install succeeded (import all five packages).
|
|
281
283
|
e. Ask if the user wants these added to the project's dev dependencies.
|
|
282
284
|
|
|
283
285
|
## Navigation
|
package/README.md
CHANGED
|
@@ -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