internal/contributor-info/portable-agent-workflows-seam-design.md
Date: 2026-06-18 Status: approved direction, updated 2026-06-21
The pr-batch family and related agent workflows are useful outside React on
Rails, but the current copies mix reusable process with repo-specific commands,
labels, release policy, paths, and domain examples. We want ShakaCode agents to
carry these workflows across repos without copying a stale .agents/ tree into
every repository or making each repo responsible for shared workflow updates.
Make shared skills portable by installing them in the user or agent environment,
then make each repo expose a small, validated AGENTS.md seam that supplies the
repo-specific values the portable skills need.
shakacode/agent-workflows
skills/... and workflows/... portable process, installed per user/agent
bin/... install, status, upgrade, and validation helpers
consumer repo
AGENTS.md canonical policy plus Agent Workflow Configuration seam
.agents/bin/agent-workflow-seam-doctor
optional local checker for the seam contract
.agents/skills/... repo-specific skills or explicit overrides
.agents/workflows/... repo-local workflow files only when the repo needs them
The default distribution path is
shakacode/agent-workflows plus
the user's normal skill installation mechanism. For example, an agent may
install the shared pr-batch, verify, address-review, and changelog skills
once into Codex or Claude and use them in any repo. The skill then reads the
target repo's AGENTS.md seam to resolve concrete commands and policy.
Repository-pinned shared skill copies remain an optional escape hatch for environments that need exact workflow text in the checkout, such as cloud agents that cannot use a user skill install. They are not the default design; in React on Rails, keeping shared copies duplicates installed Codex picker entries and should be justified by a specific reproducibility or execution-environment need.
Each adopting repo owns a section named ## Agent Workflow Configuration in
AGENTS.md. Shared skills may refer to these values by name:
The seam is deliberately human-readable because AGENTS.md is already the
repo's canonical agent policy. Add a structured config file only when a
non-LLM script needs to consume the values mechanically.
agent-workflow-seam-doctor checks the boundary between portable skills and the
repo:
AGENTS.md has the required seam keys<follow-up prefix>It does not reject ordinary command parameters such as <PR> or <sha>. Those
are task inputs, not repo-seam values.
git subtree solves "every repo has a pinned copy of the shared files," but
that is not the primary problem. The primary problem is whether a portable skill
can safely resolve repo-specific behavior. A subtree also makes the .agents/
prefix all-or-nothing, which is awkward when a repo has real local skills such
as React on Rails' stress-test, optimize-rsc-performance, and
react-on-rails-update-changelog.
Use a repository-pinned copy only when the execution environment cannot depend on user-installed shared skills or when the repo intentionally wants to review shared workflow updates like source code. Otherwise, install the shared skill pack once for the user/agent and validate each repo's seam.
Shared skills should contain portable procedure and safety rules:
Shared skill installation must include each skill's bin/ helpers with its
SKILL.md, and workflow text should call helpers relative to the installed
skill directory or through a repo-local helper copy. A repo that can load
installed skill Markdown but cannot execute installed helper scripts should pin
the helper scripts locally without adding duplicate shared SKILL.md files.
Repo-local content should contain concrete policy and domain knowledge:
AGENTS.mdagent-workflow-seam-doctor, and update
the adoption guide around user-installed shared skills.shakacode/agent-workflows, install it in the agent
surfaces ShakaCode uses, and run its bin/validate before shared updates.
Use agent-workflows-status and upgrade-agent-workflows for ongoing
installed pack maintenance.ruby .agents/bin/agent-workflow-seam-doctor-test.rb.agents/bin/agent-workflow-seam-doctoragent-workflow-seam-doctor --shared <path-to-shakacode/agent-workflows>