Skip to content

fix(upstream): ship the agents and references imported files use - #24

Merged
tms-anhnguyen1 merged 1 commit into
mainfrom
fix/upstream-support-files
Oct 28, 2026
Merged

tms-anhnguyen1 merged 1 commit into
mainfrom
fix/upstream-support-files

Conversation

@tms-anhnguyen1

Copy link
Copy Markdown
Contributor

Closes #22.

Problem

/ship and /webperf spawn personas from agent-skills' agents/, and eleven imported skills link to ../../references/. Neither directory was copied, so in a generated project the subagents did not exist and every link was dead. The personas themselves link to ../docs/agents.md.

Change

knowledge/upstream.yaml declares these files under support: upstream path -> where it lands under .claude/.

    support:
      agents: .claude/agents
      references: .claude/references
      docs/agents.md: .claude/docs/agents.md

The targets keep the upstream relative layout, so every link resolves with no imported byte edited. npm run sync keeps the files in knowledge/support/agent-skills/ and records them in upstream.lock.json.

A support file is an artifact like the others (type: support), so the checklist, checksums, the exists/modified protection and stale removal all apply unchanged:

  • It is written only while something from its source is.
  • A project's own .claude/agents/code-reviewer.md is left alone, which is what /ship expects: it prefers project-defined personas.
  • A target must sit under .claude/ and cannot land on rules, skills, commands or the manifest.
  • Lint rejects a file under support/ that no declaration covers, and a declaration with nothing synced under it.

--json gains selection.support and report.counts.support; no existing field changes.

Not fixed here

ship.md:24 mentions references/orchestration-patterns.md as plain text, not a link. It does not resolve upstream either (plugin files live outside the project), and it is on the Agent Teams side path only. Changing it means editing an imported file, so it belongs upstream.

Verification

  • npm run check passes.
  • New tests: placement and checksums, gating on the source, stale removal, a project's own agent left alone, both lint errors, schema limits on targets, a pre-support manifest, the bundled CLI's counts and --json, and a test that every relative .md link in a generated Rails project resolves. That last test failed on 11 skills and 4 personas before this change.
  • generate --framework rails --write --yes writes the 12 files, and check right after reports up to date.

/ship and /webperf spawn personas from agent-skills' agents/, and eleven
imported skills link to ../../references/. Neither directory was copied,
so in a generated project the subagents did not exist and every link was
dead. The personas also link to ../docs/agents.md.

upstream.yaml now declares them under `support`: upstream path -> where
it lands under .claude/, chosen so every relative link resolves with no
imported byte edited. Sync keeps them in knowledge/support/<source>/.

A support file is an artifact like the others, so the checklist,
checksums, the exists/modified protection and stale removal all apply
unchanged. It is written only while something from its source is, and
a project's own .claude/agents/<name>.md is left alone, which is what
/ship expects. Lint rejects a support file no declaration covers and a
declaration with nothing synced under it.

Closes #22
@tms-anhnguyen1
tms-anhnguyen1 merged commit 9496be2 into main Oct 28, 2026
2 checks passed
@tms-anhnguyen1
tms-anhnguyen1 deleted the fix/upstream-support-files branch October 28, 2026 06:47
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.

Imported /ship and /webperf need agents/ and references/ that are never copied

1 participant