Skip to content

Commit 1bf9006

Browse files
author
catlog22
committed
Refactor Chinese documentation for team skills and commands
- Removed outdated table of contents from commands-skills.md - Updated skills overview in claude-collaboration.md with new skill names and descriptions - Enhanced clarity and structure of skills details, including roles and pipelines - Added new team skills: team-arch-opt, team-perf-opt, team-brainstorm, team-frontend, team-uidesign, team-issue, team-iterdev, team-quality-assurance, team-roadmap-dev, team-tech-debt, team-ultra-analyze - Improved user command section for better usability - Streamlined best practices for team skills usage
1 parent 99d6438 commit 1bf9006

13 files changed

Lines changed: 1814 additions & 1115 deletions

File tree

ccw/src/core/websocket.ts

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,9 @@ const THROTTLE_CONFIG = new Map<string, { interval: number; category: ThrottleCa
6767
['COORDINATOR_QUESTION_ASKED', { interval: 0, category: 'immediate' }],
6868
['COORDINATOR_ANSWER_RECEIVED', { interval: 0, category: 'immediate' }],
6969
['LOOP_COMPLETED', { interval: 0, category: 'immediate' }],
70-
['LOOP_COMPLETED' as any, { interval: 0, category: 'immediate' }],
71-
].filter(([key]) => key !== 'LOOP_COMPLETED' as any)
70+
] as const
7271
);
7372

74-
// Add LOOP_COMPLETED separately to avoid type issues
75-
THROTTLE_CONFIG.set('LOOP_COMPLETED', { interval: 0, category: 'immediate' });
76-
7773
/** Per-message-type throttle tracking */
7874
const throttleState = new Map<string, ThrottleEntry>();
7975

@@ -563,36 +559,6 @@ export function parseWebSocketFrame(buffer: Buffer): { opcode: number; payload:
563559
return { opcode, payload: payload.toString('utf8'), frameLength };
564560
}
565561

566-
/**
567-
* Create WebSocket frame
568-
*/
569-
export function createWebSocketFrame(data: unknown): Buffer {
570-
const payload = Buffer.from(JSON.stringify(data), 'utf8');
571-
const length = payload.length;
572-
573-
let frame;
574-
if (length <= 125) {
575-
frame = Buffer.alloc(2 + length);
576-
frame[0] = 0x81; // Text frame, FIN
577-
frame[1] = length;
578-
payload.copy(frame, 2);
579-
} else if (length <= 65535) {
580-
frame = Buffer.alloc(4 + length);
581-
frame[0] = 0x81;
582-
frame[1] = 126;
583-
frame.writeUInt16BE(length, 2);
584-
payload.copy(frame, 4);
585-
} else {
586-
frame = Buffer.alloc(10 + length);
587-
frame[0] = 0x81;
588-
frame[1] = 127;
589-
frame.writeBigUInt64BE(BigInt(length), 2);
590-
payload.copy(frame, 10);
591-
}
592-
593-
return frame;
594-
}
595-
596562
/**
597563
* Extract session ID from file path
598564
*/

