---
argument-hint: [message|--amend|--squash]
description: Creates proper git commits with validation for code-executor-mcp, follows TypeScript/MCP server standards, handles pre-commit hooks
allowed-tools: Bash, BashOutput, Read, Glob, Grep, TodoWrite, mcp__ide__getDiagnostics
---
Commit "$ARGUMENTS" - code-executor-mcp Project Standards
## π¨ ZERO TOLERANCE
**Forbidden Actions:**
- β NO force push to `develop`/`master`
- β NO commits without validation
- β NO `--amend` on others' work
- β NO secrets in commits (API keys, database URLs, tokens)
- β NEVER `--no-verify` without explicit user request
- β NO `@ts-ignore` or `ignoreBuildErrors: true`
- β NO hardcoded env vars (use validated env config)
---
## β
PRE-COMMIT VALIDATION
**Mandatory quality checks for code-executor-mcp:**
```bash
# 1. Code quality (TypeScript strict mode + ESLint)
npm run lint && npm run typecheck
# 2. Build verification (zero tolerance - must pass)
npm run build
# 3. Test coverage check
npm test
# 4. Review changes
git status && git diff --cached
```
---
## π§ͺ TEST GATE
**code-executor-mcp testing strategy:**
| Change Type | Test Requirement |
| --------------------- | --------------------------------------- |
| Validation logic | Vitest tests MUST pass (β₯90% coverage) |
| Schema caching | Tests REQUIRED (concurrency, TTL) |
| MCP tool handlers | Integration tests RECOMMENDED |
| Security features | Tests REQUIRED (sandbox, permissions) |
| Bug fixes | Regression test REQUIRED |
| NO tests for logic | **BLOCK commit** |
| Tests fail | **BLOCK commit** |
**Test commands:**
- All tests: `npm test`
- Watch mode: `npm run test:watch`
- Coverage: `npm run test:coverage`
---
## π COMMIT MESSAGE FORMAT
```
feat(validator): add deep schema validation with AJV
Implement recursive validation for nested objects and arrays
to replace shallow custom validator.
π€ Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
```
**Format Rules:**
- **Type:** `feat` / `fix` / `refactor` / `chore` / `docs` / `test`
- **Scope:** `(validator)` / `(cache)` / `(executor)` / `(mcp)` / `(security)` / `(config)`
- **Body:** Explain WHY (2-3 sentences max), not WHAT (code shows what)
- **Footer:** Always include Claude Code attribution (shown above)
---
## π SAFETY CHECKS
**code-executor-mcp Branch Protection:**
- β
Work on `develop` branch (main development)
- π¨ `main` branch = stable releases (no direct commits, PR-only)
- π¨ Schema cache = never commit `~/.code-executor/schema-cache.json`
- π¨ Never commit `.env` files, API keys, or MCP server credentials
**Pre-Amend Checks:**
```bash
# Verify commit NOT pushed
git status # Must show "Your branch is ahead"
# Check authorship BEFORE --amend
git log -1 --format='%an %ae' # NEVER amend others' commits
```
**Hook Failures:**
- ONE retry allowed on pre-commit hook failures
- If hook modifies files β safe to amend ONLY if you own the commit
- Otherwise β create NEW commit
---
## β‘ QUALITY CIRCUIT TRIGGER
**Auto-escalation before commit:**
1. **TypeScript errors** β **CRITICAL: Fix immediately** (strict mode enforced)
2. **ESLint errors** β **CRITICAL: Run `npm run lint` first**
3. **Build fails** β **CRITICAL: Run `npm run build` first**
4. **Tests fail** β **CRITICAL: Run tests and fix failures**
5. **Missing AJV validation** β **CRITICAL: Validate all MCP tool parameters**
6. Only commit when ALL checks pass
---
## π― CODE-EXECUTOR-MCP SPECIFIC CHECKS
**Before committing, verify:**
- β
AJV validation on all MCP tool parameters
- β
Schema cache AsyncLock mutex for concurrent access
- β
Deno sandbox permissions properly restricted
- β
JSDoc comments on public functions
- β
Error handling with proper MCP error codes
- β
Vitest tests for new validation/caching logic
- β
No hardcoded MCP server URLs or credentials
**Security features:**
- β
Dangerous pattern detection (eval, exec, __import__)
- β
Path validation prevents directory traversal
- β
Rate limiting implemented
- β
Audit logs for tool executions
---
**Commit discipline = Project quality = MCP server reliability**
**Stack:** TypeScript 5.x + Node.js 20+ + @modelcontextprotocol/sdk + AJV + async-lock + Vitest