claude-code-workflow 6.3.49 → 6.3.51

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 (90) hide show
  1. package/.claude/commands/issue/new.md +1 -2
  2. package/.claude/commands/view.md +367 -0
  3. package/.claude/commands/workflow/unified-execute-with-file.md +807 -0
  4. package/.claude/skills/ccw-help/SKILL.md +72 -12
  5. package/.claude/skills/ccw-help/command.json +922 -520
  6. package/.claude/skills/ccw-help/index/all-agents.json +97 -0
  7. package/.claude/skills/ccw-help/index/all-commands.json +805 -0
  8. package/.claude/skills/ccw-help/index/by-category.json +833 -0
  9. package/.claude/skills/ccw-help/index/by-use-case.json +819 -0
  10. package/.claude/skills/ccw-help/index/command-relationships.json +160 -0
  11. package/.claude/skills/ccw-help/index/essential-commands.json +90 -0
  12. package/.claude/skills/ccw-help/scripts/auto-update.py +34 -0
  13. package/.claude/skills/skill-generator/SKILL.md +255 -208
  14. package/.claude/skills/skill-generator/phases/01-requirements-discovery.md +238 -228
  15. package/.claude/skills/skill-generator/phases/02-structure-generation.md +261 -262
  16. package/.claude/skills/skill-generator/phases/03-phase-generation.md +976 -969
  17. package/.claude/skills/skill-generator/phases/04-specs-templates.md +398 -398
  18. package/.claude/skills/skill-generator/phases/05-validation.md +417 -417
  19. package/.claude/skills/skill-generator/specs/cli-integration.md +131 -131
  20. package/.claude/skills/skill-generator/specs/execution-modes.md +399 -396
  21. package/.claude/skills/skill-generator/specs/reference-docs-spec.md +271 -0
  22. package/.claude/skills/skill-generator/specs/scripting-integration.md +265 -265
  23. package/.claude/skills/skill-generator/specs/skill-requirements.md +466 -466
  24. package/.claude/skills/skill-generator/templates/autonomous-action.md +91 -88
  25. package/.claude/skills/skill-generator/templates/autonomous-orchestrator.md +89 -89
  26. package/.claude/skills/skill-generator/templates/code-analysis-action.md +148 -149
  27. package/.claude/skills/skill-generator/templates/llm-action.md +367 -367
  28. package/.claude/skills/skill-generator/templates/script-template.md +79 -79
  29. package/.claude/skills/skill-generator/templates/sequential-phase.md +129 -129
  30. package/.claude/skills/skill-generator/templates/skill-md.md +134 -75
  31. package/.codex/prompts/UNIFIED_EXECUTE_COMPARISON.md +205 -0
  32. package/.codex/prompts/analyze-with-file.md +5 -2
  33. package/.codex/prompts/brainstorm-to-cycle.md +4 -3
  34. package/.codex/prompts/brainstorm-with-file.md +6 -2
  35. package/.codex/prompts/clean.md +7 -2
  36. package/.codex/prompts/compact.md +5 -3
  37. package/.codex/prompts/debug-with-file.md +6 -2
  38. package/.codex/prompts/execute.md +6 -2
  39. package/.codex/prompts/issue-execute.md +10 -2
  40. package/.codex/prompts/issue-new.md +390 -285
  41. package/.codex/prompts/lite-execute.md +8 -7
  42. package/.codex/prompts/lite-fix.md +6 -2
  43. package/.codex/prompts/lite-plan-a.md +6 -2
  44. package/.codex/prompts/lite-plan-b.md +6 -2
  45. package/.codex/prompts/lite-plan-c.md +6 -2
  46. package/.codex/prompts/unified-execute-with-file.md +722 -0
  47. package/.codex/skills/codex-issue-plan-execute/SKILL.md +239 -0
  48. package/.codex/skills/codex-issue-plan-execute/phases/actions/action-complete.md +173 -0
  49. package/.codex/skills/codex-issue-plan-execute/phases/actions/action-execute.md +220 -0
  50. package/.codex/skills/codex-issue-plan-execute/phases/actions/action-init.md +86 -0
  51. package/.codex/skills/codex-issue-plan-execute/phases/actions/action-list.md +165 -0
  52. package/.codex/skills/codex-issue-plan-execute/phases/actions/action-plan.md +170 -0
  53. package/.codex/skills/codex-issue-plan-execute/phases/orchestrator.md +210 -0
  54. package/.codex/skills/codex-issue-plan-execute/phases/state-schema.md +136 -0
  55. package/.codex/skills/codex-issue-plan-execute/prompts/execution-agent-system.md +136 -0
  56. package/.codex/skills/codex-issue-plan-execute/prompts/execution-agent.md +135 -0
  57. package/.codex/skills/codex-issue-plan-execute/prompts/planning-agent-system.md +107 -0
  58. package/.codex/skills/codex-issue-plan-execute/prompts/planning-agent.md +122 -0
  59. package/.codex/skills/codex-issue-plan-execute/specs/issue-handling.md +187 -0
  60. package/.codex/skills/codex-issue-plan-execute/specs/quality-standards.md +231 -0
  61. package/.codex/skills/codex-issue-plan-execute/specs/solution-schema.md +270 -0
  62. package/.codex/skills/codex-issue-plan-execute/specs/subagent-roles.md +268 -0
  63. package/ccw/dist/cli.d.ts.map +1 -1
  64. package/ccw/dist/cli.js +1 -0
  65. package/ccw/dist/cli.js.map +1 -1
  66. package/ccw/dist/commands/cli.d.ts +1 -0
  67. package/ccw/dist/commands/cli.d.ts.map +1 -1
  68. package/ccw/dist/commands/cli.js +74 -6
  69. package/ccw/dist/commands/cli.js.map +1 -1
  70. package/ccw/dist/core/routes/cli-routes.d.ts.map +1 -1
  71. package/ccw/dist/core/routes/cli-routes.js +16 -1
  72. package/ccw/dist/core/routes/cli-routes.js.map +1 -1
  73. package/ccw/dist/core/routes/help-routes.d.ts.map +1 -1
  74. package/ccw/dist/core/routes/help-routes.js +51 -1
  75. package/ccw/dist/core/routes/help-routes.js.map +1 -1
  76. package/ccw/dist/tools/cli-executor-core.d.ts.map +1 -1
  77. package/ccw/dist/tools/cli-executor-core.js +5 -3
  78. package/ccw/dist/tools/cli-executor-core.js.map +1 -1
  79. package/ccw/dist/tools/cli-executor-utils.d.ts +1 -0
  80. package/ccw/dist/tools/cli-executor-utils.d.ts.map +1 -1
  81. package/ccw/dist/tools/cli-executor-utils.js +3 -1
  82. package/ccw/dist/tools/cli-executor-utils.js.map +1 -1
  83. package/ccw/src/cli.ts +1 -0
  84. package/ccw/src/commands/cli.ts +77 -6
  85. package/ccw/src/core/routes/cli-routes.ts +16 -1
  86. package/ccw/src/core/routes/help-routes.ts +60 -1
  87. package/ccw/src/templates/dashboard-js/views/help.js +423 -1
  88. package/ccw/src/tools/cli-executor-core.ts +6 -3
  89. package/ccw/src/tools/cli-executor-utils.ts +5 -2
  90. package/package.json +1 -1
