CRITICAL: For localized project context and module-specific instructions, always refer to the context.md hierarchy.
This file defines the engineering mandates and standards for the Gemini Prompt Refiner project. These rules are foundational and take precedence over general workflows.
- ID:
enhanced-detection - Category:
Architecture - Description: Extend
src/detectors/project-scout.tsto identify a wider range of modern frameworks and tools (e.g., Tailwind CSS, Prisma, Drizzle, etc.). Ensure detection logic handles diverse project structures like monorepos. The goal is to provide highly accurate, context-aware prompt refinements.
- ID:
standardized-responses - Category:
Architecture - Description: All MCP tools in
src/core/server.tsMUST return a consistent, structured response. Responses should clearly separate the primary tool output from additional context or suggested actions. This ensures reliable interoperability with all MCP-compliant clients.
- ID:
automated-testing - Category:
Quality Assurance - Description: Maintain a comprehensive automated test suite using Vitest. Prioritize unit tests for logic in
src/linters/andsrc/refiners/, and integration tests for the MCP server handlers. All new features or bug fixes MUST include corresponding tests to ensure long-term stability and behavioral correctness.
- ID:
type-safety-solid - Category:
Development Standards - Description: Adhere to strict TypeScript typing; avoid
anyunless absolutely necessary. Rigorously apply SOLID and SRP (Single Responsibility Principle) across the codebase. Each module, class, and function should have one clear responsibility, facilitating maintainability and extensibility.
- ID:
gapless-traceability - Category:
Architecture - Description: All repository changes (commits) and agent outcomes (executions) MUST be logged to the Event Store and emitted to the Command Center Dashboard in real-time. This ensures a complete, verifiable audit trail from prompt intent to final code artifact.
- ID:
background-autonomy-opt - Category:
Performance - Description: Background tasks (ingestion, correlation, lesson extraction) MUST run in parallel using
Promise.allSettledto prevent slow LLM sampling/timeouts from blocking critical history ingestion.