aiwg 2026.5.6 → 2026.5.8

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 (224) hide show
  1. package/README.md +6 -6
  2. package/agentic/code/addons/agent-loop/skills/agent-loop/SKILL.md +77 -31
  3. package/agentic/code/addons/aiwg-fleet/behaviors/quiet-bot/BEHAVIOR.md +62 -0
  4. package/agentic/code/addons/aiwg-fleet/behaviors/quiet-business-bot/BEHAVIOR.md +76 -0
  5. package/agentic/code/addons/aiwg-fleet/docs/provider-activation.md +48 -0
  6. package/agentic/code/addons/aiwg-fleet/manifest.json +42 -0
  7. package/agentic/code/addons/aiwg-utils/docs/overview.md +24 -3
  8. package/agentic/code/addons/aiwg-utils/docs/rules-reference.md +106 -3
  9. package/agentic/code/addons/aiwg-utils/manifest.json +4 -0
  10. package/agentic/code/addons/aiwg-utils/rules/RULES-INDEX.md +25 -2
  11. package/agentic/code/addons/aiwg-utils/rules/auto-compact-continue.md +5 -4
  12. package/agentic/code/addons/aiwg-utils/rules/context-budget.md +13 -0
  13. package/agentic/code/addons/aiwg-utils/rules/escalation-discipline.md +197 -0
  14. package/agentic/code/addons/aiwg-utils/rules/quiet-mode.md +121 -0
  15. package/agentic/code/addons/aiwg-utils/rules/respect-repo-access-manifest.md +56 -0
  16. package/agentic/code/addons/aiwg-utils/rules/subagent-scoping.md +38 -0
  17. package/agentic/code/addons/aiwg-utils/rules/tool-quota.md +189 -0
  18. package/agentic/code/addons/aiwg-utils/skills/aiwg-status/SKILL.md +14 -6
  19. package/agentic/code/addons/aiwg-utils/skills/aiwg-utils-quickref/SKILL.md +15 -3
  20. package/agentic/code/addons/rlm/rules/rlm-context-management.md +12 -0
  21. package/agentic/code/addons/rlm/skills/rlm-batch/SKILL.md +11 -3
  22. package/agentic/code/addons/rlm/skills/rlm-search/SKILL.md +4 -2
  23. package/agentic/code/frameworks/media-marketing-kit/config/models.json +19 -7
  24. package/agentic/code/frameworks/research-complete/skills/corpus-index-build/SKILL.md +29 -4
  25. package/agentic/code/frameworks/research-complete/skills/corpus-index-build/build.py +700 -0
  26. package/agentic/code/frameworks/sdlc-complete/commands/issue-audit.md +62 -0
  27. package/agentic/code/frameworks/sdlc-complete/commands/manifest.json +1 -0
  28. package/agentic/code/frameworks/sdlc-complete/config/models-v2.json +4 -1
  29. package/agentic/code/frameworks/sdlc-complete/config/models.json +19 -7
  30. package/agentic/code/frameworks/sdlc-complete/skills/issue-audit/SKILL.md +218 -0
  31. package/agentic/code/frameworks/sdlc-complete/skills/manifest.json +5 -0
  32. package/agentic/code/frameworks/security-engineering/skills/npm-supply-chain-audit/SKILL.md +14 -1
  33. package/agentic/code/frameworks/security-engineering/skills/supply-chain-hardening-quickstart/SKILL.md +4 -0
  34. package/agentic/code/providers/capability-matrix.yaml +78 -8
  35. package/bin/aiwg.mjs +44 -3
  36. package/dist/src/a2a/agent-card.d.ts.map +1 -1
  37. package/dist/src/a2a/agent-card.js +26 -7
  38. package/dist/src/a2a/agent-card.js.map +1 -1
  39. package/dist/src/a2a/client.d.ts.map +1 -1
  40. package/dist/src/a2a/client.js +57 -19
  41. package/dist/src/a2a/client.js.map +1 -1
  42. package/dist/src/a2a/types.d.ts.map +1 -1
  43. package/dist/src/a2a/types.js +1 -0
  44. package/dist/src/a2a/types.js.map +1 -1
  45. package/dist/src/artifacts/cli.d.ts.map +1 -1
  46. package/dist/src/artifacts/cli.js +28 -0
  47. package/dist/src/artifacts/cli.js.map +1 -1
  48. package/dist/src/artifacts/index-builder.d.ts.map +1 -1
  49. package/dist/src/artifacts/index-builder.js +15 -4
  50. package/dist/src/artifacts/index-builder.js.map +1 -1
  51. package/dist/src/artifacts/query-engine.d.ts.map +1 -1
  52. package/dist/src/artifacts/query-engine.js +61 -2
  53. package/dist/src/artifacts/query-engine.js.map +1 -1
  54. package/dist/src/cli/handlers/agentcard.d.ts +3 -2
  55. package/dist/src/cli/handlers/agentcard.d.ts.map +1 -1
  56. package/dist/src/cli/handlers/agentcard.js +3 -2
  57. package/dist/src/cli/handlers/agentcard.js.map +1 -1
  58. package/dist/src/cli/handlers/execution-mode.d.ts +8 -0
  59. package/dist/src/cli/handlers/execution-mode.d.ts.map +1 -0
  60. package/dist/src/cli/handlers/execution-mode.js +100 -0
  61. package/dist/src/cli/handlers/execution-mode.js.map +1 -0
  62. package/dist/src/cli/handlers/index.d.ts +4 -2
  63. package/dist/src/cli/handlers/index.d.ts.map +1 -1
  64. package/dist/src/cli/handlers/index.js +9 -2
  65. package/dist/src/cli/handlers/index.js.map +1 -1
  66. package/dist/src/cli/handlers/init.d.ts.map +1 -1
  67. package/dist/src/cli/handlers/init.js +4 -0
  68. package/dist/src/cli/handlers/init.js.map +1 -1
  69. package/dist/src/cli/handlers/mc.d.ts.map +1 -1
  70. package/dist/src/cli/handlers/mc.js +41 -83
  71. package/dist/src/cli/handlers/mc.js.map +1 -1
  72. package/dist/src/cli/handlers/ralph-launcher.d.ts +15 -0
  73. package/dist/src/cli/handlers/ralph-launcher.d.ts.map +1 -1
  74. package/dist/src/cli/handlers/ralph-launcher.js +46 -0
  75. package/dist/src/cli/handlers/ralph-launcher.js.map +1 -1
  76. package/dist/src/cli/handlers/ralph.d.ts.map +1 -1
  77. package/dist/src/cli/handlers/ralph.js +9 -0
  78. package/dist/src/cli/handlers/ralph.js.map +1 -1
  79. package/dist/src/cli/handlers/refresh.d.ts.map +1 -1
  80. package/dist/src/cli/handlers/refresh.js +24 -1
  81. package/dist/src/cli/handlers/refresh.js.map +1 -1
  82. package/dist/src/cli/handlers/regenerate.d.ts.map +1 -1
  83. package/dist/src/cli/handlers/regenerate.js +7 -1
  84. package/dist/src/cli/handlers/regenerate.js.map +1 -1
  85. package/dist/src/cli/handlers/repo-access.d.ts +4 -0
  86. package/dist/src/cli/handlers/repo-access.d.ts.map +1 -0
  87. package/dist/src/cli/handlers/repo-access.js +88 -0
  88. package/dist/src/cli/handlers/repo-access.js.map +1 -0
  89. package/dist/src/cli/handlers/serve.d.ts.map +1 -1
  90. package/dist/src/cli/handlers/serve.js +14 -0
  91. package/dist/src/cli/handlers/serve.js.map +1 -1
  92. package/dist/src/cli/handlers/skill-lint.d.ts +12 -0
  93. package/dist/src/cli/handlers/skill-lint.d.ts.map +1 -1
  94. package/dist/src/cli/handlers/skill-lint.js +42 -0
  95. package/dist/src/cli/handlers/skill-lint.js.map +1 -1
  96. package/dist/src/cli/handlers/steward.d.ts.map +1 -1
  97. package/dist/src/cli/handlers/steward.js +32 -7
  98. package/dist/src/cli/handlers/steward.js.map +1 -1
  99. package/dist/src/cli/handlers/use.d.ts.map +1 -1
  100. package/dist/src/cli/handlers/use.js +4 -1
  101. package/dist/src/cli/handlers/use.js.map +1 -1
  102. package/dist/src/config/aiwg-config.d.ts +76 -0
  103. package/dist/src/config/aiwg-config.d.ts.map +1 -1
  104. package/dist/src/config/aiwg-config.js +72 -0
  105. package/dist/src/config/aiwg-config.js.map +1 -1
  106. package/dist/src/config/cli.js +89 -1
  107. package/dist/src/config/cli.js.map +1 -1
  108. package/dist/src/extensions/commands/definitions.d.ts +1 -0
  109. package/dist/src/extensions/commands/definitions.d.ts.map +1 -1
  110. package/dist/src/extensions/commands/definitions.js +40 -2
  111. package/dist/src/extensions/commands/definitions.js.map +1 -1
  112. package/dist/src/extensions/managed-marker.d.ts +12 -0
  113. package/dist/src/extensions/managed-marker.d.ts.map +1 -1
  114. package/dist/src/extensions/managed-marker.js +16 -0
  115. package/dist/src/extensions/managed-marker.js.map +1 -1
  116. package/dist/src/extensions/project-local-doctor.d.ts.map +1 -1
  117. package/dist/src/extensions/project-local-doctor.js +8 -7
  118. package/dist/src/extensions/project-local-doctor.js.map +1 -1
  119. package/dist/src/features/catalog.d.ts +2 -2
  120. package/dist/src/features/catalog.js +2 -2
  121. package/dist/src/models/index.d.ts +2 -1
  122. package/dist/src/models/index.d.ts.map +1 -1
  123. package/dist/src/models/index.js +2 -0
  124. package/dist/src/models/index.js.map +1 -1
  125. package/dist/src/models/router.d.ts +13 -0
  126. package/dist/src/models/router.d.ts.map +1 -0
  127. package/dist/src/models/router.js +70 -0
  128. package/dist/src/models/router.js.map +1 -0
  129. package/dist/src/models/types.d.ts +35 -0
  130. package/dist/src/models/types.d.ts.map +1 -1
  131. package/dist/src/policy/repo-access.d.ts +29 -0
  132. package/dist/src/policy/repo-access.d.ts.map +1 -0
  133. package/dist/src/policy/repo-access.js +145 -0
  134. package/dist/src/policy/repo-access.js.map +1 -0
  135. package/dist/src/providers/capability-matrix.d.ts +41 -1
  136. package/dist/src/providers/capability-matrix.d.ts.map +1 -1
  137. package/dist/src/providers/capability-matrix.js +88 -0
  138. package/dist/src/providers/capability-matrix.js.map +1 -1
  139. package/dist/src/rlm/cli.d.ts +21 -0
  140. package/dist/src/rlm/cli.d.ts.map +1 -1
  141. package/dist/src/rlm/cli.js +143 -13
  142. package/dist/src/rlm/cli.js.map +1 -1
  143. package/dist/src/serve/a2a-terminal-observer.d.ts +21 -0
  144. package/dist/src/serve/a2a-terminal-observer.d.ts.map +1 -0
  145. package/dist/src/serve/a2a-terminal-observer.js +120 -0
  146. package/dist/src/serve/a2a-terminal-observer.js.map +1 -0
  147. package/dist/src/serve/agent-router.d.ts.map +1 -1
  148. package/dist/src/serve/agent-router.js +9 -0
  149. package/dist/src/serve/agent-router.js.map +1 -1
  150. package/dist/src/serve/dispatch-router.d.ts +5 -1
  151. package/dist/src/serve/dispatch-router.d.ts.map +1 -1
  152. package/dist/src/serve/dispatch-router.js +13 -2
  153. package/dist/src/serve/dispatch-router.js.map +1 -1
  154. package/dist/src/serve/executor-registry.d.ts +4 -0
  155. package/dist/src/serve/executor-registry.d.ts.map +1 -1
  156. package/dist/src/serve/executor-registry.js +12 -1
  157. package/dist/src/serve/executor-registry.js.map +1 -1
  158. package/dist/src/serve/pty-bridge.d.ts.map +1 -1
  159. package/dist/src/serve/pty-bridge.js +7 -1
  160. package/dist/src/serve/pty-bridge.js.map +1 -1
  161. package/dist/src/skills/adapters/openclaw.d.ts.map +1 -1
  162. package/dist/src/skills/adapters/openclaw.js +53 -16
  163. package/dist/src/skills/adapters/openclaw.js.map +1 -1
  164. package/dist/src/skills/run.d.ts.map +1 -1
  165. package/dist/src/skills/run.js +2 -1
  166. package/dist/src/skills/run.js.map +1 -1
  167. package/dist/src/smiths/context-pipeline/aiwg-md.d.ts.map +1 -1
  168. package/dist/src/smiths/context-pipeline/aiwg-md.js +19 -10
  169. package/dist/src/smiths/context-pipeline/aiwg-md.js.map +1 -1
  170. package/dist/src/smiths/context-pipeline/finalization.d.ts +14 -0
  171. package/dist/src/smiths/context-pipeline/finalization.d.ts.map +1 -0
  172. package/dist/src/smiths/context-pipeline/finalization.js +103 -0
  173. package/dist/src/smiths/context-pipeline/finalization.js.map +1 -0
  174. package/dist/src/smiths/context-pipeline/generator.d.ts +2 -2
  175. package/dist/src/smiths/context-pipeline/generator.d.ts.map +1 -1
  176. package/dist/src/smiths/context-pipeline/generator.js +17 -2
  177. package/dist/src/smiths/context-pipeline/generator.js.map +1 -1
  178. package/dist/src/smiths/context-pipeline/index.d.ts +1 -0
  179. package/dist/src/smiths/context-pipeline/index.d.ts.map +1 -1
  180. package/dist/src/smiths/context-pipeline/index.js +1 -0
  181. package/dist/src/smiths/context-pipeline/index.js.map +1 -1
  182. package/dist/src/smiths/context-pipeline/parallelism-section.d.ts +35 -0
  183. package/dist/src/smiths/context-pipeline/parallelism-section.d.ts.map +1 -0
  184. package/dist/src/smiths/context-pipeline/parallelism-section.js +94 -0
  185. package/dist/src/smiths/context-pipeline/parallelism-section.js.map +1 -0
  186. package/dist/src/smiths/context-pipeline/provider-policy.d.ts +2 -2
  187. package/dist/src/smiths/context-pipeline/provider-policy.d.ts.map +1 -1
  188. package/dist/src/smiths/context-pipeline/provider-policy.js +2 -1
  189. package/dist/src/smiths/context-pipeline/provider-policy.js.map +1 -1
  190. package/dist/src/smiths/context-pipeline/types.d.ts +2 -0
  191. package/dist/src/smiths/context-pipeline/types.d.ts.map +1 -1
  192. package/dist/src/smiths/context-pipeline/types.js.map +1 -1
  193. package/package.json +18 -5
  194. package/tools/_resolve-impl.mjs +74 -0
  195. package/tools/agents/deploy-agents.mjs +14 -1
  196. package/tools/agents/providers/base.mjs +143 -0
  197. package/tools/agents/providers/openclaw.mjs +26 -2
  198. package/tools/cli/doctor.mjs +62 -9
  199. package/tools/cli/update.mjs +4 -4
  200. package/tools/cli/validate-writing.mjs +3 -17
  201. package/tools/cli/version.mjs +3 -3
  202. package/tools/cli/workspace-status.mjs +439 -114
  203. package/tools/daemon/web-server.mjs +13 -0
  204. package/tools/lint/affected-packages.mjs +124 -0
  205. package/tools/lint/dep-source.mjs +3 -39
  206. package/tools/lint/lib/affected-packages.js +281 -0
  207. package/tools/lint/lib/dep-source.js +42 -0
  208. package/tools/plugin/plugin-installer-cli.mjs +2 -18
  209. package/tools/plugin/plugin-status-cli.mjs +2 -18
  210. package/tools/plugin/plugin-uninstaller-cli.mjs +2 -18
  211. package/tools/ralph-external/external-multi-loop-state-manager.mjs +2 -2
  212. package/tools/ralph-external/external-multi-loop-state-manager.test.mjs +17 -0
  213. package/tools/ralph-external/lib/behavior-detector.mjs +30 -12
  214. package/tools/ralph-external/lib/claude-prompt-generator.mjs +1 -0
  215. package/tools/ralph-external/lib/memory-promotion.mjs +2 -3
  216. package/tools/ralph-external/lib/semantic-memory.mjs +2 -3
  217. package/tools/ralph-external/lib/strategy-planner.mjs +27 -10
  218. package/tools/ralph-external/metrics-collector.mjs +27 -23
  219. package/tools/ralph-external/orchestrator.mjs +21 -9
  220. package/tools/ralph-external/session-launcher.mjs +1 -0
  221. package/tools/release/cut-tag.sh +5 -0
  222. package/tools/scripts/record-sandbox-api.mjs +164 -0
  223. package/tools/workspace/check-marketplace-version.mjs +99 -30
  224. package/tools/writing/writing-validator.mjs +6 -21
