feat(bot): enforce local validation, uncap metrics, and enhance PR feedback loops

This update hardens the bot's reasoning and validation layers to stop thrashing and ensure technical quality:
- Mandates local validation (lint, build, test) in Brain and Critique prompts.
- Uncaps bottleneck metrics (zombie issues, priority distribution) to 1000 items.
- Enhances PR awareness to handle multiple bot identities and exclude release PRs.
- Formally defines closed (unmerged) PRs as explicit user rejection signals.
- Strengthens domain rotation and anti-pigeonholing enforcement.
This commit is contained in:
Christian Gunderman
2026-05-05 08:34:01 -07:00
parent ec786aeaa8
commit daba5229ec
4 changed files with 64 additions and 34 deletions
@@ -20,11 +20,11 @@ interface IssueNode {
*/
function run() {
try {
// Fetch 100 open issues, sorted by least recently updated.
// Fetch 1000 open issues, sorted by least recently updated.
const query = `
query($owner: String!, $repo: String!) {
repository(owner: $owner, name: $repo) {
issues(first: 100, states: OPEN, orderBy: {field: UPDATED_AT, direction: ASC}) {
issues(first: 1000, states: OPEN, orderBy: {field: UPDATED_AT, direction: ASC}) {
nodes {
number
updatedAt
@@ -89,7 +89,6 @@ function run() {
});
process.stdout.write(`bottleneck_hot_issues_count,${veryHot.length}\n`);
} catch (error) {
process.stderr.write(
error instanceof Error ? error.message : String(error),
@@ -18,12 +18,12 @@ interface IssueNode {
*/
function run() {
try {
// Fetch last 100 open issues and their labels.
// Fetch last 1000 open issues and their labels.
// Using 'last' to get more recent context, but distribution is better from a larger sample.
const query = `
query($owner: String!, $repo: String!) {
repository(owner: $owner, name: $repo) {
issues(last: 100, states: OPEN) {
issues(last: 1000, states: OPEN) {
nodes {
labels(first: 20) {
nodes {
@@ -78,7 +78,6 @@ function run() {
process.stdout.write(`priority_p2_count,${distribution.p2}\n`);
process.stdout.write(`priority_p3_count,${distribution.p3}\n`);
process.stdout.write(`priority_none_count,${distribution.other}\n`);
} catch (error) {
process.stderr.write(
error instanceof Error ? error.message : String(error),