Skip to content

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

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

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

Conversation

@jankowtf

Copy link
Copy Markdown

Summary

  • Replace absolute paths starting with /Users/daniel/ with tilde shorthand ~/ in Claude settings
  • Makes configuration more portable across different user environments

Changes

  • Updated hook command paths in .claude/settings.json to use ~/ instead of hardcoded user directory
  • Affects 5 hook commands and the statusline command

🤖 Generated with Claude Code

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

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

Copy link
Copy Markdown
Author

Extended it and new PR

@jankowtf jankowtf closed this Sep 13, 2025
rikitikitavi2012-debug added a commit to rikitikitavi2012-debug/PAI that referenced this pull request Mar 10, 2026
Added comprehensive tests for `SecurityValidator.hook.ts`, `ModeClassifier.hook.ts`, `PreCompact.hook.ts`, and `LoadContext.hook.ts`. Addressed testing edge cases such as malformed JSON parsing, empty input gracefully passing (fail-open), and explicitly verifying <500ms execution times as part of the assertions.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: rikitikitavi2012-debug <240362902+rikitikitavi2012-debug@users.noreply.github.com>
rikitikitavi2012-debug added a commit to rikitikitavi2012-debug/PAI that referenced this pull request Mar 30, 2026
Cross-model finding danielmiessler#6: ModeClassifier/Complexity Gate/ISC Gate conflated.
Added explicit mechanism chain showing 3 independent levels.
Rebuilt CLAUDE.md from updated template.
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)
Alessandro-Improta added a commit to Alessandro-Improta/Personal_AI_Infrastructure that referenced this pull request May 1, 2026
…ator, and tools

danielmiessler#2 — reloadPulse() (actions.ts): removed early-return that checked for
~/Library/LaunchAgents/com.pai.pulse.plist before attempting restart.
On Linux that path never exists, so voice config was never applied after
install. Now branches on process.platform: checks the systemd unit file
(~/.config/systemd/user/pai-pulse.service) on Linux, plist on macOS.

danielmiessler#3 — Post-install validator (validate.ts):
- "Pulse auto-start" check now resolves the correct supervisor path per
  platform (systemd service on Linux, launchd plist on macOS) and names
  the check accordingly ("Pulse systemd service" / "Pulse launchd agent").
- Shell alias check now scans .zshrc, .bashrc, and .profile in order and
  reports which file the alias was found in, so Ubuntu bash users no
  longer see a false CRITICAL failure after a clean install.

danielmiessler#4 — start-pulse.sh: gated the `security unlock-keychain` call behind
`[ "$(uname -s)" = "Darwin" ]`. The `security` binary does not exist on
Linux; the 2>/dev/null suppressed the error but the intent (keychain
unlock) was meaningless on Linux anyway.

danielmiessler#5 — pai.ts: wrapped the osascript wallpaper block in
`process.platform === "darwin"`. Was unguarded; on Linux spawnSync would
log a noisy warning on every wallpaper change regardless of outcome.

danielmiessler#6 — PreviewMarkdown.ts: replaced unconditional `open` (macOS-only) with
a platform-aware `opener` (open on darwin, xdg-open on Linux). Added
.catch(() => {}) so headless Linux environments (no DISPLAY) fail
silently rather than throwing.
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
… recovery

Implementa handler completo para quando sessões terminam com erro:

1. Relatório estruturado salvo em MEMORY/LEARNING/SYSTEM/errors/:
   - Tipo, mensagem, stack trace do erro
   - Contexto da sessão (phase, mode, arquivos modificados)
   - Status de tentativa de recovery

2. Backup de emergência do work-in-progress:
   - Salva current-work.json em STATE/emergency/
   - Permite recuperar trabalho se sessão crashar

3. Contadores de erros:
   - error-summary.json com total e por tipo
   - Acompanhamento semanal de erros
   - Histórico: erros por tipo e semana

4. Atualização do work.json:
   - Marca sessão com hasError: true
   - Registra errorType e errorTimestamp

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

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

1 participant