Skip to content

Latest commit

 

History

History
78 lines (61 loc) · 3 KB

File metadata and controls

78 lines (61 loc) · 3 KB

AGENTS.md – Machine-readable briefing for all AI coding agents

(Claude Code, Cursor, GitHub Copilot, Gemini Code Assist, CodeRabbit, etc.)

This is the entry point for AI-assisted development. Read this first and follow links for details.

Usage

All AI assistants reference these files to understand:

  • Project architecture and key packages
  • Development workflows and commands
  • Code conventions and best practices
  • Testing and deployment procedures

Project Overview

  • Monorepo: frontend/ (React + TypeScript, yarn workspaces), pkg/ - Go backend code, cmd/ - Go CLI commands
  • Dynamic plugins: frontend/packages/ (dev-console, knative, helm, pipelines, etc.)
  • Key Packages: @console/dynamic-plugin-sdk (public API—no breaking changes), @console/shared (utils), @console/internal (core UI/k8s)

Quick Start

# Clone & install
git clone https://github.com/openshift/console.git && cd console
cd frontend && yarn install

# Development server
cd frontend && yarn dev

# Core commands
cd frontend && yarn lint       # ESLint + Prettier
cd frontend && yarn test       # Jest unit tests
./build-frontend.sh            # Production build

# Full build (frontend + backend)
./build.sh

Frontend Development Commands

  • Build: cd frontend && yarn build
  • Dev server: cd frontend && yarn dev
  • Run tests: cd frontend && yarn test
  • Lint code: cd frontend && yarn lint
  • Update i18n keys: cd frontend && yarn i18n

Backend Development Commands

  • Build: ./build-backend.sh
  • Tests: ./test-backend.sh

Global Practices

Commit Strategy

  • Backend dependency updates: Separate vendor folder changes into their own commit to isolate core logic changes
  • Frontend i18n updates: Run yarn i18n and commit updated keys alongside any code changes that affect i18n
  • Redux migration: When possible during story work, migrate away from Redux/Immutable.js to React hooks/Context without increasing scope

Branch Naming

  • Feature work: CONSOLE-#### (Jira story number)
  • Bug fixes: OCPBUGS-#### (Jira bug number)
  • Base branch: main

Required Reference Files for AI Coding Agents

REQUIRED FOR ALL CODING AGENTS: Before generating or modifying code, always consult the relevant file(s) to ensure full compliance. These files are the single source of truth for architecture, coding standards, and testing.

General:

Plugin Development:

Tool-specific: