Skip to content

feat: process-review and coach-process: measure the PR, review and CI process and coach the coordinator with it - #104

Open
lx-0 wants to merge 14 commits into
mainfrom
feat/process-review
Open

lx-0 wants to merge 14 commits into
mainfrom
feat/process-review

Conversation

@lx-0

@lx-0 lx-0 commented Nov 22, 2026

Copy link
Copy Markdown
Member

Two skills that measure how a repository's pull request, review and CI process runs, and feed what they find back to the agent that coordinates the work.

The sessions that hit the problem

Yesterday-AI/context-mcp, 9 September to 22 November 2026, about 2,900 merged pull requests, almost all from coding agents under one coordinator session.

  • The operator kept asking whether the review loops were worth it, whether a new rule helped, why throughput changed. Every answer was an opinion. The analysis that became process-review showed, among others, that 593 of 648 later review rounds found nothing blocking, that 25 % of pull requests merged without any review in one week and 0.6 % the week after, and that a change everyone believed helped (the round rules of 18 November) moved the second-round share the other way (42.9 % before, 47.3 % after).
  • A rule merged into the rule files did not reach the sessions that were already running. The review sample of 20 November (every pull request number ending in 0 reviewed by a bot) fell back in four of its first six cases until the coordinator was told directly; on 22 November the coordinator changed from Claude Code to Codex, and the findings again had to be carried into its session by hand. coach-process is that carrying, with a record, a judgement on the next run and an escalation to the user.

