prjct-cli 0.35.3 → 0.36.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 (68) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +63 -618
  3. package/bin/prjct.ts +116 -17
  4. package/core/cli/start.ts +387 -0
  5. package/core/commands/analysis.ts +58 -32
  6. package/core/commands/command-data.ts +11 -50
  7. package/core/commands/commands.ts +18 -21
  8. package/core/commands/context.ts +238 -0
  9. package/core/commands/register.ts +7 -5
  10. package/core/commands/setup.ts +1 -17
  11. package/core/index.ts +103 -39
  12. package/core/infrastructure/ai-provider.ts +312 -0
  13. package/core/infrastructure/command-installer.ts +49 -5
  14. package/core/infrastructure/editors-config.ts +20 -6
  15. package/core/infrastructure/setup.ts +227 -62
  16. package/core/services/index.ts +2 -0
  17. package/core/services/skill-service.ts +52 -16
  18. package/core/services/sync-service.ts +1080 -0
  19. package/core/types/commands.ts +0 -12
  20. package/core/types/index.ts +12 -1
  21. package/core/types/provider.ts +110 -0
  22. package/core/utils/branding.ts +20 -3
  23. package/dist/bin/prjct.mjs +1053 -1426
  24. package/dist/core/infrastructure/command-installer.js +33 -2
  25. package/dist/core/infrastructure/editors-config.js +13 -3
  26. package/dist/core/infrastructure/setup.js +293 -73
  27. package/package.json +10 -16
  28. package/scripts/postinstall.js +17 -119
  29. package/templates/agentic/agent-routing.md +22 -88
  30. package/templates/agentic/agents/uxui.md +42 -197
  31. package/templates/agentic/context-filtering.md +14 -56
  32. package/templates/agentic/orchestrator.md +26 -302
  33. package/templates/agentic/skill-integration.md +37 -289
  34. package/templates/agentic/subagent-generation.md +31 -104
  35. package/templates/agentic/task-fragmentation.md +39 -273
  36. package/templates/agents/AGENTS.md +33 -181
  37. package/templates/commands/bug.md +22 -520
  38. package/templates/commands/dash.md +26 -161
  39. package/templates/commands/done.md +19 -250
  40. package/templates/commands/enrich.md +21 -732
  41. package/templates/commands/idea.md +18 -160
  42. package/templates/commands/init.md +20 -209
  43. package/templates/commands/merge.md +21 -185
  44. package/templates/commands/next.md +21 -103
  45. package/templates/commands/p.md +1 -1
  46. package/templates/commands/p.toml +37 -0
  47. package/templates/commands/pause.md +21 -272
  48. package/templates/commands/resume.md +18 -411
  49. package/templates/commands/setup.md +0 -1
  50. package/templates/commands/ship.md +30 -627
  51. package/templates/commands/sync.md +11 -1448
  52. package/templates/commands/task.md +17 -439
  53. package/templates/commands/test.md +30 -259
  54. package/templates/global/CLAUDE.md +33 -1
  55. package/templates/global/GEMINI.md +265 -0
  56. package/templates/global/STORAGE-SPEC.md +256 -0
  57. package/templates/global/docs/agents.md +88 -0
  58. package/templates/global/docs/architecture.md +103 -0
  59. package/templates/global/docs/commands.md +96 -0
  60. package/templates/global/docs/validation.md +95 -0
  61. package/CLAUDE.md +0 -211
  62. package/packages/shared/package.json +0 -29
  63. package/packages/shared/src/index.ts +0 -10
  64. package/packages/shared/src/schemas.ts +0 -124
  65. package/packages/shared/src/types.ts +0 -187
  66. package/packages/shared/src/unified.ts +0 -174
  67. package/packages/shared/src/utils.ts +0 -148
  68. package/packages/shared/tsconfig.json +0 -18
@@ -0,0 +1,256 @@
1
+ # Storage Specification
2
+
3
+ **Canonical specification for prjct storage format.**
4
+
5
+ This document defines the exact format for all storage files. Both Claude and Gemini agents MUST produce **identical output** for the same operations to ensure cross-agent compatibility and future remote sync.
6
+
7
+ ---
8
+
9
+ ## Directory Structure
10
+
11
+ ```
12
+ ~/.prjct-cli/projects/{projectId}/
13
+ ├── storage/
14
+ │ ├── state.json # Current task (SOURCE OF TRUTH)
15
+ │ ├── queue.json # Task queue
16
+ │ └── shipped.json # Shipped features
17
+ ├── context/
18
+ │ ├── now.md # Current task (generated from state.json)
19
+ │ └── next.md # Queue (generated from queue.json)
20
+ ├── config/
21
+ │ └── skills.json # Agent-to-skill mappings
22
+ ├── memory/
23
+ │ └── events.jsonl # Audit trail (append-only)
24
+ ├── agents/ # Domain specialists (auto-generated)
25
+ └── sync/
26
+ └── pending.json # Events for backend sync
27
+ ```
28
+
29
+ ---
30
+
31
+ ## JSON Schemas
32
+
33
+ ### state.json
34
+
35
+ ```json
36
+ {
37
+ "task": {
38
+ "id": "uuid-v4",
39
+ "title": "string",
40
+ "type": "feature|bug|improvement|refactor|chore",
41
+ "status": "active|paused|done",
42
+ "branch": "string|null",
43
+ "subtasks": [
44
+ {
45
+ "id": "uuid-v4",
46
+ "title": "string",
47
+ "status": "pending|done"
48
+ }
49
+ ],
50
+ "currentSubtask": 0,
51
+ "createdAt": "2024-01-15T10:30:00.000Z",
52
+ "updatedAt": "2024-01-15T10:30:00.000Z"
53
+ }
54
+ }
55
+ ```
56
+
57
+ **Empty state (no active task):**
58
+ ```json
59
+ {
60
+ "task": null
61
+ }
62
+ ```
63
+
64
+ ### queue.json
65
+
66
+ ```json
67
+ {
68
+ "tasks": [
69
+ {
70
+ "id": "uuid-v4",
71
+ "title": "string",
72
+ "type": "feature|bug|improvement|refactor|chore",
73
+ "priority": 1,
74
+ "createdAt": "2024-01-15T10:30:00.000Z"
75
+ }
76
+ ],
77
+ "updatedAt": "2024-01-15T10:30:00.000Z"
78
+ }
79
+ ```
80
+
81
+ ### shipped.json
82
+
83
+ ```json
84
+ {
85
+ "features": [
86
+ {
87
+ "id": "uuid-v4",
88
+ "name": "string",
89
+ "version": "1.0.0",
90
+ "type": "feature|bug|improvement|refactor|chore",
91
+ "shippedAt": "2024-01-15T10:30:00.000Z"
92
+ }
93
+ ],
94
+ "updatedAt": "2024-01-15T10:30:00.000Z"
95
+ }
96
+ ```
97
+
98
+ ### events.jsonl (append-only)
99
+
100
+ One JSON object per line. NEVER modify existing lines.
101
+
102
+ ```jsonl
103
+ {"type":"task.created","timestamp":"2024-01-15T10:30:00.000Z","data":{"taskId":"uuid","title":"string"}}
104
+ {"type":"task.started","timestamp":"2024-01-15T10:30:00.000Z","data":{"taskId":"uuid"}}
105
+ {"type":"subtask.completed","timestamp":"2024-01-15T10:35:00.000Z","data":{"taskId":"uuid","subtaskIndex":0}}
106
+ {"type":"task.completed","timestamp":"2024-01-15T10:40:00.000Z","data":{"taskId":"uuid"}}
107
+ {"type":"feature.shipped","timestamp":"2024-01-15T10:45:00.000Z","data":{"featureId":"uuid","name":"string","version":"1.0.0"}}
108
+ ```
109
+
110
+ **Event Types:**
111
+ - `task.created` - New task created
112
+ - `task.started` - Task activated
113
+ - `task.paused` - Task paused
114
+ - `task.resumed` - Task resumed
115
+ - `task.completed` - Task completed
116
+ - `subtask.completed` - Subtask completed
117
+ - `feature.shipped` - Feature shipped
118
+
119
+ ### skills.json
120
+
121
+ ```json
122
+ {
123
+ "mappings": {
124
+ "frontend.md": ["frontend-design"],
125
+ "backend.md": ["javascript-typescript"],
126
+ "testing.md": ["developer-kit"]
127
+ },
128
+ "updatedAt": "2024-01-15T10:30:00.000Z"
129
+ }
130
+ ```
131
+
132
+ ### pending.json (sync queue)
133
+
134
+ ```json
135
+ {
136
+ "events": [
137
+ {
138
+ "id": "uuid-v4",
139
+ "type": "task.created",
140
+ "timestamp": "2024-01-15T10:30:00.000Z",
141
+ "data": {},
142
+ "synced": false
143
+ }
144
+ ],
145
+ "lastSync": "2024-01-15T10:30:00.000Z"
146
+ }
147
+ ```
148
+
149
+ ---
150
+
151
+ ## Formatting Rules (MANDATORY)
152
+
153
+ All agents MUST follow these rules for cross-agent compatibility:
154
+
155
+ | Rule | Value |
156
+ |------|-------|
157
+ | JSON indentation | 2 spaces |
158
+ | Trailing commas | NEVER |
159
+ | Key ordering | Logical (as shown in schemas above) |
160
+ | Timestamps | ISO-8601 with milliseconds (`.000Z`) |
161
+ | UUIDs | v4 format (lowercase) |
162
+ | Line endings | LF (not CRLF) |
163
+ | File encoding | UTF-8 without BOM |
164
+ | Empty objects | `{}` |
165
+ | Empty arrays | `[]` |
166
+ | Null values | `null` (lowercase) |
167
+
168
+ ### Timestamp Generation
169
+
170
+ ```bash
171
+ # ALWAYS use dynamic timestamps, NEVER hardcode
172
+ bun -e "console.log(new Date().toISOString())" 2>/dev/null || node -e "console.log(new Date().toISOString())"
173
+ ```
174
+
175
+ ### UUID Generation
176
+
177
+ ```bash
178
+ # ALWAYS generate fresh UUIDs
179
+ bun -e "console.log(crypto.randomUUID())" 2>/dev/null || node -e "console.log(require('crypto').randomUUID())"
180
+ ```
181
+
182
+ ---
183
+
184
+ ## Write Rules (CRITICAL)
185
+
186
+ ### Direct Writes Only
187
+
188
+ **NEVER use temporary files** - Write directly to final destination:
189
+
190
+ ```
191
+ WRONG: Create `.tmp/file.json`, then `mv` to final path
192
+ CORRECT: Write directly to `{globalPath}/storage/state.json`
193
+ ```
194
+
195
+ ### Atomic Updates
196
+
197
+ ```javascript
198
+ // Read → Modify → Write (no temp files)
199
+ const data = JSON.parse(fs.readFileSync(path, 'utf-8'))
200
+ data.newField = value
201
+ fs.writeFileSync(path, JSON.stringify(data, null, 2))
202
+ ```
203
+
204
+ ### NEVER Do These
205
+
206
+ - Use `.tmp/` directories
207
+ - Use `mv` or `rename` operations for storage files
208
+ - Create backup files like `*.bak` or `*.old`
209
+ - Modify existing lines in `events.jsonl`
210
+ - Use different JSON formatting between agents
211
+
212
+ ---
213
+
214
+ ## Cross-Agent Compatibility
215
+
216
+ ### Why This Matters
217
+
218
+ 1. **User freedom**: Switch between Claude and Gemini freely
219
+ 2. **Remote sync**: Storage will sync to prjct.app backend
220
+ 3. **Single truth**: Both agents produce identical output
221
+
222
+ ### Verification Test
223
+
224
+ ```bash
225
+ # Start task with Claude
226
+ p. task "add feature X"
227
+
228
+ # Switch to Gemini, continue
229
+ p. done # Should work seamlessly
230
+
231
+ # Switch back to Claude
232
+ p. ship # Should read Gemini's changes correctly
233
+
234
+ # Verify JSON format
235
+ cat ~/.prjct-cli/projects/{id}/storage/state.json | python -m json.tool
236
+ # Must be valid, formatted JSON
237
+ ```
238
+
239
+ ### Remote Sync Flow
240
+
241
+ ```
242
+ Local Storage (Claude/Gemini)
243
+
244
+ sync/pending.json (events queue)
245
+
246
+ prjct.app API
247
+
248
+ Global Remote Storage
249
+
250
+ Any device, any agent
251
+ ```
252
+
253
+ ---
254
+
255
+ **Version**: 1.0.0
256
+ **Last Updated**: 2024-01-15
@@ -0,0 +1,88 @@
1
+ # Using Agents
2
+
3
+ ## What Are Agents?
4
+
5
+ Agents are specialized Claude configurations for different domains:
6
+
7
+ | Agent | Domain | When to Use |
8
+ |-------|--------|-------------|
9
+ | `fe.md` | Frontend | React, CSS, UI components |
10
+ | `be.md` | Backend | APIs, databases, servers |
11
+ | `ux.md` | UX Design | Layouts, user flows |
12
+ | `qa.md` | Testing | Tests, QA, bug fixes |
13
+ | `docs.md` | Documentation | README, docs, comments |
14
+
15
+ ## Agent Location
16
+
17
+ Agents live in global storage:
18
+
19
+ ```
20
+ ~/.prjct-cli/projects/{projectId}/agents/
21
+ ├── fe.md # Frontend specialist
22
+ ├── be.md # Backend specialist
23
+ ├── ux.md # UX specialist
24
+ ├── qa.md # Testing specialist
25
+ └── docs.md # Documentation specialist
26
+ ```
27
+
28
+ ## When to Read Agent Files
29
+
30
+ Read the relevant agent file before working in that domain:
31
+
32
+ ```
33
+ Task: "implement React component"
34
+ → Read agents/fe.md for React patterns
35
+ → Follow detected conventions
36
+
37
+ Task: "add API endpoint"
38
+ → Read agents/be.md for API patterns
39
+ → Follow project architecture
40
+ ```
41
+
42
+ ## Agent File Structure
43
+
44
+ Each agent file contains:
45
+
46
+ ```markdown
47
+ ---
48
+ name: fe
49
+ description: Frontend specialist for React/TypeScript
50
+ tools: Read, Write, Glob, Grep, Bash
51
+ ---
52
+
53
+ ## Expertise
54
+ - React components and hooks
55
+ - TypeScript patterns
56
+ - CSS/styling conventions
57
+
58
+ ## Project Patterns
59
+ - Components in src/components/
60
+ - Use functional components
61
+ - CSS modules for styling
62
+
63
+ ## Code Conventions
64
+ - Named exports
65
+ - Props interfaces defined inline
66
+ - Error boundaries for async components
67
+ ```
68
+
69
+ ## Auto-Detection
70
+
71
+ When starting a task with `/p:now`, agents are auto-detected by keywords:
72
+
73
+ | Keywords | Agent |
74
+ |----------|-------|
75
+ | UI, frontend, React, component, CSS | `fe` |
76
+ | API, backend, database, server | `be` |
77
+ | design, UX, layout, wireframe | `ux` |
78
+ | test, QA, bug, coverage | `qa` |
79
+ | docs, README, documentation | `docs` |
80
+
81
+ ## Agent Generation
82
+
83
+ Agents are generated by `/p:sync` based on:
84
+ - Detected tech stack (package.json, etc.)
85
+ - Project structure
86
+ - Code patterns found in codebase
87
+
88
+ Re-run `/p:sync` to regenerate agents after major changes.
@@ -0,0 +1,103 @@
1
+ # prjct Architecture
2
+
3
+ ## Write-Through Pattern
4
+
5
+ All data flows through three layers:
6
+
7
+ ```
8
+ User Action → Storage (JSON) → Context (MD) → Sync Events (JSONL)
9
+ ```
10
+
11
+ ### Layer Responsibilities
12
+
13
+ | Layer | Path | Purpose | Format |
14
+ |-------|------|---------|--------|
15
+ | **Storage** | `storage/*.json` | Source of truth | JSON |
16
+ | **Context** | `context/*.md` | Claude-readable summaries | Markdown |
17
+ | **Sync** | `sync/pending.json` | Backend event queue | JSON array |
18
+ | **Memory** | `memory/events.jsonl` | Audit trail | JSONL (append-only) |
19
+
20
+ ### Data Flow Example
21
+
22
+ When user runs `/p:now "implement auth"`:
23
+
24
+ 1. **Storage**: Write to `storage/state.json`
25
+ ```json
26
+ { "currentTask": { "description": "implement auth", ... } }
27
+ ```
28
+
29
+ 2. **Context**: Generate `context/now.md`
30
+ ```markdown
31
+ # NOW
32
+ **implement auth**
33
+ Started: 2025-12-20T10:30:00.000Z
34
+ ```
35
+
36
+ 3. **Sync**: Append to `sync/pending.json`
37
+ ```json
38
+ { "type": "task.started", "data": {...} }
39
+ ```
40
+
41
+ 4. **Memory**: Append to `memory/events.jsonl`
42
+ ```json
43
+ {"timestamp":"...","action":"task_started","task":"implement auth"}
44
+ ```
45
+
46
+ ## File Structure
47
+
48
+ ```
49
+ ~/.prjct-cli/projects/{projectId}/
50
+ ├── storage/ # SOURCE OF TRUTH
51
+ │ ├── state.json # Current task state
52
+ │ ├── shipped.json # Shipped features
53
+ │ ├── ideas.json # Ideas backlog
54
+ │ └── queue.json # Task queue
55
+
56
+ ├── context/ # CLAUDE-READABLE (generated)
57
+ │ ├── now.md # Current task summary
58
+ │ ├── shipped.md # Recent ships
59
+ │ └── next.md # Priority queue
60
+
61
+ ├── sync/ # BACKEND EVENTS
62
+ │ └── pending.json # Events waiting for sync
63
+
64
+ ├── memory/ # AUDIT TRAIL
65
+ │ └── events.jsonl # Append-only log
66
+
67
+ ├── agents/ # DOMAIN SPECIALISTS
68
+ │ ├── fe.md # Frontend agent
69
+ │ ├── be.md # Backend agent
70
+ │ └── ...
71
+
72
+ └── CLAUDE.md # Project context (read first)
73
+ ```
74
+
75
+ ## Storage vs Context
76
+
77
+ | Aspect | Storage (JSON) | Context (MD) |
78
+ |--------|----------------|--------------|
79
+ | Format | Structured JSON | Human-readable Markdown |
80
+ | Purpose | Source of truth | Claude summaries |
81
+ | Updates | Direct writes | Generated from storage |
82
+ | Read by | Code, Claude | Primarily Claude |
83
+
84
+ ## Timestamps
85
+
86
+ All timestamps use ISO 8601 format:
87
+
88
+ ```bash
89
+ # Prefer bun, fallback to node
90
+ bun -e "console.log(new Date().toISOString())" 2>/dev/null || node -e "console.log(new Date().toISOString())"
91
+ # Output: "2025-12-20T10:30:00.000Z"
92
+ ```
93
+
94
+ **NEVER** hardcode timestamps. Always generate dynamically.
95
+
96
+ ## IDs
97
+
98
+ Use UUID v4 for all IDs:
99
+
100
+ ```bash
101
+ bun -e "console.log(crypto.randomUUID())" 2>/dev/null || node -e "console.log(require('crypto').randomUUID())"
102
+ # Output: "550e8400-e29b-41d4-a716-446655440000"
103
+ ```
@@ -0,0 +1,96 @@
1
+ # prjct Commands Reference
2
+
3
+ ## Command Table
4
+
5
+ | Trigger | Purpose | Arguments |
6
+ |---------|---------|-----------|
7
+ | `p. sync` | Analyze project, generate agents | - |
8
+ | `p. task [desc] [estimate]` | Start/show current task | desc: string, estimate: "2h", "30m" |
9
+ | `p. done` | Complete current task | - |
10
+ | `p. ship [feature]` | Ship with quality checks | feature: string |
11
+ | `p. next` | Show priority queue | - |
12
+ | `p. idea [text]` | Quick idea capture | text: string |
13
+ | `p. dash` | Project dashboard | - |
14
+ | `p. pause [reason]` | Pause current task | reason: string |
15
+ | `p. resume` | Resume paused task | - |
16
+ | `p. bug [desc]` | Report bug | desc: string |
17
+
18
+ ## Recommended Workflow
19
+
20
+ ```
21
+ 1. p. sync → Analyze project, generate agents
22
+ 2. p. idea → Capture what to build
23
+ 3. p. task → Start working on task
24
+ 4. [code...] → Do the actual work
25
+ 5. p. done → Mark task complete
26
+ 6. p. ship → Ship and celebrate
27
+ ```
28
+
29
+ ## Command Examples
30
+
31
+ ### Starting Work
32
+ ```
33
+ p. task implement user authentication 2h
34
+ ```
35
+ - Sets current task
36
+ - Optional estimate for tracking accuracy
37
+
38
+ ### Completing Work
39
+ ```
40
+ p. done
41
+ ```
42
+ - Calculates duration
43
+ - Logs metrics (files changed, commits)
44
+ - Clears current task
45
+
46
+ ### Shipping
47
+ ```
48
+ p. ship user authentication
49
+ ```
50
+ - Runs lint/tests (optional)
51
+ - Bumps version
52
+ - Creates git commit
53
+ - Updates CHANGELOG
54
+
55
+ ### Quick Capture
56
+ ```
57
+ p. idea add dark mode support
58
+ ```
59
+ - Saves to ideas backlog
60
+ - Doesn't interrupt current work
61
+
62
+ ## How It Works
63
+
64
+ Start your message with `p.` followed by the command:
65
+
66
+ ```
67
+ p. task login form
68
+ → Starts task "login form"
69
+
70
+ p. done
71
+ → Completes current task
72
+
73
+ p. ship authentication
74
+ → Ships "authentication" feature
75
+ ```
76
+
77
+ ## Command Output Format
78
+
79
+ All commands output concise responses:
80
+
81
+ ```
82
+ ✅ [What was done]
83
+
84
+ [Key metrics if applicable]
85
+
86
+ Next: [suggested action]
87
+ ```
88
+
89
+ Example:
90
+ ```
91
+ ✅ implement auth (2h 15m)
92
+
93
+ Files: 5 | +120/-30 | Commits: 3
94
+
95
+ Next: p. ship or p. task
96
+ ```
@@ -0,0 +1,95 @@
1
+ # Validation Patterns
2
+
3
+ ## Before Any Command
4
+
5
+ ```javascript
6
+ // 1. Check project exists
7
+ const config = await Read('.prjct/prjct.config.json')
8
+ if (!config) {
9
+ return "No prjct project. Run /p:init first."
10
+ }
11
+
12
+ // 2. Extract projectId
13
+ const { projectId } = JSON.parse(config)
14
+
15
+ // 3. Construct global path
16
+ const globalPath = `~/.prjct-cli/projects/${projectId}`
17
+ ```
18
+
19
+ ## Before /p:done
20
+
21
+ ```javascript
22
+ const state = await Read(`${globalPath}/storage/state.json`)
23
+
24
+ if (!state || !state.currentTask) {
25
+ return "Not working on anything. Use /p:now to start a task."
26
+ }
27
+
28
+ if (state.currentTask.status !== 'active') {
29
+ return "No active task. Use /p:now to start one."
30
+ }
31
+ ```
32
+
33
+ ## Before /p:ship
34
+
35
+ ```javascript
36
+ // Check git status
37
+ const gitStatus = await Bash('git status --porcelain')
38
+
39
+ if (!gitStatus.trim()) {
40
+ return "No changes to ship. Make some commits first."
41
+ }
42
+
43
+ // Verify git repo
44
+ const isGitRepo = await Bash('git rev-parse --is-inside-work-tree')
45
+ if (!isGitRepo) {
46
+ return "Not a git repository. Initialize git first."
47
+ }
48
+ ```
49
+
50
+ ## Before /p:pause
51
+
52
+ ```javascript
53
+ const state = await Read(`${globalPath}/storage/state.json`)
54
+
55
+ if (!state?.currentTask || state.currentTask.status !== 'active') {
56
+ return "No active task to pause."
57
+ }
58
+ ```
59
+
60
+ ## Before /p:resume
61
+
62
+ ```javascript
63
+ const state = await Read(`${globalPath}/storage/state.json`)
64
+
65
+ if (!state?.pausedTask) {
66
+ return "No paused task to resume. Use /p:now to start a new task."
67
+ }
68
+ ```
69
+
70
+ ## Error Handling
71
+
72
+ | Error | Response | Action |
73
+ |-------|----------|--------|
74
+ | Config not found | "No prjct project" | STOP |
75
+ | No current task | "Not working on anything" | STOP |
76
+ | No paused task | "No paused task" | STOP |
77
+ | Git fails | Use defaults for metrics | CONTINUE |
78
+ | Write fails | Log warning | CONTINUE |
79
+ | File not found | Return empty/default state | CONTINUE |
80
+
81
+ ## Path Resolution
82
+
83
+ **CRITICAL**: All paths resolve to global storage.
84
+
85
+ ```javascript
86
+ // Template says:
87
+ "Read: storage/state.json"
88
+
89
+ // Actually reads:
90
+ `~/.prjct-cli/projects/${projectId}/storage/state.json`
91
+
92
+ // NEVER:
93
+ ".prjct/storage/state.json" // Wrong - local
94
+ "./storage/state.json" // Wrong - current dir
95
+ ```