Skip to content

feat(sync): make prefixed target naming misconfigurations visible - #503

Merged
runkids merged 12 commits into
mainfrom
runkids/prefixed-naming-ux
Oct 9, 2026
Merged

runkids merged 12 commits into
mainfrom
runkids/prefixed-naming-ux

Conversation

@runkids

@runkids runkids commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Type

  • Bug fix
  • Small improvement (docs, typo, minor refactor)
  • Feature proposal (proposals/ only — see CONTRIBUTING.md)

User-facing polish for target_naming: prefixed found by simulating the feature after #502. No change to what gets synced.

What changed

  1. Collision caused by prefixing. When a prefixed target is what makes two names clash (tracked _alpha/prototype becomes alpha-prototype, a local skill already has that name), the hint now says prefixed naming renamed a tracked skill and suggests renaming the other skill or re-tracking with --name, instead of "Rename one in SKILL.md", which a tracked skill cannot do. Other collisions keep the old hint.
  2. target add prints one info line when it writes mode: copy because the inherited naming is prefixed (global, project, --agent --config-dir). The Web API has no message or warnings field on target add, so it is unchanged.
  3. Prefixed outside copy mode is flagged before sync. status, doctor and target list (plain and --json, new warning field) report it. The sync/validation error and the target X --skills=true error now say how to fix it (set mode: copy on the target / set --mode copy first).
  4. The dim "N duplicate skill names (isolated by ...)" line is dropped. It printed on every sync when nothing was wrong, and before a failing sync. sync has no -v, and isolated duplicates are not a problem. The website docs and their i18n copies showed an outdated form of the collision output and now match.

Linked Issue

Context: #497 (prefixed naming, merged in #502). This PR does not close it.

Checks run (devcontainer)

  • make check (docs-check, fmt-check, lint, unit + integration tests): passed
  • Each new behavior had a test that failed before the change: integration tests in sync_target_naming_prefixed_test.go, target_skills_off_test.go, exclude_filter_test.go, and unit tests in internal/config/config_validate_test.go
  • python3 scripts/ai-context.py check: passed
  • /simplify on origin/main...HEAD (4 review agents; run before opening and again after the Codex fixes): reused one shared naming/mode check across status, doctor and target list (now TargetConfig.NamingModeConfigError), dropped a dead collisionInfo.Targets field and a duplicated Prefixed expression, rendered the TUI mode once, and made reportTargetAdded take a flag. Skipped larger refactors outside this diff (moving the cause of a prefix collision into internal/sync, one warning field on a shared target summary).
  • /code-review with fixed point origin/main (Standards + Spec agents; first before opening, again on the final branch): changed the CJK doc spacing, documented the warning JSON fields and doctor/status behaviour, added a unit test for the naming check, kept doctor's agents row for a flagged target, added the project-settings hint to ProjectNamingError, and updated the built-in skill's sync.md. No spec violation found.
  • Manual run of sync, status, doctor, target list, target add (global and project) against a prefixed + merge config
  • Not run: website build, Windows, E2E runbooks, a vhs screenshot of the changed target list TUI (covered by a render test only)

Not changed

  • target list interactive TUI detail view does not show the warning (needs a record-tui.sh screenshot pass).
  • API errors for PATCH /api/targets and /api/config have no hint; the PATCH validation is owned by runkids/fix-prefixed-followups.
  • target list shows merge for a target that inherits a top-level global mode: copy (existing behavior, not touched).

Checklist

  • I've read CONTRIBUTING.md
  • Tests included and passing (make check) — for code changes
  • No unrelated changes in the diff
  • Scope is focused — one concern per PR

