# Contributing

## Clone and Build

```bash
git clone https://github.com/SaiAvinashPatoju/1mcp.in.git
cd 1mcp.in

# mach1 router + CLI
cd services/mach1
go build ./cmd/mach1
go build ./cmd/mach1cli
go vet ./...
go test -timeout 300s ./...

# Web UI
cd services/web-ui
npm ci
npm run check
```

## Adding an MCP to the Catalog

1. Fork the repo
2. Add your `.mcpb` bundle to `packages/registry-index/`
3. Update the catalog index JSON with SHA256 pin
4. Open a pull request

## Running the E2e Harness

```bash
cd services/mach1
# 52 kernel tests against the bundled catalog
go test -timeout 300s -v ./internal/kernel/
# Full test suite
go test -timeout 300s ./...
```

## PR Checklist

Before opening a pull request, confirm:

- [ ] `go vet ./...` passes
- [ ] `go test -timeout 300s ./...` passes
- [ ] `npm run check` passes (zero errors)
- [ ] License header (`SPDX-License-Identifier: Apache-2.0`) added to new `.go` files
- [ ] No secrets, tokens, or credentials in the diff
- [ ] `packages/registry-index/` changes only for actual catalog updates
- [ ] `AGENTS.md` enforceable rules respected

## Code Standards

See `AGENTS.md` for full architecture and enforceable rules.
