prjct-cli 0.55.2 → 0.55.3

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.
@@ -1,321 +0,0 @@
1
- ---
2
- allowed-tools: [Read, Write, Bash, AskUserQuestion]
3
- description: 'Base template for MCP-based issue tracker integrations (GitHub, Monday)'
4
- ---
5
-
6
- # Issue Tracker Base Template (MCP-based)
7
-
8
- **This is a BASE TEMPLATE for MCP-based trackers ONLY.**
9
-
10
- ## ⚠️ IMPORTANT: Which Trackers Use This Base
11
-
12
- | Tracker | Uses This Base? | Method |
13
- |---------|-----------------|--------|
14
- | GitHub Issues | ✅ YES | MCP |
15
- | Monday.com | ✅ YES | MCP |
16
- | **Linear** | ❌ NO | SDK (own template) |
17
- | **JIRA** | ❌ NO | SDK (own template) |
18
-
19
- **Linear and JIRA have their own complete templates that use SDK directly for 4x better performance.**
20
- **DO NOT extend this base for Linear or JIRA.**
21
-
22
- ---
23
-
24
- ## Common Context Variables
25
-
26
- - `{projectId}`: From `.prjct/prjct.config.json`
27
- - `{globalPath}`: `~/.prjct-cli/projects/{projectId}`
28
- - `{agentName}`: Name of the AI agent (Claude Code, Gemini CLI)
29
- - `{agentSettingsPath}`: Path to agent settings (settings.json)
30
- - `{args}`: User-provided arguments (subcommand)
31
- - `{tracker}`: The tracker name (linear, jira, github, monday)
32
- - `{mcpPrefix}`: MCP tool prefix (e.g., `mcp__linear__`, `mcp__atlassian__jira_`)
33
-
34
- ---
35
-
36
- ## Standard Subcommands
37
-
38
- All trackers MUST support these subcommands:
39
-
40
- | Command | Description |
41
- |---------|-------------|
42
- | `p. {tracker}` | Show status + your assigned issues |
43
- | `p. {tracker} setup` | Configure integration (REQUIRED FIRST) |
44
- | `p. {tracker} start <ID>` | Start working on issue |
45
- | `p. {tracker} comment <ID> <text>` | Add comment to issue |
46
-
47
- ---
48
-
49
- ## Step 1: Validate Project (COMMON)
50
-
51
- ```
52
- READ: .prjct/prjct.config.json
53
- EXTRACT: projectId
54
- SET: globalPath = ~/.prjct-cli/projects/{projectId}
55
-
56
- IF file not found:
57
- OUTPUT: "No prjct project. Run `p. init` first."
58
- STOP
59
- ```
60
-
61
- ---
62
-
63
- ## Step 2: Check Authentication (TRACKER-SPECIFIC)
64
-
65
- **Override this section per tracker.**
66
-
67
- Common patterns:
68
- - **MCP OAuth** (Linear, JIRA): First use opens browser
69
- - **API Token** (GitHub): Requires env var
70
- - **Both supported** (JIRA): OAuth preferred, token fallback
71
-
72
- ```
73
- # Check for existing config
74
- READ: {globalPath}/project.json → integrations.{tracker}
75
-
76
- IF config exists AND config.enabled:
77
- # Use existing credentials
78
- SET: authMode = config.authMode
79
- ELSE:
80
- # Need setup
81
- OUTPUT: "{TRACKER} not configured. Run `p. {tracker} setup` first."
82
- STOP
83
- ```
84
-
85
- ---
86
-
87
- ## Step 3: Install MCP Server (COMMON)
88
-
89
- ```
90
- READ: {agentSettingsPath} (create {} if not exists)
91
- CHECK: Does mcpServers.{mcpServerName} exist?
92
-
93
- IF not exists:
94
- MERGE MCP config:
95
- {
96
- "mcpServers": {
97
- "{mcpServerName}": {mcpConfig}
98
- }
99
- }
100
-
101
- WRITE: {agentSettingsPath}
102
-
103
- OUTPUT: "✅ Installed {TRACKER} MCP server"
104
- OUTPUT: ""
105
- OUTPUT: "⚠️ Restart your AI agent ({agentName}) to activate the MCP server."
106
- OUTPUT: "Then run `p. {tracker} setup` again to complete configuration."
107
- STOP
108
- ```
109
-
110
- ---
111
-
112
- ## Step 4: Check MCP Tools Available (COMMON)
113
-
114
- ```
115
- CHECK: Are {mcpPrefix}* tools available?
116
-
117
- IF not available:
118
- OUTPUT: "{TRACKER} MCP is installed but not yet active."
119
- OUTPUT: "Restart {agentName}, then run `p. {tracker} setup` again."
120
- STOP
121
- ```
122
-
123
- ---
124
-
125
- ## Subcommand: setup (COMMON FLOW)
126
-
127
- ### Flow
128
-
129
- 1. **Install MCP + Verify tools available**
130
- - Execute Step 3 (auto-install if needed)
131
- - Execute Step 4 (verify tools active)
132
- - IF not available: Prompt restart and STOP
133
-
134
- 2. **Test connection (TRACKER-SPECIFIC)**
135
- - Call list/get endpoint to verify auth
136
- - MCP OAuth may open browser on first call
137
-
138
- 3. **Get user info (TRACKER-SPECIFIC)**
139
- - Get current user
140
- - List available projects/teams
141
-
142
- 4. **Ask user to select project/team**
143
- ```
144
- ASK: "Select your default {project|team|board}"
145
- OPTIONS: List from step 3
146
- ```
147
-
148
- 5. **Save config to project.json**
149
- ```json
150
- {
151
- "integrations": {
152
- "{tracker}": {
153
- "enabled": true,
154
- "authMode": "{mcp|token}",
155
- "{projectKey}": "{selected}",
156
- "setupAt": "{timestamp}"
157
- }
158
- }
159
- }
160
- ```
161
-
162
- ### Output
163
-
164
- ```
165
- ✅ {TRACKER} configured
166
-
167
- {Connected as: {user} (if available)}
168
- {Project|Team}: {name}
169
- Auth: {authMode}
170
-
171
- Next: `p. {tracker}` to see your issues
172
- ```
173
-
174
- ---
175
-
176
- ## Subcommand: status (default, no args) - COMMON FLOW
177
-
178
- ```
179
- 1. Validate auth (Step 2)
180
- 2. Call list issues API with assignee filter
181
- 3. Format and display
182
-
183
- OUTPUT:
184
- {TRACKER}: Connected ✓
185
- {Project|Team}: {name}
186
-
187
- Your issues ({count}):
188
- • {ID-1} {title} ({status})
189
- • {ID-2} {title} ({status})
190
- ...
191
-
192
- Next: `p. {tracker} start {ID}` to begin work
193
- ```
194
-
195
- ---
196
-
197
- ## Subcommand: start <ID> - COMMON FLOW
198
-
199
- ```
200
- 1. Get issue by ID
201
- USE: {mcpPrefix}get_issue or equivalent
202
-
203
- 2. Update status to "In Progress"
204
- USE: {mcpPrefix}update_issue or transition
205
-
206
- 3. Create prjct task from issue
207
- - Extract title, description
208
- - Create task with linked issueId
209
-
210
- 4. Create git branch
211
- SET: branchName = {type}/{ID}-{slug}
212
- BASH: git checkout -b {branchName}
213
-
214
- OUTPUT:
215
- Started: {ID} - {title}
216
-
217
- Branch: {branchName}
218
- {TRACKER}: In Progress ✓
219
-
220
- Next: Work on the task, then `p. done`
221
- ```
222
-
223
- ---
224
-
225
- ## Subcommand: comment <ID> <text> - COMMON FLOW
226
-
227
- ```
228
- 1. Get issue ID (may need to lookup)
229
- 2. Add comment via MCP
230
-
231
- OUTPUT:
232
- Comment added to {ID}
233
- ```
234
-
235
- ---
236
-
237
- ## Config Storage (COMMON)
238
-
239
- | What | Where |
240
- |------|-------|
241
- | Auth | Varies: Env var, MCP OAuth, or keychain |
242
- | Config | `{globalPath}/project.json` → `integrations.{tracker}` |
243
- | Issue cache | `{globalPath}/storage/issues.json` (optional) |
244
-
245
- ---
246
-
247
- ## Error Handling (COMMON)
248
-
249
- | Error | Action |
250
- |-------|--------|
251
- | No project | "Run `p. init` first" |
252
- | Auth not configured | "Run `p. {tracker} setup` first" |
253
- | MCP tools not found | "Restart {agentName} after setup" |
254
- | Auth failed | Re-authenticate message |
255
- | Issue not found | "Issue {ID} not found in {TRACKER}" |
256
- | Rate limited | "Rate limited. Try again later" |
257
-
258
- ---
259
-
260
- ## Output Format (COMMON)
261
-
262
- ```
263
- {action}: {result}
264
-
265
- {details}
266
-
267
- Next: {suggested action}
268
- ```
269
-
270
- ---
271
-
272
- ## MCP Tool Mapping
273
-
274
- | Operation | Pattern |
275
- |-----------|---------|
276
- | List issues | `{mcpPrefix}list_issues` |
277
- | Get issue | `{mcpPrefix}get_issue` |
278
- | Update issue | `{mcpPrefix}update_issue` |
279
- | Create issue | `{mcpPrefix}create_issue` |
280
- | Add comment | `{mcpPrefix}create_comment` |
281
-
282
- ---
283
-
284
- ## Tracker-Specific Overrides
285
-
286
- When implementing a tracker:
287
-
288
- 1. **INHERIT** all common flows from this base
289
- 2. **OVERRIDE** authentication check with tracker-specific logic
290
- 3. **IMPLEMENT** MCP tool calls with correct tool names
291
- 4. **ADD** tracker-specific subcommands if needed
292
-
293
- ---
294
-
295
- ## Example Implementation Pattern
296
-
297
- ```markdown
298
- # p. {tracker} - {Tracker Name} Integration
299
-
300
- **EXTENDS**: `_bases/tracker-base.md`
301
-
302
- ## Tracker-Specific Config
303
-
304
- - `{mcpServerName}`: "{mcp server identifier}"
305
- - `{mcpPrefix}`: "{tool prefix}"
306
- - `{projectKey}`: "{what they call it - team, project, repo}"
307
-
308
- ## Authentication Override
309
-
310
- {Tracker-specific auth flow}
311
-
312
- ## MCP Tool Reference
313
-
314
- | Operation | MCP Tool |
315
- |-----------|----------|
316
- {Tracker-specific tool mappings}
317
-
318
- ## Additional Subcommands (if any)
319
-
320
- {Tracker-specific commands}
321
- ```
@@ -1,298 +0,0 @@
1
- ---
2
- allowed-tools: [Read, Write, Bash, AskUserQuestion]
3
- description: 'GitHub Issues integration via MCP'
4
- extends: '_bases/tracker-base.md'
5
- ---
6
-
7
- # p. github - GitHub Issues Integration
8
-
9
- **EXTENDS**: `_bases/tracker-base.md` - See base template for common flows.
10
-
11
- **ARGUMENTS**: $ARGUMENTS
12
-
13
- Manage GitHub Issues directly from prjct using MCP.
14
-
15
- ## Tracker-Specific Config
16
-
17
- - `{mcpServerName}`: "github"
18
- - `{mcpPrefix}`: "mcp__github__"
19
- - `{projectKey}`: "repo" (owner/repo)
20
-
21
- ## Context Variables
22
-
23
- - `{projectId}`: From `.prjct/prjct.config.json`
24
- - `{globalPath}`: `~/.prjct-cli/projects/{projectId}`
25
- - `{agentName}`: Name of the AI agent (Claude Code, Gemini CLI)
26
- - `{agentSettingsPath}`: Path to agent settings (settings.json)
27
- - `{args}`: User-provided arguments (subcommand)
28
-
29
- ---
30
-
31
- ## Subcommands
32
-
33
- | Command | Description |
34
- |---------|-------------|
35
- | `p. github` | Show your assigned issues |
36
- | `p. github setup` | Configure GitHub (first time) |
37
- | `p. github start <NUM>` | Start working on issue (e.g., #123) |
38
- | `p. github comment <NUM> <text>` | Add comment to issue |
39
-
40
- ---
41
-
42
- ## Authentication
43
-
44
- GitHub uses MCP with Personal Access Token.
45
-
46
- **MCP Server**: `@modelcontextprotocol/server-github`
47
- **Auth**: GITHUB_TOKEN env var (needs `repo` scope)
48
- **Tools prefix**: `mcp__github__*`
49
-
50
- ---
51
-
52
- ## Step 1: Validate Project
53
-
54
- ```
55
- READ: .prjct/prjct.config.json
56
- EXTRACT: projectId
57
- SET: globalPath = ~/.prjct-cli/projects/{projectId}
58
-
59
- IF file not found:
60
- OUTPUT: "No prjct project. Run `p. init` first."
61
- STOP
62
- ```
63
-
64
- ---
65
-
66
- ## Step 2: Check GITHUB_TOKEN
67
-
68
- ```
69
- CHECK: Is GITHUB_TOKEN env var set?
70
-
71
- IF not set:
72
- OUTPUT: "GitHub requires a Personal Access Token."
73
- OUTPUT: ""
74
- OUTPUT: "1. Create token at: https://github.com/settings/tokens"
75
- OUTPUT: "2. Select 'repo' scope"
76
- OUTPUT: "3. Set env var: export GITHUB_TOKEN=ghp_..."
77
- OUTPUT: "4. Run `p. github setup` again"
78
- STOP
79
- ```
80
-
81
- ---
82
-
83
- ## Step 3: Install MCP Server (if needed)
84
-
85
- ```
86
- READ: {agentSettingsPath} (create {} if not exists)
87
- CHECK: Does mcpServers.github exist?
88
-
89
- IF not exists:
90
- READ: templates/mcp-config.json
91
- EXTRACT: mcpServers.github
92
-
93
- MERGE into {agentSettingsPath}:
94
- {
95
- "mcpServers": {
96
- "github": {
97
- "command": "npx",
98
- "args": ["-y", "@modelcontextprotocol/server-github"],
99
- "env": {
100
- "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
101
- }
102
- }
103
- }
104
- }
105
-
106
- WRITE: {agentSettingsPath}
107
-
108
- OUTPUT: "✅ Installed GitHub MCP server"
109
- OUTPUT: ""
110
- OUTPUT: "⚠️ Restart {agentName} to activate the MCP server."
111
- OUTPUT: "Then run `p. github setup` again to complete configuration."
112
- STOP
113
- ```
114
-
115
- ---
116
-
117
- ## Step 4: Check MCP Tools Available
118
-
119
- ```
120
- CHECK: Are mcp__github__* tools available?
121
-
122
- IF not available:
123
- OUTPUT: "GitHub MCP is installed but not yet active."
124
- OUTPUT: "Restart {agentName}, then run `p. github setup` again."
125
- STOP
126
- ```
127
-
128
- ---
129
-
130
- ## Subcommand: setup
131
-
132
- ### Flow
133
-
134
- 1. **Check token + Install MCP + Verify tools**
135
- ```
136
- Execute Step 2 (check GITHUB_TOKEN)
137
- Execute Step 3 (auto-install MCP if needed)
138
- Execute Step 4 (verify tools active)
139
- IF not available: Prompt restart and STOP
140
- ```
141
-
142
- 2. **Detect repo from git remote**
143
- ```bash
144
- git remote get-url origin
145
- # Extract owner/repo
146
- ```
147
-
148
- 3. **Test connection**
149
- ```
150
- USE TOOL: mcp__github__list_issues
151
- PARAMS:
152
- owner: "{owner}"
153
- repo: "{repo}"
154
- state: "open"
155
- per_page: 1
156
- ```
157
-
158
- 4. **Save config to project.json**
159
- ```json
160
- {
161
- "integrations": {
162
- "github": {
163
- "enabled": true,
164
- "authMode": "token",
165
- "owner": "{owner}",
166
- "repo": "{repo}",
167
- "setupAt": "{timestamp}"
168
- }
169
- }
170
- }
171
- ```
172
-
173
- ### Output
174
-
175
- ```
176
- ✅ GitHub configured
177
-
178
- Repo: {owner}/{repo}
179
- Auth: Token (GITHUB_TOKEN)
180
-
181
- Next: `p. github` to see your issues
182
- ```
183
-
184
- ---
185
-
186
- ## Subcommand: status (default, no args)
187
-
188
- ```
189
- USE TOOL: mcp__github__list_issues
190
- PARAMS:
191
- owner: "{owner}"
192
- repo: "{repo}"
193
- state: "open"
194
- assignee: "@me"
195
- per_page: 10
196
-
197
- OUTPUT:
198
- GitHub: Connected ✓
199
- Repo: {owner}/{repo}
200
-
201
- Your issues ({count}):
202
- • #{123} {title} ({state})
203
- • #{124} {title} ({state})
204
- ...
205
-
206
- Next: `p. github start 123` to begin work
207
- ```
208
-
209
- ---
210
-
211
- ## Subcommand: start <NUM>
212
-
213
- ```
214
- 1. Get issue
215
- USE TOOL: mcp__github__get_issue
216
- PARAMS:
217
- owner: "{owner}"
218
- repo: "{repo}"
219
- issue_number: {NUM}
220
-
221
- 2. Add "in progress" label (if exists)
222
- USE TOOL: mcp__github__update_issue
223
- PARAMS:
224
- labels: ["in progress"]
225
-
226
- 3. Create prjct task from issue
227
-
228
- 4. Create git branch: feature/{NUM}-{slug}
229
-
230
- OUTPUT:
231
- Started: #{NUM} - {title}
232
-
233
- Branch: feature/123-add-feature
234
- GitHub: In Progress ✓
235
-
236
- Next: Work on the task, then `p. done`
237
- ```
238
-
239
- ---
240
-
241
- ## Subcommand: comment <NUM> <text>
242
-
243
- ```
244
- USE TOOL: mcp__github__create_issue_comment
245
- PARAMS:
246
- owner: "{owner}"
247
- repo: "{repo}"
248
- issue_number: {NUM}
249
- body: "{text}"
250
-
251
- OUTPUT:
252
- Comment added to #{NUM}
253
- ```
254
-
255
- ---
256
-
257
- ## MCP Tool Reference
258
-
259
- | Operation | MCP Tool |
260
- |-----------|----------|
261
- | List issues | `mcp__github__list_issues` |
262
- | Get issue | `mcp__github__get_issue` |
263
- | Create issue | `mcp__github__create_issue` |
264
- | Update issue | `mcp__github__update_issue` |
265
- | Add comment | `mcp__github__create_issue_comment` |
266
- | Search issues | `mcp__github__search_issues` |
267
-
268
- ---
269
-
270
- ## Config Storage
271
-
272
- | What | Where |
273
- |------|-------|
274
- | Auth | GITHUB_TOKEN env var |
275
- | Config | `{globalPath}/project.json` → `integrations.github` |
276
-
277
- ---
278
-
279
- ## Error Handling
280
-
281
- | Error | Action |
282
- |-------|--------|
283
- | MCP tools not found | "Set GITHUB_TOKEN and add MCP config" |
284
- | Token invalid | "Check GITHUB_TOKEN has repo scope" |
285
- | Issue not found | "Issue #{NUM} not found" |
286
- | Rate limited | "GitHub API rate limited. Try again later" |
287
-
288
- ---
289
-
290
- ## Output Format
291
-
292
- ```
293
- {action}: {result}
294
-
295
- {details}
296
-
297
- Next: {suggested action}
298
- ```