aiwg
Version:
Cognitive architecture for AI-augmented software development with structured memory, ensemble validation, and closed-loop correction. FAIR-aligned artifacts, 84% cost reduction via human-in-the-loop, standards adopted by 100+ organizations.
148 lines (107 loc) • 5.66 kB
Markdown
# v2026.2.5 - "Lean Rules" Release
**Released**: February 14, 2026
This release replaces the deployment of 31 individual rule files (~9,321 lines total) with a single consolidated `RULES-INDEX.md` (~200 lines), achieving ~95% context reduction across all 8 providers. Agents scan short summaries and load full rules on demand via @-links, keeping context windows lean without sacrificing discoverability.
## Highlights
| What Changed | Why You Care |
|--------------|--------------|
| **Consolidated rules deployment** | Single `RULES-INDEX.md` replaces 31 individual files — ~95% context reduction |
| **Automatic cleanup** | Old individually-deployed rule files removed on redeploy |
| **All 8 providers** | Claude, Codex, Factory, Copilot, Cursor, OpenCode, Warp, Windsurf all updated |
## The Problem
Every `aiwg use sdlc` deployment copied 31 individual rule `.md` files into the target rules directory. That's ~9,321 lines of content loaded into agent context on every session — most of which was irrelevant to the current task. Context windows aren't infinite, and every wasted line of rules context is a line that can't be used for actual work.
## The Solution: Index-Based Rules
Instead of deploying all 31 full rule files, AIWG now deploys a single `RULES-INDEX.md` containing:
- **2-3 sentence summaries** per rule — enough to determine relevance
- **@-links** to full rule files — load the details only when needed
- **Tier grouping** — Core (9 rules), SDLC (20 rules), Research (2 rules)
- **Enforcement ordering** — CRITICAL > HIGH > MEDIUM within each tier
- **Quick Reference table** — maps 11 task types to relevant rules
### Before/After
```
# Before: 31 files, ~9,321 lines
.claude/rules/
├── no-attribution.md
├── token-security.md
├── versioning.md
├── citation-policy.md
├── anti-laziness.md
├── executable-feedback.md
├── failure-mitigation.md
├── ... (24 more files)
# After: 1 file, ~200 lines
.claude/rules/
└── RULES-INDEX.md
```
### How It Works
1. Agent starts a session and loads `RULES-INDEX.md` (~200 lines)
2. Agent scans summaries to find rules relevant to the current task
3. When a rule is relevant, agent loads the full rule via its @-link
4. Only the rules that matter consume context window space
### Example Index Entry
```markdown
#### no-attribution
**Summary**: AI tools are tools — never add attribution to commits, PRs, docs, or code.
No "Co-Authored-By", no "Generated with", no tool branding. Universal across all 8 providers.
**When to apply**: Commit creation, PR drafting, code generation, documentation output
**Full rule**: @agentic/code/frameworks/sdlc-complete/rules/no-attribution.md
```
## Automatic Cleanup
When redeploying with `aiwg use sdlc`, old individually-deployed `.md` rule files in the target directory are automatically cleaned up before the new index is deployed. Non-`.md` files (like Cursor's `.mdc` rules) are preserved.
This means upgrading from v2026.2.4 to v2026.2.5 is seamless — just run `aiwg use sdlc` again.
## All 8 Providers Updated
Every provider deploys the consolidated index to its native rules location:
| Platform | Target |
|----------|--------|
| Claude Code | `.claude/rules/RULES-INDEX.md` |
| Codex (OpenAI) | `.codex/rules/RULES-INDEX.md` |
| Factory AI | `.factory/rules/RULES-INDEX.md` |
| GitHub Copilot | `.github/copilot-instructions.md` (content injection) |
| Cursor | `.cursor/rules/RULES-INDEX.md` |
| OpenCode | `.opencode/rule/RULES-INDEX.md` |
| Warp Terminal | `.warp/rules/RULES-INDEX.md` |
| Windsurf | `.windsurf/rules/RULES-INDEX.md` |
## Fallback Behavior
If `RULES-INDEX.md` is not found in the source (e.g., when deploying from an older AIWG version), all providers fall back to deploying individual rule files. No breakage for existing setups.
## Manifest v2.0.0
The rules manifest (`manifest.json`) has been bumped to v2.0.0 with new consolidation metadata:
```json
{
"consolidation": {
"strategy": "index-with-links",
"indexFile": "RULES-INDEX.md",
"deployIndexOnly": true,
"rationale": "Deploy ~200-line index instead of ~9,321-line bulk to reduce context waste by ~95%"
}
}
```
## New Functions in base.mjs
Six new shared functions support the consolidation across all providers:
| Function | Purpose |
|----------|---------|
| `loadRulesManifest(srcRoot)` | Load and parse rules manifest.json |
| `groupRulesByTier(rules)` | Group rules into core/sdlc/research |
| `groupByEnforcement(rules)` | Group rules by critical/high/medium |
| `getRulesIndexPath(srcRoot)` | Get path to RULES-INDEX.md (or null) |
| `generateConsolidatedRulesContent(srcRoot, provider, addonRuleFiles)` | Generate full index content with optional addon rules |
| `cleanupOldRuleFiles(rulesDir, opts)` | Remove old individual .md files, preserving RULES-INDEX.md |
## Testing
- 31 new unit tests covering all consolidation functions
- 7 new integration tests validating deployment and cleanup behavior
- All 76 tests passing (31 unit + 45 integration)
## Migration
```bash
# Just redeploy — old files cleaned up automatically
aiwg use sdlc
# Or for a specific provider
aiwg use sdlc --provider cursor
```
No manual cleanup needed. The deployment handles everything.
## Install
```bash
npm install -g aiwg@2026.2.5
```
## Links
- **Changelog**: [CHANGELOG.md](../../CHANGELOG.md)
- **Issues**: #334 (parent), #335-#341 (implementation)
- **Rules Index**: [RULES-INDEX.md](../../agentic/code/frameworks/sdlc-complete/rules/RULES-INDEX.md)
- **Rules README**: [rules/README.md](../../agentic/code/frameworks/sdlc-complete/rules/README.md)