You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+89-3Lines changed: 89 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
-
# CLAUDE.md
1
+
# AGENTS.md
2
2
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.
4
5
5
6
## Project Overview
6
7
@@ -9,18 +10,21 @@ This is a VS Code extension that provides web component information to AI assist
9
10
## Common Commands
10
11
11
12
### Development
13
+
12
14
-`pnpm run build` - Build extension in development mode
13
15
-`pnpm run bundle` - Build extension for production
14
16
-`pnpm run watch` - Watch mode for development
15
17
-`pnpm run clean` - Clean build artifacts
16
18
17
19
### Code Quality
20
+
18
21
-`pnpm run lint` - Run ESLint on TypeScript files
19
22
-`pnpm run lint:fix` - Run ESLint with auto-fix
20
23
-`pnpm run format` - Format code with Prettier
21
24
-`pnpm run format:check` - Check code formatting
22
25
23
26
### Packaging & Publishing
27
+
24
28
-`pnpm run package` - Create VSIX package
25
29
-`pnpm run package-pre` - Create pre-release VSIX package
26
30
-`pnpm run pub` - Publish to marketplace
@@ -31,32 +35,39 @@ This is a VS Code extension that provides web component information to AI assist
31
35
### Core Components
32
36
33
37
**Extension Entry Point** (`src/extension.ts`):
38
+
34
39
- Main activation point that initializes logging, configuration, and container
35
40
- Sets up the dependency injection container and registers commands
36
41
37
42
**Container** (`src/container.ts`):
43
+
38
44
- Dependency injection container managing all services and providers
39
45
- Central point for service resolution and lifecycle management
40
46
41
47
**MCP Provider** (`src/mcp/provider.ts`):
48
+
42
49
- Core MCP server implementation providing web component data
43
50
- Serves HTTP and SSE endpoints for AI assistant integration
-`wcai.manifests.exclude` - Array of manifest URIs to exclude
76
88
-`wcai.mcp.host/port` - MCP server network configuration
@@ -81,4 +93,78 @@ The extension uses VS Code settings under the `wcai.*` namespace:
81
93
- Uses Webpack with TypeScript compilation
82
94
- Node.js target for main extension code
83
95
- 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
0 commit comments