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
147 changes: 147 additions & 0 deletions .claude/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# Claude Code Configuration

Claude Code operates as one agent among equals in this repository.

## Quick Start

See main documentation:
- [Agent Collaboration]../.github/AGENT_COLLABORATION.md) - Multi-agent guidelines

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix broken markdown link syntax.

Line 8 is missing an opening bracket before "Agent Collaboration". The current syntax won't render as a proper link.

- - [Agent Collaboration]../.github/AGENT_COLLABORATION.md) - Multi-agent guidelines
+ - [Agent Collaboration](../.github/AGENT_COLLABORATION.md) - Multi-agent guidelines
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- [Agent Collaboration]../.github/AGENT_COLLABORATION.md) - Multi-agent guidelines
- [Agent Collaboration](../.github/AGENT_COLLABORATION.md) - Multi-agent guidelines
🧰 Tools
🪛 LanguageTool

[uncategorized] ~8-~8: The official name of this software platform is spelled with a capital “H”.
Context: ...cumentation: - [Agent Collaboration]../.github/AGENT_COLLABORATION.md) - Multi-agent g...

(GITHUB)

🤖 Prompt for AI Agents
In .claude/README.md around line 8, the markdown link is missing the opening '['
before "Agent Collaboration", producing malformed link syntax; fix it by adding
the missing '[' so the link reads "[Agent
Collaboration](../.github/AGENT_COLLABORATION.md) - Multi-agent guidelines"
(i.e., ensure the link text is enclosed in brackets immediately followed by the
URL in parentheses).

- [Development Environment](../DEVCONTAINER_AND_AUTOMATION.md) - DevOps and automation
- [Copilot Instructions](../.github/copilot-instructions.md) - Copilot configuration

## Project Overview

**Bleedy** - Web app for adding bleed margins to images

**Stack**: Vue 3 + TypeScript + Vite + PyScript + Element Plus

**Key Commands**:
```bash
npm install # Always run first (applies patches)
npm run dev # Start dev server (localhost:5173)
npm run build # Build for production (~8-10s)
npm run lint # Run ESLint
```

## Claude Code Specifics

### Tools Available

- **TodoWrite** - Task tracking (use for complex multi-step tasks)
- **Direct git access** - Can commit and push directly
- **Bash** - Full shell access
- **File operations** - Read, Write, Edit tools

### When to Use Claude Code

**Best for**:
- Complex multi-file refactoring requiring systematic planning
- Feature implementation needing task decomposition
- Deep debugging across multiple files
- CI/CD workflow development

**Not ideal for**:
- Simple fixes → Use @copilot (unlimited usage)
- Quick edits → Use @copilot
- Code review → Use @coderabbitai (automated, unlimited)

**Strategy**: Start with unlimited agents (Copilot, CodeRabbit). Escalate to Claude Code when their unique capabilities justify the usage cost.

### Git Workflow

Claude Code can commit and push directly:

```bash
# Changes are committed with descriptive messages
# Includes "Generated with Claude Code" footer
git add .
git commit -m "message"
git push -u origin <branch-name>
```

**Branch naming**: Must start with `claude/` and end with matching session ID (enforced by server)

**Push retries**: Up to 4 retries with exponential backoff for network errors

### Task Management

Use TodoWrite for complex tasks:
- Track multi-step implementations
- Show progress to users
- Ensure no tasks are forgotten

### Repository-Specific Notes

1. **npm version**: Requires npm 11.0.0+ for proper patch application
2. **Patched dependencies**: Always run `npm install` first
3. **ESLint 9.x**: Uses flat config (`eslint.config.js`)
4. **No tests yet**: `npm test` will fail
5. **Build warnings**: Large chunk size warnings are expected (PyScript)

### Testing Before Commit

Always verify:
```bash
npm run lint # Must pass
npm run build # Must complete successfully
```

### Multi-Agent Coordination

When handing off to other agents:
- Use templates from `.github/AGENT_COLLABORATION.md`
- Mention agents with @ (e.g., @copilot, @coderabbitai)
- Paste review content (don't use URLs - agents can't access them)
- Reference specific files and line numbers

### GitHub MCP Server

This repo uses GitHub's official MCP server (`.mcp/config.json`):
- Claude Code uses direct git (not MCP for git operations)
- Other agents may use MCP for GitHub API access
- See `.github/AGENT_COLLABORATION.md` for details

### Development Environment

**Devcontainer available**: See `.devcontainer/README.md`
- Node.js 20 base image
- Pre-installed: GitHub CLI, Python 3, Docker-in-Docker
- Auto-setup via `postCreateCommand.sh`

**Environment script**: `bash scripts/setup-agent-environment.sh`
- Configures git for PR refs
- Creates helpful git aliases
- Verifies tool availability

## Additional Resources

- **DEVCONTAINER_AND_AUTOMATION.md** - Full DevOps guide
- **.github/ACCESSING_PR_REVIEWS.md** - How to access PR reviews programmatically
- **OVERHAUL_STRATEGY.md** - Recent modernization strategy
- **docs/** - Architecture, design patterns, Python integration

## Common Tasks

### Feature Implementation
1. Use TodoWrite to create task list
2. Implement systematically
3. Test with `npm run build && npm run lint`
4. Commit with clear message
5. Push to `claude/*` branch

### Bug Fixes
1. Investigate using file search tools
2. Fix and test locally
3. Verify no regressions
4. Commit and push

### Refactoring
1. Plan changes (TodoWrite)
2. Make minimal, focused changes
3. Test thoroughly
4. Document if needed

---

**Last Updated**: 2025-11-15
**For detailed information**: See main documentation files listed above
87 changes: 87 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Multi-Agent Development Container for Bleedy
# Optimized for collaboration between Claude Code, GitHub Copilot, CodeRabbit, and other AI agents

FROM node:20-bookworm

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive

# Configure apt and install packages
RUN apt-get update \
&& apt-get -y install --no-install-recommends \
# Essential development tools
git \
curl \
wget \
ca-certificates \
gnupg \
lsb-release \
# Python for automation scripts
python3 \
python3-pip \
python3-venv \
# Build tools
build-essential \
# Additional tools for multi-agent collaboration
jq \
vim \
nano \
less \
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

# Install GitHub CLI
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& apt-get update \
&& apt-get install -y gh \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

# Set up npm global directory with correct permissions
ENV NPM_CONFIG_PREFIX=/usr/local/share/npm-global
ENV PATH=$NPM_CONFIG_PREFIX/bin:$PATH
RUN mkdir -p /usr/local/share/npm-global \
&& chown -R node:node /usr/local/share/npm-global

# Install global npm packages
RUN npm install -g npm@latest \
&& npm install -g \
prettier@latest \
eslint@latest \
typescript@latest \
@vue/language-server@latest

# Configure git for PR refs (enables programmatic PR access)
RUN git config --system --add fetch.prune true \
&& git config --system --add core.autocrlf input \
&& git config --system --add pull.rebase false

# Set up Python environment
RUN pip3 install --no-cache-dir --break-system-packages \
pyyaml \
requests \
python-dotenv

# Create command history directory
RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" \
&& mkdir -p /commandhistory \
&& touch /commandhistory/.bash_history \
&& chown -R node:node /commandhistory \
&& echo "$SNIPPET" >> "/home/node/.bashrc"

# Create workspace directory
RUN mkdir -p /workspace \
&& chown -R node:node /workspace

# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog

# Set the default user
USER node

# Set working directory
WORKDIR /workspace
Loading
Loading