spec-and-loop 3.0.3 → 3.3.0

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.
@@ -52,6 +52,10 @@ function read(ralphDir) {
52
52
  * @param {Array} entry.toolUsage - Tool usage summary array
53
53
  * @param {Array} entry.filesChanged - Files changed in this iteration
54
54
  * @param {number} entry.exitCode - OpenCode exit code
55
+ * @param {boolean} [entry.blockedHandoffDetected] - Whether the iteration emitted
56
+ * the configured blocked-handoff promise and stopped for operator action.
57
+ * @param {string} [entry.blockedHandoffNote] - Compact, single-line preview of
58
+ * the extracted blocker note. The full note is persisted in HANDOFF.md.
55
59
  * @param {number} [entry.promptBytes] - UTF-8 byte length of the assembled prompt
56
60
  * @param {number} [entry.promptChars] - Character length of the assembled prompt
57
61
  * @param {number} [entry.promptTokens] - Estimated token count for the prompt (chars/4, rounded)
@@ -35,6 +35,7 @@ const prompt = require('./prompt');
35
35
  * @param {number} [options.maxIterations] - Maximum iterations (default: 50)
36
36
  * @param {string} [options.completionPromise] - Promise string signaling loop completion (default: "COMPLETE")
37
37
  * @param {string} [options.taskPromise] - Promise string signaling task completion (default: "READY_FOR_NEXT_TASK")
38
+ * @param {string} [options.blockedHandoffPromise] - Promise string signaling the agent is blocked and requesting human handoff (default: "BLOCKED_HANDOFF")
38
39
  * @param {boolean} [options.tasksMode] - Enable tasks mode (default: false)
39
40
  * @param {string} [options.tasksFile] - Path to tasks file when tasksMode is true
40
41
  * @param {boolean} [options.noCommit] - Suppress auto-commit (default: false)
@@ -20,7 +20,6 @@
20
20
  * errors ("no prompt source configured", "prompt file
21
21
  * not found", "prompt file is empty") do not fire.
22
22
  * {{tasks}} - Raw tasks file content
23
- * {{task_context}} - Fresh current-task and completed-task summary
24
23
  * {{task_promise}} - Configured task promise string
25
24
  * {{completion_promise}} - Configured completion promise string
26
25
  * {{commit_contract}} - Commit instructions derived from options.noCommit
@@ -37,7 +36,6 @@
37
36
 
38
37
  const fs = require('fs');
39
38
  const path = require('path');
40
- const tasks = require('./tasks');
41
39
 
42
40
  // One-time fallback notice flag for invalid RALPH_BASE_PROMPT_WARN_BYTES
43
41
  let _warnBytesInvalidNoticed = false;
@@ -159,15 +157,12 @@ function render(options, iteration) {
159
157
  tasksContent = fs.readFileSync(options.tasksFile, 'utf8');
160
158
  }
161
159
 
162
- const taskContext = options.tasksFile ? tasks.taskContext(options.tasksFile) : '';
163
-
164
160
  const vars = {
165
161
  iteration: String(iteration),
166
162
  max_iterations: String(options.maxIterations || 50),
167
163
  change_dir: options.changeDir || '',
168
164
  base_prompt: base,
169
165
  tasks: tasksContent,
170
- task_context: taskContext,
171
166
  task_promise: options.taskPromise || 'READY_FOR_NEXT_TASK',
172
167
  completion_promise: options.completionPromise || 'COMPLETE',
173
168
  commit_contract: options.noCommit