Skip to content

feat(sync): add the link commands - #998

Open
ctawiah wants to merge 1 commit into
ctawiah/sync-source-planner-3bbffrom
ctawiah/sync-link-command-3bbf
Open

ctawiah wants to merge 1 commit into
ctawiah/sync-source-planner-3bbffrom
ctawiah/sync-link-command-3bbf

Conversation

@ctawiah

@ctawiah ctawiah commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Context

Users need one link command for each resource kind.

What changes

  • Add sync prompts link, sync tools link, and sync skills link from one command builder.
  • Read the --file, --format, --select, and --map flags and run the link workflow.
  • Add the CLI acceptance test for link and detach.

Design notes

  • The three commands share one implementation. Only the target flags and the examples differ.

Review focus

  • Do all three resource kinds use one workflow?
  • Do plain text and JSON show the same problem?

Verification

  • make build
  • go test ./...
  • golangci-lint run ./...

Related changes

  1. refactor(sync): remove Phase 1 source references #1005: Phase 1 reference removal
  2. feat(sync): add projection and problem core #987: projection and problem core
  3. feat(sync): add the adapter core and the Markdown adapter #988: adapter core and Markdown
  4. feat(sync): add the structured document adapters #989: structured adapters
  5. feat(sync): add the Python adapter #991: Python adapter
  6. feat(sync): add the TypeScript and JavaScript adapters #992: TypeScript and JavaScript adapters
  7. feat(sync): add source descriptor storage #993: descriptor storage
  8. feat(sync): compile and publish repository sources #994: compile and publish
  9. feat(sync): detach descriptor-backed sources #1003: descriptor detach
  10. feat(sync): prepare repository source links #997: link preparation
  11. feat(sync): integrate repository sources with planning and link #995: planning and link
  12. This PR: link commands

🤖 Generated with Claude Code


Note

Overview
Adds sync prompts link, sync tools link, and sync skills link via a shared newLinkCmd builder. Each command takes --file, --format, optional --select and repeatable --map field=path, targets exactly one resource (--project, one --key, and --config-key for variations), then runs SourceLinkAction to write a .ref.yaml descriptor and sync.

Sync CLI errors now serialize structured Problem values: ProblemsFrom walks joined/plan errors, JSON keeps stable fields (or a multiple_problems wrapper with a problems array), and plaintext inlines resource and file:line:column into messages.

Tests cover link flag wiring, target validation, error rendering (JSON vs plaintext), exact flag sets for the new subcommands, and an acceptance path that links a markdown source then detaches the descriptor.

Reviewed by Cursor Bugbot for commit 88afafc. Bugbot is set up for automated code reviews on this repo. Configure here.

@ctawiah
ctawiah added this pull request to stack #1000 October 30, 2026 20:15
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch 2 times, most recently from 9a5d051 to 4bb07e8 Compare November 2, 2026 02:26
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch from 4bb07e8 to c436010 Compare November 2, 2026 02:50
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch from c436010 to 6e5601f Compare November 3, 2026 00:29
@ctawiah ctawiah changed the title feat(sync): add source link command workflow feat(sync): add the link commands Nov 3, 2026
@ctawiah
ctawiah removed this pull request from stack #1000 November 3, 2026 00:32
@ctawiah
ctawiah changed the base branch from ctawiah/sync-link-preparation-3bbf to ctawiah/sync-source-planner-3bbf November 3, 2026 00:34
@ctawiah
ctawiah added this pull request to stack #1004 November 3, 2026 00:34
@ctawiah
ctawiah removed this pull request from stack #1004 November 3, 2026 00:53
@ctawiah
ctawiah added this pull request to stack #1006 November 3, 2026 00:53
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch from 6e5601f to 823507a Compare November 4, 2026 19:46
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch from 823507a to 8f85f0d Compare November 4, 2026 21:54
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch from b0a7557 to 4d44900 Compare November 5, 2026 19:27
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch from 4d44900 to c5812ac Compare November 5, 2026 21:58
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch from c5812ac to 57759c6 Compare November 5, 2026 22:44
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch from 57759c6 to 7f90249 Compare November 6, 2026 14:46

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread cmd/sync/prompt.go Resolved
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch from 7f90249 to 9424587 Compare November 6, 2026 15:19

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread cmd/sync/prompt.go Resolved
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch from 9424587 to 222c726 Compare November 6, 2026 15:48
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch from 222c726 to a241231 Compare November 6, 2026 16:15
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch from a241231 to c090ade Compare November 6, 2026 16:47
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch from c090ade to 556ab08 Compare November 6, 2026 17:13
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch from 556ab08 to a089e4f Compare November 6, 2026 17:39
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch from a089e4f to 18c5632 Compare November 6, 2026 18:02
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch from 18c5632 to a25d0c9 Compare November 6, 2026 18:30
@ctawiah
ctawiah force-pushed the ctawiah/sync-link-command-3bbf branch from a25d0c9 to 5d97129 Compare November 6, 2026 19:09

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9a64de9. Configure here.

Comment thread cmd/sync/prompt.go Resolved
Add one link command for prompts, tools, and skills. The command reads the file, format, select, and map flags, and runs the link workflow.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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