Skip to content
Development
Skill

/aiwg-regenerate-windsurfrules

Regenerate .windsurfrules for Windsurf with preserved team directives

From plugin
aiwg
229200 skills199 agents26 commands

Claude Code

$ npx -y skills add jmagly/aiwg --skill aiwg-regenerate-windsurfrules --agent claude-code

SKILL.md

aiwg-regenerate-windsurfrules.SKILL.md
namespace: aiwg
name: aiwg-regenerate-windsurfrules
platforms: [all]
description: Regenerate .windsurfrules for Windsurf with preserved team directives

Regenerate .windsurfrules

Regenerate the `.windsurfrules` file for Windsurf (Codeium) integration, analyzing current project state while preserving team directives and organizational requirements.

**Hook file approach (default):** Generates `AIWG-windsurf.md` and adds `@AIWG-windsurf.md` directive. Note: Windsurf @-link support is unverified — defaults to full inject until confirmed (see #444).

**Full inject (`--full-inject`):** Embeds AIWG content inline with AIWG markers.

Parameters

| Flag | Description | |------|-------------| | `--no-backup` | Skip creating backup file | | `--dry-run` | Preview changes without writing | | `--show-preserved` | List all detected preserved content and exit | | `--full` | Full regeneration, preserve nothing (destructive) |

Execution Steps

Step 1: Create Backup

Unless `--no-backup` specified:

1. Check if `.windsurfrules` exists 2. If exists, copy to `.windsurfrules.backup-{YYYYMMDD-HHMMSS}` 3. Report backup location

Step 2: Extract Preserved Content

Same preservation patterns as other platforms:

1. **Explicit Preserve Blocks**: `<!-- PRESERVE -->` ... `<!-- /PRESERVE -->` 2. **Preserved Section Headings**: Team *, Org *, Definition of Done, etc. 3. **Inline Directives**: Lines with directive keywords

Step 3: Analyze Project

  • Languages and package managers
  • Development commands
  • Test framework
  • CI/CD configuration
  • Directory structure
  • Windsurf-specific configuration in `.windsurf/`

Step 4: Detect AIWG State

Check installed frameworks by scanning:

  • `.windsurf/workflows/` for workflows
  • `.windsurf/rules/` for rules
  • `.windsurf/skills/` for skills
  • `AGENTS.md` for aggregated agents

Read registry for framework versions.

Step 5: Generate .windsurfrules

**Document Structure:**

# .windsurfrules

Project rules for Windsurf AI assistance.

## Project Overview

{Description from README.md or package.json}

## Tech Stack

- **Language**: {detected languages}
- **Framework**: {detected frameworks}
- **Package Manager**: {npm/yarn/pnpm/etc.}

## Development Commands

| Command | Description |
|---------|-------------|
| `npm install` | Install dependencies |
| `npm run build` | Build project |
| `npm test` | Run tests |

## Project Structure

src/ → Source code test/ → Test files docs/ → Documentation


## Code Conventions

{Project-specific conventions}

---

## Team Directives

<!-- PRESERVED SECTION -->

{ALL PRESERVED CONTENT}

<!-- /PRESERVED SECTION -->

---

## AIWG Framework Integration

This project uses AIWG SDLC framework with Windsurf.

### Installed Frameworks

| Framework | Agents | Workflows |
|-----------|--------|-----------|
| sdlc-complete | 54 | 42 |

### Using Agents

Agents are available via AGENTS.md (aggregated format).

### Natural Language Mappings

| Request | Maps To |
|---------|---------|
| "run security review" | flow-security-review-cycle |
| "check status" | project-status |
| "start iteration N" | flow-iteration-dual-track |

## Project Artifacts

{If .aiwg/ exists:}

| Category | Location |
|----------|----------|
| Requirements | @.aiwg/requirements/ |
| Architecture | @.aiwg/architecture/ |

## Core References

| Topic | Reference |
|-------|-----------|
| Orchestration | @~/.local/share/ai-writing-guide/agentic/code/addons/aiwg-utils/prompts/core/orchestrator.md |
| Agent Design | @~/.local/share/ai-writing-guide/agentic/code/addons/aiwg-utils/prompts/agents/design-rules.md |

{If SDLC framework installed:}

## SDLC References

| Topic | Reference |
|-------|-----------|
| Natural Language | @~/.local/share/ai-writing-guide/agentic/code/frameworks/sdlc-complete/docs/simple-language-translations.md |

## Resources

- **AIWG Installation**: `~/.local/share/ai-writing-guide`

---

<!--
  Add team-specific notes below.
  Content in preserved sections survives regeneration.
-->

Step 6: Write Output

**If `--dry-run`:** Display content, do not write.

**Otherwise:** 1. Write to `.windsurfrules` 2. Report summary

.windsurfrules Regenerated
==========================

Backup: .windsurfrules.backup-20251206-153512

Preserved: 2 sections, 15 lines
Regenerated: Project overview, structure, AIWG integration

Output: .windsurfrules (187 lines)

Examples

# Regenerate .windsurfrules
/aiwg-regenerate-windsurfrules

# Preview changes
/aiwg-regenerate-windsurfrules --dry-run

# Check preserved content
/aiwg-regenerate-windsurfrules --show-preserved

# Full regeneration
/aiwg-regenerate-windsurfrules --full

Related Commands

| Command | Regenerates | |---------|-------------| | `/aiwg-regenerate-claude` | CLAUDE.md | | `/aiwg-regenerate-warp` | WARP.md | | `/aiwg-regenerate-agents` | AGENTS.md | | `/aiwg-regenerate-cursorrules` | .cursorrules | | `/aiwg-regenerate-windsurfrules` | .windsurfrules | | `/aiwg-regenerate-copilot` | copilot-instructions.md | | `/aiwg-regenerate` | Auto-detect |

References

  • @$AIWG_ROOT/agentic/code/addons/aiwg-utils/README.md — aiwg-utils addon overview
  • @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/native-ux-tools.md — Platform capability matrix including Windsurf
  • @$AIWG_ROOT/docs/cli-reference.md — CLI reference for aiwg sync and regenerate commands
  • @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/README.md — SDLC framework context referenced in generated .windsurfrules
Read more
@jmagly
Ships withaiwg

Reusable project context and specialist workflows for the AI tools you already use. Plan software, coordinate specialist reviews, prepare campaigns, investigate incidents, organize research, curate media, and maintain operational knowledge.

229200 skills199 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
229
Star history of jmagly/aiwg on GitHub, a chart by star-history.com

Other skills on aiwg.

agent-loop-ext

agent-loop-ext

Crash-resilient external agent loop with state persistence and CI/CD integration

@jmagly@jmaglyInstall Skill
agent-loop

agent-loop

Detect requests for iterative autonomous agent loops and route to the appropriate loop executor

@jmagly@jmaglyInstall Skill
auto-test-execution

auto-test-execution

Automatically execute tests when code-generating agents modify source files, enforcing the execute-before-return pattern

@jmagly@jmaglyInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills12d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about aiwg-regenerate-windsurfrules.

Which coding agents can use aiwg-regenerate-windsurfrules?
aiwg-regenerate-windsurfrules installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.