claude-code-workflow 6.3.11 → 6.3.13

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 (33) hide show
  1. package/.claude/CLAUDE.md +33 -33
  2. package/.claude/agents/issue-plan-agent.md +77 -5
  3. package/.claude/agents/issue-queue-agent.md +122 -18
  4. package/.claude/commands/issue/execute.md +53 -40
  5. package/.claude/commands/issue/new.md +113 -11
  6. package/.claude/commands/issue/plan.md +112 -37
  7. package/.claude/commands/issue/queue.md +28 -18
  8. package/.claude/skills/software-manual/scripts/assemble_docsify.py +584 -0
  9. package/.claude/skills/software-manual/templates/css/docsify-base.css +984 -0
  10. package/.claude/skills/software-manual/templates/docsify-shell.html +466 -0
  11. package/.claude/workflows/cli-templates/schemas/issues-jsonl-schema.json +141 -168
  12. package/.claude/workflows/cli-templates/schemas/solution-schema.json +3 -2
  13. package/.codex/prompts/issue-execute.md +3 -3
  14. package/.codex/prompts/issue-queue.md +3 -3
  15. package/ccw/dist/commands/issue.d.ts.map +1 -1
  16. package/ccw/dist/commands/issue.js +2 -1
  17. package/ccw/dist/commands/issue.js.map +1 -1
  18. package/ccw/src/commands/issue.ts +2 -1
  19. package/ccw/src/templates/dashboard-css/33-cli-stream-viewer.css +580 -467
  20. package/ccw/src/templates/dashboard-js/components/cli-stream-viewer.js +532 -461
  21. package/ccw/src/templates/dashboard-js/components/notifications.js +774 -774
  22. package/ccw/src/templates/dashboard-js/i18n.js +4 -0
  23. package/ccw/src/templates/dashboard.html +10 -0
  24. package/ccw/src/tools/claude-cli-tools.ts +388 -388
  25. package/codex-lens/src/codexlens/__pycache__/config.cpython-313.pyc +0 -0
  26. package/codex-lens/src/codexlens/config.py +19 -3
  27. package/codex-lens/src/codexlens/search/__pycache__/ranking.cpython-313.pyc +0 -0
  28. package/codex-lens/src/codexlens/search/ranking.py +15 -4
  29. package/codex-lens/src/codexlens/semantic/__pycache__/vector_store.cpython-313.pyc +0 -0
  30. package/codex-lens/src/codexlens/semantic/vector_store.py +57 -47
  31. package/codex-lens/src/codexlens/storage/__pycache__/registry.cpython-313.pyc +0 -0
  32. package/codex-lens/src/codexlens/storage/registry.py +114 -101
  33. package/package.json +83 -83
