claude-code-workflow 7.2.29 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/.ccw/workflows/cli-templates/schemas/plan-overview-base-schema.json +2 -2
  2. package/.ccw/workflows/cli-templates/schemas/task-schema.json +14 -7
  3. package/.claude/agents/action-planning-agent.md +7 -4
  4. package/.claude/agents/cli-explore-agent.md +77 -63
  5. package/.claude/agents/cli-lite-planning-agent.md +11 -10
  6. package/.claude/agents/issue-plan-agent.md +421 -426
  7. package/.claude/commands/workflow/spec/setup.md +1 -1
  8. package/.claude/commands/workflow-skill.md +130 -0
  9. package/.claude/skills/ccw-chain/SKILL.md +92 -0
  10. package/.claude/skills/ccw-chain/chains/ccw-cycle.json +31 -0
  11. package/.claude/skills/ccw-chain/chains/ccw-exploration.json +58 -0
  12. package/.claude/skills/ccw-chain/chains/ccw-issue.json +44 -0
  13. package/.claude/skills/ccw-chain/chains/ccw-lightweight.json +71 -0
  14. package/.claude/skills/ccw-chain/chains/ccw-main.json +65 -0
  15. package/.claude/skills/ccw-chain/chains/ccw-standard.json +51 -0
  16. package/.claude/skills/ccw-chain/chains/ccw-team.json +15 -0
  17. package/.claude/skills/ccw-chain/chains/ccw-with-file.json +47 -0
  18. package/.claude/skills/ccw-chain/specs/auto-mode.md +47 -0
  19. package/.claude/skills/chain-loader/SKILL.md +78 -0
  20. package/.claude/skills/chain-loader/phases/01-analyze-skill.md +53 -0
  21. package/.claude/skills/chain-loader/phases/02-design-graph.md +73 -0
  22. package/.claude/skills/chain-loader/phases/03-generate-validate.md +75 -0
  23. package/.claude/skills/chain-loader/specs/chain-schema.md +126 -0
  24. package/.claude/skills/chain-loader/specs/design-patterns.md +99 -0
  25. package/.claude/skills/chain-loader/templates/chain-json.md +63 -0
  26. package/.claude/skills/review-cycle/phases/review-module.md +764 -764
  27. package/.claude/skills/review-cycle/phases/review-session.md +775 -775
  28. package/.claude/skills/workflow-multi-cli-plan/SKILL.md +2 -2
  29. package/.claude/skills/workflow-plan/SKILL.md +1 -0
  30. package/.claude/skills/workflow-plan/phases/01-session-discovery.md +19 -2
  31. package/.claude/skills/workflow-plan/phases/02-context-gathering.md +2 -2
  32. package/.claude/skills/workflow-plan/phases/03-conflict-resolution.md +422 -422
  33. package/.claude/skills/workflow-plan/phases/04-task-generation.md +9 -1
  34. package/.claude/skills/workflow-plan/phases/05-plan-verify.md +395 -395
  35. package/.claude/skills/workflow-tdd-plan/phases/02-context-gathering.md +407 -407
  36. package/.claude/skills/workflow-tdd-plan/phases/04-conflict-resolution.md +426 -426
  37. package/.claude/skills/workflow-test-fix/phases/02-test-context-gather.md +493 -493
  38. package/.codex/skills/analyze-with-file/SKILL.md +383 -134
  39. package/.codex/skills/brainstorm/SKILL.md +3 -3
  40. package/.codex/skills/brainstorm-with-file/SKILL.md +208 -88
  41. package/.codex/skills/clean/SKILL.md +1 -1
  42. package/.codex/skills/csv-wave-pipeline/SKILL.md +2 -2
  43. package/.codex/skills/investigate/orchestrator.md +24 -0
  44. package/.codex/skills/issue-discover/SKILL.md +374 -361
  45. package/.codex/skills/issue-discover/phases/01-issue-new.md +1 -1
  46. package/.codex/skills/issue-discover/phases/02-discover.md +2 -2
  47. package/.codex/skills/issue-discover/phases/03-discover-by-prompt.md +1 -1
  48. package/.codex/skills/issue-discover/phases/04-quick-execute.md +2 -2
  49. package/.codex/skills/parallel-dev-cycle/SKILL.md +44 -37
  50. package/.codex/skills/project-documentation-workflow/SKILL.md +1 -1
  51. package/.codex/skills/review-cycle/SKILL.md +31 -12
  52. package/.codex/skills/roadmap-with-file/SKILL.md +141 -133
  53. package/.codex/skills/security-audit/orchestrator.md +29 -0
  54. package/.codex/skills/session-sync/SKILL.md +1 -1
  55. package/.codex/skills/ship/orchestrator.md +24 -0
  56. package/.codex/skills/spec-add/SKILL.md +5 -5
  57. package/.codex/skills/spec-generator/SKILL.md +33 -2
  58. package/.codex/skills/spec-generator/phases/01-5-requirement-clarification.md +3 -3
  59. package/.codex/skills/spec-generator/phases/01-discovery.md +1 -1
  60. package/.codex/skills/spec-generator/phases/02-product-brief.md +1 -1
  61. package/.codex/skills/spec-generator/phases/03-requirements.md +1 -1
  62. package/.codex/skills/spec-generator/phases/04-architecture.md +1 -1
  63. package/.codex/skills/spec-generator/phases/05-epics-stories.md +1 -1
  64. package/.codex/skills/spec-generator/phases/06-readiness-check.md +1 -1
  65. package/.codex/skills/spec-generator/phases/07-issue-export.md +1 -1
  66. package/.codex/skills/spec-setup/SKILL.md +669 -669
  67. package/.codex/skills/team-arch-opt/specs/team-config.json +1 -1
  68. package/.codex/skills/team-brainstorm/SKILL.md +259 -259
  69. package/.codex/skills/team-coordinate/SKILL.md +359 -359
  70. package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +1 -1
  71. package/.codex/skills/team-designer/SKILL.md +27 -1
  72. package/.codex/skills/team-designer/phases/01-requirements-analysis.md +2 -2
  73. package/.codex/skills/team-designer/phases/02-scaffold-generation.md +1 -1
  74. package/.codex/skills/team-designer/phases/04-validation.md +1 -1
  75. package/.codex/skills/team-executor/SKILL.md +218 -218
  76. package/.codex/skills/team-frontend/SKILL.md +227 -227
  77. package/.codex/skills/team-frontend-debug/SKILL.md +278 -278
  78. package/.codex/skills/team-frontend-debug/roles/coordinator/commands/analyze.md +2 -2
  79. package/.codex/skills/team-interactive-craft/SKILL.md +220 -220
  80. package/.codex/skills/team-interactive-craft/roles/coordinator/role.md +209 -209
  81. package/.codex/skills/team-issue/SKILL.md +269 -269
  82. package/.codex/skills/team-issue/roles/coordinator/role.md +1 -1
  83. package/.codex/skills/team-lifecycle-v4/SKILL.md +305 -305
  84. package/.codex/skills/team-motion-design/SKILL.md +222 -222
  85. package/.codex/skills/team-motion-design/roles/coordinator/role.md +210 -210
  86. package/.codex/skills/team-perf-opt/SKILL.md +258 -258
  87. package/.codex/skills/team-perf-opt/specs/team-config.json +1 -1
  88. package/.codex/skills/team-planex/SKILL.md +216 -216
  89. package/.codex/skills/team-quality-assurance/SKILL.md +229 -229
  90. package/.codex/skills/team-review/SKILL.md +227 -227
  91. package/.codex/skills/team-roadmap-dev/SKILL.md +238 -238
  92. package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/roadmap-discuss.md +5 -5
  93. package/.codex/skills/team-tech-debt/SKILL.md +206 -206
  94. package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +1 -1
  95. package/.codex/skills/team-testing/SKILL.md +237 -237
  96. package/.codex/skills/team-ui-polish/SKILL.md +218 -218
  97. package/.codex/skills/team-ui-polish/roles/coordinator/role.md +213 -213
  98. package/.codex/skills/team-uidesign/SKILL.md +219 -219
  99. package/.codex/skills/team-uidesign/roles/coordinator/role.md +2 -2
  100. package/.codex/skills/team-ultra-analyze/SKILL.md +260 -260
  101. package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +1 -1
  102. package/.codex/skills/team-ultra-analyze/roles/coordinator/role.md +1 -1
  103. package/.codex/skills/team-ux-improve/SKILL.md +227 -227
  104. package/.codex/skills/team-ux-improve/roles/coordinator/role.md +1 -1
  105. package/.codex/skills/team-ux-improve/specs/team-config.json +1 -1
  106. package/.codex/skills/team-visual-a11y/SKILL.md +319 -319
  107. package/.codex/skills/team-visual-a11y/roles/coordinator/role.md +213 -213
  108. package/.codex/skills/workflow-execute/SKILL.md +5 -5
  109. package/.codex/skills/workflow-lite-planex/SKILL.md +3 -3
  110. package/.codex/skills/workflow-plan/SKILL.md +3 -3
  111. package/.codex/skills/workflow-tdd-plan/SKILL.md +4 -4
  112. package/.codex/skills/workflow-test-fix-cycle/SKILL.md +403 -402
  113. package/README.md +14 -0
  114. package/ccw/dist/cli.d.ts.map +1 -1
  115. package/ccw/dist/cli.js +16 -0
  116. package/ccw/dist/cli.js.map +1 -1
  117. package/ccw/dist/commands/chain-loader.d.ts +2 -0
  118. package/ccw/dist/commands/chain-loader.d.ts.map +1 -0
  119. package/ccw/dist/commands/chain-loader.js +11 -0
  120. package/ccw/dist/commands/chain-loader.js.map +1 -0
  121. package/ccw/dist/commands/install.d.ts.map +1 -1
  122. package/ccw/dist/commands/install.js +52 -1
  123. package/ccw/dist/commands/install.js.map +1 -1
  124. package/ccw/dist/commands/launcher.d.ts +2 -0
  125. package/ccw/dist/commands/launcher.d.ts.map +1 -0
  126. package/ccw/dist/commands/launcher.js +434 -0
  127. package/ccw/dist/commands/launcher.js.map +1 -0
  128. package/ccw/dist/core/routes/litellm-api-routes.d.ts.map +1 -1
  129. package/ccw/dist/core/routes/litellm-api-routes.js +0 -23
  130. package/ccw/dist/core/routes/litellm-api-routes.js.map +1 -1
  131. package/ccw/dist/tools/chain-loader.d.ts +10 -0
  132. package/ccw/dist/tools/chain-loader.d.ts.map +1 -0
  133. package/ccw/dist/tools/chain-loader.js +1054 -0
  134. package/ccw/dist/tools/chain-loader.js.map +1 -0
  135. package/ccw/dist/tools/index.d.ts.map +1 -1
  136. package/ccw/dist/tools/index.js +2 -0
  137. package/ccw/dist/tools/index.js.map +1 -1
  138. package/ccw/dist/tools/json-builder.js +20 -0
  139. package/ccw/dist/tools/json-builder.js.map +1 -1
  140. package/ccw/dist/tools/skill-context-loader.d.ts.map +1 -1
  141. package/ccw/dist/tools/skill-context-loader.js +12 -26
  142. package/ccw/dist/tools/skill-context-loader.js.map +1 -1
  143. package/ccw/dist/types/chain-types.d.ts +112 -0
  144. package/ccw/dist/types/chain-types.d.ts.map +1 -0
  145. package/ccw/dist/types/chain-types.js +5 -0
  146. package/ccw/dist/types/chain-types.js.map +1 -0
  147. package/ccw/dist/utils/chain-visualizer.d.ts +13 -0
  148. package/ccw/dist/utils/chain-visualizer.d.ts.map +1 -0
  149. package/ccw/dist/utils/chain-visualizer.js +164 -0
  150. package/ccw/dist/utils/chain-visualizer.js.map +1 -0
  151. package/ccw/scripts/prepublish-clean.mjs +0 -1
  152. package/package.json +1 -3
  153. package/.claude/commands/cli/cli-init.md +0 -441
  154. package/.claude/commands/cli/codex-review.md +0 -361
  155. package/.claude/commands/flow-create.md +0 -663
  156. package/.claude/skills/team-edict.zip +0 -0
  157. package/ccw-litellm/README.md +0 -180
  158. package/ccw-litellm/pyproject.toml +0 -35
  159. package/ccw-litellm/src/ccw_litellm/__init__.py +0 -47
  160. package/ccw-litellm/src/ccw_litellm/cli.py +0 -108
  161. package/ccw-litellm/src/ccw_litellm/clients/__init__.py +0 -12
  162. package/ccw-litellm/src/ccw_litellm/clients/litellm_embedder.py +0 -270
  163. package/ccw-litellm/src/ccw_litellm/clients/litellm_llm.py +0 -198
  164. package/ccw-litellm/src/ccw_litellm/config/__init__.py +0 -22
  165. package/ccw-litellm/src/ccw_litellm/config/loader.py +0 -343
  166. package/ccw-litellm/src/ccw_litellm/config/models.py +0 -162
  167. package/ccw-litellm/src/ccw_litellm/interfaces/__init__.py +0 -14
  168. package/ccw-litellm/src/ccw_litellm/interfaces/embedder.py +0 -52
  169. package/ccw-litellm/src/ccw_litellm/interfaces/llm.py +0 -45
@@ -0,0 +1,164 @@
1
+ /**
2
+ * Chain Visualizer - Terminal ASCII visualization for chain topology and progress.
3
+ */
4
+ import chalk from 'chalk';
5
+ /**
6
+ * Render static topology of a chain as ASCII graph.
7
+ */
8
+ export function renderChainTopology(chain) {
9
+ const lines = [];
10
+ const nodeCount = Object.keys(chain.nodes).length;
11
+ lines.push(`${chain.chain_id} [${nodeCount} nodes]`);
12
+ lines.push('='.repeat(48));
13
+ if (chain.preload?.length) {
14
+ lines.push(`Preload: ${chain.preload.map(p => p.key).join(', ')}`);
15
+ }
16
+ if (chain.variables) {
17
+ const vars = Object.entries(chain.variables).map(([k, v]) => `${k}:${v.type}`);
18
+ lines.push(`Variables: ${vars.join(', ')}`);
19
+ }
20
+ if (chain.preload?.length || chain.variables)
21
+ lines.push('');
22
+ for (const [id, node] of Object.entries(chain.nodes)) {
23
+ const prefix = node.type === 'decision' ? `<${id}>` : `[${id}]`;
24
+ const typeLabel = node.type;
25
+ const edges = getNodeEdges(node);
26
+ const isEnd = edges.length === 0 || (edges.length === 1 && edges[0] === null);
27
+ lines.push(`${prefix} ${node.name} ${'·'.repeat(Math.max(1, 40 - prefix.length - node.name.length))} ${typeLabel}${isEnd ? ' [end]' : ''}`);
28
+ if (node.type === 'decision') {
29
+ for (const choice of node.choices) {
30
+ lines.push(` |-- ${choice.label} --> ${choice.next}`);
31
+ }
32
+ }
33
+ else if (node.type === 'delegate') {
34
+ lines.push(` |>> delegate → ${node.chain}${node.entry_name ? `:${node.entry_name}` : ''}`);
35
+ if (node.next)
36
+ lines.push(` |<< return → ${node.next}`);
37
+ }
38
+ else if (node.type === 'step' && node.next) {
39
+ lines.push(` |`);
40
+ }
41
+ }
42
+ return lines.join('\n');
43
+ }
44
+ /**
45
+ * Render live execution progress for a session.
46
+ */
47
+ export function renderChainProgress(session, chains) {
48
+ const lines = [];
49
+ const depth = session.chain_stack.length;
50
+ lines.push(chalk.bold(`Chain Progress [${session.session_id}] depth: ${depth}`));
51
+ lines.push('='.repeat(48));
52
+ // Show variables if any
53
+ const varKeys = Object.keys(session.variables);
54
+ if (varKeys.length > 0) {
55
+ const varStr = varKeys.map(k => `${k}=${JSON.stringify(session.variables[k]) ?? 'null'}`).join(', ');
56
+ lines.push(chalk.dim(`vars: ${varStr}`));
57
+ lines.push('');
58
+ }
59
+ // Build stack display: parent chains first, current chain last
60
+ const stackDisplay = [];
61
+ for (let i = 0; i < session.chain_stack.length; i++) {
62
+ stackDisplay.push({ chainId: session.chain_stack[i].chain_id, indent: i });
63
+ }
64
+ stackDisplay.push({ chainId: session.current_chain, indent: session.chain_stack.length });
65
+ for (const { chainId, indent } of stackDisplay) {
66
+ const chain = chains.get(chainId);
67
+ if (!chain) {
68
+ lines.push(`${' '.repeat(indent)}${chainId} (not loaded)`);
69
+ continue;
70
+ }
71
+ const pad = ' '.repeat(indent);
72
+ const isCurrent = chainId === session.current_chain;
73
+ lines.push(`${pad}${isCurrent ? chalk.bold.cyan(chainId) : chalk.dim(chainId)}`);
74
+ if (!isCurrent) {
75
+ // For parent chains, show where they delegated
76
+ const frame = session.chain_stack.find(f => f.chain_id === chainId);
77
+ if (frame) {
78
+ // Find completed nodes from history for this chain
79
+ const chainHistory = session.history.filter(h => h.chain_id === chainId);
80
+ for (const h of chainHistory) {
81
+ const node = chain.nodes[h.node_id];
82
+ if (!node)
83
+ continue;
84
+ const label = formatNodeLabel(h.node_id, node);
85
+ if (h.node_status === 'completed') {
86
+ lines.push(`${pad} ${chalk.green('[done]')} ${label}${h.choice ? ` (choice: ${getChoiceLabel(node, h.choice)})` : ''}`);
87
+ }
88
+ else {
89
+ lines.push(`${pad} ${chalk.yellow('[....]')} ${label}`);
90
+ }
91
+ }
92
+ lines.push(`${pad} |`);
93
+ lines.push(`${pad} v delegate`);
94
+ }
95
+ continue;
96
+ }
97
+ // Current chain: show all nodes in execution order
98
+ const visited = new Set(session.history.filter(h => h.chain_id === chainId).map(h => h.node_id));
99
+ const completedNodes = new Set(session.history.filter(h => h.chain_id === chainId && h.node_status === 'completed').map(h => h.node_id));
100
+ for (const [nodeId, node] of Object.entries(chain.nodes)) {
101
+ const label = formatNodeLabel(nodeId, node);
102
+ if (nodeId === session.current_node && session.node_status === 'active') {
103
+ lines.push(`${pad} ${chalk.yellow.bold('[>>>>]')} ${chalk.yellow.bold(label)} <-- current`);
104
+ }
105
+ else if (completedNodes.has(nodeId)) {
106
+ const histEntry = session.history.find(h => h.chain_id === chainId && h.node_id === nodeId && h.node_status === 'completed');
107
+ const choiceStr = histEntry?.choice ? ` (choice: ${getChoiceLabel(node, histEntry.choice)})` : '';
108
+ lines.push(`${pad} ${chalk.green('[done]')} ${label}${choiceStr}`);
109
+ }
110
+ else if (visited.has(nodeId)) {
111
+ lines.push(`${pad} ${chalk.yellow('[....]')} ${label}`);
112
+ }
113
+ else {
114
+ lines.push(`${pad} ${chalk.gray('[ ]')} ${chalk.gray(label)}`);
115
+ }
116
+ }
117
+ }
118
+ // Summary
119
+ const completed = session.history.filter(h => h.node_status === 'completed').length;
120
+ const total = getTotalNodes(session, chains);
121
+ lines.push('');
122
+ lines.push(chalk.dim(`Progress: ${completed}/${total} nodes completed`));
123
+ return lines.join('\n');
124
+ }
125
+ function formatNodeLabel(nodeId, node) {
126
+ const prefix = node.type === 'decision' ? `<${nodeId}>` : `[${nodeId}]`;
127
+ return `${prefix} ${node.name}`;
128
+ }
129
+ function getChoiceLabel(node, choice) {
130
+ if (node.type === 'decision' && choice >= 1 && choice <= node.choices.length) {
131
+ return node.choices[choice - 1].label;
132
+ }
133
+ return String(choice);
134
+ }
135
+ function getNodeEdges(node) {
136
+ if (node.type === 'step')
137
+ return [node.next];
138
+ if (node.type === 'decision')
139
+ return node.choices.map(c => c.next);
140
+ if (node.type === 'delegate')
141
+ return [node.next ?? null];
142
+ return [];
143
+ }
144
+ function getTotalNodes(session, chains) {
145
+ let total = 0;
146
+ const seen = new Set();
147
+ // Count current chain
148
+ const current = chains.get(session.current_chain);
149
+ if (current) {
150
+ total += Object.keys(current.nodes).length;
151
+ seen.add(session.current_chain);
152
+ }
153
+ // Count parent chains in stack
154
+ for (const frame of session.chain_stack) {
155
+ if (seen.has(frame.chain_id))
156
+ continue;
157
+ seen.add(frame.chain_id);
158
+ const chain = chains.get(frame.chain_id);
159
+ if (chain)
160
+ total += Object.keys(chain.nodes).length;
161
+ }
162
+ return total;
163
+ }
164
+ //# sourceMappingURL=chain-visualizer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chain-visualizer.js","sourceRoot":"","sources":["../../src/utils/chain-visualizer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAiB;IACnD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;IAClD,KAAK,CAAC,IAAI,CAAC,GAA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/src/**/__pycache__/**',
15
14
  'codex-lens/src/**/.workflow/**',
