Skip to main content

Overview

AGENTS.md support allows Parsaa to understand your project’s specific requirements, coding standards, and architectural patterns. This ensures AI suggestions are tailored to your team’s conventions and project needs.
Coming Soon: AGENTS.md support is currently in development and will be available to beta users first.

What is AGENTS.md?

AGENTS.md is a standardized format for documenting how AI coding agents should behave within a specific project. It provides context, constraints, and guidelines that help AI assistants understand your project’s unique requirements.

Benefits of AGENTS.md

  • Team Alignment: All team members get consistent AI suggestions
  • Project Context: AI understands your specific architecture
  • Quality Standards: Enforces your coding conventions
  • Best Practices: Applies your project’s specific patterns
  • No Repetition: Don’t explain your project repeatedly
  • Faster Onboarding: New team members get instant context
  • Better Suggestions: AI provides more relevant recommendations
  • Time Savings: Less time spent explaining project specifics

AGENTS.md Format

Basic Structure

# AI Agent Guidelines for [Project Name]

## Project Overview
Brief description of the project, its purpose, and key technologies.

## Architecture
Description of the project's architecture, patterns, and design principles.

## Coding Standards
Specific coding conventions, style guidelines, and best practices.

## Technology Stack
List of frameworks, libraries, and tools used in the project.

## Common Patterns
Frequently used patterns, utilities, and helper functions.

## Constraints
Limitations, requirements, and things to avoid.

## Examples
Code examples that demonstrate the project's patterns and conventions.

Example AGENTS.md

# AI Agent Guidelines for MyiOSApp

## Project Overview
A SwiftUI-based iOS app for task management with Core Data persistence and CloudKit sync.

## Architecture
- **Pattern**: MVVM with Combine
- **UI**: SwiftUI with custom components
- **Data**: Core Data with CloudKit integration
- **Networking**: URLSession with async/await

## Coding Standards
- Use SwiftUI's declarative syntax
- Prefer `@StateObject` over `@ObservedObject`
- Use `async/await` for all async operations
- Follow Apple's Human Interface Guidelines
- Use Swift's type system for safety

## Technology Stack
- **UI**: SwiftUI, Combine
- **Data**: Core Data, CloudKit
- **Networking**: URLSession, async/await
- **Testing**: XCTest, SwiftUI Preview

## Common Patterns
- Custom SwiftUI components in `Components/`
- ViewModels in `ViewModels/` directory
- Core Data models in `Models/`
- Network services in `Services/`

## Constraints
- iOS 15.0+ target
- No third-party networking libraries
- Must support Dark Mode
- Accessibility compliance required
- Unit tests for all business logic

## Examples

