aiwg 2026.2.3 → 2026.2.5

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 (187) hide show
  1. package/CLAUDE.md +18 -6
  2. package/README.md +5 -5
  3. package/USAGE_GUIDE.md +1 -1
  4. package/agentic/code/addons/aiwg-evals/manifest.json +1 -1
  5. package/agentic/code/addons/aiwg-hooks/manifest.json +1 -1
  6. package/agentic/code/addons/aiwg-utils/agents/aiwg-developer.md +1 -1
  7. package/agentic/code/addons/aiwg-utils/commands/aiwg-regenerate-agents.md +1 -1
  8. package/agentic/code/addons/aiwg-utils/commands/commit-and-push.md +1 -1
  9. package/agentic/code/addons/aiwg-utils/commands/roko-voice.md +1 -1
  10. package/agentic/code/addons/aiwg-utils/commands/summarize-transcript.md +1 -1
  11. package/agentic/code/addons/aiwg-utils/commands/workspace-reset.md +1 -1
  12. package/agentic/code/addons/aiwg-utils/manifest.json +1 -1
  13. package/agentic/code/addons/aiwg-utils/rules/agent-deployment.md +1 -1
  14. package/agentic/code/addons/aiwg-utils/rules/context-budget.md +230 -0
  15. package/agentic/code/addons/aiwg-utils/rules/subagent-scoping.md +508 -0
  16. package/agentic/code/addons/auto-memory/seeds/MEMORY.md +1 -1
  17. package/agentic/code/addons/droid-bridge/manifest.json +1 -1
  18. package/agentic/code/addons/ralph/docs/troubleshooting.md +1 -1
  19. package/agentic/code/addons/ralph/manifest.json +1 -1
  20. package/agentic/code/addons/rlm/README.md +1 -1
  21. package/agentic/code/addons/rlm/docs/deployment-guide.md +1 -1
  22. package/agentic/code/addons/rlm/manifest.json +1 -1
  23. package/agentic/code/addons/security/README.md +1 -1
  24. package/agentic/code/addons/star-prompt/README.md +6 -6
  25. package/agentic/code/addons/star-prompt/manifest.json +1 -1
  26. package/agentic/code/addons/star-prompt/skills/star-prompt.md +7 -7
  27. package/agentic/code/addons/voice-framework/manifest.json +1 -1
  28. package/agentic/code/addons/voice-framework/schemas/voice-profile.schema.json +1 -1
  29. package/agentic/code/addons/writing-quality/README.md +1 -1
  30. package/agentic/code/addons/writing-quality/agents/content-diversifier.md +2 -2
  31. package/agentic/code/addons/writing-quality/agents/prompt-optimizer.md +1 -1
  32. package/agentic/code/addons/writing-quality/agents/writing-validator.md +2 -2
  33. package/agentic/code/addons/writing-quality/examples/traceability-demo.ts +1 -1
  34. package/agentic/code/addons/writing-quality/manifest.json +1 -1
  35. package/agentic/code/frameworks/media-marketing-kit/README.md +6 -6
  36. package/agentic/code/frameworks/media-marketing-kit/commands/intake-from-campaign.md +5 -5
  37. package/agentic/code/frameworks/media-marketing-kit/commands/intake-start-campaign.md +5 -5
  38. package/agentic/code/frameworks/media-marketing-kit/config/models.json +1 -1
  39. package/agentic/code/frameworks/media-marketing-kit/project-claude-template.md +3 -3
  40. package/agentic/code/frameworks/research-complete/README.md +2 -2
  41. package/agentic/code/frameworks/research-complete/commands/research-archive.md +1 -1
  42. package/agentic/code/frameworks/sdlc-complete/README.md +2 -2
  43. package/agentic/code/frameworks/sdlc-complete/agents/factory-compat.md +3 -3
  44. package/agentic/code/frameworks/sdlc-complete/agents/windsurf-compat.md +4 -4
  45. package/agentic/code/frameworks/sdlc-complete/commands/address-issues.md +324 -0
  46. package/agentic/code/frameworks/sdlc-complete/commands/aiwg-kb.md +1 -1
  47. package/agentic/code/frameworks/sdlc-complete/commands/aiwg-setup-project.md +1 -1
  48. package/agentic/code/frameworks/sdlc-complete/commands/aiwg-setup-warp.md +3 -3
  49. package/agentic/code/frameworks/sdlc-complete/commands/aiwg-update-claude.md +6 -6
  50. package/agentic/code/frameworks/sdlc-complete/commands/aiwg-update-warp.md +7 -7
  51. package/agentic/code/frameworks/sdlc-complete/commands/intake-from-codebase.md +5 -5
  52. package/agentic/code/frameworks/sdlc-complete/commands/intake-start.md +5 -5
  53. package/agentic/code/frameworks/sdlc-complete/commands/intake-wizard.md +5 -5
  54. package/agentic/code/frameworks/sdlc-complete/commands/issue-create.md +2 -2
  55. package/agentic/code/frameworks/sdlc-complete/commands/issue-list.md +1 -1
  56. package/agentic/code/frameworks/sdlc-complete/commands/issue-update.md +1 -1
  57. package/agentic/code/frameworks/sdlc-complete/config/models-v2.json +2 -2
  58. package/agentic/code/frameworks/sdlc-complete/config/models.json +1 -1
  59. package/agentic/code/frameworks/sdlc-complete/rules/README.md +48 -11
  60. package/agentic/code/frameworks/sdlc-complete/rules/RULES-INDEX.md +213 -0
  61. package/agentic/code/frameworks/sdlc-complete/rules/manifest.json +21 -9
  62. package/agentic/code/frameworks/sdlc-complete/schemas/flows/fair-extensions.yaml +1 -1
  63. package/agentic/code/frameworks/sdlc-complete/schemas/flows/mcp-extensions.yaml +1 -1
  64. package/agentic/code/frameworks/sdlc-complete/schemas/mcp/discovery.yaml +2 -2
  65. package/agentic/code/frameworks/sdlc-complete/skills/issue-driven-ralph/SKILL.md +186 -0
  66. package/agentic/code/frameworks/sdlc-complete/templates/aiwg-readme-template.md +3 -3
  67. package/agentic/code/frameworks/sdlc-complete/templates/codex/AGENTS.md.aiwg-template +2 -2
  68. package/agentic/code/frameworks/sdlc-complete/templates/configuration/aiwg-config-template.md +2 -2
  69. package/agentic/code/frameworks/sdlc-complete/templates/copilot/copilot-instructions.md.aiwg-template +1 -1
  70. package/agentic/code/frameworks/sdlc-complete/templates/cursor/AGENTS.md.aiwg-template +2 -2
  71. package/agentic/code/frameworks/sdlc-complete/templates/factory/AGENTS.md.aiwg-template +1 -1
  72. package/agentic/code/frameworks/sdlc-complete/templates/opencode/AGENTS.md.aiwg-template +1 -1
  73. package/agentic/code/frameworks/sdlc-complete/templates/opencode/instructions.md.aiwg-template +1 -1
  74. package/agentic/code/frameworks/sdlc-complete/templates/project/CLAUDE.md +6 -6
  75. package/agentic/code/frameworks/sdlc-complete/templates/warp/WARP.md.aiwg-base +6 -6
  76. package/docs/CLI_USAGE.md +1 -1
  77. package/docs/_manifest.json +1 -1
  78. package/docs/cli-reference.md +1 -1
  79. package/docs/commands/development-commands-examples.md +1 -1
  80. package/docs/config.json +2 -2
  81. package/docs/contributing/contributor-quickstart.md +11 -11
  82. package/docs/contributing/maintainer-review-guide.md +1 -1
  83. package/docs/contributing/testing-requirements.md +1 -1
  84. package/docs/development/devkit-overview.md +1 -1
  85. package/docs/extensions/creating-extensions.md +1 -1
  86. package/docs/integrations/warp-terminal.md +5 -5
  87. package/docs/integrations/windsurf-quickstart.md +1 -1
  88. package/docs/migration/multi-loop-migration.md +1 -1
  89. package/docs/overrides/index.html +1 -1
  90. package/docs/overrides/terminal.js +2 -2
  91. package/docs/overview/executive-brief.md +2 -2
  92. package/docs/plugin-marketplace-guide.md +6 -6
  93. package/docs/ralph-epic-26-architecture.md +1 -1
  94. package/docs/ralph-epic-26-best-practices.md +1 -1
  95. package/docs/ralph-epic-26-troubleshooting.md +1 -1
  96. package/docs/references/REF-001-production-grade-agentic-workflows.md +2 -2
  97. package/docs/references/REF-019-toolformer-self-taught-tools.md +1 -1
  98. package/docs/releases/v0.9.1-announcement.md +4 -4
  99. package/docs/releases/v2024.12.1-announcement.md +1 -1
  100. package/docs/releases/v2024.12.2-announcement.md +1 -1
  101. package/docs/releases/v2024.12.3-announcement.md +1 -1
  102. package/docs/releases/v2024.12.4-announcement.md +1 -1
  103. package/docs/releases/v2024.12.5-announcement.md +1 -1
  104. package/docs/releases/v2026.01.3-announcement.md +1 -1
  105. package/docs/releases/v2026.2.4-announcement.md +123 -0
  106. package/docs/releases/v2026.2.5-announcement.md +147 -0
  107. package/docs/research/failure-mode-mitigation.md +1 -1
  108. package/docs/research/research-background.md +1 -1
  109. package/docs/simple-language-translations.md +19 -0
  110. package/docs/sponsors.md +1 -1
  111. package/docs/troubleshooting/index.md +1 -1
  112. package/docs/welcome.html +7 -7
  113. package/man/aiwg.1 +2 -2
  114. package/package.json +3 -3
  115. package/plugins/hooks/.claude-plugin/plugin.json +1 -1
  116. package/plugins/marketing/.claude-plugin/plugin.json +1 -1
  117. package/plugins/marketing/commands/intake-from-campaign.md +5 -5
  118. package/plugins/marketing/commands/intake-start-campaign.md +5 -5
  119. package/plugins/sdlc/.claude-plugin/plugin.json +1 -1
  120. package/plugins/sdlc/agents/factory-compat.md +3 -3
  121. package/plugins/sdlc/agents/windsurf-compat.md +4 -4
  122. package/plugins/sdlc/commands/aiwg-kb.md +1 -1
  123. package/plugins/sdlc/commands/aiwg-setup-project.md +1 -1
  124. package/plugins/sdlc/commands/aiwg-setup-warp.md +3 -3
  125. package/plugins/sdlc/commands/aiwg-update-claude.md +6 -6
  126. package/plugins/sdlc/commands/aiwg-update-warp.md +7 -7
  127. package/plugins/sdlc/commands/intake-from-codebase.md +5 -5
  128. package/plugins/sdlc/commands/intake-start.md +5 -5
  129. package/plugins/sdlc/commands/intake-wizard.md +5 -5
  130. package/plugins/sdlc/commands/issue-create.md +2 -2
  131. package/plugins/sdlc/commands/issue-list.md +1 -1
  132. package/plugins/sdlc/commands/issue-update.md +1 -1
  133. package/plugins/utils/.claude-plugin/plugin.json +1 -1
  134. package/plugins/utils/agents/aiwg-developer.md +1 -1
  135. package/plugins/utils/commands/aiwg-regenerate-agents.md +1 -1
  136. package/plugins/utils/commands/commit-and-push.md +1 -1
  137. package/plugins/utils/commands/roko-voice.md +1 -1
  138. package/plugins/utils/commands/summarize-transcript.md +1 -1
  139. package/plugins/utils/commands/workspace-reset.md +1 -1
  140. package/plugins/voice/.claude-plugin/plugin.json +1 -1
  141. package/plugins/writing/.claude-plugin/plugin.json +1 -1
  142. package/plugins/writing/README.md +2 -2
  143. package/plugins/writing/agents/content-diversifier.md +2 -2
  144. package/plugins/writing/agents/prompt-optimizer.md +1 -1
  145. package/plugins/writing/agents/writing-validator.md +2 -2
  146. package/src/channel/manager.mjs +1 -1
  147. package/src/cli/handlers/help.ts +1 -1
  148. package/src/cli/help-generator.ts +1 -1
  149. package/src/extensions/types.ts +2 -2
  150. package/src/hooks/laziness-detection.ts +4 -4
  151. package/src/mcp/cli.mjs +1 -1
  152. package/src/plugin/plugin-status.ts +1 -1
  153. package/src/plugin/workspace-creator.ts +1 -1
  154. package/src/smiths/commandsmith/README.md +2 -2
  155. package/src/writing/example-generator.ts +2 -2
  156. package/src/writing/prompt-optimizer.ts +3 -3
  157. package/src/writing/prompt-templates.ts +1 -1
  158. package/src/writing/validation-engine.ts +2 -2
  159. package/src/writing/validation-rules.ts +3 -3
  160. package/tools/agents/deploy-windsurf.mjs +2 -2
  161. package/tools/agents/providers/base.mjs +129 -0
  162. package/tools/agents/providers/claude.mjs +16 -5
  163. package/tools/agents/providers/codex.mjs +14 -4
  164. package/tools/agents/providers/copilot.mjs +13 -3
  165. package/tools/agents/providers/cursor.mjs +23 -8
  166. package/tools/agents/providers/factory.mjs +15 -3
  167. package/tools/agents/providers/opencode.mjs +15 -3
  168. package/tools/agents/providers/warp.mjs +14 -4
  169. package/tools/agents/providers/windsurf.mjs +15 -5
  170. package/tools/cli/README.md +2 -2
  171. package/tools/cli/diversify-content.mjs +1 -1
  172. package/tools/cli/optimize-prompt.mjs +1 -1
  173. package/tools/cli/status-command.mjs +3 -3
  174. package/tools/cli/test-status-display.mjs +1 -1
  175. package/tools/cli/workspace-migrate.mjs +3 -3
  176. package/tools/cli/workspace-reset.mjs +1 -1
  177. package/tools/cli/workspace-rollback.mjs +2 -2
  178. package/tools/cli/workspace-status.mjs +3 -3
  179. package/tools/install/README.md +1 -1
  180. package/tools/install/install.sh +2 -2
  181. package/tools/install/new-project.mjs +2 -2
  182. package/tools/plugin/package-plugins.mjs +2 -2
  183. package/tools/ralph/ralph-cli-multiloop.mjs +1 -1
  184. package/tools/ralph/ralph-cli.mjs +1 -1
  185. package/tools/warp/README.md +2 -2
  186. package/tools/warp/setup-warp.mjs +3 -3
  187. package/tools/workspace/inject-metadata.mjs +1 -1
