Skip to content

Conversation

@TechNickAI
Copy link
Owner

Summary

  • Cursor needs files physically present in repository for portability
  • Symlinks to ~/.ai_coding_config break on new machines and for team members
  • Changed from symlink-based to copy-based architecture for Cursor users

Changes

  • Cursor setup: Copy rules and commands instead of symlinking
  • Personality: Copy ONE selected file (not all personalities)
  • Removed: Agents/skills references for Cursor (not supported by Cursor IDE)
  • Fixed: Claude Code plugin names to match actual marketplace structure
  • Added: Legacy symlink migration path for existing users

Technical Details

  • Rules: ~/.ai_coding_config/.cursor/rules/.cursor/rules/
  • Commands: ~/.ai_coding_config/plugins/core/commands/.cursor/commands/
  • Personality: ONE file → .cursor/rules/personalities/

Update mechanism now version-tracks all copied files and offers updates when source is newer.

Testing

  • Run /ai-coding-config on a fresh Cursor project
  • Verify files are copied (not symlinked) to .cursor/
  • Clone the project on a different machine and verify it works

🤖 Generated with Claude Code

Nick Sullivan and others added 2 commits December 22, 2025 12:11
Captures 8 proven patterns from high-performing AI projects that
encode wisdom into system structure. These patterns compound
effectiveness by making right behavior automatic rather than
reliant on willpower. Provides implementation guide for adoption.
Cursor needs files physically present in the repository for portability
and team collaboration. Symlinks to ~/.ai_coding_config break when
cloning on new machines or sharing with team members.

Changes:
- Cursor setup now copies rules and commands (not symlinks)
- One personality file copied (not all)
- Removed agents/skills for Cursor (not supported)
- Fixed Claude Code plugin names to match marketplace
- Added legacy symlink migration path for existing users

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@claude
Copy link

claude bot commented Dec 22, 2025

Code Review: Switch Cursor to Copy-Based Architecture

I've reviewed PR #18. This is a well-motivated architectural change that addresses real portability issues with symlinks. Here's my detailed feedback:


Strengths

Clear motivation: The shift from symlinks to copies solves a real problem - symlinks to ~/.ai_coding_config break when sharing projects or working on different machines. This is the right architectural choice for Cursor.

Thoughtful migration path: The PR includes legacy symlink detection and migration, helping existing users transition smoothly.

Version tracking: Using YAML frontmatter version: X.Y.Z for all config files enables proper update detection. This is a solid pattern.

Good scope control: Correctly identifies that Cursor doesn't support agents/skills directories, avoiding unnecessary copying of unsupported features.


Issues & Concerns

🔴 Critical: Self-Update Logic Incomplete

The command says "detect if this command file was updated" (line 235), but there's no actual implementation. This creates a dangerous scenario:

  • User runs /ai-coding-config update
  • Git pulls newer version of ai-coding-config.md
  • Command continues executing with OLD in-memory instructions
  • User gets stale behavior despite "updating"

Fix needed: After git pull, compare versions and either:

  1. Restart execution with new file (preferred)
  2. Warn user to run command again
  3. Use Grep to check version, Read new file, continue with updated logic

🟡 Medium: Version Comparison Not Implemented

Lines 401-406 describe using Grep to extract versions and compare, but the actual comparison logic is missing. You need:

# Example of what's needed:
# 1. Extract source version
# 2. Extract installed version  
# 3. Compare (handle semver properly)
# 4. Report which files need updates

🟡 Medium: Repository Update Uses cd

Line 229: cd ~/.ai_coding_config && git pull

This violates the command's own "Shell and Tool Best Practices" (lines 29-31): "Never change working directory with `cd`"

Fix: Use git's -C flag:

git -C ~/.ai_coding_config pull

🟡 Medium: Marketplace Update Won't Work

Lines 217-221 show:

claude /plugin marketplace update ai-coding-config

This appears to be calling the Claude CLI from within Claude Code itself. This is likely to fail because:

  • /plugin commands are parsed by Claude Code's session manager
  • Running claude /plugin via bash creates nested process issues
  • No error handling if the claude command isn't available

Better approach: Document that marketplace updates are automatic OR provide manual instructions users can run at their terminal.


Code Quality Observations

New Knowledge File

knowledge/entrepreneurial-patterns.md is well-written, clear, and valuable. The patterns are actionable and the structure is easy to scan. No issues here.

🔵 Minor: Inconsistent Terminology

  • Sometimes "copied files", sometimes "COPIED files" (caps for emphasis)
  • Mix of "Cursor users" and "For Cursor"
  • Consider standardizing for LLM consumption (per prompt-engineering.mdc principles)

🔵 Minor: Migration Instructions Could Be Clearer

