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.
- package/CLAUDE.md +18 -6
- package/README.md +5 -5
- package/USAGE_GUIDE.md +1 -1
- package/agentic/code/addons/aiwg-evals/manifest.json +1 -1
- package/agentic/code/addons/aiwg-hooks/manifest.json +1 -1
- package/agentic/code/addons/aiwg-utils/agents/aiwg-developer.md +1 -1
- package/agentic/code/addons/aiwg-utils/commands/aiwg-regenerate-agents.md +1 -1
- package/agentic/code/addons/aiwg-utils/commands/commit-and-push.md +1 -1
- package/agentic/code/addons/aiwg-utils/commands/roko-voice.md +1 -1
- package/agentic/code/addons/aiwg-utils/commands/summarize-transcript.md +1 -1
- package/agentic/code/addons/aiwg-utils/commands/workspace-reset.md +1 -1
- package/agentic/code/addons/aiwg-utils/manifest.json +1 -1
- package/agentic/code/addons/aiwg-utils/rules/agent-deployment.md +1 -1
- package/agentic/code/addons/aiwg-utils/rules/context-budget.md +230 -0
- package/agentic/code/addons/aiwg-utils/rules/subagent-scoping.md +508 -0
- package/agentic/code/addons/auto-memory/seeds/MEMORY.md +1 -1
- package/agentic/code/addons/droid-bridge/manifest.json +1 -1
- package/agentic/code/addons/ralph/docs/troubleshooting.md +1 -1
- package/agentic/code/addons/ralph/manifest.json +1 -1
- package/agentic/code/addons/rlm/README.md +1 -1
- package/agentic/code/addons/rlm/docs/deployment-guide.md +1 -1
- package/agentic/code/addons/rlm/manifest.json +1 -1
- package/agentic/code/addons/security/README.md +1 -1
- package/agentic/code/addons/star-prompt/README.md +6 -6
- package/agentic/code/addons/star-prompt/manifest.json +1 -1
- package/agentic/code/addons/star-prompt/skills/star-prompt.md +7 -7
- package/agentic/code/addons/voice-framework/manifest.json +1 -1
- package/agentic/code/addons/voice-framework/schemas/voice-profile.schema.json +1 -1
- package/agentic/code/addons/writing-quality/README.md +1 -1
- package/agentic/code/addons/writing-quality/agents/content-diversifier.md +2 -2
- package/agentic/code/addons/writing-quality/agents/prompt-optimizer.md +1 -1
- package/agentic/code/addons/writing-quality/agents/writing-validator.md +2 -2
- package/agentic/code/addons/writing-quality/examples/traceability-demo.ts +1 -1
- package/agentic/code/addons/writing-quality/manifest.json +1 -1
- package/agentic/code/frameworks/media-marketing-kit/README.md +6 -6
- package/agentic/code/frameworks/media-marketing-kit/commands/intake-from-campaign.md +5 -5
- package/agentic/code/frameworks/media-marketing-kit/commands/intake-start-campaign.md +5 -5
- package/agentic/code/frameworks/media-marketing-kit/config/models.json +1 -1
- package/agentic/code/frameworks/media-marketing-kit/project-claude-template.md +3 -3
- package/agentic/code/frameworks/research-complete/README.md +2 -2
- package/agentic/code/frameworks/research-complete/commands/research-archive.md +1 -1
- package/agentic/code/frameworks/sdlc-complete/README.md +2 -2
- package/agentic/code/frameworks/sdlc-complete/agents/factory-compat.md +3 -3
- package/agentic/code/frameworks/sdlc-complete/agents/windsurf-compat.md +4 -4
- package/agentic/code/frameworks/sdlc-complete/commands/address-issues.md +324 -0
- package/agentic/code/frameworks/sdlc-complete/commands/aiwg-kb.md +1 -1
- package/agentic/code/frameworks/sdlc-complete/commands/aiwg-setup-project.md +1 -1
- package/agentic/code/frameworks/sdlc-complete/commands/aiwg-setup-warp.md +3 -3
- package/agentic/code/frameworks/sdlc-complete/commands/aiwg-update-claude.md +6 -6
- package/agentic/code/frameworks/sdlc-complete/commands/aiwg-update-warp.md +7 -7
- package/agentic/code/frameworks/sdlc-complete/commands/intake-from-codebase.md +5 -5
- package/agentic/code/frameworks/sdlc-complete/commands/intake-start.md +5 -5
- package/agentic/code/frameworks/sdlc-complete/commands/intake-wizard.md +5 -5
- package/agentic/code/frameworks/sdlc-complete/commands/issue-create.md +2 -2
- package/agentic/code/frameworks/sdlc-complete/commands/issue-list.md +1 -1
- package/agentic/code/frameworks/sdlc-complete/commands/issue-update.md +1 -1
- package/agentic/code/frameworks/sdlc-complete/config/models-v2.json +2 -2
- package/agentic/code/frameworks/sdlc-complete/config/models.json +1 -1
- package/agentic/code/frameworks/sdlc-complete/rules/README.md +48 -11
- package/agentic/code/frameworks/sdlc-complete/rules/RULES-INDEX.md +213 -0
- package/agentic/code/frameworks/sdlc-complete/rules/manifest.json +21 -9
- package/agentic/code/frameworks/sdlc-complete/schemas/flows/fair-extensions.yaml +1 -1
- package/agentic/code/frameworks/sdlc-complete/schemas/flows/mcp-extensions.yaml +1 -1
- package/agentic/code/frameworks/sdlc-complete/schemas/mcp/discovery.yaml +2 -2
- package/agentic/code/frameworks/sdlc-complete/skills/issue-driven-ralph/SKILL.md +186 -0
- package/agentic/code/frameworks/sdlc-complete/templates/aiwg-readme-template.md +3 -3
- package/agentic/code/frameworks/sdlc-complete/templates/codex/AGENTS.md.aiwg-template +2 -2
- package/agentic/code/frameworks/sdlc-complete/templates/configuration/aiwg-config-template.md +2 -2
- package/agentic/code/frameworks/sdlc-complete/templates/copilot/copilot-instructions.md.aiwg-template +1 -1
- package/agentic/code/frameworks/sdlc-complete/templates/cursor/AGENTS.md.aiwg-template +2 -2
- package/agentic/code/frameworks/sdlc-complete/templates/factory/AGENTS.md.aiwg-template +1 -1
- package/agentic/code/frameworks/sdlc-complete/templates/opencode/AGENTS.md.aiwg-template +1 -1
- package/agentic/code/frameworks/sdlc-complete/templates/opencode/instructions.md.aiwg-template +1 -1
- package/agentic/code/frameworks/sdlc-complete/templates/project/CLAUDE.md +6 -6
- package/agentic/code/frameworks/sdlc-complete/templates/warp/WARP.md.aiwg-base +6 -6
- package/docs/CLI_USAGE.md +1 -1
- package/docs/_manifest.json +1 -1
- package/docs/cli-reference.md +1 -1
- package/docs/commands/development-commands-examples.md +1 -1
- package/docs/config.json +2 -2
- package/docs/contributing/contributor-quickstart.md +11 -11
- package/docs/contributing/maintainer-review-guide.md +1 -1
- package/docs/contributing/testing-requirements.md +1 -1
- package/docs/development/devkit-overview.md +1 -1
- package/docs/extensions/creating-extensions.md +1 -1
- package/docs/integrations/warp-terminal.md +5 -5
- package/docs/integrations/windsurf-quickstart.md +1 -1
- package/docs/migration/multi-loop-migration.md +1 -1
- package/docs/overrides/index.html +1 -1
- package/docs/overrides/terminal.js +2 -2
- package/docs/overview/executive-brief.md +2 -2
- package/docs/plugin-marketplace-guide.md +6 -6
- package/docs/ralph-epic-26-architecture.md +1 -1
- package/docs/ralph-epic-26-best-practices.md +1 -1
- package/docs/ralph-epic-26-troubleshooting.md +1 -1
- package/docs/references/REF-001-production-grade-agentic-workflows.md +2 -2
- package/docs/references/REF-019-toolformer-self-taught-tools.md +1 -1
- package/docs/releases/v0.9.1-announcement.md +4 -4
- package/docs/releases/v2024.12.1-announcement.md +1 -1
- package/docs/releases/v2024.12.2-announcement.md +1 -1
- package/docs/releases/v2024.12.3-announcement.md +1 -1
- package/docs/releases/v2024.12.4-announcement.md +1 -1
- package/docs/releases/v2024.12.5-announcement.md +1 -1
- package/docs/releases/v2026.01.3-announcement.md +1 -1
- package/docs/releases/v2026.2.4-announcement.md +123 -0
- package/docs/releases/v2026.2.5-announcement.md +147 -0
- package/docs/research/failure-mode-mitigation.md +1 -1
- package/docs/research/research-background.md +1 -1
- package/docs/simple-language-translations.md +19 -0
- package/docs/sponsors.md +1 -1
- package/docs/troubleshooting/index.md +1 -1
- package/docs/welcome.html +7 -7
- package/man/aiwg.1 +2 -2
- package/package.json +3 -3
- package/plugins/hooks/.claude-plugin/plugin.json +1 -1
- package/plugins/marketing/.claude-plugin/plugin.json +1 -1
- package/plugins/marketing/commands/intake-from-campaign.md +5 -5
- package/plugins/marketing/commands/intake-start-campaign.md +5 -5
- package/plugins/sdlc/.claude-plugin/plugin.json +1 -1
- package/plugins/sdlc/agents/factory-compat.md +3 -3
- package/plugins/sdlc/agents/windsurf-compat.md +4 -4
- package/plugins/sdlc/commands/aiwg-kb.md +1 -1
- package/plugins/sdlc/commands/aiwg-setup-project.md +1 -1
- package/plugins/sdlc/commands/aiwg-setup-warp.md +3 -3
- package/plugins/sdlc/commands/aiwg-update-claude.md +6 -6
- package/plugins/sdlc/commands/aiwg-update-warp.md +7 -7
- package/plugins/sdlc/commands/intake-from-codebase.md +5 -5
- package/plugins/sdlc/commands/intake-start.md +5 -5
- package/plugins/sdlc/commands/intake-wizard.md +5 -5
- package/plugins/sdlc/commands/issue-create.md +2 -2
- package/plugins/sdlc/commands/issue-list.md +1 -1
- package/plugins/sdlc/commands/issue-update.md +1 -1
- package/plugins/utils/.claude-plugin/plugin.json +1 -1
- package/plugins/utils/agents/aiwg-developer.md +1 -1
- package/plugins/utils/commands/aiwg-regenerate-agents.md +1 -1
- package/plugins/utils/commands/commit-and-push.md +1 -1
- package/plugins/utils/commands/roko-voice.md +1 -1
- package/plugins/utils/commands/summarize-transcript.md +1 -1
- package/plugins/utils/commands/workspace-reset.md +1 -1
- package/plugins/voice/.claude-plugin/plugin.json +1 -1
- package/plugins/writing/.claude-plugin/plugin.json +1 -1
- package/plugins/writing/README.md +2 -2
- package/plugins/writing/agents/content-diversifier.md +2 -2
- package/plugins/writing/agents/prompt-optimizer.md +1 -1
- package/plugins/writing/agents/writing-validator.md +2 -2
- package/src/channel/manager.mjs +1 -1
- package/src/cli/handlers/help.ts +1 -1
- package/src/cli/help-generator.ts +1 -1
- package/src/extensions/types.ts +2 -2
- package/src/hooks/laziness-detection.ts +4 -4
- package/src/mcp/cli.mjs +1 -1
- package/src/plugin/plugin-status.ts +1 -1
- package/src/plugin/workspace-creator.ts +1 -1
- package/src/smiths/commandsmith/README.md +2 -2
- package/src/writing/example-generator.ts +2 -2
- package/src/writing/prompt-optimizer.ts +3 -3
- package/src/writing/prompt-templates.ts +1 -1
- package/src/writing/validation-engine.ts +2 -2
- package/src/writing/validation-rules.ts +3 -3
- package/tools/agents/deploy-windsurf.mjs +2 -2
- package/tools/agents/providers/base.mjs +129 -0
- package/tools/agents/providers/claude.mjs +16 -5
- package/tools/agents/providers/codex.mjs +14 -4
- package/tools/agents/providers/copilot.mjs +13 -3
- package/tools/agents/providers/cursor.mjs +23 -8
- package/tools/agents/providers/factory.mjs +15 -3
- package/tools/agents/providers/opencode.mjs +15 -3
- package/tools/agents/providers/warp.mjs +14 -4
- package/tools/agents/providers/windsurf.mjs +15 -5
- package/tools/cli/README.md +2 -2
- package/tools/cli/diversify-content.mjs +1 -1
- package/tools/cli/optimize-prompt.mjs +1 -1
- package/tools/cli/status-command.mjs +3 -3
- package/tools/cli/test-status-display.mjs +1 -1
- package/tools/cli/workspace-migrate.mjs +3 -3
- package/tools/cli/workspace-reset.mjs +1 -1
- package/tools/cli/workspace-rollback.mjs +2 -2
- package/tools/cli/workspace-status.mjs +3 -3
- package/tools/install/README.md +1 -1
- package/tools/install/install.sh +2 -2
- package/tools/install/new-project.mjs +2 -2
- package/tools/plugin/package-plugins.mjs +2 -2
- package/tools/ralph/ralph-cli-multiloop.mjs +1 -1
- package/tools/ralph/ralph-cli.mjs +1 -1
- package/tools/warp/README.md +2 -2
- package/tools/warp/setup-warp.mjs +3 -3
- package/tools/workspace/inject-metadata.mjs +1 -1
package/CLAUDE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
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
|
-
|
|
308
|
-
|
|
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/
|
|
339
|
-
- **Issues**: https://github.com/jmagly/
|
|
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
|
-
**
|
|
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
|
[](https://www.npmjs.com/package/aiwg)
|
|
13
13
|
[](https://www.npmjs.com/package/aiwg)
|
|
14
14
|
[](LICENSE)
|
|
15
|
-
[](https://github.com/jmagly/
|
|
15
|
+
[](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/
|
|
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/
|
|
280
|
-
- 💡 **Discussions:** [GitHub Discussions](https://github.com/jmagly/
|
|
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/
|
|
332
|
+
**Interested in sponsoring?** [Contact us](https://github.com/jmagly/aiwg/discussions)
|
|
333
333
|
|
|
334
334
|
---
|
|
335
335
|
|
package/USAGE_GUIDE.md
CHANGED
|
@@ -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
|
|
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
|
|
118
|
+
This project uses the AIWG SDLC framework for software development workflows.
|
|
119
119
|
|
|
120
120
|
### Available Agents
|
|
121
121
|
|
|
@@ -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
|
|
204
|
+
This directory contains SDLC artifacts managed by the AIWG framework.
|
|
205
205
|
|
|
206
206
|
## Structure
|
|
207
207
|
|
|
@@ -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
|
|
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
|