16
15
  '**/.workflow/.cli-history/*.db*',
17
16
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-workflow",
3
- "version": "7.2.29",
3
+ "version": "7.3.0",
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/dist/index.js",
@@ -77,8 +77,6 @@
77
77
  ".qwen/",
78
78
  "codex-lens/src/codexlens/",
79
79
  "codex-lens/pyproject.toml",
80
- "ccw-litellm/src/ccw_litellm/",
81
- "ccw-litellm/pyproject.toml",
82
80
  "README.md"
83
81
  ],
84
82
  "repository": {
@@ -1,441 +0,0 @@
1
- ---
2
- name: cli-init
3
- description: Generate .gemini/ and .qwen/ config directories with settings.json and ignore files based on workspace technology detection
4
- argument-hint: "[--tool gemini|qwen|all] [--output path] [--preview]"
5
- allowed-tools: Bash(*), Read(*), Write(*), Glob(*)
6
- group: cli
7
- ---
8
-
9
- # CLI Initialization Command (/cli:cli-init)
10
-
11
- ## Overview
12
- Initializes CLI tool configurations for the workspace by:
13
- 1. Analyzing current workspace using `get_modules_by_depth.sh` to identify technology stacks
14
- 2. Generating ignore files (`.geminiignore` and `.qwenignore`) with filtering rules optimized for detected technologies
15
- 3. Creating configuration directories (`.gemini/` and `.qwen/`) with settings.json files
16
-
17
- **Supported Tools**: gemini, qwen, all (default: all)
18
-
19
- ## Core Functionality
20
-
21
- ### Configuration Generation
22
- 1. **Workspace Analysis**: Runs `get_modules_by_depth.sh` to analyze project structure
23
- 2. **Technology Stack Detection**: Identifies tech stacks based on file extensions, directories, and configuration files
24
- 3. **Config Creation**: Generates tool-specific configuration directories and settings files
25
- 4. **Ignore Rules Generation**: Creates ignore files with filtering patterns for detected technologies
26
-
27
- ### Generated Files
28
-
29
- #### Configuration Directories
30
- Creates tool-specific configuration directories:
31
-
32
- **For Gemini** (`.gemini/`):
33
- - `.gemini/settings.json`:
34
- ```json
35
- {
36
- "contextfilename": "CLAUDE.md"
37
- }
38
- ```
39
-
40
- **For Qwen** (`.qwen/`):
41
- - `.qwen/settings.json`:
42
- ```json
43
- {
44
- "contextfilename": "CLAUDE.md"
45
- }
46
- ```
47
-
48
- #### Ignore Files
49
- Uses gitignore syntax to filter files from CLI tool analysis:
50
- - `.geminiignore` - For Gemini CLI
51
- - `.qwenignore` - For Qwen CLI
52
-
53
- Both files have identical content based on detected technologies.
54
-
55
- ### Supported Technology Stacks
56
-
57
- #### Frontend Technologies
58
- - **React/Next.js**: Ignores build artifacts, .next/, node_modules
59
- - **Vue/Nuxt**: Ignores .nuxt/, dist/, .cache/
60
- - **Angular**: Ignores dist/, .angular/, node_modules
61
- - **Webpack/Vite**: Ignores build outputs, cache directories
62
-
63
- #### Backend Technologies
64
- - **Node.js**: Ignores node_modules, package-lock.json, npm-debug.log
65
- - **Python**: Ignores __pycache__, .venv, *.pyc, .pytest_cache
66
- - **Java**: Ignores target/, .gradle/, *.class, .mvn/
67
- - **Go**: Ignores vendor/, *.exe, go.sum (when appropriate)
68
- - **C#/.NET**: Ignores bin/, obj/, *.dll, *.pdb
69
-
70
- #### Database & Infrastructure
71
- - **Docker**: Ignores .dockerignore, docker-compose.override.yml
72
- - **Kubernetes**: Ignores *.secret.yaml, helm charts temp files
73
- - **Database**: Ignores *.db, *.sqlite, database dumps
74
-
75
- ### Generated Rules Structure
76
-
77
- #### Base Rules (Always Included)
78
- ```
79
- # Version Control
80
- .git/
81
- .svn/
82
- .hg/
83
-
84
- # OS Files
85
- .DS_Store
86
- Thumbs.db
87
- *.tmp
88
- *.swp
89
-
90
- # IDE Files
91
- .vscode/
92
- .idea/
93
- .vs/
94
-
95
- # Logs
96
- *.log
97
- logs/
98
- ```
99
-
100
- #### Technology-Specific Rules
101
- Rules are added based on detected technologies:
102
-
103
- **Node.js Projects** (package.json detected):
104
- ```
105
- # Node.js
106
- node_modules/
107
- npm-debug.log*
108
- .npm/
109
- .yarn/
110
- package-lock.json
111
- yarn.lock
112
- .pnpm-store/
113
- ```
114
-
115
- **Python Projects** (requirements.txt, setup.py, pyproject.toml detected):
116
- ```
117
- # Python
118
- __pycache__/
119
- *.py[cod]
120
- .venv/
121
- venv/
122
- .pytest_cache/
123
- .coverage
124
- htmlcov/
125
- ```
126
-
127
- **Java Projects** (pom.xml, build.gradle detected):
128
- ```
129
- # Java
130
- target/
131
- .gradle/
132
- *.class
133
- *.jar
134
- *.war
135
- .mvn/
136
- ```
137
-
138
- ## Command Options
139
-
140
- ### Tool Selection
141
-
142
- **Initialize All Tools (default)**:
143
- ```bash
144
- /cli:cli-init
145
- ```
146
- - Creates `.gemini/`, `.qwen/` directories with settings.json
147
- - Creates `.geminiignore` and `.qwenignore` files
148
- - Sets contextfilename to "CLAUDE.md" for both
149
-
150
- **Initialize Gemini Only**:
151
- ```bash
152
- /cli:cli-init --tool gemini
153
- ```
154
- - Creates only `.gemini/` directory and `.geminiignore` file
155
-
156
- **Initialize Qwen Only**:
157
- ```bash
158
- /cli:cli-init --tool qwen
159
- ```
160
- - Creates only `.qwen/` directory and `.qwenignore` file
161
-
162
- ### Preview Mode
163
- ```bash
164
- /cli:cli-init --preview
165
- ```
166
- - Shows what would be generated without creating files
167
- - Displays detected technologies, configuration, and ignore rules
168
-
169
- ### Custom Output Path
170
- ```bash
171
- /cli:cli-init --output=.config/
172
- ```
173
- - Generates files in specified directory
174
- - Creates directories if they don't exist
175
-
176
- ### Combined Options
177
- ```bash
178
- /cli:cli-init --tool qwen --preview
179
- /cli:cli-init --tool all --output=.config/
180
- ```
181
-
182
- ## EXECUTION INSTRUCTIONS - START HERE
183
-
184
- **When this command is triggered, follow these exact steps:**
185
-
186
- ### Step 1: Parse Tool Selection
187
- ```bash
188
- # Extract --tool flag (default: all)
189
- # Options: gemini, qwen, all
190
- ```
191
-
192
- ### Step 2: Workspace Analysis (MANDATORY FIRST)
193
- ```bash
194
- # Analyze workspace structure
195
- bash(ccw tool exec get_modules_by_depth '{"format":"json"}')
196
- ```
197
-
198
- ### Step 3: Technology Detection
199
- ```bash
200
- # Check for common tech stack indicators
201
- bash(find . -name "package.json" -not -path "*/node_modules/*" | head -1)
202
- bash(find . -name "requirements.txt" -o -name "setup.py" -o -name "pyproject.toml" | head -1)
203
- bash(find . -name "pom.xml" -o -name "build.gradle" | head -1)
204
- bash(find . -name "Dockerfile" | head -1)
205
- ```
206
-
207
- ### Step 4: Generate Configuration Files
208
-
209
- **For Gemini** (if --tool is gemini or all):
210
- ```bash
211
- # Create .gemini/ directory and settings.json
212
- mkdir -p .gemini
213
- Write({file_path: '.gemini/settings.json', content: '{"contextfilename": "CLAUDE.md"}'})
214
-
215
- # Create .geminiignore file with detected technology rules
216
- # Backup existing files if present
217
- ```
218
-
219
- **For Qwen** (if --tool is qwen or all):
220
- ```bash
221
- # Create .qwen/ directory and settings.json
222
- mkdir -p .qwen
223
- Write({file_path: '.qwen/settings.json', content: '{"contextfilename": "CLAUDE.md"}'})
224
-
225
- # Create .qwenignore file with detected technology rules
226
- # Backup existing files if present
227
- ```
228
-
229
- ### Step 5: Validation
230
- ```bash
231
- # Verify generated files are valid
232
- bash(ls -la .gemini* .qwen* 2>/dev/null || echo "Configuration files created")
233
- ```
234
-
235
- ## Implementation Process (Technical Details)
236
-
237
- ### Phase 1: Tool Selection
238
- 1. Parse `--tool` flag from command arguments
239
- 2. Determine which configurations to generate:
240
- - `gemini`: Generate .gemini/ and .geminiignore only
241
- - `qwen`: Generate .qwen/ and .qwenignore only
242
- - `all` (default): Generate both sets of files
243
-
244
- ### Phase 2: Workspace Analysis
245
- 1. Execute `get_modules_by_depth.sh json` to get structured project data
246
- 2. Parse JSON output to identify directories and files
247
- 3. Scan for technology indicators:
248
- - Configuration files (package.json, requirements.txt, etc.)
249
- - Directory patterns (src/, tests/, etc.)
250
- - File extensions (.js, .py, .java, etc.)
251
- 4. Detect project name from directory name or package.json
252
-
253
- ### Phase 3: Technology Detection
254
- ```bash
255
- # Technology detection logic
256
- detect_nodejs() {
257
- [ -f "package.json" ] || find . -name "package.json" -not -path "*/node_modules/*" | head -1
258
- }
259
-
260
- detect_python() {
261
- [ -f "requirements.txt" ] || [ -f "setup.py" ] || [ -f "pyproject.toml" ] || \
262
- find . -name "*.py" -not -path "*/__pycache__/*" | head -1
263
- }
264
-
265
- detect_java() {
266
- [ -f "pom.xml" ] || [ -f "build.gradle" ] || \
267
- find . -name "*.java" | head -1
268
- }
269
- ```
270
-
271
- ### Phase 4: Configuration Generation
272
- **For each selected tool**, create:
273
-
274
- 1. **Config Directory**:
275
- - Create `.gemini/` or `.qwen/` directory if it doesn't exist
276
- - Generate `settings.json` with contextfilename setting
277
- - Set contextfilename to "CLAUDE.md" by default
278
-
279
- 2. **Settings.json Format** (identical for both tools):
280
- ```json
281
- {
282
- "contextfilename": "CLAUDE.md"
283
- }
284
- ```
285
-
286
- ### Phase 5: Ignore Rules Generation
287
- 1. Start with base rules (always included)
288
- 2. Add technology-specific rules based on detection
289
- 3. Add workspace-specific patterns if found
290
- 4. Sort and deduplicate rules
291
- 5. Generate identical content for both `.geminiignore` and `.qwenignore`
292
-
293
- ### Phase 6: File Creation
294
- 1. **Generate config directories**: Create `.gemini/` and/or `.qwen/` directories with settings.json
295
- 2. **Generate ignore files**: Create organized ignore files with sections
296
- 3. **Create backups**: Backup existing files if present
297
- 4. **Validate**: Check generated files are valid
298
-
299
- ## Generated File Format
300
-
301
- ### Configuration Files
302
- ```json
303
- // .gemini/settings.json or .qwen/settings.json
304
- {
305
- "contextfilename": "CLAUDE.md"
306
- }
307
- ```
308
-
309
- ### Ignore Files
310
- ```
311
- # .geminiignore / .qwenignore
312
- # Generated by Claude Code /cli:cli-init command
313
- # Creation date: 2024-01-15 10:30:00
314
- # Detected technologies: Node.js, Python, Docker
315
- #
316
- # This file uses gitignore syntax to filter files for CLI tool analysis
317
- # Edit this file to customize filtering rules for your project
318
-
319
- # ============================================================================
320
- # Base Rules (Always Applied)
321
- # ============================================================================
322
-
323
- # Version Control
324
- .git/
325
- .svn/
326
- .hg/
327
-
328
- # ============================================================================
329
- # Node.js (Detected: package.json found)
330
- # ============================================================================
331
-
332
- node_modules/
333
- npm-debug.log*
334
- .npm/
335
- yarn-error.log
336
- package-lock.json
337
-
338
- # ============================================================================
339
- # Python (Detected: requirements.txt, *.py files found)
340
- # ============================================================================
341
-
342
- __pycache__/
343
- *.py[cod]
344
- .venv/
345
- .pytest_cache/
346
- .coverage
347
-
348
- # ============================================================================
349
- # Docker (Detected: Dockerfile found)
350
- # ============================================================================
351
-
352
- .dockerignore
353
- docker-compose.override.yml
354
-
355
- # ============================================================================
356
- # Custom Rules (Add your project-specific rules below)
357
- # ============================================================================
358
-
359
- ```
360
-
361
- ## Error Handling
362
-
363
- ### Missing Dependencies
364
- - If `get_modules_by_depth.sh` not found, show error with path to script
365
- - Gracefully handle cases where script fails
366
-
367
- ### Write Permissions
368
- - Check write permissions before attempting file creation
369
- - Show clear error message if cannot write to target location
370
-
371
- ### Backup Existing Files
372
- - If `.gemini/` directory exists, create backup as `.gemini.backup/`
373
- - If `.qwen/` directory exists, create backup as `.qwen.backup/`
374
- - If `.geminiignore` exists, create backup as `.geminiignore.backup`
375
- - If `.qwenignore` exists, create backup as `.qwenignore.backup`
376
- - Include timestamp in backup filename
377
-
378
- ## Integration Points
379
-
380
- ### Workflow Commands
381
- - **After `workflow-lite-plan` skill**: Suggest running cli-init for better analysis
382
- - **Before analysis**: Recommend updating ignore patterns for cleaner results
383
-
384
- ### CLI Tool Integration
385
- - Automatically update when new technologies detected
386
- - Integrate with `intelligent-tools-strategy.md` recommendations
387
-
388
- ## Usage Examples
389
-
390
- ### Basic Project Setup
391
- ```bash
392
- # Initialize all CLI tools (Gemini + Qwen)
393
- /cli:cli-init
394
-
395
- # Initialize only Gemini
396
- /cli:cli-init --tool gemini
397
-
398
- # Initialize only Qwen
399
- /cli:cli-init --tool qwen
400
-
401
- # Preview what would be generated
402
- /cli:cli-init --preview
403
-
404
- # Generate in subdirectory
405
- /cli:cli-init --output=.config/
406
- ```
407
-
408
- ### Technology Migration
409
- ```bash
410
- # After adding new tech stack (e.g., Docker)
411
- /cli:cli-init # Regenerates all config and ignore files with new rules
412
-
413
- # Check what changed
414
- /cli:cli-init --preview # Compare with existing configuration
415
-
416
- # Update only Qwen configuration
417
- /cli:cli-init --tool qwen
418
- ```
419
-
420
- ### Tool-Specific Initialization
421
- ```bash
422
- # Setup for Gemini-only workflow
423
- /cli:cli-init --tool gemini
424
-
425
- # Setup for Qwen-only workflow
426
- /cli:cli-init --tool qwen
427
-
428
- # Setup both with preview
429
- /cli:cli-init --tool all --preview
430
- ```
431
-
432
-
433
- ## Tool Selection Guide
434
-
435
- | Scenario | Command | Result |
436
- |----------|---------|--------|
437
- | **New project, using both tools** | `/cli:cli-init` | Creates .gemini/, .qwen/, .geminiignore, .qwenignore |
438
- | **Gemini-only workflow** | `/cli:cli-init --tool gemini` | Creates .gemini/ and .geminiignore only |
439
- | **Qwen-only workflow** | `/cli:cli-init --tool qwen` | Creates .qwen/ and .qwenignore only |
440
- | **Preview before commit** | `/cli:cli-init --preview` | Shows what would be generated |
441
- | **Update configurations** | `/cli:cli-init` | Regenerates all files with backups |