@@ -21,13 +21,13 @@ public static async Task<string> GenerateThinkCataloguePromptAsync(ClassifyType?
2121 var enhancementLevel = Math . Min ( attemptNumber , 3 ) ;
2222 var enhancement = enhancementLevel switch
2323 {
24- 0 => "\n \n Please provide a comprehensive analysis in JSON format within <documentation_structure> tags." ,
24+ 0 => "\n \n Generate documentation catalog in the specified hierarchical JSON format within <documentation_structure> tags." ,
2525 1 =>
26- "\n \n IMPORTANT: You must respond with valid JSON wrapped in <documentation_structure> tags. Ensure the JSON is properly formatted and complete ." ,
26+ "\n \n IMPORTANT: You must respond with valid JSON using the items/children structure within <documentation_structure> tags. Follow the exact format specified ." ,
2727 2 =>
28- "\n \n CRITICAL: Previous attempts failed. Please provide ONLY valid JSON within <documentation_structure> tags. Double-check JSON syntax before responding ." ,
28+ "\n \n CRITICAL: Previous attempts failed. Generate ONLY valid JSON within <documentation_structure> tags. Use the hierarchical items structure with title, name, and children fields ." ,
2929 _ =>
30- "\n \n FINAL ATTEMPT: Respond with MINIMAL but VALID JSON in <documentation_structure> tags. Focus on basic structure : {\" categories \" :[{\" name \" :\" ... \" ,\" description \" :\" ...\" }] ,\" architecture_overview \" :\" ...\" }. Ensure valid JSON syntax ."
30+ "\n \n FINAL ATTEMPT: Generate minimal but valid JSON structure. Must include : {\" items \" :[{\" title \" :\" getting-started \" ,\" name \" :\" 入门指南 \" , \" children \" :[ ...]},{ \" title \" : \" deep-dive \" ,\" name \" :\" 深入解剖 \" , \" children \" :[ ...]}]} ."
3131 } ;
3232
3333 return basePrompt + enhancement ;
@@ -40,109 +40,85 @@ private static string GetProjectTypeDescription(ClassifyType? classifyType)
4040 {
4141 return """
4242 ## Application System
43- You are generating a documentation catalogue for an enterprise application system. Focus on:
44- - **Business Domain**: Core business logic, domain models, and value propositions
45- - **Architecture**: System design patterns, data flow, and component interactions
46- - **User Experience**: Interface design, user journeys, and accessibility considerations
47- - **Deployment**: Production deployment strategies, scaling considerations, and operational monitoring
48- - **Integration**: External service dependencies, API contracts, and data exchange patterns
49- Structure the documentation to cover all key aspects of the application system.
43+ Focus on application-specific documentation needs:
44+ - **Getting Started**: Business purpose, quick setup, basic usage patterns
45+ - **Deep Dive**: System architecture, core features, technical implementation, integration points
46+ Emphasize user workflows, business logic, and deployment considerations.
5047 """ ;
5148 }
5249
5350 if ( classifyType == ClassifyType . Frameworks )
5451 {
5552 return """
5653 ## Development Framework
57- You are generating a documentation catalogue for a development framework. Focus on:
58- - **Core Architecture**: Framework design patterns, plugin systems, and extensibility mechanisms
59- - **Developer Experience**: API consistency, documentation quality, and learning curve
60- - **Ecosystem**: Compatible tools, community contributions, and third-party integrations
61- - **Performance**: Runtime efficiency, memory usage, and optimization strategies
62- - **Standards**: Code conventions, best practices, and architectural guidelines
63- Structure the documentation to showcase framework capabilities and usage patterns.
54+ Focus on framework-specific documentation needs:
55+ - **Getting Started**: Framework purpose, quick setup, basic concepts, simple examples
56+ - **Deep Dive**: Architecture patterns, extensibility mechanisms, API design, performance optimization
57+ Emphasize developer experience, plugin systems, and integration workflows.
6458 """ ;
6559 }
6660
6761 if ( classifyType == ClassifyType . Libraries )
6862 {
6963 return """
7064 ## Reusable Code Library
71- You are generating a documentation catalogue for a reusable code library. Focus on:
72- - **API Design**: Interface consistency, method signatures, and parameter patterns
73- - **Integration Patterns**: Installation methods, dependency management, and compatibility
74- - **Usage Examples**: Common use cases, code samples, and implementation patterns
75- - **Performance**: Efficiency benchmarks, resource usage, and optimization techniques
76- - **Maintenance**: Version compatibility, breaking changes, and migration guides
77- Structure the documentation to facilitate library adoption and integration.
65+ Focus on library-specific documentation needs:
66+ - **Getting Started**: Library purpose, installation, basic usage, common examples
67+ - **Deep Dive**: API design, advanced features, performance characteristics, customization options
68+ Emphasize practical usage patterns, integration strategies, and version compatibility.
7869 """ ;
7970 }
8071
8172 if ( classifyType == ClassifyType . DevelopmentTools )
8273 {
8374 return """
8475 ## Development Tool
85- You are generating a documentation catalogue for a development tool. Focus on:
86- - **Productivity Features**: Core capabilities, automation features, and workflow optimization
87- - **Configuration**: Setup procedures, customization options, and environment integration
88- - **Integration**: IDE support, build system compatibility, and toolchain integration
89- - **User Interface**: Command syntax, GUI elements, and user interaction patterns
90- - **Performance**: Execution speed, resource consumption, and scalability limits
91- Structure the documentation to guide users through setup and effective usage.
76+ Focus on tool-specific documentation needs:
77+ - **Getting Started**: Tool purpose, installation, basic configuration, first workflow
78+ - **Deep Dive**: Advanced features, customization options, integration patterns, optimization techniques
79+ Emphasize practical workflows, automation capabilities, and IDE integration.
9280 """ ;
9381 }
9482
9583 if ( classifyType == ClassifyType . CLITools )
9684 {
9785 return """
9886 ## Command-Line Interface Tool
99- You are generating a documentation catalogue for a CLI tool. Focus on:
100- - **Command Structure**: Command hierarchy, argument patterns, and option consistency
101- - **Usability**: Help systems, error messages, and user guidance features
102- - **Automation**: Scripting capabilities, batch operations, and pipeline integration
103- - **Configuration**: Config files, environment variables, and persistent settings
104- - **Performance**: Execution efficiency, startup time, and resource optimization
105- Structure the documentation to enable efficient command-line usage and automation.
87+ Focus on CLI-specific documentation needs:
88+ - **Getting Started**: Tool purpose, installation, basic commands, common workflows
89+ - **Deep Dive**: Command reference, advanced usage, scripting integration, configuration options
90+ Emphasize command syntax, automation capabilities, and pipeline integration.
10691 """ ;
10792 }
10893
10994 if ( classifyType == ClassifyType . DevOpsConfiguration )
11095 {
11196 return """
11297 ## DevOps & Infrastructure Configuration
113- You are generating a documentation catalogue for a DevOps configuration project. Focus on:
114- - **Infrastructure Patterns**: Deployment architectures, scaling strategies, and resource management
115- - **Automation**: CI/CD pipelines, deployment scripts, and infrastructure as code
116- - **Monitoring**: Logging strategies, metrics collection, and alerting configurations
117- - **Security**: Access controls, secret management, and compliance requirements
118- - **Operations**: Maintenance procedures, backup strategies, and disaster recovery
119- Structure the documentation to support operational excellence and reliable deployments.
98+ Focus on DevOps-specific documentation needs:
99+ - **Getting Started**: Infrastructure purpose, basic setup, deployment workflow, monitoring basics
100+ - **Deep Dive**: Advanced automation, security configuration, scaling strategies, operational procedures
101+ Emphasize deployment patterns, infrastructure as code, and operational excellence.
120102 """ ;
121103 }
122104
123105 if ( classifyType == ClassifyType . Documentation )
124106 {
125107 return """
126108 ## Documentation & Testing Project
127- You are generating a documentation catalogue for a documentation or testing project. Focus on:
128- - **Content Structure**: Information architecture, navigation patterns, and content organization
129- - **Quality Assurance**: Testing methodologies, coverage strategies, and validation processes
130- - **Maintenance**: Content lifecycle, update procedures, and version management
131- - **Accessibility**: Documentation formats, search capabilities, and user experience
132- - **Standards**: Style guides, contribution guidelines, and quality metrics
133- Structure the documentation to ensure comprehensive coverage and usability.
109+ Focus on documentation-specific needs:
110+ - **Getting Started**: Project purpose, content overview, contribution basics, style guidelines
111+ - **Deep Dive**: Content architecture, testing methodologies, maintenance procedures, quality standards
112+ Emphasize content organization, quality assurance, and contributor workflows.
134113 """ ;
135114 }
136115
137116 return """
138117 ## General Project Analysis
139- You are generating a documentation catalogue for a general software project. Focus on:
140- - **Architecture**: System design, component relationships, and technical decisions
141- - **Implementation**: Code quality, design patterns, and development practices
142- - **Features**: Core functionality, user capabilities, and system behaviors
143- - **Setup**: Installation procedures, configuration requirements, and environment setup
144- - **Usage**: Common workflows, integration patterns, and practical applications
145- Structure the documentation to provide comprehensive coverage of all project aspects.
118+ Focus on general project documentation needs:
119+ - **Getting Started**: Project purpose, setup instructions, basic concepts, common usage
120+ - **Deep Dive**: System architecture, core features, technical implementation, advanced customization
121+ Provide comprehensive coverage balancing accessibility with technical depth.
146122 """ ;
147123 }
148124}
0 commit comments