prjct-cli 0.4.9 → 0.5.1

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +332 -0
  2. package/CLAUDE.md +109 -3
  3. package/README.md +231 -96
  4. package/core/agent-detector.js +55 -122
  5. package/core/agent-generator.js +516 -0
  6. package/core/command-installer.js +104 -890
  7. package/core/commands.js +74 -76
  8. package/core/editors-config.js +9 -57
  9. package/core/git-integration.js +401 -0
  10. package/package.json +12 -9
  11. package/scripts/install.sh +0 -1
  12. package/templates/agents/be.template.md +42 -0
  13. package/templates/agents/data.template.md +41 -0
  14. package/templates/agents/devops.template.md +41 -0
  15. package/templates/agents/fe.template.md +42 -0
  16. package/templates/agents/mobile.template.md +41 -0
  17. package/templates/agents/pm.template.md +84 -0
  18. package/templates/agents/qa.template.md +54 -0
  19. package/templates/agents/scribe.template.md +95 -0
  20. package/templates/agents/security.template.md +41 -0
  21. package/templates/agents/ux.template.md +49 -0
  22. package/templates/commands/analyze.md +137 -3
  23. package/templates/commands/done.md +154 -5
  24. package/templates/commands/init.md +61 -3
  25. package/templates/commands/ship.md +146 -6
  26. package/templates/commands/sync.md +220 -0
  27. package/templates/examples/natural-language-examples.md +234 -22
  28. package/core/agents/codex-agent.js +0 -256
  29. package/core/agents/terminal-agent.js +0 -465
  30. package/templates/workflows/analyze.md +0 -159
  31. package/templates/workflows/cleanup.md +0 -73
  32. package/templates/workflows/context.md +0 -72
  33. package/templates/workflows/design.md +0 -88
  34. package/templates/workflows/done.md +0 -20
  35. package/templates/workflows/fix.md +0 -201
  36. package/templates/workflows/git.md +0 -192
  37. package/templates/workflows/help.md +0 -13
  38. package/templates/workflows/idea.md +0 -22
  39. package/templates/workflows/init.md +0 -80
  40. package/templates/workflows/natural-language-handler.md +0 -183
  41. package/templates/workflows/next.md +0 -44
  42. package/templates/workflows/now.md +0 -19
  43. package/templates/workflows/progress.md +0 -113
  44. package/templates/workflows/recap.md +0 -66
  45. package/templates/workflows/roadmap.md +0 -95
  46. package/templates/workflows/ship.md +0 -18
  47. package/templates/workflows/stuck.md +0 -25
  48. package/templates/workflows/task.md +0 -109
  49. package/templates/workflows/test.md +0 -243
