@neriros/ralphy 2.13.0 → 2.13.2

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/README.md CHANGED
@@ -89,10 +89,10 @@ What it does on each tick:
89
89
  1. Polls Linear for open issues matching the filter (team / assignee / status / labels)
90
90
  2. Dedupes against `.ralph/agent-state.json` (already processed) plus any in-flight workers
91
91
  3. For each new issue: fetches existing comments, scaffolds `openspec/changes/<id-slug>/{proposal.md,tasks.md,design.md}` (with the comments embedded so the worker sees prior discussion), then spawns `ralph task --name <id-slug>` up to the concurrency cap
92
- 4. Posts a "🤖 started" comment on the Linear issue and (optionally) moves it to `inProgressStatus`
93
- 5. On worker exit, posts a success/failure comment and (on success) moves the issue to `doneStatus` and/or applies `doneLabel`
92
+ 4. Posts a "🤖 started" comment on the Linear issue and applies the `setInProgress` indicator (if configured)
93
+ 5. On worker exit, posts a success/failure comment and applies the `setDone` indicator on success or `setError` on failure (if configured)
94
94
 
95
- Defaults are written to `ralphy.config.json` on first run; CLI flags override config values per invocation.
95
+ A default `ralphy.config.json` is written on first run with every defaulted setting filled in; CLI flags override config values per invocation.
96
96
 
97
97
  ```jsonc
98
98
  {
@@ -105,13 +105,23 @@ Defaults are written to `ralphy.config.json` on first run; CLI flags override co
105
105
  "linear": {
106
106
  "team": "ENG",
107
107
  "assignee": "me",
108
- "statuses": ["Todo", "In Progress"],
109
- "labels": ["ralph", "automation"],
110
- "inProgressStatus": "In Progress",
111
- "doneStatus": "In Review",
112
- "doneLabel": "ralphy-done",
113
108
  "postComments": true,
114
109
  "updateEveryIterations": 10,
110
+ "indicators": {
111
+ "getTodo": { "filter": [{ "type": "status", "value": "Todo" }] },
112
+ "getInProgress": { "filter": [{ "type": "status", "value": "In Progress" }] },
113
+ "getConflicted": { "filter": [{ "type": "label", "value": "ralph:conflicted" }] },
114
+ "setInProgress": { "type": "status", "value": "In Progress" },
115
+ "setDone": {
116
+ "apply": [
117
+ { "type": "status", "value": "In Review" },
118
+ { "type": "label", "value": "ralphy-done" },
119
+ ],
120
+ },
121
+ "setError": { "type": "label", "value": "ralph:error" },
122
+ "setConflicted": { "type": "label", "value": "ralph:conflicted" },
123
+ "clearConflicted": { "type": "label", "value": "ralph:conflicted" },
124
+ },
115
125
  },
116
126
  "useWorktree": true,
117
127
  "cleanupWorktreeOnSuccess": false,
@@ -131,7 +141,13 @@ Defaults are written to `ralphy.config.json` on first run; CLI flags override co
131
141
  }
132
142
  ```
133
143
 
134
- `doneStatus` and `doneLabel` are independent set either, both, or neither. Use `doneLabel` if your team marks completion via a label rather than a workflow state.
144
+ Linear is the source of truth for which issues Ralph has touched. Each `linear.indicators` key names a lifecycle event:
145
+
146
+ - `getTodo` / `getInProgress` / `getConflicted` — `{ filter: [...] }` selectors used to find issues to pick up, resume, or repair.
147
+ - `setInProgress` / `setDone` / `setError` / `setConflicted` — single marker `{ type, value }` or `{ apply: [...] }` for multi-marker.
148
+ - `clearConflicted` — labels to remove once a conflicted PR is fixed (status removal is not supported).
149
+
150
+ Marker types are `"label"` or `"status"`. Combine markers under `apply` when one event needs to set multiple — e.g. `setDone` flipping a status _and_ adding a "shipped" label.
135
151
 
136
152
  #### Per-task git worktrees
137
153
 
@@ -147,7 +163,7 @@ Use `setupScript` (run inside the worktree right after scaffolding) to install d
147
163
 
148
164
  **`fixCiOnFailure`** (or `--fix-ci`) watches the PR's checks via `gh pr checks` and, on failure, fetches the failed-run logs (`gh run view --log-failed`), appends them to `proposal.md` under `## Steering`, re-spawns the task loop in the worktree, and pushes the new commits — repeating until checks go green or `maxCiFixAttempts` is hit (default 5, polling interval `ciPollIntervalSeconds` defaults to 30s). Requires `--create-pr`.
149
165
 
150
- When `fixCiOnFailure` is enabled, the issue is **not** moved to `doneStatus` (and `doneLabel` is not applied, and the issue is not marked processed in `.ralph/agent-state.json`) until CI actually goes green. If the fix loop exhausts its attempts the worker is treated as failed for completion-marking purposes and the issue will be re-picked-up on the next poll (the resume-in-progress filter ensures that).
166
+ When `fixCiOnFailure` is enabled, the `setDone` indicator is **not** applied (and the issue is not marked processed in `.ralph/agent-state.json`) until CI actually goes green. If the fix loop exhausts its attempts the worker is treated as failed for completion-marking purposes and the issue will be re-picked-up on the next poll (the `getInProgress` filter ensures that).
151
167
 
