@chorus-aidlc/chorus 0.8.2 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +289 -289
  3. package/.next/standalone/.next/app-path-routes-manifest.json +36 -36
  4. package/.next/standalone/.next/build-manifest.json +5 -5
  5. package/.next/standalone/.next/prerender-manifest.json +48 -48
  6. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js +1 -1
  7. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js.nft.json +1 -1
  8. package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js +1 -1
  10. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js.nft.json +1 -1
  11. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js +1 -1
  13. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js.nft.json +1 -1
  14. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js +2 -2
  16. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js +2 -2
  19. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page_client-reference-manifest.js +1 -1
  21. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js +2 -2
  22. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page_client-reference-manifest.js +1 -1
  24. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/ideas/[ideaUuid]/page.js +1 -1
  25. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/ideas/[ideaUuid]/page.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/ideas/[ideaUuid]/page_client-reference-manifest.js +1 -1
  27. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/ideas/page.js +1 -1
  28. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/ideas/page.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/ideas/page_client-reference-manifest.js +1 -1
  30. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js +2 -2
  31. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page_client-reference-manifest.js +1 -1
  33. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js +1 -1
  34. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page_client-reference-manifest.js +1 -1
  36. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js +1 -1
  37. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js +1 -1
  40. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page_client-reference-manifest.js +1 -1
  42. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js +1 -1
  43. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page_client-reference-manifest.js +1 -1
  45. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js +3 -3
  46. package/.next/standalone/.next/server/app/(dashboard)/projects/page.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
  48. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js +2 -2
  49. package/.next/standalone/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  50. package/.next/standalone/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  51. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  52. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  53. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  54. package/.next/standalone/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
  55. package/.next/standalone/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
  56. package/.next/standalone/.next/server/app/admin/companies/new.html +1 -1
  57. package/.next/standalone/.next/server/app/admin/companies/new.rsc +2 -2
  58. package/.next/standalone/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
  59. package/.next/standalone/.next/server/app/admin/companies.html +1 -1
  60. package/.next/standalone/.next/server/app/admin/companies.rsc +2 -2
  61. package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  62. package/.next/standalone/.next/server/app/admin.html +1 -1
  63. package/.next/standalone/.next/server/app/admin.rsc +2 -2
  64. package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
  66. package/.next/standalone/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
  67. package/.next/standalone/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
  68. package/.next/standalone/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js +1 -1
  70. package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/api/api-keys/route_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
  75. package/.next/standalone/.next/server/app/api/auth/check-default/route_client-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/app/api/auth/company-oidc/route_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
  78. package/.next/standalone/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
  81. package/.next/standalone/.next/server/app/api/auth/refresh/route_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/app/api/auth/session/route_client-reference-manifest.js +1 -1
  83. package/.next/standalone/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
  84. package/.next/standalone/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
  85. package/.next/standalone/.next/server/app/api/documents/[uuid]/route.js +1 -1
  86. package/.next/standalone/.next/server/app/api/documents/[uuid]/route.js.nft.json +1 -1
  87. package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
  88. package/.next/standalone/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
  89. package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
  90. package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  91. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js +1 -1
  92. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js.nft.json +1 -1
  93. package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +1 -1
  94. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js +1 -1
  95. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js.nft.json +1 -1
  96. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route_client-reference-manifest.js +1 -1
  97. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js +1 -1
  98. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js.nft.json +1 -1
  99. package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route_client-reference-manifest.js +1 -1
  100. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js +1 -1
  101. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js.nft.json +1 -1
  102. package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route_client-reference-manifest.js +1 -1
  103. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js +1 -1
  104. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js.nft.json +1 -1
  105. package/.next/standalone/.next/server/app/api/ideas/[uuid]/route_client-reference-manifest.js +1 -1
  106. package/.next/standalone/.next/server/app/api/mcp/route.js +5 -5
  107. package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
  108. package/.next/standalone/.next/server/app/api/me/assignments/route.js +1 -1
  109. package/.next/standalone/.next/server/app/api/me/assignments/route.js.nft.json +1 -1
  110. package/.next/standalone/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
  111. package/.next/standalone/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
  112. package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
  113. package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
  114. package/.next/standalone/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
  115. package/.next/standalone/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
  116. package/.next/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  117. package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
  118. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
  119. package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
  120. package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
  121. package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
  122. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js +1 -1
  123. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js.nft.json +1 -1
  124. package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
  125. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route.js +1 -1
  126. package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
  127. package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
  128. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js +1 -1
  129. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js.nft.json +1 -1
  130. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
  131. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js +1 -1
  132. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js.nft.json +1 -1
  133. package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
  134. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
  135. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
  136. package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route_client-reference-manifest.js +1 -1
  137. package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
  138. package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
  139. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
  140. package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
  141. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  142. package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
  143. package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
  144. package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
  145. package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
  146. package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
  147. package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  148. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js +1 -1
  149. package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
  150. package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route_client-reference-manifest.js +1 -1
  151. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route_client-reference-manifest.js +1 -1
  152. package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
  153. package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route_client-reference-manifest.js +1 -1
  154. package/.next/standalone/.next/server/app/api/tasks/[uuid]/route_client-reference-manifest.js +1 -1
  155. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js +1 -1
  156. package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route_client-reference-manifest.js +1 -1
  157. package/.next/standalone/.next/server/app/index.html +1 -1
  158. package/.next/standalone/.next/server/app/index.rsc +2 -2
  159. package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
  160. package/.next/standalone/.next/server/app/login/admin.html +1 -1
  161. package/.next/standalone/.next/server/app/login/admin.rsc +2 -2
  162. package/.next/standalone/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
  163. package/.next/standalone/.next/server/app/login/callback.html +1 -1
  164. package/.next/standalone/.next/server/app/login/callback.rsc +2 -2
  165. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  166. package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
  167. package/.next/standalone/.next/server/app/login/pick-workspace.html +1 -1
  168. package/.next/standalone/.next/server/app/login/pick-workspace.rsc +2 -2
  169. package/.next/standalone/.next/server/app/login/silent-refresh/page_client-reference-manifest.js +1 -1
  170. package/.next/standalone/.next/server/app/login/silent-refresh.html +1 -1
  171. package/.next/standalone/.next/server/app/login/silent-refresh.rsc +2 -2
  172. package/.next/standalone/.next/server/app/login.html +1 -1
  173. package/.next/standalone/.next/server/app/login.rsc +2 -2
  174. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  175. package/.next/standalone/.next/server/app/onboarding.html +1 -1
  176. package/.next/standalone/.next/server/app/onboarding.rsc +2 -2
  177. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  178. package/.next/standalone/.next/server/app/projects.html +1 -1
  179. package/.next/standalone/.next/server/app/projects.rsc +4 -4
  180. package/.next/standalone/.next/server/app/settings.html +1 -1
  181. package/.next/standalone/.next/server/app/settings.rsc +4 -4
  182. package/.next/standalone/.next/server/app-paths-manifest.json +36 -36
  183. package/.next/standalone/.next/server/chunks/162.js +16 -0
  184. package/.next/standalone/.next/server/chunks/1871.js +1 -1
  185. package/.next/standalone/.next/server/chunks/2618.js +1 -1
  186. package/.next/standalone/.next/server/chunks/2961.js +1 -1
  187. package/.next/standalone/.next/server/chunks/4043.js +1 -0
  188. package/.next/standalone/.next/server/chunks/4090.js +2 -2
  189. package/.next/standalone/.next/server/chunks/5044.js +1 -1
  190. package/.next/standalone/.next/server/chunks/6113.js +1 -1
  191. package/.next/standalone/.next/server/chunks/6207.js +1 -1
  192. package/.next/standalone/.next/server/chunks/6592.js +1 -0
  193. package/.next/standalone/.next/server/chunks/6643.js +1 -1
  194. package/.next/standalone/.next/server/chunks/7368.js +1 -1
  195. package/.next/standalone/.next/server/chunks/7578.js +2 -2
  196. package/.next/standalone/.next/server/chunks/8637.js +1 -1
  197. package/.next/standalone/.next/server/chunks/920.js +1 -1
  198. package/.next/standalone/.next/server/chunks/937.js +1 -1
  199. package/.next/standalone/.next/server/chunks/9508.js +2 -2
  200. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  201. package/.next/standalone/.next/server/middleware-manifest.json +1 -1
  202. package/.next/standalone/.next/server/pages/404.html +1 -1
  203. package/.next/standalone/.next/server/pages/500.html +1 -1
  204. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  205. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  206. package/.next/standalone/.next/static/chunks/3853-f94afe2f83089c0d.js +1 -0
  207. package/.next/standalone/.next/static/chunks/44046-5c0f7f8c0914988a.js +1 -0
  208. package/.next/standalone/.next/static/chunks/{4860.4aa0288b2953186b.js → 4860.60152a625f2a714f.js} +1 -1
  209. package/.next/standalone/.next/static/chunks/6028-fe4175ea5e6241ed.js +1 -0
  210. package/.next/standalone/.next/static/chunks/93346-c4468893138daac7.js +1 -0
  211. package/.next/standalone/.next/static/chunks/{99373.00844a02fe44575b.js → 99373.4d93aaaf56fe7819.js} +1 -1
  212. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-8409ca03f132910b.js +1 -0
  213. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-7f7a7f654cab4dc3.js +1 -0
  214. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-95cdcec5e6db551f.js +1 -0
  215. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/page-c36345b80cc5bf5c.js +1 -0
  216. package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/{page-a01b45dbe80aeecf.js → page-b153aa34b940a24c.js} +1 -1
  217. package/.next/standalone/.next/static/chunks/{webpack-b999409365c6a0aa.js → webpack-8e0df5e10bc6b98f.js} +1 -1
  218. package/.next/standalone/.next/static/css/ea3f196c7951f8d6.css +1 -0
  219. package/.next/standalone/package.json +1 -1
  220. package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +1 -1
  221. package/.next/standalone/public/chorus-plugin/agents/proposal-reviewer.md +1 -1
  222. package/.next/standalone/public/chorus-plugin/agents/task-reviewer.md +1 -1
  223. package/.next/standalone/public/chorus-plugin/bin/on-post-verify-task.sh +198 -115
  224. package/.next/standalone/public/chorus-plugin/bin/tests/test-on-post-verify-task.sh +302 -50
  225. package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +166 -0
  226. package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +10 -6
  227. package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +6 -2
  228. package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +17 -1
  229. package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +1 -1
  230. package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +6 -7
  231. package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +1 -1
  232. package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +1 -1
  233. package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +7 -1
  234. package/.next/standalone/public/skill/brainstorm-chorus/SKILL.md +166 -0
  235. package/.next/standalone/public/skill/chorus/SKILL.md +10 -6
  236. package/.next/standalone/public/skill/develop-chorus/SKILL.md +5 -1
  237. package/.next/standalone/public/skill/idea-chorus/SKILL.md +17 -1
  238. package/.next/standalone/public/skill/package.json +1 -1
  239. package/.next/standalone/public/skill/proposal-chorus/SKILL.md +6 -7
  240. package/.next/standalone/public/skill/quick-dev-chorus/SKILL.md +1 -1
  241. package/.next/standalone/public/skill/review-chorus/SKILL.md +1 -1
  242. package/README.md +2 -4
  243. package/README.zh.md +2 -4
  244. package/package.json +1 -1
  245. package/prisma/migrations/20260524144057_remove_session_expires_at/migration.sql +11 -0
  246. package/prisma/schema.prisma +2 -2
  247. package/.next/standalone/.next/server/chunks/554.js +0 -1
  248. package/.next/standalone/.next/server/chunks/5869.js +0 -16
  249. package/.next/standalone/.next/server/chunks/8163.js +0 -1
  250. package/.next/standalone/.next/static/chunks/25846-d1c43e3a187a0c82.js +0 -1
  251. package/.next/standalone/.next/static/chunks/44046-732e5888413d45df.js +0 -1
  252. package/.next/standalone/.next/static/chunks/6028-0fcaf8b495e9bfc8.js +0 -1
  253. package/.next/standalone/.next/static/chunks/93346-9258abbb12887208.js +0 -1
  254. package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-5e2b4f48ec70f0e8.js +0 -1
  255. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/page-ae96fc9386afff88.js +0 -1
  256. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/page-062c6fef8aef25a6.js +0 -1
  257. package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/page-5326f2b34b200e50.js +0 -1
  258. package/.next/standalone/.next/static/css/a3f1e693b51f7540.css +0 -1
  259. /package/.next/standalone/.next/static/{3AEr6cS1BaPlwTuyPvMQF → yBxnuARbl0brBJS3_STaI}/_buildManifest.js +0 -0
  260. /package/.next/standalone/.next/static/{3AEr6cS1BaPlwTuyPvMQF → yBxnuARbl0brBJS3_STaI}/_ssgManifest.js +0 -0
