Skip to content

Add comprehensive Windsurf configuration for Formidable Forms development#2849

Merged
Crabcyborg merged 99 commits into
masterfrom
feature/windsurf-configuration-formidable
Feb 20, 2026
Merged

Add comprehensive Windsurf configuration for Formidable Forms development#2849
Crabcyborg merged 99 commits into
masterfrom
feature/windsurf-configuration-formidable

Conversation

@shervElmi

@shervElmi shervElmi commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

This PR adds a .windsurf/ directory that configures Windsurf Cascade to follow our coding standards and workflows automatically.

How It Works

Rules (automatic)

Rules are coding standards that Cascade applies automatically, no action needed from the developer.

Skills (manual)

Skills are multi-step workflows for complex tasks. To use a skill:

  1. Type @Skills in the Cascade chat input
  2. Select the skill from the dropdown (e.g., fix-bug)
  3. Describe your task

Available skills:

Skill Purpose
fix-bug Enterprise bug-fixing workflow with root cause analysis, solution comparison, and verification checklist

CleanShot 2026-02-12 at 15 39 08

CleanShot 2026-02-12 at 15 40 15@2x

Example

When fixing a PHP bug, type @fix-bug and describe the issue. Cascade will:

  • Automatically apply PHP, VIP security, and VIP performance standards
  • Follow the enterprise principles for minimal-scope changes
  • Use conventional commits format for the commit message
  • Walk through the full bug-fix workflow (locate → research → design → implement → verify → report)

Summary by CodeRabbit

  • Documentation

    • Added comprehensive coding standards and rulebooks (PHP, JavaScript, HTML, CSS/SCSS), accessibility, block-editor, performance, and security guidance
    • Added Conventional Commits spec, testing conventions, Formidable-specific rules, enterprise principles, bug‑fix workflows, skills, and multiple PR/report/solution templates
  • Chores

    • Added Markdown lint and editor configuration for consistent Markdown formatting
    • Updated packaging to exclude internal configuration from archives

@shervElmi shervElmi self-assigned this Jan 20, 2026
@coderabbitai

coderabbitai Bot commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new .windsurf configuration folder with editor/markdownlint settings; extensive coding standards and process documentation for Enterprise, Formidable, WordPress, and VIP; testing and bug‑fix workflows and templates; and updates the packaging script to exclude .windsurf from archives.

Changes

Cohort / File(s) Summary
Tooling & lint configs
.windsurf/.editorconfig, .windsurf/.markdownlint.json
New editorconfig and markdownlint rules targeting Markdown files (tabs, indent size = 4; MD003/MD007/MD013 rules; allow hard tabs).
Enterprise rules
.windsurf/rules/enterprise/...
.windsurf/rules/enterprise/principles.md, .windsurf/rules/enterprise/conventional-commits.md
Adds enterprise code-change principles and a Conventional Commits 1.0.0 spec with message rules and an AI-assisted commit workflow.
Formidable rules
.windsurf/rules/formidable/...
.windsurf/rules/formidable/frm-css.md, .windsurf/rules/formidable/frm-php.md, .windsurf/rules/formidable/testing.md
Introduces Formidable CSS/SCSS style guide, PHP/PHPCS rules (PHP 7.0 constraints and disallowed newer features), and testing conventions and examples.
WordPress standards
.windsurf/rules/wordpress/...
.windsurf/rules/wordpress/accessibility.md, .../block-editor.md, .../html.md, .../javascript.md, .../php.md
Adds comprehensive WordPress guidance: accessibility (WCAG), Gutenberg block-editor, HTML, JavaScript (ES6+/React) conventions, and PHP coding standards.
WordPress VIP guidance
.windsurf/rules/wordpress-vip/...
.windsurf/rules/wordpress-vip/wpvip-block-editor.md, .../wpvip-performance.md, .../wpvip-security.md
Adds VIP-focused docs on block-editor patterns, performance best practices, and security aligned with OWASP/VIP recommendations.
Bug‑fix skills & templates
.windsurf/skills/fix-bug/...
.windsurf/skills/fix-bug/SKILL.md, checklist.md, pr-template.md, report-template.md, solution-template.md
Adds a bug-fix skill description, verification checklist, PR/report templates, and a solution-comparison template for standardizing fixes.
Packaging script
bin/zip-plugin.sh
Adds -x "*/.windsurf/*" to zip exclusions so .windsurf is omitted from plugin/package archives.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I hopped through rules and docs so wide,
Tabs for Markdown where the guidelines hide,
Standards planted row by row in files,
A zip skips my burrow and I smile,
Tiny rabbit cheers — tidy code, happy stride.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding comprehensive Windsurf configuration files and directories for Formidable Forms development, which represents the primary purpose of this 23-file PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/windsurf-configuration-formidable

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…er-engineering

