Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ import fs from 'fs'
import path from 'path'
import os from 'os'

const TELOS_DIR = path.join(os.homedir(), '.claude/skills/life/telos')
const TELOS_DIR = path.join(os.homedir(), '.claude/skills/PAI/USER/TELOS')
const PROJECTS_FILE = path.join(os.homedir(), '.claude/skills/PAI/USER/PROJECTS/PROJECTS.md')

function resolveTelosFilePath(filename: string): string {
if (filename === 'PROJECTS.md') return PROJECTS_FILE
return path.join(TELOS_DIR, filename)
}

export async function POST(request: Request) {
try {
Expand All @@ -24,7 +30,7 @@ export async function POST(request: Request) {
const csvDir = path.join(TELOS_DIR, 'data')
filePath = path.join(csvDir, filename)
} else {
filePath = path.join(TELOS_DIR, filename)
filePath = resolveTelosFilePath(filename)
}

// Verify file exists before overwriting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ export interface TelosFile {
}

const TELOS_DIR = path.join(os.homedir(), '.claude/skills/PAI/USER/TELOS')
// PROJECTS.md lives alongside other USER dirs, not inside TELOS
const PROJECTS_FILE = path.join(os.homedir(), '.claude/skills/PAI/USER/PROJECTS/PROJECTS.md')

function resolveTelosFilePath(filename: string): string {
if (filename === 'PROJECTS.md') return PROJECTS_FILE
return path.join(TELOS_DIR, filename)
}

export function getAllTelosData(): TelosFile[] {
const files: TelosFile[] = []
Expand All @@ -22,7 +29,7 @@ export function getAllTelosData(): TelosFile[] {
for (const filename of dirFiles) {
if (filename.endsWith('.md') && !filename.startsWith('.')) {
try {
const filePath = path.join(TELOS_DIR, filename)
const filePath = resolveTelosFilePath(filename)
const stats = fs.statSync(filePath)

if (stats.isFile()) {
Expand Down