Files
iomgaa 3058f4c744 chore: bootstrap project scaffolding
Add architecture doc (research-wiki/ARCHITECTURE.md), CLAUDE.md with
tiered SOP for Fable 5, adapted .claude skills/hooks/settings, package
skeleton (src/polygateway), pyproject with import-linter contracts,
Makefile, .env.example and smoke test.
2026-07-20 00:49:10 -04:00

69 lines
1.7 KiB
Markdown

---
name: commit
description: Use when committing code changes - enforces commit message format, safety checks, and prohibits AI signatures
---
# Commit
Automatically generate a commit message and submit the code.
## Workflow
1. **Check status**: run `git status` to inspect changes (do not use `-uall`)
2. **Review diff**: run `git diff --staged` and `git diff` to inspect the exact changes
3. **Check style**: run `git log --oneline -10` to review recent commit style
4. **Generate message**: create a commit message that follows the rules below
5. **Commit**: stage the files and commit
## Commit Message Rules
### Format
```text
<type>: <description>
[optional body]
```
### Type Values
- `feat`: new feature
- `fix`: bug fix
- `docs`: documentation update
- `refactor`: refactor with no functional change
- `test`: test-related change
- `chore`: build / tooling / configuration
- `perf`: performance optimization
- `ci`: CI/CD related
### Rules
- The description must be written in English
- Keep it under 72 characters
- Use the imperative mood, for example "add user authentication" instead of "added user authentication"
## Safety Rules
> [!CAUTION]
> **Never** add any AI signature to a commit message:
> - Do not add `Co-Authored-By: Claude`
> - Do not add `🤖 Generated with...`
> - Do not add any AI signature or marker
## Sensitive File Check
Before committing, check whether any of the following files were accidentally added:
- `.env` / `.env.*`
- `credentials.json`
- `*_secret*`
- `*.pem` / `*.key`
If sensitive files are found, **warn the user** and wait for confirmation.
## Examples
```bash
# Auto-generate a message
/commit
# Specify a message
/commit "feat: add user login"
```