aiwg-regenerate-windsurfrules
Regenerate .windsurfrules for Windsurf with preserved team directives
Best use case
aiwg-regenerate-windsurfrules is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
It is a strong fit for teams already working in Codex.
Regenerate .windsurfrules for Windsurf with preserved team directives
Teams using aiwg-regenerate-windsurfrules should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/aiwg-regenerate-windsurfrules/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How aiwg-regenerate-windsurfrules Compares
| Feature / Agent | aiwg-regenerate-windsurfrules | Standard Approach |
|---|---|---|
| Platform Support | Codex | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Regenerate .windsurfrules for Windsurf with preserved team directives
Which AI agents support this skill?
This skill is designed for Codex.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
SKILL.md Source
# 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:**
```markdown
# .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
```bash
# 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 .windsurfrulesRelated Skills
aiwg-orchestrate
Route structured artifact work to AIWG workflows via MCP with zero parent context cost
hook-regenerate
Rebuild AIWG hook files from currently installed framework manifests
aiwg-update-warp
Update existing project WARP.md with latest AIWG orchestration guidance
aiwg-update-claude
Update existing project CLAUDE.md with latest AIWG orchestration guidance
aiwg-status
Display workspace status dashboard showing installed frameworks, deployments, artifact counts, and health indicators
aiwg-setup-warp
Setup Warp Terminal with AIWG framework context (preserves existing content)
aiwg-setup-project
Update project CLAUDE.md with AIWG framework context and configuration
aiwg-regenerate
Regenerate platform context file with preserved team directives
aiwg-regenerate-warp
Regenerate WARP.md for Warp Terminal with preserved team directives
aiwg-regenerate-opencode
Regenerate OpenCode context file (.opencode/context.md) with AIWG framework content
aiwg-regenerate-factory
Regenerate AGENTS.md for Factory AI with hook file architecture
aiwg-regenerate-cursorrules
Regenerate .cursorrules for Cursor with preserved team directives