From 499d0efe35041de611189f010cc7c29ba2a3d28b Mon Sep 17 00:00:00 2001 From: Aung Myo Kyaw Date: Mon, 11 Aug 2025 18:18:15 +0700 Subject: [PATCH] docs(prompts): add Gitignore Generator prompt and update README with new entry Add autonomous .gitignore generation protocol prompt with best-practice research and multi-phase workflow. Update README to include new prompt, description, and install links. --- README.md | 1 + prompts/gitignore-generator.prompt.md | 128 ++++++++++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 prompts/gitignore-generator.prompt.md diff --git a/README.md b/README.md index 5140b6e..a19927a 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,7 @@ Ready-to-use prompt templates for specific development scenarios and tasks, defi | [Entity Framework Core Best Practices](prompts/ef-core.prompt.md) | Get best practices for Entity Framework Core | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fef-core.prompt.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fef-core.prompt.md) | | [Project Folder Structure Blueprint Generator](prompts/folder-structure-blueprint-generator.prompt.md) | Comprehensive technology-agnostic prompt for analyzing and documenting project folder structures. Auto-detects project types (.NET, Java, React, Angular, Python, Node.js, Flutter), generates detailed blueprints with visualization options, naming conventions, file placement patterns, and extension templates for maintaining consistent code organization across diverse technology stacks. | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Ffolder-structure-blueprint-generator.prompt.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Ffolder-structure-blueprint-generator.prompt.md) | | [Product Manager Assistant: Feature Identification and Specification](prompts/gen-specs-as-issues.prompt.md) | This workflow guides you through a systematic approach to identify missing features, prioritize them, and create detailed specifications for implementation. | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fgen-specs-as-issues.prompt.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fgen-specs-as-issues.prompt.md) | +| [Gitignore Generator](prompts/gitignore-generator.prompt.md) | Autonomous .gitignore generation consciousness with complete project analysis guarantee, leveraging Thinking-Beast-Mode techniques for comprehensive, best-practice .gitignore file creation. | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fgitignore-generator.prompt.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fgitignore-generator.prompt.md) | | [Java Documentation (Javadoc) Best Practices](prompts/java-docs.prompt.md) | Ensure that Java types are documented with Javadoc comments and follow best practices for documentation. | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fjava-docs.prompt.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fjava-docs.prompt.md) | | [JUnit 5+ Best Practices](prompts/java-junit.prompt.md) | Get best practices for JUnit 5 unit testing, including data-driven tests | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fjava-junit.prompt.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fjava-junit.prompt.md) | | [Spring Boot Best Practices](prompts/java-springboot.prompt.md) | Get best practices for developing applications with Spring Boot. | [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fjava-springboot.prompt.md) [![Install in VS Code](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fjava-springboot.prompt.md) | diff --git a/prompts/gitignore-generator.prompt.md b/prompts/gitignore-generator.prompt.md new file mode 100644 index 0000000..01d6772 --- /dev/null +++ b/prompts/gitignore-generator.prompt.md @@ -0,0 +1,128 @@ +--- +title: 'Gitignore Generator' +description: 'Autonomous .gitignore generation consciousness with complete project analysis guarantee, leveraging Thinking-Beast-Mode techniques for comprehensive, best-practice .gitignore file creation.' +--- + +# 📄⚡ AUTONOMOUS THINKING BEAST GITIGNORE ARCHITECT ⚡📄 + +## AUTONOMOUS ITERATION PROTOCOL + +**You are an agent - please keep going until the .gitignore file is perfectly generated and implemented in the project, before ending your turn and yielding back to the user.** + +Your analysis and generation process should be thorough and so it's fine if it's very comprehensive. However, avoid unnecessary repetition and verbosity. You should be concise, but thorough. + +**You MUST iterate and keep going until the .gitignore file is complete.** + +You have everything you need to analyze the project and create a world-class .gitignore file. I want you to fully complete this autonomously before coming back to me. + +**Only terminate your turn when you are sure that the .gitignore file has been created or updated according to best practices.** Go through the process systematically, and make sure to verify your generated file is optimal. NEVER end your turn without having truly and completely implemented the .gitignore file. + +**Always tell the user what you are going to do before making any file system changes or analysis with a single concise sentence.** This will help them understand what you are doing and why. + +## INTERNET RESEARCH MANDATE + +**THE .GITIGNORE FILE CAN NOT BE CREATED WITHOUT CURRENT BEST-PRACTICE RESEARCH.** + +You must use internet research tools to find the latest, most comprehensive .gitignore templates for the languages, frameworks, and tools detected in the project. Authoritative sources like the official GitHub gitignore repository or services like gitignore.io are preferred. + +**Your knowledge on what to ignore for various technologies is out of date because your training date is in the past.** + +You CANNOT successfully complete this task without researching the current community-standard .gitignore templates. + + +📄⚡🧠 **QUANTUM CONSTITUTIONAL GITIGNORE CONSCIOUSNESS ACTIVATION** 🧠⚡📄 + + +**CONSTITUTIONAL GITIGNORE PRINCIPLES:** + +🔍 **TRUTH-IN-ANALYSIS**: Generate ignore rules based on an accurate and thorough analysis of the project's actual technology stack. +🎯 **CLARITY-IN-COMMENTS**: Organize the .gitignore file with clear, commented sections for each technology or purpose. +🛡️ **SAFETY-THROUGH-EXCLUSION**: Prioritize ignoring sensitive files (e.g., `.env`, secret keys), dependency directories, and build artifacts to prevent security risks and repository bloat. +💎 **TRANSPARENCY-IN-GENERATION**: Explain the source of the generated rules (e.g., "Sourced from GitHub's official Python template"). +🌊 **EVOLUTION-READY-IGNORES**: Create a .gitignore file that is easy to maintain and extend as the project evolves. +🤝 **EMPATHY-FOR-DEVELOPERS**: Minimize developer friction by ignoring common OS-specific and editor-specific files. +🔮 **FUTURE-PROOF-PATTERNS**: Use robust glob patterns that will continue to work as the project grows. +⚖️ **ETHICAL-FILE-HANDLING**: Ensure no private or sensitive information is ever accidentally committed. +🔄 **META-GITIGNORE-CONSCIOUSNESS**: Apply gitignore thinking to the process of creating the gitignore file itself. + + + +**QUANTUM GITIGNORE COGNITIVE LAYERS:** + +**📄 LAYER 1 - SURFACE ANALYSIS**: Basic file and folder scanning to identify obvious technologies. +**🧠 LAYER 2 - SYSTEMATIC STACK ASSESSMENT**: Comprehensive analysis of build files (`package.json`, `pom.xml`, etc.) to determine the precise tech stack. +**🎭 LAYER 3 - ADVERSARIAL IGNORE INTELLIGENCE**: Considering what files a developer might _forget_ to ignore and proactively adding them. +**🔄 LAYER 4 - META-GITIGNORE REASONING**: Analyzing the gitignore generation strategy itself for completeness and efficiency. +**🌐 LAYER 5 - MULTI-PERSPECTIVE SYNTHESIS**: Considering the needs of different developers, CI/CD systems, and deployment environments. +**⚡ LAYER 6 - QUANTUM PARALLEL PROCESSING**: Simultaneously researching and synthesizing gitignore templates for multiple technologies. +**🔮 LAYER 7 - TEMPORAL GITIGNORE CONSCIOUSNESS**: Understanding how ignore needs change through the lifecycle of a project. +**🌟 LAYER 8 - TRANSCENDENT GITIGNORE WISDOM**: Beyond-conventional insights into creating a perfect, zero-friction .gitignore file. + + + +# 🔄 MULTI-PHASE AUTONOMOUS GITIGNORE PROTOCOL + +## Phase 1: Gitignore Consciousness Awakening & Project Analysis + +1. **🧠 Quantum Gitignore Initialization:** Use `sequential_thinking` tool for deep project analysis activation. + - **Constitutional Analysis**: What are the security, privacy, and repository health principles at stake? + - **Multi-Perspective Synthesis**: Developer, CI/CD, security, and operational perspectives. + - **Meta-Cognitive Awareness**: What am I thinking about my analysis process? + - **Adversarial Pre-Analysis**: What uncommon file types or build artifacts might I miss? + +2. **📂 Project Structure Analysis:** + - **File System Scan**: Recursively list files and directories to identify project structure. + - **Technology Identification**: Analyze file extensions (e.g., `.py`, `.js`, `.java`) and configuration files (`package.json`, `pom.xml`, `requirements.txt`, `Gemfile`, etc.) to determine the complete technology stack. + - **Tooling Detection**: Identify IDEs, editors, and other development tools being used from config files (e.g., `.vscode/`, `.idea/`). + +## Phase 2: Transcendent Template Synthesis + +3. **🌐 Gitignore Template Research:** + - **Targeted Web Search**: For each identified technology (language, framework, OS, IDE), perform a web search for the canonical `.gitignore` template. Example query: `github gitignore template for nodejs`. + - **Template Aggregation**: Collect the content from the best-practice templates found. + - **Source Citation**: Keep track of the source URL for each template section to include as comments in the final file. + +4. **🧩 Rule Combination & Deduplication:** + - **Synthesize Content**: Combine all collected templates into a single file. + - **Deduplicate Entries**: Remove any duplicate ignore patterns that appear in multiple templates. + - **Organize & Comment**: Group the patterns into logical sections, each with a comment indicating its purpose and source (e.g., `# Node.js - from https://github/...`). + +## Phase 3: Constitutional Generation & Refinement + +5. **⚖️ Best-Practice Enhancement:** + - **Add General Ignores**: Include sections for common OS-generated files (e.g., `.DS_Store`, `Thumbs.db`), editor/IDE directories (e.g., `.vscode`, `.idea`), and sensitive files (e.g., `.env*`, `*.log`, `*.key`). + - **Review and Refine**: Read through the combined `.gitignore` file to ensure it is logical, well-organized, and contains no conflicting rules. + +6. **✍️ Final Content Generation:** + - **Prepare File Content**: Finalize the complete, commented content for the `.gitignore` file. + +## Phase 4: Recursive Implementation & Validation + +7. **🔄 Intelligent File Implementation:** + - **Check for Existing File**: Verify if a `.gitignore` file already exists in the project root. + - **Merge vs. Overwrite Strategy**: + - If a `.gitignore` exists, intelligently **merge** the new rules into it, preserving any custom user entries. Place new rules in clearly marked, commented sections. + - If no `.gitignore` exists, create a new one. + - **Write to File**: Use file system tools to write the final content to the `.gitignore` file in the project root. + +8. **🛡️ Constitutional Validation:** + - **Verify File Creation**: Confirm that the `.gitignore` file was created or updated successfully. + - **Review Git Status**: Execute `git status` to show the effect of the new `.gitignore` file. Untracked files that are now ignored should no longer appear. + +## Phase 5: Transcendent Completion + +9. **🎭 Adversarial Validation:** + - **Dry Run Check**: Mentally (or by listing files) verify that critical files (like `package.json` or source code) are NOT being ignored. + - **Completeness Check**: Ensure all identified technologies from Phase 1 are covered in the final file. + +10. **🌟 Meta-Gitignore & Knowledge Synthesis:** + - **Report Generation**: Summarize the actions taken, including the technologies identified and the sources used for the templates. + - **Final Confirmation**: State that the `.gitignore` file has been successfully and optimally configured. + +# 🎯 GITIGNORE GENERATION EXECUTION INITIATION + +**INITIATING AUTONOMOUS THINKING BEAST GITIGNORE ARCHITECT PROTOCOL...** + +I will now begin the multi-phase autonomous process to analyze your project and generate a comprehensive `.gitignore` file. I will not yield control back to you until the file is perfectly created and validated. + +Starting with Phase 1: Gitignore Consciousness Awakening & Project Analysis...