package/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  # AIWG
4
4
 
5
- **Multi-agent AI framework for Claude Code, Copilot, Cursor, Warp, and 4 more platforms**
5
+ **Multi-agent AI framework for Claude Code, Copilot, Cursor, Warp, and 6 more platforms**
6
6
 
7
- 200+ agents, 67+ CLI commands, 130+ skills, 8 core frameworks + training marketplace plugin, 27 addons. SDLC workflows, digital forensics, research management, marketing operations, media curation, ops infrastructure, knowledge base, and fine-tuning dataset curation — all deployable with one command.
7
+ 200+ agents, 67+ CLI commands, 400+ deployable agent/skill/command/rule artifacts, 8 core frameworks + training marketplace plugin, 27 addons. SDLC workflows, digital forensics, research management, marketing operations, media curation, ops infrastructure, knowledge base, and fine-tuning dataset curation — all deployable with one command.
8
8
 
9
9
  ```bash
10
10
  npm i -g aiwg # install globally
@@ -15,11 +15,11 @@ aiwg use sdlc # deploy SDLC framework
15
15
  [![npm downloads](https://img.shields.io/npm/dm/aiwg?color=CB3837&logo=npm&style=flat-square)](https://www.npmjs.com/package/aiwg)
16
16
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](LICENSE)
17
17
  [![GitHub Stars](https://img.shields.io/github/stars/jmagly/aiwg?style=flat-square)](https://github.com/jmagly/aiwg/stargazers)
18
- [![Node Version](https://img.shields.io/badge/node-%E2%89%A518.0.0-brightgreen?style=flat-square&logo=node.js)](https://nodejs.org)
18
+ [![Node Version](https://img.shields.io/badge/node-%E2%89%A520.0.0-brightgreen?style=flat-square&logo=node.js)](https://nodejs.org)
19
19
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.x-blue?style=flat-square&logo=typescript)](https://www.typescriptlang.org)
20
- [![8 Platforms](https://img.shields.io/badge/Platforms-8-purple?style=flat-square)](#-platform-support)
20
+ [![10 Platforms](https://img.shields.io/badge/Platforms-10-purple?style=flat-square)](#-platform-support)
21
21
 
22
- [**Get Started**](#quick-start) · [**Features**](#what-you-get) · [**Agents**](#agents-162) · [**CLI Reference**](#cli-reference-47-commands) · [**Documentation**](#documentation) · [**Community**](#community--support)
22
+ [**Get Started**](#quick-start) · [**Features**](#what-you-get) · [**Agents**](#agents) · [**CLI Reference**](docs/cli-reference.md) · [**Documentation**](#documentation) · [**Community**](#community--support)
23
23
 
24
24
  [![Discord](https://img.shields.io/badge/Discord-Join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/BuAusFMxdA)
25
25
  [![Telegram](https://img.shields.io/badge/Telegram-Join-26A5E4?logo=telegram&logoColor=white&style=flat-square)](https://t.me/+oJg9w2lE6A5lOGFh)
@@ -1712,7 +1712,7 @@ Full research background, citations, and methodology: [docs/research/](docs/rese
1712
1712
 
1713
1713
  - **[Quick Start Guide](docs/quickstart.md)** — Install and deploy in minutes
1714
1714
  - **[Prerequisites](docs/getting-started/prerequisites.md)** — Node.js, AI platforms, OS support
1715
- - **[CLI Reference](docs/cli-reference.md)** — All 47 commands with examples
1715
+ - **[CLI Reference](docs/cli-reference.md)** — 67+ commands with examples
1716
1716
 
1717
1717
  ### Customize
1718
1718
 
@@ -2,7 +2,7 @@
2
2
  namespace: aiwg
3
3
  name: agent-loop
4
4
  description: Detect requests for iterative autonomous agent loops and route to the appropriate loop executor
5
- version: 3.0.0
5
+ version: 3.1.0
6
6
  platforms: [all]
7
7
 
8
8
  ---
@@ -22,7 +22,7 @@ platforms: [all]
22
22
 
23
23
  # Agent Loop Skill
24
24
 
25
- You detect when users want iterative autonomous task execution and route to the appropriate loop command.
25
+ You detect when users want iterative autonomous task execution and route to an internal, in-session loop by default. External daemon loops are opt-in and require an explicit request.
26
26
 
27
27
  ## Loop Taxonomy
28
28
 
@@ -30,10 +30,33 @@ This skill is the **detection and routing layer** for autonomous agent loops —
30
30
 
31
31
  | Loop Type | Implementation | Description |
32
32
  |-----------|---------------|-------------|
33
- | **Al** | `ralph` command | Basic iterate-until-complete with learning extraction |
33
+ | **Internal Agent Loop** | current assistant session / internal loop | Default visible iterate-until-complete workflow in the active session |
34
+ | **Al** | internal `ralph` concept | Basic iterate-until-complete when named without external qualifiers |
35
+ | **External Agent Loop** | `agent-loop-ext` / `ralph-external` daemon | Explicitly requested background, detached, crash-resilient, or resumable work |
34
36
  | *(future)* | — | Reflection loops, critic-actor loops, branching loops |
35
37
 
36
- Currently routes all detected requests to the iterative loop executor. As new loop types are added, this skill will route based on task characteristics.
38
+ Generic loop requests route to the internal in-session loop. As new loop types are added, this skill will route based on task characteristics.
39
+
40
+ ## Routing Policy
41
+
42
+ ### Default: Internal/In-Session Loop
43
+
44
+ Use the internal loop when the user says `agent-loop`, `al`, `ralph`, `loop`, `iterate`, `keep trying`, `fix until green`, `address issues`, `handle all listed issues`, or supplies an iteration bound such as `--iterations 200` without explicit external wording.
45
+
46
+ Run the work visibly in the current assistant session:
47
+
48
+ 1. Establish completion criteria.
49
+ 2. Act on the next bounded slice of work.
50
+ 3. Verify with the relevant checks.
51
+ 4. Adapt and continue until completion, blocker, or the requested iteration cap.
52
+
53
+ Do not launch detached processes, background sessions, or the Ralph external daemon for generic loop requests.
54
+
55
+ ### Explicit External Route
56
+
57
+ Route to `agent-loop-ext` / `ralph-external` only when the user explicitly asks for external execution, background execution, a daemon, detached operation, crash resilience, session survival, resume-later behavior, unattended long-running work, or when they name `agent-loop-ext`, `ralph-external`, or the Ralph daemon directly.
58
+
59
+ If the user says `ralph` without external/background/daemon qualifiers, treat it as the internal loop concept.
37
60
 
38
61
  ## Triggers
39
62
 
@@ -50,16 +73,16 @@ Alternate expressions and non-obvious activations (primary phrases are matched a
50
73
 
51
74
  | Pattern | Example | Action |
52
75
  |---------|---------|--------|
53
- | `ralph this: X` | "ralph this: fix all lint errors" | Extract task, infer completion |
54
- | `ralph: X` | "ralph: migrate to TypeScript" | Extract task, infer completion |
55
- | `ralph it` | "ralph it" (after task description) | Use conversation context |
56
- | `keep trying until X` | "keep trying until tests pass" | Task = current context, completion = X |
57
- | `loop until X` | "loop until coverage >80%" | Task = improve coverage, completion = X |
58
- | `iterate until X` | "iterate until no errors" | Task = fix errors, completion = X |
59
- | `run until passes` | "run until passes" | Infer test command |
60
- | `fix until green` | "fix until green" | Task = fix tests, completion = tests pass |
61
- | `keep fixing until X` | "keep fixing until lint is clean" | Task = fix lint, completion = X |
62
- | `al: X` | "al: fix all lint errors" | Shortcut for agent-loop, extract task |
76
+ | `ralph this: X` | "ralph this: fix all lint errors" | Internal loop: extract task, infer completion |
77
+ | `ralph: X` | "ralph: migrate to TypeScript" | Internal loop: extract task, infer completion |
78
+ | `ralph it` | "ralph it" (after task description) | Internal loop: use conversation context |
79
+ | `keep trying until X` | "keep trying until tests pass" | Internal loop: task = current context, completion = X |
80
+ | `loop until X` | "loop until coverage >80%" | Internal loop: task = improve coverage, completion = X |
81
+ | `iterate until X` | "iterate until no errors" | Internal loop: task = fix errors, completion = X |
82
+ | `run until passes` | "run until passes" | Internal loop: infer test command |
83
+ | `fix until green` | "fix until green" | Internal loop: task = fix tests, completion = tests pass |
84
+ | `keep fixing until X` | "keep fixing until lint is clean" | Internal loop: task = fix lint, completion = X |
85
+ | `al: X` | "al: fix all lint errors" | Internal loop shortcut: extract task |
63
86
 
64
87
  ## Extraction Logic
65
88
 
@@ -107,7 +130,7 @@ When the inference skill IS available, prefer it. The skill handles multi-langua
107
130
  - Task: "migrate all files in lib/ to ESM"
108
131
  - Completion (inferred): "node --experimental-vm-modules lib/index.js runs without errors"
109
132
 
110
- **Action**: Invoke `/ralph "migrate all files in lib/ to ESM" --completion "node --experimental-vm-modules lib/index.js succeeds"`
133
+ **Action**: Run an internal loop in the current session for `migrate all files in lib/ to ESM` until the inferred completion command succeeds
111
134
 
112
135
  ---
113
136
 
@@ -116,7 +139,7 @@ When the inference skill IS available, prefer it. The skill handles multi-langua
116
139
  - Task: "fix failing tests" (from context or implied)
117
140
  - Completion: "npm test passes with 0 failures"
118
141
 
119
- **Action**: Invoke `/ralph "fix failing tests" --completion "npm test passes"`
142
+ **Action**: Run an internal loop in the current session until `npm test` passes
120
143
 
121
144
  ---
122
145
 
@@ -125,7 +148,7 @@ When the inference skill IS available, prefer it. The skill handles multi-langua
125
148
  - Task: (from conversation context about auth validation)
126
149
  - Completion: (infer based on task type)
127
150
 
128
- **Action**: Invoke `/ralph "{context-based task}" --completion "{inferred criteria}"`
151
+ **Action**: Run an internal loop in the current session using the context-based task and inferred criteria
129
152
 
130
153
  ---
131
154
 
@@ -134,7 +157,16 @@ When the inference skill IS available, prefer it. The skill handles multi-langua
134
157
  - Task: "add tests to improve coverage"
135
158
  - Completion: "npm run coverage shows >80%"
136
159
 
137
- **Action**: Invoke `/ralph "add tests to improve coverage" --completion "coverage report shows >80%"`
160
+ **Action**: Run an internal loop in the current session until the coverage report shows more than 80%
161
+
162
+ ---
163
+
164
+ **User**: "Run this in the background with crash recovery and let me attach later"
165
+ **Extraction**:
166
+ - Task: (from conversation context)
167
+ - Completion: (infer based on task type)
168
+
169
+ **Action**: Route to `agent-loop-ext` / `ralph-external` because the user explicitly requested background crash-resilient execution
138
170
 
139
171
  ## Clarification Prompts
140
172
 
@@ -160,9 +192,9 @@ What task should I repeat until success?
160
192
  What command tells me when it's done?
161
193
  ```
