Skip to content
Prompt

cocode — Windsurf Rules

by Pipelex

AI Summary

Cocode is a Windsurf rules booster that provides guidelines for writing and editing Pipelex pipelines, covering file naming, structure, and best practices for code repository analysis workflows.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "cocode — Windsurf Rules" prompt rules to my project.
Repository: https://github.com/Pipelex/cocode

Please read the repo to find the rules/prompt file, then:
1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type)
2. If there's an existing rules file, merge the new rules in rather than overwriting
3. Confirm what was added

Description

Cocode is the friend of your code, it is a powerful command-line tool for analyzing and processing code repositories. It converts repository structures and contents into text formats, extracts code interfaces, and performs software engineering analysis using AI-powered pipelines using Pipelex.

Pipelex Rules

<!-- BEGIN_PIPELEX_RULES -->

Guide to write or edit pipelines using the Pipelex language in .plx files

• Always first write your "plan" in natural language, then transcribe it in pipelex. • You should ALWAYS RUN the terminal command make validate when you are writing or editing a .plx file. It will ensure the pipe is runnable. If not, iterate. • Please use POSIX standard for files. (empty lines, no trailing whitespaces, etc.)

Pipeline File Naming

• Files must be .plx for pipelines (Always add an empty line at the end of the file, and do not add trailing whitespaces to PLX files at all) • Files must be .py for code defining the data structures • Use descriptive names in snake_case

Pipeline File Outline

A pipeline file has three main sections: • Domain statement • Concept definitions • Pipe definitions Domain Statement `plx domain = "domain_name" description = "Description of the domain" # Optional ` Note: The domain name usually matches the plx filename for single-file domains. For multi-file domains, use the subdirectory name. Concept Definitions Concepts represent ideas and semantic entities in your pipeline. They define what something is, not how it's structured. `plx [concept] ConceptName = "Description of the concept" ` Naming Rules: • Use PascalCase for concept names • Never use plurals (no "Stories", use "Story") - lists are handled implicitly by Pipelex • Avoid circumstantial adjectives (no "LargeText", use "Text") - focus on the essence of what the concept represents • Don't redefine native concepts (Text, Image, PDF, TextAndImages, Number, Page) Native Concepts: Pipelex provides built-in native concepts: Text, Image, PDF, TextAndImages, Number, Page. Use these directly or refine them when appropriate. Refining Native Concepts: To create a concept that specializes a native concept without adding fields: `plx [concept.Landscape] description = "A scenic outdoor photograph" refines = "Image" ` For details on how to structure concepts with fields, see the "Structuring Models" section below. Pipe Definitions

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 1mo ago
Active
AdoptionUnder 100 stars
17 ★ · Niche
DocsREADME + description
Well-documented

GitHub Signals

Stars17
Issues3
Updated1mo ago
View on GitHub
MIT License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more