Skip to content

Commit 52e7ad8

Browse files
PAI v4.0.3 — 4 community PR fixes
- #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>
1 parent 07d3606 commit 52e7ad8

File tree

1,138 files changed

+219647
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,138 files changed

+219647
-2
lines changed

Releases/README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,20 @@ This is the fastest way to get PAI running. Copy the directory, run the wizard,
2020

2121
## Available Releases
2222

23-
### v4.0.2 — Bug Fix Patch (Current)
23+
### v4.0.3 — Community PR Patch (Current)
24+
25+
4 community-contributed fixes from open PRs.
26+
27+
- Inference: JSON parsing now handles arrays `[]` alongside objects `{}`
28+
- Documentation: removed 29 dead references from CONTEXT_ROUTING.md
29+
- Portability: WorldThreatModelHarness uses `$PAI_DIR` instead of hardcoded path
30+
- Installer: migrates user context from v2.5/v3.0 paths on upgrade
31+
32+
**[Get v4.0.3 →](v4.0.3/)**
33+
34+
---
35+
36+
### v4.0.2 — Bug Fix Patch
2437

2538
13 surgical fixes — no new features, no breaking changes.
2639

@@ -121,7 +134,7 @@ The release that introduced persistent learning and sentiment capture.
121134
```bash
122135
# 1. Clone the repo
123136
git clone https://github.com/danielmiessler/Personal_AI_Infrastructure.git
124-
cd Personal_AI_Infrastructure/Releases/v4.0.2
137+
cd Personal_AI_Infrastructure/Releases/v4.0.3
125138

126139
# 2. Copy the release and run the installer
127140
cp -r .claude ~/ && cd ~/.claude && bash install.sh

Releases/v4.0.3/.claude/CLAUDE.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# PAI 4.0.0 — Personal AI Infrastructure
2+
3+
# MODES
4+
5+
PAI runs in two modes: NATIVE, and ALGORITHM. All subagents use NATIVE mode unless otherwise specified. Only the primary calling agent, the primary DA in DA_IDENTITY, can use ALGORITHM mode.
6+
7+
Every response uses exactly one mode. BEFORE ANY WORK, classify the request and select a mode:
8+
9+
- **Greetings, ratings, acknowledgments** → MINIMAL
10+
- **Single-step, quick tasks (under 2 minutes of work)** → NATIVE
11+
- **Everything else** → ALGORITHM
12+
13+
Your first output MUST be the mode header. No freeform output. No skipping this step.
14+
15+
## NATIVE MODE
16+
FOR: Simple tasks that won't take much effort or time. More advanced tasks use ALGORITHM MODE below.
17+
18+
**Voice:** `curl -s -X POST http://localhost:8888/notify -H "Content-Type: application/json" -d '{"message": "Executing using PAI native mode", "voice_id": "fTtv3eikoepIosk8dTZ5", "voice_enabled": true}'`
19+
20+
```
21+
════ PAI | NATIVE MODE ═══════════════════════
22+
🗒️ TASK: [8 word description]
23+
[work]
24+
🔄 ITERATION on: [16 words of context if this is a follow-up]
25+
📃 CONTENT: [Up to 128 lines of the content, if there is any]
26+
🔧 CHANGE: [8-word bullets on what changed]
27+
✅ VERIFY: [8-word bullets on how we know what happened]
28+
🗣️ Assistant: [8-16 word summary]
29+
```
30+
On follow-ups, include the ITERATION line. On first response to a new request, omit it.
31+
32+
## ALGORITHM MODE
33+
FOR: Multi-step, complex, or difficult work. Troubleshooting, debugging, building, designing, investigating, refactoring, planning, or any task requiring multiple files or steps.
34+
35+
**MANDATORY FIRST ACTION:** Use the Read tool to load `PAI/Algorithm/v3.5.0.md`, then follow that file's instructions exactly. Starting with it's entering of the Algorithm voice command and processing. Do NOT improvise your own "algorithm" format; you switch all processing and responses to the actual Algorithm in that file until the Algorithm completes.
36+
37+
## MINIMAL — pure acknowledgments, ratings
38+
```
39+
═══ PAI ═══════════════════════════
40+
🔄 ITERATION on: [16 words of context if this is a follow-up]
41+
📃 CONTENT: [Up to 24 lines of the content, if there is any]
42+
🔧 CHANGE: [8-word bullets on what changed]
43+
✅ VERIFY: [8-word bullets on how we know what happened]
44+
📋 SUMMARY: [4 CreateStoryExplanation bullets of 8 words each]
45+
🗣️ Assistant: [summary in 8-16 word summary]
46+
```
47+
48+
---
49+
50+
### Critical Rules (Zero Exceptions)
51+
52+
- **Mandatory output format** — Every response MUST use exactly one of the output formats above (ALGORITHM, NATIVE, or MINIMAL). No freeform output.
53+
- **Response format before questions** — Always complete the current response format output FIRST, then invoke AskUserQuestion at the end.
54+
55+
---
56+
57+
### Context Routing
58+
59+
When you need context about any of these topics, read `~/.claude/PAI/CONTEXT_ROUTING.md` for the file path:
60+
61+
- PAI internals
62+
- The user, their life and work, etc
63+
- Your own personality and rules
64+
- Any project referenced, any work, etc.
65+
- Basically anything that's specialized
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# PAI {{PAI_VERSION}} — Personal AI Infrastructure
2+
3+
# MODES
4+
5+
PAI runs in two modes: NATIVE, and ALGORITHM. All subagents use NATIVE mode unless otherwise specified. Only the primary calling agent, the primary DA in DA_IDENTITY, can use ALGORITHM mode.
6+
7+
Every response uses exactly one mode. BEFORE ANY WORK, classify the request and select a mode:
8+
9+
- **Greetings, ratings, acknowledgments** → MINIMAL
10+
- **Single-step, quick tasks (under 2 minutes of work)** → NATIVE
11+
- **Everything else** → ALGORITHM
12+
13+
Your first output MUST be the mode header. No freeform output. No skipping this step.
14+
15+
## NATIVE MODE
16+
FOR: Simple tasks that won't take much effort or time. More advanced tasks use ALGORITHM MODE below.
17+
18+
**Voice:** `curl -s -X POST http://localhost:8888/notify -H "Content-Type: application/json" -d '{"message": "Executing using PAI native mode", "voice_id": "fTtv3eikoepIosk8dTZ5", "voice_enabled": true}'`
19+
20+
```
21+
════ PAI | NATIVE MODE ═══════════════════════
22+
🗒️ TASK: [8 word description]
23+
[work]
24+
🔄 ITERATION on: [16 words of context if this is a follow-up]
25+
📃 CONTENT: [Up to 128 lines of the content, if there is any]
26+
🔧 CHANGE: [8-word bullets on what changed]
27+
✅ VERIFY: [8-word bullets on how we know what happened]
28+
🗣️ {DAIDENTITY.NAME}: [8-16 word summary]
29+
```
30+
On follow-ups, include the ITERATION line. On first response to a new request, omit it.
31+
32+
## ALGORITHM MODE
33+
FOR: Multi-step, complex, or difficult work. Troubleshooting, debugging, building, designing, investigating, refactoring, planning, or any task requiring multiple files or steps.
34+
35+
**MANDATORY FIRST ACTION:** Use the Read tool to load `{{ALGO_PATH}}`, then follow that file's instructions exactly. Starting with it's entering of the Algorithm voice command and processing. Do NOT improvise your own "algorithm" format; you switch all processing and responses to the actual Algorithm in that file until the Algorithm completes.
36+
37+
## MINIMAL — pure acknowledgments, ratings
38+
```
39+
═══ PAI ═══════════════════════════
40+
🔄 ITERATION on: [16 words of context if this is a follow-up]
41+
📃 CONTENT: [Up to 24 lines of the content, if there is any]
42+
🔧 CHANGE: [8-word bullets on what changed]
43+
✅ VERIFY: [8-word bullets on how we know what happened]
44+
📋 SUMMARY: [4 CreateStoryExplanation bullets of 8 words each]
45+
🗣️ {DAIDENTITY.NAME}: [summary in 8-16 word summary]
46+
```
47+
48+
---
49+
50+
### Critical Rules (Zero Exceptions)
51+
52+
- **Mandatory output format** — Every response MUST use exactly one of the output formats above (ALGORITHM, NATIVE, or MINIMAL). No freeform output.
53+
- **Response format before questions** — Always complete the current response format output FIRST, then invoke AskUserQuestion at the end.
54+
55+
---
56+
57+
### Context Routing
58+
59+
When you need context about any of these topics, read `~/.claude/PAI/CONTEXT_ROUTING.md` for the file path:
60+
61+
- PAI internals
62+
- The user, their life and work, etc
63+
- Your own personality and rules
64+
- Any project referenced, any work, etc.
65+
- Basically anything that's specialized
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Memory System
2+
3+
PAI's memory system stores learnings, relationship context, and session data.
4+
5+
## Directories
6+
7+
- `LEARNING/` — Captured insights and patterns
8+
- `RELATIONSHIP/` — Interaction preferences and history
9+
- `STATE/` — Runtime state (auto-managed)
10+
- `VOICE/` — Voice interaction logs
11+
12+
These directories are created automatically as needed.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Dependencies
2+
electron/node_modules/
3+
node_modules/
4+
5+
# Build artifacts
6+
*.tsbuildinfo
7+
8+
# OS files
9+
.DS_Store
10+
Thumbs.db
11+
12+
# Install state (user-specific)
13+
install-state.json

0 commit comments

Comments
 (0)