package/CLAUDE.md CHANGED
@@ -1,4 +1,4 @@
1
- # AI Writing Guide
1
+ # AIWG
2
2
 
3
3
  Framework for improving AI-generated content quality with voice profiles, validation tools, and specialized agents.
4
4
 
@@ -304,8 +304,11 @@ Apply mitigations for known LLM failure archetypes: hallucination, context loss,
304
304
 
305
305
  ### Rules Reference
306
306
 
307
- Full rule documentation: `agentic/code/frameworks/sdlc-complete/rules/`
308
- Manifest: `agentic/code/frameworks/sdlc-complete/rules/manifest.json`
307
+ Rules deploy as a single consolidated `RULES-INDEX.md` (~200 lines) instead of 31 individual files (~9,321 lines). The index contains summaries with @-links to full rule files for on-demand loading.
308
+
309
+ - Consolidated index: `agentic/code/frameworks/sdlc-complete/rules/RULES-INDEX.md`
310
+ - Full rule files: `agentic/code/frameworks/sdlc-complete/rules/`
311
+ - Manifest: `agentic/code/frameworks/sdlc-complete/rules/manifest.json`
309
312
 
310
313
  ## Commit and Output Conventions
311
314
 
@@ -335,8 +338,8 @@ aiwg doctor
335
338
  ## Support
