@skj1724/oh-my-opencode 3.17.11 → 3.17.13
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/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-16.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-17.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-18.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-19.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/packages/pkg-one/src/file-20.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-01.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-02.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-03.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-04.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-05.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-06.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-07.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-08.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-09.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/app/file-10.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-11.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-12.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-13.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-14.d.ts +1 -0
- package/dist/__tests__/perf/fixtures/in-tree/src/lib/file-15.d.ts +1 -0
- package/dist/cli/index.js +10 -10
- package/dist/features/background-agent/process-cleanup.test-helpers.d.ts +4 -0
- package/dist/features/claude-code-command-loader/loader-cache.d.ts +6 -0
- package/dist/features/team-mode/team-layout-tmux/index.d.ts +1 -0
- package/dist/features/team-mode/team-layout-tmux/layout.d.ts +15 -0
- package/dist/hooks/agent-usage-reminder/constants.d.ts +1 -1
- package/dist/hooks/atlas/system-reminder-templates.d.ts +2 -2
- package/dist/hooks/auto-update-checker/hook/deferred-startup-check.d.ts +1 -0
- package/dist/hooks/comment-checker/initialization-gate.d.ts +1 -0
- package/dist/hooks/compaction-context-injector/constants.d.ts +1 -1
- package/dist/hooks/keyword-detector/ultrawork/default.d.ts +1 -1
- package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +1 -1
- package/dist/hooks/rules-injector/rule-scan-cache.d.ts +6 -0
- package/dist/hooks/session-notification-init.d.ts +7 -0
- package/dist/hooks/sisyphus-junior-notepad/constants.d.ts +1 -1
- package/dist/hooks/tasks-todowrite-disabler/constants.d.ts +1 -1
- package/dist/hooks/todo-description-override/description.d.ts +1 -1
- package/dist/index.js +716 -716
- package/dist/shared/excluded-dirs.d.ts +1 -0
- package/dist/shared/tmux/tmux-utils/index.d.ts +1 -0
- package/dist/shared/tmux/tmux-utils/session-kill.d.ts +1 -0
- package/dist/shared/tmux/tmux-utils/spawn-process.d.ts +1 -0
- package/dist/shared/tmux/tmux-utils/stale-session-sweep.d.ts +11 -0
- package/dist/tools/skill/session-skill-cache.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -65553,12 +65553,12 @@ var HOOK_NAME = "todo-continuation-enforcer";
|
|
|
65553
65553
|
var DEFAULT_SKIP_AGENTS = ["prometheus", "compaction", "plan"];
|
|
65554
65554
|
var CONTINUATION_PROMPT = `${createSystemDirective(SystemDirectiveTypes.TODO_CONTINUATION)}
|
|
65555
65555
|
|
|
65556
|
-
|
|
65556
|
+
Incomplete tasks remain in your todo list. Continue working on the next pending task.
|
|
65557
65557
|
|
|
65558
|
-
-
|
|
65559
|
-
-
|
|
65560
|
-
-
|
|
65561
|
-
-
|
|
65558
|
+
- Proceed without asking for permission
|
|
65559
|
+
- Mark each task complete when finished
|
|
65560
|
+
- Do not stop until all tasks are done
|
|
65561
|
+
- If you believe all work is already complete, the system is questioning your completion claim. Critically re-examine each todo item from a skeptical perspective, verify the work was actually done correctly, and update the todo list accordingly.`;
|
|
65562
65562
|
var COUNTDOWN_SECONDS = 2;
|
|
65563
65563
|
var TOAST_DURATION_MS = 900;
|
|
65564
65564
|
var COUNTDOWN_GRACE_PERIOD_MS = 500;
|
|
@@ -66145,8 +66145,8 @@ ${todoList}`;
|
|
|
66145
66145
|
async function showCountdownToast(ctx, seconds, incompleteCount) {
|
|
66146
66146
|
await ctx.client.tui.showToast({
|
|
66147
66147
|
body: {
|
|
66148
|
-
title: "
|
|
66149
|
-
message:
|
|
66148
|
+
title: "Todo Continuation",
|
|
66149
|
+
message: `Resuming in ${seconds}s... (${incompleteCount} tasks remaining)`,
|
|
66150
66150
|
variant: "warning",
|
|
66151
66151
|
duration: TOAST_DURATION_MS
|
|
66152
66152
|
}
|
|
@@ -66761,9 +66761,9 @@ function createContextReminder(actualLimit) {
|
|
|
66761
66761
|
const limitTokens = actualLimit.toLocaleString();
|
|
66762
66762
|
return `${createSystemDirective(SystemDirectiveTypes.CONTEXT_WINDOW_MONITOR)}
|
|
66763
66763
|
|
|
66764
|
-
|
|
66765
|
-
|
|
66766
|
-
|
|
66764
|
+
You are using a ${limitTokens}-token context window.
|
|
66765
|
+
You still have context remaining - do NOT rush or skip tasks.
|
|
66766
|
+
Complete your work thoroughly and methodically.`;
|
|
66767
66767
|
}
|
|
66768
66768
|
function createContextWindowMonitorHook(_ctx, modelCacheState) {
|
|
66769
66769
|
const remindedSessions = new Set;
|
|
@@ -69282,14 +69282,14 @@ function createDirectoryReadmeInjectorHook(ctx, modelCacheState) {
|
|
|
69282
69282
|
};
|
|
69283
69283
|
}
|
|
69284
69284
|
// src/hooks/empty-task-response-detector.ts
|
|
69285
|
-
var EMPTY_RESPONSE_WARNING = `[
|
|
69285
|
+
var EMPTY_RESPONSE_WARNING = `[Task Empty Response Warning]
|
|
69286
69286
|
|
|
69287
|
-
|
|
69288
|
-
-
|
|
69289
|
-
-
|
|
69290
|
-
-
|
|
69287
|
+
Task invocation completed but returned no response. This indicates the agent either:
|
|
69288
|
+
- Failed to execute properly
|
|
69289
|
+
- Did not terminate correctly
|
|
69290
|
+
- Returned an empty result
|
|
69291
69291
|
|
|
69292
|
-
|
|
69292
|
+
Note: The call has already completed - you are NOT waiting for a response. Proceed accordingly.`;
|
|
69293
69293
|
function createEmptyTaskResponseDetectorHook(_ctx) {
|
|
69294
69294
|
return {
|
|
69295
69295
|
"tool.execute.after": async (input, output) => {
|
|
@@ -70378,8 +70378,8 @@ async function executeCompact(sessionID, msg, autoCompactState, client, director
|
|
|
70378
70378
|
if (autoCompactState.compactionInProgress.has(sessionID)) {
|
|
70379
70379
|
await client.tui.showToast({
|
|
70380
70380
|
body: {
|
|
70381
|
-
title: "
|
|
70382
|
-
message: "
|
|
70381
|
+
title: "Compact In Progress",
|
|
70382
|
+
message: "Recovery already running. Please wait or start new session if stuck.",
|
|
70383
70383
|
variant: "warning",
|
|
70384
70384
|
duration: 5000
|
|
70385
70385
|
}
|
|
@@ -70777,8 +70777,8 @@ function createAnthropicContextWindowLimitRecoveryHook(ctx, options) {
|
|
|
70777
70777
|
const modelID = parsed.modelID ?? lastAssistantInfo?.modelID;
|
|
70778
70778
|
await ctx.client.tui.showToast({
|
|
70779
70779
|
body: {
|
|
70780
|
-
title: "
|
|
70781
|
-
message: "
|
|
70780
|
+
title: "Context Limit Hit",
|
|
70781
|
+
message: "Truncating large tool outputs and recovering...",
|
|
70782
70782
|
variant: "warning",
|
|
70783
70783
|
duration: 3000
|
|
70784
70784
|
}
|
|
@@ -70826,8 +70826,8 @@ function createAnthropicContextWindowLimitRecoveryHook(ctx, options) {
|
|
|
70826
70826
|
const modelID = errorData?.modelID ?? lastAssistantInfo?.modelID;
|
|
70827
70827
|
await ctx.client.tui.showToast({
|
|
70828
70828
|
body: {
|
|
70829
|
-
title: "
|
|
70830
|
-
message: "Token
|
|
70829
|
+
title: "Auto Compact",
|
|
70830
|
+
message: "Token limit exceeded. Attempting recovery...",
|
|
70831
70831
|
variant: "warning",
|
|
70832
70832
|
duration: 3000
|
|
70833
70833
|
}
|
|
@@ -71229,8 +71229,8 @@ async function applyFallbackToChatMessage(params) {
|
|
|
71229
71229
|
lastToastKey.set(sessionID, key);
|
|
71230
71230
|
const variantLabel = fallback.variant ? ` (${fallback.variant})` : "";
|
|
71231
71231
|
await Promise.resolve(toast({
|
|
71232
|
-
title: "
|
|
71233
|
-
message:
|
|
71232
|
+
title: "Model fallback",
|
|
71233
|
+
message: `Using ${fallback.providerID}/${fallback.modelID}${variantLabel}`,
|
|
71234
71234
|
variant: "warning",
|
|
71235
71235
|
duration: 5000
|
|
71236
71236
|
}));
|
|
@@ -72650,8 +72650,8 @@ function createToolExecuteAfterHandler(ctx, config) {
|
|
|
72650
72650
|
if (result.block) {
|
|
72651
72651
|
ctx.client.tui.showToast({
|
|
72652
72652
|
body: {
|
|
72653
|
-
title: "PostToolUse Hook
|
|
72654
|
-
message: result.reason ?? "Hook
|
|
72653
|
+
title: "PostToolUse Hook Warning",
|
|
72654
|
+
message: result.reason ?? "Hook returned warning",
|
|
72655
72655
|
variant: "warning",
|
|
72656
72656
|
duration: 4000
|
|
72657
72657
|
}
|
|
@@ -72671,7 +72671,7 @@ ${result.message}`;
|
|
|
72671
72671
|
if (result.hookName) {
|
|
72672
72672
|
ctx.client.tui.showToast({
|
|
72673
72673
|
body: {
|
|
72674
|
-
title: "PostToolUse Hook
|
|
72674
|
+
title: "PostToolUse Hook Executed",
|
|
72675
72675
|
message: `\u25B6 ${result.toolName ?? input.tool} ${result.hookName}: ${result.elapsedMs ?? 0}ms`,
|
|
72676
72676
|
variant: "success",
|
|
72677
72677
|
duration: 2000
|
|
@@ -72829,7 +72829,7 @@ function createToolExecuteBeforeHandler(ctx, config) {
|
|
|
72829
72829
|
if (result.decision === "deny") {
|
|
72830
72830
|
ctx.client.tui.showToast({
|
|
72831
72831
|
body: {
|
|
72832
|
-
title: "PreToolUse Hook
|
|
72832
|
+
title: "PreToolUse Hook Executed",
|
|
72833
72833
|
message: `[BLOCKED] ${result.toolName ?? input.tool} ${result.hookName ?? "hook"}: ${result.elapsedMs ?? 0}ms
|
|
72834
72834
|
${result.inputLines ?? ""}`,
|
|
72835
72835
|
variant: "error",
|
|
@@ -74248,8 +74248,8 @@ async function showConfigErrorsIfAny(ctx) {
|
|
|
74248
74248
|
`);
|
|
74249
74249
|
await ctx.client.tui.showToast({
|
|
74250
74250
|
body: {
|
|
74251
|
-
title: "
|
|
74252
|
-
message:
|
|
74251
|
+
title: "Config Load Error",
|
|
74252
|
+
message: `Failed to load config:
|
|
74253
74253
|
${errorMessages}`,
|
|
74254
74254
|
variant: "error",
|
|
74255
74255
|
duration: 1e4
|
|
@@ -74282,8 +74282,8 @@ async function updateAndShowConnectedProvidersCacheStatus(ctx) {
|
|
|
74282
74282
|
if (!isModelCacheAvailable()) {
|
|
74283
74283
|
await ctx.client.tui.showToast({
|
|
74284
74284
|
body: {
|
|
74285
|
-
title: "
|
|
74286
|
-
message: "
|
|
74285
|
+
title: "Connected Providers Cache",
|
|
74286
|
+
message: "Failed to build provider cache. Restart OpenCode to retry.",
|
|
74287
74287
|
variant: "warning",
|
|
74288
74288
|
duration: 8000
|
|
74289
74289
|
}
|
|
@@ -74337,8 +74337,8 @@ async function showModelCacheWarningIfNeeded(ctx) {
|
|
|
74337
74337
|
return;
|
|
74338
74338
|
await ctx.client.tui.showToast({
|
|
74339
74339
|
body: {
|
|
74340
|
-
title: "
|
|
74341
|
-
message: "
|
|
74340
|
+
title: "Model Cache Not Found",
|
|
74341
|
+
message: "Run 'opencode models --refresh' or restart OpenCode to populate the models cache for optimal agent model selection.",
|
|
74342
74342
|
variant: "warning",
|
|
74343
74343
|
duration: 1e4
|
|
74344
74344
|
}
|
|
@@ -74377,7 +74377,7 @@ async function showVersionToast(ctx, version, message) {
|
|
|
74377
74377
|
}
|
|
74378
74378
|
async function showLocalDevToast(ctx, version, isSisyphusEnabled) {
|
|
74379
74379
|
const displayVersion = version ?? "dev";
|
|
74380
|
-
const message = isSisyphusEnabled ? "Sisyphus
|
|
74380
|
+
const message = isSisyphusEnabled ? "Sisyphus running in local development mode." : "Running in local development mode. oMoMoMo...";
|
|
74381
74381
|
await showSpinnerToast(ctx, `${displayVersion} (dev)`, message);
|
|
74382
74382
|
log(`[auto-update-checker] Local dev toast shown: v${displayVersion}`);
|
|
74383
74383
|
}
|
|
@@ -74482,27 +74482,27 @@ var AGENT_TOOLS = new Set([
|
|
|
74482
74482
|
var REMINDER_MESSAGE = `
|
|
74483
74483
|
[Agent \u4F7F\u7528\u63D0\u9192]
|
|
74484
74484
|
|
|
74485
|
-
\u4F60\u76F4\u63A5\u8C03\u7528\u4E86\
|
|
74485
|
+
\u4F60\u76F4\u63A5\u8C03\u7528\u4E86 search/fetch \u5DE5\u5177\uFF0C\u800C\u6CA1\u6709\u5229\u7528\u4E13\u95E8\u7684 agents\u3002
|
|
74486
74486
|
|
|
74487
|
-
\u63A8\u8350\uFF1A\u4F7F\u7528 task \u914D
|
|
74487
|
+
\u63A8\u8350\u65B9\u6848\uFF1A\u4F7F\u7528 task \u642D\u914D explore/librarian agents \u4EE5\u83B7\u5F97\u66F4\u597D\u7684\u6548\u679C\uFF1A
|
|
74488
74488
|
|
|
74489
74489
|
\`\`\`
|
|
74490
|
-
// \u5E76\u884C\u63A2\u7D22
|
|
74491
|
-
task(subagent_type="explore", load_skills=[], prompt="
|
|
74492
|
-
task(subagent_type="explore", load_skills=[], prompt="
|
|
74493
|
-
task(subagent_type="librarian", load_skills=[], prompt="
|
|
74490
|
+
// \u5E76\u884C\u63A2\u7D22 \u2014 \u540C\u65F6\u542F\u52A8\u591A\u4E2A agents
|
|
74491
|
+
task(subagent_type="explore", load_skills=[], prompt="Find all files matching pattern X")
|
|
74492
|
+
task(subagent_type="explore", load_skills=[], prompt="Search for implementation of Y")
|
|
74493
|
+
task(subagent_type="librarian", load_skills=[], prompt="Lookup documentation for Z")
|
|
74494
74494
|
|
|
74495
|
-
// \
|
|
74496
|
-
// \
|
|
74495
|
+
// \u7EE7\u7EED\u4F60\u7684\u5DE5\u4F5C\uFF0C\u540C\u65F6\u5B83\u4EEC\u5728\u540E\u53F0\u8FD0\u884C
|
|
74496
|
+
// \u6BCF\u4E2A\u4EFB\u52A1\u5B8C\u6210\u540E\u7CFB\u7EDF\u4F1A\u901A\u77E5\u4F60
|
|
74497
74497
|
\`\`\`
|
|
74498
74498
|
|
|
74499
74499
|
\u539F\u56E0\uFF1A
|
|
74500
|
-
-
|
|
74500
|
+
- Agents \u53EF\u4EE5\u6267\u884C\u66F4\u6DF1\u5C42\u3001\u66F4\u5168\u9762\u7684\u641C\u7D22
|
|
74501
74501
|
- \u540E\u53F0\u4EFB\u52A1\u5E76\u884C\u8FD0\u884C\uFF0C\u8282\u7701\u65F6\u95F4
|
|
74502
|
-
- \u4E13\u95E8\u7684
|
|
74503
|
-
- \u51CF\u5C11\u4E3B\u4F1A\u8BDD\u4E2D\u7684\
|
|
74502
|
+
- \u4E13\u95E8\u7684 agents \u5177\u5907\u9886\u57DF\u4E13\u4E1A\u77E5\u8BC6
|
|
74503
|
+
- \u51CF\u5C11\u4E3B\u4F1A\u8BDD\u4E2D\u7684 context window \u5360\u7528
|
|
74504
74504
|
|
|
74505
|
-
\u4F18\u5148\
|
|
74505
|
+
\u59CB\u7EC8\u4F18\u5148\u9009\u62E9\uFF1AMultiple parallel task calls > Direct tool calls
|
|
74506
74506
|
`;
|
|
74507
74507
|
|
|
74508
74508
|
// src/hooks/agent-usage-reminder/storage.ts
|
|
@@ -74673,133 +74673,133 @@ function getUltraworkSource(agentName, modelID) {
|
|
|
74673
74673
|
return "default";
|
|
74674
74674
|
}
|
|
74675
74675
|
// src/hooks/keyword-detector/ultrawork/planner.ts
|
|
74676
|
-
var ULTRAWORK_PLANNER_SECTION = `##
|
|
74676
|
+
var ULTRAWORK_PLANNER_SECTION = `## CRITICAL: YOU ARE A PLANNER, NOT AN IMPLEMENTER
|
|
74677
74677
|
|
|
74678
|
-
|
|
74679
|
-
|
|
74678
|
+
**IDENTITY CONSTRAINT (NON-NEGOTIABLE):**
|
|
74679
|
+
You ARE the planner. You ARE NOT an implementer. You DO NOT write code. You DO NOT execute tasks.
|
|
74680
74680
|
|
|
74681
|
-
|
|
74682
|
-
|
|
|
74683
|
-
|
|
74684
|
-
| Write/Edit |
|
|
74685
|
-
| Read |
|
|
74686
|
-
| Bash |
|
|
74687
|
-
| task | explore
|
|
74681
|
+
**TOOL RESTRICTIONS (SYSTEM-ENFORCED):**
|
|
74682
|
+
| Tool | Allowed | Blocked |
|
|
74683
|
+
|------|---------|---------|
|
|
74684
|
+
| Write/Edit | \`.sisyphus/**/*.md\` ONLY | Everything else |
|
|
74685
|
+
| Read | All files | - |
|
|
74686
|
+
| Bash | Research commands only | Implementation commands |
|
|
74687
|
+
| task | explore, librarian | - |
|
|
74688
74688
|
|
|
74689
|
-
|
|
74690
|
-
-
|
|
74691
|
-
-
|
|
74692
|
-
-
|
|
74689
|
+
**IF YOU TRY TO WRITE/EDIT OUTSIDE \`.sisyphus/\`:**
|
|
74690
|
+
- System will BLOCK your action
|
|
74691
|
+
- You will receive an error
|
|
74692
|
+
- DO NOT retry - you are not supposed to implement
|
|
74693
74693
|
|
|
74694
|
-
|
|
74695
|
-
- \`.sisyphus/plans/*.md\` -
|
|
74696
|
-
- \`.sisyphus/drafts/*.md\` -
|
|
74694
|
+
**YOUR ONLY WRITABLE PATHS:**
|
|
74695
|
+
- \`.sisyphus/plans/*.md\` - Final work plans
|
|
74696
|
+
- \`.sisyphus/drafts/*.md\` - Working drafts during interview
|
|
74697
74697
|
|
|
74698
|
-
|
|
74699
|
-
|
|
74698
|
+
**WHEN USER ASKS YOU TO IMPLEMENT:**
|
|
74699
|
+
REFUSE. Say: "I'm a planner. I create work plans, not implementations. Run \`/start-work\` after I finish planning."
|
|
74700
74700
|
|
|
74701
74701
|
---
|
|
74702
74702
|
|
|
74703
|
-
##
|
|
74703
|
+
## CONTEXT GATHERING (MANDATORY BEFORE PLANNING)
|
|
74704
74704
|
|
|
74705
|
-
|
|
74706
|
-
|
|
74705
|
+
You ARE the planner. Your job: create bulletproof work plans.
|
|
74706
|
+
**Before drafting ANY plan, gather context via explore/librarian agents.**
|
|
74707
74707
|
|
|
74708
|
-
###
|
|
74709
|
-
1.
|
|
74708
|
+
### Research Protocol
|
|
74709
|
+
1. **Fire parallel background agents** for comprehensive context:
|
|
74710
74710
|
\`\`\`
|
|
74711
|
-
task(subagent_type="explore", load_skills=[], prompt="
|
|
74712
|
-
task(subagent_type="explore", load_skills=[], prompt="
|
|
74713
|
-
task(subagent_type="librarian", load_skills=[], prompt="
|
|
74711
|
+
task(subagent_type="explore", load_skills=[], prompt="Find existing patterns for [topic] in codebase", run_in_background=true)
|
|
74712
|
+
task(subagent_type="explore", load_skills=[], prompt="Find test infrastructure and conventions", run_in_background=true)
|
|
74713
|
+
task(subagent_type="librarian", load_skills=[], prompt="Find official docs and best practices for [technology]", run_in_background=true)
|
|
74714
74714
|
\`\`\`
|
|
74715
|
-
2.
|
|
74716
|
-
3.
|
|
74715
|
+
2. **Wait for results** before planning - rushed plans fail
|
|
74716
|
+
3. **Synthesize findings** into informed requirements
|
|
74717
74717
|
|
|
74718
|
-
###
|
|
74719
|
-
-
|
|
74720
|
-
-
|
|
74721
|
-
-
|
|
74722
|
-
- OSS
|
|
74718
|
+
### What to Research
|
|
74719
|
+
- Existing codebase patterns and conventions
|
|
74720
|
+
- Test infrastructure (TDD possible?)
|
|
74721
|
+
- External library APIs and constraints
|
|
74722
|
+
- Similar implementations in OSS (via librarian)
|
|
74723
74723
|
|
|
74724
|
-
|
|
74724
|
+
**NEVER plan blind. Context first, plan second.**
|
|
74725
74725
|
|
|
74726
74726
|
---
|
|
74727
74727
|
|
|
74728
|
-
##
|
|
74728
|
+
## MANDATORY OUTPUT: PARALLEL TASK GRAPH + TODO LIST
|
|
74729
74729
|
|
|
74730
|
-
|
|
74730
|
+
**YOUR PRIMARY OUTPUT IS A PARALLEL EXECUTION TASK GRAPH.**
|
|
74731
74731
|
|
|
74732
|
-
|
|
74732
|
+
When you finalize a plan, you MUST structure it for maximum parallel execution:
|
|
74733
74733
|
|
|
74734
|
-
### 1.
|
|
74734
|
+
### 1. Parallel Execution Waves (REQUIRED)
|
|
74735
74735
|
|
|
74736
|
-
|
|
74736
|
+
Analyze task dependencies and group independent tasks into parallel waves:
|
|
74737
74737
|
|
|
74738
74738
|
\`\`\`
|
|
74739
|
-
Wave 1
|
|
74740
|
-
\u251C\u2500\u2500 Task 1: [
|
|
74741
|
-
\u2514\u2500\u2500 Task 4: [
|
|
74739
|
+
Wave 1 (Start Immediately - No Dependencies):
|
|
74740
|
+
\u251C\u2500\u2500 Task 1: [description] \u2192 category: X, skills: [a, b]
|
|
74741
|
+
\u2514\u2500\u2500 Task 4: [description] \u2192 category: Y, skills: [c]
|
|
74742
74742
|
|
|
74743
|
-
Wave 2
|
|
74744
|
-
\u251C\u2500\u2500 Task 2: [
|
|
74745
|
-
\u251C\u2500\u2500 Task 3: [
|
|
74746
|
-
\u2514\u2500\u2500 Task 5: [
|
|
74743
|
+
Wave 2 (After Wave 1 Completes):
|
|
74744
|
+
\u251C\u2500\u2500 Task 2: [depends: 1] \u2192 category: X, skills: [a]
|
|
74745
|
+
\u251C\u2500\u2500 Task 3: [depends: 1] \u2192 category: Z, skills: [d]
|
|
74746
|
+
\u2514\u2500\u2500 Task 5: [depends: 4] \u2192 category: Y, skills: [c]
|
|
74747
74747
|
|
|
74748
|
-
Wave 3
|
|
74749
|
-
\u2514\u2500\u2500 Task 6: [
|
|
74748
|
+
Wave 3 (After Wave 2 Completes):
|
|
74749
|
+
\u2514\u2500\u2500 Task 6: [depends: 2, 3] \u2192 category: X, skills: [a, b]
|
|
74750
74750
|
|
|
74751
|
-
|
|
74752
|
-
|
|
74751
|
+
Critical Path: Task 1 \u2192 Task 2 \u2192 Task 6
|
|
74752
|
+
Estimated Parallel Speedup: ~40% faster than sequential
|
|
74753
74753
|
\`\`\`
|
|
74754
74754
|
|
|
74755
|
-
### 2.
|
|
74755
|
+
### 2. Dependency Matrix (REQUIRED)
|
|
74756
74756
|
|
|
74757
|
-
|
|
|
74758
|
-
|
|
74759
|
-
| 1 |
|
|
74757
|
+
| Task | Depends On | Blocks | Can Parallelize With |
|
|
74758
|
+
|------|------------|--------|---------------------|
|
|
74759
|
+
| 1 | None | 2, 3 | 4 |
|
|
74760
74760
|
| 2 | 1 | 6 | 3, 5 |
|
|
74761
74761
|
| 3 | 1 | 6 | 2, 5 |
|
|
74762
|
-
| 4 |
|
|
74763
|
-
| 5 | 4 |
|
|
74764
|
-
| 6 | 2, 3 |
|
|
74762
|
+
| 4 | None | 5 | 1 |
|
|
74763
|
+
| 5 | 4 | None | 2, 3 |
|
|
74764
|
+
| 6 | 2, 3 | None | None (final) |
|
|
74765
74765
|
|
|
74766
|
-
### 3. TODO
|
|
74766
|
+
### 3. TODO List Structure (REQUIRED)
|
|
74767
74767
|
|
|
74768
|
-
|
|
74768
|
+
Each TODO item MUST include:
|
|
74769
74769
|
|
|
74770
74770
|
\`\`\`markdown
|
|
74771
|
-
- [ ] N. [
|
|
74772
|
-
|
|
74773
|
-
|
|
74774
|
-
|
|
74775
|
-
|
|
74776
|
-
|
|
74777
|
-
|
|
74778
|
-
|
|
74779
|
-
|
|
74771
|
+
- [ ] N. [Task Title]
|
|
74772
|
+
|
|
74773
|
+
**What to do**: [Clear steps]
|
|
74774
|
+
|
|
74775
|
+
**Dependencies**: [Task numbers this depends on] | None
|
|
74776
|
+
**Blocks**: [Task numbers that depend on this]
|
|
74777
|
+
**Parallel Group**: Wave N (with Tasks X, Y)
|
|
74778
|
+
|
|
74779
|
+
**Recommended Agent Profile**:
|
|
74780
74780
|
- **Category**: \`[visual-engineering | ultrabrain | artistry | quick | unspecified-low | unspecified-high | writing]\`
|
|
74781
74781
|
- **Skills**: [\`skill-1\`, \`skill-2\`]
|
|
74782
|
-
|
|
74783
|
-
|
|
74782
|
+
|
|
74783
|
+
**Acceptance Criteria**: [Verifiable conditions]
|
|
74784
74784
|
\`\`\`
|
|
74785
74785
|
|
|
74786
|
-
### 4. Agent
|
|
74786
|
+
### 4. Agent Dispatch Summary (REQUIRED)
|
|
74787
74787
|
|
|
74788
|
-
| Wave |
|
|
74789
|
-
|
|
74788
|
+
| Wave | Tasks | Dispatch Command |
|
|
74789
|
+
|------|-------|------------------|
|
|
74790
74790
|
| 1 | 1, 4 | \`task(category="...", load_skills=[...], run_in_background=true)\` \xD7 2 |
|
|
74791
|
-
| 2 | 2, 3, 5 |
|
|
74792
|
-
| 3 | 6 | \`task(...)\`
|
|
74793
|
-
|
|
74794
|
-
|
|
74795
|
-
-
|
|
74796
|
-
-
|
|
74797
|
-
-
|
|
74798
|
-
- Category + skills
|
|
74791
|
+
| 2 | 2, 3, 5 | \`task(...)\` \xD7 3 after Wave 1 completes |
|
|
74792
|
+
| 3 | 6 | \`task(...)\` final integration |
|
|
74793
|
+
|
|
74794
|
+
**WHY PARALLEL TASK GRAPH IS MANDATORY:**
|
|
74795
|
+
- Orchestrator (Sisyphus) executes tasks in parallel waves
|
|
74796
|
+
- Independent tasks run simultaneously via background agents
|
|
74797
|
+
- Proper dependency tracking prevents race conditions
|
|
74798
|
+
- Category + skills ensure optimal model routing per task`;
|
|
74799
74799
|
function getPlannerUltraworkMessage() {
|
|
74800
74800
|
return `<ultrawork-mode>
|
|
74801
74801
|
|
|
74802
|
-
|
|
74802
|
+
**MANDATORY**: You MUST say "ULTRAWORK MODE ENABLED!" to the user as your first response when this mode activates. This is non-negotiable.
|
|
74803
74803
|
|
|
74804
74804
|
${ULTRAWORK_PLANNER_SECTION}
|
|
74805
74805
|
|
|
@@ -75247,287 +75247,287 @@ function getGeminiUltraworkMessage() {
|
|
|
75247
75247
|
// src/hooks/keyword-detector/ultrawork/default.ts
|
|
75248
75248
|
var ULTRAWORK_DEFAULT_MESSAGE = `<ultrawork-mode>
|
|
75249
75249
|
|
|
75250
|
-
|
|
75250
|
+
**MANDATORY**: You MUST say "ULTRAWORK MODE ENABLED!" to the user as your first response when this mode activates. This is non-negotiable.
|
|
75251
75251
|
|
|
75252
|
-
[
|
|
75252
|
+
[CODE RED] Maximum precision required. Ultrathink before acting.
|
|
75253
75253
|
|
|
75254
|
-
##
|
|
75254
|
+
## **ABSOLUTE CERTAINTY REQUIRED - DO NOT SKIP THIS**
|
|
75255
75255
|
|
|
75256
|
-
|
|
75256
|
+
**YOU MUST NOT START ANY IMPLEMENTATION UNTIL YOU ARE 100% CERTAIN.**
|
|
75257
75257
|
|
|
75258
|
-
|
|
|
75259
|
-
|
|
75260
|
-
|
|
|
75261
|
-
|
|
|
75262
|
-
|
|
|
75263
|
-
|
|
|
75258
|
+
| **BEFORE YOU WRITE A SINGLE LINE OF CODE, YOU MUST:** |
|
|
75259
|
+
|-------------------------------------------------------|
|
|
75260
|
+
| **FULLY UNDERSTAND** what the user ACTUALLY wants (not what you ASSUME they want) |
|
|
75261
|
+
| **EXPLORE** the codebase to understand existing patterns, architecture, and context |
|
|
75262
|
+
| **HAVE A CRYSTAL CLEAR WORK PLAN** - if your plan is vague, YOUR WORK WILL FAIL |
|
|
75263
|
+
| **RESOLVE ALL AMBIGUITY** - if ANYTHING is unclear, ASK or INVESTIGATE |
|
|
75264
75264
|
|
|
75265
|
-
###
|
|
75265
|
+
### **MANDATORY CERTAINTY PROTOCOL**
|
|
75266
75266
|
|
|
75267
|
-
|
|
75267
|
+
**IF YOU ARE NOT 100% CERTAIN:**
|
|
75268
75268
|
|
|
75269
|
-
1.
|
|
75270
|
-
2.
|
|
75271
|
-
3.
|
|
75272
|
-
- **Oracle
|
|
75273
|
-
- **Artistry
|
|
75274
|
-
4.
|
|
75269
|
+
1. **THINK DEEPLY** - What is the user's TRUE intent? What problem are they REALLY trying to solve?
|
|
75270
|
+
2. **EXPLORE THOROUGHLY** - Fire explore/librarian agents to gather ALL relevant context
|
|
75271
|
+
3. **CONSULT SPECIALISTS** - For hard/complex tasks, DO NOT struggle alone. Delegate:
|
|
75272
|
+
- **Oracle**: Conventional problems - architecture, debugging, complex logic
|
|
75273
|
+
- **Artistry**: Non-conventional problems - different approach needed, unusual constraints
|
|
75274
|
+
4. **ASK THE USER** - If ambiguity remains after exploration, ASK. Don't guess.
|
|
75275
75275
|
|
|
75276
|
-
|
|
75277
|
-
-
|
|
75278
|
-
-
|
|
75279
|
-
-
|
|
75280
|
-
-
|
|
75281
|
-
-
|
|
75276
|
+
**SIGNS YOU ARE NOT READY TO IMPLEMENT:**
|
|
75277
|
+
- You're making assumptions about requirements
|
|
75278
|
+
- You're unsure which files to modify
|
|
75279
|
+
- You don't understand how existing code works
|
|
75280
|
+
- Your plan has "probably" or "maybe" in it
|
|
75281
|
+
- You can't explain the exact steps you'll take
|
|
75282
75282
|
|
|
75283
|
-
|
|
75283
|
+
**WHEN IN DOUBT:**
|
|
75284
75284
|
\`\`\`
|
|
75285
|
-
task(subagent_type="explore", load_skills=[], prompt="
|
|
75286
|
-
task(subagent_type="librarian", load_skills=[], prompt="
|
|
75287
|
-
task(subagent_type="oracle", load_skills=[], prompt="
|
|
75285
|
+
task(subagent_type="explore", load_skills=[], prompt="I'm implementing [TASK DESCRIPTION] and need to understand [SPECIFIC KNOWLEDGE GAP]. Find [X] patterns in the codebase - show file paths, implementation approach, and conventions used. I'll use this to [HOW RESULTS WILL BE USED]. Focus on src/ directories, skip test files unless test patterns are specifically needed. Return concrete file paths with brief descriptions of what each file does.", run_in_background=true)
|
|
75286
|
+
task(subagent_type="librarian", load_skills=[], prompt="I'm working with [LIBRARY/TECHNOLOGY] and need [SPECIFIC INFORMATION]. Find official documentation and production-quality examples for [Y] - specifically: API reference, configuration options, recommended patterns, and common pitfalls. Skip beginner tutorials. I'll use this to [DECISION THIS WILL INFORM].", run_in_background=true)
|
|
75287
|
+
task(subagent_type="oracle", load_skills=[], prompt="I need architectural review of my approach to [TASK]. Here's my plan: [DESCRIBE PLAN WITH SPECIFIC FILES AND CHANGES]. My concerns are: [LIST SPECIFIC UNCERTAINTIES]. Please evaluate: correctness of approach, potential issues I'm missing, and whether a better alternative exists.", run_in_background=false)
|
|
75288
75288
|
\`\`\`
|
|
75289
75289
|
|
|
75290
|
-
|
|
75291
|
-
-
|
|
75292
|
-
-
|
|
75293
|
-
-
|
|
75294
|
-
-
|
|
75290
|
+
**ONLY AFTER YOU HAVE:**
|
|
75291
|
+
- Gathered sufficient context via agents
|
|
75292
|
+
- Resolved all ambiguities
|
|
75293
|
+
- Created a precise, step-by-step work plan
|
|
75294
|
+
- Achieved 100% confidence in your understanding
|
|
75295
75295
|
|
|
75296
|
-
|
|
75296
|
+
**...THEN AND ONLY THEN MAY YOU BEGIN IMPLEMENTATION.**
|
|
75297
75297
|
|
|
75298
75298
|
---
|
|
75299
75299
|
|
|
75300
|
-
##
|
|
75300
|
+
## **NO EXCUSES. NO COMPROMISES. DELIVER WHAT WAS ASKED.**
|
|
75301
75301
|
|
|
75302
|
-
|
|
75302
|
+
**THE USER'S ORIGINAL REQUEST IS SACRED. YOU MUST FULFILL IT EXACTLY.**
|
|
75303
75303
|
|
|
75304
|
-
|
|
|
75305
|
-
|
|
75306
|
-
| "
|
|
75307
|
-
| "
|
|
75308
|
-
| "
|
|
75309
|
-
| "
|
|
75310
|
-
| "
|
|
75304
|
+
| VIOLATION | CONSEQUENCE |
|
|
75305
|
+
|-----------|-------------|
|
|
75306
|
+
| "I couldn't because..." | **UNACCEPTABLE.** Find a way or ask for help. |
|
|
75307
|
+
| "This is a simplified version..." | **UNACCEPTABLE.** Deliver the FULL implementation. |
|
|
75308
|
+
| "You can extend this later..." | **UNACCEPTABLE.** Finish it NOW. |
|
|
75309
|
+
| "Due to limitations..." | **UNACCEPTABLE.** Use agents, tools, whatever it takes. |
|
|
75310
|
+
| "I made some assumptions..." | **UNACCEPTABLE.** You should have asked FIRST. |
|
|
75311
75311
|
|
|
75312
|
-
|
|
75313
|
-
-
|
|
75314
|
-
-
|
|
75315
|
-
-
|
|
75316
|
-
-
|
|
75317
|
-
-
|
|
75312
|
+
**THERE ARE NO VALID EXCUSES FOR:**
|
|
75313
|
+
- Delivering partial work
|
|
75314
|
+
- Changing scope without explicit user approval
|
|
75315
|
+
- Making unauthorized simplifications
|
|
75316
|
+
- Stopping before the task is 100% complete
|
|
75317
|
+
- Compromising on any stated requirement
|
|
75318
75318
|
|
|
75319
|
-
|
|
75320
|
-
1.
|
|
75321
|
-
2.
|
|
75322
|
-
3.
|
|
75323
|
-
4.
|
|
75324
|
-
5.
|
|
75319
|
+
**IF YOU ENCOUNTER A BLOCKER:**
|
|
75320
|
+
1. **DO NOT** give up
|
|
75321
|
+
2. **DO NOT** deliver a compromised version
|
|
75322
|
+
3. **DO** consult specialists (oracle for conventional, artistry for non-conventional)
|
|
75323
|
+
4. **DO** ask the user for guidance
|
|
75324
|
+
5. **DO** explore alternative approaches
|
|
75325
75325
|
|
|
75326
|
-
|
|
75326
|
+
**THE USER ASKED FOR X. DELIVER EXACTLY X. PERIOD.**
|
|
75327
75327
|
|
|
75328
75328
|
---
|
|
75329
75329
|
|
|
75330
|
-
|
|
75331
|
-
|
|
75330
|
+
YOU MUST LEVERAGE ALL AVAILABLE AGENTS / **CATEGORY + SKILLS** TO THEIR FULLEST POTENTIAL.
|
|
75331
|
+
TELL THE USER WHAT AGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST.
|
|
75332
75332
|
|
|
75333
|
-
##
|
|
75333
|
+
## MANDATORY: PLAN AGENT INVOCATION (NON-NEGOTIABLE)
|
|
75334
75334
|
|
|
75335
|
-
|
|
75335
|
+
**YOU MUST ALWAYS INVOKE THE PLAN AGENT FOR ANY NON-TRIVIAL TASK.**
|
|
75336
75336
|
|
|
75337
|
-
|
|
|
75338
|
-
|
|
75339
|
-
|
|
|
75340
|
-
|
|
|
75341
|
-
|
|
|
75342
|
-
|
|
|
75337
|
+
| Condition | Action |
|
|
75338
|
+
|-----------|--------|
|
|
75339
|
+
| Task has 2+ steps | MUST call plan agent |
|
|
75340
|
+
| Task scope unclear | MUST call plan agent |
|
|
75341
|
+
| Implementation required | MUST call plan agent |
|
|
75342
|
+
| Architecture decision needed | MUST call plan agent |
|
|
75343
75343
|
|
|
75344
75344
|
\`\`\`
|
|
75345
|
-
task(subagent_type="plan", load_skills=[], run_in_background=false, prompt="
|
|
75345
|
+
task(subagent_type="plan", load_skills=[], run_in_background=false, prompt="<gathered context + user request>")
|
|
75346
75346
|
\`\`\`
|
|
75347
75347
|
|
|
75348
|
-
|
|
75349
|
-
- Plan agent
|
|
75350
|
-
- Plan agent
|
|
75351
|
-
- Plan agent
|
|
75352
|
-
-
|
|
75348
|
+
**WHY PLAN AGENT IS MANDATORY:**
|
|
75349
|
+
- Plan agent analyzes dependencies and parallel execution opportunities
|
|
75350
|
+
- Plan agent outputs a **parallel task graph** with waves and dependencies
|
|
75351
|
+
- Plan agent provides structured TODO list with category + skills per task
|
|
75352
|
+
- YOU are an orchestrator, NOT an implementer
|
|
75353
75353
|
|
|
75354
|
-
###
|
|
75354
|
+
### SESSION CONTINUITY WITH PLAN AGENT (CRITICAL)
|
|
75355
75355
|
|
|
75356
|
-
**Plan agent
|
|
75356
|
+
**Plan agent returns a task_id. USE IT for follow-up interactions.**
|
|
75357
75357
|
|
|
75358
|
-
|
|
|
75359
|
-
|
|
75360
|
-
| Plan agent
|
|
75361
|
-
|
|
|
75362
|
-
|
|
|
75358
|
+
| Scenario | Action |
|
|
75359
|
+
|----------|--------|
|
|
75360
|
+
| Plan agent asks clarifying questions | \`task(task_id="{returned_task_id}", load_skills=[], run_in_background=false, prompt="<your answer>")\` |
|
|
75361
|
+
| Need to refine the plan | \`task(task_id="{returned_task_id}", load_skills=[], run_in_background=false, prompt="Please adjust: <feedback>")\` |
|
|
75362
|
+
| Plan needs more detail | \`task(task_id="{returned_task_id}", load_skills=[], run_in_background=false, prompt="Add more detail to Task N")\` |
|
|
75363
75363
|
|
|
75364
|
-
|
|
75365
|
-
- Plan agent
|
|
75366
|
-
-
|
|
75367
|
-
-
|
|
75368
|
-
-
|
|
75364
|
+
**WHY TASK_ID IS CRITICAL:**
|
|
75365
|
+
- Plan agent retains FULL conversation context
|
|
75366
|
+
- No repeated exploration or context gathering
|
|
75367
|
+
- Saves 70%+ tokens on follow-ups
|
|
75368
|
+
- Maintains interview continuity until plan is finalized
|
|
75369
75369
|
|
|
75370
75370
|
\`\`\`
|
|
75371
|
-
//
|
|
75372
|
-
task(subagent_type="plan", load_skills=[], run_in_background=false, prompt="
|
|
75371
|
+
// WRONG: Starting fresh loses all context
|
|
75372
|
+
task(subagent_type="plan", load_skills=[], run_in_background=false, prompt="Here's more info...")
|
|
75373
75373
|
|
|
75374
|
-
//
|
|
75375
|
-
task(task_id="ses_abc123", load_skills=[], run_in_background=false, prompt="
|
|
75374
|
+
// CORRECT: Resume preserves everything
|
|
75375
|
+
task(task_id="ses_abc123", load_skills=[], run_in_background=false, prompt="Here's my answer to your question: ...")
|
|
75376
75376
|
\`\`\`
|
|
75377
75377
|
|
|
75378
|
-
|
|
75378
|
+
**FAILURE TO CALL PLAN AGENT = INCOMPLETE WORK.**
|
|
75379
75379
|
|
|
75380
75380
|
---
|
|
75381
75381
|
|
|
75382
|
-
##
|
|
75382
|
+
## AGENTS / **CATEGORY + SKILLS** UTILIZATION PRINCIPLES
|
|
75383
75383
|
|
|
75384
|
-
|
|
75384
|
+
**DEFAULT BEHAVIOR: DELEGATE. DO NOT WORK YOURSELF.**
|
|
75385
75385
|
|
|
75386
|
-
|
|
|
75387
|
-
|
|
75388
|
-
|
|
|
75389
|
-
|
|
|
75390
|
-
|
|
|
75391
|
-
|
|
|
75392
|
-
|
|
|
75393
|
-
|
|
|
75386
|
+
| Task Type | Action | Why |
|
|
75387
|
+
|-----------|--------|-----|
|
|
75388
|
+
| Codebase exploration | task(subagent_type="explore", load_skills=[], run_in_background=true) | Parallel, context-efficient |
|
|
75389
|
+
| Documentation lookup | task(subagent_type="librarian", load_skills=[], run_in_background=true) | Specialized knowledge |
|
|
75390
|
+
| Planning | task(subagent_type="plan", load_skills=[], run_in_background=false) | Parallel task graph + structured TODO list |
|
|
75391
|
+
| Hard problem (conventional) | task(subagent_type="oracle", load_skills=[], run_in_background=false) | Architecture, debugging, complex logic |
|
|
75392
|
+
| Hard problem (non-conventional) | task(category="artistry", load_skills=[...], run_in_background=true) | Different approach needed |
|
|
75393
|
+
| Implementation | task(category="...", load_skills=[...], run_in_background=true) | Domain-optimized models |
|
|
75394
75394
|
|
|
75395
|
-
**
|
|
75395
|
+
**CATEGORY + SKILL DELEGATION:**
|
|
75396
75396
|
\`\`\`
|
|
75397
|
-
//
|
|
75397
|
+
// Frontend work
|
|
75398
75398
|
task(category="visual-engineering", load_skills=["frontend-ui-ux"], run_in_background=true)
|
|
75399
75399
|
|
|
75400
|
-
//
|
|
75400
|
+
// Complex logic
|
|
75401
75401
|
task(category="ultrabrain", load_skills=["typescript-programmer"], run_in_background=true)
|
|
75402
75402
|
|
|
75403
|
-
//
|
|
75403
|
+
// Quick fixes
|
|
75404
75404
|
task(category="quick", load_skills=["git-master"], run_in_background=true)
|
|
75405
75405
|
\`\`\`
|
|
75406
75406
|
|
|
75407
|
-
|
|
75408
|
-
-
|
|
75409
|
-
-
|
|
75410
|
-
-
|
|
75407
|
+
**YOU SHOULD ONLY DO IT YOURSELF WHEN:**
|
|
75408
|
+
- Task is trivially simple (1-2 lines, obvious change)
|
|
75409
|
+
- You have ALL context already loaded
|
|
75410
|
+
- Delegation overhead exceeds task complexity
|
|
75411
75411
|
|
|
75412
|
-
|
|
75412
|
+
**OTHERWISE: DELEGATE. ALWAYS.**
|
|
75413
75413
|
|
|
75414
75414
|
---
|
|
75415
75415
|
|
|
75416
|
-
##
|
|
75417
|
-
- **TODO
|
|
75418
|
-
-
|
|
75419
|
-
-
|
|
75420
|
-
-
|
|
75421
|
-
-
|
|
75416
|
+
## EXECUTION RULES
|
|
75417
|
+
- **TODO**: Track EVERY step. Mark complete IMMEDIATELY after each.
|
|
75418
|
+
- **PARALLEL**: Fire independent agent calls simultaneously via task(run_in_background=true) - NEVER wait sequentially.
|
|
75419
|
+
- **BACKGROUND FIRST**: Use task for exploration/research agents (10+ concurrent if needed).
|
|
75420
|
+
- **VERIFY**: Re-read request after completion. Check ALL requirements met before reporting done.
|
|
75421
|
+
- **DELEGATE**: Don't do everything yourself - orchestrate specialized agents for their strengths.
|
|
75422
75422
|
|
|
75423
|
-
##
|
|
75424
|
-
1.
|
|
75425
|
-
2.
|
|
75426
|
-
3.
|
|
75427
|
-
4.
|
|
75423
|
+
## WORKFLOW
|
|
75424
|
+
1. Analyze the request and identify required capabilities
|
|
75425
|
+
2. Spawn exploration/librarian agents via task(run_in_background=true) in PARALLEL (10+ if needed)
|
|
75426
|
+
3. Use Plan agent with gathered context to create detailed work breakdown
|
|
75427
|
+
4. Execute with continuous verification against original requirements
|
|
75428
75428
|
|
|
75429
|
-
##
|
|
75429
|
+
## VERIFICATION GUARANTEE (NON-NEGOTIABLE)
|
|
75430
75430
|
|
|
75431
|
-
|
|
75431
|
+
**NOTHING is "done" without PROOF it works.**
|
|
75432
75432
|
|
|
75433
|
-
###
|
|
75433
|
+
### Pre-Implementation: Define Success Criteria
|
|
75434
75434
|
|
|
75435
|
-
|
|
75435
|
+
BEFORE writing ANY code, you MUST define:
|
|
75436
75436
|
|
|
75437
|
-
|
|
|
75438
|
-
|
|
75439
|
-
|
|
|
75440
|
-
|
|
|
75441
|
-
|
|
|
75437
|
+
| Criteria Type | Description | Example |
|
|
75438
|
+
|---------------|-------------|---------|
|
|
75439
|
+
| **Functional** | What specific behavior must work | "Button click triggers API call" |
|
|
75440
|
+
| **Observable** | What can be measured/seen | "Console shows 'success', no errors" |
|
|
75441
|
+
| **Pass/Fail** | Binary, no ambiguity | "Returns 200 OK" not "should work" |
|
|
75442
75442
|
|
|
75443
|
-
|
|
75443
|
+
Write these criteria explicitly. **Record them in your TODO/Task items.** Each task MUST include a "QA: [how to verify]" field. These criteria are your CONTRACT - work toward them, verify against them.
|
|
75444
75444
|
|
|
75445
|
-
###
|
|
75445
|
+
### Test Plan Template (MANDATORY for non-trivial tasks)
|
|
75446
75446
|
|
|
75447
75447
|
\`\`\`
|
|
75448
|
-
##
|
|
75449
|
-
###
|
|
75450
|
-
###
|
|
75451
|
-
###
|
|
75452
|
-
1. [
|
|
75448
|
+
## Test Plan
|
|
75449
|
+
### Objective: [What we're verifying]
|
|
75450
|
+
### Prerequisites: [Setup needed]
|
|
75451
|
+
### Test Cases:
|
|
75452
|
+
1. [Test Name]: [Input] \u2192 [Expected Output] \u2192 [How to verify]
|
|
75453
75453
|
2. ...
|
|
75454
|
-
###
|
|
75455
|
-
###
|
|
75454
|
+
### Success Criteria: ALL test cases pass
|
|
75455
|
+
### How to Execute: [Exact commands/steps]
|
|
75456
75456
|
\`\`\`
|
|
75457
75457
|
|
|
75458
|
-
###
|
|
75458
|
+
### Execution & Evidence Requirements
|
|
75459
75459
|
|
|
75460
|
-
|
|
|
75461
|
-
|
|
75462
|
-
|
|
|
75463
|
-
|
|
|
75464
|
-
|
|
|
75465
|
-
|
|
|
75460
|
+
| Phase | Action | Required Evidence |
|
|
75461
|
+
|-------|--------|-------------------|
|
|
75462
|
+
| **Build** | Run build command | Exit code 0, no errors |
|
|
75463
|
+
| **Test** | Execute test suite | All tests pass (screenshot/output) |
|
|
75464
|
+
| **Manual Verify** | Test the actual feature | Demonstrate it works (describe what you observed) |
|
|
75465
|
+
| **Regression** | Ensure nothing broke | Existing tests still pass |
|
|
75466
75466
|
|
|
75467
|
-
|
|
75467
|
+
**WITHOUT evidence = NOT verified = NOT done.**
|
|
75468
75468
|
|
|
75469
75469
|
<MANUAL_QA_MANDATE>
|
|
75470
|
-
###
|
|
75470
|
+
### YOU MUST EXECUTE MANUAL QA YOURSELF. THIS IS NOT OPTIONAL.
|
|
75471
75471
|
|
|
75472
|
-
|
|
75472
|
+
**YOUR FAILURE MODE**: You finish coding, run lsp_diagnostics, and declare "done" without actually TESTING the feature. lsp_diagnostics catches type errors, NOT functional bugs. Your work is NOT verified until you MANUALLY test it.
|
|
75473
75473
|
|
|
75474
|
-
|
|
75474
|
+
**WHAT MANUAL QA MEANS - execute ALL that apply:**
|
|
75475
75475
|
|
|
75476
|
-
|
|
|
75477
|
-
|
|
75478
|
-
|
|
|
75479
|
-
|
|
|
75480
|
-
|
|
|
75481
|
-
|
|
|
75482
|
-
|
|
|
75483
|
-
|
|
|
75476
|
+
| If your change... | YOU MUST... |
|
|
75477
|
+
|---|---|
|
|
75478
|
+
| Adds/modifies a CLI command | Run the command with Bash. Show the output. |
|
|
75479
|
+
| Changes build output | Run the build. Verify the output files exist and are correct. |
|
|
75480
|
+
| Modifies API behavior | Call the endpoint. Show the response. |
|
|
75481
|
+
| Changes UI rendering | Describe what renders. Use a browser tool if available. |
|
|
75482
|
+
| Adds a new tool/hook/feature | Test it end-to-end in a real scenario. |
|
|
75483
|
+
| Modifies config handling | Load the config. Verify it parses correctly. |
|
|
75484
75484
|
|
|
75485
|
-
|
|
75486
|
-
- "
|
|
75487
|
-
- "
|
|
75488
|
-
- "lsp_diagnostics
|
|
75489
|
-
- "
|
|
75485
|
+
**UNACCEPTABLE QA CLAIMS:**
|
|
75486
|
+
- "This should work" - RUN IT.
|
|
75487
|
+
- "The types check out" - Types don't catch logic bugs. RUN IT.
|
|
75488
|
+
- "lsp_diagnostics is clean" - That's a TYPE check, not a FUNCTIONAL check. RUN IT.
|
|
75489
|
+
- "Tests pass" - Tests cover known cases. Does the ACTUAL FEATURE work as the user expects? RUN IT.
|
|
75490
75490
|
|
|
75491
|
-
|
|
75492
|
-
|
|
75491
|
+
**You have Bash, you have tools. There is ZERO excuse for not running manual QA.**
|
|
75492
|
+
**Manual QA is the FINAL gate before reporting completion. Skip it and your work is INCOMPLETE.**
|
|
75493
75493
|
</MANUAL_QA_MANDATE>
|
|
75494
75494
|
|
|
75495
|
-
### TDD
|
|
75495
|
+
### TDD Workflow (when test infrastructure exists)
|
|
75496
75496
|
|
|
75497
|
-
1.
|
|
75498
|
-
2.
|
|
75499
|
-
3.
|
|
75500
|
-
4.
|
|
75501
|
-
5.
|
|
75502
|
-
6.
|
|
75497
|
+
1. **SPEC**: Define what "working" means (success criteria above)
|
|
75498
|
+
2. **RED**: Write failing test \u2192 Run it \u2192 Confirm it FAILS
|
|
75499
|
+
3. **GREEN**: Write minimal code \u2192 Run test \u2192 Confirm it PASSES
|
|
75500
|
+
4. **REFACTOR**: Clean up \u2192 Tests MUST stay green
|
|
75501
|
+
5. **VERIFY**: Run full test suite, confirm no regressions
|
|
75502
|
+
6. **EVIDENCE**: Report what you ran and what output you saw
|
|
75503
75503
|
|
|
75504
|
-
###
|
|
75504
|
+
### Verification Anti-Patterns (BLOCKING)
|
|
75505
75505
|
|
|
75506
|
-
|
|
|
75507
|
-
|
|
75508
|
-
| "
|
|
75509
|
-
| "
|
|
75510
|
-
| "
|
|
75511
|
-
| "
|
|
75512
|
-
|
|
|
75506
|
+
| Violation | Why It Fails |
|
|
75507
|
+
|-----------|--------------|
|
|
75508
|
+
| "It should work now" | No evidence. Run it. |
|
|
75509
|
+
| "I added the tests" | Did they pass? Show output. |
|
|
75510
|
+
| "Fixed the bug" | How do you know? What did you test? |
|
|
75511
|
+
| "Implementation complete" | Did you verify against success criteria? |
|
|
75512
|
+
| Skipping test execution | Tests exist to be RUN, not just written |
|
|
75513
75513
|
|
|
75514
|
-
|
|
75514
|
+
**CLAIM NOTHING WITHOUT PROOF. EXECUTE. VERIFY. SHOW EVIDENCE.**
|
|
75515
75515
|
|
|
75516
|
-
##
|
|
75517
|
-
-
|
|
75518
|
-
-
|
|
75519
|
-
-
|
|
75520
|
-
-
|
|
75521
|
-
-
|
|
75522
|
-
-
|
|
75516
|
+
## ZERO TOLERANCE FAILURES
|
|
75517
|
+
- **NO Scope Reduction**: Never make "demo", "skeleton", "simplified", "basic" versions - deliver FULL implementation
|
|
75518
|
+
- **NO MockUp Work**: When user asked you to do "port A", you must "port A", fully, 100%. No Extra feature, No reduced feature, no mock data, fully working 100% port.
|
|
75519
|
+
- **NO Partial Completion**: Never stop at 60-80% saying "you can extend this..." - finish 100%
|
|
75520
|
+
- **NO Assumed Shortcuts**: Never skip requirements you deem "optional" or "can be added later"
|
|
75521
|
+
- **NO Premature Stopping**: Never declare done until ALL TODOs are completed and verified
|
|
75522
|
+
- **NO TEST DELETION**: Never delete or skip failing tests to make the build pass. Fix the code, not the tests.
|
|
75523
75523
|
|
|
75524
|
-
|
|
75524
|
+
THE USER ASKED FOR X. DELIVER EXACTLY X. NOT A SUBSET. NOT A DEMO. NOT A STARTING POINT.
|
|
75525
75525
|
|
|
75526
|
-
1.
|
|
75527
|
-
2.
|
|
75528
|
-
3.
|
|
75526
|
+
1. EXPLORES + LIBRARIANS
|
|
75527
|
+
2. GATHER -> PLAN AGENT SPAWN
|
|
75528
|
+
3. WORK BY DELEGATING TO ANOTHER AGENTS
|
|
75529
75529
|
|
|
75530
|
-
|
|
75530
|
+
NOW.
|
|
75531
75531
|
|
|
75532
75532
|
</ultrawork-mode>
|
|
75533
75533
|
|
|
@@ -75573,19 +75573,19 @@ var KEYWORD_DETECTORS = [
|
|
|
75573
75573
|
{
|
|
75574
75574
|
pattern: /\b(analyze|analyse|investigate|examine|research|study|deep[\s-]?dive|inspect|audit|evaluate|assess|review|diagnose|scrutinize|dissect|debug|comprehend|interpret|breakdown|understand)\b|why\s+is|how\s+does|how\s+to|\uBD84\uC11D|\uC870\uC0AC|\uD30C\uC545|\uC5F0\uAD6C|\uAC80\uD1A0|\uC9C4\uB2E8|\uC774\uD574|\uC124\uBA85|\uC6D0\uC778|\uC774\uC720|\uB72F\uC5B4\uBD10|\uB530\uC838\uBD10|\uD3C9\uAC00|\uD574\uC11D|\uB514\uBC84\uAE45|\uB514\uBC84\uADF8|\uC5B4\uB5BB\uAC8C|\uC65C|\uC0B4\uD3B4|\u5206\u6790|\u8ABF\u67FB|\u89E3\u6790|\u691C\u8A0E|\u7814\u7A76|\u8A3A\u65AD|\u7406\u89E3|\u8AAC\u660E|\u691C\u8A3C|\u7CBE\u67FB|\u7A76\u660E|\u30C7\u30D0\u30C3\u30B0|\u306A\u305C|\u3069\u3046|\u4ED5\u7D44\u307F|\u8C03\u67E5|\u68C0\u67E5|\u5256\u6790|\u6DF1\u5165|\u8BCA\u65AD|\u89E3\u91CA|\u8C03\u8BD5|\u4E3A\u4EC0\u4E48|\u539F\u7406|\u641E\u6E05\u695A|\u5F04\u660E\u767D|ph\u00E2n t\u00EDch|\u0111i\u1EC1u tra|nghi\u00EAn c\u1EE9u|ki\u1EC3m tra|xem x\u00E9t|ch\u1EA9n \u0111o\u00E1n|gi\u1EA3i th\u00EDch|t\u00ECm hi\u1EC3u|g\u1EE1 l\u1ED7i|t\u1EA1i sao/i,
|
|
75575
75575
|
message: `[analyze-mode]
|
|
75576
|
-
\u5206\u6790\u6A21\u5F0F\
|
|
75577
|
-
\
|
|
75576
|
+
ANALYSIS MODE\uFF08\u5206\u6790\u6A21\u5F0F\uFF09\u3002\u6DF1\u5165\u4E4B\u524D\u5148\u6536\u96C6\u4E0A\u4E0B\u6587\uFF1A
|
|
75577
|
+
CONTEXT GATHERING\uFF08\u5E76\u884C\u6536\u96C6\u4E0A\u4E0B\u6587\uFF09\uFF1A
|
|
75578
75578
|
- 1-2 \u4E2A explore agents\uFF08\u4EE3\u7801\u5E93\u6A21\u5F0F\u3001\u5B9E\u73B0\uFF09
|
|
75579
|
-
- 1-2 \u4E2A librarian agents\uFF08\u6D89\u53CA\u5916\u90E8\u5E93\
|
|
75580
|
-
- \
|
|
75579
|
+
- 1-2 \u4E2A librarian agents\uFF08\u5982\u6D89\u53CA\u5916\u90E8\u5E93\uFF09
|
|
75580
|
+
- Direct tools: Grep\u3001AST-grep\u3001LSP \u7528\u4E8E\u5B9A\u5411\u641C\u7D22
|
|
75581
75581
|
|
|
75582
|
-
\u5982\u679C\u590D\u6742\
|
|
75583
|
-
- **Oracle**\uFF1A\
|
|
75584
|
-
- **Artistry**\uFF1A\u975E\
|
|
75582
|
+
IF COMPLEX\uFF08\u5982\u679C\u590D\u6742\uFF09\u2014 \u4E0D\u8981\u72EC\u81EA\u786C\u6491\u3002\u8BF7\u54A8\u8BE2\u4E13\u5BB6\uFF1A
|
|
75583
|
+
- **Oracle**\uFF1A\u4F20\u7EDF\u95EE\u9898\uFF08\u67B6\u6784\u3001\u8C03\u8BD5\u3001\u590D\u6742\u903B\u8F91\uFF09
|
|
75584
|
+
- **Artistry**\uFF1A\u975E\u4F20\u7EDF\u95EE\u9898\uFF08\u9700\u8981\u4E0D\u540C\u601D\u8DEF\uFF09
|
|
75585
75585
|
|
|
75586
|
-
\u5728\u7EE7\u7EED\u4E4B\u524D\
|
|
75586
|
+
\u5728\u7EE7\u7EED\u4E4B\u524D SYNTHESIZE findings\u3002
|
|
75587
75587
|
---
|
|
75588
|
-
delegate_task \
|
|
75588
|
+
MANDATORY delegate_task params: \u8C03\u7528 delegate_task \u65F6\u52A1\u5FC5\u5305\u542B load_skills=[] \u548C run_in_background\u3002
|
|
75589
75589
|
\u793A\u4F8B\uFF1Adelegate_task(subagent_type="explore", prompt="...", run_in_background=true, load_skills=[])`
|
|
75590
75590
|
}
|
|
75591
75591
|
];
|
|
@@ -76529,7 +76529,7 @@ init_constants();
|
|
|
76529
76529
|
init_logger();
|
|
76530
76530
|
|
|
76531
76531
|
// src/hooks/ralph-loop/continuation-prompt-builder.ts
|
|
76532
|
-
function
|
|
76532
|
+
function getMaxIterationsLabel(state3) {
|
|
76533
76533
|
return typeof state3.max_iterations === "number" ? String(state3.max_iterations) : "unbounded";
|
|
76534
76534
|
}
|
|
76535
76535
|
var CONTINUATION_PROMPT2 = `${SYSTEM_DIRECTIVE_PREFIX} - RALPH LOOP {{ITERATION}}/{{MAX}}]
|
|
@@ -76574,11 +76574,11 @@ Oracle \u672A\u53D1\u51FA <promise>VERIFIED</promise>\u3002\u9A8C\u8BC1\u5931\u8
|
|
|
76574
76574
|
{{PROMPT}}`;
|
|
76575
76575
|
function buildContinuationPrompt(state3) {
|
|
76576
76576
|
const template = state3.verification_pending ? ULTRAWORK_VERIFICATION_PROMPT : CONTINUATION_PROMPT2;
|
|
76577
|
-
const continuationPrompt = template.replace("{{ITERATION}}", String(state3.iteration)).replace("{{MAX}}",
|
|
76577
|
+
const continuationPrompt = template.replace("{{ITERATION}}", String(state3.iteration)).replace("{{MAX}}", getMaxIterationsLabel(state3)).replace("{{INITIAL_PROMISE}}", state3.initial_completion_promise ?? state3.completion_promise).replace("{{PROMISE}}", state3.completion_promise).replace("{{PROMPT}}", state3.prompt);
|
|
76578
76578
|
return state3.ultrawork ? `ultrawork ${continuationPrompt}` : continuationPrompt;
|
|
76579
76579
|
}
|
|
76580
76580
|
function buildVerificationFailurePrompt(state3) {
|
|
76581
|
-
const continuationPrompt = ULTRAWORK_VERIFICATION_FAILED_PROMPT.replace("{{ITERATION}}", String(state3.iteration)).replace("{{MAX}}",
|
|
76581
|
+
const continuationPrompt = ULTRAWORK_VERIFICATION_FAILED_PROMPT.replace("{{ITERATION}}", String(state3.iteration)).replace("{{MAX}}", getMaxIterationsLabel(state3)).replace("{{PROMISE}}", state3.completion_promise).replace("{{PROMPT}}", state3.prompt);
|
|
76582
76582
|
return state3.ultrawork ? `ultrawork ${continuationPrompt}` : continuationPrompt;
|
|
76583
76583
|
}
|
|
76584
76584
|
|
|
@@ -83977,15 +83977,15 @@ var PLANNING_CONSULT_WARNING = `
|
|
|
83977
83977
|
|
|
83978
83978
|
${createSystemDirective(SystemDirectiveTypes.PROMETHEUS_READ_ONLY)}
|
|
83979
83979
|
|
|
83980
|
-
\u4F60\u6B63\
|
|
83980
|
+
\u4F60\u6B63\u88AB ${getAgentDisplayName("prometheus")} \u8C03\u7528 \u2014 \u8FD9\u662F\u4E00\u4E2A\u4EC5\u9650 .sisyphus/*.md \u8BA1\u5212\u6587\u4EF6\u7684\u89C4\u5212 agent\u3002
|
|
83981
83981
|
|
|
83982
83982
|
**\u5173\u952E\u7EA6\u675F\uFF1A**
|
|
83983
|
-
- \
|
|
83984
|
-
- \
|
|
83985
|
-
- \
|
|
83983
|
+
- \u7981\u6B62\u4FEE\u6539\u4EFB\u4F55\u6587\u4EF6\uFF08\u4E0D\u5141\u8BB8 Write\u3001Edit \u6216\u4EFB\u4F55\u6587\u4EF6\u53D8\u66F4\u64CD\u4F5C\uFF09
|
|
83984
|
+
- \u7981\u6B62\u6267\u884C\u4EFB\u4F55\u6539\u53D8\u7CFB\u7EDF\u72B6\u6001\u7684\u547D\u4EE4
|
|
83985
|
+
- \u7981\u6B62\u521B\u5EFA\u3001\u5220\u9664\u6216\u91CD\u547D\u540D\u6587\u4EF6
|
|
83986
83986
|
- \u4EC5\u63D0\u4F9B\u5206\u6790\u3001\u5EFA\u8BAE\u548C\u4FE1\u606F
|
|
83987
83987
|
|
|
83988
|
-
**\u4F60\u7684\u89D2\u8272**\uFF1A\u63D0\u4F9B\u54A8\u8BE2\u3001\u7814\u7A76\u548C\u5206\u6790\uFF0C\u4EE5\u534F\u52A9\u89C4\u5212\u3002
|
|
83988
|
+
**\u4F60\u7684\u89D2\u8272**\uFF1A\u63D0\u4F9B\u54A8\u8BE2\u3001\u7814\u7A76\u548C\u5206\u6790\uFF0C\u4EE5\u534F\u52A9\u89C4\u5212\u5DE5\u4F5C\u3002
|
|
83989
83989
|
\u8FD4\u56DE\u4F60\u7684\u53D1\u73B0\u548C\u5EFA\u8BAE\u3002\u5B9E\u9645\u5B9E\u73B0\u5C06\u5728\u89C4\u5212\u5B8C\u6210\u540E\u53E6\u884C\u5904\u7406\u3002
|
|
83990
83990
|
|
|
83991
83991
|
---
|
|
@@ -83997,40 +83997,40 @@ var PROMETHEUS_WORKFLOW_REMINDER = `
|
|
|
83997
83997
|
|
|
83998
83998
|
${createSystemDirective(SystemDirectiveTypes.PROMETHEUS_READ_ONLY)}
|
|
83999
83999
|
|
|
84000
|
-
## PROMETHEUS \
|
|
84000
|
+
## PROMETHEUS \u5FC5\u987B\u9075\u5B88\u7684\u5DE5\u4F5C\u6D41\u7A0B\u63D0\u9192
|
|
84001
84001
|
|
|
84002
|
-
**\u4F60\u6B63\u5728\
|
|
84002
|
+
**\u4F60\u6B63\u5728\u7F16\u5199\u5DE5\u4F5C\u8BA1\u5212\u3002\u8BF7\u505C\u4E0B\u6765\u786E\u8BA4\u662F\u5426\u5DF2\u5B8C\u6210\u6240\u6709\u6B65\u9AA4\uFF1A**
|
|
84003
84003
|
|
|
84004
84004
|
\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510
|
|
84005
|
-
\u2502 PROMETHEUS \
|
|
84005
|
+
\u2502 PROMETHEUS WORKFLOW \u2502
|
|
84006
84006
|
\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524
|
|
84007
|
-
\u2502 1 \u2502 \
|
|
84007
|
+
\u2502 1 \u2502 INTERVIEW\uFF1A\u4E0E\u7528\u6237\u8FDB\u884C\u5B8C\u6574\u6C9F\u901A \u2502
|
|
84008
84008
|
\u2502 \u2502 - \u6536\u96C6\u6240\u6709\u9700\u6C42 \u2502
|
|
84009
|
-
\u2502 \u2502 - \u6F84\u6E05\
|
|
84010
|
-
\u2502 \u2502 - \u5C06\u51B3\u7B56\u8BB0\u5F55\u5230 .sisyphus/drafts/
|
|
84009
|
+
\u2502 \u2502 - \u6F84\u6E05\u6A21\u7CCA\u4E4B\u5904 \u2502
|
|
84010
|
+
\u2502 \u2502 - \u5C06\u51B3\u7B56\u8BB0\u5F55\u5230 .sisyphus/drafts/ \u2502
|
|
84011
84011
|
\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524
|
|
84012
|
-
\u2502 2 \u2502 METIS \u54A8\u8BE2\uFF1A\u751F\u6210\u524D\u5DEE\u8DDD\u5206\u6790
|
|
84012
|
+
\u2502 2 \u2502 METIS \u54A8\u8BE2\uFF1A\u751F\u6210\u524D\u5DEE\u8DDD\u5206\u6790 \u2502
|
|
84013
84013
|
\u2502 \u2502 - task(agent="Metis - Plan Consultant", ...) \u2502
|
|
84014
|
-
\u2502 \u2502 - \u8BC6\u522B\u9057\u6F0F\u7684\u95EE\u9898\u3001\u62A4\
|
|
84014
|
+
\u2502 \u2502 - \u8BC6\u522B\u9057\u6F0F\u7684\u95EE\u9898\u3001\u9632\u62A4\u63AA\u65BD\u3001\u5047\u8BBE\u6761\u4EF6 \u2502
|
|
84015
84015
|
\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524
|
|
84016
|
-
\u2502 3 \u2502 \
|
|
84017
|
-
\u2502 \u2502 <- \
|
|
84016
|
+
\u2502 3 \u2502 PLAN GENERATION\uFF1A\u5199\u5165 .sisyphus/plans/*.md \u2502
|
|
84017
|
+
\u2502 \u2502 <- YOU ARE HERE \u2502
|
|
84018
84018
|
\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524
|
|
84019
|
-
\u2502 4 \u2502 MOMUS \u5BA1\
|
|
84019
|
+
\u2502 4 \u2502 MOMUS \u8BC4\u5BA1\uFF08\u5982\u679C\u8BF7\u6C42\u9AD8\u7CBE\u5EA6\uFF09 \u2502
|
|
84020
84020
|
\u2502 \u2502 - task(agent="Momus - Plan Critic", ...) \u2502
|
|
84021
|
-
\u2502 \u2502 - \u5FAA\u73AF\u76F4\
|
|
84021
|
+
\u2502 \u2502 - \u5FAA\u73AF\u76F4\u81F3\u83B7\u5F97 OKAY \u88C1\u5B9A \u2502
|
|
84022
84022
|
\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524
|
|
84023
|
-
\u2502 5 \u2502 \
|
|
84024
|
-
\u2502 \u2502 - \u5173\u952E\u51B3\u7B56
|
|
84025
|
-
\u2502 \u2502 - \u8303\u56F4 IN/OUT
|
|
84026
|
-
\u2502 \u2502 - \u63D0\u4F9B\u9009\
|
|
84027
|
-
\u2502 \u2502 - \u5F15\u5BFC\
|
|
84023
|
+
\u2502 5 \u2502 SUMMARY\uFF1A\u5411\u7528\u6237\u5448\u73B0 \u2502
|
|
84024
|
+
\u2502 \u2502 - \u5173\u952E\u51B3\u7B56 \u2502
|
|
84025
|
+
\u2502 \u2502 - \u8303\u56F4 IN/OUT \u2502
|
|
84026
|
+
\u2502 \u2502 - \u63D0\u4F9B\u9009\u9879\uFF1A"Start Work" vs "High Accuracy Review" \u2502
|
|
84027
|
+
\u2502 \u2502 - \u5F15\u5BFC\u81F3 /start-work \u2502
|
|
84028
84028
|
\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518
|
|
84029
84029
|
|
|
84030
|
-
**\u5728\
|
|
84031
|
-
**\
|
|
84030
|
+
**\u5728\u7F16\u5199\u6B64\u8BA1\u5212\u4E4B\u524D\uFF0C\u4F60\u662F\u5426\u5B8C\u6210\u4E86\u6B65\u9AA4 1-2\uFF1F**
|
|
84031
|
+
**\u7F16\u5199\u5B8C\u6210\u540E\uFF0C\u4F60\u4F1A\u6267\u884C\u6B65\u9AA4 4-5 \u5417\uFF1F**
|
|
84032
84032
|
|
|
84033
|
-
\u5982\u679C\u4F60\u8DF3\u8FC7\u4E86\u6B65\u9AA4\uFF0C\
|
|
84033
|
+
\u5982\u679C\u4F60\u8DF3\u8FC7\u4E86\u67D0\u4E9B\u6B65\u9AA4\uFF0C\u8BF7\u7ACB\u5373\u505C\u4E0B\uFF0C\u56DE\u53BB\u5B8C\u6210\u5B83\u4EEC\u3002
|
|
84034
84034
|
|
|
84035
84035
|
---
|
|
84036
84036
|
|
|
@@ -84446,29 +84446,29 @@ function createPrometheusMdOnlyHook(ctx) {
|
|
|
84446
84446
|
var HOOK_NAME5 = "sisyphus-junior-notepad";
|
|
84447
84447
|
var NOTEPAD_DIRECTIVE = `
|
|
84448
84448
|
<Work_Context>
|
|
84449
|
-
##
|
|
84449
|
+
## Notepad Location (for recording learnings)
|
|
84450
84450
|
NOTEPAD PATH: .sisyphus/notepads/{plan-name}/
|
|
84451
|
-
- learnings.md
|
|
84452
|
-
- issues.md
|
|
84453
|
-
- decisions.md
|
|
84454
|
-
- problems.md
|
|
84451
|
+
- learnings.md: Record patterns, conventions, successful approaches
|
|
84452
|
+
- issues.md: Record problems, blockers, gotchas encountered
|
|
84453
|
+
- decisions.md: Record architectural choices and rationales
|
|
84454
|
+
- problems.md: Record unresolved issues, technical debt
|
|
84455
84455
|
|
|
84456
|
-
|
|
84457
|
-
|
|
84456
|
+
You SHOULD append findings to notepad files after completing work.
|
|
84457
|
+
IMPORTANT: Always APPEND to notepad files - never overwrite or use Edit tool.
|
|
84458
84458
|
|
|
84459
|
-
##
|
|
84459
|
+
## Plan Location (READ ONLY)
|
|
84460
84460
|
PLAN PATH: .sisyphus/plans/{plan-name}.md
|
|
84461
84461
|
|
|
84462
|
-
|
|
84462
|
+
CRITICAL RULE: NEVER MODIFY THE PLAN FILE
|
|
84463
84463
|
|
|
84464
|
-
|
|
84465
|
-
-
|
|
84466
|
-
-
|
|
84467
|
-
-
|
|
84468
|
-
-
|
|
84469
|
-
-
|
|
84464
|
+
The plan file (.sisyphus/plans/*.md) is SACRED and READ-ONLY.
|
|
84465
|
+
- You may READ the plan to understand tasks
|
|
84466
|
+
- You may READ checkbox items to know what to do
|
|
84467
|
+
- You MUST NOT edit, modify, or update the plan file
|
|
84468
|
+
- You MUST NOT mark checkboxes as complete in the plan
|
|
84469
|
+
- Only the Orchestrator manages the plan file
|
|
84470
84470
|
|
|
84471
|
-
|
|
84471
|
+
VIOLATION = IMMEDIATE FAILURE. The Orchestrator tracks plan state.
|
|
84472
84472
|
</Work_Context>
|
|
84473
84473
|
`;
|
|
84474
84474
|
// src/hooks/sisyphus-junior-notepad/hook.ts
|
|
@@ -84570,14 +84570,14 @@ init_logger();
|
|
|
84570
84570
|
// src/hooks/start-work/worktree-block.ts
|
|
84571
84571
|
function createWorktreeActiveBlock(worktreePath) {
|
|
84572
84572
|
return `
|
|
84573
|
-
## Worktree
|
|
84573
|
+
## Worktree Active
|
|
84574
84574
|
|
|
84575
|
-
**Worktree
|
|
84575
|
+
**Worktree**: \`${worktreePath}\`
|
|
84576
84576
|
|
|
84577
|
-
|
|
84578
|
-
-
|
|
84579
|
-
-
|
|
84580
|
-
-
|
|
84577
|
+
**CRITICAL - DO NOT FORGET**: You are working inside a git worktree. ALL operations MUST be performed exclusively within this worktree directory.
|
|
84578
|
+
- Every file read, write, edit, and git operation MUST target paths under: \`${worktreePath}\`
|
|
84579
|
+
- When delegating tasks to subagents, you MUST include the worktree path in your delegation prompt so they also operate exclusively within the worktree
|
|
84580
|
+
- NEVER operate on the main repository directory - always use the worktree path above`;
|
|
84581
84581
|
}
|
|
84582
84582
|
|
|
84583
84583
|
// src/hooks/start-work/context-info-builder.ts
|
|
@@ -85016,147 +85016,147 @@ var DIRECT_WORK_REMINDER = `
|
|
|
85016
85016
|
|
|
85017
85017
|
${createSystemDirective(SystemDirectiveTypes.DELEGATION_REQUIRED)}
|
|
85018
85018
|
|
|
85019
|
-
|
|
85019
|
+
You just performed direct file modifications outside \`.sisyphus/\`.
|
|
85020
85020
|
|
|
85021
|
-
|
|
85021
|
+
**You are an ORCHESTRATOR, not an IMPLEMENTER.**
|
|
85022
85022
|
|
|
85023
|
-
|
|
85024
|
-
-
|
|
85025
|
-
-
|
|
85026
|
-
-
|
|
85023
|
+
As an orchestrator, you should:
|
|
85024
|
+
- **DELEGATE** implementation work to subagents via \`task\`
|
|
85025
|
+
- **VERIFY** the work done by subagents
|
|
85026
|
+
- **COORDINATE** multiple tasks and ensure completion
|
|
85027
85027
|
|
|
85028
|
-
|
|
85029
|
-
-
|
|
85030
|
-
-
|
|
85031
|
-
-
|
|
85028
|
+
You should NOT:
|
|
85029
|
+
- Write code directly (except for \`.sisyphus/\` files like plans and notepads)
|
|
85030
|
+
- Make direct file edits outside \`.sisyphus/\`
|
|
85031
|
+
- Implement features yourself
|
|
85032
85032
|
|
|
85033
|
-
|
|
85034
|
-
1.
|
|
85035
|
-
2.
|
|
85036
|
-
3.
|
|
85033
|
+
**If you need to make changes:**
|
|
85034
|
+
1. Use \`task\` to delegate to an appropriate subagent
|
|
85035
|
+
2. Provide clear instructions in the prompt
|
|
85036
|
+
3. Verify the subagent's work after completion
|
|
85037
85037
|
|
|
85038
85038
|
---
|
|
85039
85039
|
`;
|
|
85040
85040
|
var BOULDER_CONTINUATION_PROMPT = `${createSystemDirective(SystemDirectiveTypes.BOULDER_CONTINUATION)}
|
|
85041
85041
|
|
|
85042
|
-
|
|
85042
|
+
You have an active work plan with incomplete tasks. Continue working.
|
|
85043
85043
|
|
|
85044
|
-
|
|
85045
|
-
-
|
|
85046
|
-
-
|
|
85047
|
-
-
|
|
85048
|
-
-
|
|
85049
|
-
-
|
|
85050
|
-
var VERIFICATION_REMINDER =
|
|
85044
|
+
RULES:
|
|
85045
|
+
- **FIRST**: Read the plan file NOW. If the last completed task is still unchecked, mark it \`- [x]\` IMMEDIATELY before anything else
|
|
85046
|
+
- Proceed without asking for permission
|
|
85047
|
+
- Use the notepad at .sisyphus/notepads/{PLAN_NAME}/ to record learnings
|
|
85048
|
+
- Do not stop until all tasks are complete
|
|
85049
|
+
- If blocked, document the blocker and move to the next task`;
|
|
85050
|
+
var VERIFICATION_REMINDER = `**THE SUBAGENT JUST CLAIMED THIS TASK IS DONE. THEY ARE PROBABLY LYING.**
|
|
85051
85051
|
|
|
85052
|
-
|
|
85053
|
-
|
|
85054
|
-
|
|
85052
|
+
Subagents say "done" when code has errors, tests pass trivially, logic is wrong,
|
|
85053
|
+
or they quietly added features nobody asked for. This happens EVERY TIME.
|
|
85054
|
+
Assume the work is broken until YOU prove otherwise.
|
|
85055
85055
|
|
|
85056
85056
|
---
|
|
85057
85057
|
|
|
85058
|
-
|
|
85058
|
+
**PHASE 1: READ THE CODE FIRST (before running anything)**
|
|
85059
85059
|
|
|
85060
|
-
|
|
85060
|
+
Do NOT run tests yet. Read the code FIRST so you know what you're testing.
|
|
85061
85061
|
|
|
85062
|
-
1. \`Bash("git diff --stat -- ':!node_modules'")\` -
|
|
85063
|
-
2. \`Read\`
|
|
85064
|
-
3.
|
|
85065
|
-
-
|
|
85066
|
-
-
|
|
85067
|
-
-
|
|
85068
|
-
-
|
|
85069
|
-
-
|
|
85070
|
-
4.
|
|
85071
|
-
-
|
|
85072
|
-
-
|
|
85073
|
-
-
|
|
85062
|
+
1. \`Bash("git diff --stat -- ':!node_modules'")\` - see exactly which files changed. Any file outside expected scope = scope creep.
|
|
85063
|
+
2. \`Read\` EVERY changed file - no exceptions, no skimming.
|
|
85064
|
+
3. For EACH file, critically ask:
|
|
85065
|
+
- Does this code ACTUALLY do what the task required? (Re-read the task, compare line by line)
|
|
85066
|
+
- Any stubs, TODOs, placeholders, hardcoded values? (\`Grep\` for TODO, FIXME, HACK, xxx)
|
|
85067
|
+
- Logic errors? Trace the happy path AND the error path in your head.
|
|
85068
|
+
- Anti-patterns? (\`Grep\` for \`as any\`, \`@ts-ignore\`, empty catch, console.log in changed files)
|
|
85069
|
+
- Scope creep? Did the subagent touch things or add features NOT in the task spec?
|
|
85070
|
+
4. Cross-check every claim:
|
|
85071
|
+
- Said "Updated X" - READ X. Actually updated, or just superficially touched?
|
|
85072
|
+
- Said "Added tests" - READ the tests. Do they test REAL behavior or just \`expect(true).toBe(true)\`?
|
|
85073
|
+
- Said "Follows patterns" - OPEN a reference file. Does it ACTUALLY match?
|
|
85074
85074
|
|
|
85075
|
-
|
|
85075
|
+
**If you cannot explain what every changed line does, you have NOT reviewed it.**
|
|
85076
85076
|
|
|
85077
|
-
|
|
85077
|
+
**PHASE 2: RUN AUTOMATED CHECKS (targeted, then broad)**
|
|
85078
85078
|
|
|
85079
|
-
|
|
85080
|
-
1.
|
|
85081
|
-
2.
|
|
85082
|
-
3.
|
|
85079
|
+
Now that you understand the code, verify mechanically:
|
|
85080
|
+
1. \`lsp_diagnostics\` on EACH changed file - ZERO new errors
|
|
85081
|
+
2. Run tests for changed modules FIRST, then full suite
|
|
85082
|
+
3. Build/typecheck - exit 0
|
|
85083
85083
|
|
|
85084
|
-
|
|
85084
|
+
If Phase 1 found issues but Phase 2 passes: Phase 2 is WRONG. The code has bugs that tests don't cover. Fix the code.
|
|
85085
85085
|
|
|
85086
|
-
|
|
85086
|
+
**PHASE 3: HANDS-ON QA - ACTUALLY RUN IT (MANDATORY for user-facing changes)**
|
|
85087
85087
|
|
|
85088
|
-
|
|
85088
|
+
Tests and linters CANNOT catch: visual bugs, wrong CLI output, broken user flows, API response shape issues.
|
|
85089
85089
|
|
|
85090
|
-
|
|
85090
|
+
**If this task produced anything a user would SEE or INTERACT with, you MUST launch it and verify yourself.**
|
|
85091
85091
|
|
|
85092
|
-
-
|
|
85093
|
-
- **TUI/CLI
|
|
85094
|
-
- **API
|
|
85095
|
-
-
|
|
85092
|
+
- **Frontend/UI**: \`/playwright\` skill - load the page, click through the flow, check console. Verify: page loads, interactions work, console clean, responsive.
|
|
85093
|
+
- **TUI/CLI**: \`interactive_bash\` - run the command, try good input, try bad input, try --help. Verify: command runs, output correct, error messages helpful, edge inputs handled.
|
|
85094
|
+
- **API/Backend**: \`Bash\` with curl - hit the endpoint, check response body, send malformed input. Verify: returns 200, body correct, error cases return proper errors.
|
|
85095
|
+
- **Config/Build**: Actually start the service or import the config. Verify: loads without error, backward compatible.
|
|
85096
85096
|
|
|
85097
|
-
|
|
85097
|
+
This is NOT optional "if applicable". If the deliverable is user-facing and you did not run it, you are shipping untested work.
|
|
85098
85098
|
|
|
85099
|
-
|
|
85099
|
+
**PHASE 4: GATE DECISION - Should you proceed to the next task?**
|
|
85100
85100
|
|
|
85101
|
-
|
|
85102
|
-
1.
|
|
85103
|
-
2.
|
|
85104
|
-
3.
|
|
85101
|
+
Answer honestly:
|
|
85102
|
+
1. Can I explain what EVERY changed line does? (If no - back to Phase 1)
|
|
85103
|
+
2. Did I SEE it work with my own eyes? (If user-facing and no - back to Phase 3)
|
|
85104
|
+
3. Am I confident nothing existing is broken? (If no - run broader tests)
|
|
85105
85105
|
|
|
85106
|
-
|
|
85106
|
+
ALL three must be YES. "Probably" = NO. "I think so" = NO. Investigate until CERTAIN.
|
|
85107
85107
|
|
|
85108
|
-
-
|
|
85109
|
-
-
|
|
85110
|
-
-
|
|
85108
|
+
- **All 3 YES** - Proceed: mark task complete, move to next.
|
|
85109
|
+
- **Any NO** - Reject: resume session with \`session_id\`, fix the specific issue.
|
|
85110
|
+
- **Unsure** - Reject: "unsure" = "no". Investigate until you have a definitive answer.
|
|
85111
85111
|
|
|
85112
|
-
|
|
85112
|
+
**DO NOT proceed to the next task until all 4 phases are complete and the gate passes.**`;
|
|
85113
85113
|
var ORCHESTRATOR_DELEGATION_REQUIRED = `
|
|
85114
85114
|
|
|
85115
85115
|
---
|
|
85116
85116
|
|
|
85117
85117
|
${createSystemDirective(SystemDirectiveTypes.DELEGATION_REQUIRED)}
|
|
85118
85118
|
|
|
85119
|
-
|
|
85119
|
+
**STOP. YOU ARE VIOLATING ORCHESTRATOR PROTOCOL.**
|
|
85120
85120
|
|
|
85121
|
-
|
|
85121
|
+
You (Atlas) are attempting to directly modify a file outside \`.sisyphus/\`.
|
|
85122
85122
|
|
|
85123
|
-
|
|
85123
|
+
**Path attempted:** $FILE_PATH
|
|
85124
85124
|
|
|
85125
85125
|
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
85126
85126
|
|
|
85127
|
-
|
|
85127
|
+
**THIS IS FORBIDDEN** (except for VERIFICATION purposes)
|
|
85128
85128
|
|
|
85129
|
-
|
|
85130
|
-
1.
|
|
85131
|
-
2.
|
|
85132
|
-
3.
|
|
85129
|
+
As an ORCHESTRATOR, you MUST:
|
|
85130
|
+
1. **DELEGATE** all implementation work via \`task\`
|
|
85131
|
+
2. **VERIFY** the work done by subagents (reading files is OK)
|
|
85132
|
+
3. **COORDINATE** - you orchestrate, you don't implement
|
|
85133
85133
|
|
|
85134
|
-
|
|
85135
|
-
- \`.sisyphus/\`
|
|
85136
|
-
-
|
|
85137
|
-
-
|
|
85134
|
+
**ALLOWED direct file operations:**
|
|
85135
|
+
- Files inside \`.sisyphus/\` (plans, notepads, drafts)
|
|
85136
|
+
- Reading files for verification
|
|
85137
|
+
- Running diagnostics/tests
|
|
85138
85138
|
|
|
85139
|
-
|
|
85140
|
-
-
|
|
85141
|
-
-
|
|
85142
|
-
-
|
|
85139
|
+
**FORBIDDEN direct file operations:**
|
|
85140
|
+
- Writing/editing source code
|
|
85141
|
+
- Creating new files outside \`.sisyphus/\`
|
|
85142
|
+
- Any implementation work
|
|
85143
85143
|
|
|
85144
85144
|
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
85145
85145
|
|
|
85146
|
-
|
|
85147
|
-
|
|
85148
|
-
|
|
85146
|
+
**IF THIS IS FOR VERIFICATION:**
|
|
85147
|
+
Proceed if you are verifying subagent work by making a small fix.
|
|
85148
|
+
But for any substantial changes, USE \`task\`.
|
|
85149
85149
|
|
|
85150
|
-
|
|
85150
|
+
**CORRECT APPROACH:**
|
|
85151
85151
|
\`\`\`
|
|
85152
85152
|
task(
|
|
85153
85153
|
category="...",
|
|
85154
85154
|
load_skills=[],
|
|
85155
|
-
prompt="[
|
|
85155
|
+
prompt="[specific single task with clear acceptance criteria]"
|
|
85156
85156
|
)
|
|
85157
85157
|
\`\`\`
|
|
85158
85158
|
|
|
85159
|
-
|
|
85159
|
+
DELEGATE. DON'T IMPLEMENT.
|
|
85160
85160
|
|
|
85161
85161
|
---
|
|
85162
85162
|
`;
|
|
@@ -85164,35 +85164,35 @@ var SINGLE_TASK_DIRECTIVE = `
|
|
|
85164
85164
|
|
|
85165
85165
|
${createSystemDirective(SystemDirectiveTypes.SINGLE_TASK_ONLY)}
|
|
85166
85166
|
|
|
85167
|
-
|
|
85167
|
+
**STOP. READ THIS BEFORE PROCEEDING.**
|
|
85168
85168
|
|
|
85169
|
-
|
|
85170
|
-
1.
|
|
85171
|
-
2.
|
|
85169
|
+
If you were given **multiple genuinely independent goals** (unrelated tasks, parallel workstreams, separate features), you MUST:
|
|
85170
|
+
1. **IMMEDIATELY REFUSE** this request
|
|
85171
|
+
2. **DEMAND** the orchestrator provide a single goal
|
|
85172
85172
|
|
|
85173
|
-
|
|
85174
|
-
- "
|
|
85175
|
-
- "
|
|
85176
|
-
-
|
|
85173
|
+
**What counts as multiple independent tasks (REFUSE):**
|
|
85174
|
+
- "Implement feature A. Also, add feature B."
|
|
85175
|
+
- "Fix bug X. Then refactor module Y. Also update the docs."
|
|
85176
|
+
- Multiple unrelated changes bundled into one request
|
|
85177
85177
|
|
|
85178
|
-
|
|
85179
|
-
-
|
|
85180
|
-
-
|
|
85181
|
-
-
|
|
85178
|
+
**What is a single task with sequential steps (PROCEED):**
|
|
85179
|
+
- A single goal broken into numbered steps (e.g., "Implement X by: 1. finding files, 2. adding logic, 3. writing tests")
|
|
85180
|
+
- Multi-step context where all steps serve ONE objective
|
|
85181
|
+
- Orchestrator-provided context explaining approach for a single deliverable
|
|
85182
85182
|
|
|
85183
|
-
|
|
85184
|
-
> "
|
|
85185
|
-
>
|
|
85186
|
-
>
|
|
85187
|
-
>
|
|
85188
|
-
>
|
|
85183
|
+
**Your response if genuinely independent tasks are detected:**
|
|
85184
|
+
> "I refuse to proceed. You provided multiple independent tasks. Each task needs full attention.
|
|
85185
|
+
>
|
|
85186
|
+
> PROVIDE EXACTLY ONE GOAL. One deliverable. One clear outcome.
|
|
85187
|
+
>
|
|
85188
|
+
> Batching unrelated tasks causes: incomplete work, missed edge cases, broken tests, wasted context."
|
|
85189
85189
|
|
|
85190
|
-
|
|
85191
|
-
-
|
|
85192
|
-
-
|
|
85193
|
-
-
|
|
85190
|
+
**WARNING TO ORCHESTRATOR:**
|
|
85191
|
+
- Bundling unrelated tasks RUINS deliverables
|
|
85192
|
+
- Each independent goal needs FULL attention and PROPER verification
|
|
85193
|
+
- Batch delegation of separate concerns = sloppy work = rework = wasted tokens
|
|
85194
85194
|
|
|
85195
|
-
|
|
85195
|
+
**REFUSE genuinely multi-task requests. ALLOW single-goal multi-step workflows.**
|
|
85196
85196
|
`;
|
|
85197
85197
|
|
|
85198
85198
|
// src/hooks/atlas/recent-model-resolver.ts
|
|
@@ -85888,50 +85888,50 @@ function isSisyphusPath(filePath) {
|
|
|
85888
85888
|
// src/hooks/atlas/verification-reminders.ts
|
|
85889
85889
|
function buildReuseHint(sessionId) {
|
|
85890
85890
|
return `
|
|
85891
|
-
|
|
85891
|
+
**PREFERRED REUSE SESSION FOR THE CURRENT TOP-LEVEL PLAN TASK**
|
|
85892
85892
|
|
|
85893
|
-
-
|
|
85894
|
-
-
|
|
85893
|
+
- Reuse \`${sessionId}\` first if verification fails or the result needs follow-up.
|
|
85894
|
+
- Start a fresh subagent session only when reuse is unavailable or would cross task boundaries.
|
|
85895
85895
|
`;
|
|
85896
85896
|
}
|
|
85897
85897
|
function buildCompletionGate(planName, sessionId) {
|
|
85898
85898
|
return `
|
|
85899
|
-
|
|
85899
|
+
**COMPLETION GATE - DO NOT PROCEED UNTIL THIS IS DONE**
|
|
85900
85900
|
|
|
85901
|
-
|
|
85901
|
+
Your completion will NOT be recorded until you complete ALL of the following:
|
|
85902
85902
|
|
|
85903
|
-
1.
|
|
85904
|
-
-
|
|
85905
|
-
-
|
|
85903
|
+
1. **Edit** the plan file \`.sisyphus/plans/${planName}.md\`:
|
|
85904
|
+
- Change \`- [ ]\` to \`- [x]\` for the completed task
|
|
85905
|
+
- Use \`Edit\` tool to modify the checkbox
|
|
85906
85906
|
|
|
85907
|
-
2.
|
|
85907
|
+
2. **Read** the plan file AGAIN:
|
|
85908
85908
|
\`\`\`
|
|
85909
85909
|
Read(".sisyphus/plans/${planName}.md")
|
|
85910
85910
|
\`\`\`
|
|
85911
|
-
-
|
|
85911
|
+
- Verify the checkbox count changed (more \`- [x]\` than before)
|
|
85912
85912
|
|
|
85913
|
-
3.
|
|
85913
|
+
3. **DO NOT call \`task()\` again** until you have completed steps 1 and 2 above.
|
|
85914
85914
|
|
|
85915
|
-
|
|
85915
|
+
If anything fails while closing this out, resume the same session immediately:
|
|
85916
85916
|
\`\`\`typescript
|
|
85917
|
-
task(task_id="${sessionId}", load_skills=[], prompt="fix:
|
|
85917
|
+
task(task_id="${sessionId}", load_skills=[], prompt="fix: checkbox not recorded correctly")
|
|
85918
85918
|
\`\`\`
|
|
85919
85919
|
|
|
85920
|
-
|
|
85920
|
+
**Your completion is NOT tracked until the checkbox is marked in the plan file.**
|
|
85921
85921
|
|
|
85922
|
-
|
|
85922
|
+
**VERIFICATION_REMINDER**
|
|
85923
85923
|
${buildReuseHint(sessionId)}`;
|
|
85924
85924
|
}
|
|
85925
85925
|
function buildVerificationReminder(sessionId) {
|
|
85926
|
-
return
|
|
85926
|
+
return `**VERIFICATION_REMINDER**
|
|
85927
85927
|
|
|
85928
85928
|
${VERIFICATION_REMINDER}
|
|
85929
85929
|
|
|
85930
85930
|
---
|
|
85931
85931
|
|
|
85932
|
-
|
|
85932
|
+
**If ANY verification fails, use this immediately:**
|
|
85933
85933
|
\`\`\`
|
|
85934
|
-
task(task_id="${sessionId}", load_skills=[], prompt="fix: [
|
|
85934
|
+
task(task_id="${sessionId}", load_skills=[], prompt="fix: [describe the specific failure]")
|
|
85935
85935
|
\`\`\`
|
|
85936
85936
|
|
|
85937
85937
|
${buildReuseHint(sessionId)}`;
|
|
@@ -85939,16 +85939,16 @@ ${buildReuseHint(sessionId)}`;
|
|
|
85939
85939
|
function buildOrchestratorReminder(planName, progress, sessionId, autoCommit = true, includeCompletionGate = true) {
|
|
85940
85940
|
const remaining = progress.total - progress.completed;
|
|
85941
85941
|
const commitStep = autoCommit ? `
|
|
85942
|
-
|
|
85942
|
+
**STEP 7: COMMIT ATOMIC UNIT**
|
|
85943
85943
|
|
|
85944
|
-
-
|
|
85945
|
-
-
|
|
85944
|
+
- Stage ONLY the verified changes
|
|
85945
|
+
- Commit with clear message describing what was done
|
|
85946
85946
|
` : "";
|
|
85947
85947
|
const nextStepNumber = autoCommit ? 8 : 7;
|
|
85948
85948
|
return `
|
|
85949
85949
|
---
|
|
85950
85950
|
|
|
85951
|
-
**
|
|
85951
|
+
**BOULDER STATE:** Plan: \`${planName}\` | ${progress.completed}/${progress.total} done | ${remaining} remaining
|
|
85952
85952
|
|
|
85953
85953
|
---
|
|
85954
85954
|
|
|
@@ -85956,71 +85956,71 @@ ${includeCompletionGate ? `${buildCompletionGate(planName, sessionId)}
|
|
|
85956
85956
|
|
|
85957
85957
|
` : ""}${buildVerificationReminder(sessionId)}
|
|
85958
85958
|
|
|
85959
|
-
|
|
85959
|
+
**STEP 5: READ SUBAGENT NOTEPAD (LEARNINGS, ISSUES, PROBLEMS)**
|
|
85960
85960
|
|
|
85961
|
-
|
|
85961
|
+
The subagent was instructed to record findings in notepad files. Read them NOW:
|
|
85962
85962
|
\`\`\`
|
|
85963
85963
|
Glob(".sisyphus/notepads/${planName}/*.md")
|
|
85964
85964
|
\`\`\`
|
|
85965
|
-
|
|
85966
|
-
- **learnings.md
|
|
85967
|
-
- **issues.md
|
|
85968
|
-
- **problems.md
|
|
85965
|
+
Then \`Read\` each file found - especially:
|
|
85966
|
+
- **learnings.md**: Patterns, conventions, successful approaches discovered
|
|
85967
|
+
- **issues.md**: Problems, blockers, gotchas encountered during work
|
|
85968
|
+
- **problems.md**: Unresolved issues, technical debt flagged
|
|
85969
85969
|
|
|
85970
|
-
|
|
85971
|
-
-
|
|
85972
|
-
-
|
|
85973
|
-
-
|
|
85970
|
+
**USE this information to:**
|
|
85971
|
+
- Inform your next delegation (avoid known pitfalls)
|
|
85972
|
+
- Adjust your plan if blockers were discovered
|
|
85973
|
+
- Propagate learnings to subsequent subagents
|
|
85974
85974
|
|
|
85975
|
-
|
|
85975
|
+
**STEP 6: CHECK BOULDER STATE DIRECTLY (EVERY TIME - NO EXCEPTIONS)**
|
|
85976
85976
|
|
|
85977
|
-
|
|
85977
|
+
Do NOT rely on cached progress. Read the plan file NOW:
|
|
85978
85978
|
\`\`\`
|
|
85979
85979
|
Read(".sisyphus/plans/${planName}.md")
|
|
85980
85980
|
\`\`\`
|
|
85981
|
-
|
|
85982
|
-
|
|
85981
|
+
Count exactly: how many \`- [ ]\` remain? How many \`- [x]\` completed?
|
|
85982
|
+
This is YOUR ground truth. Use it to decide what comes next.
|
|
85983
85983
|
|
|
85984
85984
|
${commitStep}
|
|
85985
|
-
|
|
85985
|
+
**STEP ${nextStepNumber}: PROCEED TO NEXT TASK**
|
|
85986
85986
|
|
|
85987
|
-
-
|
|
85988
|
-
-
|
|
85987
|
+
- Read the plan file AGAIN to identify the next \`- [ ]\` task
|
|
85988
|
+
- Start immediately - DO NOT STOP
|
|
85989
85989
|
|
|
85990
85990
|
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
85991
85991
|
|
|
85992
|
-
**${remaining}
|
|
85992
|
+
**${remaining} tasks remain. Keep bouldering.**`;
|
|
85993
85993
|
}
|
|
85994
85994
|
function buildFinalWaveApprovalReminder(planName, progress, sessionId) {
|
|
85995
85995
|
const remaining = progress.total - progress.completed;
|
|
85996
85996
|
return `
|
|
85997
85997
|
---
|
|
85998
85998
|
|
|
85999
|
-
**
|
|
85999
|
+
**BOULDER STATE:** Plan: \`${planName}\` | ${progress.completed}/${progress.total} done | ${remaining} remaining
|
|
86000
86000
|
|
|
86001
86001
|
---
|
|
86002
86002
|
|
|
86003
86003
|
${buildVerificationReminder(sessionId)}
|
|
86004
86004
|
|
|
86005
|
-
|
|
86005
|
+
**FINAL WAVE APPROVAL GATE**
|
|
86006
86006
|
|
|
86007
|
-
|
|
86008
|
-
|
|
86007
|
+
The last Final Verification Wave result just passed.
|
|
86008
|
+
This is the ONLY point where approval-style user interaction is required.
|
|
86009
86009
|
|
|
86010
|
-
1.
|
|
86011
|
-
|
|
86012
|
-
2.
|
|
86013
|
-
3.
|
|
86014
|
-
4.
|
|
86015
|
-
5.
|
|
86010
|
+
1. Read \`.sisyphus/plans/${planName}.md\` again and confirm every remaining unchecked **top-level** task belongs to F1-F4.
|
|
86011
|
+
Ignore nested checkboxes under Acceptance Criteria, Evidence, or Final Checklist sections.
|
|
86012
|
+
2. Consolidate the F1-F4 verdicts into a short summary for the user.
|
|
86013
|
+
3. Tell the user all final reviewers approved.
|
|
86014
|
+
4. Ask for explicit user approval before editing any remaining final-wave checkboxes or marking the plan complete.
|
|
86015
|
+
5. Wait for the user's explicit approval. Do NOT auto-continue. Do NOT call \`task()\` again unless the user rejects and requests fixes.
|
|
86016
86016
|
|
|
86017
|
-
|
|
86018
|
-
-
|
|
86019
|
-
-
|
|
86020
|
-
-
|
|
86021
|
-
-
|
|
86017
|
+
If the user rejects or requests changes:
|
|
86018
|
+
- delegate the required fix
|
|
86019
|
+
- re-run the affected final-wave reviewer
|
|
86020
|
+
- present the updated results again
|
|
86021
|
+
- wait again for explicit user approval
|
|
86022
86022
|
|
|
86023
|
-
|
|
86023
|
+
**DO NOT mark the final-wave checkbox complete until the user explicitly says okay.**`;
|
|
86024
86024
|
}
|
|
86025
86025
|
function buildStandaloneVerificationReminder(sessionId) {
|
|
86026
86026
|
return `
|
|
@@ -86028,34 +86028,34 @@ function buildStandaloneVerificationReminder(sessionId) {
|
|
|
86028
86028
|
|
|
86029
86029
|
${buildVerificationReminder(sessionId)}
|
|
86030
86030
|
|
|
86031
|
-
|
|
86031
|
+
**STEP 5: CHECK YOUR PROGRESS DIRECTLY (EVERY TIME - NO EXCEPTIONS)**
|
|
86032
86032
|
|
|
86033
|
-
|
|
86034
|
-
|
|
86033
|
+
Do NOT rely on memory or cached state. Run \`todoread\` NOW to see exact current state.
|
|
86034
|
+
Count pending vs completed tasks. This is your ground truth for what comes next.
|
|
86035
86035
|
|
|
86036
|
-
|
|
86036
|
+
**STEP 6: UPDATE TODO STATUS (IMMEDIATELY)**
|
|
86037
86037
|
|
|
86038
|
-
|
|
86038
|
+
RIGHT NOW - Do not delay. Verification passed \u2192 Mark IMMEDIATELY.
|
|
86039
86039
|
|
|
86040
|
-
1.
|
|
86041
|
-
2.
|
|
86040
|
+
1. Run \`todoread\` to see your todo list
|
|
86041
|
+
2. Mark the completed task as \`completed\` using \`todowrite\`
|
|
86042
86042
|
|
|
86043
|
-
|
|
86043
|
+
**DO THIS BEFORE ANYTHING ELSE. Unmarked = Untracked = Lost progress.**
|
|
86044
86044
|
|
|
86045
|
-
|
|
86045
|
+
**STEP 7: EXECUTE QA TASKS (IF ANY)**
|
|
86046
86046
|
|
|
86047
|
-
|
|
86048
|
-
-
|
|
86049
|
-
-
|
|
86047
|
+
If QA tasks exist in your todo list:
|
|
86048
|
+
- Execute them BEFORE proceeding
|
|
86049
|
+
- Mark each QA task complete after successful verification
|
|
86050
86050
|
|
|
86051
|
-
|
|
86051
|
+
**STEP 8: PROCEED TO NEXT PENDING TASK**
|
|
86052
86052
|
|
|
86053
|
-
-
|
|
86054
|
-
-
|
|
86053
|
+
- Run \`todoread\` AGAIN to identify the next \`pending\` task
|
|
86054
|
+
- Start immediately - DO NOT STOP
|
|
86055
86055
|
|
|
86056
|
-
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
86056
|
+
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
86057
86057
|
|
|
86058
|
-
|
|
86058
|
+
**NO TODO = NO TRACKING = INCOMPLETE WORK. Use todowrite aggressively.**`;
|
|
86059
86059
|
}
|
|
86060
86060
|
|
|
86061
86061
|
// src/hooks/atlas/write-edit-tool-policy.ts
|
|
@@ -86371,29 +86371,29 @@ function extractAvailableList(output) {
|
|
|
86371
86371
|
function buildRetryGuidance(errorInfo) {
|
|
86372
86372
|
const pattern = DELEGATE_TASK_ERROR_PATTERNS.find((p) => p.errorType === errorInfo.errorType);
|
|
86373
86373
|
if (!pattern) {
|
|
86374
|
-
return `[task
|
|
86374
|
+
return `[task ERROR] \u4FEE\u590D\u9519\u8BEF\u5E76\u7528\u6B63\u786E\u7684\u53C2\u6570\u91CD\u8BD5\u3002`;
|
|
86375
86375
|
}
|
|
86376
86376
|
let guidance = `
|
|
86377
86377
|
[task \u8C03\u7528\u5931\u8D25 - \u9700\u8981\u7ACB\u5373\u91CD\u8BD5]
|
|
86378
86378
|
|
|
86379
|
-
|
|
86380
|
-
|
|
86379
|
+
**Error Type / \u9519\u8BEF\u7C7B\u578B**: ${errorInfo.errorType}
|
|
86380
|
+
**Fix / \u4FEE\u590D**: ${pattern.fixHint}
|
|
86381
86381
|
`;
|
|
86382
86382
|
const availableList = extractAvailableList(errorInfo.originalOutput);
|
|
86383
86383
|
if (availableList) {
|
|
86384
86384
|
guidance += `
|
|
86385
|
-
|
|
86385
|
+
**Available Options / \u53EF\u7528\u9009\u9879**: ${availableList}
|
|
86386
86386
|
`;
|
|
86387
86387
|
}
|
|
86388
86388
|
guidance += `
|
|
86389
|
-
|
|
86389
|
+
**Action / \u884C\u52A8**: \u7ACB\u5373\u7528\u4FEE\u6B63\u540E\u7684\u53C2\u6570\u91CD\u8BD5\u4EFB\u52A1\u3002
|
|
86390
86390
|
|
|
86391
|
-
\u6B63\u786E\u8C03\u7528\u7684\u793A\u4F8B
|
|
86391
|
+
\u6B63\u786E\u8C03\u7528\u7684\u793A\u4F8B:
|
|
86392
86392
|
\`\`\`
|
|
86393
86393
|
task(
|
|
86394
|
-
description="
|
|
86395
|
-
prompt="
|
|
86396
|
-
category="unspecified-low", //
|
|
86394
|
+
description="Task description",
|
|
86395
|
+
prompt="Detailed prompt...",
|
|
86396
|
+
category="unspecified-low", // OR subagent_type="explore"
|
|
86397
86397
|
run_in_background=false,
|
|
86398
86398
|
load_skills=[]
|
|
86399
86399
|
)
|
|
@@ -86791,7 +86791,7 @@ function isPromptConfigRecovered(actualPromptConfig, expectedPromptConfig) {
|
|
|
86791
86791
|
}
|
|
86792
86792
|
|
|
86793
86793
|
// src/hooks/compaction-context-injector/constants.ts
|
|
86794
|
-
var AGENT_RECOVERY_PROMPT = "[
|
|
86794
|
+
var AGENT_RECOVERY_PROMPT = "[restore checkpointed session agent configuration after compaction]";
|
|
86795
86795
|
var NO_TEXT_TAIL_THRESHOLD = 5;
|
|
86796
86796
|
var RECOVERY_COOLDOWN_MS = 60000;
|
|
86797
86797
|
var RECENT_COMPACTION_WINDOW_MS = 10 * 60 * 1000;
|
|
@@ -87206,23 +87206,23 @@ function isUnstableTask(task) {
|
|
|
87206
87206
|
}
|
|
87207
87207
|
function buildReminder(task, summary, idleMs) {
|
|
87208
87208
|
const idleSeconds = Math.round(idleMs / 1000);
|
|
87209
|
-
const summaryText = summary ?? "
|
|
87210
|
-
return
|
|
87209
|
+
const summaryText = summary ?? "(No thinking trace available)";
|
|
87210
|
+
return `Unstable background agent appears idle for ${idleSeconds}s.
|
|
87211
87211
|
|
|
87212
|
-
Task ID
|
|
87213
|
-
Description
|
|
87214
|
-
Agent
|
|
87215
|
-
Status
|
|
87216
|
-
Session ID
|
|
87212
|
+
Task ID: ${task.id}
|
|
87213
|
+
Description: ${task.description}
|
|
87214
|
+
Agent: ${task.agent}
|
|
87215
|
+
Status: ${task.status}
|
|
87216
|
+
Session ID: ${task.sessionID ?? "N/A"}
|
|
87217
87217
|
|
|
87218
|
-
Thinking
|
|
87218
|
+
Thinking summary (first ${THINKING_SUMMARY_MAX_CHARS} chars):
|
|
87219
87219
|
${summaryText}
|
|
87220
87220
|
|
|
87221
|
-
|
|
87221
|
+
Suggested actions:
|
|
87222
87222
|
- background_output task_id="${task.id}" full_session=true include_thinking=true include_tool_results=true message_limit=50
|
|
87223
87223
|
- background_cancel taskId="${task.id}"
|
|
87224
87224
|
|
|
87225
|
-
|
|
87225
|
+
This is a reminder only. No automatic action was taken.`;
|
|
87226
87226
|
}
|
|
87227
87227
|
|
|
87228
87228
|
// src/hooks/unstable-agent-babysitter/unstable-agent-babysitter-hook.ts
|
|
@@ -87718,34 +87718,34 @@ function createPreemptiveCompactionHook(ctx, pluginConfig, modelCacheState) {
|
|
|
87718
87718
|
}
|
|
87719
87719
|
// src/hooks/tasks-todowrite-disabler/constants.ts
|
|
87720
87720
|
var BLOCKED_TOOLS2 = ["TodoWrite", "TodoRead"];
|
|
87721
|
-
var REPLACEMENT_MESSAGE = `TodoRead/TodoWrite
|
|
87721
|
+
var REPLACEMENT_MESSAGE = `TodoRead/TodoWrite are DISABLED because experimental.task_system is enabled.
|
|
87722
87722
|
|
|
87723
|
-
|
|
87723
|
+
**ACTION REQUIRED**: RE-REGISTER what you were about to write as Todo using Task tools NOW. Then ASSIGN yourself and START WORKING immediately.
|
|
87724
87724
|
|
|
87725
|
-
|
|
87726
|
-
- TaskCreate
|
|
87727
|
-
- TaskUpdate
|
|
87728
|
-
- TaskList
|
|
87729
|
-
- TaskGet
|
|
87725
|
+
**Use these tools instead:**
|
|
87726
|
+
- TaskCreate: Create new task with auto-generated ID
|
|
87727
|
+
- TaskUpdate: Update status, assign owner, add dependencies
|
|
87728
|
+
- TaskList: List active tasks with dependency info
|
|
87729
|
+
- TaskGet: Get full task details
|
|
87730
87730
|
|
|
87731
|
-
|
|
87732
|
-
1. TaskCreate({ subject: "
|
|
87733
|
-
2. TaskUpdate({ id: "T-xxx", status: "in_progress", owner: "
|
|
87734
|
-
3.
|
|
87731
|
+
**Workflow:**
|
|
87732
|
+
1. TaskCreate({ subject: "your task description" })
|
|
87733
|
+
2. TaskUpdate({ id: "T-xxx", status: "in_progress", owner: "your-thread-id" })
|
|
87734
|
+
3. DO THE WORK
|
|
87735
87735
|
4. TaskUpdate({ id: "T-xxx", status: "completed" })
|
|
87736
87736
|
|
|
87737
|
-
|
|
87737
|
+
CRITICAL: 1 task = 1 task. Fire independent tasks concurrently.
|
|
87738
87738
|
|
|
87739
|
-
|
|
87740
|
-
|
|
87741
|
-
1.
|
|
87742
|
-
2.
|
|
87743
|
-
3.
|
|
87744
|
-
4.
|
|
87739
|
+
**STOP! DO NOT START WORKING DIRECTLY - NO MATTER HOW SMALL THE TASK!**
|
|
87740
|
+
Even if the task seems trivial (1 line fix, simple edit, quick change), you MUST:
|
|
87741
|
+
1. FIRST register it with TaskCreate
|
|
87742
|
+
2. THEN mark it in_progress
|
|
87743
|
+
3. ONLY THEN do the actual work
|
|
87744
|
+
4. FINALLY mark it completed
|
|
87745
87745
|
|
|
87746
|
-
|
|
87746
|
+
**WHY?** Task tracking = visibility = accountability. Skipping registration = invisible work = chaos.
|
|
87747
87747
|
|
|
87748
|
-
|
|
87748
|
+
DO NOT retry TodoWrite. Convert to TaskCreate NOW.`;
|
|
87749
87749
|
|
|
87750
87750
|
// src/hooks/tasks-todowrite-disabler/hook.ts
|
|
87751
87751
|
function createTasksTodowriteDisablerHook(config) {
|
|
@@ -88617,8 +88617,8 @@ async function dispatchFallbackRetry(deps, helpers, options) {
|
|
|
88617
88617
|
if (result.success && deps.config.notify_on_fallback) {
|
|
88618
88618
|
await deps.ctx.client.tui.showToast({
|
|
88619
88619
|
body: {
|
|
88620
|
-
title: "
|
|
88621
|
-
message:
|
|
88620
|
+
title: "Model Fallback",
|
|
88621
|
+
message: `Switching to ${result.newModel?.split("/").pop() || result.newModel} for next request`,
|
|
88622
88622
|
variant: "warning",
|
|
88623
88623
|
duration: 5000
|
|
88624
88624
|
}
|
|
@@ -90506,34 +90506,34 @@ function createReadImageResizerHook(_ctx) {
|
|
|
90506
90506
|
};
|
|
90507
90507
|
}
|
|
90508
90508
|
// src/hooks/todo-description-override/description.ts
|
|
90509
|
-
var TODOWRITE_DESCRIPTION =
|
|
90509
|
+
var TODOWRITE_DESCRIPTION = `Use this tool to create and manage a structured task list for tracking progress on multi-step work.
|
|
90510
90510
|
|
|
90511
|
-
## Todo
|
|
90511
|
+
## Todo Format (MANDATORY)
|
|
90512
90512
|
|
|
90513
|
-
|
|
90513
|
+
Each todo title MUST encode four elements: WHERE, WHY, HOW, and EXPECTED RESULT.
|
|
90514
90514
|
|
|
90515
|
-
|
|
90515
|
+
Format: "[WHERE] [HOW] to [WHY] - expect [RESULT]"
|
|
90516
90516
|
|
|
90517
|
-
|
|
90518
|
-
- "src/utils/validation.ts:
|
|
90519
|
-
- "UserService.create():
|
|
90520
|
-
- "validation.test.ts:
|
|
90517
|
+
GOOD:
|
|
90518
|
+
- "src/utils/validation.ts: Add validateEmail() for input sanitization - returns boolean"
|
|
90519
|
+
- "UserService.create(): Call validateEmail() before DB insert - rejects invalid emails with 400"
|
|
90520
|
+
- "validation.test.ts: Add test for missing @ sign - expect validateEmail('foo') to return false"
|
|
90521
90521
|
|
|
90522
|
-
|
|
90523
|
-
- "
|
|
90524
|
-
- "
|
|
90525
|
-
- "
|
|
90522
|
+
BAD:
|
|
90523
|
+
- "Implement email validation" (where? how? what result?)
|
|
90524
|
+
- "Add dark mode" (feature, not a todo)
|
|
90525
|
+
- "Fix auth" (what file? what changes? what's expected?)
|
|
90526
90526
|
|
|
90527
|
-
##
|
|
90527
|
+
## Granularity Rules
|
|
90528
90528
|
|
|
90529
|
-
|
|
90529
|
+
Each todo MUST be a single atomic action completable in 1-3 tool calls. If it needs more, split it.
|
|
90530
90530
|
|
|
90531
|
-
|
|
90531
|
+
**Size test**: Can you complete this todo by editing one file or running one command? If not, it's too big.
|
|
90532
90532
|
|
|
90533
|
-
##
|
|
90534
|
-
-
|
|
90535
|
-
-
|
|
90536
|
-
-
|
|
90533
|
+
## Task Management
|
|
90534
|
+
- One in_progress at a time. Complete it before starting the next.
|
|
90535
|
+
- Mark completed immediately after finishing each item.
|
|
90536
|
+
- Skip this tool for single trivial tasks (one-step, obvious action).`;
|
|
90537
90537
|
|
|
90538
90538
|
// src/hooks/todo-description-override/hook.ts
|
|
90539
90539
|
function createTodoDescriptionOverrideHook() {
|
|
@@ -114089,28 +114089,28 @@ function buildSkillsSection(skills2) {
|
|
|
114089
114089
|
return `${skill2.name} (${source})`;
|
|
114090
114090
|
}).join(", ");
|
|
114091
114091
|
if (customSkills.length > 0 && builtinSkills.length > 0) {
|
|
114092
|
-
return `####
|
|
114092
|
+
return `#### \u53EF\u7528 Skills\uFF08\u901A\u8FC7 \`skill\` \u5DE5\u5177\uFF09
|
|
114093
114093
|
|
|
114094
114094
|
**Built-in**: ${builtinNames}
|
|
114095
|
-
**\u26A1
|
|
114095
|
+
**\u26A1 \u4F60\u7684 SKILLS\uFF08\u4F18\u5148\uFF09**: ${customNames}
|
|
114096
114096
|
|
|
114097
|
-
>
|
|
114098
|
-
>
|
|
114097
|
+
> \u7528\u6237\u5B89\u88C5\u7684 skills \u4F1A\u8986\u76D6\u5185\u7F6E\u9ED8\u8BA4\u503C\u3002\u5F53\u9886\u57DF\u5339\u914D\u65F6\uFF0C\u59CB\u7EC8\u4F18\u5148\u4F7F\u7528\u4F60\u7684 SKILLS\u3002
|
|
114098
|
+
> \u5B8C\u6574\u7684 skill \u63CF\u8FF0 \u2192 \u5728\u6BCF\u6B21 delegation \u4E4B\u524D\u4F7F\u7528 \`skill\` \u5DE5\u5177\u67E5\u770B\u3002`;
|
|
114099
114099
|
}
|
|
114100
114100
|
if (customSkills.length > 0) {
|
|
114101
|
-
return `####
|
|
114101
|
+
return `#### \u53EF\u7528 Skills\uFF08\u901A\u8FC7 \`skill\` \u5DE5\u5177\uFF09
|
|
114102
114102
|
|
|
114103
|
-
**\u26A1
|
|
114103
|
+
**\u26A1 \u4F60\u7684 SKILLS\uFF08\u4F18\u5148\uFF09**: ${customNames}
|
|
114104
114104
|
|
|
114105
|
-
>
|
|
114106
|
-
>
|
|
114105
|
+
> \u7528\u6237\u5B89\u88C5\u7684 skills \u4F1A\u8986\u76D6\u5185\u7F6E\u9ED8\u8BA4\u503C\u3002\u5F53\u9886\u57DF\u5339\u914D\u65F6\uFF0C\u59CB\u7EC8\u4F18\u5148\u4F7F\u7528\u4F60\u7684 SKILLS\u3002
|
|
114106
|
+
> \u5B8C\u6574\u7684 skill \u63CF\u8FF0 \u2192 \u5728\u6BCF\u6B21 delegation \u4E4B\u524D\u4F7F\u7528 \`skill\` \u5DE5\u5177\u67E5\u770B\u3002`;
|
|
114107
114107
|
}
|
|
114108
114108
|
if (builtinSkills.length > 0) {
|
|
114109
|
-
return `####
|
|
114109
|
+
return `#### \u53EF\u7528 Skills\uFF08\u901A\u8FC7 \`skill\` \u5DE5\u5177\uFF09
|
|
114110
114110
|
|
|
114111
114111
|
**Built-in**: ${builtinNames}
|
|
114112
114112
|
|
|
114113
|
-
>
|
|
114113
|
+
> \u5B8C\u6574\u7684 skill \u63CF\u8FF0 \u2192 \u5728\u6BCF\u6B21 delegation \u4E4B\u524D\u4F7F\u7528 \`skill\` \u5DE5\u5177\u67E5\u770B\u3002`;
|
|
114114
114114
|
}
|
|
114115
114115
|
return "";
|
|
114116
114116
|
}
|
|
@@ -114125,14 +114125,14 @@ function buildCategorySkillsDelegationGuide(categories2, skills2) {
|
|
|
114125
114125
|
const customSkills = skills2.filter((skill2) => skill2.location !== "plugin");
|
|
114126
114126
|
const skillsSection = buildSkillsSection(skills2);
|
|
114127
114127
|
const customPriorityNote = customSkills.length > 0 ? `
|
|
114128
|
-
>
|
|
114129
|
-
return `### Category + Skills
|
|
114128
|
+
> **\u7528\u6237\u5B89\u88C5\u7684 skills \u4EAB\u6709\u4F18\u5148\u6743\u3002** \u6709\u7591\u95EE\u65F6\uFF0CINCLUDE\uFF08\u5305\u542B\uFF09\u800C\u975E OMIT\uFF08\u7701\u7565\uFF09\u3002` : "";
|
|
114129
|
+
return `### Category + Skills \u59D4\u6258\u7CFB\u7EDF
|
|
114130
114130
|
|
|
114131
|
-
**task()
|
|
114131
|
+
**task() \u5C06 categories \u548C skills \u7EC4\u5408\u4F7F\u7528\uFF0C\u4EE5\u5B9E\u73B0\u6700\u4F73\u4EFB\u52A1\u6267\u884C\u3002**
|
|
114132
114132
|
|
|
114133
|
-
####
|
|
114133
|
+
#### \u53EF\u7528 Categories\uFF08\u9886\u57DF\u4F18\u5316\u6A21\u578B\uFF09
|
|
114134
114134
|
|
|
114135
|
-
|
|
114135
|
+
\u6BCF\u4E2A category \u90FD\u914D\u7F6E\u4E86\u9488\u5BF9\u8BE5\u9886\u57DF\u4F18\u5316\u7684\u6A21\u578B\u3002\u8BF7\u9605\u8BFB\u63CF\u8FF0\u4EE5\u4E86\u89E3\u4F55\u65F6\u4F7F\u7528\u3002
|
|
114136
114136
|
|
|
114137
114137
|
${categoryRows.join(`
|
|
114138
114138
|
`)}
|
|
@@ -114141,156 +114141,156 @@ ${skillsSection}
|
|
|
114141
114141
|
|
|
114142
114142
|
---
|
|
114143
114143
|
|
|
114144
|
-
###
|
|
114144
|
+
### \u5FC5\u987B\u9075\u5B88\uFF1ACategory + Skill \u9009\u62E9\u534F\u8BAE
|
|
114145
114145
|
|
|
114146
|
-
|
|
114147
|
-
-
|
|
114148
|
-
-
|
|
114149
|
-
-
|
|
114146
|
+
**\u7B2C\u4E00\u6B65\uFF1A\u9009\u62E9 Category**
|
|
114147
|
+
- \u9605\u8BFB\u6BCF\u4E2A category \u7684\u63CF\u8FF0
|
|
114148
|
+
- \u5C06\u4EFB\u52A1\u9700\u6C42\u4E0E category \u6240\u5728\u9886\u57DF\u5339\u914D
|
|
114149
|
+
- \u9009\u62E9\u9886\u57DF\u6700\u5951\u5408\u4EFB\u52A1\u7684 category
|
|
114150
114150
|
|
|
114151
|
-
|
|
114152
|
-
|
|
114153
|
-
> "
|
|
114151
|
+
**\u7B2C\u4E8C\u6B65\uFF1A\u8BC4\u4F30\u6240\u6709 Skills**
|
|
114152
|
+
\u4F7F\u7528 \`skill\` \u5DE5\u5177\u67E5\u770B\u53EF\u7528 skills \u53CA\u5176\u63CF\u8FF0\u3002\u5BF9\u4E8E\u6BCF\u4E2A skill\uFF0C\u601D\u8003\uFF1A
|
|
114153
|
+
> "\u6B64 skill \u7684\u4E13\u4E1A\u9886\u57DF\u4E0E\u6211\u7684\u4EFB\u52A1\u662F\u5426\u6709\u91CD\u53E0\uFF1F"
|
|
114154
114154
|
|
|
114155
|
-
-
|
|
114156
|
-
-
|
|
114155
|
+
- \u5982\u679C\u662F \u2192 \u5728 \`load_skills=[...]\` \u4E2D INCLUDE\uFF08\u5305\u542B\uFF09
|
|
114156
|
+
- \u5982\u679C\u5426 \u2192 OMIT\uFF08\u7701\u7565\uFF0C\u65E0\u9700\u8BF4\u660E\uFF09${customPriorityNote}
|
|
114157
114157
|
|
|
114158
114158
|
---
|
|
114159
114159
|
|
|
114160
|
-
###
|
|
114160
|
+
### \u59D4\u6258\u6A21\u5F0F
|
|
114161
114161
|
|
|
114162
114162
|
\`\`\`typescript
|
|
114163
114163
|
task(
|
|
114164
114164
|
category="[selected-category]",
|
|
114165
|
-
load_skills=["skill-1", "skill-2"], //
|
|
114165
|
+
load_skills=["skill-1", "skill-2"], // \u5305\u542B\u6240\u6709\u76F8\u5173 skills \u2014 \u5C24\u5176\u662F\u7528\u6237\u5B89\u88C5\u7684
|
|
114166
114166
|
prompt="..."
|
|
114167
114167
|
)
|
|
114168
114168
|
\`\`\`
|
|
114169
114169
|
|
|
114170
|
-
**
|
|
114170
|
+
**\u53CD\u6A21\u5F0F\uFF08\u6548\u679C\u4F1A\u5F88\u5DEE\uFF09\uFF1A**
|
|
114171
114171
|
\`\`\`typescript
|
|
114172
|
-
task(category="...", load_skills=[], run_in_background=false, prompt="...") //
|
|
114172
|
+
task(category="...", load_skills=[], run_in_background=false, prompt="...") // load_skills \u4E3A\u7A7A\u4E14\u65E0\u5408\u7406\u89E3\u91CA
|
|
114173
114173
|
\`\`\`
|
|
114174
114174
|
|
|
114175
114175
|
---
|
|
114176
114176
|
|
|
114177
|
-
### Category
|
|
114177
|
+
### Category \u9886\u57DF\u5339\u914D\uFF08\u96F6\u5BB9\u5FCD\uFF09
|
|
114178
114178
|
|
|
114179
|
-
|
|
114179
|
+
\u6BCF\u6B21 delegation \u5FC5\u987B\u4F7F\u7528\u4E0E\u4EFB\u52A1\u9886\u57DF\u76F8\u5339\u914D\u7684 category\u3002\u4E0D\u5339\u914D\u7684 category \u4F1A\u4EA7\u751F\u660E\u663E\u66F4\u5DEE\u7684\u7ED3\u679C\uFF0C\u56E0\u4E3A\u6BCF\u4E2A category \u90FD\u8FD0\u884C\u5728\u9488\u5BF9\u5176\u7279\u5B9A\u9886\u57DF\u4F18\u5316\u7684\u6A21\u578B\u4E0A\u3002
|
|
114180
114180
|
|
|
114181
|
-
|
|
114181
|
+
**\u89C6\u89C9\u5DE5\u4F5C = \u5FC5\u987B\u4F7F\u7528 \`visual-engineering\`\u3002\u6CA1\u6709\u4EFB\u4F55\u4F8B\u5916\u3002**
|
|
114182
114182
|
|
|
114183
|
-
|
|
114183
|
+
\u4EFB\u4F55\u6D89\u53CA UI\u3001UX\u3001CSS\u3001\u6837\u5F0F\u3001\u5E03\u5C40\u3001\u52A8\u753B\u3001\u8BBE\u8BA1\u6216\u524D\u7AEF\u7EC4\u4EF6\u7684\u4EFB\u52A1\u90FD\u5FC5\u987B\u4F7F\u7528 \`visual-engineering\`\u3002\u4E25\u7981\u5C06\u89C6\u89C9\u5DE5\u4F5C\u59D4\u6258\u7ED9 \`quick\`\u3001\`unspecified-*\` \u6216\u5176\u4ED6\u4EFB\u4F55 category\u3002
|
|
114184
114184
|
|
|
114185
114185
|
\`\`\`typescript
|
|
114186
|
-
//
|
|
114186
|
+
// \u6B63\u786E\uFF1A\u89C6\u89C9\u5DE5\u4F5C \u2192 visual-engineering category
|
|
114187
114187
|
task(category="visual-engineering", load_skills=["frontend-ui-ux"], prompt="Redesign the sidebar layout with new spacing...")
|
|
114188
114188
|
|
|
114189
|
-
//
|
|
114189
|
+
// \u9519\u8BEF\uFF1A\u5728\u9519\u8BEF\u7684 category \u4E2D\u5904\u7406\u89C6\u89C9\u5DE5\u4F5C \u2014 \u4F1A\u4EA7\u751F\u66F4\u5DEE\u7684\u7ED3\u679C
|
|
114190
114190
|
task(category="quick", load_skills=[], prompt="Redesign the sidebar layout with new spacing...")
|
|
114191
114191
|
\`\`\`
|
|
114192
114192
|
|
|
114193
|
-
|
|
|
114193
|
+
| \u4EFB\u52A1\u9886\u57DF | \u5FC5\u987B\u4F7F\u7528\u7684 Category |
|
|
114194
114194
|
|---|---|
|
|
114195
114195
|
| UI, styling, animations, layout, design | \`visual-engineering\` |
|
|
114196
114196
|
| Hard logic, architecture decisions, algorithms | \`ultrabrain\` |
|
|
114197
114197
|
| Autonomous research + end-to-end implementation | \`deep\` |
|
|
114198
114198
|
| Single-file typo, trivial config change | \`quick\` |
|
|
114199
114199
|
|
|
114200
|
-
|
|
114200
|
+
**\u5F53\u5BF9 category \u6709\u7591\u95EE\u65F6\uFF0C\u51E0\u4E4E\u6C38\u8FDC\u4E0D\u4F1A\u9009 \`quick\` \u6216 \`unspecified-*\`\u3002\u8BF7\u5339\u914D\u9886\u57DF\u3002**`;
|
|
114201
114201
|
}
|
|
114202
114202
|
// src/agents/dynamic-agent-policy-sections.ts
|
|
114203
114203
|
function buildHardBlocksSection() {
|
|
114204
114204
|
const blocks = [
|
|
114205
|
-
"- Type error suppression (`as any`, `@ts-ignore`) - **Never
|
|
114206
|
-
"- Commit without explicit request - **Never
|
|
114207
|
-
"- Speculate about unread code - **Never
|
|
114208
|
-
"- Leave code in broken state after failures - **Never
|
|
114209
|
-
"- `background_cancel(all=true)` - **Never
|
|
114210
|
-
"- Delivering final answer before collecting Oracle result - **Never
|
|
114205
|
+
"- Type error suppression (`as any`, `@ts-ignore`) - **Never**\uFF08\u7EDD\u4E0D\u53EF\uFF09",
|
|
114206
|
+
"- Commit without explicit request - **Never**\uFF08\u7EDD\u4E0D\u53EF\uFF09",
|
|
114207
|
+
"- Speculate about unread code - **Never**\uFF08\u7EDD\u4E0D\u53EF\uFF09",
|
|
114208
|
+
"- Leave code in broken state after failures - **Never**\uFF08\u7EDD\u4E0D\u53EF\uFF09",
|
|
114209
|
+
"- `background_cancel(all=true)` - **Never**\uFF08\u7EDD\u4E0D\u53EF\uFF09\u3002\u52A1\u5FC5\u6309 taskId \u9010\u4E00\u53D6\u6D88\u3002",
|
|
114210
|
+
"- Delivering final answer before collecting Oracle result - **Never**\uFF08\u7EDD\u4E0D\u53EF\uFF09\u3002"
|
|
114211
114211
|
];
|
|
114212
|
-
return `##
|
|
114212
|
+
return `## \u786C\u6027\u7981\u6B62\uFF08Hard Blocks\uFF09\u2014 \u7EDD\u4E0D\u53EF\u8FDD\u53CD
|
|
114213
114213
|
|
|
114214
114214
|
${blocks.join(`
|
|
114215
114215
|
`)}`;
|
|
114216
114216
|
}
|
|
114217
114217
|
function buildAntiPatternsSection() {
|
|
114218
114218
|
const patterns = [
|
|
114219
|
-
"- **Type Safety**: `as any`, `@ts-ignore`, `@ts-expect-error`",
|
|
114220
|
-
"- **Error Handling**: Empty catch blocks `catch(e) {}`",
|
|
114221
|
-
'- **Testing**: Deleting failing tests to "pass"',
|
|
114222
|
-
"- **Search**: Firing agents for single-line typos or obvious syntax errors",
|
|
114223
|
-
"- **Debugging**: Shotgun debugging, random changes",
|
|
114224
|
-
"- **Background Tasks**: Polling `background_output` on running tasks - end response and wait for notification",
|
|
114225
|
-
"- **Delegation Duplication**: Delegating exploration to explore/librarian and then manually doing the same search yourself",
|
|
114219
|
+
"- **Type Safety\uFF08\u7C7B\u578B\u5B89\u5168\uFF09**: `as any`, `@ts-ignore`, `@ts-expect-error`",
|
|
114220
|
+
"- **Error Handling\uFF08\u9519\u8BEF\u5904\u7406\uFF09**: Empty catch blocks `catch(e) {}`",
|
|
114221
|
+
'- **Testing\uFF08\u6D4B\u8BD5\uFF09**: Deleting failing tests to "pass"',
|
|
114222
|
+
"- **Search\uFF08\u641C\u7D22\uFF09**: Firing agents for single-line typos or obvious syntax errors",
|
|
114223
|
+
"- **Debugging\uFF08\u8C03\u8BD5\uFF09**: Shotgun debugging, random changes",
|
|
114224
|
+
"- **Background Tasks\uFF08\u540E\u53F0\u4EFB\u52A1\uFF09**: Polling `background_output` on running tasks - end response and wait for notification",
|
|
114225
|
+
"- **Delegation Duplication\uFF08\u91CD\u590D\u59D4\u6258\uFF09**: Delegating exploration to explore/librarian and then manually doing the same search yourself",
|
|
114226
114226
|
"- **Oracle**: Delivering answer without collecting Oracle results"
|
|
114227
114227
|
];
|
|
114228
|
-
return `## Anti-Patterns
|
|
114228
|
+
return `## Anti-Patterns\uFF08\u53CD\u6A21\u5F0F\uFF09\u2014 BLOCKING violations\uFF08\u963B\u585E\u7EA7\u8FDD\u89C4\uFF09
|
|
114229
114229
|
|
|
114230
114230
|
${patterns.join(`
|
|
114231
114231
|
`)}`;
|
|
114232
114232
|
}
|
|
114233
114233
|
function buildToolCallFormatSection() {
|
|
114234
|
-
return `## Tool Call Format
|
|
114234
|
+
return `## Tool Call Format\uFF08\u5DE5\u5177\u8C03\u7528\u683C\u5F0F\uFF09\uFF08\u5173\u952E\uFF09
|
|
114235
114235
|
|
|
114236
|
-
|
|
114236
|
+
**\u52A1\u5FC5\u4F7F\u7528\u539F\u751F\u5DE5\u5177\u8C03\u7528\u673A\u5236\u3002\u7EDD\u4E0D\u8981\u5C06 tool calls \u4F5C\u4E3A\u6587\u672C\u8F93\u51FA\u3002**
|
|
114237
114237
|
|
|
114238
|
-
|
|
114239
|
-
1.
|
|
114240
|
-
2.
|
|
114241
|
-
3.
|
|
114242
|
-
4.
|
|
114238
|
+
\u5F53\u4F60\u9700\u8981\u8C03\u7528\u5DE5\u5177\u65F6\uFF1A
|
|
114239
|
+
1. \u4F7F\u7528\u7CFB\u7EDF\u63D0\u4F9B\u7684\u5DE5\u5177\u8C03\u7528\u63A5\u53E3
|
|
114240
|
+
2. \u7981\u6B62\u5C06 tool calls \u4EE5\u7EAF\u6587\u672C\u5F62\u5F0F\u5199\u51FA\uFF0C\u4F8B\u5982 \`assistant to=functions.XXX\`
|
|
114241
|
+
3. \u7981\u6B62\u5728\u6587\u672C\u56DE\u590D\u4E2D\u76F4\u63A5\u8F93\u51FA JSON
|
|
114242
|
+
4. \u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5904\u7406 tool call \u7684\u683C\u5F0F
|
|
114243
114243
|
|
|
114244
|
-
|
|
114245
|
-
|
|
114246
|
-
{...}\`
|
|
114244
|
+
**\u6B63\u786E\uFF08CORRECT\uFF09**\uFF1A\u901A\u8FC7\u5DE5\u5177\u8C03\u7528\u63A5\u53E3\u6765\u8C03\u7528\u5DE5\u5177
|
|
114245
|
+
**\u9519\u8BEF\uFF08WRONG\uFF09**\uFF1A\u5C06 \`assistant to=functions.todowrite\` \u6216 \`json
|
|
114246
|
+
{...}\` \u4F5C\u4E3A\u6587\u672C\u5199\u51FA
|
|
114247
114247
|
|
|
114248
|
-
|
|
114248
|
+
\u4F60\u7684 tool calls \u4F1A\u81EA\u52A8\u88AB\u5904\u7406\u3002\u76F4\u63A5\u8C03\u7528\u5DE5\u5177\u5373\u53EF\uFF0C\u65E0\u9700\u81EA\u5DF1\u683C\u5F0F\u5316\u3002`;
|
|
114249
114249
|
}
|
|
114250
114250
|
function buildAntiDuplicationSection() {
|
|
114251
114251
|
return `<Anti_Duplication>
|
|
114252
|
-
## Anti-Duplication Rule
|
|
114252
|
+
## Anti-Duplication Rule\uFF08\u53CD\u91CD\u590D\u89C4\u5219\uFF09\uFF08\u5173\u952E\uFF09
|
|
114253
114253
|
|
|
114254
|
-
|
|
114254
|
+
\u4E00\u65E6\u4F60\u5C06\u63A2\u7D22\u4EFB\u52A1\u59D4\u6258\u7ED9 explore/librarian agents\uFF0C**\u4E0D\u8981\u81EA\u5DF1\u53BB\u6267\u884C\u76F8\u540C\u7684\u641C\u7D22**\u3002
|
|
114255
114255
|
|
|
114256
|
-
###
|
|
114256
|
+
### \u5177\u4F53\u542B\u4E49\uFF1A
|
|
114257
114257
|
|
|
114258
|
-
**
|
|
114259
|
-
-
|
|
114260
|
-
-
|
|
114261
|
-
- "
|
|
114258
|
+
**\u7981\u6B62\uFF08FORBIDDEN\uFF09\uFF1A**
|
|
114259
|
+
- \u5728\u542F\u52A8 explore/librarian \u4E4B\u540E\uFF0C\u624B\u52A8 grep/\u641C\u7D22\u76F8\u540C\u7684\u4FE1\u606F
|
|
114260
|
+
- \u91CD\u590D\u6267\u884C\u521A\u521A\u59D4\u6258\u7ED9 agents \u7684\u7814\u7A76\u5DE5\u4F5C
|
|
114261
|
+
- "\u5C31\u5FEB\u901F\u68C0\u67E5\u4E00\u4E0B" \u540E\u53F0 agents \u6B63\u5728\u67E5\u770B\u7684\u76F8\u540C\u6587\u4EF6
|
|
114262
114262
|
|
|
114263
|
-
**
|
|
114264
|
-
-
|
|
114265
|
-
-
|
|
114266
|
-
-
|
|
114263
|
+
**\u5141\u8BB8\uFF08ALLOWED\uFF09\uFF1A**
|
|
114264
|
+
- \u7EE7\u7EED\u8FDB\u884C**\u4E0D\u91CD\u53E0\u7684\u5DE5\u4F5C** \u2014 \u4E0D\u4F9D\u8D56\u4E8E\u88AB\u59D4\u6258\u7814\u7A76\u7ED3\u679C\u7684\u5DE5\u4F5C
|
|
114265
|
+
- \u5904\u7406\u4EE3\u7801\u5E93\u4E2D\u4E0D\u76F8\u5173\u7684\u90E8\u5206
|
|
114266
|
+
- \u51C6\u5907\u5DE5\u4F5C\uFF08\u4F8B\u5982\u8BBE\u7F6E\u6587\u4EF6\u3001\u914D\u7F6E\uFF09\uFF0C\u53EF\u4EE5\u72EC\u7ACB\u8FDB\u884C\u7684\u5DE5\u4F5C
|
|
114267
114267
|
|
|
114268
|
-
###
|
|
114268
|
+
### \u6B63\u786E\u7B49\u5F85\u7ED3\u679C\uFF1A
|
|
114269
114269
|
|
|
114270
|
-
|
|
114270
|
+
\u5F53\u4F60\u9700\u8981\u59D4\u6258\u7ED3\u679C\u4F46\u5B83\u4EEC\u5C1A\u672A\u5C31\u7EEA\u65F6\uFF1A
|
|
114271
114271
|
|
|
114272
|
-
1. **
|
|
114273
|
-
2. **
|
|
114274
|
-
3. **
|
|
114275
|
-
4. **
|
|
114272
|
+
1. **\u7ED3\u675F\u4F60\u7684\u56DE\u590D** \u2014 \u4E0D\u8981\u7EE7\u7EED\u4F9D\u8D56\u90A3\u4E9B\u7ED3\u679C\u7684\u5DE5\u4F5C
|
|
114273
|
+
2. **\u7B49\u5F85\u5B8C\u6210\u901A\u77E5** \u2014 \u7CFB\u7EDF\u4F1A\u89E6\u53D1\u4F60\u7684\u4E0B\u4E00\u8F6E
|
|
114274
|
+
3. **\u7136\u540E** \u901A\u8FC7 \`background_output(task_id="...")\` \u6536\u96C6\u7ED3\u679C
|
|
114275
|
+
4. **\u4E0D\u8981** \u5728\u7B49\u5F85\u671F\u95F4\u6025\u8E81\u5730\u91CD\u65B0\u641C\u7D22\u76F8\u540C\u7684\u4E3B\u9898
|
|
114276
114276
|
|
|
114277
|
-
###
|
|
114277
|
+
### \u91CD\u8981\u6027\uFF1A
|
|
114278
114278
|
|
|
114279
|
-
-
|
|
114280
|
-
-
|
|
114281
|
-
-
|
|
114279
|
+
- **\u6D6A\u8D39 tokens**\uFF1A\u91CD\u590D\u63A2\u7D22\u4F1A\u6D88\u8017\u4F60\u7684 context \u9884\u7B97
|
|
114280
|
+
- **\u4EA7\u751F\u6DF7\u4E71**\uFF1A\u4F60\u53EF\u80FD\u4F1A\u4E0E agent \u7684\u53D1\u73B0\u4EA7\u751F\u77DB\u76FE
|
|
114281
|
+
- **\u6548\u7387**\uFF1A\u59D4\u6258\u7684\u6838\u5FC3\u4EF7\u503C\u5728\u4E8E\u5E76\u884C\u541E\u5410\u91CF
|
|
114282
114282
|
|
|
114283
|
-
###
|
|
114283
|
+
### \u793A\u4F8B\uFF1A
|
|
114284
114284
|
|
|
114285
114285
|
\`\`\`typescript
|
|
114286
|
-
//
|
|
114286
|
+
// \u9519\u8BEF\uFF08WRONG\uFF09\uFF1A\u59D4\u6258\u4E4B\u540E\uFF0C\u91CD\u65B0\u6267\u884C\u641C\u7D22
|
|
114287
114287
|
task(subagent_type="explore", run_in_background=true, ...)
|
|
114288
|
-
//
|
|
114288
|
+
// \u7136\u540E\u7ACB\u5373\u81EA\u5DF1 grep \u76F8\u540C\u5185\u5BB9 \u2014 \u7981\u6B62
|
|
114289
114289
|
|
|
114290
|
-
//
|
|
114290
|
+
// \u6B63\u786E\uFF08CORRECT\uFF09\uFF1A\u7EE7\u7EED\u8FDB\u884C\u4E0D\u91CD\u53E0\u7684\u5DE5\u4F5C
|
|
114291
114291
|
task(subagent_type="explore", run_in_background=true, ...)
|
|
114292
|
-
//
|
|
114293
|
-
//
|
|
114292
|
+
// \u5F53 agents \u5728\u641C\u7D22\u65F6\uFF0C\u5904\u7406\u4E00\u4E2A\u4E0D\u540C\u7684\u3001\u4E0D\u76F8\u5173\u7684\u6587\u4EF6
|
|
114293
|
+
// \u7ED3\u675F\u4F60\u7684\u56DE\u590D\u5E76\u7B49\u5F85\u901A\u77E5
|
|
114294
114294
|
\`\`\`
|
|
114295
114295
|
</Anti_Duplication>`;
|
|
114296
114296
|
}
|
|
@@ -129845,7 +129845,7 @@ class PostHog extends PostHogBackendClient {
|
|
|
129845
129845
|
// package.json
|
|
129846
129846
|
var package_default = {
|
|
129847
129847
|
name: "@skj1724/oh-my-opencode",
|
|
129848
|
-
version: "3.17.
|
|
129848
|
+
version: "3.17.13",
|
|
129849
129849
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
129850
129850
|
main: "./dist/index.js",
|
|
129851
129851
|
types: "dist/index.d.ts",
|
|
@@ -129934,8 +129934,8 @@ var package_default = {
|
|
|
129934
129934
|
"oh-my-opencode-linux-x64-baseline": "3.17.4",
|
|
129935
129935
|
"oh-my-opencode-linux-x64-musl": "3.17.4",
|
|
129936
129936
|
"oh-my-opencode-linux-x64-musl-baseline": "3.17.4",
|
|
129937
|
-
"oh-my-opencode-windows-x64": "3.17.
|
|
129938
|
-
"oh-my-opencode-windows-x64-baseline": "3.17.
|
|
129937
|
+
"oh-my-opencode-windows-x64": "3.17.4",
|
|
129938
|
+
"oh-my-opencode-windows-x64-baseline": "3.17.4"
|
|
129939
129939
|
},
|
|
129940
129940
|
overrides: {},
|
|
129941
129941
|
trustedDependencies: [
|