You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-27Lines changed: 22 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,10 @@
2
2
3
3
A native OpenCode plugin that implements the **Personal AI Infrastructure (PAI)** logic, replacing legacy hook scripts with a cohesive, lifecycle-aware system.
4
4
5
+
## Credits & Inspiration
6
+
7
+
This project is an OpenCode-compatible clone of the hook system from **Dan Miessler's**[Personal AI Infrastructure (PAI)](https://github.com/danielmiessler/Personal_AI_Infrastructure) project. A massive shout out to Dan for the architectural vision and the original PAI patterns that this plugin brings to the OpenCode ecosystem.
8
+
5
9
## Features
6
10
7
11
### 1. Identity & Context Injection
@@ -33,44 +37,35 @@ The plugin centers around the `PAI_DIR` environment variable.
33
37
|`ENGINEER_NAME`| Your name/identity |`Engineer`|
34
38
|`DA_COLOR`| UI color theme for your DA |`blue`|
35
39
36
-
## Installation
37
-
38
-
The easiest way to install the plugin and initialize your PAI infrastructure is using the setup script:
Add the plugin to your global `opencode.json` configuration file (typically located at `~/.config/opencode/opencode.json`). OpenCode will automatically install the plugin from GitHub on its next startup.
45
43
46
-
```bash
47
-
./setup.sh
44
+
```json
45
+
{
46
+
"plugins": [
47
+
"github:fpr1m3/opencode-pai-plugin"
48
+
]
49
+
}
48
50
```
49
51
50
-
## Manual Installation
51
-
52
-
```bash
53
-
bun add github:fpr1m3/opencode-pai-plugin
54
-
```
52
+
Upon first run, the plugin will automatically:
53
+
1. Detect or create your `PAI_DIR` (default: `$XDG_CONFIG_HOME/opencode`).
54
+
2. Initialize the required directory structure for skills and history.
55
+
3. Create a default `SKILL.md` core identity if one does not exist.
55
56
56
57
## Development & Testing
57
58
58
-
We provide scripts to verify the installation flow in a pristine environment:
59
+
We provide scripts to verify the plugin in a pristine environment:
59
60
60
61
*`./scripts/create-test-env.sh`: Creates a fresh, isolated OpenCode project for testing.
61
-
*`./scripts/test-full-flow.sh`: Runs a complete E2E installation and verification.
62
-
63
-
64
-
## Usage
62
+
*`./scripts/test-full-flow.sh`: Runs a complete E2E verification of the plugin lifecycle.
65
63
66
-
Register the plugin in your `.opencode/plugins.ts` (or equivalent):
-[ ]**Voice Server Integration**: Implementation of the PAI voice notification server to provide audible feedback on task completion.
67
+
-[ ]**Enhanced Agent Mapping**: More granular tracking of subagent state transitions.
73
68
74
69
---
75
70
76
-
**Note**: This plugin is designed to work with the PAI ecosystem and requires a valid `PAI_DIR`structure to function fully.
71
+
**Note**: This plugin is designed to work with the PAI ecosystem. While it auto-initializes a basic structure, you can customize your identity by editing `$PAI_DIR/skills/core/SKILL.md`.
0 commit comments