@anyswarm/core 0.5.1 → 0.6.0

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 (301) hide show
  1. package/AGENTS.md +20 -5
  2. package/README.md +69 -55
  3. package/dist/examples/README.md +138 -77
  4. package/dist/examples/authoring/README.md +4 -4
  5. package/dist/examples/autoresearch/README.md +108 -16
  6. package/dist/examples/autoresearch/REQUIREMENTS.zh.md +13 -12
  7. package/dist/examples/autoresearch/config.d.ts +48 -5
  8. package/dist/examples/autoresearch/config.js +57 -23
  9. package/dist/examples/autoresearch/demo.d.ts +12 -4
  10. package/dist/examples/autoresearch/demo.js +65 -22
  11. package/dist/examples/autoresearch/eject.json +2 -0
  12. package/dist/examples/autoresearch/frontiercs2-config.d.ts +2 -0
  13. package/dist/examples/autoresearch/frontiercs2-config.js +14 -0
  14. package/dist/examples/autoresearch/frontiercs2.d.ts +18 -1
  15. package/dist/examples/autoresearch/frontiercs2.js +71 -14
  16. package/dist/examples/autoresearch/prepare-demo.d.ts +1 -0
  17. package/dist/examples/autoresearch/prepare-demo.js +46 -0
  18. package/dist/examples/autoresearch/prepare.d.ts +105 -53
  19. package/dist/examples/autoresearch/prepare.js +126 -57
  20. package/dist/examples/autoresearch/project.d.ts +6 -95
  21. package/dist/examples/autoresearch/project.js +131 -45
  22. package/dist/examples/autoresearch/research-service.d.ts +16 -1
  23. package/dist/examples/autoresearch/research-service.js +84 -44
  24. package/dist/examples/code/README.md +25 -17
  25. package/dist/examples/code/REQUIREMENTS.zh.md +3 -3
  26. package/dist/examples/code/config.d.ts +1 -0
  27. package/dist/examples/first-harness/AGENTS.md +25 -0
  28. package/dist/examples/first-harness/README.md +136 -0
  29. package/dist/examples/first-harness/config.d.ts +9 -8
  30. package/dist/examples/first-harness/config.js +33 -26
  31. package/dist/examples/first-harness/eject.json +14 -0
  32. package/dist/examples/first-harness/handoff.js +3 -3
  33. package/dist/examples/first-harness/harness.d.ts +14 -18
  34. package/dist/examples/first-harness/harness.js +102 -77
  35. package/dist/examples/first-harness/input/README.md +7 -0
  36. package/dist/examples/first-harness/session.js +2 -1
  37. package/dist/examples/first-harness/tsconfig.json +2 -1
  38. package/dist/examples/harness-session/README.md +4 -4
  39. package/dist/examples/lead-worker/README.md +1 -1
  40. package/dist/examples/lead-worker/project-config.d.ts +1 -0
  41. package/dist/examples/messages/README.md +2 -2
  42. package/dist/examples/notes/README.md +5 -5
  43. package/dist/examples/notes/config.d.ts +1 -0
  44. package/dist/examples/parallel-swarm/AGENTS.md +32 -0
  45. package/dist/examples/parallel-swarm/README.md +136 -0
  46. package/dist/examples/parallel-swarm/board-service.js +25 -8
  47. package/dist/examples/parallel-swarm/board.d.ts +31 -1
  48. package/dist/examples/parallel-swarm/board.js +98 -13
  49. package/dist/examples/parallel-swarm/config.d.ts +11 -0
  50. package/dist/examples/parallel-swarm/config.js +39 -0
  51. package/dist/examples/parallel-swarm/eject.json +5 -0
  52. package/dist/examples/parallel-swarm/harness.d.ts +26 -20
  53. package/dist/examples/parallel-swarm/harness.js +77 -76
  54. package/dist/examples/parallel-swarm/report.d.ts +12 -0
  55. package/dist/examples/parallel-swarm/report.js +30 -0
  56. package/dist/examples/peermesh/README.md +1 -1
  57. package/dist/examples/peermesh/project-config.d.ts +1 -0
  58. package/dist/examples/services/agent-control/README.md +1 -1
  59. package/dist/examples/services/mathlib-search/README.md +1 -1
  60. package/dist/examples/services/mcp-managed/README.md +1 -1
  61. package/dist/examples/services/persistent-board/README.md +6 -3
  62. package/dist/examples/subagents/AGENTS.md +35 -0
  63. package/dist/examples/subagents/README.md +129 -93
  64. package/dist/examples/subagents/config.d.ts +2 -10
  65. package/dist/examples/subagents/config.js +9 -16
  66. package/dist/examples/subagents/eject.json +17 -0
  67. package/dist/examples/subagents/handoff-config.d.ts +41 -0
  68. package/dist/examples/subagents/handoff-config.js +13 -0
  69. package/dist/examples/subagents/model.d.ts +3 -0
  70. package/dist/examples/subagents/model.js +19 -0
  71. package/dist/examples/substrate/README.md +12 -6
  72. package/dist/examples/substrate/config.d.ts +1 -0
  73. package/dist/examples/substrate/project-config.d.ts +1 -0
  74. package/dist/examples/super/README.md +34 -22
  75. package/dist/examples/super/actions.d.ts +1 -1
  76. package/dist/examples/super/actions.js +11 -11
  77. package/dist/examples/super/config.js +3 -3
  78. package/dist/examples/super/eject.json +1 -1
  79. package/dist/examples/super/location.js +1 -1
  80. package/dist/examples/super/operator.d.ts +1 -0
  81. package/dist/examples/super/operator.js +31 -0
  82. package/dist/examples/super/project.d.ts +0 -107
  83. package/dist/examples/super/project.js +1 -3
  84. package/dist/examples/taskpool/README.md +1 -1
  85. package/dist/examples/taskpool/config.d.ts +1 -0
  86. package/dist/examples/taskpool/deploy/service-hosts/service-authority-snapshot.d.ts +4 -4
  87. package/dist/scripts/anyswarm-arguments.d.ts +7 -25
  88. package/dist/scripts/anyswarm-arguments.js +69 -97
  89. package/dist/scripts/anyswarm-eject.js +1 -1
  90. package/dist/scripts/anyswarm-harnesses.d.ts +0 -1
  91. package/dist/scripts/anyswarm-harnesses.js +1 -22
  92. package/dist/scripts/anyswarm-installation.d.ts +7 -40
  93. package/dist/scripts/anyswarm-installation.js +17 -291
  94. package/dist/scripts/anyswarm-launch.d.ts +6 -36
  95. package/dist/scripts/anyswarm-launch.js +32 -81
  96. package/dist/scripts/anyswarm-progress.d.ts +6 -0
  97. package/dist/scripts/anyswarm-progress.js +133 -0
  98. package/dist/scripts/anyswarm-project.d.ts +1 -9
  99. package/dist/scripts/anyswarm-project.js +40 -127
  100. package/dist/scripts/anyswarm-source-runner.js +9 -41
  101. package/dist/scripts/anyswarm.js +6 -26
  102. package/dist/scripts/build-provenance.json +1 -1
  103. package/dist/scripts/generate-architecture-coverage.js +1 -1
  104. package/dist/scripts/generate-architecture-prompts.js +18 -10
  105. package/dist/scripts/local-environment.d.ts +13 -7
  106. package/dist/scripts/local-environment.js +73 -21
  107. package/dist/scripts/local-setup.d.ts +3 -0
  108. package/dist/scripts/local-setup.js +153 -118
  109. package/dist/scripts/pack-release.js +31 -4
  110. package/dist/src/core/index.js +1 -1
  111. package/dist/src/core/sandbox/opensandbox-backend.js +10 -4
  112. package/dist/src/core/sandbox/sandbox-connection.d.ts +9 -2
  113. package/dist/src/core/sandbox/sandbox-connection.js +22 -7
  114. package/dist/src/core/worker-image.js +1 -1
  115. package/dist/src/harness/project-harness.d.ts +1 -0
  116. package/dist/src/harness/project-harness.js +5 -4
  117. package/dist/src/harness/project-rpc-client.js +19 -0
  118. package/dist/src/harness/project-runtime.js +3 -1
  119. package/dist/src/harness/typescript-loader.d.ts +2 -0
  120. package/dist/src/harness/typescript-loader.js +26 -8
  121. package/dist/src/trace-viewer/command.mjs +6 -3
  122. package/dist/src/trace-viewer/public/app.js +239 -59
  123. package/dist/src/trace-viewer/public/index.html +5 -0
  124. package/dist/src/trace-viewer/public/style.css +22 -0
  125. package/dist/src/trace-viewer/reader.mjs +242 -26
  126. package/dist/src/trace-viewer/run-root.d.mts +1 -0
  127. package/dist/src/trace-viewer/run-root.mjs +7 -0
  128. package/dist/src/trace-viewer/server.mjs +3 -1
  129. package/docs/INDEX.md +11 -9
  130. package/docs/architecture/04-services.md +1 -1
  131. package/docs/architecture/06-observability-experiments.md +21 -7
  132. package/docs/architecture/07-run-configuration.md +118 -19
  133. package/docs/architecture/08-prompts.md +21 -2
  134. package/docs/architecture/10-service-api-reference.md +12 -5
  135. package/docs/architecture/12-code-coverage.md +157 -115
  136. package/docs/architecture/15-core-runtime.md +1 -1
  137. package/docs/architecture/16-pi-opensandbox-backend.md +2 -0
  138. package/docs/architecture/17-harness-reporting.md +79 -1
  139. package/docs/architecture/22-website.md +52 -20
  140. package/docs/architecture/23-project-harness.md +109 -37
  141. package/docs/architecture/26-code.md +20 -5
  142. package/docs/architecture/27-personal.md +23 -8
  143. package/docs/architecture/28-autoresearch.md +18 -12
  144. package/docs/architecture/INDEX.md +1 -2
  145. package/docs/architecture/prompts/11-first-sdk-harness.md +9 -9
  146. package/docs/architecture/prompts/16-parallel-swarm.md +46 -13
  147. package/docs/architecture/prompts/22-autoresearch.md +9 -2
  148. package/docs/architecture/prompts/source-manifest.json +76 -52
  149. package/docs/architecture/source-map.json +445 -105
  150. package/docs/designs/core-harness/01-core.md +2 -2
  151. package/docs/designs/core-harness/06-project-harness.md +3 -3
  152. package/docs/designs/core-harness/README.md +2 -2
  153. package/docs/en/agents.md +1 -1
  154. package/docs/en/autoresearch.md +41 -0
  155. package/docs/en/blog/100b-tokens.md +157 -0
  156. package/docs/en/build-your-harness.md +47 -22
  157. package/docs/en/changelog.md +29 -1
  158. package/docs/en/first-harness.md +40 -32
  159. package/docs/en/harnesses/index.md +23 -23
  160. package/docs/en/harnesses/lead-worker.md +1 -1
  161. package/docs/en/harnesses/peermesh.md +2 -2
  162. package/docs/en/harnesses/subagents.md +10 -31
  163. package/docs/en/harnesses/substrate.md +4 -4
  164. package/docs/en/harnesses/taskpool.md +2 -2
  165. package/docs/en/latest.md +30 -5
  166. package/docs/en/overview.md +22 -22
  167. package/docs/en/quickstart.md +69 -56
  168. package/docs/en/reference/api.md +1 -1
  169. package/docs/en/reference/cli.md +47 -85
  170. package/docs/en/sandbox.md +3 -3
  171. package/docs/en/trace-viewer.md +32 -12
  172. package/docs/operations/trace-viewer.md +26 -11
  173. package/docs/third-party-notices.md +0 -1
  174. package/docs/workflows/development.md +160 -118
  175. package/docs/workflows/release-and-docs-versioning.md +207 -54
  176. package/docs/workflows/release-cli-acceptance.md +162 -0
  177. package/docs/zh/agents.md +1 -1
  178. package/docs/zh/autoresearch.md +41 -0
  179. package/docs/zh/blog/100b-tokens.md +102 -0
  180. package/docs/zh/build-your-harness.md +48 -23
  181. package/docs/zh/changelog.md +29 -1
  182. package/docs/zh/first-harness.md +43 -35
  183. package/docs/zh/harnesses/index.md +23 -23
  184. package/docs/zh/harnesses/lead-worker.md +1 -1
  185. package/docs/zh/harnesses/peermesh.md +2 -2
  186. package/docs/zh/harnesses/subagents.md +10 -31
  187. package/docs/zh/harnesses/substrate.md +4 -4
  188. package/docs/zh/harnesses/taskpool.md +2 -2
  189. package/docs/zh/latest.md +30 -5
  190. package/docs/zh/overview.md +23 -23
  191. package/docs/zh/quickstart.md +66 -57
  192. package/docs/zh/reference/api.md +1 -1
  193. package/docs/zh/reference/cli.md +19 -79
  194. package/docs/zh/sandbox.md +3 -3
  195. package/docs/zh/trace-viewer.md +32 -12
  196. package/examples/README.md +138 -77
  197. package/examples/authoring/README.md +4 -4
  198. package/examples/autoresearch/README.md +108 -16
  199. package/examples/autoresearch/REQUIREMENTS.zh.md +13 -12
  200. package/examples/autoresearch/config.ts +64 -25
  201. package/examples/autoresearch/demo.ts +75 -22
  202. package/examples/autoresearch/eject.json +2 -0
  203. package/examples/autoresearch/frontiercs2-config.ts +15 -0
  204. package/examples/autoresearch/frontiercs2.ts +64 -11
  205. package/examples/autoresearch/prepare-demo.ts +44 -0
  206. package/examples/autoresearch/prepare.ts +134 -60
  207. package/examples/autoresearch/project.ts +120 -44
  208. package/examples/autoresearch/research-service.ts +91 -41
  209. package/examples/code/README.md +25 -17
  210. package/examples/code/REQUIREMENTS.zh.md +3 -3
  211. package/examples/first-harness/AGENTS.md +25 -0
  212. package/examples/first-harness/README.md +136 -0
  213. package/examples/first-harness/config.ts +41 -27
  214. package/examples/first-harness/eject.json +14 -0
  215. package/examples/first-harness/handoff.ts +3 -3
  216. package/examples/first-harness/harness.ts +104 -72
  217. package/examples/first-harness/input/README.md +7 -0
  218. package/examples/first-harness/session.ts +2 -1
  219. package/examples/first-harness/tsconfig.json +2 -1
  220. package/examples/harness-session/README.md +4 -4
  221. package/examples/lead-worker/README.md +1 -1
  222. package/examples/messages/README.md +2 -2
  223. package/examples/notes/README.md +5 -5
  224. package/examples/parallel-swarm/AGENTS.md +32 -0
  225. package/examples/parallel-swarm/README.md +136 -0
  226. package/examples/parallel-swarm/board-service.ts +28 -9
  227. package/examples/parallel-swarm/board.ts +107 -13
  228. package/examples/parallel-swarm/config.ts +47 -0
  229. package/examples/parallel-swarm/eject.json +5 -0
  230. package/examples/parallel-swarm/harness.ts +83 -71
  231. package/examples/parallel-swarm/report.ts +33 -0
  232. package/examples/peermesh/README.md +1 -1
  233. package/examples/services/agent-control/README.md +1 -1
  234. package/examples/services/mathlib-search/README.md +1 -1
  235. package/examples/services/mcp-managed/README.md +1 -1
  236. package/examples/services/persistent-board/README.md +6 -3
  237. package/examples/subagents/AGENTS.md +35 -0
  238. package/examples/subagents/README.md +129 -93
  239. package/examples/subagents/config.ts +9 -15
  240. package/examples/subagents/eject.json +17 -0
  241. package/examples/subagents/handoff-config.ts +14 -0
  242. package/examples/subagents/model.ts +20 -0
  243. package/examples/substrate/README.md +12 -6
  244. package/examples/super/README.md +34 -22
  245. package/examples/super/actions.ts +11 -11
  246. package/examples/super/config.ts +3 -3
  247. package/examples/super/eject.json +1 -1
  248. package/examples/super/location.ts +1 -1
  249. package/examples/super/operator.ts +28 -0
  250. package/examples/super/project.ts +1 -3
  251. package/examples/taskpool/README.md +1 -1
  252. package/npm-shrinkwrap.development.json +46 -1538
  253. package/npm-shrinkwrap.json +10 -43
  254. package/package.development.json +3 -6
  255. package/package.json +3 -5
  256. package/scripts/anyswarm-arguments.ts +67 -96
  257. package/scripts/anyswarm-eject.ts +1 -1
  258. package/scripts/anyswarm-harnesses.ts +1 -18
  259. package/scripts/anyswarm-installation.ts +18 -294
  260. package/scripts/anyswarm-launch.ts +30 -102
  261. package/scripts/anyswarm-progress.ts +125 -0
  262. package/scripts/anyswarm-project.ts +31 -123
  263. package/scripts/anyswarm-source-runner.ts +9 -36
  264. package/scripts/anyswarm.ts +4 -24
  265. package/scripts/generate-architecture-coverage.ts +1 -1
  266. package/scripts/generate-architecture-prompts.ts +21 -10
  267. package/scripts/local-environment.ts +79 -21
  268. package/scripts/local-setup.ts +150 -105
  269. package/scripts/pack-release.ts +28 -4
  270. package/src/core/index.ts +1 -1
  271. package/src/core/sandbox/opensandbox-backend.ts +10 -4
  272. package/src/core/sandbox/sandbox-connection.ts +22 -7
  273. package/src/core/worker-image.ts +1 -1
  274. package/src/harness/project-harness.ts +5 -4
  275. package/src/harness/project-rpc-client.ts +23 -0
  276. package/src/harness/project-runtime.ts +2 -1
  277. package/src/harness/typescript-loader.ts +28 -8
  278. package/src/trace-viewer/command.mjs +6 -3
  279. package/src/trace-viewer/public/app.js +239 -59
  280. package/src/trace-viewer/public/index.html +5 -0
  281. package/src/trace-viewer/public/style.css +22 -0
  282. package/src/trace-viewer/reader.mjs +242 -26
  283. package/src/trace-viewer/run-root.d.mts +1 -0
  284. package/src/trace-viewer/run-root.mjs +7 -0
  285. package/src/trace-viewer/server.mjs +3 -1
  286. package/dist/scripts/anyswarm-applications.d.ts +0 -19
  287. package/dist/scripts/anyswarm-applications.js +0 -19
  288. package/dist/scripts/anyswarm-tui-config.d.ts +0 -36
  289. package/dist/scripts/anyswarm-tui-config.js +0 -189
  290. package/dist/scripts/anyswarm-tui-session.d.ts +0 -66
  291. package/dist/scripts/anyswarm-tui-session.js +0 -304
  292. package/dist/scripts/anyswarm-tui-terminal.d.ts +0 -41
  293. package/dist/scripts/anyswarm-tui-terminal.js +0 -154
  294. package/dist/scripts/anyswarm-tui.d.ts +0 -2
  295. package/dist/scripts/anyswarm-tui.js +0 -1012
  296. package/docs/architecture/25-foreground-tui.md +0 -51
  297. package/scripts/anyswarm-applications.ts +0 -39
  298. package/scripts/anyswarm-tui-config.ts +0 -174
  299. package/scripts/anyswarm-tui-session.ts +0 -295
  300. package/scripts/anyswarm-tui-terminal.ts +0 -147
  301. package/scripts/anyswarm-tui.ts +0 -912