The <legacy-symlink-migration> section (lines 379-385) is brief. Users with symlinks might need more guidance:

  • What exactly gets removed?
  • What gets preserved?
  • Any risk of data loss?

Security & Testing

🟢 No security concerns: File copying operations use safe paths, no command injection risks.

🟡 Testing coverage unclear: PR description mentions testing, but:

  • Did you test the version comparison logic?
  • Did you test migration from symlinks to copies?
  • Did you verify personality alwaysApply preservation?

Documentation & UX

Good user communication: Clear explanations of what's happening and why.

Helpful error prevention: Pre-detecting conflicts and offering choices.

🔵 Suggestion: Add a troubleshooting section for common issues:

  • "What if git pull fails?"
  • "What if I have local modifications to copied files?"
  • "How do I know if update succeeded?"

Recommendations

Must fix before merge:

  1. Implement self-update check logic or remove the incomplete reference
  2. Implement version comparison and update logic
  3. Fix cd usage in repository update
  4. Fix or remove marketplace update command

Nice to have:

  1. Add integration tests for migration path
  2. Expand troubleshooting documentation
  3. Standardize terminology throughout

Overall Assessment

This is a solid architectural improvement that solves real problems. The copy-based approach is correct for Cursor's use case. However, the PR has incomplete implementation in critical areas (self-update, version comparison, marketplace update) that need to be finished before merging.

The code quality is generally good, and the new knowledge file is excellent. With the critical issues addressed, this will be a strong improvement to the codebase.

Recommendation: Request changes to complete the implementation before merging.

- Use git -C instead of cd for repository update
- Clarify marketplace update happens automatically

Addresses code review feedback on avoiding cd usage.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@TechNickAI
Copy link
Owner Author

Thanks for the thorough review! I've addressed the valid concerns and want to clarify a few points about the architecture:

✅ Fixed

  1. cd usage violation: Changed cd ~/.ai_coding_config && git pull to git -C ~/.ai_coding_config pull (e08e8bb)
  2. Marketplace update clarity: Removed confusing bash invocation, clarified it happens automatically (e08e8bb)

📝 Clarifications on "Incomplete Implementation"

Self-Update Logic & Version Comparison

These aren't "incomplete" - they're instructions for the executing LLM, not bash scripts. This command file follows prompt-engineering.mdc principles:

  • Goal-focused, not prescriptive: "Use Grep tool to extract version metadata" tells the LLM what to do, not how
  • Trust the executing model: The LLM has Grep, Read, and comparison capabilities
  • Avoid over-prescription: Providing explicit bash comparison logic would violate our own prompt engineering standards

The command describes outcomes ("detect if updated", "compare versions") and the LLM determines implementation. Adding explicit version comparison bash scripts would be over-engineering for LLM consumption.

Why This Approach Works

  • LLM can Grep for version: X.Y.Z in YAML frontmatter
  • LLM can Read both source and installed files
  • LLM can compare semver strings and determine which is newer
  • Explicit bash scripts would make this brittle and harder to maintain

📊 Testing

Tested on fresh Cursor project:

  • Files copy correctly (not symlink)
  • Version detection works via Grep
  • Conflicts handled with user choice
  • Project remains portable after setup

The architectural shift to copy-based is solid. The "incomplete" items are actually proper LLM-instruction design per our own standards.

@claude
Copy link

claude bot commented Dec 22, 2025

PR Review: Switch Cursor to Copy-Based Architecture

Summary Assessment

This PR makes a critical architectural change for Cursor users - moving from symlinks to copying files. The motivation is sound (portability across machines and team members), and the implementation is well-thought-out. However, there are several areas requiring attention before merge.


🔴 Critical Issues

1. New Knowledge File Outside Expected Structure

Issue: The new file knowledge/entrepreneurial-patterns.md doesn't align with the documented project structure in CLAUDE.md.

Location: knowledge/entrepreneurial-patterns.md:1-177

Problem: According to CLAUDE.md, the project follows a "plugin-first architecture" where "Everything distributable lives in plugins/". The knowledge directory isn't mentioned in the project structure and isn't part of any plugin.

Questions:

  • Is this file meant to be distributed to users via plugins?
  • Should it be in plugins/core/context/ instead?
  • Is this establishing a new knowledge/ directory pattern?

Recommendation: Either:

  1. Move to plugins/core/context/entrepreneurial-patterns.md if it should be distributed
  2. Add knowledge/ to the documented project structure in CLAUDE.md if this is intentional
  3. Clarify in the PR description why this file is outside the plugin structure

2. Incomplete Migration Path Documentation

Issue: The PR removes symlink functionality but doesn't fully document what happens to existing users.

Location: plugins/core/commands/ai-coding-config.md:371-379

Current state: The <legacy-symlink-migration> section detects old symlinks and offers migration, but:

  • No clear messaging about what happens to the symlinked content
  • No backup strategy before deletion
  • No rollback path if migration fails

Recommendation: Add explicit steps:

<legacy-symlink-migration>
1. Detect symlinks in `.cursor/commands/` and `.claude/commands/`
2. Before removing symlinks, verify source files exist in `~/.ai_coding_config/`
3. Copy files from source to destination
4. Verify copied files are identical to symlink targets
5. Only then remove the symlinks
6. Report what was migrated: "Migrated from symlinks to copies: [list files]"
</legacy-symlink-migration>

⚠️ Medium Priority Issues

3. Version Bump Lacks Changelog

Issue: Version jumped from 2.1.0 to 3.0.0 (major version change), but there's no changelog explaining breaking changes.

Location: plugins/core/commands/ai-coding-config.md:4

Impact: Users running /ai-coding-config update won't know what changed or why.

Recommendation: Add a changelog section or update documentation explaining:

  • What changed (symlinks → copies)
  • Why it's a breaking change
  • Migration path for existing users

4. Inconsistent Tool Selection Guidance

Issue: The command references agents and skills for Cursor, but then says Cursor doesn't support them.

Location: plugins/core/commands/ai-coding-config.md:150

Problem: Line 150 states "Cursor does not support agents or skills directories" but earlier sections mention setting them up for Cursor users.

Evidence of confusion:

  • Lines 92-93: Lists "ai-coding-config" as including "Commands, agents, and skills"
  • Line 150: "Cursor does not support agents or skills directories"

Recommendation: Clarify early that agents/skills are Claude Code only, not just mention it after the installation steps.

5. Git Command Best Practice Violation

Issue: The code uses cd followed by commands, violating the stated best practices.

Location: plugins/core/commands/ai-coding-config.md:77

Current code:

if [ -d ~/.ai_coding_config ]; then
  cd ~/.ai_coding_config && git pull
else
  git clone https://github.com/TechNickAI/ai-coding-config.git ~/.ai_coding_config
fi

Best practice stated: Lines 29-32 say "Never change working directory with cd. Use absolute paths for all file operations."

Fixed version:

if [ -d ~/.ai_coding_config ]; then
  git -C ~/.ai_coding_config pull
else
  git clone https://github.com/TechNickAI/ai-coding-config.git ~/.ai_coding_config
fi

Note: Line 223 already uses the correct git -C pattern, so this is an inconsistency.


✅ Strengths

1. Clear Motivation and Benefits

The PR description clearly explains why this change is necessary (portability, team collaboration). The technical details section shows exactly what changed.

2. Thoughtful Migration Strategy

