Skip to content

fix: replace hardcoded user paths with tilde notation in Claude settings#7

Closed
jankowtf wants to merge 1 commit into
danielmiessler:mainfrom
jankowtf:main
Closed

fix: replace hardcoded user paths with tilde notation in Claude settings#7
jankowtf wants to merge 1 commit into
danielmiessler:mainfrom
jankowtf:main

Conversation

@jankowtf

Copy link
Copy Markdown

Summary

Complete the migration from hardcoded user paths to tilde notation for better portability across different user environments.

Changes

  • Replace hardcoded /Users/daniel/ paths with ~/ in Claude settings configuration
  • Fix remaining hardcoded path in load-dynamic-requirements.ts hook
  • Add Bun prerequisite to README documentation

Impact

  • Improves portability for users with different usernames/home directories
  • Maintains consistent configuration approach across all hook commands

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@danielmiessler

Copy link
Copy Markdown
Owner

Updated with another PR. Thank you!

rikitikitavi2012-debug added a commit to rikitikitavi2012-debug/PAI that referenced this pull request Mar 10, 2026
…jules-auto-merge-tests-13533968641968472418

Test: Implement comprehensive unit tests for JulesAutoMerge pipeline
rikitikitavi2012-debug added a commit to rikitikitavi2012-debug/PAI that referenced this pull request Mar 10, 2026
… fix

