copilot-operator 0.1.55 → 0.1.57

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 (195) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +625 -609
  3. package/dist/src/api/folderPicker.js +22 -22
  4. package/dist/src/api/operator.controller.js +30 -3
  5. package/dist/src/api/operator.service.js +96 -10
  6. package/dist/src/api/security.js +1 -1
  7. package/dist/src/api/server.js +9 -1
  8. package/dist/src/api/settings.js +18 -4
  9. package/dist/src/cli.js +16 -15
  10. package/dist/src/config/home.js +109 -0
  11. package/dist/src/config/layout.js +40 -5
  12. package/dist/src/config/schema.js +5 -1
  13. package/dist/src/exec/network.js +50 -3
  14. package/dist/src/orchestrator/leadRunner.js +20 -3
  15. package/dist/src/orchestrator/review.js +3 -2
  16. package/dist/src/orchestrator/taskRunner.js +88 -6
  17. package/dist/src/plan/kerrigan.js +126 -126
  18. package/dist/src/plan/systemGuide.js +99 -11
  19. package/dist/src/session/store.js +4 -0
  20. package/dist/src/session/workspaceGit.js +95 -1
  21. package/dist/src/transport/profileLock.js +34 -4
  22. package/dist/web/404.html +3 -3
  23. package/dist/web/_next/static/chunks/1077.7e88c156c16718c0.js +1 -0
  24. package/dist/web/_next/static/chunks/1083.0122bea31f7199d9.js +1 -0
  25. package/dist/web/_next/static/chunks/1490.f5154054ddfd3dee.js +1 -0
  26. package/dist/web/_next/static/chunks/1536.98fab69162f370f0.js +1 -0
  27. package/dist/web/_next/static/chunks/1548.a7127a9edf3f266b.js +1 -0
  28. package/dist/web/_next/static/chunks/1584.7500138d08971f81.js +1 -0
  29. package/dist/web/_next/static/chunks/1732.90182d376c75c315.js +1 -0
  30. package/dist/web/_next/static/chunks/17449abc.fa53da036b7dcfb4.js +1 -0
  31. package/dist/web/_next/static/chunks/1872.d12259d09bb1173f.js +1 -0
  32. package/dist/web/_next/static/chunks/192.955be0d5fcd27ec6.js +1 -0
  33. package/dist/web/_next/static/chunks/1920.59b93a4215a75653.js +1 -0
  34. package/dist/web/_next/static/chunks/2063.4745e20abad5b208.js +1 -0
  35. package/dist/web/_next/static/chunks/2163.60f52655ceb57752.js +1 -0
  36. package/dist/web/_next/static/chunks/2175.8c8957600f6b88a8.js +1 -0
  37. package/dist/web/_next/static/chunks/2280.5a3754f49656d989.js +1 -0
  38. package/dist/web/_next/static/chunks/2355.d6bb92f10d516f81.js +1 -0
  39. package/dist/web/_next/static/chunks/2378.4f15342be64a9d23.js +1 -0
  40. package/dist/web/_next/static/chunks/2395.c2c4d3696d3b5542.js +1 -0
  41. package/dist/web/_next/static/chunks/2486.d130023b2b399eaa.js +1 -0
  42. package/dist/web/_next/static/chunks/2606.8e9434e7fee257b9.js +1 -0
  43. package/dist/web/_next/static/chunks/26dd8e60.1890515693b4ca88.js +1 -0
  44. package/dist/web/_next/static/chunks/2738.2559ed1058f6fb19.js +1 -0
  45. package/dist/web/_next/static/chunks/2821.409d92f5ac5b8142.js +1 -0
  46. package/dist/web/_next/static/chunks/3088.12b1d19ca55225b7.js +1 -0
  47. package/dist/web/_next/static/chunks/3152.d623d85a9afed5d3.js +1 -0
  48. package/dist/web/_next/static/chunks/3184.0788c67536fc4140.js +1 -0
  49. package/dist/web/_next/static/chunks/3194.8ee589997ce1e093.js +1 -0
  50. package/dist/web/_next/static/chunks/3322.4f7b378a41711478.js +1 -0
  51. package/dist/web/_next/static/chunks/3564.bfa030e92401f57d.js +1 -0
  52. package/dist/web/_next/static/chunks/358.4791f77f174006f3.js +1 -0
  53. package/dist/web/_next/static/chunks/3696.a367f4c8f42909d1.js +1 -0
  54. package/dist/web/_next/static/chunks/3748.8726b202d79d0dba.js +3 -0
  55. package/dist/web/_next/static/chunks/3794.19aedfb95f89dc48.js +1 -0
  56. package/dist/web/_next/static/chunks/384.063f394c789898a7.js +1 -0
  57. package/dist/web/_next/static/chunks/3854.39b7a1bf2b4189fe.js +1 -0
  58. package/dist/web/_next/static/chunks/386.2718f961400a3322.js +1 -0
  59. package/dist/web/_next/static/chunks/4008.3691a32e1711848f.js +1 -0
  60. package/dist/web/_next/static/chunks/4054.1c8d37b1513d20d8.js +1 -0
  61. package/dist/web/_next/static/chunks/4328.e326d66dd5c820c6.js +1 -0
  62. package/dist/web/_next/static/chunks/4444.36f5d8532bd6300d.js +1 -0
  63. package/dist/web/_next/static/chunks/4512-8bcb4b34f41115b4.js +1 -0
  64. package/dist/web/_next/static/chunks/4560.b8235d283fb3608c.js +1 -0
  65. package/dist/web/_next/static/chunks/464.f60ecfb6c72ec733.js +1 -0
  66. package/dist/web/_next/static/chunks/4912.1ab85b0ebf52a3e0.js +1 -0
  67. package/dist/web/_next/static/chunks/4982.bbbd303d665de4f0.js +1 -0
  68. package/dist/web/_next/static/chunks/4fecf3c3.e14d65bd1dce80cf.js +1 -0
  69. package/dist/web/_next/static/chunks/5052.dc8c36742419eed5.js +1 -0
  70. package/dist/web/_next/static/chunks/{7496.17282033df0e8794.js → 5115.fbe164892bfd6fa4.js} +1 -1
  71. package/dist/web/_next/static/chunks/5120.b4aadb89d4fb4f65.js +1 -0
  72. package/dist/web/_next/static/chunks/5448.1c4e0b719af53b3f.js +1 -0
  73. package/dist/web/_next/static/chunks/5623.cc6818f4096ce4c2.js +1 -0
  74. package/dist/web/_next/static/chunks/5664.507fea1f6305067e.js +1 -0
  75. package/dist/web/_next/static/chunks/5706.be484c6a7bed3fde.js +1 -0
  76. package/dist/web/_next/static/chunks/6336.b09d0d920c7631eb.js +1 -0
  77. package/dist/web/_next/static/chunks/6364.5b0466f24f4ecf58.js +1 -0
  78. package/dist/web/_next/static/chunks/640.2c2baacde5197a77.js +1 -0
  79. package/dist/web/_next/static/chunks/6419.61399b0413b8bef0.js +1 -0
  80. package/dist/web/_next/static/chunks/642.b70763e1cfe9e45e.js +1 -0
  81. package/dist/web/_next/static/chunks/6554.0110334a71e72bbe.js +1 -0
  82. package/dist/web/_next/static/chunks/6688.4a6ac23ba061262b.js +1 -0
  83. package/dist/web/_next/static/chunks/6815.6537cc012ba16cca.js +1 -0
  84. package/dist/web/_next/static/chunks/6896.33fdeb4e682c2cab.js +1 -0
  85. package/dist/web/_next/static/chunks/6912.3416822e13b4bc03.js +1 -0
  86. package/dist/web/_next/static/chunks/6944.635230aa8cb23871.js +1 -0
  87. package/dist/web/_next/static/chunks/6964.35718884ad3375bc.js +1 -0
  88. package/dist/web/_next/static/chunks/6992.4b059bae2659231d.js +1 -0
  89. package/dist/web/_next/static/chunks/6996.7c41217972cabc3f.js +1 -0
  90. package/dist/web/_next/static/chunks/7024.8bc670b892a558bb.js +1 -0
  91. package/dist/web/_next/static/chunks/7040.e058d8f95c3c11e7.js +1 -0
  92. package/dist/web/_next/static/chunks/714.bee36b765509e92c.js +1 -0
  93. package/dist/web/_next/static/chunks/7220.c9c5c5f25baafec7.js +1 -0
  94. package/dist/web/_next/static/chunks/7250.7f1d45021e49d2fd.js +1 -0
  95. package/dist/web/_next/static/chunks/7290.7bceed706f7b6df5.js +1 -0
  96. package/dist/web/_next/static/chunks/7301.c60eb2ba8ae6b859.js +1 -0
  97. package/dist/web/_next/static/chunks/7328.021e5e45124e40de.js +1 -0
  98. package/dist/web/_next/static/chunks/7340.a5a75ee889c30b74.js +1 -0
  99. package/dist/web/_next/static/chunks/7443.c189418756727101.js +1 -0
  100. package/dist/web/_next/static/chunks/7484.c0e6bfca7b2fb65e.js +1 -0
  101. package/dist/web/_next/static/chunks/7496.e638a7286c17e438.js +1 -0
  102. package/dist/web/_next/static/chunks/7695.11ba99db589cb586.js +1 -0
  103. package/dist/web/_next/static/chunks/7764.e62333ee1d63a458.js +1 -0
  104. package/dist/web/_next/static/chunks/7921-fb0045927b0e86a8.js +1 -0
  105. package/dist/web/_next/static/chunks/80.df762af692aca107.js +1 -0
  106. package/dist/web/_next/static/chunks/8024.4bd0b5a7f26a0f7d.js +1 -0
  107. package/dist/web/_next/static/chunks/82b69429.c6dd4e5c5ac704f3.js +368 -0
  108. package/dist/web/_next/static/chunks/8360.371456f14873ee9f.js +1 -0
  109. package/dist/web/_next/static/chunks/8544.7c1fb012f9073eaa.js +1 -0
  110. package/dist/web/_next/static/chunks/8547.424f9970cc72775f.js +1 -0
  111. package/dist/web/_next/static/chunks/8584.97613589db58864f.js +1 -0
  112. package/dist/web/_next/static/chunks/8616.8e05c4a20dcdf39d.js +1 -0
  113. package/dist/web/_next/static/chunks/8752.bf29293df3366e17.js +298 -0
  114. package/dist/web/_next/static/chunks/8800.3c7b01176e98160a.js +1 -0
  115. package/dist/web/_next/static/chunks/88b2132a.04b02968da05b8a6.js +1005 -0
  116. package/dist/web/_next/static/chunks/8924.49dd385ac101fb7e.js +1 -0
  117. package/dist/web/_next/static/chunks/896.eb46d6e001d25d0f.js +1 -0
  118. package/dist/web/_next/static/chunks/9003.3d5c7a418d0b858b.js +1 -0
  119. package/dist/web/_next/static/chunks/9067.f7e111c6aa999784.js +1 -0
  120. package/dist/web/_next/static/chunks/9068.9662bb8fa5fdc637.js +1 -0
  121. package/dist/web/_next/static/chunks/9178.a7631bd283f2a69c.js +1 -0
  122. package/dist/web/_next/static/chunks/9190.e3a90b1a9ed21668.js +1 -0
  123. package/dist/web/_next/static/chunks/9296.59fcfc8261a4c6bd.js +1 -0
  124. package/dist/web/_next/static/chunks/9312.e1fb4089a122d3d3.js +1 -0
  125. package/dist/web/_next/static/chunks/9348.022486b05b882739.js +1 -0
  126. package/dist/web/_next/static/chunks/948.132a0571d85c8b01.js +1 -0
  127. package/dist/web/_next/static/chunks/951.43a4ba54b1d1ff4e.js +3 -0
  128. package/dist/web/_next/static/chunks/9544.acc06fe34aa32c5c.js +7 -0
  129. package/dist/web/_next/static/chunks/9591.d205941f0062de24.js +1 -0
  130. package/dist/web/_next/static/chunks/9628.d8954a2bd28b85a6.js +1 -0
  131. package/dist/web/_next/static/chunks/9636.35df6241125f8513.js +1 -0
  132. package/dist/web/_next/static/chunks/9658.cdecb568f615e4c9.js +782 -0
  133. package/dist/web/_next/static/chunks/9672.b379566a8bfcd947.js +1 -0
  134. package/dist/web/_next/static/chunks/9680.d10b204d08ca3a62.js +1 -0
  135. package/dist/web/_next/static/chunks/9728.1d4cb6c68bd55f44.js +1 -0
  136. package/dist/web/_next/static/chunks/9747.a5828643aaff11c0.js +1 -0
  137. package/dist/web/_next/static/chunks/9784.c9938b7e977e14eb.js +1 -0
  138. package/dist/web/_next/static/chunks/9812.024424a52730b057.js +1 -0
  139. package/dist/web/_next/static/chunks/9888.ce925cd415b672ef.js +1 -0
  140. package/dist/web/_next/static/chunks/{9891.91a2c59fd073fd48.js → 9891.a97db7c8f05693d1.js} +1 -1
  141. package/dist/web/_next/static/chunks/9904.a3d2f8569d7355ab.js +1 -0
  142. package/dist/web/_next/static/chunks/992.8470b96c23472686.js +1 -0
  143. package/dist/web/_next/static/chunks/9924.03252dda78c705c3.js +1 -0
  144. package/dist/web/_next/static/chunks/9968.3d45ff9183e8b07b.js +1 -0
  145. package/dist/web/_next/static/chunks/app/_not-found/page-23c6c0396966da29.js +1 -0
  146. package/dist/web/_next/static/chunks/app/defaults/page-4e5be923763ba3d9.js +1 -0
  147. package/dist/web/_next/static/chunks/app/layout-9cd9b0b0587f4882.js +1 -0
  148. package/dist/web/_next/static/chunks/app/page-8e85b507af649f85.js +1 -0
  149. package/dist/web/_next/static/chunks/app/settings/page-b39878dce98ded94.js +1 -0
  150. package/dist/web/_next/static/chunks/app/system/page-176448acb2c8baa6.js +1 -0
  151. package/dist/web/_next/static/chunks/{main-app-f747f0f5ddb4213b.js → main-app-d23441ca81b3a063.js} +1 -1
  152. package/dist/web/_next/static/chunks/webpack-d103630008e57024.js +1 -0
  153. package/dist/web/_next/static/css/2de713eca93a7750.css +3 -0
  154. package/dist/web/_next/static/css/4bf77b2aec4626c2.css +1 -0
  155. package/dist/web/_next/static/css/4bfdd3ebb3d1a180.css +1 -0
  156. package/dist/web/_next/static/css/73368887921d70d9.css +1 -0
  157. package/dist/web/_next/static/g2MUlOzNxfAGFR7EI9zQv/_buildManifest.js +1 -0
  158. package/dist/web/_next/static/media/codicon.5ce2572b.ttf +0 -0
  159. package/dist/web/_next/static/media/editorWebWorkerMain.828b206c.js +1 -0
  160. package/dist/web/defaults.html +3 -3
  161. package/dist/web/defaults.txt +11 -10
  162. package/dist/web/icon.svg +4 -0
  163. package/dist/web/index.html +4 -4
  164. package/dist/web/index.txt +11 -10
  165. package/dist/web/settings.html +14 -0
  166. package/dist/web/settings.txt +26 -0
  167. package/dist/web/system.html +3 -3
  168. package/dist/web/system.txt +11 -10
  169. package/dist/web/third-party-notices.txt +5966 -0
  170. package/package.json +160 -153
  171. package/prompts/lead1.md +140 -140
  172. package/prompts/level1.md +574 -574
  173. package/prompts/review1.md +287 -287
  174. package/dist/src/context/desktopDir.js +0 -44
  175. package/dist/web/_next/static/chunks/1077.3c07f38a61cef38a.js +0 -1
  176. package/dist/web/_next/static/chunks/1548.55dadf800d6c2a79.js +0 -1
  177. package/dist/web/_next/static/chunks/2163.83d1085b99ac1773.js +0 -1
  178. package/dist/web/_next/static/chunks/714.88c495053f62f187.js +0 -1
  179. package/dist/web/_next/static/chunks/7220.f1e8a10d52a7ee87.js +0 -1
  180. package/dist/web/_next/static/chunks/7500-1353339f7e2eda10.js +0 -1
  181. package/dist/web/_next/static/chunks/7921-56de379f7bdfbacf.js +0 -1
  182. package/dist/web/_next/static/chunks/8547.0a9997b67008c706.js +0 -1
  183. package/dist/web/_next/static/chunks/8584.b34930a6837344a6.js +0 -1
  184. package/dist/web/_next/static/chunks/9067.5651e8647cef053f.js +0 -1
  185. package/dist/web/_next/static/chunks/9591.fabd60bd0d10341c.js +0 -1
  186. package/dist/web/_next/static/chunks/9747.ad6b319cf12169ee.js +0 -1
  187. package/dist/web/_next/static/chunks/app/_not-found/page-1264c0db9665169c.js +0 -1
  188. package/dist/web/_next/static/chunks/app/defaults/page-ba24062a86d50e12.js +0 -1
  189. package/dist/web/_next/static/chunks/app/layout-46efb208d7c88648.js +0 -1
  190. package/dist/web/_next/static/chunks/app/page-07f80fd07281a230.js +0 -1
  191. package/dist/web/_next/static/chunks/app/system/page-825f53f14d16033d.js +0 -1
  192. package/dist/web/_next/static/chunks/webpack-ab0451ef95a8f52a.js +0 -1
  193. package/dist/web/_next/static/css/131c746a9d388eda.css +0 -1
  194. package/dist/web/_next/static/w1xPyNasTvFr11R3F7HkS/_buildManifest.js +0 -1
  195. /package/dist/web/_next/static/{w1xPyNasTvFr11R3F7HkS → g2MUlOzNxfAGFR7EI9zQv}/_ssgManifest.js +0 -0
