refactor: move default CLAUDE.md template to bundled case-template.md

Replaces the ~400-line inline template string in claude-md.ts with a
file read from src/templates/case-template.md. Removes the hardcoded
/home/arkon/default/CLAUDE.md path from server.ts. The build script
now copies the template to dist/templates/ for production use.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-22 22:43:09 +01:00
co-authored by Claude Opus 4.5
parent 0ff0dcac82
commit afaa1d3adb
5 changed files with 480 additions and 444 deletions
-6
View File
@@ -1578,8 +1578,6 @@ export class WebServer extends EventEmitter {
// Helper to get custom CLAUDE.md template path from settings
private getDefaultClaudeMdPath(): string | undefined {
const settingsPath = join(homedir(), '.claudeman', 'settings.json');
// Default template path (can be overridden in settings)
const defaultPath = '/home/arkon/default/CLAUDE.md';
try {
if (existsSync(settingsPath)) {
@@ -1589,10 +1587,6 @@ export class WebServer extends EventEmitter {
return settings.defaultClaudeMdPath;
}
}
// Use default path if it exists
if (existsSync(defaultPath)) {
return defaultPath;
}
} catch (err) {
console.error('Failed to read settings:', err);
}