@@ -1,24 +1,32 @@
1
1
  #!/usr/bin/env bash
2
2
  # on-post-verify-task.sh — PostToolUse hook for chorus_admin_verify_task
3
3
  #
4
- # Detects the "last task verified for an OpenSpec-mode idea" condition and
5
- # injects an additionalContext reminder telling the main agent to run
6
- # `openspec archive <slug>` and mirror the resulting
7
- # openspec/specs/<capability>/spec.md files back to the matching Chorus
8
- # Documents.
4
+ # Two independent reminder branches share the post-verify trigger:
9
5
  #
10
- # Detection contract (all signals must hold to fire):
11
- # 1. CHORUS_OPENSPEC_MODE != "off" explicit opt-out wins.
12
- # 2. The project root contains an `openspec/` directory this repo is
13
- # OpenSpec-init'd. Probed via $CLAUDE_PROJECT_DIR/openspec.
14
- # 3. `openspec` CLI is on PATH — needed for the agent's later
15
- # `openspec archive` step. Both (2) and (3) are required because
16
- # either alone leaves the archive workflow unrunnable.
17
- # 4. The verified task's proposal description contains a line matching
18
- # ^OpenSpec change slug: <slug>$ (slug provenance from §3.5).
19
- # 5. Every task under the same proposal has status === "done".
6
+ # Branch A OpenSpec archive trigger (legacy)
7
+ # Detects "last task verified for an OpenSpec-mode proposal" and tells
8
+ # the agent to run `openspec archive <slug>` plus mirror updated specs
9
+ # back into Chorus Documents.
10
+ # Gates (all must hold): CLAUDE_PLUGIN_OPTION_ENABLEOPENSPEC=true,
11
+ # CHORUS_OPENSPEC_MODE!=off, $CLAUDE_PROJECT_DIR/openspec/ exists,
12
+ # `openspec` CLI on PATH, proposal description matches
13
+ # ^OpenSpec change slug:, every task under that proposal is done.
20
14
  #
21
- # If any signal fails, the hook exits 0 silently (strict opt-in).
15
+ # Branch B Idea-completion report reminder
16
+ # Tells the agent to call `chorus_create_report` when this proposal
17
+ # is finished and has no report Document yet. Two checks: all tasks
18
+ # of THIS proposal are done/closed, and THIS proposal has no
19
+ # `type="report"` Document yet. The multi-proposal-per-Idea case is
20
+ # handled by yolo's mandatory end-step, not by this hook.
21
+ #
22
+ # Each branch is computed independently into its own context variable;
23
+ # any non-empty contexts are concatenated and emitted as one
24
+ # `additionalContext` payload at the end. Either branch firing on its
25
+ # own produces exactly one reminder; both firing produces both reminders
26
+ # joined by a blank line.
27
+ #
28
+ # Branch B is read-only — it never calls `chorus_create_report` or any
29
+ # other mutation tool.
22
30
  #
23
31
  # Bash 3.2 compatible (per CLAUDE.md pitfall #10): no ${VAR,,}, no
24
32
  # ${VAR^^}, no `declare -A`, no `mapfile`, no `readarray`, no `|&`,
@@ -30,17 +38,11 @@
30
38
 
31
39
  set -euo pipefail
32
40
 
33
- # Check userConfig toggle — default enabled. The same `enableOpenSpec`
34
- # switch gates SessionStart detection; if it's off, we skip the archive
35
- # reminder too. (Env-level CHORUS_OPENSPEC_MODE=off is checked separately
36
- # at step 4 for symmetry with the SessionStart gate.)
37
- if [ "${CLAUDE_PLUGIN_OPTION_ENABLEOPENSPEC:-true}" != "true" ]; then
38
- exit 0
39
- fi
40
-
41
41
  SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
