@torrent-tv/proxy 2.89.17 → 2.89.19

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 (300) hide show
  1. package/README.md +14 -3
  2. package/package.json +10 -2
  3. package/server.js +0 -11
  4. package/utils/client-log-file.js +147 -42
  5. package/.claude/commands/opsx/apply.md +0 -155
  6. package/.claude/commands/opsx/archive.md +0 -160
  7. package/.claude/commands/opsx/explore.md +0 -174
  8. package/.claude/commands/opsx/propose.md +0 -109
  9. package/.claude/commands/opsx/sync.md +0 -143
  10. package/.claude/skills/openspec-apply-change/SKILL.md +0 -159
  11. package/.claude/skills/openspec-archive-change/SKILL.md +0 -117
  12. package/.claude/skills/openspec-explore/SKILL.md +0 -289
  13. package/.claude/skills/openspec-propose/SKILL.md +0 -113
  14. package/.claude/skills/openspec-sync-specs/SKILL.md +0 -147
  15. package/.dockerignore +0 -5
  16. package/AGENTS.md +0 -363
  17. package/CHANGELOG.md +0 -2377
  18. package/Dockerfile +0 -30
  19. package/biome.json +0 -412
  20. package/corpus.tmp.json +0 -1
  21. package/docs/browser-proxy-contract.md +0 -155
  22. package/docs/container-architecture.md +0 -273
  23. package/docs/download-architecture.md +0 -261
  24. package/docs/encode-architecture.md +0 -765
  25. package/docs/encode-run-state.md +0 -96
  26. package/docs/logs.md +0 -151
  27. package/docs/playback-start-forecast.md +0 -113
  28. package/docs/socks5-egress-research.md +0 -114
  29. package/docs/storage-architecture.md +0 -273
  30. package/knip.json +0 -14
  31. package/main2.cpuprofile +0 -1
  32. package/openspec/changes/adaptive-bitrate/.openspec.yaml +0 -0
  33. package/openspec/changes/adaptive-bitrate/design.md +0 -92
  34. package/openspec/changes/adaptive-bitrate/proposal.md +0 -56
  35. package/openspec/changes/adaptive-bitrate/specs/adaptive-bitrate/spec.md +0 -51
  36. package/openspec/changes/adaptive-bitrate/tasks.md +0 -40
  37. package/openspec/changes/binary-distribution/.openspec.yaml +0 -2
  38. package/openspec/changes/binary-distribution/proposal.md +0 -53
  39. package/openspec/changes/chunked-request-bodies/design.md +0 -81
  40. package/openspec/changes/chunked-request-bodies/proposal.md +0 -53
  41. package/openspec/changes/chunked-request-bodies/specs/chunked-request-bodies/spec.md +0 -30
  42. package/openspec/changes/chunked-request-bodies/tasks.md +0 -40
  43. package/openspec/changes/cold-start/design.md +0 -98
  44. package/openspec/changes/cold-start/proposal.md +0 -62
  45. package/openspec/changes/cold-start/specs/cold-start/spec.md +0 -47
  46. package/openspec/changes/cold-start/tasks.md +0 -48
  47. package/openspec/changes/disk-cap/.openspec.yaml +0 -2
  48. package/openspec/changes/disk-cap/proposal.md +0 -37
  49. package/openspec/changes/disk-cap/specs/disk-cap/spec.md +0 -25
  50. package/openspec/changes/disk-cap/tasks.md +0 -19
  51. package/openspec/changes/proxy-observability/.openspec.yaml +0 -2
  52. package/openspec/changes/proxy-observability/design.md +0 -38
  53. package/openspec/changes/proxy-observability/proposal.md +0 -49
  54. package/openspec/changes/proxy-observability/specs/observability/spec.md +0 -33
  55. package/openspec/changes/proxy-observability/tasks.md +0 -21
  56. package/openspec/changes/seek-debounce/.openspec.yaml +0 -0
  57. package/openspec/changes/seek-debounce/design.md +0 -118
  58. package/openspec/changes/seek-debounce/proposal.md +0 -59
  59. package/openspec/changes/seek-debounce/specs/seek-debounce/spec.md +0 -41
  60. package/openspec/changes/seek-debounce/tasks.md +0 -33
  61. package/openspec/changes/subtitle-language/.openspec.yaml +0 -2
  62. package/openspec/changes/subtitle-language/proposal.md +0 -50
  63. package/openspec/changes/subtitle-language/specs/subtitle-language/spec.md +0 -34
  64. package/openspec/changes/subtitle-language/tasks.md +0 -26
  65. package/openspec/changes/track-selection/.openspec.yaml +0 -2
  66. package/openspec/changes/track-selection/design.md +0 -47
  67. package/openspec/changes/track-selection/proposal.md +0 -45
  68. package/openspec/changes/track-selection/specs/track-selection/spec.md +0 -41
  69. package/openspec/changes/track-selection/tasks.md +0 -20
  70. package/openspec/changes/transcode-quality/.openspec.yaml +0 -2
  71. package/openspec/changes/transcode-quality/proposal.md +0 -51
  72. package/openspec/changes/transcode-quality/specs/transcode-quality/spec.md +0 -139
  73. package/openspec/changes/transcode-quality/tasks.md +0 -63
  74. package/openspec/config.yaml +0 -38
  75. package/public/.well-known/appspecific/com.chrome.devtools.json +0 -1
  76. package/research/delivery-wedge-stand-ladder-2026-09-13.md +0 -329
  77. package/research/double-spawn-2026-09-10.md +0 -171
  78. package/research/handover-2026-09-13.md +0 -209
  79. package/research/handover-reader-claims-removal-2026-09-12.md +0 -166
  80. package/research/piece-withdrawn-but-still-claimed-2026-09-12.md +0 -175
  81. package/research/preset-benchmark-size-scaling-2026-08-22.md +0 -55
  82. package/research/priority-map-is-the-truth-2026-09-12.md +0 -225
  83. package/research/valgrind-replica-2026-08-27/logs.tar.gz +0 -0
  84. package/scripts/build-audio-samples.mjs +0 -31
  85. package/scripts/render-run-graph.js +0 -173
  86. package/test/asset-paths.test.js +0 -28
  87. package/test/audio-buffer-continuity.test.js +0 -77
  88. package/test/audio-calibration.test.js +0 -23
  89. package/test/audio-inventory.test.js +0 -212
  90. package/test/audio-track-bitrate.test.js +0 -40
  91. package/test/audio-warm-recorded.test.js +0 -63
  92. package/test/auto-quality-step.test.js +0 -762
  93. package/test/available-share.test.js +0 -76
  94. package/test/background-fill.test.js +0 -190
  95. package/test/client-log-file.test.js +0 -126
  96. package/test/client-logs-route.test.js +0 -34
  97. package/test/coalesce.test.js +0 -39
  98. package/test/completed-files.test.js +0 -115
  99. package/test/concurrent-cost.test.js +0 -148
  100. package/test/container-media-info.test.js +0 -228
  101. package/test/contention.test.js +0 -76
  102. package/test/core-dumps.test.js +0 -57
  103. package/test/coverage-follows-the-disk.test.js +0 -233
  104. package/test/coverage-map.test.js +0 -195
  105. package/test/cue-push-carries-what-the-walk-found.test.js +0 -58
  106. package/test/cut-times-timeline.test.js +0 -65
  107. package/test/cuts-follow-published-grid.test.js +0 -109
  108. package/test/data-channel-frame.test.js +0 -63
  109. package/test/data-channel-viewer-lifecycle.test.js +0 -193
  110. package/test/dead-torrent-handle.test.js +0 -52
  111. package/test/declared-rates.test.js +0 -116
  112. package/test/declared-tracks.test.js +0 -43
  113. package/test/decode-cost-fit.test.js +0 -202
  114. package/test/decode-cost.test.js +0 -475
  115. package/test/delivery-probe-field.test.js +0 -173
  116. package/test/delivery-probe.test.js +0 -382
  117. package/test/demand-register.test.js +0 -206
  118. package/test/dht-bootstrap.test.js +0 -72
  119. package/test/drain-threat.test.js +0 -65
  120. package/test/duplicate-add.test.js +0 -48
  121. package/test/encode-admission.test.js +0 -170
  122. package/test/encode-cost.test.js +0 -275
  123. package/test/encode-exit.test.js +0 -111
  124. package/test/encode-orchestrator.test.js +0 -426
  125. package/test/encode-plan-viewers.test.js +0 -725
  126. package/test/encode-plan.test.js +0 -545
  127. package/test/encode-run-state.test.js +0 -314
  128. package/test/encode-run.test.js +0 -248
  129. package/test/encode-slope.test.js +0 -46
  130. package/test/encoded-output.test.js +0 -39
  131. package/test/encoder-kinds.test.js +0 -122
  132. package/test/encoder-readings.test.js +0 -68
  133. package/test/episode-naming.test.js +0 -131
  134. package/test/every-claimant-is-told-its-share.test.js +0 -152
  135. package/test/failed-encoder-still-serves-what-exists.test.js +0 -354
  136. package/test/failed-start-breaker.test.js +0 -202
  137. package/test/fastest-wires.test.js +0 -143
  138. package/test/ffmpeg-stream-counts.test.js +0 -101
  139. package/test/file-edges.test.js +0 -191
  140. package/test/files-in-use.test.js +0 -34
  141. package/test/fixtures/audio-frame-boundary.json +0 -1
  142. package/test/fixtures/refused-audio-20261002.json +0 -10
  143. package/test/fmp4-presentation-clock.test.js +0 -148
  144. package/test/fmp4-self-contained.test.js +0 -80
  145. package/test/fmp4-timestamps.test.js +0 -140
  146. package/test/fmp4-track-completeness.test.js +0 -41
  147. package/test/format-keyed-outputs.test.js +0 -78
  148. package/test/health-metrics.test.js +0 -36
  149. package/test/held-read-ownership.test.js +0 -77
  150. package/test/held-request-width.test.js +0 -157
  151. package/test/helpers/encode-run.js +0 -248
  152. package/test/helpers/held-file.js +0 -77
  153. package/test/helpers/manager.js +0 -62
  154. package/test/helpers/matroska-file.js +0 -296
  155. package/test/helpers/output-spec.js +0 -63
  156. package/test/host-load.test.js +0 -68
  157. package/test/index-accuracy-is-about-the-file.test.js +0 -128
  158. package/test/init-compat.test.js +0 -219
  159. package/test/input-lost-quiets-the-plan.test.js +0 -261
  160. package/test/input-unavailable.test.js +0 -48
  161. package/test/installation-id.test.js +0 -39
  162. package/test/keeping-period.test.js +0 -83
  163. package/test/keyframe-index-accuracy.test.js +0 -188
  164. package/test/keyframe-table-budget.test.js +0 -123
  165. package/test/keyframes-belong-to-the-file.test.js +0 -249
  166. package/test/learned-median.test.js +0 -37
  167. package/test/letting-go-asks-who-is-watching.test.js +0 -191
  168. package/test/limit-row-by-area.test.js +0 -60
  169. package/test/link-budget.test.js +0 -111
  170. package/test/link-probe.test.js +0 -56
  171. package/test/local-encoding-data.test.js +0 -273
  172. package/test/logger-repeats.test.js +0 -134
  173. package/test/look-ahead-coverage.test.js +0 -56
  174. package/test/manager-surface.test.js +0 -291
  175. package/test/matroska-blocks.test.js +0 -0
  176. package/test/matroska-cluster-discovery.test.js +0 -323
  177. package/test/matroska-cues-track.test.js +0 -192
  178. package/test/media-time.test.js +0 -62
  179. package/test/memory-budget.test.js +0 -390
  180. package/test/move-cost.test.js +0 -216
  181. package/test/mp4-composition-times.test.js +0 -0
  182. package/test/mp4-subtitles.test.js +0 -173
  183. package/test/one-authority.test.js +0 -285
  184. package/test/one-budget.test.js +0 -149
  185. package/test/one-output-one-session.test.js +0 -273
  186. package/test/one-resource-divided.test.js +0 -185
  187. package/test/one-serving-output-per-height.test.js +0 -458
  188. package/test/orchestrator-wired.test.js +0 -207
  189. package/test/output-catalog.test.js +0 -39
  190. package/test/output-shape.test.js +0 -21
  191. package/test/output-spec.test.js +0 -251
  192. package/test/output-speed.test.js +0 -92
  193. package/test/outputs-being-prepared.test.js +0 -40
  194. package/test/packet-witness-ring.test.js +0 -236
  195. package/test/packet-witness.test.js +0 -148
  196. package/test/piece-completeness.test.js +0 -78
  197. package/test/piece-disk-store.test.js +0 -401
  198. package/test/piece-from-whole-file.test.js +0 -129
  199. package/test/piece-lru.test.js +0 -319
  200. package/test/piece-reader.test.js +0 -162
  201. package/test/piece-selection-offset.test.js +0 -85
  202. package/test/piece-store-eviction.test.js +0 -595
  203. package/test/piece-store-never-refuses.test.js +0 -153
  204. package/test/piece-store-reservations.test.js +0 -403
  205. package/test/piece-store-slow-disk.test.js +0 -159
  206. package/test/piece-tail.test.js +0 -97
  207. package/test/plan-host-timings.test.js +0 -68
  208. package/test/plan-is-steady.test.js +0 -225
  209. package/test/playback-readiness.test.js +0 -518
  210. package/test/playback-start-regressions.test.js +0 -101
  211. package/test/priority-map-download.test.js +0 -174
  212. package/test/priority-map-emptied.test.js +0 -204
  213. package/test/priority-map-per-output.test.js +0 -215
  214. package/test/priority-map.test.js +0 -163
  215. package/test/probe-wedge-certainty.test.js +0 -60
  216. package/test/produced-copy-choice.test.js +0 -213
  217. package/test/published-timeline.test.js +0 -83
  218. package/test/quality-offer.test.js +0 -160
  219. package/test/quality-variants.test.js +0 -1274
  220. package/test/rate-control-in-the-output.test.js +0 -181
  221. package/test/read-survives-withdrawal.test.js +0 -164
  222. package/test/read-window.test.js +0 -365
  223. package/test/reads-not-yet-arrived.test.js +0 -218
  224. package/test/resume-warm.test.js +0 -39
  225. package/test/run-graph-drift.test.js +0 -37
  226. package/test/run-inputs.test.js +0 -80
  227. package/test/run-intervals.test.js +0 -100
  228. package/test/run-position-follows-published-grid.test.js +0 -89
  229. package/test/run-progress.test.js +0 -64
  230. package/test/same-height-switch.test.js +0 -663
  231. package/test/seek-frees-the-viewers-requests.test.js +0 -217
  232. package/test/seek-landing.test.js +0 -109
  233. package/test/seek-target-not-superseded.test.js +0 -195
  234. package/test/segment-closed-on-both-branches.test.js +0 -114
  235. package/test/segment-cut-times.test.js +0 -63
  236. package/test/segment-demand.test.js +0 -80
  237. package/test/segment-hold-supersede.test.js +0 -91
  238. package/test/segment-judged-by-its-own-header.test.js +0 -222
  239. package/test/segment-serve-wiring.test.js +0 -481
  240. package/test/segment-store-eviction.test.js +0 -247
  241. package/test/segment-store.test.js +0 -352
  242. package/test/segment-true-start.test.js +0 -86
  243. package/test/segments-are-shared.test.js +0 -176
  244. package/test/send-chunk-bytes.test.js +0 -86
  245. package/test/serving-existing-output.test.js +0 -111
  246. package/test/serving-output.test.js +0 -102
  247. package/test/shared-piece-store.test.js +0 -310
  248. package/test/sidecar-naming.test.js +0 -142
  249. package/test/soundtrack-rate-bound.test.js +0 -289
  250. package/test/source-file.test.js +0 -133
  251. package/test/source-files-route.test.js +0 -113
  252. package/test/source-registry.test.js +0 -18
  253. package/test/split-a-stretch.test.js +0 -139
  254. package/test/stale-request-after-seek.test.js +0 -158
  255. package/test/startup-readings.test.js +0 -124
  256. package/test/stream-route.test.js +0 -237
  257. package/test/subtitle-cue-framing.test.js +0 -200
  258. package/test/subtitle-cue-source.test.js +0 -102
  259. package/test/subtitle-cue-walk.test.js +0 -385
  260. package/test/subtitle-cursor.test.js +0 -63
  261. package/test/subtitle-defaults.test.js +0 -118
  262. package/test/subtitle-language.test.js +0 -252
  263. package/test/subtitle-metadata.test.js +0 -15
  264. package/test/subtitle-plan-waits.test.js +0 -125
  265. package/test/subtitle-track-numbering.test.js +0 -391
  266. package/test/supply-margin.test.js +0 -190
  267. package/test/swarm-follows-readers.test.js +0 -174
  268. package/test/swarm-reach.test.js +0 -130
  269. package/test/swarm-selection.test.js +0 -220
  270. package/test/tail-duplication.test.js +0 -167
  271. package/test/the-channel-has-both-ends.test.js +0 -91
  272. package/test/the-torrent-thread-serves-bytes.test.js +0 -107
  273. package/test/thread-pool.test.js +0 -53
  274. package/test/timeline.test.js +0 -84
  275. package/test/torrent-contents.test.js +0 -235
  276. package/test/torrent-cost.test.js +0 -71
  277. package/test/torrent-files.test.js +0 -221
  278. package/test/torrent-naming.test.js +0 -255
  279. package/test/tracks-begin-together.test.js +0 -209
  280. package/test/tunnel-renewal.test.js +0 -167
  281. package/test/two-viewers-one-picture.test.js +0 -508
  282. package/test/upload-hurry.test.js +0 -186
  283. package/test/usrsctp-state.test.js +0 -131
  284. package/test/video-facts.test.js +0 -102
  285. package/test/viewer-assignments.test.js +0 -143
  286. package/test/viewer-outputs.test.js +0 -285
  287. package/test/viewer-presence.test.js +0 -116
  288. package/test/viewer-requests-admission.test.js +0 -92
  289. package/test/viewer-starts-on-map.test.js +0 -27
  290. package/test/viewer-states.test.js +0 -192
  291. package/test/viewer-subtitle-subscription.test.js +0 -96
  292. package/test/viewer.test.js +0 -139
  293. package/test/viewing-generations.test.js +0 -390
  294. package/test/visible-rung.test.js +0 -37
  295. package/test/wait-ledger.test.js +0 -100
  296. package/test/webrtc-shim.test.js +0 -149
  297. package/test/wedge-certainty.test.js +0 -131
  298. package/test/whole-file-held-read.test.js +0 -30
  299. package/test/withdraw-piece-claim.test.js +0 -212
  300. package/test/worker-channel.test.js +0 -158