package/CHANGELOG.md CHANGED
@@ -7,6 +7,164 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.5.1] - 2025-10-02
11
+
12
+ ### Fixed
13
+ - **Critical: `prjct start` Command Error** - Fixed "commandInstaller.detectEditors is not a function" error
14
+ - **Root Cause**: v0.5.0 refactored `command-installer.js` to Claude-only architecture but didn't update calling code
15
+ - **Files Modified**: `core/commands.js` (lines 2227-2374)
16
+ - **Changes**:
17
+ - Refactored `start()` function to use `detectClaude()` instead of `detectEditors()`
18
+ - Replaced `interactiveInstall()` with `installCommands()`
19
+ - Removed multi-editor logic (Cursor, Windsurf references)
20
+ - Updated messaging to be Claude-only with download link
21
+ - Simplified `setup()` function with installation status checking
22
+ - Added `--force` flag support for reinstallation
23
+ - **Result**: Both `prjct start` and `prjct setup` now work correctly
24
+ - **Commands Installed**: Successfully installs all 21 /p:* commands to `~/.claude/commands/p/`
25
+
26
+ ### Fixed
27
+ - **Corrected Claude Subscription Messaging** - Clarified honest pricing throughout
28
+ - Updated `website/src/pages/Changelog.tsx`:
29
+ - Changed "Claude Code is 100% free" → "Works with whatever Claude subscription you have (free tier or Pro)"
30
+ - Added clarity: "No extra costs or tokens required - just install and use with your existing Claude access"
31
+ - Updated `website/src/components/FAQ.tsx`:
32
+ - Replaced misleading "100% free" claims with accurate subscription info
33
+ - Emphasized "no extra setup", "no token management", "no API keys to configure"
34
+ - Updated `README.md`:
35
+ - Changed "100% free" → "works with free tier or Pro"
36
+ - Added clarity about zero additional costs beyond existing Claude subscription
37
+ - Explained Claude has free tier but isn't completely free
38
+ - **Editor Installation**: Removed multi-editor references (Cursor, Windsurf, Codex) - now shows Claude-only installation
39
+ - **Natural Language Section**: Renamed to "p. Trigger - Zero Memorization" and updated all examples to show p. prefix
40
+ - **Alignment**: All examples now consistently show "p. I want..." format
41
+ - **Data Storage**: Fixed inconsistent paths - changed `.prjct/` → `~/.prjct-cli/projects/{id}/` for accuracy
42
+ - **Team Workflow**: Updated to reflect global architecture with local data and shared config
43
+ - **FAQ Sections**: Both quick and detailed FAQs now aligned with global architecture
44
+ - **Why This Matters**: Being honest about costs builds trust - prjct-cli doesn't require extra payments, but Claude itself has subscription tiers
45
+
46
+ - **Fixed TypeScript Errors** - Removed unused imports across website components
47
+ - Fixed `website/src/pages/Changelog.tsx`: Added missing `MessageSquare` import
48
+ - Fixed `website/src/components/Features.tsx`: Removed unused `Cpu` import
49
+ - Fixed `website/src/pages/Commands.tsx`: Removed unused `Cpu`, `Wind` imports
50
+ - Fixed `website/src/components/WindsurfExtension.tsx`: Removed unused `Zap`, `ChevronRight` imports
51
+ - Fixed `website/src/components/WindsurfPreview.tsx`: Removed unused `ArrowRight`, `GitBranch`, `PlayCircle`, `Layers`, `ChevronRight` imports
52
+ - Website now compiles without TypeScript errors
53
+
54
+ ### Changed
55
+ - **Website Alignment with p. Trigger** - ALL website components now show p. trigger correctly
56
+ - Updated `website/src/components/Features.tsx`:
57
+ - Changed "p. Trigger" description to show multiple examples
58
+ - '"p. I\'m done" → /p:done | "p. start building auth" → /p:now | "p. ship this" → /p:ship'
59
+ - Updated `website/src/components/ClaudeSuperpowers.tsx`:
60
+ - Changed "Natural Language" → "p. Trigger - Zero Memorization"
61
+ - All examples now show p. prefix: "p. I'm done", "p. start building auth", "p. ship this feature"
62
+ - Updated `website/src/pages/Commands.tsx`:
63
+ - Natural language examples now include p. trigger
64
+ - "p. I want to start building the login page", "p. I'm done", "p. ship this feature"
65
+ - Updated `website/src/pages/docs/QuickStart.tsx`:
66
+ - Changed examples to use p. trigger
67
+ - "p. I'm done" when finished, "p. ship this feature" to celebrate
68
+
69
+ - **Copy Simplification for Creators** - Made all text stupidly simple to understand
70
+ - Updated `README.md` to speak to creators and small teams, not just developers:
71
+ - Changed "indie hackers" → "solo creators and founders"
72
+ - Changed "developer momentum" → "track progress, not meetings"
73
+ - Simplified technical jargon:
74
+ - "Git validation" → "Checks your actual code changes"
75
+ - "MCP Integration" → "AI tools that help you code"
76
+ - "Dynamic AI Agents" → "Smart AI helpers"
77
+ - Made benefits easier to understand for non-technical creators
78
+ - Updated `website/src/components/InteractiveTerminal.tsx` examples:
79
+ - "implement user authentication" → "build login feature"
80
+ - "JWT token not validating" → "login not working"
81
+ - "API rate limiting" → "prevent spam requests"
82
+ - "Design notification architecture" → "Design how notifications will work"
83
+ - "Setup WebSocket server" → "Setup real-time messaging"
84
+ - Added explanatory comments to `website/src/lib/utils.ts`:
85
+ - Simple explanation of what `cn()` function does
86
+ - Real-world examples for creators
87
+
88
+ ### Added
89
+ - **p. Trigger System** - Zero memorization interface for prjct context
90
+ - Simple prefix `p.` signals prjct context (e.g., "p. analiza esto")
91
+ - Works in any language: English, Spanish, German, etc.
92
+ - Auto-validates `.prjct/prjct.config.json` before execution
93
+ - Context-aware: Only works in prjct directories
94
+ - Provides friendly error when not in prjct project
95
+ - Implemented via CLAUDE.md instructions (no SDK needed)
96
+ - Zero API keys, zero additional costs
97
+
98
+ - **Natural Language Context Validation** - Conversational responses when context is missing
99
+ - Automatic context validation before command execution
100
+ - Friendly guidance instead of technical errors
101
+ - Multi-language intent detection (English, Spanish, etc.)
102
+ - Works natively in Claude Code and Claude Desktop
103
+
104
+ ### Changed
105
+ - **Natural Language System** - Enhanced with p. trigger and context validation
106
+ - Updated `CLAUDE.md` with complete p. trigger detection logic
107
+ - Added context validation examples and patterns
108
+ - Implemented semantic intent understanding (Claude's native LLM capability)
109
+ - Updated `templates/commands/done.md` with context validation docs
110
+ - Updated `templates/examples/natural-language-examples.md`:
111
+ - Added Example 11: p. Trigger (zero memorization)
112
+ - Added Example 12: p. Trigger multi-language
113
+ - Added Example 13: p. Trigger without project
114
+ - Added Example 14: All three ways work (p. | /p: | natural)
115
+ - Added examples for missing context scenarios (Example 2b, 3b)
116
+ - Updated implementation notes (no SDK approach)
117
+ - Created `docs/p-trigger.md` - Complete p. trigger documentation
118
+
119
+ - **Website Alignment** - Updated all components to show p. trigger as primary interface
120
+ - `website/src/components/Hero.tsx`:
121
+ - Updated p. Trigger feature description
122
+ - Changed badge to "Built for Claude Code - Claude Desktop"
123
+ - Restored Windsurf Extension CTA with scroll-to-section functionality
124
+ - Added Sparkles and ArrowRight animated icons
125
+ - `website/src/components/Features.tsx`:
126
+ - Updated p. Trigger feature to show natural language first
127
+ - `website/src/components/CommandGuide.tsx`:
128
+ - Added p. trigger examples to all 6 scenarios (preferred option)
129
+ - Updated Quick Decision Matrix to show p. trigger format
130
+ - All examples now follow: `"p. [natural language]"` → `/p:command` pattern
131
+ - Demonstrates zero memorization approach throughout
132
+
133
+ - **Windsurf Extension Preview Section** - Added complete Windsurf extension roadmap to homepage
134
+ - `website/src/components/WindsurfExtension.tsx`:
135
+ - Full section with hero, features grid, timeline, and early access form
136
+ - Development timeline (Oct 2025 - Feb 2026)
137
+ - 4 key features: Real-time Metrics, Focus Mode, Velocity Tracking, Smart Notifications
138
+ - Progress bar showing 10% completion (validation phase)
139
+ - Scroll target for Hero CTA (`.windsurf-extension-section`)
140
+ - `website/src/components/WindsurfPreview.tsx`:
141
+ - Interactive mockup of Windsurf extension UI
142
+ - Kanban-style roadmap with drag & drop
143
+ - AI Task Generator and PRJCT Control Center
144
+ - Project Rules management interface
145
+ - `website/src/components/EarlyAccessForm.tsx`:
146
+ - GitHub issue-based waitlist signup
147
+ - Animated with framer-motion
148
+ - Purple/blue gradient theme
149
+ - `website/src/pages/Home.tsx`:
150
+ - Added WindsurfExtension between Features and ClaudeSuperpowers
151
+ - Maintains page flow and user journey
152
+
153
+ ### Fixed
154
+ - **🐛 Natural Language Context Bug** - Fixed error messages when context is missing
155
+ - Before: "⏺ No hay tarea activa en este momento..." (technical error)
156
+ - After: "✨ You're not working on anything right now! Want to start something?" (conversational)
157
+ - Affects ALL commands: /p:done, /p:ship, /p:stuck, /p:idea, /p:now
158
+ - Claude automatically validates and provides friendly guidance
159
+
160
+ ### Technical Implementation
161
+ - **Zero External Dependencies** - All functionality via CLAUDE.md
162
+ - No SDK required (initially considered but removed)
163
+ - Uses Claude Code's native session (zero API keys)
164
+ - Simple file reads for context validation
165
+ - Works identically in Claude Code and Claude Desktop
166
+ - No additional costs for users
167
+
10
168
  ### Coming Soon
11
169
  - **Windows Compatibility** - Native Windows support
12
170
  - PowerShell and CMD command execution
@@ -15,6 +173,180 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
173
  - Cross-platform file operations
16
174
  - Windows Terminal integration
17
175
 
176
+ ## [0.5.0] - 2025-10-02
177
+
178
+ ### 🚨 BREAKING CHANGES
179
+
180
+ - **100% Claude-Focused Architecture** - Removed support for all non-Claude environments
181
+ - ❌ **Removed**: OpenAI Codex support
182
+ - ❌ **Removed**: Cursor AI support
183
+ - ❌ **Removed**: Windsurf/Codeium support
184
+ - ✅ **Supported**: Claude Code (primary)
185
+ - ✅ **Supported**: Claude Desktop (secondary)
186
+
187
+ - **Simplified Installation** - Now installs only to `~/.claude/`
188
+ - Single editor detection (Claude only)
189
+ - Removed multi-editor selection workflow
190
+ - Removed editor-specific adapters and formatters
191
+
192
+ - **Deleted Files**:
193
+ - `core/agents/codex-agent.js` - OpenAI Codex adapter
194
+ - `core/agents/terminal-agent.js` - Terminal fallback
195
+ - `AGENTS.md` - Legacy Codex configuration
196
+ - `templates/workflows/` - Windsurf workflow templates
197
+
198
+ - **Rewritten Modules** (breaking API changes):
199
+ - `command-installer.js` - Now Claude-only (208 lines, was 800+)
200
+ - `editors-config.js` - Simplified to single editor (160 lines, was 205)
201
+ - `agent-detector.js` - Claude detection only (183 lines, was 250)
202
+
203
+ ### 🚀 Why This Change? (Built for Claude - Ship Fast, No BS)
204
+
205
+ **prjct-cli is now a developer momentum tool, NOT a project management tool.**
206
+
207
+ **The Philosophy:**
208
+ - Ship fast, stay focused, no BS
209
+ - For indie hackers and small teams (2-5 devs)
210
+ - No Jira, no ceremonies, no bureaucracy
211
+ - Just `/p:now` → work → `/p:done` → `/p:ship` → celebrate
212
+
213
+ **By focusing 100% on Claude, we unlocked superpowers:**
214
+
215
+ 1. **🤖 Dynamic AI Agents**
216
+ - Auto-generated specialists (PM, Frontend, Backend, UX, QA, Scribe, Security, DevOps, Mobile, Data)
217
+ - Context-aware activation based on your project stack
218
+ - Impossible to build with multi-platform support
219
+
220
+ 2. **🔗 Native MCP Integration**
221
+ - Context7 - Automatic library documentation
222
+ - Sequential - Deep reasoning for complex problems
223
+ - Magic - UI component generation from patterns
224
+ - Playwright - Browser automation and E2E testing
225
+ - MCP is Claude-native, can't replicate elsewhere
226
+
227
+ 3. **✅ Git Validation**
228
+ - Last commit as source of truth
229
+ - Validates completed work against actual changes
230
+ - Prevents empty task completions
231
+ - Requires tight Claude integration
232
+
233
+ 4. **💬 Natural Language**
234
+ - Talk naturally in any language, no command memorization
235
+ - "I'm done" → `/p:done`, "ship this" → `/p:ship`
236
+ - Leverages Claude's language understanding
237
+
238
+ 5. **⚡ Technical Benefits**
239
+ - **50-60% less code** (800+ lines → 228 lines in command-installer alone)
240
+ - Faster features and bug fixes
241
+ - Proper testing of everything we support
242
+ - Honest compatibility (only claim what works)
243
+
244
+ **Migration Path:**
245
+ - **Using Claude?** → `npm update -g prjct-cli` (you're all set!)
246
+ - **Using Cursor/Windsurf/Codex?** → Switch to Claude Code (free) or stay on v0.4.10
247
+ - **See [MIGRATION.md](MIGRATION.md) for complete upgrade guide**
248
+
249
+ **This isn't a limitation - it's a strategic decision that makes prjct-cli better for developers who ship fast.**
250
+
251
+ ### Added
252
+ - **Dynamic AI Agent System** - Automatic generation of specialized AI agents based on project stack
253
+ - **GitIntegration Module** (`core/git-integration.js`)
254
+ - Repository validation and state tracking
255
+ - Last commit as source of truth for validation
256
+ - Working directory status monitoring
257
+ - User claim validation against commit history
258
+ - Comprehensive git statistics and reporting
259
+
260
+ - **AgentGenerator Module** (`core/agent-generator.js`)
261
+ - Dynamic agent creation based on project analysis
262
+ - Project-specific context injection into agent templates
263
+ - Intelligent conditional agent detection
264
+ - Agent update and synchronization capabilities
265
+ - Support for both base and conditional agents
266
+
267
+ - **Base AI Agents** (Always Generated)
268
+ - PM (Project Manager) - Task coordination and breakdown
269
+ - FE (Frontend Engineer) - UI/UX, React, components, state management
270
+ - BE (Backend Engineer) - APIs, database, SOLID principles
271
+ - UX (UX Designer) - User experience, accessibility, design systems
272
+ - QA (QA Engineer) - Testing strategy and automation
273
+ - Scribe (Documentation) - Technical writing and changelog management
274
+
275
+ - **Conditional AI Agents** (Generated Based on Project Stack)
276
+ - DevOps - Docker, CI/CD, infrastructure (when Docker/CI/CD detected)
277
+ - Security - OWASP, threat modeling (when web app or auth detected)
278
+ - Mobile - React Native, Flutter (when mobile frameworks detected)
279
+ - Data - ML, data pipelines (when ML libraries detected)
280
+
281
+ - **Scribe Agent Workflows**
282
+ - Automatic documentation on `/p:done` completion
283
+ - Feature documentation on `/p:ship` deployment
284
+ - Git-based change detection for documentation scope
285
+ - User confirmation workflow before saving documentation
286
+ - Task docs saved to `analysis/task-docs/`
287
+ - Feature docs saved to `analysis/feature-docs/`
288
+
289
+ - **Enhanced `/p:analyze` Command**
290
+ - Git repository integration and validation
291
+ - Last commit information and statistics
292
+ - Working directory status tracking
293
+ - Validation baseline for user claims
294
+ - Conditional agent detection based on stack
295
+ - Comprehensive project analysis report with git stats
296
+ - Agent recommendation system
297
+
298
+ - **Enhanced `/p:init` Command**
299
+ - Automatic agent generation after project analysis
300
+ - Git-integrated analysis workflow
301
+ - Project-specific agent context injection
302
+ - Smart agent selection based on detected stack
303
+ - Agents stored in `~/.claude/agents/` directory
304
+
305
+ - **New `/p:sync` Command**
306
+ - Re-analyze project for stack changes
307
+ - Update existing agents with new project context
308
+ - Add newly required agents based on stack evolution
309
+ - Remove obsolete agents with user confirmation
310
+ - Comprehensive sync reporting and logging
311
+
312
+ ### Changed
313
+ - **Agent Architecture** - 100% Claude-focused (Claude Code + Claude Desktop)
314
+ - Agents stored in `~/.claude/agents/` directory
315
+ - Markdown format with YAML frontmatter (Claude native)
316
+ - Project-specific naming: `p_agent_[type].md`
317
+ - Dynamic context injection from project analysis
318
+ - Limited expertise per agent (focused specialization)
319
+
320
+ ### Technical Details
321
+ - **10 Agent Templates** in `templates/agents/`
322
+ - 6 base templates (always generated)
323
+ - 4 conditional templates (stack-dependent)
324
+ - Each template includes project context placeholders
325
+ - Specialized tools and color coding per agent type
326
+ - Defined expertise boundaries and trigger keywords
327
+
328
+ - **Git Integration Features**
329
+ - Commit validation and claim verification
330
+ - Working directory change tracking
331
+ - Unverified work identification
332
+ - Comprehensive git statistics
333
+ - Multi-contributor support
334
+
335
+ ## [0.4.10] - 2025-10-02
336
+
337
+ ### Changed
338
+ - **Agent Workflow Initialization** - `prjct init` now properly initializes AI agent workflows
339
+ - When existing codebase detected, prompts user to run `/p:analyze`
340
+ - Enables AI agents to follow complete analysis workflow
341
+ - Provides proper workflow context for comprehensive project analysis
342
+ - Replaced silent programmatic analysis with workflow-driven approach
343
+
344
+ ### Fixed
345
+ - **Analysis Workflow** - AI agents now receive proper instructions during project initialization
346
+ - Removed silent `analyze()` call that bypassed agent workflows
347
+ - Agent workflows now activate when user runs `/p:analyze` command
348
+ - Ensures agents follow complete analysis instructions from workflow templates
349
+
18
350
  ## [0.4.9] - 2025-10-02
19
351
 
20
352
  ### Added
package/CLAUDE.md CHANGED
@@ -46,6 +46,35 @@ The system operates as an AI Assistant Enhancement Framework using:
46
46
 
47
47
  **prjct-cli includes a conversational interface** - users can talk naturally instead of memorizing commands!
48
48
 
49
+ ### p. Trigger Detection
50
+
51
+ **NEW: Simple prefix trigger** - Users can start messages with `p.` to signal prjct context:
52
+
53
+ **How it works:**
54
+ 1. User starts message with `p.` → You check if `.prjct/prjct.config.json` exists
55
+ 2. If exists → Detect intent from rest of message → Execute appropriate `/p:*` command
56
+ 3. If not exists → Respond: "No prjct project here. Run /p:init first."
57
+
58
+ **Examples:**
59
+ ```
60
+ "p. analiza todo este documento" → Detect "analysis" intent → /p:analyze
61
+ "p. estoy listo para shipear" → Detect "ship" intent → /p:ship
62
+ "p. muéstrame progreso semanal" → Detect "progress" intent → /p:progress week
63
+ "p. empiezo con auth" → Detect "start task" intent → /p:now "auth"
64
+ "p. terminé" → Detect "done" intent → /p:done
65
+ ```
66
+
67
+ **Why this is useful:**
68
+ - ✅ **Zero memorization** - No need to remember `/p:*` commands
69
+ - ✅ **Multi-project** - Only works in prjct directories
70
+ - ✅ **Natural** - "p. [what you want]" is intuitive
71
+ - ✅ **Any language** - Works in English, Spanish, etc.
72
+
73
+ **Detection priority:**
74
+ 1. Check for `p.` prefix first
75
+ 2. Then check for `/p:*` slash command
76
+ 3. Finally check for natural language without prefix
77
+
49
78
  ### Semantic Intent Detection
50
79
 
51
80
  As an LLM, you understand context and intent naturally. When users describe what they want to do, **map their intent to the appropriate command** based on semantic understanding, not pattern matching.
@@ -101,11 +130,11 @@ What's next?
101
130
  Or use: /p:now | /p:ship | /p:idea
102
131
  ```
103
132
 
104
- ## Implementation for Claude Code
133
+ ## Implementation for Claude Code & Desktop
105
134
 
106
135
  ### How to Handle Natural Language
107
136
 
108
- When you receive a message from the user:
137
+ When you receive a message from the user, follow these steps to provide the natural language experience:
109
138
 
110
139
  **Step 1: Check if it's a direct command**
111
140
  ```javascript
@@ -142,7 +171,46 @@ if (intent.command) {
142
171
  }
143
172
  ```
144
173
 
145
- **Step 3: Provide conversational response**
174
+ **Step 3: Validate context before execution**
175
+ ```javascript
176
+ // Before executing commands, check prerequisites:
177
+
178
+ // For /p:done:
179
+ if (command === 'done') {
180
+ const nowContent = await Read('core/now.md')
181
+ if (!nowContent || nowContent.trim() === '') {
182
+ return conversationalResponse(`
183
+ ✨ You're not working on anything right now!
184
+
185
+ Want to start something?
186
+ • Tell me what you want to build
187
+ • Say "show me what's next"
188
+ • Or use: /p:now | /p:next
189
+
190
+ Let's ship something!`)
191
+ }
192
+ }
193
+
194
+ // For /p:ship:
195
+ if (command === 'ship') {
196
+ const nowContent = await Read('core/now.md')
197
+ const shippedContent = await Read('progress/shipped.md')
198
+ if ((!nowContent || nowContent.trim() === '') &&
199
+ (!shippedContent || shippedContent.trim() === '')) {
200
+ return conversationalResponse(`
201
+ 🚀 Nothing to ship yet!
202
+
203
+ First, let's build something:
204
+ • Tell me what feature you want to create
205
+ • Say "start building [feature]"
206
+ • Or use: /p:now "feature name"
207
+
208
+ Then we'll celebrate when you ship it!`)
209
+ }
210
+ }
211
+ ```
212
+
213
+ **Step 4: Provide conversational response**
146
214
  ```javascript
147
215
  // Always suggest natural next steps
148
216
  ✅ [What you did]
@@ -178,6 +246,43 @@ When you're done:
178
246
  Need help? Say "I'm stuck" or use /p:stuck
179
247
  ```
180
248
 
249
+ ### Context Validation Examples
250
+
251
+ **Missing Active Task:**
252
+
253
+ User: "done"
254
+ You check: `core/now.md` is empty
255
+ Your response:
256
+ ```
257
+ ✨ You're not working on anything right now!
258
+
259
+ Want to start something?
260
+ • Tell me what you want to build
261
+ • Say "show me what's next"
262
+ • Or use: /p:now | /p:next
263
+
264
+ Let's ship something!
265
+ ```
266
+
267
+ **Valid Context:**
268
+
269
+ User: "I'm done"
270
+ You check: `core/now.md` has content ✅
271
+ Your response:
272
+ ```
273
+ 💬 I understood: "task completion"
274
+ ⚡ Executing: /p:done
275
+
276
+ ✅ Task complete: building authentication (2h 15m)
277
+
278
+ What's next?
279
+ • "start next task" → Begin working
280
+ • "ship this feature" → Track & celebrate
281
+ • "add new idea" → Brainstorm
282
+
283
+ Or use: /p:now | /p:ship | /p:idea
284
+ ```
285
+
181
286
  ### Key Principles
182
287
 
183
288
  1. **Trust your understanding** - You're an LLM, not a regex parser
@@ -185,6 +290,7 @@ Need help? Say "I'm stuck" or use /p:stuck
185
290
  3. **Variations are fine** - Users can express intent in infinite ways
186
291
  4. **Show transparency** - Always say what you understood and what you'll execute
187
292
  5. **Be conversational** - Guide users naturally toward next actions
293
+ 6. **Validate context** - Check prerequisites before executing commands
188
294
 
189
295
  ## Command System for Claude Code
190
296