aiwg 2026.1.3 → 2026.1.4

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 CHANGED
@@ -157,3 +157,40 @@ npm exec markdownlint-cli2 "**/*.md"
157
157
 
158
158
  <!-- TEAM DIRECTIVES: Add project-specific guidance below this line -->
159
159
 
160
+ ## Release Documentation Requirements
161
+
162
+ **CRITICAL**: Every release MUST be documented in ALL of these locations:
163
+
164
+ | Location | Purpose | Format |
165
+ |----------|---------|--------|
166
+ | `CHANGELOG.md` | Technical changelog | Keep a Changelog format with highlights table |
167
+ | `docs/releases/vX.X.X-announcement.md` | Release announcement | Full feature documentation with examples |
168
+ | `package.json` | Version bump | CalVer: `YYYY.MM.PATCH` |
169
+ | GitHub Release | Public release notes | Condensed highlights + install instructions |
170
+ | Gitea Release | Internal release notes | Same as GitHub |
171
+
172
+ ### Release Checklist
173
+
174
+ Before pushing a version tag:
175
+
176
+ 1. **Update `package.json`** - Bump version following CalVer
177
+ 2. **Update `CHANGELOG.md`** - Add new version section with:
178
+ - Highlights table (What changed | Why you care)
179
+ - Detailed Added/Changed/Fixed sections
180
+ - Link to previous version
181
+ 3. **Create `docs/releases/vX.X.X-announcement.md`** - Full release document with:
182
+ - Feature highlights
183
+ - Code examples
184
+ - Migration notes (if applicable)
185
+ - Links to relevant documentation
186
+ 4. **Commit and tag** - `git tag -m "vX.X.X" vX.X.X`
187
+ 5. **Push to both remotes** - `git push origin main --tags && git push github main --tags`
188
+ 6. **Update GitHub Release** - Add proper release notes via `gh release edit`
189
+ 7. **Create Gitea Release** - Via MCP tool or web UI
190
+
191
+ ### Version Format
192
+
193
+ - **CalVer**: `YYYY.MM.PATCH` (e.g., `2026.01.3`)
194
+ - PATCH resets each month
195
+ - Tag format: `vYYYY.MM.PATCH` (e.g., `v2026.01.3`)
196
+
@@ -143,11 +143,28 @@ See `docs/examples/` for detailed walkthroughs:
143
143
 
144
144
  Ralph inverts traditional AI optimization from "unpredictable success" to "predictable failure with automatic recovery."
145
145
 
146
+ ## Important: When to Use Ralph
147
+
148
+ **Ralph is a power tool.** Used correctly, it delivers overnight. Used incorrectly, it burns tokens producing junk.
149
+
150
+ | Situation | Use Ralph? | Instead |
151
+ |-----------|------------|---------|
152
+ | Greenfield with no docs | **NO** | Use AIWG intake/flows first |
153
+ | Vague requirements | **NO** | Write use cases first |
154
+ | Clear spec, need implementation | **YES** | - |
155
+ | Tests failing, need fixes | **YES** | - |
156
+ | Migration with clear rules | **YES** | - |
157
+
158
+ **The key insight**: Ralph excels at HOW to build, but thrashes on WHAT to build. Define your requirements first, then let Ralph implement.
159
+
160
+ See [When to Use Ralph](docs/when-to-use-ralph.md) for detailed guidance on avoiding the token-burning trap.
161
+
146
162
  ## Related
147
163
 
148
- - [Quickstart Guide](docs/quickstart.md)
149
- - [Best Practices](docs/best-practices.md)
150
- - [Troubleshooting](docs/troubleshooting.md)
164
+ - [When to Use Ralph](docs/when-to-use-ralph.md) - **Start here** - Understanding Ralph's sweet spot
165
+ - [Quickstart Guide](docs/quickstart.md) - Getting started
166
+ - [Best Practices](docs/best-practices.md) - Writing effective tasks
167
+ - [Troubleshooting](docs/troubleshooting.md) - Common issues
151
168
 
152
169
  ## Credits
153
170
 
@@ -2,6 +2,23 @@
2
2
 
3
3
  Get started with iterative AI task execution in 5 minutes.
4
4
 
5
+ ## Before You Start: Is Ralph Right for This Task?
6
+
7
+ **Ralph is a power tool.** Before invoking it, ask yourself:
8
+
9
+ | Question | If NO |
10
+ |----------|-------|
11
+ | Is my task well-defined with clear requirements? | Document requirements first |
12
+ | Can I write a command that verifies success? | Ralph can't help with subjective goals |
13
+ | Do I have tests/linting to validate correctness? | Add verification first |
14
+ | Is this implementation work, not exploration? | Use Discovery Track for research |
15
+
16
+ **The token-burning trap**: Ralph excels at HOW to implement but thrashes on WHAT to build. If you don't have clear requirements, Ralph will hallucinate features, contradict itself, and burn tokens producing junk.
17
+
18
+ **Safe to proceed?** Read on. **Unsure?** See [When to Use Ralph](when-to-use-ralph.md) first.
19
+
20
+ ---
21
+
5
22
  ## What is Ralph?
6
23
 
7
24
  Ralph (from the "Ralph Wiggum methodology") executes AI tasks in a loop until completion criteria are met:
@@ -183,6 +200,7 @@ Ralph stores state and reports in `.aiwg/ralph/`:
183
200
 
184
201
  ## Next Steps
185
202
 
203
+ - Read [When to Use Ralph](when-to-use-ralph.md) to understand Ralph's sweet spot
186
204
  - Read [Best Practices](best-practices.md) for effective prompt engineering
