Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .changeset/ux-typescript-performance-improvements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
"@lytics/dev-agent-cli": minor
"@lytics/dev-agent-core": minor
"@lytics/dev-agent": minor
---

UX and performance improvements for TypeScript projects

**UX Improvements:**
- MCP install is now idempotent for Claude Code - shows positive message when server already exists instead of erroring
- Enhanced documentation with clear customization examples for exclusion patterns

**Performance Improvements:**
- Add TypeScript-specific exclusion patterns to default config for 10-15% indexing performance improvement
- Exclude mock files (*.mock.ts, *.mock.tsx, mocks/), type definition files (*.d.ts), and test infrastructure (test-utils/, testing/)

**Configurability:**
- TypeScript exclusions are now fully configurable via .dev-agent/config.json
- Users can customize patterns, include type definitions if desired, or add project-specific exclusions
- Default config provides optimized performance while maintaining full user control

**Semantic Value Preserved:**
- Stories files are kept (contain valuable component documentation and usage patterns)
- Only excludes truly low-value files while preserving semantic content for AI tools
41 changes: 41 additions & 0 deletions WORKFLOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,47 @@ gh pr create \
--base main
```

### 7. Changesets & Package Dependencies

**Important: Always create changesets for user-facing changes.**

```bash
# Create changeset for the changes
pnpm changeset

# Or create manually in .changeset/ directory
```

**Package Dependency Rules:**
- **CLI changes** (`@lytics/dev-agent-cli`) → **ALWAYS bump `@lytics/dev-agent`** (the main wrapper package)
- **Core changes** (`@lytics/dev-agent-core`) → Usually bump CLI and wrapper
- **MCP changes** (`@lytics/dev-agent-mcp`) → Usually bump wrapper if user-facing
- **Documentation only** → No package bumps needed

**Changeset Examples:**
```bash
# For CLI improvements that affect end users
echo '---
"@lytics/dev-agent-cli": minor
"@lytics/dev-agent": minor
---

Add TypeScript performance optimizations' > .changeset/feature-name.md

# For bug fixes
echo '---
"@lytics/dev-agent-cli": patch
"@lytics/dev-agent": patch
---

Fix MCP install error handling' > .changeset/fix-name.md
```

**Why the wrapper bump matters:**
- Users install `dev-agent` globally via npm
- The wrapper package needs to pull in the latest CLI changes
- Ensures `npm install -g dev-agent` gets all improvements

## Commit Message Format

### Structure
Expand Down
28 changes: 21 additions & 7 deletions packages/cli/src/commands/mcp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,28 @@ export const mcpCommand = new Command('mcp')
logger.log(`Repository: ${chalk.yellow(repositoryPath)}`);
logger.log(`Storage: ${chalk.yellow(storagePath)}`);
} else {
spinner.fail('Failed to install MCP server in Claude Code');
if (error) {
logger.error(error);
// Check if error is due to server already existing
const errorText = error.toLowerCase();
if (
errorText.includes('already exists') ||
errorText.includes('dev-agent already exists')
) {
spinner.info(chalk.yellow('MCP server already installed in Claude Code!'));
logger.log('');
logger.log(`Server name: ${chalk.cyan('dev-agent')}`);
logger.log(`Repository: ${chalk.gray(repositoryPath)}`);
logger.log('');
logger.log(`Run ${chalk.cyan('claude mcp list')} to see all servers`);
} else {
spinner.fail('Failed to install MCP server in Claude Code');
if (error) {
logger.error(error);
}
if (output) {
logger.log(output);
}
process.exit(1);
}
if (output) {
logger.log(output);
}
process.exit(1);
}
});
}
Expand Down
30 changes: 28 additions & 2 deletions packages/cli/src/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,20 @@ export function getDefaultConfig(repositoryPath: string = process.cwd()): DevAge
version: DEFAULT_VERSION,
repository: {
path: '.',
excludePatterns: ['**/node_modules/**', '**/dist/**', '**/.git/**', '**/coverage/**'],
excludePatterns: [
// Standard exclusions
'**/node_modules/**',
'**/dist/**',
'**/.git/**',
'**/coverage/**',
// TypeScript performance exclusions
'**/*.mock.ts',
'**/*.mock.tsx',
'**/mocks/**',
'**/*.d.ts',
'**/test-utils/**',
'**/testing/**',
],
languages: ['typescript', 'javascript', 'markdown'],
},
mcp: {
Expand All @@ -217,7 +230,20 @@ export function getDefaultConfig(repositoryPath: string = process.cwd()): DevAge
},
// Legacy fields for backward compatibility
repositoryPath: resolvedPath,
excludePatterns: ['**/node_modules/**', '**/dist/**', '**/.git/**', '**/coverage/**'],
excludePatterns: [
// Standard exclusions
'**/node_modules/**',
'**/dist/**',
'**/.git/**',
'**/coverage/**',
// TypeScript performance exclusions
'**/*.mock.ts',
'**/*.mock.tsx',
'**/mocks/**',
'**/*.d.ts',
'**/test-utils/**',
'**/testing/**',
],
languages: ['typescript', 'javascript', 'markdown'],
embeddingModel: 'Xenova/all-MiniLM-L6-v2',
dimension: 384,
Expand Down
65 changes: 53 additions & 12 deletions website/content/docs/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,21 @@ Run `dev init` to create a configuration file at `.dev-agent/config.json`:
| `repository.languages` | string[] | `["typescript", "javascript", "markdown"]` | Languages to index |

**Default Exclude Patterns:**
- `**/node_modules/**`
- `**/dist/**`
- `**/.git/**`
- `**/coverage/**`

*Standard exclusions (all languages):*
- `**/node_modules/**` - Dependencies
- `**/dist/**`, `**/build/**` - Build outputs
- `**/.git/**` - Version control
- `**/coverage/**` - Test coverage reports

*TypeScript performance exclusions (configurable):*
- `**/*.mock.ts`, `**/*.mock.tsx`, `**/mocks/**` - Mock files (no business logic)
- `**/*.d.ts` - Type definition files (verbose, auto-generated)
- `**/test-utils/**`, `**/testing/**` - Test infrastructure (framework code)

*Go-specific exclusions:*
- `**/*.pb.go`, `**/*.gen.go` - Generated code (protobuf, codegen)
- `**/testdata/**` - Test fixtures

### MCP Adapter Settings

Expand Down Expand Up @@ -213,19 +224,49 @@ The model is downloaded on first run (~23MB) and cached locally.

## Advanced: Custom Exclude Patterns

Add project-specific patterns:
### Default Patterns
Running `dev init` creates a config with these default exclusions:

```json
{
"repository": {
"excludePatterns": [
"**/node_modules/**",
"**/dist/**",
"**/.git/**",
"**/coverage/**",
"**/vendor/**",
"**/*.generated.ts",
"**/legacy/**"
// Standard exclusions
"**/node_modules/**", "**/dist/**", "**/.git/**", "**/coverage/**",
// TypeScript performance exclusions
"**/*.mock.ts", "**/*.mock.tsx", "**/mocks/**",
"**/*.d.ts", "**/test-utils/**", "**/testing/**"
]
}
}
```

### Customization Options

**Add project-specific patterns:**
```json
{
"repository": {
"excludePatterns": [
"**/node_modules/**", "**/dist/**", "**/.git/**", "**/coverage/**",
"**/*.mock.ts", "**/*.mock.tsx", "**/mocks/**", "**/*.d.ts",
"**/test-utils/**", "**/testing/**",
// Your custom patterns
"**/vendor/**", "**/*.generated.ts", "**/legacy/**"
]
}
}
```

**Include TypeScript definition files (if desired):**
```json
{
"repository": {
"excludePatterns": [
"**/node_modules/**", "**/dist/**", "**/.git/**", "**/coverage/**",
"**/*.mock.ts", "**/*.mock.tsx", "**/mocks/**",
"**/test-utils/**", "**/testing/**"
// Removed "**/*.d.ts" to include type definitions in search
]
}
}
Expand Down
9 changes: 4 additions & 5 deletions website/content/latest-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
*/

