Compare commits

...

1 Commits

View File

@@ -2126,3 +2126,33 @@ def cross_review_prs():
continue
return {"reviews": len(results), "details": results}
@huey.periodic_task(crontab(hour="*/12"))
def decomposition_tick():
"""Force Multiplier 12: Automated Issue Decomposition (Epic Splitting).
Identifies large issues (EPICs) and flags them for decomposition into sub-tasks.
"""
gitea = get_gitea_client()
repos = ["Timmy_Foundation/timmy-config", "Timmy_Foundation/timmy-home", "Timmy_Foundation/the-nexus"]
for repo in repos:
issues = gitea.get_open_issues(repo)
for issue in issues:
labels = [l['name'] for l in issue.get('labels', [])]
body = issue.get('body', '')
# Identify EPICs or large task lists
is_epic = "EPIC" in labels or "EPIC" in issue['title']
has_large_tasklist = body.count("- [ ]") > 5
if (is_epic or has_large_tasklist) and "needs-decomposition" not in labels:
audit_log("decomposition_flagged", "system", {"repo": repo, "issue": issue['number']}, confidence="High")
gitea.add_label(repo, issue['number'], "needs-decomposition")
# Add comment suggesting decomposition
msg = "### Automated Decomposition Suggestion\n"
msg += "This issue has been flagged as an **EPIC** or contains a large task list. "
msg += "To improve velocity and reduce cycle time, I recommend splitting this into smaller, atomic issues.\n\n"
msg += "I will attempt to generate a decomposition plan in the next cycle."
gitea.create_issue_comment(repo, issue['number'], msg)