- Replace generic "Analyze All Fix Locations" phase with structured Pattern Discovery Process
- Add 4-step pattern discovery: find patterns, study usage, trace hierarchy, iterate
- Add verification step to prevent overkill fixes when changes affect multiple areas
- Emphasize using existing Formidable patterns over custom solutions
- Add reminder to iterate through pattern discovery until best solution found
- Ad
… agents

Add detailed WordPress PHP coding standards guide (AGENTS.md) covering security, naming conventions, formatting, whitespace, control structures, operators, best practices, and general syntax. Document includes priority levels (CRITICAL/HIGH/MEDIUM/LOW) for each section and extensive code examples showing correct vs incorrect patterns. Intended as reference for AI agents and LLMs maintaining WordPress PHP code.
…used modules

Split comprehensive WordPress PHP coding standards into separate focused rule files covering best practices, control structures, database queries, formatting, general syntax, naming conventions, operators, security, and whitespace. Each file includes priority level, impact description, and extensive code examples showing correct vs incorrect patterns. Intended as modular reference for AI agents maintaining WordPress PHP
… for AI agents

Add detailed WordPress JavaScript coding standards guide covering spacing, indentation, variables/naming, equality checks, syntax rules, and best practices. Document includes priority levels (HIGH/MEDIUM/LOW) for each section and extensive code examples showing correct vs incorrect patterns. Intended as reference for AI agents and LLMs maintaining WordPress JavaScript code.
…cused files

Split comprehensive WordPress JavaScript coding standards into separate focused rule files covering spacing, indentation, equality checks, syntax rules, variables/naming, and best practices. Each file includes priority level (HIGH/MEDIUM/LOW), impact description, and extensive code examples showing correct vs incorrect patterns. Intended as modular reference for AI agents maintaining WordPress JavaScript code.
…I agents

Add detailed WordPress HTML coding standards guide covering validation, self-closing elements, attributes/tags, quotes, and indentation. Document includes priority levels (HIGH/MEDIUM) for each section and extensive code examples showing correct vs incorrect patterns. Intended as reference for AI agents and LLMs maintaining WordPress HTML code.
…files

Split comprehensive WordPress HTML coding standards into separate focused rule files covering validation, self-closing elements, attributes/quotes, and indentation. Each file includes priority level (HIGH/MEDIUM), impact description, and extensive code examples showing correct vs incorrect patterns. Intended as modular reference for AI agents maintaining WordPress HTML code.
… agents

Add detailed WordPress CSS coding standards guide covering structure, selectors, properties, values, media queries, commenting, and best practices. Document includes priority levels (HIGH/MEDIUM/LOW) for each section and extensive code examples showing correct vs incorrect patterns. Intended as reference for AI agents and LLMs maintaining WordPress CSS code.
…iles

Split comprehensive WordPress CSS coding standards into separate focused rule files covering structure, selectors, properties, values, media queries, comments, and best practices. Each file includes priority level (HIGH/MEDIUM/LOW), impact description, and extensive code examples showing correct vs incorrect patterns. Intended as modular reference for AI agents maintaining WordPress CSS code.
…ion for AI agents

Add detailed WordPress accessibility coding standards guide covering WCAG 2.2 Level AA compliance, organized around four core principles: Perceivable, Operable, Understandable, and Robust. Document includes conformance levels (CRITICAL/REQUIRED/ENCOURAGED), guidelines for text alternatives, keyboard accessibility, color contrast, semantic markup, ARIA usage, and WordPress-specific patterns. Features extensive
… focused files

