Skip to content

Commit dbe9cdd

Browse files
feat: Add memory command as alias for decision
1 parent 486b10c commit dbe9cdd

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

src/cli/commands/decision.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,3 +351,26 @@ export function getSessionDecisions(projectRoot: string): Decision[] {
351351
const store = loadDecisions(projectRoot);
352352
return store.decisions;
353353
}
354+
355+
// Alias: "memory" command (same as decision)
356+
export function createMemoryCommand(): Command {
357+
const cmd = createDecisionCommand();
358+
// Change command name to "memory" but keep all subcommands
359+
return new Command('memory')
360+
.description('Store memories for session context (alias for decision)')
361+
.addCommand(
362+
cmd.commands.find((c) => c.name() === 'add')!.copyInheritedSettings(cmd)
363+
)
364+
.addCommand(
365+
cmd.commands.find((c) => c.name() === 'list')!.copyInheritedSettings(cmd)
366+
)
367+
.addCommand(
368+
cmd.commands.find((c) => c.name() === 'clear')!.copyInheritedSettings(cmd)
369+
)
370+
.addCommand(
371+
cmd.commands.find((c) => c.name() === 'arch')!.copyInheritedSettings(cmd)
372+
)
373+
.addCommand(
374+
cmd.commands.find((c) => c.name() === 'tool')!.copyInheritedSettings(cmd)
375+
);
376+
}

src/cli/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ import { createLogCommand } from './commands/log.js';
3232
import { createContextCommands } from './commands/context.js';
3333
import { createConfigCommand } from './commands/config.js';
3434
import { createHandoffCommand } from './commands/handoff.js';
35-
import { createDecisionCommand } from './commands/decision.js';
35+
import {
36+
createDecisionCommand,
37+
createMemoryCommand,
38+
} from './commands/decision.js';
3639
import { createStorageCommand } from './commands/storage.js';
3740
import { createSkillsCommand } from './commands/skills.js';
3841
import { createTestCommand } from './commands/test.js';
@@ -561,6 +564,7 @@ program.addCommand(createContextCommands());
561564
program.addCommand(createConfigCommand());
562565
program.addCommand(createHandoffCommand());
563566
program.addCommand(createDecisionCommand());
567+
program.addCommand(createMemoryCommand());
564568
program.addCommand(createStorageCommand());
565569
program.addCommand(createSkillsCommand());
566570
program.addCommand(createTestCommand());

0 commit comments

Comments
 (0)