Skip to content

AGENTS.md: add Agent Workflow Configuration seam#770

Draft
justin808 wants to merge 1 commit into
masterfrom
jg/agent-workflow-config-seam
Draft

AGENTS.md: add Agent Workflow Configuration seam#770
justin808 wants to merge 1 commit into
masterfrom
jg/agent-workflow-config-seam

Conversation

@justin808

Copy link
Copy Markdown
Member

What

Adds an ## Agent Workflow Configuration section to AGENTS.md, positioned near
the top right after the Project Overview (mirroring how react_on_rails
positions its seam).

This is the only file changed (68 insertions, additive).

Why

shakacode/agent-workflows publishes portable agent skills (issue/PR batching,
review-comment triage, verification, changelog updates, CI routing, etc.). Each
skill carries the workflow logic but defers every repo-specific command, branch,
label, path, and policy to a small, validated seam in the consumer repo's
AGENTS.md. Adding this seam lets those shared skills resolve this repo's
real commands and policy instead of guessing.

The contract and rationale live in
shakacode/agent-workflows
(docs/seam-design.md).

How values were determined

Every value was read from the repo on masterconfig/ci.rb, bin/ci,
lib/tasks/*.rake, package.json scripts, .github/workflows/*.yml,
CHANGELOG.md, and the existing AGENTS.md. Nothing was fabricated.

Validation

$ agent-workflow-seam-doctor --root . --shared <agent-workflows-root>
PASS agent workflow seam is complete

All 16 required seam keys are present and no key contains an unresolved
<placeholder> value.

Keys marked n/a (concept genuinely does not apply to this tutorial app)

Each points at the real file/workflow that governs the concept:

  • CI change detector — no suite-routing detector; every PR runs all three
    workflows in full (.github/workflows/{rspec_test,lint_test,js_test}.yml).
  • Hosted-CI trigger — no +ci-* commands or hosted-CI labels; CI auto-runs on
    push/PR to master. (The @claude mention triggers .github/workflows/claude.yml.)
  • CI parity environment — no act/runner image documented; reproduce from the
    exact job specs in .github/workflows/*.yml (ubuntu-latest, Ruby 3.4.6, Node
    22.x, postgres:11-alpine).
  • Benchmark labels — no benchmark workflow or labels exist.
  • Follow-up issue prefix — no follow-up-issue convention documented.
  • Merge ledger — no per-PR merge-readiness script exists.
  • Docs checks — no markdown link checker or docs-sidebar verifier.
  • Build / type checks → type checks — TypeScript is a dependency but there is no
    tsc/type-check script; ReScript is compiled by yarn res:build.
  • Approval-exempt change categories — no standing approval-exemption policy.
  • Coordination backend — no shared agent-coordination backend; coordination is
    via GitHub PR/issue state.

No keys were left as UNKNOWN.

🤖 Generated with Claude Code

Add the portable agent-workflows seam so shared skills from
shakacode/agent-workflows can resolve this repo's real commands and policy.
All keys reflect verified repo values; concepts that genuinely do not apply to
this tutorial app are marked n/a with a pointer to the relevant file/workflow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 010a6a87-26f8-4f7d-b781-0bac01e2290e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg/agent-workflow-config-seam

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.

@github-actions

Copy link
Copy Markdown

🚀 Quick Review App Commands

Welcome! Here are the commands you can use in this PR:
They require the repository to have cpflow review apps configured, including the CPLN_TOKEN_STAGING secret.

+review-app-deploy

Deploy your PR branch for testing.

+review-app-delete

Remove the review app when done.

+review-app-help

Show detailed instructions, environment setup, and configuration options.

Comment +review-app-help for full setup details.

Comment thread AGENTS.md
automation (no Rake task or script); edit the file by hand following its existing
reverse-chronological dated-section format.
- **Lint / format**: `bundle exec rake lint` (full suite: RuboCop, ESLint, scss_lint);
`bin/rubocop` or `bundle exec rake "lint:rubocop[fix]"` (Ruby, with autofix);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bin/rubocop is a plain Bundler binstub — it does not pass -a and does not autofix. config/ci.rb itself uses bin/conductor-exec bin/rubocop (without -a) as the read-only lint check step. Grouping it under "(Ruby, with autofix)" is misleading; a developer who runs bin/rubocop expecting in-place correction will only get a lint report.

Suggested fix: split the two commands so their intent is clear.

Suggested change
`bin/rubocop` or `bundle exec rake "lint:rubocop[fix]"` (Ruby, with autofix);
`bin/rubocop` (Ruby lint check);
`bundle exec rake "lint:rubocop[fix]"` or `bundle exec rubocop -a` (Ruby autofix);

Comment thread AGENTS.md
workflows in `.github/workflows/` trigger on `push`/`pull_request` to `master`).
- **Pre-push local validation**: `bin/ci` — runs setup, RuboCop, ESLint, the test
asset build, RSpec, and Jest in order (steps defined in `config/ci.rb`). The
equivalent Rake entrypoint is `bundle exec rake ci:all`. Run tool-version-sensitive

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bundle exec rake ci:all and bin/ci are not equivalent; calling them interchangeable will mislead agents.

Key differences verified against config/ci.rb and lib/tasks/ci.rake:

bin/ci bundle exec rake ci:all
Setup step bin/setup --skip-server ❌ skipped
Order lint → tests tests → lint (deps: build_rescript rspec_tests lint js_tests)
Asset build generate_packs && res:build && build:test only res:build
RSpec runner bin/conductor-exec bin/rspec bare sh "rspec"

An agent that substitutes rake ci:all for bin/ci in a clean environment will skip setup and run tests before lint.

Suggested change
equivalent Rake entrypoint is `bundle exec rake ci:all`. Run tool-version-sensitive
equivalent Rake entrypoint is `bundle exec rake ci:all` (note: skips the setup
step and runs tests before lint; prefer `bin/ci` for full parity). Run tool-version-sensitive

Comment thread AGENTS.md
- **Lint / format**: `bundle exec rake lint` (full suite: RuboCop, ESLint, scss_lint);
`bin/rubocop` or `bundle exec rake "lint:rubocop[fix]"` (Ruby, with autofix);
`bundle exec rubocop -a` (Ruby autofix); `yarn lint:eslint` (JS check),
`yarn lint` (ESLint autofix + Prettier write); `yarn lint:prettier` (Prettier

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The lint script in package.json is:

"lint": " yarn lint:eslint --fix && yarn lint:prettier --w",

--w is not a recognized Prettier flag — the correct flag is --write. This is a latent bug in package.json itself, but describing yarn lint as "Prettier write" implies it works; agents that rely on it for formatting will get unexpected behavior (Prettier may error or silently skip the write).

Worth either fixing the underlying package.json script (--w--write) and noting it here, or flagging the limitation.

Comment thread AGENTS.md
check, `.js`/`.jsx`). See the **Build and Test Commands** section.
- **Merge ledger**: n/a — no machine-checkable per-PR merge-readiness script exists.
- **Docs checks**: n/a — no markdown link checker or docs-sidebar verifier in this repo.
- **Tests**: RSpec via `bin/rspec` or `bundle exec rake ci:rspec`; Jest (client JS)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bundle exec rake ci:rspec is not a plain RSpec runner — from lib/tasks/ci.rake:

task rspec: %i[environment build_rescript rspec_tests]

It always runs yarn res:build (ReScript compilation) first. An agent using it to quickly re-run a failing spec will trigger an unnecessary full ReScript build. If speed matters, bin/rspec is the right choice; the rake form should be documented as "RSpec + ReScript build".

Suggested change
- **Tests**: RSpec via `bin/rspec` or `bundle exec rake ci:rspec`; Jest (client JS)
- **Tests**: RSpec via `bin/rspec`; or `bundle exec rake ci:rspec` (also rebuilds ReScript first); Jest (client JS)

Comment thread AGENTS.md
- **Secret redaction patterns**: redact values for environment variables or log
fields whose names contain `SECRET`, `TOKEN`, `KEY`, `PASSWORD`, `CREDENTIAL`,
`PASSPHRASE`, or `PRIVATE`, plus the repo-specific names `CLAUDE_CODE_OAUTH_TOKEN`,
`RENDERER_PASSWORD`, `GITHUB_TOKEN`, `GH_TOKEN`, and `DATABASE_URL` (contains

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

GH_TOKEN does not appear anywhere in the repository's workflow files (checked all five: rspec_test.yml, lint_test.yml, js_test.yml, claude.yml, claude-code-review.yml). Listing it as a repo-specific redaction name implies the repo uses it, which could confuse future audits or editors maintaining this list. It is already covered by the generic TOKEN pattern, so removing it causes no loss of coverage.

Suggested change
`RENDERER_PASSWORD`, `GITHUB_TOKEN`, `GH_TOKEN`, and `DATABASE_URL` (contains
`RENDERER_PASSWORD`, `GITHUB_TOKEN`, and `DATABASE_URL` (contains

@claude

claude Bot commented Jun 28, 2026

Copy link
Copy Markdown

Review: AGENTS.md Agent Workflow Configuration seam

This PR adds a well-structured agent workflow seam to AGENTS.md — the structure is sound and most values are accurate (CI triggers, Ruby/Node versions, Postgres image, CHANGELOG path, claude-code-review.yml triggers all verified correct). Five concrete inaccuracies were found by cross-checking the referenced files.

Findings (most severe first)

1. bin/rubocop mislabeled as autofix (line 57)
bin/rubocop is a plain Bundler binstub with no -a flag. config/ci.rb uses it as a read-only check. Grouping it with rake lint:rubocop[fix] under "(Ruby, with autofix)" is incorrect.

2. bundle exec rake ci:allbin/ci (line 28)
The two pipelines differ materially: ci:all skips the setup step, runs tests before lint, and uses a bare sh "rspec" instead of the conductor-exec-wrapped runner. Calling it "the equivalent Rake entrypoint" will mislead agents in clean environments.

3. yarn lint Prettier flag is broken upstream (line 59)
package.json's lint script uses --w (not --write), which is not a recognized Prettier flag. The AGENTS.md description "Prettier write" implies this works; it likely doesn't. Worth either fixing package.json or noting the caveat here.

4. bundle exec rake ci:rspec runs ReScript build first (line 63)
ci.rake declares task rspec: %i[environment build_rescript rspec_tests], so rake ci:rspec always rebuilds ReScript before running specs. Presenting it alongside bin/rspec as a plain RSpec alternative understates what it does.

5. GH_TOKEN is a phantom repo-specific entry (line 46)
GH_TOKEN does not appear in any of the five workflow files. It is already covered by the generic TOKEN pattern, so the repo-specific listing creates a false impression that this repo uses it.

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