@@ -1,174 +0,0 @@
1
- ---
2
- name: "OPSX: Explore"
3
- description: "Enter explore mode - think through ideas, investigate problems, clarify requirements"
4
- category: Workflow
5
- tags: [workflow, explore, experimental, thinking]
6
- ---
7
-
8
- Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
9
-
10
- **IMPORTANT: Explore mode is for thinking, not implementing.** You may read files, search code, and investigate the codebase, but you must NEVER write code or implement features. If the user asks you to implement something, remind them to exit explore mode first and create a change proposal. You MAY create OpenSpec artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing.
11
-
12
- **This is a stance, not a workflow.** There are no fixed steps, no required sequence, no mandatory outputs. You're a thinking partner helping the user explore.
13
-
14
- **Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
15
-
16
- **Input**: The argument after `/opsx:explore` is whatever the user wants to think about. Could be:
17
- - A vague idea: "real-time collaboration"
18
- - A specific problem: "the auth system is getting unwieldy"
19
- - A change name: "add-dark-mode" (to explore in context of that change)
20
- - A comparison: "postgres vs sqlite for this"
21
- - Nothing (just enter explore mode)
22
-
23
- ---
24
-
25
- ## The Stance
26
-
27
- - **Curious, not prescriptive** - Ask questions that emerge naturally, don't follow a script
28
- - **Open threads, not interrogations** - Surface multiple interesting directions and let the user follow what resonates. Don't funnel them through a single path of questions.
29
- - **Visual** - Use ASCII diagrams liberally when they'd help clarify thinking
30
- - **Adaptive** - Follow interesting threads, pivot when new information emerges
31
- - **Patient** - Don't rush to conclusions, let the shape of the problem emerge
32
- - **Grounded** - Explore the actual codebase when relevant, don't just theorize
33
-
34
- ---
35
-
36
- ## What You Might Do
37
-
38
- Depending on what the user brings, you might:
39
-
40
- **Explore the problem space**
41
- - Ask clarifying questions that emerge from what they said
42
- - Challenge assumptions
43
- - Reframe the problem
44
- - Find analogies
45
-
46
- **Investigate the codebase**
47
- - Map existing architecture relevant to the discussion
48
- - Find integration points
49
- - Identify patterns already in use
50
- - Surface hidden complexity
51
-
52
- **Compare options**
53
- - Brainstorm multiple approaches
54
- - Build comparison tables
55
- - Sketch tradeoffs
56
- - Recommend a path (if asked)
57
-
58
- **Visualize**
59
- ```
60
- ┌─────────────────────────────────────────┐
61
- │ Use ASCII diagrams liberally │
62
- ├─────────────────────────────────────────┤
63
- │ │
64
- │ ┌────────┐ ┌────────┐ │
65
- │ │ State │────────▶│ State │ │
66
- │ │ A │ │ B │ │
67
- │ └────────┘ └────────┘ │
68
- │ │
69
- │ System diagrams, state machines, │
70
- │ data flows, architecture sketches, │
71
- │ dependency graphs, comparison tables │
72
- │ │
73
- └─────────────────────────────────────────┘
74
- ```
75
-
76
- **Surface risks and unknowns**
77
- - Identify what could go wrong
78
- - Find gaps in understanding
79
- - Suggest spikes or investigations
80
-
81
- ---
82
-
83
- ## OpenSpec Awareness
84
-
85
- You have full context of the OpenSpec system. Use it naturally, don't force it.
86
-
87
- ### Check for context
88
-
89
- At the start, quickly check what exists:
90
- ```bash
91
- openspec list --json
92
- ```
93
-
94
- This tells you:
95
- - If there are active changes
96
- - Their names, schemas, and status
97
- - What the user might be working on
98
-
99
- If the user mentioned a specific change name, read its artifacts for context.
100
-
101
- ### When no change exists
102
-
103
- Think freely. When insights crystallize, you might offer:
104
-
105
- - "This feels solid enough to start a change. Want me to create a proposal?"
106
- - Or keep exploring - no pressure to formalize
107
-
108
- ### When a change exists
109
-
110
- If the user mentions a change or you detect one is relevant:
111
-
112
- 1. **Resolve and read existing artifacts for context**
113
- - Run `openspec status --change "<name>" --json`.
114
- - Use `changeRoot`, `artifactPaths`, and `actionContext` from the status JSON.
115
- - Read existing files from `artifactPaths.<artifact>.existingOutputPaths`.
116
-
117
- 2. **Reference them naturally in conversation**
118
- - "Your design mentions using Redis, but we just realized SQLite fits better..."
119
- - "The proposal scopes this to premium users, but we're now thinking everyone..."
120
-
121
- 3. **Offer to capture when decisions are made**
122
-
123
- | Insight Type | Where to Capture |
124
- |----------------------------|--------------------------------|
125
- | New requirement discovered | `specs/<capability>/spec.md` |
126
- | Requirement changed | `specs/<capability>/spec.md` |
127
- | Design decision made | `design.md` |
128
- | Scope changed | `proposal.md` |
129
- | New work identified | `tasks.md` |
130
- | Assumption invalidated | Relevant artifact |
131
-
132
- Example offers:
133
- - "That's a design decision. Capture it in design.md?"
134
- - "This is a new requirement. Add it to specs?"
135
- - "This changes scope. Update the proposal?"
136
-
137
- 4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
138
-
139
- ---
140
-
141
- ## What You Don't Have To Do
142
-
143
- - Follow a script
144
- - Ask the same questions every time
145
- - Produce a specific artifact
146
- - Reach a conclusion
147
- - Stay on topic if a tangent is valuable
148
- - Be brief (this is thinking time)
149
-
150
- ---
151
-
152
- ## Ending Discovery
153
-
154
- There's no required ending. Discovery might:
155
-
156
- - **Flow into a proposal**: "Ready to start? I can create a change proposal."
157
- - **Result in artifact updates**: "Updated design.md with these decisions"
158
- - **Just provide clarity**: User has what they need, moves on
159
- - **Continue later**: "We can pick this up anytime"
160
-
161
- When things crystallize, you might offer a summary - but it's optional. Sometimes the thinking IS the value.
162
-
163
- ---
164
-
165
- ## Guardrails
166
-
167
- - **Don't implement** - Never write code or implement features. Creating OpenSpec artifacts is fine, writing application code is not.
168
- - **Don't fake understanding** - If something is unclear, dig deeper
169
- - **Don't rush** - Discovery is thinking time, not task time
170
- - **Don't force structure** - Let patterns emerge naturally
171
- - **Don't auto-capture** - Offer to save insights, don't just do it
172
- - **Do visualize** - A good diagram is worth many paragraphs
173
- - **Do explore the codebase** - Ground discussions in reality
174
- - **Do question assumptions** - Including the user's and your own
@@ -1,109 +0,0 @@
1
- ---
2
- name: "OPSX: Propose"
3
- description: Propose a new change - create it and generate all artifacts in one step
4
- category: Workflow
5
- tags: [workflow, artifacts, experimental]
6
- ---
7
-
8
- Propose a new change - create the change and generate all artifacts in one step.
9
-
10
- I'll create a change with artifacts:
11
- - proposal.md (what & why)
12
- - design.md (how)
13
- - tasks.md (implementation steps)
14
-
15
- When ready to implement, run /opsx:apply
16
-
17
- ---
18
-
19
- **Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
20
-
21
- **Input**: The argument after `/opsx:propose` is the change name (kebab-case), OR a description of what the user wants to build.
22
-
23
- **Steps**
24
-
25
- 1. **If no input provided, ask what they want to build**
26
-
27
- Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
28
- > "What change do you want to work on? Describe what you want to build or fix."
29
-
30
- From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
31
-
32
- **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
33
-
34
- 2. **Create the change directory**
35
- ```bash
36
- openspec new change "<name>"
37
- ```
38
- This creates a scaffolded change in the planning home resolved by the CLI with `.openspec.yaml`.
39
-
40
- 3. **Get the artifact build order**
41
- ```bash
42
- openspec status --change "<name>" --json
43
- ```
44
- Parse the JSON to get:
45
- - `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
46
- - `artifacts`: list of all artifacts with their status and dependencies
47
- - `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context. Use these instead of assuming repo-local paths.
48
-
49
- 4. **Create artifacts in sequence until apply-ready**
50
-
51
- Use the **TodoWrite tool** to track progress through the artifacts.
52
-
53
- Loop through artifacts in dependency order (artifacts with no pending dependencies first):
54
-
55
- a. **For each artifact that is `ready` (dependencies satisfied)**:
56
- - Get instructions:
57
- ```bash
58
- openspec instructions <artifact-id> --change "<name>" --json
59
- ```
60
- - The instructions JSON includes:
61
- - `context`: Project background (constraints for you - do NOT include in output)
62
- - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
63
- - `template`: The structure to use for your output file
64
- - `instruction`: Schema-specific guidance for this artifact type
65
- - `resolvedOutputPath`: Resolved path or pattern to write the artifact
66
- - `dependencies`: Completed artifacts to read for context
67
- - Read any completed dependency files for context
68
- - Create the artifact file using `template` as the structure and write it to `resolvedOutputPath`
69
- - Apply `context` and `rules` as constraints - but do NOT copy them into the file
70
- - Show brief progress: "Created <artifact-id>"
71
-
72
- b. **Continue until all `applyRequires` artifacts are complete**
73
- - After creating each artifact, re-run `openspec status --change "<name>" --json`
74
- - Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
75
- - Stop when all `applyRequires` artifacts are done
76
-
77
- c. **If an artifact requires user input** (unclear context):
78
- - Use **AskUserQuestion tool** to clarify
79
- - Then continue with creation
80
-
81
- 5. **Show final status**
82
- ```bash
83
- openspec status --change "<name>"
84
- ```
85
-
86
- **Output**
87
-
88
- After completing all artifacts, summarize:
89
- - Change name and location
90
- - List of artifacts created with brief descriptions
91
- - What's ready: "All artifacts created! Ready for implementation."
92
- - Prompt: "Run `/opsx:apply` to start implementing."
93
-
94
- **Artifact Creation Guidelines**
95
-
96
- - Follow the `instruction` field from `openspec instructions` for each artifact type
97
- - The schema defines what each artifact should contain - follow it
98
- - Read dependency artifacts for context before creating new ones
99
- - Use `template` as the structure for your output file - fill in its sections
100
- - **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
101
- - Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
102
- - These guide what you write, but should never appear in the output
103
-
104
- **Guardrails**
105
- - Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
106
- - Always read dependency artifacts before creating a new one
107
- - If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
108
- - If a change with that name already exists, ask if user wants to continue it or create a new one
109
- - Verify each artifact file exists after writing before proceeding to next
@@ -1,143 +0,0 @@
1
- ---
2
- name: "OPSX: Sync"
3
- description: Sync delta specs from a change to main specs
4
- category: Workflow
5
- tags: [workflow, specs, experimental]
6
- ---
7
-
8
- Sync delta specs from a change to main specs.
9
-
10
- This is an **agent-driven** operation - you will read delta specs and directly edit main specs to apply the changes. This allows intelligent merging (e.g., adding a scenario without copying the entire requirement).
11
-
12
- **Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
13
-
14
- **Input**: Optionally specify a change name after `/opsx:sync` (e.g., `/opsx:sync add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
15
-
16
- **Steps**
17
-
18
- 1. **If no change name provided, prompt for selection**
19
-
20
- Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
21
-
22
- Show changes that have delta specs (under `specs/` directory).
23
-
24
- **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
25
-
26
- 2. **Resolve change context**
27
-
28
- Run:
29
- ```bash
30
- openspec status --change "<name>" --json
31
- ```
32
-
33
- 3. **Find delta specs**
34
-
35
- Use `artifactPaths.specs.existingOutputPaths` from the status JSON as the list of delta spec files.
36
-
37
- Each delta spec file contains sections like:
38
- - `## ADDED Requirements` - New requirements to add
39
- - `## MODIFIED Requirements` - Changes to existing requirements
40
- - `## REMOVED Requirements` - Requirements to remove
41
- - `## RENAMED Requirements` - Requirements to rename (FROM:/TO: format)
42
-
43
- If no delta specs found, inform user and stop.
44
-
45
- 4. **For each delta spec, apply changes to main specs**
46
-
47
- For each repo-local capability delta spec path returned by the CLI:
48
-
49
- a. **Read the delta spec** to understand the intended changes
50
-
51
- b. **Read the main spec** at `openspec/specs/<capability>/spec.md` (may not exist yet)
52
-
53
- c. **Apply changes intelligently**:
54
-
55
- **ADDED Requirements:**
56
- - If requirement doesn't exist in main spec → add it
57
- - If requirement already exists → update it to match (treat as implicit MODIFIED)
58
-
59
- **MODIFIED Requirements:**
60
- - Find the requirement in main spec
61
- - Apply the changes - this can be:
62
- - Adding new scenarios (don't need to copy existing ones)
63
- - Modifying existing scenarios
64
- - Changing the requirement description
65
- - Preserve scenarios/content not mentioned in the delta
66
-
67
- **REMOVED Requirements:**
68
- - Remove the entire requirement block from main spec
69
-
70
- **RENAMED Requirements:**
71
- - Find the FROM requirement, rename to TO
72
-
73
- d. **Create new main spec** if capability doesn't exist yet:
74
- - Create `openspec/specs/<capability>/spec.md`
75
- - Add Purpose section (can be brief, mark as TBD)
76
- - Add Requirements section with the ADDED requirements
77
-
78
- 5. **Show summary**
79
-
80
- After applying all changes, summarize:
81
- - Which capabilities were updated
82
- - What changes were made (requirements added/modified/removed/renamed)
83
-
84
- **Delta Spec Format Reference**
85
-
86
- ```markdown
87
- ## ADDED Requirements
88
-
89
- ### Requirement: New Feature
90
- The system SHALL do something new.
91
-
92
- #### Scenario: Basic case
93
- - **WHEN** user does X
94
- - **THEN** system does Y
95
-
96
- ## MODIFIED Requirements
97
-
98
- ### Requirement: Existing Feature
99
- #### Scenario: New scenario to add
100
- - **WHEN** user does A
101
- - **THEN** system does B
102
-
103
- ## REMOVED Requirements
104
-
105
- ### Requirement: Deprecated Feature
106
-
107
- ## RENAMED Requirements
108
-
109
- - FROM: `### Requirement: Old Name`
110
- - TO: `### Requirement: New Name`
111
- ```
112
-
113
- **Key Principle: Intelligent Merging**
114
-
115
- Unlike programmatic merging, you can apply **partial updates**:
116
- - To add a scenario, just include that scenario under MODIFIED - don't copy existing scenarios
117
- - The delta represents *intent*, not a wholesale replacement
118
- - Use your judgment to merge changes sensibly
119
-
120
- **Output On Success**
121
-
122
- ```
123
- ## Specs Synced: <change-name>
124
-
125
- Updated main specs:
126
-
127
- **<capability-1>**:
128
- - Added requirement: "New Feature"
129
- - Modified requirement: "Existing Feature" (added 1 scenario)
130
-
131
- **<capability-2>**:
132
- - Created new spec file
133
- - Added requirement: "Another Feature"
134
-
135
- Main specs are now updated. The change remains active - archive when implementation is complete.
136
- ```
137
-
138
- **Guardrails**
139
- - Read both delta and main specs before making changes
140
- - Preserve existing content not mentioned in delta
141
- - If something is unclear, ask for clarification
142
- - Show what you're changing as you go
143
- - The operation should be idempotent - running twice should give same result
@@ -1,159 +0,0 @@
1
- ---
2
- name: openspec-apply-change
3
- description: Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
4
- license: MIT
5
- compatibility: Requires openspec CLI.
6
- metadata:
7
- author: openspec
8
- version: "1.0"
9
- generatedBy: "1.5.0"
10
- ---
11
-
12
- Implement tasks from an OpenSpec change.
13
-
14
- **Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
15
-
16
- **Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
17
-
18
- **Steps**
19
-
20
- 1. **Select the change**
21
-
22
- If a name is provided, use it. Otherwise:
23
- - Infer from conversation context if the user mentioned a change
24
- - Auto-select if only one active change exists
25
- - If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
26
-
27
- Always announce: "Using change: <name>" and how to override (e.g., `/opsx:apply <other>`).
28
-
29
- 2. **Check status to understand the schema**
30
- ```bash
31
- openspec status --change "<name>" --json
32
- ```
33
- Parse the JSON to understand:
34
- - `schemaName`: The workflow being used (e.g., "spec-driven")
35
- - `planningHome`, `changeRoot`, and `actionContext`: planning scope and edit constraints
36
- - Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
37
-
38
- 3. **Get apply instructions**
39
-
40
- ```bash
41
- openspec instructions apply --change "<name>" --json
42
- ```
43
-
44
- This returns:
45
- - `contextFiles`: artifact ID -> array of concrete file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
46
- - Progress (total, complete, remaining)
47
- - Task list with status
48
- - Dynamic instruction based on current state
49
-
50
- **Handle states:**
51
- - If `state: "blocked"` (missing artifacts): show message, suggest using openspec-continue-change
52
- - If `state: "all_done"`: congratulate, suggest archive
53
- - Otherwise: proceed to implementation
54
-
55
- 4. **Read context files**
56
-
57
- Read every file path listed under `contextFiles` from the apply instructions output.
58
- The files depend on the schema being used:
59
- - **spec-driven**: proposal, specs, design, tasks
60
- - Other schemas: follow the contextFiles from CLI output
61
-
62
- 5. **Show current progress**
63
-
64
- Display:
65
- - Schema being used
66
- - Progress: "N/M tasks complete"
67
- - Remaining tasks overview
68
- - Dynamic instruction from CLI
69
-
70
- 6. **Implement tasks (loop until done or blocked)**
71
-
72
- For each pending task:
73
- - Show which task is being worked on
74
- - Make the code changes required
75
- - Keep changes minimal and focused
76
- - Mark task complete in the tasks file: `- [ ]` → `- [x]`
77
- - Continue to next task
78
-
79
- **Pause if:**
80
- - Task is unclear → ask for clarification
81
- - Implementation reveals a design issue → suggest updating artifacts
82
- - Error or blocker encountered → report and wait for guidance
83
- - User interrupts
84
-
85
- 7. **On completion or pause, show status**
86
-
87
- Display:
88
- - Tasks completed this session
89
- - Overall progress: "N/M tasks complete"
90
- - If all done: suggest archive
91
- - If paused: explain why and wait for guidance
92
-
93
- **Output During Implementation**
94
-
95
- ```
96
- ## Implementing: <change-name> (schema: <schema-name>)
97
-
98
- Working on task 3/7: <task description>
99
- [...implementation happening...]
100
- ✓ Task complete
101
-
102
- Working on task 4/7: <task description>
103
- [...implementation happening...]
104
- ✓ Task complete
105
- ```
106
-
107
- **Output On Completion**
108
-
109
- ```
110
- ## Implementation Complete
111
-
112
- **Change:** <change-name>
113
- **Schema:** <schema-name>
114
- **Progress:** 7/7 tasks complete ✓
115
-
116
- ### Completed This Session
117
- - [x] Task 1
118
- - [x] Task 2
119
- ...
120
-
121
- All tasks complete! Ready to archive this change.
122
- ```
123
-
124
- **Output On Pause (Issue Encountered)**
125
-
126
- ```
127
- ## Implementation Paused
128
-
129
- **Change:** <change-name>
130
- **Schema:** <schema-name>
131
- **Progress:** 4/7 tasks complete
132
-
133
- ### Issue Encountered
134
- <description of the issue>
135
-
136
- **Options:**
137
- 1. <option 1>
138
- 2. <option 2>
139
- 3. Other approach
140
-
141
- What would you like to do?
142
- ```
143
-
144
- **Guardrails**
145
- - Keep going through tasks until done or blocked
146
- - Always read context files before starting (from the apply instructions output)
147
- - If task is ambiguous, pause and ask before implementing
148
- - If implementation reveals issues, pause and suggest artifact updates
149
- - Keep code changes minimal and scoped to each task
150
- - Update task checkbox immediately after completing each task
151
- - Pause on errors, blockers, or unclear requirements - don't guess
152
- - Use contextFiles from CLI output, don't assume specific file names
153
-
154
- **Fluid Workflow Integration**
155
-
156
- This skill supports the "actions on a change" model:
157
-
158
- - **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
159
- - **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly