# Git Workflow

> Standards for committing and pushing code to the Cycle Navigator Dashboard repository. Use this when the user wants to save, commit, or deploy changes. Use when this capability is needed.

- Skill: `tomevault-io/git-workflow-183` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/git-workflow-183`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/git-workflow-183/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/git-workflow-183

---


# Git Workflow Instructions

When performing a commit or preparing a push, follow these project-specific rules:

1. **Pre-Commit Verification**:
   - Backend: Run `ruff check backend/` for linting and `pytest backend/` for tests.
   - If frontend changes were made: Run `npm run lint` and `npm test` in the `web` directory.
   - This prevents merging broken code to main.

2. **Commit Message Format**:
   - Use descriptive headers with format: `<type>(<scope>): <description>`
   - Types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`
   - Scope: affected component (e.g., `backend/tasks`, `web/components`)
   - Examples:
     - ✅ `feat(backend/tasks): add retry logic for failed macro jobs`
     - ❌ `fix stuff` (too vague)
   - For breaking changes or multi-line details, add a body with issue references (e.g., `Closes #123`)

3. **Breaking Changes**:
   - Mark breaking changes in the commit body with: `BREAKING CHANGE: <description>`
   - Include in breaking changes: Celery paths, database schema, API endpoints, environment variables, or config structure.
   - Examples:
     - `BREAKING CHANGE: Celery tasks moved from services.macro_worker to celery_app. Update docker-compose.yml.`
     - `BREAKING CHANGE: API endpoint /api/v1/tasks renamed to /api/v2/tasks.`
   - For database changes, ensure migrations are included in `scripts/timescale_migrations.sql`.

4. **Safety Checks**:
   - Never commit `.env` files or sensitive API keys (FRED_API_KEY, COINGECKO_API_KEY).
   - Verify that any new database migrations are included in `scripts/timescale_migrations.sql`.

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/chucks007) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-14 -->

