purple-ai 0.0.3 → 0.0.5
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.
- package/.playwright-mcp/page-2026-01-13T02-10-06-846Z.png +0 -0
- package/bin/darwin-arm64/purple +0 -0
- package/bin/darwin-x64/purple +0 -0
- package/bin/linux-x64/purple +0 -0
- package/bin/purple.js +48 -1
- package/package.json +31 -5
- package/purple-CLIent technical.md +19 -0
- package/purple-CLIent-product-spec.md +513 -0
- package/purple-CLIent-technical-PRD.md +2514 -0
- package/purple-CLIent.md +84 -0
- package/purple_API_definition.md +546 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/purple.js
CHANGED
|
@@ -1,3 +1,50 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const { spawn } = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const os = require('os');
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
|
|
8
|
+
function getPlatformBinary() {
|
|
9
|
+
const platform = os.platform();
|
|
10
|
+
const arch = os.arch();
|
|
11
|
+
|
|
12
|
+
let platformDir;
|
|
13
|
+
if (platform === 'darwin' && arch === 'arm64') {
|
|
14
|
+
platformDir = 'darwin-arm64';
|
|
15
|
+
} else if (platform === 'darwin' && (arch === 'x64' || arch === 'x86_64')) {
|
|
16
|
+
platformDir = 'darwin-x64';
|
|
17
|
+
} else if (platform === 'linux' && (arch === 'x64' || arch === 'x86_64')) {
|
|
18
|
+
platformDir = 'linux-x64';
|
|
19
|
+
} else {
|
|
20
|
+
console.error(`Unsupported platform: ${platform}-${arch}`);
|
|
21
|
+
console.error('Purple currently supports: macOS (arm64, x64), Linux (x64)');
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return path.join(__dirname, platformDir, 'purple');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const binaryPath = getPlatformBinary();
|
|
29
|
+
|
|
30
|
+
// Check if binary exists
|
|
31
|
+
if (!fs.existsSync(binaryPath)) {
|
|
32
|
+
console.error(`Binary not found: ${binaryPath}`);
|
|
33
|
+
console.error('Please reinstall the package: npm install -g purple-ai');
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Spawn the binary with all arguments passed through
|
|
38
|
+
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
39
|
+
stdio: 'inherit',
|
|
40
|
+
env: process.env
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
child.on('error', (err) => {
|
|
44
|
+
console.error('Failed to start Purple:', err.message);
|
|
45
|
+
process.exit(1);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
child.on('close', (code) => {
|
|
49
|
+
process.exit(code || 0);
|
|
50
|
+
});
|
package/package.json
CHANGED
|
@@ -1,13 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "purple-ai",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
5
|
-
"main": "
|
|
3
|
+
"version": "0.0.5",
|
|
4
|
+
"description": "Purple - AI-powered workspace management CLI that wraps Claude Code",
|
|
5
|
+
"main": "bin/purple.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"purple-ai": "./bin/purple.js"
|
|
7
|
+
"purple-ai": "./bin/purple.js",
|
|
8
|
+
"purple": "./bin/purple.js"
|
|
8
9
|
},
|
|
9
10
|
"scripts": {
|
|
10
11
|
"test": "echo \"No tests yet\""
|
|
11
12
|
},
|
|
12
|
-
"
|
|
13
|
+
"keywords": [
|
|
14
|
+
"claude",
|
|
15
|
+
"ai",
|
|
16
|
+
"cli",
|
|
17
|
+
"workspace",
|
|
18
|
+
"agent",
|
|
19
|
+
"anthropic"
|
|
20
|
+
],
|
|
21
|
+
"author": "Purple AI",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://github.com/bepurple/purple-ai"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://bepurple.ai",
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=16.0.0"
|
|
30
|
+
},
|
|
31
|
+
"os": [
|
|
32
|
+
"darwin",
|
|
33
|
+
"linux"
|
|
34
|
+
],
|
|
35
|
+
"cpu": [
|
|
36
|
+
"x64",
|
|
37
|
+
"arm64"
|
|
38
|
+
]
|
|
13
39
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
## Purple CLIent
|
|
3
|
+
|
|
4
|
+
This is a CLI tool, that works together with backend and needs a very nice UI and also can handle multiple terminals and switching of outputs, with pty or similar to be able to switch into claude code and then use thigns over that, like spawning command palletes, or a bottom bar.
|
|
5
|
+
|
|
6
|
+
Initial implemetntaiton v0 example, the current directory has an exmaple of the pallete and the bottom bar and the behavior between shwitchng over to claude code and back.
|
|
7
|
+
|
|
8
|
+
New tools that we want to use:
|
|
9
|
+
|
|
10
|
+
### For UI:
|
|
11
|
+
- TO make the temrinal UI entirely: https://github.com/charmbracelet/bubbletea
|
|
12
|
+
- FOr building itneractive forms and prompts: https://github.com/charmbracelet/huh
|
|
13
|
+
Bubbletea + Huh?
|
|
14
|
+
Huh is built on Bubble Tea and, in addition to its standalone mode, huh? has first-class support and can be easily integrated into Bubble Tea applications. It’s very useful in portions of your Bubble Tea application that need form-like input, and for times when you need more flexibility than huh? alone can offer.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### For the rest
|
|
18
|
+
|
|
19
|
+
|
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
# Purple CLIent - Product Specification
|
|
2
|
+
|
|
3
|
+
Version: 1.2
|
|
4
|
+
Last Updated: 2026-01-12
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Purple CLIent is a terminal-based workspace manager that brings structure and elegance to AI-assisted development. It wraps Claude Code with workspace management, team collaboration, and a streamlined spec-to-implementation workflow.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Why Purple?
|
|
15
|
+
|
|
16
|
+
Claude Code is powerful but lacks:
|
|
17
|
+
|
|
18
|
+
- **Organization** - No concept of workspaces, teams, or persistent project structure
|
|
19
|
+
- **Workflow** - The spec → architect → implement pipeline is powerful but manual to set up
|
|
20
|
+
- **Onboarding** - Getting a codebase "AI-ready" with standards is tedious
|
|
21
|
+
|
|
22
|
+
Purple solves all three by providing a polished interface that manages workspaces, installs plugins, and guides users through feature development from spec to shipped code.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Who is Purple for?
|
|
27
|
+
|
|
28
|
+
| User | Entry Point | Primary Goal |
|
|
29
|
+
|------|-------------|--------------|
|
|
30
|
+
| **Solo developer** | Creates workspace for personal project | Structured AI workflow without manual setup |
|
|
31
|
+
| **Tech lead** | Creates workspace, team members auto-join | Standardize how team uses AI for development |
|
|
32
|
+
| **Team developer** | Joins existing workspace | Focus on building features, not configuration |
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Core Concepts
|
|
37
|
+
|
|
38
|
+
### Workspace
|
|
39
|
+
|
|
40
|
+
A workspace is a folder containing:
|
|
41
|
+
- One or more cloned repositories
|
|
42
|
+
- Installed plugins (which contain agents and commands)
|
|
43
|
+
- Synced standards for the codebase
|
|
44
|
+
- Feature sessions and documentation
|
|
45
|
+
|
|
46
|
+
Workspaces belong to a team and are stored in the backend. The local `purple.json` only stores the `workspace_id` - all other data is fetched from the API.
|
|
47
|
+
|
|
48
|
+
A user can have unlimited workspaces on their machine.
|
|
49
|
+
|
|
50
|
+
### Plugin
|
|
51
|
+
|
|
52
|
+
A plugin is a package that contains agents and/or commands. Plugins are company-managed and installed per workspace.
|
|
53
|
+
|
|
54
|
+
**Purple Core** (required) contains:
|
|
55
|
+
- product-spec-writer agent
|
|
56
|
+
- engineering-architect agent
|
|
57
|
+
- senior-engineer agent
|
|
58
|
+
- incremental-change-engineer agent
|
|
59
|
+
- build-from-spec command
|
|
60
|
+
- create-standards command
|
|
61
|
+
|
|
62
|
+
**Extra plugins** (optional):
|
|
63
|
+
- QA Engineer plugin
|
|
64
|
+
- Documentation Writer plugin
|
|
65
|
+
- etc.
|
|
66
|
+
|
|
67
|
+
Plugins can be distributed as:
|
|
68
|
+
- **Tarball** - Downloaded and extracted to `.claude/`
|
|
69
|
+
- **Repo** - Cloned from a git repository
|
|
70
|
+
|
|
71
|
+
### Session
|
|
72
|
+
|
|
73
|
+
A session represents one feature being built. Sessions are **purely local** - they never sync to the backend.
|
|
74
|
+
|
|
75
|
+
Each session provides:
|
|
76
|
+
- **Context preservation** - Claude conversation history persists, resume anytime
|
|
77
|
+
- **Progress tracking** - See which features are in-progress, completed, or archived
|
|
78
|
+
- **Auto-documentation** - Spec, architecture, and tickets all live in one folder
|
|
79
|
+
|
|
80
|
+
Sessions live in `workbench/documentation/{feature-name}/`. When complete, users can archive sessions to reduce clutter while keeping history.
|
|
81
|
+
|
|
82
|
+
### Team
|
|
83
|
+
|
|
84
|
+
Teams are auto-created when a user registers. Users with the same email domain (e.g., `@company.com`) automatically join the same team.
|
|
85
|
+
|
|
86
|
+
Teams share:
|
|
87
|
+
- Workspaces (listed via API)
|
|
88
|
+
- Standards (synced from backend to local)
|
|
89
|
+
- Plugin configurations
|
|
90
|
+
|
|
91
|
+
Each team member clones repos locally and has their own sessions. No roles exposed in v1 - all team members have equal access.
|
|
92
|
+
|
|
93
|
+
### Standards
|
|
94
|
+
|
|
95
|
+
Standards are markdown documents that describe coding conventions, architecture, and patterns for a codebase. They help Claude understand how to write code that fits the project.
|
|
96
|
+
|
|
97
|
+
Standards are:
|
|
98
|
+
- Generated locally by Claude via `/create-standards`
|
|
99
|
+
- Uploaded to the backend for team sharing
|
|
100
|
+
- Synced to local `workbench/standards/` on workspace open
|
|
101
|
+
- Versioned in the backend (auto-increments on update)
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## User Flows
|
|
106
|
+
|
|
107
|
+
### Flow 1: Registration & First Time Setup
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
User runs: npx purple-ai
|
|
111
|
+
│
|
|
112
|
+
▼
|
|
113
|
+
┌─────────────────────────────┐
|
|
114
|
+
│ No stored session found │
|
|
115
|
+
│ > Login │
|
|
116
|
+
│ > Register │
|
|
117
|
+
└─────────────────────────────┘
|
|
118
|
+
│
|
|
119
|
+
▼ (Register)
|
|
120
|
+
┌─────────────────────────────┐
|
|
121
|
+
│ Register form: │
|
|
122
|
+
│ - Email │
|
|
123
|
+
│ - Password │
|
|
124
|
+
│ - Name │
|
|
125
|
+
└─────────────────────────────┘
|
|
126
|
+
│
|
|
127
|
+
▼
|
|
128
|
+
┌─────────────────────────────────────────┐
|
|
129
|
+
│ POST /api/v1/auth/register │
|
|
130
|
+
│ Backend creates user + team │
|
|
131
|
+
│ │
|
|
132
|
+
│ If email domain matches existing team: │
|
|
133
|
+
│ "You've been added to Company team │
|
|
134
|
+
│ based on your email domain" │
|
|
135
|
+
└─────────────────────────────────────────┘
|
|
136
|
+
│
|
|
137
|
+
▼
|
|
138
|
+
┌─────────────────────────────┐
|
|
139
|
+
│ No workspace found │
|
|
140
|
+
│ > Create new workspace │
|
|
141
|
+
│ Clone from team │
|
|
142
|
+
└─────────────────────────────┘
|
|
143
|
+
│
|
|
144
|
+
▼
|
|
145
|
+
┌─────────────────────────────┐
|
|
146
|
+
│ Select team (if multiple) │
|
|
147
|
+
│ Name your workspace │
|
|
148
|
+
│ Default: folder name │
|
|
149
|
+
│ Location: current dir │
|
|
150
|
+
│ (option to change) │
|
|
151
|
+
└─────────────────────────────┘
|
|
152
|
+
│
|
|
153
|
+
▼
|
|
154
|
+
┌─────────────────────────────┐
|
|
155
|
+
│ Select repositories │
|
|
156
|
+
│ [x] org/react-app │
|
|
157
|
+
│ [x] org/api-server │
|
|
158
|
+
│ [ ] org/old-project │
|
|
159
|
+
│ │
|
|
160
|
+
│ (via gh CLI or manual URL) │
|
|
161
|
+
└─────────────────────────────┘
|
|
162
|
+
│
|
|
163
|
+
▼
|
|
164
|
+
┌─────────────────────────────────────────┐
|
|
165
|
+
│ POST /api/v1/workspace │
|
|
166
|
+
│ { name, teamId } │
|
|
167
|
+
│ → Returns workspace with id │
|
|
168
|
+
│ │
|
|
169
|
+
│ POST /api/v1/repo (for each repo) │
|
|
170
|
+
│ { workspaceId, remoteUrl, branch } │
|
|
171
|
+
└─────────────────────────────────────────┘
|
|
172
|
+
│
|
|
173
|
+
▼
|
|
174
|
+
┌─────────────────────────────┐
|
|
175
|
+
│ Select plugins │
|
|
176
|
+
│ │
|
|
177
|
+
│ Core (required): │
|
|
178
|
+
│ ✓ Purple Core │
|
|
179
|
+
│ │
|
|
180
|
+
│ Extras: │
|
|
181
|
+
│ [x] QA Engineer │
|
|
182
|
+
│ [ ] Documentation Writer │
|
|
183
|
+
└─────────────────────────────┘
|
|
184
|
+
│
|
|
185
|
+
▼
|
|
186
|
+
┌─────────────────────────────────────────┐
|
|
187
|
+
│ GET /api/v1/plugins/{id} │
|
|
188
|
+
│ Download and install selected plugins │
|
|
189
|
+
│ POST /api/v1/workspace/{id}/plugins │
|
|
190
|
+
│ { pluginId } for each selected │
|
|
191
|
+
└─────────────────────────────────────────┘
|
|
192
|
+
│
|
|
193
|
+
▼
|
|
194
|
+
┌─────────────────────────────┐
|
|
195
|
+
│ "Making your codebase │
|
|
196
|
+
│ AI-ready..." │
|
|
197
|
+
│ │
|
|
198
|
+
│ → Launches Claude Code │
|
|
199
|
+
│ → Runs /create-standards │
|
|
200
|
+
│ → Returns to Purple │
|
|
201
|
+
└─────────────────────────────┘
|
|
202
|
+
│
|
|
203
|
+
▼
|
|
204
|
+
┌─────────────────────────────────────────┐
|
|
205
|
+
│ POST /api/v1/standard (for each file) │
|
|
206
|
+
│ Upload generated standards to backend │
|
|
207
|
+
└─────────────────────────────────────────┘
|
|
208
|
+
│
|
|
209
|
+
▼
|
|
210
|
+
┌─────────────────────────────┐
|
|
211
|
+
│ Setup complete! │
|
|
212
|
+
│ → Session list (empty) │
|
|
213
|
+
│ → Start new session │
|
|
214
|
+
└─────────────────────────────┘
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Flow 2: Returning User
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
User runs: npx purple-ai
|
|
221
|
+
│
|
|
222
|
+
▼
|
|
223
|
+
┌─────────────────────────────────────────┐
|
|
224
|
+
│ Load token from keychain │
|
|
225
|
+
│ POST /api/v1/auth/refresh if expired │
|
|
226
|
+
│ GET /api/v1/user/me │
|
|
227
|
+
└─────────────────────────────────────────┘
|
|
228
|
+
│
|
|
229
|
+
▼
|
|
230
|
+
┌─────────────────────────────────────────┐
|
|
231
|
+
│ Workspace detection: │
|
|
232
|
+
│ - Check current directory for │
|
|
233
|
+
│ purple.json with workspace_id │
|
|
234
|
+
│ - Check subdirectories │
|
|
235
|
+
│ │
|
|
236
|
+
│ If one found → open directly │
|
|
237
|
+
│ If multiple → show picker │
|
|
238
|
+
│ If none → create/clone options │
|
|
239
|
+
└─────────────────────────────────────────┘
|
|
240
|
+
│
|
|
241
|
+
▼
|
|
242
|
+
┌─────────────────────────────────────────┐
|
|
243
|
+
│ On workspace open: │
|
|
244
|
+
│ GET /api/v1/workspace/{id} │
|
|
245
|
+
│ GET /api/v1/repo?workspaceId=xxx │
|
|
246
|
+
│ GET /api/v1/standard?workspaceId=xxx │
|
|
247
|
+
│ GET /api/v1/workspace/{id}/plugins │
|
|
248
|
+
│ │
|
|
249
|
+
│ Sync standards to local files │
|
|
250
|
+
│ Check for plugin updates │
|
|
251
|
+
└─────────────────────────────────────────┘
|
|
252
|
+
│
|
|
253
|
+
▼
|
|
254
|
+
┌─────────────────────────────┐
|
|
255
|
+
│ Session List (home screen) │
|
|
256
|
+
│ │
|
|
257
|
+
│ Sessions: │
|
|
258
|
+
│ > auth-feature (active) │
|
|
259
|
+
│ dashboard (done) │
|
|
260
|
+
│ api-refactor (done) │
|
|
261
|
+
│ │
|
|
262
|
+
│ [+ New Session] [Archive] │
|
|
263
|
+
└─────────────────────────────┘
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Flow 3: Starting a New Session
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
User selects: + New Session
|
|
270
|
+
│
|
|
271
|
+
▼
|
|
272
|
+
┌─────────────────────────────────────────┐
|
|
273
|
+
│ Check workbench/documentation/ │
|
|
274
|
+
│ user-originals/ for spec files │
|
|
275
|
+
└─────────────────────────────────────────┘
|
|
276
|
+
│
|
|
277
|
+
┌────┴────┐
|
|
278
|
+
▼ ▼
|
|
279
|
+
[Specs [No specs
|
|
280
|
+
exist] found]
|
|
281
|
+
│ │
|
|
282
|
+
▼ ▼
|
|
283
|
+
┌─────────┐ ┌─────────────────────────────┐
|
|
284
|
+
│ Select │ │ Enter feature name │
|
|
285
|
+
│ a spec │ │ → Creates template file │
|
|
286
|
+
│ file │ │ → Opens in default editor │
|
|
287
|
+
└─────────┘ │ → "Edit and save when done" │
|
|
288
|
+
│ └─────────────────────────────┘
|
|
289
|
+
│ │
|
|
290
|
+
└────┬────┘
|
|
291
|
+
▼
|
|
292
|
+
┌─────────────────────────────┐
|
|
293
|
+
│ Launch Claude Code with: │
|
|
294
|
+
│ /build-from-spec {path} │
|
|
295
|
+
│ │
|
|
296
|
+
│ Status bar shows progress │
|
|
297
|
+
│ Session named after folder │
|
|
298
|
+
└─────────────────────────────┘
|
|
299
|
+
│
|
|
300
|
+
▼
|
|
301
|
+
┌─────────────────────────────┐
|
|
302
|
+
│ Claude session ends │
|
|
303
|
+
│ → Hook triggers return │
|
|
304
|
+
│ → Back to session list │
|
|
305
|
+
└─────────────────────────────┘
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Flow 4: Resuming a Session
|
|
309
|
+
|
|
310
|
+
```
|
|
311
|
+
User selects: existing session
|
|
312
|
+
│
|
|
313
|
+
▼
|
|
314
|
+
┌─────────────────────────────┐
|
|
315
|
+
│ Launch Claude Code with: │
|
|
316
|
+
│ --resume {session-name} │
|
|
317
|
+
│ │
|
|
318
|
+
│ Full context restored │
|
|
319
|
+
│ Continue where you left │
|
|
320
|
+
└─────────────────────────────┘
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### Flow 5: Joining a Team Workspace
|
|
324
|
+
|
|
325
|
+
```
|
|
326
|
+
User selects: Clone from team
|
|
327
|
+
│
|
|
328
|
+
▼
|
|
329
|
+
┌─────────────────────────────────────────┐
|
|
330
|
+
│ GET /api/v1/team │
|
|
331
|
+
│ → Returns teams user belongs to │
|
|
332
|
+
│ │
|
|
333
|
+
│ GET /api/v1/team/{id} │
|
|
334
|
+
│ → Returns team with workspace list │
|
|
335
|
+
└─────────────────────────────────────────┘
|
|
336
|
+
│
|
|
337
|
+
▼
|
|
338
|
+
┌─────────────────────────────┐
|
|
339
|
+
│ Team Workspaces: │
|
|
340
|
+
│ > web-platform (3 repos) │
|
|
341
|
+
│ mobile-app (2 repos) │
|
|
342
|
+
│ data-pipeline (4 repos) │
|
|
343
|
+
└─────────────────────────────┘
|
|
344
|
+
│
|
|
345
|
+
▼
|
|
346
|
+
┌─────────────────────────────────────────┐
|
|
347
|
+
│ GET /api/v1/workspace/{id} │
|
|
348
|
+
│ GET /api/v1/repo?workspaceId=xxx │
|
|
349
|
+
│ GET /api/v1/standard?workspaceId=xxx │
|
|
350
|
+
│ GET /api/v1/workspace/{id}/plugins │
|
|
351
|
+
└─────────────────────────────────────────┘
|
|
352
|
+
│
|
|
353
|
+
▼
|
|
354
|
+
┌─────────────────────────────┐
|
|
355
|
+
│ Cloning workspace... │
|
|
356
|
+
│ - Create folder structure │
|
|
357
|
+
│ - Write purple.json │
|
|
358
|
+
│ - Clone all repos │
|
|
359
|
+
│ - Download & install │
|
|
360
|
+
│ plugins │
|
|
361
|
+
│ - Sync standards to local │
|
|
362
|
+
└─────────────────────────────┘
|
|
363
|
+
│
|
|
364
|
+
▼
|
|
365
|
+
┌─────────────────────────────┐
|
|
366
|
+
│ Ready! Session list │
|
|
367
|
+
└─────────────────────────────┘
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
### Flow 6: Adding a Repository
|
|
371
|
+
|
|
372
|
+
```
|
|
373
|
+
User selects: Settings → Add Repository
|
|
374
|
+
│
|
|
375
|
+
▼
|
|
376
|
+
┌─────────────────────────────┐
|
|
377
|
+
│ Enter repo URL or select │
|
|
378
|
+
│ from gh CLI list │
|
|
379
|
+
└─────────────────────────────┘
|
|
380
|
+
│
|
|
381
|
+
▼
|
|
382
|
+
┌─────────────────────────────────────────┐
|
|
383
|
+
│ POST /api/v1/repo │
|
|
384
|
+
│ { workspaceId, remoteUrl, branch } │
|
|
385
|
+
└─────────────────────────────────────────┘
|
|
386
|
+
│
|
|
387
|
+
▼
|
|
388
|
+
┌─────────────────────────────┐
|
|
389
|
+
│ Clone repo to /repos │
|
|
390
|
+
│ Offer to regenerate │
|
|
391
|
+
│ standards │
|
|
392
|
+
└─────────────────────────────┘
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
### Flow 7: Updating Standards
|
|
396
|
+
|
|
397
|
+
```
|
|
398
|
+
After /create-standards runs or user edits standards:
|
|
399
|
+
│
|
|
400
|
+
▼
|
|
401
|
+
┌─────────────────────────────────────────┐
|
|
402
|
+
│ For each standard file in │
|
|
403
|
+
│ workbench/standards/: │
|
|
404
|
+
│ │
|
|
405
|
+
│ Check if exists in backend: │
|
|
406
|
+
│ - PUT /api/v1/standard/{id} │
|
|
407
|
+
│ (version auto-increments) │
|
|
408
|
+
│ - POST /api/v1/standard │
|
|
409
|
+
│ (if new file) │
|
|
410
|
+
└─────────────────────────────────────────┘
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
## Workspace Structure
|
|
416
|
+
|
|
417
|
+
```
|
|
418
|
+
~/projects/my-workspace/
|
|
419
|
+
├── purple.json # Just { "workspace_id": "uuid" }
|
|
420
|
+
├── repos/
|
|
421
|
+
│ ├── react-app/ # Cloned repo
|
|
422
|
+
│ ├── api-server/ # Cloned repo
|
|
423
|
+
│ └── shared-lib/ # Cloned repo
|
|
424
|
+
├── .claude/
|
|
425
|
+
│ ├── agents/ # From installed plugins
|
|
426
|
+
│ │ ├── product-spec-writer.md
|
|
427
|
+
│ │ ├── engineering-architect.md
|
|
428
|
+
│ │ ├── senior-engineer.md
|
|
429
|
+
│ │ └── incremental-change-engineer.md
|
|
430
|
+
│ └── commands/ # From installed plugins
|
|
431
|
+
│ ├── build-from-spec.md
|
|
432
|
+
│ ├── create-standards.md
|
|
433
|
+
│ └── ...
|
|
434
|
+
└── workbench/
|
|
435
|
+
├── standards/ # Synced from backend
|
|
436
|
+
│ ├── coding-conventions.md
|
|
437
|
+
│ ├── architecture.md
|
|
438
|
+
│ └── ...
|
|
439
|
+
└── documentation/ # Purely local
|
|
440
|
+
├── user-originals/ # User-written specs
|
|
441
|
+
│ └── auth-feature.md
|
|
442
|
+
├── 260112-auth-feature/ # Session folder
|
|
443
|
+
│ ├── product-spec.md
|
|
444
|
+
│ ├── implementation-spec.md
|
|
445
|
+
│ └── ...
|
|
446
|
+
└── archived/ # Completed sessions
|
|
447
|
+
└── 260110-dashboard/
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
---
|
|
451
|
+
|
|
452
|
+
## Data Ownership
|
|
453
|
+
|
|
454
|
+
| Data | Location | Synced? |
|
|
455
|
+
|------|----------|---------|
|
|
456
|
+
| User profile | Backend | - |
|
|
457
|
+
| Team membership | Backend | - |
|
|
458
|
+
| Workspace config | Backend | purple.json has ID only |
|
|
459
|
+
| Repo list | Backend | Cloned locally |
|
|
460
|
+
| Standards | Backend | Synced to local files |
|
|
461
|
+
| Plugins | Backend | Downloaded to .claude/ |
|
|
462
|
+
| Sessions | Local only | Never synced |
|
|
463
|
+
| User spec files | Local only | Never synced |
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
467
|
+
## The Purple + Claude Experience
|
|
468
|
+
|
|
469
|
+
### Status Bar
|
|
470
|
+
|
|
471
|
+
While in Claude Code, a status bar at the bottom shows:
|
|
472
|
+
- Current phase (Spec, Architecture, Implementation)
|
|
473
|
+
- Active agent
|
|
474
|
+
- Ticket progress (3/10)
|
|
475
|
+
- Current mode (Plan, Execute, Review)
|
|
476
|
+
|
|
477
|
+
Agents update this via MCP tools.
|
|
478
|
+
|
|
479
|
+
### Command Palette
|
|
480
|
+
|
|
481
|
+
Press `Ctrl+K` while in Claude to open Purple's command palette:
|
|
482
|
+
- **Return to Purple** - Exit Claude session, return to session list
|
|
483
|
+
- **All /commands** - Quick access to commands from `.claude/commands/` folder
|
|
484
|
+
|
|
485
|
+
### Returning to Purple
|
|
486
|
+
|
|
487
|
+
When Claude session ends (via hook), user returns to Purple's session list automatically. No manual switching needed.
|
|
488
|
+
|
|
489
|
+
### Interactive Mode
|
|
490
|
+
|
|
491
|
+
Users can also "Open Claude" without starting a structured session - for freeform exploration or quick tasks. These sessions are auto-named (e.g., `interactive-260112-1`).
|
|
492
|
+
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
## What's NOT in v1
|
|
496
|
+
|
|
497
|
+
- Windows support (macOS + Linux only)
|
|
498
|
+
- Offline mode
|
|
499
|
+
- Team roles/permissions (exists in DB but not exposed)
|
|
500
|
+
- Real-time collaboration
|
|
501
|
+
- Headless/CI mode
|
|
502
|
+
- Custom plugin marketplace
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
506
|
+
## Success Metrics
|
|
507
|
+
|
|
508
|
+
- Time from "I have an idea" to "PR ready"
|
|
509
|
+
- Number of workspaces created
|
|
510
|
+
- Session completion rate
|
|
511
|
+
- Team adoption (workspaces with 2+ members)
|
|
512
|
+
- Standards generation success rate
|
|
513
|
+
- Plugin installation rate
|