@@ -262,6 +262,8 @@ function renderCommandsTab(category) {
262
262
 
263
263
  // Initialize accordion handlers
264
264
  initializeAccordions();
265
+ // Initialize command card click handlers
266
+ initializeCommandCardHandlers();
265
267
  }
266
268
 
267
269
  function renderCommandCard(cmd) {
@@ -271,8 +273,13 @@ function renderCommandCard(cmd) {
271
273
  'Advanced': 'bg-error-light text-error'
272
274
  }[cmd.difficulty] || 'bg-muted text-muted-foreground';
273
275
 
276
+ // Create safe JSON string for command data
277
+ var cmdJson = escapeHtml(JSON.stringify(cmd));
278
+
274
279
  return `
275
- <div class="bg-background border border-border rounded-lg p-4 hover:border-primary transition-colors">
280
+ <div class="command-card cursor-pointer bg-background border border-border rounded-lg p-4 hover:border-primary transition-all hover:shadow-md"
281
+ data-command='${cmdJson}'
282
+ title="Click to view details">
276
283
  <div class="flex items-start justify-between mb-2">
277
284
  <div class="flex-1">
278
285
  <div class="flex items-center gap-2 mb-1">
@@ -281,6 +288,7 @@ function renderCommandCard(cmd) {
281
288
  </div>
282
289
  <p class="text-sm text-muted-foreground">${escapeHtml(cmd.description)}</p>
283
290
  </div>
291
+ <i data-lucide="arrow-right" class="w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity ml-2"></i>
284
292
  </div>
285
293
  ${cmd.arguments ? `
286
294
  <div class="mt-2 text-xs">
@@ -854,3 +862,417 @@ function renderCodexLensQuickStart() {
854
862
  container.innerHTML = html;
855
863
  if (typeof lucide !== 'undefined') lucide.createIcons();
856
864
  }
865
+
866
+ // ========== Command Detail Modal ==========
867
+ function showCommandDetailModal(cmd) {
868
+ var modal = document.createElement('div');
869
+ modal.className = 'fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4';
870
+ modal.id = 'commandDetailModal';
871
+
872
+ var difficultyColor = {
873
+ 'Beginner': 'bg-success/10 text-success',
874
+ 'Intermediate': 'bg-warning/10 text-warning',
875
+ 'Advanced': 'bg-error/10 text-error'
876
+ }[cmd.difficulty] || 'bg-muted/10 text-muted-foreground';
877
+
878
+ var sourceLink = cmd.source ? cmd.source.replace(/\.\.\/..\/..\//g, '') : '';
879
+
880
+ var html = `
881
+ <div class="bg-card border border-border rounded-lg max-w-4xl w-full max-h-[90vh] overflow-hidden flex flex-col">
882
+ <!-- Header -->
883
+ <div class="sticky top-0 bg-card border-b border-border px-6 py-4 flex items-start justify-between">
884
+ <div class="flex-1">
885
+ <div class="flex items-center gap-2 mb-2">
886
+ <code class="text-lg font-mono text-primary font-bold">${escapeHtml(cmd.command)}</code>
887
+ <span class="text-xs px-3 py-1 rounded-full ${difficultyColor} font-medium">${escapeHtml(cmd.difficulty || 'Intermediate')}</span>
888
+ </div>
889
+ <p class="text-sm text-muted-foreground">${escapeHtml(cmd.category || 'general')}${cmd.subcategory ? ' / ' + escapeHtml(cmd.subcategory) : ''}</p>
890
+ </div>
891
+ <button class="close-modal text-muted-foreground hover:text-foreground transition-colors" title="Close">
892
+ <i data-lucide="x" class="w-6 h-6"></i>
893
+ </button>
894
+ </div>
895
+
896
+ <!-- Content - Tabs -->
897
+ <div class="border-b border-border flex">
898
+ <button class="detail-tab active px-4 py-3 text-sm font-medium transition-colors border-b-2 border-primary" data-tab="overview">
899
+ Overview
900
+ </button>
901
+ ${cmd.source ? `
902
+ <button class="detail-tab px-4 py-3 text-sm font-medium transition-colors border-b-2 border-transparent text-muted-foreground hover:text-foreground" data-tab="document">
903
+ <i data-lucide="file-text" class="w-4 h-4 inline-block mr-1"></i>
904
+ Full Document
905
+ </button>
906
+ ` : ''}
907
+ </div>
908
+
909
+ <!-- Tab Content -->
910
+ <div class="flex-1 overflow-y-auto">
911
+ <!-- Overview Tab -->
912
+ <div id="overview-tab" class="detail-tab-content p-6 space-y-6 active">
913
+ <!-- Description -->
914
+ <div>
915
+ <h3 class="text-sm font-semibold text-foreground mb-2">Description</h3>
916
+ <p class="text-sm text-muted-foreground leading-relaxed">${escapeHtml(cmd.description || 'No description available')}</p>
917
+ </div>
918
+
919
+ <!-- Usage Scenario -->
920
+ ${cmd.usage_scenario ? `
921
+ <div>
922
+ <h3 class="text-sm font-semibold text-foreground mb-2">Use Case</h3>
923
+ <p class="text-sm text-muted-foreground">${escapeHtml(cmd.usage_scenario)}</p>
924
+ </div>
925
+ ` : ''}
926
+
927
+ <!-- Arguments -->
928
+ ${cmd.arguments ? `
929
+ <div>
930
+ <h3 class="text-sm font-semibold text-foreground mb-2">Arguments</h3>
931
+ <div class="bg-background rounded-lg p-3 border border-border">
932
+ <code class="text-xs font-mono text-foreground">${escapeHtml(cmd.arguments)}</code>
933
+ </div>
934
+ </div>
935
+ ` : ''}
936
+
937
+ <!-- Flow Information -->
938
+ ${cmd.flow ? `
939
+ <div>
940
+ <h3 class="text-sm font-semibold text-foreground mb-3">Workflow</h3>
941
+ <div class="space-y-2">
942
+ ${cmd.flow.prerequisites ? `
943
+ <div class="text-xs">
944
+ <span class="text-muted-foreground">Prerequisites:</span>
945
+ <div class="mt-1 space-y-1">
946
+ ${cmd.flow.prerequisites.map(p => `
947
+ <div class="inline-block px-2 py-1 bg-primary/10 text-primary rounded text-xs mr-2">
948
+ ${escapeHtml(p)}
949
+ </div>
950
+ `).join('')}
951
+ </div>
952
+ </div>
953
+ ` : ''}
954
+
955
+ ${cmd.flow.next_steps ? `
956
+ <div class="text-xs">
957
+ <span class="text-muted-foreground">Next Steps:</span>
958
+ <div class="mt-1 space-y-1">
959
+ ${cmd.flow.next_steps.map(n => `
960
+ <div class="inline-block px-2 py-1 bg-success/10 text-success rounded text-xs mr-2">
961
+ ${escapeHtml(n)}
962
+ </div>
963
+ `).join('')}
964
+ </div>
965
+ </div>
966
+ ` : ''}
967
+
968
+ ${cmd.flow.alternatives ? `
969
+ <div class="text-xs">
970
+ <span class="text-muted-foreground">Alternatives:</span>
971
+ <div class="mt-1 space-y-1">
972
+ ${cmd.flow.alternatives.map(a => `
973
+ <div class="inline-block px-2 py-1 bg-warning/10 text-warning rounded text-xs mr-2">
974
+ ${escapeHtml(a)}
975
+ </div>
976
+ `).join('')}
977
+ </div>
978
+ </div>
979
+ ` : ''}
980
+ </div>
981
+ </div>
982
+ ` : ''}
983
+
984
+ <!-- Source -->
985
+ ${sourceLink ? `
986
+ <div>
987
+ <h3 class="text-sm font-semibold text-foreground mb-2">Source File</h3>
988
+ <div class="text-xs text-muted-foreground font-mono break-all">${escapeHtml(sourceLink)}</div>
989
+ </div>
990
+ ` : ''}
991
+ </div>
992
+
993
+ <!-- Document Tab -->
994
+ ${cmd.source ? `
995
+ <div id="document-tab" class="detail-tab-content p-6">
996
+ <div class="bg-background border border-border rounded-lg p-4">
997
+ <div id="document-loader" class="flex items-center justify-center py-8">
998
+ <i data-lucide="loader-2" class="w-5 h-5 animate-spin text-primary mr-2"></i>
999
+ <span class="text-sm text-muted-foreground">Loading document...</span>
1000
+ </div>
1001
+ <div id="document-content" class="hidden prose prose-invert max-w-none text-sm">
1002
+ <!-- Markdown content will be loaded here -->
1003
+ </div>
1004
+ <div id="document-error" class="hidden text-sm text-error">
1005
+ Failed to load document
1006
+ </div>
1007
+ </div>
1008
+ </div>
1009
+ ` : ''}
1010
+ </div>
1011
+
1012
+ <!-- Footer -->
1013
+ <div class="border-t border-border px-6 py-3 flex gap-2 justify-end bg-background rounded-b-lg">
1014
+ <button class="close-modal px-4 py-2 text-sm font-medium text-foreground bg-muted hover:bg-muted/80 rounded-lg transition-colors">
1015
+ Close
1016
+ </button>
1017
+ </div>
1018
+ </div>
1019
+ `;
1020
+
1021
+ modal.innerHTML = html;
1022
+ document.body.appendChild(modal);
1023
+
1024
+ // Initialize tab switching
1025
+ var tabButtons = modal.querySelectorAll('.detail-tab');
1026
+ tabButtons.forEach(function(btn) {
1027
+ btn.addEventListener('click', function() {
1028
+ var tabName = this.getAttribute('data-tab');
1029
+
1030
+ // Update active tab button
1031
+ tabButtons.forEach(function(b) {
1032
+ b.classList.remove('active', 'border-primary', 'text-foreground');
1033
+ b.classList.add('border-transparent', 'text-muted-foreground');
1034
+ });
1035
+ this.classList.add('active', 'border-primary', 'text-foreground');
1036
+ this.classList.remove('border-transparent', 'text-muted-foreground');
1037
+
1038
+ // Show/hide tab content
1039
+ var tabContents = modal.querySelectorAll('.detail-tab-content');
1040
+ tabContents.forEach(function(content) {
1041
+ content.classList.remove('active');
1042
+ });
1043
+ var activeTab = modal.querySelector('#' + tabName + '-tab');
1044
+ if (activeTab) {
1045
+ activeTab.classList.add('active');
1046
+ }
1047
+
1048
+ // Load document content if needed
1049
+ if (tabName === 'document' && cmd.source) {
1050
+ loadCommandDocument(modal, cmd.source);
1051
+ }
1052
+ });
1053
+ });
1054
+
1055
+ // Close handlers
1056
+ var closeButtons = modal.querySelectorAll('.close-modal');
1057
+ closeButtons.forEach(function(btn) {
1058
+ btn.addEventListener('click', function() {
1059
+ modal.remove();
1060
+ });
1061
+ });
1062
+
1063
+ // Close on background click
1064
+ modal.addEventListener('click', function(e) {
1065
+ if (e.target === modal) {
1066
+ modal.remove();
1067
+ }
1068
+ });
1069
+
1070
+ // Close on Escape key
1071
+ var closeOnEscape = function(e) {
1072
+ if (e.key === 'Escape') {
1073
+ modal.remove();
1074
+ document.removeEventListener('keydown', closeOnEscape);
1075
+ }
1076
+ };
1077
+ document.addEventListener('keydown', closeOnEscape);
1078
+
1079
+ if (typeof lucide !== 'undefined') lucide.createIcons();
1080
+ }
1081
+
1082
+ // ========== Load Command Document ==========
1083
+ function loadCommandDocument(modal, sourcePath) {
1084
+ var contentDiv = modal.querySelector('#document-content');
1085
+ var loaderDiv = modal.querySelector('#document-loader');
1086
+ var errorDiv = modal.querySelector('#document-error');
1087
+
1088
+ // Check if already loaded
1089
+ if (contentDiv && !contentDiv.classList.contains('hidden')) {
1090
+ return;
1091
+ }
1092
+
1093
+ // Start loading
1094
+ if (loaderDiv) loaderDiv.classList.remove('hidden');
1095
+ if (errorDiv) errorDiv.classList.add('hidden');
1096
+ if (contentDiv) contentDiv.classList.add('hidden');
1097
+
1098
+ // Fetch document content
1099
+ fetch('/api/help/command-content?source=' + encodeURIComponent(sourcePath))
1100
+ .then(function(response) {
1101
+ if (!response.ok) {
1102
+ throw new Error('HTTP ' + response.status + ': ' + response.statusText);
1103
+ }
1104
+ return response.text();
1105
+ })
1106
+ .then(function(markdown) {
1107
+ // Parse markdown to HTML
1108
+ try {
1109
+ var html = parseMarkdown(markdown);
1110
+ if (!html) {
1111
+ throw new Error('parseMarkdown returned empty result');
1112
+ }
1113
+ } catch (parseError) {
1114
+ console.error('[Help] parseMarkdown failed:', parseError.message, parseError.stack);
1115
+ throw parseError;
1116
+ }
1117
+
1118
+ if (contentDiv) {
1119
+ contentDiv.innerHTML = html;
1120
+ contentDiv.classList.remove('hidden');
1121
+ }
1122
+ if (loaderDiv) loaderDiv.classList.add('hidden');
1123
+
1124
+ if (typeof lucide !== 'undefined') lucide.createIcons();
1125
+ })
1126
+ .catch(function(error) {
1127
+ console.error('[Help] Failed to load document:', error.message || error);
1128
+ if (contentDiv) contentDiv.classList.add('hidden');
1129
+ if (loaderDiv) loaderDiv.classList.add('hidden');
1130
+ if (errorDiv) {
1131
+ errorDiv.textContent = 'Failed to load document: ' + (error.message || 'Unknown error');
1132
+ errorDiv.classList.remove('hidden');
1133
+ }
1134
+ });
1135
+ }
1136
+
1137
+ // ========== Markdown Parser (Simple) ==========
1138
+ function parseMarkdown(markdown) {
1139
+ // Remove frontmatter
1140
+ var lines = markdown.split('\n');
1141
+ var startIdx = 0;
1142
+ if (lines[0] === '---') {
1143
+ for (var i = 1; i < lines.length; i++) {
1144
+ if (lines[i] === '---') {
1145
+ startIdx = i + 1;
1146
+ break;
1147
+ }
1148
+ }
1149
+ }
1150
+
1151
+ var content = lines.slice(startIdx).join('\n').trim();
1152
+
1153
+ var html = '';
1154
+ var currentList = null;
1155
+ var inCodeBlock = false;
1156
+ var codeBlockContent = '';
1157
+ var codeBlockLang = '';
1158
+
1159
+ lines = content.split('\n');
1160
+
1161
+ for (var i = 0; i < lines.length; i++) {
1162
+ var line = lines[i];
1163
+
1164
+ // Code blocks
1165
+ if (line.startsWith('```')) {
1166
+ if (!inCodeBlock) {
1167
+ inCodeBlock = true;
1168
+ codeBlockLang = line.substring(3).trim();
1169
+ codeBlockContent = '';
1170
+ } else {
1171
+ inCodeBlock = false;
1172
+ var langClass = codeBlockLang ? ' language-' + escapeHtml(codeBlockLang) : '';
1173
+ html += '<pre class="bg-background border border-border rounded-lg p-4 overflow-x-auto my-3"><code class="text-xs font-mono text-foreground' + langClass + '">' +
1174
+ escapeHtml(codeBlockContent).replace(/\n/g, '<br>') + '</code></pre>';
1175
+ }
1176
+ continue;
1177
+ }
1178
+
1179
+ if (inCodeBlock) {
1180
+ codeBlockContent += line + '\n';
1181
+ continue;
1182
+ }
1183
+
1184
+ // Headings
1185
+ if (line.startsWith('# ')) {
1186
+ html += '<h1 class="text-2xl font-bold text-foreground mt-6 mb-3">' + escapeHtml(line.substring(2)) + '</h1>';
1187
+ continue;
1188
+ }
1189
+ if (line.startsWith('## ')) {
1190
+ html += '<h2 class="text-xl font-bold text-foreground mt-5 mb-2">' + escapeHtml(line.substring(3)) + '</h2>';
1191
+ continue;
1192
+ }
1193
+ if (line.startsWith('### ')) {
1194
+ html += '<h3 class="text-lg font-semibold text-foreground mt-4 mb-2">' + escapeHtml(line.substring(4)) + '</h3>';
1195
+ continue;
1196
+ }
1197
+
1198
+ // Lists
1199
+ if (line.match(/^[\s]*[-*+]\s/)) {
1200
+ var listContent = line.replace(/^[\s]*[-*+]\s/, '');
1201
+ if (currentList !== 'ul') {
1202
+ if (currentList === 'ol') html += '</ol>';
1203
+ html += '<ul class="list-disc list-inside text-sm text-muted-foreground space-y-1 my-2">';
1204
+ currentList = 'ul';
1205
+ }
1206
+ html += '<li>' + escapeHtml(listContent) + '</li>';
1207
+ continue;
1208
+ }
1209
+
1210
+ if (line.match(/^[\s]*\d+\.\s/)) {
1211
+ var listContent = line.replace(/^[\s]*\d+\.\s/, '');
1212
+ if (currentList !== 'ol') {
1213
+ if (currentList === 'ul') html += '</ul>';
1214
+ html += '<ol class="list-decimal list-inside text-sm text-muted-foreground space-y-1 my-2">';
1215
+ currentList = 'ol';
1216
+ }
1217
+ html += '<li>' + escapeHtml(listContent) + '</li>';
1218
+ continue;
1219
+ }
1220
+
1221
+ // Close list if we encounter non-list content
1222
+ if (line.trim() && (currentList === 'ul' || currentList === 'ol')) {
1223
+ html += currentList === 'ul' ? '</ul>' : '</ol>';
1224
+ currentList = null;
1225
+ }
1226
+
1227
+ // Paragraphs
1228
+ if (line.trim()) {
1229
+ // Convert inline formatting
1230
+ var formatted = line
1231
+ .replace(/\*\*([^*]+)\*\*/g, '<strong class="font-semibold text-foreground">$1</strong>')
1232
+ .replace(/\*([^*]+)\*/g, '<em class="italic">$1</em>')
1233
+ .replace(/`([^`]+)`/g, '<code class="bg-background px-1 rounded text-xs font-mono text-primary">$1</code>')
1234
+ .replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" class="text-primary hover:underline">$1</a>');
1235
+
1236
+ html += '<p class="text-sm text-muted-foreground leading-relaxed my-2">' + formatted + '</p>';
1237
+ }
1238
+ }
1239
+
1240
+ // Close any open lists
1241
+ if (currentList === 'ul') html += '</ul>';
1242
+ if (currentList === 'ol') html += '</ol>';
1243
+
1244
+ return html;
1245
+ }
1246
+
1247
+ // ========== Command Card Click Handlers ==========
1248
+ function initializeCommandCardHandlers() {
1249
+ var cards = document.querySelectorAll('.command-card');
1250
+ cards.forEach(function(card) {
1251
+ card.addEventListener('click', function(e) {
1252
+ e.preventDefault();
1253
+ var cmdJson = this.getAttribute('data-command');
1254
+ if (cmdJson) {
1255
+ try {
1256
+ var cmd = JSON.parse(unescapeHtml(cmdJson));
1257
+ showCommandDetailModal(cmd);
1258
+ } catch (err) {
1259
+ console.error('Failed to parse command data:', err);
1260
+ }
1261
+ }
1262
+ });
1263
+ });
1264
+ }
1265
+
1266
+ // Helper function to unescape HTML
1267
+ function unescapeHtml(html) {
1268
+ var map = {
1269
+ '&amp;': '&',
1270
+ '&lt;': '<',
1271
+ '&gt;': '>',
1272
+ '&quot;': '"',
1273
+ '&#039;': "'"
1274
+ };
1275
+ return html.replace(/&(?:amp|lt|gt|quot|#039);/g, function(match) {
1276
+ return map[match];
1277
+ });
1278
+ }
@@ -795,7 +795,7 @@ async function executeCliTool(
795
795
  const effectiveModel = model || getPrimaryModel(workingDir, tool);
796
796
 
797
797
  // Build command
798
- const { command, args, useStdin } = buildCommand({
798
+ const { command, args, useStdin, outputFormat: autoDetectedFormat } = buildCommand({
799
799
  tool,
800
800
  prompt: finalPrompt,
801
801
  mode,
@@ -806,8 +806,11 @@ async function executeCliTool(
806
806
  reviewOptions: mode === 'review' ? { uncommitted, base, commit, title } : undefined
807
807
  });
808
808
 
809
+ // Use auto-detected format (from buildCommand) if available, otherwise use passed outputFormat
810
+ const finalOutputFormat = autoDetectedFormat || outputFormat;
811
+
809
812
  // Create output parser and IR storage
810
- const parser = createOutputParser(outputFormat);
813
+ const parser = createOutputParser(finalOutputFormat);
811
814
  const allOutputUnits: CliOutputUnit[] = [];
812
815
 
813
816
  const startTime = Date.now();
@@ -820,7 +823,7 @@ async function executeCliTool(
820
823
  promptLength: finalPrompt.length,
821
824
  hasResume: !!resume,
822
825
  hasCustomId: !!customId,
823
- outputFormat
826
+ outputFormat: finalOutputFormat
824
827
  });
825
828
 
826
829
  return new Promise((resolve, reject) => {
@@ -166,7 +166,7 @@ export function buildCommand(params: {
166
166
  commit?: string;
167
167
  title?: string;
168
168
  };
169
- }): { command: string; args: string[]; useStdin: boolean } {
169
+ }): { command: string; args: string[]; useStdin: boolean; outputFormat?: 'text' | 'json-lines' } {
170
170
  const { tool, prompt, mode = 'analysis', model, dir, include, nativeResume, settingsFile, reviewOptions } = params;
171
171
 
172
172
  debugLog('BUILD_CMD', `Building command for tool: ${tool}`, {
@@ -381,5 +381,8 @@ export function buildCommand(params: {
381
381
  fullCommand: `${command} ${args.join(' ')}${useStdin ? ' (stdin)' : ''}`,
382
382
  });
383
383
 
384
- return { command, args, useStdin };
384
+ // Auto-detect output format: Codex uses --json flag for JSONL output
385
+ const outputFormat = tool.toLowerCase() === 'codex' ? 'json-lines' : 'text';
386
+
387
+ return { command, args, useStdin, outputFormat };
385
388
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-workflow",
3
- "version": "6.3.49",
3
+ "version": "6.3.51",
4
4
  "description": "JSON-driven multi-agent development framework with intelligent CLI orchestration (Gemini/Qwen/Codex), context-first architecture, and automated workflow execution",
5
5
  "type": "module",
6
6
  "main": "ccw/src/index.js",