152
168
  Every CLI flag is also configurable in `ralphy.config.json`; CLI values override config when both are set. The agent forwards `maxRuntimeMinutesPerTask` / `maxConsecutiveFailuresPerTask` / `iterationDelaySeconds` / `logRawStream` / `taskVerbose` to each spawned `ralph task` worker.
153
169
 
@@ -174,20 +190,16 @@ Failed workers (non-zero exit) are not marked processed, so they'll be retried o
174
190
 
175
191
  ### Agent mode flags
176
192
 
177
- | Option | Description |
178
- | ----------------------------- | ---------------------------------------------------------------------------- |
179
- | `--linear-team <key>` | Linear team key (e.g. `ENG`) |
180
- | `--linear-assignee <id>` | Filter by assignee (user id, email, or `me`) |
181
- | `--linear-status <name>` | Filter by status name (repeatable) |
182
- | `--linear-label <name>` | Filter by label name (repeatable, any-of) |
183
- | `--poll-interval <s>` | Seconds between Linear polls (default: 60) |
184
- | `--concurrency <n>` | Max concurrent task loops (default: 1) |
185
- | `--worktree` | Run each task in its own git worktree |
186
- | `--in-progress-status <name>` | Linear status to set when work starts |
187
- | `--done-status <name>` | Linear status to set on successful completion |
188
- | `--done-label <name>` | Linear label to add on successful completion |
189
- | `--create-pr` | Push worker branch + open a GitHub PR on success (needs `--worktree`) |
190
- | `--fix-ci` | After PR opens, re-run task on CI failures until green (needs `--create-pr`) |
193
+ | Option | Description |
194
+ | ------------------------- | ----------------------------------------------------------------------------- |
195
+ | `--linear-team <key>` | Linear team key (e.g. `ENG`) |
196
+ | `--linear-assignee <id>` | Filter by assignee (user id, email, or `me`) |
197
+ | `--poll-interval <s>` | Seconds between Linear polls (default: 60) |
198
+ | `--concurrency <n>` | Max concurrent task loops (default: 1) |
199
+ | `--worktree` | Run each task in its own git worktree |
200
+ | `--indicator <k>:<t>:<v>` | Override a `linear.indicators` entry; repeatable (e.g. `setDone:status:Done`) |
201
+ | `--create-pr` | Push worker branch + open a GitHub PR on success (needs `--worktree`) |
202
+ | `--fix-ci` | After PR opens, re-run task on CI failures until green (needs `--create-pr`) |
191
203
 
192
204
  ## OpenSpec Flow
193
205
 
package/dist/cli/index.js CHANGED
@@ -56407,7 +56407,7 @@ function log(msg) {
56407
56407
  // package.json
56408
56408
  var package_default = {
56409
56409
  name: "@neriros/ralphy",
56410
- version: "2.13.0",
56410
+ version: "2.13.2",
56411
56411
  description: "An iterative AI task execution framework. Orchestrates multi-phase autonomous work using Claude or Codex engines.",
56412
56412
  keywords: [
56413
56413
  "agent",
@@ -70196,23 +70196,7 @@ var RalphyConfigSchema = exports_external.object({
70196
70196
  postComments: exports_external.boolean().default(true),
70197
70197
  updateEveryIterations: exports_external.number().int().nonnegative().default(10),
70198
70198
  indicators: IndicatorsSchema.default({})
70199
- }).passthrough().superRefine((value, ctx) => {
70200
- const LEGACY_KEYS = [
70201
- "statuses",
70202
- "labels",
70203
- "inProgressStatus",
70204
- "doneStatus",
70205
- "doneLabel"
70206
- ];
70207
- const found = LEGACY_KEYS.filter((k) => (k in value));
70208
- if (found.length === 0)
70209
- return;
70210
- ctx.addIssue({
70211
- code: exports_external.ZodIssueCode.custom,
70212
- path: ["linear"],
70213
- message: `legacy linear keys [${found.join(", ")}] cannot be used together with the new ` + `\`linear.indicators\` map \u2014 they describe the same lifecycle and combining them is ` + `not possible. Migrate by moving each legacy key into linear.indicators (e.g. ` + `doneStatus: "Done" \u2192 indicators.setDone: {type: "status", value: "Done"}; ` + `statuses/labels \u2192 indicators.getTodo.filter; inProgressStatus \u2192 indicators.setInProgress; ` + `doneLabel \u2192 indicators.setDone {type: "label", ...}).`
70214
- });
70215
- }).default({ postComments: true, updateEveryIterations: 10, indicators: {} })
70199
+ }).strict().default({ postComments: true, updateEveryIterations: 10, indicators: {} })
70216
70200
  }).default({
70217
70201
  concurrency: 1,
70218
70202
  pollIntervalSeconds: 60,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neriros/ralphy",
3
- "version": "2.13.0",
3
+ "version": "2.13.2",
4
4
  "description": "An iterative AI task execution framework. Orchestrates multi-phase autonomous work using Claude or Codex engines.",
5
5
  "keywords": [
6
6
  "agent",