Skip to content

Share agent workflows via installed skills + repo seam#4121

Merged
justin808 merged 23 commits into
mainfrom
jg-conductor/transfer-pr-batch-skills
Jun 22, 2026
Merged

Share agent workflows via installed skills + repo seam#4121
justin808 merged 23 commits into
mainfrom
jg-conductor/transfer-pr-batch-skills

Conversation

@justin808

@justin808 justin808 commented Jun 19, 2026

Copy link
Copy Markdown
Member

What and why

The pr-batch family and related agent workflows are mature, but the reusable parts were tangled with React on Rails-specific commands, labels, paths, and release policy. This PR makes the user/agent-installed shared skill model the default and uses a repo-local AGENTS.md seam to supply concrete repo values.

This avoids making every repo vendor a .agents/ subtree just to use the workflows. The seam is the important contract; repo-pinned copies can remain an optional fallback for environments that cannot load installed skills.

Shared source repo: shakacode/agent-workflows, published at initial commit 50a6cfe and currently updated to 304e4d3.
Design doc: internal/contributor-info/portable-agent-workflows-seam-design.md.

What this PR does

  • Seam: adds ## Agent Workflow Configuration to AGENTS.md, the single named place shared skills resolve repo-specific values: base branch, validation, CI detector, hosted-CI trigger/labels, benchmark labels, follow-up prefix, changelog policy, lint/format, build/type/test, merge ledger, review gate, approval-exempt categories, and coordination backend.
  • Published shared source: creates and references shakacode/agent-workflows, including skills/, workflows/, installer/validation helpers, adoption docs, seam design, and a fixture-backed bin/validate gate.
  • User-installed skill model: rewrites the adoption guide around installing shared skills in the user/agent environment and validating each repo's seam, with repo-pinned copies explicitly optional.
  • Seam checker: adds .agents/bin/agent-workflow-seam-doctor plus tests. It verifies required seam keys and catches unresolved seam placeholders embedded in executable snippets.
  • Repo-agnostic cleanup: keeps shared workflow text pointing at the seam and replaces risky literal placeholders in command snippets with explicit variables that fail loudly if the seam value was not resolved.
  • No subtree helper: removes the subtree sync helper and replaces the subtree-first design doc with the seam-first design.

Not in this PR

  • Deleting React on Rails' repo-local compatibility copies. They stay available for agent surfaces that cannot load installed skills yet.
  • Consumer-repo onboarding (control-plane-flow, shakapacker, shakaperf, etc.).
  • A full portability sweep of every historical origin/main example in shared workflow prose. The seam checker covers the contract and the highest-risk unresolved seam placeholders; broader base-ref cleanup can be a follow-up.

Validation

Shared repo:

  • bin/validate in /Users/justin/codex/agent-workflows (latest run after review fixes)
  • bin/install-agent-workflows --target <tmp>/copy
  • bin/install-agent-workflows --target <tmp>/symlink --mode symlink
  • Published repo verified: https://github.com/shakacode/agent-workflows, public, default branch main, head 304e4d3

React on Rails PR:

  • ruby .agents/bin/agent-workflow-seam-doctor-test.rb (28 runs, 75 assertions)
  • .agents/bin/agent-workflow-seam-doctor
  • .agents/bin/agent-workflow-seam-doctor --shared /Users/justin/codex/agent-workflows
  • ruby .agents/skills/pr-batch/bin/agent-coord-bounded-test.rb
  • lychee --config .lychee.toml AGENTS.md internal/contributor-info/agent-workflow-adoption.md internal/contributor-info/portable-agent-workflows-seam-design.md
  • bin/ci-local --changed
  • git diff --check
  • pre-commit hook: changed-file Markdown links, trailing newlines, Prettier
  • pre-push hook: branch Ruby lint and online Markdown links

Full bin/check-links was attempted after cache refresh but the whole-repo lychee crawl stayed silent for roughly four minutes, so I stopped it and ran the focused changed-file lychee command above successfully.

No user-visible runtime change; no CHANGELOG.md entry.


Note

Low Risk
Documentation and agent-tooling only; no runtime product code. Risk is mainly agents following wrong commands if the seam is misconfigured—mitigated by the new seam-doctor gate.

Overview
Introduces a repo seam model so agent skills can ship from a shared install (shakacode/agent-workflows) while each repo supplies concrete commands, labels, and paths through AGENTS.md → Agent Workflow Configuration.

Adds .agents/bin/agent-workflow-seam-doctor (plus Minitest coverage) to require that seam section and its keys, and to fail on unresolved <…> placeholders inside executable markdown (skills/workflows, including optional --shared roots).