Prefixed naming (#497) works, but several of its failure modes only showed up
at sync time or gave advice that cannot be followed:

- A collision that only prefixing creates told the user to "rename one in
  SKILL.md", which a tracked skill cannot do, and never said the prefix caused
  it. The hint now names the prefixing and points at renaming the other skill or
  re-tracking the repo with --name.
- `target add` silently wrote mode: copy when the inherited naming is prefixed.
  The CLI now says so.
- A target that resolves to prefixed outside copy mode was reported only by
  sync. status, doctor and target list (plain and JSON) now flag it, and the
  sync/validation and `--skills=true` errors say how to fix it.
- The dim "duplicate skill names (isolated by ...)" line printed on every sync
  even when nothing was wrong, and before a failing sync. Isolated duplicates
  are not a problem, so it is dropped; the website docs still showed an
  outdated form of this output and are corrected in all locales.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T15:41:01.188204Z a2514c2 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e927015e28

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/skillshare/target_list_tui.go Outdated
skillSyncText: skillSyncText,
agentConfig: config.ResourceTargetConfig{Mode: agentSummaryMode(agentSummary), Include: agentSummaryInclude(agentSummary), Exclude: agentSummaryExclude(agentSummary)},
agentSummary: agentSummary,
namingErr: t.SkillsConfig().NamingModeConfigError(cfg.Mode),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Surface naming errors in the interactive target list

When skillshare target list runs in an interactive terminal, it launches the TUI rather than the plain renderer. Although this field is populated, neither targetListDelegate.Render nor renderTargetDetail reads namingErr, so the default interactive command still hides the prefixed/merge misconfiguration; only --no-tui and --json expose it, contrary to the updated documentation that says target list flags the problem.

AGENTS.md reference: AGENTS.md:L15-L15

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 44d80ed. The interactive list row now marks the mode with ! and the detail panel shows a Warning row with the fix text. Covered by the new naming the mode cannot honour shows the fix case in TestRenderTargetDetail_AgentSection. I did not take a vhs screenshot of the TUI; it is covered by the render test only.

Comment thread cmd/skillshare/status.go
Comment on lines 327 to +330
res := getTargetStatusDetail(target, cfg.EffectiveSkillsSource(), mode)
if err := sc.NamingModeConfigError(mode); err != nil {
warnings = append(warnings, name+": "+err.Error())
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include naming-mode warnings in status JSON

For a prefixed target using merge or symlink mode, this warning is added only by the plain-text printTargetsStatus path. Both global and project status --json build statusJSONTarget entries directly and never invoke this check, while that schema contains neither target_naming nor a warning field, so JSON consumers cannot see or infer the configuration that sync will reject even though the updated docs state that status flags it.

AGENTS.md reference: AGENTS.md:L15-L15

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 44d80ed. Global and project status --json now add a warning string per target (omitted when empty), the same text as target list --json. Covered by the status --json entry in TestPrefixedNamingOutsideCopyMode_IsFlaggedBeforeSync; documented in reference/commands/status.md and its translations.

…json

Codex review of #503 found two surfaces the new check missed:

- The interactive `target list` (the default on a terminal) never read the
  item's naming error, so a prefixed + merge target looked healthy there. The
  list row now marks the mode with "!" and the detail panel shows the fix.
- `status --json` (global and project) builds its target entries directly, so
  scripts got no signal. Each target now carries a `warning` string, matching
  `target list --json`.
@runkids

runkids commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 44d80edd72

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/skillshare/sync.go
if len(global) == 0 && len(perTarget) == 0 {
// Duplicates that filters or naming keep apart are not a problem, so only collisions
// that reach a target are reported.
if len(perTarget) == 0 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update troubleshooting docs for silent isolated collisions

When include/exclude filters isolate duplicate names, CheckNameCollisionsForTargets leaves perTarget empty, so this new early return intentionally suppresses all output. However, website/docs/troubleshooting/common-errors.md:599 and its four localized counterparts still tell users that sync displays an informational message in this scenario. Update those pages to describe the new silent behavior, as the other collision documentation now does.

AGENTS.md reference: AGENTS.md:L15-L15

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 601983c. The tip in troubleshooting/common-errors.md and its four translations now says sync prints nothing about duplicates that filters isolate. I searched the docs for other mentions of an info message for isolated duplicates and found none. Docs-only change, so no test; make docs-check and ai-context.py check pass.

…uplicates

The collision troubleshooting tip still said sync shows an info message when
filters isolate duplicate skill names. That line was dropped, so the tip now
says sync prints nothing about them. Codex review of #503 flagged the stale
English page and its four translations.
@runkids

runkids commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 601983c2a5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/config/config.go
if err == nil {
return nil
}
return fmt.Errorf("%w; set mode: copy on the target", err)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Point managed-project warnings at the project settings

When a global projects: entry inherits target_naming: prefixed with a non-copy mode, its expanded <project>@<tool> targets also receive this suffix from sync, status, and doctor. Those targets cannot be edited under targets: or with skillshare target because LoadWithoutProjects explicitly removes expanded project targets; the actual fix is to set projects.<root>.skills.mode: copy (or use the Projects dashboard). Saying to set the mode “on the target” therefore directs this supported configuration to an unavailable remediation.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in f5cddbe and 9956fed. The hint now depends on whether the target belongs to a managed project: expanded <project>@<tool> targets (sync/validation, status, doctor, target list) and the projects: load check say set mode: copy in the project's skills settings; ordinary targets keep set mode: copy on the target. Covered by TestTargetConfig_NamingModeConfigError (managed project case), TestValidateConfigForSync_ManagedProjectPrefixedHintPointsAtProject and TestValidateConfig_ProjectPrefixedNamingRequiresCopyMode.

The "set mode: copy on the target" hint is wrong for a target a global
`projects:` entry expands into: it cannot be edited with `target` or under
`targets:`, and the mode lives in the project's skills settings. The hint now
depends on whether the target belongs to a managed project (Codex review of
#503).

The naming/mode check becomes a TargetConfig method so status, doctor and
target list share it, which also lets the hint see the project root. Along the
way: doctor reuses it, the TUI list renders the mode once, and
reportTargetAdded takes a flag instead of comparing a mode string.
ProjectNamingError (the config-load check for a global `projects:` entry) still
returned the bare naming error, so a project that inherits prefixed with a
non-copy mode got no fix. It now names the project's skills settings, like the
expanded targets do. The built-in skill's sync reference also mentions that
status, doctor and target list flag the misconfiguration before sync.

Found by the second /code-review pass on #503.
@runkids

runkids commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9956feda73

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/skillshare/sync.go Outdated
deduped[c.Name] = info
orderedNames = append(orderedNames, c.Name)
}
info.Prefixed = info.Prefixed || targetPrefixed && !inSource[c.Name]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Detect prefix involvement despite source duplicates

When a prefixed target contains _alpha/prototype plus two ordinary skills already named alpha-prototype, global already contains that name, so this condition leaves Prefixed false even though prefixing added another collision participant. The command consequently omits the --name/re-track remedy and instead says to rename one SKILL.md, which still leaves the tracked-versus-ordinary collision; this also contradicts the behavior documented in website/docs/understand/sync-modes.md:266. Determine prefix involvement from the resolved collision participants rather than from the name's absence in the global collision set.

AGENTS.md reference: AGENTS.md:L15-L15

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 3dd42a2. The check no longer looks at whether the name is also a duplicate in the source. A collision on a prefixed target that includes a tracked path (a _ repo folder) now gets the tracked-skill hint: A tracked skill cannot be renamed in SKILL.md: rename the other skill, or re-track the repo with --name. Covered by TestSync_TargetNamingPrefixed_CollisionHintStaysWhenSourceAlreadyHasDuplicates (a tracked skill plus two ordinary skills already named alpha-prototype). The docs wording in sync-modes and tracked-repositories (all locales) was updated to match.

reportCollisions decided a collision came from prefixing when its name was not
also a duplicate in the source. A tracked skill that joined two ordinary
skills already sharing the name was therefore sent to the "rename one in
SKILL.md" hint, which a tracked skill cannot follow (Codex review of #503).

A collision on a prefixed target that includes a tracked path now gets the
tracked-skill hint, whatever else shares the name. The wording no longer claims
prefixing renamed the skill, since a name that already starts with the repo
name is unchanged.
@runkids

runkids commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3dd42a2d7a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/skillshare/sync.go Outdated
// inTrackedRepo reports whether a source-relative skill path lies in a tracked repo,
// whose folder starts with "_".
func inTrackedRepo(relPath string) bool {
return slices.ContainsFunc(strings.Split(relPath, "/"), func(seg string) bool { return strings.HasPrefix(seg, "_") })

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Determine tracked status from discovered skill metadata

When a prefixed target collision includes an ordinary skill beneath a nested underscore directory such as org/_drafts/foo without a .git, discovery correctly records that skill as not tracked, but this path-only predicate still returns true. The collision report then suppresses the normal rename/filter guidance and incorrectly tells the user that the skill cannot be renamed and that they should re-track a nonexistent repository with --name; use the matching DiscoveredSkill.IsInRepo metadata instead.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 934945c. reportCollisions now looks up DiscoveredSkill.IsInRepo for each colliding path instead of testing for a _ segment, so an ordinary skill under org/_drafts (no .git) keeps the normal rename/filter hint. Covered by TestSync_TargetNamingPrefixed_UnderscoreFolderWithoutRepoIsNotTracked.

Comment thread website/docs/understand/sync-modes.md Outdated
- The name becomes what the tool shows; in Claude Code it is the slash command, e.g. `/mattpocock-skills-prototype`.

`prefixed` needs copy mode because merge links point at the source, where `name:` cannot change. A target that resolves to `prefixed` in merge or symlink mode fails validation and is skipped by sync. When a new target would inherit `prefixed` in a mode other than copy (a project target defaults to merge), `target add` gives it copy mode.
`prefixed` needs copy mode because merge links point at the source, where `name:` cannot change. A target that resolves to `prefixed` in merge or symlink mode fails validation and is skipped by sync. When a new target would inherit `prefixed` in a mode other than copy (a project target defaults to merge), `target add` gives it copy mode. `target add` says so when it does, and `status`, `doctor` and `target list` flag a target that resolves to `prefixed` without copy mode before you sync; the fix is `mode: copy` on the target.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Document the managed-project remediation

For a global projects: entry inheriting prefixed naming with merge or symlink mode, the expanded target cannot be edited with skillshare target; the required change is projects.<root>.skills.mode: copy. Although the runtime hint was fixed to point at the project settings, this newly added paragraph—and its localized copies—still directs users to set mode: copy on the target, leaving this supported configuration without an actionable documented remedy.

AGENTS.md reference: AGENTS.md:L15-L15

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 934945c. The prefixed paragraph in sync-modes.md and its four translations now also gives projects.<root>.skills.mode: copy as the fix for a target a projects: entry expands into. Docs-only; make check and ai-context.py check pass.

The collision hint treated any path segment starting with "_" as a tracked
repo, so an ordinary skill under a folder such as org/_drafts (no .git) was
told it could not be renamed and to re-track a repo that does not exist. It now
uses DiscoveredSkill.IsInRepo, the same signal prefixed naming uses.

The prefixed docs also gain the fix for a target a global `projects:` entry
expands into (projects.<root>.skills.mode: copy), since `target` cannot edit
those. Both from Codex review of #503.
@runkids

runkids commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 934945cf21

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/skillshare/sync.go Outdated
}
fmt.Println(theme.Dim().Render(line))
ui.Note(fmt.Sprintf("%-30s %s", name, strings.Join(dirs, " vs ")))
anyPrefixed, anyOther = anyPrefixed || info.Prefixed, anyOther || !info.Prefixed

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve both remedies for mixed collision types

When the same resolved name collides on both a prefixed target involving a tracked skill and another target involving only ordinary skills, info.Prefixed is ORed across all occurrences, so !info.Prefixed is false and the generic rename/filter guidance is suppressed. For example, re-tracking the repository can fix the prefixed collision while leaving the ordinary collision unresolved. Track prefixed and ordinary involvement independently while deduplicating so both applicable remedies are printed.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 6644d06. The grouped collision now keeps two independent flags (a tracked skill on a prefixed target, and a clash without one) and prints every hint that applies. Covered by TestSync_TargetNamingPrefixed_CollisionPrintsBothHintsAcrossTargets: a tracked skill plus two ordinary alpha-prototype skills, synced to a prefixed and a standard target.

The same name can clash on a prefixed target with a tracked skill and on
another target between ordinary skills only. The prefixed flag was OR-ed across
targets, so the second case lost its rename/filter hint. Track both kinds
separately while grouping, and print each hint that applies (Codex review of
#503).
@runkids

runkids commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6644d06ff4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/skillshare/sync.go Outdated
Comment on lines +786 to +787
trackedClash := targetPrefixed && slices.ContainsFunc(c.Paths, func(p string) bool { return tracked[p] })
info.Prefixed, info.Other = info.Prefixed || trackedClash, info.Other || !trackedClash

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve both remedies within mixed collision groups

When one prefixed target's collision contains a tracked skill and an independent ordinary duplicate pair—for example _alpha/prototype plus two ordinary skills named alpha-prototype—trackedClash makes Other false for the entire group. The output therefore prints only the tracked-skill remedy, even though re-tracking that repository leaves the two ordinary skills colliding and excluded. Set Other independently when at least two colliding paths are non-tracked so the rename/filter remedy is also shown.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in cfef0c5. Per collision, reportCollisions now counts tracked and non-tracked participants: the tracked-skill hint appears when a tracked skill clashes on a prefixed target, and the rename/filter hint also appears when two or more participants are not tracked. Covered by TestSync_TargetNamingPrefixed_CollisionHintStaysWhenSourceAlreadyHasDuplicates, which now also expects Rename one in SKILL.md. I extended that assertion together with the fix and did not run it red first.

When a tracked skill and two ordinary skills share a prefixed name, re-tracking
the repo fixes only the tracked one; the ordinary pair still clashes and is
excluded. The group now also shows the rename/filter hint when at least two of
its participants are not tracked (Codex review of #503).
@runkids

runkids commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cfef0c58db

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/skillshare/sync.go Outdated
anyPrefixed, anyOther = anyPrefixed || info.Prefixed, anyOther || info.Other
}
if anyPrefixed {
ui.Note("A tracked skill cannot be renamed in SKILL.md: rename the other skill, or re-track the repo with --name (prefixed naming puts the repo name in front)")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve filter guidance for same-repository collisions

For a prefixed target containing two tracked skills from the same repo with the same valid name (for example _repo/a/dup and _repo/b/dup), trackedClash leaves Other false, so this is the only remediation printed. Re-tracking the repo changes both skills to the same new prefix and does not resolve their collision, while the message also rules out renaming either tracked skill; include/exclude filters are the actionable remedy here, so retain that guidance or distinguish collisions between skills from the same repo.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 8a8cb9d, as a wording change rather than more branching: the tracked-skill hint now ends with or adjust include/exclude filters, so two tracked skills of one repo get a remedy that works. Covered by TestSync_TargetNamingPrefixed_SameRepoDuplicateStillOffersFilters. Two skills of one repo sharing a name is an upstream defect and rare; I did not add a separate same-repo check.

Two tracked skills of the same repo with the same name collide after
prefixing, and neither renaming a tracked skill nor re-tracking the repo
separates them. The hint now also names include/exclude filters, so every
collision on a prefixed target has an actionable remedy (Codex review of #503).
@runkids

runkids commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a8cb9da4f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread website/docs/understand/sync-modes.md Outdated
- The name becomes what the tool shows; in Claude Code it is the slash command, e.g. `/mattpocock-skills-prototype`.

`prefixed` needs copy mode because merge links point at the source, where `name:` cannot change. A target that resolves to `prefixed` in merge or symlink mode fails validation and is skipped by sync. When a new target would inherit `prefixed` in a mode other than copy (a project target defaults to merge), `target add` gives it copy mode.
`prefixed` needs copy mode because merge links point at the source, where `name:` cannot change. A target that resolves to `prefixed` in merge or symlink mode fails validation and is skipped by sync. When a new target would inherit `prefixed` in a mode other than copy (a project target defaults to merge), `target add` gives it copy mode. `target add` says so when it does, and `status`, `doctor` and `target list` flag a target that resolves to `prefixed` without copy mode before you sync; the fix is `mode: copy` on the target, or `projects.<root>.skills.mode: copy` for a target a `projects:` entry expands into.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Stop claiming target list flags managed-project targets

For a global target expanded from projects:, this sentence implies that target list will expose the invalid prefixed/non-copy configuration. However, every global list renderer builds its items through LoadWithoutProjects(), which applies OwnTargets() and removes expanded project targets (internal/config/projects.go:199-205; cmd/skillshare/target_list_tui.go:205-228), so the TUI, plain-text, and JSON lists cannot display this warning. Narrow the claim to status and doctor for managed-project targets, or include those targets in the list.

AGENTS.md reference: AGENTS.md:L15-L15

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in a2514c2. Confirmed: target list loads with LoadWithoutProjects(), so it never lists expanded project targets. sync-modes.md (all locales) and the built-in skill's sync.md now say status and doctor flag the misconfiguration and target list does so for targets under targets:. Docs-only; I also searched the docs and skill references for other copies of this claim and found none.

target list builds from the config without project expansion, so it cannot
flag a target a `projects:` entry expands into; status and doctor can. The
prefixed paragraph and the built-in skill reference said all three flag it
(Codex review of #503).
@runkids

runkids commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: a2514c26cc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@runkids
runkids merged commit b0d87fb into main Oct 9, 2026
8 checks passed
@runkids
runkids deleted the runkids/prefixed-naming-ux branch October 9, 2026 16:00
runkids added a commit that referenced this pull request Oct 9, 2026
Main gained the kept-legacy diff rows (#504), the manifestSymlink constant and prefixed-naming warnings (#503), and the BOM-tolerant frontmatter reader (#505). The diff stream checks the kept legacy entry before the copy-mode copy, since sync leaves a folder on a name held for a kept legacy entry alone; the docs keep both new rows.
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