export const latestVersion = {
version: '0.6.1',
title: 'Reliability & Performance Improvements',
version: '0.6.2',
title: 'UX & TypeScript Performance Improvements',
date: 'December 11, 2025',
summary:
'Enhanced reliability, performance configuration, and better documentation for Go support.',
link: '/updates#v061--reliability--performance-improvements',
summary: 'Enhanced user experience and configurable TypeScript performance optimizations.',
link: '/updates#v062--ux--typescript-performance-improvements',
} as const;
71 changes: 71 additions & 0 deletions website/content/updates/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,77 @@ What's new in dev-agent. We ship improvements regularly to help AI assistants un

---

## v0.6.2 — UX & TypeScript Performance Improvements

*December 11, 2025*

**Enhanced user experience and configurable TypeScript performance optimizations.**

### What's New

**🎯 Improved User Experience**

- **Idempotent MCP install** — `dev mcp install` now shows positive messaging when server already exists instead of erroring
- **Seamless workflow** — `dev index` automatically uses sensible defaults when no config exists (no manual `dev init` required)

**⚡ TypeScript Performance Optimization**

New default exclusions provide **10-15% indexing performance improvement** for TypeScript projects:

```json
{
"repository": {
"excludePatterns": [
// Standard exclusions
"**/node_modules/**", "**/dist/**", "**/.git/**", "**/coverage/**",
// TypeScript performance exclusions (new!)
"**/*.mock.ts", "**/*.mock.tsx", "**/mocks/**",
"**/*.d.ts", "**/test-utils/**", "**/testing/**"
]
}
}
```

**🛠️ Full Configurability**

- **Smart defaults** — New users get performance benefits automatically
- **Complete control** — Fully customizable via `.dev-agent/config.json`
- **Semantic value preserved** — Stories files kept (contain valuable component documentation)

### Customization Examples

**Include type definition files:**
```json
{
"repository": {
"excludePatterns": [
"**/node_modules/**", "**/dist/**", "**/.git/**", "**/coverage/**",
"**/*.mock.ts", "**/*.mock.tsx", "**/mocks/**",
"**/test-utils/**", "**/testing/**"
// Removed "**/*.d.ts" to include type definitions in search
]
}
}
```

**Add project-specific patterns:**
```json
{
"repository": {
"excludePatterns": [
// Default patterns...
"**/vendor/**", "**/*.generated.ts", "**/legacy/**"
]
}
}
```

### Migration

No breaking changes. All improvements are backward compatible.

---

## v0.6.1 — Reliability & Performance Improvements

*December 11, 2025*
Expand Down