Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/core/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,11 @@ export class UpdateCommand {
const toolStatuses = configuredTools.map((toolId) => {
const status = getToolVersionStatus(resolvedProjectPath, toolId, OPENSPEC_VERSION);
if (!status.configured && commandConfiguredSet.has(toolId)) {
return { ...status, configured: true };
return {
...status,
configured: true,
needsUpdate: status.generatedByVersion === null || status.generatedByVersion !== OPENSPEC_VERSION,
};
}
return status;
});
Expand Down
15 changes: 15 additions & 0 deletions test/core/update.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,21 @@ Old instructions content
}
});

it('should update command files when tool is configured via commands-only delivery without skills', async () => {
setMockConfig({ featureFlags: {}, profile: 'core', delivery: 'commands' });
const commandsDir = path.join(testDir, '.claude', 'commands', 'opsx');
await fs.mkdir(commandsDir, { recursive: true });
const coreCommandIds = ['explore', 'apply', 'update', 'sync', 'archive', 'propose'];
for (const cmdId of coreCommandIds) {
await fs.writeFile(path.join(commandsDir, `${cmdId}.md`), 'old command content');
}

await updateCommand.execute(testDir);

const updatedContent = await fs.readFile(path.join(commandsDir, 'explore.md'), 'utf-8');
expect(updatedContent).not.toBe('old command content');
expect(updatedContent).toContain('---');
});
});

describe('multi-tool support', () => {
Expand Down