@@ -0,0 +1,466 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <meta name="description" content="{{SOFTWARE_NAME}} - Interactive Software Manual">
7
+ <meta name="generator" content="software-manual-skill">
8
+ <title>{{SOFTWARE_NAME}} v{{VERSION}} - User Manual</title>
9
+ <style>
10
+ {{EMBEDDED_CSS}}
11
+ </style>
12
+ </head>
13
+ <body class="docsify-container" data-theme="light">
14
+ <!-- Sidebar Navigation -->
15
+ <aside class="sidebar" id="sidebar">
16
+ <!-- Logo and Title -->
17
+ <div class="sidebar-header">
18
+ <div class="logo">
19
+ <span class="logo-icon">{{LOGO_ICON}}</span>
20
+ <div class="logo-text">
21
+ <h1>{{SOFTWARE_NAME}}</h1>
22
+ <span class="version">v{{VERSION}}</span>
23
+ </div>
24
+ </div>
25
+ </div>
26
+
27
+ <!-- Search Box -->
28
+ <div class="sidebar-search">
29
+ <div class="search-box">
30
+ <svg class="search-icon" viewBox="0 0 24 24" width="16" height="16">
31
+ <circle cx="11" cy="11" r="8" fill="none" stroke="currentColor" stroke-width="2"/>
32
+ <path d="M21 21l-4.35-4.35" fill="none" stroke="currentColor" stroke-width="2"/>
33
+ </svg>
34
+ <input type="text" id="searchInput" placeholder="搜索文档..." aria-label="Search">
35
+ </div>
36
+ <div id="searchResults" class="search-results"></div>
37
+ </div>
38
+
39
+ <!-- Hierarchical Navigation -->
40
+ <nav class="sidebar-nav" id="sidebarNav">
41
+ {{SIDEBAR_NAV_HTML}}
42
+ </nav>
43
+ </aside>
44
+
45
+ <!-- Main Content Area -->
46
+ <main class="main-content" id="mainContent">
47
+ <!-- Mobile Header -->
48
+ <header class="mobile-header">
49
+ <button class="sidebar-toggle" id="sidebarToggle" aria-label="Toggle sidebar">
50
+ <svg viewBox="0 0 24 24" width="24" height="24">
51
+ <path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" fill="currentColor"/>
52
+ </svg>
53
+ </button>
54
+ <span class="current-section" id="currentSection">{{SOFTWARE_NAME}}</span>
55
+ <button class="theme-toggle-mobile" id="themeToggleMobile" aria-label="Toggle theme">
56
+ <span class="sun-icon">&#9728;</span>
57
+ <span class="moon-icon">&#9790;</span>
58
+ </button>
59
+ </header>
60
+
61
+ <!-- Content Sections (only one visible at a time) -->
62
+ <div class="content-wrapper">
63
+ {{SECTIONS_HTML}}
64
+ </div>
65
+
66
+ <!-- Footer -->
67
+ <footer class="main-footer">
68
+ <p>Generated by <strong>software-manual-skill</strong> | Last updated: {{TIMESTAMP}}</p>
69
+ </footer>
70
+ </main>
71
+
72
+ <!-- Theme Toggle (Desktop) -->
73
+ <button class="theme-toggle" id="themeToggle" aria-label="Toggle theme">
74
+ <span class="sun-icon">&#9728;</span>
75
+ <span class="moon-icon">&#9790;</span>
76
+ </button>
77
+
78
+ <!-- Back to Top -->
79
+ <button class="back-to-top" id="backToTop" aria-label="Back to top">
80
+ <svg viewBox="0 0 24 24" width="20" height="20">
81
+ <path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" fill="currentColor"/>
82
+ </svg>
83
+ </button>
84
+
85
+ <!-- Search Index Data -->
86
+ <script id="search-index" type="application/json">
87
+ {{SEARCH_INDEX_JSON}}
88
+ </script>
89
+
90
+ <!-- Navigation Structure Data -->
91
+ <script id="nav-structure" type="application/json">
92
+ {{NAV_STRUCTURE_JSON}}
93
+ </script>
94
+
95
+ <!-- Mermaid.js for diagram rendering -->
96
+ <script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
97
+ <script>
98
+ mermaid.initialize({
99
+ startOnLoad: false,
100
+ theme: document.body.dataset.theme === 'dark' ? 'dark' : 'default',
101
+ securityLevel: 'loose'
102
+ });
103
+ </script>
104
+
105
+ <!-- Embedded JavaScript -->
106
+ <script>
107
+ (function() {
108
+ 'use strict';
109
+
110
+ // ========== State Management ==========
111
+ let currentSectionId = null;
112
+ const sections = document.querySelectorAll('.content-section');
113
+ const navItems = document.querySelectorAll('.nav-item');
114
+
115
+ // ========== Section Navigation ==========
116
+ function showSection(sectionId) {
117
+ // Hide all sections
118
+ sections.forEach(s => s.classList.remove('active'));
119
+
120
+ // Show target section
121
+ const target = document.getElementById('section-' + sectionId);
122
+ if (target) {
123
+ target.classList.add('active');
124
+ currentSectionId = sectionId;
125
+
126
+ // Update URL hash
127
+ history.pushState(null, '', '#/' + sectionId);
128
+
129
+ // Update nav active state
130
+ navItems.forEach(item => {
131
+ item.classList.remove('active');
132
+ if (item.dataset.section === sectionId) {
133
+ item.classList.add('active');
134
+ // Expand parent groups
135
+ expandParentGroups(item);
136
+ }
137
+ });
138
+
139
+ // Update mobile header
140
+ const currentSectionEl = document.getElementById('currentSection');
141
+ if (currentSectionEl && target.dataset.title) {
142
+ currentSectionEl.textContent = target.dataset.title;
143
+ }
144
+
145
+ // Scroll to top
146
+ document.getElementById('mainContent').scrollTop = 0;
147
+ }
148
+ }
149
+
150
+ function expandParentGroups(item) {
151
+ let parent = item.parentElement;
152
+ while (parent) {
153
+ if (parent.classList.contains('nav-group')) {
154
+ parent.classList.add('expanded');
155
+ const toggle = parent.querySelector('.nav-group-toggle');
156
+ if (toggle) toggle.setAttribute('aria-expanded', 'true');
157
+ }
158
+ parent = parent.parentElement;
159
+ }
160
+ }
161
+
162
+ // ========== Navigation Click Handlers ==========
163
+ navItems.forEach(item => {
164
+ item.addEventListener('click', function(e) {
165
+ e.preventDefault();
166
+ const sectionId = this.dataset.section;
167
+ if (sectionId) {
168
+ showSection(sectionId);
169
+ // Close sidebar on mobile
170
+ document.getElementById('sidebar').classList.remove('open');
171
+ }
172
+ });
173
+ });
174
+
175
+ // ========== Navigation Group Toggle ==========
176
+ document.querySelectorAll('.nav-group-toggle').forEach(toggle => {
177
+ toggle.addEventListener('click', function(e) {
178
+ e.stopPropagation();
179
+ const group = this.closest('.nav-group');
180
+ group.classList.toggle('expanded');
181
+ this.setAttribute('aria-expanded', group.classList.contains('expanded'));
182
+ });
183
+ });
184
+
185
+ // ========== Search Functionality ==========
186
+ const indexData = JSON.parse(document.getElementById('search-index').textContent);
187
+ const searchInput = document.getElementById('searchInput');
188
+ const searchResults = document.getElementById('searchResults');
189
+
190
+ function searchDocs(query) {
191
+ if (!query || query.length < 2) return [];
192
+
193
+ const results = [];
194
+ const lowerQuery = query.toLowerCase();
195
+
196
+ for (const [id, content] of Object.entries(indexData)) {
197
+ let score = 0;
198
+ const titleLower = content.title.toLowerCase();
199
+ const bodyLower = content.body.toLowerCase();
200
+
201
+ if (titleLower.includes(lowerQuery)) score += 10;
202
+ if (bodyLower.includes(lowerQuery)) score += 5;
203
+
204
+ if (score > 0) {
205
+ results.push({
206
+ id,
207
+ title: content.title,
208
+ excerpt: getExcerpt(content.body, query),
209
+ score
210
+ });
211
+ }
212
+ }
213
+
214
+ return results.sort((a, b) => b.score - a.score).slice(0, 8);
215
+ }
216
+
217
+ function getExcerpt(text, query) {
218
+ const maxLength = 120;
219
+ const lowerText = text.toLowerCase();
220
+ const lowerQuery = query.toLowerCase();
221
+ const index = lowerText.indexOf(lowerQuery);
222
+
223
+ if (index === -1) {
224
+ return text.substring(0, maxLength) + (text.length > maxLength ? '...' : '');
225
+ }
226
+
227
+ const start = Math.max(0, index - 30);
228
+ const end = Math.min(text.length, index + query.length + 60);
229
+ let excerpt = text.substring(start, end);
230
+
231
+ if (start > 0) excerpt = '...' + excerpt;
232
+ if (end < text.length) excerpt += '...';
233
+
234
+ const regex = new RegExp('(' + query.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + ')', 'gi');
235
+ return excerpt.replace(regex, '<mark>$1</mark>');
236
+ }
237
+
238
+ searchInput.addEventListener('input', function() {
239
+ const query = this.value.trim();
240
+ const results = searchDocs(query);
241
+
242
+ if (results.length === 0) {
243
+ searchResults.innerHTML = query.length >= 2
244
+ ? '<div class="no-results">未找到结果</div>'
245
+ : '';
246
+ searchResults.classList.toggle('visible', query.length >= 2);
247
+ return;
248
+ }
249
+
250
+ searchResults.innerHTML = results.map(r => `
251
+ <a href="#/${r.id}" class="search-result-item" data-section="${r.id}">
252
+ <div class="result-title">${r.title}</div>
253
+ <div class="result-excerpt">${r.excerpt}</div>
254
+ </a>
255
+ `).join('');
256
+ searchResults.classList.add('visible');
257
+ });
258
+
259
+ searchResults.addEventListener('click', function(e) {
260
+ const item = e.target.closest('.search-result-item');
261
+ if (item) {
262
+ e.preventDefault();
263
+ searchInput.value = '';
264
+ searchResults.innerHTML = '';
265
+ searchResults.classList.remove('visible');
266
+ showSection(item.dataset.section);
267
+ }
268
+ });
269
+
270
+ // Close search results when clicking outside
271
+ document.addEventListener('click', function(e) {
272
+ if (!e.target.closest('.sidebar-search')) {
273
+ searchResults.classList.remove('visible');
274
+ }
275
+ });
276
+
277
+ // ========== Theme Toggle ==========
278
+ function setTheme(theme) {
279
+ document.body.dataset.theme = theme;
280
+ localStorage.setItem('docs-theme', theme);
281
+ }
282
+
283
+ const savedTheme = localStorage.getItem('docs-theme') || 'light';
284
+ setTheme(savedTheme);
285
+
286
+ document.getElementById('themeToggle').addEventListener('click', function() {
287
+ setTheme(document.body.dataset.theme === 'dark' ? 'light' : 'dark');
288
+ });
289
+
290
+ document.getElementById('themeToggleMobile').addEventListener('click', function() {
291
+ setTheme(document.body.dataset.theme === 'dark' ? 'light' : 'dark');
292
+ });
293
+
294
+ // ========== Sidebar Toggle (Mobile) ==========
295
+ document.getElementById('sidebarToggle').addEventListener('click', function() {
296
+ document.getElementById('sidebar').classList.toggle('open');
297
+ });
298
+
299
+ // Close sidebar when clicking outside on mobile
300
+ document.addEventListener('click', function(e) {
301
+ const sidebar = document.getElementById('sidebar');
302
+ const toggle = document.getElementById('sidebarToggle');
303
+ if (!sidebar.contains(e.target) && !toggle.contains(e.target)) {
304
+ sidebar.classList.remove('open');
305
+ }
306
+ });
307
+
308
+ // ========== Back to Top ==========
309
+ const backToTop = document.getElementById('backToTop');
310
+ const mainContent = document.getElementById('mainContent');
311
+
312
+ mainContent.addEventListener('scroll', function() {
313
+ backToTop.classList.toggle('visible', this.scrollTop > 300);
314
+ });
315
+
316
+ backToTop.addEventListener('click', function() {
317
+ mainContent.scrollTo({ top: 0, behavior: 'smooth' });
318
+ });
319
+
320
+ // ========== Code Block Copy ==========
321
+ document.querySelectorAll('pre').forEach(pre => {
322
+ const wrapper = document.createElement('div');
323
+ wrapper.className = 'code-block-wrapper';
324
+ pre.parentNode.insertBefore(wrapper, pre);
325
+ wrapper.appendChild(pre);
326
+
327
+ const copyBtn = document.createElement('button');
328
+ copyBtn.className = 'copy-code-btn';
329
+ copyBtn.innerHTML = '<svg viewBox="0 0 24 24" width="16" height="16"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" fill="currentColor"/></svg>';
330
+ copyBtn.addEventListener('click', function() {
331
+ const code = pre.querySelector('code') || pre;
332
+ navigator.clipboard.writeText(code.textContent).then(() => {
333
+ copyBtn.innerHTML = '<svg viewBox="0 0 24 24" width="16" height="16"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" fill="currentColor"/></svg>';
334
+ setTimeout(() => {
335
+ copyBtn.innerHTML = '<svg viewBox="0 0 24 24" width="16" height="16"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" fill="currentColor"/></svg>';
336
+ }, 2000);
337
+ });
338
+ });
339
+ wrapper.appendChild(copyBtn);
340
+ });
341
+
342
+ // ========== Mermaid Diagram Rendering ==========
343
+ function renderMermaidDiagrams() {
344
+ // Find all mermaid code blocks and convert them to diagrams
345
+ document.querySelectorAll('pre code.language-mermaid, pre code.highlight-mermaid').forEach((codeBlock, index) => {
346
+ const pre = codeBlock.parentElement;
347
+ const wrapper = pre.parentElement;
348
+ const code = codeBlock.textContent;
349
+
350
+ // Create mermaid container
351
+ const mermaidDiv = document.createElement('div');
352
+ mermaidDiv.className = 'mermaid';
353
+ mermaidDiv.textContent = code;
354
+
355
+ // Replace code block with mermaid div
356
+ if (wrapper && wrapper.classList.contains('code-block-wrapper')) {
357
+ wrapper.parentElement.replaceChild(mermaidDiv, wrapper);
358
+ } else {
359
+ pre.parentElement.replaceChild(mermaidDiv, pre);
360
+ }
361
+ });
362
+
363
+ // Also handle codehilite blocks with mermaid
364
+ document.querySelectorAll('.highlight').forEach((block) => {
365
+ const code = block.querySelector('code, pre');
366
+ if (code && code.textContent.trim().startsWith('graph ') ||
367
+ code && code.textContent.trim().startsWith('sequenceDiagram') ||
368
+ code && code.textContent.trim().startsWith('flowchart ') ||
369
+ code && code.textContent.trim().startsWith('classDiagram') ||
370
+ code && code.textContent.trim().startsWith('stateDiagram') ||
371
+ code && code.textContent.trim().startsWith('erDiagram') ||
372
+ code && code.textContent.trim().startsWith('gantt') ||
373
+ code && code.textContent.trim().startsWith('pie') ||
374
+ code && code.textContent.trim().startsWith('journey')) {
375
+ const mermaidDiv = document.createElement('div');
376
+ mermaidDiv.className = 'mermaid';
377
+ mermaidDiv.textContent = code.textContent;
378
+ block.parentElement.replaceChild(mermaidDiv, block);
379
+ }
380
+ });
381
+
382
+ // Render all mermaid diagrams
383
+ if (typeof mermaid !== 'undefined') {
384
+ mermaid.run();
385
+ }
386
+ }
387
+
388
+ // ========== Internal Anchor Links Handler ==========
389
+ // Handle clicks on internal anchor links (TOC links like #材料管理api)
390
+ document.addEventListener('click', function(e) {
391
+ const link = e.target.closest('a[href^="#"]');
392
+ if (!link) return;
393
+
394
+ const href = link.getAttribute('href');
395
+ // Skip section navigation links (handled by nav-item)
396
+ if (link.classList.contains('nav-item')) return;
397
+ // Skip search result links
398
+ if (link.classList.contains('search-result-item')) return;
399
+
400
+ // Check if it's an internal anchor (not a section link)
401
+ if (href && href.startsWith('#') && !href.startsWith('#/')) {
402
+ e.preventDefault();
403
+ const anchorId = href.substring(1);
404
+ const targetElement = document.getElementById(anchorId);
405
+
406
+ if (targetElement) {
407
+ // Scroll to the anchor within current section
408
+ targetElement.scrollIntoView({ behavior: 'smooth', block: 'start' });
409
+ // Update URL without triggering popstate
410
+ history.pushState(null, '', '#/' + currentSectionId + '/' + anchorId);
411
+ }
412
+ }
413
+ });
414
+
415
+ // ========== Hash Parser ==========
416
+ function parseHash(hash) {
417
+ // Handle formats: #/sectionId, #/sectionId/anchorId, #anchorId
418
+ if (!hash || hash === '#' || hash === '#/') return { section: null, anchor: null };
419
+
420
+ if (hash.startsWith('#/')) {
421
+ const parts = hash.substring(2).split('/');
422
+ return { section: parts[0] || null, anchor: parts[1] || null };
423
+ } else {
424
+ // Plain anchor like #材料管理api - stay on current section
425
+ return { section: null, anchor: hash.substring(1) };
426
+ }
427
+ }
428
+
429
+ // ========== Initial Load ==========
430
+ // Check URL hash or show first section
431
+ const initialHash = parseHash(window.location.hash);
432
+ if (initialHash.section && document.getElementById('section-' + initialHash.section)) {
433
+ showSection(initialHash.section);
434
+ // Scroll to anchor if present
435
+ if (initialHash.anchor) {
436
+ setTimeout(() => {
437
+ const anchor = document.getElementById(initialHash.anchor);
438
+ if (anchor) anchor.scrollIntoView({ behavior: 'smooth', block: 'start' });
439
+ }, 100);
440
+ }
441
+ } else if (sections.length > 0) {
442
+ const firstSection = sections[0].id.replace('section-', '');
443
+ showSection(firstSection);
444
+ }
445
+
446
+ // Render mermaid diagrams after initial load
447
+ setTimeout(renderMermaidDiagrams, 100);
448
+
449
+ // Handle browser back/forward
450
+ window.addEventListener('popstate', function() {
451
+ const parsed = parseHash(window.location.hash);
452
+ if (parsed.section) {
453
+ showSection(parsed.section);
454
+ if (parsed.anchor) {
455
+ setTimeout(() => {
456
+ const anchor = document.getElementById(parsed.anchor);
457
+ if (anchor) anchor.scrollIntoView({ behavior: 'smooth', block: 'start' });
458
+ }, 100);
459
+ }
460
+ }
461
+ });
462
+
463
+ })();
464
+ </script>
465
+ </body>
466
+ </html>