Date: 2026-06-18 Status: approved direction, updated 2026-06-27
The shared pr-batch family and related agent workflows should run across
ShakaCode repos without copying repo-specific commands, labels, branches,
release policy, paths, or domain examples into the shared pack. The original
inline AGENTS.md key/value seam was readable, but it made scripts parse prose
and encouraged large policy blocks inside every consumer AGENTS.md.
Make the shared skills portable by installing them once in the user or agent environment, then make each consumer repo expose a small, validated contract:
- commands are executable repo-owned binstubs under
.agents/bin/ - non-command policy is structured YAML in
.agents/agent-workflow.yml AGENTS.mdpoints humans and agents at those two sources
Use source-pack-glossary.md as the canonical glossary for terms such as Source Pack, Consumer Repo, Agent Workflow Configuration Seam, Host Installer Path, Native Plugin Path, Workflow Lessons Library, Readiness Vocabulary, Review Finding, and State-Machine Fixture. Keep this document focused on the seam architecture; update the glossary when new workflow-pack terms need stable meaning across issues, PRs, and implementation prompts.
shakacode/agent-workflows
skills/... and workflows/... portable process, installed per user/agent
bin/... install, status, upgrade, validation, sync helpers
consumer repo
.agents/bin/README.md command table for this repo
.agents/bin/setup optional dependency setup
.agents/bin/validate required pre-push gate
.agents/bin/test required test entry point
.agents/bin/lint optional lint/format entry point
.agents/bin/build optional build/type-check entry point
.agents/bin/docs optional docs check entry point
.agents/bin/ci-detect optional CI routing entry point
.agents/agent-workflow.yml non-command policy
AGENTS.md pointer section; no workflow policy
CLAUDE.md optional thin import of @AGENTS.md
The default distribution path remains this repository plus the user's normal skill installation mechanism. Repository-pinned copies remain an escape hatch for execution environments that cannot use user-installed shared skills.
Portable skills call .agents/bin/<name> rather than embedding a target repo's
real commands. Each wrapper is a thin Bash script:
#!/usr/bin/env bash
set -euo pipefail
cd "$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd)"
exec bundle exec rspec "$@"Composed scripts compute the root once and call siblings by absolute path:
#!/usr/bin/env bash
set -euo pipefail
root="$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd)"
cd "$root"
"$root/.agents/bin/build"
"$root/.agents/bin/test"validate is the authoritative comprehensive pre-push gate. test, lint,
build, docs, and ci-detect are convenience subsets. An absent optional
script means that capability is n/a in that repo.
.agents/agent-workflow.yml carries non-command values:
base_branchfollow_up_prefixreview_gateapproval_exemptcoordination_backendchangelogbenchmark_labelsmerge_ledgerci_parity_environmenthosted_ci_triggerci_change_detector
Repos may add policy keys such as secret_redaction_patterns when needed. Use
n/a for unavailable policy. Keep values terse and behavior-complete.
Each consumer AGENTS.md owns a section named
## Agent Workflow Configuration, but the section is only a pointer:
## Agent Workflow Configuration
Portable shared skills resolve this repo's commands and policy through:
- **Commands** — run `.agents/bin/<name>` (`setup`, `validate`, `test`, ...); see `.agents/bin/README.md`. A missing script means that capability is n/a here.
- **Policy / config** — `.agents/agent-workflow.yml`.Consumer repos should keep broader human guidance in AGENTS.md, but command
resolution and workflow policy come from the binstubs and YAML.
agent-workflow-seam-doctor validates the contract:
AGENTS.mdhas the pointer section.agents/bin/README.mdexists- core scripts
validateandtestexist, are executable, passbash -n, and include the repo-rootcdpreamble .agents/agent-workflow.ymlparses and has all required policy keys with resolved values- repo-local and supplied shared skill/workflow Markdown do not contain
unresolved executable placeholders such as
<follow-up prefix>
The doctor intentionally does not execute the wrappers. Before consumer PRs, also verify that wrapped commands/tasks exist in the target repo.
git subtree solves "every repo has a pinned copy of shared files," but the
primary problem is resolving repo-specific behavior safely. A subtree also makes
the .agents/ prefix all-or-nothing, which is awkward when a repo has genuine
local skills. Use pinned copies only when an execution environment cannot depend
on user-installed skills or intentionally wants shared workflow updates reviewed
inside that repo.
bin/validateruby bin/agent-workflow-seam-doctor-test.rbruby bin/push-downstream-test.rbbin/agent-workflow-seam-doctor --root <consumer-repo> --shared <this-repo>- Markdown review for edited docs