ccw/src/tools/cli-history-store.ts

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -267,53 +267,37 @@ export class CliHistoryStore {
267267
const hasProjectRoot = tableInfo.some(col => col.name === 'project_root');
268268
const hasRelativePath = tableInfo.some(col => col.name === 'relative_path');
269269

270+
// Silent migrations - only log warnings/errors
270271
if (!hasCategory) {
271-
console.log('[CLI History] Migrating database: adding category column...');
272-
this.db.exec(`
273-
ALTER TABLE conversations ADD COLUMN category TEXT DEFAULT 'user';
274-
`);
275-
// Create index separately to handle potential errors
272+
this.db.exec(`ALTER TABLE conversations ADD COLUMN category TEXT DEFAULT 'user';`);
276273
try {
277274
this.db.exec(`CREATE INDEX IF NOT EXISTS idx_conversations_category ON conversations(category);`);
278275
} catch (indexErr) {
279276
console.warn('[CLI History] Category index creation warning:', (indexErr as Error).message);
280277
}
281-
console.log('[CLI History] Migration complete: category column added');
282278
}
283279

284280
if (!hasParentExecutionId) {
285-
console.log('[CLI History] Migrating database: adding parent_execution_id column...');
286-
this.db.exec(`
287-
ALTER TABLE conversations ADD COLUMN parent_execution_id TEXT;
288-
`);
281+
this.db.exec(`ALTER TABLE conversations ADD COLUMN parent_execution_id TEXT;`);
289282
try {
290283
this.db.exec(`CREATE INDEX IF NOT EXISTS idx_conversations_parent ON conversations(parent_execution_id);`);
291284
} catch (indexErr) {
292285
console.warn('[CLI History] Parent execution index creation warning:', (indexErr as Error).message);
293286
}
294-
console.log('[CLI History] Migration complete: parent_execution_id column added');
295287
}
296288

297289
// Add hierarchical storage support columns
298290
if (!hasProjectRoot) {
299-
console.log('[CLI History] Migrating database: adding project_root column for hierarchical storage...');
300-
this.db.exec(`
301-
ALTER TABLE conversations ADD COLUMN project_root TEXT;
302-
`);
291+
this.db.exec(`ALTER TABLE conversations ADD COLUMN project_root TEXT;`);
303292
try {
304293
this.db.exec(`CREATE INDEX IF NOT EXISTS idx_conversations_project_root ON conversations(project_root);`);
305294
} catch (indexErr) {
306295
console.warn('[CLI History] Project root index creation warning:', (indexErr as Error).message);
307296
}
308-
console.log('[CLI History] Migration complete: project_root column added');
309297
}
310298

311299
if (!hasRelativePath) {
312-
console.log('[CLI History] Migrating database: adding relative_path column for hierarchical storage...');
313-
this.db.exec(`
314-
ALTER TABLE conversations ADD COLUMN relative_path TEXT;
315-
`);
316-
console.log('[CLI History] Migration complete: relative_path column added');
300+
this.db.exec(`ALTER TABLE conversations ADD COLUMN relative_path TEXT;`);
317301
}
318302

319303
// Add missing timestamp index for turns table (for time-based queries)
@@ -324,9 +308,7 @@ export class CliHistoryStore {
324308
`).get();
325309

326310
if (!indexExists) {
327-
console.log('[CLI History] Adding missing timestamp index to turns table...');
328311
this.db.exec(`CREATE INDEX IF NOT EXISTS idx_turns_timestamp ON turns(timestamp DESC);`);
329-
console.log('[CLI History] Migration complete: turns timestamp index added');
330312
}
331313
} catch (indexErr) {
332314
console.warn('[CLI History] Turns timestamp index creation warning:', (indexErr as Error).message);
@@ -353,32 +335,24 @@ export class CliHistoryStore {
353335
}
354336
}
355337

356-
// Batch migration - only output log if there are columns to migrate
338+
// Batch migration - silent
357339
if (missingTurnsColumns.length > 0) {
358-
console.log(`[CLI History] Migrating turns table: adding ${missingTurnsColumns.length} columns (${missingTurnsColumns.join(', ')})...`);
359-
360340
for (const col of missingTurnsColumns) {
361341
this.db.exec(`ALTER TABLE turns ADD COLUMN ${col} ${turnsColumnDefs[col]};`);
362342
}
363-
364-
console.log('[CLI History] Migration complete: turns table updated');
365343
}
366344

367345
// Add transaction_id column to native_session_mapping table for concurrent session disambiguation
368346
const mappingInfo = this.db.prepare('PRAGMA table_info(native_session_mapping)').all() as Array<{ name: string }>;
369347
const hasTransactionId = mappingInfo.some(col => col.name === 'transaction_id');
370348

371349
if (!hasTransactionId) {
372-
console.log('[CLI History] Migrating database: adding transaction_id column to native_session_mapping...');
373-
this.db.exec(`
374-
ALTER TABLE native_session_mapping ADD COLUMN transaction_id TEXT;
375-
`);
350+
this.db.exec(`ALTER TABLE native_session_mapping ADD COLUMN transaction_id TEXT;`);
376351
try {
377352
this.db.exec(`CREATE INDEX IF NOT EXISTS idx_native_transaction_id ON native_session_mapping(transaction_id);`);
378353
} catch (indexErr) {
379354
console.warn('[CLI History] Transaction ID index creation warning:', (indexErr as Error).message);
380355
}
381-
console.log('[CLI History] Migration complete: transaction_id column added');
382356
}
383357
} catch (err) {
384358
console.error('[CLI History] Migration error:', (err as Error).message);

docs/.vitepress/config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ export default withMermaid(defineConfig({
7575
{ text: 'Guide', link: '/guide/ch01-what-is-claude-dms3' },
7676
{ text: 'Commands', link: '/commands/claude/' },
7777
{ text: 'Skills', link: '/skills/' },
78-
{ text: 'Features', link: '/features/spec' },
79-
{ text: 'Components', link: '/components/' }
78+
{ text: 'Features', link: '/features/spec' }
8079
],
8180

8281
// Sidebar - 优化导航结构,增加二级标题和归类
@@ -423,7 +422,6 @@ export default withMermaid(defineConfig({
423422
{ text: '命令', link: '/zh/commands/claude/' },
424423
{ text: '技能', link: '/zh/skills/claude-index' },
425424
{ text: '功能', link: '/zh/features/spec' },
426-
{ text: '组件', link: '/zh/components/' },
427425
{ text: '参考', link: '/zh/reference/commands-skills' }
428426
],
429427
sidebar: {

0 commit comments

Comments
 (0)