Skip to content

Replace hardcoded paths with PAI_HOME environment variable#9

Merged
danielmiessler merged 1 commit into
danielmiessler:mainfrom
mvoehringer:feature/fix-path
Sep 20, 2025
Merged

Replace hardcoded paths with PAI_HOME environment variable#9
danielmiessler merged 1 commit into
danielmiessler:mainfrom
mvoehringer:feature/fix-path

Conversation

@mvoehringer

Copy link
Copy Markdown
Contributor

Summary

Replace all hardcoded paths with configurable PAI_HOME environment
variable for better deployment flexibility and testing.

This PR addresses the hardcoded path issue by:

  • Replacing ~/.claude/ references with ${PAI_HOME}/.claude/ throughout
    the codebase
  • Updating commands, hooks, settings, and documentation to use the
    environment variable
  • Adding fallback support ${PAI_HOME:-~} in hook configurations
  • Documenting the PAI_HOME usage in README for custom directory testing

Background

Two other PRs have addressed similar hardcoded path issues, but this PR
provides the additional benefit of allowing users to change the default
installation directory via environment variable configuration.

Updates all .claude references to use ${PAI_HOME} for configurable installation paths, enabling custom directory testing and deployment flexibility.
@Jamie-SA

Copy link
Copy Markdown

I like the idea of using PAI_HOME. Although I wish there was a fallback mechanism to "~/", can you just tell Claude to do that?

@mvoehringer

Copy link
Copy Markdown
Contributor Author
  • ${PAI_HOME:-~}

@Jamie-SA Thank you for the command. A fallback is already in place.

@danielmiessler danielmiessler merged commit 0dd0f87 into danielmiessler:main Sep 20, 2025
Smartagent-so pushed a commit to Smartagent-so/Personal_AI_Infrastructure that referenced this pull request Dec 4, 2025
Replace hardcoded paths with PAI_HOME environment variable
chrisboulet pushed a commit to chrisboulet/WahookAI that referenced this pull request Jan 4, 2026
Replace hardcoded paths with PAI_HOME environment variable
rikitikitavi2012-debug added a commit to rikitikitavi2012-debug/PAI that referenced this pull request Mar 10, 2026
…s-9705076818860228080-cb6b0bf1

Fix PR danielmiessler#9: Address test failing due to import resolution and global scope mutation
rikitikitavi2012-debug added a commit to rikitikitavi2012-debug/PAI that referenced this pull request Mar 10, 2026
…ification

- TELOS MODELS.md: MO13 Flywheel (Collins + Buffett + Miessler synthesis)
- TELOS WISDOM.md: Collins/Buffett quotes (4 new)
- CLAUDE.md principle danielmiessler#9: LEARN-fixation mandatory before next cycle
- AISTEERINGRULES.md: MO13 Flywheel section with Statement/Bad/Correct
- BRIGADE.md: full T1/T2/T3 classification (Navi, A0, Jules, OpenCode, Gemini, Voice, Z.AI)
- cost-budget.json: Anthropic billing with structured invoice data

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
catwhisperingninja pushed a commit to catwhisperingninja/pai that referenced this pull request Mar 11, 2026
Replace hardcoded paths with PAI_HOME environment variable
rikitikitavi2012-debug added a commit to rikitikitavi2012-debug/PAI that referenced this pull request Apr 2, 2026
- After 3 consecutive failures of same type, STOP and surface problem
- Failure types: compaction loss, verification crash, repeated criterion fail, error loops
- Output format with root cause hypothesis and user action needed
- Based on 1,279 real sessions analysis

Implements danielmiessler#9 from PAI Upgrade Report (HIGH priority)
rikitikitavi2012-debug added a commit to rikitikitavi2012-debug/PAI that referenced this pull request Apr 2, 2026
Completed:
- #4 Hook  filtering
- danielmiessler#15 showThinkingSummaries
- danielmiessler#12 MCP_CONNECTION_NONBLOCKING
- danielmiessler#6 EVIDENCE_FIRST gate
- danielmiessler#16 PhaseGate hook
- danielmiessler#9 Circuit Breaker

Skipped: danielmiessler#10 (use Anthropic API + Z.AI directly)
danielmiessler added a commit that referenced this pull request Apr 30, 2026
…th real diagrams

The v5.0.0 release page is now framed around the actual 2026 thesis:
your DA is the center of your AI universe. Skills, agents, and the
harness fade into infrastructure behind the named entity you talk to.

Core Shift section completely rewritten:
- Drops the ASCII three-layer box (which Daniel called a 'stupid table')
- Embeds a real architect-style diagram showing principal at center,
  DA wrapping, satellites orbiting, world in outer ring
- Cites 'We're All Building a Single Digital Assistant' (blog + video)
  as canonical source
