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.
npm install aiwgCognitive architecture for AI-augmented software development
``bash`
npm i -g aiwg # install globally
aiwg use sdlc # deploy SDLC framework




Get Started · Documentation · Examples · Contributing · Community


---
AIWG is a cognitive architecture that provides AI coding assistants with structured memory, ensemble validation, and closed-loop self-correction. Unlike simple prompt libraries or ad-hoc workflows, AIWG implements research-backed patterns for multi-agent coordination, reproducible execution, and FAIR-aligned artifact management. The system addresses fundamental challenges in AI-augmented development: recovery from failures, maintaining context across sessions, preventing hallucinated citations, and ensuring workflow reproducibility. These capabilities position AIWG closer to cognitive architectures like SOAR and ACT-R, adapted for large language model orchestration, than to conventional AI development tools.
---
Turn unpredictable AI assistance into reliable, auditable workflows. Research shows 47% of AI workflows produce inconsistent results without reproducibility constraints. AIWG implements closed-loop self-correction, human-in-the-loop validation (reducing costs by 84%), and retrieval-first citation architecture (eliminating the 56% hallucination rate of generation-only approaches). The .aiwg/ artifact directory provides persistent memory across sessions, ensuring context isn't lost when your AI assistant restarts.
Standards-aligned implementation of multi-agent systems and reproducibility frameworks. AIWG operationalizes FAIR Principles (endorsed by G20, EU, NIH), implements OAIS-inspired archival lifecycles (ISO 14721), and uses W3C PROV for provenance tracking. The framework provides a testbed for studying human-AI collaboration patterns, ensemble validation effectiveness, and cognitive load optimization in AI-augmented workflows. All artifacts are structured for analysis and citation export.
Risk reduction through governance-ready AI workflows. AIWG provides audit trails (W3C PROV provenance chains), quality gates (GRADE-style evidence assessment), and deterministic execution modes. The system implements stage-gate processes familiar from Cooper's methodology, ensuring predictable phase transitions and milestone tracking. Standards adopted by 100+ organizations (WHO, Cochrane, NICE) back the quality assessment approach. Human validation checkpoints ensure AI outputs meet enterprise quality standards before production deployment.
---
AIWG's architecture is informed by established research across cognitive science, software engineering, and AI systems. The cognitive load optimization follows Miller's "7±2" limits and Sweller's worked examples approach. Multi-agent ensemble validation implements mixture-of-experts patterns from Jacobs et al. The closed-loop self-correction design addresses the finding that recovery capability—not initial correctness—dominates agentic task success. Research management implements FAIR Principles with 17,000+ citations and institutional backing from G20, EU Horizon 2020, and NIH. The retrieval-first citation architecture eliminates hallucination by grounding all references in verified sources rather than generative recall.
Full research background, citations, and methodology available in docs/research/.
---
Persistent artifact repository (.aiwg/) maintaining project knowledge across sessions. Implements retrieval-augmented generation patterns to prevent context loss when AI assistants restart or hit token limits.
Specialized agents (Test Engineer, Security Auditor, API Designer) provide domain expertise with coordinated review and synthesis. Mixture-of-experts architecture enables parallel evaluation and quality gates.
Ralph loop implements iterative execution with automatic error recovery. Research shows recovery capability is more important than initial correctness for agentic task success. Supports both short sessions (minutes) and long-running operations (6-8 hours with crash recovery).
@-mention system links requirements, architecture, implementation, and tests. Enables impact analysis, compliance auditing, and change propagation tracking per IEEE 830 and DO-178C standards.
Phase-gated workflows (Inception → Elaboration → Construction → Transition → Production) with milestone tracking and quality checkpoints. Implements Cooper's stage-gate methodology adapted for AI-augmented development.
Research corpus management with persistent identifiers (REF-XXX system), W3C PROV provenance tracking, and GRADE-style quality assessment. Ensures findable, accessible, interoperable, and reusable project artifacts.
---
> Prerequisites: Node.js ≥18.0.0 and an AI platform (Claude Code, GitHub Copilot, Warp Terminal, or others). See Prerequisites Guide for details.
`bashInstall globally
npm install -g aiwg
$3
`bash
/plugin marketplace add jmagly/ai-writing-guide
/plugin install sdlc@aiwg
`> Platform options:
--provider warp, --provider factory, --provider cursor, --provider copilot. See Platform Integration for details.---
✨ What You Get
$3
| Framework | What it does |
|-----------|--------------|
| SDLC Complete | Full software development lifecycle with agents, commands, templates, and multi-agent orchestration |
| Media/Marketing Kit | Complete marketing campaign management from strategy to analytics |
$3
| Addon | What it does |
|-------|--------------|
| Writing Quality | Content validation, AI pattern detection, voice profiles |
| Testing Quality | TDD enforcement, mutation testing, flaky test detection |
| Voice Framework | 4 built-in voice profiles with create/blend/apply skills |
$3
- Ralph Loop — Iterative task execution with automatic recovery
- Agent Design Bible — 10 Golden Rules based on academic research
- @-Mention Traceability — Wire live doc references in code
- Production-Grade Guide — Research-backed failure mode mitigations
---
🎬 See It In Action
`bash
Generate project intake
/intake-wizard "Build customer portal with real-time chat"Phase transition with automated gate check
/flow-inception-to-elaborationIterative task execution - "iteration beats perfection"
/ralph "Fix all failing tests" --completion "npm test passes"Long-running tasks with crash recovery (6-8 hours)
/ralph-external "Migrate to TypeScript" --completion "npx tsc --noEmit exits 0"Deploy to production
/flow-deploy-to-production
`Voice transformation:
`bash
"Apply technical-authority voice to docs/architecture.md"
"Create a voice profile based on our existing blog posts"
`See Examples for before/after rewrites and workflow demonstrations.
---
🛠️ Platform Support
| Platform | Status | Command |
|----------|--------|---------|
| Claude Code | ✅ Tested |
aiwg use sdlc (default) |
| GitHub Copilot | ✅ Tested | aiwg use sdlc --provider copilot |
| Warp Terminal | ✅ Tested | aiwg use sdlc --provider warp |
| Factory AI | ✅ Tested | aiwg use sdlc --provider factory |
| Cursor | ✅ Tested | aiwg use sdlc --provider cursor |
| OpenCode | ✅ Tested | aiwg use sdlc --provider opencode |
| OpenAI/Codex | ✅ Tested | aiwg use sdlc --provider openai |
| Windsurf | 🟡 Experimental | aiwg use sdlc --provider windsurf |See Platform Integration Guides for setup instructions.
---
📚 Documentation
$3
- Quick Start Guide — Context selection and basic usage
- Prerequisites — Node.js, AI platforms, OS support
- CLI Reference — All 40
aiwg commands with examples$3
Practitioners:
- Quick Start Guide — Hands-on workflows
- Ralph Loop Guide — Iterative execution
- Platform Guides — 5-10 minute setup
Technical Leaders:
- Extension System Overview — Architecture and capabilities
- Workspace Architecture — Multi-framework isolation
- Multi-Agent Orchestration — Ensemble patterns
Researchers & Evaluators:
- Research Background — Literature review and citations
- Glossary — Professional terminology mapping
- Production-Grade Guide — Failure mode mitigation
$3
- Claude Code — 5-10 min setup
- Warp Terminal — 3-5 min setup
- Factory AI — 5-10 min setup
- Cursor — 5-10 min setup
- All Integrations
$3
- SDLC Framework — Agents, commands, templates, flows
- Marketing Kit — Campaign lifecycle guide
- Voice Framework — Voice profiles and skills
$3
AIWG's unified extension system enables dynamic discovery, semantic search, and cross-platform deployment:
- Extension System Overview — Architecture and capabilities
- Creating Extensions — Build custom agents, commands, skills
- Extension Types Reference — Complete type definitions
Extension types:
- Agents (35+): Specialized AI personas (API Designer, Test Engineer, Security Auditor)
- Commands (31): CLI and slash commands (
aiwg use sdlc, /mention-wire)
- Skills: Natural language workflows (project awareness, voice application)
- Hooks: Lifecycle event handlers (pre-session, post-write)
- Tools: External utilities (git, jq, npm)
- Frameworks: Complete workflows (SDLC, Marketing)
- Addons: Feature bundles (Voice, Testing Quality)$3
- Ralph Loop — Iterative task execution with crash recovery
- Workspace Architecture — Multi-framework isolation
- Multi-Agent Orchestration — Parallel reviews and synthesis
- MCP Server — Model Context Protocol integration
- Agent Design Bible — Best practices for agent creation
---
🤝 Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Quick contributions:
- Found an AI pattern? Open an issue
- Have a better rewrite? Submit a PR to
examples/
- Want to add an agent? Use docs/development/agent-template.md`---
- 🌐 Website: aiwg.io
- 💬 Discord: Join Server
- 📱 Telegram: Join Group
- 🐛 Issues: GitHub Issues
- 💡 Discussions: GitHub Discussions
---
AIWG is optimized for token efficiency. Most users on Claude Pro or similar plans will have no issues. See Usage Notes for rate limit guidance.
---
MIT License — Free to use, modify, and distribute. See LICENSE.
Important: This framework does not provide legal, security, or financial advice. All generated content should be reviewed before use. See TERMS.md for full disclaimers.
---
$3The Temporal Layer for Web3 Enterprise-grade timing infrastructure for blockchain applications. | $3No-Code Smart Contracts for Everyone Making blockchain-based agreements accessible to all. | $3AI-Powered Automation Solutions Custom AI and blockchain solutions for the digital age. |
Interested in sponsoring? Contact us
---
Research foundations: Built on established principles from cognitive science (Miller 1956, Sweller 1988), multi-agent systems (Jacobs et al. 1991), software engineering (Cooper 1990), and recent AI systems research. Implements standards from FAIR Principles, OASIS archival model (ISO 14721), W3C PROV, GRADE evidence assessment, and MCP protocol (Linux Foundation).
Inspiration: Hemingway Editor's clarity-first approach, RUP/ITIL/Agile methodologies, and Skill Seekers (MIT).
Platforms: Thanks to Anthropic (Claude Code), Warp, and Factory AI for building the platforms that enable this work.
---
Made with ☕ and 🤖 by Joseph Magly