109 lines
3.0 KiB
Markdown
109 lines
3.0 KiB
Markdown
# Guide To `lambda`
|
|
|
|
## Documentation Style
|
|
|
|
Use full sentences.
|
|
Every sentence gets its own line in Markdown.
|
|
Every sentence ends in a period.
|
|
|
|
## Coding Style
|
|
|
|
### Conventional Commits
|
|
|
|
Use conventional commit format: `<type>: <description>`.
|
|
|
|
**Types**: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `perf`
|
|
|
|
**Examples**:
|
|
|
|
- `feat: add explanation mode flag to CLI`
|
|
- `fix: correct variable renaming in nested abstractions`
|
|
- `docs: update Makefile documentation`
|
|
|
|
DO NOT advertise Claude.
|
|
|
|
### Branch Names
|
|
|
|
Use format: `<type>/<description>` with kebab-case.
|
|
|
|
**Types**: Same as commits: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `perf`.
|
|
|
|
**Examples**:
|
|
|
|
- `feat/explanation-mode`
|
|
- `fix/variable-renaming`
|
|
- `docs/makefile-improvements`
|
|
- `refactor/silent-directive`
|
|
|
|
DO NOT advertise Claude.
|
|
|
|
## Issue Management
|
|
|
|
Use the `tea` CLI (Gitea command-line tool) for issue operations.
|
|
|
|
**Common commands**:
|
|
|
|
- `tea issues list` - List all issues.
|
|
- `tea issues <number>` - View details of a specific issue.
|
|
- `tea issues create --title "<title>" --body "<description>"` - Create a new issue.
|
|
- `tea issues close <number>` - Close an issue.
|
|
|
|
**Reading issues**: Use `tea issues <number>` to read the full details of an issue before starting work.
|
|
|
|
## Issue Workflow
|
|
|
|
When working on an issue:
|
|
|
|
1. Read the issue using `tea issues <number>` to understand requirements.
|
|
2. Create a feature branch following the branch naming convention.
|
|
3. Make commits following the conventional commit format.
|
|
4. Submit a pull request when ready.
|
|
|
|
**Important**: Never commit directly to `main`.
|
|
All work must be done in a feature branch and submitted via pull request.
|
|
|
|
## Pull Request Management
|
|
|
|
Use the `tea` CLI (Gitea command-line tool) for PR operations instead of `gh`.
|
|
|
|
**Common commands**:
|
|
|
|
- `tea pr create --title "<title>" --description "<body>"` - Create a new pull request.
|
|
- `tea pr list` - List pull requests.
|
|
- `tea pr checkout <number>` - Check out a PR locally.
|
|
- `tea pr close <number>` - Close a pull request.
|
|
- `tea pr merge <number>` - Merge a pull request.
|
|
|
|
**Note**: Use `--description` (not `--body`) for PR body content.
|
|
|
|
**Creating PRs**: Always create PRs in a branch other than `main`, to the `main` branch unless specified otherwise. ALWAYS FOLLOW THE PR TEMPLATE, EXACTLY.
|
|
|
|
**Linking issues**: When a PR solves an issue, reference the issue in both the commit message and PR description using `Closes #<number>`.
|
|
This automatically links and closes the issue when the PR is merged.
|
|
|
|
### Updating PR Descriptions
|
|
|
|
Use the `tea` CLI to update pull request descriptions:
|
|
|
|
```bash
|
|
tea pr edit -d "New description text"
|
|
```
|
|
|
|
#### Options
|
|
|
|
- `-d, --description` - Set description directly
|
|
- `--desc-file` - Read description from a file
|
|
- `-r, --repo` - Specify repo (defaults to current directory)
|
|
|
|
#### Examples
|
|
|
|
```bash
|
|
# Update PR #42 with inline text
|
|
tea pr edit 42 -d "Updated implementation based on feedback"
|
|
|
|
# Update using a file
|
|
tea pr edit 42 --desc-file PR_DESCRIPTION.md
|
|
|
|
# Update PR in a different repo
|
|
tea pr edit 42 -r username/repo -d "New description"
|
|
``` |