Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions AI_POLICY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# AI Usage Policy

This document defines the Docker Compose project’s policy regarding the use of AI-assisted tools (such as code generation, refactoring, documentation, or analysis tools) by contributors.

## Summary

- ✅ **AI tools are allowed** for contributing to Docker Compose.
- ⚠️ **AI-generated contributions are reviewed more strictly** than human-written ones.
- ❌ **Pull requests based on AI output will only be reviewed if they are explicitly approved in advance by a maintainer via a tracked issue and correctly tagged.**

The goal of this policy is to balance openness to modern tooling with the project’s standards for correctness, maintainability, and long-term stewardship.

---

## Allowed Use of AI

Contributors may use AI tools to assist with:

- Exploring ideas or approaches
- Writing or refactoring code
- Generating tests or documentation
- Explaining existing code or behavior

Using AI is **not considered misconduct**, and contributors are not required to avoid or hide AI usage.

---

## Requirements for AI-Assisted Pull Requests

Any pull request that includes **non-trivial AI-generated content** MUST meet **all** of the following requirements to be eligible for review:

### 1. Maintainer-Reviewed Issue

- The pull request **must be based on an issue that has been reviewed and approved by a Docker Compose maintainer**.
- The issue discussion must clearly establish:
- The problem being solved
- The expected behavior or outcome
- The scope of the change

Pull requests created without this prior agreement **will not be reviewed**, regardless of quality.

### 2. Explicit Tagging

- The pull request **must be labeled with the tag**:
3 changes: 2 additions & 1 deletion cmd/compose/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"syscall"

"github.com/compose-spec/compose-go/v2/cli"
"github.com/compose-spec/compose-go/v2/consts"
"github.com/compose-spec/compose-go/v2/dotenv"
"github.com/compose-spec/compose-go/v2/loader"
composepaths "github.com/compose-spec/compose-go/v2/paths"
Expand Down Expand Up @@ -221,7 +222,7 @@ func makeJSONError(err error) error {
}

func (o *ProjectOptions) addProjectFlags(f *pflag.FlagSet) {
f.StringArrayVar(&o.Profiles, "profile", []string{}, "Specify a profile to enable")
f.StringArrayVar(&o.Profiles, "profile", defaultStringArrayVar(consts.ComposeProfiles), "Specify a profile to enable")
f.StringVarP(&o.ProjectName, "project-name", "p", "", "Project name")
f.StringArrayVarP(&o.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
f.StringArrayVar(&o.insecureRegistries, "insecure-registry", []string{}, "Use insecure registry to pull Compose OCI artifacts. Doesn't apply to images")
Expand Down
Loading
Loading