workflow · diff

git:20251121.29d880b to git:20260125.f453b7c

1 added, 1 removed. Audit A to A.

---
description: Development workflow and commit practices
globs: ["**/*.py", "**/*.md"]
alwaysApply: false
---
# Development Workflow
## Before Starting Work
1. Pull latest changes: `git pull origin main`
2. Create feature branch: `git checkout -b feature/your-feature`
3. Review existing patterns in similar files
- 4. If work involves Claude commands/agents or `.claude`/`docs/claude` assets, load `docs/claude/CLAUDE.md` plus the relevant manuals (01-07) before making changes so Cursor and Claude guidance stay aligned.
+ 4. Read `CLAUDE.md` and `AGENTS.md` for project-specific AI assistant guidelines
## During Development
1. Write tests first (TDD approach)
2. Implement feature following patterns above
3. Run tests frequently: `pytest -v`
4. Check types: `mypy src/`
5. Format code: `black src/ tests/` and `isort src/ tests/`
## Before Committing
1. Run full test suite: `pytest --cov=src --cov-report=term-missing`
2. Ensure coverage ≥80%: Check coverage report
3. Run linter: `ruff check src/ tests/ --fix`
4. Type check: `mypy src/`
5. Run pre-commit hooks: `pre-commit run --all-files`
6. Update documentation if needed
## Commit Message Format
Follow Conventional Commits:
```
<type>: <short summary>
<optional body>
```
Types: `feat`, `fix`, `docs`, `test`, `refactor`, `style`, `chore`
Examples:
```
feat: add DPI statistics tool for bandwidth analysis
fix: correct device restart timeout handling
docs: update API.md with WiFi management tools
test: add integration tests for port forwarding
refactor: simplify client blocking logic
```
## Code Quality Checklist
Before submitting a PR, verify:
- [ ] All tests pass (`pytest`)
- [ ] Code coverage ≥80% (`pytest --cov`)
- [ ] Type checking passes (`mypy src/`)
- [ ] Linting passes (`ruff check src/ tests/`)
- [ ] Code formatted (`black`, `isort`)
- [ ] Security checks pass (`bandit -r src/`)
- [ ] Pre-commit hooks pass
- [ ] Documentation updated (docstrings, API.md)
- [ ] CHANGELOG.md updated for user-facing changes
- [ ] No hardcoded secrets or API keys
- [ ] Audit logging added for mutating operations