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
8 changes: 7 additions & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
"Bash(gh issue:*)",
"Bash(bun run tsc:*)",
"Bash(bun test:*)",
"Bash(bun install:*)"
"Bash(bun install:*)",
"WebFetch(domain:github.com)",
"Bash(git checkout:*)",
"Bash(git pull:*)",
"Bash(git cherry-pick:*)",
"Bash(bun run test:*)",
"SlashCommand(/please:review-pr:*)"
],
"deny": [],
"ask": []
Expand Down
184 changes: 29 additions & 155 deletions .please/memory/tasklist.json
Original file line number Diff line number Diff line change
@@ -1,168 +1,42 @@
{
"session_id": "20251218-rename-symbol-lsp",
"feature_name": "Add Rename Symbol support to @pleaseai/code-lsp",
"created_at": "2025-12-18T10:00:00Z",
"updated_at": "2025-12-18T07:43:59.732Z",
"status": "completed",
"current_phase": 8,
"issue_number": 18,
"branch": "18-featlsp-add-rename-symbol-support",
"session_id": "20251218-prisma-lsp",
"feature_name": "Add Prisma Language Server support to @pleaseai/code-lsp",
"created_at": "2025-12-18T12:00:00Z",
"updated_at": "2025-12-18T12:30:00Z",
"status": "in_progress",
"current_phase": 6,
"issue_number": 22,
"branch": "22-featlsp-add-prisma-language-server-support",
"spec": {
"path": "specs/001-rename-symbol/spec.md",
"number": 1,
"short_name": "rename-symbol",
"created_at": "2025-12-18T10:25:00Z",
"clarified_at": "2025-12-18T10:30:00Z"
"path": "specs/002-prisma-lsp/spec.md",
"number": 2,
"short_name": "prisma-lsp",
"created_at": "2025-12-18T12:15:00Z"
},
"checkpoint_config": {
"mode": "auto",
"push_strategy": "batch",
"validation_required": true
},
"ralph_config": {
"enabled": false,
"max_iterations": 50,
"completion_promise": "ALL_PHASE6_TASKS_COMPLETED",
"current_iteration": 0,
"started_at": "2025-12-18T10:50:00Z"
},
"phases": [
{
"number": 1,
"name": "Discovery",
"status": "completed",
"started_at": "2025-12-18T10:00:00Z",
"completed_at": "2025-12-18T10:05:00Z"
},
{
"number": 2,
"name": "Codebase Exploration",
"status": "completed",
"started_at": "2025-12-18T10:05:00Z",
"completed_at": "2025-12-18T10:20:00Z"
},
{
"number": 3,
"name": "Specification & Clarification",
"status": "completed",
"started_at": "2025-12-18T10:20:00Z",
"completed_at": "2025-12-18T10:30:00Z"
},
{
"number": 4,
"name": "Architecture Design",
"status": "completed",
"started_at": "2025-12-18T10:30:00Z",
"completed_at": "2025-12-18T10:45:00Z"
},
{
"number": 5,
"name": "GitHub Issue & PR",
"status": "completed",
"started_at": "2025-12-18T10:45:00Z",
"completed_at": "2025-12-18T10:50:00Z"
},
{
"number": 6,
"name": "Implementation",
"status": "completed",
"started_at": "2025-12-18T10:50:00Z",
"completed_at": "2025-12-18T11:30:00Z"
},
{
"number": 7,
"name": "Quality Review",
"status": "completed",
"started_at": "2025-12-18T11:30:00Z",
"completed_at": "2025-12-18T11:45:00Z"
},
{
"number": 8,
"name": "PR Finalization",
"status": "completed",
"started_at": "2025-12-18T11:45:00Z",
"completed_at": "2025-12-18T11:50:00Z"
}
{ "number": 1, "name": "Discovery", "status": "completed", "started_at": "2025-12-18T12:00:00Z", "completed_at": "2025-12-18T12:05:00Z" },
{ "number": 2, "name": "Codebase Exploration", "status": "completed", "started_at": "2025-12-18T12:05:00Z", "completed_at": "2025-12-18T12:15:00Z" },
{ "number": 3, "name": "Specification & Clarification", "status": "completed", "started_at": "2025-12-18T12:15:00Z", "completed_at": "2025-12-18T12:20:00Z" },
{ "number": 4, "name": "Architecture Design", "status": "completed", "started_at": "2025-12-18T12:20:00Z", "completed_at": "2025-12-18T12:25:00Z" },
{ "number": 5, "name": "GitHub Issue & PR", "status": "completed", "started_at": "2025-12-18T12:25:00Z", "completed_at": "2025-12-18T12:30:00Z" },
{ "number": 6, "name": "Implementation", "status": "completed", "started_at": "2025-12-18T12:30:00Z", "completed_at": "2025-12-18T12:45:00Z" },
{ "number": 7, "name": "Quality Review", "status": "completed", "started_at": "2025-12-18T12:45:00Z", "completed_at": "2025-12-18T12:50:00Z" },
{ "number": 8, "name": "PR Finalization", "status": "completed", "started_at": "2025-12-18T12:50:00Z", "completed_at": "2025-12-18T12:55:00Z" }
],
"tasks": [
{
"id": "T001",
"title": "Add type schemas (TextEdit, WorkspaceEdit, PrepareRenameResult)",
"phase": 6,
"status": "completed",
"parallel": true,
"dependencies": []
},
{
"id": "T002",
"title": "Add rename capability to client initialization",
"phase": 6,
"status": "completed",
"parallel": true,
"dependencies": []
},
{
"id": "T003",
"title": "Add normalization methods",
"phase": 6,
"status": "completed",
"parallel": false,
"dependencies": [
"T001"
]
},
{
"id": "T004",
"title": "Add prepareRename() method",
"phase": 6,
"status": "completed",
"parallel": false,
"dependencies": [
"T001",
"T003"
]
},
{
"id": "T005",
"title": "Add rename() method",
"phase": 6,
"status": "completed",
"parallel": false,
"dependencies": [
"T001",
"T003"
]
},
{
"id": "T006",
"title": "Update CLAUDE.md documentation",
"phase": 6,
"status": "completed",
"parallel": false,
"dependencies": [
"T004",
"T005"
]
},
{
"id": "T007",
"title": "Add unit tests for normalization",
"phase": 6,
"status": "completed",
"parallel": true,
"dependencies": []
},
{
"id": "T008",
"title": "Add integration tests",
"phase": 6,
"status": "completed",
"parallel": false,
"dependencies": [
"T004",
"T005"
]
}
{ "id": "T001", "title": "Add .prisma language mapping to language.ts", "phase": 6, "status": "completed", "parallel": true, "dependencies": [] },
{ "id": "T002", "title": "Add PRISMA_RUNTIME_DEPS configuration", "phase": 6, "status": "completed", "parallel": true, "dependencies": [] },
{ "id": "T003", "title": "Add setupPrismaDependencies() function", "phase": 6, "status": "completed", "parallel": false, "dependencies": ["T002"] },
{ "id": "T004", "title": "Add PrismaServer definition", "phase": 6, "status": "completed", "parallel": false, "dependencies": ["T002", "T003"] },
{ "id": "T005", "title": "Add PrismaServer to LSP_SERVERS array", "phase": 6, "status": "completed", "parallel": false, "dependencies": ["T004"] },
{ "id": "T006", "title": "Export PrismaServer from index.ts", "phase": 6, "status": "completed", "parallel": false, "dependencies": ["T004"] },
{ "id": "T007", "title": "Add unit tests for PrismaServer", "phase": 6, "status": "completed", "parallel": false, "dependencies": ["T004"] },
{ "id": "T008", "title": "Update CLAUDE.md documentation", "phase": 6, "status": "completed", "parallel": false, "dependencies": ["T004"] }
],
"checkpoints": []
}
}
4 changes: 3 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,12 @@ Claude/MCP Client <-> StdioTransport <-> McpServer <-> Providers
| Rust | rust-analyzer | Cargo.toml |
| Kotlin | JetBrains Kotlin LSP (auto-download) | build.gradle.kts, build.gradle, pom.xml |
| Dart | dart language-server (auto-download) | pubspec.yaml, pubspec.lock |
| Prisma | @prisma/language-server (auto-download) | schema.prisma, prisma/schema.prisma |
| Vue | @vue/language-server (auto-download) | package.json (with vue) |

