| Dimension | Shared | Only in A | Only in B | Overlap |
|---|---|---|---|---|
| Sections | 0 | 20 | 8 | 0% |
| Commands | 0 | 12 | 0 | 0% |
| Section tags | 1 | 7 | 1 | 11% |
What each file covers
Sections
0 shared · 20 only in A · 8 only in B- − Development Guide
- − Project Overview
- − Development Commands
- − Essential Commands
- − Quick setup
- − Start development server with hot reload
- − Run tests (excludes E2E/slow tests)
- − Run all tests including E2E
- − Format and lint code (ALWAYS run before committing)
- − Run specific test
- − Database Commands
- − Architecture & Project Structure
- − 🚨 CRITICAL: Follow All Development Standards
- − Development Workflow
- − Pre-Commit Requirements
- − Development Process
- − Key Development Notes
- − Task Management
- − Rule Management
- − Compozy Configuration Examples
- + Compozy Project Configuration Examples
- + Basic Project Configuration
- + Project with Model Configuration
- + Project with AutoLoad Configuration
- + AutoLoad configuration for discovering agents and tools
- + Environment Variable Patterns
- + Environment variable references
- + MCP environment variables
Commands
0 shared · 12 only in A · 0 only in B- − make deps && make start-docker && make migrate-up
- − make dev
- − make test
- − make fmt && make lint
- − go test -v ./engine/task -run TestExecutor_Execute
- − make migrate-up
- − make migrate-down
- − make migrate-status
- − make reset-db
- − make fmt && make lint && make test
- − make lint
- − make migrate-create name=<name>
Section tags
1 shared · 7 only in A · 1 only in B- − test
- − lint-format
- − architecture
- − testing-strategy
- − git-pr
- − database
- − agent-behaviour
- + code-style
- setup
Line diff
compozy/gograph · GEMINI.md
@@ −1 @@
1# Development Guide
2
3This file provides comprehensive guidance for working with the Compozy codebase, including development commands, standards, and workflow patterns.
4
5<critical>
6**MANDATORY REQUIREMENTS:**
7- **ALWAYS** check dependent files APIs before write tests to avoid write wrong code
8- **ALWAYS** verify against PRD and tech specs - NEVER make assumptions
9- **NEVER** use workarounds, especially in tests - implement proper solutions
10- **MUST** follow all established project standards:
11 - Architecture patterns: `.cursor/rules/architecture.mdc`
12 - Go coding standards: `.cursor/rules/go-coding-standards.mdc`
13 - Testing requirements: `.cursor/rules/testing-standards.mdc`
14 - API standards: `.cursor/rules/api-standards.mdc`
15 - Security & quality: `.cursor/rules/quality-security.mdc`
16- **MUST** run `make lint` and `make test` before completing ANY subtask
17- **MUST** follow `.cursor/rules/task-review.mdc` workflow for parent tasks
18**Enforcement:** Violating these standards results in immediate task rejection.
19</critical>
20
21## Project Overview
22
23Compozy is a **workflow orchestration engine for AI agents** that enables building AI-powered applications through declarative YAML configuration and a robust Go backend. It integrates with various LLM providers and supports the Model Context Protocol (MCP) for extending AI capabilities.
24
25## Development Commands
26
27### Essential Commands
28
29```bash
30# Quick setup
31make deps && make start-docker && make migrate-up
32
33# Start development server with hot reload
34make dev
35
36# Run tests (excludes E2E/slow tests)
37make test
38
39# Run all tests including E2E
40make test
41
42# Format and lint code (ALWAYS run before committing)
43make fmt && make lint
44
45# Run specific test
46go test -v ./engine/task -run TestExecutor_Execute
47```
48
49### Database Commands
50
51```bash
52make migrate-up # Apply migrations
53make migrate-down # Rollback last migration
54make migrate-status # Check migration status
55make reset-db # Reset database completely
56```
57
58## Architecture & Project Structure
59
60**📁 Complete project structure, technology stack, and architectural patterns:** See [project-structure.mdc](mdc:.cursor/rules/project-structure.mdc)
61
62## 🚨 CRITICAL: Follow All Development Standards
63
64**📋 MANDATORY: Review and follow ALL established coding standards:**
65
66- **Code Formatting & Line Spacing**: [no_linebreaks.mdc](mdc:.cursor/rules/no_linebreaks.mdc) - NEVER add blank lines inside function bodies
67- **Go Coding Standards**: [go-coding-standards.mdc](mdc:.cursor/rules/go-coding-standards.mdc) - Function limits, error handling, documentation policy
68- **Testing Standards**: [testing-standards.mdc](mdc:.cursor/rules/testing-standards.mdc) - MANDATORY `t.Run("Should...")` pattern, testify usage
69- **Go Implementation Patterns**: [go-patterns.mdc](mdc:.cursor/rules/go-patterns.mdc) - Canonical implementations of architecture principles
70- **Architecture Principles**: [architecture.mdc](mdc:.cursor/rules/architecture.mdc) - SOLID principles, Clean Architecture, DRY
71- **Code Quality & Security**: [quality-security.mdc](mdc:.cursor/rules/quality-security.mdc) - Linting rules, security requirements
72- **Required Libraries**: [core-libraries.mdc](mdc:.cursor/rules/core-libraries.mdc) - Mandatory library choices and usage patterns
73- **API Development**: [api-standards.mdc](mdc:.cursor/rules/api-standards.mdc) - RESTful design, versioning, documentation
74- **Code Review Process**: [review-checklist.mdc](mdc:.cursor/rules/review-checklist.mdc) - Pre-review requirements and checklist
75
76## Development Workflow
77
78### Pre-Commit Requirements
79
80**ALWAYS run before committing:**
81
82```bash
83make fmt && make lint && make test
84```
85
86### Development Process
87
881. **API changes:** Update Swagger annotations (`swag` comments)
892. **Schema changes:** Create migrations with `make migrate-create name=<name>`
903. **New features:** Include comprehensive tests following [testing-standards.mdc](mdc:.cursor/rules/testing-standards.mdc)
914. **Task completion:** Follow [task-review.mdc](mdc:.cursor/rules/task-review.mdc) for mandatory code review workflow via Zen MCP tools
925. **Backwards Compatibility:** See [backwards-compatibility.mdc](mdc:.cursor/rules/backwards-compatibility.mdc) - NOT REQUIRED during development phase
93
94### Key Development Notes
95
96- **Logging:** Use [core-libraries.mdc](mdc:.cursor/rules/core-libraries.mdc) for structured logging patterns
97- **Core types:** Use `core.ID` for UUIDs, `core.Ref` for polymorphic references
98- **Dependencies:** Mock external dependencies in tests when necessary (see [testing-standards.mdc](mdc:.cursor/rules/testing-standards.mdc))
99
100## Task Management
101
102For task-based development workflows, see these rule files:
103
104- [prd-create.mdc](mdc:.cursor/rules/prd-create.mdc) - PRD Creation
105- [prd-tech-spec.mdc](mdc:.cursor/rules/prd-tech-spec.mdc) - Technical Specifications
106- [task-generate-list.mdc](mdc:.cursor/rules/task-generate-list.mdc) - Task List Generation
107- [task-developing.mdc](mdc:.cursor/rules/task-developing.mdc) - Task Development
108- [task-review.mdc](mdc:.cursor/rules/task-review.mdc) - Task Completion with Zen MCP code review
109
110## Rule Management
111
112The development rules are actively maintained and improved:
113
114- **Rule Management**: [cursor_rules.mdc](mdc:.cursor/rules/cursor_rules.mdc) - Comprehensive guidelines for creating, maintaining, and improving rules
115
116## Compozy Configuration Examples
117
118For YAML configuration patterns and examples:
119
120- **Project Configuration**: [compozy-project-config.mdc](mdc:.cursor/rules/compozy-project-config.mdc) - Project setup patterns
121- **Task Patterns**: [compozy-task-patterns.mdc](mdc:.cursor/rules/compozy-task-patterns.mdc) - Workflow task configurations
122- **Agent Configuration**: [compozy-agent-config.mdc](mdc:.cursor/rules/compozy-agent-config.mdc) - AI agent setup patterns
123- **Shared Patterns**: [compozy-shared-patterns.mdc](mdc:.cursor/rules/compozy-shared-patterns.mdc) - MCP, templates, and references
124- **Configuration Index**: [compozy-examples.mdc](mdc:.cursor/rules/compozy-examples.mdc) - Overview and cross-references
125
126**All rule files are located in `.cursor/rules/` and use semantic XML tags for better context and AI understanding.**
127
128The project uses Go 1.24+ features and requires external dependencies to be mocked in tests when necessary.
129
compozy/gograph · .cursor/rules/compozy-project-config.mdc
@@ +1 @@
1---
2description: "Project configuration patterns and examples for compozy.yaml files"
3globs:
4 - "**/compozy.yaml"
5 - "**/*.compozy.yaml"
6alwaysApply: false
7---
8# Compozy Project Configuration Examples
9
10<configuration_overview type="project_config">
11Project configuration defines the top-level settings for Compozy projects including models, workflows, autoload settings, and runtime permissions.
12</configuration_overview>
13
14## Basic Project Configuration
15
16<project_config_pattern type="basic">
17```yaml
18name: project-name
19version: 0.1.0
20description: Project description
21
22workflows:
23 - source: ./workflow.yaml
24
25runtime:
26 permissions:
27 - --allow-read
28 - --allow-net
29 - --allow-env
30```
31</project_config_pattern>
32
33## Project with Model Configuration
34
35<project_config_pattern type="with_models">
36```yaml
37name: weather-agent
38version: "0.1.0"
39description: A multi-agent weather advisory system
40
41author:
42 name: Pedro Nauck
43 url: https://github.com/compozy
44
45workflows:
46 - source: ./workflow.yaml
47
48models:
49 - provider: groq
50 model: llama-3.3-70b-versatile
51 api_key: "{{ .env.GROQ_API_KEY }}"
52 - provider: ollama
53 model: llama4:16x17b
54 api_url: "http://localhost:11434"
55
56runtime:
57 permissions:
58 - --allow-read
59 - --allow-net
60 - --allow-env
61 - --allow-sys
62 - --allow-write
63```
64</project_config_pattern>
65
66## Project with AutoLoad Configuration
67
68<project_config_pattern type="with_autoload">
69```yaml
70name: project-name
71version: 0.1.0
72
73workflows:
74 - source: ./workflow.yaml
75
76# AutoLoad configuration for discovering agents and tools
77autoload:
78 enabled: true
79 strict: true
80 include:
81 - "agents/*.yaml"
82 - "tools/*.yaml"
83 exclude:
84 - "**/*~"
85 - "**/*.bak"
86 - "**/*.tmp"
87
88runtime:
89 permissions:
90 - --allow-read
91 - --allow-net
92 - --allow-env
93```
94</project_config_pattern>
95
96## Environment Variable Patterns
97
98<environment_patterns type="api_keys">
99```yaml
100# Environment variable references
101api_key: "{{ .env.GROQ_API_KEY }}"
102api_key: "{{ .env.OPENAI_API_KEY }}"
103database_url: "{{ .env.DATABASE_URL }}"
104
105# MCP environment variables
106mcps:
107 - id: external_service
108 url: "{{ .env.MCP_SERVICE_URL }}"
109 env:
110 API_KEY: "{{ .env.EXTERNAL_API_KEY }}"
111 TIMEOUT: "{{ .env.REQUEST_TIMEOUT | default \"30s\" }}"
112```
113</environment_patterns>
114
@@ −1 +1 @@
1−# Development Guide
1+---
2+description: "Project configuration patterns and examples for compozy.yaml files"
3+globs:
4+ - "**/compozy.yaml"
5+ - "**/*.compozy.yaml"
6+alwaysApply: false
7+---
8+# Compozy Project Configuration Examples
29
3−This file provides comprehensive guidance for working with the Compozy codebase, including development commands, standards, and workflow patterns.
10+<configuration_overview type="project_config">
11+Project configuration defines the top-level settings for Compozy projects including models, workflows, autoload settings, and runtime permissions.
12+</configuration_overview>
413
5−<critical>
6−**MANDATORY REQUIREMENTS:**
7−- **ALWAYS** check dependent files APIs before write tests to avoid write wrong code
8−- **ALWAYS** verify against PRD and tech specs - NEVER make assumptions
9−- **NEVER** use workarounds, especially in tests - implement proper solutions
10−- **MUST** follow all established project standards:
11− - Architecture patterns: `.cursor/rules/architecture.mdc`
12− - Go coding standards: `.cursor/rules/go-coding-standards.mdc`
13− - Testing requirements: `.cursor/rules/testing-standards.mdc`
14− - API standards: `.cursor/rules/api-standards.mdc`
15− - Security & quality: `.cursor/rules/quality-security.mdc`
16−- **MUST** run `make lint` and `make test` before completing ANY subtask
17−- **MUST** follow `.cursor/rules/task-review.mdc` workflow for parent tasks
18−**Enforcement:** Violating these standards results in immediate task rejection.
19−</critical>
14+## Basic Project Configuration
2015
21−## Project Overview
16+<project_config_pattern type="basic">
17+```yaml
18+name: project-name
19+version: 0.1.0
20+description: Project description
2221
23−Compozy is a **workflow orchestration engine for AI agents** that enables building AI-powered applications through declarative YAML configuration and a robust Go backend. It integrates with various LLM providers and supports the Model Context Protocol (MCP) for extending AI capabilities.
22+workflows:
23+ - source: ./workflow.yaml
2424
25−## Development Commands
25+runtime:
26+ permissions:
27+ - --allow-read
28+ - --allow-net
29+ - --allow-env
30+```
31+</project_config_pattern>
2632
27−### Essential Commands
33+## Project with Model Configuration
2834
29−```bash
30−# Quick setup
31−make deps && make start-docker && make migrate-up
35+<project_config_pattern type="with_models">
36+```yaml
37+name: weather-agent
38+version: "0.1.0"
39+description: A multi-agent weather advisory system
3240
33−# Start development server with hot reload
34−make dev
41+author:
42+ name: Pedro Nauck
43+ url: https://github.com/compozy
3544
36−# Run tests (excludes E2E/slow tests)
37−make test
45+workflows:
46+ - source: ./workflow.yaml
3847
39−# Run all tests including E2E
40−make test
48+models:
49+ - provider: groq
50+ model: llama-3.3-70b-versatile
51+ api_key: "{{ .env.GROQ_API_KEY }}"
52+ - provider: ollama
53+ model: llama4:16x17b
54+ api_url: "http://localhost:11434"
4155
42−# Format and lint code (ALWAYS run before committing)
43−make fmt && make lint
44−
45−# Run specific test
46−go test -v ./engine/task -run TestExecutor_Execute
56+runtime:
57+ permissions:
58+ - --allow-read
59+ - --allow-net
60+ - --allow-env
61+ - --allow-sys
62+ - --allow-write
4763 ```
64+</project_config_pattern>
4865
49−### Database Commands
66+## Project with AutoLoad Configuration
5067
51−```bash
52−make migrate-up # Apply migrations
53−make migrate-down # Rollback last migration
54−make migrate-status # Check migration status
55−make reset-db # Reset database completely
56−```
68+<project_config_pattern type="with_autoload">
69+```yaml
70+name: project-name
71+version: 0.1.0
5772
58−## Architecture & Project Structure
73+workflows:
74+ - source: ./workflow.yaml
5975
60−**📁 Complete project structure, technology stack, and architectural patterns:** See [project-structure.mdc](mdc:.cursor/rules/project-structure.mdc)
76+# AutoLoad configuration for discovering agents and tools
77+autoload:
78+ enabled: true
79+ strict: true
80+ include:
81+ - "agents/*.yaml"
82+ - "tools/*.yaml"
83+ exclude:
84+ - "**/*~"
85+ - "**/*.bak"
86+ - "**/*.tmp"
6187
62−## 🚨 CRITICAL: Follow All Development Standards
63−
64−**📋 MANDATORY: Review and follow ALL established coding standards:**
65−
66−- **Code Formatting & Line Spacing**: [no_linebreaks.mdc](mdc:.cursor/rules/no_linebreaks.mdc) - NEVER add blank lines inside function bodies
67−- **Go Coding Standards**: [go-coding-standards.mdc](mdc:.cursor/rules/go-coding-standards.mdc) - Function limits, error handling, documentation policy
68−- **Testing Standards**: [testing-standards.mdc](mdc:.cursor/rules/testing-standards.mdc) - MANDATORY `t.Run("Should...")` pattern, testify usage
69−- **Go Implementation Patterns**: [go-patterns.mdc](mdc:.cursor/rules/go-patterns.mdc) - Canonical implementations of architecture principles
70−- **Architecture Principles**: [architecture.mdc](mdc:.cursor/rules/architecture.mdc) - SOLID principles, Clean Architecture, DRY
71−- **Code Quality & Security**: [quality-security.mdc](mdc:.cursor/rules/quality-security.mdc) - Linting rules, security requirements
72−- **Required Libraries**: [core-libraries.mdc](mdc:.cursor/rules/core-libraries.mdc) - Mandatory library choices and usage patterns
73−- **API Development**: [api-standards.mdc](mdc:.cursor/rules/api-standards.mdc) - RESTful design, versioning, documentation
74−- **Code Review Process**: [review-checklist.mdc](mdc:.cursor/rules/review-checklist.mdc) - Pre-review requirements and checklist
75−
76−## Development Workflow
77−
78−### Pre-Commit Requirements
79−
80−**ALWAYS run before committing:**
81−
82−```bash
83−make fmt && make lint && make test
88+runtime:
89+ permissions:
90+ - --allow-read
91+ - --allow-net
92+ - --allow-env
8493 ```
94+</project_config_pattern>
8595
86−### Development Process
96+## Environment Variable Patterns
8797
88−1. **API changes:** Update Swagger annotations (`swag` comments)
89−2. **Schema changes:** Create migrations with `make migrate-create name=<name>`
90−3. **New features:** Include comprehensive tests following [testing-standards.mdc](mdc:.cursor/rules/testing-standards.mdc)
91−4. **Task completion:** Follow [task-review.mdc](mdc:.cursor/rules/task-review.mdc) for mandatory code review workflow via Zen MCP tools
92−5. **Backwards Compatibility:** See [backwards-compatibility.mdc](mdc:.cursor/rules/backwards-compatibility.mdc) - NOT REQUIRED during development phase
98+<environment_patterns type="api_keys">
99+```yaml
100+# Environment variable references
101+api_key: "{{ .env.GROQ_API_KEY }}"
102+api_key: "{{ .env.OPENAI_API_KEY }}"
103+database_url: "{{ .env.DATABASE_URL }}"
93104
94−### Key Development Notes
95−
96−- **Logging:** Use [core-libraries.mdc](mdc:.cursor/rules/core-libraries.mdc) for structured logging patterns
97−- **Core types:** Use `core.ID` for UUIDs, `core.Ref` for polymorphic references
98−- **Dependencies:** Mock external dependencies in tests when necessary (see [testing-standards.mdc](mdc:.cursor/rules/testing-standards.mdc))
99−
100−## Task Management
101−
102−For task-based development workflows, see these rule files:
103−
104−- [prd-create.mdc](mdc:.cursor/rules/prd-create.mdc) - PRD Creation
105−- [prd-tech-spec.mdc](mdc:.cursor/rules/prd-tech-spec.mdc) - Technical Specifications
106−- [task-generate-list.mdc](mdc:.cursor/rules/task-generate-list.mdc) - Task List Generation
107−- [task-developing.mdc](mdc:.cursor/rules/task-developing.mdc) - Task Development
108−- [task-review.mdc](mdc:.cursor/rules/task-review.mdc) - Task Completion with Zen MCP code review
109−
110−## Rule Management
111−
112−The development rules are actively maintained and improved:
113−
114−- **Rule Management**: [cursor_rules.mdc](mdc:.cursor/rules/cursor_rules.mdc) - Comprehensive guidelines for creating, maintaining, and improving rules
115−
116−## Compozy Configuration Examples
117−
118−For YAML configuration patterns and examples:
119−
120−- **Project Configuration**: [compozy-project-config.mdc](mdc:.cursor/rules/compozy-project-config.mdc) - Project setup patterns
121−- **Task Patterns**: [compozy-task-patterns.mdc](mdc:.cursor/rules/compozy-task-patterns.mdc) - Workflow task configurations
122−- **Agent Configuration**: [compozy-agent-config.mdc](mdc:.cursor/rules/compozy-agent-config.mdc) - AI agent setup patterns
123−- **Shared Patterns**: [compozy-shared-patterns.mdc](mdc:.cursor/rules/compozy-shared-patterns.mdc) - MCP, templates, and references
124−- **Configuration Index**: [compozy-examples.mdc](mdc:.cursor/rules/compozy-examples.mdc) - Overview and cross-references
125−
126−**All rule files are located in `.cursor/rules/` and use semantic XML tags for better context and AI understanding.**
127−
128−The project uses Go 1.24+ features and requires external dependencies to be mocked in tests when necessary.
105+# MCP environment variables
106+mcps:
107+ - id: external_service
108+ url: "{{ .env.MCP_SERVICE_URL }}"
109+ env:
110+ API_KEY: "{{ .env.EXTERNAL_API_KEY }}"
111+ TIMEOUT: "{{ .env.REQUEST_TIMEOUT | default \"30s\" }}"
112+```
113+</environment_patterns>
129114
