prjct-cli 0.28.1 → 0.28.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.
- package/CHANGELOG.md +93 -0
- package/core/agentic/index.ts +11 -1
- package/core/agentic/prompt-builder.ts +2 -2
- package/core/agentic/token-estimator.ts +264 -0
- package/core/commands/command-data.ts +0 -33
- package/core/commands/commands.ts +4 -12
- package/core/commands/registry.ts +0 -37
- package/core/index.ts +0 -2
- package/core/infrastructure/setup.ts +28 -0
- package/core/infrastructure/slash-command-registry.ts +176 -0
- package/core/types/config.ts +1 -1
- package/core/types/index.ts +0 -2
- package/core/types/integrations.ts +22 -40
- package/core/types/storage.ts +0 -8
- package/core/types/task.ts +0 -4
- package/dist/bin/prjct.mjs +3 -82
- package/package.json +1 -1
- package/templates/agentic/subagent-generation.md +241 -81
- package/templates/commands/init.md +1 -44
- package/templates/commands/ship.md +106 -81
- package/templates/commands/sync.md +154 -402
- package/templates/commands/task.md +14 -31
- package/templates/global/CLAUDE.md +166 -35
- package/templates/guides/agent-generation.md +164 -0
- package/templates/guides/integrations.md +149 -0
- package/templates/mcp-config.json +23 -46
- package/templates/shared/validation.md +75 -0
- package/CLAUDE.md +0 -170
- package/core/integrations/notion/client.ts +0 -413
- package/core/integrations/notion/index.ts +0 -46
- package/core/integrations/notion/setup.ts +0 -235
- package/core/integrations/notion/sync.ts +0 -818
- package/core/integrations/notion/templates.ts +0 -246
- package/core/plugin/builtin/notion.ts +0 -178
- package/templates/agentic/agents/uxui.md +0 -218
- package/templates/commands/feature.md +0 -46
- package/templates/commands/now.md +0 -53
- package/templates/skills/notion-push.md +0 -116
- package/templates/skills/notion-setup.md +0 -199
- package/templates/skills/notion-sync.md +0 -290
- package/templates/subagents/domain/backend.md +0 -106
- package/templates/subagents/domain/database.md +0 -118
- package/templates/subagents/domain/devops.md +0 -149
- package/templates/subagents/domain/frontend.md +0 -100
- package/templates/subagents/domain/testing.md +0 -166
|
@@ -219,44 +219,27 @@ If anything is unclear, use AskUserQuestion.
|
|
|
219
219
|
If everything is clear, say so and continue.
|
|
220
220
|
|
|
221
221
|
### Phase 4: Design
|
|
222
|
-
Load relevant agents from `{globalPath}/agents/` and their linked skills:
|
|
223
222
|
|
|
224
|
-
**
|
|
223
|
+
**Load agents + auto-invoke skills + query MCP docs.**
|
|
224
|
+
|
|
225
|
+
See `templates/guides/integrations.md` for skill/MCP details.
|
|
226
|
+
|
|
225
227
|
```
|
|
226
|
-
FOR EACH relevant agent
|
|
227
|
-
READ
|
|
228
|
-
PARSE frontmatter →
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
FOR EACH skill in skills:
|
|
232
|
-
Invoke Skill(skill) for domain expertise
|
|
233
|
-
OUTPUT: "📚 {agent} using /{skill}"
|
|
228
|
+
FOR EACH relevant agent:
|
|
229
|
+
1. READ: {globalPath}/agents/{domain}.md
|
|
230
|
+
2. PARSE frontmatter → skills, mcp
|
|
231
|
+
3. FOR skill in frontmatter.skills: Invoke Skill(skill) → "🎯 Activated"
|
|
232
|
+
4. FOR mcp in frontmatter.mcp: Query context7 for docs → "📚 Loaded"
|
|
234
233
|
```
|
|
235
234
|
|
|
236
|
-
**
|
|
237
|
-
1. Load `uxui.md` agent (has `skills: [frontend-design]`)
|
|
238
|
-
2. Invoke `/frontend-design` skill
|
|
239
|
-
3. Skill provides anti-AI-slop patterns, typography guidelines
|
|
240
|
-
4. Agent applies them to design options
|
|
241
|
-
|
|
242
|
-
Propose 2-3 approaches:
|
|
235
|
+
**Propose 2-3 options** using skill context + library docs:
|
|
243
236
|
|
|
244
237
|
```
|
|
245
238
|
### Option 1: Minimal
|
|
246
|
-
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
### Option 2: Clean Architecture
|
|
251
|
-
- Approach: {desc}
|
|
252
|
-
- Files: {count}
|
|
253
|
-
- Pros/Cons: ...
|
|
254
|
-
|
|
255
|
-
### Option 3: Recommended (Skill-informed)
|
|
256
|
-
- Approach: {desc}
|
|
257
|
-
- Files: {count}
|
|
258
|
-
- Pros/Cons: ...
|
|
259
|
-
- Skills applied: {skills}
|
|
239
|
+
- Files: {count}, Pros/Cons: ...
|
|
240
|
+
|
|
241
|
+
### Option 2: Recommended (Skill-informed)
|
|
242
|
+
- Files: {count}, Skills applied: {skills}
|
|
260
243
|
```
|
|
261
244
|
|
|
262
245
|
Use AskUserQuestion to get approval.
|
|
@@ -5,19 +5,155 @@
|
|
|
5
5
|
|
|
6
6
|
## HOW TO USE PRJCT (Read This First)
|
|
7
7
|
|
|
8
|
-
When user types `p. <command>`,
|
|
8
|
+
When user types `p. <command>`, resolve the command in this order:
|
|
9
|
+
|
|
10
|
+
### Command Resolution Order
|
|
11
|
+
|
|
12
|
+
1. **Quick Commands (User-defined)**: `~/.prjct-cli/commands/{command}.md`
|
|
13
|
+
2. **Built-in Commands**: `templates/commands/{command}.md`
|
|
9
14
|
|
|
10
15
|
```
|
|
11
|
-
p. sync → templates/commands/sync.md
|
|
12
|
-
p. task X → templates/commands/task.md
|
|
13
|
-
p.
|
|
14
|
-
p.
|
|
16
|
+
p. sync → templates/commands/sync.md (built-in)
|
|
17
|
+
p. task X → templates/commands/task.md (built-in)
|
|
18
|
+
p. deploy → ~/.prjct-cli/commands/deploy.md (user quick command)
|
|
19
|
+
p. test → ~/.prjct-cli/commands/test.md (user quick command)
|
|
15
20
|
```
|
|
16
21
|
|
|
17
22
|
**Key Insight**: Templates are GUIDANCE, not scripts. Use your intelligence to adapt them to the situation.
|
|
18
23
|
|
|
19
24
|
---
|
|
20
25
|
|
|
26
|
+
## QUICK COMMANDS (User-Defined)
|
|
27
|
+
|
|
28
|
+
Users can create custom commands in `~/.prjct-cli/commands/`. These are checked FIRST before built-in commands.
|
|
29
|
+
|
|
30
|
+
### Command Format (Full)
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
---
|
|
34
|
+
# Required
|
|
35
|
+
description: Brief explanation shown in help
|
|
36
|
+
|
|
37
|
+
# Optional - Execution control
|
|
38
|
+
agent: {agent-name} # Which agent executes (e.g., "testing", "frontend")
|
|
39
|
+
model: sonnet # Override model (sonnet | opus | haiku)
|
|
40
|
+
temperature: 0.3 # Override temperature (0.0-1.0)
|
|
41
|
+
|
|
42
|
+
# Optional - Permissions for this command
|
|
43
|
+
permissions:
|
|
44
|
+
Bash: allow # Override default permissions
|
|
45
|
+
"npm *": allow
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
{Prompt template with variables and shell injection}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Variable Substitution
|
|
52
|
+
|
|
53
|
+
| Variable | Description | Example |
|
|
54
|
+
|----------|-------------|---------|
|
|
55
|
+
| `$ARGUMENTS` | All arguments concatenated | `p. test src/` → "src/" |
|
|
56
|
+
| `$1`, `$2`, `$3`... | Positional arguments | `p. diff main dev` → $1="main", $2="dev" |
|
|
57
|
+
|
|
58
|
+
### Shell Injection
|
|
59
|
+
|
|
60
|
+
Use `` !`command` `` to embed shell output:
|
|
61
|
+
|
|
62
|
+
```yaml
|
|
63
|
+
---
|
|
64
|
+
description: Review current branch changes
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
# Branch: !`git branch --show-current`
|
|
68
|
+
|
|
69
|
+
## Recent Commits
|
|
70
|
+
!`git log --oneline -5`
|
|
71
|
+
|
|
72
|
+
## Changed Files
|
|
73
|
+
!`git diff --name-only`
|
|
74
|
+
|
|
75
|
+
Review these changes for:
|
|
76
|
+
- Code quality issues
|
|
77
|
+
- Security vulnerabilities
|
|
78
|
+
- Missing tests
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### File References
|
|
82
|
+
|
|
83
|
+
Use `@filepath` to include file contents:
|
|
84
|
+
|
|
85
|
+
```yaml
|
|
86
|
+
---
|
|
87
|
+
description: Review a specific component
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
Review the component in @$1 for:
|
|
91
|
+
- Performance issues
|
|
92
|
+
- Accessibility
|
|
93
|
+
- Best practices
|
|
94
|
+
|
|
95
|
+
Suggest improvements.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Example Commands
|
|
99
|
+
|
|
100
|
+
**~/.prjct-cli/commands/test.md**
|
|
101
|
+
```yaml
|
|
102
|
+
---
|
|
103
|
+
description: Run and fix tests
|
|
104
|
+
agent: testing
|
|
105
|
+
permissions:
|
|
106
|
+
Bash: allow
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
Run tests for $ARGUMENTS. If any fail, analyze and fix them.
|
|
110
|
+
|
|
111
|
+
Current test status:
|
|
112
|
+
!`{project test command} --reporter=dot 2>&1 | tail -20`
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**~/.prjct-cli/commands/pr.md**
|
|
116
|
+
```yaml
|
|
117
|
+
---
|
|
118
|
+
description: Create PR with AI-generated description
|
|
119
|
+
permissions:
|
|
120
|
+
Bash:
|
|
121
|
+
"git *": allow
|
|
122
|
+
"gh *": allow
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
Create a pull request for branch !`git branch --show-current`.
|
|
126
|
+
|
|
127
|
+
Changes since main:
|
|
128
|
+
!`git log main..HEAD --oneline`
|
|
129
|
+
|
|
130
|
+
Files changed:
|
|
131
|
+
!`git diff --stat main`
|
|
132
|
+
|
|
133
|
+
Generate a descriptive PR title and body based on these changes.
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
**~/.prjct-cli/commands/component.md**
|
|
137
|
+
```yaml
|
|
138
|
+
---
|
|
139
|
+
description: Create a new React component
|
|
140
|
+
agent: frontend
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
Create a new React component named $1 in the appropriate directory.
|
|
144
|
+
|
|
145
|
+
Follow existing patterns from:
|
|
146
|
+
@src/components/Button.tsx
|
|
147
|
+
|
|
148
|
+
Match the project's:
|
|
149
|
+
- File structure
|
|
150
|
+
- Naming conventions
|
|
151
|
+
- Styling approach
|
|
152
|
+
- Type patterns
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
21
157
|
## CRITICAL RULES
|
|
22
158
|
|
|
23
159
|
### 1. Path Resolution (MOST IMPORTANT)
|
|
@@ -181,52 +317,47 @@ These agents contain project-specific patterns. **USE THEM**.
|
|
|
181
317
|
|
|
182
318
|
---
|
|
183
319
|
|
|
184
|
-
##
|
|
320
|
+
## INTEGRATIONS (v0.27+)
|
|
185
321
|
|
|
186
|
-
|
|
322
|
+
Skills and MCP servers are auto-configured during `/p:sync`.
|
|
187
323
|
|
|
188
|
-
**
|
|
324
|
+
**See:** `templates/guides/integrations.md` for complete documentation.
|
|
189
325
|
|
|
190
|
-
###
|
|
326
|
+
### Quick Reference
|
|
191
327
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
328
|
+
| Feature | What Happens |
|
|
329
|
+
|---------|--------------|
|
|
330
|
+
| **Skills** | Auto-invoked when agent loads (`skills: [skill-name]`) |
|
|
331
|
+
| **MCP** | Auto-queried for library docs (`mcp: [context7]`) |
|
|
195
332
|
|
|
196
|
-
###
|
|
333
|
+
### Pipeline
|
|
197
334
|
|
|
198
335
|
```
|
|
199
|
-
|
|
200
|
-
1. Read search hints from templates/config/skill-mappings.json
|
|
201
|
-
2. Search: https://claude-plugins.dev/skills?q={searchTerm}
|
|
202
|
-
3. Analyze results (prefer @anthropics, high downloads)
|
|
203
|
-
4. Download skill markdown from GitHub
|
|
204
|
-
5. Write to ~/.claude/skills/{name}.md
|
|
205
|
-
6. Update agent frontmatter
|
|
336
|
+
Load Agent → Invoke Skills → Query MCP → Execute with Context
|
|
206
337
|
```
|
|
207
338
|
|
|
208
|
-
|
|
339
|
+
---
|
|
209
340
|
|
|
210
|
-
|
|
211
|
-
|-------|-------------|
|
|
212
|
-
| `frontend.md` | "frontend-design", "react", "ui components" |
|
|
213
|
-
| `uxui.md` | "ux-designer", "frontend-design", "ui ux" |
|
|
214
|
-
| `backend.md` | "{ecosystem} backend", "api design" |
|
|
215
|
-
| `testing.md` | "testing automation", "test patterns" |
|
|
216
|
-
| `devops.md` | "devops", "ci cd", "docker kubernetes" |
|
|
217
|
-
| `prjct-planner.md` | "architecture patterns", "feature development" |
|
|
218
|
-
| `prjct-shipper.md` | "code review", "pr review" |
|
|
341
|
+
## CLAUDE CODE SYNERGY
|
|
219
342
|
|
|
220
|
-
|
|
343
|
+
prjct is designed to maximize Claude Code's capabilities:
|
|
221
344
|
|
|
222
|
-
|
|
345
|
+
### Slash Commands
|
|
346
|
+
All `/p:*` commands are optimized for Claude Code execution.
|
|
223
347
|
|
|
224
|
-
###
|
|
348
|
+
### Agent System
|
|
349
|
+
Domain agents (`frontend.md`, `backend.md`, etc.) integrate with Claude's Task tool.
|
|
350
|
+
|
|
351
|
+
### Skill + MCP Pipeline
|
|
352
|
+
```
|
|
353
|
+
Task → Load Agent → Invoke Skills → Query MCP → Execute with Full Context
|
|
354
|
+
```
|
|
225
355
|
|
|
226
|
-
|
|
356
|
+
### Think Blocks
|
|
357
|
+
Destructive commands (`/p:ship`, `/p:cleanup`) use `<think>` blocks for verification.
|
|
227
358
|
|
|
228
359
|
---
|
|
229
360
|
|
|
230
|
-
**Auto-managed by prjct-cli** | https://prjct.app | v0.
|
|
361
|
+
**Auto-managed by prjct-cli** | https://prjct.app | v0.28.3
|
|
231
362
|
|
|
232
363
|
<!-- prjct:end - DO NOT REMOVE THIS MARKER -->
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# Agent Generation Guide
|
|
2
|
+
|
|
3
|
+
Complete guide for generating domain-specific agents. Referenced by `/p:sync`.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Agents are generated from **REAL analysis** of the repository, not templates. You must:
|
|
8
|
+
1. **ANALYZE** the actual codebase deeply
|
|
9
|
+
2. **EXTRACT** real patterns, conventions, and examples
|
|
10
|
+
3. **GENERATE** agents that enforce those exact patterns
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Step 1: Find Representative Files
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Frontend: Component files
|
|
18
|
+
find . -type f \( -name "*.tsx" -o -name "*.vue" -o -name "*.svelte" \) -not -path "*/node_modules/*" | head -10
|
|
19
|
+
|
|
20
|
+
# Backend: API/route files
|
|
21
|
+
find . -type f -name "*.ts" -path "*/api/*" -o -path "*/routes/*" | head -10
|
|
22
|
+
|
|
23
|
+
# Database: Schema/model files
|
|
24
|
+
find . -type f \( -name "schema.prisma" -o -name "*.model.ts" \) | head -5
|
|
25
|
+
|
|
26
|
+
# Tests: Test files
|
|
27
|
+
find . -type f \( -name "*.test.ts" -o -name "*.spec.ts" \) | head -10
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Step 2: Analyze Actual Code
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
FOR EACH domain detected:
|
|
36
|
+
1. READ 3-5 representative files
|
|
37
|
+
2. EXTRACT patterns:
|
|
38
|
+
- File structure
|
|
39
|
+
- Naming conventions
|
|
40
|
+
- Import patterns
|
|
41
|
+
- Code style
|
|
42
|
+
- Architecture patterns
|
|
43
|
+
- Error handling
|
|
44
|
+
- Type patterns
|
|
45
|
+
3. IDENTIFY project-specific conventions
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Check existing style guides:
|
|
49
|
+
```bash
|
|
50
|
+
ls -la .eslintrc* .prettierrc* tsconfig.json biome.json 2>/dev/null
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Step 3: Agent Frontmatter Format
|
|
56
|
+
|
|
57
|
+
```yaml
|
|
58
|
+
---
|
|
59
|
+
name: {domain}
|
|
60
|
+
agentId: p.agent.{domain}
|
|
61
|
+
description: {Domain} specialist for {stack}. Use PROACTIVELY for {triggers}.
|
|
62
|
+
model: sonnet
|
|
63
|
+
temperature: {0.0-1.0}
|
|
64
|
+
maxSteps: {50-100}
|
|
65
|
+
tools:
|
|
66
|
+
Read: true
|
|
67
|
+
Write: true
|
|
68
|
+
Edit: true
|
|
69
|
+
Bash: true
|
|
70
|
+
Glob: true
|
|
71
|
+
Grep: true
|
|
72
|
+
permissions:
|
|
73
|
+
Read: allow
|
|
74
|
+
Write: allow
|
|
75
|
+
Edit: allow
|
|
76
|
+
Bash:
|
|
77
|
+
"git *": allow
|
|
78
|
+
"{test command}": allow
|
|
79
|
+
"rm -rf *": deny
|
|
80
|
+
skills: [{detected-skill}]
|
|
81
|
+
mcp: [{detected-mcp}]
|
|
82
|
+
generatedAt: {timestamp}
|
|
83
|
+
---
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Step 4: Agent Body Structure
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
# {Domain} Agent for {ProjectName}
|
|
92
|
+
|
|
93
|
+
## Stack Detected
|
|
94
|
+
{List EXACT technologies: "React 18, TypeScript 5.3, Tailwind 3.4"}
|
|
95
|
+
|
|
96
|
+
## Project Structure
|
|
97
|
+
{ACTUAL directory structure}
|
|
98
|
+
|
|
99
|
+
## Code Patterns (MUST FOLLOW)
|
|
100
|
+
|
|
101
|
+
### File Naming
|
|
102
|
+
{EXACT convention: "PascalCase for components"}
|
|
103
|
+
|
|
104
|
+
### Component/Module Structure
|
|
105
|
+
{ACTUAL example from codebase}
|
|
106
|
+
|
|
107
|
+
### Import Patterns
|
|
108
|
+
{ACTUAL import style}
|
|
109
|
+
|
|
110
|
+
### Error Handling
|
|
111
|
+
{ACTUAL error pattern}
|
|
112
|
+
|
|
113
|
+
## Quality Checklist
|
|
114
|
+
- [ ] Follows naming convention
|
|
115
|
+
- [ ] Uses correct import style
|
|
116
|
+
- [ ] Matches existing structure
|
|
117
|
+
|
|
118
|
+
## Commands
|
|
119
|
+
| Action | Command |
|
|
120
|
+
|--------|---------|
|
|
121
|
+
| Dev | `{actual command}` |
|
|
122
|
+
| Test | `{actual command}` |
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Configuration Values
|
|
128
|
+
|
|
129
|
+
**Temperature** (by domain):
|
|
130
|
+
- `0.1` - Database, migrations (precise)
|
|
131
|
+
- `0.2` - Backend, testing (deterministic)
|
|
132
|
+
- `0.3` - Frontend (some creativity)
|
|
133
|
+
- `0.4` - UX/UI (creative)
|
|
134
|
+
|
|
135
|
+
**maxSteps** (by complexity):
|
|
136
|
+
- `50` - Single file changes
|
|
137
|
+
- `75` - Multi-file features
|
|
138
|
+
- `100` - Complex refactors
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Domain Detection Table
|
|
143
|
+
|
|
144
|
+
| If You Find | Generate | Key Files |
|
|
145
|
+
|-------------|----------|-----------|
|
|
146
|
+
| React/Vue/Svelte | `frontend.md` | Components, hooks |
|
|
147
|
+
| Express/Fastify/Hono | `backend.md` | Routes, services |
|
|
148
|
+
| Prisma/Drizzle/SQL | `database.md` | Schema, migrations |
|
|
149
|
+
| Docker/K8s/Actions | `devops.md` | Dockerfile, workflows |
|
|
150
|
+
| Jest/Vitest/Pytest | `testing.md` | Test files |
|
|
151
|
+
| UI + design system | `uxui.md` | Design tokens |
|
|
152
|
+
|
|
153
|
+
Generate agents for **any domain present** - not limited to this list.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Output Format
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
🤖 Generated: {agent}.md
|
|
161
|
+
Stack: {technologies}
|
|
162
|
+
Patterns: {count} from {files}
|
|
163
|
+
Path: {globalPath}/agents/{agent}.md
|
|
164
|
+
```
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Integrations Guide
|
|
2
|
+
|
|
3
|
+
Skills and MCP server integration for prjct agents.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Skills Integration
|
|
8
|
+
|
|
9
|
+
### Overview
|
|
10
|
+
|
|
11
|
+
Skills are Claude Code extensions from `claude-plugins.dev` that provide domain expertise.
|
|
12
|
+
|
|
13
|
+
### How Skills Work
|
|
14
|
+
|
|
15
|
+
1. **Discovery** (`/p:sync`): Search marketplace, install matches
|
|
16
|
+
2. **Linking**: Agent frontmatter has `skills: [skill-name]`
|
|
17
|
+
3. **Invocation** (`/p:task`): Skills auto-invoked when agent loads
|
|
18
|
+
|
|
19
|
+
### Skill Flow
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
p. task @frontend add button
|
|
23
|
+
↓
|
|
24
|
+
Load frontend.md (skills: [frontend-design])
|
|
25
|
+
↓
|
|
26
|
+
Auto-invoke: Skill("frontend-design")
|
|
27
|
+
↓
|
|
28
|
+
Skill context active for design decisions
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Skill Location
|
|
32
|
+
|
|
33
|
+
- Installed: `~/.claude/skills/`
|
|
34
|
+
- Mapping: `{globalPath}/config/skills.json`
|
|
35
|
+
|
|
36
|
+
### Search Terms by Agent
|
|
37
|
+
|
|
38
|
+
| Agent | Search Terms |
|
|
39
|
+
|-------|-------------|
|
|
40
|
+
| frontend | "frontend-design", "react", "ui" |
|
|
41
|
+
| backend | "{ecosystem} backend", "api" |
|
|
42
|
+
| uxui | "ux-designer", "ui ux" |
|
|
43
|
+
| testing | "testing", "test patterns" |
|
|
44
|
+
| devops | "devops", "ci cd" |
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## MCP Server Integration
|
|
49
|
+
|
|
50
|
+
### Overview
|
|
51
|
+
|
|
52
|
+
MCP (Model Context Protocol) servers provide external capabilities like documentation lookup.
|
|
53
|
+
|
|
54
|
+
### How MCP Works
|
|
55
|
+
|
|
56
|
+
1. **Configuration** (`/p:sync`): Analyze deps, configure servers
|
|
57
|
+
2. **Linking**: Agent frontmatter has `mcp: [server-name]`
|
|
58
|
+
3. **Usage** (`/p:task`): Agents auto-query MCP for docs
|
|
59
|
+
|
|
60
|
+
### MCP Flow
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
p. task @backend add API endpoint
|
|
64
|
+
↓
|
|
65
|
+
Load backend.md (mcp: [context7])
|
|
66
|
+
↓
|
|
67
|
+
Auto-query: context7 for Hono/Express docs
|
|
68
|
+
↓
|
|
69
|
+
Documentation context available
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Available Servers
|
|
73
|
+
|
|
74
|
+
| Server | Purpose | Tools |
|
|
75
|
+
|--------|---------|-------|
|
|
76
|
+
| context7 | Library docs | resolve-library-id, query-docs |
|
|
77
|
+
|
|
78
|
+
### Per-Project Configuration
|
|
79
|
+
|
|
80
|
+
Path: `{globalPath}/config/mcp-servers.json`
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"servers": {
|
|
85
|
+
"context7": {
|
|
86
|
+
"command": "npx",
|
|
87
|
+
"args": ["-y", "@upstash/context7-mcp@latest"],
|
|
88
|
+
"enabled": true
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"agentMcpMap": {
|
|
92
|
+
"frontend": ["context7"],
|
|
93
|
+
"backend": ["context7"],
|
|
94
|
+
"database": ["context7"]
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Agent-MCP Guidelines
|
|
100
|
+
|
|
101
|
+
| Agent | Needs MCP? | Reason |
|
|
102
|
+
|-------|------------|--------|
|
|
103
|
+
| frontend | Yes | Component library docs |
|
|
104
|
+
| backend | Yes | Framework docs |
|
|
105
|
+
| database | Yes | ORM docs |
|
|
106
|
+
| devops | Rarely | Uses bash commands |
|
|
107
|
+
| prjct-* | Sometimes | Framework planning |
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Combined Pipeline
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
Task Input
|
|
115
|
+
↓
|
|
116
|
+
Load Agent (frontmatter)
|
|
117
|
+
├── skills: [skill1, skill2]
|
|
118
|
+
└── mcp: [context7]
|
|
119
|
+
↓
|
|
120
|
+
Auto-Invoke Skills
|
|
121
|
+
↓
|
|
122
|
+
Auto-Query MCP Docs
|
|
123
|
+
↓
|
|
124
|
+
Execute with Full Context
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Configuration During Sync
|
|
130
|
+
|
|
131
|
+
### Skills Configuration
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
FOR EACH agent generated:
|
|
135
|
+
1. Determine search terms
|
|
136
|
+
2. Search claude-plugins.dev
|
|
137
|
+
3. Install matching skills
|
|
138
|
+
4. Update agent frontmatter
|
|
139
|
+
5. Save to config/skills.json
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### MCP Configuration
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
FOR EACH agent generated:
|
|
146
|
+
1. Check if uses external libraries
|
|
147
|
+
2. If yes, add context7 to mcp
|
|
148
|
+
3. Save to config/mcp-servers.json
|
|
149
|
+
```
|
|
@@ -1,55 +1,32 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"_comment": "REFERENCE ONLY - MCP config is generated agentically per-project in ~/.prjct-cli/projects/{id}/config/mcp-servers.json",
|
|
3
|
+
"knownServers": {
|
|
3
4
|
"context7": {
|
|
5
|
+
"name": "context7",
|
|
6
|
+
"description": "Upstash Context7 - Library/framework documentation lookup",
|
|
4
7
|
"command": "npx",
|
|
5
8
|
"args": ["-y", "@upstash/context7-mcp@latest"],
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"args": ["-y", "@notionhq/notion-mcp-server"],
|
|
11
|
-
"env": {
|
|
12
|
-
"OPENAPI_MCP_HEADERS": "{\"Authorization\": \"Bearer ${NOTION_TOKEN}\", \"Notion-Version\": \"2022-06-28\"}"
|
|
13
|
-
},
|
|
14
|
-
"description": "Notion integration for prjct dashboards and progress tracking (optional)"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"usage": {
|
|
18
|
-
"context7": {
|
|
19
|
-
"when": [
|
|
20
|
-
"Looking up official documentation for any library/framework",
|
|
21
|
-
"Implementing features using specific libraries (React, Next.js, etc)",
|
|
22
|
-
"Checking API references and best practices",
|
|
23
|
-
"Troubleshooting library-specific issues"
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"Project uses external libraries/frameworks",
|
|
11
|
+
"Agents need to look up API documentation",
|
|
12
|
+
"Working with React, Vue, Next.js, Express, Prisma, etc."
|
|
24
13
|
],
|
|
25
14
|
"tools": [
|
|
26
|
-
"resolve-library-id: Find library ID from name
|
|
27
|
-
"
|
|
28
|
-
],
|
|
29
|
-
"examples": [
|
|
30
|
-
"resolve-library-id('nextjs') → get-library-docs('/vercel/next.js', 'app router')",
|
|
31
|
-
"resolve-library-id('tailwindcss') → get-library-docs('/tailwindlabs/tailwindcss', 'configuration')"
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
"notion": {
|
|
35
|
-
"when": [
|
|
36
|
-
"Syncing shipped features to Notion (auto on /p:ship)",
|
|
37
|
-
"Syncing ideas to Notion (auto on /p:idea)",
|
|
38
|
-
"Creating prjct databases during /p:init",
|
|
39
|
-
"Manual sync with /p:notion sync"
|
|
40
|
-
],
|
|
41
|
-
"tools": [
|
|
42
|
-
"notion_create_database: Create a new database",
|
|
43
|
-
"notion_create_page: Create a page in a database",
|
|
44
|
-
"notion_update_page: Update an existing page",
|
|
45
|
-
"notion_query_database: Query database entries"
|
|
46
|
-
],
|
|
47
|
-
"setup": [
|
|
48
|
-
"1. Create integration at https://www.notion.so/my-integrations",
|
|
49
|
-
"2. Set NOTION_TOKEN environment variable",
|
|
50
|
-
"3. Share a parent page with the integration",
|
|
51
|
-
"4. Run /p:notion setup to create databases"
|
|
15
|
+
"resolve-library-id: Find library ID from name",
|
|
16
|
+
"query-docs: Fetch documentation for a library"
|
|
52
17
|
]
|
|
53
18
|
}
|
|
54
|
-
}
|
|
19
|
+
},
|
|
20
|
+
"agentMcpGuidelines": {
|
|
21
|
+
"frontend": "Usually needs context7 for component library docs",
|
|
22
|
+
"backend": "Usually needs context7 for framework docs",
|
|
23
|
+
"database": "Usually needs context7 for ORM docs",
|
|
24
|
+
"uxui": "Usually needs context7 for UI library docs",
|
|
25
|
+
"testing": "May need context7 for testing library docs",
|
|
26
|
+
"devops": "Rarely needs MCP, uses bash commands",
|
|
27
|
+
"prjct-planner": "May need context7 for framework planning",
|
|
28
|
+
"prjct-shipper": "Rarely needs MCP",
|
|
29
|
+
"prjct-workflow": "Never needs MCP"
|
|
30
|
+
},
|
|
31
|
+
"discoveryInstructions": "When generating MCP config, analyze the project's package.json/dependencies to determine which MCP servers would be useful. Don't blindly apply all servers - only add what the project actually needs."
|
|
55
32
|
}
|