187
205
  - See [Examples](examples/) for common patterns
188
206
  - Check [Troubleshooting](troubleshooting.md) if you get stuck
@@ -0,0 +1,348 @@
1
+ # When to Use Ralph (And When Not To)
2
+
3
+ Understanding Ralph's sweet spot and avoiding the token-burning trap.
4
+
5
+ ## The Controversy
6
+
7
+ Ralph divides people. Some swear by it. Others have war stories about it running all night, burning tokens, producing junk. Both are right - Ralph is a power tool, and like any power tool, it can build or destroy depending on how you use it.
8
+
9
+ **The truth**: Ralph's effectiveness is directly proportional to how well-defined your project is before you invoke it.
10
+
11
+ ## The Two Extremes
12
+
13
+ ### The Disaster Case: Greenfield + Vague Directive
14
+
15
+ ```bash
16
+ # DON'T DO THIS
17
+ /ralph "make me a baking app" --completion "app works"
18
+ ```
19
+
20
+ What happens:
21
+
22
+ 1. AI has no context about what "baking app" means
23
+ 2. No architecture decisions have been made
24
+ 3. No requirements exist
25
+ 4. AI hallucinates features, changes direction, contradicts itself
26
+ 5. Each iteration builds on shaky foundations
27
+ 6. Thrashing intensifies as hallucinated components conflict
28
+ 7. Token usage explodes
29
+ 8. Result: A mess that barely runs, if at all
30
+
31
+ **Why this fails**: The AI is trying to answer "WHAT to build" while simultaneously trying to figure out "HOW to build it." These are fundamentally different problems. Mixing them creates chaos.
32
+
33
+ ### The Success Case: Documented Project + Implementation Focus
34
+
35
+ ```bash
36
+ # DO THIS
37
+ /ralph "Implement UC-AUTH-001 user login per the architecture doc" \
38
+ --completion "npm test -- auth passes AND npx tsc --noEmit passes"
39
+ ```
40
+
41
+ What happens:
42
+
43
+ 1. UC-AUTH-001 defines exactly what login should do
44
+ 2. Architecture doc specifies technology choices
45
+ 3. AI knows the patterns, conventions, dependencies
46
+ 4. Each iteration focuses purely on implementation details
47
+ 5. Failures are specific: wrong import, missing mock, edge case
48
+ 6. AI learns from specific failures and fixes them
49
+ 7. Convergence to working code is predictable
50
+
51
+ **Why this works**: The "WHAT" is settled. Ralph focuses entirely on "HOW" - the implementation mechanics where iteration genuinely helps.
52
+
53
+ ## The AIWG + Ralph Synergy
54
+
55
+ AIWG was designed with Ralph in mind. The entire SDLC framework exists to create a corpus so complete that an AI can't thrash on what to build - it can only focus on how.
56
+
57
+ ### What AIWG Provides
58
+
59
+ | AIWG Artifact | Eliminates This Uncertainty |
60
+ |---------------|----------------------------|
61
+ | Project Intake | What problem are we solving? |
62
+ | Requirements (UC-*, US-*) | What features do we need? |
63
+ | Software Architecture Doc | What tech stack, patterns, structure? |
64
+ | ADRs | What decisions were made, and why? |
65
+ | NFR modules | What are the quality requirements? |
66
+ | Pseudo-code / interface specs | What's the API shape? |
67
+
68
+ ### The Transformation
69
+
70
+ ```
71
+ Without AIWG:
72
+ ┌─────────────────────────────────────────────────────────┐
73
+ │ Ralph → "What to build?" → Hallucinate → Thrash → $$$ │
74
+ └─────────────────────────────────────────────────────────┘
75
+
76
+ With AIWG:
77
+ ┌─────────────────────────────────────────────────────────┐
78
+ │ AIWG → Defines "What" → Ralph → "How to build" → Done │
79
+ └─────────────────────────────────────────────────────────┘
80
+ ```
81
+
82
+ ### Documentation as Specification
83
+
84
+ By the time you've completed AIWG's Discovery Track:
85
+
86
+ - Every feature is defined in a use case
87
+ - Every decision is recorded in an ADR
88
+ - The architecture is documented with component diagrams
89
+ - Non-functional requirements are explicit
90
+ - Even pseudo-code or interface shapes may exist
91
+
92
+ **The docs are one step away from code.** Ralph's job becomes mechanical: translate this specification into working code, iterate on the implementation details until tests pass.
93
+
94
+ ## When Ralph Excels
95
+
96
+ ### Implementation of Well-Defined Features
97
+
98
+ ```bash
99
+ /ralph "Implement @.aiwg/requirements/UC-PAY-003.md" \
100
+ --completion "npm test -- payment passes"
101
+ ```
102
+
103
+ The use case document tells Ralph exactly what to build. Ralph figures out the implementation.
104
+
105
+ ### Mechanical Transformations
106
+
107
+ ```bash
108
+ /ralph "Convert src/utils/*.js to TypeScript per @.aiwg/architecture/adr-012-typescript.md" \
109
+ --completion "npx tsc --noEmit passes"
110
+ ```
111
+
112
+ The ADR defines the transformation rules. Ralph applies them iteratively.
113
+
114
+ ### Test-Driven Fixes
115
+
116
+ ```bash
117
+ /ralph "Fix all failing tests in src/auth/" \
118
+ --completion "npm test -- auth passes"
119
+ ```
120
+
121
+ Tests define expected behavior. Ralph makes code match expectations.
122
+
123
+ ### Dependency Resolution
124
+
125
+ ```bash
126
+ /ralph "Update to React 19 and fix all breaking changes" \
127
+ --completion "npm test passes AND npm run build succeeds"
128
+ ```
129
+
130
+ Ralph excels at the tedious iteration of finding compatible versions and fixing API changes.
131
+
132
+ ### Code Quality Gates
133
+
134
+ ```bash
135
+ /ralph "Achieve 80% test coverage in src/services/" \
136
+ --completion "coverage report shows src/services >80%"
137
+ ```
138
+
139
+ Clear metric, well-defined scope. Ralph adds tests until the threshold is met.
140
+
141
+ ## When NOT to Use Ralph
142
+
143
+ ### Greenfield Without Documentation
144
+
145
+ If you have no architecture doc, no requirements, no design - **stop**. Don't invoke Ralph. Use the AIWG intake process first.
146
+
147
+ ```bash
148
+ # First: Define what you're building
149
+ /intake-wizard
150
+ /flow-concept-to-inception
151
+ /flow-inception-to-elaboration
152
+
153
+ # Then: Build it
154
+ /ralph "Implement UC-001" --completion "tests pass"
155
+ ```
156
+
157
+ ### Vague or Subjective Goals
158
+
159
+ ```bash
160
+ # BAD - cannot verify, no clear target
161
+ /ralph "make the code better" --completion "code is good"
162
+ /ralph "improve UX" --completion "users are happy"
163
+ /ralph "optimize performance" --completion "app is fast"
164
+ ```
165
+
166
+ If you can't write a command that verifies success, Ralph can't iterate toward it.
167
+
168
+ ### Research or Exploration
169
+
170
+ ```bash
171
+ # BAD - this isn't an implementation task
172
+ /ralph "figure out how authentication should work" --completion "auth design is done"
173
+ ```
174
+
175
+ Use `/flow-discovery-track` or manual exploration for research. Ralph is for implementation.
176
+
177
+ ### Undefined Scope
178
+
179
+ ```bash
180
+ # BAD - how many features is "complete"?
181
+ /ralph "finish the app" --completion "app is complete"
182
+ ```
183
+
184
+ Break this into specific, documented features first.
185
+
186
+ ## Ralph for Documentation (Carefully Scoped)
187
+
188
+ Ralph can help with documentation itself - but only with specific, verifiable scope:
189
+
190
+ ```bash
191
+ # GOOD - specific, verifiable
192
+ /ralph "Generate ADRs for all undocumented technical decisions in src/" \
193
+ --completion ".aiwg/architecture/adr-*.md exists for each major pattern"
194
+
195
+ # GOOD - specific output
196
+ /ralph "Create use cases from the feature list in product-brief.md" \
197
+ --completion "Each feature in product-brief.md has a corresponding .aiwg/requirements/UC-*.md"
198
+ ```
199
+
200
+ ```bash
201
+ # BAD - too vague
202
+ /ralph "document the project" --completion "docs are complete"
203
+ ```
204
+
205
+ ## Warning Signs: Is Ralph Thrashing?
206
+
207
+ Watch for these indicators:
208
+
209
+ | Sign | What It Means |
210
+ |------|---------------|
211
+ | Same error repeating | Structural problem, not implementation detail |
212
+ | Contradictory changes | No clear requirements to guide decisions |
213
+ | Growing file count | Hallucinating features not in scope |
214
+ | Unrelated files changing | Lost context, working on wrong problem |
215
+ | "Refactoring" without tests | No verification, just churning |
216
+
217
+ **If you see these**: Abort Ralph, create documentation, then resume.
218
+
219
+ ```bash
220
+ /ralph-abort
221
+ # Create/update requirements docs
222
+ # Define architecture decisions
223
+ /ralph "Implement [specific, documented feature]" --completion "tests pass"
224
+ ```
225
+
226
+ ## The Ralph Readiness Checklist
227
+
228
+ Before invoking Ralph, ask:
229
+
230
+ - [ ] Is the feature documented in a use case or user story?
231
+ - [ ] Is the architecture defined (or simple enough to be implicit)?
232
+ - [ ] Can I write a command that verifies success?
233
+ - [ ] Is the scope specific enough to complete in <20 iterations?
234
+ - [ ] Are tests available to validate correctness?
235
+
236
+ **If any answer is "no"**: Document first, Ralph second.
237
+
238
+ ## Summary
239
+
240
+ | Situation | Action |
241
+ |-----------|--------|
242
+ | Greenfield, no docs | Use AIWG intake/flows first |
243
+ | Vague requirements | Write use cases first |
244
+ | No architecture | Create SAD/ADRs first |
245
+ | Clear spec, need implementation | **Use Ralph** |
246
+ | Tests failing, need fixes | **Use Ralph** |
247
+ | Migration with clear rules | **Use Ralph** |
248
+ | Coverage gap with clear target | **Use Ralph** |
249
+
250
+ **The formula**: AIWG defines WHAT. Ralph implements HOW. Together they work. Apart, Ralph thrashes.
251
+
252
+ ## Industry Perspectives and Research
253
+
254
+ The debate around iterative AI execution isn't unique to Ralph. Here's what the broader industry has learned.
255
+
256
+ ### The Context Problem
257
+
258
+ [Augment Code's research](https://www.augmentcode.com/learn/agentic-swarm-vs-spec-driven-coding) found that both agentic swarms and specification-driven development fail for the same reason: they assume the hard problem is coordination or planning, not context understanding.
259
+
260
+ > "Context understanding trumps coordination strategy... Perfect coordination doesn't help when agents are coordinating around incomplete information. Comprehensive specifications don't help when you can't specify what you don't fully understand."
261
+
262
+ **AIWG's answer**: Create comprehensive context *first* through documentation. Ralph then operates in a rich-context environment where iteration actually helps.
263
+
264
+ ### Loop Drift and Thrashing
265
+
266
+ [Research into agent loops](https://www.fixbrokenaiapps.com/blog/ai-agents-infinite-loops) identified "Loop Drift" as a core failure mode - agents misinterpreting termination signals, generating repetitive actions, or suffering from inconsistent internal state.
267
+
268
+ **Why this matters for Ralph**: Clear completion criteria with objective verification commands (exit codes, test results) prevent drift. Subjective criteria like "code is good" invite drift.
269
+
270
+ ### Context Window Degradation
271
+
272
+ [Token cost research](https://agentsarcade.com/blog/reducing-token-costs-long-running-agent-workflows) confirms that context windows have a quality curve:
273
+
274
+ > "Early in the window, Claude is sharp. As tokens accumulate, quality degrades. If you try to cram multiple features into one iteration, you're working in the degraded part of the curve."
275
+
276
+ **Best practice**: Keep iterations focused on single changes. Ralph's git-based state persistence lets each iteration start with fresh context while inheriting the work from prior iterations.
277
+
278
+ ### The Double-Loop Alternative
279
+
280
+ [Test Double's "double-loop model"](https://testdouble.com/insights/youre-holding-it-wrong-the-double-loop-model-for-agentic-coding) argues against prescriptive prompts entirely:
281
+
282
+ > "If you have to be super prescriptive with the AI agent, I might as well write the damn code."
283
+
284
+ Their approach: First loop for exploration (treat implementation as disposable), second loop for polish (traditional code review).
285
+
286
+ **AIWG's response**: Both models can work. Double-loop suits exploratory greenfield work where you're discovering requirements. Ralph + AIWG suits implementation of known requirements. The key is recognizing which phase you're in.
287
+
288
+ ### Security Concerns
289
+
290
+ [NVIDIA's security research](https://developer.nvidia.com/blog/how-code-execution-drives-key-risks-in-agentic-ai-systems/) warns:
291
+
292
+ > "AI-generated code is inherently untrusted. Systems that execute LLM-generated code must treat that code with the same caution as user-supplied inputs."
293
+
294
+ **Ralph's safeguards**: Auto-commit creates rollback points. Tests verify correctness. Iteration limits prevent runaway execution. But the warning is real - always review final output before production.
295
+
296
+ ### Success Stories
297
+
298
+ The Ralph methodology has proven effective for:
299
+
300
+ - **React v16 to v19 migration**: 14 hours autonomous, no human intervention ([source](https://sidbharath.com/blog/ralph-wiggum-claude-code/))
301
+ - **Overnight multi-repo delivery**: "Ship 6 repos overnight. $50k contract for $297 in API costs" ([source](https://venturebeat.com/technology/how-ralph-wiggum-went-from-the-simpsons-to-the-biggest-name-in-ai-right-now))
302
+ - **Test coverage improvement**: Iterative test addition until threshold met
303
+
304
+ The common thread: objectively verifiable goals with clear completion criteria.
305
+
306
+ ### Expert Consensus
307
+
308
+ Industry practitioners have converged on these principles:
309
+
310
+ | Principle | Source |
311
+ |-----------|--------|
312
+ | Verification is mandatory | Anthropic research: "models tend to declare victory without proper verification" |
313
+ | Context beats coordination | Augment Code: "context understanding as the prerequisite for everything else" |
314
+ | Small iterations work better | Oreate AI: "context windows have a quality curve" |
315
+ | Safety limits are non-negotiable | Multiple sources: cap iterations, monitor costs, use sandboxes |
316
+ | Boring technologies work better | Oreate AI: stable APIs and mature toolchains outperform trendy alternatives |
317
+
318
+ ### Contrary Views
319
+
320
+ Not everyone agrees Ralph is the answer:
321
+
322
+ **The "double-loop" camp** argues iteration should be exploratory first, not implementation-focused. They embrace disposable code during discovery.
323
+
324
+ **The "context-first" camp** argues that understanding existing systems matters more than any coordination strategy. They focus on codebase comprehension tools.
325
+
326
+ **The "human-in-the-loop" camp** argues autonomous execution is inherently risky. They prefer checkpoints and approval gates.
327
+
328
+ **AIWG's synthesis**: All three camps make valid points. AIWG addresses them by:
329
+ 1. Supporting exploration during Discovery Track (not Ralph)
330
+ 2. Building rich context through documentation before implementation
331
+ 3. Providing iteration limits, auto-commits, and clear abort paths
332
+
333
+ Ralph isn't for every phase of development - it's for the implementation phase after discovery is complete.
334
+
335
+ ## Related
336
+
337
+ - [Quickstart Guide](quickstart.md) - Getting started with Ralph
338
+ - [Best Practices](best-practices.md) - Writing effective tasks and criteria
339
+ - [AIWG SDLC Framework](../../frameworks/sdlc-complete/README.md) - Documentation-first development
340
+ - [Discovery Track](../../frameworks/sdlc-complete/docs/phases/discovery-track.md) - How to document before you build
341
+
342
+ ## External Resources
343
+
344
+ - [The Ralph Wiggum Breakdown](https://dev.to/ibrahimpima/the-ralf-wiggum-breakdown-3mko) - Original methodology explanation
345
+ - [VentureBeat: Ralph Wiggum in AI](https://venturebeat.com/technology/how-ralph-wiggum-went-from-the-simpsons-to-the-biggest-name-in-ai-right-now) - Industry adoption
346
+ - [Test Double: Double Loop Model](https://testdouble.com/insights/youre-holding-it-wrong-the-double-loop-model-for-agentic-coding) - Alternative approach
347
+ - [Augment Code: Spec-Driven vs Agentic](https://www.augmentcode.com/learn/agentic-swarm-vs-spec-driven-coding) - Context-first perspective
348
+ - [Reducing Token Costs](https://agentsarcade.com/blog/reducing-token-costs-long-running-agent-workflows) - Cost management strategies
@@ -0,0 +1,209 @@
1
+ # v2026.01.3 - "Ralph Loop & Issue Management" Release
2
+
3
+ **Released**: January 13, 2026
4
+
5
+ This release introduces **Ralph Loop** for iterative AI task execution, **--interactive and --guidance flags** for all commands, a comprehensive **issue management system** with multi-provider support, **token security patterns**, and **vendor-specific regenerate commands** for reduced context overhead.
6
+
7
+ ## Highlights
8
+
9
+ | What Changed | Why You Care |
10
+ |--------------|--------------|
11
+ | **Ralph Loop** | Iterative AI task execution - "iteration beats perfection" methodology |
12
+ | **--interactive & --guidance** | All commands now support interactive mode and custom guidance |
13
+ | Unified issue management | Create, update, list, sync issues across Gitea/GitHub/Jira/Linear or local files |
14
+ | Issue auto-sync | Commits with "Fixes #X" automatically update and close issues |
15
+ | Token security patterns | Secure token loading via env vars and files, never direct access |
16
+ | Vendor-specific regenerate | 30-40% smaller context files, only loads relevant platform commands |
17
+ | Man page support | `man aiwg` works after npm global install |
18
+
19
+ ## Ralph Loop - Iterative AI Task Execution
20
+
21
+ The flagship feature of this release. Ralph Loop executes tasks iteratively until completion criteria are met. Errors become learning data within the loop rather than session-ending failures.
22
+
23
+ ```bash
24
+ # Fix all failing tests iteratively
25
+ /ralph "Fix all failing tests in src/auth/" --completion "npm test passes"
26
+
27
+ # TypeScript migration with verification
28
+ /ralph "Convert src/utils/ to TypeScript" --completion "npx tsc --noEmit exits 0" --max-iterations 20
29
+
30
+ # Coverage target
31
+ /ralph "Add tests to reach 80% coverage" --completion "npm run coverage shows >80%"
32
+ ```
33
+
34
+ ### Ralph Commands
35
+
36
+ | Command | Purpose |
37
+ |---------|---------|
38
+ | `/ralph` | Execute iterative task loop |
39
+ | `/ralph-status` | Check status of current/previous loop |
40
+ | `/ralph-resume` | Resume interrupted loop from checkpoint |
41
+ | `/ralph-abort` | Abort loop and optionally revert changes |
42
+
43
+ ### Natural Language Triggers
44
+
45
+ - "ralph this: [task]"
46
+ - "loop until: [criteria]"
47
+ - "keep trying until [condition]"
48
+ - "iterate on [task] until [done]"
49
+
50
+ ### Philosophy
51
+
52
+ **"Iteration beats perfection"** - Instead of failing on first error, Ralph loops extract learnings from each failure and iterate with improved context. Loop state persists in `.aiwg/ralph/` for recovery.
53
+
54
+ ## Command Enhancements
55
+
56
+ ### --interactive Flag
57
+
58
+ All commands now support interactive mode for guided execution:
59
+
60
+ ```bash
61
+ /intake-wizard --interactive
62
+ # Asks clarifying questions before proceeding
63
+ # Validates assumptions with user
64
+ # Gathers preferences for ambiguous choices
65
+ ```
66
+
67
+ ### --guidance Flag
68
+
69
+ Provide custom guidance to tailor command behavior:
70
+
71
+ ```bash
72
+ /generate-tests --guidance "Focus on edge cases for authentication"
73
+ /pr-review --guidance "Prioritize security concerns over style"
74
+ /intake-start --guidance "This is a microservices refactoring project"
75
+ ```
76
+
77
+ ## Issue Management System
78
+
79
+ Unified issue tracking across platforms with configurable backends.
80
+
81
+ ### Commands
82
+
83
+ | Command | Purpose |
84
+ |---------|---------|
85
+ | `/issue-create` | Create issues (Gitea, GitHub, Jira, Linear, local) |
86
+ | `/issue-update` | Update status, assignee, labels |
87
+ | `/issue-list` | List and filter issues |
88
+ | `/issue-sync` | Detect refs in commits ("Fixes #X") |
89
+ | `/issue-close` | Close with completion summary |
90
+ | `/issue-comment` | Add templated comments |
91
+
92
+ ### Configuration
93
+
94
+ ```yaml
95
+ # .aiwg/config.yaml
96
+ issue_tracking:
97
+ provider: gitea # or github, jira, linear, local
98
+ url: https://git.example.com
99
+ owner: myorg
100
+ repo: myrepo
101
+ ```
102
+
103
+ ### Auto-Sync
104
+
105
+ Commits with issue references automatically update issues:
106
+
107
+ ```bash
108
+ git commit -m "Add user validation
109
+
110
+ Fixes #42"
111
+ # Issue #42 automatically updated and closed
112
+ ```
113
+
114
+ ## Token Security Patterns
115
+
116
+ New security addon with patterns for secure credential handling:
117
+
118
+ ```bash
119
+ # Environment variable (preferred)
120
+ export API_TOKEN="secret"
121
+ curl -H "Authorization: Bearer $API_TOKEN" ...
122
+
123
+ # Secure file loading
124
+ TOKEN=$(cat ~/.config/service/token)
125
+ curl -H "Authorization: token $TOKEN" ...
126
+ ```
127
+
128
+ ### Rules
129
+
130
+ - Never hard-code tokens
131
+ - Never pass tokens as command arguments
132
+ - Use heredoc for multi-line operations
133
+ - Enforce file permissions (mode 600)
134
+
135
+ ## Vendor-Specific Regenerate
136
+
137
+ Context files are now 30-40% smaller by only including relevant platform content:
138
+
139
+ | Platform | Detects | Loads |
140
+ |----------|---------|-------|
141
+ | Claude Code | CLAUDE.md, .claude/ | Claude-specific commands |
142
+ | GitHub Copilot | copilot-instructions.md | Copilot-specific |
143
+ | Cursor | .cursor/ | Cursor-specific |
144
+ | Windsurf | WARP.md | Windsurf-specific |
145
+
146
+ Full catalogs are linked rather than inlined, reducing context overhead.
147
+
148
+ ## Additional Features
149
+
150
+ ### Gap Analysis
151
+
152
+ Unified gap analysis with natural language routing:
153
+
154
+ ```bash
155
+ /gap-analysis "Compare current auth with OAuth 2.0 standards"
156
+ ```
157
+
158
+ ### Guided Implementation
159
+
160
+ Step-by-step implementation with checkpoints:
161
+
162
+ ```bash
163
+ /flow-guided-implementation
164
+ # Breaks complex tasks into iterations
165
+ # Validates each step before proceeding
166
+ ```
167
+
168
+ ### Droid Bridge MCP
169
+
170
+ MCP integration for Claude Desktop and other MCP clients:
171
+
172
+ ```bash
173
+ # Bridge between agentic framework and MCP protocol
174
+ aiwg use droid-bridge
175
+ ```
176
+
177
+ ### Man Page
178
+
179
+ ```bash
180
+ npm install -g aiwg
181
+ man aiwg # Now works!
182
+ ```
183
+
184
+ ## Bug Fixes
185
+
186
+ - Standardized terminology across SDLC framework (issue vs ticket)
187
+ - Consolidated `/ticket-*` commands to `/issue-*`
188
+ - Fixed addon directory deployment for Claude provider
189
+
190
+ ## Upgrade
191
+
192
+ ```bash
193
+ # Update to latest
194
+ npm install -g aiwg@2026.1.3
195
+
196
+ # Verify installation
197
+ aiwg --version
198
+
199
+ # Try Ralph Loop
200
+ /ralph "Run the test suite" --completion "npm test passes"
201
+ ```
202
+
203
+ ## Resources
204
+
205
+ - [Changelog](../../CHANGELOG.md)
206
+ - [Ralph Loop Documentation](../../agentic/code/addons/ralph/)
207
+ - [Issue Tracking Configuration](../../agentic/code/frameworks/sdlc-complete/config/issue-tracking-config.md)
208
+ - [GitHub Release](https://github.com/jmagly/ai-writing-guide/releases/tag/v2026.01.3)
209
+ - [npm Package](https://www.npmjs.com/package/aiwg)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiwg",
3
- "version": "2026.01.3",
3
+ "version": "2026.01.4",
4
4
  "description": "Modular agentic framework for AI-powered SDLC, marketing automation, and workflow orchestration",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli/index.mjs CHANGED
@@ -283,8 +283,19 @@ async function handleUse(args) {
283
283
  const skipUtils = remainingArgs.includes('--no-utils');
284
284
  const filteredArgs = deployArgs.filter(a => a !== '--no-utils');
285
285
 
286
+ // Extract provider and target from remainingArgs to pass to addon deployments
287
+ const providerIdx = remainingArgs.findIndex(a => a === '--provider' || a === '--platform');
288
+ const provider = providerIdx >= 0 && remainingArgs[providerIdx + 1] ? remainingArgs[providerIdx + 1] : null;
289
+ const targetIdx = remainingArgs.findIndex(a => a === '--target');
290
+ const target = targetIdx >= 0 && remainingArgs[targetIdx + 1] ? remainingArgs[targetIdx + 1] : null;
291
+
286
292
  await runScript('tools/agents/deploy-agents.mjs', filteredArgs);
287
293
 
294
+ // Build common args for addon deployments (inherit provider and target)
295
+ const addonBaseArgs = ['--deploy-commands', '--deploy-skills'];
296
+ if (provider) addonBaseArgs.push('--provider', provider);
297
+ if (target) addonBaseArgs.push('--target', target);
298
+
288
299
  // Deploy aiwg-utils unless --no-utils
289
300
  if (!skipUtils) {
290
301
  console.log('');
@@ -293,8 +304,7 @@ async function handleUse(args) {
293
304
  const utilsSource = path.join(frameworkRoot, 'agentic/code/addons/aiwg-utils');
294
305
  await runScript('tools/agents/deploy-agents.mjs', [
295
306
  '--source', utilsSource,
296
- '--deploy-commands',
297
- '--deploy-skills',
307
+ ...addonBaseArgs,
298
308
  ]);
299
309
  }
300
310
 
@@ -306,8 +316,7 @@ async function handleUse(args) {
306
316
  const ralphSource = path.join(frameworkRoot, 'agentic/code/addons/ralph');
307
317
  await runScript('tools/agents/deploy-agents.mjs', [
308
318
  '--source', ralphSource,
309
- '--deploy-commands',
310
- '--deploy-skills',
319
+ ...addonBaseArgs,
311
320
  ]);
312
321
  }
313
322
  }
@@ -388,120 +388,4 @@ function deepMerge(target, source) {
388
388
  }
389
389
  process.exit(1);
390
390
  }
391
-
392
- // ============================================================================
393
- // WINDSURF PROVIDER DEPLOYMENT
394
- // ============================================================================
395
- if (provider === 'windsurf') {
396
- displayWindsurfWarning();
397
-
398
- // Collect all agent files based on mode
399
- const allAgentFiles = [];
400
-
401
- // Writing agents
402
- if (mode === 'general' || mode === 'writing' || mode === 'both' || mode === 'all') {
403
- const writingAddonAgentsRoot = path.join(srcRoot, 'agentic', 'code', 'addons', 'writing-quality', 'agents');
404
- const legacyAgentsRoot = path.join(srcRoot, 'agents');
405
- const agentsRoot = fs.existsSync(writingAddonAgentsRoot) ? writingAddonAgentsRoot : legacyAgentsRoot;
406
- if (fs.existsSync(agentsRoot)) {
407
- allAgentFiles.push(...listMdFiles(agentsRoot));
408
- }
409
- }
410
-
411
- // SDLC agents
412
- if (mode === 'sdlc' || mode === 'both' || mode === 'all') {
413
- const sdlcAgentsRoot = path.join(srcRoot, 'agentic', 'code', 'frameworks', 'sdlc-complete', 'agents');
414
- if (fs.existsSync(sdlcAgentsRoot)) {
415
- allAgentFiles.push(...listMdFiles(sdlcAgentsRoot));
416
- }
417
- }
418
-
419
- // Marketing agents
420
- if (mode === 'marketing' || mode === 'all') {
421
- const marketingAgentsRoot = path.join(srcRoot, 'agentic', 'code', 'frameworks', 'media-marketing-kit', 'agents');
422
- if (fs.existsSync(marketingAgentsRoot)) {
423
- allAgentFiles.push(...listMdFiles(marketingAgentsRoot));
424
- }
425
- }
426
-
427
- // Generate aggregated AGENTS.md (Windsurf reads this natively)
428
- if (allAgentFiles.length > 0 && !commandsOnly && !skillsOnly) {
429
- const agentsMdPath = path.join(target, 'AGENTS.md');
430
- console.log(`\nGenerating AGENTS.md with ${allAgentFiles.length} agents for Windsurf...`);
431
- generateWindsurfAgentsMd(allAgentFiles, agentsMdPath, deployOpts);
432
- }
433
-
434
- // Generate .windsurfrules with orchestration context
435
- if (!commandsOnly && !skillsOnly) {
436
- console.log('\nGenerating .windsurfrules orchestration file...');
437
- generateWindsurfRules(srcRoot, target, deployOpts);
438
- }
439
-
440
- // Deploy commands as Windsurf workflows
441
- if (deployCommands || commandsOnly) {
442
- const workflowsDir = path.join(target, '.windsurf', 'workflows');
443
- if (!dryRun) ensureDir(workflowsDir);
444
-
445
- // Collect command files based on mode
446
- const commandFiles = [];
447
-
448
- if (mode === 'general' || mode === 'both' || mode === 'all') {
449
- const generalCommandsRoot = path.join(srcRoot, 'commands');
450
- if (fs.existsSync(generalCommandsRoot)) {
451
- commandFiles.push(...listMdFilesRecursive(generalCommandsRoot));
452
- }
453
- }
454
-
455
- if (mode === 'sdlc' || mode === 'both' || mode === 'all') {
456
- const sdlcCommandsRoot = path.join(srcRoot, 'agentic', 'code', 'frameworks', 'sdlc-complete', 'commands');
457
- if (fs.existsSync(sdlcCommandsRoot)) {
458
- commandFiles.push(...listMdFilesRecursive(sdlcCommandsRoot));
459
- }
460
- }
461
-
462
- if (mode === 'marketing' || mode === 'all') {
463
- const marketingCommandsRoot = path.join(srcRoot, 'agentic', 'code', 'frameworks', 'media-marketing-kit', 'commands');
464
- if (fs.existsSync(marketingCommandsRoot)) {
465
- commandFiles.push(...listMdFilesRecursive(marketingCommandsRoot));
466
- }
467
- }
468
-
469
- if (commandFiles.length > 0) {
470
- console.log(`\nDeploying ${commandFiles.length} commands as Windsurf workflows to ${workflowsDir}...`);
471
-
472
- for (const cmdFile of commandFiles) {
473
- const content = fs.readFileSync(cmdFile, 'utf8');
474
- const workflowContent = transformToWindsurfWorkflow(content);
475
-
476
- // Check character limit (12000) - warn if exceeded
477
- if (workflowContent.length > 12000) {
478
- console.warn(`Warning: Workflow ${path.basename(cmdFile)} exceeds 12000 char limit (${workflowContent.length} chars)`);
479
- }
480
-
481
- const destFile = path.join(workflowsDir, path.basename(cmdFile));
482
-
483
- if (dryRun) {
484
- console.log(`[dry-run] deploy workflow: ${path.basename(cmdFile)}`);
485
- } else {
486
- fs.writeFileSync(destFile, workflowContent, 'utf8');
487
- console.log(`deployed workflow: ${path.basename(cmdFile)}`);
488
- }
489
- }
490
- }
491
- }
492
-
493
- // Note about skills
494
- if (deploySkills || skillsOnly) {
495
- console.log('\nNote: Skills are not directly supported for Windsurf. Reference skill files in prompts using @-mentions.');
496
- }
497
-
498
- console.log('\n' + '='.repeat(70));
499
- console.log('Windsurf deployment complete. Generated files:');
500
- console.log(' - AGENTS.md (agent catalog)');
501
- console.log(' - .windsurfrules (orchestration context)');
502
- if (deployCommands || commandsOnly) {
503
- console.log(' - .windsurf/workflows/ (commands as workflows)');
504
- }
505
- console.log('='.repeat(70) + '\n');
506
- }
507
391
  })();
@@ -5,15 +5,15 @@
5
5
  * to prompts format via external script.
6
6
  *
7
7
  * Deployment paths:
8
- * - Agents: .codex/agents/
9
- * - Commands: .codex/commands/ (via deploy-prompts-codex.mjs)
10
- * - Skills: ~/.codex/skills/ (home directory)
8
+ * - Agents: <project>/.codex/agents/ (project-local)
9
+ * - Commands: ~/.codex/prompts/ (home directory, NOT project)
10
+ * - Skills: ~/.codex/skills/ (home directory, NOT project)
11
11
  *
12
12
  * Special features:
13
13
  * - Model replacement (opus/sonnet/haiku -> gpt variants)
14
14
  * - --as-agents-md aggregation option
15
- * - Delegates commands to deploy-prompts-codex.mjs
16
- * - Delegates skills to deploy-skills-codex.mjs
15
+ * - Delegates commands to deploy-prompts-codex.mjs (deploys to ~/.codex/prompts/)
16
+ * - Delegates skills to deploy-skills-codex.mjs (deploys to ~/.codex/skills/)
17
17
  */
18
18
 
19
19
  import fs from 'fs';
@@ -38,8 +38,8 @@ export const aliases = ['openai'];
38
38
 
39
39
  export const paths = {
40
40
  agents: '.codex/agents/',
41
- commands: '.codex/commands/',
42
- skills: null, // Skills go to ~/.codex/skills/
41
+ commands: null, // Commands go to ~/.codex/prompts/ (home directory)
42
+ skills: null, // Skills go to ~/.codex/skills/ (home directory)
43
43
  rules: null
44
44
  };
45
45
 
@@ -154,6 +154,10 @@ export function deployAgents(agentFiles, targetDir, opts) {
154
154
 
155
155
  /**
156
156
  * Deploy commands via external script
157
+ *
158
+ * NOTE: Codex prompts/commands go to ~/.codex/prompts/ (home directory)
159
+ * not to the project directory. We do NOT pass --target to let the
160
+ * script use its default home directory location.
157
161
  */
158
162
  export async function deployCommands(targetDir, srcRoot, opts) {
159
163
  const scriptPath = path.join(srcRoot, 'tools', 'commands', 'deploy-prompts-codex.mjs');
@@ -163,10 +167,11 @@ export async function deployCommands(targetDir, srcRoot, opts) {
163
167
  return;
164
168
  }
165
169
 
166
- console.log('Delegating command deployment to deploy-prompts-codex.mjs...');
170
+ console.log('Delegating command deployment to deploy-prompts-codex.mjs (~/.codex/prompts/)...');
167
171
 
168
172
  return new Promise((resolve, reject) => {
169
- const args = ['--target', targetDir, '--source', srcRoot];
173
+ // NOTE: Do NOT pass --target - Codex prompts belong in ~/.codex/prompts/ (home)
174
+ const args = ['--source', srcRoot];
170
175
  if (opts.dryRun) args.push('--dry-run');
171
176
  if (opts.force) args.push('--force');
172
177
  if (opts.mode) args.push('--mode', opts.mode);
@@ -24,13 +24,13 @@
24
24
  import fs from 'fs';
25
25
  import path from 'path';
26
26
 
27
- const DEFAULT_TARGET = '.cursor/rules';
27
+ const RULES_SUBDIR = '.cursor/rules';
28
28
 
29
29
  function parseArgs() {
30
30
  const args = process.argv.slice(2);
31
31
  const cfg = {
32
32
  source: null,
33
- target: DEFAULT_TARGET,
33
+ target: null, // Will be resolved to .cursor/rules/ in the appropriate project
34
34
  mode: 'all',
35
35
  dryRun: false,
36
36
  force: false,
@@ -40,13 +40,23 @@ function parseArgs() {
40
40
  for (let i = 0; i < args.length; i++) {
41
41
  const a = args[i];
42
42
  if (a === '--source' && args[i + 1]) cfg.source = path.resolve(args[++i]);
43
- else if (a === '--target' && args[i + 1]) cfg.target = path.resolve(args[++i]);
43
+ else if (a === '--target' && args[i + 1]) {
44
+ // --target is the PROJECT root, not the final destination
45
+ // We always deploy to <project>/.cursor/rules/
46
+ const projectRoot = path.resolve(args[++i]);
47
+ cfg.target = path.join(projectRoot, RULES_SUBDIR);
48
+ }
44
49
  else if (a === '--mode' && args[i + 1]) cfg.mode = String(args[++i]).toLowerCase();
45
50
  else if (a === '--dry-run') cfg.dryRun = true;
46
51
  else if (a === '--force') cfg.force = true;
47
52
  else if (a === '--prefix' && args[i + 1]) cfg.prefix = args[++i];
48
53
  }
49
54
 
55
+ // Default to .cursor/rules/ in current working directory
56
+ if (!cfg.target) {
57
+ cfg.target = path.resolve(RULES_SUBDIR);
58
+ }
59
+
50
60
  return cfg;
51
61
  }
52
62