@in-the-loop-labs/pair-review 2.6.3 → 3.0.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.
Files changed (150) hide show
  1. package/.pi/extensions/task/index.ts +1 -1
  2. package/.pi/skills/review-roulette/SKILL.md +1 -1
  3. package/LICENSE +201 -674
  4. package/README.md +2 -2
  5. package/bin/pair-review.js +1 -1
  6. package/package.json +2 -2
  7. package/plugin/.claude-plugin/plugin.json +2 -2
  8. package/plugin-code-critic/.claude-plugin/plugin.json +2 -2
  9. package/plugin-code-critic/skills/analyze/scripts/git-diff-lines +1 -1
  10. package/public/css/ai-summary-modal.css +1 -1
  11. package/public/css/pr.css +194 -0
  12. package/public/index.html +168 -3
  13. package/public/js/components/AIPanel.js +17 -3
  14. package/public/js/components/AISummaryModal.js +1 -1
  15. package/public/js/components/AdvancedConfigTab.js +1 -1
  16. package/public/js/components/AnalysisConfigModal.js +1 -1
  17. package/public/js/components/ChatPanel.js +42 -7
  18. package/public/js/components/ConfirmDialog.js +22 -3
  19. package/public/js/components/CouncilProgressModal.js +14 -1
  20. package/public/js/components/DiffOptionsDropdown.js +411 -24
  21. package/public/js/components/EmojiPicker.js +1 -1
  22. package/public/js/components/KeyboardShortcuts.js +1 -1
  23. package/public/js/components/PanelGroup.js +1 -1
  24. package/public/js/components/PreviewModal.js +1 -1
  25. package/public/js/components/ReviewModal.js +1 -1
  26. package/public/js/components/SplitButton.js +1 -1
  27. package/public/js/components/StatusIndicator.js +1 -1
  28. package/public/js/components/SuggestionNavigator.js +13 -6
  29. package/public/js/components/TabTitle.js +96 -0
  30. package/public/js/components/TextInputDialog.js +1 -1
  31. package/public/js/components/TimeoutSelect.js +1 -1
  32. package/public/js/components/Toast.js +7 -1
  33. package/public/js/components/VoiceCentricConfigTab.js +1 -1
  34. package/public/js/index.js +649 -44
  35. package/public/js/local.js +570 -77
  36. package/public/js/modules/analysis-history.js +4 -3
  37. package/public/js/modules/comment-manager.js +6 -1
  38. package/public/js/modules/comment-minimizer.js +304 -0
  39. package/public/js/modules/diff-context.js +1 -1
  40. package/public/js/modules/diff-renderer.js +1 -1
  41. package/public/js/modules/file-comment-manager.js +1 -1
  42. package/public/js/modules/file-list-merger.js +1 -1
  43. package/public/js/modules/gap-coordinates.js +1 -1
  44. package/public/js/modules/hunk-parser.js +1 -1
  45. package/public/js/modules/line-tracker.js +1 -1
  46. package/public/js/modules/panel-resizer.js +1 -1
  47. package/public/js/modules/storage-cleanup.js +1 -1
  48. package/public/js/modules/suggestion-manager.js +1 -1
  49. package/public/js/pr.js +83 -7
  50. package/public/js/repo-settings.js +1 -1
  51. package/public/js/utils/category-emoji.js +1 -1
  52. package/public/js/utils/file-order.js +1 -1
  53. package/public/js/utils/markdown.js +1 -1
  54. package/public/js/utils/suggestion-ui.js +1 -1
  55. package/public/js/utils/tier-icons.js +1 -1
  56. package/public/js/utils/time.js +1 -1
  57. package/public/js/ws-client.js +1 -1
  58. package/public/local.html +14 -0
  59. package/public/pr.html +3 -0
  60. package/public/setup.html +1 -1
  61. package/src/ai/analyzer.js +18 -12
  62. package/src/ai/claude-cli.js +1 -1
  63. package/src/ai/claude-provider.js +1 -1
  64. package/src/ai/codex-provider.js +1 -1
  65. package/src/ai/copilot-provider.js +1 -1
  66. package/src/ai/cursor-agent-provider.js +1 -1
  67. package/src/ai/gemini-provider.js +1 -1
  68. package/src/ai/index.js +1 -1
  69. package/src/ai/opencode-provider.js +1 -1
  70. package/src/ai/pi-provider.js +1 -1
  71. package/src/ai/prompts/baseline/consolidation/balanced.js +1 -1
  72. package/src/ai/prompts/baseline/consolidation/fast.js +1 -1
  73. package/src/ai/prompts/baseline/consolidation/thorough.js +1 -1
  74. package/src/ai/prompts/baseline/level1/balanced.js +1 -1
  75. package/src/ai/prompts/baseline/level1/fast.js +1 -1
  76. package/src/ai/prompts/baseline/level1/thorough.js +1 -1
  77. package/src/ai/prompts/baseline/level2/balanced.js +1 -1
  78. package/src/ai/prompts/baseline/level2/fast.js +1 -1
  79. package/src/ai/prompts/baseline/level2/thorough.js +1 -1
  80. package/src/ai/prompts/baseline/level3/balanced.js +1 -1
  81. package/src/ai/prompts/baseline/level3/fast.js +1 -1
  82. package/src/ai/prompts/baseline/level3/thorough.js +1 -1
  83. package/src/ai/prompts/baseline/orchestration/balanced.js +1 -1
  84. package/src/ai/prompts/baseline/orchestration/fast.js +1 -1
  85. package/src/ai/prompts/baseline/orchestration/thorough.js +1 -1
  86. package/src/ai/prompts/config.js +1 -1
  87. package/src/ai/prompts/index.js +1 -1
  88. package/src/ai/prompts/line-number-guidance.js +1 -1
  89. package/src/ai/prompts/render-for-skill.js +1 -1
  90. package/src/ai/prompts/shared/diff-instructions.js +1 -1
  91. package/src/ai/prompts/shared/output-schema.js +1 -1
  92. package/src/ai/prompts/shared/valid-files.js +1 -1
  93. package/src/ai/prompts/sparse-checkout-guidance.js +1 -1
  94. package/src/ai/provider-availability.js +1 -1
  95. package/src/ai/provider.js +1 -1
  96. package/src/ai/stream-parser.js +1 -1
  97. package/src/chat/acp-bridge.js +1 -1
  98. package/src/chat/api-reference.js +1 -1
  99. package/src/chat/chat-providers.js +1 -1
  100. package/src/chat/claude-code-bridge.js +1 -1
  101. package/src/chat/codex-bridge.js +1 -1
  102. package/src/chat/pi-bridge.js +1 -1
  103. package/src/chat/prompt-builder.js +1 -1
  104. package/src/chat/session-manager.js +1 -1
  105. package/src/config.js +3 -1
  106. package/src/database.js +591 -40
  107. package/src/events/review-events.js +1 -1
  108. package/src/git/base-branch.js +173 -0
  109. package/src/git/gitattributes.js +1 -1
  110. package/src/git/sha-abbrev.js +35 -0
  111. package/src/git/worktree.js +1 -1
  112. package/src/github/client.js +33 -2
  113. package/src/github/parser.js +1 -1
  114. package/src/hooks/hook-runner.js +100 -0
  115. package/src/hooks/payloads.js +212 -0
  116. package/src/local-review.js +469 -130
  117. package/src/local-scope.js +58 -0
  118. package/src/main.js +56 -5
  119. package/src/mcp-stdio.js +1 -1
  120. package/src/protocol-handler.js +1 -1
  121. package/src/routes/analyses.js +74 -11
  122. package/src/routes/chat.js +34 -1
  123. package/src/routes/config.js +2 -1
  124. package/src/routes/context-files.js +1 -1
  125. package/src/routes/councils.js +1 -1
  126. package/src/routes/github-collections.js +1 -1
  127. package/src/routes/local.js +735 -69
  128. package/src/routes/mcp.js +21 -11
  129. package/src/routes/pr.js +91 -13
  130. package/src/routes/reviews.js +1 -1
  131. package/src/routes/setup.js +2 -1
  132. package/src/routes/shared.js +1 -1
  133. package/src/routes/worktrees.js +213 -149
  134. package/src/server.js +31 -1
  135. package/src/setup/local-setup.js +47 -6
  136. package/src/setup/pr-setup.js +29 -6
  137. package/src/utils/auto-context.js +1 -1
  138. package/src/utils/category-emoji.js +1 -1
  139. package/src/utils/comment-formatter.js +1 -1
  140. package/src/utils/diff-annotator.js +1 -1
  141. package/src/utils/diff-file-list.js +1 -1
  142. package/src/utils/instructions.js +1 -1
  143. package/src/utils/json-extractor.js +1 -1
  144. package/src/utils/line-validation.js +1 -1
  145. package/src/utils/logger.js +1 -1
  146. package/src/utils/paths.js +1 -1
  147. package/src/utils/safe-parse-json.js +1 -1
  148. package/src/utils/stats-calculator.js +1 -1
  149. package/src/ws/index.js +1 -1
  150. package/src/ws/server.js +1 -1
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Shared UI utilities for AI suggestion management
4
4
  * Used by both PR mode (pr.js) and Local mode (local.js)
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Tier icon utility for model selection UI
4
4
  * Returns emoji icons for different model tiers that work well in both light and dark themes
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Timestamp parsing utility for consistent UTC interpretation.
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
 
