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
Binary file modified .DS_Store
Binary file not shown.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on:
push:
branches:
- '*'
- "*"
pull_request:
branches:
- main
Expand Down Expand Up @@ -33,10 +33,10 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build:ci
run: pnpm build

- name: Install browsers
run: pnpm exec playwright install --with-deps chromium
run: cd packages/agent && pnpm exec playwright install --with-deps chromium

- name: Test
run: pnpm test
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ dist
.env
runs
data
internal_docs
internal_docs
.DS_Store
189 changes: 113 additions & 76 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,112 +1,149 @@
# Contributing
# Contributing to MyCoder

Key points:
First off, thank you for considering contributing to MyCoder! It's people like you that make MyCoder such a great tool.

- Run build, test, and lint before submitting changes
- Use TypeScript types over interfaces
- Maintain test coverage
- Keep documentation updated
- Use the logger system for output
## Code of Conduct

This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.

## Development Setup

```bash
# Clone the repository
git clone https://github.com/bhouston/mycoder.git
### Prerequisites

- Node.js >= 20.0.0
- pnpm >= 10.2.1
- PostgreSQL (for Dashboard)
- Google Cloud SDK (for cloud features)
- Git

### Getting Started

1. Fork the repository
2. Clone your fork:
```bash
git clone https://github.com/your-username/mycoder-monorepo.git
cd mycoder-monorepo
```
3. Install dependencies:
```bash
pnpm install
```
4. Build all packages:
```bash
pnpm build
```
5. Start development servers:
```bash
pnpm dev
```

## Project Architecture

### Monorepo Structure

- `/packages/*` - All project packages
- `agent` - Core AI agent system
- `cli` - Command-line interface

# Change directory
cd mycoder
## Development Workflow

# Install dependencies
pnpm install
1. Create a new branch for your feature/fix:

# Create a .env with your API key
echo "ANTHROPIC_API_KEY=[your-api-key]" > .env
```
```bash
git checkout -b feature/your-feature-name
```

### Development Commands
2. Make your changes, following our coding standards:

- `pnpm run build` - Build the TypeScript code
- `pnpm start` - Run the application
- `pnpm test` - Run tests
- `pnpm run lint` - Lint the code
- `pnpm run format` - Format the code
- `pnpm run clean` - Clean build artifacts
- Use TypeScript for all new code
- Follow the existing code style
- Add tests for new functionality
- Update documentation as needed

## Architecture
3. Run tests and checks:

### Core Components
```bash
pnpm test # Run tests
pnpm typecheck # Type checking
pnpm lint # Linting
pnpm format # Code formatting
```

1. **Tool System**
4. Commit your changes:

- Modular tools for specific functionalities
- Categories: Interaction, I/O, System, Data Management
- Parallel execution capability
- Type-safe definitions
```bash
git commit -m "feat: add your feature description"
```

2. **Agent System**
Follow [Conventional Commits](https://www.conventionalcommits.org/) specification.

- Main agent for orchestration
- Sub-agents for parallel task execution
- Anthropic Claude API integration
- Hierarchical logging
5. Push to your fork and create a Pull Request

3. **Logger System**
- Color-coded component output
- Hierarchical indentation
- Multiple log levels (info, verbose, warn, error)
- Structured data logging
## Package-Specific Guidelines

## Project Structure
### Agent Development

```
src/
├── core/ # Core agent and executor logic
├── interfaces/ # Type definitions and interfaces
├── tools/ # Tool implementations
│ ├── interaction/
│ ├── io/
│ ├── system/
│ └── record/
└── utils/ # Utilities including logger
```
- Test all new tools thoroughly
- Document tool interfaces completely
- Consider parallel execution opportunities
- Add comprehensive error handling

## Coding Style
### CLI Development

### Terse and Simple
- Follow command naming conventions
- Include help text for all commands
- Add examples to documentation
- Test interactive features thoroughly

Favor a terse coding style that focuses on simplicity and readability.
### Dashboard & Website

## Prefer Types over Interfaces
- Follow component architecture
- Use existing UI components
- Add Storybook stories for new components
- Ensure responsive design

When writing types please use type rather than interfaces as they are more robust.
### GitHub Integration

### Use Logger in Tools/Agents for Output
- Test webhook handlers thoroughly
- Document API interactions
- Follow security best practices
- Add integration tests

The project uses a hierarchical logging system (Logger) that helps distinguish between different agents and tools in the output. The logging system has the following features:
## Testing Guidelines

- `verbose`: Detailed debug information (dimmed version of agent/tool color)
- `info`: Normal operational messages (colored according to agent/tool color)
- `warn`: Warning messages (yellow)
- `error`: Error messages (red)
1. Write tests for new features
2. Maintain existing test coverage
3. Use appropriate testing tools:
- Vitest for unit tests
- Playwright for E2E tests
- Component testing where appropriate

## Check Build Works after Changes
## Documentation

Ensure that `pnpm run build` works after making changes to the code, otherwise you need to make fixes.
- Update README.md files as needed
- Document new features and changes
- Include code examples
- Update API documentation

## Keep Tests & Lint & Format Up-to-Date With Changes
## Getting Help

Please add tests when making changes to the code. Try to sensible tests that a senior dev would write, try to avoid useless tests that don't add value.
- Check existing issues and discussions
- Join our community chat
- Ask questions in pull requests
- Reach out to maintainers

Ensure that the `pnpm test` passes after making changes to the code as well as `pnpm run lint` passes with no warnings or errors. Also run `pnpm run format` to ensure the code is formatted correctly.
## Review Process

If a test fails, but it is not clear why, you can add more tests around that test as well as add more verbose messages to the failed test to help you identify the cause. This will both help you and help others going forward.
1. All changes require review
2. Address review feedback promptly
3. Maintain civil and professional discourse
4. Be patient with the process

## Keep Documentation Up-to-Date with Changes
## Release Process

When making changes to the code, please ensure that the documentation in these files says up to date:
1. Maintainers will handle releases
2. Follow semantic versioning
3. Update changelog entries
4. Tag releases appropriately

- `README.md`
- `ARCHITECTURE.md`
- `CONTRIBUTING.md`
- `TOOLS.md`
Thank you for contributing to MyCoder! 👍
Loading