Skip to content

Commit 44e2155

Browse files
committed
Updates agent instructions
1 parent fe486e6 commit 44e2155

File tree

1 file changed

+89
-3
lines changed

1 file changed

+89
-3
lines changed

CLAUDE.md renamed to AGENTS.md

Lines changed: 89 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# CLAUDE.md
1+
# AGENTS.md
22

3-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
3+
> Guidance for AI-powered coding assistants (Augment Agent Mode, Augment Auggie CLI, Copilot Agent Mode, Claude Code, Cursor, Windsurf, etc.) when working with code in this repository.
4+
> Read this before writing, editing, or executing anything in this repo.
45
56
## Project Overview
67

@@ -9,18 +10,21 @@ This is a VS Code extension that provides web component information to AI assist
910
## Common Commands
1011

1112
### Development
13+
1214
- `pnpm run build` - Build extension in development mode
1315
- `pnpm run bundle` - Build extension for production
1416
- `pnpm run watch` - Watch mode for development
1517
- `pnpm run clean` - Clean build artifacts
1618

1719
### Code Quality
20+
1821
- `pnpm run lint` - Run ESLint on TypeScript files
1922
- `pnpm run lint:fix` - Run ESLint with auto-fix
2023
- `pnpm run format` - Format code with Prettier
2124
- `pnpm run format:check` - Check code formatting
2225

2326
### Packaging & Publishing
27+
2428
- `pnpm run package` - Create VSIX package
2529
- `pnpm run package-pre` - Create pre-release VSIX package
2630
- `pnpm run pub` - Publish to marketplace
@@ -31,32 +35,39 @@ This is a VS Code extension that provides web component information to AI assist
3135
### Core Components
3236

3337
**Extension Entry Point** (`src/extension.ts`):
38+
3439
- Main activation point that initializes logging, configuration, and container
3540
- Sets up the dependency injection container and registers commands
3641

3742
**Container** (`src/container.ts`):
43+
3844
- Dependency injection container managing all services and providers
3945
- Central point for service resolution and lifecycle management
4046

4147
**MCP Provider** (`src/mcp/provider.ts`):
48+
4249
- Core MCP server implementation providing web component data
4350
- Serves HTTP and SSE endpoints for AI assistant integration
4451
- Implements MCP tools: search-components, get-component-details, list-all-components
4552

4653
**Custom Elements Manifest (CEM) System**:
54+
4755
- `src/cem/locator.ts` - Discovers custom-elements.json files in workspace and dependencies
4856
- `src/cem/reader.ts` - Reads and parses manifest files with caching
4957

5058
**Commands** (`src/commands/`):
59+
5160
- VS Code command implementations for starting/stopping MCP server
5261
- Manifest management commands (list, locate, include/exclude)
5362
- Tree view refresh and information display commands
5463

5564
**Views** (`src/views/`):
65+
5666
- Tree view implementation showing discovered manifests
5767
- Custom tree nodes for different manifest states and groupings
5868

5969
**System Utilities** (`src/system/`):
70+
6071
- Logging, configuration, decorators, and common utilities
6172
- Standardized patterns for async operations and error handling
6273

@@ -71,6 +82,7 @@ This is a VS Code extension that provides web component information to AI assist
7182
### Configuration
7283

7384
The extension uses VS Code settings under the `wcai.*` namespace:
85+
7486
- `wcai.outputLevel` - Logging verbosity (off, error, warn, info, debug)
7587
- `wcai.manifests.exclude` - Array of manifest URIs to exclude
7688
- `wcai.mcp.host/port` - MCP server network configuration
@@ -81,4 +93,78 @@ The extension uses VS Code settings under the `wcai.*` namespace:
8193
- Uses Webpack with TypeScript compilation
8294
- Node.js target for main extension code
8395
- Separate webpack configs for extension and potential webviews
84-
- TypeScript project references for modular compilation
96+
- TypeScript project references for modular compilation
97+
98+
## Coding Standards & Styles Rules
99+
100+
### TypeScript Configuration
101+
102+
- Recommended TypeScript with `recommendedTypeChecked` ESLint config
103+
- No `any` usage (exceptions for external APIs)
104+
- Explicit return types for public methods
105+
- Prefer `type` over `interface` for unions
106+
107+
### Import Organization
108+
109+
- Group imports: built-in, external, internal, parent, sibling, index
110+
- Alphabetical order within groups
111+
- No unused imports or variables
112+
- Consistent type imports with `import type`
113+
114+
### Naming Conventions
115+
116+
- **Classes**: PascalCase (no I prefix for interfaces)
117+
- **Methods/Variables**: camelCase
118+
- **Constants**: camelCase for module-level constants
119+
- **Private members**: Leading underscore allowed
120+
- **Files**: `camelCase.ts`, `camelCase.utils.ts` for related utilities
121+
- **Folders**
122+
- Models under a `models/` sub-folder
123+
- Utilities under a `utils/` sub-folder if they can be used in both the extension host and webviews, or `utils/-webview/` sub-folder for extension host-specific utilities
124+
125+
### Code Structure
126+
127+
- **Single responsibility** - Each service has focused purpose
128+
- **Dependency injection** - Services injected via Container
129+
- **Event-driven** - EventEmitter pattern for service communication
130+
- **Disposable pattern** - Proper cleanup with VS Code `Disposable` interface
131+
132+
### Error Handling
133+
134+
- Use custom error types extending Error
135+
- Log errors with context using `Logger.error()`
136+
- Graceful degradation for network/API failures
137+
- Validate external data with schema validators
138+
139+
## Repository Guidelines
140+
141+
### Commit Messages
142+
143+
- Use a future-oriented manner, third-person singular present tense (e.g., 'Fixes', 'Updates', 'Improves', 'Adds', 'Removes')
144+
- Reference issues with #123 syntax for auto-linking
145+
- Keep first line under 72 characters
146+
147+
### Branch Workflow
148+
149+
- Feature branches from main
150+
- Prefix with feature type: feature/, bug/, debt/
151+
- Use descriptive names: feature/search-natural-language
152+
153+
### Code Reviews
154+
155+
- Check TypeScript compilation and tests pass
156+
- Verify no new ESLint violations
157+
158+
## Development Environment
159+
160+
### Prerequisites
161+
162+
- Node.js ≥ 22.12.0
163+
- pnpm ≥ 10.x (via corepack)
164+
- Git ≥ 2.7.2
165+
166+
### VS Code Tasks
167+
168+
- Build - `Ctrl+Shift+P` → "Tasks: Run Task" → "npm: watch"
169+
- Test - Use VS Code's built-in test runner
170+
- Debug - `F5` to launch Extension Development Host

0 commit comments

Comments
 (0)