42
42
  API="${SCRIPT_DIR}/chorus-api.sh"
43
43
 
44
+ # ===== Shared: event parse =====
45
+
44
46
  # Read event JSON from stdin (PostToolUse hook input)
45
47
  EVENT=""
46
48
  if [ ! -t 0 ]; then
@@ -51,35 +53,17 @@ if [ -z "$EVENT" ]; then
51
53
  exit 0
52
54
  fi
53
55
 
54
- # Step 2: Extract taskUuid from .tool_input
56
+ # Extract taskUuid from .tool_input
55
57
  TASK_UUID=$(printf '%s' "$EVENT" | jq -r '.tool_input.taskUuid // empty' 2>/dev/null) || true
56
58
 
57
- # Step 3: If taskUuid is empty -> exit 0 silently
59
+ # If taskUuid is empty -> exit 0 silently
58
60
  if [ -z "$TASK_UUID" ]; then
59
61
  exit 0
60
62
  fi
61
63
 
62
- # Step 4: OpenSpec gateexplicit opt-out, then folder + CLI both required.
63
- # Both folder-presence and CLI-presence are necessary: the agent will run
64
- # `openspec archive <slug>` on receipt of the injected reminder, and that
65
- # command needs the openspec/ working directory AND the CLI on PATH. If
66
- # either is missing, the reminder would point the agent at a dead end, so
67
- # we silently skip injection and let the verify pass through unannotated.
68
- if [ "${CHORUS_OPENSPEC_MODE:-}" = "off" ]; then
69
- exit 0
70
- fi
71
- PROJECT_ROOT="${CLAUDE_PROJECT_DIR:-$PWD}"
72
- if [ ! -d "${PROJECT_ROOT}/openspec" ]; then
73
- exit 0
74
- fi
75
- if ! command -v openspec >/dev/null 2>&1; then
76
- exit 0
77
- fi
78
- if ! openspec --version >/dev/null 2>&1; then
79
- exit 0
80
- fi
81
-
82
- # Step 5: chorus_get_task -> proposalUuid
64
+ # Resolve the verified task once both branches need proposalUuid +
65
+ # project.uuid. If the lookup fails or returns no proposalUuid (Quick
66
+ # Tasks), neither branch can fire, so we exit silently.
83
67
  TASK_JSON=$("$API" mcp-tool chorus_get_task "$(printf '{"taskUuid":"%s"}' "$TASK_UUID")" 2>/dev/null) || exit 0
84
68
  if [ -z "$TASK_JSON" ]; then
85
69
  exit 0
