@pi-unipi/unipi 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/README.md +143 -0
  2. package/package.json +70 -0
  3. package/packages/btw/README.md +95 -0
  4. package/packages/btw/extensions/btw.ts +1972 -0
  5. package/packages/btw/skills/btw/SKILL.md +149 -0
  6. package/packages/core/README.md +74 -0
  7. package/packages/core/index.ts +10 -0
  8. package/packages/info-screen/README.md +115 -0
  9. package/packages/info-screen/index.ts +165 -0
  10. package/packages/memory/README.md +94 -0
  11. package/packages/memory/index.ts +209 -0
  12. package/packages/memory/skills/memory/SKILL.md +151 -0
  13. package/packages/ralph/README.md +101 -0
  14. package/packages/ralph/index.ts +548 -0
  15. package/packages/subagents/README.md +114 -0
  16. package/packages/unipi/index.ts +28 -0
  17. package/packages/workflow/README.md +129 -0
  18. package/packages/workflow/index.ts +155 -0
  19. package/packages/workflow/skills/brainstorm/SKILL.md +202 -0
  20. package/packages/workflow/skills/consolidate/SKILL.md +142 -0
  21. package/packages/workflow/skills/consultant/SKILL.md +97 -0
  22. package/packages/workflow/skills/document/SKILL.md +120 -0
  23. package/packages/workflow/skills/gather-context/SKILL.md +122 -0
  24. package/packages/workflow/skills/plan/SKILL.md +169 -0
  25. package/packages/workflow/skills/quick-work/SKILL.md +110 -0
  26. package/packages/workflow/skills/review-work/SKILL.md +131 -0
  27. package/packages/workflow/skills/scan-issues/SKILL.md +183 -0
  28. package/packages/workflow/skills/work/SKILL.md +144 -0
  29. package/packages/workflow/skills/worktree-create/SKILL.md +69 -0
  30. package/packages/workflow/skills/worktree-list/SKILL.md +67 -0
  31. package/packages/workflow/skills/worktree-merge/SKILL.md +79 -0
