prjct-cli 0.28.0 → 0.28.2
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 +64 -12
- package/CLAUDE.md +48 -22
- package/core/agentic/agent-router.ts +15 -0
- package/core/agentic/command-executor.ts +53 -5
- package/core/agentic/prompt-builder.ts +83 -2
- package/core/agentic/template-loader.ts +107 -32
- package/core/commands/command-data.ts +0 -33
- package/core/commands/commands.ts +4 -12
- package/core/commands/registry.ts +0 -37
- package/core/domain/agent-loader.ts +7 -9
- package/core/domain/context-estimator.ts +15 -15
- package/core/index.ts +0 -2
- package/core/infrastructure/config-manager.ts +25 -4
- package/core/infrastructure/setup.ts +0 -99
- package/core/session/session-log-manager.ts +17 -0
- package/core/types/config.ts +1 -1
- package/core/types/index.ts +0 -2
- package/core/types/integrations.ts +2 -47
- package/core/types/storage.ts +0 -8
- package/core/types/task.ts +0 -4
- package/dist/bin/prjct.mjs +341 -316
- package/package.json +1 -1
- package/templates/agentic/subagent-generation.md +14 -1
- package/templates/commands/cleanup.md +15 -74
- package/templates/commands/init.md +1 -44
- package/templates/commands/ship.md +92 -12
- package/templates/commands/sync.md +25 -10
- package/templates/commands/task.md +41 -0
- package/templates/global/CLAUDE.md +196 -25
- package/templates/mcp-config.json +0 -28
- 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/commands/feature.md +0 -46
- package/templates/commands/now.md +0 -53
- package/templates/hooks/prjct-session-start.sh +0 -50
- 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/skills/prjct-done/SKILL.md +0 -97
- package/templates/skills/prjct-ship/SKILL.md +0 -150
- package/templates/skills/prjct-sync/SKILL.md +0 -108
- package/templates/skills/prjct-task/SKILL.md +0 -101
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: prjct-ship
|
|
3
|
-
description: Ship a feature with PR, version bump, and changelog. Use when user says "p. ship", wants to release/deploy, or is ready to merge their work.
|
|
4
|
-
allowed-tools: [Read, Write, Edit, Bash, Glob, Grep, Task, AskUserQuestion, TodoWrite]
|
|
5
|
-
user-invocable: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# prjct Ship
|
|
9
|
-
|
|
10
|
-
Ship features with automated PR creation, version bumping, and changelog updates.
|
|
11
|
-
|
|
12
|
-
## Context Loading (ALWAYS FIRST)
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
1. Read `.prjct/prjct.config.json` → extract projectId
|
|
16
|
-
2. Set globalPath = ~/.prjct-cli/projects/{projectId}
|
|
17
|
-
3. Read {globalPath}/storage/state.json → current/last task
|
|
18
|
-
4. Check git status for branch and changes
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Ship Workflow
|
|
22
|
-
|
|
23
|
-
### 1. Pre-Ship Checks
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
# Check for uncommitted changes
|
|
27
|
-
git status --porcelain
|
|
28
|
-
|
|
29
|
-
# Check current branch (should not be main/master)
|
|
30
|
-
git branch --show-current
|
|
31
|
-
|
|
32
|
-
# Run tests if configured
|
|
33
|
-
npm test || bun test || yarn test
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### 2. Create/Update PR
|
|
37
|
-
|
|
38
|
-
If on feature branch:
|
|
39
|
-
```bash
|
|
40
|
-
# Push branch
|
|
41
|
-
git push -u origin $(git branch --show-current)
|
|
42
|
-
|
|
43
|
-
# Create PR with gh CLI
|
|
44
|
-
gh pr create --title "feat: {feature name}" --body "..."
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
PR body template:
|
|
48
|
-
```markdown
|
|
49
|
-
## Summary
|
|
50
|
-
{Brief description}
|
|
51
|
-
|
|
52
|
-
## Changes
|
|
53
|
-
- {change 1}
|
|
54
|
-
- {change 2}
|
|
55
|
-
|
|
56
|
-
## Test Plan
|
|
57
|
-
- [ ] Tests pass
|
|
58
|
-
- [ ] Manual verification
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
🤖 Generated with [p/](https://www.prjct.app/)
|
|
62
|
-
Designed for [Claude](https://www.anthropic.com/claude)
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### 3. Version Bump (if applicable)
|
|
66
|
-
|
|
67
|
-
Read `package.json`, determine bump type:
|
|
68
|
-
- **patch**: Bug fixes (0.0.x)
|
|
69
|
-
- **minor**: New features (0.x.0)
|
|
70
|
-
- **major**: Breaking changes (x.0.0)
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
npm version patch -m "chore: bump version to %s"
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### 4. Update Changelog
|
|
77
|
-
|
|
78
|
-
Prepend to `CHANGELOG.md`:
|
|
79
|
-
```markdown
|
|
80
|
-
## [x.x.x] - YYYY-MM-DD
|
|
81
|
-
|
|
82
|
-
### Added
|
|
83
|
-
- {new feature}
|
|
84
|
-
|
|
85
|
-
### Fixed
|
|
86
|
-
- {bug fix}
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### 5. Record Shipment
|
|
90
|
-
|
|
91
|
-
Write to `{globalPath}/storage/shipped.json`:
|
|
92
|
-
```json
|
|
93
|
-
{
|
|
94
|
-
"shipped": [
|
|
95
|
-
{
|
|
96
|
-
"id": "uuid",
|
|
97
|
-
"name": "{feature}",
|
|
98
|
-
"version": "x.x.x",
|
|
99
|
-
"prUrl": "https://github.com/...",
|
|
100
|
-
"shippedAt": "ISO timestamp"
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
}
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### 6. Update Context
|
|
107
|
-
|
|
108
|
-
Write to `{globalPath}/context/shipped.md`:
|
|
109
|
-
```markdown
|
|
110
|
-
# Recently Shipped
|
|
111
|
-
|
|
112
|
-
## {feature name}
|
|
113
|
-
- Version: x.x.x
|
|
114
|
-
- PR: {url}
|
|
115
|
-
- Date: {date}
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### 7. Log Event
|
|
119
|
-
|
|
120
|
-
Append to `{globalPath}/memory/events.jsonl`:
|
|
121
|
-
```json
|
|
122
|
-
{"timestamp": "...", "action": "feature_shipped", "feature": {...}, "version": "..."}
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
## Paths (CRITICAL)
|
|
126
|
-
|
|
127
|
-
| Type | Path | Access |
|
|
128
|
-
|------|------|--------|
|
|
129
|
-
| Config | `.prjct/prjct.config.json` | Read-only |
|
|
130
|
-
| Storage | `{globalPath}/storage/shipped.json` | Read-Write |
|
|
131
|
-
| Context | `{globalPath}/context/shipped.md` | Write |
|
|
132
|
-
| Memory | `{globalPath}/memory/events.jsonl` | Append |
|
|
133
|
-
|
|
134
|
-
## Git Commit Footer
|
|
135
|
-
|
|
136
|
-
ALWAYS include in commits:
|
|
137
|
-
```
|
|
138
|
-
🤖 Generated with [p/](https://www.prjct.app/)
|
|
139
|
-
Designed for [Claude](https://www.anthropic.com/claude)
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
## Output Format
|
|
143
|
-
|
|
144
|
-
```
|
|
145
|
-
🚀 SHIPPED: {feature name}
|
|
146
|
-
|
|
147
|
-
Version: {x.x.x}
|
|
148
|
-
PR: {url}
|
|
149
|
-
Next: Celebrate! Then p. task "next feature"
|
|
150
|
-
```
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: prjct-sync
|
|
3
|
-
description: Analyze and sync project state. Use when user says "p. sync", wants to analyze the codebase, or needs to generate/update domain agents.
|
|
4
|
-
allowed-tools: [Read, Write, Edit, Bash, Glob, Grep, Task, AskUserQuestion, TodoWrite]
|
|
5
|
-
user-invocable: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# prjct Sync
|
|
9
|
-
|
|
10
|
-
Analyze codebase and sync project state with intelligent agent generation.
|
|
11
|
-
|
|
12
|
-
## Context Loading (ALWAYS FIRST)
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
1. Read `.prjct/prjct.config.json` → extract projectId
|
|
16
|
-
2. Set globalPath = ~/.prjct-cli/projects/{projectId}
|
|
17
|
-
3. Read {globalPath}/project.json → project metadata
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Sync Workflow
|
|
21
|
-
|
|
22
|
-
### 1. Analyze Codebase
|
|
23
|
-
|
|
24
|
-
Use Task(Explore) to understand:
|
|
25
|
-
- Tech stack (languages, frameworks)
|
|
26
|
-
- Project structure (src/, lib/, etc.)
|
|
27
|
-
- Key patterns (API routes, components, etc.)
|
|
28
|
-
- Test coverage
|
|
29
|
-
|
|
30
|
-
### 2. Update Project Metadata
|
|
31
|
-
|
|
32
|
-
Write to `{globalPath}/project.json`:
|
|
33
|
-
```json
|
|
34
|
-
{
|
|
35
|
-
"projectId": "...",
|
|
36
|
-
"name": "project-name",
|
|
37
|
-
"repoPath": "/path/to/repo",
|
|
38
|
-
"techStack": ["typescript", "react", "node"],
|
|
39
|
-
"fileCount": 150,
|
|
40
|
-
"cliVersion": "0.28.0",
|
|
41
|
-
"lastSync": "ISO timestamp"
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### 3. Generate Domain Agents
|
|
46
|
-
|
|
47
|
-
Based on tech stack, create agents in `{globalPath}/agents/`:
|
|
48
|
-
|
|
49
|
-
| Agent | When to Generate |
|
|
50
|
-
|-------|------------------|
|
|
51
|
-
| `frontend.md` | React, Vue, Svelte, CSS |
|
|
52
|
-
| `backend.md` | Node, Express, APIs |
|
|
53
|
-
| `database.md` | SQL, MongoDB, Prisma |
|
|
54
|
-
| `testing.md` | Jest, Vitest, Playwright |
|
|
55
|
-
| `devops.md` | Docker, CI/CD, K8s |
|
|
56
|
-
|
|
57
|
-
Agent template:
|
|
58
|
-
```yaml
|
|
59
|
-
---
|
|
60
|
-
name: {agent-name}
|
|
61
|
-
description: {domain expertise}
|
|
62
|
-
tools: [Read, Write, Edit, Bash, Glob, Grep]
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
# {Agent Name} Specialist
|
|
66
|
-
|
|
67
|
-
## Patterns Found
|
|
68
|
-
- {pattern 1}
|
|
69
|
-
- {pattern 2}
|
|
70
|
-
|
|
71
|
-
## Conventions
|
|
72
|
-
- {convention 1}
|
|
73
|
-
- {convention 2}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### 4. Sync Context Files
|
|
77
|
-
|
|
78
|
-
Regenerate `{globalPath}/context/`:
|
|
79
|
-
- `now.md` - Current task (if any)
|
|
80
|
-
- `next.md` - Queue summary
|
|
81
|
-
- `shipped.md` - Recently shipped
|
|
82
|
-
|
|
83
|
-
### 5. Log Event
|
|
84
|
-
|
|
85
|
-
Append to `{globalPath}/memory/events.jsonl`:
|
|
86
|
-
```json
|
|
87
|
-
{"timestamp": "...", "action": "sync_completed", "agents": [...], "stats": {...}}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## Paths (CRITICAL)
|
|
91
|
-
|
|
92
|
-
| Type | Path | Access |
|
|
93
|
-
|------|------|--------|
|
|
94
|
-
| Config | `.prjct/prjct.config.json` | Read-only |
|
|
95
|
-
| Project | `{globalPath}/project.json` | Read-Write |
|
|
96
|
-
| Agents | `{globalPath}/agents/*.md` | Write |
|
|
97
|
-
| Context | `{globalPath}/context/*.md` | Write |
|
|
98
|
-
| Memory | `{globalPath}/memory/events.jsonl` | Append |
|
|
99
|
-
|
|
100
|
-
## Output Format
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
✅ Project synced
|
|
104
|
-
|
|
105
|
-
Files: {n} | Stack: {techs}
|
|
106
|
-
Agents: {list}
|
|
107
|
-
Next: p. task "start working"
|
|
108
|
-
```
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: prjct-task
|
|
3
|
-
description: Start and manage development tasks. Use when user says "p. task", wants to start working on something, or mentions starting a feature/bug/improvement/refactor.
|
|
4
|
-
allowed-tools: [Read, Write, Edit, Bash, Glob, Grep, Task, AskUserQuestion, TodoWrite]
|
|
5
|
-
user-invocable: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# prjct Task Manager
|
|
9
|
-
|
|
10
|
-
Start and track development tasks with intelligent classification.
|
|
11
|
-
|
|
12
|
-
## Context Loading (ALWAYS FIRST)
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
1. Read `.prjct/prjct.config.json` → extract projectId
|
|
16
|
-
2. Set globalPath = ~/.prjct-cli/projects/{projectId}
|
|
17
|
-
3. Read {globalPath}/storage/state.json → current state
|
|
18
|
-
4. Read {globalPath}/agents/*.md → domain expertise (if exists)
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Task Workflow
|
|
22
|
-
|
|
23
|
-
### 1. Classify Task Type
|
|
24
|
-
- **feature**: New functionality
|
|
25
|
-
- **bug**: Fix broken behavior
|
|
26
|
-
- **improvement**: Enhance existing feature
|
|
27
|
-
- **refactor**: Code restructure without behavior change
|
|
28
|
-
- **chore**: Maintenance, deps, config
|
|
29
|
-
|
|
30
|
-
### 2. Explore Codebase
|
|
31
|
-
Use Task(Explore) to:
|
|
32
|
-
- Find related code patterns
|
|
33
|
-
- Identify affected files
|
|
34
|
-
- Understand dependencies
|
|
35
|
-
|
|
36
|
-
### 3. Break Down (if complex)
|
|
37
|
-
Create subtasks with clear scope:
|
|
38
|
-
```json
|
|
39
|
-
{
|
|
40
|
-
"subtasks": [
|
|
41
|
-
{ "id": "1", "title": "...", "status": "pending" }
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### 4. Track in Storage
|
|
47
|
-
Write to `{globalPath}/storage/state.json`:
|
|
48
|
-
```json
|
|
49
|
-
{
|
|
50
|
-
"currentTask": {
|
|
51
|
-
"id": "uuid",
|
|
52
|
-
"title": "Task description",
|
|
53
|
-
"type": "feature",
|
|
54
|
-
"status": "in_progress",
|
|
55
|
-
"subtasks": [...],
|
|
56
|
-
"startedAt": "ISO timestamp"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### 5. Generate Context
|
|
62
|
-
Write to `{globalPath}/context/now.md`:
|
|
63
|
-
```markdown
|
|
64
|
-
# Current Task
|
|
65
|
-
**{title}** ({type})
|
|
66
|
-
Started: {timestamp}
|
|
67
|
-
Subtasks: {completed}/{total}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### 6. Log Event
|
|
71
|
-
Append to `{globalPath}/memory/events.jsonl`:
|
|
72
|
-
```json
|
|
73
|
-
{"timestamp": "...", "action": "task_started", "task": {...}}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Paths (CRITICAL)
|
|
77
|
-
|
|
78
|
-
| Type | Path | Access |
|
|
79
|
-
|------|------|--------|
|
|
80
|
-
| Config | `.prjct/prjct.config.json` | Read-only |
|
|
81
|
-
| Storage | `{globalPath}/storage/*.json` | Read-Write |
|
|
82
|
-
| Context | `{globalPath}/context/*.md` | Read-Write |
|
|
83
|
-
| Memory | `{globalPath}/memory/events.jsonl` | Append-only |
|
|
84
|
-
| Agents | `{globalPath}/agents/*.md` | Read-only |
|
|
85
|
-
|
|
86
|
-
## Output Format
|
|
87
|
-
|
|
88
|
-
```
|
|
89
|
-
✅ Task started: {title}
|
|
90
|
-
|
|
91
|
-
Type: {type} | Subtasks: {n}
|
|
92
|
-
Next: {first subtask or suggested action}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Git Commit Footer
|
|
96
|
-
|
|
97
|
-
When committing, ALWAYS include:
|
|
98
|
-
```
|
|
99
|
-
🤖 Generated with [p/](https://www.prjct.app/)
|
|
100
|
-
Designed for [Claude](https://www.anthropic.com/claude)
|
|
101
|
-
```
|