3
3
  /**
4
4
  * Browser-side WebSocket client singleton.
package/public/local.html CHANGED
@@ -19,6 +19,7 @@
19
19
  window.__pairReview = window.__pairReview || {};
20
20
  window.__pairReview.chatProvider = config.chat_provider || 'pi';
21
21
  window.__pairReview.chatProviders = chatProviders;
22
+ window.__pairReview.chatSpinner = config.chat_spinner || 'dots';
22
23
  document.documentElement.setAttribute('data-chat', state);
23
24
  const shortcutsState = config.chat_enable_shortcuts === false ? 'disabled' : 'enabled';
24
25
  document.documentElement.setAttribute('data-chat-shortcuts', shortcutsState);
@@ -266,8 +267,18 @@
266
267
  </svg>
267
268
  <span id="local-branch-text">--</span>
268
269
  </span>
270
+ <span class="local-branch-vs" id="local-branch-vs" style="display: none; font-size: 11px; color: var(--color-text-tertiary); margin: 0 4px;">vs</span>
271
+ <span class="local-branch-badge" id="local-base-branch" style="display: none;">
272
+ <svg viewBox="0 0 16 16" fill="currentColor" width="12" height="12">
273
+ <path d="M11.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122V6A2.5 2.5 0 0110 8.5H6a1 1 0 00-1 1v1.128a2.251 2.251 0 11-1.5 0V5.372a2.25 2.25 0 111.5 0v1.836A2.492 2.492 0 016 7h4a1 1 0 001-1v-.628A2.25 2.25 0 019.5 3.25zM4.25 12a.75.75 0 100 1.5.75.75 0 000-1.5zM3.5 3.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0z"/>
274
+ </svg>
275
+ <span id="local-base-branch-text">--</span>
276
+ </span>
269
277
  </div>
270
278
  </div>
279
+ <span id="stale-badge" class="stale-badge" style="display: none" title="Working directory has changed">
280
+ <span class="stale-badge-text">STALE</span>
281
+ </span>
271
282
  </div>
272
283
  <div class="header-center">
273
284
  <!-- Editable review name/title -->
@@ -527,6 +538,7 @@
527
538
  <script src="/js/ws-client.js"></script>
528
539
 
529
540
  <!-- Components -->
541
+ <script src="/js/components/TabTitle.js"></script>
530
542
  <script src="/js/components/Toast.js"></script>
531
543
  <script src="/js/components/ConfirmDialog.js"></script>
532
544
  <script src="/js/components/TextInputDialog.js"></script>
@@ -544,6 +556,7 @@
544
556
  <script src="/js/components/AIPanel.js"></script>
545
557
  <script src="/js/components/EmojiPicker.js"></script>
546
558
  <script src="/js/components/KeyboardShortcuts.js"></script>
559
+ <script src="/js/local-scope.js"></script>
547
560
  <script src="/js/components/DiffOptionsDropdown.js"></script>
548
561
 
549
562
  <!-- PR Modules (must load before pr.js) -->
@@ -554,6 +567,7 @@
554
567
  <script src="/js/modules/diff-renderer.js"></script>
555
568
  <script src="/js/modules/comment-manager.js"></script>
556
569
  <script src="/js/modules/suggestion-manager.js"></script>
570
+ <script src="/js/modules/comment-minimizer.js"></script>
557
571
  <script src="/js/modules/file-comment-manager.js"></script>
558
572
  <script src="/js/modules/panel-resizer.js"></script>
559
573
  <script src="/js/modules/analysis-history.js"></script>
package/public/pr.html CHANGED
@@ -27,6 +27,7 @@
27
27
  window.__pairReview.chatProviders = chatProviders;
28
28
  window.__pairReview.share = config.share || null;
29
29
  window.__pairReview.enableGraphite = config.enable_graphite === true;
30
+ window.__pairReview.chatSpinner = config.chat_spinner || 'dots';
30
31
  document.documentElement.setAttribute('data-chat', state);
31
32
  const shortcutsState = config.chat_enable_shortcuts === false ? 'disabled' : 'enabled';
32
33
  document.documentElement.setAttribute('data-chat-shortcuts', shortcutsState);
@@ -374,6 +375,7 @@
374
375
  <script src="/js/ws-client.js"></script>
375
376
 
376
377
  <!-- Components -->
378
+ <script src="/js/components/TabTitle.js"></script>
377
379
  <script src="/js/components/Toast.js"></script>
378
380
  <script src="/js/components/ConfirmDialog.js"></script>
379
381
  <script src="/js/components/TextInputDialog.js"></script>
@@ -401,6 +403,7 @@
401
403
  <script src="/js/modules/diff-renderer.js"></script>
402
404
  <script src="/js/modules/comment-manager.js"></script>
403
405
  <script src="/js/modules/suggestion-manager.js"></script>
406
+ <script src="/js/modules/comment-minimizer.js"></script>
404
407
  <script src="/js/modules/file-comment-manager.js"></script>
405
408
  <script src="/js/modules/panel-resizer.js"></script>
406
409
  <script src="/js/modules/analysis-history.js"></script>
package/public/setup.html CHANGED
@@ -530,7 +530,7 @@
530
530
  <script src="/js/ws-client.js"></script>
531
531
 
532
532
  <script>
533
- // SPDX-License-Identifier: GPL-3.0-or-later
533
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
534
534
 
535
535
  (function() {
536
536
  'use strict';
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  const { createProvider } = require('./index');
3
3
  const { v4: uuidv4 } = require('uuid');
4
4
  const path = require('path');
@@ -670,20 +670,18 @@ Do NOT create suggestions for any files not in this list. If you cannot find iss
670
670
  }
671
671
 
672
672
  /**
673
- * Get list of changed files for local mode analysis
674
- * Includes unstaged changes and untracked files only.
675
- *
676
- * Design note: Staged files are intentionally excluded. Local mode focuses on
677
- * reviewing uncommitted working directory changes before they are staged.
678
- * Staged changes are considered "ready to commit" and outside the scope of
679
- * local review at this point.
673
+ * Get list of changed files for local mode analysis.
674
+ * By default includes unstaged changes and untracked files.
675
+ * When `options.includeStaged` is true, also includes staged (git add'd) files.
680
676
  *
681
677
  * @param {string} localPath - Path to the local git repository
678
+ * @param {Object} [options]
679
+ * @param {boolean} [options.includeStaged] - Also include staged files
682
680
  * @returns {Promise<Array<string>>} List of changed file paths
683
681
  */
