prjct-cli 0.15.0 → 0.17.0
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/CHANGELOG.md +51 -0
- package/bin/dev.js +0 -1
- package/bin/serve.js +19 -20
- package/core/agentic/agent-router.ts +79 -14
- package/core/agentic/command-executor/command-executor.ts +2 -74
- package/core/agentic/services.ts +0 -48
- package/core/agentic/template-loader.ts +35 -1
- package/core/commands/base.ts +96 -77
- package/core/commands/planning.ts +13 -2
- package/core/commands/setup.ts +3 -85
- package/core/errors.ts +209 -0
- package/core/infrastructure/config-manager.ts +22 -5
- package/core/infrastructure/setup.ts +5 -50
- package/core/storage/storage-manager.ts +42 -6
- package/core/utils/logger.ts +19 -12
- package/package.json +2 -4
- package/templates/agentic/subagent-generation.md +109 -0
- package/templates/commands/setup.md +18 -3
- package/templates/commands/sync.md +74 -13
- package/templates/mcp-config.json +20 -1
- package/templates/subagents/domain/backend.md +105 -0
- package/templates/subagents/domain/database.md +118 -0
- package/templates/subagents/domain/devops.md +148 -0
- package/templates/subagents/domain/frontend.md +99 -0
- package/templates/subagents/domain/testing.md +169 -0
- package/templates/subagents/workflow/prjct-planner.md +158 -0
- package/templates/subagents/workflow/prjct-shipper.md +179 -0
- package/templates/subagents/workflow/prjct-workflow.md +98 -0
- package/bin/generate-views.js +0 -209
- package/bin/migrate-to-json.js +0 -742
- package/core/agentic/context-filter.ts +0 -365
- package/core/agentic/parallel-tools.ts +0 -165
- package/core/agentic/response-templates.ts +0 -164
- package/core/agentic/semantic-compression.ts +0 -273
- package/core/agentic/think-blocks.ts +0 -202
- package/core/agentic/validation-rules.ts +0 -313
- package/core/domain/agent-matcher.ts +0 -130
- package/core/domain/agent-validator.ts +0 -250
- package/core/domain/architect-session.ts +0 -315
- package/core/domain/product-standards.ts +0 -106
- package/core/domain/smart-cache.ts +0 -167
- package/core/domain/task-analyzer.ts +0 -296
- package/core/infrastructure/legacy-installer-detector/cleanup.ts +0 -216
- package/core/infrastructure/legacy-installer-detector/detection.ts +0 -95
- package/core/infrastructure/legacy-installer-detector/index.ts +0 -171
- package/core/infrastructure/legacy-installer-detector/migration.ts +0 -87
- package/core/infrastructure/legacy-installer-detector/types.ts +0 -42
- package/core/infrastructure/legacy-installer-detector.ts +0 -7
- package/core/infrastructure/migrator/file-operations.ts +0 -125
- package/core/infrastructure/migrator/index.ts +0 -288
- package/core/infrastructure/migrator/project-scanner.ts +0 -90
- package/core/infrastructure/migrator/reports.ts +0 -117
- package/core/infrastructure/migrator/types.ts +0 -124
- package/core/infrastructure/migrator/validation.ts +0 -94
- package/core/infrastructure/migrator/version-migration.ts +0 -117
- package/core/infrastructure/migrator.ts +0 -10
- package/core/infrastructure/uuid-migration.ts +0 -750
- package/templates/commands/migrate-all.md +0 -96
- package/templates/commands/migrate.md +0 -140
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
allowed-tools: [Read, Write, Bash]
|
|
3
|
-
description: 'Migrate all projects to UUID format'
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# /p:migrate-all
|
|
7
|
-
|
|
8
|
-
Migrate all projects to UUID format.
|
|
9
|
-
|
|
10
|
-
## Usage
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
/p:migrate-all [--deep-scan] [--dry-run]
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## What It Does
|
|
17
|
-
|
|
18
|
-
1. **Scans global storage** → Lists all projects in `~/.prjct-cli/projects/`
|
|
19
|
-
2. **Checks UUID format** → Identifies projects with non-UUID IDs
|
|
20
|
-
3. **Migrates each project** → Renames folders and updates configs to UUID
|
|
21
|
-
4. **Reports summary** → Shows migrated, skipped, failed counts
|
|
22
|
-
|
|
23
|
-
## Options
|
|
24
|
-
|
|
25
|
-
- `--deep-scan`: Also scan for projects in common locations
|
|
26
|
-
- `--dry-run`: Show what would be migrated without making changes
|
|
27
|
-
|
|
28
|
-
## Migration Flow
|
|
29
|
-
|
|
30
|
-
For each project:
|
|
31
|
-
|
|
32
|
-
1. Read `project.json` to get current ID
|
|
33
|
-
2. Check if ID is already UUID format
|
|
34
|
-
3. If not UUID:
|
|
35
|
-
- Generate new UUID
|
|
36
|
-
- Rename folder to new UUID
|
|
37
|
-
- Update `project.json`
|
|
38
|
-
- Find and update linked `.prjct/prjct.config.json`
|
|
39
|
-
|
|
40
|
-
## UUID Format
|
|
41
|
-
|
|
42
|
-
Standard UUID: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` (36 chars)
|
|
43
|
-
Example: `550e8400-e29b-41d4-a716-446655440000`
|
|
44
|
-
|
|
45
|
-
## Before → After
|
|
46
|
-
|
|
47
|
-
**Before**:
|
|
48
|
-
```
|
|
49
|
-
~/.prjct-cli/projects/
|
|
50
|
-
3a5667a5dedb/ # Hash-based ID
|
|
51
|
-
abc12345/ # Short ID
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
**After**:
|
|
55
|
-
```
|
|
56
|
-
~/.prjct-cli/projects/
|
|
57
|
-
550e8400-e29b-41d4-a716-446655440000/ # UUID
|
|
58
|
-
7c9e6679-7425-40de-944b-e07fc1f90ae7/ # UUID
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Safety
|
|
62
|
-
|
|
63
|
-
- **Idempotent**: Safe to run multiple times (skips UUIDs)
|
|
64
|
-
- **Non-destructive**: Renames, doesn't delete
|
|
65
|
-
- **Dry run**: Test with `--dry-run` first
|
|
66
|
-
|
|
67
|
-
## Requirements
|
|
68
|
-
|
|
69
|
-
- Write permissions to `~/.prjct-cli/`
|
|
70
|
-
- Projects must have valid `project.json`
|
|
71
|
-
|
|
72
|
-
## Output
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
📦 UUID Migration
|
|
76
|
-
|
|
77
|
-
Scanning ~/.prjct-cli/projects/...
|
|
78
|
-
|
|
79
|
-
Found 5 projects:
|
|
80
|
-
- 3a5667a5dedb: Needs migration
|
|
81
|
-
- abc12345: Needs migration
|
|
82
|
-
- 550e8400-e29b-...: Already UUID ✓
|
|
83
|
-
- def67890: Needs migration
|
|
84
|
-
- 7c9e6679-7425-...: Already UUID ✓
|
|
85
|
-
|
|
86
|
-
Migrating 3 projects...
|
|
87
|
-
|
|
88
|
-
✅ 3a5667a5dedb → 9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
|
|
89
|
-
✅ abc12345 → 1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
|
|
90
|
-
✅ def67890 → 2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e
|
|
91
|
-
|
|
92
|
-
Summary:
|
|
93
|
-
- Migrated: 3
|
|
94
|
-
- Skipped (already UUID): 2
|
|
95
|
-
- Failed: 0
|
|
96
|
-
```
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
allowed-tools: [Read, Write, Bash, Glob]
|
|
3
|
-
description: 'Migrate project to UUID format + sync'
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# /p:migrate - UUID Migration
|
|
7
|
-
|
|
8
|
-
Migrate project ID to UUID format and run full sync.
|
|
9
|
-
|
|
10
|
-
## Context Variables
|
|
11
|
-
|
|
12
|
-
- `{projectId}`: Current ID from `.prjct/prjct.config.json`
|
|
13
|
-
- `{globalPath}`: `~/.prjct-cli/projects/{projectId}`
|
|
14
|
-
|
|
15
|
-
## Step 1: Read Configuration
|
|
16
|
-
|
|
17
|
-
READ: `.prjct/prjct.config.json`
|
|
18
|
-
EXTRACT: `projectId`
|
|
19
|
-
|
|
20
|
-
IF file not found:
|
|
21
|
-
OUTPUT: "No prjct project. Run /p:init first."
|
|
22
|
-
STOP
|
|
23
|
-
|
|
24
|
-
## Step 2: Check UUID Format
|
|
25
|
-
|
|
26
|
-
UUID format: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` (36 chars with dashes)
|
|
27
|
-
|
|
28
|
-
IF projectId matches UUID regex `/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i`:
|
|
29
|
-
OUTPUT: "✅ Already UUID: {projectId}"
|
|
30
|
-
GOTO: Step 7 (Run Sync)
|
|
31
|
-
|
|
32
|
-
IF projectId does NOT match UUID format:
|
|
33
|
-
CONTINUE to Step 3
|
|
34
|
-
|
|
35
|
-
## Step 3: Generate New UUID
|
|
36
|
-
|
|
37
|
-
Generate new UUID using Node.js `crypto.randomUUID()`.
|
|
38
|
-
|
|
39
|
-
Store:
|
|
40
|
-
- `{oldId}` = current projectId
|
|
41
|
-
- `{newId}` = generated UUID
|
|
42
|
-
|
|
43
|
-
## Step 4: Show Migration Plan
|
|
44
|
-
|
|
45
|
-
OUTPUT:
|
|
46
|
-
```
|
|
47
|
-
📦 UUID Migration Plan
|
|
48
|
-
|
|
49
|
-
Current ID: {oldId} (non-UUID format)
|
|
50
|
-
New UUID: {newId}
|
|
51
|
-
|
|
52
|
-
Actions:
|
|
53
|
-
1. Rename folder: ~/.prjct-cli/projects/{oldId}/ → ~/.prjct-cli/projects/{newId}/
|
|
54
|
-
2. Update .prjct/prjct.config.json
|
|
55
|
-
3. Update project.json
|
|
56
|
-
4. Run /p:sync
|
|
57
|
-
|
|
58
|
-
Continue? (yes/no)
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
WAIT for user confirmation.
|
|
62
|
-
|
|
63
|
-
## Step 5: Rename Global Folder
|
|
64
|
-
|
|
65
|
-
BASH:
|
|
66
|
-
```bash
|
|
67
|
-
mv ~/.prjct-cli/projects/{oldId} ~/.prjct-cli/projects/{newId}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
IF error:
|
|
71
|
-
OUTPUT: "❌ Failed to rename folder: {error}"
|
|
72
|
-
STOP
|
|
73
|
-
|
|
74
|
-
## Step 6: Update Configuration Files
|
|
75
|
-
|
|
76
|
-
### Local Config (.prjct/prjct.config.json)
|
|
77
|
-
|
|
78
|
-
READ current config, UPDATE:
|
|
79
|
-
```json
|
|
80
|
-
{
|
|
81
|
-
"projectId": "{newId}",
|
|
82
|
-
"dataPath": "~/.prjct-cli/projects/{newId}"
|
|
83
|
-
}
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
WRITE back to `.prjct/prjct.config.json`
|
|
87
|
-
|
|
88
|
-
### Global Config (project.json)
|
|
89
|
-
|
|
90
|
-
READ: `~/.prjct-cli/projects/{newId}/project.json`
|
|
91
|
-
REPLACE all occurrences of `{oldId}` with `{newId}`
|
|
92
|
-
WRITE back
|
|
93
|
-
|
|
94
|
-
## Step 7: Run Sync
|
|
95
|
-
|
|
96
|
-
Execute `/p:sync` to:
|
|
97
|
-
- Analyze project
|
|
98
|
-
- Regenerate CLAUDE.md
|
|
99
|
-
- Update agents
|
|
100
|
-
|
|
101
|
-
## Output
|
|
102
|
-
|
|
103
|
-
**If migrated:**
|
|
104
|
-
```
|
|
105
|
-
✅ Migrated to UUID
|
|
106
|
-
|
|
107
|
-
Old ID: {oldId}
|
|
108
|
-
New ID: {newId}
|
|
109
|
-
|
|
110
|
-
Updated:
|
|
111
|
-
- Folder renamed
|
|
112
|
-
- Config updated
|
|
113
|
-
- Sync completed
|
|
114
|
-
|
|
115
|
-
Next: Continue working with /p:now
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
**If skipped (already UUID):**
|
|
119
|
-
```
|
|
120
|
-
✅ Already UUID: {projectId}
|
|
121
|
-
|
|
122
|
-
Sync completed.
|
|
123
|
-
|
|
124
|
-
Next: Continue working with /p:now
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
## Error Handling
|
|
128
|
-
|
|
129
|
-
| Error | Action |
|
|
130
|
-
|-------|--------|
|
|
131
|
-
| No config | "Run /p:init first" |
|
|
132
|
-
| Folder not found | "Global data missing - reinitialize" |
|
|
133
|
-
| Rename failed | Show error, abort |
|
|
134
|
-
| User cancels | STOP without changes |
|
|
135
|
-
|
|
136
|
-
## Notes
|
|
137
|
-
|
|
138
|
-
- Migration is idempotent: if already UUID, skips to sync
|
|
139
|
-
- UUIDs are standard format for PostgreSQL consistency
|
|
140
|
-
- Always runs sync after migration
|