Add set_branch_protection() and related methods to GiteaClient.
Fixes#482 via three-way enforcement:
1. gitea_client.py: Added get/set/delete_branch_protection() API wrappers
2. bin/enable-branch-protection.py: Idempotent script protects main branches
of all Timmy_Foundation core repos with:
── required_approvals: 1 (at least one human review)
── require_status_checks: true (CI must pass)
── restrict_merge: true (only admins + reviewers can merge)
3. tests/test_gitea_client_core.py: Added TestBranchProtection suite
Usage: after merging, run:
bin/enable-branch-protection.py --dry-run # verify
bin/enable-branch-protection.py # apply to all core repos
This prevents agents from merging their own PRs before human review.
- Add bin/kaizen-retro.sh entry point and scripts/kaizen_retro.py
- Analyze closed issues, merged PRs, and stale/max-attempts issues
- Report success rates by agent, repo, and issue type
- Generate one concrete improvement suggestion per cycle
- Post retro to Telegram and comment on the latest morning report issue
- Wire into Huey as kaizen_retro() task at 07:15 daily
- Extend gitea_client.py with since param for list_issues and
created_at/updated_at fields on PullRequest
Implements muda-audit.sh measuring all 7 wastes across the fleet:
- Overproduction: issues created vs closed ratio
- Waiting: rate-limit hits from agent logs
- Transport: issues closed-and-redirected
- Overprocessing: PR diff size outliers >500 lines
- Inventory: stale issues open >30 days
- Motion: git clone/rebase churn from logs
- Defects: PRs closed without merge vs merged
Features:
- Persists week-over-week metrics to ~/.local/timmy/muda-audit/metrics.json
- Posts trended waste report to Telegram with top 3 eliminations
- Scheduled weekly (Sunday 21:00 UTC) via Gitea Actions
- Adds created_at/closed_at to PullRequest dataclass and page param to list_org_repos
Closes#350