### Built-in Formatters

biome, prettier, gofmt, mix (Elixir), zig fmt, clang-format, ktlint (Kotlin), ruff, air (R), uv format, rubocop, standardrb, htmlbeautifier, dart, ocamlformat, terraform, latexindent, gleam
biome, prettier, gofmt, mix (Elixir), zig fmt, clang-format, ktlint (Kotlin), ruff, air (R), uv format, rubocop, standardrb, htmlbeautifier, dart, ocamlformat, terraform, latexindent, gleam, prisma

### Name Path Convention (JetBrains)

Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,13 @@ Create `dora.json` or `opencode.json` in your project root:
| Go | gopls | go.mod |
| Rust | rust-analyzer | Cargo.toml |
| Kotlin | JetBrains Kotlin LSP | build.gradle.kts, pom.xml |
| Dart | dart language-server | pubspec.yaml |
| Prisma | @prisma/language-server | schema.prisma |
| Vue | @vue/language-server | package.json (with vue) |

### Formatters

biome, prettier, gofmt, mix, zig fmt, clang-format, ktlint, ruff, air (R), uv format, rubocop, standardrb, htmlbeautifier, dart, ocamlformat, terraform, latexindent, gleam
biome, prettier, gofmt, mix, zig fmt, clang-format, ktlint, ruff, air (R), uv format, rubocop, standardrb, htmlbeautifier, dart, ocamlformat, terraform, latexindent, gleam, prisma

