oh-my-opencode-serverlocal 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +0 -6
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/{deepwork → tier-commands}/index.d.ts +1 -1
- package/dist/index.js +119 -92
- package/dist/tui.js +0 -6
- package/package.json +1 -1
- package/src/skills/deepwork/SKILL.md +0 -122
package/dist/cli/index.js
CHANGED
|
@@ -529,12 +529,6 @@ var CUSTOM_SKILLS = [
|
|
|
529
529
|
allowedAgents: ["orchestrator"],
|
|
530
530
|
sourcePath: "src/skills/clonedeps"
|
|
531
531
|
},
|
|
532
|
-
{
|
|
533
|
-
name: "deepwork",
|
|
534
|
-
description: "Heavy/complex coding sessions and large modifications workflow",
|
|
535
|
-
allowedAgents: ["orchestrator"],
|
|
536
|
-
sourcePath: "src/skills/deepwork"
|
|
537
|
-
},
|
|
538
532
|
{
|
|
539
533
|
name: "verification-planning",
|
|
540
534
|
description: "Plan credible, proportionate evidence before non-trivial implementation",
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ export { createApplyPatchHook } from './apply-patch';
|
|
|
2
2
|
export type { AutoUpdateCheckerOptions } from './auto-update-checker';
|
|
3
3
|
export { createAutoUpdateCheckerHook } from './auto-update-checker';
|
|
4
4
|
export { createChatHeadersHook } from './chat-headers';
|
|
5
|
-
export { createDeepworkCommandHook } from './deepwork';
|
|
6
5
|
export { createDelegateTaskRetryHook } from './delegate-task-retry/hook';
|
|
7
6
|
export { createFilterAvailableSkillsHook } from './filter-available-skills';
|
|
8
7
|
export { ForegroundFallbackManager, isFailoverError, isRetryableError, } from './foreground-fallback';
|
|
@@ -14,3 +13,4 @@ export { createPostFileToolNudgeHook } from './post-file-tool-nudge';
|
|
|
14
13
|
export { createReflectCommandHook } from './reflect';
|
|
15
14
|
export { SessionLifecycle } from './session-lifecycle';
|
|
16
15
|
export { createTaskSessionManagerHook } from './task-session-manager';
|
|
16
|
+
export { createTierCommandsHook } from './tier-commands';
|
package/dist/index.js
CHANGED
|
@@ -18357,12 +18357,6 @@ var CUSTOM_SKILLS = [
|
|
|
18357
18357
|
allowedAgents: ["orchestrator"],
|
|
18358
18358
|
sourcePath: "src/skills/clonedeps"
|
|
18359
18359
|
},
|
|
18360
|
-
{
|
|
18361
|
-
name: "deepwork",
|
|
18362
|
-
description: "Heavy/complex coding sessions and large modifications workflow",
|
|
18363
|
-
allowedAgents: ["orchestrator"],
|
|
18364
|
-
sourcePath: "src/skills/deepwork"
|
|
18365
|
-
},
|
|
18366
18360
|
{
|
|
18367
18361
|
name: "verification-planning",
|
|
18368
18362
|
description: "Plan credible, proportionate evidence before non-trivial implementation",
|
|
@@ -24458,70 +24452,6 @@ function createChatHeadersHook(ctx) {
|
|
|
24458
24452
|
}
|
|
24459
24453
|
};
|
|
24460
24454
|
}
|
|
24461
|
-
// src/hooks/command-hook-utils.ts
|
|
24462
|
-
function registerCommandHook(opencodeConfig, commandName, template, description) {
|
|
24463
|
-
const cmdConfig = opencodeConfig.command;
|
|
24464
|
-
if (cmdConfig?.[commandName])
|
|
24465
|
-
return false;
|
|
24466
|
-
if (!opencodeConfig.command)
|
|
24467
|
-
opencodeConfig.command = {};
|
|
24468
|
-
opencodeConfig.command[commandName] = { template, description };
|
|
24469
|
-
return true;
|
|
24470
|
-
}
|
|
24471
|
-
|
|
24472
|
-
// src/hooks/deepwork/index.ts
|
|
24473
|
-
var COMMAND_NAME = "deepwork";
|
|
24474
|
-
function activationPrompt(tier, task2) {
|
|
24475
|
-
return [
|
|
24476
|
-
`Use the deepwork skill for this task. Treat it as a heavy coding session operating in **${tier}**.`,
|
|
24477
|
-
"",
|
|
24478
|
-
"Deepwork requirements:",
|
|
24479
|
-
"- before planning, delegation, or creating state, inspect existing `.gitignore` and `.ignore`; add only missing entries without duplicates: `.gitignore` must contain `.slim/deepwork/`, and `.ignore` must contain `!.slim/deepwork/` and `!.slim/deepwork/**`; this keeps state git-local yet OpenCode-readable;",
|
|
24480
|
-
"- create/update a `.slim/deepwork/` progress file;",
|
|
24481
|
-
"- keep OpenCode todos synced with the current phase;",
|
|
24482
|
-
"- **Follow the strict rules of your assigned Tier** (e.g., calling @oracle or the roundtable tool as mandated).",
|
|
24483
|
-
"- execute phase by phase with background specialists where useful;",
|
|
24484
|
-
"- wait for hook-driven background completion, reconcile results, validate, and adhere to your tier's review requirements;",
|
|
24485
|
-
"- fix actionable review issues before continuing.",
|
|
24486
|
-
"",
|
|
24487
|
-
"Task:",
|
|
24488
|
-
task2
|
|
24489
|
-
].join(`
|
|
24490
|
-
`);
|
|
24491
|
-
}
|
|
24492
|
-
function createDeepworkCommandHook() {
|
|
24493
|
-
return {
|
|
24494
|
-
registerCommand: (opencodeConfig) => {
|
|
24495
|
-
registerCommandHook(opencodeConfig, COMMAND_NAME, "Start a deepwork session with a specific Tier (e.g., /deepwork tier 2 <task>)", "Use the deepwork workflow with Tier 0, 1, 2, or 3");
|
|
24496
|
-
},
|
|
24497
|
-
handleCommandExecuteBefore: async (input, output) => {
|
|
24498
|
-
if (input.command !== COMMAND_NAME)
|
|
24499
|
-
return;
|
|
24500
|
-
output.parts.length = 0;
|
|
24501
|
-
const rawArgs = input.arguments.trim();
|
|
24502
|
-
if (!rawArgs) {
|
|
24503
|
-
output.parts.push(createInternalAgentTextPart("What task should deepwork manage? Run `/deepwork tier 1 <task>`. Defaults to Tier 1 if omitted."));
|
|
24504
|
-
return;
|
|
24505
|
-
}
|
|
24506
|
-
let tier = "Tier 1: Guided / Supervised Mode";
|
|
24507
|
-
let task2 = rawArgs;
|
|
24508
|
-
const tierMatch = rawArgs.match(/^tier\s*([0-3])\s+(.*)/i);
|
|
24509
|
-
if (tierMatch) {
|
|
24510
|
-
const tierNum = tierMatch[1];
|
|
24511
|
-
task2 = tierMatch[2];
|
|
24512
|
-
if (tierNum === "0")
|
|
24513
|
-
tier = "Tier 0: Basic Mode";
|
|
24514
|
-
else if (tierNum === "1")
|
|
24515
|
-
tier = "Tier 1: Guided / Supervised Mode";
|
|
24516
|
-
else if (tierNum === "2")
|
|
24517
|
-
tier = "Tier 2: Sophisticated Ideation & Planning";
|
|
24518
|
-
else if (tierNum === "3")
|
|
24519
|
-
tier = "Tier 3: Sophisticated Implementation";
|
|
24520
|
-
}
|
|
24521
|
-
output.parts.push({ type: "text", text: activationPrompt(tier, task2) });
|
|
24522
|
-
}
|
|
24523
|
-
};
|
|
24524
|
-
}
|
|
24525
24455
|
// src/hooks/delegate-task-retry/patterns.ts
|
|
24526
24456
|
var DELEGATE_TASK_ERROR_PATTERNS = [
|
|
24527
24457
|
{
|
|
@@ -25402,14 +25332,25 @@ ${JSON_ERROR_REMINDER}`;
|
|
|
25402
25332
|
}
|
|
25403
25333
|
};
|
|
25404
25334
|
}
|
|
25335
|
+
// src/hooks/command-hook-utils.ts
|
|
25336
|
+
function registerCommandHook(opencodeConfig, commandName, template, description) {
|
|
25337
|
+
const cmdConfig = opencodeConfig.command;
|
|
25338
|
+
if (cmdConfig?.[commandName])
|
|
25339
|
+
return false;
|
|
25340
|
+
if (!opencodeConfig.command)
|
|
25341
|
+
opencodeConfig.command = {};
|
|
25342
|
+
opencodeConfig.command[commandName] = { template, description };
|
|
25343
|
+
return true;
|
|
25344
|
+
}
|
|
25345
|
+
|
|
25405
25346
|
// src/hooks/loop-command/index.ts
|
|
25406
|
-
var
|
|
25347
|
+
var COMMAND_NAME = "loop";
|
|
25407
25348
|
function historyDir() {
|
|
25408
25349
|
const shortID = Math.random().toString(36).slice(2, 8);
|
|
25409
25350
|
const timestamp = Date.now().toString(36);
|
|
25410
25351
|
return `.opencode/loop-history/loop-${timestamp}-${shortID}`;
|
|
25411
25352
|
}
|
|
25412
|
-
function
|
|
25353
|
+
function activationPrompt(text) {
|
|
25413
25354
|
const dir = historyDir();
|
|
25414
25355
|
return [
|
|
25415
25356
|
"The user ran `/loop`. From the text below, extract: goal, successCriteria, maxAttempts.",
|
|
@@ -25446,10 +25387,10 @@ function helpPrompt() {
|
|
|
25446
25387
|
function createLoopCommandHook() {
|
|
25447
25388
|
return {
|
|
25448
25389
|
registerCommand: (opencodeConfig) => {
|
|
25449
|
-
registerCommandHook(opencodeConfig,
|
|
25390
|
+
registerCommandHook(opencodeConfig, COMMAND_NAME, "Run an automated execute-verify loop", "Dispatch fixer, verify, iterate with file-based history on disk.");
|
|
25450
25391
|
},
|
|
25451
25392
|
handleCommandExecuteBefore: async (input, output) => {
|
|
25452
|
-
if (input.command !==
|
|
25393
|
+
if (input.command !== COMMAND_NAME)
|
|
25453
25394
|
return;
|
|
25454
25395
|
output.parts.length = 0;
|
|
25455
25396
|
const args = input.arguments.trim();
|
|
@@ -25457,7 +25398,7 @@ function createLoopCommandHook() {
|
|
|
25457
25398
|
output.parts.push(createInternalAgentTextPart(helpPrompt()));
|
|
25458
25399
|
return;
|
|
25459
25400
|
}
|
|
25460
|
-
output.parts.push({ type: "text", text:
|
|
25401
|
+
output.parts.push({ type: "text", text: activationPrompt(args) });
|
|
25461
25402
|
}
|
|
25462
25403
|
};
|
|
25463
25404
|
}
|
|
@@ -25549,8 +25490,8 @@ function getEligibleMessage(message) {
|
|
|
25549
25490
|
return { message, sessionID: message.info.sessionID };
|
|
25550
25491
|
}
|
|
25551
25492
|
// src/hooks/reflect/index.ts
|
|
25552
|
-
var
|
|
25553
|
-
function
|
|
25493
|
+
var COMMAND_NAME2 = "reflect";
|
|
25494
|
+
function activationPrompt2(focus, isSessionMode = false, lastN = 50) {
|
|
25554
25495
|
const focusBlock = focus ? ["Focus:", focus] : [
|
|
25555
25496
|
"Focus:",
|
|
25556
25497
|
isSessionMode ? "Analyze recent sessions to find repeated patterns, friction, and improvement opportunities." : "Review recent work broadly and identify repeated workflow friction worth improving."
|
|
@@ -25586,10 +25527,10 @@ function createReflectCommandHook() {
|
|
|
25586
25527
|
let shouldHandleCommand = false;
|
|
25587
25528
|
return {
|
|
25588
25529
|
registerCommand: (opencodeConfig) => {
|
|
25589
|
-
shouldHandleCommand ||= registerCommandHook(opencodeConfig,
|
|
25530
|
+
shouldHandleCommand ||= registerCommandHook(opencodeConfig, COMMAND_NAME2, "Review repeated work and suggest workflow improvements", "Use reflect to learn from repeated workflows and suggest reusable improvements");
|
|
25590
25531
|
},
|
|
25591
25532
|
handleCommandExecuteBefore: async (input, output) => {
|
|
25592
|
-
if (input.command !==
|
|
25533
|
+
if (input.command !== COMMAND_NAME2 || !shouldHandleCommand)
|
|
25593
25534
|
return;
|
|
25594
25535
|
const args = input.arguments.trim();
|
|
25595
25536
|
const isSessionMode = args.includes("--sessions");
|
|
@@ -25599,7 +25540,7 @@ function createReflectCommandHook() {
|
|
|
25599
25540
|
output.parts.length = 0;
|
|
25600
25541
|
output.parts.push({
|
|
25601
25542
|
type: "text",
|
|
25602
|
-
text:
|
|
25543
|
+
text: activationPrompt2(focus, isSessionMode, last)
|
|
25603
25544
|
});
|
|
25604
25545
|
}
|
|
25605
25546
|
};
|
|
@@ -26332,6 +26273,91 @@ function formatCancelledTaskStatusOutput(taskID, summary = "cancelled") {
|
|
|
26332
26273
|
].join(`
|
|
26333
26274
|
`);
|
|
26334
26275
|
}
|
|
26276
|
+
// src/hooks/tier-commands/index.ts
|
|
26277
|
+
var COMMON_REQUIREMENTS = `
|
|
26278
|
+
State Management Requirements:
|
|
26279
|
+
- Before planning or creating state, inspect \`.gitignore\` and \`.ignore\`. Add missing entries: \`.gitignore\` must contain \`.slim/tier_state/\`, and \`.ignore\` must contain \`!.slim/tier_state/\` and \`!.slim/tier_state/**\`.
|
|
26280
|
+
- Create and maintain a progress file at \`.slim/tier_state/progress.md\`.
|
|
26281
|
+
- Keep OpenCode todos synced with the current phase.
|
|
26282
|
+
- Execute phase by phase. Wait for hook-driven background completion, reconcile results, and fix actionable review issues before continuing.`;
|
|
26283
|
+
function getTierPrompt(tier, task2) {
|
|
26284
|
+
let tierRules = "";
|
|
26285
|
+
switch (tier) {
|
|
26286
|
+
case 0:
|
|
26287
|
+
tierRules = `**Tier 0: Basic Mode**
|
|
26288
|
+
Focus: Fast, direct implementation. Low cooperation overhead.
|
|
26289
|
+
Rules:
|
|
26290
|
+
1. You (Orchestrator) do the main implementation work.
|
|
26291
|
+
2. High threshold for asking for review. No mandatory @oracle review.
|
|
26292
|
+
3. Use @explorer and @librarian freely for basic context.
|
|
26293
|
+
4. If parallel simple implementation is needed, offload to @fixer.
|
|
26294
|
+
5. If visual design is needed, call @designer. If vision extraction is needed, call @observer.`;
|
|
26295
|
+
break;
|
|
26296
|
+
case 1:
|
|
26297
|
+
tierRules = `**Tier 1: Guided / Supervised Mode**
|
|
26298
|
+
Focus: Quality and correctness over pure speed.
|
|
26299
|
+
Rules:
|
|
26300
|
+
1. You must plan the work first.
|
|
26301
|
+
2. MANDATORY: Call @oracle to review your plan (logic, edge cases, overlooked items) BEFORE implementing.
|
|
26302
|
+
3. Implement the work yourself, or offload parallel tasks to @fixer.
|
|
26303
|
+
4. MANDATORY: Call @oracle at the end of the implementation to review the final code for bugs and logical errors. Treat @oracle as your strict supervisor.
|
|
26304
|
+
5. Use @designer for UI, @observer for vision, @explorer/@librarian for context.`;
|
|
26305
|
+
break;
|
|
26306
|
+
case 2:
|
|
26307
|
+
tierRules = `**Tier 2: Sophisticated Ideation & Planning**
|
|
26308
|
+
Focus: High value, high performance, high cost. Vision expansion.
|
|
26309
|
+
Rules:
|
|
26310
|
+
1. The user has provided a vision or basic idea.
|
|
26311
|
+
2. MANDATORY: You must FIRST use the \`roundtable\` tool to plan the non-technical implementation, get creative feature suggestions, and refine the updated, perfected version of the user's vision.
|
|
26312
|
+
3. Once the roundtable outputs its report, you must translate it into a technical implementation plan.
|
|
26313
|
+
4. MANDATORY: Call @oracle to review your technical translation of the roundtable's plan BEFORE implementing.
|
|
26314
|
+
5. Proceed with implementation. Call @oracle for a final code review at the end.`;
|
|
26315
|
+
break;
|
|
26316
|
+
case 3:
|
|
26317
|
+
tierRules = `**Tier 3: Sophisticated Implementation**
|
|
26318
|
+
Focus: Complex, ambiguous implementation.
|
|
26319
|
+
Rules:
|
|
26320
|
+
1. You implement the main tasks. Occasionally ask @oracle for spot-checks.
|
|
26321
|
+
2. AMBIGUITY RESOLUTION: If during implementation the task has multiple perspectives or it is not clearly decidable what the best course of action is, you MUST invoke the \`roundtable\` tool to decide the path forward.
|
|
26322
|
+
3. Offload parallel known tasks to @fixer, UI to @designer.
|
|
26323
|
+
4. MANDATORY: Call @oracle for a final code review at the end.`;
|
|
26324
|
+
break;
|
|
26325
|
+
}
|
|
26326
|
+
return [
|
|
26327
|
+
`You are operating in a strict structured workflow.`,
|
|
26328
|
+
"",
|
|
26329
|
+
COMMON_REQUIREMENTS,
|
|
26330
|
+
"",
|
|
26331
|
+
tierRules,
|
|
26332
|
+
"",
|
|
26333
|
+
"Task:",
|
|
26334
|
+
task2
|
|
26335
|
+
].join(`
|
|
26336
|
+
`);
|
|
26337
|
+
}
|
|
26338
|
+
function createTierCommandsHook() {
|
|
26339
|
+
const commands = ["tier0", "tier1", "tier2", "tier3"];
|
|
26340
|
+
return {
|
|
26341
|
+
registerCommand: (opencodeConfig) => {
|
|
26342
|
+
registerCommandHook(opencodeConfig, "tier0", "Start a Tier 0 session (Fast, direct implementation)", "Basic mode");
|
|
26343
|
+
registerCommandHook(opencodeConfig, "tier1", "Start a Tier 1 session (Guided/Supervised by Oracle)", "Supervised mode");
|
|
26344
|
+
registerCommandHook(opencodeConfig, "tier2", "Start a Tier 2 session (Ideation via Roundtable -> Supervised)", "Sophisticated Ideation");
|
|
26345
|
+
registerCommandHook(opencodeConfig, "tier3", "Start a Tier 3 session (Complex implementation with Roundtable fallback)", "Sophisticated Implementation");
|
|
26346
|
+
},
|
|
26347
|
+
handleCommandExecuteBefore: async (input, output) => {
|
|
26348
|
+
if (!commands.includes(input.command))
|
|
26349
|
+
return;
|
|
26350
|
+
output.parts.length = 0;
|
|
26351
|
+
const task2 = input.arguments.trim();
|
|
26352
|
+
if (!task2) {
|
|
26353
|
+
output.parts.push(createInternalAgentTextPart(`What task should this tier manage? Run \`/${input.command} <task>\`.`));
|
|
26354
|
+
return;
|
|
26355
|
+
}
|
|
26356
|
+
const tierNum = parseInt(input.command.replace("tier", ""), 10);
|
|
26357
|
+
output.parts.push({ type: "text", text: getTierPrompt(tierNum, task2) });
|
|
26358
|
+
}
|
|
26359
|
+
};
|
|
26360
|
+
}
|
|
26335
26361
|
// src/interview/dashboard.ts
|
|
26336
26362
|
import crypto2 from "node:crypto";
|
|
26337
26363
|
import * as fsSync2 from "node:fs";
|
|
@@ -30172,7 +30198,7 @@ function buildAnswerPrompt(answers, questions, maxQuestions) {
|
|
|
30172
30198
|
}
|
|
30173
30199
|
|
|
30174
30200
|
// src/interview/service.ts
|
|
30175
|
-
var
|
|
30201
|
+
var COMMAND_NAME3 = "interview";
|
|
30176
30202
|
var DEFAULT_MAX_QUESTIONS = 2;
|
|
30177
30203
|
var MAX_RETAINED_ABANDONED = 50;
|
|
30178
30204
|
function isTruthyEnvFlag(value) {
|
|
@@ -30476,11 +30502,11 @@ function createInterviewService(ctx, config, deps) {
|
|
|
30476
30502
|
}
|
|
30477
30503
|
function registerCommand(opencodeConfig) {
|
|
30478
30504
|
const configCommand = opencodeConfig.command;
|
|
30479
|
-
if (!configCommand?.[
|
|
30505
|
+
if (!configCommand?.[COMMAND_NAME3]) {
|
|
30480
30506
|
if (!opencodeConfig.command) {
|
|
30481
30507
|
opencodeConfig.command = {};
|
|
30482
30508
|
}
|
|
30483
|
-
opencodeConfig.command[
|
|
30509
|
+
opencodeConfig.command[COMMAND_NAME3] = {
|
|
30484
30510
|
template: "Start an interview and write a live markdown spec",
|
|
30485
30511
|
description: "Open a localhost interview UI linked to the current OpenCode session"
|
|
30486
30512
|
};
|
|
@@ -30554,7 +30580,7 @@ function createInterviewService(ctx, config, deps) {
|
|
|
30554
30580
|
}
|
|
30555
30581
|
}
|
|
30556
30582
|
async function handleCommandExecuteBefore(input, output) {
|
|
30557
|
-
if (input.command !==
|
|
30583
|
+
if (input.command !== COMMAND_NAME3) {
|
|
30558
30584
|
return;
|
|
30559
30585
|
}
|
|
30560
30586
|
const idea = input.arguments.trim();
|
|
@@ -35360,11 +35386,11 @@ function recordTuiAgentModel(input, projectDir) {
|
|
|
35360
35386
|
}
|
|
35361
35387
|
|
|
35362
35388
|
// src/tools/preset-manager.ts
|
|
35363
|
-
var
|
|
35389
|
+
var COMMAND_NAME4 = "preset";
|
|
35364
35390
|
function createPresetManager(ctx, config) {
|
|
35365
35391
|
let activePreset = getActiveRuntimePreset() ?? config.preset ?? null;
|
|
35366
35392
|
async function handleCommandExecuteBefore(input, output) {
|
|
35367
|
-
if (input.command !==
|
|
35393
|
+
if (input.command !== COMMAND_NAME4) {
|
|
35368
35394
|
return;
|
|
35369
35395
|
}
|
|
35370
35396
|
output.parts.length = 0;
|
|
@@ -35383,11 +35409,11 @@ function createPresetManager(ctx, config) {
|
|
|
35383
35409
|
}
|
|
35384
35410
|
function registerCommand(opencodeConfig) {
|
|
35385
35411
|
const configCommand = opencodeConfig.command;
|
|
35386
|
-
if (!configCommand?.[
|
|
35412
|
+
if (!configCommand?.[COMMAND_NAME4]) {
|
|
35387
35413
|
if (!opencodeConfig.command) {
|
|
35388
35414
|
opencodeConfig.command = {};
|
|
35389
35415
|
}
|
|
35390
|
-
opencodeConfig.command[
|
|
35416
|
+
opencodeConfig.command[COMMAND_NAME4] = {
|
|
35391
35417
|
template: "List available presets and switch between them",
|
|
35392
35418
|
description: "Switch agent presets at runtime (e.g., /preset cheap, /preset powerful)"
|
|
35393
35419
|
};
|
|
@@ -37937,7 +37963,8 @@ var OhMyOpenCodeLite = async (ctx) => {
|
|
|
37937
37963
|
let sessionLifecycle;
|
|
37938
37964
|
let chatHeadersHook;
|
|
37939
37965
|
let foregroundFallback;
|
|
37940
|
-
let
|
|
37966
|
+
let applyPatchHook;
|
|
37967
|
+
let tierCommandsHook;
|
|
37941
37968
|
let reflectCommandHook;
|
|
37942
37969
|
let loopCommandHook;
|
|
37943
37970
|
let taskSessionManagerHook;
|
|
@@ -38024,7 +38051,7 @@ var OhMyOpenCodeLite = async (ctx) => {
|
|
|
38024
38051
|
sessionAgentMap = new Map;
|
|
38025
38052
|
chatHeadersHook = createChatHeadersHook(ctx);
|
|
38026
38053
|
foregroundFallback = new ForegroundFallbackManager(ctx.client, runtimeChains, config.fallback?.enabled !== false, config.fallback?.maxRetries ?? 3, sessionLifecycle);
|
|
38027
|
-
|
|
38054
|
+
tierCommandsHook = createTierCommandsHook();
|
|
38028
38055
|
reflectCommandHook = createReflectCommandHook();
|
|
38029
38056
|
loopCommandHook = createLoopCommandHook();
|
|
38030
38057
|
taskSessionManagerHook = createTaskSessionManagerHook(ctx, {
|
|
@@ -38351,7 +38378,7 @@ var OhMyOpenCodeLite = async (ctx) => {
|
|
|
38351
38378
|
agentConfigEntry.permission = agentPermission;
|
|
38352
38379
|
}
|
|
38353
38380
|
interviewManager.registerCommand(opencodeConfig);
|
|
38354
|
-
|
|
38381
|
+
tierCommandsHook.registerCommand(opencodeConfig);
|
|
38355
38382
|
reflectCommandHook.registerCommand(opencodeConfig);
|
|
38356
38383
|
loopCommandHook.registerCommand(opencodeConfig);
|
|
38357
38384
|
presetManager.registerCommand(opencodeConfig);
|
|
@@ -38433,7 +38460,7 @@ var OhMyOpenCodeLite = async (ctx) => {
|
|
|
38433
38460
|
"command.execute.before": async (input, output) => {
|
|
38434
38461
|
await interviewManager.handleCommandExecuteBefore(input, output);
|
|
38435
38462
|
await presetManager.handleCommandExecuteBefore(input, output);
|
|
38436
|
-
await
|
|
38463
|
+
await tierCommandsHook.handleCommandExecuteBefore(input, output);
|
|
38437
38464
|
await reflectCommandHook.handleCommandExecuteBefore(input, output);
|
|
38438
38465
|
await loopCommandHook.handleCommandExecuteBefore(input, output);
|
|
38439
38466
|
},
|
package/dist/tui.js
CHANGED
|
@@ -448,12 +448,6 @@ var CUSTOM_SKILLS = [
|
|
|
448
448
|
allowedAgents: ["orchestrator"],
|
|
449
449
|
sourcePath: "src/skills/clonedeps"
|
|
450
450
|
},
|
|
451
|
-
{
|
|
452
|
-
name: "deepwork",
|
|
453
|
-
description: "Heavy/complex coding sessions and large modifications workflow",
|
|
454
|
-
allowedAgents: ["orchestrator"],
|
|
455
|
-
sourcePath: "src/skills/deepwork"
|
|
456
|
-
},
|
|
457
451
|
{
|
|
458
452
|
name: "verification-planning",
|
|
459
453
|
description: "Plan credible, proportionate evidence before non-trivial implementation",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oh-my-opencode-serverlocal",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Custom serverlocal fork of oh-my-opencode-slim — fully owned, custom prompts + commands, dist synced via opencode-dotfiles",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: deepwork
|
|
3
|
-
description: High-cost orchestrator workflow for large, high-risk, multi-phase coding efforts with meaningful dependencies and review gates. Do not activate for routine multi-file changes.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Deepwork
|
|
7
|
-
|
|
8
|
-
Deepwork is an orchestrator workflow for heavy coding sessions. Use it only
|
|
9
|
-
when the work is clearly large or high-risk: multiple dependent phases,
|
|
10
|
-
cross-cutting architectural change, unsafe-to-partially-ship migration, or
|
|
11
|
-
sustained coordination across several specialist lanes.
|
|
12
|
-
|
|
13
|
-
Do not infer Deepwork merely because a task touches multiple files. Do not use
|
|
14
|
-
it for trivial edits, quick docs changes, simple bug fixes, or routine bounded
|
|
15
|
-
features.
|
|
16
|
-
|
|
17
|
-
## Core Contract
|
|
18
|
-
|
|
19
|
-
When deepwork is active, the orchestrator must manage the work as a scheduler,
|
|
20
|
-
not as the default implementation worker.
|
|
21
|
-
|
|
22
|
-
Required behavior:
|
|
23
|
-
|
|
24
|
-
- before planning, delegation, or creating a deepwork state file, inspect the
|
|
25
|
-
existing `.gitignore` and `.ignore`; add only missing entries, without
|
|
26
|
-
duplicates, so `.gitignore` contains `.slim/deepwork/` and `.ignore` contains
|
|
27
|
-
`!.slim/deepwork/` and `!.slim/deepwork/**`;
|
|
28
|
-
- keep OpenCode todos aligned with the active deepwork phase;
|
|
29
|
-
- create and maintain a local markdown progress file under `.slim/deepwork/`;
|
|
30
|
-
- write valuable research findings into that file as confirmed research context
|
|
31
|
-
when they are received and reconciled;
|
|
32
|
-
- draft a plan before implementation;
|
|
33
|
-
- ask `@oracle` to review the plan and revise it until acceptable;
|
|
34
|
-
- create a phased implementation/delegation plan;
|
|
35
|
-
- before oracle reviews, add relevant confirmed research findings and file
|
|
36
|
-
references to the deepwork file so oracle can review the plan or phase from
|
|
37
|
-
accepted context instead of redoing discovery;
|
|
38
|
-
- ask `@oracle` to review that implementation plan before execution;
|
|
39
|
-
- after oracle review and before each implementation phase, decide the execution
|
|
40
|
-
path: what can run in parallel, what must be sequential, which specialists to
|
|
41
|
-
delegate to, and whether to split the same agent into multiple bounded lanes;
|
|
42
|
-
- after each phase, validate, update the deepwork file, prepare the plan file
|
|
43
|
-
for oracle review and ask `@oracle` to review the phase result, fix
|
|
44
|
-
actionable issues, then continue;
|
|
45
|
-
- when a phase includes `@designer`, preserve designer intent across later
|
|
46
|
-
phases. Use `@fixer` only for mechanical follow-up that does not alter the
|
|
47
|
-
UI/UX;
|
|
48
|
-
- finish with final validation and a concise summary.
|
|
49
|
-
|
|
50
|
-
## Designer Handoff Guardrail
|
|
51
|
-
|
|
52
|
-
When a deepwork phase includes `@designer`, treat the delivered UI/UX as
|
|
53
|
-
accepted design intent for later phases. Record any important design decisions in
|
|
54
|
-
the deepwork file before continuing.
|
|
55
|
-
|
|
56
|
-
After designer work:
|
|
57
|
-
|
|
58
|
-
- preserve layout, rhythm, hierarchy, motion, spacing, color, affordances,
|
|
59
|
-
responsiveness, and component feel;
|
|
60
|
-
- review and improve user-facing copy with grounded, normal wording, but do not
|
|
61
|
-
change visual structure or interaction intent;
|
|
62
|
-
- route follow-up visual, responsive, motion, hierarchy, polish, or
|
|
63
|
-
component-feel changes back to `@designer`;
|
|
64
|
-
- use `@fixer` only for bounded mechanical follow-up that preserves the design
|
|
65
|
-
exactly, such as wiring, tests, type fixes, or non-visual behavior changes;
|
|
66
|
-
- if design intent must change, record why in the deepwork file before changing
|
|
67
|
-
it.
|
|
68
|
-
|
|
69
|
-
## Deepwork File
|
|
70
|
-
|
|
71
|
-
Create a task-specific file such as:
|
|
72
|
-
|
|
73
|
-
```text
|
|
74
|
-
.slim/deepwork/<short-task-slug>.md
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Before creating this file—and before planning or delegation—inspect the existing
|
|
78
|
-
`.gitignore` and `.ignore`. Add only missing entries and do not add duplicates:
|
|
79
|
-
|
|
80
|
-
```gitignore
|
|
81
|
-
# .gitignore
|
|
82
|
-
.slim/deepwork/
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
```gitignore
|
|
86
|
-
# .ignore
|
|
87
|
-
!.slim/deepwork/
|
|
88
|
-
!.slim/deepwork/**
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
These rules keep deepwork state git-local while allowing OpenCode to read it.
|
|
92
|
-
|
|
93
|
-
Do not follow a rigid template. Choose whatever markdown structure best fits the
|
|
94
|
-
work. The file only needs to remain useful as persistent session state and should
|
|
95
|
-
capture, as applicable:
|
|
96
|
-
|
|
97
|
-
- current goal and understanding;
|
|
98
|
-
- researched, factual context from `@librarian` to avoid oracle doing its own
|
|
99
|
-
research;
|
|
100
|
-
- plan drafts and oracle review notes;
|
|
101
|
-
- implementation phases and status;
|
|
102
|
-
- validation results;
|
|
103
|
-
- unresolved questions, blockers, and follow-ups.
|
|
104
|
-
|
|
105
|
-
Update this file after major decisions, valuable specialist research, reviews,
|
|
106
|
-
phase completions, validation results, and scope changes.
|
|
107
|
-
When `@librarian` docs, code reads, or external references produce useful
|
|
108
|
-
information, reconcile the result and record the accepted findings here so later
|
|
109
|
-
planning and reviews share the same context instead of rediscovering it.
|
|
110
|
-
Don't put actual contents of local files, reference them by path only.
|
|
111
|
-
|
|
112
|
-
## Scheduler Discipline
|
|
113
|
-
|
|
114
|
-
Use the scheduler model throughout:
|
|
115
|
-
|
|
116
|
-
- follow Orchestrator delegations rules
|
|
117
|
-
- record task/session IDs and ownership boundaries;
|
|
118
|
-
- wait for hook-driven background completion before consuming background results;
|
|
119
|
-
- avoid blocking Orchestrator lane while background jobs run; if no independent
|
|
120
|
-
work remains, stop briefly and let the completion event resume the workflow;
|
|
121
|
-
- do not advance to the next phase while relevant jobs are running or terminal
|
|
122
|
-
results are unreconciled.
|