AI Best Practices

Maximize your AI development efficiency with proven strategies, guidelines, and community-driven insights. These best practices evolve with the rapidly changing AI landscape and input from our developer community.

Prompt Engineering Excellence

Effective AI interaction starts with well-crafted prompts. Whether you're using Cursor, VS Code with Copilot, or Windsurf, these principles apply universally.

Be Specific and Contextual

  • Provide clear context about your project type (Forge site, Hammer project, etc.)
  • Specify the target framework or technology stack
  • Include relevant constraints (mobile-first, accessibility requirements)
  • Mention any existing code patterns or conventions to follow

Good Example:

"Create a responsive contact form for a Forge project using Hammer templating. Include name, email, message fields with validation. Form should use Forge Forms with data-forge-name attributes and follow accessibility guidelines."

Avoid:

"Make a contact form"

Iterative Refinement

  • Start with a basic request and build complexity gradually
  • Ask for explanations of generated code to understand the approach
  • Request specific improvements or modifications
  • Use follow-up questions to explore alternative solutions

Leverage AI for Documentation

  • Ask AI to generate code comments and documentation
  • Request README files and setup instructions
  • Generate comprehensive code examples and usage guides
  • Create troubleshooting guides for common issues

AI Tool Integration Strategies

Different AI tools excel in different scenarios. Here's how to maximize each tool's potential within your Forge development workflow:

Cursor AI

Best For:

  • Real-time code completion and suggestions
  • Large codebase refactoring
  • Complex file-to-file relationship understanding
  • Rapid prototyping and exploration

Pro Tips:

  • Use Cmd+K for quick inline edits
  • Leverage the chat for architectural discussions
  • Apply changes incrementally to maintain control

VS Code + Copilot

Best For:

  • Stable, production development environments
  • Teams requiring consistent tooling
  • Projects with extensive extension requirements
  • Enterprise development workflows

Pro Tips:

  • Use Copilot Chat for contextual code explanations
  • Leverage workspace-specific suggestions
  • Configure Copilot for your coding style

Windsurf

Best For:

  • Advanced agentic workflows
  • Complex multi-step development tasks
  • Experimental and cutting-edge AI features
  • Developers who want the latest AI capabilities

Pro Tips:

  • Utilize Flows for complex, multi-step operations
  • Take advantage of advanced context understanding
  • Experiment with agentic development patterns

Forge-Specific AI Guidelines

Optimize your AI interactions for Forge platform development with these targeted recommendations.

Project Structure Awareness

  • Always specify whether you're using Hammer templating or pure HTML
  • Mention forgerc.txt configuration needs upfront
  • Include Forge Forms requirements in form-related requests
  • Consider CDN optimization and file exclusion rules

Performance Optimization

  • Request mobile-first, responsive designs by default
  • Ask for optimized asset loading strategies
  • Include accessibility requirements in all requests
  • Consider progressive enhancement approaches

Security and Best Practices

  • Always request input validation for forms
  • Ask for proper error handling implementations
  • Include security headers and CSP considerations
  • Request SEO-optimized markup and meta tags

Workflow Optimization

Streamline your AI-assisted development workflow with these proven strategies.

Version Control Integration

  • Review AI-generated code before committing
  • Use meaningful commit messages that mention AI assistance
  • Create feature branches for AI-generated components
  • Document AI-assisted development decisions

Testing and Validation

  • Always test AI-generated code in multiple browsers
  • Validate responsive design across device sizes
  • Run accessibility checks on AI-generated markup
  • Performance test AI-suggested optimizations

Learning and Improvement

  • Study AI-generated solutions to understand patterns
  • Keep a record of effective prompts for reuse
  • Experiment with different AI tools for the same task
  • Share successful approaches with your team

Share Your AI Tips & Tricks

Have a great AI development tip, successful prompt, workflow optimization, or clever solution? We'd love to hear from you! Share your insights with the Forge community and help fellow developers level up their AI-assisted workflows.

Share Tips in the Forge Community Forum

Join the Discussion

Have questions or want to share your experience? Join our community discussion to connect with other developers and get help from the Forge team.

Visit Forum Discussion