Skip to content

feat: restore /close-issue slash command ergonomics via symlink to provider-agnostic procedure - #1344

Merged
atxtechbro merged 1 commit into
mainfrom
1343-reintroduce-close-issue-slash-command
Oct 9, 2025
Merged

feat: restore /close-issue slash command ergonomics via symlink to provider-agnostic procedure#1344
atxtechbro merged 1 commit into
mainfrom
1343-reintroduce-close-issue-slash-command

Conversation

@atxtechbro

Copy link
Copy Markdown
Owner

Git Statistics

.claude/commands/close-issue.md | 1 +
1 file changed, 1 insertion(+)

Summary

Restores /close-issue slash command autocomplete and ergonomics in Claude Code while maintaining provider-agnostic knowledge base architecture.

The Problem: Moving from .claude/commands/ to knowledge/procedures/ achieved AI provider agnosticism but lost Claude Code's UX benefits:

  • ❌ No slash command autocomplete
  • ❌ No /close-issue pattern recognition
  • ❌ Reduced discoverability

The Solution: Symlink strategy that bridges both worlds:

.claude/commands/close-issue.md → ../../knowledge/procedures/close-issue-procedure.md

What Changed

  • ✅ Created .claude/commands/ directory
  • ✅ Added symlink to close-issue-procedure.md
  • ✅ Single source of truth maintained (knowledge base)
  • ✅ Zero duplication (symlink ensures consistency)

Benefits

🎯 Best of Both Worlds:

  • Claude Code users get slash command autocomplete
  • Other AI providers still use natural language invocation
  • Knowledge base remains authoritative source
  • No maintenance burden from duplication

🔧 Technical:

  • Symlinks tracked in Git
  • Works across platforms
  • Simple, elegant solution
  • Follows "tracer bullet" approach

Testing

After merge, restart Claude Code and verify:

  1. /close-issue appears in autocomplete
  2. Command description is visible
  3. Slash command executes the procedure correctly

Implementation Notes

This "tracer bullet" approach meets halfway between:

  • Pure natural language invocation (provider-agnostic)
  • Dedicated slash commands (Claude Code ergonomics)

We leverage platform-specific features (Claude Code slash commands) without sacrificing portability (knowledge base procedures work everywhere).


Closes #1343

- Create symlink .claude/commands/close-issue.md → knowledge/procedures/close-issue-procedure.md
- Enables Claude Code slash command autocomplete and ergonomics
- Maintains provider-agnostic knowledge base as single source of truth
- No duplication: symlink ensures consistency across all AI providers

This "tracer bullet" approach meets halfway between pure natural language
invocation and dedicated slash commands, leveraging Claude Code's UX while
preserving AI provider agnosticism.

Closes #1343
@amazon-q-developer

Copy link
Copy Markdown
Contributor

Code review in progress. Analyzing for code quality issues and best practices. Detailed findings will be posted upon completion.

Using Amazon Q Developer for GitHub

Amazon Q Developer1 is an AI-powered assistant that integrates directly into your GitHub workflow, enhancing your development process with intelligent features for code development, review, and transformation.

Slash Commands

Command Description
/q <message> Chat with the agent to ask questions or request revisions
/q review Requests an Amazon Q powered code review
/q help Displays usage information

Features

Agentic Chat
Enables interactive conversation with Amazon Q to ask questions about the pull request or request specific revisions. Use /q <message> in comment threads or the review body to engage with the agent directly.

Code Review
Analyzes pull requests for code quality, potential issues, and security concerns. Provides feedback and suggested fixes. Automatically triggered on new or reopened PRs (can be disabled for AWS registered installations), or manually with /q review slash command in a comment.

Customization

You can create project-specific rules for Amazon Q Developer to follow:

  1. Create a .amazonq/rules folder in your project root.
  2. Add Markdown files in this folder to define rules (e.g., cdk-rules.md).
  3. Write detailed prompts in these files, such as coding standards or best practices.
  4. Amazon Q Developer will automatically use these rules when generating code or providing assistance.

Example rule:

All Amazon S3 buckets must have encryption enabled, enforce SSL, and block public access.
All Amazon DynamoDB Streams tables must have encryption enabled.
All Amazon SNS topics must have encryption enabled and enforce SSL.
All Amazon SNS queues must enforce SSL.

Feedback

To provide feedback on Amazon Q Developer, create an issue in the Amazon Q Developer public repository.

For more detailed information, visit the Amazon Q for GitHub documentation.

Footnotes

  1. Amazon Q Developer uses generative AI. You may need to verify generated code before using it in your environment. See the AWS Responsible AI Policy.

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review Summary

This PR attempts to restore Claude Code slash command functionality through a symlink strategy, which is a clever architectural approach. However, there's a critical implementation issue that prevents the solution from working as intended.

Critical Issues

  • Symlink Implementation Error: The current implementation creates a regular text file containing a path string instead of an actual symbolic link. This will not provide the intended functionality.

Minor Issues

  • Missing trailing newline (POSIX compliance)

Recommendation

The concept and architecture described in the PR description is sound - using symlinks to bridge Claude Code's slash command ergonomics with provider-agnostic procedures. However, the implementation needs to be corrected to actually create a symbolic link rather than a text file.

