fix(hooks,tools): replace /plan example with prometheus delegation and rename code-review example to review-work (#2633, #3285, #2873)

- context-info-builder referenced a non-existent /plan command;
  now directs users to the Prometheus agent for planning
- skill tool description example referenced 'code-review' which
  does not exist; changed to 'review-work' (actual built-in skill)
- skill tool execute path now surfaces the missing host permission
  gap so callers understand OpenCode plugin context limits

🤖 Generated with OhMyOpenCode assistance
https://github.com/code-yeongyu/oh-my-opencode
This commit is contained in:
YeonGyu-Kim
2026-04-12 02:28:58 +09:00
parent c750781be4
commit d7b4bec58b
5 changed files with 70 additions and 15 deletions
+7 -10
View File
@@ -6,10 +6,7 @@ import {
findPrometheusPlans,
getPlanName,
getPlanProgress,
getTaskSessionState,
readBoulderState,
readCurrentTopLevelTask,
upsertTaskSessionState,
writeBoulderState,
} from "../../features/boulder-state"
import { log } from "../../shared/logger"
@@ -97,8 +94,8 @@ Ask the user which plan to work on.`
return `
## Plan Not Found
Could not find a plan matching "${explicitPlanName}".
No incomplete plans available. Create a new plan with: /plan "your task"`
Could not find a plan matching "${explicitPlanName}".
No incomplete plans available. Create a new plan using the Prometheus agent.`
}
function buildExplicitPlanContext(params: {
@@ -125,8 +122,8 @@ function buildExplicitPlanContext(params: {
return `
## Plan Already Complete
The requested plan "${getPlanName(matchedPlan)}" has been completed.
All ${progress.total} tasks are done. Create a new plan with: /plan "your task"`
The requested plan "${getPlanName(matchedPlan)}" has been completed.
All ${progress.total} tasks are done. Create a new plan using the Prometheus agent.`
}
if (existingState) {
@@ -224,8 +221,8 @@ function buildPlanDiscoveryContext(params: {
return contextInfo + `
## No Plans Found
No Prometheus plan files found at .sisyphus/plans/
Use Prometheus to create a work plan first: /plan "your task"`
No Prometheus plan files found in the .sisyphus plans directory.
Use the Prometheus agent to create a work plan first.`
}
if (incompletePlans.length === 0) {
@@ -233,7 +230,7 @@ Use Prometheus to create a work plan first: /plan "your task"`
## All Plans Complete
All ${plans.length} plan(s) are complete. Create a new plan with: /plan "your task"`
All ${plans.length} plan(s) are complete. Create a new plan using the Prometheus agent.`
}
if (incompletePlans.length === 1) {
+22
View File
@@ -6,6 +6,7 @@ import { join } from "node:path"
import { tmpdir } from "node:os"
import { randomUUID } from "node:crypto"
import { createStartWorkHook } from "./index"
import { buildStartWorkContextInfo } from "./context-info-builder"
import { createAtlasHook } from "../atlas"
import {
writeBoulderState,
@@ -67,6 +68,27 @@ You are starting a Sisyphus work session.
})
describe("chat.message handler", () => {
test("should not include /plan literal in missing-plan guidance", () => {
// given
const contextInfo = buildStartWorkContextInfo({
ctx: createMockPluginInput(),
explicitPlanName: null,
existingState: null,
sessionId: "session-123",
timestamp: "2026-04-12T00:00:00.000Z",
activeAgent: "sisyphus",
worktreePath: undefined,
worktreeBlock: "",
})
// when
const containsLegacyPlanCommand = contextInfo.includes("/plan")
// then
expect(containsLegacyPlanCommand).toBe(false)
expect(contextInfo).toContain("Prometheus")
})
test("should ignore non-start-work commands", async () => {
// given - hook and non-start-work message
const hook = createStartWorkHook(createMockPluginInput())