## MCP Server

Expand Down
117 changes: 117 additions & 0 deletions packages/format/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# @pleaseai/code-format

Auto-format hooks for AI coding tools.

## Installation

```bash
bun add @pleaseai/code-format
```

## Features

- Multi-formatter support with automatic detection
- Configuration via `dora.json`, `opencode.json`, or `.please/config.yml`
- Custom formatter support with command templates

## Quick Start

```typescript
import { Format } from '@pleaseai/code-format'

// Initialize from project configuration
await Format.initFromProject('/path/to/project')

// Format a file
await Format.formatFile('src/index.ts')

// Get formatter status
const status = await Format.status()
```

## Supported Formatters

| Formatter | Extensions | Auto-detected by |
|-----------|------------|------------------|
| biome | .ts, .tsx, .js, .jsx, .json, .css, .md, etc. | biome.json |
| prettier | .ts, .tsx, .js, .jsx, .json, .css, .md, etc. | package.json (prettier dep) |
| gofmt | .go | gofmt in PATH |
| mix | .ex, .exs, .eex, .heex | mix in PATH |
| zig | .zig, .zon | zig in PATH |
| clang-format | .c, .cpp, .h, .hpp | .clang-format |
| ktlint | .kt, .kts | ktlint in PATH |
| ruff | .py, .pyi | ruff.toml, pyproject.toml |
| uv format | .py, .pyi | uv in PATH (fallback if no ruff) |
| air | .R | air in PATH |
| rubocop | .rb, .rake, .gemspec | rubocop in PATH |
| standardrb | .rb, .rake, .gemspec | standardrb in PATH |
| htmlbeautifier | .erb, .html.erb | htmlbeautifier in PATH |
| dart | .dart | dart in PATH |
| ocamlformat | .ml, .mli | .ocamlformat |
| terraform | .tf, .tfvars | terraform in PATH |
| latexindent | .tex | latexindent in PATH |
| gleam | .gleam | gleam in PATH |
| prisma | .prisma | schema.prisma |

## Configuration

Create `dora.json` or `opencode.json` in your project root:

```json
{
"formatter": {
"biome": {
"extensions": [".ts", ".tsx", ".js", ".jsx", ".json"]
},
"prettier": {
"disabled": true
},
"custom": {
"command": ["my-formatter", "$FILE"],
"extensions": [".xyz"]
}
}
}
```

### Disable all formatters

```json
{
"formatter": false
}
```

### Configuration options

| Option | Type | Description |
|--------|------|-------------|
| `disabled` | boolean | Disable this formatter |
| `command` | string[] | Command template (`$FILE` = file path) |
| `extensions` | string[] | File extensions to handle |
| `environment` | object | Environment variables |

## API Reference

### Format

| Method | Description |
|--------|-------------|
| `initFromProject(projectDir)` | Initialize from project config files |
| `init(config)` | Initialize with explicit config |
| `formatFile(file)` | Format a file |
| `status()` | Get all formatter statuses |

### Types

```typescript
import type {
FormatConfig,
FormatStatus,
FormatterConfig
} from '@pleaseai/code-format'
```

## License

MIT
20 changes: 20 additions & 0 deletions packages/format/src/formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,3 +331,23 @@ export const gleam: Info = {
return Bun.which('gleam') !== null
},
}

export const prisma: Info = {
name: 'prisma',
command: [bunExecutable(), 'x', 'prisma', 'format', '--schema', '$FILE'],
environment: {
BUN_BE_BUN: '1',
},
extensions: ['.prisma'],
async enabled(projectDir: string) {
// Check for schema.prisma or prisma/schema.prisma
const schemaFiles = ['schema.prisma', 'prisma/schema.prisma']
for (const schema of schemaFiles) {
const found = await findUp(schema, projectDir)
if (found.length > 0) {
return true
}
}
return false
},
}
1 change: 1 addition & 0 deletions packages/lsp/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ src/
| Rust Analyzer | `rust-analyzer` | .rs | Cargo.toml, Cargo.lock |
| Kotlin | `kotlin` | .kt, .kts | build.gradle.kts, build.gradle, settings.gradle.kts, settings.gradle, pom.xml |
| Dart | `dart` | .dart | pubspec.yaml, pubspec.lock |
| Prisma | `prisma` | .prisma | schema.prisma, prisma/schema.prisma |

## Adding a New Server

Expand Down
Loading