@shepai/cli 1.180.0 → 1.181.0-pr539.0993dc0

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 (316) hide show
  1. package/apis/json-schema/CavemanModeConfig.yaml +14 -0
  2. package/apis/json-schema/PhaseTiming.yaml +30 -0
  3. package/apis/json-schema/SubprocessFilterConfig.yaml +11 -0
  4. package/apis/json-schema/TokenOptimizationConfig.yaml +36 -0
  5. package/apis/json-schema/WorkflowConfig.yaml +9 -0
  6. package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts +8 -0
  7. package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts.map +1 -1
  8. package/dist/packages/core/src/application/ports/output/agents/phase-timing-repository.interface.d.ts +8 -1
  9. package/dist/packages/core/src/application/ports/output/agents/phase-timing-repository.interface.d.ts.map +1 -1
  10. package/dist/packages/core/src/application/ports/output/index.d.ts +1 -1
  11. package/dist/packages/core/src/application/ports/output/index.d.ts.map +1 -1
  12. package/dist/packages/core/src/application/ports/output/services/alias-compression.interface.d.ts +45 -0
  13. package/dist/packages/core/src/application/ports/output/services/alias-compression.interface.d.ts.map +1 -0
  14. package/dist/packages/core/src/application/ports/output/services/alias-compression.interface.js +13 -0
  15. package/dist/packages/core/src/application/ports/output/services/command-output-filter.interface.d.ts +50 -0
  16. package/dist/packages/core/src/application/ports/output/services/command-output-filter.interface.d.ts.map +1 -0
  17. package/dist/packages/core/src/application/ports/output/services/command-output-filter.interface.js +13 -0
  18. package/dist/packages/core/src/application/ports/output/services/delta-context.interface.d.ts +57 -0
  19. package/dist/packages/core/src/application/ports/output/services/delta-context.interface.d.ts.map +1 -0
  20. package/dist/packages/core/src/application/ports/output/services/delta-context.interface.js +13 -0
  21. package/dist/packages/core/src/application/ports/output/services/index.d.ts +7 -0
  22. package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
  23. package/dist/packages/core/src/application/ports/output/services/optimization-metrics.interface.d.ts +45 -0
  24. package/dist/packages/core/src/application/ports/output/services/optimization-metrics.interface.d.ts.map +1 -0
  25. package/dist/packages/core/src/application/ports/output/services/optimization-metrics.interface.js +13 -0
  26. package/dist/packages/core/src/application/ports/output/services/prompt-optimizer.interface.d.ts +86 -0
  27. package/dist/packages/core/src/application/ports/output/services/prompt-optimizer.interface.d.ts.map +1 -0
  28. package/dist/packages/core/src/application/ports/output/services/prompt-optimizer.interface.js +13 -0
  29. package/dist/packages/core/src/application/ports/output/services/semantic-compressor.interface.d.ts +43 -0
  30. package/dist/packages/core/src/application/ports/output/services/semantic-compressor.interface.d.ts.map +1 -0
  31. package/dist/packages/core/src/application/ports/output/services/semantic-compressor.interface.js +13 -0
  32. package/dist/packages/core/src/application/ports/output/services/skill-routing.interface.d.ts +41 -0
  33. package/dist/packages/core/src/application/ports/output/services/skill-routing.interface.d.ts.map +1 -0
  34. package/dist/packages/core/src/application/ports/output/services/skill-routing.interface.js +12 -0
  35. package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
  36. package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +21 -0
  37. package/dist/packages/core/src/domain/generated/output.d.ts +95 -0
  38. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  39. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  40. package/dist/packages/core/src/infrastructure/di/container.js +27 -0
  41. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +9 -0
  42. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
  43. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +68 -0
  44. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/055-add-token-optimization-config.d.ts +29 -0
  45. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/055-add-token-optimization-config.d.ts.map +1 -0
  46. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/055-add-token-optimization-config.js +77 -0
  47. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-caveman-mode-config.d.ts +21 -0
  48. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-caveman-mode-config.d.ts.map +1 -0
  49. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-caveman-mode-config.js +29 -0
  50. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/057-add-subprocess-filter-config.d.ts +17 -0
  51. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/057-add-subprocess-filter-config.d.ts.map +1 -0
  52. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/057-add-subprocess-filter-config.js +22 -0
  53. package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.d.ts +2 -1
  54. package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.d.ts.map +1 -1
  55. package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.js +72 -0
  56. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
  57. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +19 -3
  58. package/dist/packages/core/src/infrastructure/services/agents/analyze-repo/analyze-repository-graph.d.ts +1 -1
  59. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts.map +1 -1
  60. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.js +9 -0
  61. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/caveman-directive.d.ts +41 -0
  62. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/caveman-directive.d.ts.map +1 -0
  63. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/caveman-directive.js +51 -0
  64. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts +6 -1
  65. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts.map +1 -1
  66. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts +18 -1
  67. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts.map +1 -1
  68. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
  69. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +6 -0
  70. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.d.ts.map +1 -1
  71. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.js +2 -2
  72. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/fast-implement.node.d.ts.map +1 -1
  73. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/fast-implement.node.js +3 -2
  74. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/implement.node.d.ts.map +1 -1
  75. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/implement.node.js +5 -4
  76. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts.map +1 -1
  77. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.js +3 -4
  78. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts +27 -0
  79. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
  80. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +71 -1
  81. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/prompt-optimization-context.d.ts +42 -0
  82. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/prompt-optimization-context.d.ts.map +1 -0
  83. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/prompt-optimization-context.js +92 -0
  84. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts +1 -0
  85. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts.map +1 -1
  86. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.js +5 -0
  87. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/subprocess-filter-context.d.ts +25 -0
  88. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/subprocess-filter-context.d.ts.map +1 -0
  89. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/subprocess-filter-context.js +67 -0
  90. package/dist/packages/core/src/infrastructure/services/subprocess-filter/filters/generic-filter.d.ts +13 -0
  91. package/dist/packages/core/src/infrastructure/services/subprocess-filter/filters/generic-filter.d.ts.map +1 -0
  92. package/dist/packages/core/src/infrastructure/services/subprocess-filter/filters/generic-filter.js +21 -0
  93. package/dist/packages/core/src/infrastructure/services/subprocess-filter/filters/git-filter.d.ts +15 -0
  94. package/dist/packages/core/src/infrastructure/services/subprocess-filter/filters/git-filter.d.ts.map +1 -0
  95. package/dist/packages/core/src/infrastructure/services/subprocess-filter/filters/git-filter.js +189 -0
  96. package/dist/packages/core/src/infrastructure/services/subprocess-filter/filters/npm-filter.d.ts +13 -0
  97. package/dist/packages/core/src/infrastructure/services/subprocess-filter/filters/npm-filter.d.ts.map +1 -0
  98. package/dist/packages/core/src/infrastructure/services/subprocess-filter/filters/npm-filter.js +96 -0
  99. package/dist/packages/core/src/infrastructure/services/subprocess-filter/filters/shared-helpers.d.ts +29 -0
  100. package/dist/packages/core/src/infrastructure/services/subprocess-filter/filters/shared-helpers.d.ts.map +1 -0
  101. package/dist/packages/core/src/infrastructure/services/subprocess-filter/filters/shared-helpers.js +85 -0
  102. package/dist/packages/core/src/infrastructure/services/subprocess-filter/shep-filter.d.ts +27 -0
  103. package/dist/packages/core/src/infrastructure/services/subprocess-filter/shep-filter.d.ts.map +1 -0
  104. package/dist/packages/core/src/infrastructure/services/subprocess-filter/shep-filter.js +89 -0
  105. package/dist/packages/core/src/infrastructure/services/subprocess-filter/shim-generator.d.ts +39 -0
  106. package/dist/packages/core/src/infrastructure/services/subprocess-filter/shim-generator.d.ts.map +1 -0
  107. package/dist/packages/core/src/infrastructure/services/subprocess-filter/shim-generator.js +53 -0
  108. package/dist/packages/core/src/infrastructure/services/token-optimization/alias-compression.service.d.ts +41 -0
  109. package/dist/packages/core/src/infrastructure/services/token-optimization/alias-compression.service.d.ts.map +1 -0
  110. package/dist/packages/core/src/infrastructure/services/token-optimization/alias-compression.service.js +111 -0
  111. package/dist/packages/core/src/infrastructure/services/token-optimization/command-output-filter.service.d.ts +22 -0
  112. package/dist/packages/core/src/infrastructure/services/token-optimization/command-output-filter.service.d.ts.map +1 -0
  113. package/dist/packages/core/src/infrastructure/services/token-optimization/command-output-filter.service.js +245 -0
  114. package/dist/packages/core/src/infrastructure/services/token-optimization/delta-context.service.d.ts +22 -0
  115. package/dist/packages/core/src/infrastructure/services/token-optimization/delta-context.service.d.ts.map +1 -0
  116. package/dist/packages/core/src/infrastructure/services/token-optimization/delta-context.service.js +50 -0
  117. package/dist/packages/core/src/infrastructure/services/token-optimization/optimization-metrics.service.d.ts +36 -0
  118. package/dist/packages/core/src/infrastructure/services/token-optimization/optimization-metrics.service.d.ts.map +1 -0
  119. package/dist/packages/core/src/infrastructure/services/token-optimization/optimization-metrics.service.js +123 -0
  120. package/dist/packages/core/src/infrastructure/services/token-optimization/prompt-optimizer.service.d.ts +57 -0
  121. package/dist/packages/core/src/infrastructure/services/token-optimization/prompt-optimizer.service.d.ts.map +1 -0
  122. package/dist/packages/core/src/infrastructure/services/token-optimization/prompt-optimizer.service.js +241 -0
  123. package/dist/packages/core/src/infrastructure/services/token-optimization/semantic-compressor.service.d.ts +34 -0
  124. package/dist/packages/core/src/infrastructure/services/token-optimization/semantic-compressor.service.d.ts.map +1 -0
  125. package/dist/packages/core/src/infrastructure/services/token-optimization/semantic-compressor.service.js +190 -0
  126. package/dist/packages/core/src/infrastructure/services/token-optimization/skill-routing.service.d.ts +26 -0
  127. package/dist/packages/core/src/infrastructure/services/token-optimization/skill-routing.service.d.ts.map +1 -0
  128. package/dist/packages/core/src/infrastructure/services/token-optimization/skill-routing.service.js +51 -0
  129. package/dist/tsconfig.build.tsbuildinfo +1 -1
  130. package/package.json +1 -1
  131. package/web/.next/BUILD_ID +1 -1
  132. package/web/.next/build-manifest.json +2 -2
  133. package/web/.next/fallback-build-manifest.json +2 -2
  134. package/web/.next/prerender-manifest.json +3 -3
  135. package/web/.next/required-server-files.js +3 -3
  136. package/web/.next/required-server-files.json +3 -3
  137. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +32 -32
  138. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  139. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  140. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +30 -30
  141. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  142. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  143. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +33 -33
  144. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  145. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  146. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +41 -41
  147. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  148. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  149. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +41 -41
  150. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  151. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  152. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +31 -31
  153. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  154. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  155. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +31 -31
  156. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  157. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  158. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +30 -30
  159. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  160. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  161. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +33 -33
  162. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  163. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  164. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +41 -41
  165. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  166. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  167. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +41 -41
  168. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  169. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  170. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +30 -30
  171. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  172. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  173. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +31 -31
  174. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  175. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  176. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +31 -31
  177. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  178. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  179. package/web/.next/server/app/_global-error.html +2 -2
  180. package/web/.next/server/app/_global-error.rsc +1 -1
  181. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  182. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  183. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  184. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  185. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  186. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +7 -7
  187. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  188. package/web/.next/server/app/application/[id]/page/server-reference-manifest.json +15 -15
  189. package/web/.next/server/app/application/[id]/page.js.nft.json +1 -1
  190. package/web/.next/server/app/application/[id]/page_client-reference-manifest.js +1 -1
  191. package/web/.next/server/app/features/page/server-reference-manifest.json +7 -7
  192. package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
  193. package/web/.next/server/app/settings/page/server-reference-manifest.json +10 -10
  194. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  195. package/web/.next/server/app/skills/page/server-reference-manifest.json +15 -15
  196. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  197. package/web/.next/server/app/tools/page/server-reference-manifest.json +13 -13
  198. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  199. package/web/.next/server/app/version/page/server-reference-manifest.json +7 -7
  200. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  201. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  202. package/web/.next/server/chunks/[root-of-the-server]__b2a4bfcc._.js.map +1 -1
  203. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
  204. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  205. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  206. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
  207. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
  208. package/web/.next/server/chunks/ssr/[root-of-the-server]__013a0318._.js +1 -1
  209. package/web/.next/server/chunks/ssr/[root-of-the-server]__013a0318._.js.map +1 -1
  210. package/web/.next/server/chunks/ssr/[root-of-the-server]__17dadd08._.js +1 -1
  211. package/web/.next/server/chunks/ssr/[root-of-the-server]__17dadd08._.js.map +1 -1
  212. package/web/.next/server/chunks/ssr/[root-of-the-server]__1925bef0._.js +1 -1
  213. package/web/.next/server/chunks/ssr/[root-of-the-server]__1a9687c4._.js +1 -1
  214. package/web/.next/server/chunks/ssr/[root-of-the-server]__1a9687c4._.js.map +1 -1
  215. package/web/.next/server/chunks/ssr/[root-of-the-server]__24756fa9._.js +2 -2
  216. package/web/.next/server/chunks/ssr/[root-of-the-server]__24756fa9._.js.map +1 -1
  217. package/web/.next/server/chunks/ssr/[root-of-the-server]__4ee8be85._.js +1 -1
  218. package/web/.next/server/chunks/ssr/[root-of-the-server]__70986695._.js +1 -1
  219. package/web/.next/server/chunks/ssr/[root-of-the-server]__70986695._.js.map +1 -1
  220. package/web/.next/server/chunks/ssr/[root-of-the-server]__a5ea76a6._.js +1 -1
  221. package/web/.next/server/chunks/ssr/[root-of-the-server]__a5ea76a6._.js.map +1 -1
  222. package/web/.next/server/chunks/ssr/[root-of-the-server]__bb391c45._.js +1 -1
  223. package/web/.next/server/chunks/ssr/[root-of-the-server]__bb391c45._.js.map +1 -1
  224. package/web/.next/server/chunks/ssr/[root-of-the-server]__dd3e834e._.js +1 -1
  225. package/web/.next/server/chunks/ssr/[root-of-the-server]__dd3e834e._.js.map +1 -1
  226. package/web/.next/server/chunks/ssr/[root-of-the-server]__e265da61._.js +1 -1
  227. package/web/.next/server/chunks/ssr/[root-of-the-server]__f3ca7bea._.js +1 -1
  228. package/web/.next/server/chunks/ssr/[root-of-the-server]__f3ca7bea._.js.map +1 -1
  229. package/web/.next/server/chunks/ssr/_0277d3b5._.js +1 -1
  230. package/web/.next/server/chunks/ssr/_0277d3b5._.js.map +1 -1
  231. package/web/.next/server/chunks/ssr/_295fffde._.js.map +1 -1
  232. package/web/.next/server/chunks/ssr/_45496654._.js.map +1 -1
  233. package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
  234. package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
  235. package/web/.next/server/chunks/ssr/{_8caadb9a._.js → _688e1fd9._.js} +2 -2
  236. package/web/.next/server/chunks/ssr/{_8caadb9a._.js.map → _688e1fd9._.js.map} +1 -1
  237. package/web/.next/server/chunks/ssr/_7931d3de._.js +3 -0
  238. package/web/.next/server/chunks/ssr/{_36489f2b._.js.map → _7931d3de._.js.map} +1 -1
  239. package/web/.next/server/chunks/ssr/_946a7fc6._.js +1 -1
  240. package/web/.next/server/chunks/ssr/_946a7fc6._.js.map +1 -1
  241. package/web/.next/server/chunks/ssr/{_d44d091a._.js → _bd8c6d0b._.js} +2 -2
  242. package/web/.next/server/chunks/ssr/{_d44d091a._.js.map → _bd8c6d0b._.js.map} +1 -1
  243. package/web/.next/server/chunks/ssr/{_63fc4647._.js → _ce7571dd._.js} +2 -2
  244. package/web/.next/server/chunks/ssr/{_63fc4647._.js.map → _ce7571dd._.js.map} +1 -1
  245. package/web/.next/server/chunks/ssr/_eff1b518._.js +1 -1
  246. package/web/.next/server/chunks/ssr/_eff1b518._.js.map +1 -1
  247. package/web/.next/server/chunks/ssr/_f227429a._.js +1 -1
  248. package/web/.next/server/chunks/ssr/_f227429a._.js.map +1 -1
  249. package/web/.next/server/chunks/ssr/_f5a56a3f._.js +3 -0
  250. package/web/.next/server/chunks/ssr/{_b8e8b690._.js.map → _f5a56a3f._.js.map} +1 -1
  251. package/web/.next/server/chunks/ssr/_f86fc1bf._.js +1 -1
  252. package/web/.next/server/chunks/ssr/_f86fc1bf._.js.map +1 -1
  253. package/web/.next/server/chunks/ssr/_f8c55130._.js +1 -1
  254. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  255. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  256. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
  257. package/web/.next/server/chunks/ssr/src_presentation_web_36f2bc45._.js +1 -1
  258. package/web/.next/server/chunks/ssr/src_presentation_web_36f2bc45._.js.map +1 -1
  259. package/web/.next/server/chunks/ssr/src_presentation_web_486908de._.js +1 -1
  260. package/web/.next/server/chunks/ssr/src_presentation_web_486908de._.js.map +1 -1
  261. package/web/.next/server/chunks/ssr/src_presentation_web_5c3596bc._.js +1 -1
  262. package/web/.next/server/chunks/ssr/src_presentation_web_5c3596bc._.js.map +1 -1
  263. package/web/.next/server/chunks/ssr/src_presentation_web_6159fef8._.js +1 -1
  264. package/web/.next/server/chunks/ssr/src_presentation_web_6159fef8._.js.map +1 -1
  265. package/web/.next/server/chunks/ssr/src_presentation_web_6326f81e._.js +1 -1
  266. package/web/.next/server/chunks/ssr/src_presentation_web_6326f81e._.js.map +1 -1
  267. package/web/.next/server/chunks/ssr/src_presentation_web_6b2fdcd8._.js +1 -1
  268. package/web/.next/server/chunks/ssr/src_presentation_web_6b2fdcd8._.js.map +1 -1
  269. package/web/.next/server/chunks/ssr/src_presentation_web_74703c9f._.js +1 -1
  270. package/web/.next/server/chunks/ssr/src_presentation_web_74703c9f._.js.map +1 -1
  271. package/web/.next/server/chunks/ssr/src_presentation_web_a8056dac._.js +1 -1
  272. package/web/.next/server/chunks/ssr/src_presentation_web_a8056dac._.js.map +1 -1
  273. package/web/.next/server/chunks/ssr/src_presentation_web_ad42cc73._.js +1 -1
  274. package/web/.next/server/chunks/ssr/src_presentation_web_ad42cc73._.js.map +1 -1
  275. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +3 -3
  276. package/web/.next/server/chunks/ssr/src_presentation_web_b00bfb08._.js +1 -1
  277. package/web/.next/server/chunks/ssr/src_presentation_web_b00bfb08._.js.map +1 -1
  278. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js +1 -1
  279. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js.map +1 -1
  280. package/web/.next/server/chunks/ssr/src_presentation_web_components_common_base-drawer_base-drawer_tsx_97dfbbc8._.js +1 -1
  281. package/web/.next/server/chunks/ssr/src_presentation_web_components_common_base-drawer_base-drawer_tsx_97dfbbc8._.js.map +1 -1
  282. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  283. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  284. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js +1 -1
  285. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -1
  286. package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js +1 -1
  287. package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js.map +1 -1
  288. package/web/.next/server/chunks/ssr/src_presentation_web_f1edcf5e._.js +1 -1
  289. package/web/.next/server/chunks/ssr/src_presentation_web_f1edcf5e._.js.map +1 -1
  290. package/web/.next/server/chunks/ssr/src_presentation_web_f9436804._.js +1 -1
  291. package/web/.next/server/chunks/ssr/src_presentation_web_f9436804._.js.map +1 -1
  292. package/web/.next/server/pages/500.html +2 -2
  293. package/web/.next/server/server-reference-manifest.js +1 -1
  294. package/web/.next/server/server-reference-manifest.json +54 -54
  295. package/web/.next/static/chunks/{f6d47ff35d612852.js → 2bba4ee52a6464cd.js} +3 -3
  296. package/web/.next/static/chunks/4371be9a949c8fe0.js +1 -0
  297. package/web/.next/static/chunks/{490667b2a9bb58e2.js → 46bc202f80905332.js} +1 -1
  298. package/web/.next/static/chunks/{26e2ca76ab6c38b4.js → 51593e45475cb81d.js} +1 -1
  299. package/web/.next/static/chunks/{c0bd3ffcf94d1845.js → 75d1485ec29b8fd8.js} +1 -1
  300. package/web/.next/static/chunks/{e7da54dde18e7fb2.js → aba1ec85581d3f1b.js} +1 -1
  301. package/web/.next/static/chunks/{e2f9e224d1fa1faa.js → abc53f1cc59f4642.js} +1 -1
  302. package/web/.next/static/chunks/{a1098522326428d1.js → ac069319b2aeab27.js} +1 -1
  303. package/web/.next/static/chunks/{1fa1574b87bd2eb1.js → b5aadaa3b34d7b8e.js} +1 -1
  304. package/web/.next/static/chunks/{dfdcccf73de56960.js → b7e697748c35a4ce.js} +1 -1
  305. package/web/.next/static/chunks/{7849c6797be7c6ca.js → b9135c0d88735f54.js} +2 -2
  306. package/web/.next/static/chunks/{893a2a76546c66a7.js → c6b5b3f46622241d.js} +1 -1
  307. package/web/.next/static/chunks/{f28aef9cf5107c4b.js → c9c58949bf064dbe.js} +1 -1
  308. package/web/.next/static/chunks/{be89c20c257247ad.js → cbf7498ef586ebd3.js} +1 -1
  309. package/web/.next/static/chunks/{8746807722de67a8.js → d9f55661eb505770.js} +1 -1
  310. package/web/.next/static/chunks/{7bc7028587490fff.js → e3d4828e3b7291df.js} +1 -1
  311. package/web/.next/server/chunks/ssr/_36489f2b._.js +0 -3
  312. package/web/.next/server/chunks/ssr/_b8e8b690._.js +0 -3
  313. package/web/.next/static/chunks/1bc12075020723ed.js +0 -1
  314. /package/web/.next/static/{GQFJf3UCD4D5C4NCn8eXl → 73VlrUiVfmfr0uTiP1eN1}/_buildManifest.js +0 -0
  315. /package/web/.next/static/{GQFJf3UCD4D5C4NCn8eXl → 73VlrUiVfmfr0uTiP1eN1}/_clientMiddlewareManifest.json +0 -0
  316. /package/web/.next/static/{GQFJf3UCD4D5C4NCn8eXl → 73VlrUiVfmfr0uTiP1eN1}/_ssgManifest.js +0 -0
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Migration 055: Add token optimization config and metrics columns.
3
+ *
4
+ * Settings table — token optimization config (all default to 1 = enabled):
5
+ * - token_opt_enabled (INTEGER DEFAULT 1)
6
+ * - token_opt_output_filtering (INTEGER DEFAULT 1)
7
+ * - token_opt_skill_routing (INTEGER DEFAULT 1)
8
+ * - token_opt_delta_context (INTEGER DEFAULT 1)
9
+ * - token_opt_semantic_compression (INTEGER DEFAULT 1)
10
+ * - token_opt_alias_compression (INTEGER DEFAULT 1)
11
+ *
12
+ * Phase timings table — optimization metrics (all nullable, no defaults):
13
+ * - original_token_estimate (INTEGER)
14
+ * - optimized_token_estimate (INTEGER)
15
+ * - savings_percent (REAL)
16
+ * - capabilities_applied (TEXT)
17
+ * - output_filter_lines_removed (INTEGER)
18
+ * - delta_context_files_skipped (INTEGER)
19
+ * - compression_ratio (REAL)
20
+ * - aliases_created (INTEGER)
21
+ *
22
+ * All columns are additive-only. No drops, no renames.
23
+ * Guards against duplicate column errors using table_info pragma.
24
+ */
25
+ export async function up({ context: db }) {
26
+ // --- Settings table: token optimization config ---
27
+ const settingsCols = db.pragma('table_info(settings)');
28
+ const settingsNames = new Set(settingsCols.map((c) => c.name));
29
+ if (!settingsNames.has('token_opt_enabled')) {
30
+ db.exec('ALTER TABLE settings ADD COLUMN token_opt_enabled INTEGER NOT NULL DEFAULT 1');
31
+ }
32
+ if (!settingsNames.has('token_opt_output_filtering')) {
33
+ db.exec('ALTER TABLE settings ADD COLUMN token_opt_output_filtering INTEGER NOT NULL DEFAULT 1');
34
+ }
35
+ if (!settingsNames.has('token_opt_skill_routing')) {
36
+ db.exec('ALTER TABLE settings ADD COLUMN token_opt_skill_routing INTEGER NOT NULL DEFAULT 1');
37
+ }
38
+ if (!settingsNames.has('token_opt_delta_context')) {
39
+ db.exec('ALTER TABLE settings ADD COLUMN token_opt_delta_context INTEGER NOT NULL DEFAULT 1');
40
+ }
41
+ if (!settingsNames.has('token_opt_semantic_compression')) {
42
+ db.exec('ALTER TABLE settings ADD COLUMN token_opt_semantic_compression INTEGER NOT NULL DEFAULT 1');
43
+ }
44
+ if (!settingsNames.has('token_opt_alias_compression')) {
45
+ db.exec('ALTER TABLE settings ADD COLUMN token_opt_alias_compression INTEGER NOT NULL DEFAULT 1');
46
+ }
47
+ // --- Phase timings table: optimization metrics ---
48
+ const timingsCols = db.pragma('table_info(phase_timings)');
49
+ const timingsNames = new Set(timingsCols.map((c) => c.name));
50
+ if (!timingsNames.has('original_token_estimate')) {
51
+ db.exec('ALTER TABLE phase_timings ADD COLUMN original_token_estimate INTEGER');
52
+ }
53
+ if (!timingsNames.has('optimized_token_estimate')) {
54
+ db.exec('ALTER TABLE phase_timings ADD COLUMN optimized_token_estimate INTEGER');
55
+ }
56
+ if (!timingsNames.has('savings_percent')) {
57
+ db.exec('ALTER TABLE phase_timings ADD COLUMN savings_percent REAL');
58
+ }
59
+ if (!timingsNames.has('capabilities_applied')) {
60
+ db.exec('ALTER TABLE phase_timings ADD COLUMN capabilities_applied TEXT');
61
+ }
62
+ if (!timingsNames.has('output_filter_lines_removed')) {
63
+ db.exec('ALTER TABLE phase_timings ADD COLUMN output_filter_lines_removed INTEGER');
64
+ }
65
+ if (!timingsNames.has('delta_context_files_skipped')) {
66
+ db.exec('ALTER TABLE phase_timings ADD COLUMN delta_context_files_skipped INTEGER');
67
+ }
68
+ if (!timingsNames.has('compression_ratio')) {
69
+ db.exec('ALTER TABLE phase_timings ADD COLUMN compression_ratio REAL');
70
+ }
71
+ if (!timingsNames.has('aliases_created')) {
72
+ db.exec('ALTER TABLE phase_timings ADD COLUMN aliases_created INTEGER');
73
+ }
74
+ }
75
+ export async function down({ context: db }) {
76
+ void db;
77
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Migration 056: Add caveman mode configuration columns to settings.
3
+ *
4
+ * Caveman mode appends a terse-style directive to Claude Code's system
5
+ * prompt via the `--append-system-prompt` CLI flag. It is disabled by
6
+ * default because it changes the agent's output style globally; users
7
+ * opt in explicitly.
8
+ *
9
+ * Settings table — caveman mode config:
10
+ * - caveman_mode_enabled (INTEGER NOT NULL DEFAULT 0) — master toggle, off by default
11
+ * - caveman_mode_directive (TEXT NULL) — optional custom directive; null = use factory default
12
+ *
13
+ * All columns are additive-only. No drops, no renames.
14
+ * Guards against duplicate column errors using the table_info pragma
15
+ * so a re-run against a database that already has the columns is a no-op.
16
+ */
17
+ import type { MigrationParams } from 'umzug';
18
+ import type Database from 'better-sqlite3';
19
+ export declare function up({ context: db }: MigrationParams<Database.Database>): Promise<void>;
20
+ export declare function down({ context: db }: MigrationParams<Database.Database>): Promise<void>;
21
+ //# sourceMappingURL=056-add-caveman-mode-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"056-add-caveman-mode-config.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-caveman-mode-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,wBAAsB,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAU3F;AAED,wBAAsB,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7F"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Migration 056: Add caveman mode configuration columns to settings.
3
+ *
4
+ * Caveman mode appends a terse-style directive to Claude Code's system
5
+ * prompt via the `--append-system-prompt` CLI flag. It is disabled by
6
+ * default because it changes the agent's output style globally; users
7
+ * opt in explicitly.
8
+ *
9
+ * Settings table — caveman mode config:
10
+ * - caveman_mode_enabled (INTEGER NOT NULL DEFAULT 0) — master toggle, off by default
11
+ * - caveman_mode_directive (TEXT NULL) — optional custom directive; null = use factory default
12
+ *
13
+ * All columns are additive-only. No drops, no renames.
14
+ * Guards against duplicate column errors using the table_info pragma
15
+ * so a re-run against a database that already has the columns is a no-op.
16
+ */
17
+ export async function up({ context: db }) {
18
+ const settingsCols = db.pragma('table_info(settings)');
19
+ const settingsNames = new Set(settingsCols.map((c) => c.name));
20
+ if (!settingsNames.has('caveman_mode_enabled')) {
21
+ db.exec('ALTER TABLE settings ADD COLUMN caveman_mode_enabled INTEGER NOT NULL DEFAULT 0');
22
+ }
23
+ if (!settingsNames.has('caveman_mode_directive')) {
24
+ db.exec('ALTER TABLE settings ADD COLUMN caveman_mode_directive TEXT');
25
+ }
26
+ }
27
+ export async function down({ context: db }) {
28
+ void db;
29
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Migration 057: Add subprocess output filter configuration to settings.
3
+ *
4
+ * Subprocess filtering intercepts Bash tool commands (git, npm, pnpm)
5
+ * inside the Claude Code subprocess via PATH shadow and filters their
6
+ * output before it enters conversation history. Disabled by default.
7
+ *
8
+ * Settings table:
9
+ * - subprocess_filter_enabled (INTEGER NOT NULL DEFAULT 0)
10
+ *
11
+ * Additive-only. No drops, no renames. Idempotent via table_info check.
12
+ */
13
+ import type { MigrationParams } from 'umzug';
14
+ import type Database from 'better-sqlite3';
15
+ export declare function up({ context: db }: MigrationParams<Database.Database>): Promise<void>;
16
+ export declare function down({ context: db }: MigrationParams<Database.Database>): Promise<void>;
17
+ //# sourceMappingURL=057-add-subprocess-filter-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"057-add-subprocess-filter-config.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/persistence/sqlite/migrations/057-add-subprocess-filter-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,wBAAsB,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAO3F;AAED,wBAAsB,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7F"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Migration 057: Add subprocess output filter configuration to settings.
3
+ *
4
+ * Subprocess filtering intercepts Bash tool commands (git, npm, pnpm)
5
+ * inside the Claude Code subprocess via PATH shadow and filters their
6
+ * output before it enters conversation history. Disabled by default.
7
+ *
8
+ * Settings table:
9
+ * - subprocess_filter_enabled (INTEGER NOT NULL DEFAULT 0)
10
+ *
11
+ * Additive-only. No drops, no renames. Idempotent via table_info check.
12
+ */
13
+ export async function up({ context: db }) {
14
+ const cols = db.pragma('table_info(settings)');
15
+ const names = new Set(cols.map((c) => c.name));
16
+ if (!names.has('subprocess_filter_enabled')) {
17
+ db.exec('ALTER TABLE settings ADD COLUMN subprocess_filter_enabled INTEGER NOT NULL DEFAULT 0');
18
+ }
19
+ }
20
+ export async function down({ context: db }) {
21
+ void db;
22
+ }
@@ -14,8 +14,9 @@ export declare class SQLitePhaseTimingRepository implements IPhaseTimingReposito
14
14
  private readonly db;
15
15
  constructor(db: Database.Database);
16
16
  save(phaseTiming: PhaseTiming): Promise<void>;
17
- update(id: string, updates: Partial<Pick<PhaseTiming, 'completedAt' | 'durationMs' | 'inputTokens' | 'outputTokens' | 'cacheCreationInputTokens' | 'cacheReadInputTokens' | 'costUsd' | 'numTurns' | 'durationApiMs' | 'exitCode' | 'errorMessage'>>): Promise<void>;
17
+ update(id: string, updates: Partial<Pick<PhaseTiming, 'completedAt' | 'durationMs' | 'inputTokens' | 'outputTokens' | 'cacheCreationInputTokens' | 'cacheReadInputTokens' | 'costUsd' | 'numTurns' | 'durationApiMs' | 'exitCode' | 'errorMessage' | 'originalTokenEstimate' | 'optimizedTokenEstimate' | 'savingsPercent' | 'capabilitiesApplied' | 'outputFilterLinesRemoved' | 'deltaContextFilesSkipped' | 'compressionRatio' | 'aliasesCreated'>>): Promise<void>;
18
18
  updateApprovalWait(id: string, updates: Partial<Pick<PhaseTiming, 'waitingApprovalAt' | 'approvalWaitMs'>>): Promise<void>;
19
+ findById(id: string): Promise<PhaseTiming | null>;
19
20
  findByRunId(agentRunId: string): Promise<PhaseTiming[]>;
20
21
  findByFeatureId(featureId: string): Promise<PhaseTiming[]>;
21
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite-phase-timing.repository.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4EAA4E,CAAC;AACzH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AA6FpE;;GAEG;AACH,qBACa,2BAA4B,YAAW,sBAAsB;IAC5D,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAE5C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA0B7C,MAAM,CACV,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CACd,IAAI,CACF,WAAW,EACT,aAAa,GACb,YAAY,GACZ,aAAa,GACb,cAAc,GACd,0BAA0B,GAC1B,sBAAsB,GACtB,SAAS,GACT,UAAU,GACV,eAAe,GACf,UAAU,GACV,cAAc,CACjB,CACF,GACA,OAAO,CAAC,IAAI,CAAC;IAsEV,kBAAkB,CACtB,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,mBAAmB,GAAG,gBAAgB,CAAC,CAAC,GAC1E,OAAO,CAAC,IAAI,CAAC;IA2BV,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IASvD,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;CAWjE"}
1
+ {"version":3,"file":"sqlite-phase-timing.repository.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4EAA4E,CAAC;AACzH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AA+HpE;;GAEG;AACH,qBACa,2BAA4B,YAAW,sBAAsB;IAC5D,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAE5C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAkC7C,MAAM,CACV,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CACd,IAAI,CACF,WAAW,EACT,aAAa,GACb,YAAY,GACZ,aAAa,GACb,cAAc,GACd,0BAA0B,GAC1B,sBAAsB,GACtB,SAAS,GACT,UAAU,GACV,eAAe,GACf,UAAU,GACV,cAAc,GACd,uBAAuB,GACvB,wBAAwB,GACxB,gBAAgB,GAChB,qBAAqB,GACrB,0BAA0B,GAC1B,0BAA0B,GAC1B,kBAAkB,GAClB,gBAAgB,CACnB,CACF,GACA,OAAO,CAAC,IAAI,CAAC;IA8GV,kBAAkB,CACtB,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,mBAAmB,GAAG,gBAAgB,CAAC,CAAC,GAC1E,OAAO,CAAC,IAAI,CAAC;IA2BV,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAWjD,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IASvD,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;CAWjE"}
@@ -36,6 +36,14 @@ function toDatabase(timing) {
36
36
  duration_api_ms: timing.durationApiMs != null ? Number(timing.durationApiMs) : null,
37
37
  exit_code: timing.exitCode ?? null,
38
38
  error_message: timing.errorMessage ?? null,
39
+ original_token_estimate: timing.originalTokenEstimate != null ? Number(timing.originalTokenEstimate) : null,
40
+ optimized_token_estimate: timing.optimizedTokenEstimate != null ? Number(timing.optimizedTokenEstimate) : null,
41
+ savings_percent: timing.savingsPercent != null ? Number(timing.savingsPercent) : null,
42
+ capabilities_applied: timing.capabilitiesApplied ?? null,
43
+ output_filter_lines_removed: timing.outputFilterLinesRemoved ?? null,
44
+ delta_context_files_skipped: timing.deltaContextFilesSkipped ?? null,
45
+ compression_ratio: timing.compressionRatio != null ? Number(timing.compressionRatio) : null,
46
+ aliases_created: timing.aliasesCreated ?? null,
39
47
  created_at: timing.createdAt instanceof Date ? timing.createdAt.getTime() : timing.createdAt,
40
48
  updated_at: timing.updatedAt instanceof Date ? timing.updatedAt.getTime() : timing.updatedAt,
41
49
  };
@@ -70,6 +78,22 @@ function fromDatabase(row) {
70
78
  ...(row.duration_api_ms !== null && { durationApiMs: BigInt(row.duration_api_ms) }),
71
79
  ...(row.exit_code !== null && { exitCode: row.exit_code }),
72
80
  ...(row.error_message !== null && { errorMessage: row.error_message }),
81
+ ...(row.original_token_estimate !== null && {
82
+ originalTokenEstimate: BigInt(row.original_token_estimate),
83
+ }),
84
+ ...(row.optimized_token_estimate !== null && {
85
+ optimizedTokenEstimate: BigInt(row.optimized_token_estimate),
86
+ }),
87
+ ...(row.savings_percent !== null && { savingsPercent: row.savings_percent }),
88
+ ...(row.capabilities_applied !== null && { capabilitiesApplied: row.capabilities_applied }),
89
+ ...(row.output_filter_lines_removed !== null && {
90
+ outputFilterLinesRemoved: row.output_filter_lines_removed,
91
+ }),
92
+ ...(row.delta_context_files_skipped !== null && {
93
+ deltaContextFilesSkipped: row.delta_context_files_skipped,
94
+ }),
95
+ ...(row.compression_ratio !== null && { compressionRatio: row.compression_ratio }),
96
+ ...(row.aliases_created !== null && { aliasesCreated: row.aliases_created }),
73
97
  };
74
98
  }
75
99
  /**
@@ -90,6 +114,10 @@ let SQLitePhaseTimingRepository = class SQLitePhaseTimingRepository {
90
114
  cache_creation_input_tokens, cache_read_input_tokens,
91
115
  cost_usd, num_turns, duration_api_ms,
92
116
  exit_code, error_message,
117
+ original_token_estimate, optimized_token_estimate,
118
+ savings_percent, capabilities_applied,
119
+ output_filter_lines_removed, delta_context_files_skipped,
120
+ compression_ratio, aliases_created,
93
121
  created_at, updated_at
94
122
  ) VALUES (
95
123
  @id, @agent_run_id, @phase, @started_at, @completed_at, @duration_ms,
@@ -98,6 +126,10 @@ let SQLitePhaseTimingRepository = class SQLitePhaseTimingRepository {
98
126
  @cache_creation_input_tokens, @cache_read_input_tokens,
99
127
  @cost_usd, @num_turns, @duration_api_ms,
100
128
  @exit_code, @error_message,
129
+ @original_token_estimate, @optimized_token_estimate,
130
+ @savings_percent, @capabilities_applied,
131
+ @output_filter_lines_removed, @delta_context_files_skipped,
132
+ @compression_ratio, @aliases_created,
101
133
  @created_at, @updated_at
102
134
  )
103
135
  `);
@@ -154,6 +186,38 @@ let SQLitePhaseTimingRepository = class SQLitePhaseTimingRepository {
154
186
  setClauses.push('error_message = @error_message');
155
187
  params.error_message = updates.errorMessage;
156
188
  }
189
+ if (updates.originalTokenEstimate !== undefined) {
190
+ setClauses.push('original_token_estimate = @original_token_estimate');
191
+ params.original_token_estimate = Number(updates.originalTokenEstimate);
192
+ }
193
+ if (updates.optimizedTokenEstimate !== undefined) {
194
+ setClauses.push('optimized_token_estimate = @optimized_token_estimate');
195
+ params.optimized_token_estimate = Number(updates.optimizedTokenEstimate);
196
+ }
197
+ if (updates.savingsPercent !== undefined) {
198
+ setClauses.push('savings_percent = @savings_percent');
199
+ params.savings_percent = Number(updates.savingsPercent);
200
+ }
201
+ if (updates.capabilitiesApplied !== undefined) {
202
+ setClauses.push('capabilities_applied = @capabilities_applied');
203
+ params.capabilities_applied = updates.capabilitiesApplied;
204
+ }
205
+ if (updates.outputFilterLinesRemoved !== undefined) {
206
+ setClauses.push('output_filter_lines_removed = @output_filter_lines_removed');
207
+ params.output_filter_lines_removed = updates.outputFilterLinesRemoved;
208
+ }
209
+ if (updates.deltaContextFilesSkipped !== undefined) {
210
+ setClauses.push('delta_context_files_skipped = @delta_context_files_skipped');
211
+ params.delta_context_files_skipped = updates.deltaContextFilesSkipped;
212
+ }
213
+ if (updates.compressionRatio !== undefined) {
214
+ setClauses.push('compression_ratio = @compression_ratio');
215
+ params.compression_ratio = Number(updates.compressionRatio);
216
+ }
217
+ if (updates.aliasesCreated !== undefined) {
218
+ setClauses.push('aliases_created = @aliases_created');
219
+ params.aliases_created = updates.aliasesCreated;
220
+ }
157
221
  const stmt = this.db.prepare(`UPDATE phase_timings SET ${setClauses.join(', ')} WHERE id = @id`);
158
222
  stmt.run(params);
159
223
  }
@@ -177,6 +241,14 @@ let SQLitePhaseTimingRepository = class SQLitePhaseTimingRepository {
177
241
  const stmt = this.db.prepare(`UPDATE phase_timings SET ${setClauses.join(', ')} WHERE id = @id`);
178
242
  stmt.run(params);
179
243
  }
244
+ async findById(id) {
245
+ const stmt = this.db.prepare('SELECT * FROM phase_timings WHERE id = ?');
246
+ const row = stmt.get(id);
247
+ if (!row) {
248
+ return null;
249
+ }
250
+ return fromDatabase(row);
251
+ }
180
252
  async findByRunId(agentRunId) {
181
253
  const stmt = this.db.prepare('SELECT * FROM phase_timings WHERE agent_run_id = ? ORDER BY created_at');
182
254
  const rows = stmt.all(agentRunId);
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite-settings.repository.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/repositories/sqlite-settings.repository.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8EAA8E,CAAC;AACxH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAOjE;;;GAGG;AACH,qBACa,wBAAyB,YAAW,mBAAmB;IACtD,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAElD;;;;;;OAMG;IACG,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAmFnD;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAgBtC;;;;;OAKG;IACG,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CA2FhD"}
1
+ {"version":3,"file":"sqlite-settings.repository.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/repositories/sqlite-settings.repository.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8EAA8E,CAAC;AACxH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAOjE;;;GAGG;AACH,qBACa,wBAAyB,YAAW,mBAAmB;IACtD,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAElD;;;;;;OAMG;IACG,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IA2FnD;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAgBtC;;;;;OAKG;IACG,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAmGhD"}
@@ -73,7 +73,11 @@ let SQLiteSettingsRepository = class SQLiteSettingsRepository {
73
73
  interactive_agent_max_concurrent_sessions,
74
74
  auto_archive_delay_minutes,
75
75
  stage_timeout_fast_implement_ms,
76
- fab_position_swapped
76
+ fab_position_swapped,
77
+ skill_injection_enabled, skill_injection_skills,
78
+ token_opt_enabled, token_opt_output_filtering,
79
+ token_opt_skill_routing, token_opt_delta_context,
80
+ token_opt_semantic_compression, token_opt_alias_compression
77
81
  ) VALUES (
78
82
  @id, @created_at, @updated_at,
79
83
  @model_analyze, @model_requirements, @model_plan, @model_implement, @model_default,
@@ -105,7 +109,11 @@ let SQLiteSettingsRepository = class SQLiteSettingsRepository {
105
109
  @interactive_agent_max_concurrent_sessions,
106
110
  @auto_archive_delay_minutes,
107
111
  @stage_timeout_fast_implement_ms,
108
- @fab_position_swapped
112
+ @fab_position_swapped,
113
+ @skill_injection_enabled, @skill_injection_skills,
114
+ @token_opt_enabled, @token_opt_output_filtering,
115
+ @token_opt_skill_routing, @token_opt_delta_context,
116
+ @token_opt_semantic_compression, @token_opt_alias_compression
109
117
  )
110
118
  `);
111
119
  // Execute with named parameters (safe from SQL injection)
@@ -211,7 +219,15 @@ let SQLiteSettingsRepository = class SQLiteSettingsRepository {
211
219
  interactive_agent_max_concurrent_sessions = @interactive_agent_max_concurrent_sessions,
212
220
  auto_archive_delay_minutes = @auto_archive_delay_minutes,
213
221
  stage_timeout_fast_implement_ms = @stage_timeout_fast_implement_ms,
214
- fab_position_swapped = @fab_position_swapped
222
+ fab_position_swapped = @fab_position_swapped,
223
+ skill_injection_enabled = @skill_injection_enabled,
224
+ skill_injection_skills = @skill_injection_skills,
225
+ token_opt_enabled = @token_opt_enabled,
226
+ token_opt_output_filtering = @token_opt_output_filtering,
227
+ token_opt_skill_routing = @token_opt_skill_routing,
228
+ token_opt_delta_context = @token_opt_delta_context,
229
+ token_opt_semantic_compression = @token_opt_semantic_compression,
230
+ token_opt_alias_compression = @token_opt_alias_compression
215
231
  WHERE id = @id
216
232
  `);
217
233
  // Execute with named parameters (safe from SQL injection)
@@ -43,7 +43,7 @@ export declare function createAnalyzeRepositoryGraph(executor: IAgentExecutor, c
43
43
  repositoryPath?: string | undefined;
44
44
  analysisMarkdown?: string | undefined;
45
45
  error?: string | undefined;
46
- }, "__start__" | "analyze", {
46
+ }, "analyze" | "__start__", {
47
47
  repositoryPath: {
48
48
  (): import("@langchain/langgraph").LastValue<string>;
49
49
  (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
@@ -1 +1 @@
1
- {"version":3,"file":"claude-code-executor.service.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EAEpB,yBAAyB,EAC1B,MAAM,4EAA4E,CAAC;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAajD;;;GAGG;AACH,qBAAa,yBAA0B,YAAW,cAAc;IAMlD,OAAO,CAAC,QAAQ,CAAC,KAAK;IALlC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAA8B;IAE3D,4EAA4E;IAC5E,OAAO,CAAC,MAAM,CAAS;gBAEM,KAAK,EAAE,aAAa;IAEjD,4EAA4E;IAC5E,OAAO,CAAC,GAAG;IAML,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAoHtF,aAAa,CAClB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,qBAAqB,GAC9B,aAAa,CAAC,yBAAyB,CAAC;IAgG3C;;;OAGG;IACH,OAAO,CAAC,cAAc;IA0CtB,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO;IAI/C,OAAO,CAAC,SAAS;IAejB,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,iBAAiB;IAyBzB,OAAO,CAAC,eAAe;IA6BvB;;;OAGG;IACH,OAAO,CAAC,YAAY;IAqBpB,OAAO,CAAC,eAAe;CAkExB"}
1
+ {"version":3,"file":"claude-code-executor.service.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EAEpB,yBAAyB,EAC1B,MAAM,4EAA4E,CAAC;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAajD;;;GAGG;AACH,qBAAa,yBAA0B,YAAW,cAAc;IAMlD,OAAO,CAAC,QAAQ,CAAC,KAAK;IALlC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAA8B;IAE3D,4EAA4E;IAC5E,OAAO,CAAC,MAAM,CAAS;gBAEM,KAAK,EAAE,aAAa;IAEjD,4EAA4E;IAC5E,OAAO,CAAC,GAAG;IAML,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAoHtF,aAAa,CAClB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,qBAAqB,GAC9B,aAAa,CAAC,yBAAyB,CAAC;IAgG3C;;;OAGG;IACH,OAAO,CAAC,cAAc;IA0CtB,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO;IAI/C,OAAO,CAAC,SAAS;IAejB,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,iBAAiB;IAoCzB,OAAO,CAAC,eAAe;IA6BvB;;;OAGG;IACH,OAAO,CAAC,YAAY;IAqBpB,OAAO,CAAC,eAAe;CAkExB"}
@@ -318,6 +318,15 @@ export class ClaudeCodeExecutorService {
318
318
  // is invoked from within a Claude Code session. The claude CLI checks for
319
319
  // this variable and refuses to start if it's set.
320
320
  const { CLAUDECODE: _, ...cleanEnv } = process.env;
321
+ // Subprocess output filter — prepend the shim directory to PATH so
322
+ // commands like `git`, `npm`, `pnpm` are intercepted by shep-filter
323
+ // wrapper scripts. The shim dir is passed via options so this
324
+ // executor stays settings-agnostic (the caller resolves the setting).
325
+ if (options?.subprocessFilterShimDir) {
326
+ const shimDir = options.subprocessFilterShimDir;
327
+ cleanEnv.PATH = `${shimDir}:${cleanEnv.PATH ?? ''}`;
328
+ cleanEnv.SHEP_FILTER_SHIM_DIR = shimDir;
329
+ }
321
330
  spawnOpts.env = cleanEnv;
322
331
  return spawnOpts;
323
332
  }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Caveman mode — default system-prompt directive for Claude Code.
3
+ *
4
+ * Injected via `claude --append-system-prompt <text>` so it persists
5
+ * across every turn in the session. Purpose: shrink the agent's own
6
+ * output AND shrink the accumulated conversation history that gets
7
+ * re-sent on every subsequent turn. Savings compound across turns.
8
+ *
9
+ * The directive itself is deliberately terse (practicing what it
10
+ * preaches) so the system-prompt overhead is minimal — ~300 tokens
11
+ * of directive in exchange for compounding savings across 30+ turns
12
+ * of session history is a strongly net-positive trade.
13
+ *
14
+ * NOT applied to the `merge` node even when caveman mode is enabled.
15
+ * Merge writes commit messages, PR titles, and PR bodies that humans
16
+ * read; caveman style there produces unreadable "ui add star count.
17
+ * test pass. push." commits. The exemption happens at the enforcement
18
+ * site in `buildExecutorOptions`, not here.
19
+ */
20
+ export declare const DEFAULT_CAVEMAN_DIRECTIVE = "Respond like smart caveman. Cut all filler, keep technical substance.\n- Drop articles (a, an, the), filler (just, really, basically, actually).\n- Drop pleasantries (sure, certainly, happy to).\n- No hedging. Fragments fine. Short synonyms.\n- Technical terms stay exact. Code blocks unchanged.\n- Pattern: [thing] [action] [reason]. [next step].";
21
+ /**
22
+ * Nodes that are ALWAYS exempt from the caveman directive, regardless of
23
+ * user settings. These nodes produce output that humans read directly
24
+ * (commit messages, PR bodies, release notes), so terse style is actively
25
+ * harmful there.
26
+ *
27
+ * Add a node name to this set to exempt it. Do NOT remove `merge`.
28
+ */
29
+ export declare const CAVEMAN_EXEMPT_NODES: ReadonlySet<string>;
30
+ /**
31
+ * Resolve the effective caveman directive for a given node, or undefined
32
+ * when caveman mode should not apply. Pure function; no I/O.
33
+ *
34
+ * @param nodeName - The current graph node name
35
+ * @param enabled - Whether caveman mode is enabled in settings
36
+ * @param customDirective - Optional user override for the directive text
37
+ * @returns The directive string to pass to `--append-system-prompt`, or
38
+ * undefined to skip the flag entirely
39
+ */
40
+ export declare function resolveCavemanDirective(nodeName: string, enabled: boolean, customDirective?: string): string | undefined;
41
+ //# sourceMappingURL=caveman-directive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"caveman-directive.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/caveman-directive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,yBAAyB,gWAKa,CAAC;AAEpD;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAAsB,CAAC;AAE5E;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,OAAO,EAChB,eAAe,CAAC,EAAE,MAAM,GACvB,MAAM,GAAG,SAAS,CAIpB"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Caveman mode — default system-prompt directive for Claude Code.
3
+ *
4
+ * Injected via `claude --append-system-prompt <text>` so it persists
5
+ * across every turn in the session. Purpose: shrink the agent's own
6
+ * output AND shrink the accumulated conversation history that gets
7
+ * re-sent on every subsequent turn. Savings compound across turns.
8
+ *
9
+ * The directive itself is deliberately terse (practicing what it
10
+ * preaches) so the system-prompt overhead is minimal — ~300 tokens
11
+ * of directive in exchange for compounding savings across 30+ turns
12
+ * of session history is a strongly net-positive trade.
13
+ *
14
+ * NOT applied to the `merge` node even when caveman mode is enabled.
15
+ * Merge writes commit messages, PR titles, and PR bodies that humans
16
+ * read; caveman style there produces unreadable "ui add star count.
17
+ * test pass. push." commits. The exemption happens at the enforcement
18
+ * site in `buildExecutorOptions`, not here.
19
+ */
20
+ export const DEFAULT_CAVEMAN_DIRECTIVE = `Respond like smart caveman. Cut all filler, keep technical substance.
21
+ - Drop articles (a, an, the), filler (just, really, basically, actually).
22
+ - Drop pleasantries (sure, certainly, happy to).
23
+ - No hedging. Fragments fine. Short synonyms.
24
+ - Technical terms stay exact. Code blocks unchanged.
25
+ - Pattern: [thing] [action] [reason]. [next step].`;
26
+ /**
27
+ * Nodes that are ALWAYS exempt from the caveman directive, regardless of
28
+ * user settings. These nodes produce output that humans read directly
29
+ * (commit messages, PR bodies, release notes), so terse style is actively
30
+ * harmful there.
31
+ *
32
+ * Add a node name to this set to exempt it. Do NOT remove `merge`.
33
+ */
34
+ export const CAVEMAN_EXEMPT_NODES = new Set(['merge']);
35
+ /**
36
+ * Resolve the effective caveman directive for a given node, or undefined
37
+ * when caveman mode should not apply. Pure function; no I/O.
38
+ *
39
+ * @param nodeName - The current graph node name
40
+ * @param enabled - Whether caveman mode is enabled in settings
41
+ * @param customDirective - Optional user override for the directive text
42
+ * @returns The directive string to pass to `--append-system-prompt`, or
43
+ * undefined to skip the flag entirely
44
+ */
45
+ export function resolveCavemanDirective(nodeName, enabled, customDirective) {
46
+ if (!enabled)
47
+ return undefined;
48
+ if (CAVEMAN_EXEMPT_NODES.has(nodeName))
49
+ return undefined;
50
+ return customDirective ?? DEFAULT_CAVEMAN_DIRECTIVE;
51
+ }
@@ -69,6 +69,7 @@ export declare function createFastFeatureAgentGraph(depsOrExecutor: FastFeatureA
69
69
  ciFixAttempts: number;
70
70
  ciFixHistory: import("../../../../domain/index.js").CiFixRecord[];
71
71
  ciFixStatus: "success" | "timeout" | "idle" | "watching" | "fixing" | "exhausted";
72
+ specFileHashes: Record<string, string>;
72
73
  }, {
73
74
  featureId?: string | undefined;
74
75
  repositoryPath?: string | undefined;
@@ -102,7 +103,8 @@ export declare function createFastFeatureAgentGraph(depsOrExecutor: FastFeatureA
102
103
  ciFixAttempts?: number | undefined;
103
104
  ciFixHistory?: import("../../../../domain/index.js").CiFixRecord[] | undefined;
104
105
  ciFixStatus?: "success" | "timeout" | "idle" | "watching" | "fixing" | "exhausted" | undefined;
105
- }, "__start__" | "fast-implement", {
106
+ specFileHashes?: Record<string, string> | undefined;
107
+ }, "fast-implement" | "__start__", {
106
108
  featureId: {
107
109
  (): import("@langchain/langgraph").LastValue<string>;
108
110
  (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
@@ -155,6 +157,7 @@ export declare function createFastFeatureAgentGraph(depsOrExecutor: FastFeatureA
155
157
  ciFixAttempts: import("@langchain/langgraph").BinaryOperatorAggregate<number, number>;
156
158
  ciFixHistory: import("@langchain/langgraph").BinaryOperatorAggregate<import("../../../../domain/index.js").CiFixRecord[], import("../../../../domain/index.js").CiFixRecord[]>;
157
159
  ciFixStatus: import("@langchain/langgraph").BinaryOperatorAggregate<"success" | "timeout" | "idle" | "watching" | "fixing" | "exhausted", "success" | "timeout" | "idle" | "watching" | "fixing" | "exhausted">;
160
+ specFileHashes: import("@langchain/langgraph").BinaryOperatorAggregate<Record<string, string>, Record<string, string>>;
158
161
  }, {
159
162
  featureId: {
160
163
  (): import("@langchain/langgraph").LastValue<string>;
@@ -208,6 +211,7 @@ export declare function createFastFeatureAgentGraph(depsOrExecutor: FastFeatureA
208
211
  ciFixAttempts: import("@langchain/langgraph").BinaryOperatorAggregate<number, number>;
209
212
  ciFixHistory: import("@langchain/langgraph").BinaryOperatorAggregate<import("../../../../domain/index.js").CiFixRecord[], import("../../../../domain/index.js").CiFixRecord[]>;
210
213
  ciFixStatus: import("@langchain/langgraph").BinaryOperatorAggregate<"success" | "timeout" | "idle" | "watching" | "fixing" | "exhausted", "success" | "timeout" | "idle" | "watching" | "fixing" | "exhausted">;
214
+ specFileHashes: import("@langchain/langgraph").BinaryOperatorAggregate<Record<string, string>, Record<string, string>>;
211
215
  }, import("@langchain/langgraph").StateDefinition, {
212
216
  "fast-implement": Partial<import("@langchain/langgraph").StateType<{
213
217
  featureId: {
@@ -262,6 +266,7 @@ export declare function createFastFeatureAgentGraph(depsOrExecutor: FastFeatureA
262
266
  ciFixAttempts: import("@langchain/langgraph").BinaryOperatorAggregate<number, number>;
263
267
  ciFixHistory: import("@langchain/langgraph").BinaryOperatorAggregate<import("../../../../domain/index.js").CiFixRecord[], import("../../../../domain/index.js").CiFixRecord[]>;
264
268
  ciFixStatus: import("@langchain/langgraph").BinaryOperatorAggregate<"success" | "timeout" | "idle" | "watching" | "fixing" | "exhausted", "success" | "timeout" | "idle" | "watching" | "fixing" | "exhausted">;
269
+ specFileHashes: import("@langchain/langgraph").BinaryOperatorAggregate<Record<string, string>, Record<string, string>>;
265
270
  }>>;
266
271
  }, unknown, unknown>;
267
272
  //# sourceMappingURL=fast-feature-agent-graph.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fast-feature-agent-graph.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAA0B,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AAGpG,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAGlF,OAAO,EAAE,sBAAsB,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE5E;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,cAAc,CAAC;IACzB,aAAa,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;CACjD;AAkBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,CACzC,cAAc,EAAE,yBAAyB,GAAG,cAAc,EAC1D,YAAY,CAAC,EAAE,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA6BnC"}
1
+ {"version":3,"file":"fast-feature-agent-graph.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAA0B,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AAGpG,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAGlF,OAAO,EAAE,sBAAsB,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE5E;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,cAAc,CAAC;IACzB,aAAa,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;CACjD;AAkBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,CACzC,cAAc,EAAE,yBAAyB,GAAG,cAAc,EAC1D,YAAY,CAAC,EAAE,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA6BnC"}