diff --git a/.gitignore b/.gitignore index 092f622..6179c49 100644 --- a/.gitignore +++ b/.gitignore @@ -31,9 +31,9 @@ frontend/coverage/ .claude/settings.local.json CLAUDE.local.md .ai-output/ -# Drop owner's agent instructions (personal, not shared with the team) -backend/src/main/java/com/restless/drop/AGENTS.md -backend/src/main/java/com/restless/drop/CLAUDE.md +# Root agent instructions are personal (each member keeps their own). Subfolder ones stay versioned. +/AGENTS.md +/CLAUDE.md # Load test raw results (summaries go to docs/reports/) performance/**/results/ diff --git a/AGENTS.md b/AGENTS.md deleted file mode 100644 index 8203223..0000000 --- a/AGENTS.md +++ /dev/null @@ -1,140 +0,0 @@ - -# Agent Instructions - -## 1. Project - -This repository implements an artist fandom event commerce platform. - -Core domains: -- Fan meeting: entry applications, winner draw, winner payment -- Ticketing: seat holds and reservations -- Drop: waiting room, inventory reservation, purchase -- Auction: concurrent bidding and closing - -Shared capabilities: -- Authentication and authorization -- Orders and payment integration -- Post-commit domain events (Spring application events) -- Observability and AWS deployment - -## 2. Source of Truth - -Start from docs/README.md (documentation index) and -read only the documentation relevant to the task. - -- Product requirements: docs/product/ -- Domain invariants: docs/domains/ -- System architecture: docs/architecture/ -- API and event contracts: docs/contracts/ -- Accepted decisions: docs/decisions/ -- Testing strategy: docs/testing/ -- Operations: docs/operations/ - -Accepted documents describe intended behavior. -Source code and tests describe current implemented behavior. - -If documentation and implementation conflict: -1. Identify and report the discrepancy. -2. Do not silently change business policies. -3. Propose a resolution before changing public contracts - or critical invariants. - -## 3. Required Workflow - -Before implementation: -1. Identify the affected domain and modules. -2. Read its requirements, policies, and state machine. -3. Check relevant API contracts and accepted ADRs. -4. Identify affected invariants and failure scenarios. -5. Produce a concise implementation plan. - -During implementation: -1. Keep changes within the agreed scope. -2. Preserve module boundaries. -3. Add or update tests for changed behavior. -4. Handle errors and retries explicitly. -5. Do not introduce unnecessary abstractions. - -After implementation: -1. Run relevant tests and static checks. -2. Verify affected invariants. -3. Update changed contracts and documentation. -4. Summarize changed files, tests, and remaining risks. -5. Never report tests as passed unless executed. - -## 4. Critical Invariants - -- Fan meeting confirmed plus payment-pending selections must not exceed capacity. -- A fan meeting payment approved within its deadline must confirm participation. -- A concert seat must not have multiple active owners. -- Drop inventory must never be oversold. -- Duplicate purchase requests must not create duplicate orders. -- Unknown PG results must not be treated as failures. -- Auction closing must produce at most one winner. - -Never bypass these constraints to satisfy a test or -simplify implementation. - -## 5. Architecture Boundaries - -- Prefer the agreed modular monolith architecture. -- Domain modules own their business rules and data access. -- Do not access another domain's repository directly. -- Coordinate cross-domain workflows through defined - application services or contracts. -- Do not hold database transactions open during PG calls. -- Commit core state (inventory, orders, payments) inside - the database transaction. Never delegate it to event - listeners. -- Run follow-up work (e.g. notifications) only in - AFTER_COMMIT listeners. -- Log and emit a metric on every listener failure. - Never swallow listener exceptions silently. -- Do not introduce Outbox or Kafka unless an accepted ADR - says so (see docs/decisions/0001-event-handling.md). -- Avoid unnecessary changes to shared interfaces. - -## 6. Verification - -For every behavioral change: -- Run focused unit or integration tests. -- Run relevant concurrency tests when changing resource - allocation, reservation, payment, or bidding logic. -- Validate API/event compatibility when contracts change. -- Run the build and test commands in docs/testing/strategy.md - before PR review. - -Use the actual commands documented in docs/testing/. -Do not invent test results or benchmark numbers. - -## 7. Output Location - -- Write scratch output (plans, reports, logs, analysis - notes) only to `.ai-output/`. It is git-ignored. -- Do not create such files anywhere else in the repository. -- Move a result into docs/ only when asked to make it a - shared document. - -## 8. Safety - -- Never commit secrets, tokens, or credentials. -- Never run destructive database migrations without review. -- Never edit a migration file that is already merged into - dev. Add a new migration instead. -- Never load-test a real payment provider. -- Never deploy to production without explicit authorization. -- Do not disable tests or weaken assertions to obtain - a passing build. - -## 9. Pull Requests - -Include: -- What changed and why -- Affected domain and invariants -- Test commands and actual results -- Contract or documentation updates -- Remaining risks - -Use Conventional Commits: -type(scope): description - diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 43c994c..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1 +0,0 @@ -@AGENTS.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4177e87..e4c5175 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -83,6 +83,8 @@ npm run dev # /api 요청은 localhost:8080으로 프록시 ## AI 결과물 +루트 `AGENTS.md`, `CLAUDE.md`(에이전트 지침)는 레포에 두지 않는다. 각자 PC에서 만들어 쓰며 `.gitignore`에 들어 있다. 팀이 지켜야 하는 기준은 `docs/`(불변식, 계약, ADR)와 이 문서가 정본이다. 2026-11-14 전까지 레포에 있던 내용은 `git show 0fb7131:AGENTS.md > AGENTS.md`(CLAUDE.md도 같은 방식)로 꺼낼 수 있다. + Claude, Codex, ChatGPT가 만든 계획, 보고서, 분석 메모는 `.ai-output/`에 둔다. 이 폴더는 커밋되지 않는다. 팀이 함께 볼 내용이면 `docs/`로 옮겨 PR로 올린다. AI 작업에 쓰는 **도구**(검사 스크립트, 가드, 지시서 템플릿)는 결과물이 아니므로 `tools/harness/`에 커밋한다. 지금은 드롭 담당자만 쓰며, hook은 `tools/harness/install.sh`를 직접 실행한 PC에만 설치된다. 실행 기록(로그, 단계 보고서)은 계속 `.ai-output/`에 둔다.