Split comprehensive WordPress accessibility coding standards into separate focused rule files covering WCAG 2.2 principles: Perceivable, Operable, Understandable, Robust, and WordPress-specific patterns. Each file includes priority level (CRITICAL/HIGH), impact description, and extensive code examples showing correct vs incorrect patterns. Intended as modular reference for AI agents maintaining WordPress accessible
@deepsource-io

deepsource-io Bot commented Feb 3, 2026

Copy link
Copy Markdown

DeepSource Code Review

DeepSource reviewed changes in the commit range 44703cb...349ca42 on this pull request. Below is the summary for the review, and you can see the individual issues we found as review comments.

For detailed review results, please see the PR on DeepSource ↗

Important

Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. Please see the DeepSource dashboard for this PR to view those issues.

PR Report Card

Security × 0 issues Overall PR Quality   

Focus Area: Reliability

Guidance
Address 6 critical 'wp is not defined' errors in js/admin/applications.js and js/admin/dom.js.

Grade capped at D due to multiple critical issues
Reliability × 37 issues
Complexity × 4 issues
Hygiene × 34 issues

Code Review Summary

Analyzer Status Summary Details
PHP No new issues detected. Review ↗
JavaScript 77 new issues detected. 65 existing issues fixed. Review ↗
How are these analyzer statuses calculated?

Administrators can configure which issue categories are reported and cause analysis to be marked as failed when detected. This helps prevent bad and insecure code from being introduced in the codebase. If you're an administrator, you can modify this in the repository's settings.

Add comprehensive documentation for Conventional Commits 1.0.0 specification including types, scopes, breaking change indicators, and AI commit message generation rules.
…entation

Add YAML frontmatter to all WordPress coding standards skills with name and description fields to enable automatic invocation. Update README with comprehensive explanation of Windsurf's four mechanisms (Rules, Skills, Workflows, AGENTS.md), their interaction, and activation flow. Add conventional commits reference and clarify skill auto-invocation behavior.
…structure

Remove scattered Windsurf configuration files (rules, skills, workflows) and move to centralized .windsurf/config/ directory structure. Eliminates duplicate PHP/WordPress standards documentation and web search policy rules. Consolidates field type creation guide, code review checklist, and PHPCS workflow into unified configuration system.
…t .windsurf directory

Remove duplicate AGENTS.md project guidelines and README.md documentation that were superseded by centralized configuration structure in .windsurf/config/. Eliminates redundant project structure overview, development rules, testing instructions, and Windsurf mechanism documentation now maintained in consolidated config directory.
… messages

Add comprehensive conventional commits specification rule with type definitions, scope guidelines, breaking change indicators, and AI generation instructions. Includes SemVer mapping, formatting rules, and practical examples for consistent commit message format across the project.
…odifications

Add comprehensive enterprise development principles rule covering analysis phase, solution selection, change execution, mandatory research requirements, and verification checklist. Includes core principles for minimal-scope changes, backward compatibility, and codebase research requirements before modifications.
…c conventions

Add comprehensive Formidable Forms patterns rule covering pattern discovery process, class/method/hook naming conventions, text domains, factory pattern usage, helper class utilities (FrmAppHelper, FrmDb, FrmFieldsHelper), and Pro plugin awareness checks. Includes mandatory pattern research requirements before code changes and examples for common operations.
…t development standards

Add comprehensive testing conventions rule covering test class inheritance (FrmUnitTest/FrmProUnitTest), factory method usage for test data creation, protected method testing utilities, assertion message formatting requirements, mandatory test scenarios (Pro active/inactive, empty data, edge cases), and PHPUnit/PHPCS command examples.
…s documentation

Add comprehensive React coding standards for Formidable Forms including functional components with hooks, memoization patterns, state management, composition patterns, and WordPress data layer integration. Document critical rules: functional components only (no classes), import hooks from @wordpress/element, use WordPress packages for i18n/API/components/data. Include useMemo/useCallback optimization patterns, derived
…ctions documentation

Add comprehensive security guidelines for Formidable Forms including input handling with FrmAppHelper sanitization functions (get_post_param/simple_get/get_param), nonce verification patterns, safe serialization using maybe_unserialize_array, DOM sanitization with frmDom.cleanNode, authorization checks with current_user_can/permission_nonce_error/user_has_permission, and Formidable capabilities reference table
…ard support example

Replace inline onclick/onkeydown attributes with addEventListener pattern in accessibility.md keyboard support example. Add explicit rule against inline event handlers and demonstrate proper event attachment in separate JavaScript file following separation of concerns best practices.
…editor.md

Remove VIP Standards reference section and Tooling commands section from block-editor.md. VIP-specific patterns should be documented in dedicated VIP files, and tooling commands are better suited for setup/development guides rather than coding standards documentation.
…official documentation

Remove extended best practices from Google/Airbnb style guides and modern ES6+ patterns. Focus exclusively on WordPress Core Official Standards covering spacing rules, semicolons, indentation/line breaks, variable declarations with const/let, globals documentation, and naming conventions. Remove sections on jQuery avoidance, functional vs class-based patterns, arrow functions, pure functions, destructuring, spread operators, ES
…tor.md from dash to colon

Change render.php and useSelect example comments from dash-space to colon format for consistency with other documentation (// render.php - to // render.php:, // CORRECT - to // CORRECT:). Remove Tooling section with npx/npm commands as tooling commands are better suited for setup/development guides rather than coding standards documentation.
…ce.md from dash to colon

Change code example comments from dash-space to colon format for consistency with other documentation (// CORRECT - to // CORRECT:, // INCORRECT - to // INCORRECT:, // CAUTION - to // CAUTION:, // BETTER - to // BETTER:, # Crontab entry - to # Crontab entry:). Fix array formatting in batch processing example to use multi-line format. Remove Tooling section with Query Monitor, New Relic, and VIP CLI commands as tool
…y patterns in wpvip-security.md

Change code example comments from dash-space to colon format for consistency (// CORRECT - to // CORRECT:, // INCORRECT - to // INCORRECT:, // UNSAFE - to // UNSAFE:, // SAFE - to // SAFE:, // PREFERRED - to // PREFERRED:, // AVOID - to // AVOID:). Update JavaScript XSS prevention example to use textContent instead of DOMPurify, remove jQuery patterns. Replace wp_remote_get with wp_safe_remote_get for external
…butes

Add .windsurf to export-ignore list to exclude Windsurf IDE configuration directory from Git archives and exports, following the same pattern as other development tool configurations (.vscode, .idea, .coderabbit.yaml).
shervElmi and others added 11 commits February 18, 2026 17:08
…le cascade debugging

Add CSS-Specific Rules section to code-change-principles.md with two critical guidelines: never modify shared CSS classes (add new specific classes instead), and trace complete style cascade by identifying all classes and ancestor rules before proposing changes. These rules prevent unintended side effects from CSS modifications across the plugin.
…rf-rules

Address feedback and refactor Windsurf rules for Formidable patterns
return;
}

let typeofNode;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Variable 'typeofNode' should be initialized on declaration


In JavaScript, variables can be assigned during declaration, or at any point afterwards using an assignment statement. For example, in the following code, foo is initialized during declaration, while bar is initialized later.

@Crabcyborg Crabcyborg 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.

Thanks @shervElmi!

I think we should go ahead and merge this so we can get a feel for it.

And we can make changes from there.

🚀

@Crabcyborg
Crabcyborg merged commit d957b46 into master Feb 20, 2026
39 of 43 checks passed
@Crabcyborg
Crabcyborg deleted the feature/windsurf-configuration-formidable branch February 20, 2026 19:58
@codecov

codecov Bot commented Feb 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.66%. Comparing base (ddeaca4) to head (349ca42).
⚠️ Report is 193 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2849      +/-   ##
============================================
+ Coverage     26.60%   26.66%   +0.05%     
- Complexity     8867     8882      +15     
============================================
  Files           145      145              
  Lines         29822    29936     +114     
============================================
+ Hits           7934     7982      +48     
- Misses        21888    21954      +66     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

stephywells pushed a commit that referenced this pull request Apr 4, 2026
…on-formidable

Add comprehensive Windsurf configuration for Formidable Forms development
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants