prjct-cli 0.10.5 → 0.10.6

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.10.6] - 2025-11-27
4
+
5
+ ### Enhanced
6
+
7
+ - **Global CLAUDE.md Template** - Improved to help Claude use prjct-cli better
8
+ - Quick command reference table with examples
9
+ - Recommended workflow (sync → feature → now → done → ship)
10
+ - Common usage patterns with examples
11
+ - Anti-patterns table (what NOT to do)
12
+ - Using agents effectively section
13
+ - Simplified file structure overview
14
+ - Error handling table
15
+
3
16
  ## [0.10.5] - 2025-11-27
4
17
 
5
18
  ### Enhanced
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prjct-cli",
3
- "version": "0.10.5",
3
+ "version": "0.10.6",
4
4
  "description": "Built for Claude - Ship fast, track progress, stay focused. Developer momentum tool for indie hackers.",
5
5
  "main": "core/index.js",
6
6
  "bin": {
@@ -5,22 +5,92 @@ This section provides global context for all `/p:*` commands across any prjct pr
5
5
 
6
6
  **Auto-managed by prjct-cli** - This section is automatically updated when you install or update prjct.
7
7
 
8
- ## 🤖 Project Context (OBLIGATORIO)
8
+ ## 🚀 Quick Command Reference
9
+
10
+ | Command | Purpose | Example |
11
+ |---------|---------|---------|
12
+ | `/p:sync` | Analyze project & generate agents | Run first in any project |
13
+ | `/p:now [task]` | Set current focus | `/p:now "implement auth"` |
14
+ | `/p:done` | Complete current task | After finishing work |
15
+ | `/p:next` | Show priority queue | See what's pending |
16
+ | `/p:ship [feature]` | Ship & celebrate | `/p:ship "user login"` |
17
+ | `/p:feature [desc]` | Add feature to roadmap | `/p:feature "dark mode"` |
18
+ | `/p:idea [text]` | Quick idea capture | `/p:idea "add caching"` |
19
+ | `/p:recap` | Project overview | Status check |
20
+ | `/p:progress` | Show metrics | Weekly/monthly stats |
21
+
22
+ ## 🎯 Recommended Workflow
9
23
 
10
- **ANTES de trabajar en un proyecto prjct, LEE el contexto del proyecto:**
24
+ ```
25
+ 1. /p:sync → Analyze project, generate agents
26
+ 2. /p:feature → Plan what to build
27
+ 3. /p:now → Start working
28
+ 4. [code...] → Do the actual work
29
+ 5. /p:done → Mark complete
30
+ 6. /p:ship → Celebrate & commit
31
+ ```
32
+
33
+ ## 🤖 Project Context (CRITICAL)
34
+
35
+ **BEFORE working on any prjct project, READ the project context:**
36
+
37
+ 1. Read `.prjct/prjct.config.json` → get `projectId`
38
+ 2. Read `~/.prjct-cli/projects/{projectId}/CLAUDE.md` → dynamic project context
39
+
40
+ The project CLAUDE.md contains:
41
+ - Tech stack (languages, frameworks, dependencies)
42
+ - Project structure (directories)
43
+ - Available agents with their expertise
44
+ - Current task and priority queue
45
+ - Recent git activity
46
+ - Active roadmap features
47
+
48
+ **If CLAUDE.md doesn't exist**: Suggest running `/p:sync` to generate it.
49
+
50
+ ## 📋 Common Usage Patterns
51
+
52
+ ### Starting Work on a Project
53
+ ```
54
+ User: "p. sync"
55
+ → Analyze repo, generate agents, create context
56
+ → Now Claude knows: stack, structure, agents available
57
+ ```
58
+
59
+ ### Adding a New Feature
60
+ ```
61
+ User: "p. feature add user authentication"
62
+ → Creates roadmap entry with tasks
63
+ → Analyzes impact and effort
64
+ → Suggests starting first task
65
+ ```
66
+
67
+ ### Daily Development Flow
68
+ ```
69
+ User: "p. now implement login form"
70
+ → Sets current focus
71
+ → [User works on code]
72
+ User: "p. done"
73
+ → Marks complete, suggests next task
74
+ User: "p. ship authentication"
75
+ → Commits, celebrates, updates metrics
76
+ ```
11
77
 
12
- 1. Lee `.prjct/prjct.config.json` → obtén `projectId`
13
- 2. Lee `~/.prjct-cli/projects/{projectId}/CLAUDE.md` → contexto dinámico del proyecto
14
- 3. Para detalles de implementación, lee los archivos en `agents/`
78
+ ### Quick Idea Capture
79
+ ```
80
+ User: "p. idea we should add dark mode later"
81
+ → Saves to ideas.md
82
+ → Doesn't interrupt current work
83
+ ```
15
84
 
16
- El archivo `CLAUDE.md` del proyecto contiene:
17
- - Stack detectado del proyecto
18
- - Agentes disponibles (varían por proyecto)
19
- - Tarea actual
20
- - Cola de prioridades
21
- - Rutas a documentación detallada
85
+ ## ⚠️ Anti-Patterns (What NOT to Do)
22
86
 
23
- **Si no existe CLAUDE.md**: Sugiere ejecutar `/p:sync` para generarlo.
87
+ | Don't | Do Instead |
88
+ |----------|---------------|
89
+ | Write to `.prjct/` folder | Write to `~/.prjct-cli/projects/{id}/` |
90
+ | Skip reading project context | Always read CLAUDE.md first |
91
+ | Execute without projectId | Check `.prjct/prjct.config.json` exists |
92
+ | Hardcode file paths | Use projectId to construct paths |
93
+ | Ignore agents | Use specialized agents for their domains |
24
94
 
25
95
  ## 🎯 Path Resolution for ALL /p:* Commands
26
96
 
@@ -28,10 +98,10 @@ El archivo `CLAUDE.md` del proyecto contiene:
28
98
 
29
99
  ### Resolution Steps:
30
100
 
31
- 1. **Detect prjct project**: Check if `.prjct/prjct.config.json` exists in current working directory
32
- 2. **Read config**: Extract `projectId` from `.prjct/prjct.config.json`
101
+ 1. **Detect prjct project**: Check if `.prjct/prjct.config.json` exists
102
+ 2. **Read config**: Extract `projectId` from config
33
103
  3. **Construct base path**: `~/.prjct-cli/projects/{projectId}/`
34
- 4. **Resolve all file operations**: All paths in command templates are relative to base path
104
+ 4. **Resolve all file operations**: Paths are relative to base path
35
105
 
36
106
  ### Examples:
37
107
 
@@ -41,75 +111,61 @@ Actual path: ~/.prjct-cli/projects/{projectId}/core/now.md
41
111
 
42
112
  Template says: "Read: memory/context.jsonl"
43
113
  Actual path: ~/.prjct-cli/projects/{projectId}/memory/context.jsonl
44
-
45
- Template says: "Update: progress/shipped.md"
46
- Actual path: ~/.prjct-cli/projects/{projectId}/progress/shipped.md
47
114
  ```
48
115
 
49
116
  ### Validation Rules:
50
117
 
51
118
  - ❌ **NEVER** write to `.prjct/core/now.md` (local project directory)
52
119
  - ❌ **NEVER** write to `./core/now.md` (current working directory)
53
- - ✅ **ALWAYS** write to `~/.prjct-cli/projects/{projectId}/core/now.md` (global storage)
120
+ - ✅ **ALWAYS** write to `~/.prjct-cli/projects/{projectId}/core/now.md`
54
121
 
55
122
  ### When NOT in prjct Project:
56
123
 
57
- If `.prjct/prjct.config.json` doesn't exist in current directory:
124
+ If `.prjct/prjct.config.json` doesn't exist:
58
125
  - Respond: "No prjct project detected. Initialize first with `/p:init`"
59
126
  - Do NOT execute the command
60
127
  - Do NOT create files
61
128
 
62
129
  ## 📁 File Structure
63
130
 
64
- All prjct data lives in global storage with session-based architecture:
131
+ All prjct data lives in global storage:
65
132
 
66
133
  ```
67
134
  ~/.prjct-cli/projects/{projectId}/
68
- ├── core/ # Current focus (always small)
69
- ├── now.md # Single current task
70
- │ ├── next.md # Priority queue (max 100 tasks)
71
- │ └── context.md # Project context summary
72
- ├── progress/ # Completed work
73
- │ ├── shipped.md # Recent ships (last 30 days)
74
- ├── metrics.md # Aggregated metrics
75
- ├── sessions/ # Daily session logs (JSONL)
76
- │ └── 2025-10/
77
- └── 2025-10-05.jsonl
78
- │ └── archive/ # Monthly archives
79
- └── shipped-2025-10.md
80
- ├── planning/ # Future planning
81
- ├── ideas.md # Active ideas (last 30 days)
82
- │ ├── roadmap.md # Active roadmap (lightweight)
83
- ├── sessions/ # Daily planning sessions (JSONL)
84
- │ │ └── 2025-10/
85
- │ │ └── 2025-10-05.jsonl
86
- │ └── archive/ # Monthly archives
87
- │ └── roadmap-2025-10.md
88
- ├── analysis/ # Technical analysis
89
- │ └── repo-summary.md
90
- ├── memory/ # Decision history
91
- │ ├── context.jsonl # Global decisions (append-only)
92
- │ └── sessions/ # Daily context (structured)
93
- │ └── 2025-10/
94
- │ └── 2025-10-05.jsonl
95
- └── agents/ # Dynamic AI agents
96
- ├── coordinator.md
97
- ├── ux.md
98
- ├── fe.md
99
- ├── be.md
100
- ├── qa.md
101
- └── scribe.md
102
- ```
103
-
104
- ### Session Format (JSONL):
105
-
106
- One JSON object per line, append-only:
107
-
108
- ```jsonl
109
- {"ts":"2025-10-05T14:30:00Z","type":"feature_add","name":"auth","tasks":5,"impact":"high","effort":"6h"}
110
- {"ts":"2025-10-05T15:00:00Z","type":"task_start","task":"JWT middleware","agent":"be","estimate":"2h"}
111
- {"ts":"2025-10-05T17:15:00Z","type":"task_complete","task":"JWT middleware","duration":"2h15m"}
112
- {"ts":"2025-10-05T18:00:00Z","type":"feature_ship","name":"auth","tasks_done":5,"total_time":"6h"}
135
+ ├── CLAUDE.md # READ THIS FIRST - Rich project context
136
+ ├── core/ # Current focus
137
+ │ ├── now.md # Single current task
138
+ │ └── next.md # Priority queue
139
+ ├── progress/ # Completed work
140
+ │ ├── shipped.md # Recent ships
141
+ └── metrics.md # Aggregated metrics
142
+ ├── planning/ # Future planning
143
+ ├── ideas.md # Quick ideas
144
+ │ └── roadmap.md # Feature roadmap
145
+ ├── analysis/ # Technical analysis
146
+ └── repo-summary.md # Full repo analysis
147
+ ├── memory/ # Decision history
148
+ └── context.jsonl # Append-only log
149
+ └── agents/ # Specialized AI agents
150
+ ├── fe.md # Frontend specialist
151
+ ├── be.md # Backend specialist
152
+ └── ... # More based on stack
153
+ ```
154
+
155
+ ## 🤖 Using Agents Effectively
156
+
157
+ When project has specialized agents:
158
+
159
+ 1. **Read agent file** before working in that domain
160
+ 2. **Follow agent patterns** for code style and architecture
161
+ 3. **Agent expertise** is in CLAUDE.md summary
162
+
163
+ Example:
164
+ ```
165
+ Task: "implement React component"
166
+ Check CLAUDE.md for frontend agent
167
+ Read agents/fe.md for React patterns
168
+ Follow detected conventions
113
169
  ```
114
170
 
115
171
  ## 🤖 Git Commit Format
@@ -125,107 +181,53 @@ Designed for [Claude](https://www.anthropic.com/claude)
125
181
  - ❌ "Generated with Claude Code"
126
182
  - ❌ "Co-Authored-By: Claude"
127
183
 
128
- **Always use:**
129
- - ✅ The prjct footer format above
130
-
131
- ## 👤 Author Detection
132
-
133
- All operations include author information. Detection order:
134
-
135
- 1. **GitHub CLI**: `gh api user` (preferred)
136
- - Provides: name, email, username, avatarUrl
137
- 2. **Git Config**: Fallback if GitHub CLI not available
138
- - `git config user.name`
139
- - `git config user.email`
140
- 3. **Default**: If both fail
141
- - name: "Unknown"
142
- - email: "unknown@localhost"
143
-
144
- Every log entry in `memory/context.jsonl` includes author field.
145
-
146
184
  ## ⚠️ Common Validation Patterns
147
185
 
148
- ### Before Executing /p:done:
186
+ ### Before /p:done:
149
187
  ```javascript
150
- // Check if there's an active task
151
188
  const nowContent = await Read('~/.prjct-cli/projects/{projectId}/core/now.md')
152
189
  if (!nowContent || nowContent.trim() === '') {
153
190
  return "Not working on anything. Use /p:now to start a task."
154
191
  }
155
192
  ```
156
193
 
157
- ### Before Executing /p:ship:
194
+ ### Before /p:ship:
158
195
  ```javascript
159
- // Check if there's something to ship
160
- const shippedContent = await Read('~/.prjct-cli/projects/{projectId}/progress/shipped.md')
161
196
  const nowContent = await Read('~/.prjct-cli/projects/{projectId}/core/now.md')
162
- if ((!nowContent || nowContent.trim() === '') &&
163
- (!shippedContent || shippedContent.trim() === '')) {
197
+ if (!nowContent || nowContent.trim() === '') {
164
198
  return "Nothing to ship yet. Build something first with /p:now."
165
199
  }
166
200
  ```
167
201
 
168
- ### Reading Project Config:
169
- ```javascript
170
- // Always read config first
171
- const configPath = '.prjct/prjct.config.json'
172
- const configContent = await Read(configPath)
173
- const config = JSON.parse(configContent)
174
- const projectId = config.projectId
175
- const basePath = `~/.prjct-cli/projects/${projectId}/`
176
- ```
177
-
178
202
  ## 🔧 Error Handling
179
203
 
180
- ### File Not Found:
181
- - If `core/now.md` doesn't exist when reading → return empty state
182
- - If `core/next.md` doesn't exist return "No tasks in queue"
183
- - Always check file existence before operations
184
-
185
- ### Invalid JSON:
186
- - If config file is corrupted → suggest running `/p:init` again
187
- - Log error to `memory/context.jsonl` for debugging
188
-
189
- ### Permission Issues:
190
- - If can't write to `~/.prjct-cli/` → check directory permissions
191
- - Suggest: `chmod -R u+w ~/.prjct-cli/`
192
-
193
- ## 📊 Performance Guidelines
194
-
195
- ### Archive Rules:
196
- - Index files (roadmap.md, shipped.md) keep only last 30 days
197
- - Sessions older than 30 days → automatically moved to archive/
198
- - When querying across time: read relevant session files from archive/
199
- - Commands only read current index + today's session for performance
200
-
201
- ### File Size Limits:
202
- - `core/now.md`: Single task only (< 1KB)
203
- - `core/next.md`: Max 100 tasks (< 50KB)
204
- - `progress/shipped.md`: Last 30 days only (auto-archive older)
205
- - Session files: One file per day, JSONL format for efficient appending
204
+ | Error | Solution |
205
+ |-------|----------|
206
+ | File not found | Return empty state, don't fail |
207
+ | Invalid JSON config | Suggest `/p:init` again |
208
+ | Permission denied | Suggest `chmod -R u+w ~/.prjct-cli/` |
209
+ | No project detected | Suggest `/p:init` |
206
210
 
207
211
  ## 🎯 Command Execution Flow
208
212
 
209
213
  Standard pattern for all `/p:*` commands:
210
214
 
211
- 1. **Validate environment**: Check `.prjct/prjct.config.json` exists
215
+ 1. **Validate**: Check `.prjct/prjct.config.json` exists
212
216
  2. **Read config**: Extract projectId
213
- 3. **Construct paths**: Build all file paths using base path
214
- 4. **Execute operations**: Read/write files in global storage
215
- 5. **Log action**: Append to `memory/context.jsonl` with timestamp and author
216
- 6. **Return response**: Formatted response with next action suggestions
217
+ 3. **Read context**: Load `~/.prjct-cli/projects/{id}/CLAUDE.md`
218
+ 4. **Execute**: Read/write files in global storage
219
+ 5. **Log**: Append to `memory/context.jsonl`
220
+ 6. **Respond**: Formatted response with next action suggestions
217
221
 
218
222
  ## 📚 Additional Context
219
223
 
220
224
  - **Website**: https://prjct.app
221
225
  - **Documentation**: https://prjct.app/docs
222
- - **Repository**: Private (proprietary software)
223
226
  - **Support**: jlopezlira@gmail.com
224
- - **Version**: Auto-updated with prjct-cli
225
227
 
226
228
  ---
227
229
 
228
230
  **Last updated**: Auto-managed by prjct-cli
229
- **Config version**: 0.8.2
231
+ **Config version**: 0.10.5
230
232
 
231
233
  <!-- prjct:end - DO NOT REMOVE THIS MARKER -->