feat(workspace): store runtime state under omo
This commit is contained in:
@@ -26,7 +26,7 @@ describe("buildStartWorkContextInfo", () => {
|
||||
}
|
||||
|
||||
function writePlan(planName: string, content: string): string {
|
||||
const plansDirectory = join(testDirectory, ".sisyphus", "plans")
|
||||
const plansDirectory = join(testDirectory, ".omo", "plans")
|
||||
mkdirSync(plansDirectory, { recursive: true })
|
||||
const planPath = join(plansDirectory, `${planName}.md`)
|
||||
writeFileSync(planPath, content)
|
||||
@@ -176,7 +176,7 @@ describe("buildStartWorkContextInfo", () => {
|
||||
writePlan("new-plan-c", "## TODOs\n- [ ] 1. Work C")
|
||||
|
||||
const initialState = createBoulderState(
|
||||
join(testDirectory, ".sisyphus", "plans", "work-a.md"),
|
||||
join(testDirectory, ".omo", "plans", "work-a.md"),
|
||||
"session-a",
|
||||
"atlas",
|
||||
"/tmp/worktree-a",
|
||||
|
||||
@@ -328,7 +328,7 @@ function buildPlanDiscoveryContext(params: {
|
||||
return contextInfo + `
|
||||
## No Plans Found
|
||||
|
||||
No Prometheus plan files found in the .sisyphus plans directory.
|
||||
No Prometheus plan files found in the .omo plans directory.
|
||||
Use the Prometheus agent to create a work plan first.`
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import { unsafeTestValue } from "../../../test-support/unsafe-test-value"
|
||||
|
||||
describe("start-work hook", () => {
|
||||
let testDir: string
|
||||
let sisyphusDir: string
|
||||
let omoDir: string
|
||||
|
||||
function createMockPluginInput() {
|
||||
return {
|
||||
@@ -50,12 +50,12 @@ You are starting a Sisyphus work session.
|
||||
sessionState.registerAgentName("atlas")
|
||||
sessionState.registerAgentName("sisyphus")
|
||||
testDir = join(tmpdir(), `start-work-test-${randomUUID()}`)
|
||||
sisyphusDir = join(testDir, ".sisyphus")
|
||||
omoDir = join(testDir, ".omo")
|
||||
if (!existsSync(testDir)) {
|
||||
mkdirSync(testDir, { recursive: true })
|
||||
}
|
||||
if (!existsSync(sisyphusDir)) {
|
||||
mkdirSync(sisyphusDir, { recursive: true })
|
||||
if (!existsSync(omoDir)) {
|
||||
mkdirSync(omoDir, { recursive: true })
|
||||
}
|
||||
clearBoulderState(testDir)
|
||||
})
|
||||
@@ -224,7 +224,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("should auto-select when only one incomplete plan among multiple plans", async () => {
|
||||
// given - multiple plans but only one incomplete
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
|
||||
// Plan 1: complete (all checked)
|
||||
@@ -254,7 +254,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("should wrap multiple plans message in system-reminder tag", async () => {
|
||||
// given - multiple incomplete plans
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
|
||||
const plan1Path = join(plansDir, "plan-a.md")
|
||||
@@ -282,7 +282,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("should use 'ask user' prompt style for multiple plans", async () => {
|
||||
// given - multiple incomplete plans
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
|
||||
const plan1Path = join(plansDir, "plan-x.md")
|
||||
@@ -309,7 +309,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("should select explicitly specified plan name from user-request, ignoring existing boulder state", async () => {
|
||||
// given - existing boulder state pointing to old plan
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
|
||||
// Old plan (in boulder state)
|
||||
@@ -353,7 +353,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("should strip ultrawork/ulw keywords from plan name argument", async () => {
|
||||
// given - plan with ultrawork keyword in user-request
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
|
||||
const planPath = join(plansDir, "my-feature-plan.md")
|
||||
@@ -382,7 +382,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("should strip ulw keyword from plan name argument", async () => {
|
||||
// given - plan with ulw keyword in user-request
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
|
||||
const planPath = join(plansDir, "api-refactor.md")
|
||||
@@ -411,7 +411,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("should match plan by partial name", async () => {
|
||||
// given - user specifies partial plan name
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
|
||||
const planPath = join(plansDir, "2026-01-15-feature-implementation.md")
|
||||
@@ -440,7 +440,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("should match quoted human-readable plan names to slugged filenames", async () => {
|
||||
// given - saved plan uses a slugged filename
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
|
||||
const planPath = join(plansDir, "my-feature-plan.md")
|
||||
@@ -469,7 +469,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("should match Korean plan names after Unicode-aware normalization", async () => {
|
||||
// given
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
|
||||
const planPath = join(plansDir, "결제-플로우.md")
|
||||
@@ -498,7 +498,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("should match Japanese plan names after Unicode-aware normalization", async () => {
|
||||
// given
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
|
||||
const planPath = join(plansDir, "支払い-フロー.md")
|
||||
@@ -527,7 +527,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("should keep ASCII plan name matching behavior unchanged", async () => {
|
||||
// given
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
|
||||
const planPath = join(plansDir, "checkout-flow.md")
|
||||
@@ -556,7 +556,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("should match mixed ASCII and non-ASCII plan names", async () => {
|
||||
// given
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
|
||||
const planPath = join(plansDir, "v2-결제-flow.md")
|
||||
@@ -674,7 +674,7 @@ You are starting a Sisyphus work session.
|
||||
sessionState.registerAgentName("sisyphus")
|
||||
sessionState.updateSessionAgent("ses-prometheus-to-worker", "prometheus")
|
||||
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
writeFileSync(join(plansDir, "worker-plan.md"), "# Plan\n- [ ] Task 1")
|
||||
|
||||
@@ -732,7 +732,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("#given start-work hands the session to Atlas #when Atlas later receives session.idle #then the same session continues the selected plan", async () => {
|
||||
// given
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
writeFileSync(join(plansDir, "atlas-plan.md"), "# Plan\n- [ ] Task 1\n- [ ] Task 2")
|
||||
|
||||
@@ -770,7 +770,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("#given start-work hands the session to Atlas but background work is still running #when that work finishes #then Atlas resumes via retry for the same session", async () => {
|
||||
// given
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
writeFileSync(join(plansDir, "atlas-plan.md"), "# Plan\n- [ ] Task 1\n- [ ] Task 2")
|
||||
|
||||
@@ -877,7 +877,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("should NOT inject worktree instructions when no --worktree flag", async () => {
|
||||
// given - single plan, no worktree flag
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
writeFileSync(join(plansDir, "my-plan.md"), "# Plan\n- [ ] Task 1")
|
||||
|
||||
@@ -897,7 +897,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("should inject worktree path when --worktree flag is valid", async () => {
|
||||
// given - single plan + valid worktree path
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
writeFileSync(join(plansDir, "my-plan.md"), "# Plan\n- [ ] Task 1")
|
||||
detectSpy.mockReturnValue("/validated/worktree")
|
||||
@@ -919,7 +919,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("should store worktree_path in boulder when --worktree is valid", async () => {
|
||||
// given - plan + valid worktree
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
writeFileSync(join(plansDir, "my-plan.md"), "# Plan\n- [ ] Task 1")
|
||||
detectSpy.mockReturnValue("/valid/wt")
|
||||
@@ -939,7 +939,7 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("should NOT store worktree_path when --worktree path is invalid", async () => {
|
||||
// given - plan + invalid worktree path (detectWorktreePath returns null)
|
||||
const plansDir = join(testDir, ".sisyphus", "plans")
|
||||
const plansDir = join(testDir, ".omo", "plans")
|
||||
mkdirSync(plansDir, { recursive: true })
|
||||
writeFileSync(join(plansDir, "my-plan.md"), "# Plan\n- [ ] Task 1")
|
||||
// detectSpy already returns null by default
|
||||
@@ -1017,9 +1017,9 @@ You are starting a Sisyphus work session.
|
||||
|
||||
test("should show worktree plan progress and path when the mirrored plan exists", async () => {
|
||||
// given
|
||||
const mainPlanPath = join(testDir, ".sisyphus", "plans", "resume-worktree-plan.md")
|
||||
const mainPlanPath = join(testDir, ".omo", "plans", "resume-worktree-plan.md")
|
||||
const worktreeDir = join(testDir, "..", `resume-worktree-${randomUUID()}`)
|
||||
const worktreePlanPath = join(worktreeDir, ".sisyphus", "plans", "resume-worktree-plan.md")
|
||||
const worktreePlanPath = join(worktreeDir, ".omo", "plans", "resume-worktree-plan.md")
|
||||
mkdirSync(dirname(mainPlanPath), { recursive: true })
|
||||
mkdirSync(dirname(worktreePlanPath), { recursive: true })
|
||||
writeFileSync(mainPlanPath, "# Plan\n- [ ] Main repo task\n")
|
||||
|
||||
Reference in New Issue
Block a user