mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
- Implemented CliCommandNode component for executing CLI tools with AI models. - Implemented PromptNode component for constructing AI prompts with context. - Added styling for mode and tool badges in both components. - Enhanced user experience with command and argument previews, execution status, and error handling. test: add comprehensive tests for ask_question tool - Created direct test for ask_question tool execution. - Developed end-to-end tests to validate ask_question tool integration with WebSocket and A2UI surfaces. - Implemented simple and integrated WebSocket tests to ensure proper message handling and surface reception. - Added tool registration test to verify ask_question tool is correctly registered. chore: add WebSocket listener and simulation tests - Added WebSocket listener for A2UI surfaces to facilitate testing. - Implemented frontend simulation test to validate complete flow from backend to frontend. - Created various test scripts to ensure robust testing of ask_question tool functionality.
1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
"use strict";(globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[]).push([[47],{1184(e,n,r){r.d(n,{R:()=>i,x:()=>a});var t=r(3696);const s={},o=t.createContext(s);function i(e){const n=t.useContext(o);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),t.createElement(o.Provider,{value:n},e.children)}},4965(e,n,r){r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>m,frontMatter:()=>i,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"commands/memory/memory-load","title":"/memory:load","description":"Load project context and core content into memory","source":"@site/docs/commands/memory/memory-load.mdx","sourceDirName":"commands/memory","slug":"/commands/memory/memory-load","permalink":"/docs/docs/commands/memory/memory-load","draft":false,"unlisted":false,"editUrl":"https://github.com/ccw/docs/tree/main/docs/commands/memory/memory-load.mdx","tags":[],"version":"current","sidebarPosition":3,"frontMatter":{"title":"/memory:load","sidebar_label":"/memory:load","sidebar_position":3,"description":"Load project context and core content into memory"},"sidebar":"docs","previous":{"title":"/memory:update-related","permalink":"/docs/docs/commands/memory/memory-update-related"},"next":{"title":"/memory:docs-full-cli","permalink":"/docs/docs/commands/memory/memory-docs-full-cli"}}');var s=r(2540),o=r(1184);const i={title:"/memory:load",sidebar_label:"/memory:load",sidebar_position:3,description:"Load project context and core content into memory"},a="/memory",c={},l=[{value:"Overview",id:"overview",level:2},{value:"Features",id:"features",level:2},{value:"Usage",id:"usage",level:2},{value:"Execution Flow",id:"execution-flow",level:2},{value:"Output Format",id:"output-format",level:2},{value:"Examples",id:"examples",level:2},{value:"Basic Usage",id:"basic-usage",level:3},{value:"Scoped Analysis",id:"scoped-analysis",level:3},{value:"Core Content Pack Categories",id:"core-content-pack-categories",level:2},{value:"Components",id:"components",level:3},{value:"Data Structures",id:"data-structures",level:3},{value:"Patterns",id:"patterns",level:3},{value:"Benefits",id:"benefits",level:2},{value:"Related Commands",id:"related-commands",level:2},{value:"Notes",id:"notes",level:2}];function d(e){const n={code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsxs)(n.h1,{id:"memory",children:["/memory",":load"]})}),"\n",(0,s.jsx)(n.p,{children:'Delegate to a universal-executor agent to analyze the project and return a structured "Core Content Pack" for memory optimization.'}),"\n",(0,s.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"/memory:load"})," command analyzes the project and returns a structured content package loaded directly into main thread memory, providing essential context for subsequent agent operations while minimizing token consumption."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Core Philosophy"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Agent-Driven"}),": Fully delegates execution to universal-executor agent"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Read-Only Analysis"}),": Does not modify code, only extracts context"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Structured Output"}),": Returns standardized JSON content package"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Memory Optimization"}),": Package loaded directly into main thread memory"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Token Efficiency"}),": CLI analysis executed within agent to save tokens"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"features",children:"Features"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Project Analysis"})," - Comprehensive codebase understanding"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Core Content Extraction"})," - Identifies key components and patterns"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Structured Output"})," - JSON format for easy integration"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Memory Optimization"})," - Reduces token usage for subsequent operations"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Tech Stack Detection"})," - Automatic identification of technologies used"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# Load project context into memory\r\n/memory:load\r\n\r\n# Load with custom scope\r\n/memory:load --path src/features\r\n\r\n# Load with specific depth\r\n/memory:load --depth 3\n"})}),"\n",(0,s.jsx)(n.h2,{id:"execution-flow",children:"Execution Flow"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"User Input\r\n \u2193\r\nDelegate to universal-executor agent\r\n \u2193\r\nPhase 1: Project Analysis\r\n \u251c\u2500 Analyze project structure\r\n \u251c\u2500 Identify tech stack\r\n \u251c\u2500 Detect key components\r\n \u2514\u2500 Extract architectural patterns\r\n \u2193\r\nPhase 2: Core Content Extraction\r\n \u251c\u2500 Extract main components\r\n \u251c\u2500 Identify data structures\r\n \u251c\u2500 Find key interfaces\r\n \u2514\u2500 Document important patterns\r\n \u2193\r\nPhase 3: Structured Output Generation\r\n \u251c\u2500 Format as JSON\r\n \u251c\u2500 Organize by categories\r\n \u2514\u2500 Add metadata\r\n \u2193\r\nPhase 4: Memory Loading\r\n \u251c\u2500 Load into main thread memory\r\n \u251c\u2500 Make available for subsequent operations\r\n \u2514\u2500 Display summary\n"})}),"\n",(0,s.jsx)(n.h2,{id:"output-format",children:"Output Format"}),"\n",(0,s.jsx)(n.p,{children:'The command returns a structured "Core Content Pack":'}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\r\n "project_name": "string",\r\n "tech_stack": ["list", "of", "technologies"],\r\n "architecture": {\r\n "overview": "string",\r\n "key_components": ["list"],\r\n "patterns": ["list"]\r\n },\r\n "core_content": {\r\n "components": [\r\n {\r\n "name": "string",\r\n "purpose": "string",\r\n "location": "path",\r\n "dependencies": ["list"]\r\n }\r\n ],\r\n "data_structures": [\r\n {\r\n "name": "string",\r\n "purpose": "string",\r\n "location": "path"\r\n }\r\n ],\r\n "interfaces": [\r\n {\r\n "name": "string",\r\n "methods": ["list"],\r\n "location": "path"\r\n }\r\n ]\r\n },\r\n "metadata": {\r\n "total_modules": number,\r\n "depth_analyzed": number,\r\n "timestamp": "ISO8601"\r\n }\r\n}\n'})}),"\n",(0,s.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,s.jsx)(n.h3,{id:"basic-usage",children:"Basic Usage"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# Load full project context\r\n/memory:load\r\n\r\n# Output:\r\n# Delegating to universal-executor agent...\r\n# Analyzing project structure...\r\n# Detected: TypeScript, React, Node.js\r\n# Extracting core content...\r\n# Core Content Pack loaded:\r\n# - 45 components identified\r\n# - 12 data structures\r\n# - 28 interfaces\r\n# Memory load complete\n"})}),"\n",(0,s.jsx)(n.h3,{id:"scoped-analysis",children:"Scoped Analysis"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# Load specific directory\r\n/memory:load --path src/features/auth\r\n\r\n# Only analyzes auth feature\n"})}),"\n",(0,s.jsx)(n.h2,{id:"core-content-pack-categories",children:"Core Content Pack Categories"}),"\n",(0,s.jsx)(n.h3,{id:"components",children:"Components"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Main application components"}),"\n",(0,s.jsx)(n.li,{children:"UI elements"}),"\n",(0,s.jsx)(n.li,{children:"Service classes"}),"\n",(0,s.jsx)(n.li,{children:"Utility functions"}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"data-structures",children:"Data Structures"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Type definitions"}),"\n",(0,s.jsx)(n.li,{children:"Interfaces"}),"\n",(0,s.jsx)(n.li,{children:"Enums"}),"\n",(0,s.jsx)(n.li,{children:"Configuration schemas"}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"patterns",children:"Patterns"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Architectural patterns"}),"\n",(0,s.jsx)(n.li,{children:"Design patterns"}),"\n",(0,s.jsx)(n.li,{children:"Coding conventions"}),"\n",(0,s.jsx)(n.li,{children:"Best practices"}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"benefits",children:"Benefits"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Token Efficiency"})," - Reduces token usage for subsequent operations"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Faster Context Loading"})," - Pre-loaded content available immediately"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Improved Accuracy"})," - Better context for agent decisions"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Structured Knowledge"})," - Organized project information"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Quick Navigation"})," - Easy access to key components"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"related-commands",children:"Related Commands"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsxs)(n.strong,{children:["/memory",":update-full"]})," - Full project documentation update"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsxs)(n.strong,{children:["/memory",":update-related"]})," - Changed module documentation update"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsxs)(n.strong,{children:["/memory",":compact"]})," - Compact session memory"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"notes",children:"Notes"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Read-only operation"})," - Does not modify any files"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Agent-driven"})," - Fully delegates to universal-executor agent"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Memory optimization"})," - Reduces token consumption for subsequent operations"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Project agnostic"})," - Works with any project type and structure"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Automatic tech stack detection"})," - Identifies technologies in use"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Structured output"})," - JSON format for easy integration"]}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}}}]); |