Skip to content

Commit d87be8e

Browse files
that-github-userunknownclaude
authored
Add Biome linting, formatting, and developer experience setup (#13)
- Biome for TypeScript linting and formatting - Lint step added to CI pipeline - Auto-fix all existing lint/format issues across codebase - VS Code settings with Biome as default formatter - .env.example with ANTHROPIC_API_KEY placeholder - CLAUDE.md with project architecture and conventions - npm scripts: lint, lint:fix, format Closes #8 Co-authored-by: unknown <that-github-user@github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 953bb8d commit d87be8e

File tree

18 files changed

+339
-81
lines changed

18 files changed

+339
-81
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Required: Anthropic API key (used by Claude Code CLI)
2+
# Get one at https://console.anthropic.com/
3+
ANTHROPIC_API_KEY=sk-ant-...

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ jobs:
2929
- name: Install dependencies
3030
run: npm ci
3131

32+
- name: Lint
33+
run: npm run lint
34+
3235
- name: Build
3336
run: npm run build
3437

.vscode/extensions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"biomejs.biome"
4+
]
5+
}

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"editor.defaultFormatter": "biomejs.biome",
3+
"editor.formatOnSave": true,
4+
"[typescript]": {
5+
"editor.defaultFormatter": "biomejs.biome"
6+
}
7+
}

CLAUDE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# thinktank — AI Coding Instructions
2+
3+
## What this project is
4+
thinktank is an ensemble AI coding tool. It runs N parallel Claude Code agents on the same task in isolated git worktrees, then selects the best result via test execution and convergence analysis.
5+
6+
## Architecture
7+
- `src/cli.ts` — CLI entry point (commander)
8+
- `src/commands/` — CLI commands (run, apply, list)
9+
- `src/runners/` — Agent runners (claude-code, future: cursor, copilot)
10+
- `src/scoring/` — Convergence analysis and recommendation
11+
- `src/utils/` — Git operations, terminal display
12+
13+
## Code conventions
14+
- TypeScript strict mode, no `any` types
15+
- Use node:test for testing (not jest/vitest)
16+
- Error messages must be actionable: tell the user what to do
17+
- Keep functions small and focused
18+
- Prefer composition over inheritance
19+
20+
## Commands
21+
- `npm run build` — compile TypeScript
22+
- `npm test` — run all tests
23+
- `npm run lint` — check with Biome
24+
- `npm run lint:fix` — auto-fix lint issues
25+
- `npx tsx src/cli.ts` — run CLI in dev mode
26+
27+
## PR process
28+
- One issue per PR, always reference the issue
29+
- Branch naming: `issue-N-short-description`
30+
- Build + lint + tests must pass before merging

biome.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.4.9/schema.json",
3+
"linter": {
4+
"enabled": true,
5+
"rules": {
6+
"recommended": true,
7+
"correctness": {
8+
"noUnusedImports": "warn"
9+
}
10+
}
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"indentStyle": "space",
15+
"indentWidth": 2,
16+
"lineWidth": 100
17+
},
18+
"assist": {
19+
"actions": {
20+
"source": {
21+
"organizeImports": {
22+
"level": "on"
23+
}
24+
}
25+
}
26+
},
27+
"files": {
28+
"includes": ["src/**"]
29+
}
30+
}

0 commit comments

Comments
 (0)