- JulesAutoMerge E2E: merged PRs #2, #3 (public), danielmiessler#7, danielmiessler#8 (private)
- Fix isProcessed() — failed_merge/failed_tests now retryable (not permanent block)
- HealthMonitor.ts MVP — checks A0 (real /api_message), VoiceServer, gh CLI
- Health report saved to MEMORY/STATE/health-report.json
- 3 new Jules tasks queued: danielmiessler#880 (symlink), danielmiessler#847 (dead refs), danielmiessler#855 (Linux audio)
- A0 code review confirmed working (PR danielmiessler#8: severity LOW, Clean)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rikitikitavi2012-debug added a commit to rikitikitavi2012-debug/PAI that referenced this pull request Mar 30, 2026
Cross-model finding danielmiessler#7: incentives reward hitting thresholds over quality.
Added Critical Rule: padding ISC with trivial criteria is theater.
If can't find real criteria, downshift effort level instead.
rikitikitavi2012-debug added a commit to rikitikitavi2012-debug/PAI that referenced this pull request Apr 2, 2026
- ExpertiseCapture.hook.ts: auto-extracts patterns from Agent/Task completions
- MEMORY/EXPERTISE/: per-agent expertise files (explore.md, plan.md)
- TEMPLATE.md: format specification and update rules
- Cross-domain patterns promoted to Wisdom Frames after 2+ appearances

Implements danielmiessler#7 from PAI Upgrade Report (HIGH priority)
rikitikitavi2012-debug added a commit to rikitikitavi2012-debug/PAI that referenced this pull request Apr 2, 2026
rikitikitavi2012-debug added a commit to rikitikitavi2012-debug/PAI that referenced this pull request Apr 2, 2026
Completed this session:
- #3 Domain ownership (6b118b5)
- danielmiessler#7 Per-agent expertise (1981869)
- danielmiessler#14 Lean Snapshot (7e377ae)
- danielmiessler#11 Hook defer (9dc0055)

Pending: #1, #2, #5, danielmiessler#8, danielmiessler#13
neilinger added a commit to neilinger/Personal_AI_Infrastructure that referenced this pull request May 3, 2026
Addresses code-review findings post-installer-refactor:

danielmiessler#3 Mirror-lib drift guard: hooks/lib/paths.test.ts adds a unit test
that diffs hooks/lib/paths.ts against PAI/lib/paths.ts (post-docblock).
The two are deliberate mirrors per C1; this test fails the suite if
they drift. No CI plumbing needed — runs in the regular bun test pass.

danielmiessler#4 engine/paths.ts:53 clean() consistency: replaced direct
process.env.PAI_DIR.trim() check with a clean() helper invocation
matching the rest of the function. Same semantics, explicit intent,
no future drift if clean() ever changes.

danielmiessler#5 paths.sh exit-vs-return: documented the
"return 1 2>/dev/null || exit 1" pattern with a four-line comment.

danielmiessler#7 Test gap closed: new rows in PAI-Install/engine/paths.test.ts cover
cliClaude + PAI_DIR=whitespace and cliClaude + PAI_DIR=empty. (Was
implicit before; now explicit.) 41 tests total (was 38).

danielmiessler#6 Untracked dirs: added .claude/worktrees/ and .omc/ to superproject
gitignore; added .omc/ to release-tree gitignore.

Architecture references: switched from "L18-34" to
'"## Directory Structure"' (section name, stable across edits) in
hooks/lib/paths.ts, PAI/lib/paths.ts, PAI/lib/paths.sh, PAI/lib/paths.bats,
hooks/lib/paths.test.ts, PAI/PAI-Install/engine/paths.ts,
PAI/PAI-Install/engine/paths.test.ts, all 3 task YAMLs and the suite
YAML. Old eval Results/ JSONs left as historical run artifacts.

Verification: 41/41 TS GREEN (17 installer + 24 path-lib including
new drift guard); 12/12 bats GREEN; shell helper smoke clean.

Not addressed in this commit (per review):
- #1 rebase onto origin/main (your call to push)
- #2 settings.json/CLAUDE.md local overrides (left uncommitted)
neilinger added a commit to neilinger/Personal_AI_Infrastructure that referenced this pull request May 3, 2026
Addresses code-review findings post-installer-refactor:

danielmiessler#3 Mirror-lib drift guard: hooks/lib/paths.test.ts adds a unit test
that diffs hooks/lib/paths.ts against PAI/lib/paths.ts (post-docblock).
The two are deliberate mirrors per C1; this test fails the suite if
they drift. No CI plumbing needed — runs in the regular bun test pass.

danielmiessler#4 engine/paths.ts:53 clean() consistency: replaced direct
process.env.PAI_DIR.trim() check with a clean() helper invocation
matching the rest of the function. Same semantics, explicit intent,
no future drift if clean() ever changes.

danielmiessler#5 paths.sh exit-vs-return: documented the
"return 1 2>/dev/null || exit 1" pattern with a four-line comment.

danielmiessler#7 Test gap closed: new rows in PAI-Install/engine/paths.test.ts cover
cliClaude + PAI_DIR=whitespace and cliClaude + PAI_DIR=empty. (Was
implicit before; now explicit.) 41 tests total (was 38).

danielmiessler#6 Untracked dirs: added .claude/worktrees/ and .omc/ to superproject
gitignore; added .omc/ to release-tree gitignore.

Architecture references: switched from "L18-34" to
'"## Directory Structure"' (section name, stable across edits) in
hooks/lib/paths.ts, PAI/lib/paths.ts, PAI/lib/paths.sh, PAI/lib/paths.bats,
hooks/lib/paths.test.ts, PAI/PAI-Install/engine/paths.ts,
PAI/PAI-Install/engine/paths.test.ts, all 3 task YAMLs and the suite
YAML. Old eval Results/ JSONs left as historical run artifacts.

Verification: 41/41 TS GREEN (17 installer + 24 path-lib including
new drift guard); 12/12 bats GREEN; shell helper smoke clean.

Not addressed in this commit (per review):
- #1 rebase onto origin/main (your call to push)
- #2 settings.json/CLAUDE.md local overrides (left uncommitted)
neilinger added a commit to neilinger/Personal_AI_Infrastructure that referenced this pull request May 3, 2026
Addresses code-review findings post-installer-refactor:

danielmiessler#3 Mirror-lib drift guard: hooks/lib/paths.test.ts adds a unit test
that diffs hooks/lib/paths.ts against PAI/lib/paths.ts (post-docblock).
The two are deliberate mirrors per C1; this test fails the suite if
they drift. No CI plumbing needed — runs in the regular bun test pass.

danielmiessler#4 engine/paths.ts:53 clean() consistency: replaced direct
process.env.PAI_DIR.trim() check with a clean() helper invocation
matching the rest of the function. Same semantics, explicit intent,
no future drift if clean() ever changes.

danielmiessler#5 paths.sh exit-vs-return: documented the
"return 1 2>/dev/null || exit 1" pattern with a four-line comment.

danielmiessler#7 Test gap closed: new rows in PAI-Install/engine/paths.test.ts cover
cliClaude + PAI_DIR=whitespace and cliClaude + PAI_DIR=empty. (Was
implicit before; now explicit.) 41 tests total (was 38).

danielmiessler#6 Untracked dirs: added .claude/worktrees/ and .omc/ to superproject
gitignore; added .omc/ to release-tree gitignore.

Architecture references: switched from "L18-34" to
'"## Directory Structure"' (section name, stable across edits) in
hooks/lib/paths.ts, PAI/lib/paths.ts, PAI/lib/paths.sh, PAI/lib/paths.bats,
hooks/lib/paths.test.ts, PAI/PAI-Install/engine/paths.ts,
PAI/PAI-Install/engine/paths.test.ts, all 3 task YAMLs and the suite
YAML. Old eval Results/ JSONs left as historical run artifacts.

Verification: 41/41 TS GREEN (17 installer + 24 path-lib including
new drift guard); 12/12 bats GREEN; shell helper smoke clean.

Not addressed in this commit (per review):
- #1 rebase onto origin/main (your call to push)
- #2 settings.json/CLAUDE.md local overrides (left uncommitted)
neilinger added a commit to neilinger/Personal_AI_Infrastructure that referenced this pull request May 3, 2026
Addresses code-review findings post-installer-refactor:

danielmiessler#3 Mirror-lib drift guard: hooks/lib/paths.test.ts adds a unit test
that diffs hooks/lib/paths.ts against PAI/lib/paths.ts (post-docblock).
The two are deliberate mirrors per C1; this test fails the suite if
they drift. No CI plumbing needed — runs in the regular bun test pass.

danielmiessler#4 engine/paths.ts:53 clean() consistency: replaced direct
process.env.PAI_DIR.trim() check with a clean() helper invocation
matching the rest of the function. Same semantics, explicit intent,
no future drift if clean() ever changes.

danielmiessler#5 paths.sh exit-vs-return: documented the
"return 1 2>/dev/null || exit 1" pattern with a four-line comment.

danielmiessler#7 Test gap closed: new rows in PAI-Install/engine/paths.test.ts cover
cliClaude + PAI_DIR=whitespace and cliClaude + PAI_DIR=empty. (Was
implicit before; now explicit.) 41 tests total (was 38).

danielmiessler#6 Untracked dirs: added .claude/worktrees/ and .omc/ to superproject
gitignore; added .omc/ to release-tree gitignore.

Architecture references: switched from "L18-34" to
'"## Directory Structure"' (section name, stable across edits) in
hooks/lib/paths.ts, PAI/lib/paths.ts, PAI/lib/paths.sh, PAI/lib/paths.bats,
hooks/lib/paths.test.ts, PAI/PAI-Install/engine/paths.ts,
PAI/PAI-Install/engine/paths.test.ts, all 3 task YAMLs and the suite
YAML. Old eval Results/ JSONs left as historical run artifacts.

Verification: 41/41 TS GREEN (17 installer + 24 path-lib including
new drift guard); 12/12 bats GREEN; shell helper smoke clean.

Not addressed in this commit (per review):
- #1 rebase onto origin/main (your call to push)
- #2 settings.json/CLAUDE.md local overrides (left uncommitted)
neilinger added a commit to neilinger/Personal_AI_Infrastructure that referenced this pull request May 3, 2026
Addresses code-review findings post-installer-refactor:

danielmiessler#3 Mirror-lib drift guard: hooks/lib/paths.test.ts adds a unit test
that diffs hooks/lib/paths.ts against PAI/lib/paths.ts (post-docblock).
The two are deliberate mirrors per C1; this test fails the suite if
they drift. No CI plumbing needed — runs in the regular bun test pass.

danielmiessler#4 engine/paths.ts:53 clean() consistency: replaced direct
process.env.PAI_DIR.trim() check with a clean() helper invocation
matching the rest of the function. Same semantics, explicit intent,
no future drift if clean() ever changes.

danielmiessler#5 paths.sh exit-vs-return: documented the
"return 1 2>/dev/null || exit 1" pattern with a four-line comment.

danielmiessler#7 Test gap closed: new rows in PAI-Install/engine/paths.test.ts cover
cliClaude + PAI_DIR=whitespace and cliClaude + PAI_DIR=empty. (Was
implicit before; now explicit.) 41 tests total (was 38).

danielmiessler#6 Untracked dirs: added .claude/worktrees/ and .omc/ to superproject
gitignore; added .omc/ to release-tree gitignore.

Architecture references: switched from "L18-34" to
'"## Directory Structure"' (section name, stable across edits) in
hooks/lib/paths.ts, PAI/lib/paths.ts, PAI/lib/paths.sh, PAI/lib/paths.bats,
hooks/lib/paths.test.ts, PAI/PAI-Install/engine/paths.ts,
PAI/PAI-Install/engine/paths.test.ts, all 3 task YAMLs and the suite
YAML. Old eval Results/ JSONs left as historical run artifacts.

Verification: 41/41 TS GREEN (17 installer + 24 path-lib including
new drift guard); 12/12 bats GREEN; shell helper smoke clean.

Not addressed in this commit (per review):
- #1 rebase onto origin/main (your call to push)
- #2 settings.json/CLAUDE.md local overrides (left uncommitted)
konanzin pushed a commit to konanzin/Personal_AI_Infrastructure that referenced this pull request May 20, 2026
Status: ON HOLD — 2026-05-20

Razão: Controvérsias identificadas sobre a ferramenta RTK (Rust Token
Killer) usada no PAI original para compressão de contexto. Decisão do
principal: aguardar até que as questões sejam esclarecidas.

Implementação original no PAI nativo:
- Hook ContextReduction.hook.sh no evento PreToolUse
- Reescreve comandos bash: git status → rtk git status
- RTK é binário Rust externo que comprime output em 60-90%

Por que não implementar agora:
- Questões éticas/técnicas sobre interceptação e modificação de comandos
- Potencial perda de informação na compressão
- Dependência de ferramenta externa não auditada
- OpenCode já possui compactação nativa de contexto

Workaround: O OpenCode gerencia context window automaticamente

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