What

  • skills/process-review/ and tools/process-review/: mining (mine.mjs, mine-failures.mjs), analysis (analyze.mjs, rules.mjs), report and digest (report.mjs, daily.mjs), plugin version dates (tool-versions.mjs). Node 18, standard library only, read-only against GitHub, output in a working directory outside the repository. The report puts the conclusions first (at a glance, findings, three suggestion cards open) and folds method notes, long tables and secondary breakdowns into <details>; print expands them.
  • skills/coach-process/: at most five asks per run, each a fact with its denominator, one action an existing rule or the user already asks for, and the metric it should move. The message is written to the working directory and delivered through herdr (any host's agent pane, so a Codex coordinator too) or the host's session messages. asks.json records each ask; analyze.mjs judges it like a change with an expectation and counts repeats; the report lists them under "Coaching asks". An ask that did not take after two tries goes to the user. Each run checks every finding for what ytstack could have prevented and drafts it for ytstack-upstream. Confirmed asks and repeated findings become proposed work in the owning file; the skill edits no rule file.
  • Spec: .ytstack/spec/process-review.md (new, status: planned), skills.md (both skills as native procedures), SPEC.md, dependencies.md; DECISIONS.md 2026-11-18 (Node for this one tool only). README (42 skills), QUICKSTART, CHANGELOG, NOTICE (Lucide icon outlines inlined in the report), docs/codex.md, docs/kimi.md, eval case process-review.

One commit, against CONTRIBUTING's atomic-commit rule: the two skills share analyze.mjs, report.mjs, the config reference and the preamble test, and splitting them would leave a first commit whose report has no reader for asks.json. Say if you want it split.

Verification

  • bash tests/process-review.test.sh: 65 passed, 0 failed (macOS, Node 24.18.0).
  • bash tests/skill-preambles.test.sh: 818 passed, 0 failed, including 9 new cases for coach-process (working directory, run found, asks counted, herdr flag).
  • bin/ytstack-check: OK; its 9 warnings name older skills only.
  • The scripts ran daily on the real repository from 18 to 22 November; analyze.mjs here and the working copy write the same metrics.json.
  • Not run: coach-process as a skill in a session (its steps were done by hand once, on 22 November, against a Codex coordinator over herdr); the eval case process-review; the Linux CI images, which have no Node, so the Node cases skip there.

The full diff was shown to the operator before this pull request (CONTRIBUTING, item 5).

🤖 Generated with Claude Code

…s; coach-process turns its findings into asks for the coordinator

process-review mines merged pull requests, reviews and CI runs per day,
computes throughput, efficiency and quality, turns fixed rules into
suggestions, compares the days before and after every dated process change
and renders one HTML report plus a daily digest (tools/process-review/,
Node 18, no dependencies; the plugin's one Node tool, DECISIONS 2026-11-18).

coach-process delivers at most five asks to the session that coordinates the
work, records each in asks.json with the metric it should move, has the
next analysis judge it, sends an ask ignored twice to the user, and checks
each finding for what ytstack itself could have prevented.

Observed on Yesterday-AI/context-mcp, 9 September to 22 November 2026
(about 2,900 merged pull requests): see the pull request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-25T13:34:08.073642Z
We couldn’t complete this review. Comment @codex review to try again.
52ad2ab Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: daddd1aac4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/process-review/analyze.mjs Resolved
Comment thread tools/process-review/mine-failures.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
… calendar days in the digest

- CI runs count as pull-request runs only on a mined PR's branch or a pull_request event, not on every non-default branch.
- mine-failures records requests that fail after retries in failures.json, exits 3, and the report marks the section incomplete.
- The daily digest uses the last nine calendar days, so a day without merges is zero, not skipped.
- coach-process description names no host (Codex packaging test).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lx-0

lx-0 commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85f3e1f065

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/process-review/mine-failures.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
Comment thread skills/coach-process/SKILL.md Resolved
…d asks, no push runs

- analyze: reviews, comments and threads that arrived after the merge no longer make a pull request reviewed
- analyze: a branch name used by several pull requests splits its CI runs by commit, else by merge time
- analyze, report, coach-process: a dropped ask is recorded in asks.json and marks its key, so it is not escalated or asked again
- mine-failures: no push run and no defaultBranch leaves the default-branch section empty instead of throwing

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@lx-0

lx-0 commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3f11b3bb9e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/process-review/mine-failures.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
Comment thread tools/process-review/rules.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
Comment thread skills/coach-process/SKILL.md Resolved
…s periods, escalations recorded

- mine-failures: the default branch is the base of the merged pull requests before the branch with most push runs
- analyze: times and nth of an ask count every recorded ask, also those before the period
- analyze, report, coach-process: the user's escalation of an ask is recorded and marks its key, like a drop
- analyze: the reviewer comparison takes one outcome per reviewer and head
- rules: fixes-without-tests uses the source-touching fixes as its sample
- rules, references: unresolved threads are counted as of mining; GitHub has no resolution time, the number is a lower bound

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@lx-0

lx-0 commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f200a1f2f7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread skills/process-review/SKILL.md Resolved
Comment thread skills/process-review/SKILL.md Resolved
Comment thread tools/process-review/analyze.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
…ead, period ends on the last mined day

- process-review, coach-process: YTSTACK_NON_INTERACTIVE=ask restores the questions; the preambles emit EXPLAIN_LEVEL, CURRENT_MILESTONE, ACTIVE_SLICE, SENTINELS (and YTSTACK_SCOPE in coach-process)
- analyze: unresolved threads are counted from the threads opened before the merge
- analyze: a blocking review of a head is not cleared by a later clean one on the same head
- analyze: the period ends on the last mined day, also when nothing merged on it

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@lx-0

lx-0 commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 112b68aaa6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/process-review/analyze.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
…, unpriced models, late reactions

- analyze: period.to is the last mined day, so history and charts cover quiet days
- analyze: an expectation is too early when the baseline window is not fully mined or follow-up fixes can still arrive; merged per day divides by the days mined
- analyze, report: models without a configured price are listed and the report says the cost figures are too low
- analyze: a sampled bot's reaction after the merge is no answer

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@lx-0

lx-0 commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3ff0d7d3e6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread skills/process-review/SKILL.md Resolved
Comment thread tools/process-review/rules.mjs Resolved
Comment thread tools/process-review/mine-failures.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
… jobs, quiet days at the start

- process-review, coach-process: every analyze.mjs call passes --since and --until, so earlier days in the working directory stay out
- mine-failures: the jobs of a run are read page by page
- rules: ci-hours-not-green is not evaluated without measured CI time
- analyze: the period, the changes and the asks start on the first mined day

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@lx-0

lx-0 commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c9bd403000

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/process-review/analyze.mjs Resolved
Comment thread tools/process-review/mine-failures.mjs Resolved
Comment thread tools/process-review/rules.mjs Resolved
…ed to the period, follow-up rule on mature pull requests

- analyze: a run that turned green on a re-run is no first pass
- mine-failures: --since and --until bound the runs read, as in analyze.mjs; the skill passes them
- analyze, rules: follow-up-fixes is judged on the pull requests merged at least followUpDays before the period end

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@lx-0

lx-0 commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 775d8fdbeb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/process-review/mine-failures.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
…t ends on the last mined day

- mine-failures: the default branch is inferred from the pull requests of the requested period
- analyze: failures.json entries outside the period are not shown
- analyze, report: meta.json's count of unmerged closures is shown only when its range is the analysed period
- analyze: the daily digest ends on the last mined day

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@lx-0

lx-0 commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3c7cef019b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/process-review/mine.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
Comment thread tools/process-review/rules.mjs Resolved
Comment thread tools/process-review/mine-failures.mjs Resolved
…measured CI time is not zero

- mine: a day's file is final only when written after the day ended, a CI day only when every stored run finished
- analyze: CI hours per pull request use measured runs only and are unavailable without one
- analyze, rules: the cancelled-runs rule takes the finished runs as its sample
- mine-failures: the --days window ends on --until when given

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@lx-0

lx-0 commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 51824395bd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/process-review/analyze.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
Comment thread tools/process-review/rules.mjs Resolved
Comment thread tools/process-review/mine.mjs Resolved
…r period, CI days refreshed after re-runs

- analyze, report, coach-process: askDecisions lists every decided key with its latest ask, whatever the period
- mine-failures, analyze: a flaky job keeps its single sightings, and its count is taken inside the analysed period
- analyze, rules: ci-hours-not-green takes the runs with a measured duration as its sample
- mine: a CI day is final a week after it ended; --refresh fetches CI days again

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@lx-0

lx-0 commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8cff8b61a7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/process-review/rules.mjs Resolved
Comment thread tools/process-review/rules.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
…gs carry their run

- rules: flaky-reruns counts finished runs; slow-first-review counts the pull requests with a first review time
- mine-failures, analyze: each flaky sighting keeps its run, so count, last sighting and example come from the analysed period

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@lx-0

lx-0 commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fdab90df30

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/process-review/analyze.mjs Resolved
Comment thread tools/process-review/analyze.mjs Resolved
…lure details only when mined for the period

- analyze, report: hours and hoursNotGreen are null when no finished run has a duration
- analyze, report: failures.json is used only when its window reaches the end of the analysed period; else the report says the failure details were not read

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@lx-0

lx-0 commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…s sample

The eleven review rounds on this pull request kept finding the same two defects in new places.
Both now have one home.

- period.mjs defines the analysed period (the days mined inside --since and --until, quiet days included);
  analyze.mjs and mine-failures.mjs read period, bounds and day files from it and nowhere else
- a rule returns its measure, the comparison and the number of observations the measure was computed from;
  evaluate() compares, and a measure that is not a finite number is not evaluated, never passed
- one helper sums measured values and is null when nothing was measured (CI hours)
- tests: a working directory with quiet days at both ends, the days of an earlier run and unfinished runs

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@lx-0

lx-0 commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

@greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant