Skip to content

fix: WorldThreatModelHarness use PAI_DIR for model storage path#817

Closed
Spirotot wants to merge 1 commit intodanielmiessler:mainfrom
Spirotot:fix/worldthreatmodelharness-storage-path
Closed

fix: WorldThreatModelHarness use PAI_DIR for model storage path#817
Spirotot wants to merge 1 commit intodanielmiessler:mainfrom
Spirotot:fix/worldthreatmodelharness-storage-path

Conversation

@Spirotot
Copy link

@Spirotot Spirotot commented Feb 27, 2026

Summary

  • The WorldThreatModelHarness/SKILL.md storage path was hardcoded to ~/.claude/MEMORY/RESEARCH/WorldModels/
  • Correct path is $PAI_DIR/MEMORY/RESEARCH/WorldModels/

Test plan

  • Verify $PAI_DIR resolves correctly in your PAI installation (echo $PAI_DIR)
  • Run WorldThreatModelHarness to confirm models are created at the correct location

🤖 Generated with Claude Code

The storage path for world models was hardcoded to ~/.claude/MEMORY/RESEARCH/WorldModels/
which is incorrect for installations using the recommended PAI symlink setup.

~/.claude/MEMORY/ is typically not symlinked to the PAI directory — it is a bare
directory that is not git-tracked. Models stored there are lost on reinstall and
are not version-controlled with the rest of the user's PAI configuration.

The correct path is $PAI_DIR/MEMORY/RESEARCH/WorldModels/ — this resolves to the
pai-system repo's MEMORY/RESEARCH/ directory which is intentionally not gitignored
(unlike MEMORY/LEARNING/, WORK/, STATE/ which go in pai-learning-data submodule).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@danielmiessler
Copy link
Owner

Thank you @Spirotot! The $PAI_DIR fix is merged into PAI v4.0.3. Good catch on the hardcoded path — this improves portability for non-default installations.

Fix included in: Releases/v4.0.3

danielmiessler added a commit that referenced this pull request Mar 2, 2026
- #800: Inference.ts JSON array parsing (objects + arrays)
- #836: CONTEXT_ROUTING.md dead reference cleanup (29 refs removed)
- #817: WorldThreatModelHarness $PAI_DIR portability
- #846: User context migration for v2.5/v3.0 upgraders

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
HyggeHacker pushed a commit to HyggeHacker/Personal_AI_Infrastructure that referenced this pull request Mar 2, 2026
…nielmiessler#836, danielmiessler#817, danielmiessler#846)

- PR danielmiessler#800: Inference.ts JSON array parsing (dual-candidate strategy)
- PR danielmiessler#836: CONTEXT_ROUTING.md dead reference cleanup (75→31 lines)
- PR danielmiessler#817: WorldThreatModelHarness $PAI_DIR portability (10 instances)
- PR danielmiessler#846: Installer user context migration (copyMissing + migrateUserContext)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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