684
- async getLocalChangedFiles(localPath) {
682
+ async getLocalChangedFiles(localPath, options = {}) {
685
683
  try {
686
- // Get modified tracked files (unstaged only - staged files are excluded by design)
684
+ // Get modified tracked files (unstaged)
687
685
  const { stdout: unstaged } = await execPromise(
688
686
  'git diff --no-ext-diff --name-only',
689
687
  { cwd: localPath }
@@ -695,12 +693,20 @@ Do NOT create suggestions for any files not in this list. If you cannot find iss
695
693
  { cwd: localPath }
696
694
  );
697
695
 
698
- // Combine and dedupe (no staged files - see design note above)
699
- // Filter empty strings immediately after split to handle empty git output
700
696
  const unstagedFiles = unstaged.trim().split('\n').filter(f => f.length > 0);
701
697
  const untrackedFiles = untracked.trim().split('\n').filter(f => f.length > 0);
702
698
  const allFiles = [...unstagedFiles, ...untrackedFiles];
703
699
 
700
+ // Include staged files when scope includes staged
701
+ if (options.includeStaged) {
702
+ const { stdout: staged } = await execPromise(
703
+ 'git diff --no-ext-diff --cached --name-only',
704
+ { cwd: localPath }
705
+ );
706
+ const stagedFiles = staged.trim().split('\n').filter(f => f.length > 0);
707
+ allFiles.push(...stagedFiles);
708
+ }
709
+
704
710
  return [...new Set(allFiles)];
705
711
  } catch (error) {
706
712
  logger.warn(`Could not get local changed files for ${localPath}: ${error.message}`);
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  const { spawn } = require('child_process');
3
3
  const path = require('path');
4
4
  const logger = require('../utils/logger');
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Claude AI Provider
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Codex AI Provider
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * GitHub Copilot AI Provider
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Cursor Agent AI Provider
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Gemini AI Provider
4
4
  *
package/src/ai/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * AI Provider Module
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * OpenCode AI Provider
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Pi AI Provider
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Consolidation Balanced Prompt - Cross-Reviewer Suggestion Merging
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Consolidation Fast Prompt - Quick Cross-Reviewer Suggestion Merging
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Consolidation Thorough Prompt - Comprehensive Cross-Reviewer Suggestion Merging
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Level 1 Balanced Prompt - Changes in Isolation Analysis
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Level 1 Fast Prompt - Changes in Isolation Analysis (Quick Review)
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Level 1 Thorough Prompt - Changes in Isolation Analysis (Deep Review)
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Level 2 Balanced Prompt - File Context Analysis
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Level 2 Fast Prompt - File Context Analysis (Quick Review)
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Level 2 Thorough Prompt - File Context Analysis (Deep Review)
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Level 3 Balanced Prompt - Codebase Context Analysis
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Level 3 Fast Prompt - Codebase Context Analysis (Quick Review)
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Level 3 Thorough Prompt - Codebase Context Analysis (Deep Review)
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Orchestration Balanced Prompt - Multi-Level Suggestion Curation
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Orchestration Fast Prompt - Quick Multi-Level Suggestion Curation
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Orchestration Thorough Prompt - Comprehensive Multi-Level Suggestion Curation
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Prompt optimization configuration
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Prompt Optimization System - Main Entry Point
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Shared line-number guidance builders.
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Render prompts for use in the analyze skill.
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Diff instructions section - shared across prompt types
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Output schema section - shared across prompt types
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Valid files section - shared across prompt types
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Sparse-checkout guidance for analysis prompts.
4
4
  * Injected when the worktree uses sparse-checkout.
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Provider Availability Module
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * AI Provider Abstraction Layer
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Stream Parser - Side-channel parser for real-time AI streaming events
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * ACP (Agent Client Protocol) Bridge
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * API Reference Module
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Chat Provider Registry
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Claude Code Bridge
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Codex App-Server Bridge
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Pi RPC Bridge
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Chat Prompt Builder
4
4
  *
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
3
  * Chat Session Manager
4
4
  *
package/src/config.js CHANGED
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
1
+ // Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0
2
2
  const fs = require('fs').promises;
3
3
  const path = require('path');
4
4
  const os = require('os');
@@ -23,6 +23,7 @@ const DEFAULT_CONFIG = {
23
23
  default_provider: "claude", // AI provider: 'claude', 'gemini', 'codex', 'copilot', 'opencode', 'cursor-agent', 'pi'
24
24
  default_model: "opus", // Model within the provider (e.g., 'opus' for Claude, 'gemini-2.5-pro' for Gemini)
25
25
  worktree_retention_days: 7,
26
+ review_retention_days: 21,
26
27
  dev_mode: false, // When true, disables static file caching for development
27
28
  debug_stream: false, // When true, logs AI provider streaming events (equivalent to --debug-stream CLI flag)
28
29
  db_name: "", // Custom database filename (default: database.db). Useful for per-worktree isolation.
@@ -35,6 +36,7 @@ const DEFAULT_CONFIG = {
35
36
  chat_providers: {}, // Custom chat provider configurations (overrides built-in defaults)
36
37
  monorepos: {}, // Monorepo configurations: { "owner/repo": { path: "~/path/to/clone" } }
37
38
  assisted_by_url: "https://github.com/in-the-loop-labs/pair-review", // URL for "Review assisted by" footer link
39
+ hooks: {}, // Hook commands per event: { "review.started": { "my_hook": { "command": "..." } } }
38
40
  enable_graphite: false // When true, shows Graphite links alongside GitHub links
39
41
  };
40
42