From 56acc4f19ce20b82ddf1c6cd0439ac7492da25b2 Mon Sep 17 00:00:00 2001 From: catlog22 Date: Sat, 17 Jan 2026 22:46:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(cli):=20=E4=BF=AE=E5=A4=8D=E9=80=9A?= =?UTF-8?q?=E7=94=A8=E6=8F=90=E7=A4=BA=E6=A8=A1=E6=9D=BF=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=EF=BC=8C=E7=A7=BB=E9=99=A4=E5=A4=9A=E4=BD=99=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/workflows/cli-tools-usage.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.claude/workflows/cli-tools-usage.md b/.claude/workflows/cli-tools-usage.md index da2f5469..7f3a8251 100644 --- a/.claude/workflows/cli-tools-usage.md +++ b/.claude/workflows/cli-tools-usage.md @@ -111,14 +111,12 @@ When primary tool fails or is unavailable: ### Universal Prompt Template ```bash -ccw cli -p " -PURPOSE: [what] + [why] + [success criteria] + [constraints/scope] +ccw cli -p "PURPOSE: [what] + [why] + [success criteria] + [constraints/scope] TASK: • [step 1: specific action] • [step 2: specific action] • [step 3: specific action] MODE: [analysis|write] CONTEXT: @[file patterns] | Memory: [session/tech/module context] EXPECTED: [deliverable format] + [quality criteria] + [structure requirements] -CONSTRAINTS: [domain constraints] -" --tool --mode --rule +CONSTRAINTS: [domain constraints]" --tool --mode --rule ``` ### Intent Capture Checklist (Before CLI Execution) @@ -407,8 +405,7 @@ CONSTRAINTS: Focus on authentication | Ignore test files **Implementation Task** (New Feature): ```bash -ccw cli -p " -PURPOSE: Implement rate limiting for API endpoints to prevent abuse; must be configurable per-endpoint; backward compatible with existing clients +ccw cli -p "PURPOSE: Implement rate limiting for API endpoints to prevent abuse; must be configurable per-endpoint; backward compatible with existing clients TASK: • Create rate limiter middleware with sliding window • Implement per-route configuration • Add Redis backend for distributed state • Include bypass for internal services MODE: write CONTEXT: @src/middleware/**/* @src/config/**/* | Memory: Using Express.js, Redis already configured, existing middleware pattern in auth.ts @@ -419,8 +416,7 @@ CONSTRAINTS: Follow existing middleware patterns | No breaking changes **Bug Fix Task**: ```bash -ccw cli -p " -PURPOSE: Fix memory leak in WebSocket connection handler causing server OOM after 24h; root cause must be identified before any fix +ccw cli -p "PURPOSE: Fix memory leak in WebSocket connection handler causing server OOM after 24h; root cause must be identified before any fix TASK: • Trace connection lifecycle from open to close • Identify event listener accumulation • Check cleanup on disconnect • Verify garbage collection eligibility MODE: analysis CONTEXT: @src/websocket/**/* @src/services/connection-manager.ts | Memory: Using ws library, ~5000 concurrent connections in production @@ -431,8 +427,7 @@ CONSTRAINTS: Focus on resource cleanup **Refactoring Task**: ```bash -ccw cli -p " -PURPOSE: Refactor payment processing to use strategy pattern for multi-gateway support; no functional changes; all existing tests must pass +ccw cli -p "PURPOSE: Refactor payment processing to use strategy pattern for multi-gateway support; no functional changes; all existing tests must pass TASK: • Extract gateway interface from current implementation • Create strategy classes for Stripe, PayPal • Implement factory for gateway selection • Migrate existing code to use strategies MODE: write CONTEXT: @src/payments/**/* @src/types/payment.ts | Memory: Currently only Stripe, adding PayPal next sprint, must support future gateways