Refactors .agents/skills/* and .agents/workflows/* to drop React-on-Rails–specific literals (bin/ci-local, CHANGELOG.md, ready-for-hosted-ci, hardcoded helper paths) in favor of seam lookups, _*_SKILL_DIR overrides for bin helpers, and shell vars such as FOLLOW_UP_PREFIX that error if unset. Verification, CI, changelog, review, and batch flows now describe behavior generically while still defaulting to repo-local paths in this checkout.

Reviewed by Cursor Bugbot for commit 68db6f1. Bugbot is set up for automated code reviews on this repo. Configure here.

Merge Criteria

Current head: 68db6f134ec5528d1fc543190797219095144fa7.

  • Required gate: wait for current-head required-pr-gate to pass before merge.
  • Review threads: current-head seam-doctor/shared-root/update-changelog review feedback was addressed through 68db6f134ec5528d1fc543190797219095144fa7; merge requires zero unresolved current threads.
  • Security preflight: maintainer waiver applies to this PR at current head 68db6f134ec5528d1fc543190797219095144fa7. The hosted-CI bot status comment is treated as expected repository automation, not untrusted issue content to execute.
  • Product/process decision: duplicate repo-local and personal skill entries in current skill pickers are a transition-state follow-up, not a blocker for this seam-first model.
  • Scope: agent workflow documentation and validation tooling only; no user-facing runtime change and no changelog entry required.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Replaces a git-subtree sync script approach with a seam-based portability model for shared agent workflows. A new Ruby agent-workflow-seam-doctor script validates that AGENTS.md contains all required repo-specific configuration keys and that no unresolved template placeholders remain in executable code contexts. All skill and workflow documents are updated to reference seam-resolved values instead of hardcoded repo-specific commands, labels, prefixes, and framework-specific terms.

Changes

Portable Agent Workflows via Seam Model

Layer / File(s) Summary
Seam design and adoption documentation
internal/contributor-info/portable-agent-workflows-seam-design.md, internal/contributor-info/agent-workflow-adoption.md
Adds the seam design specification document and rewrites the adoption guide around the AGENTS.md seam contract (named configuration keys), seam-doctor validation, shared vs. repo-local skill boundaries, optional repo-pinned copies with rules, and cross-repo coordination fallback.
AGENTS.md canonical seam configuration
AGENTS.md
Expands the reusable-workflows section with seam model explanation, adds the full ## Agent Workflow Configuration seam section with all repo-specific values (base branch, validation commands, CI detector/trigger, hosted-CI labels/helper, benchmark label, follow-up prefix, changelog path/policy/classification taxonomy, merge-ledger strictness, review gate, approval-exempt categories, coordination backend), adds a Pro RSpec encoding troubleshooting note.
Seam doctor validation script and tests
.agents/bin/agent-workflow-seam-doctor, .agents/bin/agent-workflow-seam-doctor-test.rb
New Ruby AgentWorkflowSeamDoctor module that validates required seam keys in AGENTS.md, detects unresolved <...> placeholders in executable fenced code blocks (bash, ruby, sh) and command-like inline snippets across skill and workflow markdown, emits text/JSON output with exit codes; includes Minitest suite covering successful validation, missing sections, missing keys, unresolved values, and correct handling of non-executable placeholders.
Skills parameterization for seam values
.agents/skills/address-review/SKILL.md, .agents/skills/adversarial-pr-review/SKILL.md, .agents/skills/autoreview/SKILL.md, .agents/skills/evaluate-issue/SKILL.md, .agents/skills/plan-pr-batch/SKILL.md, .agents/skills/post-merge-audit/SKILL.md, .agents/skills/pr-batch/SKILL.md, .agents/skills/run-ci/SKILL.md, .agents/skills/triage/SKILL.md, .agents/skills/update-changelog/SKILL.md, .agents/skills/verify-pr-fix/SKILL.md, .agents/skills/verify/SKILL.md
Replaces hardcoded repo-specific paths (follow-up prefix, skill-dir helper locations, coordination backend, CI trigger commands/labels, format/autofix commands, changelog versioning/taxonomy, reproduction/e2e commands, mandatory lint gates, validation command examples) with AGENTS.md seam-resolved references throughout all 12 skill documents. Also updates framework-specific terminology (Pro, SSR, RSC, hydration) to framework-neutral language (package/core boundaries, performance-sensitive paths, framework-sensitive runtimes).
Workflows parameterization for seam-based coordination and CI
.agents/workflows/address-review.md, .agents/workflows/adversarial-pr-review.md, .agents/workflows/continuous-evaluation-loop.md, .agents/workflows/post-merge-audit.md, .agents/workflows/pr-processing.md
Replaces hardcoded follow-up issue prefix, script/pr-merge-ledger invocations (with new --repo, --changelog-classification, --finding-dispositions, --strict flags), shakacode/agent-coordination backend references with repo-configured backends, +ci-* PR comment/label patterns (with hosted-CI trigger subcommands from AGENTS.md), example fingerprint values, and Pro-scoped language (Pro package edits, SSR, RSC) throughout all workflow documents. Updates per-PR merge-ledger completeness rules, hosted-CI uncertainty handling, local validation checklist, Dependabot compatibility checks, and release-sensitive review criteria.

Sequence Diagram

sequenceDiagram
  participant Adopter as Repo Adopter
  participant Shared as Shared Skills (installed)
  participant Seam as AGENTS.md Seam
  participant Doctor as agent-workflow-seam-doctor
  participant Workflow as Workflow Execution
  Adopter->>Adopter: Install shared skills
  Adopter->>Seam: Define Agent Workflow Configuration
  Adopter->>Doctor: Run seam doctor validation
  Doctor->>Seam: Extract & parse config
  Doctor->>Doctor: Validate required keys
  Doctor->>Doctor: Scan for unresolved placeholders
  Doctor-->>Adopter: PASS / FAIL + issues
  Adopter->>Workflow: Trigger workflow (e.g., pr-batch)
  Workflow->>Shared: Load installed skill module
  Shared->>Seam: Resolve config values
  Seam-->>Shared: Return repo-specific commands/labels
  Shared->>Workflow: Execute with seam-resolved values
  Workflow-->>Adopter: Result
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related issues

  • Follow-up: tighten PR batch skill docs and simplify-gate source of truth #4153: The seam-based refactoring of PR batch orchestration and merge-ledger integration directly addresses the centralization and deduplication concerns in this issue by making skill-dir paths, coordination backend references, and repo configuration values configurable via AGENTS.md rather than hardcoded across multiple files.

Possibly related PRs

  • shakacode/react_on_rails#3691: Both PRs modify the address-review workflow's deferred-work follow-up issue handling—this PR parameterizes the follow-up prefix via the seam while #3691 introduced the deferred tracking flow itself.
  • shakacode/react_on_rails#3729: Both PRs update the Codex PR batch skill kit (.agents/skills/pr-batch/SKILL.md, adversarial-pr-review/SKILL.md, post-merge-audit/SKILL.md), with this PR adding seam parameterization and hosted-CI trigger subcommand wiring on top of the batch orchestration introduced in #3729.
  • shakacode/react_on_rails#3996: Both PRs update PR batch merge-readiness and completeness gating in .agents/workflows/pr-processing.md—this PR refactors the merge-ledger invocation to use the new strict-mode flags while #3996 introduced the merge-ledger per-PR strictness contract.

Suggested labels

documentation, enhancement, codex

Suggested reviewers

  • alexeyr-ci2
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Share agent workflows via installed skills + repo seam' clearly and directly summarizes the main change: introducing a seam-based model for sharing agent workflows through installed skills instead of vendored subtrees.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg-conductor/transfer-pr-batch-skills

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.

Reviewed by Cursor Bugbot for commit dcf3135. Configure here.

Comment thread .agents/bin/agent-workflows-sync Outdated

@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: dcf3135615

ℹ️ 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 .agents/bin/agent-workflows-sync Outdated
Comment thread .agents/bin/agent-workflows-sync Outdated
@greptile-apps

greptile-apps Bot commented Jun 19, 2026

Copy link
Copy Markdown

Greptile Summary

This PR makes the 19 shared .agents/ skills and workflows repo-agnostic (Phase 1 of a git-subtree sharing plan), isolating all React on Rails-specific values into a new ## Agent Workflow Configuration seam in AGENTS.md and adding a sync helper for future upstream pulls.

  • Seam addition: AGENTS.md gains 13 concrete entries covering base branch, validation command, CI detector, hosted-CI trigger, benchmark labels, follow-up prefix, changelog, lint/format, tests, build/type, merge ledger, review gate, and coordination backend. The changelog taxonomy and Pro RSpec note are relocated from shared skill files into this section.
  • Skill/workflow genericization: All 13 shared skills and 5 workflows replace concrete commands with prose seam references; all workflow gates, ordering constraints, and safety rules are preserved verbatim.
  • Sync helper + adoption guide: .agents/bin/agent-workflows-sync wraps git subtree add/pull --squash; agent-workflow-adoption.md is rewritten around the vendor-and-pull model with a seam template.

Confidence Score: 4/5

Safe to merge with one targeted fix in address-review/SKILL.md.

The genericization is thorough and consistent across 18 files — every seam reference uses a prose indirection pattern except for one: the gh issue create --title argument in address-review/SKILL.md retains a raw <follow-up prefix> angle-bracket token inside an executable shell command, which could produce malformed issue titles if an agent executes it literally.

.agents/skills/address-review/SKILL.md — the angle-bracket placeholder in the gh issue create command is inconsistent with the prose-based seam pattern used everywhere else in the diff.

Important Files Changed

Filename Overview
.agents/bin/agent-workflows-sync New bash script that vendors or updates the .agents/ subtree; uses `
AGENTS.md Adds the ## Agent Workflow Configuration seam section with 13 repo-specific values; relocates changelog taxonomy and Pro RSpec encoding note from shared skill files.
.agents/skills/address-review/SKILL.md Genericizes the follow-up issue title to use the seam, but introduces an angle-bracket placeholder inside an executable shell --title argument — inconsistent with all other seam patterns.
.agents/workflows/pr-processing.md Extensive genericization replacing concrete commands and labels with seam references; all workflow gates, ordering, and safety rules preserved.
.agents/skills/update-changelog/SKILL.md Moves changelog taxonomy and format details to the seam; replaces rake commands and the explicit category list with seam references; structural rules preserved.
internal/contributor-info/agent-workflow-adoption.md Rewrites the adoption guide around the vendor-and-pull model with a seam template, shared-vs-local skill split, and keep-updated flow.

Reviews (1): Last reviewed commit: "docs: rewrite agent-workflow adoption gu..." | Re-trigger Greptile

Comment thread .agents/skills/address-review/SKILL.md
Comment thread .agents/bin/agent-workflows-sync Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (3)
docs/superpowers/specs/2026-06-18-portable-agent-workflows-subtree-design.md (1)

112-112: 💤 Low value

Capitalize "Markdown" as a proper noun.

Lines 112 and 156 refer to "markdown format" and "markdown links"; the formatting language is "Markdown" (proper noun).

🔤 Proposed capitalization fixes
- validation gate (markdown format + link check + skill `bin/` test...
+ validation gate (Markdown format + link check + skill `bin/` test...

- Dry-run gate (above). - `bin/check-links` (lychee) for markdown links.
+ Dry-run gate (above). - `bin/check-links` (lychee) for Markdown links.

Also applies to: 156-156

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/superpowers/specs/2026-06-18-portable-agent-workflows-subtree-design.md`
at line 112, Capitalize "markdown" to "Markdown" in two locations within the
document since Markdown is the proper noun name of the formatting language. On
line 112, change "markdown format" to "Markdown format". On line 156, change
"markdown links" to "Markdown links". Both instances need the first letter of
the word capitalized to correctly reference the proper noun.
internal/contributor-info/agent-workflow-adoption.md (2)

117-117: 💤 Low value

Capitalize "Markdown" as a proper noun.

Line 117 refers to "markdown format + link check"; the formatting language is "Markdown" (proper noun).

🔤 Proposed capitalization fix
- 3. **Run the validation gate** after each sync (markdown format + link check + skill `bin/`
+ 3. **Run the validation gate** after each sync (Markdown format + link check + skill `bin/`
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/contributor-info/agent-workflow-adoption.md` at line 117, In the
validation gate section on line 117, locate the phrase "markdown format + link
check" and capitalize the "m" in "markdown" to "Markdown" since it is a proper
noun referring to the Markdown formatting language. Update the text from
"markdown format" to "Markdown format" to follow proper noun capitalization
conventions.

16-16: ⚡ Quick win

Add language identifier to the bash code block.

Line 16's fenced code block contains git subtree and ln commands but lacks a language identifier. Adding bash enables syntax highlighting and satisfies markdownlint MD040.

🔤 Proposed fix
- 3. **Expose skills to Claude Code** (if the repo uses it):
+ 3. **Expose skills to Claude Code** (if the repo uses it):
- ```bash

Also applies to: 40-40

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/contributor-info/agent-workflow-adoption.md` at line 16, The fenced
code blocks in the file are missing language identifiers which prevents syntax
highlighting and violates markdownlint MD040. Add the bash language identifier
to the opening fence of the code blocks containing git subtree and ln commands.
Specifically, change the opening triple backticks to include bash as the
language specifier (by adding bash immediately after the opening backticks on
the same line). Apply this fix to both instances mentioned, including the one
around line 16 and the one around line 40.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agents/skills/update-changelog/SKILL.md:
- Line 169: The markdown at line 169 contains a code span with a trailing space
that violates markdownlint rule MD038. Rephrase the sentence to convey that
users should start with a dash followed by a space, but structure it so the
trailing space is not included within the backticks of the code span. Consider
restructuring the text to clearly describe the dash-space pattern without
embedding the space character itself inside the code formatting.
- Around line 334-339: The grep command in step 4 uses a literal placeholder
`grep "PR XXX"` which cannot be executed as written. Replace the `PR XXX`
placeholder with a variable reference or concrete example showing users should
substitute the actual PR number (for example, use `grep "PR ${{
github.event.pull_request.number }}"` or similar notation to indicate where the
real PR number should be inserted). This will make the instruction copy-pastable
and clearly indicate that users need to substitute the actual PR number into the
command.

In @.agents/workflows/pr-processing.md:
- Around line 994-995: Step 9 in the pr-processing.md workflow currently allows
deferring changelog updates by documenting a reminder to run `/update-changelog`
before release, but this contradicts the merge-blocking treatment of missing
changelog entries elsewhere in the workflow. Modify step 9 to enforce that
user-visible changes must have their changelog entries updated immediately
before merge, or alternatively require an explicit maintainer waiver that must
be documented and approved. Remove the option to proceed with only a deferred
changelog reminder.

---

Nitpick comments:
In
`@docs/superpowers/specs/2026-06-18-portable-agent-workflows-subtree-design.md`:
- Line 112: Capitalize "markdown" to "Markdown" in two locations within the
document since Markdown is the proper noun name of the formatting language. On
line 112, change "markdown format" to "Markdown format". On line 156, change
"markdown links" to "Markdown links". Both instances need the first letter of
the word capitalized to correctly reference the proper noun.

In `@internal/contributor-info/agent-workflow-adoption.md`:
- Line 117: In the validation gate section on line 117, locate the phrase
"markdown format + link check" and capitalize the "m" in "markdown" to
"Markdown" since it is a proper noun referring to the Markdown formatting
language. Update the text from "markdown format" to "Markdown format" to follow
proper noun capitalization conventions.
- Line 16: The fenced code blocks in the file are missing language identifiers
which prevents syntax highlighting and violates markdownlint MD040. Add the bash
language identifier to the opening fence of the code blocks containing git
subtree and ln commands. Specifically, change the opening triple backticks to
include bash as the language specifier (by adding bash immediately after the
opening backticks on the same line). Apply this fix to both instances mentioned,
including the one around line 16 and the one around line 40.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3f9741e9-584e-4158-a0a8-d1f317f4af85

📥 Commits

Reviewing files that changed from the base of the PR and between 9418fff and dcf3135.

📒 Files selected for processing (20)
  • .agents/bin/agent-workflows-sync
  • .agents/skills/address-review/SKILL.md
  • .agents/skills/adversarial-pr-review/SKILL.md
  • .agents/skills/autoreview/SKILL.md
  • .agents/skills/evaluate-issue/SKILL.md
  • .agents/skills/plan-pr-batch/SKILL.md
  • .agents/skills/post-merge-audit/SKILL.md
  • .agents/skills/pr-batch/SKILL.md
  • .agents/skills/run-ci/SKILL.md
  • .agents/skills/triage/SKILL.md
  • .agents/skills/update-changelog/SKILL.md
  • .agents/skills/verify-pr-fix/SKILL.md
  • .agents/skills/verify/SKILL.md
  • .agents/workflows/address-review.md
  • .agents/workflows/continuous-evaluation-loop.md
  • .agents/workflows/post-merge-audit.md
  • .agents/workflows/pr-processing.md
  • AGENTS.md
  • docs/superpowers/specs/2026-06-18-portable-agent-workflows-subtree-design.md
  • internal/contributor-info/agent-workflow-adoption.md

Comment thread .agents/skills/update-changelog/SKILL.md Outdated
Comment thread .agents/skills/update-changelog/SKILL.md Outdated
Comment thread .agents/workflows/pr-processing.md
@claude

claude Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Clean, well-scoped Phase 1. The design is sound — seam model, three-transform taxonomy, and phased gating are all the right choices. The fidelity preservation argument in the design spec is unusually thorough. Findings below by priority.

Medium — executable placeholder in address-review SKILL.md

address-review/SKILL.md now has a code block an agent may copy and run that contains the literal string <follow-up prefix> as the issue title arg. A comment above it says to substitute, but if an agent copies the block verbatim, the gh CLI call either errors or creates an issue with the angle-bracket token as its title. Given this is a heavily-used skill, that is a real failure mode. See inline comment.

Medium — sync script misfires during Phase 1

The sync script detects add-vs-pull by checking whether commits exist for .agents/ — but in Phase 1 .agents/ was added as normal commits, not a git subtree squash. Running the script now would hit the pull branch and fail because git subtree cannot find the squash-merge ancestor. A note in the script (or checking the squash-commit message for git-subtree-dir instead) would prevent confusing failures. See inline comment.

Minor — || true on UPSTREAM commit silences real failures

The || true on line 67 of the sync script is fine for the nothing-to-commit case but also swallows permission errors, hook rejections, and locked-index failures. Prefer git diff --cached --quiet || git commit ... to skip silently only when nothing is staged.

Minor — adoption guide references not-yet-existing upstream

The guide's step 2 shows git subtree add --prefix=.agents https://github.com/shakacode/agent-workflows.git, which 404s until Phase 2 creates the repo. A one-line caveat at the top of that step would prevent wasted debugging.

Positive notes: seam as single resolution point is much cleaner than scattered hardcoding; taxonomy and Pro RSpec note moving to AGENTS.md is correct; the post-merge-audit fingerprint template replacing a hardcoded example is a nice detail.

Generated with Claude Code

Comment thread .agents/bin/agent-workflows-sync Outdated
Comment thread .agents/bin/agent-workflows-sync Outdated
Comment thread .agents/skills/address-review/SKILL.md Outdated
Comment thread internal/contributor-info/agent-workflow-adoption.md Outdated
@justin808

Copy link
Copy Markdown
Member Author

Codex batch handoff for batch-2026-06-18-a-review-blocked on #4121.

Status: deferred / not pushed.

Current remote PR head: dcf3135615754950ef29232627483469909b7254
Local worker branch: jg-codex/pr-4121-review-fixes
Local worker commit: 7db0ed201bc784ca51c0680dc6240dde459ceb7c (Guard agent workflow sync migration path)
Local worktree: /Users/justin/.codex/worktrees/3ad6/batch-2026-06-18-a-review-blocked/pr-4121

What was handled locally:

  • Addressed the direct sync-script migration-path blocker in a local commit.
  • Kept the PR branch unchanged because validation/review found the remaining issue broadens beyond this narrow lane.

Validation evidence from the worker:

  • Shell syntax / shellcheck / sync-script tests and helper tests passed.
  • pnpm install, formatting, and lint checks passed for the touched scope.
  • RuboCop had an unrelated pre-existing spike outside the local change.
  • A bundle exec ruby path hit a Ruby 4/minitest compatibility issue; plain ruby execution passed for the relevant helper path.

Remaining blocker:

  • Broader shared portability sweep is still needed: shared origin/main assumptions remain in .agents/skills/verify/SKILL.md, with the same pattern in autoreview and update-changelog. Folding that into Share agent workflows via installed skills + repo seam #4121 would expand the PR from the sync-script migration-path fix into a wider shared-skill portability pass.

Next action:

justin808 and others added 5 commits June 20, 2026 16:13
Design for making the .agents/ skills and workflows repo-agnostic so they
can be shared across ShakaCode flagship repos via git subtree and kept
updated conflict-free, with all per-repo differences isolated to a named
AGENTS.md "Agent Workflow Configuration" section (seam).

Covers: architecture, the seam (Model A), the three-transform separation
rule, shared-vs-repo-local skill classification, sync mechanics, fidelity
preservation with a dry-run gate, and the three-phase rollout.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Consolidate the repo-specific tokens the portable .agents/ skills and workflows
resolve against — base branch, pre-push local validation, CI change detector,
hosted-CI trigger/labels, benchmark labels, follow-up prefix, changelog,
lint/format, approval-exempt categories, and coordination backend — into one
named section. This is the per-repo seam: making the shared workflow files
repo-agnostic lets them point here instead of hardcoding react_on_rails commands,
so the same files can be shared across repos via git subtree.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Extend the Agent Workflow Configuration seam with the remaining tokens the
genericized .agents/ files resolve against: merge ledger, docs checks, tests,
build/type checks, review gate, local-validation --fast and broad-suite modes,
and changelog version-stamping.

Relocate two pieces of react_on_rails-specific knowledge out of the shared
skills into AGENTS.md so the shared files stay repo-agnostic: the changelog
classification taxonomy (under Changelog) and the Pro RSpec UTF-8 encoding
workaround (under Testing).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rewrite the shared agent skills and workflows so they carry only portable
workflow logic and resolve every repo-specific command, branch, label, path,
and policy through AGENTS.md -> Agent Workflow Configuration. This lets the same
.agents/ tree be shared byte-identical across repos via git subtree.

All workflow structure, ordering, gates, and safety rules are preserved
verbatim; only concrete react_on_rails tokens/subsystems became seam references
(bin/ci-local, script/ci-changes-detector, +ci-* commands, hosted-CI/benchmark
labels, Follow-up: prefix, CHANGELOG path, script/pr-merge-ledger, and
Pro/RSC/Shakapacker domain examples). The agent-coord coordination backend is
kept by name since the seam documents it. stress-test stays react_on_rails-
specific and is excluded from the shared set.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lper

Rewrite internal/contributor-info/agent-workflow-adoption.md around the shared-
upstream + git-subtree + AGENTS.md-seam model, replacing the copy-then-customize-
in-place model that conflicts on every update. Adds the Agent Workflow
Configuration seam template adopters fill in, the shared-vs-repo-local skill
split, and the keep-updated flow.

Add .agents/bin/agent-workflows-sync: vendors the shared .agents/ tree on first
run and pulls updates afterward via git subtree --squash, recording the synced
upstream SHA in .agents/UPSTREAM. Activates once the Phase 2 upstream
(shakacode/agent-workflows) exists.

Point AGENTS.md at the rewritten guide.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@justin808 justin808 force-pushed the jg-conductor/transfer-pr-batch-skills branch from dcf3135 to 00c3430 Compare June 21, 2026 02:17

@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: 00c34301e9

ℹ️ 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 AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread .agents/skills/update-changelog/SKILL.md
@claude

claude Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Code Review - PR 4121: Share agent workflows across repos via subtree (Phase 1)

Overview

Well-structured Phase 1 that correctly identifies the problem (skills entangled with repo-specific tokens) and provides a clean solution. The seam pattern -- all repo-specific values isolated to a named AGENTS.md section, shared files staying byte-identical -- is the right design for conflict-free subtree pulls.

Validated findings:

  • 1 design concern in a skill file (could create GitHub issues with wrong titles)
  • 3 issues in the new sync shell script (robustness)
  • No runtime or product-code changes; risk is limited to agent tooling

1. address-review/SKILL.md -- literal placeholder in shell command (design concern)

The old code used Follow-up: directly in the gh issue create call. The new code replaces it with a literal placeholder inside the bash command:

# Replace <follow-up prefix> with the repo's follow-up issue prefix (see AGENTS.md)
FOLLOW_UP_URL=$(gh issue create ... --title "<follow-up prefix> Review feedback from PR #N" ...)

The comment is advisory for an LLM agent reading the skill, but the literal <follow-up prefix> ends up in the shell command string. An agent that copies the block verbatim -- or misses the substitution instruction -- will create GitHub issues titled <follow-up prefix> Review feedback from PR #123. The pre-change code worked correctly in this repo without any agent substitution step; the post-change code introduces a new required step that did not exist before.

Suggested approaches (in order of preference):

  1. Keep the concrete value (Follow-up:) in the bash block for this repo. SKILL.md files are replaced wholesale by git subtree pull, so per-repo concrete values there are fine -- that is the point of the subtree model: the shared upstream holds a generic template; vendored copies have concrete values.
  2. Or: use a shell variable agents pre-set from AGENTS.md -- e.g. FOLLOW_UP_PREFIX="Follow-up:" at the top of the block -- so the bash is still valid without agent substitution.
  3. At minimum: move the substitution instruction from an in-code comment (invisible to an LLM parsing the bash block token-by-token) to a prose block above the fenced code, so agents process it before they reach the shell command.

2. agent-workflows-sync -- redundant middle condition in subtree-exists check

if [ -d "$PREFIX" ] && git log -1 --format= -- "$PREFIX" >/dev/null 2>&1 \
   && [ -n "$(git log --oneline -- "$PREFIX" | head -1)" ]; then

The middle condition is always true: git log exits 0 whether or not commits touch $PREFIX; output is suppressed so the exit code is the only signal, and it is always 0. The actual gate is the third condition. Simplify:

if [ -d "$PREFIX" ] && [ -n "$(git log --oneline -1 -- "$PREFIX")" ]; then

This also removes the | head -1 pipe by using -1 directly on git log.


3. agent-workflows-sync -- || true swallows all commit errors

git commit -q -m "agent-workflows: record synced upstream SHA" || true

The || true handles the "nothing to commit" case when re-syncing to the same SHA, but it also silently eats real failures: pre-commit hook rejections, index lock errors, permission issues. A safer pattern:

git diff --cached --quiet || git commit -q -m "agent-workflows: record synced upstream SHA"

Only runs git commit when staged changes exist, so there is no false "nothing to commit" failure -- and real commit errors propagate under set -e.


4. agent-workflows-sync -- no guard for --ref / --remote without a value

Under set -euo pipefail, running .agents/bin/agent-workflows-sync --ref (with no following value) fails with a cryptic unbound-variable error when the case block reads $2. Add a guard before each shift 2:

--ref)
  [ $# -ge 2 ] || { echo "--ref requires a value" >&2; exit 2; }
  REF="$2"; shift 2 ;;

Minor / Non-blocking

  • Double-commit per sync: every run creates two commits -- the squash merge and a second commit for UPSTREAM. Documenting this two-commit pattern in the script header would help maintainers know what to expect in git log.
  • run-ci/SKILL.md option list: the --all or equivalent parentheticals are less scannable than the concrete flag names they replaced. Since AGENTS.md now lists the concrete flags explicitly, pointing to the seam directly would give agents one lookup instead of parsing a parenthetical.

Summary

The seam design and genericization of 17 skill/workflow files are sound and well-executed. The main ask before merge is resolving the <follow-up prefix> placeholder in the address-review bash command -- the cleanest fix is keeping a concrete value in the bash block (consistent with the subtree model: vendored copies have concrete values; the upstream template has placeholders). The shell script issues are robustness improvements; they are not blockers if the sync script is treated as low-frequency, human-supervised tooling.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@docs/superpowers/specs/2026-06-18-portable-agent-workflows-subtree-design.md`:
- Around line 1-10: The documentation file is currently located in a
non-standard directory structure that violates OSS documentation guidelines.
Move the file to the correct location under the OSS documentation directory
following the established structure, ensuring it is placed in an appropriate
subdirectory (such as specs/ if it exists, or another relevant category) under
the OSS docs hierarchy rather than in the superpowers directory at the root
level.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d7e580f8-b6d5-4881-88f2-e74c275ce952

📥 Commits

Reviewing files that changed from the base of the PR and between dcf3135 and 00c3430.

📒 Files selected for processing (20)
  • .agents/bin/agent-workflows-sync
  • .agents/skills/address-review/SKILL.md
  • .agents/skills/adversarial-pr-review/SKILL.md
  • .agents/skills/autoreview/SKILL.md
  • .agents/skills/evaluate-issue/SKILL.md
  • .agents/skills/plan-pr-batch/SKILL.md
  • .agents/skills/post-merge-audit/SKILL.md
  • .agents/skills/pr-batch/SKILL.md
  • .agents/skills/run-ci/SKILL.md
  • .agents/skills/triage/SKILL.md
  • .agents/skills/update-changelog/SKILL.md
  • .agents/skills/verify-pr-fix/SKILL.md
  • .agents/skills/verify/SKILL.md
  • .agents/workflows/address-review.md
  • .agents/workflows/continuous-evaluation-loop.md
  • .agents/workflows/post-merge-audit.md
  • .agents/workflows/pr-processing.md
  • AGENTS.md
  • docs/superpowers/specs/2026-06-18-portable-agent-workflows-subtree-design.md
  • internal/contributor-info/agent-workflow-adoption.md
✅ Files skipped from review due to trivial changes (3)
  • .agents/skills/triage/SKILL.md
  • .agents/skills/verify-pr-fix/SKILL.md
  • .agents/skills/autoreview/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (7)
  • .agents/workflows/address-review.md
  • .agents/workflows/continuous-evaluation-loop.md
  • .agents/skills/plan-pr-batch/SKILL.md
  • .agents/bin/agent-workflows-sync
  • .agents/workflows/post-merge-audit.md
  • AGENTS.md
  • .agents/workflows/pr-processing.md

Comment thread docs/superpowers/specs/2026-06-18-portable-agent-workflows-subtree-design.md Outdated
Comment thread .agents/skills/address-review/SKILL.md Outdated
Comment thread .agents/bin/agent-workflows-sync Outdated
Comment thread .agents/bin/agent-workflows-sync Outdated
Comment thread .agents/bin/agent-workflows-sync Outdated
@cursor

cursor Bot commented Jun 21, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_5091fe2a-358d-42da-b757-af187d2de300)

@justin808 justin808 changed the title Share agent workflows across repos via subtree (Phase 1: repo-agnostic .agents/ + seam) Share agent workflows via installed skills + repo seam Jun 21, 2026

Copy link
Copy Markdown
Member Author

+ci-run-hosted

@github-actions

Copy link
Copy Markdown
Contributor

Hosted CI Requested

Triggered 9 workflow(s) for 0b5743933c5e.
Mode: optimized hosted CI (path-selected by script/ci-changes-detector).
Added ready-for-hosted-ci, so future commits will keep running optimized hosted CI until +ci-stop-hosted is used.

View progress in the Actions tab.

@claude

claude Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Code Review: Share agent workflows via installed skills + repo seam

Overview

This PR introduces a portability seam so shared agent skills/workflows stop hardcoding React on Rails–specific commands, labels, and paths. The concrete design has three main parts:

  1. ## Agent Workflow Configuration section in AGENTS.md — a single machine-readable block that shared skills read to resolve repo-specific values (base branch, CI commands, hosted-CI trigger, changelog path, etc.)
  2. agent-workflow-seam-doctor validator — a Ruby script + Minitest suite that enforces the seam is complete, all keys are resolved, and no executable code snippets in skill/workflow Markdown still contain template placeholders
  3. Skill/workflow prose generalization — replaces hardcoded React on Rails paths, labels, and commands with seam references throughout .agents/skills/ and .agents/workflows/

The approach is sound and well-designed. A few observations follow.


Strengths

  • Seam-first model is the right call. Avoiding per-repo .agents/ subtrees while keeping policy portable is a meaningful improvement. The ## Agent Workflow Configuration block is a clean, grep-able contract.
  • Validator is solid Ruby. The script handles fenced-code-block parsing carefully (mismatched delimiter tracking, indented-fence exclusion, backtick inline extraction). The 28-test Minitest suite covers the edge cases well, including invalid UTF-8, title attributes on fences, tilde vs backtick mismatches, and double-reporting prevention.
  • Failure modes are loud, not silent. Using FOLLOW_UP_PREFIX="${FOLLOW_UP_PREFIX:?set FOLLOW_UP_PREFIX from AGENTS.md}" and similar :? expansions means agents fail fast with a clear message rather than silently issuing commands with a literal <placeholder> in the title.
  • The new ## Agent Workflow Configuration block in AGENTS.md is well-structured and provides concrete values for all 15 required keys.

Issues and Suggestions

Minor code issues

1. update_fence_state returns nil for two different cases

In agent-workflow-seam-doctor, update_fence_state returns nil both when the line is not a fence delimiter and when the delimiter doesn't match the opening delimiter (e.g. a tilde inside a backtick fence). The caller uses truthiness, which is correct — but the second nil path is a no-op continuation, not a "this line is not a fence" signal. The behavior is verified by test_mismatched_fence_delimiter_does_not_close_executable_fence, but a short comment on the second return nil would make this non-obvious invariant explicit.

2. Seam validator scans repo-local and shared-root files with different-looking path formats

A finding from a shared-root file shows the path relative to the shared root (e.g. skills/shared/SKILL.md), while a repo-local finding shows the path relative to the repo root (.agents/skills/.../SKILL.md). The deduplication via uniq is correct, but when --shared is passed alongside repo-local content the output format difference can be confusing. A source-indicator prefix like [shared] vs [repo] in the issue message would help users tell the two namespaces apart at a glance.

3. update-changelog/SKILL.md${BASE_BRANCH} in a Markdown example block

At the compare-link example:

[unreleased]: https://github.com/<owner>/<repo>/compare/v16.2.0.beta.19...${BASE_BRANCH}

This is inside a Markdown code block, so ${BASE_BRANCH} will not expand. An agent copying this literally will produce a broken URL. Consider using the literal main in the prose example (with a note to replace it from the seam) or wrapping the whole block as a shell echo snippet so the expansion is expected.

4. run-ci/SKILL.md — abstract descriptions replace concrete commands without a resolution step

The old skill listed concrete commands (bin/ci-local, --all, --fast). The generalized version replaces them with descriptions like "Local validation command, broad mode". This is correct for portability but leaves the skill almost entirely abstract. An agent reading the skill has no anchor for what to run until it resolves the seam. Adding an explicit "Before step 1, resolve PRE_PUSH_VALIDATION_COMMAND from AGENTS.md → Agent Workflow Configuration" callout at the top of Instructions would clarify the expected resolution step.


Missing test coverage

5. Symlinked shared-root deduplication is untested

If --shared receives a path that is a symlink to (or otherwise expands to) the same absolute directory as .agents/skills/, the uniq on expanded paths would correctly deduplicate, but the test suite does not cover this case. A test using File.join(root, ".agents") as the shared root would confirm the guard holds.


Security

No concerns. All external data comes from gh (trusted local CLI) or static Markdown parsing. The :? expansion guards prevent silent placeholder-as-command execution when agents copy-run shell snippets that still contain unresolved seam values.


Summary

Well-designed, low-risk change. The portability seam architecture is the right approach. All identified issues are minor (documentation gaps, one UX issue in abstracted prose, one literal-value-in-example issue, one missing edge-case test). None block merge.

Comment thread .agents/bin/agent-workflow-seam-doctor
Comment thread .agents/skills/update-changelog/SKILL.md
Comment thread .agents/bin/agent-workflow-seam-doctor
@justin808

Copy link
Copy Markdown
Member Author

Address-review summary

Scan scope: current-head optional review feedback on 2026-06-22 for head d3fdab0f3a208f3db7af88d4cd315873fceb4830.

Mattered

  • None.

Optional

  • Deferred three polish comments with [auto-deferred] rationale: mismatched-fence comment wording, changelog compare-link example wording, and shared-root output prefix polish. No code change was made to avoid another review-cycle push.

Skipped

  • None.

Shared source repo has been mirrored through shakacode/agent-workflows@4d2481f. Next default scan starts after this comment. Say check all reviews to rescan the full PR.

@justin808 justin808 added this pull request to the merge queue Jun 22, 2026
@claude

claude Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Code Review

Overview

This PR introduces a repo seam (## Agent Workflow Configuration in AGENTS.md) so shared agent skills/workflows stop hardcoding React on Rails-specific commands, labels, and paths. It adds a Ruby validator (agent-workflow-seam-doctor) with 30 test methods to enforce the seam contract, and generalizes the existing skill/workflow prose to resolve concrete values through the seam rather than via literal references.

The design is sound: the seam is intentionally human-readable (AGENTS.md is already the canonical agent policy), the *_SKILL_DIR indirection pattern is consistent across all affected skills, and the FOLLOW_UP_PREFIX shell guard (:?) fails loudly if the seam value was not resolved before use.


Strengths

  • Seam doctor logic is correct and well-tested. The fence-state machine handles mixed delimiters, case-insensitive language tags, and the prose-vs-executable distinction properly. 30 tests, UTF-8 safety, and JSON output cover the important paths.
  • *_SKILL_DIR pattern is consistent. Every skill that invokes a helper script now uses the SKILL_DIR variable with a safe :- default, allowing user-installed skills to resolve binaries without a hardcoded path.
  • The FOLLOW_UP_PREFIX guard is the right call. Using ${FOLLOW_UP_PREFIX:?...} rather than a silent default prevents a misconfigured seam from silently producing issues with the wrong title prefix.
  • Changelog taxonomy added to AGENTS.md is clear and complete.
  • Pro RSpec encoding note is a useful operational addition.

Issues

Minor logic redundancy in config_continuation?

CONFIG_KEY_PATTERN starts with ^-, so any line satisfying line.match?(/^\s{2,}\S/) will never match it. The guard !line.match?(CONFIG_KEY_PATTERN) inside config_continuation? is always true for a 2+-space-indented line and adds no real protection. Not a bug, but it implies a safety check that is not actually doing anything, and will confuse a reader who wonders what scenario it guards against.

No test for duplicate seam keys

If AGENTS.md has the same required key listed twice, parse_config silently overwrites the first value with the second. This could matter if a downstream adopter accidentally duplicates a key during adaptation. A test documenting the intended behaviour (last-wins vs. error) would be useful.

Long inline one-liners in prose are hard to read

The two-line code-block form in the security preflight step (e.g. pr-batch/SKILL.md lines 78-79) is clear. But SKILL.md:126 and pr-processing.md:399 collapse the same snippet to a single inline backtick span that is very hard to scan mid-paragraph. Not blocking, but worth a follow-up readability pass.

rubocop:disable Metrics/ModuleLength is broad

The disable wraps the entire AgentWorkflowSeamDoctor module. The CLI entry-point block is already logically outside the module (if $PROGRAM_NAME == __FILE__). Extracting the largest private helpers (e.g. executable_placeholder_issues + fence helpers) into a nested submodule could bring the module within the limit without a blanket disable. Cosmetic only.


Verdict

The design, implementation, and test coverage are solid. All four items above are minor (one redundancy, one missing test, two readability nits). Ready to merge after the required-pr-gate passes.

Comment thread .agents/bin/agent-workflow-seam-doctor
Comment thread .agents/bin/agent-workflow-seam-doctor-test.rb
Comment thread .agents/skills/pr-batch/SKILL.md
Merged via the queue into main with commit d92d92c Jun 22, 2026
38 of 39 checks passed
Comment thread .agents/bin/agent-workflow-seam-doctor
@justin808 justin808 deleted the jg-conductor/transfer-pr-batch-skills branch June 22, 2026 04:22

@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: 68db6f134e

ℹ️ 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 on lines +39 to +42
4. **Keep repo-local skills local.** Add only repo-specific skills, tiny
compatibility launchers, or local validation helpers to the repo. Do not copy
shared workflow text into the repo unless the execution environment cannot
load user-installed skills. If an agent surface can load installed skill

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep workflow files available for installed skills

For installed-skill-only adopters, this guidance says not to copy shared workflow text into the repo, but the installed skills still direct agents to repo-relative workflow files such as .agents/workflows/pr-processing.md and stop with UNKNOWN when those files are missing (for example in .agents/skills/pr-batch/SKILL.md). A repo following these lines can install the skills successfully but then $pr-batch has no local workflow file to follow, so either require local workflow copies/launchers or make the skills resolve the installed workflow location too.

Useful? React with 👍 / 👎.

Comment on lines +208 to +209
def update_fence_state(line, in_fence, fence_delimiter)
fence = line.match(/^ {0,3}(```|~~~)([[:alnum:]_-]*)(?:\s.*)?$/)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Scan valid four-backtick executable fences

When a shared skill uses a valid Markdown fence of four or more backticks/tildes, this regex never enters fence state because it only recognizes exactly three delimiters. In that case an executable block like ````bash containing gh issue create --title "<follow-up prefix> ..." is treated as plain prose and the unresolved seam placeholder is not reported, so the seam doctor can pass an unusable installed workflow; accept 3+ delimiter characters and close only on a matching fence length.

Useful? React with 👍 / 👎.

@claude

claude Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

simple test line

@claude

claude Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Code Review -- PR 4121: Share agent workflows via installed skills + repo seam

Overall: Solid architectural improvement. Moving from vendored copies to user-installed shared skills + repo seam is the right call -- it eliminates the sync-tax every adopting repo would otherwise pay. The seam-doctor tool is well-structured Ruby with good Minitest coverage (75 assertions across 28 tests), and the skill portability rewrites are clean mechanical changes. A few issues worth addressing before merge.


Issues

1. Encoding inconsistency -- crash risk on non-UTF-8 AGENTS.md

executable_placeholder_issues reads skill files with File.binread(path).force_encoding("UTF-8").scrub, which is resilient to bad bytes. But check reads AGENTS.md with plain File.read(agents_path) (line 72 of .agents/bin/agent-workflow-seam-doctor), which uses Encoding.default_external and will raise Encoding::InvalidByteSequenceError on a Latin-1 byte (e.g. a curly-quote pasted from a doc). Instead of a clean FAIL message, the tool would crash with a Ruby backtrace. Fix: use the same binread + force_encoding("UTF-8") + scrub pattern for AGENTS.md.

2. No test for invalid UTF-8 in AGENTS.md

test_invalid_utf8_markdown_does_not_crash_scanner covers the skill-file scanner but not the AGENTS.md reader. A companion test that writes a Latin-1 byte into AGENTS.md and asserts the doctor exits with FAIL (not an exception) would close this gap -- and would have caught issue 1.

3. REQUIRED_KEYS could silently diverge from the shared-repo canonical list

The required-key list is hardcoded in both this repo-local seam-doctor and the shakacode/agent-workflows canonical copy. When upstream adds a new key, repos carrying a local checker will silently miss it. A short comment near REQUIRED_KEYS reminding adopters to re-validate with --shared against a fresh upstream copy after every sync (rather than trusting the local checker alone) would help.


Minor Notes

  • config_key_finished? name is misleading. It returns true for any non-continuation, non-key line (blank lines, prose paragraphs, etc.). The logic is correct but the name implies it only fires when a key definitively ends. non_continuation_line? or ends_continuation? would be clearer.

  • FOLLOW_UP_PREFIX bash pattern is a good improvement. Replacing the hardcoded Follow-up: literal with ${FOLLOW_UP_PREFIX:?set FOLLOW_UP_PREFIX from AGENTS.md} is the right call -- agents get a loud, actionable error instead of silently creating issues with a blank prefix.

  • The *_SKILL_DIR env-var-with-default pattern is clean. Letting ADDRESS_REVIEW_SKILL_DIR default to .agents/skills/address-review while being overridable means installed vs local copies coexist without touching the calling contract. Good portability idiom worth keeping consistent across other skills.

  • inline_code_snippets only matches single-backtick spans. Double-backtick spans are not scanned. Fine for the controlled skill-file corpus; worth a comment if the checker ever broadens scope.


What is working well

The fence-state machine handles titled fences, tilde fences, mismatched-closer non-close, 4-space-indented pseudo-fences, and the double-reporting guard for inline code inside executable fences -- all covered by dedicated tests. The design-doc rewrite (seam-first over subtree-first) is cleaner and easier to follow than what it replaces.


return ["missing AGENTS.md"] unless File.file?(agents_path)

config = parse_config(File.read(agents_path))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

File.read here uses Encoding.default_external, so a Latin-1 byte in AGENTS.md (e.g. a curly-quote) will raise Encoding::InvalidByteSequenceError and crash the tool instead of printing a clean FAIL.

The skill-file scanner already handles this correctly with File.binread(path).force_encoding("UTF-8").scrub on line 193. Suggest the same pattern here:

Suggested change
config = parse_config(File.read(agents_path))
config = parse_config(File.binread(agents_path).force_encoding("UTF-8").scrub)

current_key && line.match?(/^\s{2,}\S/) && !line.match?(CONFIG_KEY_PATTERN)
end

def config_key_finished?(line)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The name config_key_finished? implies the method fires only when a key section is definitively over, but it returns true for any line that is not a continuation -- blank lines, prose paragraphs, even the section heading it inherited from extract_section. The logic is correct but the name misleads on first read. Consider non_continuation_line? or ends_continuation?.

module AgentWorkflowSeamDoctor
SECTION = "Agent Workflow Configuration"
SECTION_HEADING = /^##\s+#{Regexp.escape(SECTION)}\s*$/
REQUIRED_KEYS = [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This list is duplicated in the shakacode/agent-workflows canonical copy. When upstream adds a required key, repos carrying only the local checker will silently miss it -- their check will pass while the shared-skill pack actually requires the new key. A comment here noting that this list must be kept in sync with the upstream canonical, and that adopters should validate with --shared against a fresh clone after any sync, would prevent quiet drift.

end
end

def test_invalid_utf8_markdown_does_not_crash_scanner

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This test covers the skill-file path (.agents/skills/example/invalid.md) but the AGENTS.md reader on line 72 of the script uses File.read, which is not scrubbed and will crash on a Latin-1 byte rather than returning a clean FAIL. A companion test here — writing a bad byte into AGENTS.md itself — would catch that gap:

def test_invalid_utf8_agents_md_does_not_crash
  with_repo do |root|
    File.binwrite(File.join(root, "AGENTS.md"), "## Agent Workflow Configuration\n\nLatin-1: \xE9\n")

    out, status = run_doctor(root)

    refute status.success?
    assert_includes out, "FAIL"
  end
end

@cursor

cursor Bot commented Jun 22, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_ec189c58-a853-4133-a789-642eb7724ed6)

justin808 added a commit that referenced this pull request Jun 22, 2026
## Summary

- carry forward the post-merge #4121 seam-doctor/adoption fixes that
landed on the closed branch after #4121 was squash-merged at `68db6f1`
- teach `agent-workflow-seam-doctor` to scan 3+ backtick/tilde
executable fences, reject too-short closers, accept same-character
closers at least as long as the opener, reject info strings on closing
fences, handle CRLF closers, and parse spaced info-string languages
- clarify user-installed shared skill adoption: install `workflows/`
with `skills/`, or keep repo-local workflow copies/launchers for skills
that reference `.agents/workflows/...`
- document the shared-pack status/upgrade path for Codex and Claude
installs
- keep the React on Rails compatibility copy aligned with
`shakacode/agent-workflows@d38645b`

## Rationale

#4121 created and referenced the public shared workflow repo, but two
late P2 review findings arrived after the merged head. The shared repo
already contains the fixes; this PR keeps the React on Rails
compatibility copy and adoption docs in sync with the published pack.
Current-head review on this follow-up also tightened the CommonMark
closing-fence behavior, now fixed here and in the shared repo.

The shared pack now also includes host-aware install/status/upgrade
helpers inspired by the gstack upgrade flow: explicit status tokens,
Codex/Claude host targets, network disclosure, rollback if a consumer
seam validation fails, and preservation of unrelated user-installed
agent files.

Original #4121 review threads:
-
#4121 (comment)
-
#4121 (comment)

## Changelog

Not user-visible; agent workflow docs/tooling only.

## Validation

- `ruby .agents/bin/agent-workflow-seam-doctor-test.rb` -> 39 runs, 98
assertions, 0 failures
- `.agents/bin/agent-workflow-seam-doctor --shared
/Users/justin/codex/agent-workflows` -> PASS
- `(cd /Users/justin/codex/agent-workflows && bin/validate)` -> PASS at
`d38645b`
- `git diff --check` in both `react_on_rails` and `agent-workflows` ->
clean
- `bin/ci-local --changed` -> docs-only, Docs Sidebar Check passed, no
further CI needed
- pre-commit hook -> trailing newlines, offline markdown links, Prettier
passed
- pre-push hook -> branch RuboCop no offenses; online markdown links 29
OK

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Changes are limited to agent workflow tooling and internal
documentation; no application runtime, auth, or user-facing product code
paths are modified.
> 
> **Overview**
> Syncs the repo’s agent-workflow compatibility copy with post-#4121
fixes from `shakacode/agent-workflows`, focused on **seam validation**
and **adoption docs**.
> 
> **`agent-workflow-seam-doctor`** now parses Markdown code fences
closer to CommonMark: 3+ backtick/tilde openers, closers must match
character and be at least as long as the opener (shorter closers stay
inside the fence), closing lines with info strings do not close a fence,
CRLF closers work via `chomp`, and spaced info strings (e.g. ` ```
bash`) still mark executable fences. A large new test suite covers long
fences, mismatched delimiters, and non-executable fenced content.
> 
> **Docs/skills** broaden “Codex batch” wording to **agent / Codex /
Claude** batches in `AGENTS.md`, `pr-batch`, and contributor guides.
Adoption and design docs add **`agent-workflows-status`** and
**`upgrade-agent-workflows`** for Codex and Claude hosts, stress
installing **`workflows/`** alongside **`skills/`**, and link the shared
pack’s installation/upgrade guide.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
924b4eb. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
justin808 added a commit that referenced this pull request Jun 22, 2026
…ck-comparison-doc

* origin/main:
  Bump version to 17.0.0.rc.6
  docs: fix dead undici link and silence flaky GitHub links in lychee check (#4165)
  Update changelog for 17.0.0.rc.6 (#4174)
  Reduce PR security preflight false positives for CI metadata (#4170)
  [codex] Document targeted agent coordination reads (#4166)
  Carry forward seam doctor follow-up fixes (#4171)
  Unskip Rspack RSC e2e tests on react-on-rails-rsc 19.2 (rc.3) (#4173)
  Revert "docs: add accessibility best-practices guide (RoR + RSC) (#4086)"
  docs: rsc-css render-blocking links + end-of-head cascade trap (#4138) (#4143)
  Fix RSC-safe locale default messages output (#4146)
  Share agent workflows via installed skills + repo seam (#4121)
  Codify degraded agent-coord batch fallback (#4161)
  [codex] Document flagship demo coordination (#4164)
  Enrich deferred-render RSC errors with the bundle diagnostic (#3475) (#4100)
justin808 added a commit that referenced this pull request Jun 23, 2026
…tion-path

* origin/main:
  docs(agents): make completing an authorized merge the expected close-out (#4156)
  docs: add accessibility best-practices guide (RoR + RSC) (#3927) (#4179)
  Bump version to 17.0.0.rc.6
  docs: fix dead undici link and silence flaky GitHub links in lychee check (#4165)
  Update changelog for 17.0.0.rc.6 (#4174)
  Reduce PR security preflight false positives for CI metadata (#4170)
  [codex] Document targeted agent coordination reads (#4166)
  Carry forward seam doctor follow-up fixes (#4171)
  Unskip Rspack RSC e2e tests on react-on-rails-rsc 19.2 (rc.3) (#4173)
  Revert "docs: add accessibility best-practices guide (RoR + RSC) (#4086)"
  docs: rsc-css render-blocking links + end-of-head cascade trap (#4138) (#4143)
  Fix RSC-safe locale default messages output (#4146)
  Share agent workflows via installed skills + repo seam (#4121)
  Codify degraded agent-coord batch fallback (#4161)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-hosted-ci Run optimized hosted GitHub CI for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant