Skip to content

setup-steward: support single directory-symlink layout (Pattern D) - #247

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:setup-steward-pattern-d
May 22, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:setup-steward-pattern-d

Conversation

@potiuk

@potiuk potiuk commented May 22, 2026

Copy link
Copy Markdown
Member

Summary

Adds a fourth skills-dir convention — Pattern D, single
directory symlink
— to the setup-steward adopter taxonomy:
one of .claude/skills / .github/skills is itself a directory
symlink to the other, so both paths always reflect the same set
of skills without per-skill plumbing. Adding a new skill — project-
native or framework-installed — only needs one entry in the
canonical directory; the mirror is automatic.

Two orientations:

  • D.1 — canonical content under .github/skills/,
    .claude/skills is the symlink. Natural for projects that
    use .github/ as their canonical infra-glue root (e.g.
    apache/airflow).
  • D.2 — canonical content under .claude/skills/,
    .github/skills is the symlink. Natural for flat-Pattern-A
    projects that want a .github/skills/ view too without
    duplicating content.

Pattern D coexists with project-native skills and framework
symlinks in the same canonical directory — the directory symlink
fans them out across both paths automatically.

Pre-Pattern-D consolidation

When both .claude/skills/ and .github/skills/ already exist
as regular directories with independent, non-aliased content,
applying Pattern D would clobber the side that becomes the
symlink. The adopt flow now surfaces the conflict and proposes
a one-time consolidation — move every skill into one side,
replace the other with a directory symlink — before wiring any
framework symlink. The framework never auto-renames adopter
content; if the user declines or unresolved name collisions
block consolidation, the flow falls back to Pattern A.

Files

  • .claude/skills/setup-steward/conventions.md — Pattern D
    section (both orientations), detection-algorithm branches,
    table row, consolidation flow, ambiguous-case rules.
  • .claude/skills/setup-steward/adopt.md — Step 0.4 calls
    the consolidation flow on ambiguous detection; Step 7 splits
    the .gitignore template per pattern; Step 8 wires
    framework symlinks at the canonical side only for D.
  • .claude/skills/setup-steward/upgrade.md — Step 4b adds a
    Pattern D branch (overwrite setup-steward at the canonical
    side); Step 6 refreshes per-skill symlinks at the canonical
    side only.
  • .claude/skills/setup-steward/verify.md — Check 4 splits
    the required .gitignore entries per pattern.
  • .claude/skills/setup-steward/unadopt.md — Per-pattern
    inventory + execute-removal; the directory symlink itself is
    adopter-owned and preserved.
  • .claude/skills/setup-steward/worktree-init.md —
    Per-pattern layer count for worktree framework-skill symlinks.
  • .claude/skills/setup-steward/SKILL.md,
    docs/setup/install-recipes.md, docs/setup/unadopt.md —
    same per-pattern guidance reflected in the contributor-facing
    docs.

Test plan

  • Apply Pattern D to an already-adopted Pattern B repo
    (apache/airflow), run `/setup-steward upgrade`, confirm
    framework symlinks land at `.github/skills/` only and
    every framework skill is reachable from
    `.claude/skills/` via the directory symlink.
  • Verify `.gitignore` after the consume PR has only the
    canonical-side ignore lines and the runtime framework
    symlinks remain gitignored.
  • Run `/setup-steward verify` from both the main checkout
    and a linked worktree; confirm all checks pass.
  • Dry-run `/setup-steward unadopt` on the Pattern D repo;
    confirm the directory symlink itself is in the
    preserved section.

🤖 Generated with Claude Code

Adds Pattern D to the adopter skills-dir conventions: one of
`.claude/skills` / `.github/skills` is itself a directory symlink
to the other, so both paths always reflect the same set of skills
without per-skill plumbing. Two orientations:

- **D.1** — canonical content under `.github/skills/`,
  `.claude/skills` is the symlink. Natural for projects that
  use `.github/` as their canonical infra-glue root (e.g.
  apache/airflow).
- **D.2** — canonical content under `.claude/skills/`,
  `.github/skills` is the symlink. Natural for flat-Pattern-A
  projects that want a `.github/skills/` view too.

Pattern D coexists with project-native skills and framework
symlinks in the same canonical directory — the directory
symlink fans them out automatically.

Pre-Pattern-D consolidation: when both directories exist as
regular directories with independent content (the would-be
clobber-on-symlink case), the adopt flow surfaces the conflict
and proposes a one-time consolidation — move every skill into
one side, replace the other with a directory symlink — before
wiring any framework symlink. Never auto-renames adopter
content; falls back to Pattern A if the user declines.

Updates to per-flow handling:

