Skip to content

Contributing

Thank you for your interest in contributing to CMS Cultivator! This document provides guidelines for contributing to the project.


Getting Started

Prerequisites

  • Git
  • Python 3.x (for MkDocs documentation)
  • Claude Code CLI (for testing commands)
  • Basic knowledge of Markdown

Setting Up Development Environment

  1. Fork the repository on GitHub

  2. Clone your fork:

    git clone https://github.com/YOUR-USERNAME/cms-cultivator.git
    cd cms-cultivator
    

  3. Install MkDocs (for documentation):

    pip install mkdocs-material
    pip install mkdocs-git-revision-date-localized-plugin
    

  4. Test the plugin locally:

    # Link to Claude Code plugins directory
    ln -s $(pwd) ~/.config/claude/plugins/cms-cultivator
    claude plugins enable cms-cultivator
    


Making Changes

Adding a New Command

  1. Create command file in /commands/:

    touch commands/my-new-command.md
    

  2. Add frontmatter at the top:

    ---
    description: Brief description of what the command does
    argument-hint: [optional-arg]
    allowed-tools: Bash(git:*), Read, Glob, Grep, Write
    ---
    

  3. Write command documentation:

  4. Clear usage instructions
  5. Example outputs
  6. Drupal/WordPress-specific considerations
  7. Integration with Kanopi tools (if applicable)

  8. Test the command:

    # In Claude Code
    /my-new-command
    

  9. Add to documentation:

  10. Update docs/commands/overview.md
  11. Add detailed guide if needed

Updating Existing Commands

  1. Modify command file in /commands/

  2. Test thoroughly:

  3. Try different arguments
  4. Test with both Drupal and WordPress projects
  5. Verify Kanopi tool integration

  6. Update documentation if behavior changed

Improving Documentation

  1. Edit files in /docs/

  2. Preview locally:

    mkdocs serve
    # Visit http://localhost:8000
    

  3. Build to verify:

    mkdocs build --strict
    


Coding Standards

Command Files (.md)

  • Use clear, descriptive headings
  • Include code examples with proper syntax highlighting
  • Provide both Drupal and WordPress examples where applicable
  • Document all arguments and focus options
  • Include expected output examples

Documentation

  • Write in clear, concise language
  • Use proper Markdown formatting
  • Include code examples with syntax highlighting
  • Add admonitions for warnings/tips:
    !!! warning
        Important warning text
    
    !!! tip
        Helpful tip text
    

Frontmatter

  • description: Brief one-line description
  • argument-hint: Show optional arguments in square brackets
  • allowed-tools: List all tools the command can use

Pull Request Process

  1. Create a branch from main:

    git checkout -b feature/my-new-feature
    

  2. Make your changes:

  3. Follow coding standards
  4. Add/update documentation
  5. Test thoroughly

  6. Commit your changes:

    git add .
    git commit -m "feat: add new command for X"
    

Use Conventional Commits: - feat: - New feature - fix: - Bug fix - docs: - Documentation changes - refactor: - Code refactoring - test: - Adding tests - chore: - Maintenance

  1. Push to your fork:

    git push origin feature/my-new-feature
    

  2. Create Pull Request on GitHub:

  3. Provide clear description
  4. Reference any issues
  5. Add screenshots if relevant

  6. Address review feedback:

  7. Make requested changes
  8. Push updates to same branch

Testing Guidelines

Manual Testing

  1. Install plugin locally:

    claude plugins enable cms-cultivator
    

  2. Test command variations:

  3. Without arguments
  4. With different focus options
  5. In Drupal project
  6. In WordPress project

  7. Verify Kanopi integration:

  8. Test with ddev composer commands
  9. Verify ddev custom commands work

Documentation Testing

# Build docs locally
mkdocs build --strict

# Serve docs locally
mkdocs serve

Code of Conduct

Our Pledge

We are committed to providing a welcoming and inclusive environment for all contributors.

Expected Behavior

  • Be respectful and considerate
  • Provide constructive feedback
  • Focus on what is best for the community
  • Show empathy towards others

Unacceptable Behavior

  • Harassment or discriminatory language
  • Personal attacks
  • Publishing others' private information
  • Other unethical or unprofessional conduct

Getting Help


Recognition

Contributors will be recognized in: - CHANGELOG.md for significant contributions - GitHub contributors page - Project documentation (where applicable)


License

By contributing to CMS Cultivator, you agree that your contributions will be licensed under the GPL-2.0-or-later license.


Thank you for contributing to CMS Cultivator! 🎉