claude-code-workflow 7.2.5 → 7.2.7

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 (235) hide show
  1. package/.claude/commands/workflow/analyze-with-file.md +11 -10
  2. package/.claude/skills/ccw-help/command.json +3 -3
  3. package/.claude/skills/ccw-help/index/all-commands.json +3 -3
  4. package/.claude/skills/ccw-help/index/by-category.json +3 -3
  5. package/.claude/skills/ccw-help/index/by-use-case.json +3 -3
  6. package/.claude/skills/skill-iter-tune/SKILL.md +382 -0
  7. package/.claude/skills/skill-iter-tune/phases/01-setup.md +144 -0
  8. package/.claude/skills/skill-iter-tune/phases/02-execute.md +292 -0
  9. package/.claude/skills/skill-iter-tune/phases/03-evaluate.md +312 -0
  10. package/.claude/skills/skill-iter-tune/phases/04-improve.md +186 -0
  11. package/.claude/skills/skill-iter-tune/phases/05-report.md +166 -0
  12. package/.claude/skills/skill-iter-tune/specs/evaluation-criteria.md +63 -0
  13. package/.claude/skills/skill-iter-tune/templates/eval-prompt.md +134 -0
  14. package/.claude/skills/skill-iter-tune/templates/execute-prompt.md +97 -0
  15. package/.claude/skills/team-roadmap-dev/SKILL.md +1 -1
  16. package/.claude/skills/team-roadmap-dev/roles/coordinator/role.md +1 -1
  17. package/.claude/skills/team-roadmap-dev/specs/team-config.json +1 -1
  18. package/ccw/dist/commands/install.d.ts.map +1 -1
  19. package/ccw/dist/commands/install.js +11 -9
  20. package/ccw/dist/commands/install.js.map +1 -1
  21. package/ccw/dist/core/routes/codexlens/config-handlers.d.ts.map +1 -1
  22. package/ccw/dist/core/routes/codexlens/config-handlers.js +4 -0
  23. package/ccw/dist/core/routes/codexlens/config-handlers.js.map +1 -1
  24. package/ccw/dist/mcp-server/index.js +85 -8
  25. package/ccw/dist/mcp-server/index.js.map +1 -1
  26. package/ccw/dist/tools/cli-executor-core.d.ts.map +1 -1
  27. package/ccw/dist/tools/cli-executor-core.js +0 -25
  28. package/ccw/dist/tools/cli-executor-core.js.map +1 -1
  29. package/ccw/dist/tools/cli-executor-state.d.ts.map +1 -1
  30. package/ccw/dist/tools/cli-executor-state.js +0 -31
  31. package/ccw/dist/tools/cli-executor-state.js.map +1 -1
  32. package/ccw/dist/tools/cli-history-store.d.ts.map +1 -1
  33. package/ccw/dist/tools/cli-history-store.js +1 -30
  34. package/ccw/dist/tools/cli-history-store.js.map +1 -1
  35. package/ccw/dist/tools/smart-search.d.ts +72 -1
  36. package/ccw/dist/tools/smart-search.d.ts.map +1 -1
  37. package/ccw/dist/tools/smart-search.js +726 -117
  38. package/ccw/dist/tools/smart-search.js.map +1 -1
  39. package/ccw/frontend/dist/assets/{AlertDialog-CFGtc76Y.js → AlertDialog-CSZq4WHZ.js} +2 -2
  40. package/ccw/frontend/dist/assets/{AlertDialog-CFGtc76Y.js.map → AlertDialog-CSZq4WHZ.js.map} +1 -1
  41. package/ccw/frontend/dist/assets/{AnalysisPage-Duxia_dG.js → AnalysisPage-DVDvLHqI.js} +2 -2
  42. package/ccw/frontend/dist/assets/{AnalysisPage-Duxia_dG.js.map → AnalysisPage-DVDvLHqI.js.map} +1 -1
  43. package/ccw/frontend/dist/assets/{ApiSettingsPage-CU9hesAE.js → ApiSettingsPage-D69j8mI6.js} +2 -2
  44. package/ccw/frontend/dist/assets/{ApiSettingsPage-CU9hesAE.js.map → ApiSettingsPage-D69j8mI6.js.map} +1 -1
  45. package/ccw/frontend/dist/assets/{CliModeToggle-DcdOFSvM.js → CliModeToggle-fF9xHeGR.js} +2 -2
  46. package/ccw/frontend/dist/assets/{CliModeToggle-DcdOFSvM.js.map → CliModeToggle-fF9xHeGR.js.map} +1 -1
  47. package/ccw/frontend/dist/assets/{CliSessionSharePage-oKN-GRIT.js → CliSessionSharePage-Ce8tOQNx.js} +2 -2
  48. package/ccw/frontend/dist/assets/{CliSessionSharePage-oKN-GRIT.js.map → CliSessionSharePage-Ce8tOQNx.js.map} +1 -1
  49. package/ccw/frontend/dist/assets/{CliViewerPage-_wUoHaY-.js → CliViewerPage-Bsp1zmfD.js} +2 -2
  50. package/ccw/frontend/dist/assets/{CliViewerPage-_wUoHaY-.js.map → CliViewerPage-Bsp1zmfD.js.map} +1 -1
  51. package/ccw/frontend/dist/assets/{CodexLensManagerPage-ClPNashJ.js → CodexLensManagerPage-DUMzbrr9.js} +9 -9
  52. package/ccw/frontend/dist/assets/CodexLensManagerPage-DUMzbrr9.js.map +1 -0
  53. package/ccw/frontend/dist/assets/{Collapsible-Dladh9Eu.js → Collapsible-I5pixbHb.js} +2 -2
  54. package/ccw/frontend/dist/assets/{Collapsible-Dladh9Eu.js.map → Collapsible-I5pixbHb.js.map} +1 -1
  55. package/ccw/frontend/dist/assets/{CommandsManagerPage-B6DBb_Ew.js → CommandsManagerPage-BH2xukdx.js} +2 -2
  56. package/ccw/frontend/dist/assets/{CommandsManagerPage-B6DBb_Ew.js.map → CommandsManagerPage-BH2xukdx.js.map} +1 -1
  57. package/ccw/frontend/dist/assets/{DeepWikiPage-CDA3xm3R.js → DeepWikiPage-D41ccWzY.js} +2 -2
  58. package/ccw/frontend/dist/assets/{DeepWikiPage-CDA3xm3R.js.map → DeepWikiPage-D41ccWzY.js.map} +1 -1
  59. package/ccw/frontend/dist/assets/{EndpointsPage-Bu7iU0Wy.js → EndpointsPage-5a8jfEWN.js} +2 -2
  60. package/ccw/frontend/dist/assets/{EndpointsPage-Bu7iU0Wy.js.map → EndpointsPage-5a8jfEWN.js.map} +1 -1
  61. package/ccw/frontend/dist/assets/{ExplorerPage-xim2cboZ.js → ExplorerPage-YCqIOu1v.js} +2 -2
  62. package/ccw/frontend/dist/assets/{ExplorerPage-xim2cboZ.js.map → ExplorerPage-YCqIOu1v.js.map} +1 -1
  63. package/ccw/frontend/dist/assets/{FixSessionPage-BTFYoFQF.js → FixSessionPage-wK1s4kbo.js} +2 -2
  64. package/ccw/frontend/dist/assets/{FixSessionPage-BTFYoFQF.js.map → FixSessionPage-wK1s4kbo.js.map} +1 -1
  65. package/ccw/frontend/dist/assets/{FloatingFileBrowser-B30ANzTJ.js → FloatingFileBrowser-B1U6uk_5.js} +2 -2
  66. package/ccw/frontend/dist/assets/{FloatingFileBrowser-B30ANzTJ.js.map → FloatingFileBrowser-B1U6uk_5.js.map} +1 -1
  67. package/ccw/frontend/dist/assets/{FloatingPanel-Ds84B7Ob.js → FloatingPanel-D51p5jNy.js} +2 -2
  68. package/ccw/frontend/dist/assets/{FloatingPanel-Ds84B7Ob.js.map → FloatingPanel-D51p5jNy.js.map} +1 -1
  69. package/ccw/frontend/dist/assets/{GraphExplorerPage-DJ4YnFOQ.js → GraphExplorerPage-DpIWrpWH.js} +2 -2
  70. package/ccw/frontend/dist/assets/{GraphExplorerPage-DJ4YnFOQ.js.map → GraphExplorerPage-DpIWrpWH.js.map} +1 -1
  71. package/ccw/frontend/dist/assets/{HistoryPage-rzLVsw11.js → HistoryPage-C09lyJGN.js} +2 -2
  72. package/ccw/frontend/dist/assets/{HistoryPage-rzLVsw11.js.map → HistoryPage-C09lyJGN.js.map} +1 -1
  73. package/ccw/frontend/dist/assets/{HookManagerPage-DizO_dCP.js → HookManagerPage-CFBe8F_G.js} +2 -2
  74. package/ccw/frontend/dist/assets/{HookManagerPage-DizO_dCP.js.map → HookManagerPage-CFBe8F_G.js.map} +1 -1
  75. package/ccw/frontend/dist/assets/{InstallationsPage-BFamuE4y.js → InstallationsPage-qt7NxnsB.js} +2 -2
  76. package/ccw/frontend/dist/assets/{InstallationsPage-BFamuE4y.js.map → InstallationsPage-qt7NxnsB.js.map} +1 -1
  77. package/ccw/frontend/dist/assets/{IssueHubPage-DHwQWuUc.js → IssueHubPage-CHol1-Ap.js} +2 -2
  78. package/ccw/frontend/dist/assets/{IssueHubPage-DHwQWuUc.js.map → IssueHubPage-CHol1-Ap.js.map} +1 -1
  79. package/ccw/frontend/dist/assets/{LiteTasksPage-DMDkG7pi.js → LiteTasksPage-jH00SLnZ.js} +2 -2
  80. package/ccw/frontend/dist/assets/{LiteTasksPage-DMDkG7pi.js.map → LiteTasksPage-jH00SLnZ.js.map} +1 -1
  81. package/ccw/frontend/dist/assets/{McpManagerPage-CS2v_1OG.js → McpManagerPage-BS-HgeQJ.js} +11 -11
  82. package/ccw/frontend/dist/assets/McpManagerPage-BS-HgeQJ.js.map +1 -0
  83. package/ccw/frontend/dist/assets/{MemoryPage-DhYPE-VC.js → MemoryPage-1UahrmRX.js} +2 -2
  84. package/ccw/frontend/dist/assets/{MemoryPage-DhYPE-VC.js.map → MemoryPage-1UahrmRX.js.map} +1 -1
  85. package/ccw/frontend/dist/assets/{NotFoundPage-BLmC7-ot.js → NotFoundPage-5FVm_IkS.js} +2 -2
  86. package/ccw/frontend/dist/assets/{NotFoundPage-BLmC7-ot.js.map → NotFoundPage-5FVm_IkS.js.map} +1 -1
  87. package/ccw/frontend/dist/assets/{OrchestratorPage-1jzSUFZW.js → OrchestratorPage-ThBG24Gg.js} +2 -2
  88. package/ccw/frontend/dist/assets/{OrchestratorPage-1jzSUFZW.js.map → OrchestratorPage-ThBG24Gg.js.map} +1 -1
  89. package/ccw/frontend/dist/assets/{ProjectOverviewPage-gWuAj-Cn.js → ProjectOverviewPage-CrmW0IxI.js} +2 -2
  90. package/ccw/frontend/dist/assets/{ProjectOverviewPage-gWuAj-Cn.js.map → ProjectOverviewPage-CrmW0IxI.js.map} +1 -1
  91. package/ccw/frontend/dist/assets/{PromptHistoryPage-q7ySVNHM.js → PromptHistoryPage-1cCGwS3s.js} +2 -2
  92. package/ccw/frontend/dist/assets/{PromptHistoryPage-q7ySVNHM.js.map → PromptHistoryPage-1cCGwS3s.js.map} +1 -1
  93. package/ccw/frontend/dist/assets/{ReviewSessionPage-DX1uT_nH.js → ReviewSessionPage-DxiEc9HK.js} +2 -2
  94. package/ccw/frontend/dist/assets/{ReviewSessionPage-DX1uT_nH.js.map → ReviewSessionPage-DxiEc9HK.js.map} +1 -1
  95. package/ccw/frontend/dist/assets/{RulesManagerPage-Bg6T5W-W.js → RulesManagerPage-BpplliZF.js} +2 -2
  96. package/ccw/frontend/dist/assets/{RulesManagerPage-Bg6T5W-W.js.map → RulesManagerPage-BpplliZF.js.map} +1 -1
  97. package/ccw/frontend/dist/assets/{SessionDetailPage-C_ig6JSh.js → SessionDetailPage-crDIiysh.js} +2 -2
  98. package/ccw/frontend/dist/assets/{SessionDetailPage-C_ig6JSh.js.map → SessionDetailPage-crDIiysh.js.map} +1 -1
  99. package/ccw/frontend/dist/assets/{SessionsPage-BENFqFDn.js → SessionsPage-DThweYY8.js} +2 -2
  100. package/ccw/frontend/dist/assets/{SessionsPage-BENFqFDn.js.map → SessionsPage-DThweYY8.js.map} +1 -1
  101. package/ccw/frontend/dist/assets/{SettingsPage-2c-oTxfz.js → SettingsPage-OCdOz5-z.js} +4 -4
  102. package/ccw/frontend/dist/assets/{SettingsPage-2c-oTxfz.js.map → SettingsPage-OCdOz5-z.js.map} +1 -1
  103. package/ccw/frontend/dist/assets/{SkillsManagerPage-GLo6DXnt.js → SkillsManagerPage-BJd3bK1G.js} +2 -2
  104. package/ccw/frontend/dist/assets/{SkillsManagerPage-GLo6DXnt.js.map → SkillsManagerPage-BJd3bK1G.js.map} +1 -1
  105. package/ccw/frontend/dist/assets/{SpecsSettingsPage-CRqMV90p.js → SpecsSettingsPage-BAWL2cpO.js} +2 -2
  106. package/ccw/frontend/dist/assets/{SpecsSettingsPage-CRqMV90p.js.map → SpecsSettingsPage-BAWL2cpO.js.map} +1 -1
  107. package/ccw/frontend/dist/assets/{Switch-vlMavMRD.js → Switch-w0I3JCcC.js} +2 -2
  108. package/ccw/frontend/dist/assets/{Switch-vlMavMRD.js.map → Switch-w0I3JCcC.js.map} +1 -1
  109. package/ccw/frontend/dist/assets/{TabsNavigation-CLKz7pWP.js → TabsNavigation-jhUge9YV.js} +2 -2
  110. package/ccw/frontend/dist/assets/{TabsNavigation-CLKz7pWP.js.map → TabsNavigation-jhUge9YV.js.map} +1 -1
  111. package/ccw/frontend/dist/assets/{TaskDrawer-BAFvNqF8.js → TaskDrawer-APWpZulm.js} +2 -2
  112. package/ccw/frontend/dist/assets/{TaskDrawer-BAFvNqF8.js.map → TaskDrawer-APWpZulm.js.map} +1 -1
  113. package/ccw/frontend/dist/assets/{TeamPage-C2IsDkAv.js → TeamPage-8OnLsAfJ.js} +2 -2
  114. package/ccw/frontend/dist/assets/{TeamPage-C2IsDkAv.js.map → TeamPage-8OnLsAfJ.js.map} +1 -1
  115. package/ccw/frontend/dist/assets/{TerminalDashboardPage-mgS-iKDm.js → TerminalDashboardPage-Be1hcN4p.js} +2 -2
  116. package/ccw/frontend/dist/assets/{TerminalDashboardPage-mgS-iKDm.js.map → TerminalDashboardPage-Be1hcN4p.js.map} +1 -1
  117. package/ccw/frontend/dist/assets/{archive-CxxK_YIp.js → archive-Bo1tC9yo.js} +2 -2
  118. package/ccw/frontend/dist/assets/{archive-CxxK_YIp.js.map → archive-Bo1tC9yo.js.map} +1 -1
  119. package/ccw/frontend/dist/assets/{archive-restore-DZsrBaeG.js → archive-restore-DYx41yLJ.js} +2 -2
  120. package/ccw/frontend/dist/assets/{archive-restore-DZsrBaeG.js.map → archive-restore-DYx41yLJ.js.map} +1 -1
  121. package/ccw/frontend/dist/assets/{arrow-right-BotRHOhr.js → arrow-right-C6pOqWF1.js} +2 -2
  122. package/ccw/frontend/dist/assets/{arrow-right-BotRHOhr.js.map → arrow-right-C6pOqWF1.js.map} +1 -1
  123. package/ccw/frontend/dist/assets/{bookmark-plus-C0MWZ3S9.js → bookmark-plus-4Qpa6hMJ.js} +2 -2
  124. package/ccw/frontend/dist/assets/{bookmark-plus-C0MWZ3S9.js.map → bookmark-plus-4Qpa6hMJ.js.map} +1 -1
  125. package/ccw/frontend/dist/assets/{bot-BcHFJXqD.js → bot-HXJTmx8r.js} +2 -2
  126. package/ccw/frontend/dist/assets/{bot-BcHFJXqD.js.map → bot-HXJTmx8r.js.map} +1 -1
  127. package/ccw/frontend/dist/assets/{braces-D_p0IZhP.js → braces-Dj2IdY7I.js} +2 -2
  128. package/ccw/frontend/dist/assets/{braces-D_p0IZhP.js.map → braces-Dj2IdY7I.js.map} +1 -1
  129. package/ccw/frontend/dist/assets/{circle-stop-Bt634NUt.js → circle-stop-M29TJKHc.js} +2 -2
  130. package/ccw/frontend/dist/assets/{circle-stop-Bt634NUt.js.map → circle-stop-M29TJKHc.js.map} +1 -1
  131. package/ccw/frontend/dist/assets/{cpu-DjeGKtvT.js → cpu-DX15mzMT.js} +2 -2
  132. package/ccw/frontend/dist/assets/{cpu-DjeGKtvT.js.map → cpu-DX15mzMT.js.map} +1 -1
  133. package/ccw/frontend/dist/assets/{ellipsis-vertical-BmNPuatq.js → ellipsis-vertical-Fs6bysWx.js} +2 -2
  134. package/ccw/frontend/dist/assets/{ellipsis-vertical-BmNPuatq.js.map → ellipsis-vertical-Fs6bysWx.js.map} +1 -1
  135. package/ccw/frontend/dist/assets/{eye-B0-xkP67.js → eye-D6BRlJ1r.js} +2 -2
  136. package/ccw/frontend/dist/assets/{eye-B0-xkP67.js.map → eye-D6BRlJ1r.js.map} +1 -1
  137. package/ccw/frontend/dist/assets/{eye-off-Bz0Fkli3.js → eye-off-DjbIj5iN.js} +2 -2
  138. package/ccw/frontend/dist/assets/{eye-off-Bz0Fkli3.js.map → eye-off-DjbIj5iN.js.map} +1 -1
  139. package/ccw/frontend/dist/assets/{file-json-PUAS4vBm.js → file-json-kg4Lid-H.js} +2 -2
  140. package/ccw/frontend/dist/assets/{file-json-PUAS4vBm.js.map → file-json-kg4Lid-H.js.map} +1 -1
  141. package/ccw/frontend/dist/assets/{file-text-BMeW5-Sb.js → file-text-BMy5pXNV.js} +2 -2
  142. package/ccw/frontend/dist/assets/{file-text-BMeW5-Sb.js.map → file-text-BMy5pXNV.js.map} +1 -1
  143. package/ccw/frontend/dist/assets/{filter-B4wgMvwi.js → filter-BTN-lUUb.js} +2 -2
  144. package/ccw/frontend/dist/assets/{filter-B4wgMvwi.js.map → filter-BTN-lUUb.js.map} +1 -1
  145. package/ccw/frontend/dist/assets/{folder-BSHjjjND.js → folder-ChYtty7V.js} +2 -2
  146. package/ccw/frontend/dist/assets/{folder-BSHjjjND.js.map → folder-ChYtty7V.js.map} +1 -1
  147. package/ccw/frontend/dist/assets/{gauge-7VRNEl22.js → gauge-C0VJbjRb.js} +2 -2
  148. package/ccw/frontend/dist/assets/{gauge-7VRNEl22.js.map → gauge-C0VJbjRb.js.map} +1 -1
  149. package/ccw/frontend/dist/assets/{globe-PvVHBjbW.js → globe-DbNfDXnv.js} +2 -2
  150. package/ccw/frontend/dist/assets/{globe-PvVHBjbW.js.map → globe-DbNfDXnv.js.map} +1 -1
  151. package/ccw/frontend/dist/assets/{grid-3x3-CsmmDlhN.js → grid-3x3-xWcpBNxo.js} +2 -2
  152. package/ccw/frontend/dist/assets/{grid-3x3-CsmmDlhN.js.map → grid-3x3-xWcpBNxo.js.map} +1 -1
  153. package/ccw/frontend/dist/assets/{hard-drive-D88EZgTY.js → hard-drive-BTACzgUO.js} +2 -2
  154. package/ccw/frontend/dist/assets/{hard-drive-D88EZgTY.js.map → hard-drive-BTACzgUO.js.map} +1 -1
  155. package/ccw/frontend/dist/assets/{hash-CZpNRWqt.js → hash-B0dYlmyB.js} +2 -2
  156. package/ccw/frontend/dist/assets/{hash-CZpNRWqt.js.map → hash-B0dYlmyB.js.map} +1 -1
  157. package/ccw/frontend/dist/assets/{history-DxN1mopa.js → history-CRRLu6ck.js} +2 -2
  158. package/ccw/frontend/dist/assets/{history-DxN1mopa.js.map → history-CRRLu6ck.js.map} +1 -1
  159. package/ccw/frontend/dist/assets/{index-BzGEkwIf.js → index-BJIIo0B3.js} +2 -2
  160. package/ccw/frontend/dist/assets/{index-BzGEkwIf.js.map → index-BJIIo0B3.js.map} +1 -1
  161. package/ccw/frontend/dist/assets/{index-DlcRFzFq.js → index-BP-D3Wv6.js} +2 -2
  162. package/ccw/frontend/dist/assets/{index-DlcRFzFq.js.map → index-BP-D3Wv6.js.map} +1 -1
  163. package/ccw/frontend/dist/assets/{index-BUiq2PUK.js → index-B_QzEioU.js} +2 -2
  164. package/ccw/frontend/dist/assets/{index-BUiq2PUK.js.map → index-B_QzEioU.js.map} +1 -1
  165. package/ccw/frontend/dist/assets/{index-C04xeBGC.js → index-BpoRYgiq.js} +3 -3
  166. package/ccw/frontend/dist/assets/{index-C04xeBGC.js.map → index-BpoRYgiq.js.map} +1 -1
  167. package/ccw/frontend/dist/assets/{index-CIoWWkDn.js → index-CeESlrZb.js} +8 -8
  168. package/ccw/frontend/dist/assets/{index-CIoWWkDn.js.map → index-CeESlrZb.js.map} +1 -1
  169. package/ccw/frontend/dist/assets/{index-bSgtHHOF.js → index-DzTbMyaS.js} +4 -4
  170. package/ccw/frontend/dist/assets/{index-bSgtHHOF.js.map → index-DzTbMyaS.js.map} +1 -1
  171. package/ccw/frontend/dist/assets/{layout-grid-BZqfuNG0.js → layout-grid-ZN26YcTM.js} +2 -2
  172. package/ccw/frontend/dist/assets/{layout-grid-BZqfuNG0.js.map → layout-grid-ZN26YcTM.js.map} +1 -1
  173. package/ccw/frontend/dist/assets/{lightbulb-DqJ4OHRL.js → lightbulb-BHrwx9j6.js} +2 -2
  174. package/ccw/frontend/dist/assets/{lightbulb-DqJ4OHRL.js.map → lightbulb-BHrwx9j6.js.map} +1 -1
  175. package/ccw/frontend/dist/assets/{link-2-Bq7fLkC9.js → link-2-zZRu2j4G.js} +2 -2
  176. package/ccw/frontend/dist/assets/{link-2-Bq7fLkC9.js.map → link-2-zZRu2j4G.js.map} +1 -1
  177. package/ccw/frontend/dist/assets/{link-dSLYjCIG.js → link-8lz-HgnZ.js} +2 -2
  178. package/ccw/frontend/dist/assets/{link-dSLYjCIG.js.map → link-8lz-HgnZ.js.map} +1 -1
  179. package/ccw/frontend/dist/assets/{list-Bm_CnR56.js → list-DlablIjt.js} +2 -2
  180. package/ccw/frontend/dist/assets/{list-Bm_CnR56.js.map → list-DlablIjt.js.map} +1 -1
  181. package/ccw/frontend/dist/assets/{map-pin-B5TELa0z.js → map-pin-JAsCUplr.js} +2 -2
  182. package/ccw/frontend/dist/assets/{map-pin-B5TELa0z.js.map → map-pin-JAsCUplr.js.map} +1 -1
  183. package/ccw/frontend/dist/assets/{messages-square-B9sWItdK.js → messages-square-D0iSFb2Y.js} +2 -2
  184. package/ccw/frontend/dist/assets/{messages-square-B9sWItdK.js.map → messages-square-D0iSFb2Y.js.map} +1 -1
  185. package/ccw/frontend/dist/assets/{minimize-2-Z1MYs_Tp.js → minimize-2-BJmkU9CE.js} +2 -2
  186. package/ccw/frontend/dist/assets/{minimize-2-Z1MYs_Tp.js.map → minimize-2-BJmkU9CE.js.map} +1 -1
  187. package/ccw/frontend/dist/assets/{package-EEv4N_Qk.js → package-DYrbBCxk.js} +2 -2
  188. package/ccw/frontend/dist/assets/{package-EEv4N_Qk.js.map → package-DYrbBCxk.js.map} +1 -1
  189. package/ccw/frontend/dist/assets/{plug-CEkvvYXh.js → plug-VG7-23M-.js} +2 -2
  190. package/ccw/frontend/dist/assets/{plug-CEkvvYXh.js.map → plug-VG7-23M-.js.map} +1 -1
  191. package/ccw/frontend/dist/assets/{power-B6Rod0u_.js → power-zPFYNx7u.js} +2 -2
  192. package/ccw/frontend/dist/assets/{power-B6Rod0u_.js.map → power-zPFYNx7u.js.map} +1 -1
  193. package/ccw/frontend/dist/assets/{save-DULWrB2g.js → save-D4XQY9i9.js} +2 -2
  194. package/ccw/frontend/dist/assets/{save-DULWrB2g.js.map → save-D4XQY9i9.js.map} +1 -1
  195. package/ccw/frontend/dist/assets/{send-C4z974WG.js → send-ClSnDjj-.js} +2 -2
  196. package/ccw/frontend/dist/assets/{send-C4z974WG.js.map → send-ClSnDjj-.js.map} +1 -1
  197. package/ccw/frontend/dist/assets/{square-check-big-CqEEw-V0.js → square-check-big-Bffh_MFc.js} +2 -2
  198. package/ccw/frontend/dist/assets/{square-check-big-CqEEw-V0.js.map → square-check-big-Bffh_MFc.js.map} +1 -1
  199. package/ccw/frontend/dist/assets/{square-pen-D-4BrMtQ.js → square-pen-DsOvAvME.js} +2 -2
  200. package/ccw/frontend/dist/assets/{square-pen-D-4BrMtQ.js.map → square-pen-DsOvAvME.js.map} +1 -1
  201. package/ccw/frontend/dist/assets/{star-CDVVM69o.js → star-TLJjvoy2.js} +2 -2
  202. package/ccw/frontend/dist/assets/{star-CDVVM69o.js.map → star-TLJjvoy2.js.map} +1 -1
  203. package/ccw/frontend/dist/assets/{style-CumJ7XC8.js → style-BXKXgpOY.js} +2 -2
  204. package/ccw/frontend/dist/assets/{style-CumJ7XC8.js.map → style-BXKXgpOY.js.map} +1 -1
  205. package/ccw/frontend/dist/assets/{target-Dr9SuV1Y.js → target-FDuAB6SF.js} +2 -2
  206. package/ccw/frontend/dist/assets/{target-Dr9SuV1Y.js.map → target-FDuAB6SF.js.map} +1 -1
  207. package/ccw/frontend/dist/assets/{test-tube-DzDRKk8F.js → test-tube-B9vj-Im8.js} +2 -2
  208. package/ccw/frontend/dist/assets/{test-tube-DzDRKk8F.js.map → test-tube-B9vj-Im8.js.map} +1 -1
  209. package/ccw/frontend/dist/assets/{upload-CihSmIM7.js → upload-CHgTrVN5.js} +2 -2
  210. package/ccw/frontend/dist/assets/{upload-CihSmIM7.js.map → upload-CHgTrVN5.js.map} +1 -1
  211. package/ccw/frontend/dist/assets/{useApiSettings-CevxWX2z.js → useApiSettings-XsHrqf-L.js} +2 -2
  212. package/ccw/frontend/dist/assets/{useApiSettings-CevxWX2z.js.map → useApiSettings-XsHrqf-L.js.map} +1 -1
  213. package/ccw/frontend/dist/assets/{useCli-jVaF89uU.js → useCli-DOlWtux5.js} +2 -2
  214. package/ccw/frontend/dist/assets/{useCli-jVaF89uU.js.map → useCli-DOlWtux5.js.map} +1 -1
  215. package/ccw/frontend/dist/assets/{useCommands-D4uGmNpF.js → useCommands-DazCajiX.js} +2 -2
  216. package/ccw/frontend/dist/assets/{useCommands-D4uGmNpF.js.map → useCommands-DazCajiX.js.map} +1 -1
  217. package/ccw/frontend/dist/assets/{useDebounce-BEYmuZYP.js → useDebounce-Cah-bua6.js} +2 -2
  218. package/ccw/frontend/dist/assets/{useDebounce-BEYmuZYP.js.map → useDebounce-Cah-bua6.js.map} +1 -1
  219. package/ccw/frontend/dist/assets/{useFileExplorer-DEv0DVy7.js → useFileExplorer-B9SCPhhl.js} +2 -2
  220. package/ccw/frontend/dist/assets/{useFileExplorer-DEv0DVy7.js.map → useFileExplorer-B9SCPhhl.js.map} +1 -1
  221. package/ccw/frontend/dist/assets/{useLocale-BRJreqvl.js → useLocale-CmG6pxZe.js} +2 -2
  222. package/ccw/frontend/dist/assets/{useLocale-BRJreqvl.js.map → useLocale-CmG6pxZe.js.map} +1 -1
  223. package/ccw/frontend/dist/assets/{useSkills-lnfeXe9l.js → useSkills-DvEJ0JOv.js} +3 -3
  224. package/ccw/frontend/dist/assets/{useSkills-lnfeXe9l.js.map → useSkills-DvEJ0JOv.js.map} +1 -1
  225. package/ccw/frontend/dist/assets/{useSystemSettings-PlxVdbXI.js → useSystemSettings-BDpwSa04.js} +2 -2
  226. package/ccw/frontend/dist/assets/{useSystemSettings-PlxVdbXI.js.map → useSystemSettings-BDpwSa04.js.map} +1 -1
  227. package/ccw/frontend/dist/assets/{wand-sparkles-BbqUxeEg.js → wand-sparkles-T2KGCRiy.js} +2 -2
  228. package/ccw/frontend/dist/assets/{wand-sparkles-BbqUxeEg.js.map → wand-sparkles-T2KGCRiy.js.map} +1 -1
  229. package/ccw/frontend/dist/index.html +1 -1
  230. package/codex-lens/src/codexlens/cli/commands.py +12 -1
  231. package/codex-lens/src/codexlens/config.py +12 -0
  232. package/codex-lens/src/codexlens/env_config.py +1 -0
  233. package/package.json +1 -1
  234. package/ccw/frontend/dist/assets/CodexLensManagerPage-ClPNashJ.js.map +0 -1
  235. package/ccw/frontend/dist/assets/McpManagerPage-CS2v_1OG.js.map +0 -1