- Adds priority list: OS transition, PRD->ISA migration, Pulse, 45 skills

ISA section rewritten as the second-biggest shift:
- New PRD -> ISA migration narrative (one document, twelve sections,
  five identities)
- Embeds isa-twelve-sections diagram
- Documents the two homes (project ISAs vs task ISAs), ID-stability
  rules, conjecture/refutation/learning Changelog format

Algorithm section: embeds current-to-ideal loop diagram showing the
seven-phase OBSERVE->THINK->PLAN->BUILD->EXECUTE->VERIFY->LEARN cycle
with ISC checkbox track.

Skills section: embeds constellation diagram showing YOUR DA at center
with five skill clusters (THINKING, CONTENT, RESEARCH, AGENTS, BUILD)
and 'plus 30 more skills in your install' caption.

NEW section #9: The system prompt - constitutional adherence.
Documents PAI/PAI_SYSTEM_PROMPT.md as the highest-priority layer above
CLAUDE.md, encoding non-negotiable behavioral rules (output format,
verification doctrine, security protocol, identity rules, operational
non-negotiables). This is the v4.x 'forgot the rules deep in a
session' fix.

All four images generated via Art/Tools/Generate.ts following the
TechnicalDiagrams workflow (Nano Banana Pro, 2K, 16:9, sepia
background, BOLD/SATURATED palette, custom typography). Visual
inspection confirmed before commit.
larsboes referenced this pull request in larsboes/PAI May 17, 2026
…th real diagrams

The v5.0.0 release page is now framed around the actual 2026 thesis:
your DA is the center of your AI universe. Skills, agents, and the
harness fade into infrastructure behind the named entity you talk to.

Core Shift section completely rewritten:
- Drops the ASCII three-layer box (which Daniel called a 'stupid table')
- Embeds a real architect-style diagram showing principal at center,
  DA wrapping, satellites orbiting, world in outer ring
- Cites 'We're All Building a Single Digital Assistant' (blog + video)
  as canonical source
- Adds priority list: OS transition, PRD->ISA migration, Pulse, 45 skills

ISA section rewritten as the second-biggest shift:
- New PRD -> ISA migration narrative (one document, twelve sections,
  five identities)
- Embeds isa-twelve-sections diagram
- Documents the two homes (project ISAs vs task ISAs), ID-stability
  rules, conjecture/refutation/learning Changelog format

Algorithm section: embeds current-to-ideal loop diagram showing the
seven-phase OBSERVE->THINK->PLAN->BUILD->EXECUTE->VERIFY->LEARN cycle
with ISC checkbox track.

Skills section: embeds constellation diagram showing YOUR DA at center
with five skill clusters (THINKING, CONTENT, RESEARCH, AGENTS, BUILD)
and 'plus 30 more skills in your install' caption.

NEW section #9: The system prompt - constitutional adherence.
Documents PAI/PAI_SYSTEM_PROMPT.md as the highest-priority layer above
CLAUDE.md, encoding non-negotiable behavioral rules (output format,
verification doctrine, security protocol, identity rules, operational
non-negotiables). This is the v4.x 'forgot the rules deep in a
session' fix.

All four images generated via Art/Tools/Generate.ts following the
TechnicalDiagrams workflow (Nano Banana Pro, 2K, 16:9, sepia
background, BOLD/SATURATED palette, custom typography). Visual
inspection confirmed before commit.
konanzin pushed a commit to konanzin/Personal_AI_Infrastructure that referenced this pull request May 20, 2026
Implementa hook para manter PRINCIPAL_TELOS.md sempre atualizado:

1. Monitora mudanças em arquivos TELOS/*.md via FileWatcher
2. Detecta quando arquivo fonte é mais novo que PRINCIPAL_TELOS.md
3. Regenera PRINCIPAL_TELOS.md automaticamente:
   - Lê todos os arquivos .md em USER/TELOS/
   - Combina em um único arquivo consolidado
   - Adiciona timestamp e metadata
   - Preserva estrutura e conteúdo original

4. Funções implementadas na lib:
   - readTelosSourceFiles() — lê todos os arquivos TELOS
   - generatePrincipalTelos() — gera PRINCIPAL_TELOS.md
   - shouldRegeneratePrincipalTelos() — verifica se precisa sync

5. Por que é importante:
   - PRINCIPAL_TELOS.md é carregado em TODAS as sessões
   - Precisa estar sincronizado para modelo ter contexto atual
   - Auto-sync elimina necessidade de gerar manualmente

- Validação: 88/88 checks passando (100%)
- Versão do plugin: 2.7.0

Refs: BACKLOG-HOOKS-PAI.md danielmiessler#9
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.

3 participants