otacon 0.1.2 → 0.1.4

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 (201) hide show
  1. package/README.md +18 -5
  2. package/dist/cli/browser.js +1 -1
  3. package/dist/cli/browser.js.map +1 -1
  4. package/dist/cli/client.js +13 -2
  5. package/dist/cli/client.js.map +1 -1
  6. package/dist/cli/commands/answer.js +1 -1
  7. package/dist/cli/commands/answer.js.map +1 -1
  8. package/dist/cli/commands/ask.js +3 -3
  9. package/dist/cli/commands/ask.js.map +1 -1
  10. package/dist/cli/commands/clean.js +14 -16
  11. package/dist/cli/commands/clean.js.map +1 -1
  12. package/dist/cli/commands/config.js +1 -1
  13. package/dist/cli/commands/config.js.map +1 -1
  14. package/dist/cli/commands/doctor.js +4 -4
  15. package/dist/cli/commands/doctor.js.map +1 -1
  16. package/dist/cli/commands/expose.js +7 -7
  17. package/dist/cli/commands/expose.js.map +1 -1
  18. package/dist/cli/commands/implement-done.js +1 -1
  19. package/dist/cli/commands/implement-done.js.map +1 -1
  20. package/dist/cli/commands/install.js +16 -10
  21. package/dist/cli/commands/install.js.map +1 -1
  22. package/dist/cli/commands/open.js +31 -7
  23. package/dist/cli/commands/open.js.map +1 -1
  24. package/dist/cli/commands/progress.js +1 -1
  25. package/dist/cli/commands/progress.js.map +1 -1
  26. package/dist/cli/commands/resume.js +67 -0
  27. package/dist/cli/commands/resume.js.map +1 -0
  28. package/dist/cli/commands/start.js +24 -3
  29. package/dist/cli/commands/start.js.map +1 -1
  30. package/dist/cli/commands/status.js +15 -4
  31. package/dist/cli/commands/status.js.map +1 -1
  32. package/dist/cli/commands/submit.js +5 -5
  33. package/dist/cli/commands/submit.js.map +1 -1
  34. package/dist/cli/commands/update.js +83 -0
  35. package/dist/cli/commands/update.js.map +1 -0
  36. package/dist/cli/commands/wait.js +1 -1
  37. package/dist/cli/commands/wait.js.map +1 -1
  38. package/dist/cli/install/assets.js +123 -48
  39. package/dist/cli/install/assets.js.map +1 -1
  40. package/dist/cli/install/locations.js +1 -1
  41. package/dist/cli/install/locations.js.map +1 -1
  42. package/dist/cli/install/tailscale.js +2 -2
  43. package/dist/cli/install/tailscale.js.map +1 -1
  44. package/dist/cli/install/wrapper.js +202 -0
  45. package/dist/cli/install/wrapper.js.map +1 -0
  46. package/dist/cli/main.js +10 -3
  47. package/dist/cli/main.js.map +1 -1
  48. package/dist/cli/output.js +2 -2
  49. package/dist/cli/output.js.map +1 -1
  50. package/dist/cli/session.js +18 -7
  51. package/dist/cli/session.js.map +1 -1
  52. package/dist/cli/update.js +236 -0
  53. package/dist/cli/update.js.map +1 -0
  54. package/dist/daemon/activity.js +1 -1
  55. package/dist/daemon/activity.js.map +1 -1
  56. package/dist/daemon/anchor.js +1 -1
  57. package/dist/daemon/anchor.js.map +1 -1
  58. package/dist/daemon/app.js +370 -82
  59. package/dist/daemon/app.js.map +1 -1
  60. package/dist/daemon/approve.js +3 -3
  61. package/dist/daemon/approve.js.map +1 -1
  62. package/dist/daemon/capture/adapter.js +23 -0
  63. package/dist/daemon/capture/adapter.js.map +1 -0
  64. package/dist/daemon/capture/claude.js +274 -0
  65. package/dist/daemon/capture/claude.js.map +1 -0
  66. package/dist/daemon/capture/codex.js +413 -0
  67. package/dist/daemon/capture/codex.js.map +1 -0
  68. package/dist/daemon/capture/normalize.js +89 -0
  69. package/dist/daemon/capture/normalize.js.map +1 -0
  70. package/dist/daemon/capture/opencode.js +330 -0
  71. package/dist/daemon/capture/opencode.js.map +1 -0
  72. package/dist/daemon/capture/registry.js +33 -0
  73. package/dist/daemon/capture/registry.js.map +1 -0
  74. package/dist/daemon/capture/stream-store.js +121 -0
  75. package/dist/daemon/capture/stream-store.js.map +1 -0
  76. package/dist/daemon/capture/tailer.js +108 -0
  77. package/dist/daemon/capture/tailer.js.map +1 -0
  78. package/dist/daemon/desktop-notify.js +11 -5
  79. package/dist/daemon/desktop-notify.js.map +1 -1
  80. package/dist/daemon/diagrams.js +90 -0
  81. package/dist/daemon/diagrams.js.map +1 -0
  82. package/dist/daemon/diff.js +1 -2
  83. package/dist/daemon/diff.js.map +1 -1
  84. package/dist/daemon/linter/parse.js +45 -12
  85. package/dist/daemon/linter/parse.js.map +1 -1
  86. package/dist/daemon/linter/rules.js +20 -17
  87. package/dist/daemon/linter/rules.js.map +1 -1
  88. package/dist/daemon/main.js +1 -1
  89. package/dist/daemon/main.js.map +1 -1
  90. package/dist/daemon/notify.js +1 -1
  91. package/dist/daemon/notify.js.map +1 -1
  92. package/dist/daemon/presence.js +1 -1
  93. package/dist/daemon/presence.js.map +1 -1
  94. package/dist/daemon/queue.js +7 -7
  95. package/dist/daemon/queue.js.map +1 -1
  96. package/dist/daemon/store.js +66 -79
  97. package/dist/daemon/store.js.map +1 -1
  98. package/dist/daemon/threads.js +111 -25
  99. package/dist/daemon/threads.js.map +1 -1
  100. package/dist/daemon/transcript.js +1 -1
  101. package/dist/daemon/transcript.js.map +1 -1
  102. package/dist/daemon/ui.js +13 -6
  103. package/dist/daemon/ui.js.map +1 -1
  104. package/dist/daemon/viewers.js +37 -0
  105. package/dist/daemon/viewers.js.map +1 -0
  106. package/dist/shared/config.js +52 -7
  107. package/dist/shared/config.js.map +1 -1
  108. package/dist/shared/gwt.js +1 -1
  109. package/dist/shared/gwt.js.map +1 -1
  110. package/dist/shared/paths.js +68 -33
  111. package/dist/shared/paths.js.map +1 -1
  112. package/dist/shared/question-spec.js +1 -1
  113. package/dist/shared/question-spec.js.map +1 -1
  114. package/dist/shared/types.js +7 -3
  115. package/dist/shared/types.js.map +1 -1
  116. package/dist/shared/version.js +1 -1
  117. package/dist/skills/otacon/SKILL.md +250 -0
  118. package/dist/ui/assets/{arc-KT3ZnaMp.js → arc-BUR2DxNA.js} +1 -1
  119. package/dist/ui/assets/architecture-7EHR7CIX-TTokq2IO.js +1 -0
  120. package/dist/ui/assets/{architectureDiagram-3BPJPVTR-DLu0UM7N.js → architectureDiagram-3BPJPVTR-unLnkDyM.js} +1 -1
  121. package/dist/ui/assets/{blockDiagram-GPEHLZMM-B8wApEWC.js → blockDiagram-GPEHLZMM-DHx8lNeL.js} +1 -1
  122. package/dist/ui/assets/{c4Diagram-AAUBKEIU-BNS5gmQS.js → c4Diagram-AAUBKEIU-BU9T562l.js} +1 -1
  123. package/dist/ui/assets/channel-BA6ChrT3.js +1 -0
  124. package/dist/ui/assets/{chunk-2J33WTMH-CTY2etwY.js → chunk-2J33WTMH-BEb0myVl.js} +1 -1
  125. package/dist/ui/assets/{chunk-3OPIFGDE-DZM4Sz84.js → chunk-3OPIFGDE-DESBG_RB.js} +1 -1
  126. package/dist/ui/assets/{chunk-4BX2VUAB-sGwrrXIO.js → chunk-4BX2VUAB-dt3F_E_5.js} +1 -1
  127. package/dist/ui/assets/{chunk-55IACEB6-CGlNp76o.js → chunk-55IACEB6-BcyuZM7U.js} +1 -1
  128. package/dist/ui/assets/{chunk-5ZQYHXKU-5zebJ3jW.js → chunk-5ZQYHXKU-DqdwSJlO.js} +1 -1
  129. package/dist/ui/assets/{chunk-727SXJPM-DelmUpvy.js → chunk-727SXJPM-B04SqNWj.js} +1 -1
  130. package/dist/ui/assets/{chunk-AQP2D5EJ-DMVzBf3M.js → chunk-AQP2D5EJ-DpjCPBWN.js} +1 -1
  131. package/dist/ui/assets/{chunk-BSJP7CBP-CZHrcpSu.js → chunk-BSJP7CBP-BNOU3k5G.js} +1 -1
  132. package/dist/ui/assets/{chunk-CSCIHK7Q-C1efTp0O.js → chunk-CSCIHK7Q-iWOtNZm_.js} +1 -1
  133. package/dist/ui/assets/{chunk-FMBD7UC4-B6axGwgn.js → chunk-FMBD7UC4-BHH_etky.js} +1 -1
  134. package/dist/ui/assets/{chunk-KSCS5N6A-DSaxbrm0.js → chunk-KSCS5N6A-DbRuazP3.js} +1 -1
  135. package/dist/ui/assets/{chunk-L5ZTLDWV-D9ZKdVGx.js → chunk-L5ZTLDWV-B2ZZFONi.js} +1 -1
  136. package/dist/ui/assets/{chunk-LZXEDZCA-DI5_1s00.js → chunk-LZXEDZCA-DryVpwAh.js} +2 -2
  137. package/dist/ui/assets/{chunk-ND2GUHAM-DQQ4RVLE.js → chunk-ND2GUHAM-2Bb1izqg.js} +1 -1
  138. package/dist/ui/assets/{chunk-NZK2D7GU-9zJJaDpb.js → chunk-NZK2D7GU-2DhvLbqL.js} +1 -1
  139. package/dist/ui/assets/{chunk-O5CBEL6O-DUOshAt2.js → chunk-O5CBEL6O-B5oigO7D.js} +1 -1
  140. package/dist/ui/assets/chunk-QZHKN3VN-BDHgdxoT.js +1 -0
  141. package/dist/ui/assets/chunk-WU5MYG2G-FDJTP_wT.js +1 -0
  142. package/dist/ui/assets/{chunk-XPW4576I-DQVL_GAl.js → chunk-XPW4576I-Dmq-O7bc.js} +1 -1
  143. package/dist/ui/assets/classDiagram-4FO5ZUOK-B5kZsiIt.js +1 -0
  144. package/dist/ui/assets/classDiagram-v2-Q7XG4LA2-B5kZsiIt.js +1 -0
  145. package/dist/ui/assets/{cose-bilkent-S5V4N54A-C7m3VlSW.js → cose-bilkent-S5V4N54A-oTsqU1DY.js} +1 -1
  146. package/dist/ui/assets/{dagre-BM42HDAG-CoU_T6EY.js → dagre-BM42HDAG-CZykCU6B.js} +1 -1
  147. package/dist/ui/assets/{diagram-2AECGRRQ-C_R7oNKE.js → diagram-2AECGRRQ-BY7clIlO.js} +1 -1
  148. package/dist/ui/assets/{diagram-5GNKFQAL-UhE2W3Yi.js → diagram-5GNKFQAL-BWdq4hV0.js} +1 -1
  149. package/dist/ui/assets/{diagram-KO2AKTUF-D4KZCRld.js → diagram-KO2AKTUF-CCGEaiZg.js} +1 -1
  150. package/dist/ui/assets/{diagram-LMA3HP47-CsOe8-S6.js → diagram-LMA3HP47-CVkepFYU.js} +1 -1
  151. package/dist/ui/assets/{diagram-OG6HWLK6-Bkbs2V54.js → diagram-OG6HWLK6-f-NjsfLG.js} +1 -1
  152. package/dist/ui/assets/{dist-BcowSnUl.js → dist-ZqsueX9_.js} +1 -1
  153. package/dist/ui/assets/{erDiagram-TEJ5UH35-DJXsykZz.js → erDiagram-TEJ5UH35-D8Wn6QP3.js} +1 -1
  154. package/dist/ui/assets/eventmodeling-FCH6USID-BODDoY6e.js +1 -0
  155. package/dist/ui/assets/{flowDiagram-I6XJVG4X-Chguj9Xz.js → flowDiagram-I6XJVG4X-BYnhla9k.js} +1 -1
  156. package/dist/ui/assets/{ganttDiagram-6RSMTGT7-DXdpFesp.js → ganttDiagram-6RSMTGT7-Dpu52ZRF.js} +1 -1
  157. package/dist/ui/assets/{gitGraph-WXDBUCRP-Doq1CcxB.js → gitGraph-WXDBUCRP-ou8xzQe1.js} +1 -1
  158. package/dist/ui/assets/{gitGraphDiagram-PVQCEYII-uxGwHEPv.js → gitGraphDiagram-PVQCEYII-BnTuFH7F.js} +1 -1
  159. package/dist/ui/assets/index-B2mL0c61.js +11 -0
  160. package/dist/ui/assets/index-sZ1TgAvb.css +1 -0
  161. package/dist/ui/assets/{info-J43DQDTF-CgWT_d3M.js → info-J43DQDTF-xgUHa7k0.js} +1 -1
  162. package/dist/ui/assets/{infoDiagram-5YYISTIA-B3oDA2Ct.js → infoDiagram-5YYISTIA-DJBudrwD.js} +1 -1
  163. package/dist/ui/assets/{ishikawaDiagram-YF4QCWOH-C6l0lvC3.js → ishikawaDiagram-YF4QCWOH-DpFHgERI.js} +1 -1
  164. package/dist/ui/assets/{journeyDiagram-JHISSGLW-COf53NwC.js → journeyDiagram-JHISSGLW-Cd32hdpY.js} +1 -1
  165. package/dist/ui/assets/{kanban-definition-UN3LZRKU-DaOPRBld.js → kanban-definition-UN3LZRKU-Dm1V8lr0.js} +1 -1
  166. package/dist/ui/assets/{line-new3jLu3.js → line-CZu6_PMX.js} +1 -1
  167. package/dist/ui/assets/{linear-yA22knFB.js → linear-2tkTX_U2.js} +1 -1
  168. package/dist/ui/assets/{mermaid-parser.core-D8JVCOKU.js → mermaid-parser.core-C4m04cRe.js} +2 -2
  169. package/dist/ui/assets/{mermaid.core-BCrPyVBK.js → mermaid.core-BPeg1ewg.js} +3 -3
  170. package/dist/ui/assets/{mindmap-definition-RKZ34NQL-CVcJTWsW.js → mindmap-definition-RKZ34NQL-BENqEkIK.js} +1 -1
  171. package/dist/ui/assets/{packet-YPE3B663-DlSwpK-G.js → packet-YPE3B663-DNO0oBLH.js} +1 -1
  172. package/dist/ui/assets/{pie-LRSECV5Y-CyMpbo4C.js → pie-LRSECV5Y-CWoz31oB.js} +1 -1
  173. package/dist/ui/assets/{pieDiagram-4H26LBE5-Dy7day5R.js → pieDiagram-4H26LBE5-CtmxhUGI.js} +1 -1
  174. package/dist/ui/assets/{plan-view-CE2ha0qY.js → plan-view-bZtdFbit.js} +4 -4
  175. package/dist/ui/assets/{quadrantDiagram-W4KKPZXB-CVjVgbaQ.js → quadrantDiagram-W4KKPZXB-BO3IZNbx.js} +1 -1
  176. package/dist/ui/assets/{radar-GUYGQ44K-DLPfv0jT.js → radar-GUYGQ44K-AEfROz99.js} +1 -1
  177. package/dist/ui/assets/{requirementDiagram-4Y6WPE33-y_0KOdN8.js → requirementDiagram-4Y6WPE33-D-wQ1szT.js} +1 -1
  178. package/dist/ui/assets/{sankeyDiagram-5OEKKPKP-8T3b7meL.js → sankeyDiagram-5OEKKPKP-Bj4kD_AJ.js} +1 -1
  179. package/dist/ui/assets/{sequenceDiagram-3UESZ5HK-Cn8DZiEr.js → sequenceDiagram-3UESZ5HK-M8QVVH74.js} +1 -1
  180. package/dist/ui/assets/{src-BieOuieI.js → src-DvptJAGq.js} +1 -1
  181. package/dist/ui/assets/{stateDiagram-AJRCARHV-nPEVGd3E.js → stateDiagram-AJRCARHV-BiPRs9rN.js} +1 -1
  182. package/dist/ui/assets/stateDiagram-v2-BHNVJYJU-BYjicZlC.js +1 -0
  183. package/dist/ui/assets/{timeline-definition-PNZ67QCA-Dj_qK0VJ.js → timeline-definition-PNZ67QCA-DS0AGRKw.js} +1 -1
  184. package/dist/ui/assets/{treeView-BLDUP644-G5Bsebqu.js → treeView-BLDUP644-DJakvUbF.js} +1 -1
  185. package/dist/ui/assets/{treemap-LRROVOQU-anUEJzTb.js → treemap-LRROVOQU-QXfc2Vwr.js} +1 -1
  186. package/dist/ui/assets/{vennDiagram-CIIHVFJN-D71ne3dS.js → vennDiagram-CIIHVFJN-CBdJA0hv.js} +1 -1
  187. package/dist/ui/assets/{wardley-L42UT6IY-DrJilmE_.js → wardley-L42UT6IY-DI9SdW45.js} +1 -1
  188. package/dist/ui/assets/{wardleyDiagram-YWT4CUSO-B66G4ayp.js → wardleyDiagram-YWT4CUSO-RMmsKLRe.js} +1 -1
  189. package/dist/ui/assets/{xychartDiagram-2RQKCTM6-CReSRxNG.js → xychartDiagram-2RQKCTM6-DFXccP8B.js} +1 -1
  190. package/dist/ui/index.html +2 -2
  191. package/package.json +7 -5
  192. package/dist/ui/assets/architecture-7EHR7CIX-Cw3I1lil.js +0 -1
  193. package/dist/ui/assets/channel-CkOta24Z.js +0 -1
  194. package/dist/ui/assets/chunk-QZHKN3VN-DqRxzBM_.js +0 -1
  195. package/dist/ui/assets/chunk-WU5MYG2G-B1Mk3aBp.js +0 -1
  196. package/dist/ui/assets/classDiagram-4FO5ZUOK-BH-5P4jH.js +0 -1
  197. package/dist/ui/assets/classDiagram-v2-Q7XG4LA2-BH-5P4jH.js +0 -1
  198. package/dist/ui/assets/eventmodeling-FCH6USID-DSDI1f5T.js +0 -1
  199. package/dist/ui/assets/index-BsTJ9Ul_.css +0 -1
  200. package/dist/ui/assets/index-D-TSanrw.js +0 -11
  201. package/dist/ui/assets/stateDiagram-v2-BHNVJYJU-CKrff-KJ.js +0 -1
@@ -0,0 +1,250 @@
1
+ ---
2
+ name: otacon
3
+ description: Plan a feature through an otacon review session: grill interview, schema'd plan, phone review with anchored comments, approved plan saved to a home archive (and your project on Save). Use when the user asks to plan something with otacon, types /otacon, or wants a reviewed implementation plan before coding. Replaces native plan mode. Also resumes and amends an implemented plan when run from inside its build worktree.
4
+ ---
5
+
6
+ <!-- managed by `otacon install` — reinstall overwrites this file. -->
7
+
8
+ # Otacon plan session protocol
9
+
10
+ Run plan reviews through the otacon CLI instead of your native plan mode. The
11
+ user reviews in a browser. Every `otacon`
12
+ command prints exactly one JSON line on stdout. Exit 0 = proceed; exit 1 = a
13
+ machine-readable error you can fix (read the JSON); exit 2 = you invoked it wrong.
14
+
15
+ ## Hard implementation gate
16
+
17
+ When this skill is triggered, you MUST NOT create, edit, delete, or format project
18
+ files, run code-modifying commands, or implement the requested change until a
19
+ `otacon wait` event returns `{"event":"approved",...,"implement":true}`.
20
+
21
+ Before that event, allowed actions are only:
22
+ - `otacon start` / `otacon status` / `otacon open` / `otacon progress` /
23
+ `otacon ask` / `otacon wait` / `otacon submit` / `otacon answer`.
24
+ - Read-only research commands.
25
+ - Writing the plan and resolutions files under the session's home dir (`~/.otacon/sessions/<id>/`, the `plan` path `start` prints).
26
+
27
+ A user request phrased as "can you make/fix/implement..." is still a plan-review
28
+ request when this skill is active. Approval is not implied by the original request.
29
+
30
+ ## Starting: resume an amendment, or plan fresh
31
+
32
+ Before `otacon start`, check where you are: run `otacon status`. If its output
33
+ carries a `resumeCandidate`, you are standing inside a build worktree otacon
34
+ created for a finished plan: a chance to AMEND that plan in place instead of
35
+ spawning a second worktree.
36
+
37
+ - Read the candidate plan at `resumeCandidate.plan` and judge whether the user's
38
+ request is about THAT feature.
39
+ - **Clearly unrelated** (a different feature) → just `otacon start` a fresh
40
+ session and ignore the candidate.
41
+ - **Related, or you are unsure** → ask the user, here in the terminal, whether to
42
+ resume and amend the existing plan or start new. This is the ONE question that
43
+ does not go through `otacon ask` (no session is open yet); wait for the answer
44
+ before acting.
45
+ - On **resume**: `otacon resume` (it auto-detects the session from this worktree,
46
+ reopens it to `revising`, and prints the `plan` path). SKIP research and grill,
47
+ since the plan exists. Edit that `plan` file into revision N+1 directly from the user's
48
+ request (grill only if it is genuinely ambiguous), `otacon submit`, then go to
49
+ the **Review loop** (step 5). The review diffs against the approved revision.
50
+ - No `resumeCandidate` → the normal flow below.
51
+
52
+ ## The loop
53
+
54
+ 1. `otacon start --title <kebab-title>` **first, before you research** — it mints
55
+ the session and prints the review URL plus the `plan` draft path (under
56
+ `~/.otacon/sessions/<id>/`). Tell the user to open the URL (`otacon open`
57
+ launches it in their browser) so they can watch the whole thing from the first second.
58
+ `--quick` skips the interview — only when the user explicitly asks.
59
+ 2. **Research the codebase.** On supported agents the daemon now auto-streams your
60
+ tool calls, text, and thinking to the reviewer's now-playing console, so it
61
+ already sees the routine work. Use `otacon progress "<what you're doing>"` for
62
+ OCCASIONAL highlights and chapter markers (a milestone, a phase boundary, "what
63
+ I'm about to do next"), not per-step narration. It is the universal floor: on an
64
+ agent with no auto-capture those notes are the ONLY thing keeping the now-playing
65
+ bar alive, so still drop one whenever you start a chunk of work the user can't
66
+ otherwise see. It is a non-blocking one-liner that feeds the live stream and the
67
+ draft chip; no answer comes back, so never park on it. Read enough to propose
68
+ answers, not collect questions.
69
+ 3. **Grill** (mandatory unless --quick): Interview me relentlessly about every
70
+ aspect of this plan until we reach a shared understanding. Walk down each branch
71
+ of the design tree, resolving dependencies between decisions one-by-one. For
72
+ each question, provide your recommended answer. Explore the code before asking.
73
+ Never ask what the code can answer.
74
+ - `otacon ask --question "..." --options "A|B|C" --recommend A` — always lead
75
+ with your recommended answer. `--multi` for multi-select; omit `--options`
76
+ for free text. The user can always answer with free-form custom text instead
77
+ of (or alongside) the chips, so frame options as a starting point, not a cage.
78
+ - Independent questions whose answers don't shape each other? Post them in one
79
+ call: `otacon ask --batch questions.json` (or `--batch -` for stdin) — a JSON
80
+ array of the same specs (`{question, options?, recommend?, multi?}`). They land
81
+ as ordinary cards; loop `wait` to collect each answer. Dependent questions
82
+ still go one at a time.
83
+ - Park for the answer: `otacon wait --timeout 540` (set the Bash tool timeout
84
+ to 600000 ms). The answer arrives as `{"event":"answer","question":"q<n>",...}`.
85
+ 4. **Draft** the plan at the `plan` path `start` printed (`~/.otacon/sessions/<id>/plan.md`) in the schema below, then
86
+ `otacon submit`. On exit 1, fix every reported lint issue and resubmit until
87
+ accepted. After a clean submit, stop all implementation work and park in
88
+ `otacon wait`; only an `approved` event with `implement:true` enters the
89
+ Implement loop.
90
+ 5. **Review loop** — park in `otacon wait --timeout 540` (Bash timeout 600000 ms)
91
+ and handle the one event it prints:
92
+ - `comments` → revise plan.md; write `resolutions.json` as
93
+ `{"changelog":"what changed","threads":{"t1":"how you resolved it"}}` with
94
+ one reply per comment thread; `otacon submit --resolutions resolutions.json`
95
+ (loop on lint errors); park again. A `comments` batch with `"final":true` is
96
+ the reviewer's **comment & approve**: resolve every thread the usual way, but
97
+ your next clean submit **finalizes** — you'll get `approved` (which may carry
98
+ `implement:true`), not another review round. So fold them all in, submit, then
99
+ park and handle the `approved` that follows (do NOT expect more comments).
100
+ - `question` → `otacon answer <q-id> --body "..."` (or `--file`); park again. A
101
+ `question` may carry `replyTo` (a follow-up on an earlier question) — skim that
102
+ thread's prior turns for context, but still answer the new `q<n>`.
103
+ - `answer` → use it and continue; park again whenever you are waiting.
104
+ - `timeout` → park again immediately. A timeout is NEVER completion.
105
+ - `approved` → the plan is saved at `path`. Plain `approved` (Save, no
106
+ `implement`) → print a one-line summary naming where it was saved (`path`),
107
+ then STOP. `approved` **with `implement:true`** → read the plan at `path` to
108
+ guide the build and enter the **Implement loop** (below) — do NOT stop; the
109
+ session is now `implementing`.
110
+ - `deleted` → the user deleted this session in the review UI. It is over:
111
+ STOP. There is no approved plan.
112
+ 6. **Never end your turn while the session is open.** Nothing to do = park in
113
+ `otacon wait` again. Confused, crashed, or compacted? `otacon status` returns
114
+ the open session, revision, and pending events — resume the loop from it.
115
+
116
+ ## CLI quick reference
117
+
118
+ - `otacon start --title <t> [--quick]` · `otacon resume [--session <id>]` ·
119
+ `otacon progress "<note>"` (occasional highlights / chapter markers; the activity
120
+ floor on agents without auto-capture) ·
121
+ `otacon ask ...` · `otacon wait --timeout 540` · `otacon submit [--resolutions f]` ·
122
+ `otacon answer <q> --body "..."` · `otacon implement-done [--pr <url>] [--failed]` ·
123
+ `otacon status` · `otacon open` · `otacon config [get <key>]`
124
+
125
+ ## Implement loop (on `approved` with `implement:true`)
126
+
127
+ You are the **orchestrator**: you only coordinate and mark progress
128
+ (`otacon progress` at phase boundaries, an occasional chapter marker rather than
129
+ every action; on supported agents the now-playing console already streams the work).
130
+ Every phase's real work runs in a fresh native subagent (Task tool) so your own
131
+ context stays lean.
132
+
133
+ 1. **Setup.** Read the plan from the home archive at the event `path`.
134
+ - **Amending** (you resumed this session, so its build worktree already exists
135
+ and you are standing in it): do NOT create a worktree. `cd` into
136
+ `<worktree.dir>/<slug>`, make sure you are on `otacon/impl-<slug>`, and build
137
+ on top of the existing commits. Pushing later updates the SAME PR.
138
+ - **Fresh** (no existing worktree): branch off the repo's default-branch HEAD and
139
+ create the worktree under `worktree.dir` (`otacon config get worktree.dir`,
140
+ default `~/.otacon/worktrees`, outside the repo):
141
+ `git worktree add <worktree.dir>/<slug> -b otacon/impl-<slug>` (off the default
142
+ branch).
143
+ Drop a `otacon progress` highlight at each phase boundary throughout, not at
144
+ every step.
145
+ 2. **Per phase, in order** (read the phases from the home plan at the event `path`;
146
+ on an amendment, implement only the phases this revision changed, using the
147
+ changelog and the diff to scope):
148
+ - `otacon progress "phase N — implementing"` (one marker per phase); spawn an
149
+ **implement+test**
150
+ subagent (Task tool) scoped to that phase's Goal/Files/Verification — it
151
+ implements and runs the phase Verification plus the repo gates.
152
+ - spawn a **separate** `/code-review --fix` subagent on the phase's working
153
+ diff; it applies findings; re-review. (`/code-review` effort is config — start
154
+ moderate so false positives don't become needless pauses.)
155
+ - **clean + green** → commit the phase and continue. **Blocked** (tests stay red,
156
+ review still flags, or a subagent is stuck) → on the FIRST blocker,
157
+ `otacon ask` with options `retry|skip|abort|guidance`, park in `otacon wait`,
158
+ and act on the answer. No auto-retry.
159
+ 3. **Finish.** On a **fresh** build, open a PR against the default branch with
160
+ `gh pr create` (PR body = the plan summary + the per-phase log; fall back to the
161
+ local branch + path when there is no remote). On an **amendment**, the PR already
162
+ exists: push the branch and it updates, so reuse its URL (it is on the session;
163
+ `otacon status` reports `prUrl`). Either way finish with
164
+ `otacon implement-done --pr <url>`. On abort, run `otacon implement-done --failed`.
165
+
166
+ While `implementing` the Stop hook still keeps you on the line — never end the turn
167
+ until `implement-done`.
168
+
169
+ ## Plan schema (linted on submit)
170
+
171
+ Frontmatter (`title`, `session`, `revision`, `status`, `created`), then these
172
+ H2 sections in order — the five required ones plus optional review-altitude
173
+ sections slotted in place (include them when the change warrants; skip them on
174
+ trivial plans): `## Summary` (≤5 lines, lead with a diagram — see below) ·
175
+ *(optional)* `## Contract` (≤12 lines —
176
+ the interface surface the reviewer signs off instead of reading code: inputs,
177
+ outputs, types, errors; one signature fence is fine under the 1-fence rule) ·
178
+ `## Decisions` (entries ≤3 lines, `- D<n>: ... ← q<n>` citing the grill answer
179
+ that produced it, or `[assumed]`) · *(optional)* `## Impact` (≤10 lines — blast
180
+ radius: the upstream modules this plan leans on and the downstream modules it can
181
+ break; a dependency mermaid is fine under the 1-fence rule) · `## Phases`
182
+ (`### Phase <n> — <name>`, each with `Goal:` ≤3 lines, `Files:` list,
183
+ `Verification:` ≤3 lines plus an optional ```gwt scenario block — see below,
184
+ optional collapsible `#### Details` block) ·
185
+ `## Risks` (≤5 items, ≤2 lines each) ·
186
+ `## Open Questions`. Mermaid / code / `before`+`after` fences are budget-exempt,
187
+ max one per read-path section; the markdown-native review visuals below share a
188
+ separate per-section cap. Details may elaborate on the read path, never
189
+ introduce new scope.
190
+
191
+ **Lead with a diagram.** Put a ```mermaid state / sequence / flow diagram right
192
+ under the `## Summary` headline — strongly recommended on ~90% of plans, so the
193
+ reviewer grasps the change's shape before reading prose. Keep the headline as the ≤5-line
194
+ Summary.
195
+
196
+ ## Visuals — prefer them over prose where they carry the information
197
+
198
+ Four markdown-native primitives the review UI styles. They degrade to readable
199
+ markdown if rendering fails, and a comment can anchor to one specific risk, row,
200
+ or callout.
201
+
202
+ - **Callouts** — a blockquote whose first line is a type marker
203
+ (`[!risk]`, `[!note]`, `[!decision]`, `[!assumption]`). Risks and
204
+ assumptions SHOULD be callouts, not bullets buried in prose:
205
+ > [!risk]
206
+ > The JWT cutover locks out sessions issued before it.
207
+ - **Decision matrix** — a GFM table comparing options, the chosen row led by a
208
+ `✓`. A Decisions section weighing 2+ options SHOULD use a matrix:
209
+ | Pick | Option | Tradeoff |
210
+ | ---- | ------ | ------------------------------- |
211
+ | ✓ | RS256 | rotate keys without redeploy |
212
+ | | HS256 | shared secret on every verifier |
213
+ - **Scope pills** — inline tags `[new]` `[breaking]` `[risky]` `[deletes]`
214
+ for flagging scope mid-sentence ("adds a [new] issuer; [breaking] cookie removal").
215
+ - **Behavioral assertions** — a ```gwt fence inside a phase's `Verification`
216
+ holding one or more Given/When/Then scenarios (blank line between scenarios;
217
+ `And`/`But` continue a clause). They render as scenario cards that double as
218
+ the human's approve checklist (Test-Driven Review), so write the observable
219
+ behavior the reviewer signs off, not the test code:
220
+ ```gwt
221
+ Given a plan with no Contract section
222
+ When the agent submits it
223
+ Then the lint passes and review opens
224
+ ```
225
+ Capped at 6 scenarios per block; must sit under `Verification`.
226
+
227
+ When plan content is shaped as a hierarchy or tree (a taxonomy, a doc or file
228
+ structure, a nested option space, a state hierarchy, a decision tree), draw it as a
229
+ ```mermaid diagram, not as a monospace nested outline in a ```text fence: an outline
230
+ forces the reviewer to reconstruct the shape line by line, while a diagram shows it at a
231
+ glance. `graph TD` (a top-down flowchart) is the natural default; pick whatever shape
232
+ reads best (a mindmap, a state diagram, etc. when they fit). Put the tree diagram in the
233
+ section that owns that structure (Contract, Impact, or a phase's Details); `mermaid`
234
+ diagrams no longer count toward the per-section fence cap, so a lead diagram and a
235
+ structural one can coexist.
236
+
237
+ Callouts and matrices are budget-exempt but capped (default 2 per read-path
238
+ section); pills are free. Reach for a visual when it carries the point better
239
+ than a sentence — never as decoration.
240
+
241
+ ## Rules
242
+
243
+ - Never use native plan mode, AskUserQuestion, or any built-in question UI while
244
+ the session is open: every question goes through `otacon ask`. The sole exception
245
+ is the resume-vs-new question at the very start, before any session exists.
246
+ - If you notice you edited project files before `approved implement:true`, stop
247
+ immediately, disclose the mistake, and ask whether to revert or keep the
248
+ uncommitted changes.
249
+ - Long review or build ahead? Remind the user to keep the Mac awake: `caffeinate -i`
250
+ while the session runs.
@@ -1 +1 @@
1
- import{n as e,t}from"./path-BWPyau1x.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-BcowSnUl.js";function m(e){return e.innerRadius}function h(e){return e.outerRadius}function g(e){return e.startAngle}function _(e){return e.endAngle}function v(e){return e&&e.padAngle}function y(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function b(e,t,n,r,i,a,o){var c=e-n,l=t-r,u=(o?a:-a)/d(c*c+l*l),f=u*l,p=-u*c,m=e+f,h=t+p,g=n+f,_=r+p,v=(m+g)/2,y=(h+_)/2,b=g-m,x=_-h,S=b*b+x*x,C=i-a,w=m*_-g*h,T=(x<0?-1:1)*d(s(0,C*C*S-w*w)),E=(w*x-b*T)/S,D=(-w*b-x*T)/S,O=(w*x+b*T)/S,k=(-w*b+x*T)/S,A=E-v,j=D-y,M=O-v,N=k-y;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(i/C-1),y11:D*(i/C-1)}}function x(){var s=m,x=h,S=e(0),C=null,w=g,T=_,E=v,D=null,O=t(k);function k(){var e,t,m=+s.apply(this,arguments),h=+x.apply(this,arguments),g=w.apply(this,arguments)-r,_=T.apply(this,arguments)-r,v=l(_-g),k=_>g;if(D||=e=O(),h<m&&(t=h,h=m,m=t),!(h>1e-12))D.moveTo(0,0);else if(v>c-1e-12)D.moveTo(h*u(g),h*a(g)),D.arc(0,0,h,g,_,!k),m>1e-12&&(D.moveTo(m*u(_),m*a(_)),D.arc(0,0,m,_,g,k));else{var A=g,j=_,M=g,N=_,P=v,F=v,I=E.apply(this,arguments)/2,L=I>1e-12&&(C?+C.apply(this,arguments):d(m*m+h*h)),R=p(l(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=o(L/m*a(I)),W=o(L/h*a(I));(P-=U*2)>1e-12?(U*=k?1:-1,M+=U,N-=U):(P=0,M=N=(g+_)/2),(F-=W*2)>1e-12?(W*=k?1:-1,A+=W,j-=W):(F=0,A=j=(g+_)/2)}var G=h*u(A),K=h*a(A),q=m*u(N),J=m*a(N);if(R>1e-12){var Y=h*u(j),X=h*a(j),Z=m*u(M),Q=m*a(M),$;if(v<i)if($=y(G,K,Z,Q,Y,X,q,J)){var ee=G-$[0],te=K-$[1],ne=Y-$[0],re=X-$[1],ie=1/a(f((ee*ne+te*re)/(d(ee*ee+te*te)*d(ne*ne+re*re)))/2),ae=d($[0]*$[0]+$[1]*$[1]);z=p(R,(m-ae)/(ie-1)),B=p(R,(h-ae)/(ie+1))}else z=B=0}F>1e-12?B>1e-12?(V=b(Z,Q,G,K,h,B,k),H=b(Y,X,q,J,h,B,k),D.moveTo(V.cx+V.x01,V.cy+V.y01),B<R?D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,h,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),!k),D.arc(H.cx,H.cy,B,n(H.y11,H.x11),n(H.y01,H.x01),!k))):(D.moveTo(G,K),D.arc(0,0,h,A,j,!k)):D.moveTo(G,K),!(m>1e-12)||!(P>1e-12)?D.lineTo(q,J):z>1e-12?(V=b(q,J,Y,X,m,-z,k),H=b(G,K,Z,Q,m,-z,k),D.lineTo(V.cx+V.x01,V.cy+V.y01),z<R?D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,m,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),k),D.arc(H.cx,H.cy,z,n(H.y11,H.x11),n(H.y01,H.x01),!k))):D.arc(0,0,m,N,M,k)}if(D.closePath(),e)return D=null,e+``||null}return k.centroid=function(){var e=(+s.apply(this,arguments)+ +x.apply(this,arguments))/2,t=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-i/2;return[u(t)*e,a(t)*e]},k.innerRadius=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),k):s},k.outerRadius=function(t){return arguments.length?(x=typeof t==`function`?t:e(+t),k):x},k.cornerRadius=function(t){return arguments.length?(S=typeof t==`function`?t:e(+t),k):S},k.padRadius=function(t){return arguments.length?(C=t==null?null:typeof t==`function`?t:e(+t),k):C},k.startAngle=function(t){return arguments.length?(w=typeof t==`function`?t:e(+t),k):w},k.endAngle=function(t){return arguments.length?(T=typeof t==`function`?t:e(+t),k):T},k.padAngle=function(t){return arguments.length?(E=typeof t==`function`?t:e(+t),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}export{x as t};
1
+ import{n as e,t}from"./path-BWPyau1x.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-ZqsueX9_.js";function m(e){return e.innerRadius}function h(e){return e.outerRadius}function g(e){return e.startAngle}function _(e){return e.endAngle}function v(e){return e&&e.padAngle}function y(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function b(e,t,n,r,i,a,o){var c=e-n,l=t-r,u=(o?a:-a)/d(c*c+l*l),f=u*l,p=-u*c,m=e+f,h=t+p,g=n+f,_=r+p,v=(m+g)/2,y=(h+_)/2,b=g-m,x=_-h,S=b*b+x*x,C=i-a,w=m*_-g*h,T=(x<0?-1:1)*d(s(0,C*C*S-w*w)),E=(w*x-b*T)/S,D=(-w*b-x*T)/S,O=(w*x+b*T)/S,k=(-w*b+x*T)/S,A=E-v,j=D-y,M=O-v,N=k-y;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(i/C-1),y11:D*(i/C-1)}}function x(){var s=m,x=h,S=e(0),C=null,w=g,T=_,E=v,D=null,O=t(k);function k(){var e,t,m=+s.apply(this,arguments),h=+x.apply(this,arguments),g=w.apply(this,arguments)-r,_=T.apply(this,arguments)-r,v=l(_-g),k=_>g;if(D||=e=O(),h<m&&(t=h,h=m,m=t),!(h>1e-12))D.moveTo(0,0);else if(v>c-1e-12)D.moveTo(h*u(g),h*a(g)),D.arc(0,0,h,g,_,!k),m>1e-12&&(D.moveTo(m*u(_),m*a(_)),D.arc(0,0,m,_,g,k));else{var A=g,j=_,M=g,N=_,P=v,F=v,I=E.apply(this,arguments)/2,L=I>1e-12&&(C?+C.apply(this,arguments):d(m*m+h*h)),R=p(l(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=o(L/m*a(I)),W=o(L/h*a(I));(P-=U*2)>1e-12?(U*=k?1:-1,M+=U,N-=U):(P=0,M=N=(g+_)/2),(F-=W*2)>1e-12?(W*=k?1:-1,A+=W,j-=W):(F=0,A=j=(g+_)/2)}var G=h*u(A),K=h*a(A),q=m*u(N),J=m*a(N);if(R>1e-12){var Y=h*u(j),X=h*a(j),Z=m*u(M),Q=m*a(M),$;if(v<i)if($=y(G,K,Z,Q,Y,X,q,J)){var ee=G-$[0],te=K-$[1],ne=Y-$[0],re=X-$[1],ie=1/a(f((ee*ne+te*re)/(d(ee*ee+te*te)*d(ne*ne+re*re)))/2),ae=d($[0]*$[0]+$[1]*$[1]);z=p(R,(m-ae)/(ie-1)),B=p(R,(h-ae)/(ie+1))}else z=B=0}F>1e-12?B>1e-12?(V=b(Z,Q,G,K,h,B,k),H=b(Y,X,q,J,h,B,k),D.moveTo(V.cx+V.x01,V.cy+V.y01),B<R?D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,h,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),!k),D.arc(H.cx,H.cy,B,n(H.y11,H.x11),n(H.y01,H.x01),!k))):(D.moveTo(G,K),D.arc(0,0,h,A,j,!k)):D.moveTo(G,K),!(m>1e-12)||!(P>1e-12)?D.lineTo(q,J):z>1e-12?(V=b(q,J,Y,X,m,-z,k),H=b(G,K,Z,Q,m,-z,k),D.lineTo(V.cx+V.x01,V.cy+V.y01),z<R?D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,m,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),k),D.arc(H.cx,H.cy,z,n(H.y11,H.x11),n(H.y01,H.x01),!k))):D.arc(0,0,m,N,M,k)}if(D.closePath(),e)return D=null,e+``||null}return k.centroid=function(){var e=(+s.apply(this,arguments)+ +x.apply(this,arguments))/2,t=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-i/2;return[u(t)*e,a(t)*e]},k.innerRadius=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),k):s},k.outerRadius=function(t){return arguments.length?(x=typeof t==`function`?t:e(+t),k):x},k.cornerRadius=function(t){return arguments.length?(S=typeof t==`function`?t:e(+t),k):S},k.padRadius=function(t){return arguments.length?(C=t==null?null:typeof t==`function`?t:e(+t),k):C},k.startAngle=function(t){return arguments.length?(w=typeof t==`function`?t:e(+t),k):w},k.endAngle=function(t){return arguments.length?(T=typeof t==`function`?t:e(+t),k):T},k.padAngle=function(t){return arguments.length?(E=typeof t==`function`?t:e(+t),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}export{x as t};
@@ -0,0 +1 @@
1
+ import"./chunk-NNHCCRGN-DlpIbxXb.js";import{x as e}from"./mermaid-parser.core-C4m04cRe.js";export{e as createArchitectureServices};