Skip to content

Commit 88c9ed2

Browse files
improve: update CI workflow and add AGENTS.md
- Update CI workflow: change branch from master to main, add Python 3.10 to matrix, use pinned action versions - Add AGENTS.md with project guidelines for AI agents
1 parent fea8138 commit 88c9ed2

2 files changed

Lines changed: 40 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: CI
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [main]
66
tags: ["v*"]
77
pull_request:
8-
branches: [master]
8+
branches: [main]
99

1010
permissions:
1111
contents: read
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
python-version: ["3.11", "3.12", "3.13"]
18+
python-version: ["3.10", "3.11", "3.12", "3.13"]
1919

2020
steps:
2121
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
@@ -44,6 +44,7 @@ jobs:
4444
runs-on: ubuntu-latest
4545
permissions:
4646
id-token: write
47+
contents: read
4748

4849
steps:
4950
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
@@ -62,4 +63,4 @@ jobs:
6263
run: python -m build
6364

6465
- name: Publish to PyPI
65-
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b
66+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b

AGENTS.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Agent Instructions for deadcode
2+
3+
## Project Overview
4+
CLI tool to detect and auto-remove unused exports, dead routes, orphaned CSS in TS/React/Next.js projects.
5+
6+
## Build & Test Commands
7+
- **Install dev dependencies**: `pip install -e ".[dev]"`
8+
- **Run tests**: `python -m pytest tests/ -x -q`
9+
- **Lint**: `ruff check .`
10+
- **Build**: `python -m build`
11+
12+
## Code Style
13+
- Python 3.10+ target
14+
- Line length: 120 chars (ruff config)
15+
- Import sorting: isort with known-first-party = ["deadcode"]
16+
- Lint rules: E, F, W, I, UP, B, SIM (ignore E501)
17+
18+
## Key Files
19+
- `src/deadcode/cli.py` - Main CLI entry point
20+
- `src/deadcode/scanner.py` - Core scanning logic
21+
- `src/deadcode/config.py` - Configuration handling
22+
- `tests/` - Test suite (3 test files)
23+
- `pyproject.toml` - Project configuration
24+
25+
## CI/CD
26+
- GitHub Actions workflow in `.github/workflows/ci.yml`
27+
- Tests run on Python 3.10, 3.11, 3.12, 3.13
28+
- Lint with ruff, test with pytest
29+
- Publish to PyPI on version tags (v*)
30+
31+
## Contribution Guidelines
32+
1. Run `ruff check .` before committing
33+
2. Run `python -m pytest tests/ -x -q` to verify tests pass
34+
3. Follow conventional commits
35+
4. Update CHANGELOG.md for notable changes

0 commit comments

Comments
 (0)