@@ -88,103 +72,202 @@ fi
88
72
  PROPOSAL_UUID=$(printf '%s' "$TASK_JSON" | jq -r '.proposalUuid // empty' 2>/dev/null) || true
89
73
  PROJECT_UUID=$(printf '%s' "$TASK_JSON" | jq -r '.project.uuid // empty' 2>/dev/null) || true
90
74
 
91
- # Step 6: If proposalUuid empty -> exit 0 silently (Quick Tasks have no proposal)
92
- if [ -z "$PROPOSAL_UUID" ]; then
75
+ if [ -z "$PROPOSAL_UUID" ] || [ -z "$PROJECT_UUID" ]; then
93
76
  exit 0
94
77
  fi
95
78
 
96
- # Step 7: chorus_get_proposal -> description (for slug grep)
79
+ # Both branches need the proposal's full record; fetch once.
97
80
  PROPOSAL_JSON=$("$API" mcp-tool chorus_get_proposal "$(printf '{"proposalUuid":"%s"}' "$PROPOSAL_UUID")" 2>/dev/null) || exit 0
98
81
  if [ -z "$PROPOSAL_JSON" ]; then
99
82
  exit 0
100
83
  fi
101
84
 
102
- PROPOSAL_DESC=$(printf '%s' "$PROPOSAL_JSON" | jq -r '.description // empty' 2>/dev/null) || true
103
-
104
- # Step 9: grep description for ^OpenSpec change slug: (.+)$ — first match wins
105
- SLUG=""
106
- if [ -n "$PROPOSAL_DESC" ]; then
107
- # POSIX-portable: print description with embedded newlines via printf %s
108
- # then grep line-anchored for the slug marker.
109
- SLUG_LINE=$(printf '%s\n' "$PROPOSAL_DESC" | grep -E '^OpenSpec change slug: .+' | head -1 || true)
110
- if [ -n "$SLUG_LINE" ]; then
111
- # Strip the prefix; trim trailing whitespace.
112
- SLUG=$(printf '%s' "$SLUG_LINE" | sed -e 's/^OpenSpec change slug:[[:space:]]*//' -e 's/[[:space:]]*$//')
85
+ # ===== Branch A: OpenSpec archive trigger =====
86
+ #
87
+ # Returns the archive-reminder context on stdout when all conditions
88
+ # hold; returns empty (silent skip) otherwise. Designed to be captured
89
+ # via command substitution: OPENSPEC_CONTEXT=$(branch_openspec_archive)
90
+ branch_openspec_archive() {
91
+ # OpenSpec userConfig toggle default enabled. The same `enableOpenSpec`
92
+ # switch gates SessionStart detection; if it's off, we skip the archive
93
+ # reminder too. (Env-level CHORUS_OPENSPEC_MODE=off is checked separately
94
+ # below for symmetry with the SessionStart gate.)
95
+ if [ "${CLAUDE_PLUGIN_OPTION_ENABLEOPENSPEC:-true}" != "true" ]; then
96
+ return 0
113
97
  fi
114
- fi
115
98
 
116
- # Step 10: If $SLUG is empty -> exit 0 silently (free-form proposal)
117
- if [ -z "$SLUG" ]; then
118
- exit 0
119
- fi
99
+ # OpenSpec gate explicit opt-out, then folder + CLI both required.
100
+ # Both folder-presence and CLI-presence are necessary: the agent will
101
+ # run `openspec archive <slug>` on receipt of the injected reminder,
102
+ # and that command needs the openspec/ working directory AND the CLI
103
+ # on PATH. If either is missing, the reminder would point the agent
104
+ # at a dead end, so we silently skip injection.
105
+ if [ "${CHORUS_OPENSPEC_MODE:-}" = "off" ]; then
106
+ return 0
107
+ fi
108
+ local project_root="${CLAUDE_PROJECT_DIR:-$PWD}"
109
+ if [ ! -d "${project_root}/openspec" ]; then
110
+ return 0
111
+ fi
112
+ if ! command -v openspec >/dev/null 2>&1; then
113
+ return 0
114
+ fi
115
+ if ! openspec --version >/dev/null 2>&1; then
116
+ return 0
117
+ fi
120
118
 
121
- # Step 8: chorus_list_tasks (filtered by proposalUuid) -> verify every task is "done".
122
- # (The proposal-design assumed chorus_get_idea returned tasks[], but the
123
- # actual MCP tool only returns IdeaResponse; chorus_list_tasks with the
124
- # proposalUuids filter is the closest equivalent and is the documented
125
- # contract.)
126
- #
127
- # We page through up to 200 tasks (pageSize=200) — far above the design
128
- # expectation of ~10-20 tasks per proposal. If a proposal exceeds 200
129
- # tasks the hook conservatively exits 0 silently, matching the
130
- # Tech Design "Risk: chorus_get_idea is paginated" mitigation.
131
- TASKS_JSON=$("$API" mcp-tool chorus_list_tasks "$(printf '{"projectUuid":"%s","proposalUuids":["%s"],"pageSize":200}' "$PROJECT_UUID" "$PROPOSAL_UUID")" 2>/dev/null) || exit 0
132
- if [ -z "$TASKS_JSON" ]; then
133
- exit 0
134
- fi
119
+ local proposal_desc
120
+ proposal_desc=$(printf '%s' "$PROPOSAL_JSON" | jq -r '.description // empty' 2>/dev/null) || true
135
121
 
136
- TOTAL_TASKS=$(printf '%s' "$TASKS_JSON" | jq -r '.total // 0' 2>/dev/null) || true
137
- RETURNED_TASKS=$(printf '%s' "$TASKS_JSON" | jq -r '.tasks | length' 2>/dev/null) || true
122
+ # grep description for ^OpenSpec change slug: (.+)$ first match wins
123
+ local slug=""
124
+ if [ -n "$proposal_desc" ]; then
125
+ local slug_line
126
+ slug_line=$(printf '%s\n' "$proposal_desc" | grep -E '^OpenSpec change slug: .+' | head -1 || true)
127
+ if [ -n "$slug_line" ]; then
128
+ slug=$(printf '%s' "$slug_line" | sed -e 's/^OpenSpec change slug:[[:space:]]*//' -e 's/[[:space:]]*$//')
129
+ fi
130
+ fi
138
131
 
139
- # Pagination guard: if total exceeds what we fetched, exit silently (better
140
- # safe than fire prematurely).
141
- if [ -n "$TOTAL_TASKS" ] && [ -n "$RETURNED_TASKS" ] && [ "$TOTAL_TASKS" -gt "$RETURNED_TASKS" ]; then
142
- exit 0
143
- fi
132
+ # If slug empty -> silent skip (free-form proposal)
133
+ if [ -z "$slug" ]; then
134
+ return 0
135
+ fi
144
136
 
145
- # Defensive: zero-task proposal would otherwise fall through with
146
- # NOT_DONE_COUNT=0. Proposal-submit validation prevents this in practice;
147
- # this guard makes the gate complete.
148
- if [ -z "$RETURNED_TASKS" ] || [ "$RETURNED_TASKS" -eq 0 ]; then
149
- exit 0
150
- fi
137
+ # chorus_list_tasks (filtered by proposalUuid) -> verify every task is "done".
138
+ # Pagination guard: if total > returned, exit silently (better safe than
139
+ # fire prematurely). pageSize=200 is far above the design expectation
140
+ # of ~10-20 tasks per proposal.
141
+ local tasks_json
142
+ tasks_json=$("$API" mcp-tool chorus_list_tasks "$(printf '{"projectUuid":"%s","proposalUuids":["%s"],"pageSize":200}' "$PROJECT_UUID" "$PROPOSAL_UUID")" 2>/dev/null) || return 0
143
+ if [ -z "$tasks_json" ]; then
144
+ return 0
145
+ fi
151
146
 
152
- NOT_DONE_COUNT=$(printf '%s' "$TASKS_JSON" | jq -r '[.tasks[] | select(.status != "done")] | length' 2>/dev/null) || true
147
+ local total_tasks returned_tasks
148
+ total_tasks=$(printf '%s' "$tasks_json" | jq -r '.total // 0' 2>/dev/null) || true
149
+ returned_tasks=$(printf '%s' "$tasks_json" | jq -r '.tasks | length' 2>/dev/null) || true
153
150
 
154
- if [ -z "$NOT_DONE_COUNT" ] || [ "$NOT_DONE_COUNT" != "0" ]; then
155
- exit 0
156
- fi
151
+ if [ -n "$total_tasks" ] && [ -n "$returned_tasks" ] && [ "$total_tasks" -gt "$returned_tasks" ]; then
152
+ return 0
153
+ fi
157
154
 
158
- # Step 11: Build CONTEXT instruct the agent to run `openspec archive <SLUG>`
159
- # and mirror the resulting specs/<capability>/spec.md files back to the
160
- # matching Chorus Documents.
161
- #
162
- # Note on chorus_get_documents: the canonical §3.8 mirror-back step uses
163
- # `chorus_get_documents(projectUuid)` (the only filter the tool supports
164
- # server-side is `type` — there is NO server-side title-prefix filter).
165
- # The agent must list all `type:"spec"` documents and filter client-side
166
- # by title prefix `Spec:` to find the matching capability.
155
+ # Defensive: zero-task proposal would otherwise fall through with
156
+ # not_done_count=0. Proposal-submit validation prevents this in practice;
157
+ # this guard makes the gate complete.
158
+ if [ -z "$returned_tasks" ] || [ "$returned_tasks" -eq 0 ]; then
159
+ return 0
160
+ fi
167
161
 
168
- CONTEXT="[Chorus Plugin — OpenSpec Archive Trigger]
169
- The last task of OpenSpec-mode proposal ${PROPOSAL_UUID} (slug \`${SLUG}\`) has been admin-verified.
162
+ local not_done_count
163
+ not_done_count=$(printf '%s' "$tasks_json" | jq -r '[.tasks[] | select(.status != "done")] | length' 2>/dev/null) || true
164
+
165
+ if [ -z "$not_done_count" ] || [ "$not_done_count" != "0" ]; then
166
+ return 0
167
+ fi
168
+
169
+ # Build the archive reminder. Note on chorus_get_documents: the
170
+ # canonical §3.8 mirror-back step uses chorus_get_documents(projectUuid)
171
+ # — the only filter the tool supports server-side is `type` (no title
172
+ # filter). The agent must list all type:"spec" documents and filter
173
+ # client-side by title prefix `Spec:` to find the matching capability.
174
+ cat <<CTX
175
+ [Chorus Plugin — OpenSpec Archive Trigger]
176
+ The last task of OpenSpec-mode proposal ${PROPOSAL_UUID} (slug \`${slug}\`) has been admin-verified.
170
177
 
171
178
  ACTION REQUIRED: archive the OpenSpec change locally and mirror updated specs back to the Chorus Documents. Run the steps below in order; HALT immediately on any error (canonical §6 — no silent errors).
172
179
 
173
- 1. Run \`openspec archive ${SLUG}\` in the repo root. This moves \`openspec/changes/${SLUG}/\` under \`openspec/changes/archive/<date>-${SLUG}/\` and emits/updates one \`openspec/specs/<capability>/spec.md\` per capability. If the CLI prompts interactively and a \`--yes\`/\`--no-confirm\` flag is available, use it (verify with \`openspec archive --help\`).
180
+ 1. Run \`openspec archive ${slug}\` in the repo root. This moves \`openspec/changes/${slug}/\` under \`openspec/changes/archive/<date>-${slug}/\` and emits/updates one \`openspec/specs/<capability>/spec.md\` per capability. If the CLI prompts interactively and a \`--yes\`/\`--no-confirm\` flag is available, use it (verify with \`openspec archive --help\`).
174
181
 
175
182
  2. For EACH newly-emitted \`openspec/specs/<capability>/spec.md\`:
176
- - List all spec-type Documents in this project: \`chorus_get_documents({projectUuid: \"${PROJECT_UUID}\", type: \"spec\"})\`. The \`type\` filter is the only server-side filter — do client-side title matching against the documents you get back.
183
+ - List all spec-type Documents in this project: \`chorus_get_documents({projectUuid: "${PROJECT_UUID}", type: "spec"})\`. The \`type\` filter is the only server-side filter — do client-side title matching against the documents you get back.
177
184
  - Find the Document whose title matches the capability (canonical §3.8 mirror-back contract; typical title shape \`Spec: <capability>\`).
178
185
  - Call \`chorus_pm_update_document\` with the new content from the on-disk spec.md.
179
186
 
180
- 3. On any error from \`openspec archive\` or \`chorus_pm_update_document\`: print stderr verbatim, post a comment on the proposal recording the failure (\`chorus_add_comment({targetType: \"proposal\", targetUuid: \"${PROPOSAL_UUID}\", content: \"...\"})\`), and HALT. No retry, no silent skip.
187
+ 3. On any error from \`openspec archive\` or \`chorus_pm_update_document\`: print stderr verbatim, post a comment on the proposal recording the failure (\`chorus_add_comment({targetType: "proposal", targetUuid: "${PROPOSAL_UUID}", content: "..."})\`), and HALT. No retry, no silent skip.
181
188
 
182
189
  4. Confirm success by listing \`openspec/specs/<capability>/spec.md\` files and verifying they round-trip byte-equal (modulo trailing newline) with their Chorus Document counterparts.
183
190
 
184
- References: canonical openspec-aware §3.8 (mirror-back contract), §3.9 (this archive trigger), §6 (no silent errors)."
191
+ References: canonical openspec-aware §3.8 (mirror-back contract), §3.9 (this archive trigger), §6 (no silent errors).
192
+ CTX
193
+ }
194
+
195
+ # ===== Branch B: Idea-completion report reminder =====
196
+ #
197
+ # Fires when this Proposal is finished AND has no report Document yet.
198
+ # Two checks only:
199
+ # 1. all tasks of this proposal in {done, closed}
200
+ # 2. no Document with type="report" attached to this proposal
201
+ # Read-only — the hook never calls chorus_create_report.
202
+ branch_idea_report_reminder() {
203
+ # Only idea-rooted proposals get a completion report.
204
+ local input_type
205
+ input_type=$(printf '%s' "$PROPOSAL_JSON" | jq -r '.inputType // empty' 2>/dev/null) || true
206
+ if [ "$input_type" != "idea" ]; then
207
+ return 0
208
+ fi
209
+
210
+ # Check 1: all tasks of this proposal are terminal.
211
+ # pageSize=200 + a total>returned guard so a wide proposal can't fool the
212
+ # check by happening to fit "done" tasks on page 1 while non-terminals
213
+ # remain on later pages. (Same belt-and-suspenders pattern as Branch A.)
214
+ local tasks_json non_terminal_count tasks_total tasks_returned
215
+ tasks_json=$("$API" mcp-tool chorus_list_tasks "$(printf '{"projectUuid":"%s","proposalUuids":["%s"],"pageSize":200}' "$PROJECT_UUID" "$PROPOSAL_UUID")" 2>/dev/null) || return 0
216
+ [ -n "$tasks_json" ] || return 0
217
+ tasks_total=$(printf '%s' "$tasks_json" | jq -r '.total // 0' 2>/dev/null) || return 0
218
+ tasks_returned=$(printf '%s' "$tasks_json" | jq -r '(.tasks // []) | length' 2>/dev/null) || return 0
219
+ if [ -n "$tasks_total" ] && [ -n "$tasks_returned" ] && [ "$tasks_total" -gt "$tasks_returned" ]; then
220
+ return 0
221
+ fi
222
+ non_terminal_count=$(printf '%s' "$tasks_json" | jq -r '[(.tasks // [])[] | select(.status != "done" and .status != "closed")] | length' 2>/dev/null) || return 0
223
+ [ "$non_terminal_count" = "0" ] || return 0
224
+
225
+ # Check 2: no report Document on this proposal yet.
226
+ # chorus_get_documents only filters by type server-side; we do the
227
+ # proposalUuid filter client-side. pageSize=200 + total>returned guard
228
+ # avoids a false "no report" when the proposal's existing report is on
229
+ # a later page in a long-lived project.
230
+ local docs_json existing_report_count docs_total docs_returned
231
+ docs_json=$("$API" mcp-tool chorus_get_documents "$(printf '{"projectUuid":"%s","type":"report","pageSize":200}' "$PROJECT_UUID")" 2>/dev/null) || return 0
232
+ [ -n "$docs_json" ] || return 0
233
+ docs_total=$(printf '%s' "$docs_json" | jq -r '.total // 0' 2>/dev/null) || return 0
234
+ docs_returned=$(printf '%s' "$docs_json" | jq -r '(.documents // []) | length' 2>/dev/null) || return 0
235
+ if [ -n "$docs_total" ] && [ -n "$docs_returned" ] && [ "$docs_total" -gt "$docs_returned" ]; then
236
+ return 0
237
+ fi
238
+ existing_report_count=$(printf '%s' "$docs_json" | jq -r --arg p "$PROPOSAL_UUID" '[(.documents // [])[] | select(.proposalUuid==$p)] | length' 2>/dev/null) || return 0
239
+ [ "$existing_report_count" = "0" ] || return 0
240
+
241
+ # Emit the reminder. The literal substring `create idea-completion
242
+ # report` is the contract grep target asserted by both the spec
243
+ # scenarios and the regression test.
244
+ cat <<CTX
245
+ [Chorus Plugin — Idea-Completion Report Trigger]
246
+ All tasks of proposal ${PROPOSAL_UUID} are now done; no completion report yet.
185
247
 
186
- # Step 12: Inject CONTEXT as additionalContext.
187
- "$API" hook-output "" "$CONTEXT" "PostToolUse"
248
+ ACTION REQUESTED: create idea-completion report for this Idea. Call \`chorus_create_report\` with proposalUuid="${PROPOSAL_UUID}". The tool description carries the Summary / Decisions / Follow-ups template.
249
+ CTX
250
+ }
251
+
252
+ # ===== Run both branches and emit combined output =====
253
+
254
+ OPENSPEC_CONTEXT=$(branch_openspec_archive || true)
255
+ REPORT_CONTEXT=$(branch_idea_report_reminder || true)
256
+
257
+ COMBINED=""
258
+ if [ -n "$OPENSPEC_CONTEXT" ] && [ -n "$REPORT_CONTEXT" ]; then
259
+ # Two reminders — separate them with a blank line.
260
+ COMBINED="${OPENSPEC_CONTEXT}
261
+
262
+ ${REPORT_CONTEXT}"
263
+ elif [ -n "$OPENSPEC_CONTEXT" ]; then
264
+ COMBINED="$OPENSPEC_CONTEXT"
265
+ elif [ -n "$REPORT_CONTEXT" ]; then
266
+ COMBINED="$REPORT_CONTEXT"
267
+ fi
268
+
269
+ if [ -n "$COMBINED" ]; then
270
+ "$API" hook-output "" "$COMBINED" "PostToolUse"
271
+ fi
188
272
 
189
- # Step 13: exit 0 (set -e already enforces this on success).
190
273
  exit 0