Add .github/labels.yml as the canonical label set, synced into the repository by .github/workflows/labels.yaml using EndBug/label-sync. Conventions follow the Kubernetes scheme: https://github.com/kubernetes/test-infra/blob/master/label_sync/labels.md Six namespaced groups: kind/, priority/, triage/, lifecycle/, area/, do-not-merge/. Cozystack-specific labels preserved (epic, community, security/*, size:*). Migration via aliases keeps references on existing issues and PRs: - bug -> kind/bug - enhancement -> kind/feature - documentation -> kind/documentation - question -> kind/support - frozen -> lifecycle/frozen - stale -> lifecycle/stale - do-not-merge -> do-not-merge/work-in-progress delete-other-labels is false on the initial rollout; redundant labels ("do not merge", duplicate, invalid, wontfix) stay until a follow-up PR removes them after stabilisation. The labels workflow has a validate job (python3 schema check) that runs on PR. Sync runs only on push to main, weekly cron, and manual dispatch. Schema invariants: - description <= 100 chars (GitHub REST API limit) - color is 6-char hex without leading # - unique top-level names - aliases do not collide with top-level names PR auto-labeling (.github/workflows/pr-labeler.yaml): - Parses PR title as Conventional Commits header (type, scope, !). - type -> kind/* (feat -> kind/feature, fix -> kind/bug, docs -> kind/documentation, chore/refactor -> kind/cleanup; style, perf, test, build, ci, revert -> no kind label). - scope -> area/* via embedded mapping; composite scopes split on comma. Bracket-style fallback ([scope] description) maps area/* but cannot infer kind/*. - '[Backport release-1.x]' prefix is stripped; area/release and backport labels are added. - '!' after type or 'BREAKING CHANGE:' footer in body adds kind/breaking-change. - Unmapped scope or non-conventional title adds area/uncategorized to flag for human review. - Additive only — never removes existing labels. Hardcoded label references updated: - .github/ISSUE_TEMPLATE/bug_report.md (bug -> kind/bug) - .github/workflows/tags.yaml (documentation -> kind/documentation) AGENTS.md gains an Activation entry pointing agents to labels.yml as the source of truth and to contributing.md for the title auto-labeling table. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
4.3 KiB
AI Agents Overview
This file provides structured guidance for AI coding assistants and agents working with the Cozystack project.
Activation
CRITICAL: When the user asks you to do something that matches the scope of a documented process, you MUST read the corresponding documentation file and follow the instructions exactly as written.
-
Commits, PRs, git operations (e.g., "create a commit", "make a PR", "fix review comments", "rebase", "cherry-pick")
- Read:
contributing.md - Action: Read the entire file and follow ALL instructions step-by-step
- Read:
-
Changelog generation (e.g., "generate changelog", "create changelog", "prepare changelog for version X")
- Read:
changelog.md - Action: Read the entire file and follow ALL steps in the checklist. Do NOT skip any mandatory steps
- Read:
-
Release creation (e.g., "create release", "prepare release", "tag release", "make a release")
- Read:
releasing.md - Action: Read the file and follow the referenced release process in
docs/release.md
- Read:
-
Project structure, conventions, code layout (e.g., "where should I put X", "what's the convention for Y", "how is the project organized")
- Read:
overview.md - Action: Read relevant sections to understand project structure and conventions
- Read:
-
General questions about contributing
- Read:
contributing.md - Action: Read the file to understand git workflow, commit format, PR process
- Read:
-
Issue and PR labeling, triage (e.g., "label this issue", "what label should I use", "triage this", "categorize")
- Read:
.github/labels.yml - Action: Use labels defined there. Conventions follow the Kubernetes scheme —
kind/*(type),area/*(subsystem),priority/*(urgency),triage/*(review state),lifecycle/*(auto-close),do-not-merge/*(PR blockers),security/*(severity) - For
area/*: accuracy outweighs reuse. If no existingarea/*truly fits the change, propose a new one via PR (extendlabels.ymland the scope mapping inpr-labeler.yaml) — do not shoehorn the change into a wrong area.area/uncategorizedis the auto-labeler fallback; treat it as a signal to pick a fit, create a new area, or correct the PR title - PR titles: a Conventional Commits header (
type(scope): description, types fromcontributing.md) auto-applieskind/*andarea/*via.github/workflows/pr-labeler.yaml. Append!(or add aBREAKING CHANGE:footer) to applykind/breaking-change
- Read:
Important rules:
- ✅ ONLY read the file if the task matches the documented process scope - do not read files for tasks that don't match their purpose
- ✅ ALWAYS read the file FIRST before starting the task (when applicable)
- ✅ Follow instructions EXACTLY as written in the documentation
- ✅ Do NOT skip mandatory steps (especially in changelog.md)
- ✅ Do NOT assume you know the process - always check the documentation when the task matches
- ❌ Do NOT read files for tasks that are outside their documented scope
- 📖 Note:
overview.mdcan be useful as a reference to understand project structure and conventions, even when not explicitly required by the task
Project Overview
Cozystack is a Kubernetes-based platform for building cloud infrastructure with managed services (databases, VMs, K8s clusters), multi-tenancy, and GitOps delivery.
Quick Reference
Code Structure
packages/core/- Core platform charts (installer, platform)packages/system/- System components (CSI, CNI, operators)packages/apps/- User-facing applications in catalogpackages/extra/- Tenant-specific modulescmd/,internal/,pkg/- Go codeapi/- Kubernetes CRDs
Conventions
- Helm Charts: Umbrella pattern, vendored upstream charts in
charts/ - Go Code: Controller-runtime patterns, kubebuilder style
- Git Commits: Conventional Commits (
type(scope): description) with--signoff
What NOT to Do
- ❌ Edit
/vendor/,zz_generated.*.go, upstream charts directly - ❌ Modify
go.mod/go.summanually (usego get) - ❌ Force push to main/master
- ❌ Commit built artifacts from
_out