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