336
339
 
337
340
  - **Website**: https://aiwg.io
338
- - **Repository**: https://github.com/jmagly/ai-writing-guide
339
- - **Issues**: https://github.com/jmagly/ai-writing-guide/issues
341
+ - **Repository**: https://github.com/jmagly/aiwg
342
+ - **Issues**: https://github.com/jmagly/aiwg/issues
340
343
  - **Discord**: https://discord.gg/BuAusFMxdA
341
344
  - **Telegram**: https://t.me/+oJg9w2lE6A5lOGFh
342
345
 
@@ -344,9 +347,18 @@ aiwg doctor
344
347
 
345
348
  <!-- TEAM DIRECTIVES: Add project-specific guidance below this line -->
346
349
 
350
+ ## Context Window Configuration (Optional)
351
+
352
+ <!-- Uncomment and set if running on a local/GPU system with limited context.
353
+ This guides parallel subagent limits and compaction aggressiveness.
354
+ Leave commented out for Anthropic cloud systems (1M+ context).
355
+ See @.claude/rules/context-budget.md for the full lookup table. -->
356
+
357
+ <!-- AIWG_CONTEXT_WINDOW: 100000 -->
358
+
347
359
  ## What AIWG Is
348
360
 
349
- **AI Writing Guide (AIWG)** is a framework that provides AI coding assistants with structured workflows, specialized agents, and artifact management. It's not just documentation - it's an operational system that:
361
+ **AIWG** is a framework that provides AI coding assistants with structured workflows, specialized agents, and artifact management. It's not just documentation - it's an operational system that:
350
362
 
