codingbuddy-rules 0.0.0-canary.20251222065027.7844cd5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ai-rules/CHANGELOG.md +117 -0
- package/.ai-rules/README.md +232 -0
- package/.ai-rules/adapters/antigravity.md +195 -0
- package/.ai-rules/adapters/claude-code.md +117 -0
- package/.ai-rules/adapters/codex.md +124 -0
- package/.ai-rules/adapters/cursor.md +128 -0
- package/.ai-rules/adapters/kiro.md +130 -0
- package/.ai-rules/adapters/q.md +126 -0
- package/.ai-rules/agents/README.md +681 -0
- package/.ai-rules/agents/accessibility-specialist.json +514 -0
- package/.ai-rules/agents/architecture-specialist.json +501 -0
- package/.ai-rules/agents/backend-developer.json +494 -0
- package/.ai-rules/agents/code-quality-specialist.json +565 -0
- package/.ai-rules/agents/code-reviewer.json +565 -0
- package/.ai-rules/agents/devops-engineer.json +277 -0
- package/.ai-rules/agents/documentation-specialist.json +543 -0
- package/.ai-rules/agents/frontend-developer.json +402 -0
- package/.ai-rules/agents/performance-specialist.json +528 -0
- package/.ai-rules/agents/security-specialist.json +464 -0
- package/.ai-rules/agents/seo-specialist.json +427 -0
- package/.ai-rules/agents/test-strategy-specialist.json +542 -0
- package/.ai-rules/agents/ui-ux-designer.json +513 -0
- package/.ai-rules/keyword-modes.json +20 -0
- package/.ai-rules/rules/augmented-coding.md +292 -0
- package/.ai-rules/rules/clarification-guide.md +138 -0
- package/.ai-rules/rules/core.md +1030 -0
- package/.ai-rules/rules/project.md +200 -0
- package/.ai-rules/schemas/README.md +66 -0
- package/.ai-rules/schemas/agent.schema.json +258 -0
- package/index.d.ts +4 -0
- package/index.js +8 -0
- package/package.json +32 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the Multi-AI Coding Assistant Common Rules System will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.0] - 2025-11-20
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Common Rules Repository** (`.ai-rules/`)
|
|
12
|
+
- `rules/core.md`: Workflow modes (PLAN/ACT/EVAL), agent activation, communication rules
|
|
13
|
+
- `rules/project.md`: Tech stack, project structure, development rules, domain knowledge
|
|
14
|
+
- `rules/augmented-coding.md`: TDD principles, code quality standards, commit discipline
|
|
15
|
+
- **Specialist Agents** (12 agents)
|
|
16
|
+
- Frontend Developer, Code Reviewer
|
|
17
|
+
- Architecture, Test Strategy, Performance, Security
|
|
18
|
+
- Accessibility, SEO, Design System, Documentation
|
|
19
|
+
- Code Quality, DevOps Engineer
|
|
20
|
+
- **AI Tool Integrations** (6 tools)
|
|
21
|
+
- Cursor: `.cursor/rules/imports.mdc`
|
|
22
|
+
- Claude Code: `.claude/rules/custom-instructions.md`
|
|
23
|
+
- Antigravity: `.antigravity/rules/instructions.md`
|
|
24
|
+
- GitHub Copilot: `.github/copilot-instructions.md`
|
|
25
|
+
- Amazon Q: `.q/rules/customizations.md`
|
|
26
|
+
- Kiro: `.kiro/rules/guidelines.md`
|
|
27
|
+
- **Integration Guides** (6 adapters)
|
|
28
|
+
- Detailed guides for each AI tool in `.ai-rules/adapters/`
|
|
29
|
+
- **Validation System**
|
|
30
|
+
- `scripts/validate-rules.sh`: Automated structure and file validation
|
|
31
|
+
- **Documentation**
|
|
32
|
+
- `.ai-rules/README.md`: Comprehensive guide (11KB)
|
|
33
|
+
- `implementation_plan.md`: Detailed implementation plan
|
|
34
|
+
- `task.md`: Task checklist
|
|
35
|
+
- `walkthrough.md`: Complete implementation walkthrough
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
- Removed Cursor-specific paths from common rules
|
|
39
|
+
- Changed `.cursor/agents/` → `.ai-rules/agents/` in `core.md` and `project.md`
|
|
40
|
+
- Changed `.mdc` → `.md` references for consistency
|
|
41
|
+
- Transformed Cursor rules to AI-agnostic format
|
|
42
|
+
- Removed frontmatter metadata (globs, alwaysApply) from common rules
|
|
43
|
+
- Maintained tool-specific features in individual tool directories
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
- Cursor path dependencies in common rule files
|
|
47
|
+
- File extension references consistency
|
|
48
|
+
|
|
49
|
+
## [Unreleased]
|
|
50
|
+
|
|
51
|
+
### Added
|
|
52
|
+
- **Clarification Phase** for PLAN mode (`rules/clarification-guide.md`)
|
|
53
|
+
- Optional phase triggered when AI detects ambiguous requirements
|
|
54
|
+
- Sequential Q&A with progress indicator (Question N/M format)
|
|
55
|
+
- Multiple-choice questions preferred for easy response
|
|
56
|
+
- Ambiguity assessment checklist (6 categories, triggers on 2+ unclear)
|
|
57
|
+
- Question count guidelines (2-7 questions based on complexity)
|
|
58
|
+
- Korean/English output format support
|
|
59
|
+
- Updated `rules/core.md` with Clarification Phase section
|
|
60
|
+
|
|
61
|
+
### Planned
|
|
62
|
+
- Real-world usage testing across all 6 AI tools
|
|
63
|
+
- Performance metrics collection
|
|
64
|
+
- User feedback integration
|
|
65
|
+
- Advanced examples and use cases
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Version Numbering
|
|
70
|
+
|
|
71
|
+
- **Major version** (X.0.0): Breaking changes to common rules structure
|
|
72
|
+
- **Minor version** (0.X.0): New AI tool integrations, new specialist agents
|
|
73
|
+
- **Patch version** (0.0.X): Bug fixes, documentation updates, minor improvements
|
|
74
|
+
|
|
75
|
+
## Migration Guides
|
|
76
|
+
|
|
77
|
+
### Upgrading from Cursor-only to Multi-AI (1.0.0)
|
|
78
|
+
|
|
79
|
+
**Before (Cursor-only)**:
|
|
80
|
+
```
|
|
81
|
+
.cursor/rules/
|
|
82
|
+
├── core.mdc
|
|
83
|
+
├── project.mdc
|
|
84
|
+
└── augmented-coding.mdc
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**After (Multi-AI 1.0.0)**:
|
|
88
|
+
```
|
|
89
|
+
.ai-rules/rules/ # Common rules (all tools)
|
|
90
|
+
├── core.md
|
|
91
|
+
├── project.md
|
|
92
|
+
└── augmented-coding.md
|
|
93
|
+
|
|
94
|
+
.cursor/rules/
|
|
95
|
+
├── imports.mdc # References .ai-rules/
|
|
96
|
+
├── core.mdc # Kept for compatibility
|
|
97
|
+
├── project.mdc
|
|
98
|
+
└── augmented-coding.mdc
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Action Required**: None - backwards compatible. Cursor continues to work with existing `.mdc` files while also referencing common rules via `imports.mdc`.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Maintenance
|
|
106
|
+
|
|
107
|
+
When updating rules:
|
|
108
|
+
1. Update `.ai-rules/rules/*.md` for changes affecting all AI tools
|
|
109
|
+
2. Update this CHANGELOG with changes under `[Unreleased]`
|
|
110
|
+
3. When releasing, move `[Unreleased]` items to new version section
|
|
111
|
+
4. Tag the release: `git tag -a v1.0.0 -m "Release v1.0.0"`
|
|
112
|
+
|
|
113
|
+
## Links
|
|
114
|
+
|
|
115
|
+
- [Implementation Plan](../implementation_plan.md)
|
|
116
|
+
- [Walkthrough](../walkthrough.md)
|
|
117
|
+
- [README](.ai-rules/README.md)
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# Common AI Coding Rules System
|
|
2
|
+
|
|
3
|
+
This directory contains shared coding rules and guidelines used across multiple AI coding assistants (Cursor, Claude Code, Codex, Antigravity, Amazon Q, Kiro, etc.) for consistent development practices.
|
|
4
|
+
|
|
5
|
+
## Directory Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
.ai-rules/
|
|
9
|
+
├── README.md # This file - overview and usage guide
|
|
10
|
+
├── rules/ # Common coding rules (AI-agnostic)
|
|
11
|
+
│ ├── core.md # Workflow modes (PLAN/ACT/EVAL), communication
|
|
12
|
+
│ ├── clarification-guide.md # Clarification Phase guidelines for PLAN mode
|
|
13
|
+
│ ├── project.md # Tech stack, architecture, project context
|
|
14
|
+
│ └── augmented-coding.md # TDD principles, code quality standards
|
|
15
|
+
├── agents/ # Specialist agent definitions (JSON)
|
|
16
|
+
│ └── *.json # Domain specialist agents
|
|
17
|
+
└── adapters/ # AI tool-specific integration guides
|
|
18
|
+
└── *.md # Integration guides per tool
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Purpose
|
|
22
|
+
|
|
23
|
+
### Single Source of Truth
|
|
24
|
+
|
|
25
|
+
All AI coding assistants share the same:
|
|
26
|
+
- **Workflow modes** (PLAN/ACT/EVAL)
|
|
27
|
+
- **Code quality standards** (TDD, SOLID, 90%+ test coverage)
|
|
28
|
+
- **Project context** (tech stack, architecture, conventions)
|
|
29
|
+
- **Specialist knowledge** (security, performance, accessibility, etc.)
|
|
30
|
+
|
|
31
|
+
### Benefits
|
|
32
|
+
|
|
33
|
+
- **Consistency**: All AI tools follow identical coding standards
|
|
34
|
+
- **Maintainability**: Update rules once, all tools benefit
|
|
35
|
+
- **Extensibility**: Easy to add new AI tools
|
|
36
|
+
- **Flexibility**: Tool-specific customizations via adapters
|
|
37
|
+
- **Team Alignment**: Everyone uses the same guidelines regardless of AI tool preference
|
|
38
|
+
|
|
39
|
+
## Core Rules Overview
|
|
40
|
+
|
|
41
|
+
### 1. `rules/core.md` - Workflow & Communication
|
|
42
|
+
|
|
43
|
+
**Workflow Modes:**
|
|
44
|
+
- **PLAN**: Define implementation plan (includes optional Clarification Phase)
|
|
45
|
+
- **ACT**: Execute the plan and make code changes
|
|
46
|
+
- **EVAL**: Analyze results and propose improvements
|
|
47
|
+
|
|
48
|
+
**Clarification Phase (Optional in PLAN):**
|
|
49
|
+
- Triggers when AI detects ambiguous requirements (2+ unclear items)
|
|
50
|
+
- Sequential Q&A with progress indicator (Question N/M)
|
|
51
|
+
- Multiple-choice questions preferred for easy response
|
|
52
|
+
- See `rules/clarification-guide.md` for detailed guidelines
|
|
53
|
+
|
|
54
|
+
**Key Principles:**
|
|
55
|
+
- Start in PLAN mode by default
|
|
56
|
+
- Move to ACT when user types `ACT`
|
|
57
|
+
- Return to PLAN after ACT completes (automatic)
|
|
58
|
+
- Enter EVAL only when explicitly requested
|
|
59
|
+
|
|
60
|
+
### 2. `rules/project.md` - Project Setup
|
|
61
|
+
|
|
62
|
+
**Purpose:** Define project-specific context that AI assistants need.
|
|
63
|
+
|
|
64
|
+
**Contents (customize per project):**
|
|
65
|
+
- Tech stack and dependencies
|
|
66
|
+
- Project structure and architecture
|
|
67
|
+
- Development rules and conventions
|
|
68
|
+
- Code review checklist
|
|
69
|
+
|
|
70
|
+
> **Note**: This file is a template. Each project should customize it based on their tech stack and architecture.
|
|
71
|
+
|
|
72
|
+
### 3. `rules/augmented-coding.md` - TDD & Quality
|
|
73
|
+
|
|
74
|
+
**TDD Cycle:**
|
|
75
|
+
1. **Red**: Write failing test
|
|
76
|
+
2. **Green**: Implement minimal code
|
|
77
|
+
3. **Refactor**: Improve after tests pass
|
|
78
|
+
|
|
79
|
+
**Code Quality:**
|
|
80
|
+
- SOLID principles
|
|
81
|
+
- DRY (Don't Repeat Yourself)
|
|
82
|
+
- No mocking - test real behavior
|
|
83
|
+
- TypeScript strict mode (no `any`)
|
|
84
|
+
- Tidy First approach (separate structural vs behavioral changes)
|
|
85
|
+
|
|
86
|
+
## Specialist Agents
|
|
87
|
+
|
|
88
|
+
Specialist agents provide domain-specific expertise:
|
|
89
|
+
|
|
90
|
+
| Agent | Expertise | Use Cases |
|
|
91
|
+
|-------|-----------|-----------|
|
|
92
|
+
| **Code Reviewer** | Quality evaluation, architecture | Code review, production readiness |
|
|
93
|
+
| **Architecture Specialist** | Layer boundaries, dependencies | System design, refactoring |
|
|
94
|
+
| **Test Strategy Specialist** | Test coverage, TDD workflow | Testing strategy, quality assurance |
|
|
95
|
+
| **Performance Specialist** | Optimization, profiling | Performance tuning, bottleneck analysis |
|
|
96
|
+
| **Security Specialist** | Authentication, vulnerabilities | Security audit, secure coding |
|
|
97
|
+
| **Accessibility Specialist** | WCAG 2.1 AA, ARIA | A11y compliance, screen readers |
|
|
98
|
+
| **Documentation Specialist** | Technical writing, clarity | Documentation quality |
|
|
99
|
+
| **Code Quality Specialist** | SOLID, DRY, complexity | Code quality planning/review |
|
|
100
|
+
| **DevOps Engineer** | CI/CD, containerization, monitoring | Infrastructure, deployment |
|
|
101
|
+
|
|
102
|
+
See `agents/README.md` for detailed agent documentation.
|
|
103
|
+
|
|
104
|
+
## AI Tool Integration
|
|
105
|
+
|
|
106
|
+
Each AI tool has its own integration guide in `adapters/`:
|
|
107
|
+
|
|
108
|
+
- **Cursor**: `adapters/cursor.md`
|
|
109
|
+
- **Claude Code**: `adapters/claude-code.md`
|
|
110
|
+
- **GitHub Copilot / Codex**: `adapters/codex.md`
|
|
111
|
+
- **Antigravity**: `adapters/antigravity.md`
|
|
112
|
+
- **Amazon Q**: `adapters/q.md`
|
|
113
|
+
- **Kiro**: `adapters/kiro.md`
|
|
114
|
+
|
|
115
|
+
## Getting Started
|
|
116
|
+
|
|
117
|
+
### For New AI Tool
|
|
118
|
+
|
|
119
|
+
1. **Read the adapter guide**: Check if your tool has a guide in `adapters/`
|
|
120
|
+
2. **Create tool directory**: e.g., `.{tool}/rules/`
|
|
121
|
+
3. **Reference common rules**: Link to `.ai-rules/` in your tool's config
|
|
122
|
+
4. **Add tool-specific customizations**: Only what's unique to that tool
|
|
123
|
+
|
|
124
|
+
### For Existing Tools
|
|
125
|
+
|
|
126
|
+
1. **Update existing configs**: Add references to `.ai-rules/`
|
|
127
|
+
2. **Remove duplicates**: Rely on common rules first
|
|
128
|
+
3. **Keep tool-specific features**: Maintain what's unique to each tool
|
|
129
|
+
|
|
130
|
+
## Usage Examples
|
|
131
|
+
|
|
132
|
+
### Workflow Example
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
User: Create a new feature for user registration
|
|
136
|
+
|
|
137
|
+
AI: # Mode: PLAN
|
|
138
|
+
[References .ai-rules/rules/core.md workflow]
|
|
139
|
+
[Uses .ai-rules/rules/project.md context]
|
|
140
|
+
[Applies .ai-rules/rules/augmented-coding.md TDD]
|
|
141
|
+
|
|
142
|
+
User: ACT
|
|
143
|
+
|
|
144
|
+
AI: # Mode: ACT
|
|
145
|
+
[Executes implementation]
|
|
146
|
+
|
|
147
|
+
User: EVAL
|
|
148
|
+
|
|
149
|
+
AI: # Mode: EVAL
|
|
150
|
+
[Evaluates with code-reviewer.json framework]
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Referencing Rules
|
|
154
|
+
|
|
155
|
+
In any AI tool:
|
|
156
|
+
- `@.ai-rules/rules/core.md` - Workflow guidance
|
|
157
|
+
- `@.ai-rules/rules/project.md` - Project context
|
|
158
|
+
- `@.ai-rules/agents/*.json` - Specialist expertise
|
|
159
|
+
|
|
160
|
+
## Maintenance
|
|
161
|
+
|
|
162
|
+
### Updating Rules
|
|
163
|
+
|
|
164
|
+
**For changes affecting all AI tools:**
|
|
165
|
+
1. Edit files in `.ai-rules/rules/` or `.ai-rules/agents/`
|
|
166
|
+
2. Commit changes
|
|
167
|
+
3. All AI tools automatically use updated rules
|
|
168
|
+
|
|
169
|
+
**For tool-specific changes:**
|
|
170
|
+
1. Edit only that tool's config (e.g., `.cursor/rules/`)
|
|
171
|
+
2. Common rules remain unchanged
|
|
172
|
+
|
|
173
|
+
### Update Checklist
|
|
174
|
+
|
|
175
|
+
After modifying `.ai-rules/`:
|
|
176
|
+
- [ ] Rules are AI-agnostic (no tool-specific syntax)
|
|
177
|
+
- [ ] Rules are technology-agnostic (no framework-specific content)
|
|
178
|
+
- [ ] All markdown files are valid
|
|
179
|
+
- [ ] Agent JSON files are valid
|
|
180
|
+
- [ ] Documentation updated if needed
|
|
181
|
+
|
|
182
|
+
## Architecture Principles
|
|
183
|
+
|
|
184
|
+
### Design Decisions
|
|
185
|
+
|
|
186
|
+
1. **AI-Agnostic Format**: Use standard markdown and JSON
|
|
187
|
+
2. **Technology-Agnostic**: No framework-specific examples in common rules
|
|
188
|
+
3. **Modular Structure**: Separate concerns (workflow, project, quality)
|
|
189
|
+
4. **Tool Adapters**: Each tool translates common rules to its format
|
|
190
|
+
5. **Single Source of Truth**: `.ai-rules/` is authoritative
|
|
191
|
+
|
|
192
|
+
### Override Hierarchy
|
|
193
|
+
|
|
194
|
+
When rules conflict between common rules and tool-specific configurations:
|
|
195
|
+
|
|
196
|
+
**Priority Order** (highest to lowest):
|
|
197
|
+
1. **Tool-specific rules** (e.g., `.cursor/rules/`)
|
|
198
|
+
2. **Common rules** (`.ai-rules/rules/*.md`)
|
|
199
|
+
3. **Default AI behavior** (tool's built-in defaults)
|
|
200
|
+
|
|
201
|
+
### File Format Choices
|
|
202
|
+
|
|
203
|
+
- **Markdown (.md)**: Universal, readable, supported by all tools
|
|
204
|
+
- **JSON (.json)**: Structured data for agent definitions
|
|
205
|
+
- **Tool-specific**: Each tool keeps its native format
|
|
206
|
+
|
|
207
|
+
## Contributing
|
|
208
|
+
|
|
209
|
+
### Adding New Rules
|
|
210
|
+
|
|
211
|
+
1. Determine scope: All tools or tool-specific?
|
|
212
|
+
2. If all tools: Add to `.ai-rules/rules/`
|
|
213
|
+
3. If tool-specific: Add to `.{tool}/rules/`
|
|
214
|
+
4. Ensure content is technology-agnostic
|
|
215
|
+
5. Update relevant documentation
|
|
216
|
+
|
|
217
|
+
### Adding New AI Tools
|
|
218
|
+
|
|
219
|
+
1. Create directory: `.{new-tool}/`
|
|
220
|
+
2. Create adapter guide: `.ai-rules/adapters/{new-tool}.md`
|
|
221
|
+
3. Create tool config: `.{new-tool}/rules/`
|
|
222
|
+
4. Reference common rules from `.ai-rules/`
|
|
223
|
+
5. Document tool-specific features
|
|
224
|
+
|
|
225
|
+
## Further Reading
|
|
226
|
+
|
|
227
|
+
- **Workflow Details**: `rules/core.md`
|
|
228
|
+
- **Clarification Phase**: `rules/clarification-guide.md`
|
|
229
|
+
- **Project Setup**: `rules/project.md`
|
|
230
|
+
- **TDD & Quality**: `rules/augmented-coding.md`
|
|
231
|
+
- **Agent System**: `agents/README.md`
|
|
232
|
+
- **Tool Integration**: `adapters/*.md`
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# Antigravity Integration Guide
|
|
2
|
+
|
|
3
|
+
This guide explains how to use the common AI rules (`.ai-rules/`) in Antigravity (Google Gemini-based coding assistant).
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Antigravity uses the `.antigravity/` directory for its custom instructions and configuration, referencing the common rules from `.ai-rules/`.
|
|
8
|
+
|
|
9
|
+
## Integration Method
|
|
10
|
+
|
|
11
|
+
### 1. Create Antigravity Configuration
|
|
12
|
+
|
|
13
|
+
Create `.antigravity/rules/instructions.md` to reference common rules:
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
# Antigravity Instructions
|
|
17
|
+
|
|
18
|
+
## Common AI Rules Reference
|
|
19
|
+
|
|
20
|
+
This project follows shared AI coding rules from `.ai-rules/` for consistency across all AI assistants (Cursor, Claude Code, Antigravity, etc.).
|
|
21
|
+
|
|
22
|
+
### 📚 Core Workflow (PLAN/ACT/EVAL)
|
|
23
|
+
|
|
24
|
+
**Source**: `.ai-rules/rules/core.md`
|
|
25
|
+
|
|
26
|
+
#### Work Modes
|
|
27
|
+
|
|
28
|
+
You have three modes of operation:
|
|
29
|
+
|
|
30
|
+
1. **PLAN mode** - Define a plan without making changes
|
|
31
|
+
2. **ACT mode** - Execute the plan and make changes
|
|
32
|
+
3. **EVAL mode** - Analyze results and propose improvements
|
|
33
|
+
|
|
34
|
+
**Mode Flow**:
|
|
35
|
+
- Start in PLAN mode by default
|
|
36
|
+
- Move to ACT when user types `ACT`
|
|
37
|
+
- Return to PLAN after ACT completes (automatic)
|
|
38
|
+
- Move to EVAL only when user explicitly types `EVAL`
|
|
39
|
+
|
|
40
|
+
**Mode Indicators**:
|
|
41
|
+
- Print `# Mode: PLAN` in plan mode
|
|
42
|
+
- Print `# Mode: ACT` in act mode
|
|
43
|
+
- Print `# Mode: EVAL` in eval mode
|
|
44
|
+
|
|
45
|
+
See full workflow details in `.ai-rules/rules/core.md`
|
|
46
|
+
|
|
47
|
+
### 🏗️ Project Context
|
|
48
|
+
|
|
49
|
+
**Source**: `.ai-rules/rules/project.md`
|
|
50
|
+
|
|
51
|
+
#### Tech Stack
|
|
52
|
+
|
|
53
|
+
프로젝트의 `package.json`을 참조하세요.
|
|
54
|
+
|
|
55
|
+
#### Project Structure
|
|
56
|
+
```
|
|
57
|
+
src/
|
|
58
|
+
├── app/ # Next.js App Router
|
|
59
|
+
├── entities/ # Domain entities (business logic)
|
|
60
|
+
├── features/ # Feature-specific UI components
|
|
61
|
+
├── widgets/ # Composite widgets
|
|
62
|
+
└── shared/ # Common modules
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
See full project setup in `.ai-rules/rules/project.md`
|
|
66
|
+
|
|
67
|
+
### 🎯 Augmented Coding Principles
|
|
68
|
+
|
|
69
|
+
**Source**: `.ai-rules/rules/augmented-coding.md`
|
|
70
|
+
|
|
71
|
+
#### TDD Cycle
|
|
72
|
+
1. **Red**: Write a failing test
|
|
73
|
+
2. **Green**: Implement minimum code to pass
|
|
74
|
+
3. **Refactor**: Improve structure after tests pass
|
|
75
|
+
|
|
76
|
+
#### Core Principles
|
|
77
|
+
- **TDD for core logic** (entities, shared/utils, hooks)
|
|
78
|
+
- **Test-after for UI** (features, widgets)
|
|
79
|
+
- **SOLID principles** and code quality standards
|
|
80
|
+
- **90%+ test coverage** goal
|
|
81
|
+
- **No mocking** - test real behavior
|
|
82
|
+
|
|
83
|
+
See full augmented coding guide in `.ai-rules/rules/augmented-coding.md`
|
|
84
|
+
|
|
85
|
+
### 🤖 Specialist Agents
|
|
86
|
+
|
|
87
|
+
**Source**: `.ai-rules/agents/`
|
|
88
|
+
|
|
89
|
+
Available specialist agents:
|
|
90
|
+
- **Frontend Developer** - React/Next.js, TDD, design system
|
|
91
|
+
- **Code Reviewer** - Quality evaluation, architecture analysis
|
|
92
|
+
- **Architecture Specialist** - Layer boundaries, dependency direction
|
|
93
|
+
- **Test Strategy Specialist** - Test coverage, TDD workflow
|
|
94
|
+
- **Performance Specialist** - Bundle size, rendering optimization
|
|
95
|
+
- **Security Specialist** - OAuth 2.0, JWT, XSS/CSRF protection
|
|
96
|
+
- **Accessibility Specialist** - WCAG 2.1 AA compliance
|
|
97
|
+
- **SEO Specialist** - Metadata API, structured data
|
|
98
|
+
- **Design System Specialist** - Design system usage
|
|
99
|
+
- **Documentation Specialist** - Documentation quality
|
|
100
|
+
- **Code Quality Specialist** - SOLID, DRY, complexity
|
|
101
|
+
- **DevOps Engineer** - Docker, Datadog, deployment
|
|
102
|
+
|
|
103
|
+
See agent details in `.ai-rules/agents/README.md`
|
|
104
|
+
|
|
105
|
+
## Antigravity-Specific Features
|
|
106
|
+
|
|
107
|
+
### Task Boundaries
|
|
108
|
+
|
|
109
|
+
Antigravity supports `task_boundary` tool for tracking progress:
|
|
110
|
+
```python
|
|
111
|
+
task_boundary(
|
|
112
|
+
TaskName="Implementing Feature",
|
|
113
|
+
Mode="EXECUTION",
|
|
114
|
+
TaskSummary="Created component with TDD",
|
|
115
|
+
TaskStatus="Writing tests",
|
|
116
|
+
PredictedTaskSize=10
|
|
117
|
+
)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Artifact Management
|
|
121
|
+
|
|
122
|
+
Antigravity uses artifact files for:
|
|
123
|
+
- Implementation plans: `implementation_plan.md`
|
|
124
|
+
- Task tracking: `task.md`
|
|
125
|
+
- Walkthroughs: `walkthrough.md`
|
|
126
|
+
|
|
127
|
+
### Communication
|
|
128
|
+
|
|
129
|
+
- **Always respond in Korean (한국어)** as specified in common rules
|
|
130
|
+
- Use structured markdown formatting
|
|
131
|
+
- Provide clear, actionable feedback
|
|
132
|
+
|
|
133
|
+
## Directory Structure
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
.antigravity/
|
|
137
|
+
├── rules/
|
|
138
|
+
│ └── instructions.md # This file - references .ai-rules
|
|
139
|
+
└── config.json # Antigravity configuration (if needed)
|
|
140
|
+
|
|
141
|
+
.ai-rules/ # Common rules for all AI tools
|
|
142
|
+
├── rules/
|
|
143
|
+
│ ├── core.md # Workflow modes
|
|
144
|
+
│ ├── project.md # Project setup
|
|
145
|
+
│ └── augmented-coding.md # TDD principles
|
|
146
|
+
├── agents/
|
|
147
|
+
│ └── *.json # Specialist agents
|
|
148
|
+
└── adapters/
|
|
149
|
+
└── antigravity.md # This guide
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Usage in Antigravity
|
|
153
|
+
|
|
154
|
+
### Reference Rules Directly
|
|
155
|
+
|
|
156
|
+
When working with Antigravity, it automatically has access to:
|
|
157
|
+
- `.ai-rules/rules/` for workflow and coding standards
|
|
158
|
+
- `.ai-rules/agents/` for specialist domain knowledge
|
|
159
|
+
- Project-specific configuration in `.antigravity/rules/`
|
|
160
|
+
|
|
161
|
+
### Workflow Example
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
User: 새로운 뉴스레터 기능 만들어줘
|
|
165
|
+
|
|
166
|
+
AI: # Mode: PLAN
|
|
167
|
+
## 📋 Plan Overview
|
|
168
|
+
[Following .ai-rules/rules/core.md workflow]
|
|
169
|
+
[Using .ai-rules/rules/project.md tech stack]
|
|
170
|
+
[Applying .ai-rules/rules/augmented-coding.md TDD principles]
|
|
171
|
+
|
|
172
|
+
User: ACT
|
|
173
|
+
|
|
174
|
+
AI: # Mode: ACT
|
|
175
|
+
[Execute with .ai-rules/agents/frontend-developer.json guidelines]
|
|
176
|
+
|
|
177
|
+
User: EVAL
|
|
178
|
+
|
|
179
|
+
AI: # Mode: EVAL
|
|
180
|
+
[Evaluate with .ai-rules/agents/code-reviewer.json framework]
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Benefits
|
|
184
|
+
|
|
185
|
+
- ✅ Same rules as Cursor and other AI tools (consistency)
|
|
186
|
+
- ✅ Leverage Antigravity's task tracking and artifacts
|
|
187
|
+
- ✅ Access to all specialist agent knowledge
|
|
188
|
+
- ✅ Easy to update: change `.ai-rules/` once, all tools benefit
|
|
189
|
+
|
|
190
|
+
## Maintenance
|
|
191
|
+
|
|
192
|
+
When updating rules:
|
|
193
|
+
1. Update `.ai-rules/rules/*.md` for changes affecting all AI tools
|
|
194
|
+
2. Update `.antigravity/rules/instructions.md` only for Antigravity-specific features
|
|
195
|
+
3. Common rules propagate automatically to all sessions
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Claude Code Integration Guide
|
|
2
|
+
|
|
3
|
+
This guide explains how to use the common AI rules (`.ai-rules/`) in Claude Code (Claude.ai Projects / Claude Desktop).
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Claude Code uses the `.claude/` directory for project-specific custom instructions, referencing the common rules from `.ai-rules/`.
|
|
8
|
+
|
|
9
|
+
## Integration Method
|
|
10
|
+
|
|
11
|
+
### 1. Create Claude Configuration
|
|
12
|
+
|
|
13
|
+
Create `.claude/rules/custom-instructions.md`:
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
# Custom Instructions for Claude Code
|
|
17
|
+
|
|
18
|
+
## Project Rules
|
|
19
|
+
|
|
20
|
+
Follow the common rules defined in `.ai-rules/` for consistency across all AI coding assistants.
|
|
21
|
+
|
|
22
|
+
### Core Workflow
|
|
23
|
+
See `.ai-rules/rules/core.md` for:
|
|
24
|
+
- PLAN/ACT/EVAL workflow modes
|
|
25
|
+
- Agent activation rules
|
|
26
|
+
- Mode indicators and transitions
|
|
27
|
+
|
|
28
|
+
### Project Context
|
|
29
|
+
See `.ai-rules/rules/project.md` for:
|
|
30
|
+
- Tech stack (프로젝트의 package.json 참조)
|
|
31
|
+
- Project structure (app → widgets → features → entities → shared)
|
|
32
|
+
- Development rules and file naming conventions
|
|
33
|
+
- Domain knowledge
|
|
34
|
+
|
|
35
|
+
### Code Quality
|
|
36
|
+
See `.ai-rules/rules/augmented-coding.md` for:
|
|
37
|
+
- TDD cycle (Red → Green → Refactor)
|
|
38
|
+
- SOLID principles and code quality standards
|
|
39
|
+
- Testing best practices (90%+ coverage goal)
|
|
40
|
+
- Commit discipline
|
|
41
|
+
|
|
42
|
+
### Specialist Agents
|
|
43
|
+
See `.ai-rules/agents/README.md` for available specialist agents and their expertise areas.
|
|
44
|
+
|
|
45
|
+
## Claude Code Specific
|
|
46
|
+
|
|
47
|
+
- Always respond in Korean (한국어)
|
|
48
|
+
- Use structured markdown formatting
|
|
49
|
+
- Provide clear, actionable feedback
|
|
50
|
+
- Reference project context from `.ai-rules/rules/project.md`
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 2. Add to Claude Project
|
|
54
|
+
|
|
55
|
+
**In Claude.ai Projects**:
|
|
56
|
+
1. Create a new Project for this codebase
|
|
57
|
+
2. Add "Custom Instructions" with content from `.claude/rules/custom-instructions.md`
|
|
58
|
+
3. Attach relevant files from `.ai-rules/` as project knowledge
|
|
59
|
+
|
|
60
|
+
**In Claude Desktop**:
|
|
61
|
+
1. Set project-specific instructions
|
|
62
|
+
2. Reference `.claude/rules/` directory
|
|
63
|
+
|
|
64
|
+
## Directory Structure
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
.claude/
|
|
68
|
+
├── rules/
|
|
69
|
+
│ └── custom-instructions.md # References .ai-rules
|
|
70
|
+
└── config.json # Claude project config (optional)
|
|
71
|
+
|
|
72
|
+
.ai-rules/
|
|
73
|
+
├── rules/
|
|
74
|
+
│ ├── core.md
|
|
75
|
+
│ ├── project.md
|
|
76
|
+
│ └── augmented-coding.md
|
|
77
|
+
├── agents/
|
|
78
|
+
│ └── *.json
|
|
79
|
+
└── adapters/
|
|
80
|
+
└── claude-code.md # This guide
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Usage
|
|
84
|
+
|
|
85
|
+
### In Claude Chat
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
User: 새로운 기능 만들어줘
|
|
89
|
+
|
|
90
|
+
Claude: # Mode: PLAN
|
|
91
|
+
[Following .ai-rules/rules/core.md workflow]
|
|
92
|
+
|
|
93
|
+
User: ACT
|
|
94
|
+
|
|
95
|
+
Claude: # Mode: ACT
|
|
96
|
+
[Execute with .ai-rules guidelines]
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Referencing Rules
|
|
100
|
+
|
|
101
|
+
Claude can directly read and reference:
|
|
102
|
+
- `.ai-rules/rules/*.md` files
|
|
103
|
+
- `.ai-rules/agents/*.json` files
|
|
104
|
+
- Project-specific patterns from `.ai-rules/rules/project.md`
|
|
105
|
+
|
|
106
|
+
## Benefits
|
|
107
|
+
|
|
108
|
+
- ✅ Consistent rules across all AI tools
|
|
109
|
+
- ✅ Claude's strong reasoning applied to your project standards
|
|
110
|
+
- ✅ Easy updates: modify `.ai-rules/` once
|
|
111
|
+
- ✅ Project knowledge persists across sessions
|
|
112
|
+
|
|
113
|
+
## Maintenance
|
|
114
|
+
|
|
115
|
+
1. Update `.ai-rules/rules/*.md` for universal changes
|
|
116
|
+
2. Update `.claude/rules/custom-instructions.md` for Claude-specific features
|
|
117
|
+
3. Sync Claude Project instructions when rules change significantly
|