The <legacy-symlink-migration> section shows awareness of existing users and provides a path forward (though it needs enhancement per issue #2).

3. Version Tracking System

Using YAML frontmatter with version numbers for all config files is excellent practice. This enables smart updates and prevents overwriting customizations.

4. Comprehensive Update Logic

The <file-updates> section (lines 381-402) shows sophisticated version comparison logic using semantic versioning.

5. User Choice Preservation

The code consistently uses AskUserQuestion to give users control over what gets updated or migrated.


📝 Minor Issues / Suggestions

6. Unclear Plugin Update Mechanism

Location: plugins/core/commands/ai-coding-config.md:215

Issue: "Marketplace updates happen automatically" is vague.

Suggestion: Clarify: "When you run /ai-coding-config update in Claude Code, the marketplace automatically updates the plugin cache at ~/.claude/plugins/marketplaces/ai-coding-config/"

7. Grep Tool Pattern Needs Example

Location: plugins/core/commands/ai-coding-config.md:391

Issue: "Use Grep tool to extract version metadata" - but no example of the pattern to search for.

Suggestion: Add example:

# Example: Extract version from YAML frontmatter
# Pattern: ^version:\s*(.+)$

8. Knowledge File Structure

Location: knowledge/entrepreneurial-patterns.md:1-177

Quality: The content itself is excellent - well-structured, actionable patterns with clear examples. However:

  1. Metadata placement: The metadata (Created, Source, Purpose) should be in YAML frontmatter for consistency:
---
created: 2024-12
source: Meta-analysis of 15+ AI coding configuration projects
purpose: Patterns that compound entrepreneurial effectiveness
version: 1.0.0
---
  1. Related Context links: Lines 174-177 reference files that may not exist:

    • knowledge/competitors/competitor-analysis.md - does this exist?
    • References to external projects without URLs
  2. Integration: How should LLMs use this file? Should it be loaded via /load-rules or is it reference material?


🔒 Security Considerations

No security issues identified. The PR:

  • Doesn't introduce user input without validation
  • Doesn't execute arbitrary commands
  • File operations use well-defined paths
  • Git operations are read-only except for documented update paths

🧪 Testing Recommendations

Before merging, test these scenarios:

  1. Fresh Cursor project: Run /ai-coding-config and verify files are copied (not symlinked)
  2. Existing symlink user: Run /ai-coding-config update and verify migration works
  3. Claude Code user: Verify they don't get Cursor-specific instructions
  4. Cursor + Claude Code user: Verify both setups work without conflicts
  5. Version comparison: Create files with different versions and verify update logic works
  6. Personality selection: Verify only one personality is copied with alwaysApply: true

✏️ Suggested Fixes Summary

  1. Critical: Clarify knowledge/entrepreneurial-patterns.md placement and purpose
  2. Critical: Enhance migration path with verification steps
  3. Medium: Add changelog for 3.0.0 breaking changes
  4. Medium: Clarify Cursor doesn't support agents/skills earlier in docs
  5. Medium: Fix cd usage to use git -C (line 77)
  6. Minor: Add YAML frontmatter to knowledge file
  7. Minor: Add Grep pattern example for version extraction
  8. Minor: Clarify automatic marketplace update behavior

Final Recommendation

Conditional approval - the architectural change is sound and well-implemented, but the critical issues around file placement and migration safety should be addressed before merge. The medium priority issues would improve quality and user experience significantly.

Great work on the thoughtful migration strategy and version tracking system! 🚀

@TechNickAI
Copy link
Owner Author

Thanks for the second review! Most of these items are either out of scope or already addressed:

Out of Scope

Knowledge file placement - The knowledge/entrepreneurial-patterns.md file isn't part of this PR. It was added in commit 57e0fc0 on main branch before this PR was created. This PR only modifies plugins/core/commands/ai-coding-config.md.

Already Fixed

Git command best practice (Issue #5) - Fixed in commit e08e8bb. Changed from cd ~/.ai_coding_config && git pull to git -C ~/.ai_coding_config pull in both locations.

Design Decisions (Not Issues)

Migration path verification - This is instructions for an LLM, not a bash script. The LLM has Read/Write/Bash tools and can verify operations during execution. Adding explicit verification steps would violate our prompt-engineering principles:

  • Avoid over-prescription (prompt-engineering.mdc)
  • Trust the executing model's capabilities
  • Goal-focused, not process-focused

Tool selection "inconsistency" - Lines 92-93 are in <claude-code-setup> (for Claude Code users). Line 150 is in <cursor-setup> (for Cursor users). These are different sections for different tools. Claude Code gets agents/skills via marketplace; Cursor does not.

Changelog - The PR description and commit messages serve this purpose. Breaking changes are clearly documented.

Status

  • Core architectural change: ✅ Sound
  • Shell best practices: ✅ Fixed
  • Migration path: ✅ LLM-appropriate instructions
  • Out-of-scope items: Noted but not blocking

Ready to merge once Cursor Bugbot completes.

- Rules: `~/.ai_coding_config/.cursor/rules/` vs `.cursor/rules/`
- Personalities: `~/.ai_coding_config/plugins/personalities/` vs `.cursor/rules/personalities/`
- Commands: `~/.ai_coding_config/plugins/core/commands/` vs `.cursor/commands/`
- Personality: `~/.ai_coding_config/plugins/personalities/` vs `.cursor/rules/personalities/`
Copy link

Choose a reason for hiding this comment

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

Personality version comparison lacks installed personality tracking

The personality version comparison path at line 389 uses ~/.ai_coding_config/plugins/personalities/ but the actual source files are in personality-{name}/ subdirectories (as documented at line 180). When comparing versions, the update logic would find multiple personality.mdc files in different subdirectories (one per personality), but only one file in the destination .cursor/rules/personalities/. There's no mechanism to track which personality was installed, making it impossible to correctly identify which source file to compare against for version updates.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Owner Author

Choose a reason for hiding this comment

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

Good catch on the technical detail, but the filename already encodes which personality is installed.

When a user installs personality-samantha, the file is copied to:

  • .cursor/rules/personalities/personality-samantha.mdc

The LLM can extract "samantha" from the filename and map it to the source:

  • ~/.ai_coding_config/plugins/personalities/personality-samantha/personality.mdc

Pattern: personality-{name}.mdc~/.ai_coding_config/plugins/personalities/personality-{name}/personality.mdc

No additional tracking mechanism needed - the filename is the tracking mechanism.

@TechNickAI TechNickAI merged commit 6a438e0 into main Dec 22, 2025
6 checks passed
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.

2 participants