prjct-cli 0.33.5 → 0.35.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 +65 -0
- package/core/agentic/command-executor.ts +26 -4
- package/core/agentic/index.ts +1 -0
- package/core/agentic/template-executor.ts +261 -0
- package/core/commands/workflow.ts +28 -6
- package/core/schemas/state.ts +43 -1
- package/core/services/agent-service.ts +36 -45
- package/core/storage/state-storage.ts +259 -1
- package/core/types/agentic.ts +6 -0
- package/dist/bin/prjct.mjs +1320 -523
- package/dist/core/infrastructure/command-installer.js +45 -19
- package/dist/core/infrastructure/editors-config.js +1 -1
- package/dist/core/infrastructure/setup.js +111 -70
- package/dist/core/utils/version.js +1 -1
- package/package.json +1 -1
- package/scripts/postinstall.js +26 -2
- package/templates/agentic/orchestrator.md +402 -0
- package/templates/agentic/task-fragmentation.md +323 -0
- package/templates/commands/bug.md +2 -0
- package/templates/commands/github.md +63 -7
- package/templates/commands/jira.md +44 -4
- package/templates/commands/linear.md +40 -8
- package/templates/commands/monday.md +42 -6
- package/templates/commands/p.md +57 -10
- package/templates/commands/sync.md +133 -97
- package/templates/commands/task.md +12 -0
- package/templates/config/skill-mappings.json +95 -63
- package/packages/shared/.turbo/turbo-build.log +0 -14
- package/packages/shared/dist/index.d.ts +0 -10
- package/packages/shared/dist/index.d.ts.map +0 -1
- package/packages/shared/dist/index.js +0 -4196
- package/packages/shared/dist/schemas.d.ts +0 -408
- package/packages/shared/dist/schemas.d.ts.map +0 -1
- package/packages/shared/dist/types.d.ts +0 -144
- package/packages/shared/dist/types.d.ts.map +0 -1
- package/packages/shared/dist/unified.d.ts +0 -139
- package/packages/shared/dist/unified.d.ts.map +0 -1
- package/packages/shared/dist/utils.d.ts +0 -60
- package/packages/shared/dist/utils.d.ts.map +0 -1
- package/templates/commands/ask.md +0 -128
- package/templates/commands/dashboard.md +0 -686
- package/templates/commands/feature.md +0 -46
- package/templates/commands/now.md +0 -53
- package/templates/commands/suggest.md +0 -116
- package/templates/global/docs/agents.md +0 -88
- package/templates/global/docs/architecture.md +0 -103
- package/templates/global/docs/commands.md +0 -96
- package/templates/global/docs/validation.md +0 -95
|
@@ -5,6 +5,8 @@ description: 'GitHub Issues integration via MCP'
|
|
|
5
5
|
|
|
6
6
|
# p. github - GitHub Issues Integration
|
|
7
7
|
|
|
8
|
+
**ARGUMENTS**: $ARGUMENTS
|
|
9
|
+
|
|
8
10
|
Manage GitHub Issues directly from prjct using MCP.
|
|
9
11
|
|
|
10
12
|
## Context Variables
|
|
@@ -50,17 +52,65 @@ IF file not found:
|
|
|
50
52
|
|
|
51
53
|
---
|
|
52
54
|
|
|
53
|
-
## Step 2: Check
|
|
55
|
+
## Step 2: Check GITHUB_TOKEN
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
CHECK: Is GITHUB_TOKEN env var set?
|
|
59
|
+
|
|
60
|
+
IF not set:
|
|
61
|
+
OUTPUT: "GitHub requires a Personal Access Token."
|
|
62
|
+
OUTPUT: ""
|
|
63
|
+
OUTPUT: "1. Create token at: https://github.com/settings/tokens"
|
|
64
|
+
OUTPUT: "2. Select 'repo' scope"
|
|
65
|
+
OUTPUT: "3. Set env var: export GITHUB_TOKEN=ghp_..."
|
|
66
|
+
OUTPUT: "4. Run `p. github setup` again"
|
|
67
|
+
STOP
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Step 3: Install MCP Server (if needed)
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
READ: ~/.claude/settings.json (create {} if not exists)
|
|
76
|
+
CHECK: Does mcpServers.github exist?
|
|
77
|
+
|
|
78
|
+
IF not exists:
|
|
79
|
+
READ: templates/mcp-config.json
|
|
80
|
+
EXTRACT: mcpServers.github
|
|
81
|
+
|
|
82
|
+
MERGE into ~/.claude/settings.json:
|
|
83
|
+
{
|
|
84
|
+
"mcpServers": {
|
|
85
|
+
"github": {
|
|
86
|
+
"command": "npx",
|
|
87
|
+
"args": ["-y", "@modelcontextprotocol/server-github"],
|
|
88
|
+
"env": {
|
|
89
|
+
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
WRITE: ~/.claude/settings.json
|
|
96
|
+
|
|
97
|
+
OUTPUT: "✅ Installed GitHub MCP server"
|
|
98
|
+
OUTPUT: ""
|
|
99
|
+
OUTPUT: "⚠️ Restart Claude Code to activate the MCP server."
|
|
100
|
+
OUTPUT: "Then run `p. github setup` again to complete configuration."
|
|
101
|
+
STOP
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Step 4: Check MCP Tools Available
|
|
54
107
|
|
|
55
108
|
```
|
|
56
109
|
CHECK: Are mcp__github__* tools available?
|
|
57
110
|
|
|
58
111
|
IF not available:
|
|
59
|
-
OUTPUT: "GitHub MCP not
|
|
60
|
-
OUTPUT: "
|
|
61
|
-
OUTPUT: "2. Add to ~/.claude/settings.json:"
|
|
62
|
-
OUTPUT: '{"mcpServers":{"github":{"command":"npx","args":["-y","@modelcontextprotocol/server-github"],"env":{"GITHUB_PERSONAL_ACCESS_TOKEN":"${GITHUB_TOKEN}"}}}}'
|
|
63
|
-
OUTPUT: "3. Restart Claude Code."
|
|
112
|
+
OUTPUT: "GitHub MCP is installed but not yet active."
|
|
113
|
+
OUTPUT: "Restart Claude Code, then run `p. github setup` again."
|
|
64
114
|
STOP
|
|
65
115
|
```
|
|
66
116
|
|
|
@@ -70,7 +120,13 @@ IF not available:
|
|
|
70
120
|
|
|
71
121
|
### Flow
|
|
72
122
|
|
|
73
|
-
1. **
|
|
123
|
+
1. **Check token + Install MCP + Verify tools**
|
|
124
|
+
```
|
|
125
|
+
Execute Step 2 (check GITHUB_TOKEN)
|
|
126
|
+
Execute Step 3 (auto-install MCP if needed)
|
|
127
|
+
Execute Step 4 (verify tools active)
|
|
128
|
+
IF not available: Prompt restart and STOP
|
|
129
|
+
```
|
|
74
130
|
|
|
75
131
|
2. **Detect repo from git remote**
|
|
76
132
|
```bash
|
|
@@ -5,6 +5,8 @@ description: 'JIRA issue tracker integration'
|
|
|
5
5
|
|
|
6
6
|
# p. jira - JIRA Integration
|
|
7
7
|
|
|
8
|
+
**ARGUMENTS**: $ARGUMENTS
|
|
9
|
+
|
|
8
10
|
Manage JIRA issues directly from prjct.
|
|
9
11
|
|
|
10
12
|
## Context Variables
|
|
@@ -68,7 +70,38 @@ IF file not found:
|
|
|
68
70
|
|
|
69
71
|
---
|
|
70
72
|
|
|
71
|
-
## Step 2:
|
|
73
|
+
## Step 2: Install MCP Server (if needed)
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
READ: ~/.claude/settings.json (create {} if not exists)
|
|
77
|
+
CHECK: Does mcpServers.Atlassian exist?
|
|
78
|
+
|
|
79
|
+
IF not exists:
|
|
80
|
+
READ: templates/mcp-config.json
|
|
81
|
+
EXTRACT: mcpServers.Atlassian
|
|
82
|
+
|
|
83
|
+
MERGE into ~/.claude/settings.json:
|
|
84
|
+
{
|
|
85
|
+
"mcpServers": {
|
|
86
|
+
"Atlassian": {
|
|
87
|
+
"command": "npx",
|
|
88
|
+
"args": ["-y", "mcp-remote@latest", "https://mcp.atlassian.com/v1/sse"]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
WRITE: ~/.claude/settings.json
|
|
94
|
+
|
|
95
|
+
OUTPUT: "✅ Installed Atlassian MCP server"
|
|
96
|
+
OUTPUT: ""
|
|
97
|
+
OUTPUT: "⚠️ Restart Claude Code to activate the MCP server."
|
|
98
|
+
OUTPUT: "Then run `p. jira setup` again to complete configuration."
|
|
99
|
+
STOP
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Step 3: Detect Auth Mode
|
|
72
105
|
|
|
73
106
|
```
|
|
74
107
|
# Check API Token first
|
|
@@ -79,6 +112,12 @@ IF JIRA_API_TOKEN is set:
|
|
|
79
112
|
ELSE IF mcp__atlassian__jira_* tools available:
|
|
80
113
|
SET: authMode = "mcp"
|
|
81
114
|
|
|
115
|
+
# MCP installed but not active
|
|
116
|
+
ELSE IF mcpServers.Atlassian exists in settings.json:
|
|
117
|
+
OUTPUT: "Atlassian MCP is installed but not yet active."
|
|
118
|
+
OUTPUT: "Restart Claude Code, then run `p. jira setup` again."
|
|
119
|
+
STOP
|
|
120
|
+
|
|
82
121
|
# Neither available
|
|
83
122
|
ELSE:
|
|
84
123
|
OUTPUT: "JIRA not configured. Run `p. jira setup` first."
|
|
@@ -91,10 +130,11 @@ ELSE:
|
|
|
91
130
|
|
|
92
131
|
### Flow
|
|
93
132
|
|
|
94
|
-
1. **Detect
|
|
133
|
+
1. **Install MCP + Detect auth mode**
|
|
95
134
|
```
|
|
96
|
-
|
|
97
|
-
|
|
135
|
+
Execute Step 2 (auto-install MCP if needed)
|
|
136
|
+
Execute Step 3 (detect auth mode)
|
|
137
|
+
IF MCP not active: Prompt restart and STOP
|
|
98
138
|
```
|
|
99
139
|
|
|
100
140
|
2. **If MCP available (preferred)**
|
|
@@ -5,6 +5,8 @@ description: 'Linear issue tracker integration via MCP'
|
|
|
5
5
|
|
|
6
6
|
# p. linear - Linear Integration
|
|
7
7
|
|
|
8
|
+
**ARGUMENTS**: $ARGUMENTS
|
|
9
|
+
|
|
8
10
|
Manage Linear issues directly from prjct using MCP (no SDK needed).
|
|
9
11
|
|
|
10
12
|
## Context Variables
|
|
@@ -50,16 +52,45 @@ IF file not found:
|
|
|
50
52
|
|
|
51
53
|
---
|
|
52
54
|
|
|
53
|
-
## Step 2:
|
|
55
|
+
## Step 2: Install MCP Server (if needed)
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
READ: ~/.claude/settings.json (create {} if not exists)
|
|
59
|
+
CHECK: Does mcpServers.linear exist?
|
|
60
|
+
|
|
61
|
+
IF not exists:
|
|
62
|
+
READ: templates/mcp-config.json
|
|
63
|
+
EXTRACT: mcpServers.linear
|
|
64
|
+
|
|
65
|
+
MERGE into ~/.claude/settings.json:
|
|
66
|
+
{
|
|
67
|
+
"mcpServers": {
|
|
68
|
+
"linear": {
|
|
69
|
+
"command": "npx",
|
|
70
|
+
"args": ["-y", "mcp-remote", "https://mcp.linear.app/mcp"]
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
WRITE: ~/.claude/settings.json
|
|
76
|
+
|
|
77
|
+
OUTPUT: "✅ Installed Linear MCP server"
|
|
78
|
+
OUTPUT: ""
|
|
79
|
+
OUTPUT: "⚠️ Restart Claude Code to activate the MCP server."
|
|
80
|
+
OUTPUT: "Then run `p. linear setup` again to complete configuration."
|
|
81
|
+
STOP
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Step 3: Check MCP Tools Available
|
|
54
87
|
|
|
55
88
|
```
|
|
56
89
|
CHECK: Are mcp__linear__* tools available?
|
|
57
90
|
|
|
58
91
|
IF not available:
|
|
59
|
-
OUTPUT: "Linear MCP not
|
|
60
|
-
OUTPUT: "
|
|
61
|
-
OUTPUT: '{"mcpServers":{"linear":{"command":"npx","args":["-y","mcp-remote","https://mcp.linear.app/mcp"]}}}'
|
|
62
|
-
OUTPUT: "Then restart Claude Code."
|
|
92
|
+
OUTPUT: "Linear MCP is installed but not yet active."
|
|
93
|
+
OUTPUT: "Restart Claude Code, then run `p. linear setup` again."
|
|
63
94
|
STOP
|
|
64
95
|
```
|
|
65
96
|
|
|
@@ -69,10 +100,11 @@ IF not available:
|
|
|
69
100
|
|
|
70
101
|
### Flow
|
|
71
102
|
|
|
72
|
-
1. **
|
|
103
|
+
1. **Install MCP + Verify tools available**
|
|
73
104
|
```
|
|
74
|
-
|
|
75
|
-
|
|
105
|
+
Execute Step 2 (auto-install if needed)
|
|
106
|
+
Execute Step 3 (verify tools active)
|
|
107
|
+
IF not available: Prompt restart and STOP
|
|
76
108
|
```
|
|
77
109
|
|
|
78
110
|
2. **Test connection (triggers OAuth if needed)**
|
|
@@ -5,6 +5,8 @@ description: 'Monday.com issue tracker integration via MCP'
|
|
|
5
5
|
|
|
6
6
|
# p. monday - Monday.com Integration
|
|
7
7
|
|
|
8
|
+
**ARGUMENTS**: $ARGUMENTS
|
|
9
|
+
|
|
8
10
|
Manage Monday.com boards directly from prjct using MCP.
|
|
9
11
|
|
|
10
12
|
## Context Variables
|
|
@@ -49,16 +51,45 @@ IF file not found:
|
|
|
49
51
|
|
|
50
52
|
---
|
|
51
53
|
|
|
52
|
-
## Step 2:
|
|
54
|
+
## Step 2: Install MCP Server (if needed)
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
READ: ~/.claude/settings.json (create {} if not exists)
|
|
58
|
+
CHECK: Does mcpServers.monday exist?
|
|
59
|
+
|
|
60
|
+
IF not exists:
|
|
61
|
+
READ: templates/mcp-config.json
|
|
62
|
+
EXTRACT: mcpServers.monday
|
|
63
|
+
|
|
64
|
+
MERGE into ~/.claude/settings.json:
|
|
65
|
+
{
|
|
66
|
+
"mcpServers": {
|
|
67
|
+
"monday": {
|
|
68
|
+
"command": "npx",
|
|
69
|
+
"args": ["-y", "@mondaydotcomorg/monday-api-mcp"]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
WRITE: ~/.claude/settings.json
|
|
75
|
+
|
|
76
|
+
OUTPUT: "✅ Installed Monday.com MCP server"
|
|
77
|
+
OUTPUT: ""
|
|
78
|
+
OUTPUT: "⚠️ Restart Claude Code to activate the MCP server."
|
|
79
|
+
OUTPUT: "Then run `p. monday setup` again to complete configuration."
|
|
80
|
+
STOP
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Step 3: Check MCP Tools Available
|
|
53
86
|
|
|
54
87
|
```
|
|
55
88
|
CHECK: Are mcp__monday__* tools available?
|
|
56
89
|
|
|
57
90
|
IF not available:
|
|
58
|
-
OUTPUT: "Monday MCP not
|
|
59
|
-
OUTPUT: "
|
|
60
|
-
OUTPUT: '{"mcpServers":{"monday":{"command":"npx","args":["-y","@mondaydotcomorg/monday-api-mcp"]}}}'
|
|
61
|
-
OUTPUT: "Then restart Claude Code."
|
|
91
|
+
OUTPUT: "Monday MCP is installed but not yet active."
|
|
92
|
+
OUTPUT: "Restart Claude Code, then run `p. monday setup` again."
|
|
62
93
|
STOP
|
|
63
94
|
```
|
|
64
95
|
|
|
@@ -68,7 +99,12 @@ IF not available:
|
|
|
68
99
|
|
|
69
100
|
### Flow
|
|
70
101
|
|
|
71
|
-
1. **
|
|
102
|
+
1. **Install MCP + Verify tools available**
|
|
103
|
+
```
|
|
104
|
+
Execute Step 2 (auto-install MCP if needed)
|
|
105
|
+
Execute Step 3 (verify tools active)
|
|
106
|
+
IF not available: Prompt restart and STOP
|
|
107
|
+
```
|
|
72
108
|
|
|
73
109
|
2. **Test connection (triggers OAuth if needed)**
|
|
74
110
|
```
|
package/templates/commands/p.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'prjct CLI - Developer momentum tool'
|
|
3
|
-
allowed-tools: [Read, Write, Edit, Bash, Glob, Grep, Task, AskUserQuestion, TodoWrite]
|
|
3
|
+
allowed-tools: [Read, Write, Edit, Bash, Glob, Grep, Task, AskUserQuestion, TodoWrite, WebFetch]
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# prjct Command Router
|
|
@@ -14,25 +14,72 @@ allowed-tools: [Read, Write, Edit, Bash, Glob, Grep, Task, AskUserQuestion, Todo
|
|
|
14
14
|
```bash
|
|
15
15
|
npm root -g
|
|
16
16
|
```
|
|
17
|
-
3.
|
|
17
|
+
3. **Run Orchestrator** (for task-related commands):
|
|
18
|
+
- Read: `{npmRoot}/prjct-cli/templates/agentic/orchestrator.md`
|
|
19
|
+
- Execute orchestrator Steps 1-5 to load agents and skills
|
|
20
|
+
4. Read command template:
|
|
18
21
|
```
|
|
19
22
|
{npmRoot}/prjct-cli/templates/commands/{command}.md
|
|
20
23
|
```
|
|
21
|
-
|
|
24
|
+
5. Execute template with `commandArgs` + orchestrator context
|
|
25
|
+
|
|
26
|
+
## Orchestrator Integration
|
|
27
|
+
|
|
28
|
+
For these commands, run orchestrator FIRST:
|
|
29
|
+
- `task`, `done`, `ship` - Core workflow
|
|
30
|
+
- `bug`, `plan`, `prd`, `spec`, `design` - Planning
|
|
31
|
+
- `review`, `merge` - Git operations
|
|
32
|
+
|
|
33
|
+
Skip orchestrator for:
|
|
34
|
+
- `init`, `sync`, `setup` - Project config (no task context)
|
|
35
|
+
- `dash`, `next`, `history` - Read-only views
|
|
36
|
+
- `linear`, `jira`, `github`, `monday` - Integrations (own logic)
|
|
22
37
|
|
|
23
38
|
## Example
|
|
24
39
|
|
|
25
40
|
ARGUMENTS = "task fix the login bug"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
41
|
+
|
|
42
|
+
1. command = "task"
|
|
43
|
+
2. commandArgs = "fix the login bug"
|
|
44
|
+
3. npm root -g → `/opt/homebrew/lib/node_modules`
|
|
45
|
+
4. **Orchestrator**:
|
|
46
|
+
- Analyze: "login bug" → domains: [frontend, backend]
|
|
47
|
+
- Load agents: frontend.md, backend.md
|
|
48
|
+
- Invoke skills: ui-design, api-design
|
|
49
|
+
5. Read: `/opt/homebrew/lib/node_modules/prjct-cli/templates/commands/task.md`
|
|
50
|
+
6. Execute with: "fix the login bug" + orchestrator context
|
|
31
51
|
|
|
32
52
|
## Available Commands
|
|
33
53
|
|
|
34
|
-
`task` `done` `ship` `
|
|
54
|
+
**Core**: `task` `done` `ship` `pause` `resume`
|
|
55
|
+
**Project**: `init` `sync` `setup` `dash`
|
|
56
|
+
**Planning**: `plan` `prd` `spec` `design` `enrich`
|
|
57
|
+
**Queue**: `next` `idea` `bug`
|
|
58
|
+
**Integrations**: `linear` `jira` `github` `monday`
|
|
59
|
+
**Git**: `git` `merge` `review`
|
|
60
|
+
**Analysis**: `analyze` `history` `impact`
|
|
61
|
+
**Utils**: `cleanup` `update` `verify` `test` `undo` `redo` `serve` `auth` `skill`
|
|
62
|
+
|
|
63
|
+
## Orchestrator Output
|
|
64
|
+
|
|
65
|
+
When orchestrator runs, output:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
🎯 Task: {commandArgs}
|
|
69
|
+
|
|
70
|
+
📦 Context:
|
|
71
|
+
├── Agents: {loadedAgents}
|
|
72
|
+
├── Skills: {activeSkills}
|
|
73
|
+
└── Domain: {primaryDomain}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Then proceed with command execution.
|
|
35
77
|
|
|
36
78
|
## Action
|
|
37
79
|
|
|
38
|
-
NOW
|
|
80
|
+
NOW:
|
|
81
|
+
1. Run `npm root -g`
|
|
82
|
+
2. Check if command needs orchestrator
|
|
83
|
+
3. If yes: Read and execute orchestrator.md
|
|
84
|
+
4. Read the command template
|
|
85
|
+
5. Execute with full context
|