@torrent-tv/proxy 2.89.17 → 2.89.18

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