Compare commits
1 Commits
fix/668
...
process/14
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6c8cc3e7d |
74
docs/backlog-triage-report.md
Normal file
74
docs/backlog-triage-report.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# timmy-home Backlog Triage Report
|
||||
|
||||
Generated: 2026-04-14 22:57 UTC
|
||||
Total open issues: 50
|
||||
Closed in last 30 days (sample): 50
|
||||
|
||||
## By Assignee
|
||||
- unassigned: 21
|
||||
- Rockachopa: 9
|
||||
- Timmy: 5
|
||||
- allegro: 4
|
||||
- ezra: 3
|
||||
- perplexity: 2
|
||||
- codex-agent: 2
|
||||
- claude: 2
|
||||
- gemini: 1
|
||||
- claw-code: 1
|
||||
|
||||
## By Label
|
||||
- no-label: 21
|
||||
- batch-pipeline: 19
|
||||
- fleet: 8
|
||||
- progression: 7
|
||||
- epic: 2
|
||||
- phase-2: 2
|
||||
- claw-code-in-progress: 2
|
||||
- project: 1
|
||||
- phase-6: 1
|
||||
- phase-5: 1
|
||||
- phase-4: 1
|
||||
- phase-3: 1
|
||||
- phase-1: 1
|
||||
|
||||
## By Age
|
||||
- today: 21
|
||||
- this-week: 26
|
||||
- this-month: 3
|
||||
- older: 0
|
||||
|
||||
## Triage Recommendations
|
||||
|
||||
### Unassigned batch-pipeline issues (19)
|
||||
These are auto-generated analysis tasks. Recommend assigning to a single agent or closing if stale.
|
||||
- #683: Codebase Genome: wolf — Full Analysis
|
||||
- #682: Codebase Genome: timmy-dispatch — Full Analysis
|
||||
- #681: Codebase Genome: burn-fleet — Full Analysis
|
||||
- #680: Codebase Genome: fleet-ops — Full Analysis
|
||||
- #679: Codebase Genome: turboquant — Full Analysis
|
||||
- #678: Codebase Genome: timmy-academy — Full Analysis
|
||||
- #677: Codebase Genome: evennia-local-world — Full Analysis
|
||||
- #676: Codebase Genome: compounding-intelligence — Full Analysis
|
||||
- #675: Codebase Genome: the-testament — Full Analysis
|
||||
- #674: Codebase Genome: the-beacon — Full Analysis
|
||||
- ... and 9 more
|
||||
|
||||
### No-label issues (21)
|
||||
These need categorization. Recommend adding labels for priority and category.
|
||||
- #662 (unassigned): [ops] Burn lane empty — all open issues triaged (2026-04-14)
|
||||
- #648 (unassigned): [ops] Session harvest report — 2026-04-14
|
||||
- #582 (ezra): [EPIC] Know Thy Father: Multimodal Media Consumption
|
||||
- #570 (ezra): [EZRA] MemPalace v3.0.0 Integration — Install, Mine, and Wire MCP (Priority from
|
||||
- #568 (perplexity): [EVALUATION] MemPalace v3.0.0 Integration — Before/After Metrics + Recommendatio
|
||||
- #567 (ezra): [VISION] Evennia as Agent Mind Palace — Spatial Memory Architecture
|
||||
- #545 (claude): [UNREACHABLE HORIZON] 1M Men in Crisis — 1 MacBook, 3B Model, 0 Cloud, 0 Latency
|
||||
- #536 (Timmy): [BEZ-P1] Create Bezalel Evennia world with themed rooms and characters
|
||||
- #535 (Timmy): [BEZ-P0] Install Tailscale on Bezalel VPS (104.131.15.18) for internal networkin
|
||||
- #534 (Timmy): [BEZ-P0] Fix Evennia settings on 104.131.15.18 — remove bad port tuples, DB is r
|
||||
- ... and 11 more
|
||||
|
||||
## Action Items
|
||||
1. Label all no-label issues (21 issues)
|
||||
2. Assign or close unassigned batch-pipeline issues
|
||||
3. Review stale issues for closure
|
||||
4. Consider milestone organization for batch-pipeline work
|
||||
229
scripts/backlog_triage.py
Normal file
229
scripts/backlog_triage.py
Normal file
@@ -0,0 +1,229 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
backlog_triage.py — Triage timmy-home backlog.
|
||||
|
||||
Fetches all open issues, categorizes them, and produces a triage report.
|
||||
Can also apply labels and comments via --apply flag.
|
||||
|
||||
Usage:
|
||||
python3 scripts/backlog_triage.py # generate report
|
||||
python3 scripts/backlog_triage.py --apply # apply triage labels/comments
|
||||
python3 scripts/backlog_triage.py --json # output as JSON
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import urllib.request
|
||||
from collections import Counter
|
||||
from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
REPO = "Timmy_Foundation/timmy-home"
|
||||
GITEA_URL = "https://forge.alexanderwhitestone.com"
|
||||
|
||||
|
||||
def get_token():
|
||||
token_path = Path.home() / ".config" / "gitea" / "token"
|
||||
return token_path.read_text().strip()
|
||||
|
||||
|
||||
def api_get(path, headers):
|
||||
url = f"{GITEA_URL}/api/v1{path}"
|
||||
req = urllib.request.Request(url, headers=headers)
|
||||
resp = urllib.request.urlopen(req)
|
||||
return json.loads(resp.read())
|
||||
|
||||
|
||||
def api_post(path, data, headers):
|
||||
url = f"{GITEA_URL}/api/v1{path}"
|
||||
body = json.dumps(data).encode()
|
||||
req = urllib.request.Request(url, data=body, headers=headers, method="POST")
|
||||
resp = urllib.request.urlopen(req)
|
||||
return json.loads(resp.read())
|
||||
|
||||
|
||||
def fetch_all_issues(state="open"):
|
||||
token = get_token()
|
||||
headers = {"Authorization": f"token {token}"}
|
||||
|
||||
all_issues = []
|
||||
page = 1
|
||||
while True:
|
||||
data = api_get(f"/repos/{REPO}/issues?state={state}&limit=100&page={page}", headers)
|
||||
if not data:
|
||||
break
|
||||
all_issues.extend(data)
|
||||
if len(data) < 100:
|
||||
break
|
||||
page += 1
|
||||
return all_issues
|
||||
|
||||
|
||||
def categorize(issues):
|
||||
now = datetime.now(timezone.utc)
|
||||
|
||||
categories = {
|
||||
"unassigned": [],
|
||||
"no_label": [],
|
||||
"batch_pipeline": [],
|
||||
"has_assignee": [],
|
||||
"stale_unassigned": [],
|
||||
}
|
||||
|
||||
for issue in issues:
|
||||
# Skip PRs
|
||||
if "pull_request" in issue:
|
||||
continue
|
||||
|
||||
assignee = issue.get("assignee")
|
||||
labels = [l["name"] for l in issue.get("labels", [])]
|
||||
created = datetime.fromisoformat(issue["created_at"].replace("Z", "+00:00"))
|
||||
age_days = (now - created).days
|
||||
|
||||
if not assignee:
|
||||
categories["unassigned"].append(issue)
|
||||
if age_days > 7:
|
||||
categories["stale_unassigned"].append({**issue, "_age_days": age_days})
|
||||
else:
|
||||
categories["has_assignee"].append(issue)
|
||||
|
||||
if not labels:
|
||||
categories["no_label"].append(issue)
|
||||
|
||||
if "batch-pipeline" in labels:
|
||||
categories["batch_pipeline"].append(issue)
|
||||
|
||||
return categories
|
||||
|
||||
|
||||
def generate_report(issues, categories):
|
||||
now = datetime.now(timezone.utc)
|
||||
lines = []
|
||||
|
||||
lines.append("# timmy-home Backlog Triage Report")
|
||||
lines.append(f"\nGenerated: {now.strftime('%Y-%m-%d %H:%M UTC')}")
|
||||
lines.append(f"Total open issues: {len(issues)}")
|
||||
lines.append("")
|
||||
|
||||
# By assignee
|
||||
assignees = Counter()
|
||||
for i in issues:
|
||||
if "pull_request" in i:
|
||||
continue
|
||||
a = i.get("assignee", {})
|
||||
name = a.get("login", "unassigned") if a else "unassigned"
|
||||
assignees[name] += 1
|
||||
lines.append("## By Assignee")
|
||||
for a, c in assignees.most_common():
|
||||
lines.append(f"- {a}: {c}")
|
||||
lines.append("")
|
||||
|
||||
# By label
|
||||
label_counts = Counter()
|
||||
for i in issues:
|
||||
if "pull_request" in i:
|
||||
continue
|
||||
labels = [l["name"] for l in i.get("labels", [])]
|
||||
if not labels:
|
||||
label_counts["no-label"] += 1
|
||||
for l in labels:
|
||||
label_counts[l] += 1
|
||||
lines.append("## By Label")
|
||||
for l, c in label_counts.most_common(20):
|
||||
lines.append(f"- {l}: {c}")
|
||||
lines.append("")
|
||||
|
||||
# Triage recommendations
|
||||
lines.append("## Triage Recommendations")
|
||||
lines.append("")
|
||||
|
||||
if categories["batch_pipeline"]:
|
||||
lines.append(f"### Batch-pipeline issues ({len(categories['batch_pipeline'])})")
|
||||
lines.append("Auto-generated analysis tasks. Assign to burn agent or close if stale.")
|
||||
for i in categories["batch_pipeline"][:10]:
|
||||
lines.append(f"- #{i['number']}: {i['title'][:80]}")
|
||||
lines.append("")
|
||||
|
||||
if categories["no_label"]:
|
||||
lines.append(f"### No-label issues ({len(categories['no_label'])})")
|
||||
lines.append("Need categorization. Add labels for priority and category.")
|
||||
for i in categories["no_label"][:10]:
|
||||
a = i.get("assignee", {})
|
||||
assignee = a.get("login", "unassigned") if a else "unassigned"
|
||||
lines.append(f"- #{i['number']} ({assignee}): {i['title'][:80]}")
|
||||
lines.append("")
|
||||
|
||||
if categories["stale_unassigned"]:
|
||||
lines.append(f"### Stale unassigned (>7 days, {len(categories['stale_unassigned'])})")
|
||||
lines.append("Consider closing or assigning.")
|
||||
for i in sorted(categories["stale_unassigned"], key=lambda x: x.get("_age_days", 0), reverse=True)[:10]:
|
||||
lines.append(f"- #{i['number']} ({i['_age_days']}d): {i['title'][:70]}")
|
||||
lines.append("")
|
||||
|
||||
lines.append("## Action Items")
|
||||
lines.append(f"1. Label {len(categories['no_label'])} no-label issues")
|
||||
lines.append(f"2. Assign or close {len(categories['batch_pipeline'])} batch-pipeline issues")
|
||||
lines.append(f"3. Review {len(categories['stale_unassigned'])} stale issues for closure")
|
||||
lines.append("")
|
||||
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def apply_triage(issues, categories, headers):
|
||||
"""Apply triage comments to batch-pipeline issues."""
|
||||
comment_body = (
|
||||
"Backlog triage (auto): This is a batch-pipeline codebase genome analysis. "
|
||||
"Assign to a burn agent when ready or close if analysis is no longer needed."
|
||||
)
|
||||
|
||||
triaged = 0
|
||||
for issue in categories["batch_pipeline"]:
|
||||
try:
|
||||
api_post(f"/repos/{REPO}/issues/{issue['number']}/comments",
|
||||
{"body": comment_body}, headers)
|
||||
triaged += 1
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
return triaged
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="timmy-home backlog triage")
|
||||
parser.add_argument("--apply", action="store_true", help="Apply triage labels/comments")
|
||||
parser.add_argument("--json", action="store_true", help="Output as JSON")
|
||||
args = parser.parse_args()
|
||||
|
||||
issues = fetch_all_issues()
|
||||
categories = categorize(issues)
|
||||
|
||||
if args.json:
|
||||
print(json.dumps({
|
||||
"total": len(issues),
|
||||
"unassigned": len(categories["unassigned"]),
|
||||
"no_label": len(categories["no_label"]),
|
||||
"batch_pipeline": len(categories["batch_pipeline"]),
|
||||
"stale_unassigned": len(categories["stale_unassigned"]),
|
||||
}, indent=2))
|
||||
else:
|
||||
report = generate_report(issues, categories)
|
||||
print(report)
|
||||
|
||||
# Write to docs/
|
||||
docs_dir = Path(__file__).resolve().parent.parent / "docs"
|
||||
docs_dir.mkdir(exist_ok=True)
|
||||
(docs_dir / "backlog-triage-report.md").write_text(report)
|
||||
print(f"\nReport written to {docs_dir / 'backlog-triage-report.md'}")
|
||||
|
||||
if args.apply:
|
||||
token = get_token()
|
||||
headers = {"Authorization": f"token {token}", "Content-Type": "application/json"}
|
||||
triaged = apply_triage(issues, categories, headers)
|
||||
print(f"\nTriaged {triaged} issues with comments")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user