aiwg 2026.5.5 → 2026.5.7
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 +4 -4
- package/agentic/code/addons/agent-loop/agents/ralph-verifier.md +6 -0
- package/agentic/code/addons/agent-loop/manifest.json +2 -1
- package/agentic/code/addons/agent-loop/skills/agent-loop/SKILL.md +94 -32
- package/agentic/code/addons/agent-loop/skills/agent-loop-ext/SKILL.md +16 -4
- package/agentic/code/addons/agent-loop/skills/infer-completion-criteria/SKILL.md +323 -0
- package/agentic/code/addons/agent-loop/skills/ralph/SKILL.md +21 -8
- package/agentic/code/addons/aiwg-utils/manifest.json +2 -1
- package/agentic/code/addons/aiwg-utils/rules/RULES-INDEX.md +6 -1
- package/agentic/code/addons/aiwg-utils/rules/auto-compact-continue.md +258 -0
- package/agentic/code/addons/rlm/skills/rlm-search/SKILL.md +4 -2
- package/agentic/code/frameworks/sdlc-complete/skills/flow-release/SKILL.md +14 -0
- package/agentic/code/frameworks/security-engineering/skills/npm-supply-chain-audit/SKILL.md +14 -1
- package/agentic/code/frameworks/security-engineering/skills/supply-chain-hardening-quickstart/SKILL.md +4 -0
- package/dist/src/cli/handlers/ralph-launcher.d.ts +3 -0
- package/dist/src/cli/handlers/ralph-launcher.d.ts.map +1 -1
- package/dist/src/cli/handlers/ralph-launcher.js +6 -0
- package/dist/src/cli/handlers/ralph-launcher.js.map +1 -1
- package/dist/src/cli/handlers/ralph.d.ts.map +1 -1
- package/dist/src/cli/handlers/ralph.js +9 -0
- package/dist/src/cli/handlers/ralph.js.map +1 -1
- package/dist/src/rlm/cli.js +70 -9
- package/dist/src/rlm/cli.js.map +1 -1
- package/package.json +4 -2
- package/tools/lint/affected-packages.mjs +124 -0
- package/tools/lint/dep-source.mjs +3 -39
- package/tools/lint/lib/affected-packages.js +281 -0
- package/tools/lint/lib/dep-source.js +42 -0
- package/tools/ralph-external/external-multi-loop-state-manager.mjs +2 -2
- package/tools/ralph-external/external-multi-loop-state-manager.test.mjs +17 -0
- package/tools/ralph-external/lib/behavior-detector.mjs +30 -12
- package/tools/ralph-external/lib/claude-prompt-generator.mjs +1 -0
- package/tools/ralph-external/lib/memory-promotion.mjs +2 -3
- package/tools/ralph-external/lib/semantic-memory.mjs +2 -3
- package/tools/ralph-external/lib/strategy-planner.mjs +27 -10
- package/tools/ralph-external/metrics-collector.mjs +27 -23
- package/tools/ralph-external/orchestrator.mjs +21 -9
- package/tools/ralph-external/session-launcher.mjs +1 -0
- package/tools/release/cut-tag.sh +255 -0
- package/tools/workspace/check-marketplace-version.mjs +99 -30
package/CLAUDE.md
CHANGED
|
@@ -663,10 +663,10 @@ Before pushing a version tag:
|
|
|
663
663
|
npm run uat:serve-live
|
|
664
664
|
```
|
|
665
665
|
Tests skip cleanly when `AIWG_SANDBOX_ENDPOINT` is unset or unreachable, so this is a safe no-op gate. Run before any release that touches `src/serve/`, the executor contract, or the MC ↔ serve bridge.
|
|
666
|
-
5. **Commit
|
|
667
|
-
6. **
|
|
668
|
-
7. **
|
|
669
|
-
8. **
|
|
666
|
+
5. **Commit the release prep** — `git commit` the package.json/CHANGELOG/announcement bump. Do NOT use plain `git tag -a` or `git tag -s` (they sign with `user.signingkey`, which is typically the maintainer's *personal commit-signing key* — wrong key for tags; the supply-chain gate `tools/ci/verify-signed-tag.sh` will reject in CI).
|
|
667
|
+
6. **Cut the tag via the wrapper** — `tools/release/cut-tag.sh <X.Y.Z>`. Runs 10 pre-tag checks (CalVer shape, `package.json` + `marketplace.json` lockstep, CHANGELOG entry, announcement file present, release-signing key both present locally AND published in `.gitea/keys/maintainers.asc`) and signs with `-u <RELEASE_KEY_FINGERPRINT>` (default: `FE9272F0BC5781E1DE77FAAA719AB63879E84CE8`, the `AIWG Release Signing <release@aiwg.io>` key per the two-key model from commit `a13dabc5`). See the v2026.5.5 incident note in `docs/contributing/versioning.md` for what happens when this is skipped.
|
|
668
|
+
7. **Push tag to Gitea** — `git push origin main --tags`. Triggers `gitea-release.yml` + `npm-publish.yml` (both gated on signed-tag verify).
|
|
669
|
+
8. **Mirror to GitHub** — `git push github main --tags`. Triggers `github-mirror.yml` which creates the GitHub Release using `docs/releases/v<version>-announcement.md` as the body. **No manual `gh release create` needed for stable releases** — the workflow handles it. Pre-release tags (`-rc.*`, `-alpha.*`, `-beta.*`, `-nightly.*`) skip GitHub-Release creation by design.
|
|
670
670
|
|
|
671
671
|
### Version Format
|
|
672
672
|
|
|
@@ -14,6 +14,12 @@ allowed-tools: Bash, Read, Glob
|
|
|
14
14
|
|
|
15
15
|
You verify completion criteria for agent loops - determining if a task iteration succeeded by running verification commands and analyzing their output.
|
|
16
16
|
|
|
17
|
+
## Companion skill
|
|
18
|
+
|
|
19
|
+
When the loop is started without explicit `--completion`, the criterion you verify is produced by the `infer-completion-criteria` skill (`@$AIWG_ROOT/agentic/code/addons/agent-loop/skills/infer-completion-criteria/SKILL.md`). It derives a measurable criterion from project docs (CLAUDE.md / AGENTS.md / AIWG.md), package manifests, CI configuration, and `.aiwg/` artifacts.
|
|
20
|
+
|
|
21
|
+
You do not run that skill yourself — the loop orchestrator (`ralph-loop` agent or external launcher) calls it during initialization. Your job is to take whatever criterion is in the loop state and verify it. The skill writes its rationale into `.aiwg/ralph/<loop-id>/progress.md` (or `.aiwg/ralph-external/<run-id>/inferred-completion.yaml` for external loops); when reporting verification results, you may reference that rationale so the user sees the full evidence chain.
|
|
22
|
+
|
|
17
23
|
## Capabilities
|
|
18
24
|
|
|
19
25
|
### Verification Methods
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
namespace: aiwg
|
|
3
3
|
name: agent-loop
|
|
4
4
|
description: Detect requests for iterative autonomous agent loops and route to the appropriate loop executor
|
|
5
|
-
version: 3.
|
|
5
|
+
version: 3.1.0
|
|
6
6
|
platforms: [all]
|
|
7
7
|
|
|
8
8
|
---
|
|
@@ -22,7 +22,7 @@ platforms: [all]
|
|
|
22
22
|
|
|
23
23
|
# Agent Loop Skill
|
|
24
24
|
|
|
25
|
-
You detect when users want iterative autonomous task execution and route to
|
|
25
|
+
You detect when users want iterative autonomous task execution and route to an internal, in-session loop by default. External daemon loops are opt-in and require an explicit request.
|
|
26
26
|
|
|
27
27
|
## Loop Taxonomy
|
|
28
28
|
|
|
@@ -30,10 +30,33 @@ This skill is the **detection and routing layer** for autonomous agent loops —
|
|
|
30
30
|
|
|
31
31
|
| Loop Type | Implementation | Description |
|
|
32
32
|
|-----------|---------------|-------------|
|
|
33
|
-
| **
|
|
33
|
+
| **Internal Agent Loop** | current assistant session / internal loop | Default visible iterate-until-complete workflow in the active session |
|
|
34
|
+
| **Al** | internal `ralph` concept | Basic iterate-until-complete when named without external qualifiers |
|
|
35
|
+
| **External Agent Loop** | `agent-loop-ext` / `ralph-external` daemon | Explicitly requested background, detached, crash-resilient, or resumable work |
|
|
34
36
|
| *(future)* | — | Reflection loops, critic-actor loops, branching loops |
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
Generic loop requests route to the internal in-session loop. As new loop types are added, this skill will route based on task characteristics.
|
|
39
|
+
|
|
40
|
+
## Routing Policy
|
|
41
|
+
|
|
42
|
+
### Default: Internal/In-Session Loop
|
|
43
|
+
|
|
44
|
+
Use the internal loop when the user says `agent-loop`, `al`, `ralph`, `loop`, `iterate`, `keep trying`, `fix until green`, `address issues`, `handle all listed issues`, or supplies an iteration bound such as `--iterations 200` without explicit external wording.
|
|
45
|
+
|
|
46
|
+
Run the work visibly in the current assistant session:
|
|
47
|
+
|
|
48
|
+
1. Establish completion criteria.
|
|
49
|
+
2. Act on the next bounded slice of work.
|
|
50
|
+
3. Verify with the relevant checks.
|
|
51
|
+
4. Adapt and continue until completion, blocker, or the requested iteration cap.
|
|
52
|
+
|
|
53
|
+
Do not launch detached processes, background sessions, or the Ralph external daemon for generic loop requests.
|
|
54
|
+
|
|
55
|
+
### Explicit External Route
|
|
56
|
+
|
|
57
|
+
Route to `agent-loop-ext` / `ralph-external` only when the user explicitly asks for external execution, background execution, a daemon, detached operation, crash resilience, session survival, resume-later behavior, unattended long-running work, or when they name `agent-loop-ext`, `ralph-external`, or the Ralph daemon directly.
|
|
58
|
+
|
|
59
|
+
If the user says `ralph` without external/background/daemon qualifiers, treat it as the internal loop concept.
|
|
37
60
|
|
|
38
61
|
## Triggers
|
|
39
62
|
|
|
@@ -50,16 +73,16 @@ Alternate expressions and non-obvious activations (primary phrases are matched a
|
|
|
50
73
|
|
|
51
74
|
| Pattern | Example | Action |
|
|
52
75
|
|---------|---------|--------|
|
|
53
|
-
| `ralph this: X` | "ralph this: fix all lint errors" |
|
|
54
|
-
| `ralph: X` | "ralph: migrate to TypeScript" |
|
|
55
|
-
| `ralph it` | "ralph it" (after task description) |
|
|
56
|
-
| `keep trying until X` | "keep trying until tests pass" |
|
|
57
|
-
| `loop until X` | "loop until coverage >80%" |
|
|
58
|
-
| `iterate until X` | "iterate until no errors" |
|
|
59
|
-
| `run until passes` | "run until passes" |
|
|
60
|
-
| `fix until green` | "fix until green" |
|
|
61
|
-
| `keep fixing until X` | "keep fixing until lint is clean" |
|
|
62
|
-
| `al: X` | "al: fix all lint errors" |
|
|
76
|
+
| `ralph this: X` | "ralph this: fix all lint errors" | Internal loop: extract task, infer completion |
|
|
77
|
+
| `ralph: X` | "ralph: migrate to TypeScript" | Internal loop: extract task, infer completion |
|
|
78
|
+
| `ralph it` | "ralph it" (after task description) | Internal loop: use conversation context |
|
|
79
|
+
| `keep trying until X` | "keep trying until tests pass" | Internal loop: task = current context, completion = X |
|
|
80
|
+
| `loop until X` | "loop until coverage >80%" | Internal loop: task = improve coverage, completion = X |
|
|
81
|
+
| `iterate until X` | "iterate until no errors" | Internal loop: task = fix errors, completion = X |
|
|
82
|
+
| `run until passes` | "run until passes" | Internal loop: infer test command |
|
|
83
|
+
| `fix until green` | "fix until green" | Internal loop: task = fix tests, completion = tests pass |
|
|
84
|
+
| `keep fixing until X` | "keep fixing until lint is clean" | Internal loop: task = fix lint, completion = X |
|
|
85
|
+
| `al: X` | "al: fix all lint errors" | Internal loop shortcut: extract task |
|
|
63
86
|
|
|
64
87
|
## Extraction Logic
|
|
65
88
|
|
|
@@ -74,7 +97,19 @@ Alternate expressions and non-obvious activations (primary phrases are matched a
|
|
|
74
97
|
|
|
75
98
|
### Completion Inference
|
|
76
99
|
|
|
77
|
-
When user doesn't specify explicit verification:
|
|
100
|
+
When the user doesn't specify explicit verification, delegate to the **`infer-completion-criteria`** skill (`@$AIWG_ROOT/agentic/code/addons/agent-loop/skills/infer-completion-criteria/SKILL.md`). That skill runs a deterministic 5-layer pipeline:
|
|
101
|
+
|
|
102
|
+
1. **Task verb** → criterion class (test-pass, type-clean, regression-gate, coverage, lint-clean, build-pass, implement-feature)
|
|
103
|
+
2. **Project context files** (CLAUDE.md / AGENTS.md / AIWG.md) → canonical commands from the Development section
|
|
104
|
+
3. **Package manifests** (`package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`, `pom.xml`, etc.) → discovered scripts
|
|
105
|
+
4. **CI configuration** (`.github/workflows/`, `.gitea/workflows/`, GitLab/CircleCI/Jenkins) → team's actual "passes" definition
|
|
106
|
+
5. **`.aiwg/` artifacts** (test-strategy, related use cases by ID match, prior progress files) → project-specific gates
|
|
107
|
+
|
|
108
|
+
Synthesis is validated against the `vague-discretion` rule and emits a structured YAML proposal with criterion, verification command, rationale chain, confidence level, and alternatives considered.
|
|
109
|
+
|
|
110
|
+
**Use the inline table below ONLY as a last-resort fallback** when the inference skill is unavailable (degraded environment, missing skill deployment). It is intentionally narrow — JavaScript/Node-centric — and represents prior state before `infer-completion-criteria` was added.
|
|
111
|
+
|
|
112
|
+
Legacy fallback table:
|
|
78
113
|
|
|
79
114
|
| Task Pattern | Inferred Completion |
|
|
80
115
|
|--------------|---------------------|
|
|
@@ -86,6 +121,8 @@ When user doesn't specify explicit verification:
|
|
|
86
121
|
| "migrate to ESM" | "node runs without errors" |
|
|
87
122
|
| "refactor X" | "npm test passes" (preserve behavior) |
|
|
88
123
|
|
|
124
|
+
When the inference skill IS available, prefer it. The skill handles multi-language projects, monorepos, CI-defined gates, use-case acceptance criteria, and the refusal case (truly vague tasks like "make it better" that have no measurable criterion).
|
|
125
|
+
|
|
89
126
|
### Examples
|
|
90
127
|
|
|
91
128
|
**User**: "ralph this: migrate all files in lib/ to ESM"
|
|
@@ -93,7 +130,7 @@ When user doesn't specify explicit verification:
|
|
|
93
130
|
- Task: "migrate all files in lib/ to ESM"
|
|
94
131
|
- Completion (inferred): "node --experimental-vm-modules lib/index.js runs without errors"
|
|
95
132
|
|
|
96
|
-
**Action**:
|
|
133
|
+
**Action**: Run an internal loop in the current session for `migrate all files in lib/ to ESM` until the inferred completion command succeeds
|
|
97
134
|
|
|
98
135
|
---
|
|
99
136
|
|
|
@@ -102,7 +139,7 @@ When user doesn't specify explicit verification:
|
|
|
102
139
|
- Task: "fix failing tests" (from context or implied)
|
|
103
140
|
- Completion: "npm test passes with 0 failures"
|
|
104
141
|
|
|
105
|
-
**Action**:
|
|
142
|
+
**Action**: Run an internal loop in the current session until `npm test` passes
|
|
106
143
|
|
|
107
144
|
---
|
|
108
145
|
|
|
@@ -111,7 +148,7 @@ When user doesn't specify explicit verification:
|
|
|
111
148
|
- Task: (from conversation context about auth validation)
|
|
112
149
|
- Completion: (infer based on task type)
|
|
113
150
|
|
|
114
|
-
**Action**:
|
|
151
|
+
**Action**: Run an internal loop in the current session using the context-based task and inferred criteria
|
|
115
152
|
|
|
116
153
|
---
|
|
117
154
|
|
|
@@ -120,7 +157,16 @@ When user doesn't specify explicit verification:
|
|
|
120
157
|
- Task: "add tests to improve coverage"
|
|
121
158
|
- Completion: "npm run coverage shows >80%"
|
|
122
159
|
|
|
123
|
-
**Action**:
|
|
160
|
+
**Action**: Run an internal loop in the current session until the coverage report shows more than 80%
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
**User**: "Run this in the background with crash recovery and let me attach later"
|
|
165
|
+
**Extraction**:
|
|
166
|
+
- Task: (from conversation context)
|
|
167
|
+
- Completion: (infer based on task type)
|
|
168
|
+
|
|
169
|
+
**Action**: Route to `agent-loop-ext` / `ralph-external` because the user explicitly requested background crash-resilient execution
|
|
124
170
|
|
|
125
171
|
## Clarification Prompts
|
|
126
172
|
|
|
@@ -146,9 +192,9 @@ What task should I repeat until success?
|
|
|
146
192
|
What command tells me when it's done?
|
|
147
193
|
```
|
|
148
194
|
|
|
149
|
-
## Multi-Loop Support
|
|
195
|
+
## External/Multi-Loop Support
|
|
150
196
|
|
|
151
|
-
**Version 2.0**
|
|
197
|
+
**Version 2.0** added concurrent loop execution with registry tracking. This applies to explicit external daemon loops, not ordinary internal `agent-loop` requests.
|
|
152
198
|
|
|
153
199
|
### Concurrency Limits
|
|
154
200
|
|
|
@@ -164,7 +210,7 @@ All loops have unique identifiers:
|
|
|
164
210
|
|
|
165
211
|
### --loop-id Parameter
|
|
166
212
|
|
|
167
|
-
Users can optionally specify a loop ID:
|
|
213
|
+
Users can optionally specify a loop ID for external daemon loops:
|
|
168
214
|
|
|
169
215
|
```
|
|
170
216
|
/ralph "fix tests" --completion "npm test passes" --loop-id ralph-my-fixes-12345678
|
|
@@ -174,7 +220,7 @@ If not provided, ID is auto-generated from task description.
|
|
|
174
220
|
|
|
175
221
|
### Registry Tracking
|
|
176
222
|
|
|
177
|
-
|
|
223
|
+
External active loops are tracked in `.aiwg/ralph/registry.json`:
|
|
178
224
|
|
|
179
225
|
```json
|
|
180
226
|
{
|
|
@@ -195,7 +241,7 @@ All active loops tracked in `.aiwg/ralph/registry.json`:
|
|
|
195
241
|
|
|
196
242
|
### Concurrent Loop Behavior
|
|
197
243
|
|
|
198
|
-
**When starting a new loop**:
|
|
244
|
+
**When starting a new external loop**:
|
|
199
245
|
|
|
200
246
|
1. Check registry: `active_loops.length < 4`
|
|
201
247
|
2. If at limit: Show error with active loop list
|
|
@@ -259,22 +305,33 @@ Multi-loop structure per loop:
|
|
|
259
305
|
|
|
260
306
|
## Invocation
|
|
261
307
|
|
|
262
|
-
Once task and completion are extracted/confirmed,
|
|
308
|
+
Once task and completion are extracted/confirmed, use the default internal route unless explicit external wording is present.
|
|
309
|
+
|
|
310
|
+
For the default internal route:
|
|
311
|
+
|
|
312
|
+
- **Task**: The extracted task description
|
|
313
|
+
- **Completion criteria**: The verification command or condition
|
|
314
|
+
- **Max iterations**: If user mentioned iteration limit
|
|
315
|
+
- **Timeout**: If user mentioned time limit
|
|
316
|
+
- **Operation**: Iterate in the current assistant session with visible progress and verification after meaningful changes
|
|
317
|
+
|
|
318
|
+
For explicit external daemon routes:
|
|
263
319
|
|
|
264
320
|
- **Task**: The extracted task description
|
|
265
321
|
- **Completion criteria**: The verification command or condition
|
|
266
322
|
- **Max iterations**: If user mentioned iteration limit
|
|
267
323
|
- **Timeout**: If user mentioned time limit
|
|
268
324
|
- **Loop ID**: If user wants a custom loop identifier
|
|
325
|
+
- **Operation**: Route through `agent-loop-ext` / `ralph-external`, then surface status, log, attach, and abort commands
|
|
269
326
|
|
|
270
|
-
### Multi-Loop Examples
|
|
327
|
+
### External Multi-Loop Examples
|
|
271
328
|
|
|
272
329
|
**Parallel bug fixes**:
|
|
273
330
|
```
|
|
274
|
-
User: "ralph
|
|
331
|
+
User: "run an external ralph loop to fix TypeScript errors in src/"
|
|
275
332
|
→ Loop 1: ralph-fix-ts-errors-a1b2c3d4
|
|
276
333
|
|
|
277
|
-
User: "also ralph
|
|
334
|
+
User: "also run an external ralph loop to add missing tests in lib/"
|
|
278
335
|
→ Loop 2: ralph-add-tests-b2c3d4e5
|
|
279
336
|
|
|
280
337
|
Both running in parallel until completion criteria met.
|
|
@@ -282,7 +339,7 @@ Both running in parallel until completion criteria met.
|
|
|
282
339
|
|
|
283
340
|
**Sequential with manual abort**:
|
|
284
341
|
```
|
|
285
|
-
User: "ralph
|
|
342
|
+
User: "run an external ralph loop to refactor the entire auth module"
|
|
286
343
|
→ Loop 1: ralph-refactor-auth-c3d4e5f6 (running)
|
|
287
344
|
|
|
288
345
|
User: "actually, abort that and just fix the login bug"
|
|
@@ -296,12 +353,16 @@ User: "actually, abort that and just fix the login bug"
|
|
|
296
353
|
- The skill is **exclusive** - once triggered, handle the entire request
|
|
297
354
|
- Always confirm extraction before invoking if there's ambiguity
|
|
298
355
|
- Prefer inferring completion criteria over asking (ask only if truly unclear)
|
|
299
|
-
-
|
|
300
|
-
-
|
|
356
|
+
- Default ambiguous requests to the internal in-session loop
|
|
357
|
+
- Do not start `ralph-external`, detached daemons, or background `aiwg ralph` processes unless the user explicitly asks for them
|
|
358
|
+
- Check registry capacity before starting explicit external loops
|
|
359
|
+
- Show helpful errors with active loop list when explicit external loops are at capacity
|
|
301
360
|
|
|
302
361
|
## Related
|
|
303
362
|
|
|
304
|
-
- `
|
|
363
|
+
- `infer-completion-criteria` skill - derives measurable `--completion` from project state when the user doesn't supply one
|
|
364
|
+
- `ralph` skill - legacy name for the iterative loop concept; `agent-loop` is canonical and defaults to in-session execution
|
|
365
|
+
- `agent-loop-ext` skill - crash-resilient external loop with state persistence
|
|
305
366
|
- `ralph-status` skill - check loop progress
|
|
306
367
|
- `ralph-resume` skill - continue interrupted loops
|
|
307
368
|
- `ralph-abort` skill - abort active loops
|
|
@@ -311,6 +372,7 @@ User: "actually, abort that and just fix the login bug"
|
|
|
311
372
|
|
|
312
373
|
## Version History
|
|
313
374
|
|
|
375
|
+
- **3.1.0**: Defaulted generic `agent-loop` routing to internal in-session loops; require explicit wording for external daemon loops
|
|
314
376
|
- **3.0.0**: Renamed from `ralph-loop` to `agent-loop`; added loop taxonomy (Issue #558)
|
|
315
377
|
- **2.0.0**: Added multi-loop support with registry tracking (Issue #268)
|
|
316
378
|
- **1.0.0**: Initial single-loop implementation
|
|
@@ -5,7 +5,7 @@ legacyName: ralph-external
|
|
|
5
5
|
platforms: [all]
|
|
6
6
|
description: Crash-resilient external agent loop with state persistence and CI/CD integration
|
|
7
7
|
commandHint:
|
|
8
|
-
argumentHint: "\"<objective>\" --completion \"<criteria>\" [--max-iterations N] [--timeout M] [--provider <p>] [--no-commit] [--branch <name>] [--quiet]"
|
|
8
|
+
argumentHint: "\"<objective>\" [--completion \"<criteria>\"] [--max-iterations N] [--timeout M] [--provider <p>] [--no-commit] [--branch <name>] [--quiet] [--auto-criteria | --no-infer-completion]"
|
|
9
9
|
allowedTools: Bash, Read, Write
|
|
10
10
|
model: sonnet
|
|
11
11
|
category: automation
|
|
@@ -60,7 +60,7 @@ Users may say:
|
|
|
60
60
|
### Objective (required)
|
|
61
61
|
The task the loop should accomplish. Passed as the first positional argument.
|
|
62
62
|
|
|
63
|
-
### --completion (
|
|
63
|
+
### --completion (optional — inferred when omitted)
|
|
64
64
|
Success criteria as a verifiable command. The loop exits when this command returns exit code 0.
|
|
65
65
|
|
|
66
66
|
**Good examples**:
|
|
@@ -68,6 +68,14 @@ Success criteria as a verifiable command. The loop exits when this command retur
|
|
|
68
68
|
- `--completion "npx tsc --noEmit exits with code 0"`
|
|
69
69
|
- `--completion "coverage report shows >80%"`
|
|
70
70
|
|
|
71
|
+
**When omitted**: the launcher invokes the `infer-completion-criteria` skill before the external loop starts. The skill derives a measurable criterion from project state (CLAUDE.md / AGENTS.md / AIWG.md, package manifests, CI configuration, `.aiwg/` artifacts) and emits a structured proposal with rationale. The proposal is written to `.aiwg/ralph-external/<run-id>/inferred-completion.yaml` and used as the loop's gate.
|
|
72
|
+
|
|
73
|
+
Because `agent-loop-ext` runs externally (potentially headless / in CI), the confirmation flow is:
|
|
74
|
+
- Interactive session (TTY attached): show proposal, accept `Y / n / edit` like the in-session `ralph` skill
|
|
75
|
+
- Non-interactive / `--auto-criteria` / CI environment: use the inferred criterion if confidence is `high`, otherwise fail fast and print the proposal as a diagnostic so the user can re-launch with `--completion` explicitly
|
|
76
|
+
|
|
77
|
+
Pass `--no-infer-completion` to require explicit `--completion` and fail before launch if missing. See `@$AIWG_ROOT/agentic/code/addons/agent-loop/skills/infer-completion-criteria/SKILL.md`.
|
|
78
|
+
|
|
71
79
|
### --max-iterations (default: 10)
|
|
72
80
|
Maximum iterations before the loop halts and saves state for manual review.
|
|
73
81
|
|
|
@@ -90,8 +98,12 @@ Suppress verbose progress output. Completion banner is always shown.
|
|
|
90
98
|
|
|
91
99
|
When triggered:
|
|
92
100
|
|
|
93
|
-
1.
|
|
94
|
-
|
|
101
|
+
1. **Resolve completion criteria**:
|
|
102
|
+
- If `--completion` is provided → use it directly
|
|
103
|
+
- Else if `--no-infer-completion` is set → fail fast before launch with a helpful error
|
|
104
|
+
- Else → invoke `infer-completion-criteria` skill, persist proposal to `.aiwg/ralph-external/<run-id>/inferred-completion.yaml`, confirm or auto-adopt per session-interactivity rules above
|
|
105
|
+
2. Validate the resolved criterion is verifiable (can be checked via command)
|
|
106
|
+
3. Check for an existing `.aiwg/ralph-external/` workspace; create if absent
|
|
95
107
|
3. Generate a unique `loop-id` (8-character hex) and create the loop state file at `.aiwg/ralph-external/loops/<loop-id>.json`
|
|
96
108
|
4. Write the initial state: `{ objective, completionCriteria, maxIterations, timeout, provider, status: "pending", iteration: 0 }`
|
|
97
109
|
5. If `--branch` is specified, create the git branch now
|