@drisp/cli 0.5.22 → 0.5.23
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/dist/{WorkflowInstallWizard-IPLYZPLS.js → WorkflowInstallWizard-CCCUR6KA.js} +2 -2
- package/dist/athena-gateway.js +1 -1
- package/dist/{chunk-HXW5N4GE.js → chunk-EC67PEFT.js} +2 -2
- package/dist/{chunk-DSWRVUOO.js → chunk-JHSADKDJ.js} +39 -9
- package/dist/cli.js +4 -4
- package/dist/dashboard-daemon.js +2 -2
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
installWorkflowPlugins,
|
|
9
9
|
resolveWorkflow,
|
|
10
10
|
writeGlobalConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JHSADKDJ.js";
|
|
12
12
|
|
|
13
13
|
// src/setup/steps/WorkflowInstallWizard.tsx
|
|
14
14
|
import { useState, useEffect, useCallback, useRef } from "react";
|
|
@@ -92,4 +92,4 @@ function WorkflowInstallWizard({ source, onDone }) {
|
|
|
92
92
|
export {
|
|
93
93
|
WorkflowInstallWizard as default
|
|
94
94
|
};
|
|
95
|
-
//# sourceMappingURL=WorkflowInstallWizard-
|
|
95
|
+
//# sourceMappingURL=WorkflowInstallWizard-CCCUR6KA.js.map
|
package/dist/athena-gateway.js
CHANGED
|
@@ -2440,7 +2440,7 @@ var cachedVersion = null;
|
|
|
2440
2440
|
function readVersion() {
|
|
2441
2441
|
if (cachedVersion !== null) return cachedVersion;
|
|
2442
2442
|
try {
|
|
2443
|
-
const injected = "0.5.
|
|
2443
|
+
const injected = "0.5.23";
|
|
2444
2444
|
if (typeof injected === "string" && injected.length > 0) {
|
|
2445
2445
|
cachedVersion = injected;
|
|
2446
2446
|
return cachedVersion;
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
resolveWorkflow,
|
|
35
35
|
resolveWorkflowInstall,
|
|
36
36
|
resolveWorkflowPlugins
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-JHSADKDJ.js";
|
|
38
38
|
|
|
39
39
|
// src/infra/daemon/stateDir.ts
|
|
40
40
|
import fs from "fs";
|
|
@@ -18237,4 +18237,4 @@ export {
|
|
|
18237
18237
|
startUdsServer,
|
|
18238
18238
|
sendUdsRequest
|
|
18239
18239
|
};
|
|
18240
|
-
//# sourceMappingURL=chunk-
|
|
18240
|
+
//# sourceMappingURL=chunk-EC67PEFT.js.map
|
|
@@ -1162,7 +1162,7 @@ var DEFAULT_COMPLETION_MARKER = "<!-- WORKFLOW_COMPLETE -->";
|
|
|
1162
1162
|
var DEFAULT_BLOCKED_MARKER = "<!-- WORKFLOW_BLOCKED";
|
|
1163
1163
|
var DEFAULT_TRACKER_PATH = ".athena/{sessionId}/tracker.md";
|
|
1164
1164
|
var TRACKER_SKELETON_MARKER = "<!-- TRACKER_SKELETON -->";
|
|
1165
|
-
var DEFAULT_CONTINUE_PROMPT = "Continue the task. Read the tracker at {trackerPath} for current progress.";
|
|
1165
|
+
var DEFAULT_CONTINUE_PROMPT = "Continue the task. Read the tracker at {trackerPath} for current progress. If the work is complete or blocked, the terminal marker must be the final non-empty line of the tracker; do not write any prose after it.";
|
|
1166
1166
|
function createLoopManager(trackerPath, config) {
|
|
1167
1167
|
let iteration = 0;
|
|
1168
1168
|
let active = true;
|
|
@@ -1175,10 +1175,26 @@ function createLoopManager(trackerPath, config) {
|
|
|
1175
1175
|
return "";
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
1178
|
+
function getNonEmptyLines(content) {
|
|
1179
|
+
return content.trimEnd().split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
|
|
1180
|
+
}
|
|
1181
|
+
function isBlockedLine(line) {
|
|
1182
|
+
return line === `${blockedMarker} -->` || line.startsWith(`${blockedMarker}:`);
|
|
1183
|
+
}
|
|
1184
|
+
function isTerminalMarkerLine(line) {
|
|
1185
|
+
return line === completionMarker || isBlockedLine(line);
|
|
1186
|
+
}
|
|
1178
1187
|
function getTerminalLine(content) {
|
|
1179
|
-
const lines = content
|
|
1188
|
+
const lines = getNonEmptyLines(content);
|
|
1180
1189
|
return lines.at(-1);
|
|
1181
1190
|
}
|
|
1191
|
+
function getMisplacedTerminalMarker(content) {
|
|
1192
|
+
const lines = getNonEmptyLines(content);
|
|
1193
|
+
if (lines.length < 2) return void 0;
|
|
1194
|
+
const terminalLine = lines.at(-1);
|
|
1195
|
+
if (terminalLine && isTerminalMarkerLine(terminalLine)) return void 0;
|
|
1196
|
+
return lines.slice(0, -1).find(isTerminalMarkerLine);
|
|
1197
|
+
}
|
|
1182
1198
|
function extractBlockedReason(line) {
|
|
1183
1199
|
if (!line.startsWith(blockedMarker)) return void 0;
|
|
1184
1200
|
const afterMarker = line.slice(blockedMarker.length);
|
|
@@ -1189,8 +1205,9 @@ function createLoopManager(trackerPath, config) {
|
|
|
1189
1205
|
const content = readTracker();
|
|
1190
1206
|
const terminalLine = getTerminalLine(content);
|
|
1191
1207
|
const completed = terminalLine === completionMarker;
|
|
1192
|
-
const blocked = terminalLine !== void 0 && (terminalLine
|
|
1208
|
+
const blocked = terminalLine !== void 0 && isBlockedLine(terminalLine);
|
|
1193
1209
|
const blockedReason = blocked && terminalLine ? extractBlockedReason(terminalLine) : void 0;
|
|
1210
|
+
const misplacedTerminalMarker = getMisplacedTerminalMarker(content);
|
|
1194
1211
|
const reachedLimit = iteration >= config.maxIterations;
|
|
1195
1212
|
const skeletonNotReplaced = content.includes(TRACKER_SKELETON_MARKER);
|
|
1196
1213
|
return {
|
|
@@ -1202,6 +1219,7 @@ function createLoopManager(trackerPath, config) {
|
|
|
1202
1219
|
completed,
|
|
1203
1220
|
blocked,
|
|
1204
1221
|
blockedReason,
|
|
1222
|
+
misplacedTerminalMarker,
|
|
1205
1223
|
reachedLimit,
|
|
1206
1224
|
skeletonNotReplaced
|
|
1207
1225
|
};
|
|
@@ -1271,15 +1289,17 @@ After completing meaningful work, update the tracker:
|
|
|
1271
1289
|
|
|
1272
1290
|
When all steps are complete:
|
|
1273
1291
|
1. Update the tracker with all steps checked off
|
|
1274
|
-
2.
|
|
1275
|
-
3.
|
|
1292
|
+
2. Put any final summary or outcome notes above the terminal marker
|
|
1293
|
+
3. Add \`${DEFAULT_COMPLETION_MARKER}\` as the final non-empty line of the tracker file
|
|
1294
|
+
4. Do not write any tracker content after the terminal marker
|
|
1276
1295
|
|
|
1277
1296
|
### Blocked
|
|
1278
1297
|
|
|
1279
1298
|
If you are blocked and cannot make further progress:
|
|
1280
1299
|
1. Document what is blocking you in the Notes section
|
|
1281
|
-
2.
|
|
1282
|
-
3.
|
|
1300
|
+
2. Explain what needs to happen to unblock the task whenever possible above the terminal marker
|
|
1301
|
+
3. Add \`${DEFAULT_BLOCKED_CLOSED_MARKER}\` or \`${DEFAULT_BLOCKED_REASON_MARKER}\` as the final non-empty line of the tracker file
|
|
1302
|
+
4. Do not write any tracker content after the terminal marker
|
|
1283
1303
|
`;
|
|
1284
1304
|
function ensureSystemPromptFile() {
|
|
1285
1305
|
const dir = path5.join(
|
|
@@ -1693,7 +1713,7 @@ import fs10 from "fs";
|
|
|
1693
1713
|
import path8 from "path";
|
|
1694
1714
|
|
|
1695
1715
|
// src/core/workflows/stateMachine.md
|
|
1696
|
-
var stateMachine_default = "# Stateless Turn Protocol\n\nYou run in a stateless loop. Each Turn is a fresh process with no memory of prior Turns. **The tracker file is your only continuity** \u2014 read it, work, write it. Assume interruption: the runner may kill a long Turn, your context may collapse under tool output, you may hit token limits mid-task. Anything not in the tracker is gone.\n\n## First action, every Turn\n\n1. Read the tracker at the configured path (default: `.athena/<session_id>/tracker.md`). The runner provides the session ID \u2014 do not invent one.\n2. If the tracker contains `<!-- TRACKER_SKELETON -->` \u2192 this is Turn 1, run [**Orient**](#orient-turn-1).\n3. Otherwise \u2192 this is a continuation, run [**Execute**](#execute-turn-2) from where the tracker says, not from the start of the flow.\n\nReading first prevents two failure modes that waste whole Turns: redoing work already done, or contradicting decisions a prior Turn made.\n\n## Tracker contract\n\nThe tracker must always answer four questions:\n\n1. What are we trying to accomplish?\n2. What has been done?\n3. What's left?\n4. What should the next Turn do first?\n\nA future Turn has no other context. If something isn't here, it doesn't exist. Section headings may vary by workflow, but these four answers must be explicit and easy to find.\n\n### Terminal markers\n\nDefault markers (workflows may override \u2014 use the markers configured for the active workflow):\n\n- `<!-- WORKFLOW_COMPLETE -->` \u2014 all work done and verified\n- `<!-- WORKFLOW_BLOCKED -->` or `<!-- WORKFLOW_BLOCKED: reason -->` \u2014 cannot proceed without external intervention\n\nRules:\n\n- Only the last non-empty line of the tracker is authoritative. Marker-like text in notes, examples, or quoted instructions earlier in the file is ignored.\n- The runner trusts markers unconditionally. A premature marker ends the loop with no automatic recovery \u2014 write one only when its criteria are fully met.\n- Include a concrete reason after `WORKFLOW_BLOCKED:` whenever possible; the bare form is still valid.\n\n## Phases\n\n### Orient (Turn 1)\n\n1. **Replace the skeleton immediately**, before any domain work. Even a three-line tracker (goal + \"orienting\") protects you if the Turn dies during setup.\n2. Identify and load the applicable workflow skills before doing domain work. If a workflow, plugin, or local skill table names a relevant skill, read it fully and follow it. Do not assume you already know the workflow's conventions, tool sequence, quality gates, or implementation details.\n3. Use a dedicated git worktree for repository-changing work. If you are not already inside a task-specific worktree, create or enter one before editing files, record its branch/path in the tracker, and continue there. Skip this only when the workflow explicitly forbids it or the task is read-only.\n4. Run the workflow's orientation steps exactly as written. These vary by domain \u2014 a test-writing workflow explores the product in a browser; a migration workflow audits the schema. The workflow defines what orientation means. Do not skip, reorder, reinterpret, or replace workflow steps with a generic approach unless the workflow explicitly allows it or the tracker records a concrete blocker that makes the written step impossible.\n5. Refine the tracker into a granular plan. Each task a concrete, verifiable unit of work, including verification steps (running checks, reviewing output) \u2014 not just implementation. Vague tasks (\"write tests\") cannot be meaningfully resumed by a future Turn that has no idea what they mean here.\n6. Record concrete observations \u2014 what you actually saw, not what you assumed. Wrong assumptions burn entire future Turns on rework.\n7. **Single-Turn requests still go through this phase.** If the entire request is satisfied in one Turn, write a minimal tracker (what was asked, what was done, the outcome) and append `<!-- WORKFLOW_COMPLETE -->`. Leaving the skeleton in place causes the runner to classify the Turn as a failure.\n\n### Execute (Turn 2+)\n\n- Work from where the tracker says, in the workflow's prescribed sequence. Not every Turn covers every step.\n- Be strict with workflow steps. Before starting each unit, identify the next required workflow step from the workflow document and tracker, follow it as written, and record completion or blockers against that step. Do not substitute your own process, collapse separate gates into one, or advance past an unchecked step.\n- Be strict with skills. Before each new activity, check the workflow, plugin metadata, local skill table, and tracker for relevant skills. Load the appropriate skill first, read it completely, and follow its instructions. If no skill applies, record that explicitly in the tracker before proceeding. Skills carry the implementation detail (scaffolding steps, locator rules, anti-patterns, code templates) that this protocol intentionally doesn't repeat.\n- Keep repository work inside the recorded git worktree. If a continuation Turn starts outside the recorded worktree, enter it before editing. If no worktree is recorded and edits are still required, create or enter one before proceeding.\n- Delegate heavy exploration or generation to subagents via the Task tool. Pass file paths, conventions, and concrete output expectations; tell them which skill to load. Respect the workflow's **delegation constraints** \u2014 some operations must run in the main agent because their output is proof, or because the main agent needs to interpret results in context.\n- Run quality gates in order. Do not skip \u2014 they exist because skipping cascades into rework. On a failing verdict, address the issues and re-run before proceeding. Respect the workflow's **retry limits**: repeated failure usually signals a deeper issue another retry won't fix.\n\n### End\n\n1. Tracker reflects all progress, discoveries, and blockers.\n2. Tracker says clearly what the next Turn should do first.\n3. If all work is verified: append the completion marker.\n4. If an unrecoverable blocker prevents progress: append the blocked marker, with a reason if you have one.\n\n## When to write the tracker\n\nWrite on **concrete triggers**, not on a vague sense of \"meaningful progress.\" The right cadence sits between every-tool-call (noisy log, wastes tokens) and end-of-Turn (everything lost if you die mid-task).\n\n- **Discrete unit done** \u2014 file written, fix applied, test run, gate passed. Reflect the new reality before starting the next unit.\n- **Insight learned** \u2014 API quirk, config field that turned out to matter, dead end ruled out, decision between two approaches. Insights are tracker-worthy even when no code changed; rediscovering them costs the next Turn a full re-exploration. The tracker is a knowledge ledger, not just a task log.\n- **About to do something risky or long-running** \u2014 subagent dispatch, long build, flaky external call, large refactor. Write _first_, then act. If the operation kills your Turn, only what's on disk survives.\n- **Plan changed** \u2014 task resequenced, new task surfaced, planned task no longer needed. Stale plans poison continuation Turns.\n- **You haven't written in a while** \u2014 if you can't remember the last update, you've gone too long. A short defensive update (\"doing X, last completed Y, next is Z\") beats nothing.\n\nEach update covers: what changed (work or knowledge), what's now next, and any caveat the next Turn needs. Don't transcribe tool calls \u2014 the tracker is a contract with your future self, not a replay log.\n\nThe cost of one extra tracker update is a few tokens. The cost of dying without one is a whole wasted Turn. Bias toward writing.\n\n## Task UI projection\n\nThe tracker is the durable source of truth. Your harness's task tools are a Turn-scoped UI projection of the same plan, shown to the user in their CLI widget. They do not survive process exit.\n\n{{TASK_TOOL_INSTRUCTIONS}}\n\n- **Turn 1, after orientation:** project the tracker's task plan into the task tools.\n- **Turn 2+, after reading the tracker:** recreate the projection from the tracker; do not assume task IDs from prior Turns still exist.\n- **During work:** update both \u2014 the task tools for immediate UI feedback, the tracker for persistence \u2014 in the same working phase.\n\n## Turn bounding\n\nEach fresh Turn starts with a clean context window and a compact tracker \u2014 effectively self-compaction. As you work, context fills with tool outputs and intermediate state. The longer you run, the more attention is spread across tokens that are no longer relevant, degrading precision on the work that matters now.\n\nWork a bounded chunk per Turn. Ending early and letting the next Turn pick up from a clean tracker is almost always better than pushing through with a heavy context. Natural checkpoints:\n\n- After a quality gate\n- After crossing multiple phases (explored \u2192 planned \u2192 wrote specs) \u2014 stop before pushing into the next\n- When your context is visibly heavy with tool output from earlier work\n\n## Quick reference\n\n- [ ] Read the tracker before doing anything else\n- [ ] Replace the skeleton immediately, even for single-Turn requests\n- [ ] Update on concrete triggers \u2014 unit done, insight learned, risky op pending, plan changed\n- [ ] Project the tracker plan into task tools at Turn start; keep both in sync as work lands\n- [ ] Follow the workflow steps as written; do not skip, reorder, or substitute your own process\n- [ ] Load the appropriate skill before each activity; do not rely on assumed knowledge\n- [ ] Use and record a dedicated git worktree for repository-changing work\n- [ ] Run quality gates in order; respect delegation constraints and retry limits\n- [ ] Write the completion marker only when all work is verified\n- [ ] Checkpoint and end before context goes stale\n";
|
|
1716
|
+
var stateMachine_default = "# Stateless Turn Protocol\n\nYou run in a stateless loop. Each Turn is a fresh process with no memory of prior Turns. **The tracker file is your only continuity** \u2014 read it, work, write it. Assume interruption: the runner may kill a long Turn, your context may collapse under tool output, you may hit token limits mid-task. Anything not in the tracker is gone.\n\n## First action, every Turn\n\n1. Read the tracker at the configured path (default: `.athena/<session_id>/tracker.md`). The runner provides the session ID \u2014 do not invent one.\n2. If the tracker contains `<!-- TRACKER_SKELETON -->` \u2192 this is Turn 1, run [**Orient**](#orient-turn-1).\n3. Otherwise \u2192 this is a continuation, run [**Execute**](#execute-turn-2) from where the tracker says, not from the start of the flow.\n\nReading first prevents two failure modes that waste whole Turns: redoing work already done, or contradicting decisions a prior Turn made.\n\n## Tracker contract\n\nThe tracker must always answer four questions:\n\n1. What are we trying to accomplish?\n2. What has been done?\n3. What's left?\n4. What should the next Turn do first?\n\nA future Turn has no other context. If something isn't here, it doesn't exist. Section headings may vary by workflow, but these four answers must be explicit and easy to find.\n\n### Terminal markers\n\nDefault markers (workflows may override \u2014 use the markers configured for the active workflow):\n\n- `<!-- WORKFLOW_COMPLETE -->` \u2014 all work done and verified\n- `<!-- WORKFLOW_BLOCKED -->` or `<!-- WORKFLOW_BLOCKED: reason -->` \u2014 cannot proceed without external intervention\n\nRules:\n\n- Only the last non-empty line of the tracker is authoritative. Marker-like text in notes, examples, or quoted instructions earlier in the file is ignored.\n- When you write a terminal marker, it must be the final non-empty line of the tracker. Put every summary, status note, and next-step sentence before the marker. Never append prose after it.\n- The runner trusts markers unconditionally. A premature marker ends the loop with no automatic recovery \u2014 write one only when its criteria are fully met.\n- Include a concrete reason after `WORKFLOW_BLOCKED:` whenever possible; the bare form is still valid.\n\n## Phases\n\n### Orient (Turn 1)\n\n1. **Replace the skeleton immediately**, before any domain work. Even a three-line tracker (goal + \"orienting\") protects you if the Turn dies during setup.\n2. Identify and load the applicable workflow skills before doing domain work. If a workflow, plugin, or local skill table names a relevant skill, read it fully and follow it. Do not assume you already know the workflow's conventions, tool sequence, quality gates, or implementation details.\n3. Use a dedicated git worktree for repository-changing work. If you are not already inside a task-specific worktree, create or enter one before editing files, record its branch/path in the tracker, and continue there. Skip this only when the workflow explicitly forbids it or the task is read-only.\n4. Run the workflow's orientation steps exactly as written. These vary by domain \u2014 a test-writing workflow explores the product in a browser; a migration workflow audits the schema. The workflow defines what orientation means. Do not skip, reorder, reinterpret, or replace workflow steps with a generic approach unless the workflow explicitly allows it or the tracker records a concrete blocker that makes the written step impossible.\n5. Refine the tracker into a granular plan. Each task a concrete, verifiable unit of work, including verification steps (running checks, reviewing output) \u2014 not just implementation. Vague tasks (\"write tests\") cannot be meaningfully resumed by a future Turn that has no idea what they mean here.\n6. Record concrete observations \u2014 what you actually saw, not what you assumed. Wrong assumptions burn entire future Turns on rework.\n7. **Single-Turn requests still go through this phase.** If the entire request is satisfied in one Turn, write a minimal tracker (what was asked, what was done, the outcome) and append `<!-- WORKFLOW_COMPLETE -->`. Leaving the skeleton in place causes the runner to classify the Turn as a failure.\n\n### Execute (Turn 2+)\n\n- Work from where the tracker says, in the workflow's prescribed sequence. Not every Turn covers every step.\n- Be strict with workflow steps. Before starting each unit, identify the next required workflow step from the workflow document and tracker, follow it as written, and record completion or blockers against that step. Do not substitute your own process, collapse separate gates into one, or advance past an unchecked step.\n- Be strict with skills. Before each new activity, check the workflow, plugin metadata, local skill table, and tracker for relevant skills. Load the appropriate skill first, read it completely, and follow its instructions. If no skill applies, record that explicitly in the tracker before proceeding. Skills carry the implementation detail (scaffolding steps, locator rules, anti-patterns, code templates) that this protocol intentionally doesn't repeat.\n- Keep repository work inside the recorded git worktree. If a continuation Turn starts outside the recorded worktree, enter it before editing. If no worktree is recorded and edits are still required, create or enter one before proceeding.\n- Delegate heavy exploration or generation to subagents via the Task tool. Pass file paths, conventions, and concrete output expectations; tell them which skill to load. Respect the workflow's **delegation constraints** \u2014 some operations must run in the main agent because their output is proof, or because the main agent needs to interpret results in context.\n- Run quality gates in order. Do not skip \u2014 they exist because skipping cascades into rework. On a failing verdict, address the issues and re-run before proceeding. Respect the workflow's **retry limits**: repeated failure usually signals a deeper issue another retry won't fix.\n\n### End\n\n1. Tracker reflects all progress, discoveries, and blockers.\n2. Tracker says clearly what the next Turn should do first.\n3. If all work is verified: append the completion marker as the final non-empty line.\n4. If an unrecoverable blocker prevents progress: append the blocked marker as the final non-empty line, with a reason if you have one.\n\n## When to write the tracker\n\nWrite on **concrete triggers**, not on a vague sense of \"meaningful progress.\" The right cadence sits between every-tool-call (noisy log, wastes tokens) and end-of-Turn (everything lost if you die mid-task).\n\n- **Discrete unit done** \u2014 file written, fix applied, test run, gate passed. Reflect the new reality before starting the next unit.\n- **Insight learned** \u2014 API quirk, config field that turned out to matter, dead end ruled out, decision between two approaches. Insights are tracker-worthy even when no code changed; rediscovering them costs the next Turn a full re-exploration. The tracker is a knowledge ledger, not just a task log.\n- **About to do something risky or long-running** \u2014 subagent dispatch, long build, flaky external call, large refactor. Write _first_, then act. If the operation kills your Turn, only what's on disk survives.\n- **Plan changed** \u2014 task resequenced, new task surfaced, planned task no longer needed. Stale plans poison continuation Turns.\n- **You haven't written in a while** \u2014 if you can't remember the last update, you've gone too long. A short defensive update (\"doing X, last completed Y, next is Z\") beats nothing.\n\nEach update covers: what changed (work or knowledge), what's now next, and any caveat the next Turn needs. Don't transcribe tool calls \u2014 the tracker is a contract with your future self, not a replay log.\n\nThe cost of one extra tracker update is a few tokens. The cost of dying without one is a whole wasted Turn. Bias toward writing.\n\n## Task UI projection\n\nThe tracker is the durable source of truth. Your harness's task tools are a Turn-scoped UI projection of the same plan, shown to the user in their CLI widget. They do not survive process exit.\n\n{{TASK_TOOL_INSTRUCTIONS}}\n\n- **Turn 1, after orientation:** project the tracker's task plan into the task tools.\n- **Turn 2+, after reading the tracker:** recreate the projection from the tracker; do not assume task IDs from prior Turns still exist.\n- **During work:** update both \u2014 the task tools for immediate UI feedback, the tracker for persistence \u2014 in the same working phase.\n\n## Turn bounding\n\nEach fresh Turn starts with a clean context window and a compact tracker \u2014 effectively self-compaction. As you work, context fills with tool outputs and intermediate state. The longer you run, the more attention is spread across tokens that are no longer relevant, degrading precision on the work that matters now.\n\nWork a bounded chunk per Turn. Ending early and letting the next Turn pick up from a clean tracker is almost always better than pushing through with a heavy context. Natural checkpoints:\n\n- After a quality gate\n- After crossing multiple phases (explored \u2192 planned \u2192 wrote specs) \u2014 stop before pushing into the next\n- When your context is visibly heavy with tool output from earlier work\n\n## Quick reference\n\n- [ ] Read the tracker before doing anything else\n- [ ] Replace the skeleton immediately, even for single-Turn requests\n- [ ] Update on concrete triggers \u2014 unit done, insight learned, risky op pending, plan changed\n- [ ] Project the tracker plan into task tools at Turn start; keep both in sync as work lands\n- [ ] Follow the workflow steps as written; do not skip, reorder, or substitute your own process\n- [ ] Load the appropriate skill before each activity; do not rely on assumed knowledge\n- [ ] Use and record a dedicated git worktree for repository-changing work\n- [ ] Run quality gates in order; respect delegation constraints and retry limits\n- [ ] Write the completion marker only when all work is verified, and make it the final non-empty line\n- [ ] Checkpoint and end before context goes stale\n";
|
|
1697
1717
|
|
|
1698
1718
|
// src/core/workflows/stateMachine.ts
|
|
1699
1719
|
function buildTaskToolInstructions(harness) {
|
|
@@ -1839,6 +1859,13 @@ function shouldContinueWorkflowRun(state) {
|
|
|
1839
1859
|
maxIterations: loopState.maxIterations
|
|
1840
1860
|
};
|
|
1841
1861
|
}
|
|
1862
|
+
if (loopState.misplacedTerminalMarker) {
|
|
1863
|
+
cleanupWorkflowRun(state);
|
|
1864
|
+
return {
|
|
1865
|
+
reason: "misplaced_terminal_marker",
|
|
1866
|
+
maxIterations: loopState.maxIterations
|
|
1867
|
+
};
|
|
1868
|
+
}
|
|
1842
1869
|
let reason;
|
|
1843
1870
|
if (loopState.completed) {
|
|
1844
1871
|
reason = "completed";
|
|
@@ -2046,6 +2073,9 @@ function createWorkflowRunner(input) {
|
|
|
2046
2073
|
} else if (loopStop.reason === "skeleton_not_replaced") {
|
|
2047
2074
|
status = "failed";
|
|
2048
2075
|
stopReason = "tracker skeleton was never replaced \u2014 Claude did not bootstrap the tracker";
|
|
2076
|
+
} else if (loopStop.reason === "misplaced_terminal_marker") {
|
|
2077
|
+
status = "failed";
|
|
2078
|
+
stopReason = "terminal workflow marker is not the final non-empty line of the tracker; move all summary text above the marker";
|
|
2049
2079
|
} else {
|
|
2050
2080
|
status = "failed";
|
|
2051
2081
|
stopReason = `Loop stopped: ${loopStop.reason}`;
|
|
@@ -2244,4 +2274,4 @@ export {
|
|
|
2244
2274
|
compileWorkflowPlan,
|
|
2245
2275
|
collectMcpServersWithOptions
|
|
2246
2276
|
};
|
|
2247
|
-
//# sourceMappingURL=chunk-
|
|
2277
|
+
//# sourceMappingURL=chunk-JHSADKDJ.js.map
|
package/dist/cli.js
CHANGED
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
writeAttachmentMirror,
|
|
98
98
|
writeGatewayClientConfig,
|
|
99
99
|
wsClientOptionsForEndpoint
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-EC67PEFT.js";
|
|
101
101
|
import {
|
|
102
102
|
generateId as generateId2
|
|
103
103
|
} from "./chunk-BTKQ67RE.js";
|
|
@@ -158,7 +158,7 @@ import {
|
|
|
158
158
|
useWorkflowSessionController,
|
|
159
159
|
writeGlobalConfig,
|
|
160
160
|
writeProjectConfig
|
|
161
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-JHSADKDJ.js";
|
|
162
162
|
|
|
163
163
|
// src/app/entry/cli.tsx
|
|
164
164
|
import { render } from "ink";
|
|
@@ -12697,7 +12697,7 @@ var cachedVersion = null;
|
|
|
12697
12697
|
function readPackageVersion() {
|
|
12698
12698
|
if (cachedVersion !== null) return cachedVersion;
|
|
12699
12699
|
try {
|
|
12700
|
-
const injected = "0.5.
|
|
12700
|
+
const injected = "0.5.23";
|
|
12701
12701
|
if (typeof injected === "string" && injected.length > 0) {
|
|
12702
12702
|
cachedVersion = injected;
|
|
12703
12703
|
return cachedVersion;
|
|
@@ -15444,7 +15444,7 @@ Available commands: ${[...KNOWN_COMMANDS].join(", ")}`
|
|
|
15444
15444
|
await exitWith(1);
|
|
15445
15445
|
return;
|
|
15446
15446
|
}
|
|
15447
|
-
const { default: WorkflowInstallWizard } = await import("./WorkflowInstallWizard-
|
|
15447
|
+
const { default: WorkflowInstallWizard } = await import("./WorkflowInstallWizard-CCCUR6KA.js");
|
|
15448
15448
|
const { waitUntilExit } = render(
|
|
15449
15449
|
/* @__PURE__ */ jsx25(
|
|
15450
15450
|
WorkflowInstallWizard,
|
package/dist/dashboard-daemon.js
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
ensureDaemonStateDir,
|
|
4
4
|
runDashboardRuntimeDaemon,
|
|
5
5
|
startUdsServer
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EC67PEFT.js";
|
|
7
7
|
import "./chunk-BTKQ67RE.js";
|
|
8
8
|
import {
|
|
9
9
|
readDashboardClientConfig,
|
|
10
10
|
refreshDashboardAccessToken
|
|
11
11
|
} from "./chunk-BTY7MYYT.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-JHSADKDJ.js";
|
|
13
13
|
|
|
14
14
|
// src/infra/daemon/logFile.ts
|
|
15
15
|
import fs from "fs";
|