@@ -1,157 +1,199 @@
1
- # Development workflow — Matt engineering skills adapter
2
-
3
- > Project-specific workflow · Updated: 2026-11-26
4
-
5
- The default engineering procedure is defined by the [installed Matt Pocock engineering skills](https://github.com/mattpocock/skills/tree/main/skills/engineering). This file adds only anyswarm-specific context and verification boundaries. [AGENTS.md](../../AGENTS.md) defines human/Agent autonomy and permissions.
6
-
7
- ## Current baseline and intended changes
8
-
9
- Read the [architecture manual](../architecture/INDEX.md), [Runtime](../en/runtime.md), [SDK & API Reference](../en/reference/api.md) and [GLOSSARY](../../GLOSSARY.md) for the current implementation. The [Core / Harness design](../designs/core-harness/README.md), human-approved Issues and the owner's later explicit decisions define intended changes and acceptance. Include any authorized design update with its implementation in the same PR. Read the relevant Issue's full discussion and linked design before implementing it.
10
-
11
- Keep approvals, dependencies, progress and evidence on the Issue/PR. A large change may use a reviewed design in `docs/designs/`, with its exact revision linked from the Issue. Mark future behavior explicitly. Once implemented, reconcile the behavior into Architecture and retire superseded requirements through Git history.
12
-
13
- Use `/to-spec` and optional `/to-tickets` when those installed skills fit the requested workflow. Use one Issue per complete implementation PR unless the owner requests a different split. The [dynamic Lead-Worker design](../designs/dynamic-lead-worker.md) records its reviewed acceptance, while [the implementation chapter](../architecture/20-lead-worker-harness.md) describes the existing fixed and dynamic modes and remaining validation limits.
14
-
15
- ## Implementation and review
16
-
17
- Use Node.js 22.19 or newer and install the locked development dependencies with
18
- `npm ci`. Run `npm run typecheck` for the strict source and tooling check and
19
- `npm run build` to refresh the JavaScript and declarations under `dist/`.
20
- `npm test` and `npm run docs:check` build before running. Local host commands run
21
- the compiled entry points under `dist/scripts/`. See
22
- [TypeScript build and installation](../architecture/07-run-configuration.md#typescript-build-and-installation).
23
-
24
- - Use `/implement` for one Issue/ticket or `/implement-spec` for a ticket graph. Follow their branch, worktree, integration and review conventions.
25
- - Use `/tdd` at pre-agreed public seams; for tricky defects use `/diagnosing-bugs`. Repeat tests, fixes and authorized diagnostic probes within Issue scope **without reporting after each iteration**.
26
- - Use the focused test command during local iteration and run `git diff --check`. For merge candidates, verify the full Core CI result when selected. Use local `npm test` when the Issue requires it, when reproducing a suite-wide failure, or when full CI cannot supply the required result. Run `/code-review` with separate **Spec** and **Standards** findings. Use `/pr` for a concise Summary, before/after Evidence and Merge Danger.
27
- - If a skill is unavailable, report that limitation and follow the applicable documented engineering requirements without claiming the skill ran.
28
-
29
- ## Focused local tests
30
-
31
- After installing development dependencies, pass one or more source test files
32
- or quoted globs under `test/`. Select the changed behavior and its affected
33
- callers. Group related files in a single invocation so they share one build.
1
+ # Development workflow
2
+
3
+ Develop and merge focused changes on `main`; verify installable candidates before
4
+ publication; group stable releases when their changes are ready for users.
5
+ [CONTRIBUTING.md](../../CONTRIBUTING.md) is the contributor entry point.
6
+ [AGENTS.md](../../AGENTS.md) adds the owner/Agent decision boundary and architecture
7
+ requirements for coding agents.
8
+
9
+ ## The development loop
10
+
11
+ 1. Establish the problem and acceptance in the relevant Issue or explicit owner
12
+ instruction. A small documentation correction can go directly to a PR.
13
+ Keep one Issue per complete implementation PR unless the owner asks otherwise.
14
+ 2. Create an isolated branch or worktree. Implement the change together with
15
+ relevant tests, public instructions, examples and architecture explanation.
16
+ 3. Run focused checks while iterating. Review the behavior and the generated
17
+ documentation diff, and fix failures within the authorized scope.
18
+ 4. Open a focused PR with actual verification results. Required Core and Website
19
+ CI check the merge candidate; installed-package checks use the recorded archive.
20
+ 5. After review and authorized merge, continue development on `main`. Ordinary
21
+ PRs leave formal package versions unchanged and add user-visible changes to
22
+ the root `CHANGELOG.md` `Unreleased` section. This is the canonical pending
23
+ record; a release PR prepares the bilingual changelogs. A main push does not
24
+ publish a stable npm version.
25
+ 6. For opt-in external testing, a maintainer can separately authorize a manual
26
+ `next` publication. A stable release uses a release PR and a matching tag.
27
+ See [release and documentation versioning](release-and-docs-versioning.md).
28
+
29
+ Use the [architecture manual](../architecture/INDEX.md), [Runtime](../en/runtime.md),
30
+ [SDK reference](../en/reference/api.md) and [GLOSSARY](../../GLOSSARY.md) for the
31
+ current implementation. Reviewed designs and the full Issue discussion define
32
+ intended changes. Keep progress and evidence in the Issue/PR. Update affected
33
+ architecture in the implementation PR; a source link does not replace the
34
+ explanation of behavior.
35
+
36
+ ## Local setup and focused tests
37
+
38
+ Use Node.js 24 to match CI. The declared package minimum is 22.19. Install locked
39
+ dependencies with `npm ci --ignore-scripts`; deterministic checks do not need a
40
+ model account or a running Sandbox.
34
41
 
35
42
  ```sh
43
+ npm ci --ignore-scripts
44
+ npm run typecheck
36
45
  npm run test:focus -- test/core-input-ledger.test.ts test/core-pi-input.test.ts
37
46
  npm run test:focus -- 'test/core-thinking-*.test.ts'
47
+ git diff --check
38
48
  ```
39
49
 
40
- The command rejects missing or unmatched selections and matches outside
41
- `test/` before building. It then runs the selected compiled files serially.
42
- Run `npm run docs:check` separately when verifying documentation. `npm test` is
43
- the full local suite, including the documentation pretest.
50
+ Pass source test paths or quoted globs under `test/`. The focused command rejects
51
+ missing or unmatched selections and matches outside `test/`, builds once, then
52
+ runs the selected compiled files serially. Choose the affected behavior and its
53
+ callers. `npm run build` refreshes JavaScript and declarations under `dist/`;
54
+ local CLI entry points use `dist/scripts/`.
55
+
56
+ `npm run docs:check` builds before checking documentation. `npm test` builds and
57
+ checks documentation before the full local suite. Run the full suite locally
58
+ when required by the Issue, when reproducing a suite-wide failure, or when CI
59
+ cannot provide the required evidence. Report unrun checks rather than marking
60
+ all template boxes regardless of relevance.
61
+
62
+ Native integration tests have their own opt-in variables and environment
63
+ requirements in [the test guide](../../test/README.md). A controlled-model test
64
+ can verify transport and tool behavior without a paid provider; it does not prove
65
+ performance with a real model or support on an untested host.
44
66
 
45
67
  ## Repository CI checks
46
68
 
47
69
  [CI](../../.github/workflows/ci.yml) runs on PRs targeting `main` and pushes to
48
- `main`. It uses Linux and Node.js 24. A newer push to a PR cancels the previous
49
- run for that PR. GitHub requires `Core CI`, `Website CI`, and a PR for updates to `main`. The
70
+ `main`, using Linux and Node.js 24. A newer push cancels the previous run for the
71
+ same PR. The [CI ruleset](https://github.com/AnySwarm/anyswarm/rules/28146126)
72
+ requires `Core CI`, `Website CI`, and a PR, including for the owner. The
50
73
  [merge ruleset](https://github.com/AnySwarm/anyswarm/rules/28373790) allows only
51
- `LuNa-shi` to merge into `main`. The
52
- [CI ruleset](https://github.com/AnySwarm/anyswarm/rules/28146126) applies to the
53
- owner as well. Collaborators with write access can push feature branches and open PRs.
74
+ `LuNa-shi` to merge. Collaborators can push feature branches and open PRs.
54
75
 
55
- The workflow checks PR whitespace and compares both sides of the change. From a
56
- checkout at the revision under test, run `bash .github/ci-scope.sh <base-commit>`
57
- to see the jobs it selects. An unavailable base or an unknown path selects full
58
- coverage.
76
+ From the checkout under test, run `bash .github/ci-scope.sh <base-commit>` to see
77
+ the selected jobs. An unavailable base or unknown path selects full coverage.
59
78
 
60
79
  | Changed inputs | Checks |
61
80
  | --- | --- |
62
81
  | README, internal Markdown or architecture inventory | Generated references and repository links |
63
- | Website, bilingual guides or documentation images | Generated references, repository links and website build |
64
- | Website installer, install command or either Quickstart | Website build, focused installer tests and documentation checks |
65
- | Core, tests, workflow or other inputs | Typecheck, full tests, generated references, repository links and website build |
82
+ | Website, bilingual guides or documentation images | References, links and website build |
83
+ | Homepage npm command or either Quickstart | Website build, focused npm command checks and documentation checks |
84
+ | Core, tests, workflow or other inputs | Typecheck, full tests, references, links and website build |
85
+
86
+ For full Core CI, one job packs the candidate. Three test shards download that
87
+ same candidate, check its SHA-256, and use it for the installed-package tests.
88
+ The workflow preserves the archive with `SHA256SUMS` and `source.json`; use the
89
+ run's Core CI result to determine whether verification passed. An uploaded
90
+ candidate by itself is not a successful release.
66
91
 
67
- The full suite runs on three parallel Core runners, including the Viewer reader
68
- and server tests and the installed-package test. Each runner executes its
69
- assigned files serially. Local `npm test` still runs every
70
- test file in one process per file with concurrency set to one.
92
+ `ANYSWARM_TEST_PACKAGE_ARCHIVE` and `ANYSWARM_TEST_PACKAGE_SHA256` bind frozen
93
+ package tests to the candidate. They must be present in the selected CI/release
94
+ paths, so archive-based installation and eject checks do not silently skip.
95
+ Source tests and installed-package tests answer different questions: the latter
96
+ also check the files, lockfiles, exports and commands that a user receives.
71
97
 
72
- To reproduce the full cold-cache sequence from the repository root, use a fresh
73
- cache and install the packed Core in a temporary consumer before running tests.
98
+ The full Linux cold-cache sequence can be reproduced from the repository root:
74
99
 
75
100
  ```sh
76
101
  (
77
102
  set -e
78
- package_dir=$(mktemp -d)
79
- trap 'rm -rf -- "$package_dir"' EXIT
80
- export npm_config_cache="$package_dir/npm-cache"
81
- npm ci --no-audit --no-fund
103
+ candidate_dir=$(mktemp -d)
104
+ export npm_config_cache="$candidate_dir/npm-cache"
105
+ npm ci --ignore-scripts --no-audit --no-fund
82
106
  npm run typecheck
83
- npm run pack:release -- "$package_dir"
84
- npm install --prefix "$package_dir/consumer" --prefer-offline --omit=dev --ignore-scripts --no-audit --no-fund "$package_dir"/*.tgz
85
- tar -xzf "$package_dir"/*.tgz -C "$package_dir" package/examples/harness-session/package.json
86
- npm install --prefix "$package_dir/package/examples/harness-session" --prefer-offline --no-save --ignore-scripts --no-audit --no-fund "$package_dir"/*.tgz
107
+ candidate_archive=$(npm run --silent pack:release -- "$candidate_dir")
108
+ export ANYSWARM_TEST_PACKAGE_ARCHIVE="$candidate_archive"
109
+ export ANYSWARM_TEST_PACKAGE_SHA256="$(sha256sum "$candidate_archive" | cut -d ' ' -f 1)"
110
+ npm install --prefix "$candidate_dir/consumer" --prefer-offline --omit=dev --ignore-scripts --no-audit --no-fund "$candidate_archive"
111
+ tar -xzf "$candidate_archive" -C "$candidate_dir" package/examples/harness-session/package.json
112
+ npm install --prefix "$candidate_dir/package/examples/harness-session" --prefer-offline --no-save --ignore-scripts --no-audit --no-fund "$candidate_archive"
87
113
  npm test
114
+ sha256sum "$candidate_archive"
88
115
  )
89
116
  ```
90
117
 
91
- `npm ci` can fetch the locked tarballs without caching the registry metadata that
92
- an offline installation of the packed Core needs. The temporary consumer seeds
93
- that metadata in the same cache used by the tests. Archive-based tests then
94
- install offline. The by-name install test serves the candidate through a local
95
- registry and can fetch public dependency metadata from npm.
96
-
97
- For **Website CI**,
98
- run `npm ci` inside `website/`, then
99
- `BASE_PATH=/anyswarm SITE_URL=https://anyswarm.github.io npm run build`. The job
100
- checks for both `dist/index.html` and `dist/zh/index.html`. The Pages workflow
101
- deploys the merged site separately.
102
-
103
- ## Release verification
104
-
105
- For a local candidate, record the clean source commit, Node and npm versions, the
106
- `npm ci` and `npm run pack:release` commands, and the archive SHA-256. Use those
107
- same tool versions when reproducing a candidate. The release pack script builds
108
- and stages with `umask 022` and normalizes staged regular-file modes to `0755` for
109
- executables and `0644` for other files, including files from restrictive checkouts.
118
+ This leaves the candidate directory available for reproduction. Record the clean
119
+ source commit, Node/npm versions, archive and checksum. `npm ci` can fetch locked
120
+ tarballs without caching the registry metadata needed for an offline consumer
121
+ install. The temporary consumer seeds that metadata; the by-name test serves the
122
+ candidate through a local registry. These checks do not publish to npm.
110
123
 
111
- Run the [Release workflow](../../.github/workflows/release.yml) manually to verify a
112
- candidate and download the two tarball filenames and their SHA-256 checksums from
113
- the workflow artifact. The verifier installs the exact tarball through the website installer and installs it by package name through a local registry outside the checkout. It runs local setup, the README Quickstart with a controlled model, and the first SDK Harness through the SDK, JSONL RPC and foreground CLI. The README test checks actual file-tool bytes, CLI and installed Viewer agreement, and Sandbox deletion. Manual runs can verify a candidate with the same version as an existing release. Tag runs also perform the public npm publication dry-run, which requires an unused version. After the source repository is
114
- public and the release owner approves the tested revision, `LuNa-shi` pushes a
115
- `v<version>` tag for the matching stable package version under the
116
- [version-tag ruleset](https://github.com/AnySwarm/anyswarm/rules/28373821).
124
+ ## Website and documentation checks
117
125
 
118
- The workflow verifies that the candidate builds its Worker locally using the packaged SDK inputs and the host Pi installation. The published archives contain these build materials. The v0.4.0 SDK and its historical images keep their original artifact names and registry references.
119
-
120
- The tag job uploads the verified versioned tarball, the byte-identical
121
- `luna-shi-anyswarm.tgz` alias and `SHA256SUMS` to the tagged Release before
122
- publishing it. An older stable tag can still be published as a pinned Release.
123
- The CLI resolves the latest stable tag once and checks the corresponding versioned archive against its checksum.
124
-
125
- v0.5.0 is the first supported release of `@anyswarm/core`. Check installation and managed CLI updates from supported releases.
126
-
127
- Download the approved tag's versioned archive and `SHA256SUMS`. Verify the
128
- digest and the package name and version in the archive. An npm member of the
129
- `anyswarm` organization publishes those verified bytes from the release directory:
126
+ The default `/docs/` and `/zh/docs/` guides come from the stable manifest in
127
+ `website/docs-release.json`. Current `docs/en/` and `docs/zh/` render under
128
+ `/docs/next/` and `/zh/docs/next/`, marked as development documentation. Keep both
129
+ languages, navigation and affected example READMEs aligned.
130
130
 
131
131
  ```sh
132
- npm publish "./luna-shi-anyswarm-$VERSION.tgz" --access public --registry=https://registry.npmjs.org
132
+ npm ci --prefix website
133
+ npm --prefix website run dev
134
+ BASE_PATH=/anyswarm SITE_URL=https://anyswarm.github.io npm --prefix website run build
133
135
  ```
134
136
 
135
- Set `VERSION` to the approved stable tag version without the leading `v`.
136
- Confirm the registry resolves `@anyswarm/core@$VERSION` and install it
137
- in a fresh project. Compare the npm archive SHA-256 with the GitHub asset.
138
- After both distributions are public, update the bilingual release page and
139
- the documented version in `website/src/components/TopNav.astro`.
140
- See [Release updates and documentation versions](release-and-docs-versioning.md)
141
- for retry handling, Trusted Publishing and the proposed website version selector.
137
+ The website prepares the manifest's immutable source snapshots for its build.
138
+ Use a Git checkout containing the pinned revisions; CI fetches the required
139
+ history. Review both channels when changing navigation or rendering. A stable
140
+ guide correction updates its reviewed documentation inputs without changing the
141
+ npm version. See [the manifest procedure](release-and-docs-versioning.md#stable-and-development-documentation).
142
142
 
143
- ## Documentation changes
143
+ Write relative Markdown file links so guides work on GitHub; the website
144
+ transforms them to the selected language and channel. Examples advertised as
145
+ installed SDK consumers must use public package exports and the source bundled
146
+ with that same package.
144
147
 
145
- The website renders `docs/en/` and `docs/zh/` directly. Write relative Markdown file links so a guide works in GitHub; the site's Markdown transform converts them to routes at build time. Update both locales, navigation and any affected example README when changing a public entry point.
148
+ For implementation changes, update the architecture narrative, full affected
149
+ prompt text and source inventory. Run `npm run docs:generate`, inspect the diff,
150
+ then run `npm run docs:check` and `git diff --check`. Generation checks coverage
151
+ and drift; it does not approve the semantic description.
146
152
 
147
- Keep the current architecture explanation beside its implementation. The SDK guide introduces a runnable workflow; API pages describe public exports; architecture chapters explain ownership, call order, state, failures and cleanup. Source links support these explanations. Avoid importing an internal helper in an example advertised as an installed SDK consumer.
153
+ ## Release verification
148
154
 
149
- ## AnySwarm verification and synchronization
155
+ Run the [Release workflow](../../.github/workflows/release.yml) manually with
156
+ both `publish_next` and `publish_npm` off to verify a candidate without publishing.
157
+ For example:
150
158
 
151
- - Keep exact commit, environment, provider/model, checker and input identities for substantive evidence. Do not silently change the approved Issue, fixtures, acceptance thresholds or experiment budget.
152
- - Use Kimi K3 (`PI_PROVIDER=kimi_proxy`, `PI_MODEL=k3`) by default for real Agent tests during development. When a formal experiment or acceptance run pins a different model, use the approved configuration for that run.
153
- - Formal real-Agent research runs require the approval and registration described in [experiment workflow](experiment.md). Bounded in-scope debug probes and deterministic tests do not need a formal EXP ID.
154
- - **Keep implementation progress and verification evidence in the originating GitHub Issue/PR.** At meaningful milestones, link the exact tested commit, evidence level and result, remaining gaps and next decision. Do not file separate updates after each debugging attempt. At Issue closeout, summarize the accepted behavior and unresolved limitations in the Issue/PR, and reconcile affected Architecture.
155
- - Update the affected [Architecture](../architecture/INDEX.md) in the implementation PR: the owner must be able to understand the changed runtime without reading code. Include full prompt changes, state/contract/default/error effects and code-to-chapter mappings. Run `npm run docs:generate`, review its diff, then `npm run docs:check` and `git diff --check`. At Issue/stage closeout, reconcile the complete flow with the final merged revision and evidence; regeneration alone does not establish semantic accuracy.
156
- - Do not merge, close unrelated Issues, or run unapproved paid experiments without explicit user permission. Retire obsolete documentation through Git history, not an `archive/` directory.
159
+ ```sh
160
+ gh workflow run release.yml --ref main
161
+ ```
157
162
 
163
+ The verifier uses the exact packed archive outside the checkout: global install,
164
+ by-name install through a controlled registry, frozen install/eject tests, local
165
+ setup, the README Quickstart and the first SDK Harness with a controlled model.
166
+ The native checks require Docker/OpenSandbox and an executor; a local environment
167
+ without them cannot supply that evidence. Record the limitation and use the
168
+ workflow's native verification results before a release.
169
+
170
+ The release pack script builds and stages with `umask 022`, normalizes file modes,
171
+ and bundles Worker build materials. Candidates can share a version with an
172
+ existing release, so archive SHA-256 and source commit remain essential.
173
+ The [CLI acceptance guide](release-cli-acceptance.md) covers manual host, upgrade
174
+ and interactive checks that supplement automation.
175
+
176
+ Authorized preview publication uses `publish_next=true` from `main`. Stable
177
+ publication uses an approved `vX.Y.Z` tag; `publish_npm=true` retries the current
178
+ GitHub Latest archive on npm. The two manual publication flags are mutually
179
+ exclusive. All publication, public-registry verification, documentation promotion
180
+ and recovery details belong to the [release guide](release-and-docs-versioning.md).
181
+
182
+ ## Coding agents and research runs
183
+
184
+ Coding agents follow [AGENTS.md](../../AGENTS.md), including the documented
185
+ worktree layout and owner decisions. Use installed Matt Pocock engineering skills
186
+ when available and relevant, without claiming an unavailable skill ran. Those
187
+ skills are not a prerequisite for human contributors.
188
+
189
+ Keep experiments within the approved provider/model, inputs, checker, budget and
190
+ time limits. Use Kimi K3 (`PI_PROVIDER=kimi_proxy`, `PI_MODEL=k3`) for real-Agent
191
+ development tests when the existing authorization permits it; a pinned experiment
192
+ configuration takes precedence. Formal research follows the
193
+ [experiment workflow](experiment.md). Bounded authorized deterministic checks and
194
+ diagnostic probes do not require an EXP ID or a report after each iteration.
195
+
196
+ Keep raw conversations, credentials, private state and local paths out of Git.
197
+ At meaningful milestones, record exact revisions, verification evidence and
198
+ remaining gaps in the originating Issue/PR. Do not merge, publish, close unrelated
199
+ Issues, or expand paid experiments without the owner's authorization.