|
| 1 | +# CLAUDE.md |
| 2 | + |
| 3 | +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. |
| 4 | + |
| 5 | +## Repository Purpose |
| 6 | + |
| 7 | +This is a GitHub repository template that implements best practices for open source projects. It's designed to be cloned and customized for new repositories. The template includes GitHub community standards compliance, automated workflows, and a command-line driven development process. |
| 8 | + |
| 9 | +## Development Workflow |
| 10 | + |
| 11 | +This repo uses `just` (command runner) for all development tasks. The workflow is entirely command-line based using `just` and the GitHub CLI (`gh`). |
| 12 | + |
| 13 | +### Standard development cycle |
| 14 | + |
| 15 | +1. `just branch <name>` - Create a new feature branch (format: `$USER/YYYY-MM-DD-<name>`) |
| 16 | +2. Make changes and commit (last commit message becomes PR title) |
| 17 | +3. `just pr` - Create PR, push changes, and watch checks (waits 10s for GitHub API) |
| 18 | +4. `just merge` - Squash merge PR, delete branch, return to main, and pull latest |
| 19 | +5. `just sync` - Return to main branch and pull latest (escape hatch) |
| 20 | + |
| 21 | +### Additional commands |
| 22 | + |
| 23 | +- `just` or `just list` - Show all available recipes |
| 24 | +- `just prweb` - Open current PR in browser |
| 25 | +- `just release <version>` - Create a GitHub release with auto-generated notes |
| 26 | +- `just clean_readme` - Generate a clean README from template (strips template documentation) |
| 27 | +- `just compliance_check` - Run custom repo compliance checks |
| 28 | +- `just utcdate` - Print UTC date in ISO format (used in branch names) |
| 29 | + |
| 30 | +### Git aliases used |
| 31 | + |
| 32 | +The justfile assumes these git aliases exist: |
| 33 | + |
| 34 | +- `git stp` - Show status (likely `status --short` or similar) |
| 35 | +- `git pushup` - Push and set upstream tracking |
| 36 | +- `git co` - Checkout |
| 37 | + |
| 38 | +## Architecture |
| 39 | + |
| 40 | +### Modular justfile structure |
| 41 | + |
| 42 | +The main `justfile` imports two modules: |
| 43 | + |
| 44 | +- `.just/compliance.just` - Custom compliance checks for repo health |
| 45 | +- `.just/gh-process.just` - Git/GitHub workflow automation |
| 46 | + |
| 47 | +### GitHub Actions |
| 48 | + |
| 49 | +Four workflows run on PRs and pushes to main: |
| 50 | + |
| 51 | +- **markdownlint** - Enforces markdown standards using `markdownlint-cli2` |
| 52 | +- **checkov** - Security scanning for GitHub Actions |
| 53 | +- **actionlint** - Lints GitHub Actions workflow files |
| 54 | +- **auto-assign** - Automatically assigns issues |
| 55 | + |
| 56 | +### Markdown linting |
| 57 | + |
| 58 | +Configuration in `.markdownlint.yml`: |
| 59 | + |
| 60 | +- MD013 (line length) is disabled |
| 61 | +- MD041 (first line h1) is disabled |
| 62 | +- MD042 (no empty links) is disabled |
| 63 | +- MD004 (list style) enforces dashes |
| 64 | +- MD010 (tabs) ignores code blocks |
| 65 | + |
| 66 | +Run locally: `markdownlint-cli2 **/*.md` |
| 67 | + |
| 68 | +## Template customization |
| 69 | + |
| 70 | +When using this template for a new project, search and replace: |
| 71 | + |
| 72 | +- `fini-net` → your GitHub org |
| 73 | +- `template-repo` → your repo name |
| 74 | +- `chicks-net` → your references |
| 75 | + |
| 76 | +Run `just clean_readme` to strip template documentation from README. |
0 commit comments