MCPcopy Index your code
hub / github.com/entrepeneur4lyf/engineered-meta-cognitive-workflow-architecture

github.com/entrepeneur4lyf/engineered-meta-cognitive-workflow-architecture @meta-workflow-v3.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release meta-workflow-v3.1 ↗ · + Follow
14 symbols 31 edges 3 files 9 documented · 64%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Engineered Meta-Cognitive Workflow Architecture for Windsurf

Version 3.0 Release - March 19, 2025

Developed by Shawn McAllister at Engineered Automated Systems for Artificial Intelligence (EASAI) in Kannapolis, NC.

License GitHub stars

Licensed under Apache 2.0. Any use or adaptation of this technology MUST be accompanied by a license and attribution.

Credit to Nick Baumann w/ Cline Memory Bank for inspiration with the memory bank system that he developed.

Installation Guide for Windsurf IDE


Step 1: Download the Framework Files

Download the Windsurf zip file from here, which contains: - engineered-meta-cognitive-workflow-architecture-v3-windsurf.md (main prompt) - .windsurfrules (workspace rules file)


Download the Cline zip file from here, which contains: - engineered-meta-cognitive-workflow-architecture-v3-cline.md (main prompt) - .clinerules (workspace rules file)

Step 2: Set Up Global Rules

  1. Open Windsurf IDE
  2. Click on "Windsurf - Settings" in the bottom-right corner
  3. Select the "Settings" tab
  4. Click "Edit Rules" next to "Set Global AI Rules"
  5. Copy and paste the contents of engineered-meta-cognitive-workflow-architechture-windsurf.md into the global rules editor
  6. Save your changes

Step 3: Set Up Workspace Rules

  1. Copy the .windsurfrules file to your project's root directory

Step 4: Initialize the Memory Bank

Once the rules are set up, start a new chat with Windsurf, attach your project-overview.md file (see guide below), and type (or copy and paste):

Initialize your Memory Bank with the "SessionStart" workflow.

This will trigger the initialization workflow that creates the necessary directory structure and memory files.

How the Framework Works

The Engineered Meta-Cognitive Workflow Architecture is a revolutionary approach to enhancing AI assistants by providing structured memory persistence, workflow patterns, and self-evaluation mechanisms. Unlike traditional prompting techniques, this framework creates a pseudo-execution environment within the AI's context that guides its behavior through well-defined workflows.

The Core Innovation: Function Map and Mermaid Integration

The system's novelty lies in the integration of XML-defined functions with Mermaid diagrams that visually represent the same workflows:

<FunctionMap>

  <StructureFunctions>
    <Function id="createProjectBrief">Create the foundational project brief document</Function>
    <Function id="createProductContext">Document why the project exists and problems it solves</Function>
    <Function id="createSystemPatterns">Document system architecture and design patterns</Function>
    <Function id="createTechContext">Document technologies, setup and dependencies</Function>

  </StructureFunctions>
</FunctionMap>

This XML structure is paired with a corresponding Mermaid diagram:

flowchart TD
    Start[Start] --> checkMemoryBankExists{checkMemoryBankExists}

    checkMemoryBankExists -->|No| createMemoryBankDirectory[createMemoryBankDirectory]
    createMemoryBankDirectory --> scaffoldMemoryBankStructure[scaffoldMemoryBankStructure]
    scaffoldMemoryBankStructure --> populateMemoryBankFiles[populateMemoryBankFiles]
    populateMemoryBankFiles --> readMemoryBank[readMemoryBank]

    checkMemoryBankExists -->|Yes| readMemoryBank

    readMemoryBank --> verifyFilesComplete{verifyFilesComplete}

    verifyFilesComplete -->|No| createMissingFiles[createMissingFiles]
    createMissingFiles --> verifyContext[verifyContext]

    verifyFilesComplete -->|Yes| verifyContext

    verifyContext --> developStrategy[developStrategy]

Windsurf's Cascade Memory Feature

The true power of this framework emerges through integration with Windsurf's unique Cascade Memory feature, which the model refers to as EPHEMERAL REMINDER. This acts like a scheduled reminder system that helps the model maintain its workflow patterns even when working with large codebases that might otherwise cause it to lose focus.

When you notice the model has stopped following the workflow structure, you can simply remind it with:

You need to initialize your Memory Bank with the "Windsurf Memory System"

This triggers the automated workflow that ensures the model maintains its structured approach throughout your session.

Key Components of the System

  1. Three-Layer Memory System:
  2. Working Memory: Active task context in .windsurf/core/activeContext.md
  3. Short-Term Memory: Recent decisions in .windsurf/task-logs/
  4. Long-Term Memory: Persistent knowledge in remaining .windsurf/core/ files

  5. Structured Task Logging:

  6. Comprehensive documentation of each task
  7. Performance evaluation with scoring
  8. Next steps planning for continuity

  9. Evaluation Workflow:

  10. Objective performance measurement using a 23-point system
  11. Systematic identification of improvement areas
  12. Iterative optimization until quality targets are met

  13. Self-Critique Cycle:

  14. Creator Phase: Generate initial solution
  15. Critic Phase: Identify weaknesses and edge cases
  16. Defender Phase: Address criticisms systematically
  17. Judge Phase: Compare original and improved versions

Practical Examples

The framework produces structured, high-quality outputs that build upon previous work even after context resets:

Task Logs

task-log

Thought Process Visibility

thought_process

Project Development Flow

poc1 poc2 poc3 poc4

Usage Tips

  • If the model stops following the workflow, prompt it with: "Remember to follow the Windsurf Memory System"
  • For task logging, you can directly invoke the function with: "Make sure you are keeping a task log in ./windsurf/task-logs/ and update memory
  • For evaluation of completed work, use: "Execute Evaluation Phase"
  • For large codebases, you might need to periodically remind the model to reload its workflow context

How to Create a Project Overview

This guide helps you create a comprehensive project overview.

We will use an example for a personal bio/portfolio website using a starter kit like Once UI.

This document will serve as your roadmap to kick-start your project using Windsurf and the Meta-Workflow Prompt.


Project Overview Template

### Project Basics
- **Project Name**: Your Portfolio Website
- **Tagline**: A brief description of your website's purpose

### Vision Statement
- A concise statement describing the long-term goal of your portfolio

### Problem Statement
- What problem does this portfolio solve for you or your potential clients/employers?

### Solution
- How will your portfolio website address the identified problems?

### Target Audience
- Who is your primary audience? (e.g., potential employers, clients, collaborators)

### Success Metrics
- How will you measure the success of your portfolio website?

### Project Scope
- What features will be included in the initial version?
- What might be added in future updates?

### Risk Assessment
- What challenges might you face during development?

### Success Criteria
- What concrete outcomes indicate your project is successful?

Example Step-by-Step Instructions

1. Project Basics

  • Project Name: "My Portfolio Website" or your preferred name
  • Tagline: Example: "Showcasing my skills, projects, and professional journey"

2. Vision Statement

  • Write 2-3 sentences about what you want your portfolio to achieve long-term
  • Example: "To create a professional online presence that showcases my development skills, design aesthetic, and project portfolio, ultimately helping me connect with potential employers and clients who value my unique approach to web development."

3. Problem Statement

  • Identify the specific issues your portfolio addresses
  • Example: "As a developer, I need a centralized platform to showcase my work, skills, and professional journey to potential employers and clients. Existing solutions either lack customization options or require too much technical knowledge to maintain."

4. Solution

  • Explain how your portfolio website will solve these problems
  • Example: "Using the Once UI starter kit, I'll create a responsive, visually appealing portfolio that highlights my projects, skills, and professional background. The Once UI components will allow me to quickly build a professional site while maintaining the flexibility to customize it to reflect my personal brand."

5. Target Audience

  • Define who will visit your portfolio
  • Example: "Primary audience: Potential employers, clients, and collaborators in the tech industry. Secondary audience: Other developers interested in my open-source projects or technical blog posts."

6. Success Metrics

  • Establish measurable goals
  • Example:
  • User Achievement: "Document all of my projects and skills to demonstrate to employers or clients"
  • Engagement: "Client or employer contacts"
  • Quality: "I really want it to slap"

7. Project Scope

  • List initial features
  • Example:
  • Home page with professional introduction
  • Projects portfolio with filtering by technology
  • Skills section with visualization
  • Contact form and social media links
  • Blog for technical articles

8. Risk Assessment

  • Identify potential challenges
  • Example:
  • Technical: "Customizing Once UI components to match my brand colors and style"
  • User Experience: "Ensuring the site is accessible on all devices"
  • Business: "Keeping content updated regularly"

9. Success Criteria

  • Define what "done" looks like
  • Example:
  • Technical: "All pages responsive and functional across major browsers"
  • User Adoption: "Receive positive feedback from at least 5 peers"
  • Business: "Site deployed and connected to email"

Prompt Example for Coding Assistant

"Help me create a project overview for my personal portfolio website using the Once UI starter kit. I want to showcase my web development skills, include a projects section, blog, and contact form. The site should be responsive, visually appealing, and easy to update. Please follow the simplified template provided and include specific details about how Once UI components will be utilized in each section. I weant to use a starter template from once-ui.com Reference the Once UI documentation for component specifics: https://once-ui.com/docs/installation"

Next Steps for use with the Engineered Meta-Cognitive Workflow Architecture

  1. Use the template above to create your project overview using your specific project details. tip: Ask the model to output the result in a code block for easy copy/paste.
  2. Give the template and your prompt to any chat AI like Claude, ChatGPT, or Deepseek R1.
  3. The chat model will generate a project overview based on your prompt and the template
  4. Start a new project in Windsurf and install the prompt and .windsurfrules using the guide at the top of this page.
  5. Copy the project template into the new project or just paste the contents into Cascade.
  6. Follow the "best practices" guide above to get the best result.

Resources for Creating a Project Overview

Claude.ai and Openai.com are fairly well known and obvious resources. However, here are some other resources with free models:

  • OpenRouter OpenRouter has many free models and a chat interface where you can even compare output from multiple models
  • Huggingface Huggingface has many free models and a chat interface where you can even compare output from multiple models
  • CodeGPT CodeGPT has many free models and a chat interface where you can even use Claude 3.7 Sonnet Thinking for free.

Best Practices for Optimal Results with Windsurf and the Meta-Cognitive Workflow Architecture

Project Planning and Preparation

1. Create a Comprehensive Project Overview

Before starting development, create a detailed project overview. Follow the guide above.

Using a structured project overview helps you clarify your goals and provides Windsurf with crucial context to deliver more accurate and relevant solutions.

2. Provide Clear Requirements

  • Break down requirements into functional and non-functional categories
  • Use specific, measurable criteria rather than vague descriptions
  • Prioritize requirements using MoSCoW method (Must have, Should have, Could have, Won't have)
  • Include examples wherever possible to illustrate expected behavior

Security Considerations

1. Include Security Requirements From the Start

  • Specify authentication and authorization requirements
  • Define data validation and sanitization rules
  • Require secure communication pro

Core symbols most depended-on inside this repo

Shape

Function 14

Languages

TypeScript86%
Python14%

Modules by API surface

assets/js/toc.js10 symbols
count_tokens.py2 symbols
assets/js/accordion-toc.js2 symbols

For agents

$ claude mcp add engineered-meta-cognitive-workflow-architecture \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page