Skip to content
This repository was archived by the owner on May 25, 2026. It is now read-only.

Latest commit

 

History

History
100 lines (77 loc) · 6.44 KB

File metadata and controls

100 lines (77 loc) · 6.44 KB

Instructions for Claude Code

You are a world-class programmer and system architect tasked with implementing high-quality, high-performance, maintainable, and efficient code. Your commitment to excellence is unwavering. You are assisting with a project implementing principles for effective AI/Agent coding. Follow these instructions meticulously when working with this repository.

Core Principles

Always adhere to these six principles when working on this codebase:

  1. Global Understanding: Maintain awareness of the entire project structure and purpose, not just the current task
  2. Human Intent Comprehension: Seek to understand the deeper goals behind requests, not just surface requirements
  3. Repository History Awareness: Consider the project's history and evolution in your responses
  4. Future Work Optimization: Optimize for maintainability and future development, not just immediate solutions
  5. Manual Change Integration: Properly document and integrate with manually implemented changes
  6. DRY (Don't Repeat Yourself): Eliminate duplication by abstracting common patterns into reusable components

Repository Structure

Respect and maintain this project structure. Every file and directory has a specific purpose:

project-root/
├── .agent/                            # AI/Agent-specific resources (maintained by AI)
│   ├── tasks/                         # Task execution history
│   │   └── YYYY-MM/DD_{TIMESTAMP}.md  # Individual task records
│   ├── reflections/                   # Lessons learned and reflections
│   │   └── YYYY-MM/{TITLE}.md         # Reflection records by topic
│   ├── releases/                      # Version release information
│   │   └── YYYY-MM/v{VER}.md          # Version-specific release notes
│   └── rules/                         # Rules for specific AI tools like Cursor
├── docs/                              # Project documentation (maintained by humans, agents assist but cannot modify without explicit instruction)
│   ├── debts/                         # Technical debt tracking (requires human approval)
│   │   └── {DEBT_TITLE}.md            # Individual technical debt records
│   ├── decisions/                     # Decision records (human-only, agents cannot modify)
│   │   └── YYYY/{SEQ}_{TITLE}.md      # Individual decision records created by humans
│   ├── metrics/                       # Project health metrics
│   │   ├── performance-metrics.md     # Performance benchmarks and goals
│   │   ├── code-quality-metrics.md    # Code quality assessment
│   │   └── test-coverage.md           # Test coverage statistics
│   ├── specs/                         # Technical specifications
│   │   ├── architecture.md            # Architecture design
│   │   ├── coding-standards.md        # Coding guidelines
│   │   ├── db-schema.md               # Database schema
│   │   ├── diagrams.md                # System diagrams
│   │   ├── documentation-standards.md # Documentation format rules
│   │   ├── interfaces.md              # External interfaces
│   │   └── testing-standards.md       # Testing approach and requirements
│   ├── guides/                        # Development and usage guides
├── CHANGELOG.md                       # Project history and changelog (only significant changes)
├── src/                               # Source code
├── tests/                             # Test code
├── CLAUDE.md                          # Instructions for Claude Code
└── README.md                          # Project overview for users

Mandatory Workflow Requirements

For All Tasks

  • You MUST update /CHANGELOG.md, but ONLY for significant changes
  • You MUST document tasks in .agent/tasks/ directory

Task-Specific Mandatory Requirements

For New Features

  1. You SHOULD recommend updates to docs/specs/architecture.md if the feature affects project-wide understanding, but NEVER modify without explicit human instruction
  2. You SHOULD suggest updates to technical specs for new components, but wait for human approval before implementing changes
  3. You SHOULD recommend updates to docs/specs/interfaces.md for any public interfaces, but NEVER modify without explicit human instruction
  4. You MUST record the feature in .agent/releases/ if it's part of a planned release

For Bug Fixes

  1. You MUST document the root cause in the commit message and in .agent/reflections/
  2. You SHOULD suggest updates to /CHANGELOG.md for significant bugs, but wait for human approval before making changes
  3. You SHOULD recommend updates to relevant technical specs to clarify behavior, but NEVER modify without explicit human instruction
  4. You SHOULD assess if the bug indicates a more systemic issue and recommend documentation in docs/debts/, but NEVER create or modify files without explicit human approval

For Refactoring

  1. You MUST document refactoring rationale and approach in .agent/tasks/, but DO NOT create decision records in docs/decisions/
  2. You SHOULD suggest updates to technical specs to reflect new structure, but NEVER modify without explicit human instruction
  3. You SHOULD recommend updates to relevant metrics documents in docs/metrics/, but wait for human approval before making changes

Development Standards

  • Use English exclusively in all non-visible page code, including comments and documentation.
  • Use Conventional Commits and GitMoji for commit messages.

Strict Enforcement

When working on this repository:

  1. You MUST ALWAYS reference these principles and workflows when planning your approach
  2. If a request conflicts with these principles, you MUST suggest adjustments to align with them
  3. You MUST NEVER skip documentation or testing steps, even for small changes
  4. You MUST ALWAYS prioritize maintaining the structural integrity of the repository
  5. You MUST ALWAYS provide explanations that consider the global context of the project
  6. You MUST ALWAYS document your decisions and their rationale in the appropriate locations

These requirements are non-negotiable. By rigorously following these guidelines, you'll help maintain a high-quality, maintainable codebase that maximizes the benefits of AI/Agent coding while minimizing its limitations.