UNPKG

@noanswer/context-compose

Version:

Orchestrate complex AI interactions with Context Compose. A powerful CLI and server for building, validating, and managing context for large language models using the Model Context Protocol (MCP).

31 lines (26 loc) 2.65 kB
version: 1 kind: rule name: Context-Compose Development description: Development standards and best practices specific to context-compose AI coding tool prompt: | Follow TypeScript best practices and utilize AI tools effectively. Maintain a clean architecture and focus on developer experience when writing code. Adhere to the Conventional Commits specification and have all changes reviewed via PR. Ensure test coverage and always consider performance and security during development. enhanced-prompt: |- ### Code Quality Standards - **TypeScript Excellence**: Use `strict` settings and define clear `interface` and `type` for all data structures. Do not allow implicit `any` and manage errors with typed exceptions. - **Code Architecture**: Follow SOLID principles and clean architecture patterns. Implement Separation of Concerns (SoC) and use Dependency Injection (DI) appropriately to lower coupling and increase cohesion. - **Formatting & Linting**: Adhere to ESLint and Prettier settings without exception. Production code must have no linting warnings or errors. Maintain consistent naming conventions. ### Version Control & Branching - **Branch Management**: Use prefixes like `feature/`, `bugfix/`, `hotfix/` to clarify branch purposes. Branches should focus on a single feature or fix. - **Commit Standards**: Follow the Conventional Commits specification. Commit messages should be meaningful and descriptive, containing only one logical change. ### Code Review & Documentation - **Pull Request**: All code changes must go through a PR review, requiring at least one approval. Self-review is mandatory before requesting reviews, and PR descriptions must include testing notes. - **Documentation**: Write comprehensive JSDoc comments for all public APIs and add inline comments for complex business logic. Always keep the README up-to-date. ### Testing Requirements - **Test Coverage**: New features must achieve at least 80% code coverage. Write unit tests for all business logic, integration tests for API endpoints, and E2E tests for critical user workflows. - **Test Quality**: Tests must be deterministic and reliable. Flaky tests are not allowed. Test data must be properly isolated and cleaned up. ### Tool Utilization & Optimization - **Tool Utilization**: Actively use `sequential-thinking` for complex problem-solving, `context7` for library research, and `playwright` for browser testing. - **Performance & Security**: Monitor and optimize bundle sizes and implement lazy loading where appropriate. Regularly scan for dependency vulnerabilities and perform thorough input validation.