relay-workflow 2.0.0

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.
Files changed (34) hide show
  1. package/.claude/skills/relay-analyze/SKILL.md +6 -0
  2. package/.claude/skills/relay-analyze/workflow.md +108 -0
  3. package/.claude/skills/relay-brainstorm/SKILL.md +6 -0
  4. package/.claude/skills/relay-brainstorm/workflow.md +114 -0
  5. package/.claude/skills/relay-cleanup/SKILL.md +6 -0
  6. package/.claude/skills/relay-cleanup/workflow.md +53 -0
  7. package/.claude/skills/relay-design/SKILL.md +6 -0
  8. package/.claude/skills/relay-design/workflow.md +108 -0
  9. package/.claude/skills/relay-discover/SKILL.md +6 -0
  10. package/.claude/skills/relay-discover/workflow.md +56 -0
  11. package/.claude/skills/relay-help/SKILL.md +6 -0
  12. package/.claude/skills/relay-help/workflow.md +165 -0
  13. package/.claude/skills/relay-new-issue/SKILL.md +6 -0
  14. package/.claude/skills/relay-new-issue/workflow.md +90 -0
  15. package/.claude/skills/relay-notebook/SKILL.md +6 -0
  16. package/.claude/skills/relay-notebook/workflow.md +264 -0
  17. package/.claude/skills/relay-order/SKILL.md +6 -0
  18. package/.claude/skills/relay-order/workflow.md +51 -0
  19. package/.claude/skills/relay-plan/SKILL.md +6 -0
  20. package/.claude/skills/relay-plan/workflow.md +133 -0
  21. package/.claude/skills/relay-resolve/SKILL.md +6 -0
  22. package/.claude/skills/relay-resolve/workflow.md +135 -0
  23. package/.claude/skills/relay-review/SKILL.md +6 -0
  24. package/.claude/skills/relay-review/workflow.md +163 -0
  25. package/.claude/skills/relay-scan/SKILL.md +6 -0
  26. package/.claude/skills/relay-scan/workflow.md +103 -0
  27. package/.claude/skills/relay-setup/SKILL.md +6 -0
  28. package/.claude/skills/relay-setup/workflow.md +296 -0
  29. package/.claude/skills/relay-verify/SKILL.md +6 -0
  30. package/.claude/skills/relay-verify/workflow.md +100 -0
  31. package/LICENSE +21 -0
  32. package/README.md +374 -0
  33. package/package.json +43 -0
  34. package/tools/cli.js +186 -0