To fix this, you'll need to:

  1. Delete the current text file
  2. Create an actual symlink using git add with the symlink properly created via ln -s
  3. Ensure Git tracks it as a symlink (mode 120000)

The "tracer bullet" approach mentioned in the PR description is excellent, but this particular bullet missed its target due to the implementation detail. Once corrected, this should achieve the desired UX improvements while maintaining the architectural benefits.

@@ -0,0 +1 @@
../../knowledge/procedures/close-issue-procedure.md No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛑 Critical Implementation Error: This file contains a text path instead of creating an actual symlink. The current implementation creates a regular file with the content "../../knowledge/procedures/close-issue-procedure.md" rather than a symbolic link pointing to that file. This will not achieve the intended functionality described in the PR description. To create a proper symlink, you need to use Git's symlink functionality or create the symlink using ln -s ../../knowledge/procedures/close-issue-procedure.md .claude/commands/close-issue.md and then commit the resulting symlink.

@@ -0,0 +1 @@
../../knowledge/procedures/close-issue-procedure.md No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The file is missing a trailing newline, which violates POSIX standards and may cause issues with some tools. Most text editors and Git workflows expect files to end with a newline character.

@atxtechbro

Copy link
Copy Markdown
Owner Author

Thanks for the review! However, I can confirm this IS a proper symlink, not a text file.

Evidence:

$ git ls-files -s .claude/commands/close-issue.md
120000 4888dee40cf44252d3cc2615f3b2fd140f2bce05 0	.claude/commands/close-issue.md

$ ls -la .claude/commands/close-issue.md  
lrwxrwxrwx ... .claude/commands/close-issue.md -> ../../knowledge/procedures/close-issue-procedure.md

$ file .claude/commands/close-issue.md
.claude/commands/close-issue.md: symbolic link to ../../knowledge/procedures/close-issue-procedure.md

Explanation:

  • Git mode 120000 confirms this is stored as a symbolic link in Git
  • The l prefix in permissions (lrwxrwxrwx) indicates symlink type
  • GitHub's diff UI displays symlinks by showing their target path, which can appear like file content but is actually the standard way GitHub renders symlink diffs
  • The symlink resolves correctly: cat .claude/commands/close-issue.md successfully reads the target file content

The implementation is correct and will function as intended after merge and Claude Code restart. 🎯

@atxtechbro
atxtechbro merged commit 7c4eb14 into main Oct 9, 2025
2 checks passed
atxtechbro added a commit that referenced this pull request Oct 9, 2025
Transforms dotfiles into a Claude Code plugin that can be installed in any repo.

**The Problem**: PR #1344 added /close-issue via symlink in dotfiles, but other repos
(like lifehacking) can't access it. The old command generation system was removed in #1320.

**The Solution**: Use Claude Code's official plugin system to share commands:
```
.claude-plugin/
├── plugin.json              # Plugin metadata
├── marketplace.json         # Distribution manifest
└── commands/                # Symlinked to knowledge base
    ├── close-issue.md
    ├── create-issue.md
    ├── extract-best-frame.md
    └── retro.md
```

## Installation in Other Repos

**Local (for testing):**
```bash
/plugin marketplace add ~/ppv/pillars/dotfiles
/plugin install dotfiles-commands
```

**GitHub (after merge):**
```bash
/plugin marketplace add atxtechbro/dotfiles
/plugin install dotfiles-commands@atxtechbro
```

## Benefits

- ✅ Official Claude Code extension system (modern approach)
- ✅ Commands shareable across all repos via plugin install
- ✅ Single source of truth (knowledge base remains authoritative)
- ✅ Expandable with agents, hooks, MCP servers later
- ✅ Per-repo control (install only where needed)

Principles: systems-stewardship (single source of truth), dotfiles-as-plugin (shareable setup)
atxtechbro added a commit that referenced this pull request Oct 9, 2025
)

Transforms dotfiles into a Claude Code plugin that can be installed in any repo.

**The Problem**: PR #1344 added /close-issue via symlink in dotfiles, but other repos
(like lifehacking) can't access it. The old command generation system was removed in #1320.

**The Solution**: Use Claude Code's official plugin system to share commands:
```
.claude-plugin/
├── plugin.json              # Plugin metadata
├── marketplace.json         # Distribution manifest
└── commands/                # Symlinked to knowledge base
    ├── close-issue.md
    ├── create-issue.md
    ├── extract-best-frame.md
    └── retro.md
```

## Installation in Other Repos

**Local (for testing):**
```bash
/plugin marketplace add ~/ppv/pillars/dotfiles
/plugin install dotfiles-commands
```

**GitHub (after merge):**
```bash
/plugin marketplace add atxtechbro/dotfiles
/plugin install dotfiles-commands@atxtechbro
```

## Benefits

- ✅ Official Claude Code extension system (modern approach)
- ✅ Commands shareable across all repos via plugin install
- ✅ Single source of truth (knowledge base remains authoritative)
- ✅ Expandable with agents, hooks, MCP servers later
- ✅ Per-repo control (install only where needed)

Principles: systems-stewardship (single source of truth), dotfiles-as-plugin (shareable setup)
@atxtechbro
atxtechbro deleted the 1343-reintroduce-close-issue-slash-command branch October 10, 2025 08:30
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.

feat: restore /close-issue slash command ergonomics via symlink to provider-agnostic procedure

1 participant