@@ -0,0 +1,292 @@
1
+ # Phase 2: Execute Skill
2
+
3
+ > **COMPACT SENTINEL [Phase 2: Execute]**
4
+ > This phase contains 4 execution steps (Step 2.1 -- 2.4).
5
+ > If you can read this sentinel but cannot find the full Step protocol below, context has been compressed.
6
+ > Recovery: `Read("phases/02-execute.md")`
7
+
8
+ Execute the target skill against the test scenario using `ccw cli --tool claude --mode write`. Claude receives the full skill definition and simulates producing its expected output artifacts.
9
+
10
+ ## Objective
11
+
12
+ - Snapshot current skill version before execution
13
+ - Construct execution prompt with full skill content + test scenario
14
+ - Execute via ccw cli Claude
15
+ - Collect output artifacts
16
+
17
+ ## Execution
18
+
19
+ ### Step 2.1: Snapshot Current Skill
20
+
21
+ ```javascript
22
+ const N = state.current_iteration;
23
+ const iterDir = `${state.work_dir}/iterations/iteration-${N}`;
24
+ Bash(`mkdir -p "${iterDir}/skill-snapshot" "${iterDir}/artifacts"`);
25
+
26
+ // Chain mode: create per-skill artifact directories
27
+ if (state.execution_mode === 'chain') {
28
+ for (const skillName of state.chain_order) {
29
+ Bash(`mkdir -p "${iterDir}/artifacts/${skillName}"`);
30
+ }
31
+ }
32
+
33
+ // Snapshot current skill state (so we can compare/rollback)
34
+ for (const skill of state.target_skills) {
35
+ Bash(`cp -r "${skill.path}" "${iterDir}/skill-snapshot/${skill.name}"`);
36
+ }
37
+ ```
38
+
39
+ ### Step 2.2: Construct Execution Prompt (Single Mode)
40
+
41
+ Read the execute-prompt template and substitute variables.
42
+
43
+ > Skip to Step 2.2b if `state.execution_mode === 'chain'`.
44
+
45
+ ```javascript
46
+ // Ref: templates/execute-prompt.md
47
+
48
+ // Build skillContent by reading only executable skill files (SKILL.md, phases/, specs/)
49
+ // Exclude README.md, docs/, and other non-executable files to save tokens
50
+ const skillContent = state.target_skills.map(skill => {
51
+ const skillMd = Read(`${skill.path}/SKILL.md`);
52
+ const phaseFiles = Glob(`${skill.path}/phases/*.md`).sort().map(f => ({
53
+ relativePath: f.replace(skill.path + '/', ''),
54
+ content: Read(f)
55
+ }));
56
+ const specFiles = Glob(`${skill.path}/specs/*.md`).map(f => ({
57
+ relativePath: f.replace(skill.path + '/', ''),
58
+ content: Read(f)
59
+ }));
60
+
61
+ return `### File: SKILL.md\n${skillMd}\n\n` +
62
+ phaseFiles.map(f => `### File: ${f.relativePath}\n${f.content}`).join('\n\n') +
63
+ (specFiles.length > 0 ? '\n\n' + specFiles.map(f => `### File: ${f.relativePath}\n${f.content}`).join('\n\n') : '');
64
+ }).join('\n\n---\n\n');
65
+
66
+ // Construct full prompt using template
67
+ const executePrompt = `PURPOSE: Simulate executing the following workflow skill against a test scenario. Produce all expected output artifacts as if the skill were invoked with the given input.
68
+
69
+ SKILL CONTENT:
70
+ ${skillContent}
71
+
72
+ TEST SCENARIO:
73
+ Description: ${state.test_scenario.description}
74
+ Input Arguments: ${state.test_scenario.input_args}
75
+ Requirements: ${state.test_scenario.requirements.join('; ')}
76
+ Success Criteria: ${state.test_scenario.success_criteria}
77
+
78
+ TASK:
79
+ 1. Study the complete skill structure (SKILL.md + all phase files)
80
+ 2. Follow the skill execution flow sequentially
81
+ 3. For each phase, produce the artifacts that phase would generate
82
+ 4. Write all output artifacts to the current working directory
83
+ 5. Create a manifest.json listing all produced artifacts
84
+
85
+ MODE: write
86
+ CONTEXT: @**/*
87
+ EXPECTED: All artifacts written to disk + manifest.json
88
+ CONSTRAINTS: Follow skill flow exactly, produce realistic output, not placeholders`;
89
+ ```
90
+
91
+ ### Step 2.3: Execute via ccw cli
92
+
93
+ > **CHECKPOINT**: Before executing CLI, verify:
94
+ > 1. This phase is TodoWrite `in_progress`
95
+ > 2. `iterDir/artifacts/` directory exists
96
+ > 3. Prompt is properly escaped
97
+
98
+ ```javascript
99
+ function escapeForShell(str) {
100
+ return str.replace(/"/g, '\\"').replace(/\$/g, '\\$').replace(/`/g, '\\`');
101
+ }
102
+
103
+ const cliCommand = `ccw cli -p "${escapeForShell(executePrompt)}" --tool claude --mode write --cd "${iterDir}/artifacts"`;
104
+
105
+ // Execute in background, wait for hook callback
106
+ Bash({
107
+ command: cliCommand,
108
+ run_in_background: true,
109
+ timeout: 600000 // 10 minutes max
110
+ });
111
+
112
+ // STOP HERE -- wait for hook callback to resume
113
+ // After callback, verify artifacts were produced
114
+ ```
115
+
116
+ ### Step 2.2b: Chain Execution Path
117
+
118
+ > Skip this step if `state.execution_mode === 'single'`.
119
+
120
+ In chain mode, execute each skill sequentially. Each skill receives the previous skill's artifacts as input context.
121
+
122
+ ```javascript
123
+ // Chain execution: iterate through chain_order
124
+ let previousArtifacts = ''; // Accumulates upstream output
125
+
126
+ for (let i = 0; i < state.chain_order.length; i++) {
127
+ const skillName = state.chain_order[i];
128
+ const skill = state.target_skills.find(s => s.name === skillName);
129
+ const skillArtifactDir = `${iterDir}/artifacts/${skillName}`;
130
+
131
+ // Build this skill's content
132
+ const skillMd = Read(`${skill.path}/SKILL.md`);
133
+ const phaseFiles = Glob(`${skill.path}/phases/*.md`).sort().map(f => ({
134
+ relativePath: f.replace(skill.path + '/', ''),
135
+ content: Read(f)
136
+ }));
137
+ const specFiles = Glob(`${skill.path}/specs/*.md`).map(f => ({
138
+ relativePath: f.replace(skill.path + '/', ''),
139
+ content: Read(f)
140
+ }));
141
+
142
+ const singleSkillContent = `### File: SKILL.md\n${skillMd}\n\n` +
143
+ phaseFiles.map(f => `### File: ${f.relativePath}\n${f.content}`).join('\n\n') +
144
+ (specFiles.length > 0 ? '\n\n' + specFiles.map(f => `### File: ${f.relativePath}\n${f.content}`).join('\n\n') : '');
145
+
146
+ // Build chain context from previous skill's artifacts
147
+ const chainInputContext = previousArtifacts
148
+ ? `\nPREVIOUS CHAIN OUTPUT (from upstream skill "${state.chain_order[i - 1]}"):\n${previousArtifacts}\n\nIMPORTANT: Use the above output as input context for this skill's execution.\n`
149
+ : '';
150
+
151
+ // Construct per-skill execution prompt
152
+ // Ref: templates/execute-prompt.md
153
+ const chainPrompt = `PURPOSE: Simulate executing the following workflow skill against a test scenario. Produce all expected output artifacts.
154
+
155
+ SKILL CONTENT (${skillName} — chain position ${i + 1}/${state.chain_order.length}):
156
+ ${singleSkillContent}
157
+ ${chainInputContext}
158
+ TEST SCENARIO:
159
+ Description: ${state.test_scenario.description}
160
+ Input Arguments: ${state.test_scenario.input_args}
161
+ Requirements: ${state.test_scenario.requirements.join('; ')}
162
+ Success Criteria: ${state.test_scenario.success_criteria}
163
+
164
+ TASK:
165
+ 1. Study the complete skill structure
166
+ 2. Follow the skill execution flow sequentially
167
+ 3. Produce all expected artifacts
168
+ 4. Write output to the current working directory
169
+ 5. Create manifest.json listing all produced artifacts
170
+
171
+ MODE: write
172
+ CONTEXT: @**/*
173
+ CONSTRAINTS: Follow skill flow exactly, produce realistic output`;
174
+
175
+ function escapeForShell(str) {
176
+ return str.replace(/"/g, '\\"').replace(/\$/g, '\\$').replace(/`/g, '\\`');
177
+ }
178
+
179
+ const cliCommand = `ccw cli -p "${escapeForShell(chainPrompt)}" --tool claude --mode write --cd "${skillArtifactDir}"`;
180
+
181
+ // Execute in background
182
+ Bash({
183
+ command: cliCommand,
184
+ run_in_background: true,
185
+ timeout: 600000
186
+ });
187
+
188
+ // STOP -- wait for hook callback
189
+
190
+ // After callback: collect artifacts for next skill in chain
191
+ const artifacts = Glob(`${skillArtifactDir}/**/*`);
192
+ const skillSuccess = artifacts.length > 0;
193
+
194
+ if (skillSuccess) {
195
+ previousArtifacts = artifacts.slice(0, 10).map(f => {
196
+ const relPath = f.replace(skillArtifactDir + '/', '');
197
+ const content = Read(f, { limit: 100 });
198
+ return `--- ${relPath} ---\n${content}`;
199
+ }).join('\n\n');
200
+ } else {
201
+ // Mid-chain failure: keep previous artifacts for downstream skills
202
+ // Log warning but continue chain — downstream skills receive last successful output
203
+ state.errors.push({
204
+ phase: 'execute',
205
+ message: `Chain skill "${skillName}" (position ${i + 1}) produced no artifacts. Downstream skills will receive upstream output from "${state.chain_order[i - 1] || 'none'}" instead.`,
206
+ timestamp: new Date().toISOString()
207
+ });
208
+ state.error_count++;
209
+ // previousArtifacts remains from last successful skill (or empty if first)
210
+ }
211
+
212
+ // Update per-skill TodoWrite
213
+ // TaskUpdate chain skill task with execution status
214
+
215
+ // Record per-skill execution
216
+ if (!state.iterations[N - 1].execution.chain_executions) {
217
+ state.iterations[N - 1].execution.chain_executions = [];
218
+ }
219
+ state.iterations[N - 1].execution.chain_executions.push({
220
+ skill_name: skillName,
221
+ cli_command: cliCommand,
222
+ artifacts_dir: skillArtifactDir,
223
+ success: skillSuccess
224
+ });
225
+
226
+ // Check error budget: abort chain if too many consecutive failures
227
+ if (state.error_count >= 3) {
228
+ state.errors.push({
229
+ phase: 'execute',
230
+ message: `Chain execution aborted at skill "${skillName}" — error limit reached (${state.error_count} errors).`,
231
+ timestamp: new Date().toISOString()
232
+ });
233
+ break;
234
+ }
235
+ }
236
+ ```
237
+
238
+ ### Step 2.4: Collect Artifacts
239
+
240
+ After CLI completes (hook callback received):
241
+
242
+ ```javascript
243
+ // List produced artifacts
244
+ const artifactFiles = Glob(`${iterDir}/artifacts/**/*`);
245
+
246
+ // Chain mode: check per-skill artifacts
247
+ if (state.execution_mode === 'chain') {
248
+ const chainSuccess = state.iterations[N - 1].execution.chain_executions?.every(e => e.success) ?? false;
249
+ state.iterations[N - 1].execution.success = chainSuccess;
250
+ state.iterations[N - 1].execution.artifacts_dir = `${iterDir}/artifacts`;
251
+ } else {
252
+
253
+ if (artifactFiles.length === 0) {
254
+ // Execution produced nothing -- record error
255
+ state.iterations[N - 1].execution = {
256
+ cli_command: cliCommand,
257
+ started_at: new Date().toISOString(),
258
+ completed_at: new Date().toISOString(),
259
+ artifacts_dir: `${iterDir}/artifacts`,
260
+ success: false
261
+ };
262
+ state.error_count++;
263
+ // Continue to Phase 3 anyway -- Gemini can evaluate the skill even without artifacts
264
+ } else {
265
+ state.iterations[N - 1].execution = {
266
+ cli_command: cliCommand,
267
+ started_at: new Date().toISOString(),
268
+ completed_at: new Date().toISOString(),
269
+ artifacts_dir: `${iterDir}/artifacts`,
270
+ success: true
271
+ };
272
+ }
273
+
274
+ } // end single mode branch
275
+
276
+ // Update state
277
+ Write(`${state.work_dir}/iteration-state.json`, JSON.stringify(state, null, 2));
278
+ ```
279
+
280
+ ## Error Handling
281
+
282
+ | Error | Recovery |
283
+ |-------|----------|
284
+ | CLI timeout (10min) | Record failure, continue to Phase 3 without artifacts |
285
+ | CLI crash | Retry once with simplified prompt (SKILL.md only, no phase files) |
286
+ | No artifacts produced | Continue to Phase 3, evaluation focuses on skill definition quality |
287
+
288
+ ## Output
289
+
290
+ - **Files**: `iteration-{N}/skill-snapshot/`, `iteration-{N}/artifacts/`
291
+ - **State**: `iterations[N-1].execution` updated
292
+ - **Next**: Phase 3 (Evaluate)
@@ -0,0 +1,312 @@
1
+ # Phase 3: Evaluate Quality
2
+
3
+ > **COMPACT SENTINEL [Phase 3: Evaluate]**
4
+ > This phase contains 5 execution steps (Step 3.1 -- 3.5).
5
+ > If you can read this sentinel but cannot find the full Step protocol below, context has been compressed.
6
+ > Recovery: `Read("phases/03-evaluate.md")`
7
+
8
+ Evaluate skill quality using `ccw cli --tool gemini --mode analysis`. Gemini scores the skill across 5 dimensions and provides improvement suggestions.
9
+
10
+ ## Objective
11
+
12
+ - Construct evaluation prompt with skill + artifacts + criteria
13
+ - Execute via ccw cli Gemini
14
+ - Parse multi-dimensional score
15
+ - Write iteration-{N}-eval.md
16
+ - Check termination conditions
17
+
18
+ ## Execution
19
+
20
+ ### Step 3.1: Prepare Evaluation Context
21
+
22
+ ```javascript
23
+ const N = state.current_iteration;
24
+ const iterDir = `${state.work_dir}/iterations/iteration-${N}`;
25
+
26
+ // Read evaluation criteria
27
+ // Ref: specs/evaluation-criteria.md
28
+ const evaluationCriteria = Read('.claude/skills/skill-iter-tune/specs/evaluation-criteria.md');
29
+
30
+ // Build skillContent (same pattern as Phase 02 — only executable files)
31
+ const skillContent = state.target_skills.map(skill => {
32
+ const skillMd = Read(`${skill.path}/SKILL.md`);
33
+ const phaseFiles = Glob(`${skill.path}/phases/*.md`).sort().map(f => ({
34
+ relativePath: f.replace(skill.path + '/', ''),
35
+ content: Read(f)
36
+ }));
37
+ const specFiles = Glob(`${skill.path}/specs/*.md`).map(f => ({
38
+ relativePath: f.replace(skill.path + '/', ''),
39
+ content: Read(f)
40
+ }));
41
+ return `### File: SKILL.md\n${skillMd}\n\n` +
42
+ phaseFiles.map(f => `### File: ${f.relativePath}\n${f.content}`).join('\n\n') +
43
+ (specFiles.length > 0 ? '\n\n' + specFiles.map(f => `### File: ${f.relativePath}\n${f.content}`).join('\n\n') : '');
44
+ }).join('\n\n---\n\n');
45
+
46
+ // Build artifacts summary
47
+ let artifactsSummary = 'No artifacts produced (execution may have failed)';
48
+
49
+ if (state.execution_mode === 'chain') {
50
+ // Chain mode: group artifacts by skill
51
+ const chainSummaries = state.chain_order.map(skillName => {
52
+ const skillArtifactDir = `${iterDir}/artifacts/${skillName}`;
53
+ const files = Glob(`${skillArtifactDir}/**/*`);
54
+ if (files.length === 0) return `### ${skillName} (no artifacts)`;
55
+ const filesSummary = files.map(f => {
56
+ const relPath = f.replace(`${skillArtifactDir}/`, '');
57
+ const content = Read(f, { limit: 200 });
58
+ return `--- ${relPath} ---\n${content}`;
59
+ }).join('\n\n');
60
+ return `### ${skillName} (chain position ${state.chain_order.indexOf(skillName) + 1})\n${filesSummary}`;
61
+ });
62
+ artifactsSummary = chainSummaries.join('\n\n---\n\n');
63
+ } else {
64
+ // Single mode (existing)
65
+ const artifactFiles = Glob(`${iterDir}/artifacts/**/*`);
66
+ if (artifactFiles.length > 0) {
67
+ artifactsSummary = artifactFiles.map(f => {
68
+ const relPath = f.replace(`${iterDir}/artifacts/`, '');
69
+ const content = Read(f, { limit: 200 });
70
+ return `--- ${relPath} ---\n${content}`;
71
+ }).join('\n\n');
72
+ }
73
+ }
74
+
75
+ // Build previous evaluation context
76
+ const previousEvalContext = state.iterations.filter(i => i.evaluation).length > 0
77
+ ? `PREVIOUS ITERATIONS:\n` + state.iterations.filter(i => i.evaluation).map(iter =>
78
+ `Iteration ${iter.round}: Score ${iter.evaluation.score}\n` +
79
+ ` Applied: ${iter.improvement?.changes_applied?.map(c => c.summary).join('; ') || 'none'}\n` +
80
+ ` Weaknesses: ${iter.evaluation.weaknesses?.slice(0, 3).join('; ') || 'none'}`
81
+ ).join('\n') + '\nIMPORTANT: Focus on NEW issues not yet addressed.'
82
+ : '';
83
+ ```
84
+
85
+ ### Step 3.2: Construct Evaluation Prompt
86
+
87
+ ```javascript
88
+ // Ref: templates/eval-prompt.md
89
+ const evalPrompt = `PURPOSE: Evaluate the quality of a workflow skill by examining its definition and produced artifacts.
90
+
91
+ SKILL DEFINITION:
92
+ ${skillContent}
93
+
94
+ TEST SCENARIO:
95
+ ${state.test_scenario.description}
96
+ Requirements: ${state.test_scenario.requirements.join('; ')}
97
+ Success Criteria: ${state.test_scenario.success_criteria}
98
+
99
+ ARTIFACTS PRODUCED:
100
+ ${artifactsSummary}
101
+
102
+ EVALUATION CRITERIA:
103
+ ${evaluationCriteria}
104
+
105
+ ${previousEvalContext}
106
+
107
+ ${state.execution_mode === 'chain' ? `
108
+ CHAIN CONTEXT:
109
+ This skill chain contains ${state.chain_order.length} skills executed in order:
110
+ ${state.chain_order.map((s, i) => `${i+1}. ${s}`).join('\n')}
111
+ Current evaluation covers the entire chain output.
112
+ Please provide per-skill quality scores in an additional "chain_scores" field: { "${state.chain_order[0]}": <score>, ... }
113
+ ` : ''}
114
+
115
+ TASK:
116
+ 1. Score each dimension (Clarity 0.20, Completeness 0.25, Correctness 0.25, Effectiveness 0.20, Efficiency 0.10) on 0-100
117
+ 2. Calculate weighted composite score
118
+ 3. List top 3 strengths
119
+ 4. List top 3-5 weaknesses with file:section references
120
+ 5. Provide 3-5 prioritized improvement suggestions with concrete changes
121
+
122
+ EXPECTED OUTPUT (strict JSON, no markdown):
123
+ {
124
+ "composite_score": <0-100>,
125
+ "dimensions": [
126
+ {"name":"Clarity","id":"clarity","score":<0-100>,"weight":0.20,"feedback":"..."},
127
+ {"name":"Completeness","id":"completeness","score":<0-100>,"weight":0.25,"feedback":"..."},
128
+ {"name":"Correctness","id":"correctness","score":<0-100>,"weight":0.25,"feedback":"..."},
129
+ {"name":"Effectiveness","id":"effectiveness","score":<0-100>,"weight":0.20,"feedback":"..."},
130
+ {"name":"Efficiency","id":"efficiency","score":<0-100>,"weight":0.10,"feedback":"..."}
131
+ ],
132
+ "strengths": ["...", "...", "..."],
133
+ "weaknesses": ["...with file:section ref...", "..."],
134
+ "suggestions": [
135
+ {"priority":"high|medium|low","target_file":"...","description":"...","rationale":"...","code_snippet":"..."}
136
+ ]
137
+ }
138
+
139
+ CONSTRAINTS: Be rigorous, reference exact files, focus on highest-impact changes, output ONLY JSON`;
140
+ ```
141
+
142
+ ### Step 3.3: Execute via ccw cli Gemini
143
+
144
+ > **CHECKPOINT**: Verify evaluation prompt is properly constructed before CLI execution.
145
+
146
+ ```javascript
147
+ // Shell escape utility (same as Phase 02)
148
+ function escapeForShell(str) {
149
+ return str.replace(/"/g, '\\"').replace(/\$/g, '\\$').replace(/`/g, '\\`');
150
+ }
151
+
152
+ const skillPath = state.target_skills[0].path; // Primary skill for --cd
153
+
154
+ const cliCommand = `ccw cli -p "${escapeForShell(evalPrompt)}" --tool gemini --mode analysis --cd "${skillPath}"`;
155
+
156
+ // Execute in background
157
+ Bash({
158
+ command: cliCommand,
159
+ run_in_background: true,
160
+ timeout: 300000 // 5 minutes
161
+ });
162
+
163
+ // STOP -- wait for hook callback
164
+ ```
165
+
166
+ ### Step 3.4: Parse Score and Write Eval File
167
+
168
+ After CLI completes:
169
+
170
+ ```javascript
171
+ // Parse JSON from Gemini output
172
+ // The output may contain markdown wrapping -- extract JSON
173
+ const rawOutput = /* CLI output from callback */;
174
+ const jsonMatch = rawOutput.match(/\{[\s\S]*\}/);
175
+ let evaluation;
176
+
177
+ if (jsonMatch) {
178
+ try {
179
+ evaluation = JSON.parse(jsonMatch[0]);
180
+ // Extract chain_scores if present
181
+ if (state.execution_mode === 'chain' && evaluation.chain_scores) {
182
+ state.iterations[N - 1].evaluation.chain_scores = evaluation.chain_scores;
183
+ }
184
+ } catch (e) {
185
+ // Fallback: try to extract score heuristically
186
+ const scoreMatch = rawOutput.match(/"composite_score"\s*:\s*(\d+)/);
187
+ evaluation = {
188
+ composite_score: scoreMatch ? parseInt(scoreMatch[1]) : 50,
189
+ dimensions: [],
190
+ strengths: [],
191
+ weaknesses: ['Evaluation output parsing failed -- raw output saved'],
192
+ suggestions: []
193
+ };
194
+ }
195
+ } else {
196
+ evaluation = {
197
+ composite_score: 50,
198
+ dimensions: [],
199
+ strengths: [],
200
+ weaknesses: ['No structured evaluation output -- defaulting to 50'],
201
+ suggestions: []
202
+ };
203
+ }
204
+
205
+ // Write iteration-N-eval.md
206
+ const evalReport = `# Iteration ${N} Evaluation
207
+
208
+ **Composite Score**: ${evaluation.composite_score}/100
209
+ **Date**: ${new Date().toISOString()}
210
+
211
+ ## Dimension Scores
212
+
213
+ | Dimension | Score | Weight | Feedback |
214
+ |-----------|-------|--------|----------|
215
+ ${(evaluation.dimensions || []).map(d =>
216
+ `| ${d.name} | ${d.score} | ${d.weight} | ${d.feedback} |`
217
+ ).join('\n')}
218
+
219
+ ${(state.execution_mode === 'chain' && evaluation.chain_scores) ? `
220
+ ## Chain Scores
221
+
222
+ | Skill | Score | Chain Position |
223
+ |-------|-------|----------------|
224
+ ${state.chain_order.map((s, i) => `| ${s} | ${evaluation.chain_scores[s] || '-'} | ${i + 1} |`).join('\n')}
225
+ ` : ''}
226
+
227
+ ## Strengths
228
+ ${(evaluation.strengths || []).map(s => `- ${s}`).join('\n')}
229
+
230
+ ## Weaknesses
231
+ ${(evaluation.weaknesses || []).map(w => `- ${w}`).join('\n')}
232
+
233
+ ## Improvement Suggestions
234
+ ${(evaluation.suggestions || []).map((s, i) =>
235
+ `### ${i + 1}. [${s.priority}] ${s.description}\n- **Target**: ${s.target_file}\n- **Rationale**: ${s.rationale}\n${s.code_snippet ? `- **Suggested**:\n\`\`\`\n${s.code_snippet}\n\`\`\`` : ''}`
236
+ ).join('\n\n')}
237
+ `;
238
+
239
+ Write(`${iterDir}/iteration-${N}-eval.md`, evalReport);
240
+
241
+ // Update state
242
+ state.iterations[N - 1].evaluation = {
243
+ score: evaluation.composite_score,
244
+ dimensions: evaluation.dimensions || [],
245
+ strengths: evaluation.strengths || [],
246
+ weaknesses: evaluation.weaknesses || [],
247
+ suggestions: evaluation.suggestions || [],
248
+ chain_scores: evaluation.chain_scores || null,
249
+ eval_file: `${iterDir}/iteration-${N}-eval.md`
250
+ };
251
+ state.latest_score = evaluation.composite_score;
252
+ state.score_trend.push(evaluation.composite_score);
253
+
254
+ Write(`${state.work_dir}/iteration-state.json`, JSON.stringify(state, null, 2));
255
+ ```
256
+
257
+ ### Step 3.5: Check Termination
258
+
259
+ ```javascript
260
+ function shouldTerminate(state) {
261
+ // 1. Quality threshold met
262
+ if (state.latest_score >= state.quality_threshold) {
263
+ return { terminate: true, reason: 'quality_threshold_met' };
264
+ }
265
+
266
+ // 2. Max iterations reached
267
+ if (state.current_iteration >= state.max_iterations) {
268
+ return { terminate: true, reason: 'max_iterations_reached' };
269
+ }
270
+
271
+ // 3. Convergence: no improvement in last 2 iterations
272
+ if (state.score_trend.length >= 3) {
273
+ const last3 = state.score_trend.slice(-3);
274
+ const improvement = last3[2] - last3[0];
275
+ if (improvement <= 2) {
276
+ state.converged = true;
277
+ return { terminate: true, reason: 'convergence_detected' };
278
+ }
279
+ }
280
+
281
+ // 4. Error limit
282
+ if (state.error_count >= state.max_errors) {
283
+ return { terminate: true, reason: 'error_limit_reached' };
284
+ }
285
+
286
+ return { terminate: false };
287
+ }
288
+
289
+ const termination = shouldTerminate(state);
290
+ if (termination.terminate) {
291
+ state.termination_reason = termination.reason;
292
+ Write(`${state.work_dir}/iteration-state.json`, JSON.stringify(state, null, 2));
293
+ // Skip Phase 4, go directly to Phase 5 (Report)
294
+ } else {
295
+ // Continue to Phase 4 (Improve)
296
+ }
297
+ ```
298
+
299
+ ## Error Handling
300
+
301
+ | Error | Recovery |
302
+ |-------|----------|
303
+ | CLI timeout | Retry once, if still fails use score 50 with warning |
304
+ | JSON parse failure | Extract score heuristically, save raw output |
305
+ | No output | Default score 50, note in weaknesses |
306
+
307
+ ## Output
308
+
309
+ - **Files**: `iteration-{N}-eval.md`
310
+ - **State**: `iterations[N-1].evaluation`, `latest_score`, `score_trend` updated
311
+ - **Decision**: terminate -> Phase 5, continue -> Phase 4
312
+ - **TodoWrite**: Update current iteration score display