- `conventions.md` — Pattern D section + two orientations, new
  detection-algorithm branches, table row, ambiguous-case rules,
  consolidation flow.
- `adopt.md` — Step 0.4 calls into the consolidation flow when
  detection is ambiguous; Step 7 splits the `.gitignore` template
  per pattern (Pattern D only needs the canonical-side lines);
  Step 8 wires symlinks at the canonical side only for Pattern D.
- `upgrade.md` — Step 4b adds a Pattern D branch (overwrite
  `setup-steward` at the canonical side; the directory symlink
  resolves the other side automatically); Step 6 refreshes only
  the canonical-side per-skill symlinks under Pattern D.
- `verify.md` — Check 4 splits the required `.gitignore` entries
  per pattern.
- `unadopt.md` — Inventory + execute-removal split per pattern;
  the directory symlink itself is adopter-owned and preserved.
- `worktree-init.md` — Per-pattern layer count for the worktree's
  framework-skill symlinks.
- `docs/setup/install-recipes.md`, `docs/setup/unadopt.md`,
  `SKILL.md` — same per-pattern guidance reflected in the
  contributor-facing docs.
@potiuk
potiuk merged commit b9e1967 into apache:main May 22, 2026
13 checks passed
potiuk added a commit to apache/airflow that referenced this pull request May 24, 2026
Backports the framework adoption from main (#66677 + #67149) so that
v3-2-test gets the same agent-driven PR-management skills that main
already uses, and so that future agentic fixes that ship as overrides
under \`.apache-steward-overrides/\` cherry-pick cleanly to v3-2-test
instead of hitting structural conflicts against the old self-hosted
\`pr-triage\` skill.

What changes:

- Remove the self-hosted \`pr-triage\` skill at \`.github/skills/pr-triage/\`
  (and its symlink \`.claude/skills/pr-triage\`). Its functionality
  moves into the apache-steward framework as \`pr-management-triage\`,
  fetched on demand via the snapshot mechanism.
- Wire up the apache-steward adoption: committed \`setup-steward\`
  bootstrap at \`.github/skills/setup-steward/\` (with a sibling
  \`.claude/skills/setup-steward\` symlink), \`.apache-steward.lock\`
  pinned to framework \`main\`, and the \`.apache-steward-overrides/\`
  directory with the three pr-management-triage config files
  (\`pr-management-config.md\`, \`pr-management-triage-ci-check-map.md\`,
  \`pr-management-triage-comment-templates.md\`) plus README and user.md.
- Refresh the \`setup-steward\` bootstrap to the latest framework main
  (apache/magpie#247 — Pattern D single-directory-symlink
  layout) so adopters of the new framework benefit from the consolidated
  install flow.
- Rewrite \`contributing-docs/25_maintainer_pr_triage.md\` to point at
  the framework skill URLs (\`apache/airflow-steward/.../pr-management-*\`)
  rather than the now-removed local skill paths.
- Add the apache-steward section to \`AGENTS.md\` and the
  "Agent-assisted contribution" section to \`README.md\`.
- Update \`.gitignore\` to allow-list \`setup-steward\` and to exclude
  the symlink families (\`security-*\`, \`pr-management-*\`, \`issue-*\`,
  \`setup-isolated-setup-*\`, \`setup-override-upstream\`,
  \`setup-shared-config-sync\`, \`list-steward-*\`) under both
  \`.claude/skills/\` and \`.github/skills/\`.
- Update \`.pre-commit-config.yaml\` to skip \`.apache-steward-overrides/\`
  and \`.github/skills/setup-steward/\` in codespell and markdownlint
  (the framework prose uses hyphenated forms codespell flags as
  misspellings, and the snapshot-internal links break markdownlint).

What does not change:

- \`maintainer-review\` and \`pr-stats\` skills were never backported to
  v3-2-test, so there's nothing to remove for them — they will simply
  show up as \`pr-management-code-review\` and \`pr-management-stats\`
  after a fresh \`/setup-steward\`.
- The \`lychee\` prek hook does not exist on v3-2-test, so its exclude
  hunk from main's adoption commit is N/A here.

After this lands, contributors run \`/setup-steward\` in their agent
harness to populate the gitignored \`.apache-steward/\` snapshot and
make every \`pr-management-*\` skill invocable. See the README section
"Agent-assisted contribution (apache-steward)" for the setup flow.
vatsrahul1001 pushed a commit to apache/airflow that referenced this pull request May 25, 2026
Backports the framework adoption from main (#66677 + #67149) so that
v3-2-test gets the same agent-driven PR-management skills that main
already uses, and so that future agentic fixes that ship as overrides
under \`.apache-steward-overrides/\` cherry-pick cleanly to v3-2-test
instead of hitting structural conflicts against the old self-hosted
\`pr-triage\` skill.

What changes:

- Remove the self-hosted \`pr-triage\` skill at \`.github/skills/pr-triage/\`
  (and its symlink \`.claude/skills/pr-triage\`). Its functionality
  moves into the apache-steward framework as \`pr-management-triage\`,
  fetched on demand via the snapshot mechanism.
- Wire up the apache-steward adoption: committed \`setup-steward\`
  bootstrap at \`.github/skills/setup-steward/\` (with a sibling
  \`.claude/skills/setup-steward\` symlink), \`.apache-steward.lock\`
  pinned to framework \`main\`, and the \`.apache-steward-overrides/\`
  directory with the three pr-management-triage config files
  (\`pr-management-config.md\`, \`pr-management-triage-ci-check-map.md\`,
  \`pr-management-triage-comment-templates.md\`) plus README and user.md.
- Refresh the \`setup-steward\` bootstrap to the latest framework main
  (apache/magpie#247 — Pattern D single-directory-symlink
  layout) so adopters of the new framework benefit from the consolidated
  install flow.
- Rewrite \`contributing-docs/25_maintainer_pr_triage.md\` to point at
  the framework skill URLs (\`apache/airflow-steward/.../pr-management-*\`)
  rather than the now-removed local skill paths.
- Add the apache-steward section to \`AGENTS.md\` and the
  "Agent-assisted contribution" section to \`README.md\`.
- Update \`.gitignore\` to allow-list \`setup-steward\` and to exclude
  the symlink families (\`security-*\`, \`pr-management-*\`, \`issue-*\`,
  \`setup-isolated-setup-*\`, \`setup-override-upstream\`,
  \`setup-shared-config-sync\`, \`list-steward-*\`) under both
  \`.claude/skills/\` and \`.github/skills/\`.
- Update \`.pre-commit-config.yaml\` to skip \`.apache-steward-overrides/\`
  and \`.github/skills/setup-steward/\` in codespell and markdownlint
  (the framework prose uses hyphenated forms codespell flags as
  misspellings, and the snapshot-internal links break markdownlint).

What does not change:

- \`maintainer-review\` and \`pr-stats\` skills were never backported to
  v3-2-test, so there's nothing to remove for them — they will simply
  show up as \`pr-management-code-review\` and \`pr-management-stats\`
  after a fresh \`/setup-steward\`.
- The \`lychee\` prek hook does not exist on v3-2-test, so its exclude
  hunk from main's adoption commit is N/A here.

After this lands, contributors run \`/setup-steward\` in their agent
harness to populate the gitignored \`.apache-steward/\` snapshot and
make every \`pr-management-*\` skill invocable. See the README section
"Agent-assisted contribution (apache-steward)" for the setup flow.
vatsrahul1001 pushed a commit to apache/airflow that referenced this pull request May 25, 2026
Backports the framework adoption from main (#66677 + #67149) so that
v3-2-test gets the same agent-driven PR-management skills that main
already uses, and so that future agentic fixes that ship as overrides
under \`.apache-steward-overrides/\` cherry-pick cleanly to v3-2-test
instead of hitting structural conflicts against the old self-hosted
\`pr-triage\` skill.

What changes:

- Remove the self-hosted \`pr-triage\` skill at \`.github/skills/pr-triage/\`
  (and its symlink \`.claude/skills/pr-triage\`). Its functionality
  moves into the apache-steward framework as \`pr-management-triage\`,
  fetched on demand via the snapshot mechanism.
- Wire up the apache-steward adoption: committed \`setup-steward\`
  bootstrap at \`.github/skills/setup-steward/\` (with a sibling
  \`.claude/skills/setup-steward\` symlink), \`.apache-steward.lock\`
  pinned to framework \`main\`, and the \`.apache-steward-overrides/\`
  directory with the three pr-management-triage config files
  (\`pr-management-config.md\`, \`pr-management-triage-ci-check-map.md\`,
  \`pr-management-triage-comment-templates.md\`) plus README and user.md.
- Refresh the \`setup-steward\` bootstrap to the latest framework main
  (apache/magpie#247 — Pattern D single-directory-symlink
  layout) so adopters of the new framework benefit from the consolidated
  install flow.
- Rewrite \`contributing-docs/25_maintainer_pr_triage.md\` to point at
  the framework skill URLs (\`apache/airflow-steward/.../pr-management-*\`)
  rather than the now-removed local skill paths.
- Add the apache-steward section to \`AGENTS.md\` and the
  "Agent-assisted contribution" section to \`README.md\`.
- Update \`.gitignore\` to allow-list \`setup-steward\` and to exclude
  the symlink families (\`security-*\`, \`pr-management-*\`, \`issue-*\`,
  \`setup-isolated-setup-*\`, \`setup-override-upstream\`,
  \`setup-shared-config-sync\`, \`list-steward-*\`) under both
  \`.claude/skills/\` and \`.github/skills/\`.
- Update \`.pre-commit-config.yaml\` to skip \`.apache-steward-overrides/\`
  and \`.github/skills/setup-steward/\` in codespell and markdownlint
  (the framework prose uses hyphenated forms codespell flags as
  misspellings, and the snapshot-internal links break markdownlint).

What does not change:

- \`maintainer-review\` and \`pr-stats\` skills were never backported to
  v3-2-test, so there's nothing to remove for them — they will simply
  show up as \`pr-management-code-review\` and \`pr-management-stats\`
  after a fresh \`/setup-steward\`.
- The \`lychee\` prek hook does not exist on v3-2-test, so its exclude
  hunk from main's adoption commit is N/A here.

After this lands, contributors run \`/setup-steward\` in their agent
harness to populate the gitignored \`.apache-steward/\` snapshot and
make every \`pr-management-*\` skill invocable. See the README section
"Agent-assisted contribution (apache-steward)" for the setup flow.
kosteev pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Aug 4, 2026
Backports the framework adoption from main (#66677 + #67149) so that
v3-2-test gets the same agent-driven PR-management skills that main
already uses, and so that future agentic fixes that ship as overrides
under \`.apache-steward-overrides/\` cherry-pick cleanly to v3-2-test
instead of hitting structural conflicts against the old self-hosted
\`pr-triage\` skill.

What changes:

- Remove the self-hosted \`pr-triage\` skill at \`.github/skills/pr-triage/\`
  (and its symlink \`.claude/skills/pr-triage\`). Its functionality
  moves into the apache-steward framework as \`pr-management-triage\`,
  fetched on demand via the snapshot mechanism.
- Wire up the apache-steward adoption: committed \`setup-steward\`
  bootstrap at \`.github/skills/setup-steward/\` (with a sibling
  \`.claude/skills/setup-steward\` symlink), \`.apache-steward.lock\`
  pinned to framework \`main\`, and the \`.apache-steward-overrides/\`
  directory with the three pr-management-triage config files
  (\`pr-management-config.md\`, \`pr-management-triage-ci-check-map.md\`,
  \`pr-management-triage-comment-templates.md\`) plus README and user.md.
- Refresh the \`setup-steward\` bootstrap to the latest framework main
  (apache/magpie#247 — Pattern D single-directory-symlink
  layout) so adopters of the new framework benefit from the consolidated
  install flow.
- Rewrite \`contributing-docs/25_maintainer_pr_triage.md\` to point at
  the framework skill URLs (\`apache/airflow-steward/.../pr-management-*\`)
  rather than the now-removed local skill paths.
- Add the apache-steward section to \`AGENTS.md\` and the
  "Agent-assisted contribution" section to \`README.md\`.
- Update \`.gitignore\` to allow-list \`setup-steward\` and to exclude
  the symlink families (\`security-*\`, \`pr-management-*\`, \`issue-*\`,
  \`setup-isolated-setup-*\`, \`setup-override-upstream\`,
  \`setup-shared-config-sync\`, \`list-steward-*\`) under both
  \`.claude/skills/\` and \`.github/skills/\`.
- Update \`.pre-commit-config.yaml\` to skip \`.apache-steward-overrides/\`
  and \`.github/skills/setup-steward/\` in codespell and markdownlint
  (the framework prose uses hyphenated forms codespell flags as
  misspellings, and the snapshot-internal links break markdownlint).

What does not change:

- \`maintainer-review\` and \`pr-stats\` skills were never backported to
  v3-2-test, so there's nothing to remove for them — they will simply
  show up as \`pr-management-code-review\` and \`pr-management-stats\`
  after a fresh \`/setup-steward\`.
- The \`lychee\` prek hook does not exist on v3-2-test, so its exclude
  hunk from main's adoption commit is N/A here.

After this lands, contributors run \`/setup-steward\` in their agent
harness to populate the gitignored \`.apache-steward/\` snapshot and
make every \`pr-management-*\` skill invocable. See the README section
"Agent-assisted contribution (apache-steward)" for the setup flow.

GitOrigin-RevId: c173379bb82a12372cf6cc7bced49b6ca836ae68
@potiuk potiuk added capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) family:docs Docs, MISSION.md, READMEs family:setup setup-* skills labels Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) family:docs Docs, MISSION.md, READMEs family:setup setup-* skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant