Skip to content

fix(telos): update UpdateTelos.ts paths for v3.0 directory structure#746

Closed
wojteksbt wants to merge 1 commit intodanielmiessler:mainfrom
wojteksbt:fix/telos-update-path-migration
Closed

fix(telos): update UpdateTelos.ts paths for v3.0 directory structure#746
wojteksbt wants to merge 1 commit intodanielmiessler:mainfrom
wojteksbt:fix/telos-update-path-migration

Conversation

@wojteksbt
Copy link

@wojteksbt wojteksbt commented Feb 20, 2026

Problem

`UpdateTelos.ts` references `.claude/context/life/telos` — a path that has never matched the actual Telos location. This causes the backup system to silently fail with file-not-found errors.

This bug exists in all releases (v2.3 through v3.0). In v3.0, Telos lives at `skills/PAI/USER/TELOS/` (relative to PAI_DIR).

Changes

File: `Releases/v3.0/.claude/skills/Telos/Tools/UpdateTelos.ts`

What Before After
`TELOS_DIR` hardcoded `$HOME/.claude/context/life/telos` `paiPath('skills', 'PAI', 'USER', 'TELOS')` — uses `PAI_DIR` env var or `~/.claude`
`BACKUPS_DIR` `backups/` (lowercase) `Backups/` (capitalized, consistent with v3.0 conventions)
`VALID_FILES` + docstring `LESSONS.md` `LEARNED.md` (actual filename in v3.0)

Why use paiPath()?

`paths.ts` provides `paiPath()` which resolves paths relative to `PAI_DIR` env var (with `~/.claude` fallback). Using it instead of `process.env.HOME + '.claude'` makes the script portable and consistent with the rest of the codebase.

Why only v3.0?

Earlier releases (v2.3–v2.5) also have the broken path but fixing them would change historical releases. v3.0 is the current release users install — that's where the fix matters.

Testing

Verified locally — `bun UpdateTelos.ts` correctly creates backups and appends to `updates.md`.

The script still referenced the v2.x path `context/life/telos` which
no longer exists in v3.0. Updated to use `paiPath()` from paths.ts
for portable PAI_DIR-aware path resolution.

Changes:
- Import `paiPath` from hooks/lib/paths (supports PAI_DIR env var)
- TELOS_DIR: hardcoded HOME path → paiPath('skills', 'PAI', 'USER', 'TELOS')
- BACKUPS_DIR: `backups/` → `Backups/` (matching actual directory name)
- VALID_FILES + docstring: `LESSONS.md` → `LEARNED.md` (actual filename)
@wojteksbt wojteksbt force-pushed the fix/telos-update-path-migration branch from a8b4108 to 93aa23e Compare February 20, 2026 22:03
@danielmiessler
Copy link
Owner

Thanks for this contribution! PAI v4.0 significantly restructured the architecture — new directory layout, Algorithm v3.6.0 (up from v1.x), hooks/lib/paths.ts for path resolution, and many of the underlying systems this PR targets have been rewritten.

This PR targets the v3.0 architecture and can't be cleanly applied to v4.0.x. Closing as superseded.

The latest release is v4.0.2. We're actively working on platform compatibility and other bigger items. If there's still a gap not covered by the new releases, we'd welcome a fresh PR against the current codebase. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants