prjct-cli 1.10.0 → 1.12.0

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,2392 +1,124 @@
1
1
  # Changelog
2
2
 
3
- ## [1.10.0] - 2026-02-08
4
-
5
- ### Features
6
-
7
- - redesign prompt assembly with correct section ordering + anti-hallucination (PRJ-301) (#152)
8
- - add coordinated global token budget (PRJ-266) (#151)
9
-
10
-
11
- ## [1.12.0] - 2026-02-07
12
-
13
- ### Features
14
- - **Prompt Assembly Redesign**: Correct section ordering based on research of 25+ system prompts (PRJ-301)
15
- - **Environment Block**: Structured `<env>` block with project, git, platform, runtime, and model metadata
16
- - **Anti-Hallucination Block**: Explicit availability/unavailability grounding injected BEFORE task context
17
- - **Token Efficiency Directive**: Conciseness rules appended to every prompt
18
-
19
- ### Implementation Details
20
- Redesigned `prompt-builder.ts` section ordering to follow research-backed pattern:
21
- Identity → Environment → Ground Truth → Capabilities → Constraints → Task Context → Task → Output Schema → Efficiency
22
-
23
- Key changes:
24
- - New `environment-block.ts`: Generates `<env>` XML block with auto-detected runtime, platform, and normalized names
25
- - New `anti-hallucination.ts`: Generates constraints block from sealed analysis (available tech, absent domains, grounding rules)
26
- - Moved template content (task instructions) to section 7 — LLM knows identity, env, and rules before reading task
27
- - Anti-hallucination block placed at section 5 (before task context), replacing old `RULES (CRITICAL)` at the end
28
- - Added `buildEfficiencyDirective()` with conciseness rules (max 4 lines, no preamble/postamble)
29
- - Exported `PROMPT_SECTION_ORDER` constant and `SectionPriority` type for budget trimming
30
- - Kept `buildCriticalRules()` as fallback when project context unavailable
31
-
32
- ### Learnings
33
- - Zod `.default()` only applies during `.parse()` — raw object construction skips defaults, use `??` fallback
34
- - Renaming prompt section headers breaks existing test assertions — always update test matchers
35
- - Template position matters: placing task instructions after constraints improves LLM grounding
36
-
37
- ### Test Plan
38
-
39
- #### For QA
40
- 1. Run `bun test` — all 719 tests pass (0 failures)
41
- 2. Run `bun run build` — build succeeds
42
- 3. Verify `<env>` block appears in generated prompts before constraints
43
- 4. Verify `CONSTRAINTS (Read Before Acting)` appears before template content
44
- 5. Verify `OUTPUT RULES` section appears at end of prompt
45
- 6. Check `AVAILABLE` and `NOT PRESENT` lists reflect project tech stack
46
- 7. Run `prjct sync` — prompt assembly still works end-to-end
47
-
48
- #### For Users
49
- Prompts sent to AI models are now structured with research-backed section ordering, reducing hallucinations and improving response conciseness. No user action required — improvements are automatic.
50
-
51
- ## [1.11.0] - 2026-02-07
52
-
53
- ### Features
54
- - **Token Budget Coordinator**: Centralized token budget management across all context-loading components (PRJ-266)
55
-
56
- ### Implementation Details
57
- Created `TokenBudgetCoordinator` class that manages the global token budget based on model context windows. Key features:
58
- - Model context window registry (Claude 200K, Gemini 1M) with automatic budget calculation
59
- - Input/output budget split: 65% input, 35% reserved for output
60
- - Priority-based allocation: state (P1) > injection context (P2) > file content (P3)
61
- - Request/record API for usage tracking with overflow detection
62
- - Integrated into `injection-validator.ts`, `prompt-builder.ts`, and `context-selector.ts`
63
- - Backward compatible: falls back to existing defaults when no coordinator is set
64
-
65
- ### Test Plan
66
-
67
- #### For QA
68
- 1. Create coordinator with `'sonnet'` → input budget = 130K, output reserve = 70K
69
- 2. Create with `'2.5-pro'` (Gemini) → input budget = 650K (5x Claude)
70
- 3. Request tokens up to allocation limit → verify grants are capped
71
- 4. Exhaust a category budget → verify subsequent requests return 0
72
- 5. Verify `budgetsFromCoordinator()` uses coordinator's injection allocation
73
- 6. Run full test suite → all 705 tests pass
74
-
75
- #### For Users
76
- Token budgets are now centrally coordinated based on the model's context window. Larger models get proportionally larger budgets automatically. No breaking changes.
77
-
78
- ## [1.9.0] - 2026-02-07
3
+ ## [1.12.0] - 2026-02-09
79
4
 
80
5
  ### Features
81
6
 
82
- - add structured output schema to all LLM prompts (PRJ-264) (#150)
83
- - add mandatory model specification to AI provider (PRJ-265) (#149)
7
+ - make subtask output and handoff mandatory (PRJ-262) (#154)
84
8
 
85
- ### Bug Fixes
86
9
 
87
- - replace keyword domain detection with LLM semantic classification (PRJ-299) (#148)
88
-
89
- ## [1.10.0] - 2026-02-07
90
-
91
- ### Features
92
- - **Add structured output schema to all LLM prompts (PRJ-264)**: LLM prompts now include explicit JSON output schemas. Responses are validated with Zod before use. Invalid responses trigger re-prompt with structured error feedback.
93
-
94
- ### Implementation Details
95
- - New `core/schemas/llm-output.ts`: Zod schemas for task classification, agent assignment, and subtask breakdown responses. Schema registry (`OUTPUT_SCHEMAS`) with examples that self-validate. `renderSchemaForPrompt()` serializes schemas as markdown format instructions for prompt injection.
96
- - New `core/agentic/response-validator.ts`: `validateLLMResponse()` handles JSON parsing (plain and markdown-wrapped `\`\`\`json` fences), Zod validation, and typed results. `buildReprompt()` generates retry messages with specific validation errors.
97
- - Replaced manual field-by-field validation in `domain-classifier.ts` with `TaskClassificationSchema.safeParse()` — the schema existed (PRJ-299) but was unused.
98
- - Added output schema injection to `prompt-builder.ts` `build()` method with `getSchemaTypeForCommand()` mapping commands to schemas.
99
- - 20 new unit tests in `core/__tests__/agentic/response-validator.test.ts`
100
-
101
- ### Test Plan
102
-
103
- #### For QA
104
- 1. Run `bun test core/__tests__/agentic/response-validator.test.ts` — all 20 tests pass
105
- 2. Run `bun test` — full suite (677 tests) passes with no regressions
106
- 3. Run `bun run build` — build succeeds cleanly
107
- 4. Verify `renderSchemaForPrompt('classification')` returns markdown with OUTPUT FORMAT header
108
- 5. Verify `validateLLMResponse()` handles plain JSON, markdown-wrapped JSON, and rejects non-JSON
109
- 6. Verify OUTPUT_SCHEMAS registry examples validate against their own schemas
110
-
111
- #### For Users
112
- **What changed:** LLM prompts include explicit JSON output schemas. Domain classifier uses Zod validation. Response validator provides structured error handling with re-prompt.
113
- **How to use:** Automatic — schemas injected into prompts and validation runs transparently.
114
- **Breaking changes:** None — all changes are additive.
115
-
116
- ## [1.9.0] - 2026-02-07
10
+ ## [1.11.0] - 2026-02-09
117
11
 
118
12
  ### Features
119
- - **Add mandatory model specification to AI provider (PRJ-265)**: Provider configs now include `defaultModel`, `supportedModels`, and `minCliVersion` fields. Analysis and task metadata can record which model was used, enabling consistency tracking and mismatch warnings.
13
+ - **Mandatory Subtask Handoff**: Subtask completion now requires structured handoff data files changed, work summary, and context for the next subtask (PRJ-262)
14
+ - **Prompt Handoff Injection**: Previous subtask handoff automatically rendered in next subtask's prompt context
15
+ - **Completion Validation**: `SubtaskCompletionDataSchema` with Zod validation rejects empty handoff at `completeSubtask()`
16
+ - **Sealable Analysis**: 3-state lifecycle (draft/verified/sealed) with SHA-256 commit-hash signatures (PRJ-263)
17
+ - **Dual Storage**: Re-sync creates drafts without destroying sealed analysis — only sealed feeds task context
18
+ - **Staleness Detection**: Warns when HEAD moves past the sealed commit hash
19
+ - **Seal & Verify Commands**: `prjct seal` locks draft analysis, `prjct verify` checks integrity
120
20
 
121
21
  ### Implementation Details
122
- - New `core/schemas/model.ts`: Zod schemas defining supported models per provider (Claude: opus/sonnet/haiku, Gemini: 2.5-pro/2.5-flash/2.0-flash), default model resolution, semver comparison utilities, minimum CLI version validation, and model mismatch detection
123
- - Extended `AIProviderConfig` interface in `core/types/provider.ts` with `defaultModel`, `supportedModels`, `minCliVersion` fields
124
- - All 5 provider configs (Claude, Gemini, Cursor, Windsurf, Antigravity) updated with model specification fields
125
- - Added `modelMetadata` (optional) to `CurrentTaskSchema` in `core/schemas/state.ts` and `AnalysisSchema` in `core/schemas/analysis.ts`
126
- - Added `preferredModel` to `ProjectSettings` in `core/types/config.ts`
127
- - Added `validateCliVersion()` to `core/infrastructure/ai-provider.ts` with version warning integration into `detectProvider()`
128
- - Added `versionWarning` field to `ProviderDetectionResult`
129
- - 32 new unit tests in `core/__tests__/schemas/model.test.ts`
130
-
131
- ### Test Plan
132
-
133
- #### For QA
134
- 1. Verify `ClaudeProvider.defaultModel` is `'sonnet'` and `supportedModels` includes `['opus', 'sonnet', 'haiku']`
135
- 2. Verify `GeminiProvider.defaultModel` is `'2.5-flash'` and `supportedModels` includes `['2.5-pro', '2.5-flash', '2.0-flash']`
136
- 3. Verify multi-model IDEs (Cursor, Windsurf) have `null` defaultModel and empty supportedModels
137
- 4. Run `bun test core/__tests__/schemas/model.test.ts` — all 32 tests pass
138
- 5. Run `bun test` — full suite (657 tests) passes with no regressions
139
- 6. Run `bun run build` — build succeeds cleanly
140
22
 
141
- #### For Users
142
- **What changed:** Provider configs now include model specification fields. Analysis and task metadata can record which model was used. Version validation warns if CLI is outdated.
143
- **How to use:** Existing configs work unchanged — model fields have sensible defaults. New `preferredModel` setting available in project settings.
144
- **Breaking changes:** None — all new fields are optional or have defaults.
23
+ **PRJ-262 Mandatory Subtask Handoff**
24
+ Made `outputForNextAgent` required in `SubtaskSummarySchema` and `whatWasDone` min(1). Added `SubtaskCompletionDataSchema` for completion-time validation. `completeSubtask()` now requires `SubtaskCompletionData` and validates with Zod before persisting. Extended `OrchestratorSubtask` with optional `handoff` field. Prompt builder renders previous subtask handoff (files, work done, context). Done template updated with Step 3.5 for mandatory handoff collection.
145
25
 
146
- ## [1.8.1] - 2026-02-07
26
+ Key changes:
27
+ - `core/schemas/state.ts` — Required fields, `SubtaskCompletionDataSchema`, `validateSubtaskCompletion()`
28
+ - `core/storage/state-storage.ts` — `completeSubtask()` enforces handoff, `getPreviousHandoff()` helper
29
+ - `core/types/agentic.ts` — `OrchestratorSubtask.handoff` field
30
+ - `core/agentic/prompt-builder.ts` — Renders previous subtask handoff in prompt
31
+ - `templates/commands/done.md` — Step 3.5: Mandatory handoff collection
147
32
 
148
- ### Bug Fixes
149
- - **Replace keyword domain detection with LLM semantic classification (PRJ-299)**: Eliminated substring false positives in domain classification. "author" no longer matches "auth" backend, "Build responsive dashboard" correctly routes to frontend.
33
+ **PRJ-263 Sealable Analysis**
34
+ New `analysis-storage.ts` extends StorageManager with dual storage (draft + sealed). Analysis schema rewritten as Zod schemas with runtime validation. Sync service writes drafts in parallel with existing writes. Canonical JSON representation ensures deterministic SHA-256 signatures.
150
35
 
151
- ### Implementation Details
152
- - New `core/agentic/domain-classifier.ts`: LLM-based classifier with 4-level fallback chain (cache confirmed history Claude Haiku API → word-boundary heuristic)
153
- - New `core/schemas/classification.ts`: Zod schemas for TaskClassification, cache entries, and confirmed patterns
154
- - Replaced substring `includes()` matching in `smart-context.ts` and `orchestrator-executor.ts` with word-boundary regex (`\b`)
155
- - Removed ~230 lines of hardcoded keyword lists from both files
156
- - Classification results cached per (project + description hash) with 1-hour TTL
157
- - Successful classifications auto-persisted as confirmed patterns via `confirmClassification()`
36
+ Key changes:
37
+ - `core/schemas/analysis.ts` Full rewrite: plain interfacesZod schemas with `AnalysisStatusSchema`, `AnalysisItemSchema`
38
+ - `core/storage/analysis-storage.ts` New: dual storage, sealing, verification, staleness detection
39
+ - `core/services/sync-service.ts` Added `saveDraftAnalysis()` to parallel writes
40
+ - `core/commands/analysis.ts` Added `seal()` and `verify()` command methods
41
+ - `core/commands/register.ts`, `core/index.ts` Registered new commands
158
42
 
159
43
  ### Learnings
160
- - Word-boundary regex (`\b`) correctly rejects "author" matching "auth" because there's no boundary between "auth" and "or" in "author"
161
- - Using raw `fetch` to Claude API avoids adding `@anthropic-ai/sdk` dependency while keeping vendor-neutral design
162
- - Centralized classifier in `domain-classifier.ts` consumed by both `smart-context.ts` and `orchestrator-executor.ts` eliminates duplication
163
-
164
- ### Test Plan
165
-
166
- #### For QA
167
- 1. Run `bun test` — all 625 tests should pass
168
- 2. Verify `detectDomain('Fix the author display on profile page')` returns `frontend` (not `backend`)
169
- 3. Verify `detectDomain('Build responsive dashboard')` returns `frontend` (not `general`)
170
- 4. Verify `detectDomain('Fix the auth middleware')` returns `backend` (standalone "auth" still works)
171
- 5. Verify `classifyWithHeuristic` returns `general` with confidence 0.3 for unrecognizable tasks
172
- 6. Run `bun run build` — build should succeed
173
-
174
- #### For Users
175
- **What changed:** Domain classification uses smarter word-boundary matching, eliminating false positives.
176
- **How to use:** No user-facing changes — classification happens automatically during `p. task`.
177
- **Breaking changes:** None for end users.
178
-
179
- ## [1.8.0] - 2026-02-07
180
-
181
- ### Features
182
-
183
- - add Fibonacci estimation with variance tracking (PRJ-295) (#145)
184
- - add PerformanceTracker for CLI metrics (PRJ-297) (#146)
185
-
186
- ### Bug Fixes
187
-
188
- - replace hardcoded command lists with config-driven context (PRJ-298) (#147)
189
-
190
-
191
- ## [1.8.0] - 2026-02-07
192
-
193
- ### Features
194
- - **Fibonacci estimation with variance tracking (PRJ-295)**: Capture Fibonacci point estimates (1,2,3,5,8,13,21) on task start with automatic points-to-time conversion, record actual duration on done, and display estimation variance.
195
-
196
- ### Implementation Details
197
- - New `core/domain/fibonacci.ts` module: `FIBONACCI_POINTS`, `pointsToMinutes()`, `pointsToTimeRange()`, `findClosestPoint()`, `suggestFromHistory()`
198
- - Added `estimatedPoints` and `estimatedMinutes` optional fields to `CurrentTaskSchema` and `SubtaskSchema`
199
- - Added `updateCurrentTask()` partial update method to `StateStorage`
200
- - `now()` handler returns `fibonacci` helper object with `storeEstimate(points)` for template use
201
- - `done()` handler records outcomes via `outcomeRecorder.record()` and displays variance: `est: 5pt (1h 30m) → +50%`
44
+ - Keep storage schema backward-compatible (optional fields) but validate at completion call site
45
+ - Dual validation: storage accepts optional, completion requires mandatory
202
46
 
203
47
  ### Test Plan
204
48
 
205
- #### For QA
206
- 1. Start a task — verify `fibonacci` helper is returned with `storeEstimate()`, `pointsToMinutes()`, `pointsToTimeRange()`
207
- 2. Call `storeEstimate(5)` — verify `estimatedPoints: 5` and `estimatedMinutes: 90` in state.json
208
- 3. Complete task with `p. done` — verify outcome recorded to `outcomes/outcomes.jsonl`
209
- 4. Verify variance display shows `est: 5pt (1h 30m) → +X%`
210
- 5. Run `bun test` — 552 tests pass
211
-
212
- #### For Users
213
- **What changed:** Tasks now support Fibonacci point estimation with automatic time conversion and variance tracking on completion.
214
- **How to use:** Estimation is stored via `storeEstimate(points)` during task start; variance is auto-displayed on `p. done`.
215
- **Breaking changes:** None — estimation fields are optional.
216
-
217
- ## [1.7.7] - 2026-02-07
218
-
219
- ### Bug Fixes
220
- - **Config-driven command context (PRJ-298)**: Replaced 4 hardcoded command lists in `prompt-builder.ts` with a single `command-context.config.json` config file. New commands no longer silently get zero context — the wildcard `*` entry provides sensible defaults, and a heuristic classifier handles unknown commands.
221
- - **Quality checklists for ship/done**: `ship` and `done` commands now receive quality checklists (previously excluded from the hardcoded list).
222
-
223
- ### Implementation Details
224
- - Created `core/config/command-context.config.json` mapping 25 commands + wildcard to context sections (agents, patterns, checklists, modules)
225
- - Zod schema in `core/schemas/command-context.ts` validates config at load time
226
- - `core/agentic/command-context.ts` provides `resolveCommandContextFull()` with fallback chain: config → cache → heuristic classify → wildcard
227
- - `core/agentic/command-classifier.ts` uses word-boundary keyword matching with score-based priority to classify unknown commands from template metadata
228
- - Auto-learn (Phase 3): after 3 identical heuristic classifications, persists to config file via fire-and-forget
229
-
230
- ### Learnings
231
- - Keyword substring matching causes false positives (e.g., "check" matching inside "checks") — word boundaries via `\b` regex are essential
232
- - When quality and info keywords overlap, score-based priority (higher count wins) is more robust than boolean exclusion
233
-
234
- ### Test Plan
49
+ #### For QA (PRJ-262)
50
+ 1. Run `p. done` after completing a subtask — verify handoff data is collected
51
+ 2. Check state.json — verify subtask has `output` and `summary` fields with handoff data
52
+ 3. Start next subtask — verify prompt includes "Previous Subtask Handoff" section
53
+ 4. Load old state.json without handoff fields — verify backward compatibility (no errors)
54
+ 5. Run tests: `bun test core/__tests__/storage/subtask-handoff.test.ts` — 19 tests pass
235
55
 
236
- #### For QA
237
- 1. Run `bun test ./core/__tests__/agentic/command-context.test.ts` — all 20 tests pass
238
- 2. Run `bun test ./core/__tests__/agentic/prompt-builder.test.ts` — all 16 existing tests pass
239
- 3. Run `bun run build` — compiles without errors
240
- 4. Verify `ship` and `done` commands have `checklist: true` in config
241
- 5. Verify unknown commands get wildcard defaults (agents: true, patterns: true)
56
+ #### For QA (PRJ-263)
57
+ 1. Run `prjct sync` — verify draft analysis is created in storage
58
+ 2. Run `prjct seal` — verify analysis is locked with SHA-256 signature
59
+ 3. Run `prjct verify` — verify signature matches
60
+ 4. Run `prjct sync` again verify sealed analysis is preserved, new draft created
61
+ 5. Make a commit, run `prjct status` verify staleness detection warns about diverged commits
242
62
 
243
63
  #### For Users
244
- **What changed:** Commands like `ship` and `done` now receive quality checklists. New commands automatically get sensible context instead of nothing.
245
- **How to use:** No user action needed works automatically.
246
- **Breaking changes:** None
64
+ - **PRJ-262:** Subtask completion now captures what was done, files changed, and context for the next subtask. `p. done` automatically collects handoff no extra steps needed.
65
+ - **PRJ-263:** Analysis results can now be locked (sealed) so re-syncing doesn't overwrite verified context. Run `prjct seal` after reviewing sync results.
66
+ - **Breaking changes:** `completeSubtask()` API changed from optional to required parameters.
247
67
 
248
- ## [1.7.6] - 2026-02-07
68
+ ## [1.10.0] - 2026-02-08
249
69
 
250
70
  ### Features
251
- - **PerformanceTracker service (PRJ-297)**: New `core/infrastructure/performance-tracker.ts` singleton that automatically measures startup time, memory usage, and command durations on every CLI invocation. Data stored in append-only JSONL with 5MB rotation.
252
- - **`prjct perf` dashboard command**: Shows performance metrics vs targets for the last N days (default 7). Displays startup time, heap/RSS memory, context correctness rate, subtask handoff rate, and per-command duration breakdown.
253
- - **Zod schemas for performance metrics**: `core/schemas/performance.ts` with typed schemas for all metric types (timing, memory, context correctness, subtask handoff, analysis state).
254
-
255
- ### Implementation Details
256
- - PerformanceTracker uses `process.hrtime.bigint()` for nanosecond-precision timing and `process.memoryUsage()` for memory snapshots
257
- - Startup time captured at top of `bin/prjct.ts` via `globalThis.__perfStartNs` and recorded in `core/index.ts` after command execution
258
- - All instrumentation wrapped in non-critical try/catch to prevent perf tracking from breaking CLI functionality
259
- - Uses existing `jsonl-helper.appendJsonLineWithRotation` for storage (5MB rotation limit)
260
- - 17 unit tests covering timing, memory, recording, context correctness, handoff, and report generation
261
-
262
- ### Learnings
263
- - JSONL append-only pattern with rotation is ideal for time-series metrics (vs JSON write-through for stateful data)
264
- - `globalThis` works well for passing data between `bin/` entry point and `core/` modules without import coupling
265
- - `process.memoryUsage().heapUsed` can momentarily exceed `heapTotal` during GC — don't assert `<=`
266
-
267
- ### Test Plan
268
-
269
- #### For QA
270
- 1. Run `prjct status` then `prjct perf` — verify metrics appear (startup time, memory, command duration)
271
- 2. Run multiple commands then `prjct perf 1` — verify all commands show in dashboard
272
- 3. Check `~/.prjct-cli/projects/{id}/storage/performance.jsonl` exists with valid JSONL entries
273
- 4. Verify `prjct perf` with no data shows "No performance data yet" message
274
- 5. Verify target indicators: startup `<500ms` green, `>500ms` yellow warning
275
-
276
- #### For Users
277
- **What changed:** New `prjct perf` command shows a performance dashboard with startup time, memory usage, and command duration metrics.
278
- **How to use:** Run `prjct perf` (default 7 days) or `prjct perf 30` for 30-day view. Metrics are collected automatically.
279
- **Breaking changes:** None
280
-
281
71
 
282
- ## [1.7.5] - 2026-02-07
283
-
284
- ### Refactoring
72
+ - redesign prompt assembly with correct section ordering + anti-hallucination (PRJ-301) (#152)
73
+ - add coordinated global token budget (PRJ-266) (#151)
285
74
 
286
- - remove unused deps and lazy-load @linear/sdk (PRJ-291) (#144)
287
75
 
288
- ## [1.7.5] - 2026-02-07
76
+ ## [1.12.0] - 2026-02-07
289
77
 
290
- ### Changed
291
- - **Remove unused dependencies and lazy-load heavy optional ones (PRJ-291)**: Removed `lightningcss` (completely unused), moved `esbuild` to devDependencies (build-time only), lazy-loaded `@linear/sdk` via dynamic `import()` so it only loads when Linear commands are invoked.
78
+ ### Features
79
+ - **Prompt Assembly Redesign**: Correct section ordering based on research of 25+ system prompts (PRJ-301)
80
+ - **Environment Block**: Structured `<env>` block with project, git, platform, runtime, and model metadata
81
+ - **Anti-Hallucination Block**: Explicit availability/unavailability grounding injected BEFORE task context
82
+ - **Token Efficiency Directive**: Conciseness rules appended to every prompt
292
83
 
293
84
  ### Implementation Details
294
- - Removed `lightningcss` from dependencies (zero imports in codebase)
295
- - Moved `esbuild` from dependencies to devDependencies (only used in `scripts/build.js`)
296
- - Changed `import { LinearClient } from '@linear/sdk'` to `import type` + dynamic `await import('@linear/sdk')` in `core/integrations/linear/client.ts`
297
- - Excluded test files from published package via `.npmignore`
298
- - Removed `scripts/build.js` from `files` field (dist/ ships pre-built)
299
-
300
- ### Learnings
301
- - `import type` + dynamic `await import()` pattern preserves full type safety while deferring module load to runtime. Type imports are erased at compile time with zero cost.
302
-
303
- ### Test Plan
304
-
305
- #### For QA
306
- 1. Run `bun test` — 538 tests pass, no regressions
307
- 2. Run `bun run build` — compiles without errors
308
- 3. Run `bun run typecheck` — zero type errors
309
- 4. Run `prjct status` and `prjct linear list` — CLI works normally
310
-
311
- #### For Users
312
- **What changed:** Faster install (~75MB fewer dependencies), faster CLI startup (Linear SDK only loaded on demand).
313
- **How to use:** No changes needed.
314
- **Breaking changes:** None
315
-
316
- ## [1.7.4] - 2026-02-07
317
-
318
- ### Bug Fixes
319
-
320
- - add eviction policies to all in-memory caches (PRJ-288) (#143)
321
-
322
-
323
- ## [1.7.4] - 2026-02-07
324
-
325
- ### Bug Fixes
326
- - **Add eviction policies to all in-memory caches (PRJ-288)**: Replaced unbounded Maps with TTLCache in SessionLogManager and ContextBuilder, capped PatternStore decision contexts at 20 with FIFO eviction, and added 90-day archival for stale decisions to prevent unbounded memory growth.
85
+ Redesigned `prompt-builder.ts` section ordering to follow research-backed pattern:
86
+ Identity Environment Ground Truth Capabilities Constraints → Task Context → Task → Output Schema → Efficiency
327
87
 
328
- ### Implementation Details
329
- - SessionLogManager: replaced 2 `Map` caches with `TTLCache` (maxSize: 50, TTL: 1hr)
330
- - ContextBuilder: replaced `Map` + `_mtimes` + manual TTL with single `TTLCache<CachedFile>` (maxSize: 200, TTL: 5s), added project-switch detection
331
- - PatternStore: added `afterLoad()` hook to truncate oversized contexts arrays, FIFO cap at 20 in `recordDecision()`, new `archiveStaleDecisions()` method for 90-day archival
332
- - Exposed `archiveStaleDecisions()` via MemorySystem facade
88
+ Key changes:
89
+ - New `environment-block.ts`: Generates `<env>` XML block with auto-detected runtime, platform, and normalized names
90
+ - New `anti-hallucination.ts`: Generates constraints block from sealed analysis (available tech, absent domains, grounding rules)
91
+ - Moved template content (task instructions) to section 7 LLM knows identity, env, and rules before reading task
92
+ - Anti-hallucination block placed at section 5 (before task context), replacing old `RULES (CRITICAL)` at the end
93
+ - Added `buildEfficiencyDirective()` with conciseness rules (max 4 lines, no preamble/postamble)
94
+ - Exported `PROMPT_SECTION_ORDER` constant and `SectionPriority` type for budget trimming
95
+ - Kept `buildCriticalRules()` as fallback when project context unavailable
333
96
 
334
97
  ### Test Plan
335
98
 
336
99
  #### For QA
337
- 1. Run `bun test core/__tests__/agentic/cache-eviction.test.ts` — 12 new tests pass
338
- 2. Run `bun test` full suite (538 tests) passes with no regressions
339
- 3. Run `bun run build` compiles without errors
340
- 4. Verify `prjct sync` and `prjct status` work normally
100
+ 1. Run `prjct sync` on any project verify CLAUDE.md has correct section ordering
101
+ 2. Check for `<env>` block near top of generated prompt
102
+ 3. Verify anti-hallucination block appears BEFORE task context
103
+ 4. Run `prjct sync --package=<name>` in monorepo verify per-package context
341
104
 
342
105
  #### For Users
343
- **What changed:** Internal optimization in-memory caches now bounded to prevent memory growth during long sessions.
344
- **How to use:** No user-facing changes.
106
+ **What changed:** AI agent prompts now follow research-backed section ordering for better accuracy
107
+ **How to use:** Run `prjct sync` — improvements are automatic
345
108
  **Breaking changes:** None
346
109
 
347
- ## [1.7.3] - 2026-02-07
348
-
349
- ### Bug Fixes
350
-
351
- - add Zod validation and token budgets for prompt injection (PRJ-282) (#142)
352
-
353
-
354
- ## [1.7.3] - 2026-02-07
355
-
356
- ### Bug Fixes
357
- - **Validate auto-injected state in prompt builder (PRJ-282)**: Added `safeInject()` validation utility, token-aware truncation via `InjectionBudgetTracker`, and domain-based skill filtering to prevent oversized or irrelevant content in LLM prompts. Replaced hardcoded character limits with configurable token budgets.
358
-
359
- ### Implementation Details
360
- - Created `core/agentic/injection-validator.ts` with `safeInject()`, `safeInjectString()`, `truncateToTokenBudget()`, `estimateTokens()`, `filterSkillsByDomains()`, and `InjectionBudgetTracker` class
361
- - Wired validation into `prompt-builder.ts`: auto-context truncation, agent/skill token budgets, cumulative state budget tracking
362
- - Skills filtered by detected task domains before injection to reduce token waste
363
- - 33 new unit tests covering all validation, filtering, and truncation paths
364
-
365
- ### Test Plan
366
-
367
- #### For QA
368
- 1. Run `bun test` — all 526 tests pass (33 new)
369
- 2. Verify `safeInject()` returns fallback on corrupt data
370
- 3. Verify `filterSkillsByDomains()` excludes irrelevant skills
371
- 4. Verify `InjectionBudgetTracker` enforces cumulative limits
372
-
373
- #### For Users
374
- - No user-facing changes — validation is automatic
375
- - Breaking changes: None
376
-
377
- ## [1.7.2] - 2026-02-07
378
-
379
- ### Bug Fixes
380
-
381
- - add missing state machine transitions and dead-end states (PRJ-280) (#141)
382
-
383
-
384
- ## [1.7.2] - 2026-02-07
385
-
386
- ### Bug Fix
387
- - **Fix state machine completeness: missing transitions and dead-end states (PRJ-280)**: Added missing transitions (`completed → pause`, `paused → ship`, `completed → reopen`), subtask states (`skipped`, `blocked` with reason tracking), migrated `previousTask` to `pausedTasks[]` array with max limit (5) and staleness detection (30 days), and enforced all transitions through the state machine at the storage level.
388
-
389
- ### Implementation Details
390
- Added `reopen` command to `WorkflowCommand` type. Updated `getCurrentState()` to detect paused state from `pausedTasks[]` array and legacy `previousTask`. `failSubtask()` now advances to the next subtask instead of halting. New `skipSubtask(reason)` and `blockSubtask(blocker)` methods mark subtasks and advance. `pauseTask()` pushes onto a `pausedTasks[]` array (max 5), `resumeTask()` pops from array or by ID. `getPausedTasksFromState()` handles backward compat by migrating legacy `previousTask` format. All storage mutation methods (`startTask`, `completeTask`, `pauseTask`, `resumeTask`) validate transitions through the state machine before executing.
391
-
392
- ### Test Plan
393
-
394
- #### For QA
395
- 1. Verify `completed → pause`, `paused → ship`, and `completed → reopen` transitions work
396
- 2. Start a task with subtasks, call `failSubtask()` — verify it records reason AND advances to next subtask
397
- 3. Call `skipSubtask(reason)` and `blockSubtask(blocker)` — verify they record reasons and advance
398
- 4. Pause 3+ tasks — verify `pausedTasks[]` array stores all, respects max limit of 5
399
- 5. State.json with old `previousTask` format — verify auto-migration into array
400
- 6. Attempt invalid transition (e.g., `done` from `idle`) — verify error thrown at storage level
401
-
402
- #### For Users
403
- **What changed:** Workflow supports reopening completed tasks, shipping paused tasks directly, and multiple paused tasks. Subtask failures auto-advance instead of halting.
404
- **Breaking changes:** `previousTask` deprecated in favor of `pausedTasks[]`. Backward compat maintained via auto-migration.
405
-
406
- ## [1.7.1] - 2026-02-07
407
-
408
- ### Bug Fixes
409
-
410
- - add Zod validation on all storage reads (PRJ-279) (#140)
411
-
412
-
413
- ## [1.7.1] - 2026-02-07
414
-
415
- ### Bug Fix
416
- - **Add Zod validation on all storage reads (PRJ-279)**: Created `safeRead<T>()` utility that wraps `JSON.parse` + `schema.safeParse()`. All 5 `StorageManager` subclasses (state, queue, ideas, shipped, metrics) now validate reads against their Zod schemas. Corrupted files produce a logged warning + `.backup` file instead of silently crashing downstream.
417
-
418
- ### Implementation Details
419
- Created `core/storage/safe-reader.ts` with a `ValidationSchema` interface decoupled from Zod generics to avoid strict type parameter matching. The `StorageManager` base class accepts an optional schema via constructor — subclasses pass their Zod schema with a single import + arg change. `safeRead` returns the raw parsed JSON (not Zod-transformed `result.data`) to preserve extra fields for forward compatibility. Also fixed `ShippedJsonSchema` which used `items` instead of `shipped` (pre-existing schema bug), and made `changes` optional to match actual data.
420
-
421
- ### Learnings
422
- - Zod's default `strip` mode silently drops unknown keys from `result.data` — must return raw JSON to preserve extra state.json fields (projectId, stack, domains, etc.)
423
- - `ShippedJsonSchema` had `items` instead of `shipped` as the array key — pre-existing schema/data mismatch
424
- - `ValidationSchema` interface avoids Zod generic constraints while still providing type-safe validation
425
-
426
- ### Test Plan
427
-
428
- #### For QA
429
- 1. Create a valid `state.json` — verify it reads correctly with no warnings
430
- 2. Corrupt a storage file with invalid JSON — verify `.backup` is created and defaults returned
431
- 3. Write valid JSON with wrong schema — verify `.backup` and defaults
432
- 4. Add extra fields not in schema — verify they are preserved after read
433
- 5. Run `bun test` — verify all 438 tests pass (16 new for `safeRead`)
434
-
435
- #### For Users
436
- **What changed:** Storage reads are now validated against Zod schemas. Corrupted files no longer cause silent crashes.
437
- **How to use:** No action needed — automatic.
438
- **Breaking changes:** None.
439
-
440
- ## [1.7.0] - 2026-02-07
110
+ ## [1.9.0] - 2026-02-06
441
111
 
442
112
  ### Features
443
-
444
- - use relative timestamps to reduce token waste (PRJ-274) (#139)
445
- - use relative timestamps to reduce token waste (PRJ-274)
446
-
447
- ## [1.6.16] - 2026-02-07
448
-
449
- ### Improvement
450
- - **Use relative timestamps to reduce token waste (PRJ-274)**: Added `toRelative()` function using `date-fns` `formatDistanceToNowStrict`. Replaced raw ISO-8601 timestamps in Markdown context files (`now.md`, `ideas.md`, `shipped.md`) with human-readable relative time ("5 minutes ago", "3 days ago"). JSON storage retains full ISO timestamps — no data loss.
451
-
452
- ### Implementation Details
453
- Added `date-fns` as a dependency and created a thin `toRelative(date)` wrapper around `formatDistanceToNowStrict` in `core/utils/date-helper.ts`. Updated `toMarkdown()` in `state-storage.ts` (Started/Paused fields), `ideas-storage.ts` (all 3 sections: pending, converted, archived), and `shipped-storage.ts` (ship date per entry). 6 new unit tests added covering minutes, hours, days, months, Date objects, and ISO string inputs.
454
-
455
- ### Learnings
456
- - `date-fns` `formatDistanceToNowStrict` gives exact units ("5 minutes ago" not "about 5 minutes ago") — better for token efficiency
457
- - Tests need `setSystemTime()` from `bun:test` since `formatDistanceToNowStrict` uses system clock internally
458
-
459
- ### Test Plan
460
-
461
- #### For QA
462
- 1. Run `bun test core/__tests__/utils/date-helper.test.ts` — verify all 55 tests pass (6 new for `toRelative`)
463
- 2. Run `bun run build` — verify build succeeds
464
- 3. Run `prjct sync` — verify `context/now.md` shows relative timestamps instead of raw ISO
465
- 4. Check `ideas.md` and `shipped.md` for relative date format
466
-
467
- #### For Users
468
- **What changed:** Timestamps in context files now show "5 minutes ago", "3 days ago" instead of raw ISO-8601 strings.
469
- **How to use:** No action needed — automatic.
470
- **Breaking changes:** None.
471
-
472
- ## [1.6.15] - 2026-02-07
473
-
474
- ### Refactor
475
- - **Remove unused templates and dead code (PRJ-293)**: Deleted 8 unused template files from `templates/analysis/` (5) and `templates/agentic/` (3) that were never referenced by any code or other templates. Also removed unused type imports flagged by biome's `noUnusedImports` rule from `diff-generator.ts`, `sync-service.ts`, and `citations.ts`. Total: -471 lines removed.
476
-
477
- ### Implementation Details
478
- Audited all 135 templates by cross-referencing with code that loads them. Carefully distinguished between templates loaded dynamically via `readdir` (checklists, skills — kept) and templates with zero references (analysis prompts, agentic scaffolding — deleted). Unused imports were types imported for re-export where the `export type` statement imports independently from the source module, making the `import type` line redundant.
479
-
480
- ### Learnings
481
- - Dynamic template loading via `readdir` (in `prompt-builder.ts` and `skill-service.ts`) means simple grep searches can't identify all references — must trace runtime loading patterns to distinguish truly unused templates from dynamically loaded ones
482
- - TypeScript `export type { X } from 'module'` is a standalone declaration that imports independently — a separate `import type { X }` is only needed if `X` is used in the file body
483
-
484
- ### Test Plan
485
-
486
- #### For QA
487
- 1. Run `bun run build` — verify build succeeds with no errors
488
- 2. Run `bun run lint` — verify zero biome warnings (especially `noUnusedImports`)
489
- 3. Run `prjct sync` — verify sync still works (deleted templates were unused by sync)
490
- 4. Verify `templates/checklists/*.md` and `templates/skills/*.md` are untouched (dynamically loaded)
491
-
492
- #### For Users
493
- **What changed:** Removed 8 unused internal template files and cleaned up dead imports. No user-facing behavior changes.
494
- **How to use:** No action needed — this is an internal cleanup.
495
- **Breaking changes:** None.
496
-
497
- ## [1.6.12] - 2026-02-07
498
-
499
- ### Bug Fixes
500
-
501
- - replace sync I/O in imports-tool hot path (PRJ-290) (#137)
502
-
503
- ## [1.6.14] - 2026-02-07
504
-
505
- ### Bug Fixes
506
- - **Replace sync I/O in imports-tool hot path (PRJ-290)**: Converted `tryResolve`/`resolveImport`/`extractImports` from sync `require('node:fs')` with `existsSync`+`statSync` to async `fs.stat()` from `node:fs/promises`. Also replaced repeated `getPackageRoot()` calls with the pre-resolved `PACKAGE_ROOT` constant in prompt-builder, command-installer, and setup modules.
507
-
508
- ### Implementation Details
509
- The `imports-tool.ts` file had an inline `require('node:fs')` call inside `tryResolve()` that used `existsSync` and `statSync` in a loop — a true hot path during import analysis. Converted the entire chain (`tryResolve` → `resolveImport` → `extractImports`) to async, using the already-imported `fs` from `node:fs/promises`. `version.ts` was kept sync intentionally: esbuild CJS output (used for postinstall) doesn't support top-level await, and its I/O runs once at cold start with results cached.
510
-
511
- ### Learnings
512
- - esbuild CJS format does not support top-level `await` — async module exports require ESM format
513
- - `version.ts` cold-start I/O is negligible (runs once, cached) vs `imports-tool.ts` which resolves extensions in a loop per import
514
- - Using pre-resolved `PACKAGE_ROOT` constant avoids repeated sync function calls across modules
515
-
516
- ### Test Plan
517
-
518
- #### For QA
519
- 1. Run `prjct context imports <file>` — verify import resolution works correctly (resolves `.ts`, `.tsx`, `.js` extensions and `/index.ts` barrel imports)
520
- 2. Run `prjct sync` — verify command-installer and setup find templates via `PACKAGE_ROOT`
521
- 3. Run `bun run build` — verify all 5 build targets compile without errors
522
- 4. Verify no `fs.*Sync()` calls remain in `imports-tool.ts`
523
-
524
- #### For Users
525
- **What changed:** Import analysis is now fully async, eliminating sync file system calls in the hot path.
526
- **How to use:** No changes needed — `prjct context imports` works the same way.
527
- **Breaking changes:** None.
528
-
529
- ## [1.6.11] - 2026-02-07
530
-
531
- ### Performance
532
-
533
- - cache provider detection to eliminate redundant shell spawns (PRJ-289) (#136)
534
-
535
- ## [1.6.13] - 2026-02-07
536
-
537
- ### Improvements
538
- - **Cache provider detection to eliminate redundant shell spawns (PRJ-289)**: Provider detection results (Claude, Gemini CLI availability) are now cached to `~/.prjct-cli/cache/providers.json` with a 10-minute TTL. Subsequent CLI commands skip shell spawns entirely. Added 2-second timeout on `which`/`--version` spawns to prevent hangs. Added `--refresh` flag to force re-detection.
539
-
540
- ### Implementation Details
541
- Created `core/utils/provider-cache.ts` with `readProviderCache()`, `writeProviderCache()`, and `invalidateProviderCache()`. Wired into `detectAllProviders()` — checks cache first, falls through to shell detection on miss or expiry, writes cache after detection. `bin/prjct.ts` parses `--refresh` early (like `--quiet`), invalidates cache, and passes refresh flag to detection.
542
-
543
- ### Learnings
544
- - `execAsync` accepts a `timeout` option (milliseconds) that kills the child process on expiry — ideal for preventing hangs on broken CLI installations.
545
- - Biome enforces `Array#indexOf()` over `Array#findIndex()` for simple equality checks (`useIndexOf` rule).
546
- - Separating cache logic into its own module keeps `ai-provider.ts` focused on detection logic.
547
-
548
- ### Test Plan
549
-
550
- #### For QA
551
- 1. Run `prjct --version` twice — second run should be near-instant (cache hit)
552
- 2. Delete `~/.prjct-cli/cache/providers.json`, run `prjct --version` — should re-detect and recreate cache
553
- 3. Run `prjct --version --refresh` — should take ~2s (forced re-detection)
554
- 4. Edit cache file to set timestamp 11 minutes ago — next command should re-detect (TTL expired)
555
- 5. Run `prjct sync` — should use cached providers, no shell spawns
556
-
557
- #### For Users
558
- **What changed:** Provider detection is now cached for 10 minutes. CLI startup is ~30x faster for cached commands (~66ms vs ~2100ms).
559
- **How to use:** Automatic. Use `--refresh` to force re-detection after installing a new CLI.
560
- **Breaking changes:** None.
561
-
562
- ## [1.6.10] - 2026-02-07
563
-
564
- ### Bug Fixes
565
-
566
- - resolve signal handler and EventBus listener accumulation leaks (PRJ-287) (#135)
567
-
568
- ## [1.6.12] - 2026-02-07
569
-
570
- ### Bug Fixes
571
- - **Fix signal handler and EventBus listener accumulation leaks (PRJ-287)**: WatchService signal handlers (`SIGINT`/`SIGTERM`) are now stored by reference and removed in `stop()`, preventing accumulation on restart cycles. `pendingChanges` Set is cleared on stop. EventBus gains `flush()` to clear history and stale once-listeners, and `removeAllListeners(event?)` for targeted cleanup.
113
+ - **Structured Output Schema**: All LLM prompts now include structured output schemas (PRJ-264)
114
+ - **Global Token Budget**: Coordinated token budget across all prompt sections (PRJ-266)
572
115
 
573
116
  ### Implementation Details
574
- Stored signal handler references as class properties (`sigintHandler`, `sigtermHandler`). In `start()`, old handlers are removed before new ones are added. In `stop()`, handlers are removed via `process.off()` and `pendingChanges` is cleared. EventBus `flush()` clears history array and all once-listeners. `removeAllListeners()` supports both targeted (single event) and global cleanup.
117
+ Added `core/schemas/llm-output.ts` with Zod schemas for each command's expected output format. Schemas are rendered as JSON examples in prompts so LLMs know the exact structure expected.
575
118
 
576
- ### Learnings
577
- - Arrow functions passed to `process.on()` cannot be removed — must store named handler references for `process.off()`.
578
- - Cleanup code after `process.exit(0)` is unreachable — perform all cleanup before the exit call.
119
+ Global token budget (`core/agentic/token-budget.ts`) allocates tokens across sections with priority-based trimming. Critical sections (identity, task) are protected; lower-priority sections (patterns, history) get trimmed first.
579
120
 
580
121
  ### Test Plan
581
-
582
- #### For QA
583
- 1. Start/stop watch mode 10 times verify only 2 signal handlers (not 20)
584
- 2. Trigger file changes, stop — verify `pendingChanges` cleared
585
- 3. Emit 50 events, call `flush()` — verify history empty
586
- 4. Register `once()` for unfired event, `flush()` — verify listener removed
587
- 5. `removeAllListeners('event')` — verify only that event cleared
588
- 6. `removeAllListeners()` — verify all cleared
589
-
590
- #### For Users
591
- **What changed:** WatchService no longer leaks signal handlers on restart. EventBus has `flush()` and `removeAllListeners()`.
592
- **Breaking changes:** None.
593
-
594
- ## [1.6.9] - 2026-02-07
595
-
596
- ### Bug Fixes
597
-
598
- - resolve SSE zombie connections and infinite promise leak (PRJ-286) (#134)
599
-
600
- ## [1.6.11] - 2026-02-07
601
-
602
- ### Bug Fixes
603
- - **Fix SSE zombie connections and infinite promise leak (PRJ-286)**: Replaced infinite `await new Promise(() => {})` with AbortController-based mechanism that resolves on client removal. Added max client lifetime (1 hour) with per-client TTL timeout. Added periodic reaper (every 5 min) that scans for and removes zombie entries from the clients Map. Consolidated duplicate cleanup paths into single idempotent `removeClient(id)` function. Added `shutdown()` to SSEManager for clean server stop. All timers use `unref()` to avoid blocking process exit.
604
-
605
- ### Implementation Details
606
- Replaced the infinite pending promise in `streamSSE` callback with an `AbortController` whose signal resolves the await when the client is removed. Internal client state (`heartbeatInterval`, `ttlTimeout`, `abortController`) is tracked in an `InternalClient` wrapper separate from the public `SSEClient` type. The public `SSEClient` interface gained only `connectedAt` for staleness detection.
607
-
608
- ### Learnings
609
- - AbortController integrates cleanly with Hono's `streamSSE` — the async callback needs to await *something*, and a signal-based promise is the right primitive.
610
- - Timer `unref()` has different shapes between Bun (number) and Node (Timeout object) — use `typeof` check before calling.
611
- - Idempotent cleanup functions eliminate race conditions between heartbeat failure and stream abort handlers.
612
-
613
- ### Test Plan
614
-
615
- #### For QA
616
- 1. Start prjct server, connect SSE client to `/api/events` — verify `connected` event
617
- 2. Disconnect client gracefully — verify `clients.size === 0`
618
- 3. Kill client process (ungraceful) — verify heartbeat cleanup within 30s
619
- 4. Connect client, wait >1 hour — verify TTL auto-disconnect
620
- 5. Connect 5+ clients, kill all — verify reaper cleans all within 5 min
621
- 6. Call `server.stop()` — verify all clients disconnected and reaper stopped
622
-
623
- #### For Users
624
- **What changed:** SSE connections now clean up reliably on disconnect, have a 1-hour max lifetime, and a background reaper removes zombie connections every 5 minutes.
625
- **Breaking changes:** `SSEManager` interface now includes `shutdown()`. `SSEClient` now includes `connectedAt`.
626
-
627
- ## [1.6.10] - 2026-02-07
628
-
629
- ### Documentation
630
- - **Document all environment variables (PRJ-90)**: Added comprehensive environment variable documentation to README.md covering all 13 env vars used by prjct-cli. Organized into Configuration, JIRA Integration, and Agent Detection categories with defaults, descriptions, and usage examples. Added inline comments at all `process.env` read sites in 6 source files.
631
-
632
- ### Test Plan
633
-
634
- #### For QA
635
- 1. `bun run build` — should succeed
636
- 2. `bun run lint` — no errors
637
- 3. Verify README.md renders correctly on GitHub (env vars tables)
638
-
639
- #### For Users
640
- **What changed:** New "Environment Variables" section in README.md with full documentation of all configurable env vars.
641
- **Breaking changes:** None.
642
-
643
- ## [1.6.8] - 2026-02-07
644
-
645
- ### Refactoring
646
-
647
- - standardize export patterns to ESM (PRJ-99) (#132)
648
-
649
-
650
- ## [1.6.9] - 2026-02-07
651
-
652
- ### Refactor
653
- - **Standardize export patterns to ESM (PRJ-99)**: Removed redundant `export default { ... }` CJS-compat patterns from 33 files across `core/`. Updated 19 import sites to use namespace imports (`import * as X`). Cleaned 3 barrel re-exports in `agentic/index.ts`, `bus/index.ts`, and `storage/index.ts`. 3 function-collection modules (chain-of-thought, ground-truth, template-loader) retain proper singleton defaults for test mocking compatibility. Net reduction of 274 lines.
654
-
655
- ### Implementation Details
656
- Removed the redundant pattern where files had both named exports (`export function X`) and a CJS-compat default export object (`export default { X, Y, Z }`). All 33 cleaned files already had proper named exports, making the default objects unnecessary. Import sites referencing removed defaults were converted to `import * as X from` namespace imports, which preserves the `X.method()` usage pattern.
657
-
658
- ### Learnings
659
- - Bun enforces read-only properties on ESM namespace objects (`import * as X`) — direct property assignment for test mocking fails at runtime
660
- - Function-collection modules that need test mocking should export a named singleton object as default, consistent with class-instance modules like `pathManager`, `loopDetector`
661
- - Barrel file (`index.ts`) re-exports of `default` must be updated when removing default exports from source modules
662
-
663
- ### Test Plan
664
-
665
- #### For QA
666
- 1. Run `bun run build` — should complete with no errors
667
- 2. Run `bun run test` — all 416 tests should pass (1 pre-existing timeout flake in DependencyValidator)
668
- 3. Run `bun run lint` — no lint errors
669
- 4. Run `npx tsc -p core/tsconfig.json --noEmit` — no type errors
670
- 5. Verify `prjct sync --yes` still works end-to-end
671
-
672
- #### For Users
673
- **What changed:** Internal refactor only — no API or CLI behavior changes.
674
- **How to use:** No user action needed.
675
- **Breaking changes:** None.
676
-
677
- ## [1.6.8] - 2026-02-07
678
-
679
- ### Documentation
680
- - **Add JSDoc to CachedStore class methods (PRJ-91)**: Enhanced all 12 public/protected methods on the `CachedStore<T>` base class with comprehensive JSDoc including `@param`, `@returns`, `@throws`, `@example`, and `@typeParam` annotations. Improved class-level documentation with usage example and cross-references to subclasses.
681
-
682
- ### Test Plan
683
-
684
- #### For QA
685
- 1. Build (`bun run build`) — should succeed
686
- 2. Typecheck (`npx tsc -p core/tsconfig.json --noEmit`) — should pass
687
- 3. Verify JSDoc renders in IDE hover tooltips for CachedStore methods
688
-
689
- #### For Users
690
- **What changed:** Better IDE documentation for CachedStore internals.
691
- **Breaking changes:** None
692
-
693
-
694
- ## [1.6.7] - 2026-02-07
695
-
696
- ### Bug Fixes
697
-
698
- - add context to silent catch blocks in sync-service.ts (PRJ-80) (#120)
699
-
700
- ### Refactoring
701
-
702
- - replace `any` types in routes-extended.ts and server.ts (PRJ-77) (#130)
703
-
704
-
705
- ## [1.6.7] - 2026-02-07
706
-
707
- ### Refactoring
708
- - **Replace `any` types in routes-extended.ts and server.ts (PRJ-77)**: Added `ProjectJson`, `StateJson`, `StateTask`, `QueueJson`, `QueueTask`, `RoadmapJson` interfaces to `core/types/storage.ts`. Replaced all 33 `any` types in `core/server/routes-extended.ts` with proper typed generics. Fixed `handleConnection: (c: any)` in `core/types/server.ts` with Hono `Context` type. Disabled redundant task component in statusline default config.
709
-
710
- ### Test Plan
711
-
712
- #### For QA
713
- 1. Build the project (`bun run build`) — should succeed
714
- 2. Typecheck (`npx tsc -p core/tsconfig.json --noEmit`) — should pass clean
715
- 3. Verify zero `any` types in `routes-extended.ts` and `server.ts`
716
- 4. Status bar should no longer show task description segment
717
-
718
- #### For Users
719
- **What changed:** Internal type safety improvement. Cleaner status bar.
720
- **Breaking changes:** None
721
-
722
-
723
- ## [1.6.6] - 2026-02-07
724
-
725
- ### Refactoring
726
-
727
- - extract hardcoded values to constants (PRJ-71) (#129)
728
-
729
-
730
- ## [1.6.8] - 2026-02-07
731
-
732
- ### Refactor
733
-
734
- - **Extract hardcoded values to constants (PRJ-71)**: Added `OUTPUT_LIMITS`, `STORAGE_LIMITS`, `EVENT_LIMITS` to `core/constants/index.ts`. Replaced 16 magic numbers across `output.ts` (11 truncation lengths), `bus.ts` (history limit), and `jsonl-helper.ts` (max lines, rotation size, warning threshold). All limits now configurable from one place with `as const` typing.
735
-
736
-
737
- ## [1.6.7] - 2026-02-07
738
-
739
- ### Refactor
740
-
741
- - **Extract common agent-base.md template (PRJ-95)**: Created `templates/subagents/agent-base.md` with shared project context (path resolution, storage locations, rules). Added `{{> partial }}` include resolution in `sync-service.ts` that resolves partials during agent generation. Updated all 9 agent templates (5 domain + 4 workflow) to use `{{> agent-base }}` instead of duplicated content. Saves ~200 tokens per additional agent template.
742
-
743
- ## [1.6.6] - 2026-02-07
744
-
745
- ### Improvements
746
-
747
- - **Type-safe error handling**: Added `getErrorMessage()` and `getErrorStack()` type guards to `core/types/fs.ts`. Replaced ~130 unsafe `(error as Error).message` casts across 59 files with safe `getErrorMessage(error)` calls. Fixed internal `as` casts in existing type guards (`isNotFoundError`, `isPermissionError`, etc.) to use `isNodeError()` guard instead. Zero remaining `(error as Error)` patterns in the codebase.
748
-
749
- ## [1.6.5] - 2026-02-07
750
-
751
- ### Bug Fixes
752
-
753
- - **Replace console.error with logger in setup.ts**: 12 `console.error` warning calls replaced with `log.warn` for Gemini, Cursor, Windsurf, Antigravity, migration, status line, Context7, symlink, and gitignore warnings. User-facing chalk output preserved. Fatal direct-run error kept as `console.error`.
754
-
755
- ## [1.6.4] - 2026-02-06
756
-
757
- ### Bug Fixes
758
-
759
- - **Replace console.error with logger in routes.ts**: Server routes now use the centralized `log` module instead of raw `console.error` for JSON read/write and context read errors. Production remains quiet by default; enable with `PRJCT_DEBUG=1`.
760
-
761
- ## [1.6.3] - 2026-02-06
762
-
763
- ### Improvements
764
-
765
- - **Typed event bus payloads**: Added 15 typed payload interfaces (`SessionStartedPayload`, `SnapshotCreatedPayload`, etc.) and an `EventMap` type mapping event strings to their payloads. Convenience `emit` methods now enforce required fields at compile time. Backward compatible — callers with `Record<string, unknown>` still work.
766
-
767
- ### Implementation Details
768
- - `core/types/bus.ts`: Added `EventMap` interface and all payload types
769
- - `core/bus/bus.ts`: Generic overload `emit<K extends keyof EventMap>()`, typed convenience methods
770
- - `core/types/index.ts`: Exported all new payload types
771
-
772
- ### Test Plan
773
-
774
- #### For QA
775
- 1. `bun run typecheck` — zero errors
776
- 2. `emit.sessionStarted({})` → TS error for missing fields (IntelliSense works)
777
- 3. `bun test` — all 416 tests pass
778
-
779
- #### For Users
780
- - **What changed:** Event emit methods have typed payloads with autocomplete
781
- - **Breaking changes:** None
782
-
783
- ## [1.6.2] - 2026-02-06
784
-
785
- ### Improvements
786
-
787
- - **Diff preview before sync overwrites**: `prjct sync --dry-run` (or `--preview`) now shows what would change in CLAUDE.md without applying changes. Cancelling interactive sync restores the original file. Previously, files were written before the diff was shown, so cancel/preview still applied changes.
788
-
789
- ### Implementation Details
790
- - Added `--dry-run` CLI flag as alias for `--preview`
791
- - Added `restoreOriginal()` helper that writes back saved CLAUDE.md content on cancel/preview
792
- - Non-interactive mode (LLM) restores original and returns JSON — apply with `prjct sync --yes`
793
-
794
- ### Test Plan
795
-
796
- #### For QA
797
- 1. `prjct sync --dry-run` — diff shown, CLAUDE.md NOT modified
798
- 2. `prjct sync` → cancel — CLAUDE.md restored
799
- 3. `prjct sync` → approve — changes kept
800
- 4. `prjct sync --yes` — applied directly
801
- 5. `prjct sync --json` — JSON returned, CLAUDE.md restored
802
-
803
- #### For Users
804
- - **What changed:** `--dry-run` flag works correctly; cancel restores original
805
- - **How to use:** `prjct sync --dry-run` to preview, `prjct sync --yes` to apply
806
- - **Breaking changes:** None
807
-
808
- ## [1.6.1] - 2026-02-06
809
-
810
- ### Bug Fixes
811
-
812
- - replace console.error with logger in bus.ts (PRJ-72) (#122)
813
-
814
-
815
- ## [1.6.1] - 2026-02-06
816
-
817
- ### Bug Fixes
818
-
819
- - **Replace console.error with logger in bus.ts**: Event bus now uses the centralized `log` module instead of raw `console.error` for error logging. Silent catch block in `logEvent()` now logs at debug level with `getErrorMessage()` context. Production remains quiet by default; enable with `PRJCT_DEBUG=1`.
820
-
821
- ### Test Plan
822
-
823
- #### For QA
824
- 1. Run `PRJCT_DEBUG=1 bun test` — verify bus errors appear with `[prjct:error]` prefix
825
- 2. Run `bun test` (no debug) — verify bus errors are silent by default
826
- 3. Trigger a listener error — verify it logs via logger, not console.error
827
-
828
- #### For Users
829
- - **What changed:** Error logging in event bus uses centralized logger
830
- - **How to use:** `PRJCT_DEBUG=1` to see bus errors; quiet by default
831
- - **Breaking changes:** None
832
-
833
- ## [1.6.0] - 2026-02-06
834
-
835
- ### Features
836
-
837
- - super context for agents — skills.sh, proactive codebase context, effort/model (#121)
838
-
839
-
840
- ## [1.6.0] - 2026-02-06
841
-
842
- ### Features
843
-
844
- - **Skills.sh auto-install**: During `prjct sync`, skills from skills.sh are automatically installed for generated agents. Real packages like `anthropics/skills/frontend-design`, `obra/superpowers/systematic-debugging`, and `obra/superpowers/test-driven-development` are mapped per agent domain.
845
- - **Proactive codebase context**: The orchestrator now gathers real context before agent execution — git state, relevant files (scored by task relevance), code signatures from top files, and recently changed files. Agents start with a complete briefing instead of exploring first.
846
- - **Effort/model metadata wiring**: Agent frontmatter `effort` and `model` fields are now extracted and injected into prompts, enabling per-agent reasoning depth control.
847
-
848
- ### Improved
849
-
850
- - **Skill loading warnings**: Missing skills now log visible warnings with the agent that needs them and a hint to run `prjct sync`
851
- - **Skill content in prompts**: Increased skill content truncation from 1000 to 2000 characters for richer context
852
- - **Skill mappings v3**: Updated `skill-mappings.json` from generic names to real installable skills.sh packages
853
-
854
- ### Implementation Details
855
-
856
- - `sync-service.ts`: New `autoInstallSkills()` method reads `skill-mappings.json`, checks if each skill is installed, and calls `skillInstaller.install()` for missing ones
857
- - `orchestrator-executor.ts`: New `gatherRealContext()` calls `findRelevantFiles()`, `getRecentFiles()`, and `extractSignatures()` in parallel to build a proactive briefing
858
- - `prompt-builder.ts`: New "CODEBASE CONTEXT" section with git state, relevant files table, code signatures, and recently changed files; plus effort/model per agent
859
- - `agent-loader.ts`: New `extractFrontmatterMeta()` parses YAML frontmatter for effort/model fields
860
- - `agentic.ts`: New `RealCodebaseContext` interface; `LoadedAgent` extended with `effort?` and `model?`
861
-
862
- ### Test Plan
863
-
864
- #### For QA
865
- 1. Run `prjct sync` — verify skills auto-install (check `~/.claude/skills/`)
866
- 2. Run `p. task "test"` — verify prompt includes git state, relevant files, signatures, effort/model
867
- 3. Verify warnings for missing skills
868
- 4. Build and all 416 tests pass
869
-
870
- #### For Users
871
- **What changed:** Agents receive proactive codebase context before starting work. Skills auto-install during sync.
872
- **How to use:** No action needed — automatic during `prjct sync` and `p. task`.
873
- **Breaking changes:** None
874
-
875
- ## [1.5.2] - 2026-02-06
876
-
877
- ### Improved
878
-
879
- - **TTY detection for CLI spinners**: Spinner, step, and progress animations now detect non-TTY environments (CI/CD, Claude Code, piped output) and print a single static line instead of animating
880
-
881
- ### Implementation Details
882
-
883
- - Added `process.stdout.isTTY` guard to `spin()`, `step()`, and `progress()` in `core/utils/output.ts`
884
- - Non-TTY environments get a single line with `\n` instead of `setInterval` with `\r` carriage returns
885
- - Made `clear()` a no-op in non-TTY (the `\r` + spaces trick doesn't work outside terminals)
886
- - Updated test for `stop()` to handle non-TTY behavior in test runner
887
-
888
- ### Learnings
889
-
890
- - `process.stdout.isTTY` is the reliable built-in way to detect interactive terminals in Node.js
891
- - Test suites (bun test) also run as non-TTY, so test assertions need to account for both paths
892
-
893
- ### Test Plan
894
-
895
- #### For QA
896
- 1. Run `prjct sync --yes` in an interactive terminal — spinner should animate normally
897
- 2. Run `prjct sync --yes > out.txt` — output should show a single static line, no repeated frames
898
- 3. Run inside Claude Code Bash tool — output should be clean, no spinner noise
899
- 4. Verify `step()` and `progress()` behave the same way in both environments
900
-
901
- #### For Users
902
- **What changed:** CLI spinners no longer produce garbage output in non-interactive terminals
903
- **How to use:** No action needed — automatic TTY detection
904
- **Breaking changes:** None
905
-
906
- ## [1.5.1] - 2026-02-06
907
-
908
- ### Refactoring
909
-
910
- - standardize on fs/promises across codebase (PRJ-93) (#118)
911
-
912
-
913
- ## [1.5.1] - 2026-02-06
914
-
915
- ### Changed
916
-
917
- - **Standardize on fs/promises across codebase (PRJ-93)**: Replaced all synchronous `fs` operations (`existsSync`, `readFileSync`, `writeFileSync`, `mkdirSync`, etc.) with async `fs/promises` equivalents across 22 files
918
-
919
- ### Implementation Details
920
-
921
- - Created shared `fileExists()` utility in `core/utils/fs-helpers.ts` replacing `existsSync` with `fs.access`
922
- - Converted all detection functions in `ai-provider.ts` to async with `Promise.all` for parallel checks
923
- - Applied lazy initialization pattern in `CommandInstaller` to handle async `getActiveProvider()` in constructor
924
- - Replaced `execSync` with `promisify(exec)` in `registry.ts` and `ai-provider.ts`
925
- - Converted `setup.ts` (~60 sync ops), `hooks-service.ts` (~30 sync ops), and all command/CLI files
926
- - Updated prompt-builder and command-executor tests to handle async `build()` and `signalStart/End()`
927
- - Intentional exceptions: `version.ts` (module-level constants), `jsonl-helper.ts` (`createReadStream`), test files
928
-
929
- ### Learnings
930
-
931
- - Module-level constants (`VERSION`, `PACKAGE_ROOT`) cannot use async — sync reads at import time are a valid exception
932
- - `createReadStream` is inherently sync (returns a stream) — the correct pattern for streaming reads
933
- - Making a function async cascades to all callers — `ai-provider.ts` changes rippled to 10+ files
934
- - Constructor methods can't be async — solved with lazy `ensureInit()` pattern in `CommandInstaller`
935
-
936
- ### Test Plan
937
-
938
- #### For QA
939
- 1. Run `bun run build` — verify clean build with no errors
940
- 2. Run `bun test` — verify all 416 tests pass
941
- 3. Run `prjct sync` on a project — verify async fs operations work correctly
942
- 4. Run `prjct start` — verify setup flow works with async file operations
943
- 5. Verify `prjct linear list` works (uses converted linear/sync.ts)
944
-
945
- #### For Users
946
- **What changed:** Internal refactor — no user-facing API changes. All sync filesystem operations replaced with async equivalents for better performance.
947
- **How to use:** No changes needed. All commands work identically.
948
- **Breaking changes:** None
949
-
950
- ## [1.5.0] - 2026-02-06
951
-
952
- ### Features
953
-
954
- - add citation format for context sources in templates (PRJ-113) (#117)
955
-
956
- ## [1.4.2] - 2026-02-06
957
-
958
- ### Features
959
-
960
- - **Source citations in context files (PRJ-113)**: All generated context files now include `<!-- source: file, type -->` HTML comments showing where each section's data was detected from
961
-
962
- ### Implementation Details
963
-
964
- - Added `SourceInfo` type and `ContextSources` interface with `cite()` helper (`core/utils/citations.ts`)
965
- - Extended `ProjectContext` with optional `sources` field — backward compatible, falls back to `defaultSources()`
966
- - Added `buildSources()` to `sync-service.ts` — maps detected ecosystem/commands data to their source files (package.json, lock files, Cargo.toml, etc.)
967
- - Citations added to 4 markdown formatters: Claude, Cursor, Windsurf, Copilot. Continue.dev skipped (JSON has no comment syntax)
968
- - Context generator CLAUDE.md also updated with citation support
969
- - Source types: `detected` (from files), `user-defined` (from config), `inferred` (from heuristics)
970
-
971
- ### Learnings
972
-
973
- - `context-generator.ts` and `formatters.ts` both independently generate CLAUDE.md content — both must be updated for consistent citations
974
- - Sources can be determined post-detection from data values rather than threading metadata through every detection method
975
- - Optional fields with fallback defaults (`sources?`) maintain backward compatibility without breaking existing callers
976
-
977
- ### Test Plan
978
-
979
- #### For QA
980
- 1. Run `prjct sync --yes` — verify generated context files contain `<!-- source: ... -->` comments
981
- 2. Check CLAUDE.md citations before: THIS PROJECT, Commands, Code Conventions, PROJECT STATE
982
- 3. Check `.cursor/rules/prjct.mdc` citations before Tech Stack and Commands
983
- 4. Check `.windsurf/rules/prjct.md` citations before Stack and Commands
984
- 5. Check `.github/copilot-instructions.md` citations before Project Info and Commands
985
- 6. Verify `.continue/config.json` unchanged (JSON has no comments)
986
- 7. Run `bun test` — all 416 tests pass
987
-
988
- #### For Users
989
- **What changed:** Context files now show where data came from via HTML comments
990
- **How to use:** Run `p. sync` — citations appear automatically
991
- **Breaking changes:** None
992
-
993
- ## [1.4.1] - 2026-02-06
994
-
995
- ### Improvements
996
-
997
- - **Better error messages for invalid commands (PRJ-98)**: Consistent, helpful CLI errors with did-you-mean suggestions and required parameter validation
998
-
999
- ### Implementation Details
1000
-
1001
- - Added `UNKNOWN_COMMAND` and `MISSING_PARAM` error codes to centralized error catalog (`core/utils/error-messages.ts`)
1002
- - Added `validateCommandParams()` — parses `CommandMeta.params` convention (`<required>` vs `[optional]`) and validates against actual CLI args before command execution
1003
- - Added `findClosestCommand()` with Levenshtein edit distance (threshold ≤ 2) for did-you-mean suggestions on typos
1004
- - All error paths now use `out.failWithHint()` for consistent formatting with hints, docs links, and file references
1005
- - Deprecated and unimplemented command errors also upgraded to use `failWithHint()`
1006
-
1007
- ### Learnings
1008
-
1009
- - `bin/prjct.ts` intercepts many commands (start, context, hooks, doctor, etc.) before `core/index.ts` — changes to dispatch only affect commands that reach core
1010
- - Template-only commands (e.g. `task`) are defined in `command-data.ts` but not registered in the command registry — they don't get param validation via CLI
1011
- - Levenshtein edit distance is simple to implement (~15 lines) and effective for CLI typo suggestions
1012
-
1013
- ### Test Plan
1014
-
1015
- #### For QA
1016
- 1. `prjct xyzzy` → "Unknown command: xyzzy" with help hint
1017
- 2. `prjct snyc` → "Did you mean 'prjct sync'?"
1018
- 3. `prjct shp` → "Did you mean 'prjct ship'?"
1019
- 4. `prjct bug` (no args) → "Missing required parameter: description" with usage
1020
- 5. `prjct idea` (no args) → "Missing required parameter: description" with usage
1021
- 6. `prjct sync --yes` → works normally (no regression)
1022
- 7. `prjct dash compact` → works normally (no regression)
1023
-
1024
- #### For Users
1025
- **What changed:** CLI now shows helpful error messages with suggestions when you mistype a command or forget a required argument.
1026
- **How to use:** Just use prjct normally — errors are now more helpful automatically.
1027
- **Breaking changes:** None
1028
-
1029
- ## [1.4.0] - 2026-02-06
1030
-
1031
- ### Features
1032
-
1033
- - programmatic verification checks for sync workflow (PRJ-106) (#115)
1034
-
1035
- ## [1.3.1] - 2026-02-06
1036
-
1037
- ### Features
1038
-
1039
- - **Programmatic verification checks for sync workflow (PRJ-106)**: Post-sync validation with built-in and custom checks
1040
-
1041
- ### Implementation Details
1042
-
1043
- New `SyncVerifier` service (`core/services/sync-verifier.ts`) that runs verification checks after every sync. Three built-in checks run automatically:
1044
- - **Context files exist** — verifies `context/CLAUDE.md` was generated
1045
- - **JSON files valid** — validates `storage/state.json` syntax
1046
- - **No sensitive data** — scans context files for leaked API keys, passwords, secrets
1047
-
1048
- Custom checks configurable in `.prjct/prjct.config.json`:
1049
- ```json
1050
- {
1051
- "verification": {
1052
- "checks": [
1053
- { "name": "Lint CLAUDE.md", "command": "npx markdownlint CLAUDE.md" },
1054
- { "name": "Custom validator", "script": ".prjct/verify.sh" }
1055
- ],
1056
- "failFast": false
1057
- }
1058
- }
1059
- ```
1060
-
1061
- Integration: wired into `sync-service.ts` after file generation (step 11), results returned in `SyncResult.verification`. Display in `showSyncResult()` shows pass/fail per check with timing.
1062
-
1063
- ### Learnings
1064
-
1065
- - Non-critical verification must be wrapped in try/catch so it never breaks the sync workflow
1066
- - Config types must match optional fields between `LocalConfig` and `VerificationConfig` (both `checks` must be optional)
1067
- - Built-in + custom extensibility pattern (always run built-ins, then user commands) provides good defaults with flexibility
1068
-
1069
- ### Test Plan
1070
-
1071
- #### For QA
1072
- 1. Run `prjct sync --yes` — verify "Verified" section with 3 checks passing
1073
- 2. Add custom check to `.prjct/prjct.config.json` — verify it runs after sync
1074
- 3. Add failing custom check (`command: "exit 1"`) — verify `✗` with error
1075
- 4. Set `failFast: true` with failing check — verify remaining checks skipped
1076
- 5. Run `bun run build && bun run typecheck` — zero errors
1077
-
1078
- #### For Users
1079
- **What changed:** `prjct sync` now validates generated output with pass/fail checks
1080
- **How to use:** Built-in checks run automatically. Add custom checks in `.prjct/prjct.config.json`
1081
- **Breaking changes:** None
1082
-
1083
- ## [1.3.0] - 2026-02-06
1084
-
1085
- ### Features
1086
-
1087
- - session state tracking for multi-command workflows (PRJ-109) (#114)
1088
-
1089
-
1090
- ## [1.3.0] - 2026-02-06
1091
-
1092
- ### Features
1093
-
1094
- - session state tracking for multi-command workflows (PRJ-109)
1095
-
1096
- ### Implementation Details
1097
-
1098
- New `SessionTracker` service (`core/services/session-tracker.ts`) that manages lightweight session lifecycle for tracking command sequences and file access across CLI invocations.
1099
-
1100
- Key behaviors:
1101
- - **Auto-create**: Sessions start automatically on first CLI command
1102
- - **Auto-resume**: Subsequent commands within 30 min extend the existing session
1103
- - **Auto-expire**: Sessions expire after 30 minutes of idle time, cleaned up on next startup
1104
- - **Command tracking**: Records command name, timestamp, and duration (up to 50 commands)
1105
- - **File tracking**: Records file reads/writes with timestamps (up to 200 records)
1106
-
1107
- Integration points:
1108
- - `core/index.ts` — touch/track in main CLI dispatch (all standard commands)
1109
- - `bin/prjct.ts` — `trackSession()` helper for context/hooks/doctor commands
1110
- - `core/commands/analysis.ts` — session info in `prjct status` output (JSON + human-readable)
1111
- - `core/services/staleness-checker.ts` — `getSessionInfo()` and `formatSessionInfo()` with box-drawing display
1112
-
1113
- Storage: `~/.prjct-cli/projects/{projectId}/storage/session.json`
1114
-
1115
- ### Learnings
1116
-
1117
- - Non-critical tracking should always be wrapped in try/catch with silent fail — session tracking must never break CLI commands
1118
- - Touch-on-every-command pattern is simple but effective for session detection — no explicit start/stop needed
1119
- - Box-drawing characters (`┌─┐│└─┘`) provide clean structured output without external dependencies
1120
-
1121
- ### Test Plan
1122
-
1123
- #### For QA
1124
- 1. Run `prjct status` — verify "Session: ▶ Active" with duration, commands, idle timer
1125
- 2. Wait 30+ minutes, run `prjct status` — verify "Session: ○ No active session"
1126
- 3. Run multiple commands in sequence — verify command count increments
1127
- 4. Run `prjct status --json` — verify session object in JSON output
1128
- 5. Run `bun run build && bun run typecheck` — zero errors
1129
-
1130
- #### For Users
1131
- **What changed:** CLI now tracks session state across commands for workflow visibility
1132
- **How to use:** Run `prjct status` to see active session info
1133
- **Breaking changes:** None
1134
-
1135
- ## [1.2.2] - 2026-02-06
1136
-
1137
- ### Performance
1138
-
1139
- - convert execSync to async in ground-truth.ts (PRJ-92) (#113)
1140
- - convert execSync to async in ground-truth.ts (PRJ-92)
1141
-
1142
-
1143
- ## [1.2.1] - 2026-02-06
1144
-
1145
- ### Performance
1146
-
1147
- - **Convert execSync to async in ground-truth.ts (PRJ-92)**: Replaced blocking execSync with promisify(exec) in verifyShip
1148
-
1149
- ### Bug Fixes
1150
-
1151
- - replace raw ANSI codes with chalk library (PRJ-132) (#111)
1152
-
1153
- ### Implementation Details
1154
-
1155
- Replaced the single `execSync('git status --porcelain')` call in `verifyShip()` with `await execAsync()` using `promisify(exec)` from `node:util`. The rest of `ground-truth.ts` already used async `fs.promises` — this was the last synchronous call blocking the event loop.
1156
-
1157
- ### Learnings
1158
-
1159
- - `exec` returns `{stdout, stderr}` object vs `execSync` returning a string directly — must destructure
1160
- - `promisify(exec)` is simpler than `spawn` for short-lived commands that return stdout
1161
- - Terminal control sequences (cursor movement) are separate from color/formatting — chalk doesn't handle them
1162
-
1163
- ### Test Plan
1164
-
1165
- #### For QA
1166
- 1. Run `bun run build && bun run typecheck` — zero errors
1167
- 2. Trigger `verifyShip` path — verify async git status check works
1168
- 3. Test with uncommitted changes — verify warning still appears
1169
- 4. Test in non-git directory — verify graceful fallback (`gitAvailable = false`)
1170
-
1171
- #### For Users
1172
- **What changed:** Internal performance improvement — git status check in ground-truth verifier is now async
1173
- **How to use:** No change needed — improvement is internal
1174
- **Breaking changes:** None
1175
-
1176
- ## [1.2.0] - 2026-02-06
1177
-
1178
- ### Features
1179
-
1180
- - git hooks integration for auto-sync (PRJ-128) (#112)
1181
-
1182
-
1183
- ## [1.2.0] - 2026-02-05
1184
-
1185
- ### Added
1186
-
1187
- - **Git hooks integration (PRJ-128)**: New `prjct hooks` command for auto-syncing context on commit and branch checkout
1188
-
1189
- ### Implementation Details
1190
-
1191
- New `prjct hooks` CLI subcommand with three operations:
1192
- - `prjct hooks install` — auto-detects hook manager (lefthook > husky > direct `.git/hooks/`) and installs post-commit + post-checkout hooks
1193
- - `prjct hooks uninstall` — cleanly removes only prjct hooks, preserving existing hooks
1194
- - `prjct hooks status` — shows active hooks, strategy, and available managers
1195
-
1196
- Hook scripts feature:
1197
- - **Rate limiting** — 30-second lockfile prevents over-syncing on rapid commits
1198
- - **Background execution** — hooks run `prjct sync` in background, never blocking git
1199
- - **Branch-only checkout** — post-checkout only fires on branch switch, not file checkout
1200
- - **Cross-platform** — handles macOS/Linux differences in `stat` and `md5` commands
1201
-
1202
- Supports three installation strategies:
1203
- - **Lefthook** — adds `prjct-sync-*` commands to existing `lefthook.yml`
1204
- - **Husky** — appends to existing `.husky/` hook scripts
1205
- - **Direct** — writes to `.git/hooks/` as fallback
1206
-
1207
- Hook configuration saved to `project.json` for persistence across sessions.
1208
-
1209
- ### Learnings
1210
-
1211
- - Strategy pattern works well for hook manager abstraction (detect → select → install)
1212
- - `stat -f%m` (macOS) vs `stat -c%Y` (Linux) for file modification time
1213
- - Lefthook section merging needs careful regex to avoid duplicates
1214
- - `$3` parameter in post-checkout distinguishes branch checkout (1) from file checkout (0)
1215
-
1216
- ### Test Plan
1217
-
1218
- #### For QA
1219
- 1. Run `prjct hooks status` — verify shows "Not installed" with available managers
1220
- 2. Run `prjct hooks install` — verify detects manager and installs hooks
1221
- 3. Run `prjct hooks status` — verify shows "Active"
1222
- 4. Make a git commit — verify sync runs in background
1223
- 5. Switch branches — verify post-checkout triggers sync
1224
- 6. Run `prjct hooks uninstall` — verify clean removal
1225
- 7. Run `bun run build && bun run typecheck` — zero errors
1226
-
1227
- #### For Users
1228
- **What changed:** New `prjct hooks` command for automatic context syncing
1229
- **How to use:** Run `prjct hooks install` in any prjct project
1230
- **Breaking changes:** None
1231
-
1232
- ## [1.1.2] - 2026-02-05
1233
-
1234
- ### Fixed
1235
-
1236
- - **Replace raw ANSI codes with chalk library (PRJ-132)**: Replaced ~60 raw ANSI escape codes across 7 files with chalk library calls
1237
-
1238
- ### Implementation Details
1239
-
1240
- Replaced all raw ANSI color/formatting constants (`\x1b[32m`, `\x1b[1m`, etc.) with chalk equivalents (`chalk.green()`, `chalk.bold()`, etc.) in:
1241
- - `bin/prjct.ts` — version display, provider status, welcome message
1242
- - `core/index.ts` — version display, provider status
1243
- - `core/cli/start.ts` — gradient banner using `chalk.rgb()`, setup UI
1244
- - `core/utils/subtask-table.ts` — color palette as chalk functions, progress display
1245
- - `core/utils/help.ts` — all help formatting
1246
- - `core/workflow/workflow-preferences.ts` — hook status display
1247
- - `core/infrastructure/setup.ts` — installation messages
1248
-
1249
- Terminal control sequences (cursor movement, hide/show) kept as raw ANSI since chalk only handles colors/formatting.
1250
-
1251
- ### Learnings
1252
-
1253
- - `chalk.rgb(R,G,B)` replaces `\x1b[38;2;R;G;Bm` for true-color support
1254
- - Chalk functions can be stored as array values and called dynamically (useful for color palettes)
1255
- - `chalk.bold.white()` chains work for compound styling
1256
- - Terminal control sequences (`\x1b[?25l`, cursor movement) must stay raw — chalk doesn't handle them
1257
-
1258
- ### Test Plan
1259
-
1260
- #### For QA
1261
- 1. Run `prjct --version` — verify colored output with provider status
1262
- 2. Run `prjct help` — verify formatted help with colors
1263
- 3. Run `prjct start --force` — verify gradient banner and colored UI
1264
- 4. Set `NO_COLOR=1` and repeat above — verify all color is suppressed
1265
- 5. Run `bun run build && bun run typecheck` — verify zero errors
1266
-
1267
- #### For Users
1268
- **What changed:** Terminal colors now use the chalk library instead of raw ANSI codes
1269
- **How to use:** No change — colors appear the same but now respect `NO_COLOR` env variable
1270
- **Breaking changes:** None
1271
-
1272
- ## [1.1.1] - 2026-02-06
1273
-
1274
- ### Bug Fixes
1275
-
1276
- - visual grouping with boxes and tables for structured output (PRJ-134) (#110)
1277
-
1278
- ## [1.1.1] - 2026-02-05
1279
-
1280
- ### Improved
1281
-
1282
- - **Visual grouping for structured output (PRJ-134)**: Added `out.section()` and integrated `out.box()`, `out.table()`, `out.list()` into sync, doctor, and status commands
1283
-
1284
- ### Implementation Details
1285
-
1286
- Added `out.section(title)` method to the unified output system (`core/utils/output.ts`) — bold title with dim underline, chainable, quiet-mode aware.
1287
-
1288
- Refactored three commands to use unified output helpers instead of raw `console.log`:
1289
- - **Sync** (`analysis.ts`): Summary metrics in `out.box()`, generated items via `out.section()` + `out.list()`
1290
- - **Doctor** (`doctor-service.ts`): Section headers via `out.section()`, recommendations via `out.list()`, summary via `out.done()`/`out.warn()`/`out.fail()`
1291
- - **Status** (`staleness-checker.ts`): Key-value details wrapped in box-drawing characters
1292
-
1293
- ### Learnings
1294
-
1295
- - `staleness-checker.formatStatus()` returns a string (not direct output), so `out.box()` can't be used directly — used inline box-drawing chars instead
1296
- - Doctor service had its own icon logic for check results that was worth preserving alongside the new section headers
1297
- - Unified output helpers reduce code while maintaining the same visual style
1298
-
1299
- ### Test Plan
1300
-
1301
- #### For QA
1302
- 1. Run `prjct sync` — verify boxed "Sync Summary" with metrics, "Generated" section header with underline, `✓` bullet items
1303
- 2. Run `prjct doctor` — verify bold+underline section headers for "System Tools", "Project Status", "Recommendations"
1304
- 3. Run `prjct status` — verify key-value details in box-drawing characters
1305
- 4. Run with `--quiet` flag — verify no visual output is printed
1306
-
1307
- #### For Users
1308
- **What changed:** CLI output now uses visual grouping (boxes, section headers, structured lists) for better scannability
1309
- **How to use:** No changes needed — output is automatically improved
1310
- **Breaking changes:** None
1311
-
1312
- ## [1.1.0] - 2026-02-05
1313
-
1314
- ### Features
1315
-
1316
- - visual workflow status command (PRJ-140) (#109)
1317
-
1318
-
1319
- ## [1.1.0] - 2026-02-05
1320
-
1321
- ### Features
1322
-
1323
- - **Workflow visualization (PRJ-140)**: New `p. status` command with visual workflow diagram
1324
-
1325
- ### Implementation Details
1326
-
1327
- Added visual workflow status template showing:
1328
- - ASCII workflow diagram with current position indicator (sync → task → work → done → ship)
1329
- - Subtask tree visualization with status icons (✅/🔄/⬜)
1330
- - Progress bar for subtask completion
1331
- - Paused tasks, queue summary, and recent ships
1332
- - Context staleness indicator from `prjct status --json`
1333
- - Compact mode for single-line status output
1334
-
1335
- ### Learnings
1336
-
1337
- - Template-first approach: Complex visualizations can be defined entirely in markdown templates without code changes
1338
-
1339
- ### Test Plan
1340
-
1341
- #### For QA
1342
- 1. Run `prjct sync` to install new status template
1343
- 2. Run `p. status` - verify workflow diagram displays
1344
- 3. Verify subtask tree shows correct status icons
1345
- 4. Test `p. status compact` for single-line output
1346
-
1347
- #### For Users
1348
- - New `p. status` command shows visual workflow overview
1349
- - No breaking changes
1350
-
1351
-
1352
- ## [1.0.0] - 2026-02-05
1353
-
1354
- ### Features
1355
-
1356
- - add input source tagging for context items (PRJ-102) (#106)
1357
- - add timeout management with configurable limits (PRJ-111) (#104)
1358
- - implement graceful degradation for missing dependencies (PRJ-114) (#103)
1359
- - add .prjct-state.md local state file for persistence (PRJ-112) (#102)
1360
- - hierarchical AGENTS.md resolution and template improvements (PRJ-101) (#99)
1361
- - add staleness detection for CLAUDE.md context (PRJ-120) (#97)
1362
- - complete Linear/JIRA workflow integration (#95)
1363
- - monorepo support with nested PRJCT.md inheritance (PRJ-118) (#94)
1364
- - implement output tiers for cleaner CLI output (#88)
1365
- - modular CLAUDE.md for reduced token usage - PRJ-94 (#86)
1366
- - Add showMetrics config option - PRJ-70 (#82)
1367
- - Selective memory retrieval based on task relevance - PRJ-107 (#81)
1368
- - Add session stats to p. stats command - PRJ-89 (#80)
1369
- - Lazy template loading with TTL cache - PRJ-76 (#79)
1370
- - Add confidence scores to all stored preferences - PRJ-104 (#78)
1371
- - Context diff preview before sync applies - PRJ-125 (#77)
1372
- - Unified output system with new methods - PRJ-130 (#76)
1373
- - Error messages with context and recovery hints - PRJ-131 (#75)
1374
- - Read-before-write enforcement for templates - PRJ-108 (#74)
1375
- - Complete and improve help text documentation - PRJ-133 (#73)
1376
- - Workflow hooks via natural language - PRJ-137 (#72)
1377
- - Subtask progress dashboard with domain colors - PRJ-138 (#71)
1378
- - preserve user customizations during sync - PRJ-115 (#70)
1379
- - automated release pipeline - PRJ-147 (#68)
1380
- - add project indexing and analysis services (PRJ-85, PRJ-87) (#66)
1381
- - metrics display in output (PRJ-68, PRJ-69) (#54)
1382
- - add prjct uninstall command (PRJ-146) (#65)
1383
- - add prjct doctor command (PRJ-117) (#62)
1384
- - smart watch mode - auto-sync on file changes (PRJ-123) (#61)
1385
- - add --quiet flag for silent output (PRJ-97) (#60)
1386
- - interactive onboarding wizard (PRJ-124) (#58)
1387
- - smart context filtering tools for AI agents (PRJ-127) (#57)
1388
- - workflow state machine + bidirectional Linear sync (#55)
1389
- - progress indicators for long-running operations (PRJ-129) (#52)
1390
- - agent activity stream for real-time visibility (PRJ-135) (#51)
1391
- - show explicit next steps after each command (PRJ-136) (#50)
1392
- - multi-agent output Phase 3 - Auto-detect + Continue.dev (PRJ-126) (#49)
1393
- - multi-agent output Phase 2 - Copilot + Windsurf (PRJ-126) (#48)
1394
- - multi-agent context output - Phase 1 (PRJ-126) (#47)
1395
- - bidirectional sync Linear ↔ prjct (PRJ-142) (#46)
1396
- - migrate Linear and JIRA from MCP to native SDK (PRJ-141) (#45)
1397
- - enhance skill system with remote installation and lock file (#44)
1398
- - Windsurf IDE support (PRJ-66) (#43)
1399
- - Google Antigravity support via Skills (PRJ-64) (#42)
1400
- - add mandatory plan-before-action rule to all agents
1401
- - Cursor IDE support (PRJ-63) (#40)
1402
- - Cursor IDE support (PRJ-63)
1403
- - dual platform support - Claude + Gemini (PRJ-62) (#39)
1404
- - 100% agentic task routing with subtask fragmentation
1405
- - add agent/skill orchestrator + agentskills.io integration
1406
- - auto-install MCP servers + individual command skills
1407
- - AI-powered ticket enrichment + 4 tracker integrations v0.33.0
1408
- - JIRA MCP integration for corporate SSO v0.32.0
1409
- - JIRA Integration v0.31.0 (#30)
1410
- - PM Expert auto-enrichment + statusline fixes v0.30.2
1411
- - add p. update command for manual sync
1412
- - modular statusline with Linear integration v0.29.0 (#29)
1413
- - redesign build and release flow for npm
1414
- - modular statusline with Linear integration v0.29.0
1415
- - integrate issue tracker and AI enrichment for project management
1416
- - per-project task filtering for status bar v0.28.0
1417
- - Skill integration system v0.27.0 (#24)
1418
- - Claude Code Skill Integration (Agentic) v0.27.0
1419
- - Complete development cycle with workflow integrity v0.26.0
1420
- - Unified /p:task command + auto-sync notification v0.24.0
1421
- - Branch + PR workflow v0.23.0
1422
- - Notion per-project databases + skill registration v0.22.0
1423
- - add optional Notion integration v0.21.0
1424
- - enhance error handling and permissions management
1425
- - UX/UI Design Agent Integration v0.20.0
1426
- - prompt-builder fix + web removal v0.19.0
1427
- - add TestSprite integration for AI-powered testing
1428
- - CLI-API sync bridge + /p:auth command v0.18.0
1429
- - Claude Code sub-agents integration v0.17.0
1430
- - Security, performance, and architecture improvements v0.16.1
1431
- - Dead code cleanup - remove ~6,600 lines v0.16.0
1432
- - Add MCP server configuration for Context7
1433
- - Template optimization - reduce 39 to 27 commands v0.15.0
1434
- - Refactor Project Management with UUID Migration and Enhanced Context Handling
1435
- - Enhance Project Management with Terminal Dock and UI Improvements
1436
- - Actionable Dashboard + Session Recovery v0.14.0
1437
- - Add MomentumWidget + Code workspace + Weekly reports
1438
- - Ship Deep Sync + Cleanup migrations v0.13.0
1439
- - MigrationGate + bug fixes
1440
- - JSON-First Architecture (Zero Data Loss)
1441
- - Implement project stats API and enhance UI components
1442
- - Enhance project management and terminal functionality in web application
1443
- - Revamp web application with Next.js and enhanced features
1444
- - Introduce new server and web components for prjct
1445
- - Release 0.10.14 with 100% agentic delegation and task tool integration
1446
- - Add ⚡ prjct branding with animated spinner
1447
- - 100% agentic agent assignment - JS=orchestrator, Claude=decisions
1448
- - 100% agentic system - eliminate all procedural keyword-based logic
1449
- - Release 0.10.10 with executable templates and context reduction
1450
- - Release 0.10.8 with minimal output system and reduced CLI verbosity
1451
- - Release 0.10.7 with critical improvements and enhanced context handling
1452
- - Enhanced global CLAUDE.md template for better prjct usage
1453
- - Rich project context for Claude
1454
- - Dynamic project context for Claude
1455
- - Intelligent Agent System & Performance Optimization (v0.10.0)
1456
- - add November 22, 2025 release notes for version 0.9.1
1457
- - context optimization and prompt conciseness
1458
- - add legacy installation detector and cleanup system for pre-v0.8.2 curl installations
1459
- - add system timestamp tools and optimize top 7 templates
1460
- - memory-efficient file operations for large JSONL files
1461
- - simplify installation to npm-only with automatic post-install setup
1462
- - v0.8.0 - conversational interface with zero memorization
1463
- - add comprehensive testing documentation
1464
- - add website component tests and configure vitest workspace
1465
- - migrate test suite to Vitest with coverage reporting
1466
- - add isSupported flag to agent detection for Claude and Terminal agents
1467
- - add setup, migrate-all commands and mark roadmap/status/build as implemented
1468
- - redesign footer layout and add AI policy page with updated navigation
1469
- - add Vercel Analytics and Speed Insights tracking to website
1470
- - simplify workflow to 5 essential commands
1471
- - rebrand from project management to developer momentum tool with streamlined templates and workflows
1472
- - add editor uninstallation and smart project data fusion to prjct init
1473
- - add first-time setup flow and auto-initialization for all commands
1474
- - add auto-migration from v0.1.0 projects during post-install hook
1475
- - add auto-install and clean uninstall functionality with editor tracking
1476
- - add GitHub Packages support and track installed editors in config
1477
- - add Windows compatibility feature card to changelog
1478
- - add automatic npm publication and update detection system
1479
- - publish prjct-cli to npm registry
1480
- - remove bun and homebrew installation methods
1481
- - add natural language interface with multi-language support
1482
- - add interactive workflow system with capability detection and installation
1483
- - release v0.3.0 with interactive editor selection and codebase analysis
1484
- - add project management workflows for analyzing, tracking, and fixing tasks
1485
- - update CNAME handling and add 404 page for better routing
1486
- - add cleanup and design commands with advanced options
1487
- - initialize project structure with core files and documentation
1488
-
1489
- ### Bug Fixes
1490
-
1491
- - generate IDE context files with correct paths and formats (PRJ-122) (#107)
1492
- - improve sync output with summary-first format (PRJ-100) (#100)
1493
- - correct template paths and agent loading in CLAUDE.md (#93)
1494
- - make lefthook hooks portable (no bun required) (#92)
1495
- - skip lefthook in CI environments (#91)
1496
- - use npm instead of bun in lefthook hooks (#90)
1497
- - add pre-commit hooks to prevent commits with lint errors (#89)
1498
- - remove legacy p.*.md commands on sync
1499
- - ensure test isolation in IndexStorage tests
1500
- - remove MCP integrations, keep only Context7 (#87)
1501
- - make Linear/JIRA templates explicitly ignore MCP tools
1502
- - remove MCP inheritance from Linear/JIRA templates
1503
- - standardize confirmation pattern across all commands (#85)
1504
- - LLM must handle the prompts, not the CLI - PRJ-149 (#84)
1505
- - Claude over-plans simple commands like p. sync - PRJ-148 (#83)
1506
- - implement silent memory application - PRJ-103 (#69)
1507
- - ignore tar warning in release workflow - PRJ-147
1508
- - remove --provenance (requires public repo) - PRJ-147
1509
- - use Production environment for npm secrets - PRJ-147
1510
- - use semver-sorted tags for version detection - PRJ-147
1511
- - npm auth configuration for CI publish - PRJ-147
1512
- - add Bun setup for test runner in CI - PRJ-147
1513
- - use npm instead of bun for CI tests - PRJ-147
1514
- - remove IDE files from repo - PRJ-144, PRJ-145
1515
- - add --help handler in CLI entry point for CI compatibility
1516
- - update tests for CI compatibility
1517
- - CI workflow - remove unsupported bun reporter flag and fix verification
1518
- - enforce workflow steps in templates (PRJ-143) (#56)
1519
- - add $PRJCT_CLI prefix to relative paths in templates (PRJ-143)
1520
- - use stderr for Linear connection log to not break JSON output
1521
- - show Cursor in same format as other providers in --version
1522
- - Cursor command syntax (PRJ-65) (#41)
1523
- - reduce permission prompts from 50+ to 1 (#38)
1524
- - cleanup legacy files and fix TS error (#37)
1525
- - chore: release v0.35.2
1526
- - connect CLI workflow to CommandExecutor
1527
- - execute orchestration in TypeScript, not just paths (#36)
1528
- - execute orchestration in TypeScript, not just paths
1529
- - remove unsafe 'as unknown' casts (PRJ-54)
1530
- - complete error differentiation (Phase 3) (#35)
1531
- - enable enrichment by default in statusline config
1532
- - self-healing setup in bin/prjct v0.30.1
1533
- - distribution system overhaul - remove fallback, always read from npm root v0.30.0
1534
- - setup.ts auto-execute when run directly
1535
- - remove duplicate statusline version check
1536
- - dynamic path resolution for compiled dist/
1537
- - ALWAYS run postinstall setup, remove global detection
1538
- - detect /opt/homebrew for M1/M2 Macs in postinstall
1539
- - handle bun test warnings in release script
1540
- - include assets/ in npm package + add linear to router
1541
- - add cliVersion to project.json on postinstall
1542
- - resolve symlinks in bin/prjct for npm install
1543
- - agents only write to global storage v0.18.2
1544
- - agents only in global storage + auto-migrate legacy v0.18.1
1545
- - serve.js use start instead of start:prod
1546
- - Remove migration gate from production
1547
- - Restore sidebar collapse + fix server OOM crash
1548
- - Prevent terminal session loss on navigation
1549
- - Terminal responsive & performance issues
1550
- - Server runs in production mode, port 9472
1551
- - Export commands as singleton for direct invocation
1552
- - Update global CLAUDE.md on sync, analyze, and init
1553
- - Add glob dependency and update to modern API
1554
- - critical memory leaks - LRU cache, HTTP cleanup, session expiration
1555
- - ensure command templates always update by removing mtime checks and forcing overwrites
1556
- - resolve critical installation bugs and add auto-update functionality with visual feedback
1557
- - resolve TypeScript errors in website tests
1558
- - remove unused variables to pass lint
1559
- - update vercel build and install commands to use npm prefix syntax
1560
- - remove unused Globe import from Privacy.tsx
1561
- - resolve TypeScript errors in website build
1562
- - remove vercel.json, configure Root Directory in Vercel UI
1563
- - set rootDirectory to website for Vercel
1564
- - use npm --prefix for Vercel build command
1565
- - correct Vercel install command path
1566
- - configure Vercel deployment output directory
1567
- - restore Catppuccin-inspired ASCII art and fix undefined editor names in prjct start command
1568
- - update Badge import path to use correct casing
1569
- - return success exit code for help command
1570
- - remove install script tests from workflow
1571
- - add TERM environment variable to workflow steps
1572
- - add missing WorkflowsGuide.tsx to repository
1573
- - deploy install.sh and setup.sh to website
1574
- - replace inquirer with prompts for better CommonJS compatibility in interactive editor selection
1575
- - resolve installation path errors in setup scripts and add verification tests
1576
- - update init command to use global architecture and fix installer version display
1577
- - update install command URL to use www.prjct.app
1578
- - build(deps-dev): bump vite from 4.5.14 to 7.1.7 in /docs (#1)
1579
-
1580
- ### Performance
1581
-
1582
- - parallelize agent/skill loading with Promise.all (PRJ-110) (#101)
1583
- - parallelize sync operations for 30-50% speedup (PRJ-116) (#59)
1584
-
1585
- ### Refactoring
1586
-
1587
- - migrate from ESLint + Prettier to Biome
1588
- - consolidate and optimize CI workflows
1589
- - extract StackDetector from sync-service (PRJ-86) (#64)
1590
- - extract ContextFileGenerator from sync-service (PRJ-88) (#63)
1591
- - differentiate error types in catch blocks - Phase 2 (PRJ-60) (#34)
1592
- - differentiate error types in catch blocks (PRJ-51) (#33)
1593
- - simplify logger level detection logic (#32)
1594
- - consolidate hardcoded paths to use pathManager singleton (#31)
1595
- - type consolidation in core/types/ v0.20.1
1596
- - centralize types in core/types/ following DRY principles
1597
- - restructure command and agent modules for improved organization
1598
- - consolidate command and storage modules for improved structure
1599
- - migrate testing setup to Bun and enhance documentation
1600
- - Update project structure and enhance component functionality
1601
- - update command registry structure and remove unused imports
1602
- - remove open source references and GitHub links
1603
- - move Changelog link from header to footer
1604
- - use centralized helper utilities in commands
1605
- - migrate from GitHub Pages to Vercel deployment
1606
- - remove redundant title from changelog technical details section
1607
- - extract reusable components from Changelog.tsx
1608
- - sync install.sh from scripts directory to website/public and docs
1609
- - remove unnecessary comments from prjct.sh script
1610
- - remove unnecessary comments from command line parsing logic
1611
- - remove comments and unnecessary whitespace across core modules
1612
- - move author data and system fields from local to global config
1613
- - migrate legacy project files to new global structure with auto-migration
1614
- - rename landing directory to website and update deploy workflow paths
1615
- - update build paths from docs to lp directory in deploy workflow
1616
- - improve GitHub Pages deployment workflow with better file handling and directory structure
1617
-
1618
-
1619
- ## [0.64.1] - 2026-02-05
1620
-
1621
- ### Bug Fixes
1622
-
1623
- - **IDE context file generation (PRJ-122)**: Fixed Cursor and Windsurf context file paths and formats
1624
-
1625
- ### Implementation Details
1626
-
1627
- Fixed misalignment between `ai-provider.ts` (correct paths) and `ai-tools/registry.ts` (incorrect paths). Updated Cursor output to `.cursor/rules/prjct.mdc` with MDC format and `alwaysApply: true` frontmatter. Updated Windsurf output to `.windsurf/rules/prjct.md` with `trigger: always_on` frontmatter. Modified sync-service default behavior to auto-detect IDE tools when `.cursor/` or `.windsurf/` directories exist.
1628
-
1629
- ### Learnings
1630
-
1631
- - Two separate implementations existed (ai-provider vs ai-tools) that needed synchronization
1632
- - IDE formats differ: Cursor uses `alwaysApply: true`, Windsurf uses `trigger: always_on`
1633
- - Auto-detection pattern: check for directory existence to enable optional features
1634
-
1635
- ### Test Plan
1636
-
1637
- #### For QA
1638
- 1. Run `prjct sync` in project with `.cursor/` dir - verify `.cursor/rules/prjct.mdc` generated
1639
- 2. Run `prjct sync` in project with `.windsurf/` dir - verify `.windsurf/rules/prjct.md` generated
1640
- 3. Verify Cursor file has `alwaysApply: true` in frontmatter
1641
- 4. Verify Windsurf file has `trigger: always_on` in frontmatter
1642
- 5. Run `bun test` - all 405 tests pass
1643
-
1644
- #### For Users
1645
- - `prjct sync` now auto-generates IDE context files when `.cursor/` or `.windsurf/` directories exist
1646
- - No manual flags needed - detection is automatic
1647
- - No breaking changes
1648
-
1649
-
1650
- ## [0.64.0] - 2026-02-05
1651
-
1652
- ### Features
1653
-
1654
- - add input source tagging for context items (PRJ-102) (#106)
1655
-
1656
-
1657
- ## [0.63.2] - 2026-02-05
1658
-
1659
- ### Added
1660
-
1661
- - **Input source tagging (PRJ-102)**: Context items now support origin tracking via `_source` metadata
1662
-
1663
- ### Implementation Details
1664
-
1665
- Added `InputSource` type with 10 standardized source categories (user_explicit, user_file, system_detected, system_generated, system_inferred, learned, external, inherited, cached, unknown). Created `SourceMetadata` interface with capturedAt timestamp and optional confidence/sourcePath fields. Added `SourcedItem` base interface and `createSourceMetadata()` helper function. Extended key context interfaces (AgentInfo, FeatureInfo, PatternInfo, GatheredInfo, LoadedAgent) to support source tracking. Updated MemoryMetadata with inputSource field for consistency.
1666
-
1667
- ### Learnings
1668
-
1669
- - Anthropic pattern: always track origin of all data for traceability and debugging
1670
- - Using optional `_source` field allows backward-compatible adoption
1671
-
1672
- ### Test Plan
1673
-
1674
- #### For QA
1675
- 1. Run `bun run typecheck` - passes with new types
1676
- 2. Run `bun test` - all 368 tests pass
1677
- 3. Verify `InputSource` type is exported from `core/types`
1678
-
1679
- #### For Users
1680
- - Context items now support source tracking via `_source` metadata
1681
- - Use `createSourceMetadata()` when creating context items
1682
- - No breaking changes
1683
-
1684
-
1685
- ## [0.63.1] - 2026-02-05
1686
-
1687
- ### Added
1688
-
1689
- - **Unit tests for smart-context.ts (PRJ-84)**: 57 tests covering domain detection, file filtering, and type mappings
1690
-
1691
- ### Implementation Details
1692
-
1693
- Created comprehensive test suite for SmartContext class: `detectDomain()` tests for all 6 domains (frontend, backend, devops, docs, testing, general), `filterFiles()` tests for file pattern matching, `estimateSize()` tests for token estimation, and type mapping function tests.
1694
-
1695
- ### Learnings
1696
-
1697
- - Keyword detection uses substring matching - "be" in "better" matches backend keyword
1698
- - Frontend file pattern `/\.(tsx?|jsx?)$/` also matches plain `.ts` files (known behavior)
1699
- - Confidence scoring caps at 0.95 regardless of keyword count
1700
-
1701
- ### Test Plan
1702
-
1703
- #### For QA
1704
- 1. Run `bun test core/__tests__/agentic/smart-context.test.ts` - all 57 tests pass
1705
- 2. Run `bun test` - full suite passes (368 tests)
1706
-
1707
- #### For Users
1708
- - No user-facing changes (test coverage improvement)
1709
-
1710
-
1711
- ## [0.63.0] - 2026-02-05
1712
-
1713
- ### Features
1714
-
1715
- - add timeout management with configurable limits (PRJ-111) (#104)
1716
-
1717
-
1718
- ## [0.62.1] - 2026-02-05
1719
-
1720
- ### Improved
1721
-
1722
- - **Timeout management (PRJ-111)**: Operations now timeout gracefully with configurable limits instead of hanging indefinitely
1723
-
1724
- ### Implementation Details
1725
-
1726
- Added `TIMEOUTS` constants with `getTimeout()` helper function supporting environment variable overrides (`PRJCT_TIMEOUT_*`). Applied timeouts to: npm install (120s), git operations (10s), git clone (60s), and fetch API calls (30s via AbortController). Timeout errors now include helpful hints for increasing limits.
1727
-
1728
- ### Learnings
1729
-
1730
- - AbortController is the standard way to timeout fetch() calls - create controller, set timeout to call abort(), pass signal to fetch
1731
- - Environment variable pattern `PRJCT_TIMEOUT_*` allows user configurability without config files
1732
-
1733
- ### Test Plan
1734
-
1735
- #### For QA
1736
- 1. Set `PRJCT_TIMEOUT_GIT_OPERATION=100` (100ms) and run `prjct sync` - should timeout
1737
- 2. Unset env var, run `prjct sync` on a large repo - should complete within 10s
1738
- 3. Test npm install timeout with `PRJCT_TIMEOUT_NPM_INSTALL=1000` (1s) - should timeout with helpful message
1739
-
1740
- #### For Users
1741
- - Operations now timeout gracefully instead of hanging indefinitely
1742
- - Set `PRJCT_TIMEOUT_*` env vars to customize timeouts (e.g., `export PRJCT_TIMEOUT_API_REQUEST=60000` for 60s)
1743
- - No breaking changes
1744
-
1745
-
1746
- ## [0.62.0] - 2026-02-05
1747
-
1748
- ### Features
1749
-
1750
- - implement graceful degradation for missing dependencies (PRJ-114) (#103)
1751
-
1752
-
1753
- ## [0.62.0] - 2026-02-05
1754
-
1755
- ### Improved
1756
-
1757
- - **Graceful degradation (PRJ-114)**: prjct now handles missing dependencies with helpful recovery hints instead of crashing
1758
-
1759
- ### Implementation Details
1760
-
1761
- Created `DependencyValidator` service with `checkTool()`, `ensureTool()`, and caching. Integrated into GitAnalyzer, SkillInstaller, and setup.ts. Replaced shell pipes (`wc -l`, `sed`) with JS string operations for cross-platform compatibility. Added alternative installation suggestions (yarn, pnpm, brew) when npm fails.
1762
-
1763
- ### Learnings
1764
-
1765
- - Shell pipes like `wc -l` and `sed` aren't cross-platform - use JS string operations instead
1766
- - execSync calls are expensive - cache results with TTL
1767
- - npm may not be available even when node is - check separately
1768
-
1769
- ### Test Plan
1770
-
1771
- #### For QA
1772
- 1. Run `prjct sync` on a machine without git - verify helpful error message instead of crash
1773
- 2. Run `prjct skill install owner/repo` without git - verify error suggests install methods
1774
- 3. Run `prjct start` without npm - verify suggests alternatives (yarn, pnpm, brew)
1775
- 4. Run `prjct doctor` - verify all tool checks display correctly
1776
-
1777
- #### For Users
1778
- - prjct now gracefully handles missing dependencies with helpful recovery hints
1779
- - Automatic - errors include installation suggestions
1780
- - No breaking changes
1781
-
1782
-
1783
- ## [0.61.0] - 2026-02-05
1784
-
1785
- ### Features
1786
-
1787
- - add .prjct-state.md local state file for persistence (PRJ-112) (#102)
1788
-
1789
-
1790
- ## [0.61.0] - 2026-02-05
1791
-
1792
- ### Features
1793
-
1794
- - **Local state file (PRJ-112)**: New `.prjct-state.md` file generated in project root for local persistence
1795
-
1796
- ### Implementation Details
1797
-
1798
- Created `LocalStateGenerator` service that generates a markdown file showing current task state. Integrated via write-through pattern - `StateStorage.write()` now also generates the local state file. Also hooks into `sync-service.ts` for state.json updates during sync.
1799
-
1800
- ### Learnings
1801
-
1802
- - Write-through pattern: JSON storage triggers MD generation automatically
1803
- - State can be written from multiple entry points (storage class + sync service) - need hooks in both places
1804
-
1805
- ### Test Plan
1806
-
1807
- #### For QA
1808
- 1. Run `prjct sync` on any project - verify `.prjct-state.md` is generated in project root
1809
- 2. Start a task with `p. task "test"` - verify `.prjct-state.md` updates with task info
1810
- 3. Check that subtasks, progress, and status are displayed correctly
1811
- 4. Verify the file has "DO NOT EDIT" header comment
1812
-
1813
- #### For Users
1814
- - New `.prjct-state.md` file in project root shows current task state
1815
- - Automatic - file updates whenever prjct state changes
1816
- - No breaking changes
1817
-
1818
-
1819
- ## [0.60.2] - 2026-02-05
1820
-
1821
- ### Performance
1822
-
1823
- - parallelize agent/skill loading with Promise.all (PRJ-110) (#101)
1824
-
1825
-
1826
- ## [0.60.2] - 2026-02-05
1827
-
1828
- ### Performance
1829
-
1830
- - **Parallel agent/skill loading (PRJ-110)**: Agent and skill loading now uses `Promise.all` for parallel I/O
1831
-
1832
- ### Implementation Details
1833
-
1834
- Refactored `loadAgents()` and `loadSkills()` in `core/agentic/orchestrator-executor.ts` to use `Promise.all` with map instead of sequential for loops. Also parallelized `loadAllAgents()` in `core/domain/agent-loader.ts`. Pattern: collect items → map to async promises → Promise.all → filter nulls with type guard.
1835
-
1836
- ### Learnings
1837
-
1838
- - Use `Promise.all(items.map(async (item) => ...))` for parallel async operations
1839
- - Return null for failed items, then filter - can't push to array in parallel
1840
- - Collect unique items first (deduplication), then parallelize reads
1841
-
1842
- ### Test Plan
1843
-
1844
- #### For QA
1845
- 1. Run `prjct sync --yes` - verify agents load successfully
1846
- 2. Run `p. task "test"` - verify orchestrator works
1847
- 3. Check no errors in agent/skill loading output
1848
-
1849
- #### For Users
1850
- - Agent and skill loading is now faster (parallel I/O)
1851
- - No changes needed - improvement is automatic
1852
-
1853
-
1854
- ## [0.60.1] - 2026-02-05
1855
-
1856
- ### Bug Fixes
1857
-
1858
- - improve sync output with summary-first format (PRJ-100) (#100)
1859
-
1860
-
1861
- ## [0.60.1] - 2026-02-05
1862
-
1863
- ### Improved
1864
-
1865
- - **Sync output UX (PRJ-100)**: Summary-first format with key metrics prominent, ~50% less output
1866
-
1867
- ### Implementation Details
1868
-
1869
- Refactored `showSyncResult()` in `core/commands/analysis.ts` to show success line with timing immediately, followed by single-line metrics (files → context | agents | reduction). Removed redundant bottom summary section. Fixed compressionRate calculation (was decimal, now percentage). Added conditional display for low-value metrics (only show reduction if >10%). Fixed pluralization ("1 skill" not "1 skills").
1870
-
1871
- ### Learnings
1872
-
1873
- - `syncMetrics.compressionRate` is a decimal (0-1), not percentage - multiply by 100
1874
- - Summary-first output pattern improves scannability
1875
- - Conditional metric display reduces noise for low-value data
1876
-
1877
- ### Test Plan
1878
-
1879
- #### For QA
1880
- 1. Run `prjct sync --yes` on any project
1881
- 2. Verify output shows success line first with timing: `✅ Synced {project} ({time}s)`
1882
- 3. Verify single-line metrics: `{files} files → {context} context | {agents} agents`
1883
- 4. Verify compression rate only shows if > 10%
1884
- 5. Verify pluralization is correct ("1 skill" not "1 skills")
1885
-
1886
- #### For Users
1887
- - Sync output is now more scannable - key metrics appear first instead of buried at bottom
1888
- - Run `p. sync` as usual - new format is automatic
1889
- - No breaking changes
1890
-
1891
-
1892
- ## [0.60.0] - 2026-02-05
1893
-
1894
- ### Features
1895
-
1896
- - hierarchical AGENTS.md resolution and template improvements (PRJ-101) (#99)
1897
-
1898
-
1899
- ## [0.60.0] - 2026-02-05
1900
-
1901
- ### Features
1902
-
1903
- - **Hierarchical AGENTS.md resolution (PRJ-101)**: Agent files can now be discovered and loaded hierarchically from any directory level
1904
- - **Learnings capture on task completion**: Templates now capture patterns, approaches, and decisions for LLM knowledge transfer
1905
- - **Local-first issue tracking**: READ LOCAL, WRITE REMOTE pattern for Linear/JIRA (faster, fewer tokens)
1906
-
1907
- ### Changed
1908
-
1909
- - **Statusline improvements**: `p/` → `p.`, branch names truncated to 10 chars, neutral colors
1910
- - **Templates use `prjct` CLI directly**: No more dependency on `$PRJCT_CLI` environment variable
1911
- - **Ship always marks Done**: Issue tracker status updated to Done after ship (work complete)
1912
-
1913
- ### Implementation Details
1914
-
1915
- Implemented hierarchical agent resolution allowing AGENTS.md files at any directory level to define domain-specific patterns. Extended NestedContextResolver to discover these files and HierarchicalAgentResolver to merge them. Updated templates to enforce issue tracker updates and capture learnings on completion.
1916
-
1917
- ### Learnings
1918
-
1919
- - LLMs tend to skip template steps even when marked mandatory - need explicit POST-MERGE sections
1920
- - `$PRJCT_CLI` may not be set - use `prjct` CLI directly
1921
- - Local-first caching critical for token efficiency
1922
- - Neutral colors better than brand colors for dev tools
1923
-
1924
- ### Test Plan
1925
-
1926
- #### For QA
1927
- 1. Run `p. sync` → Verify statusline shows `p.` instead of `p/`
1928
- 2. On long branch name → Verify truncates to 10 chars after `/`
1929
- 3. Run `p. task PRJ-XXX` → Should read from local `issues.json`, not API
1930
- 4. Run `p. done` → Should update Linear status to Done
1931
- 5. Run `p. ship` after merge → Must update issue tracker before outputting success
1932
-
1933
- #### For Users
1934
- - Statusline: `p/` → `p.`, branch names truncated, neutral colors
1935
- - Templates enforce issue tracker updates (never skipped)
1936
- - Learnings captured on task completion for LLM knowledge transfer
1937
-
1938
-
1939
- ## [0.59.1] - 2026-02-05
1940
-
1941
- ### Tests
1942
-
1943
- - **command-executor.ts tests (PRJ-82)**: Added 26 unit tests for the command execution pipeline
1944
-
1945
-
1946
- ## [0.59.0] - 2026-02-05
1947
-
1948
- ### Features
1949
-
1950
- - add staleness detection for CLAUDE.md context (PRJ-120) (#97)
1951
-
1952
-
1953
- ## [0.58.0] - 2026-02-05
1954
-
1955
- ### Features
1956
-
1957
- - complete Linear/JIRA workflow integration (#95)
1958
-
1959
-
1960
- ## [0.57.0] - 2026-02-05
1961
-
1962
- ### Features
1963
-
1964
- - monorepo support with nested PRJCT.md inheritance (PRJ-118) (#94)
1965
-
1966
-
1967
- ## [0.57.0] - 2026-02-05
1968
-
1969
- ### Features
1970
-
1971
- - **Monorepo support (PRJ-118)**: Support nested PRJCT.md files for monorepo subdirectories
1972
- - Detect monorepos (pnpm, npm, yarn, lerna, nx, turborepo, rush)
1973
- - Discover packages with workspace patterns
1974
- - Nested PRJCT.md inheritance (deeper files take precedence)
1975
- - Per-package CLAUDE.md generation with merged context
1976
- - `prjct sync --package=<name>` for single package sync
1977
-
1978
- ### Added
1979
-
1980
- - `NestedContextResolver` service for PRJCT.md discovery and inheritance
1981
- - `detectMonorepo()` and `discoverMonorepoPackages()` in PathManager
1982
- - `generateMonorepoContexts()` in ContextFileGenerator
1983
-
1984
- ## [0.56.1] - 2026-02-05
1985
-
1986
- ### Bug Fixes
1987
-
1988
- - **Context injection**: Fixed template paths in CLAUDE.md - now correctly points to `~/.claude/commands/p/` instead of `templates/commands/`
1989
- - **Agent loading**: Added clear instructions for loading domain agents before SMART commands (task, ship, bug, done)
1990
-
1991
- ## [0.56.0] - 2026-02-05
1992
-
1993
- ### Features
1994
-
1995
- - implement output tiers for cleaner CLI output (#88)
1996
-
1997
- ### Bug Fixes
1998
-
1999
- - make lefthook hooks portable (no bun required) (#92)
2000
- - skip lefthook in CI environments (#91)
2001
- - use npm instead of bun in lefthook hooks (#90)
2002
- - add pre-commit hooks to prevent commits with lint errors (#89)
2003
-
2004
-
2005
- ## [0.55.6] - 2026-02-04
2006
-
2007
- ### Fixed
2008
-
2009
- - **Portable git hooks**: Removed `skip_in_ci` and test from pre-push hook - hooks now work everywhere with npm-only commands (lint, typecheck). Tests run in CI where bun is properly installed.
2010
-
2011
- ## [0.55.5] - 2026-02-05
2012
-
2013
- ### Added
2014
-
2015
- - **Pre-commit hooks**: Added lefthook for git hooks - blocks commits with lint/format errors
2016
- - **Pre-push hooks**: Runs typecheck and tests before push
2017
-
2018
- ### Fixed
2019
-
2020
- - Fixed 3 lint errors (import ordering, formatting)
2021
-
2022
- ## [0.55.4] - 2026-02-05
2023
-
2024
- ### Features
2025
-
2026
- - **Output tiers**: New tiered output system (silent/minimal/compact/verbose) for cleaner CLI output
2027
- - **Human-friendly Linear output**: `p. linear list` now shows concise table instead of raw JSON
2028
- - **--json flag**: Use `--json` to get machine-parseable JSON output when needed
2029
- - **--verbose flag**: Use `--verbose` for full untruncated output
2030
-
2031
- ### Improved
2032
-
2033
- - Removed noisy `[linear] Connected as...` messages from every API call
2034
- - Added `limitLines()` and `formatForHuman()` utilities for consistent output formatting
2035
-
2036
- ### Bug Fixes
2037
-
2038
- - remove legacy p.*.md commands on sync
2039
-
2040
- ### Tests
2041
-
2042
- - Added 11 new tests for output tier functionality
2043
-
2044
- ## [0.55.3] - 2026-02-05
2045
-
2046
- ### Bug Fixes
2047
-
2048
- - ensure test isolation in IndexStorage tests
2049
- - remove MCP integrations, keep only Context7 (#87)
2050
-
2051
-
2052
- ## [0.56.0] - 2026-02-04
2053
-
2054
- ### Breaking Changes
2055
-
2056
- - **Removed MCP-based integrations** (Monday.com, GitHub Issues)
2057
- - Only Context7 remains as the sole MCP server (for library docs)
2058
- - Linear and JIRA use SDK/REST API directly (4x faster)
2059
-
2060
- ### Features
2061
-
2062
- - **Context7 auto-install**: Now automatically configured in `~/.claude/mcp.json` on `prjct init`
2063
-
2064
- ### Fixed
2065
-
2066
- - Templates no longer reference non-existent CLI commands (`prjct context task`, etc.)
2067
- - All workflow templates (task, done, bug, pause, resume, next, dash) now use Read/Write directly
2068
-
2069
- ### Removed
2070
-
2071
- - `templates/commands/monday.md` - MCP integration
2072
- - `templates/commands/github.md` - MCP integration
2073
- - `templates/_bases/tracker-base.md` - MCP base template
2074
- - `core/integrations/jira/mcp-adapter.ts` - Unused MCP adapter
2075
-
2076
- ## [0.55.2] - 2026-02-04
2077
-
2078
- ### Bug Fixes
2079
-
2080
- - make Linear/JIRA templates explicitly ignore MCP tools
2081
-
2082
-
2083
- ## [0.55.1] - 2026-02-04
2084
-
2085
- ### Bug Fixes
2086
-
2087
- - **Linear/JIRA templates no longer inherit MCP-based tracker-base**
2088
- - Removed `extends: '_bases/tracker-base.md'` from `linear.md` and `jira.md`
2089
- - Both templates have complete SDK-based implementations (4x faster than MCP)
2090
- - Fixes bug where `p. linear setup` kept asking users to "restart Claude Code for MCP"
2091
- - Updated `tracker-base.md` to clarify it's only for MCP trackers (GitHub, Monday)
2092
-
2093
- ## [0.55.0] - 2026-01-30
2094
-
2095
- ### Features
2096
-
2097
- - modular CLAUDE.md for reduced token usage - PRJ-94 (#86)
2098
-
2099
- ## [0.54.4] - 2026-01-30
2100
-
2101
- ### Improved
2102
-
2103
- - **Modular CLAUDE.md for reduced token usage** (PRJ-94)
2104
- - Split global template into 5 modules: core, git, storage, commands, intelligence
2105
- - Added profile-based composition: minimal (84% reduction), standard (56%), full (23%)
2106
- - FAST commands (sync, next, dash) use minimal profile (~394 tokens)
2107
- - SMART commands (task, ship, bug) dynamically inject additional modules
2108
- - Target 40-60% token reduction achieved for simple commands
2109
-
2110
- ## [0.54.3] - 2026-01-30
2111
-
2112
- ### Bug Fixes
2113
-
2114
- - standardize confirmation pattern across all commands (#85)
2115
-
2116
-
2117
- ## [0.54.3] - 2026-01-30
2118
-
2119
- ### Fixed
2120
-
2121
- - Standardize confirmation pattern across all commands to use AskUserQuestion
2122
- - Updated `ship.md`, `merge.md`, `git.md`, `task.md` templates
2123
- - Replaces inconsistent "Proceed? (yes/no)" text prompts
2124
- - All confirmations now use consistent options: "Yes (Recommended)", "No, cancel"
2125
-
2126
- ## [0.54.2] - 2026-01-30
2127
-
2128
- ### Bug Fixes
2129
-
2130
- - LLM must handle the prompts, not the CLI - PRJ-149 (#84)
2131
-
2132
-
2133
- ## [0.55.3] - 2026-01-30
2134
-
2135
- ### Fixed
2136
-
2137
- - **LLM must handle the prompts, not the CLI** (PRJ-149)
2138
- - Added `--json` flag to `prjct sync` for non-interactive mode
2139
- - CLI now detects non-TTY mode and outputs structured JSON instead of interactive prompts
2140
- - Updated `sync.md` template so LLM uses AskUserQuestion for confirmation
2141
- - Enables proper flow: `prjct sync --json` → show diff → AskUserQuestion → `prjct sync --yes`
2142
-
2143
-
2144
- ## [0.54.1] - 2026-01-30
2145
-
2146
- ### Bug Fixes
2147
-
2148
- - Claude over-plans simple commands like p. sync - PRJ-148 (#83)
2149
-
2150
-
2151
- ## [0.55.2] - 2026-01-30
2152
-
2153
- ### Fixed
2154
-
2155
- - **Claude over-plans simple commands** (PRJ-148)
2156
- - Added "⚡ FAST vs 🧠 SMART COMMANDS" section to CLAUDE.md
2157
- - FAST commands (sync, next, dash, pause, resume) now execute immediately without exploration/planning
2158
- - SMART commands (task, ship, bug, done) continue to use intelligent behavior
2159
- - Clarified that "Key Intelligence Rules" only apply to SMART commands
2160
-
2161
-
2162
- ## [0.55.1] - 2026-01-30
2163
-
2164
- ### Added
2165
-
2166
- - **showMetrics config option** (PRJ-70)
2167
- - Add `showMetrics` boolean to `LocalConfig` (prjct.config.json)
2168
- - Defaults to `true` for new projects and existing projects without setting
2169
- - Added `getShowMetrics()` and `setShowMetrics()` to ConfigManager
2170
-
2171
-
2172
- ## [0.55.0] - 2026-01-30
2173
-
2174
- ### Features
2175
-
2176
- - Selective memory retrieval based on task relevance - PRJ-107
2177
-
2178
-
2179
- ## [0.55.0] - 2026-01-30
2180
-
2181
- ### Added
2182
-
2183
- - **Selective memory retrieval based on task relevance** (PRJ-107)
2184
- - Added `getRelevantMemoriesWithMetrics()` for domain-based filtering
2185
- - Relevance scoring considers: domain match (25pts), tag match (20pts), recency (15pts), confidence (20pts), keywords (15pts), user triggered (5pts)
2186
- - Returns retrieval metrics: total, considered, returned, filtering ratio, avg score
2187
- - New types: `RelevantMemoryQuery`, `ScoredMemory`, `MemoryRetrievalResult`, `TaskDomain`
2188
- - Integrates with PRJ-104 confidence scoring
2189
-
2190
-
2191
- ## [0.54.0] - 2026-01-30
2192
-
2193
- ### Features
2194
-
2195
- - Session stats in p. stats command - PRJ-89
2196
-
2197
-
2198
- ## [0.54.0] - 2026-01-30
2199
-
2200
- ### Added
2201
-
2202
- - **Session stats in `p. stats` command** (PRJ-89)
2203
- - Shows today's activity: duration, tasks completed, features shipped
2204
- - Displays agents used during the session with frequency
2205
- - Shows learned patterns: decisions, preferences, workflows
2206
- - Enhanced JSON and export modes include session data
2207
- - Added `getRecentEvents()` to memoryService
2208
-
2209
-
2210
- ## [0.53.0] - 2026-01-30
2211
-
2212
- ### Features
2213
-
2214
- - Lazy template loading with TTL cache - PRJ-76 (#79)
2215
-
2216
-
2217
- ## [0.53.0] - 2026-01-30
2218
-
2219
- ### Features
2220
-
2221
- - Lazy template loading with TTL cache - PRJ-76
2222
-
2223
-
2224
- ## [0.53.0] - 2026-01-30
2225
-
2226
- ### Added
2227
-
2228
- - **Lazy template loading with TTL cache** (PRJ-76)
2229
- - Templates now loaded on-demand with 60-second TTL cache
2230
- - Added `getTemplate()` method with per-file caching
2231
- - `loadChecklists()` and `loadChecklistRouting()` now use TTL cache
2232
- - Added `clearTemplateCache()` method for testing/forced refresh
2233
- - Reduces disk I/O for frequently accessed templates
2234
-
2235
-
2236
- ## [0.52.0] - 2026-01-30
2237
-
2238
- ### Features
2239
-
2240
- - Add confidence scores to all stored preferences - PRJ-104 (#78)
2241
-
2242
-
2243
- ## [0.52.0] - 2026-01-30
2244
-
2245
- ### Added
2246
-
2247
- - **Confidence scores for stored preferences** (PRJ-104)
2248
- - All preferences, decisions, and workflows now track confidence level
2249
- - Confidence: `low` (1-2 obs), `medium` (3-5 obs), `high` (6+ or confirmed)
2250
- - Added `confirmPreference()`, `confirmDecision()`, `confirmWorkflow()` methods
2251
- - User confirmation immediately sets confidence to `high`
2252
- - Added `calculateConfidence()` utility function
2253
-
2254
-
2255
- ## [0.51.0] - 2026-01-30
2256
-
2257
- ### Features
2258
-
2259
- - Context diff preview before sync applies - PRJ-125 (#77)
2260
-
2261
-
2262
- ## [0.51.0] - 2026-01-30
2263
-
2264
- ### Added
2265
-
2266
- - **Context Diff Preview** (PRJ-125)
2267
- - See what changes sync will make before they're applied
2268
- - Interactive confirmation: apply, cancel, or show full diff
2269
- - Preserved sections clearly marked in preview
2270
- - Token count delta displayed
2271
- - `--preview` flag for dry-run only
2272
- - `--yes` flag to skip confirmation
2273
-
2274
-
2275
- ## [0.50.0] - 2026-01-30
2276
-
2277
- ### Features
2278
-
2279
- - Unified output system with new methods - PRJ-130 (#76)
2280
-
2281
-
2282
- ## [0.50.0] - 2026-01-30
2283
-
2284
- ### Added
2285
-
2286
- - **Unified output system with new methods** (PRJ-130)
2287
- - Added `ICONS` constant for centralized icon definitions
2288
- - New methods: `info()`, `debug()`, `success()`, `list()`, `table()`, `box()`
2289
- - `debug()` only shows output when `DEBUG=1`
2290
- - Refactored existing methods to use `ICONS` for consistency
2291
-
2292
-
2293
- ## [0.49.0] - 2026-01-30
2294
-
2295
- ### Features
2296
-
2297
- - Error messages with context and recovery hints - PRJ-131 (#75)
2298
-
2299
-
2300
- ## [0.49.1] - 2026-01-30
2301
-
2302
- ### Improved
2303
-
2304
- - **Error messages with context and recovery hints** (PRJ-131)
2305
- - Created error catalog with 15+ error types
2306
- - Added `out.failWithHint()` for rich error output
2307
- - Errors now show file path and recovery hints
2308
- - Example: `✗ Project ID not found` → `💡 Run 'prjct init'`
2309
-
2310
-
2311
- ## [0.49.0] - 2026-01-30
2312
-
2313
- ### Added
2314
-
2315
- - **Read-before-write enforcement for templates** (PRJ-108)
2316
- - Agent files now preserve user customizations during regeneration
2317
- - All context files (now.md, next.md, ideas.md, shipped.md) preserve user sections
2318
- - Added validation and warnings for invalid preserve blocks
2319
- - Documented preserve markers in global CLAUDE.md template
2320
-
2321
- ### Fixed
2322
-
2323
- - **Codebase cleanup** - Resolved all 22 biome lint warnings
2324
- - Fixed forEach returning values (converted to for...of)
2325
- - Fixed unused type exports (exported or removed)
2326
- - Fixed implicit any types
2327
- - Fixed template literal usage
2328
- - Fixed void return type issues
2329
-
2330
-
2331
- ## [0.48.1] - 2026-01-30
2332
-
2333
- ### Improved
2334
-
2335
- - **Complete and improve help text documentation** (PRJ-133)
2336
- - New structured help system with `prjct help <command>` support
2337
- - Per-command help with usage, parameters, and features
2338
- - Commands grouped by category with `prjct help commands`
2339
- - Clean visual formatting with Quick Start, Terminal Commands, AI Agent Commands sections
2340
-
2341
-
2342
- ## [0.48.0] - 2026-01-29
2343
-
2344
- ### Added
2345
-
2346
- - **Workflow hooks via natural language** (PRJ-137)
2347
- - Configure hooks with `p. workflow "before ship run the tests"`
2348
- - Supports before/after hooks for task, done, ship, sync commands
2349
- - Three scopes: permanent (persisted), session, one-time
2350
- - Uses existing memory system for storage
2351
- - No JSON config needed - just talk to the LLM
2352
-
2353
-
2354
- ## [0.47.0] - 2026-01-29
2355
-
2356
- ### Added
2357
-
2358
- - **Subtask progress dashboard with domain-specific colors** (PRJ-138)
2359
- - Visual progress table showing subtask status
2360
- - Domain-specific colors: frontend (cyan), backend (green), database (yellow), testing (magenta), devops (blue)
2361
- - Shows current subtask indicator and completion status
2362
- - Displays estimated vs actual time tracking
2363
-
2364
-
2365
- ## [0.46.0] - 2026-01-29
2366
-
2367
- ### Added
2368
-
2369
- - **Preserve user customizations during sync** (PRJ-115)
2370
- - Users can mark sections with `<!-- prjct:preserve -->` markers
2371
- - Preserved content survives regeneration
2372
- - Works in CLAUDE.md and other context files
2373
-
2374
-
2375
- ## [0.45.5] - 2026-01-28
2376
-
2377
- ### Fixed
2378
-
2379
- - **Silent memory application** (PRJ-103)
2380
- - Memory decisions applied without verbose output
2381
- - Cleaner sync experience
2382
-
2383
-
2384
- ## [0.45.0] - 2026-01-28
2385
-
2386
- ### Added
2387
-
2388
- - Initial public release
2389
- - Core workflow: sync, task, done, ship
2390
- - Domain agents: frontend, backend, database, testing, devops
2391
- - Linear integration via MCP
2392
- - Context layer for Claude Code and Gemini CLI
122
+ 1. Run any command — verify output matches schema
123
+ 2. Run with large context — verify budget trimming works
124
+ 3. Check prompt size stays under model limits