Documentation vs Rules Strategy
Overview
CONA maintains two parallel information systems:- Human Documentation (
/docsdirectory) - Designed for human consumption - AI Rules (
.cursor/rulesdirectory) - Designed to guide AI behavior
When to Create Human Documentation
Create documentation in the/docs directory when:
- Explaining complex business concepts
- Providing step-by-step guides for workflows
- Illustrating architecture with diagrams
- Explaining the “why” behind decisions
- Teaching new developers about the system
- Providing context for non-technical stakeholders
When to Create AI Rules
Create rules in the.cursor/rules directory when:
- Defining coding standards that should be consistently applied
- Specifying project-specific patterns for code generation
- Providing technical implementation details
- Defining naming conventions and file structures
- Specifying integration details with third-party services
- Guiding AI on framework-specific best practices
Bidirectional Documentation Approach
For critical areas, maintain both:- Human Documentation - Explaining concepts with examples and visuals
- AI Rules - Providing implementation guidelines and patterns
- Core architecture patterns
- State management approaches
- Testing methodologies
- Performance optimization strategies
- Error handling patterns
Rule Creation Guidelines
When creating a new rule:- Check if human documentation exists first
- Ensure rule aligns with existing documentation
- Add appropriate metadata headers
- Use concise, technical language
- Include code examples wherever possible
- Reference relevant files using
@filenamenotation
Documentation Creation Guidelines
When creating new documentation:- Check if AI rules exist for the topic
- Ensure documentation aligns with rules
- Focus on conceptual understanding and context
- Include diagrams where appropriate
- Use examples that match the examples in rules
Maintaining Alignment
To ensure alignment between documentation and rules:- Update both when making significant changes
- Periodically audit for inconsistencies
- Link to related documentation in rule files using comments
- Reference rule existence in documentation