package/README.md ADDED
@@ -0,0 +1,143 @@
1
+ # Unipi
2
+
3
+ All-in-one extension suite for the [Pi coding agent](https://github.com/badlogic/pi-mono).
4
+
5
+ ## Install
6
+
7
+ **All-in-one:**
8
+ ```bash
9
+ pi install npm:unipi
10
+ ```
11
+
12
+ **Individual packages:**
13
+ ```bash
14
+ pi install npm:@pi-unipi/core
15
+ pi install npm:@pi-unipi/workflow
16
+ pi install npm:@pi-unipi/ralph
17
+ pi install npm:@pi-unipi/memory
18
+ pi install npm:@pi-unipi/info-screen
19
+ pi install npm:@pi-unipi/subagents
20
+ pi install npm:@pi-unipi/btw
21
+ ```
22
+
23
+ ## Packages
24
+
25
+ | Package | Description |
26
+ |---------|-------------|
27
+ | `@pi-unipi/core` | Shared utilities, event types, constants |
28
+ | `@pi-unipi/workflow` | 13 structured development workflow commands |
29
+ | `@pi-unipi/ralph` | Long-running iterative development loops |
30
+ | `@pi-unipi/memory` | Persistent cross-session memory with vector search |
31
+ | `@pi-unipi/info-screen` | Dashboard and module registry overlay |
32
+ | `@pi-unipi/subagents` | Parallel sub-agent execution with file locking |
33
+ | `@pi-unipi/btw` | Parallel side conversations with `/btw` |
34
+
35
+ ## Commands
36
+
37
+ ### Workflow (`/unipi:*`)
38
+
39
+ | Command | Description |
40
+ |---------|-------------|
41
+ | `/unipi:brainstorm` | Collaborative discovery |
42
+ | `/unipi:plan` | Strategic planning |
43
+ | `/unipi:work` | Execute plan in worktree |
44
+ | `/unipi:review-work` | Review what was built |
45
+ | `/unipi:consolidate` | Merge findings, update docs |
46
+ | `/unipi:worktree-create` | Create git worktree |
47
+ | `/unipi:worktree-list` | List all worktrees |
48
+ | `/unipi:worktree-merge` | Merge worktree back |
49
+ | `/unipi:consultant` | Expert panel review |
50
+ | `/unipi:quick-work` | Fast single-task execution |
51
+ | `/unipi:gather-context` | Research codebase |
52
+ | `/unipi:document` | Generate documentation |
53
+ | `/unipi:scan-issues` | Find bugs, anti-patterns |
54
+
55
+ ### Ralph (`/unipi:ralph`)
56
+
57
+ | Command | Description |
58
+ |---------|-------------|
59
+ | `/unipi:ralph start <name>` | Start a loop |
60
+ | `/unipi:ralph stop` | Pause current loop |
61
+ | `/unipi:ralph resume <name>` | Resume a paused loop |
62
+ | `/unipi:ralph status` | Show all loops |
63
+ | `/unipi:ralph cancel <name>` | Delete loop state |
64
+ | `/unipi:ralph archive <name>` | Archive completed loop |
65
+ | `/unipi:ralph clean` | Clean completed loops |
66
+ | `/unipi:ralph nuke` | Delete all ralph data |
67
+
68
+ ### Memory (`/unipi:*-memory-*`)
69
+
70
+ | Command | Description |
71
+ |---------|-------------|
72
+ | `/unipi:memory-process <text>` | Store extracted memories |
73
+ | `/unipi:memory-search <term>` | Search project memories |
74
+ | `/unipi:memory-consolidate` | Consolidate session into memory |
75
+ | `/unipi:memory-forget <title>` | Delete a memory |
76
+ | `/unipi:global-memory-search <term>` | Search global memories |
77
+ | `/unipi:global-memory-list` | List all global memories |
78
+
79
+ ### BTW (`/btw*`)
80
+
81
+ | Command | Description |
82
+ |---------|-------------|
83
+ | `/btw [--save] <question>` | Side conversation (contextual) |
84
+ | `/btw:tangent [--save] <q>` | Contextless tangent thread |
85
+ | `/btw:new [question]` | Fresh thread with main-session context |
86
+ | `/btw:clear` | Dismiss and clear thread |
87
+ | `/btw:inject [instructions]` | Send full thread to main agent |
88
+ | `/btw:summarize [instr]` | Summarize and inject into main agent |
89
+
90
+ ### Info Screen (`/unipi:info*`)
91
+
92
+ | Command | Description |
93
+ |---------|-------------|
94
+ | `/unipi:info` | Show info dashboard |
95
+ | `/unipi:info-settings` | Configure info display |
96
+
97
+ ### Tools
98
+
99
+ | Tool | Package | Description |
100
+ |------|---------|-------------|
101
+ | `ralph_start` | ralph | Start a ralph loop |
102
+ | `ralph_done` | ralph | Signal iteration complete |
103
+ | `spawn_helper` | subagents | Spawn parallel sub-agent |
104
+ | `get_helper_result` | subagents | Retrieve background agent result |
105
+ | `memory_store` | memory | Store/update memory |
106
+ | `memory_search` | memory | Search project memories |
107
+ | `memory_delete` | memory | Delete memory by ID |
108
+ | `memory_list` | memory | List project memories |
109
+ | `global_memory_search` | memory | Search global memories |
110
+ | `global_memory_list` | memory | List global memories |
111
+
112
+ ## How It Works
113
+
114
+ **Core** provides shared infrastructure — event types, constants, utilities — so modules discover each other without tight coupling.
115
+
116
+ **Workflow** provides 13 commands guiding work from idea to completion via brainstorm → plan → work → review → consolidate.
117
+
118
+ **Ralph** enables long-running iterative tasks. Start a loop, the agent works through iterations, reflects periodically, and completes when done.
119
+
120
+ **Memory** provides persistent cross-session memory with SQLite + vector search. Project-scoped and global memories with hybrid search.
121
+
122
+ **Info Screen** is a dashboard overlay showing module status, registered tools, and custom groups from all modules.
123
+
124
+ **BTW** adds a parallel side-conversation channel. Ask questions while the main agent keeps working, then inject or summarize the thread back.
125
+
126
+ **Subagents** enables parallel execution with file locking, activity tracking, and custom agent types.
127
+
128
+ ## Module Discovery
129
+
130
+ Modules announce presence via `pi.events`. When `@pi-unipi/workflow` detects `@pi-unipi/ralph`, it enables loop integration. Each module works standalone.
131
+
132
+ ## Development
133
+
134
+ ```bash
135
+ git clone https://github.com/Neuron-Mr-White/unipi.git
136
+ cd unipi
137
+ npm install
138
+ npm run typecheck
139
+ ```
140
+
141
+ ## License
142
+
143
+ MIT
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "@pi-unipi/unipi",
3
+ "version": "0.1.1",
4
+ "description": "All-in-one extension suite for Pi coding agent",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "Neuron Mr White",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/Neuron-Mr-White/unipi.git"
11
+ },
12
+ "homepage": "https://github.com/Neuron-Mr-White/unipi#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/Neuron-Mr-White/unipi/issues"
15
+ },
16
+ "keywords": [
17
+ "pi-package",
18
+ "pi-extension",
19
+ "pi-coding-agent",
20
+ "unipi"
21
+ ],
22
+ "workspaces": [
23
+ "packages/*"
24
+ ],
25
+ "scripts": {
26
+ "typecheck": "npx tsc --noEmit --skipLibCheck",
27
+ "publish:all": "npm publish --workspaces --access public"
28
+ },
29
+ "files": [
30
+ "packages/*/index.ts",
31
+ "packages/*/extensions/**/*.ts",
32
+ "packages/*/skills/**/*",
33
+ "packages/*/README.md"
34
+ ],
35
+ "pi": {
36
+ "extensions": [
37
+ "node_modules/@pi-unipi/workflow/index.ts",
38
+ "node_modules/@pi-unipi/ralph/index.ts",
39
+ "node_modules/@pi-unipi/memory/index.ts",
40
+ "node_modules/@pi-unipi/info-screen/index.ts",
41
+ "node_modules/@pi-unipi/subagents/src/index.ts",
42
+ "node_modules/@pi-unipi/btw/extensions/btw.ts"
43
+ ],
44
+ "skills": [
45
+ "node_modules/@pi-unipi/workflow/skills",
46
+ "node_modules/@pi-unipi/ralph/SKILL.md",
47
+ "node_modules/@pi-unipi/memory/skills",
48
+ "node_modules/@pi-unipi/btw/skills"
49
+ ]
50
+ },
51
+ "peerDependencies": {
52
+ "@mariozechner/pi-ai": "*",
53
+ "@mariozechner/pi-coding-agent": "*",
54
+ "@mariozechner/pi-tui": "*",
55
+ "@sinclair/typebox": "*"
56
+ },
57
+ "dependencies": {
58
+ "@pi-unipi/core": "*",
59
+ "@pi-unipi/workflow": "*",
60
+ "@pi-unipi/ralph": "*",
61
+ "@pi-unipi/memory": "*",
62
+ "@pi-unipi/info-screen": "*",
63
+ "@pi-unipi/subagents": "*",
64
+ "@pi-unipi/btw": "*"
65
+ },
66
+ "devDependencies": {
67
+ "@types/node": "^25.6.0",
68
+ "typescript": "^6.0.0"
69
+ }
70
+ }
@@ -0,0 +1,95 @@
1
+ # @pi-unipi/btw
2
+
3
+ A [pi](https://github.com/badlogic/pi-mono) extension for parallel side conversations with `/btw` — part of the [Unipi](https://github.com/Neuron-Mr-White/unipi) suite.
4
+
5
+ `/btw` opens a real pi sub-session with coding-tool access, running immediately even while the main agent is still busy.
6
+
7
+ Based on [pi-btw](https://github.com/Neuron-Mr-White/pi-btw) by Dan Bachelder.
8
+
9
+ ## Install
10
+
11
+ As part of the full Unipi suite:
12
+
13
+ ```bash
14
+ pi install npm:unipi
15
+ ```
16
+
17
+ Standalone:
18
+
19
+ ```bash
20
+ pi install npm:@pi-unipi/btw
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ ```text
26
+ /btw what file defines this route?
27
+ /btw how would you refactor this parser?
28
+ /btw --save summarize the last error in one sentence
29
+ /btw:new let's start a fresh thread about auth
30
+ /btw:tangent brainstorm from first principles without using the current chat context
31
+ /btw:inject implement the plan we just discussed
32
+ /btw:summarize turn that side thread into a short handoff
33
+ /btw:clear
34
+ ```
35
+
36
+ ## Commands
37
+
38
+ ### /btw [--save] <question>
39
+
40
+ - runs right away, works while pi is busy
41
+ - creates or reuses a real BTW sub-session
42
+ - continues the current BTW thread
43
+ - opens a focused BTW modal shell
44
+ - streams into the BTW modal transcript/status surface
45
+ - persists the BTW exchange as hidden thread state
46
+ - with `--save`, also saves that single exchange as a visible session note
47
+
48
+ ### /btw:new [question]
49
+
50
+ - clears the current BTW thread
51
+ - starts a fresh thread that still inherits the current main-session context
52
+ - optionally asks the first question in the new thread immediately
53
+
54
+ ### /btw:tangent [--save] <question>
55
+
56
+ - starts or continues a contextless tangent thread
57
+ - does not inherit the current main-session conversation
58
+ - with `--save`, also saves that single exchange as a visible session note
59
+
60
+ ### /btw:clear
61
+
62
+ - dismisses the BTW modal/widget
63
+ - clears the current BTW thread
64
+
65
+ ### /btw:inject [instructions]
66
+
67
+ - sends the full BTW thread back to the main agent as a user message
68
+ - if pi is busy, queues it as a follow-up
69
+ - clears the BTW thread after sending
70
+
71
+ ### /btw:summarize [instructions]
72
+
73
+ - summarizes the BTW thread with the current model
74
+ - injects the summary into the main agent
75
+ - clears the BTW thread after sending
76
+
77
+ ## Overlay controls
78
+
79
+ - `Alt+/` toggles focus between BTW and the main editor without closing the overlay
80
+ - `Ctrl+Alt+W` is a fallback focus toggle for terminals that do not deliver `Alt+/` as a usable shortcut
81
+ - `Esc` still dismisses BTW immediately while the overlay is focused
82
+ - `PgUp`/`PgDn` scrolls the transcript
83
+ - BTW opens top-centered so the main session remains visible underneath
84
+
85
+ ## Why
86
+
87
+ Sometimes you want to:
88
+
89
+ - ask a clarifying question while the main agent keeps working
90
+ - think through next steps without derailing the current turn
91
+ - explore an idea, then inject it back once it's ready
92
+
93
+ ## License
94
+
95
+ MIT