fix(start-work): restore atlas-first slash discovery
Static slash-command discovery runs before agent registration, so /start-work regressed to Sisyphus even though config-time wiring still needed Atlas-aware fallback. Split builtin command resolution so discovery stays Atlas-first while command config remains availability-aware. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -69,12 +69,22 @@ describe("loadBuiltinCommands", () => {
|
||||
expect(commands.handoff.description).toContain("context summary")
|
||||
})
|
||||
|
||||
test("should preassign Sisyphus as the native agent for start-work", () => {
|
||||
test("should default start-work to Atlas for static slash-command discovery", () => {
|
||||
//#given - no disabled commands
|
||||
|
||||
//#when
|
||||
const commands = loadBuiltinCommands()
|
||||
|
||||
//#then
|
||||
expect(commands["start-work"].agent).toBe("atlas")
|
||||
})
|
||||
|
||||
test("should preassign Sisyphus as the native agent for start-work when command config checks registered agents", () => {
|
||||
//#given - no atlas registration
|
||||
|
||||
//#when
|
||||
const commands = loadBuiltinCommands(undefined, { useRegisteredAgents: true })
|
||||
|
||||
//#then
|
||||
expect(commands["start-work"].agent).toBe("sisyphus")
|
||||
})
|
||||
@@ -84,7 +94,7 @@ describe("loadBuiltinCommands", () => {
|
||||
registerAgentName("atlas")
|
||||
|
||||
//#when
|
||||
const commands = loadBuiltinCommands()
|
||||
const commands = loadBuiltinCommands(undefined, { useRegisteredAgents: true })
|
||||
|
||||
//#then
|
||||
expect(commands["start-work"].agent).toBe("atlas")
|
||||
|
||||
Reference in New Issue
Block a user