@@ -0,0 +1,296 @@
1
+ # Relay: Setup Workflow
2
+
3
+ Set up the Relay workflow system for this project.
4
+
5
+ ## Phase 1 — Create structure and files
6
+
7
+ Create the following directory structure:
8
+ .relay/
9
+ .relay/issues/
10
+ .relay/features/
11
+ .relay/implemented/
12
+ .relay/notebooks/
13
+ .relay/archive/
14
+ .relay/archive/issues/
15
+ .relay/archive/features/
16
+ .relay/archive/notebooks/
17
+
18
+ ### Version file
19
+
20
+ **File: .relay/version.md**
21
+
22
+ Create this file to track the installed Relay version:
23
+
24
+ # Relay Version
25
+
26
+ *Do not edit manually — this file is created by /relay-setup and updated by the installer.*
27
+
28
+ ## Installed
29
+
30
+ | Field | Value |
31
+ |-------|-------|
32
+ | **Version** | 2.0.0 |
33
+ | **Installed** | [YYYY-MM-DD] |
34
+ | **Source** | https://github.com/momobits/Relay |
35
+ | **Format** | skills |
36
+
37
+ ## Changelog
38
+
39
+ ### 2.0.0 — Skills-based workflow
40
+ - Converted 14 prompts to Claude Code skills plus new `/relay-help` navigation skill (15 total)
41
+ - Added `/relay-help` navigation skill
42
+ - Skills are auto-discovered — no more `@file.md` references
43
+ - `.relay/` is now data-only (issues, features, status, config, archives)
44
+
45
+ ### 1.0.0 — Prompt-based workflow
46
+ - Initial release with 14 prompt files in `.relay/prompts/`
47
+ - Workflow driven by `@.relay/prompts/*.md` file references
48
+
49
+ ## Skills Manifest
50
+
51
+ | Skill | File | Purpose |
52
+ |-------|------|---------|
53
+ | /relay-setup | .claude/skills/relay-setup/ | Initialize Relay in a project |
54
+ | /relay-scan | .claude/skills/relay-scan/ | Generate relay-status.md |
55
+ | /relay-order | .claude/skills/relay-order/ | Prioritize work ordering |
56
+ | /relay-discover | .claude/skills/relay-discover/ | Scan codebase for issues |
57
+ | /relay-new-issue | .claude/skills/relay-new-issue/ | File a specific bug or gap |
58
+ | /relay-brainstorm | .claude/skills/relay-brainstorm/ | Explore feature ideas |
59
+ | /relay-design | .claude/skills/relay-design/ | Design features from brainstorm |
60
+ | /relay-cleanup | .claude/skills/relay-cleanup/ | Archive stale brainstorms |
61
+ | /relay-analyze | .claude/skills/relay-analyze/ | Validate before implementation |
62
+ | /relay-plan | .claude/skills/relay-plan/ | Create implementation plan |
63
+ | /relay-review | .claude/skills/relay-review/ | Adversarial review of plan |
64
+ | /relay-verify | .claude/skills/relay-verify/ | Verify implementation |
65
+ | /relay-notebook | .claude/skills/relay-notebook/ | Verification notebook |
66
+ | /relay-resolve | .claude/skills/relay-resolve/ | Close out and archive |
67
+ | /relay-help | .claude/skills/relay-help/ | Navigation guidance |
68
+
69
+ ### Status files
70
+
71
+ Create these initial status files:
72
+
73
+ **File: .relay/relay-status.md**
74
+
75
+ # Project Status
76
+
77
+ *Last generated: [YYYY-MM-DD]*
78
+
79
+ > This file is generated by running /relay-scan. Do not edit manually.
80
+
81
+ ---
82
+
83
+ ## Summary
84
+
85
+ | Category | Outstanding | Resolved | Total |
86
+ |----------|-------------|----------|-------|
87
+ | Issues (issues/) | 0 | 0 | 0 |
88
+ | Features (features/) | 0 | 0 | 0 |
89
+ | Implemented (implemented/) | — | 0 | 0 |
90
+
91
+ ---
92
+
93
+ ## Active Issues — .relay/issues/
94
+
95
+ No active issues. Run /relay-discover to scan the codebase.
96
+
97
+ ---
98
+
99
+ ## Active Features — .relay/features/
100
+
101
+ No active features.
102
+
103
+ ---
104
+
105
+ ## Implemented — .relay/implemented/
106
+
107
+ None yet.
108
+
109
+ **File: .relay/relay-ordering.md**
110
+
111
+ # Relay Ordering
112
+
113
+ *Last generated: [YYYY-MM-DD]*
114
+
115
+ > This file is generated by /relay-order and updated by /relay-resolve. Regenerated from scratch when /relay-order runs.
116
+
117
+ ---
118
+
119
+ No outstanding items. Run the discovery skills first to populate .relay/issues/ and .relay/features/.
120
+
121
+ **File: .relay/relay-config.md**
122
+
123
+ Create this file with the template structure below. Content will be
124
+ populated in Phase 2.
125
+
126
+ # Relay Config
127
+
128
+ *Created: [YYYY-MM-DD] by /relay-setup. Update manually as the project evolves.*
129
+
130
+ > Project-specific settings used by the relay workflow at runtime.
131
+ > Read by: /relay-review (edge cases), /relay-verify (test commands),
132
+ > /relay-notebook (notebook setup).
133
+
134
+ ---
135
+
136
+ ## Edge Cases
137
+
138
+ *Used by: /relay-review step 2 — apply every scenario below to the plan*
139
+
140
+ ### Optional Services / Feature Flags
141
+ <!-- Populated by Phase 2 scan -->
142
+
143
+ ### Config Boundaries
144
+ <!-- Populated by Phase 2 scan -->
145
+
146
+ ### Concurrency
147
+ <!-- Populated by Phase 2 scan -->
148
+
149
+ ### LLM / External API Failures
150
+ <!-- Populated by Phase 2 scan -->
151
+
152
+ ### Data Boundaries
153
+ <!-- Populated by Phase 2 scan -->
154
+
155
+ ---
156
+
157
+ ## Test Commands
158
+
159
+ *Used by: /relay-verify step 4 — select commands based on what was changed*
160
+
161
+ ### When to use each
162
+ <!-- Populated by Phase 2 scan -->
163
+
164
+ ---
165
+
166
+ ## Notebook Setup
167
+
168
+ *Used by: /relay-notebook — use these patterns verbatim when creating notebooks*
169
+
170
+ ### Imports
171
+ <!-- Populated by Phase 2 scan -->
172
+
173
+ ### Standard Fixtures
174
+ <!-- Populated by Phase 2 scan -->
175
+
176
+ ### Cleanup Pattern
177
+ <!-- Populated by Phase 2 scan -->
178
+
179
+ ### Async Pattern
180
+ <!-- Populated by Phase 2 scan -->
181
+
182
+ ---
183
+
184
+ ## Scoping Paths
185
+
186
+ *Used by: /relay-discover — scope patterns for this project*
187
+
188
+ <!-- Populated by Phase 2 scan -->
189
+
190
+ ### Relay readme
191
+
192
+ Fetch the latest Relay readme from the canonical source and write it to
193
+ `.relay/relay-readme.md`:
194
+
195
+ ```
196
+ curl -sL https://raw.githubusercontent.com/momobits/Relay/main/README.md \
197
+ -o .relay/relay-readme.md
198
+ ```
199
+
200
+ If the fetch fails (no internet, URL changed, etc.), tell the user:
201
+ "Could not fetch relay-readme.md from GitHub. Download it manually from
202
+ https://github.com/momobits/Relay and save it as .relay/relay-readme.md."
203
+
204
+ ## Phase 2 — Project scan and customization
205
+
206
+ After creating all files, scan the project codebase to populate
207
+ .relay/relay-config.md with project-specific configuration. For each
208
+ section below, scan the codebase first, then ask the user to confirm or
209
+ adjust before writing. If the user is unsure about any section, use the
210
+ scan results as the default.
211
+
212
+ relay-config.md is the single source of truth for project-specific
213
+ workflow settings. It is populated once at setup and maintained manually
214
+ as the project evolves (/relay-resolve also refreshes it after each
215
+ resolved phase). The skills /relay-review, /relay-verify, and
216
+ /relay-notebook read from it at runtime.
217
+
218
+ 1. **Edge cases → relay-config.md "## Edge Cases" section**:
219
+ Do a deep scan of the project for: optional integrations (feature-flagged
220
+ or conditionally-imported services), external service dependencies, config
221
+ options that change behavior, caching layers, database backends, async
222
+ concurrency patterns, and LLM/external API call sites.
223
+
224
+ For each edge case, produce a specific, actionable entry — not just "What
225
+ if X is disabled?" but the full scenario including: what code path it hits,
226
+ what the guard condition looks like (cite the file and pattern), and what
227
+ failure mode to verify the plan handles. Group entries by category.
228
+
229
+ Present the full list to the user for confirmation, then write it to the
230
+ Edge Cases section of .relay/relay-config.md.
231
+
232
+ 2. **Regression check commands → relay-config.md "## Test Commands" section**:
233
+ Scan the project for test frameworks, test directory structure, module
234
+ layout, and any special env vars or fixtures required to run tests.
235
+
236
+ Produce a complete, runnable command reference — not placeholders. Include:
237
+ - The exact command to run all unit tests
238
+ - The exact command to run all integration tests
239
+ - Targeted variants using actual directory/module paths discovered (not
240
+ `[relevant_test_files]` — use real paths like `tests/unit/test_storage/`)
241
+ - Import-check commands for each top-level module
242
+ - Any environment variables or setup steps required before running tests
243
+ - Which command set to use under which conditions (e.g., "run integration
244
+ tests when the change touches storage or API layers")
245
+
246
+ Present the commands to the user for confirmation, then write to the
247
+ Test Commands section of .relay/relay-config.md.
248
+
249
+ 3. **Notebook patterns → relay-config.md "## Notebook Setup" section**:
250
+ Do a deep scan of the project's public API, connection/teardown patterns,
251
+ async frameworks, test fixture conventions, and test data used in existing
252
+ tests. Produce complete, copy-paste-ready code for each subsection:
253
+
254
+ **Imports**: The full import block a notebook needs.
255
+ **Standard Fixtures**: Complete working code for isolated test fixtures.
256
+ **Cleanup Pattern**: Complete teardown code in the correct order.
257
+ **Async Pattern**: Document the exact async behavior for notebooks.
258
+
259
+ Present to the user for confirmation, then write to the Notebook Setup
260
+ section of .relay/relay-config.md.
261
+
262
+ 4. **Scoping examples for /relay-discover**:
263
+ Scan the project for its main module/package structure. Add a
264
+ "## Scoping Paths" section to .relay/relay-config.md listing the
265
+ discovered module paths the user can use when running /relay-discover.
266
+ Example format:
267
+ - Full scan: `/relay-discover`
268
+ - Module scope: `/relay-discover Focus on src/storage/ and src/api/`
269
+ - Concern scope: `/relay-discover Focus on security issues only`
270
+ Present to the user for confirmation, then write to relay-config.md.
271
+
272
+ 5. **Python environment for verification notebooks**:
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.
282
+
283
+ ## Navigation
284
+ When setup is complete, tell the user:
285
+ - "Setup complete. Next steps:
286
+ 1. Run **/relay-discover** to scan the codebase for issues
287
+ 2. Run **/relay-scan** to generate relay-status.md
288
+ 3. Run **/relay-order** to prioritize the work
289
+ 4. Run **/relay-analyze** to start working on the highest-priority item
290
+ Or run **/relay-brainstorm** to explore a new feature idea."
291
+
292
+ ## Notes
293
+
294
+ - Status files (relay-status.md, relay-ordering.md) are generated artifacts — they get real content after running the prepare skills
295
+ - relay-config.md is populated during Phase 2 and maintained manually + refreshed by /relay-resolve after each resolved phase
296
+ - The Relay skills (/relay-discover, /relay-scan, /relay-order, /relay-analyze, etc.) must be present in .claude/skills/ for the workflow to function
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: relay-verify
3
+ description: 'Verify implementation against the finalized plan. Checks diffs, completeness, correctness, and runs regression tests. Use after code changes are implemented.'
4
+ ---
5
+
6
+ Follow the instructions in ./workflow.md.
@@ -0,0 +1,100 @@
1
+ # Relay: Code — Verify Implementation
2
+
3
+ **Sequence**: `/relay-analyze` → `/relay-plan` → `/relay-review` → *implement* → **`/relay-verify`** → `/relay-notebook` → `/relay-resolve`
4
+
5
+ The implementation is complete. Verify it against the finalized plan.
6
+
7
+ 0. Read the target item file(s) and verify an ## Adversarial Review section
8
+ exists with verdict APPROVED or APPROVED WITH CHANGES (from /relay-review).
9
+ If no approved review exists, STOP and tell the user:
10
+ "No approved review found. Run **/relay-review** first."
11
+
12
+ 1. Diff check — for each step in the plan:
13
+ - Read the modified file and confirm the change matches the plan
14
+ - If the implementation deviated from the plan, is the deviation justified?
15
+ Check the ## Implementation Deviations section (if present) —
16
+ deviations documented there with a reason are justified. Also check
17
+ Verification Fixes from a previous verification pass.
18
+ - If the implementation deviated but NO ## Implementation Deviations
19
+ section exists, flag the deviation as undocumented in the
20
+ Verification Report's Issues Found section.
21
+ - Check that no unplanned changes were introduced (scope creep, drive-by
22
+ refactors, unnecessary additions)
23
+
24
+ 2. Completeness check:
25
+ - Were ALL steps in the plan implemented? List any that were skipped.
26
+ - Were ALL test changes made? Run the affected tests and report results.
27
+ - Were ALL files in the blast radius addressed?
28
+ - Are there TODO comments or placeholder code left behind?
29
+
30
+ 3. Correctness check — re-read each modified function in full:
31
+ - Does the logic flow correctly end-to-end?
32
+ - Are error paths handled?
33
+ - Are edge cases from the review (/relay-review) covered?
34
+ - Is the code consistent with surrounding patterns and style?
35
+ - Are there any off-by-one errors, incorrect variable names, or
36
+ copy-paste mistakes?
37
+
38
+ 4. Regression check:
39
+ Read the "## Test Commands" section of .relay/relay-config.md and run
40
+ the commands listed there for the affected modules. Select the
41
+ appropriate commands based on what the change touches (unit, integration,
42
+ import check, etc.).
43
+
44
+ 5. Persist the verification by APPENDING it to each relevant issue/feature
45
+ file in .relay/issues/ or .relay/features/, after the Implementation
46
+ Guidelines section (or after the Adversarial Review section if no
47
+ Implementation Guidelines exist). Add:
48
+
49
+ ---
50
+
51
+ ## Verification Report
52
+
53
+ *Verified: [YYYY-MM-DD]*
54
+
55
+ ### Implementation Status
56
+ | Step | Planned | Implemented | Correct |
57
+ |------|---------|-------------|---------|
58
+ | 1 | ... | YES/NO | YES/NO |
59
+ | 2 | ... | YES/NO | YES/NO |
60
+
61
+ ### Test Results
62
+ - [test output summary]
63
+
64
+ ### Issues Found
65
+ - [any discrepancies, bugs, or gaps discovered during verification]
66
+
67
+ ### Verification Fixes
68
+ [If INCOMPLETE or HAS ISSUES: for each issue found, document:]
69
+ - **Problem**: what was wrong
70
+ - **Fix**: what was changed to resolve it
71
+ - **Files modified**: additional files changed beyond the original plan
72
+ - **Risk**: any new regression risk from the fix
73
+ - **Rollback**: how to revert this specific verification fix
74
+
75
+ ### Verdict
76
+ - COMPLETE: all changes verified, tests pass, no issues
77
+ - INCOMPLETE: [list what's missing]
78
+ - HAS ISSUES: [list problems that need fixing]
79
+
80
+ If INCOMPLETE or HAS ISSUES, fix the problems, update the Verification
81
+ Fixes section above with what was done, then re-run this verification.
82
+ On re-verification, APPEND a new Verification Report section (do not
83
+ replace the previous one — the history of verification passes is
84
+ valuable). The issue/feature file should always reflect the final state.
85
+
86
+ ## Navigation
87
+ When finished, tell the user the next step based on the verdict:
88
+ - If COMPLETE:
89
+ "Next: run **/relay-notebook** to create and run the verification notebook." (The user may choose to skip to **/relay-resolve** — do not skip on their behalf.)
90
+ - If INCOMPLETE or HAS ISSUES:
91
+ "Issues were found and fixed. Say **'re-verify'** to re-run verification, or run **/relay-verify** again."
92
+
93
+ ## Notes
94
+
95
+ - This is not a rubber stamp — it should actively look for mistakes in the implementation
96
+ - "Read the modified function in full" means the whole function, not just the diff
97
+ - Running actual tests is required, not optional
98
+ - If issues are found, fix them and run this skill again — don't skip to the notebook
99
+ - The verification report is persisted in the issue/feature file so the full lifecycle lives in one place
100
+ - If verification finds issues that require additional code changes, those changes get their own mini plan/rollback in the Verification Fixes section — this ensures nothing is done without a revert path
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Momo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.