Usage Examples

Real-world scenarios demonstrating effective use of the Tech Stack plugin for establishing coding standards.

Examples

New TypeScript Project Setup

Scenario: You're starting a new TypeScript API project and want to establish coding standards from the beginning.

# Initialize Claude configuration
claude /init

# Create project constitution
/sdd:00-setup TypeScript REST API with Express and PostgreSQL

# Add TypeScript best practices
/tech-stack:add-typescript-best-practices

# Verify the configuration
cat CLAUDE.md

Expected Flow:

  1. Claude creates initial CLAUDE.md with project basics

  2. SDD establishes architectural principles in specs/constitution.md

  3. Tech Stack adds TypeScript-specific coding standards to CLAUDE.md

  4. Your project now has comprehensive development guidelines

Result in CLAUDE.md:

Onboarding Existing Project

Scenario: You have an existing TypeScript codebase that needs standardized coding guidelines for the team.

Expected Flow:

  1. Tech Stack adds standardized TypeScript guidelines

  2. Existing CLAUDE.md content is preserved

  3. You can customize the added guidelines to match your project

When to Customize:

Your team may have different preferences. After running the command, consider:

  • Removing library recommendations that don't match your stack

  • Adding project-specific type naming conventions

  • Including framework-specific patterns (NestJS, Next.js, etc.)

Team Standardization

Scenario: Your team wants consistent AI-generated code across all developers.

Benefits:

  • All team members' Claude instances follow the same rules

  • Code reviews have consistent standards to reference

  • New team members immediately work with established patterns

  • AI-generated code matches team conventions

Combined with Code Formatting

Scenario: You want both language best practices and code formatting standards.

Result:

Your CLAUDE.md will contain:

  1. TypeScript Best Practices (from Tech Stack)

    • Type system guidelines

    • Library recommendations

    • Code quality patterns

  2. Code Formatting Rules (from DDD)

    • Clean Architecture principles

    • SOLID patterns

    • Formatting standards

Feature Development with Standards

Scenario: Implementing a new feature while ensuring it follows established TypeScript practices.

Claude's Implementation Will Follow:

  • Use interfaces for user and token types

  • Use enums for authentication states

  • Apply type guards for token validation

  • Use established libraries (e.g., jsonwebtoken)

  • Apply destructuring patterns

Example Generated Code:

Quality Assurance Workflow

Scenario: After implementing a feature, verify it follows the established standards.

Reflection Output Example:

Gradual Standards Adoption

Scenario: Introducing TypeScript best practices incrementally to a large codebase.

Benefits of Gradual Adoption:

  1. Avoid massive refactoring PRs

  2. Learn patterns as you apply them

  3. Team can adapt to new standards progressively

  4. Easier to track and review changes

Integration with Other Plugins

With SDD (Full Project Setup)

With Reflexion (Quality Loop)

With Code Review

With MCP Tools

Common Patterns

Before Starting Any TypeScript Project

Before Major Feature Implementation

During Code Review Preparation

When Onboarding New Team Member

Share with new team members:

  1. Pull the repository (includes CLAUDE.md)

  2. Review CLAUDE.md for coding standards

  3. Standards automatically apply to their Claude sessions

Troubleshooting

Standards Not Being Followed

If Claude isn't following the established standards:

  1. Verify CLAUDE.md exists and contains the standards

  2. Check if CLAUDE.md is in the project root

  3. Re-run /tech-stack:add-typescript-best-practices if needed

  4. Explicitly reference standards: "follow the TypeScript guidelines in CLAUDE.md"

Conflicting Guidelines

If your project has specific requirements that conflict with default guidelines:

  1. Run the command to get the base guidelines

  2. Modify CLAUDE.md to reflect your project's actual standards

  3. Commit the customized CLAUDE.md

Need More Language Support

Currently, the plugin supports TypeScript. For other languages:

  1. Use the TypeScript command as a template

  2. Manually add similar sections for your language to CLAUDE.md

  3. Watch for future plugin updates with additional language support

Last updated