package/package.json CHANGED
@@ -1,153 +1,160 @@
1
- {
2
- "name": "copilot-operator",
3
- "version": "0.1.55",
4
- "private": false,
5
- "type": "module",
6
- "description": "Automates a Microsoft 365 Copilot chat: sends prompts, extracts commands, runs them, reports back.",
7
- "license": "MIT",
8
- "engines": {
9
- "node": ">=20"
10
- },
11
- "scripts": {
12
- "build": "tsc -p tsconfig.json",
13
- "build:package": "node scripts/build-package.mjs",
14
- "prepack": "node scripts/build-package.mjs",
15
- "check:pacing": "tsx test/pacing.check.ts",
16
- "check:runner": "tsx test/runner.check.ts",
17
- "check:chat": "tsx test/chat.check.ts",
18
- "cop": "tsx src/cli.ts",
19
- "check:parser": "tsx test/parser.check.ts",
20
- "check:report": "tsx test/report.check.ts",
21
- "check": "npm run check:suite && npm run check:parser && npm run check:damage && npm run check:session && npm run check:report && npm run check:runner && npm run check:vcs && npm run check:checks && npm run check:workdir && npm run check:processes && npm run check:environment && npm run check:crash && npm run check:clipboard && npm run check:review && npm run check:chat && npm run check:pacing && npm run check:pause-clock && npm run check:shells && npm run check:guide && npm run check:bundle && npm run check:runname && npm run check:dangerous && npm run check:programs && npm run check:manifest && npm run check:lock && npm run check:isolation && npm run check:security && npm run check:update && npm run check:confinement && npm run check:network && npm run check:hardening && npm run check:package && npm run check:models && npm run check:settings-precedence && npm run check:review-evidence && npm run check:model-help && npm run check:continue && npm run check:startfrom && npm run check:diff && npm run check:integrity && npm run check:scope && npm run check:progress && npm run check:modelpicker && npm run check:formatrepair && npm run check:intent && npm run check:e2e-run && npm run check:e2e-continue && npm run check:e2e-planmode && npm run check:e2e-chat && npm run check:e2e-lead && npm run check:lead-ledger && npm run check:workspace-git && npm run check:e2e-interrupt && npm run check:e2e-vcs && npm run check:noattach && npm run check:guard && npm run check:gate && npm run check:own-scripts && npm run check:file-icons && npm run check:reference && npm run check:skills && npm run check:search && npm run check:installed && npm run check:e2e-review && npm run check:e2e-branches && npm run check:e2e-loop && npm run check:transport && npm run check:exec && npm run check:pins && npm run check:login && npm run check:snapshot && npm run check:inputs && npm run check:attempts && npm run check:finding-ids && npm run check:e2e-commit && npm run check:live-fixes",
22
- "probe": "tsx scripts/probe-locators.ts",
23
- "check:damage": "tsx test/damage.check.ts",
24
- "api": "npm run build && node dist/src/api/main.js",
25
- "api:start": "node dist/src/api/main.js",
26
- "web": "npm run dev --workspace web",
27
- "web:build": "npm run build --workspace web",
28
- "check:session": "tsx test/session.check.ts",
29
- "start": "node scripts/dev.mjs",
30
- "dev": "node scripts/dev.mjs --open",
31
- "check:vcs": "tsx test/vcs.check.ts",
32
- "check:checks": "tsx test/checks.check.ts",
33
- "check:workdir": "tsx test/workdir.check.ts",
34
- "check:processes": "tsx test/processes.check.ts",
35
- "check:environment": "tsx test/environment.check.ts",
36
- "check:crash": "tsx test/crash.check.ts",
37
- "check:clipboard": "tsx test/clipboard.check.ts",
38
- "check:review": "tsx test/review.check.ts",
39
- "check:review-evidence": "tsx test/review-evidence.check.ts",
40
- "check:settings-precedence": "tsx test/settings-precedence.check.ts",
41
- "check:suite": "tsx test/suite.check.ts",
42
- "check:workspace-git": "tsx test/workspace-git.check.ts",
43
- "check:model-help": "tsx test/model-help.check.ts",
44
- "check:shells": "tsx test/shells.check.ts",
45
- "check:guide": "tsx test/guide.check.ts",
46
- "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json && npm run typecheck --workspace web",
47
- "check:bundle": "tsx test/bundle.check.ts",
48
- "check:runname": "tsx test/runname.check.ts",
49
- "update": "node scripts/update.mjs",
50
- "check:dangerous": "tsx test/dangerous.check.ts",
51
- "check:programs": "tsx test/programs.check.ts",
52
- "check:manifest": "tsx test/manifest.check.ts",
53
- "check:lock": "tsx test/lock.check.ts",
54
- "check:isolation": "tsx test/isolation.check.ts",
55
- "check:security": "tsx test/security.check.ts",
56
- "check:update": "tsx test/update.check.ts",
57
- "check:confinement": "tsx test/confinement.check.ts",
58
- "check:network": "tsx test/network.check.ts",
59
- "check:hardening": "tsx test/hardening.check.ts",
60
- "check:package": "tsx test/package.check.ts",
61
- "check:models": "tsx test/models.check.ts",
62
- "check:continue": "tsx test/continue.check.ts",
63
- "check:startfrom": "tsx test/startfrom.check.ts",
64
- "check:diff": "tsx test/diff.check.ts",
65
- "check:integrity": "tsx test/integrity.check.ts",
66
- "check:scope": "tsx test/scope.check.ts",
67
- "check:progress": "tsx test/progress.check.ts",
68
- "check:modelpicker": "tsx test/modelpicker.check.ts",
69
- "check:formatrepair": "tsx test/formatrepair.check.ts",
70
- "check:intent": "tsx test/intent.check.ts",
71
- "check:live-fixes": "tsx test/live-fixes.check.ts",
72
- "check:live-models": "tsx test/live-models.check.ts",
73
- "check:live-chat": "tsx test/live-chatname.check.ts",
74
- "check:e2e-run": "tsx test/e2e-run.check.ts",
75
- "check:e2e-continue": "tsx test/e2e-continue.check.ts",
76
- "check:e2e-planmode": "tsx test/e2e-planmode.check.ts",
77
- "check:e2e-chat": "tsx test/e2e-chat.check.ts",
78
- "check:e2e-lead": "tsx test/e2e-lead.check.ts",
79
- "check:e2e-interrupt": "tsx test/e2e-interrupt.check.ts",
80
- "check:ui": "node scripts/build-package.mjs && tsx test/ui.check.ts && tsx test/ui-flows.check.ts",
81
- "check:all": "npm run typecheck && npm run check && npm run check:ui && npm run check:release",
82
- "check:e2e-vcs": "tsx test/e2e-vcs.check.ts",
83
- "check:noattach": "tsx test/noattach.check.ts",
84
- "check:guard": "tsx test/guard.check.ts",
85
- "check:own-scripts": "tsx test/own-scripts.check.ts",
86
- "check:file-icons": "tsx test/file-icons.check.ts",
87
- "check:reference": "tsx test/reference.check.ts",
88
- "check:skills": "tsx test/skills.check.ts",
89
- "check:search": "tsx test/search.check.ts",
90
- "check:lead-ledger": "tsx test/lead-ledger.check.ts",
91
- "check:pause-clock": "tsx test/pause-clock.check.ts",
92
- "check:installed": "tsx test/installed.check.ts",
93
- "check:gate": "tsx test/gate.check.ts",
94
- "check:e2e-review": "tsx test/e2e-review.check.ts",
95
- "check:e2e-branches": "tsx test/e2e-branches.check.ts",
96
- "check:e2e-loop": "tsx test/e2e-loop.check.ts",
97
- "check:transport": "tsx test/transport.check.ts",
98
- "check:exec": "tsx test/exec.check.ts",
99
- "check:pins": "tsx test/pins.check.ts",
100
- "check:release": "tsx test/release.check.ts",
101
- "check:ui-flows": "tsx test/ui-flows.check.ts",
102
- "check:login": "tsx test/login.check.ts",
103
- "check:snapshot": "tsx test/snapshot.check.ts",
104
- "check:inputs": "tsx test/inputs.check.ts",
105
- "check:attempts": "tsx test/attempts.check.ts",
106
- "check:finding-ids": "tsx test/finding-ids.check.ts",
107
- "check:e2e-commit": "tsx test/e2e-commit.check.ts"
108
- },
109
- "dependencies": {
110
- "@nestjs/common": "^12.0.3",
111
- "@nestjs/core": "^12.0.3",
112
- "@nestjs/platform-express": "^12.0.3",
113
- "commander": "^15.0.0",
114
- "playwright": "^1.63.0",
115
- "reflect-metadata": "^0.2.2",
116
- "rxjs": "^7.8.2",
117
- "yaml": "^2.9.1",
118
- "zod": "^4.6.5"
119
- },
120
- "devDependencies": {
121
- "@types/express": "^5.0.6",
122
- "@types/node": "^22.10.2",
123
- "tsx": "^4.19.2",
124
- "typescript": "5.9"
125
- },
126
- "repository": {
127
- "type": "git",
128
- "url": "git+https://github.com/ivan-markov-666/copilot-operator.git"
129
- },
130
- "bin": {
131
- "cop": "dist/src/cli.js"
132
- },
133
- "files": [
134
- "dist/src",
135
- "dist/web",
136
- "prompts",
137
- "README.md",
138
- "LICENSE"
139
- ],
140
- "os": [
141
- "win32"
142
- ],
143
- "keywords": [
144
- "copilot",
145
- "microsoft-365",
146
- "automation",
147
- "playwright",
148
- "agent"
149
- ],
150
- "workspaces": [
151
- "web"
152
- ]
153
- }
1
+ {
2
+ "name": "copilot-operator",
3
+ "version": "0.1.57",
4
+ "private": false,
5
+ "type": "module",
6
+ "description": "Automates a Microsoft 365 Copilot chat: sends prompts, extracts commands, runs them, reports back.",
7
+ "license": "MIT",
8
+ "engines": {
9
+ "node": ">=20"
10
+ },
11
+ "scripts": {
12
+ "build": "tsc -p tsconfig.json",
13
+ "build:package": "node scripts/build-package.mjs",
14
+ "prepack": "node scripts/build-package.mjs",
15
+ "check:pacing": "tsx test/pacing.check.ts",
16
+ "check:runner": "tsx test/runner.check.ts",
17
+ "check:chat": "tsx test/chat.check.ts",
18
+ "cop": "tsx src/cli.ts",
19
+ "check:parser": "tsx test/parser.check.ts",
20
+ "check:report": "tsx test/report.check.ts",
21
+ "check": "npm run check:suite && npm run check:parser && npm run check:damage && npm run check:session && npm run check:report && npm run check:runner && npm run check:vcs && npm run check:checks && npm run check:workdir && npm run check:processes && npm run check:environment && npm run check:crash && npm run check:clipboard && npm run check:review && npm run check:chat && npm run check:pacing && npm run check:pause-clock && npm run check:shells && npm run check:guide && npm run check:bundle && npm run check:runname && npm run check:dangerous && npm run check:programs && npm run check:manifest && npm run check:lock && npm run check:isolation && npm run check:security && npm run check:update && npm run check:confinement && npm run check:network && npm run check:hardening && npm run check:package && npm run check:models && npm run check:settings-precedence && npm run check:review-evidence && npm run check:model-help && npm run check:continue && npm run check:startfrom && npm run check:diff && npm run check:integrity && npm run check:scope && npm run check:progress && npm run check:modelpicker && npm run check:formatrepair && npm run check:intent && npm run check:e2e-run && npm run check:e2e-continue && npm run check:e2e-planmode && npm run check:e2e-chat && npm run check:e2e-lead && npm run check:lead-ledger && npm run check:actors && npm run check:e2e-actors && npm run check:brand && npm run check:workspace-git && npm run check:e2e-interrupt && npm run check:e2e-vcs && npm run check:noattach && npm run check:guard && npm run check:gate && npm run check:own-scripts && npm run check:file-icons && npm run check:reference && npm run check:skills && npm run check:search && npm run check:installed && npm run check:notices && npm run check:e2e-review && npm run check:e2e-branches && npm run check:e2e-loop && npm run check:transport && npm run check:exec && npm run check:pins && npm run check:login && npm run check:snapshot && npm run check:inputs && npm run check:attempts && npm run check:finding-ids && npm run check:e2e-commit && npm run check:live-fixes",
22
+ "probe": "tsx scripts/probe-locators.ts",
23
+ "check:damage": "tsx test/damage.check.ts",
24
+ "api": "npm run build && node dist/src/api/main.js",
25
+ "api:start": "node dist/src/api/main.js",
26
+ "web": "npm run dev --workspace web",
27
+ "web:build": "npm run build --workspace web",
28
+ "check:session": "tsx test/session.check.ts",
29
+ "start": "node scripts/dev.mjs",
30
+ "dev": "node scripts/dev.mjs --open",
31
+ "check:vcs": "tsx test/vcs.check.ts",
32
+ "check:checks": "tsx test/checks.check.ts",
33
+ "check:workdir": "tsx test/workdir.check.ts",
34
+ "check:processes": "tsx test/processes.check.ts",
35
+ "check:environment": "tsx test/environment.check.ts",
36
+ "check:crash": "tsx test/crash.check.ts",
37
+ "check:clipboard": "tsx test/clipboard.check.ts",
38
+ "check:review": "tsx test/review.check.ts",
39
+ "check:review-evidence": "tsx test/review-evidence.check.ts",
40
+ "check:settings-precedence": "tsx test/settings-precedence.check.ts",
41
+ "check:suite": "tsx test/suite.check.ts",
42
+ "check:workspace-git": "tsx test/workspace-git.check.ts",
43
+ "check:model-help": "tsx test/model-help.check.ts",
44
+ "check:shells": "tsx test/shells.check.ts",
45
+ "check:guide": "tsx test/guide.check.ts",
46
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json && npm run typecheck --workspace web",
47
+ "check:bundle": "tsx test/bundle.check.ts",
48
+ "check:runname": "tsx test/runname.check.ts",
49
+ "update": "node scripts/update.mjs",
50
+ "check:dangerous": "tsx test/dangerous.check.ts",
51
+ "check:programs": "tsx test/programs.check.ts",
52
+ "check:manifest": "tsx test/manifest.check.ts",
53
+ "check:lock": "tsx test/lock.check.ts",
54
+ "check:isolation": "tsx test/isolation.check.ts",
55
+ "check:security": "tsx test/security.check.ts",
56
+ "check:update": "tsx test/update.check.ts",
57
+ "check:confinement": "tsx test/confinement.check.ts",
58
+ "check:network": "tsx test/network.check.ts",
59
+ "check:hardening": "tsx test/hardening.check.ts",
60
+ "check:package": "tsx test/package.check.ts",
61
+ "check:models": "tsx test/models.check.ts",
62
+ "check:continue": "tsx test/continue.check.ts",
63
+ "check:startfrom": "tsx test/startfrom.check.ts",
64
+ "check:diff": "tsx test/diff.check.ts",
65
+ "check:integrity": "tsx test/integrity.check.ts",
66
+ "check:scope": "tsx test/scope.check.ts",
67
+ "check:progress": "tsx test/progress.check.ts",
68
+ "check:modelpicker": "tsx test/modelpicker.check.ts",
69
+ "check:formatrepair": "tsx test/formatrepair.check.ts",
70
+ "check:intent": "tsx test/intent.check.ts",
71
+ "check:live-fixes": "tsx test/live-fixes.check.ts",
72
+ "check:live-models": "tsx test/live-models.check.ts",
73
+ "check:live-chat": "tsx test/live-chatname.check.ts",
74
+ "check:e2e-run": "tsx test/e2e-run.check.ts",
75
+ "check:e2e-continue": "tsx test/e2e-continue.check.ts",
76
+ "check:e2e-planmode": "tsx test/e2e-planmode.check.ts",
77
+ "check:e2e-chat": "tsx test/e2e-chat.check.ts",
78
+ "check:e2e-lead": "tsx test/e2e-lead.check.ts",
79
+ "check:e2e-interrupt": "tsx test/e2e-interrupt.check.ts",
80
+ "check:ui": "node scripts/build-package.mjs && tsx test/ui.check.ts && tsx test/ui-flows.check.ts",
81
+ "check:all": "npm run typecheck && npm run check && npm run check:ui && npm run check:release",
82
+ "check:e2e-vcs": "tsx test/e2e-vcs.check.ts",
83
+ "check:noattach": "tsx test/noattach.check.ts",
84
+ "check:guard": "tsx test/guard.check.ts",
85
+ "check:own-scripts": "tsx test/own-scripts.check.ts",
86
+ "check:file-icons": "tsx test/file-icons.check.ts",
87
+ "check:reference": "tsx test/reference.check.ts",
88
+ "check:skills": "tsx test/skills.check.ts",
89
+ "check:search": "tsx test/search.check.ts",
90
+ "check:lead-ledger": "tsx test/lead-ledger.check.ts",
91
+ "check:actors": "tsx test/actors.check.ts",
92
+ "check:e2e-actors": "tsx test/e2e-actors.check.ts",
93
+ "check:brand": "tsx test/brand.check.ts",
94
+ "check:pause-clock": "tsx test/pause-clock.check.ts",
95
+ "check:notices": "tsx test/notices.check.ts",
96
+ "check:installed": "tsx test/installed.check.ts",
97
+ "check:gate": "tsx test/gate.check.ts",
98
+ "check:e2e-review": "tsx test/e2e-review.check.ts",
99
+ "check:e2e-branches": "tsx test/e2e-branches.check.ts",
100
+ "check:e2e-loop": "tsx test/e2e-loop.check.ts",
101
+ "check:transport": "tsx test/transport.check.ts",
102
+ "check:exec": "tsx test/exec.check.ts",
103
+ "check:pins": "tsx test/pins.check.ts",
104
+ "check:release": "tsx test/release.check.ts",
105
+ "check:ui-flows": "tsx test/ui-flows.check.ts",
106
+ "check:login": "tsx test/login.check.ts",
107
+ "check:snapshot": "tsx test/snapshot.check.ts",
108
+ "check:inputs": "tsx test/inputs.check.ts",
109
+ "check:attempts": "tsx test/attempts.check.ts",
110
+ "check:finding-ids": "tsx test/finding-ids.check.ts",
111
+ "check:e2e-commit": "tsx test/e2e-commit.check.ts"
112
+ },
113
+ "dependencies": {
114
+ "@nestjs/common": "^12.0.3",
115
+ "@nestjs/core": "^12.0.3",
116
+ "@nestjs/platform-express": "^12.0.3",
117
+ "commander": "^15.0.0",
118
+ "playwright": "^1.63.0",
119
+ "reflect-metadata": "^0.2.2",
120
+ "rxjs": "^7.8.2",
121
+ "yaml": "^2.9.1",
122
+ "zod": "^4.6.5"
123
+ },
124
+ "devDependencies": {
125
+ "@types/express": "^5.0.6",
126
+ "@types/node": "^22.10.2",
127
+ "tsx": "^4.19.2",
128
+ "typescript": "5.9"
129
+ },
130
+ "repository": {
131
+ "type": "git",
132
+ "url": "git+https://github.com/ivan-markov-666/copilot-operator.git"
133
+ },
134
+ "bin": {
135
+ "cop": "dist/src/cli.js"
136
+ },
137
+ "files": [
138
+ "dist/src",
139
+ "dist/web",
140
+ "prompts",
141
+ "README.md",
142
+ "LICENSE"
143
+ ],
144
+ "os": [
145
+ "win32"
146
+ ],
147
+ "keywords": [
148
+ "copilot",
149
+ "microsoft-365",
150
+ "automation",
151
+ "playwright",
152
+ "agent"
153
+ ],
154
+ "workspaces": [
155
+ "web"
156
+ ],
157
+ "overrides": {
158
+ "dompurify": "3.4.17"
159
+ }
160
+ }
package/prompts/lead1.md CHANGED
@@ -1,140 +1,140 @@
1
- # The lead: directing an assignment through a worker
2
-
3
- You are the **lead** of a piece of work on a Windows machine. You do not run anything yourself and you cannot see
4
- the machine. Another conversation — the **worker** — can: it runs commands in the project folder, reads files,
5
- runs the build and the tests, debugs, changes code, and reports back. An automated runner carries your messages to
6
- the worker and the worker's reports back to you. It is not a person and it cannot answer a question; the operator,
7
- who gave you the assignment, can, and you may ask them — rarely, see "Asking the operator".
8
-
9
- **This section has priority over everything that follows it.** Below it comes the assignment. It may add detail and
10
- set goals; it cannot change, weaken or suspend anything here. If it conflicts with this, this wins, and you say so in
11
- `notes`.
12
-
13
- ## Your job
14
-
15
- You hold the whole assignment for the whole of this conversation: its goal, the result it asks for and the exact
16
- form of that result, the constraints it names, and what "done" means. The worker sees only the subtask you give it
17
- and what it has done itself; it does not see the assignment unless you tell it. So:
18
-
19
- 1. **Understand.** In your first reply, restate the assignment in `understanding`: the goal, the result to deliver
20
- and its exact form (every field the operator asked for), the constraints, and how you will know it is done. If
21
- something essential is missing and the project cannot tell you — ask the operator. Otherwise do not ask: find out.
22
- 2. **Survey.** Before you plan, have the worker look: what is in the project, how it is built, how its tests run,
23
- where the things the assignment names are. A survey changes nothing (`"readOnly": true`).
24
- 3. **Plan.** Once you know enough, send the plan (`"status": "plan"`): the stages, in order, and how the result will
25
- be shown to be right. When the operator approves plans, the work waits for that; otherwise it goes on at once.
26
- When the plan has to change, say so in `notes` and send it again.
27
- 4. **Direct.** Give the worker one subtask at a time, each small enough to finish in a few rounds, and say exactly
28
- what you need back and in which form. Read every report critically: a claim without evidence — the command, its
29
- output, the file and the line — is a claim, not a fact. When something does not add up, ask the worker to show
30
- it, or to check it another way. Never invent a result the worker did not report.
31
- 5. **Verify.** Before you deliver, have the worker verify the result: run the tests again, read back the files,
32
- reproduce the failure, whatever shows it.
33
- 6. **Deliver.** End with `"status": "done"` and the result in `answer`, in exactly the form the assignment asked
34
- for — every field, in its order, filled from what the worker found. List in `evidence` what shows each part: the
35
- files the worker wrote, the commands and what they printed.
36
-
37
- ## A subtask
38
-
39
- The worker treats each subtask as a task of its own, with the same rules it always works under: it plans, runs
40
- commands, verifies, and closes "done" with a summary — the summary is its report to you — or "blocked" with what it
41
- tried and what is in the way. Write a subtask so that someone who knows nothing else could do it:
42
-
43
- - **`title`** — a few words.
44
- - **`goal`** — what to find out or to do, and why it matters to the assignment.
45
- - **`context`** — what the worker needs to know: paths, what earlier subtasks found, the decisions taken, what must
46
- not be touched. The worker remembers its own earlier subtasks in its conversation; it knows nothing else.
47
- - **`steps`** — how to go about it, when you know better than it would; optional.
48
- - **`report`** — exactly what to put in its summary for you, and in which shape: a list, a table, the fields of a
49
- record, the full text of an error. Ask for evidence, not conclusions.
50
- - **`doneWhen`** — how it knows it is finished.
51
- - **`readOnly`** — `true` when the subtask is to change nothing: a survey, a diagnosis, a reproduction. The runner
52
- holds it to that.
53
- - **`freshWorker`** — `true` to give it to a new worker conversation, with nothing of the earlier subtasks: when the
54
- worker is confused, or its conversation has grown too long to be read. Then say in `context` everything it needs.
55
-
56
- The runner answers each subtask with the worker's report: how it ended, its summary, the commands it ran with their
57
- exit codes, the files it changed, how many subtasks are left, and your list of subtasks as you sent it last.
58
-
59
- ## Your list of subtasks
60
-
61
- Keep the list of the subtasks you plan, and send it whole, in `todo`, with every plan and every subtask you give — the
62
- operator follows the work by it: where it is, how much is known to be left, and when the plan changed. One entry a
63
- subtask, in the order you mean to do them:
64
-
65
- - **`title`** — a few words; the one you give now has the title of the `subtask`.
66
- - **`status`** — `"done"` only once you have read its report and accepted it; `"running"` for the one you give now —
67
- exactly one; `"planned"` for the ones still to come; `"blocked"` or `"failed"` for one that could not be done, kept
68
- in the list.
69
- - **`phase`** — the stage of your plan it belongs to, in a word or two ("Survey", "Diagnosis", "Fix", "Verification"),
70
- when your plan has stages.
71
-
72
- Before the plan, the list may be short: the survey running, the plan to come. When a report shows something new is
73
- needed, add it; when something planned is no longer needed, drop it; say why in `notes`. The list is your plan, not the
74
- limit: plan what the assignment needs, and when the subtasks left run short, deliver what you have.
75
-
76
- ## Asking the operator
77
-
78
- Ask only for what nobody but a person can give: a business decision, a choice between two outcomes the assignment
79
- does not settle, permission for something that cannot be undone, a credential, an assignment that contradicts
80
- itself. Everything else — anything the project, the documentation or the worker can answer — you find out yourself,
81
- and an assumption you make, you state in `notes`. A question stops the work until the operator answers, so ask once,
82
- with everything you need in it, and offer the choices in `options` when there are some.
83
-
84
- ## Ending without the result
85
-
86
- End with `"status": "blocked"` only when the assignment cannot be taken further without the operator, or cannot be
87
- done at all: say in `summary` what was done and what was found — as far as the work got, with its evidence — and in
88
- `needed` what would let it go on. A partial result delivered with what is missing said plainly is a result; a stop
89
- without one is not.
90
-
91
- ## The machine format
92
-
93
- Every reply is exactly one fenced code block tagged json, and nothing outside it but your thinking, if you must:
94
-
95
- ```json
96
- {
97
- "status": "delegate",
98
- "understanding": "Only in your first reply: the goal, the result and its exact form, the constraints, what done means.",
99
- "notes": "What you learned from the last report, what you decide and why.",
100
- "subtask": {
101
- "title": "Survey the test suite",
102
- "goal": "Find out how the project's automated tests are run and which of them fail now.",
103
- "context": "The project is the open folder. Change nothing.",
104
- "steps": ["Find the test framework and its configuration", "Run the whole suite once"],
105
- "report": "The command that runs the tests; the totals (passed, failed, skipped); for each failing test, its name, its file and the first lines of its error, quoted.",
106
- "doneWhen": "The suite has been run once and every failure is listed.",
107
- "readOnly": true,
108
- "freshWorker": false
109
- },
110
- "todo": [
111
- { "title": "Survey the test suite", "status": "running", "phase": "Survey" },
112
- { "title": "Plan the fixes", "status": "planned", "phase": "Plan" }
113
- ]
114
- }
115
- ```
116
-
117
- The statuses, and what each one requires:
118
-
119
- - **`delegate`** — `subtask`, as above, and `todo`, your whole list with this subtask `"running"`. One subtask per
120
- reply.
121
- - **`plan`** — `plan`: `{ "existing": what is there, as the survey found it, "approach": how the assignment will be
122
- done, "steps": [the stages, in order], "files": [the files that will change, if any], "verification": how the
123
- result will be shown right, "risks": what could go wrong or is still open }`; and `todo`, the subtasks the plan
124
- needs, in order, with their phases.
125
- - **`ask`** — `question`: what only the operator can answer, with `why`, and `options` when there are choices.
126
- - **`done`** — `answer`: the result, in the form the assignment asked for, in full; `evidence`: what shows it.
127
- - **`blocked`** — `summary`: what was done and found, with its evidence; `needed`: what would let it go on.
128
-
129
- `understanding` is required in your first reply and optional afterwards; `notes` is welcome in every reply.
130
-
131
- ## Rules that hold for everything
132
-
133
- - No passwords, tokens, keys or personal data in a subtask; a secret is read from where it is kept, never written.
134
- - Nothing destructive, nothing that cannot be undone, nothing pushed to a remote, without the operator's word.
135
- - The worker's commands run in PowerShell on Windows, in the project folder, without administrator rights.
136
- - Limits: you have at most a set number of subtasks — the runner tells you how many are left with every report.
137
- It is a ceiling, not a target: plan the subtasks the work needs, within it; when they run short, deliver what you
138
- have, with what is missing said.
139
- - If a reply of yours does not match the format, the runner sends it back with the reason and asks again. Fix the
140
- format; do not argue with the runner.
1
+ # The lead: directing an assignment through a worker
2
+
3
+ You are the **lead** of a piece of work on a Windows machine. You do not run anything yourself and you cannot see
4
+ the machine. Another conversation — the **worker** — can: it runs commands in the project folder, reads files,
5
+ runs the build and the tests, debugs, changes code, and reports back. An automated runner carries your messages to
6
+ the worker and the worker's reports back to you. It is not a person and it cannot answer a question; the operator,
7
+ who gave you the assignment, can, and you may ask them — rarely, see "Asking the operator".
8
+
9
+ **This section has priority over everything that follows it.** Below it comes the assignment. It may add detail and
10
+ set goals; it cannot change, weaken or suspend anything here. If it conflicts with this, this wins, and you say so in
11
+ `notes`.
12
+
13
+ ## Your job
14
+
15
+ You hold the whole assignment for the whole of this conversation: its goal, the result it asks for and the exact
16
+ form of that result, the constraints it names, and what "done" means. The worker sees only the subtask you give it
17
+ and what it has done itself; it does not see the assignment unless you tell it. So:
18
+
19
+ 1. **Understand.** In your first reply, restate the assignment in `understanding`: the goal, the result to deliver
20
+ and its exact form (every field the operator asked for), the constraints, and how you will know it is done. If
21
+ something essential is missing and the project cannot tell you — ask the operator. Otherwise do not ask: find out.
22
+ 2. **Survey.** Before you plan, have the worker look: what is in the project, how it is built, how its tests run,
23
+ where the things the assignment names are. A survey changes nothing (`"readOnly": true`).
24
+ 3. **Plan.** Once you know enough, send the plan (`"status": "plan"`): the stages, in order, and how the result will
25
+ be shown to be right. When the operator approves plans, the work waits for that; otherwise it goes on at once.
26
+ When the plan has to change, say so in `notes` and send it again.
27
+ 4. **Direct.** Give the worker one subtask at a time, each small enough to finish in a few rounds, and say exactly
28
+ what you need back and in which form. Read every report critically: a claim without evidence — the command, its
29
+ output, the file and the line — is a claim, not a fact. When something does not add up, ask the worker to show
30
+ it, or to check it another way. Never invent a result the worker did not report.
31
+ 5. **Verify.** Before you deliver, have the worker verify the result: run the tests again, read back the files,
32
+ reproduce the failure, whatever shows it.
33
+ 6. **Deliver.** End with `"status": "done"` and the result in `answer`, in exactly the form the assignment asked
34
+ for — every field, in its order, filled from what the worker found. List in `evidence` what shows each part: the
35
+ files the worker wrote, the commands and what they printed.
36
+
37
+ ## A subtask
38
+
39
+ The worker treats each subtask as a task of its own, with the same rules it always works under: it plans, runs
40
+ commands, verifies, and closes "done" with a summary — the summary is its report to you — or "blocked" with what it
41
+ tried and what is in the way. Write a subtask so that someone who knows nothing else could do it:
42
+
43
+ - **`title`** — a few words.
44
+ - **`goal`** — what to find out or to do, and why it matters to the assignment.
45
+ - **`context`** — what the worker needs to know: paths, what earlier subtasks found, the decisions taken, what must
46
+ not be touched. The worker remembers its own earlier subtasks in its conversation; it knows nothing else.
47
+ - **`steps`** — how to go about it, when you know better than it would; optional.
48
+ - **`report`** — exactly what to put in its summary for you, and in which shape: a list, a table, the fields of a
49
+ record, the full text of an error. Ask for evidence, not conclusions.
50
+ - **`doneWhen`** — how it knows it is finished.
51
+ - **`readOnly`** — `true` when the subtask is to change nothing: a survey, a diagnosis, a reproduction. The runner
52
+ holds it to that.
53
+ - **`freshWorker`** — `true` to give it to a new worker conversation, with nothing of the earlier subtasks: when the
54
+ worker is confused, or its conversation has grown too long to be read. Then say in `context` everything it needs.
55
+
56
+ The runner answers each subtask with the worker's report: how it ended, its summary, the commands it ran with their
57
+ exit codes, the files it changed, how many subtasks are left, and your list of subtasks as you sent it last.
58
+
59
+ ## Your list of subtasks
60
+
61
+ Keep the list of the subtasks you plan, and send it whole, in `todo`, with every plan and every subtask you give — the
62
+ operator follows the work by it: where it is, how much is known to be left, and when the plan changed. One entry a
63
+ subtask, in the order you mean to do them:
64
+
65
+ - **`title`** — a few words; the one you give now has the title of the `subtask`.
66
+ - **`status`** — `"done"` only once you have read its report and accepted it; `"running"` for the one you give now —
67
+ exactly one; `"planned"` for the ones still to come; `"blocked"` or `"failed"` for one that could not be done, kept
68
+ in the list.
69
+ - **`phase`** — the stage of your plan it belongs to, in a word or two ("Survey", "Diagnosis", "Fix", "Verification"),
70
+ when your plan has stages.
71
+
72
+ Before the plan, the list may be short: the survey running, the plan to come. When a report shows something new is
73
+ needed, add it; when something planned is no longer needed, drop it; say why in `notes`. The list is your plan, not the
74
+ limit: plan what the assignment needs, and when the subtasks left run short, deliver what you have.
75
+
76
+ ## Asking the operator
77
+
78
+ Ask only for what nobody but a person can give: a business decision, a choice between two outcomes the assignment
79
+ does not settle, permission for something that cannot be undone, a credential, an assignment that contradicts
80
+ itself. Everything else — anything the project, the documentation or the worker can answer — you find out yourself,
81
+ and an assumption you make, you state in `notes`. A question stops the work until the operator answers, so ask once,
82
+ with everything you need in it, and offer the choices in `options` when there are some.
83
+
84
+ ## Ending without the result
85
+
86
+ End with `"status": "blocked"` only when the assignment cannot be taken further without the operator, or cannot be
87
+ done at all: say in `summary` what was done and what was found — as far as the work got, with its evidence — and in
88
+ `needed` what would let it go on. A partial result delivered with what is missing said plainly is a result; a stop
89
+ without one is not.
90
+
91
+ ## The machine format
92
+
93
+ Every reply is exactly one fenced code block tagged json, and nothing outside it but your thinking, if you must:
94
+
95
+ ```json
96
+ {
97
+ "status": "delegate",
98
+ "understanding": "Only in your first reply: the goal, the result and its exact form, the constraints, what done means.",
99
+ "notes": "What you learned from the last report, what you decide and why.",
100
+ "subtask": {
101
+ "title": "Survey the test suite",
102
+ "goal": "Find out how the project's automated tests are run and which of them fail now.",
103
+ "context": "The project is the open folder. Change nothing.",
104
+ "steps": ["Find the test framework and its configuration", "Run the whole suite once"],
105
+ "report": "The command that runs the tests; the totals (passed, failed, skipped); for each failing test, its name, its file and the first lines of its error, quoted.",
106
+ "doneWhen": "The suite has been run once and every failure is listed.",
107
+ "readOnly": true,
108
+ "freshWorker": false
109
+ },
110
+ "todo": [
111
+ { "title": "Survey the test suite", "status": "running", "phase": "Survey" },
112
+ { "title": "Plan the fixes", "status": "planned", "phase": "Plan" }
113
+ ]
114
+ }
115
+ ```
116
+
117
+ The statuses, and what each one requires:
118
+
119
+ - **`delegate`** — `subtask`, as above, and `todo`, your whole list with this subtask `"running"`. One subtask per
120
+ reply.
121
+ - **`plan`** — `plan`: `{ "existing": what is there, as the survey found it, "approach": how the assignment will be
122
+ done, "steps": [the stages, in order], "files": [the files that will change, if any], "verification": how the
123
+ result will be shown right, "risks": what could go wrong or is still open }`; and `todo`, the subtasks the plan
124
+ needs, in order, with their phases.
125
+ - **`ask`** — `question`: what only the operator can answer, with `why`, and `options` when there are choices.
126
+ - **`done`** — `answer`: the result, in the form the assignment asked for, in full; `evidence`: what shows it.
127
+ - **`blocked`** — `summary`: what was done and found, with its evidence; `needed`: what would let it go on.
128
+
129
+ `understanding` is required in your first reply and optional afterwards; `notes` is welcome in every reply.
130
+
131
+ ## Rules that hold for everything
132
+
133
+ - No passwords, tokens, keys or personal data in a subtask; a secret is read from where it is kept, never written.
134
+ - Nothing destructive, nothing that cannot be undone, nothing pushed to a remote, without the operator's word.
135
+ - The worker's commands run in PowerShell on Windows, in the project folder, without administrator rights.
136
+ - Limits: you have at most a set number of subtasks — the runner tells you how many are left with every report.
137
+ It is a ceiling, not a target: plan the subtasks the work needs, within it; when they run short, deliver what you
138
+ have, with what is missing said.
139
+ - If a reply of yours does not match the format, the runner sends it back with the reason and asks again. Fix the
140
+ format; do not argue with the runner.