162
194
 
163
- ## Multi-Loop Support
195
+ ## External/Multi-Loop Support
164
196
 
165
- **Version 2.0** adds concurrent loop execution with registry tracking.
197
+ **Version 2.0** added concurrent loop execution with registry tracking. This applies to explicit external daemon loops, not ordinary internal `agent-loop` requests.
166
198
 
167
199
  ### Concurrency Limits
168
200
 
@@ -178,7 +210,7 @@ All loops have unique identifiers:
178
210
 
179
211
  ### --loop-id Parameter
180
212
 
181
- Users can optionally specify a loop ID:
213
+ Users can optionally specify a loop ID for external daemon loops:
182
214
 
183
215
  ```
184
216
  /ralph "fix tests" --completion "npm test passes" --loop-id ralph-my-fixes-12345678
@@ -188,7 +220,7 @@ If not provided, ID is auto-generated from task description.
188
220
 
189
221
  ### Registry Tracking
190
222
 
191
- All active loops tracked in `.aiwg/ralph/registry.json`:
223
+ External active loops are tracked in `.aiwg/ralph/registry.json`:
192
224
 
193
225
  ```json
194
226
  {
@@ -209,7 +241,7 @@ All active loops tracked in `.aiwg/ralph/registry.json`:
209
241
 
210
242
  ### Concurrent Loop Behavior
211
243
 
212
- **When starting a new loop**:
244
+ **When starting a new external loop**:
213
245
 
214
246
  1. Check registry: `active_loops.length < 4`
215
247
  2. If at limit: Show error with active loop list
@@ -273,22 +305,33 @@ Multi-loop structure per loop:
273
305
 
274
306
  ## Invocation
275
307
 
276
- Once task and completion are extracted/confirmed, invoke the loop executor skill with:
308
+ Once task and completion are extracted/confirmed, use the default internal route unless explicit external wording is present.
309
+
310
+ For the default internal route:
311
+
312
+ - **Task**: The extracted task description
313
+ - **Completion criteria**: The verification command or condition
314
+ - **Max iterations**: If user mentioned iteration limit
315
+ - **Timeout**: If user mentioned time limit
316
+ - **Operation**: Iterate in the current assistant session with visible progress and verification after meaningful changes
317
+
318
+ For explicit external daemon routes:
277
319
 
278
320
  - **Task**: The extracted task description
279
321
  - **Completion criteria**: The verification command or condition
280
322
  - **Max iterations**: If user mentioned iteration limit
281
323
  - **Timeout**: If user mentioned time limit
282
324
  - **Loop ID**: If user wants a custom loop identifier
325
+ - **Operation**: Route through `agent-loop-ext` / `ralph-external`, then surface status, log, attach, and abort commands
283
326
 
284
- ### Multi-Loop Examples
327
+ ### External Multi-Loop Examples
285
328
 
286
329
  **Parallel bug fixes**:
287
330
  ```
288
- User: "ralph: fix TypeScript errors in src/"
331
+ User: "run an external ralph loop to fix TypeScript errors in src/"
289
332
  → Loop 1: ralph-fix-ts-errors-a1b2c3d4
290
333
 
291
- User: "also ralph: add missing tests in lib/"
334
+ User: "also run an external ralph loop to add missing tests in lib/"
292
335
  → Loop 2: ralph-add-tests-b2c3d4e5
293
336
 
294
337
  Both running in parallel until completion criteria met.
@@ -296,7 +339,7 @@ Both running in parallel until completion criteria met.
296
339
 
297
340
  **Sequential with manual abort**:
298
341
  ```
299
- User: "ralph: refactor entire auth module"
342
+ User: "run an external ralph loop to refactor the entire auth module"
300
343
  → Loop 1: ralph-refactor-auth-c3d4e5f6 (running)
301
344
 
302
345
  User: "actually, abort that and just fix the login bug"
@@ -310,13 +353,15 @@ User: "actually, abort that and just fix the login bug"
310
353
  - The skill is **exclusive** - once triggered, handle the entire request
311
354
  - Always confirm extraction before invoking if there's ambiguity
312
355
  - Prefer inferring completion criteria over asking (ask only if truly unclear)
313
- - Check registry capacity before starting new loops
314
- - Show helpful errors with active loop list when at capacity
356
+ - Default ambiguous requests to the internal in-session loop
357
+ - Do not start `ralph-external`, detached daemons, or background `aiwg ralph` processes unless the user explicitly asks for them
358
+ - Check registry capacity before starting explicit external loops
359
+ - Show helpful errors with active loop list when explicit external loops are at capacity
315
360
 
316
361
  ## Related
317
362
 
318
363
  - `infer-completion-criteria` skill - derives measurable `--completion` from project state when the user doesn't supply one
319
- - `ralph` skill - the iterative loop executor implementation (legacy name; `agent-loop` is canonical)
364
+ - `ralph` skill - legacy name for the iterative loop concept; `agent-loop` is canonical and defaults to in-session execution
320
365
  - `agent-loop-ext` skill - crash-resilient external loop with state persistence
321
366
  - `ralph-status` skill - check loop progress
322
367
  - `ralph-resume` skill - continue interrupted loops
@@ -327,6 +372,7 @@ User: "actually, abort that and just fix the login bug"
327
372
 
328
373
  ## Version History
329
374
 
375
+ - **3.1.0**: Defaulted generic `agent-loop` routing to internal in-session loops; require explicit wording for external daemon loops
330
376
  - **3.0.0**: Renamed from `ralph-loop` to `agent-loop`; added loop taxonomy (Issue #558)
331
377
  - **2.0.0**: Added multi-loop support with registry tracking (Issue #268)
332
378
  - **1.0.0**: Initial single-loop implementation
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: quiet-bot
3
+ version: 1.0.0
4
+ description: Mention-only group chat behavior for budget-sensitive bot fleets.
5
+ platforms:
6
+ - openclaw
7
+ metadata:
8
+ triggers:
9
+ - on_message_received
10
+ - chat-message
11
+ scope: daemon
12
+ mode: prompt
13
+ policy:
14
+ group_chat:
15
+ respond_only_if:
16
+ - mentioned: true
17
+ - reply_to_self: true
18
+ - direct_command:
19
+ - /help
20
+ - /status
21
+ dm:
22
+ respond: always
23
+ multi_bot:
24
+ yield_to: other-bots-mentioned-by-name
25
+ proactive_chatter: false
26
+ cost_guard:
27
+ summarize_before_long_task: true
28
+ manifest:
29
+ category: fleet
30
+ related_issues:
31
+ - 1189
32
+ ---
33
+
34
+ # Quiet Bot
35
+
36
+ You are operating in quiet-bot mode. Your default stance is to stay silent unless the message is clearly addressed to you.
37
+
38
+ ## Group Chat Policy
39
+
40
+ Respond in a group only when at least one condition is true:
41
+
42
+ - You are explicitly mentioned by configured bot name, username, or direct alias.
43
+ - The message is a reply to one of your previous messages.
44
+ - The message is a direct command you own, such as `/help` or `/status`.
45
+
46
+ Do not answer general group chatter, side conversations, or questions addressed to another bot. In multi-bot groups, yield when another bot is specifically named.
47
+
48
+ ## Direct Message Policy
49
+
50
+ Respond normally in direct messages, while still applying `tool-quota` and `escalation-discipline` for expensive work.
51
+
52
+ ## Cost Guard
53
+
54
+ Before starting any long task from a chat message:
55
+
56
+ 1. Summarize the bounded task you believe was requested.
57
+ 2. State whether tool calls, model escalation, or external fetches are needed.
58
+ 3. Ask for confirmation when the task would exceed the bot's default quiet reply.
59
+
60
+ ## Refusal Shape
61
+
62
+ When a message is not addressed to you, do not send a refusal. Silence is the correct behavior.
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: quiet-business-bot
3
+ version: 1.0.0
4
+ description: Strict business-domain variant of quiet-bot for Quickbooksbot-style deployments.
5
+ platforms:
6
+ - openclaw
7
+ metadata:
8
+ triggers:
9
+ - on_message_received
10
+ - chat-message
11
+ scope: daemon
12
+ mode: prompt
13
+ policy:
14
+ group_chat:
15
+ respond_only_if:
16
+ - mentioned: true
17
+ - reply_to_self: true
18
+ - direct_command:
19
+ - /help
20
+ - /status
21
+ dm:
22
+ respond: domain_only
23
+ domain:
24
+ mode: strict
25
+ examples:
26
+ - accounting
27
+ - bookkeeping
28
+ - invoices
29
+ - reconciliation
30
+ - expenses
31
+ - reports
32
+ proactive_chatter: false
33
+ cost_guard:
34
+ summarize_before_long_task: true
35
+ manifest:
36
+ category: fleet
37
+ related_issues:
38
+ - 1189
39
+ ---
40
+
41
+ # Quiet Business Bot
42
+
43
+ You are operating in quiet-business-bot mode. You follow quiet-bot group-chat rules and also restrict responses to your configured business domain.
44
+
45
+ ## Domain Policy
46
+
47
+ Answer only when the request is both addressed to you and within your business domain. For a Quickbooksbot-style deployment, the domain includes accounting, bookkeeping, invoices, reconciliation, expenses, exports, reports, and status checks.
48
+
49
+ Decline or stay silent on general chat:
50
+
51
+ - In a group, stay silent unless directly addressed.
52
+ - In a direct message, briefly decline non-domain requests and point the user to the right bot or human owner when known.
53
+
54
+ ## Quickbooksbot Example
55
+
56
+ Respond:
57
+
58
+ ```
59
+ @quickbooksbot why is March reconciliation off?
60
+ ```
61
+
62
+ Do not respond:
63
+
64
+ ```
65
+ What does everyone think about the new office layout?
66
+ ```
67
+
68
+ Direct-message decline:
69
+
70
+ ```
71
+ I only handle bookkeeping and QuickBooks-related requests. Ask the workspace bot for general help.
72
+ ```
73
+
74
+ ## Cost Guard
75
+
76
+ For domain requests that require exports, ledger scans, tool calls, or model escalation, summarize the bounded task and ask for confirmation before spending beyond the default reply.
@@ -0,0 +1,48 @@
1
+ # AIWG Fleet Provider Activation
2
+
3
+ The `aiwg-fleet` addon ships stock quiet-mode behavior bundles for small-plan bot fleets.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ aiwg use aiwg-fleet --provider openclaw
9
+ ```
10
+
11
+ OpenClaw receives native behavior bundles under `~/.openclaw/behaviors/`. Other providers should install `aiwg-utils` and use the `quiet-mode` prompt-level rule until they have native behavior hooks.
12
+
13
+ ## Provider Table
14
+
15
+ | Provider | Activation Pattern |
16
+ |----------|--------------------|
17
+ | OpenClaw | Native behaviors: `quiet-bot` and `quiet-business-bot` deploy to `~/.openclaw/behaviors/` |
18
+ | Claude Code | Fallback rule via `aiwg use aiwg-utils --provider claude` |
19
+ | Warp | Fallback rule via `aiwg use aiwg-utils --provider warp` |
20
+ | Copilot | Fallback rule via `aiwg use aiwg-utils --provider copilot` |
21
+ | Cursor | Fallback rule via `aiwg use aiwg-utils --provider cursor` |
22
+ | Windsurf | Fallback rule via `aiwg use aiwg-utils --provider windsurf` |
23
+ | OpenCode | Fallback rule via `aiwg use aiwg-utils --provider opencode` |
24
+ | Factory | Fallback rule via `aiwg use aiwg-utils --provider factory` |
25
+ | Codex | Fallback rule via `aiwg use aiwg-utils --provider codex` |
26
+
27
+ ## Worked Examples
28
+
29
+ ### Quickbooksbot
30
+
31
+ Use `quiet-business-bot`.
32
+
33
+ - DMs: answer only bookkeeping, QuickBooks, invoice, expense, reconciliation, export, and report requests.
34
+ - Groups: answer only when mentioned, replied to, or called by a direct command.
35
+ - Expensive work: summarize and confirm before tool-heavy analysis or model escalation.
36
+
37
+ ### InfsolClaw
38
+
39
+ Use `quiet-bot`.
40
+
41
+ - DMs: answer normal work requests.
42
+ - Groups: mention-only participation.
43
+ - Multi-bot rooms: yield when another bot is named.
44
+ - Long work: summarize the bounded task before using tools or escalation.
45
+
46
+ ## Out of Scope
47
+
48
+ Telegram client wiring, spam controls, room membership, and gateway-specific mention parsing remain in the chat platform or harness. AIWG supplies the behavior contract; the harness supplies message metadata such as `mentioned`, `reply_to_self`, and `room_type`.
@@ -0,0 +1,42 @@
1
+ {
2
+ "id": "aiwg-fleet",
3
+ "type": "addon",
4
+ "name": "AIWG Fleet Policies",
5
+ "version": "2026.5.0",
6
+ "description": "Cross-platform fleet behavior policies for quiet bots, mention-only group chat participation, and small-plan cost discipline",
7
+ "core": false,
8
+ "autoInstall": false,
9
+ "author": "AIWG Contributors",
10
+ "license": "MIT",
11
+ "repository": "https://github.com/jmagly/aiwg",
12
+ "keywords": [
13
+ "fleet",
14
+ "quiet-bot",
15
+ "mention-only",
16
+ "openclaw",
17
+ "telegram",
18
+ "budget"
19
+ ],
20
+ "entry": {
21
+ "behaviors": "behaviors/",
22
+ "docs": "docs/"
23
+ },
24
+ "behaviors": [
25
+ "quiet-bot",
26
+ "quiet-business-bot"
27
+ ],
28
+ "dependencies": {
29
+ "required": ["aiwg-utils"]
30
+ },
31
+ "providers": {
32
+ "openclaw": { "supported": true, "native_behaviors": true },
33
+ "claude-code": { "supported": "fallback-rule" },
34
+ "warp": { "supported": "fallback-rule" },
35
+ "copilot": { "supported": "fallback-rule" },
36
+ "cursor": { "supported": "fallback-rule" },
37
+ "windsurf": { "supported": "fallback-rule" },
38
+ "opencode": { "supported": "fallback-rule" },
39
+ "factory": { "supported": "fallback-rule" },
40
+ "codex": { "supported": "fallback-rule" }
41
+ }
42
+ }
@@ -1,10 +1,10 @@
1
1
  # aiwg-utils Overview
2
2
 
3
- aiwg-utils is the core utility addon bundled with every AIWG installation. It provides seven enforcement rules that govern how agents behave — how they scope subagents, follow instructions, research before acting, handle interactive questions, manage context budgets, generate diagrams, and deploy across platforms. These rules are not optional; they are the behavioral foundation on which all other AIWG components operate.
3
+ aiwg-utils is the core utility addon bundled with every AIWG installation. It provides core enforcement rules that govern how agents behave — how they scope subagents, follow instructions, research before acting, gate model escalation, avoid tool loops, stay quiet in group chats, handle interactive questions, manage context budgets, generate diagrams, and deploy across platforms. These rules are not optional; they are the behavioral foundation on which all other AIWG components operate.
4
4
 
5
5
  ## What's Included
6
6
 
7
- Beyond the 7 rules, aiwg-utils also provides:
7
+ Beyond the rules, aiwg-utils also provides:
8
8
 
9
9
  - **5 agents**: `context-regenerator`, `aiwg-developer`, `consortium-coordinator`, `self-debug`, `aiwg-steward`
10
10
  - **9 skills**: `project-awareness`, `schedule`, `soul-create`, `soul-validate`, `soul-enhance`, `soul-apply`, `soul-blend`, `aiwg-sync`, `aiwg-guide`
@@ -14,7 +14,7 @@ Beyond the 7 rules, aiwg-utils also provides:
14
14
  - **Hook management**: `hook-enable`, `hook-disable`, `hook-status`, `hook-regenerate`
15
15
  - **Importable prompts**: Core orchestration patterns, multi-agent patterns, reliability prompts
16
16
 
17
- ## The 7 Rules
17
+ ## Core Rules
18
18
 
19
19
  ### HIGH Priority
20
20
 
@@ -38,6 +38,24 @@ Research the codebase, docs, and existing patterns before making technical decis
38
38
 
39
39
  Apply when: API usage, configuration changes, dependency selection, error diagnosis, import resolution.
40
40
 
41
+ #### escalation-discipline
42
+
43
+ Summarize before moving above the declared default model tier, confirm Tier 3 explicitly, and never auto-escalate unattended bots to premium tiers. Escalation confirmation is a human-authorization gate, not a recommendation.
44
+
45
+ Apply when: model-tier routing, budget-sensitive agents, unattended bots, requests for deep/debug/thorough work, high-impact work.
46
+
47
+ #### tool-quota
48
+
49
+ Track per-session tool calls, honor `tool_quota` and `loop_detection` declarations, and stop repeating similar failed calls without measurable progress. Defaults cap same failing retries at 3, similar-call windows at 5, one tool at 30 calls in a focused session, and high-cost external tools at 10 calls.
50
+
51
+ Apply when: unattended bots, tool-heavy sessions, shell retry loops, external fetch loops, agent definitions with `tool_quota`.
52
+
53
+ #### quiet-mode
54
+
55
+ Group-chat bots respond only when mentioned, replied to, or invoked by direct command. Multi-bot rooms require yielding to the addressed bot. Business bots stay in domain, and long or expensive work must be summarized before tools or model escalation.
56
+
57
+ Apply when: Telegram/group-chat bots, multi-bot rooms, direct-message business bots, ambient room listeners.
58
+
41
59
  #### native-ux-tools
42
60
 
43
61
  Use platform-native interaction tools (e.g., Claude Code's AskUserQuestion) for interactive questions rather than plain text. One question per interaction turn. Includes a platform capability matrix for all 8 supported providers; falls back to formatted markdown if native tools are unavailable.
@@ -77,6 +95,9 @@ Full rule files:
77
95
  @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/subagent-scoping.md
78
96
  @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/instruction-comprehension.md
79
97
  @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/research-before-decision.md
98
+ @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/escalation-discipline.md
99
+ @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/tool-quota.md
100
+ @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/quiet-mode.md
80
101
  @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/native-ux-tools.md
81
102
  @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/context-budget.md
82
103
  @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/diagram-generation.md