351
363
  1. **Deploys agents** - Specialized AI personas (Test Engineer, Security Auditor, etc.) with defined tools and expertise
352
364
  2. **Manages artifacts** - All project documents (requirements, architecture, tests) live in `.aiwg/`
package/README.md CHANGED
@@ -12,7 +12,7 @@ aiwg use sdlc # deploy SDLC framework
12
12
  [![npm version](https://img.shields.io/npm/v/aiwg/latest?label=npm&color=CB3837&logo=npm&style=flat-square)](https://www.npmjs.com/package/aiwg)
13
13
  [![npm downloads](https://img.shields.io/npm/dm/aiwg?color=CB3837&logo=npm&style=flat-square)](https://www.npmjs.com/package/aiwg)
14
14
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](LICENSE)
15
- [![GitHub Stars](https://img.shields.io/github/stars/jmagly/ai-writing-guide?style=flat-square)](https://github.com/jmagly/ai-writing-guide/stargazers)
15
+ [![GitHub Stars](https://img.shields.io/github/stars/jmagly/ai-writing-guide?style=flat-square)](https://github.com/jmagly/aiwg/stargazers)
16
16
 
17
17
  [**Get Started**](#-quick-start) · [**Documentation**](#-documentation) · [**Examples**](examples/) · [**Contributing**](CONTRIBUTING.md) · [**Community**](#-community--support)
18
18
 
@@ -265,7 +265,7 @@ AIWG's unified extension system enables dynamic discovery, semantic search, and
265
265
  We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
266
266
 
267
267
  **Quick contributions:**
268
- - Found an AI pattern? [Open an issue](https://github.com/jmagly/ai-writing-guide/issues/new)
268
+ - Found an AI pattern? [Open an issue](https://github.com/jmagly/aiwg/issues/new)
269
269
  - Have a better rewrite? Submit a PR to `examples/`
270
270
  - Want to add an agent? Use `docs/development/agent-template.md`
271
271
 
@@ -276,8 +276,8 @@ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
276
276
  - 🌐 **Website:** [aiwg.io](https://aiwg.io)
277
277
  - 💬 **Discord:** [Join Server](https://discord.gg/BuAusFMxdA)
278
278
  - 📱 **Telegram:** [Join Group](https://t.me/+oJg9w2lE6A5lOGFh)
279
- - 🐛 **Issues:** [GitHub Issues](https://github.com/jmagly/ai-writing-guide/issues)
280
- - 💡 **Discussions:** [GitHub Discussions](https://github.com/jmagly/ai-writing-guide/discussions)
279
+ - 🐛 **Issues:** [GitHub Issues](https://github.com/jmagly/aiwg/issues)
280
+ - 💡 **Discussions:** [GitHub Discussions](https://github.com/jmagly/aiwg/discussions)
281
281
 
282
282
  ---
283
283
 
@@ -329,7 +329,7 @@ Custom AI and blockchain solutions for the digital age.
329
329
  </tr>
330
330
  </table>
331
331
 
332
- **Interested in sponsoring?** [Contact us](https://github.com/jmagly/ai-writing-guide/discussions)
332
+ **Interested in sponsoring?** [Contact us](https://github.com/jmagly/aiwg/discussions)
333
333
 
334
334
  ---
335
335
 
package/USAGE_GUIDE.md CHANGED
@@ -1,4 +1,4 @@
1
- # AI Writing Guide - Usage Guide
1
+ # AIWG - Usage Guide
2
2
 
3
3
  ## Installation Options
4
4
 
@@ -8,7 +8,7 @@
8
8
  "autoInstall": false,
9
9
  "author": "AIWG Contributors",
10
10
  "license": "MIT",
11
- "repository": "https://github.com/jmagly/ai-writing-guide",
11
+ "repository": "https://github.com/jmagly/aiwg",
12
12
  "keywords": [
13
13
  "aiwg",
14
14
  "evals",
@@ -8,7 +8,7 @@
8
8
  "autoInstall": false,
9
9
  "author": "AIWG Contributors",
10
10
  "license": "MIT",
11
- "repository": "https://github.com/jmagly/ai-writing-guide",
11
+ "repository": "https://github.com/jmagly/aiwg",
12
12
  "keywords": [
13
13
  "aiwg",
14
14
  "hooks",
@@ -7,7 +7,7 @@ tools: Read, Write, MultiEdit, Bash, WebFetch, Glob, Grep
7
7
 
8
8
  # AIWG Developer Agent
9
9
 
10
- Expert in AIWG (AI Writing Guide) architecture, patterns, and development. Assists users in creating, extending, and customizing AIWG components.
10
+ Expert in AIWG architecture, patterns, and development. Assists users in creating, extending, and customizing AIWG components.
11
11
 
12
12
  ## Domain Expertise
13
13
 
@@ -115,7 +115,7 @@ docs/ → Documentation
115
115
 
116
116
  ## AIWG Framework
117
117
 
118
- This project uses the AI Writing Guide (AIWG) SDLC framework for software development workflows.
118
+ This project uses the AIWG SDLC framework for software development workflows.
119
119
 
120
120
  ### Available Agents
121
121
 
@@ -483,7 +483,7 @@ git push
483
483
 
484
484
  ## Project-Specific Conventions
485
485
 
486
- ### AI Writing Guide Project
486
+ ### AIWG Project
487
487
 
488
488
  **Common Scopes**:
489
489
  - `agents`: SDLC agent definitions
@@ -397,4 +397,4 @@ Before finalizing output, verify:
397
397
 
398
398
  **Command Version**: 1.0
399
399
  **Voice Reference**: ROKO Network - Technical Mythology for Protocol Age
400
- **Maintained By**: AI Writing Guide Team
400
+ **Maintained By**: AIWG Team
@@ -310,4 +310,4 @@ TL;DR
310
310
 
311
311
  **Template Version**: 1.0
312
312
  **Based On**: Roko Dev Community Update (Oct 7 & 9, 2025)
313
- **Maintained By**: AI Writing Guide Team
313
+ **Maintained By**: AIWG Team
@@ -201,7 +201,7 @@ mkdir -p .aiwg/{intake,requirements,architecture,planning,risks,testing,security
201
201
  cat > .aiwg/README.md <<'EOF'
202
202
  # AIWG Workspace
203
203
 
204
- This directory contains SDLC artifacts managed by the AI Writing Guide framework.
204
+ This directory contains SDLC artifacts managed by the AIWG framework.
205
205
 
206
206
  ## Structure
207
207
 
@@ -8,7 +8,7 @@
8
8
  "autoInstall": true,
9
9
  "author": "AIWG Contributors",
10
10
  "license": "MIT",
11
- "repository": "https://github.com/jmagly/ai-writing-guide",
11
+ "repository": "https://github.com/jmagly/aiwg",
12
12
  "keywords": [
13
13
  "aiwg",
14
14
  "utilities",
@@ -18,7 +18,7 @@ These rules apply when working with agent definitions and multi-provider deploym
18
18
 
19
19
  **General-Purpose Writing Agents** (`agentic/code/agents/`):
20
20
  - `writing-validator` - Validates voice consistency and authenticity
21
- - `prompt-optimizer` - Enhances prompts using AI Writing Guide principles
21
+ - `prompt-optimizer` - Enhances prompts using AIWG principles
22
22
  - `content-diversifier` - Generates varied examples and perspectives
23
23
 
24
24
  **SDLC Framework Agents** (`agentic/code/frameworks/sdlc-complete/agents/`):
@@ -0,0 +1,230 @@
1
+ # Context Window Budget Rules
2
+
3
+ **Enforcement Level**: MEDIUM
4
+ **Scope**: All parallel subagent spawning and task scheduling
5
+ **Addon**: aiwg-utils (core, universal)
6
+
7
+ ## Overview
8
+
9
+ When `AIWG_CONTEXT_WINDOW` is set in CLAUDE.md (or equivalent platform context file), agents MUST respect the declared context budget when deciding how many parallel subagents to spawn and how aggressively to compact context.
10
+
11
+ This directive is **opt-in**. When unset, behavior is unchanged and the platform decides parallelism limits. When set, it provides guidance for systems with smaller context windows (e.g., local GPU inference with 100k-256k context) where unconstrained parallel spawning causes client crashes.
12
+
13
+ ## How to Configure
14
+
15
+ Users add the following directive to their CLAUDE.md team directives section (or equivalent for their platform):
16
+
17
+ ```markdown
18
+ <!-- AIWG_CONTEXT_WINDOW: 100000 -->
19
+ ```
20
+
21
+ The value is the total context window size in tokens. Common values:
22
+
23
+ | System | Typical Context Window |
24
+ |--------|----------------------|
25
+ | Local GPU (small) | 32,000-64,000 |
26
+ | Local GPU (medium) | 100,000-128,000 |
27
+ | Local GPU (large) | 200,000-256,000 |
28
+ | Cloud API (standard) | 200,000-500,000 |
29
+ | Anthropic cloud | 1,000,000+ |
30
+
31
+ ## Mandatory Rules
32
+
33
+ ### Rule 1: Check for AIWG_CONTEXT_WINDOW Before Parallel Spawning
34
+
35
+ Before spawning multiple subagents in parallel, check whether `AIWG_CONTEXT_WINDOW` is declared in the project's context file.
36
+
37
+ **If unset**: No change to default behavior. Spawn as many parallel subagents as the task decomposition requires.
38
+
39
+ **If set**: Use the lookup table below to determine the maximum number of concurrent parallel subagents.
40
+
41
+ ### Rule 2: Parallel Subagent Limits
42
+
43
+ When `AIWG_CONTEXT_WINDOW` is set, respect these limits:
44
+
45
+ | Context Window | Max Parallel Subagents | Compaction Behavior |
46
+ |----------------|----------------------|---------------------|
47
+ | Unset (default) | No limit (platform decides) | Normal |
48
+ | ≤64k | 1-2 | Aggressive — prefer sequential |
49
+ | 65k-128k | 2-4 | Moderate — batch in groups of 2-3 |
50
+ | 129k-256k | 4-8 | Standard |
51
+ | 257k-512k | 8-12 | Relaxed |
52
+ | >512k | 12-20 | Normal (cloud default) |
53
+
54
+ **Formula**: `max_parallel = max(1, floor(context_window / 50000))` capped at 20.
55
+
56
+ **Important**: This limits how many subagents run *concurrently*, not the total number of subagents an orchestrator can spawn. If a task decomposes into 20 atomic subtasks but the budget allows only 3 parallel, run them in waves of 3.
57
+
58
+ ### Rule 3: Prefer Sequential Batching When Budget Is Tight
59
+
60
+ When context budget is ≤128k tokens:
61
+
62
+ **FORBIDDEN**:
63
+ ```
64
+ Task decomposes into 10 subtasks.
65
+ Spawn all 10 subagents simultaneously.
66
+ → Client crashes or context overflow
67
+ ```
68
+
69
+ **REQUIRED**:
70
+ ```
71
+ Task decomposes into 10 subtasks.
72
+ Context budget allows 2-3 parallel.
73
+
74
+ Wave 1: Subagents 1, 2, 3 (parallel)
75
+ → Wait for completion
76
+ Wave 2: Subagents 4, 5, 6 (parallel)
77
+ → Wait for completion
78
+ Wave 3: Subagents 7, 8, 9 (parallel)
79
+ → Wait for completion
80
+ Wave 4: Subagent 10
81
+ → Done
82
+ ```
83
+
84
+ ### Rule 4: Keep Individual Subagent Tasks Smaller Under Tight Budgets
85
+
86
+ When context budget is constrained, each subagent should produce less output to avoid accumulating too much context in the parent agent's window.
87
+
88
+ | Context Window | Target Output Per Subagent |
89
+ |----------------|--------------------------|
90
+ | ≤64k | <3k tokens |
91
+ | 65k-128k | <5k tokens |
92
+ | 129k-256k | <10k tokens |
93
+ | >256k | Normal (no specific limit) |
94
+
95
+ ### Rule 5: This Is Guidance, Not Programmatic Enforcement
96
+
97
+ These rules operate at the prompt/convention level. There is no runtime system that enforces them. Agents are expected to read the directive and adjust their behavior accordingly. The rules provide clear lookup tables so the agent can make the right decision without complex reasoning.
98
+
99
+ ## Compaction Guidance
100
+
101
+ ### Aggressive Compaction (≤64k)
102
+
103
+ - Run subagents sequentially or in pairs
104
+ - Summarize subagent results before spawning the next batch
105
+ - Prefer returning concise structured data (JSON, tables) over prose
106
+ - Each subagent task should be self-contained with minimal context
107
+
108
+ ### Moderate Compaction (65k-128k)
109
+
110
+ - Batch subagents in groups of 2-3
111
+ - Wait for each batch to complete before starting the next
112
+ - Keep subagent output focused — specify word/token limits in the task description
113
+ - Summarize intermediate results when aggregating across batches
114
+
115
+ ### Standard Operation (129k-256k)
116
+
117
+ - Parallel fan-out up to 4-8 subagents
118
+ - Normal output expectations
119
+ - Standard context management
120
+
121
+ ### Relaxed/Normal (>256k)
122
+
123
+ - Full parallel fan-out as task decomposition dictates
124
+ - No special compaction needed
125
+ - Standard behavior as if directive is unset
126
+
127
+ ## Integration
128
+
129
+ ### With Subagent Scoping Rules
130
+
131
+ This rule extends `@.claude/rules/subagent-scoping.md` Rule 7 (Context Budget Estimation). When `AIWG_CONTEXT_WINDOW` is set, the context budget formula uses the declared value instead of assuming a default window size.
132
+
133
+ ### With Ralph Loops
134
+
135
+ Ralph loops that spawn parallel subagents (e.g., via `rlm-batch` or `parallel-dispatch`) should batch subagent waves according to the context budget table. A Ralph loop on a 100k system should run 2-3 subagents per wave, not 10.
136
+
137
+ ### With Orchestrator Fan-Out
138
+
139
+ Orchestrator patterns that decompose tickets into N subtasks should cap concurrent fan-out to the budget limit. All N subtasks still execute — just in sequential waves rather than all at once.
140
+
141
+ ## Examples
142
+
143
+ ### Example 1: Local GPU System (100k Context)
144
+
145
+ ```markdown
146
+ <!-- In CLAUDE.md team directives -->
147
+ <!-- AIWG_CONTEXT_WINDOW: 100000 -->
148
+ ```
149
+
150
+ Agent receives task requiring 8 parallel subagents:
151
+
152
+ ```
153
+ Context budget: 100k → max_parallel = max(1, floor(100000/50000)) = 2
154
+ Compaction: Moderate
155
+
156
+ Wave 1: Subagents 1, 2 (parallel)
157
+ Wave 2: Subagents 3, 4 (parallel)
158
+ Wave 3: Subagents 5, 6 (parallel)
159
+ Wave 4: Subagents 7, 8 (parallel)
160
+
161
+ Each subagent targets <5k output tokens.
162
+ ```
163
+
164
+ ### Example 2: Cloud System (No Directive)
165
+
166
+ ```markdown
167
+ <!-- No AIWG_CONTEXT_WINDOW set -->
168
+ ```
169
+
170
+ Agent receives task requiring 8 parallel subagents:
171
+
172
+ ```
173
+ No budget constraint. Spawn all 8 in parallel.
174
+ Normal output expectations.
175
+ ```
176
+
177
+ ### Example 3: Small Local Model (32k Context)
178
+
179
+ ```markdown
180
+ <!-- AIWG_CONTEXT_WINDOW: 32000 -->
181
+ ```
182
+
183
+ Agent receives task requiring 5 parallel subagents:
184
+
185
+ ```
186
+ Context budget: 32k → max_parallel = max(1, floor(32000/50000)) = 1
187
+ Compaction: Aggressive — fully sequential
188
+
189
+ Run subagents 1 through 5 sequentially.
190
+ Each subagent targets <3k output tokens.
191
+ Summarize each result before proceeding to next.
192
+ ```
193
+
194
+ ## Platform Applicability
195
+
196
+ This directive works across all AIWG-supported platforms:
197
+
198
+ | Platform | Where to Set |
199
+ |----------|-------------|
200
+ | Claude Code | `CLAUDE.md` team directives |
201
+ | GitHub Copilot | `.github/copilot-instructions.md` |
202
+ | OpenAI Codex | `~/.codex/instructions.md` or `AGENTS.md` |
203
+ | Cursor | `.cursor/rules/` |
204
+ | Warp | `WARP.md` |
205
+ | Factory AI | `.factory/` context |
206
+ | OpenCode | `.opencode/` context |
207
+ | Windsurf | `AGENTS.md` or `.windsurf/rules/` |
208
+
209
+ The `aiwg use` and `aiwg regenerate` commands will include the directive (commented out) in generated context files when scaffolding new projects.
210
+
211
+ ## Checklist
212
+
213
+ Before spawning parallel subagents:
214
+
215
+ - [ ] Check if `AIWG_CONTEXT_WINDOW` is declared in the project context
216
+ - [ ] If set, look up the max parallel count from the table
217
+ - [ ] If parallel count exceeds budget, batch into sequential waves
218
+ - [ ] Adjust subagent output expectations based on budget tier
219
+ - [ ] If unset, proceed with normal parallel behavior
220
+
221
+ ## References
222
+
223
+ - @.claude/rules/subagent-scoping.md - Subagent scoping and delegation rules
224
+ - @.claude/rules/subagent-scoping.md#rule-7 - Context budget estimation
225
+ - @.claude/rules/instruction-comprehension.md - Understanding user constraints
226
+
227
+ ---
228
+
229
+ **Rule Status**: ACTIVE
230
+ **Last Updated**: 2026-02-09