### ViewModel Pattern
```swift
class TaskListViewModel: ObservableObject {
    @Published var tasks: [Task] = []
    @Published var isLoading = false
    
    private let taskService: TaskService
    
    init(taskService: TaskService) {
        self.taskService = taskService
    }
    
    @MainActor
    func loadTasks() async {
        isLoading = true
        defer { isLoading = false }
        
        do {
            tasks = try await taskService.fetchTasks()
        } catch {
            // Handle error
        }
    }
}

SwiftUI View Pattern

struct TaskListView: View {
    @StateObject private var viewModel: TaskListViewModel
    
    var body: some View {
        NavigationView {
            List(viewModel.tasks) { task in
                TaskRowView(task: task)
            }
            .navigationTitle("Tasks")
            .task {
                await viewModel.loadTasks()
            }
        }
    }
}

## Parsaa Integration

### Automatic Detection

<Steps>
<Step title="File Detection">
  Parsaa automatically detects `AGENTS.md` files in your project root and subdirectories.
</Step>

<Step title="Context Loading">
  The AI agent guidelines are loaded and applied to all AI interactions within that project.
</Step>

<Step title="Suggestion Enhancement">
  All AI suggestions are filtered and enhanced based on your project's specific guidelines.
</Step>

<Step title="Consistent Behavior">
  Every team member gets the same AI behavior regardless of their individual settings.
</Step>
</Steps>

### Smart Context Application

<AccordionGroup>
<Accordion title="Architecture Awareness">
  Parsaa understands your project's architecture:
  
  - **MVVM**: Suggests proper ViewModel patterns
  - **VIPER**: Recommends Interactor and Presenter patterns
  - **MVC**: Suggests Controller best practices
  - **Custom**: Adapts to your specific patterns
</Accordion>

<Accordion title="Framework Integration">
  Recognizes your technology stack:
  
  - **SwiftUI**: Suggests declarative UI patterns
  - **UIKit**: Recommends imperative UI patterns
  - **Combine**: Suggests reactive programming patterns
  - **Core Data**: Recommends data persistence patterns
</Accordion>
</AccordionGroup>

## Creating Your AGENTS.md

### Project Analysis

<Steps>
<Step title="Analyze Your Codebase">
  - Review existing code patterns
  - Identify common conventions
  - Note architectural decisions
  - Document technology choices
</Step>

<Step title="Team Standards">
  - Gather coding standards from your team
  - Document style guidelines
  - Note testing requirements
  - Include accessibility standards
</Step>

<Step title="Create Documentation">
  - Write clear, specific guidelines
  - Include code examples
  - Document constraints and limitations
  - Keep it updated as the project evolves
</Step>
</Steps>

### Best Practices for AGENTS.md

<AccordionGroup>
<Accordion title="Be Specific">
  **Good**: "Use `@StateObject` for ViewModels that own data"
  
  **Avoid**: "Use proper state management"
</Accordion>

<Accordion title="Include Examples">
  **Good**: Provide code examples that demonstrate your patterns
  
  **Avoid**: Vague descriptions without concrete examples
</Accordion>

<Accordion title="Keep Updated">
  **Good**: Update AGENTS.md as your project evolves
  
  **Avoid**: Outdated guidelines that don't reflect current practices
</Accordion>
</AccordionGroup>

## Advanced Features

### Multi-Project Support

<AccordionGroup>
<Accordion title="Project-Specific Guidelines">
  - Different AGENTS.md files for different projects
  - Automatic context switching
  - Project-specific AI behavior
  - Team-wide consistency
</Accordion>

<Accordion title="Hierarchical Guidelines">
  - Global guidelines for all projects
  - Project-specific overrides
  - Directory-specific rules
  - File-specific guidelines
</Accordion>
</AccordionGroup>

### Team Collaboration

<AccordionGroup>
<Accordion title="Shared Guidelines">
  - Version control integration
  - Team review process
  - Change notifications
  - Collaborative editing
</Accordion>

<Accordion title="Consistency Enforcement">
  - Automatic guideline application
  - Team-wide AI behavior
  - Consistent code suggestions
  - Reduced onboarding time
</Accordion>
</AccordionGroup>

## Integration with Development Workflow

### Git Integration

<AccordionGroup>
<Accordion title="Version Control">
  - Track changes to AGENTS.md
  - Review guidelines in pull requests
  - Merge conflicts resolution
  - Branch-specific guidelines
</Accordion>

<Accordion title="Team Workflow">
  - Share guidelines across team
  - Collaborative editing
  - Review and approval process
  - Change notifications
</Accordion>
</AccordionGroup>

### IDE Integration

<Steps>
<Step title="Automatic Loading">
  Parsaa automatically loads AGENTS.md when you open a project
</Step>

<Step title="Context Application">
  All AI suggestions are filtered through your project guidelines
</Step>

<Step title="Real-time Updates">
  Changes to AGENTS.md are applied immediately
</Step>

<Step title="Team Sync">
  Team members get updated guidelines automatically
</Step>
</Steps>

## Common Patterns and Examples

### SwiftUI Projects

```markdown
## SwiftUI Guidelines

### State Management
- Use `@StateObject` for ViewModels
- Use `@ObservedObject` for passed ViewModels
- Use `@State` for local view state
- Use `@Binding` for two-way data flow

### View Structure
- Keep views small and focused
- Extract reusable components
- Use `@ViewBuilder` for complex views
- Follow Apple's Human Interface Guidelines

### Data Flow
- Use Combine for reactive programming
- Implement proper error handling
- Use async/await for async operations
- Follow MVVM pattern strictly

UIKit Projects

## UIKit Guidelines

### Architecture
- Follow MVC pattern
- Use delegates for communication
- Implement proper memory management
- Use storyboards for complex UIs

### Code Organization
- Group related files together
- Use extensions for protocol conformance
- Implement proper error handling
- Use dependency injection

Mixed Projects

## Mixed SwiftUI/UIKit Guidelines

### Migration Strategy
- Gradually migrate UIKit to SwiftUI
- Use UIViewControllerRepresentable for UIKit integration
- Maintain consistency across both frameworks
- Use shared ViewModels when possible

### Best Practices
- Choose the right tool for each screen
- Maintain consistent design language
- Use shared components where possible
- Plan for future SwiftUI migration

Troubleshooting

Common Issues

Solutions:
  1. Check if AGENTS.md is in the project root
  2. Verify file format is correct
  3. Restart Parsaa extension
  4. Check for syntax errors in AGENTS.md
Solutions:
  1. Review multiple AGENTS.md files
  2. Resolve conflicts in team discussion
  3. Update guidelines to be consistent
  4. Use hierarchical guidelines
Solutions:
  1. Regularly review and update guidelines
  2. Get team input on changes
  3. Version control all changes
  4. Communicate updates to team

Best Practices

Keep It Simple

Write clear, concise guidelines that are easy to understand and follow.

Include Examples

Provide concrete code examples that demonstrate your patterns and conventions.

Stay Updated

Regularly review and update your guidelines as your project evolves.

Team Input

Get input from your entire team to ensure guidelines reflect everyone’s needs.
Beta Feature: AGENTS.md support is currently in development. Join our waitlist to get early access and help shape this team collaboration feature.