Update .context/PROJECT.md to explicitly adopt Trunk-Based Development for this repo, override the cd.yml PR trigger to remove the quality gate on pull_request events (since PRs are no longer the default), and optionally add a pre-push git hook.
Background
gitea-mcp is a solo-owned, single-maintainer internal tool with a mature CI pipeline. It is the ideal candidate for strict TBD:
No external contributors
No client four-eyes requirement
CI already runs task check on every push to main
Conflicts caused by long-lived branches were demonstrated on 2026-05-14
Changes to .context/PROJECT.md
In the Git conventions section, replace:
- Conventional commits: `feat:`, `fix:`, `chore:`, `docs:`, `refactor:`- Branch naming: `feat/short-description`, `fix/short-description`- PRs: one concern per PR, description explains *why* not *what*- **Branch protection:** always work on a feature branch, open a PR, never push directly to main
With:
- Conventional commits: `feat:`, `fix:`, `chore:`, `docs:`, `refactor:`- **Trunk-Based Development:** commit directly to main. One logical change per commit.
- Run `task check` locally before every push. CI is the quality gate, not branch protection.
- No feature branches, no PRs for solo/agent work.
- Exception: if a parallel agent session is active on this repo, use a short-lived
`agent/<description>` branch and merge within the same session.
In Agent instructions, replace rule 6:
6. Always work on a feature branch and open a PR — never push directly to main
With:
6. Commit directly to main. Run `task check` before every push. Never create
feature branches unless a parallel agent is simultaneously active on this repo.
Changes to .gitea/workflows/cd.yml
The current workflow triggers on pull_request events for the check job:
Document in README: task setup:hooks on first clone.
Acceptance criteria
PROJECT.md Git section updated with TBD as explicit convention
PROJECT.md agent instruction rule 6 updated
cd.yml pull_request trigger removed
.githooks/pre-push added (optional but recommended)
task setup:hooks added to Taskfile.yml (if hook added)
task check passes
Committed directly to main in one commit: chore: adopt trunk-based development
Note on branch protection
Do NOT enable Gitea branch protection (required_approvals > 0) for this repo.
CI is the quality gate. Branch protection adds friction without safety for a
solo-maintained project.
## Summary
Update `.context/PROJECT.md` to explicitly adopt Trunk-Based Development for this repo, override the `cd.yml` PR trigger to remove the quality gate on pull_request events (since PRs are no longer the default), and optionally add a pre-push git hook.
## Background
`gitea-mcp` is a solo-owned, single-maintainer internal tool with a mature CI pipeline. It is the ideal candidate for strict TBD:
- No external contributors
- No client four-eyes requirement
- CI already runs `task check` on every push to main
- Conflicts caused by long-lived branches were demonstrated on 2026-05-14
## Changes to `.context/PROJECT.md`
In the **Git** conventions section, replace:
```markdown
- Conventional commits: `feat:`, `fix:`, `chore:`, `docs:`, `refactor:`
- Branch naming: `feat/short-description`, `fix/short-description`
- PRs: one concern per PR, description explains *why* not *what*
- **Branch protection:** always work on a feature branch, open a PR, never push directly to main
```
With:
```markdown
- Conventional commits: `feat:`, `fix:`, `chore:`, `docs:`, `refactor:`
- **Trunk-Based Development:** commit directly to main. One logical change per commit.
- Run `task check` locally before every push. CI is the quality gate, not branch protection.
- No feature branches, no PRs for solo/agent work.
- Exception: if a parallel agent session is active on this repo, use a short-lived
`agent/<description>` branch and merge within the same session.
```
In **Agent instructions**, replace rule 6:
```markdown
6. Always work on a feature branch and open a PR — never push directly to main
```
With:
```markdown
6. Commit directly to main. Run `task check` before every push. Never create
feature branches unless a parallel agent is simultaneously active on this repo.
```
## Changes to `.gitea/workflows/cd.yml`
The current workflow triggers on `pull_request` events for the `check` job:
```yaml
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
```
Since PRs are no longer the default, the `pull_request` trigger is vestigial.
Remove it to reduce noise:
```yaml
on:
push:
branches: [main]
tags: ["v*"]
```
The `check` job's `if: github.event_name != 'pull_request'` guard on the `build`
job can also be simplified to just run on every push:
```yaml
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
```
## Optional: add pre-push git hook
Add `.githooks/pre-push` to the repo so any agent or human working locally
gets the quality gate enforced before push:
```bash
#!/usr/bin/env bash
set -euo pipefail
echo "→ Running task check before push..."
task check
echo "✓ pre-push check passed"
```
And in `Taskfile.yml`, add a setup task:
```yaml
setup:hooks:
desc: Install git hooks
cmds:
- git config core.hooksPath .githooks
- chmod +x .githooks/pre-push
- echo "✓ git hooks installed"
```
Document in README: `task setup:hooks` on first clone.
## Acceptance criteria
- [ ] PROJECT.md Git section updated with TBD as explicit convention
- [ ] PROJECT.md agent instruction rule 6 updated
- [ ] `cd.yml` pull_request trigger removed
- [ ] `.githooks/pre-push` added (optional but recommended)
- [ ] `task setup:hooks` added to Taskfile.yml (if hook added)
- [ ] `task check` passes
- [ ] Committed directly to main in one commit: `chore: adopt trunk-based development`
## Note on branch protection
Do NOT enable Gitea branch protection (required_approvals > 0) for this repo.
CI is the quality gate. Branch protection adds friction without safety for a
solo-maintained project.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Update
.context/PROJECT.mdto explicitly adopt Trunk-Based Development for this repo, override thecd.ymlPR trigger to remove the quality gate on pull_request events (since PRs are no longer the default), and optionally add a pre-push git hook.Background
gitea-mcpis a solo-owned, single-maintainer internal tool with a mature CI pipeline. It is the ideal candidate for strict TBD:task checkon every push to mainChanges to
.context/PROJECT.mdIn the Git conventions section, replace:
With:
In Agent instructions, replace rule 6:
With:
Changes to
.gitea/workflows/cd.ymlThe current workflow triggers on
pull_requestevents for thecheckjob:Since PRs are no longer the default, the
pull_requesttrigger is vestigial.Remove it to reduce noise:
The
checkjob'sif: github.event_name != 'pull_request'guard on thebuildjob can also be simplified to just run on every push:
Optional: add pre-push git hook
Add
.githooks/pre-pushto the repo so any agent or human working locallygets the quality gate enforced before push:
And in
Taskfile.yml, add a setup task:Document in README:
task setup:hookson first clone.Acceptance criteria
cd.ymlpull_request trigger removed.githooks/pre-pushadded (optional but recommended)task setup:hooksadded to Taskfile.yml (if hook added)task checkpasseschore: adopt trunk-based developmentNote on branch protection
Do NOT enable Gitea branch protection (required_approvals > 0) for this repo.
CI is the quality gate. Branch protection adds friction without safety for a
solo-maintained project.