Skip to content

kliewerdaniel/workflow

Repository files navigation

Guide to AI-Assisted Development Using kliewerdaniel/workflow

Introduction

The kliewerdaniel/workflow repository offers a robust methodology for using AI to enhance the software development process. This guide will help you understand how to leverage this approach for your own projects, combining the power of locally-hosted models with structured documentation to create a sustainable development workflow.

Understanding the Workflow Repository

At its core, the workflow repository is designed to streamline the interaction between developers and AI tools. It provides a structured approach to:

  1. Create comprehensive documentation
  2. Break down projects into manageable components
  3. Implement iterative development cycles
  4. Leverage AI assistance effectively while maintaining developer control

Setting Up Your Environment

Required Tools

  • VS Code: The primary IDE
  • AI Assistant Extensions:
    • Cline
    • Twinny
    • GitHub Copilot
    • Gemini Code Assist
    • Continue.dev

Optional Hardware Requirements

For locally hosted models:

  • Powerful GPU (NVIDIA RTX series recommended)
  • Minimum 16GB RAM (32GB+ preferred)
  • SSD storage for model files

Local Model Options

  • Qwen 2.5
  • Code Llama
  • Mistral
  • Other compatible models based on your hardware

The Documentation-First Approach

The core methodology involves creating comprehensive markdown documentation before writing any code:

1. Create ai_guidelines.md

This file serves as the central control document and should include:

# AI Development Guidelines

## Project Overview
[Brief description of project purpose and goals]

## System Prompt
[Your orchestration prompt that guides the AI through the development process]

## Development Flow
1. Requirements Analysis
2. Architecture Design
3. Component Implementation
4. Testing
5. Deployment
6. Maintenance

## Departmental Considerations
- Each department has its own section and prompt sequence
- Cross-departmental dependencies are noted
- Iteration paths are clearly defined

2. Department-Specific Documentation

Create separate markdown files for each "department" of your virtual tech company:

requirements.md

# Requirements Analysis

## Prompt Series
1. "Analyze the core requirements of [project]"
2. "Identify potential edge cases for [feature]"
3. "Create user stories for [persona]"

## Standards
- All requirements must be testable
- User stories follow "As a [user], I want [action] so that [benefit]" format
- Requirements are prioritized (Must-have/Should-have/Could-have/Won't-have)

## Input-Output Examples
[Examples of good requirement specifications]

architecture.md

# Architecture Design

## Prompt Series
1. "Design a system architecture for [project]"
2. "Identify component relationships in [architecture]"
3. "Create data flow diagrams for [process]"

## Standards
- Follow SOLID principles
- Document all API endpoints
- Include security considerations at design phase

## Diagrams
- System context
- Container diagrams
- Component diagrams

implementation.md

# Implementation Guidelines

## Prompt Series
1. "Create a code implementation plan for [component]"
2. "Implement [specific feature] following our coding standards"
3. "Optimize [code section] for performance"

## Coding Standards
- Naming conventions
- Code organization
- Documentation requirements
- Performance considerations

## Testing Integration
- Unit test requirements
- Integration test planning

testing.md

# Testing Approach

## Prompt Series
1. "Design test cases for [feature]"
2. "Create unit tests for [component]"
3. "Develop integration tests for [system]"

## Testing Standards
- Code coverage requirements
- Test naming conventions
- Mocking strategies

security.md

# Security Considerations

## Prompt Series
1. "Perform security analysis of [component]"
2. "Identify potential vulnerabilities in [feature]"
3. "Implement security measures for [threat]"

## Security Standards
- OWASP compliance
- Authentication requirements
- Data protection measures

deployment.md

# Deployment Process

## Prompt Series
1. "Create deployment strategy for [application]"
2. "Design CI/CD pipeline for [project]"
3. "Implement container configuration for [service]"

## Deployment Standards
- Infrastructure as Code requirements
- Environment configuration
- Monitoring setup

sop.md (Standard Operating Procedures)

# Standard Operating Procedures

## Prompt Series
1. "Create operational runbook for [service]"
2. "Design incident response plan for [scenario]"
3. "Develop maintenance procedures for [component]"

## SOP Standards
- Step-by-step procedures
- Responsible roles
- Expected outcomes

The System Prompt Orchestration

Create a comprehensive system prompt that orchestrates the entire development process:

You are an expert software development assistant that follows a departmental approach to creating software. You will work through each department's considerations iteratively, starting with requirements, then architecture, implementation, testing, security, deployment, and operations.

For each department, you will:
1. Analyze the current project state
2. Apply that department's best practices (from their .md file)
3. Generate appropriate artifacts (code, documentation, tests)
4. Identify cross-departmental dependencies
5. Suggest next steps for the development process

Always ensure that each departmental consideration is fully addressed before moving to the next, but maintain awareness of how decisions impact other departments. Continuously reference the standards defined in each .md file.

When I provide you with a development task, first determine which department would handle it, then apply the prompt series and standards from that department's documentation.

Practical Implementation Workflow

1. Project Initialization

  1. Create a new directory for your project
  2. Initialize source control: git init
  3. Create the documentation structure:
    mkdir docs
    touch docs/ai_guidelines.md
    touch docs/requirements.md
    touch docs/architecture.md
    touch docs/implementation.md
    touch docs/testing.md
    touch docs/security.md
    touch docs/deployment.md
    touch docs/sop.md
    
  4. Populate each file with the structure described above

2. Requirements Phase

  1. Open your AI assistant (Cline, GitHub Copilot, etc.)
  2. Input the system prompt from ai_guidelines.md
  3. Present your project concept
  4. Use prompts from requirements.md to generate:
    • User stories
    • Functional requirements
    • Non-functional requirements
  5. Review and refine the output
  6. Commit the updated requirements document

3. Architecture Phase

  1. Input architecture-related prompts from architecture.md
  2. Ask the AI to design a system architecture based on requirements
  3. Request component diagrams and relationships
  4. Discuss technology choices and tradeoffs
  5. Finalize the architecture document
  6. Commit updated architecture documentation

4. Implementation Phase

  1. Break down components from the architecture
  2. For each component:
    • Use implementation prompts from implementation.md
    • Ask the AI to suggest an implementation approach
    • Get code snippets or complete implementations
    • Review the code for adherence to standards
    • Implement and integrate the component
  3. Continuously commit working code

5. Testing Phase

  1. For each implemented component:
    • Use testing prompts from testing.md
    • Generate test cases covering functionality
    • Implement unit tests and integration tests
    • Verify code coverage meets standards
  2. Commit tests alongside code

6. Security Review Phase

  1. Use security prompts from security.md
  2. Perform security analysis of implemented code
  3. Address identified vulnerabilities
  4. Document security considerations
  5. Commit security improvements

7. Deployment Preparation

  1. Use deployment prompts from deployment.md
  2. Create deployment configuration
  3. Set up CI/CD pipeline
  4. Prepare infrastructure as code
  5. Commit deployment configuration

8. Standard Operating Procedures

  1. Use SOP prompts from sop.md
  2. Create operational documentation
  3. Develop maintenance procedures
  4. Document monitoring and alerting
  5. Commit SOP documentation

Leveraging Local Models

The workflow repository can be particularly effective when combined with locally hosted models:

  1. Installation: Follow the instructions for setting up models like Qwen 2.5 on your local machine
  2. Extension Configuration: Configure extensions like Continue.dev or Twinny to use your local models
  3. Performance Tuning: Adjust model parameters based on your hardware capabilities
  4. Fallback Strategy: Configure your environment to fall back to cloud models for complex tasks

Creating Educational Content

Following the workflow repository methodology, you can create educational content as you develop:

  1. Document Your Process: As you work through each phase, document:

    • Decisions made
    • Challenges encountered
    • Solutions implemented
    • Lessons learned
  2. Create Tutorials: Transform your documentation into step-by-step tutorials

  3. Build a Knowledge Base: Organize your documentation into a searchable knowledge base

  4. Train a Custom Assistant: Use your markdown documentation to train a specialized assistant

Example Project Workflow

Let's walk through an example project using this methodology:

Project: Building a Personal Task Manager

  1. Initialize Documentation Structure

    • Create all department .md files
    • Define project scope in ai_guidelines.md
  2. Requirements Phase

    • Prompt: "Analyze the core requirements of a personal task manager application"
    • Document user stories and requirements
  3. Architecture Phase

    • Prompt: "Design a system architecture for the task manager that supports mobile and desktop interfaces"
    • Create component diagrams and data flow
  4. Implementation Phase

    • Prompt: "Create a code implementation plan for the task storage component"
    • Implement core components incrementally
  5. Testing Phase

    • Prompt: "Design test cases for the task creation and deletion features"
    • Create unit and integration tests
  6. Security Phase

    • Prompt: "Identify potential vulnerabilities in user authentication"
    • Implement security measures
  7. Deployment Phase

    • Prompt: "Create deployment strategy for the task manager application"
    • Set up CI/CD pipeline
  8. SOP Phase

    • Prompt: "Create operational runbook for application maintenance"
    • Document procedures

Benefits of This Approach

  1. Comprehensive Documentation: Every aspect of the project is documented
  2. Structured Development: The process follows a logical flow
  3. Educational Value: The approach teaches software development best practices
  4. Reusability: Documentation can be repurposed for future projects
  5. Quality Assurance: Multiple perspectives ensure higher quality
  6. Reduced Dependency: Less reliance on cloud-based AI services

Common Challenges and Solutions

Challenge: AI Generates Inconsistent Code

Solution: Use the implementation.md standards as a reference point for code review. Always validate generated code against your established standards.

Challenge: Local Models Are Slow

Solution: Use smaller or quantized models for rapid iteration, and save larger models for complex tasks. Consider implementing a hybrid approach with cloud services.

Challenge: Keeping Documentation Updated

Solution: Include a version history in each markdown file and update documentation as part of your code review process.

Challenge: Complex Project Coordination

Solution: Add project management .md files that track progress, dependencies, and milestones.

Advanced Techniques

1. Custom Prompt Templates

Create reusable prompt templates for common tasks:

## Code Review Template
Prompt: "Review this [language] code for [component] and identify:
1. Potential bugs
2. Performance issues
3. Security vulnerabilities
4. Adherence to our coding standards
5. Suggested improvements"

2. AI Feedback Loops

Implement a feedback system where AI output is evaluated and used to refine future prompts:

## Prompt Effectiveness Log
| Prompt | Effectiveness | Issues | Improved Prompt |
|--------|--------------|--------|-----------------|
| "Design database schema for users" | Medium | Too generic | "Design normalized database schema for user profile system with these fields: [fields]" |

3. Persona-Based Prompting

Create different personas for different tasks:

## Personas

### Security Auditor
Role: Identify security vulnerabilities
Prompt style: Critical, detail-oriented
Example: "As a security auditor, review this authentication code for potential vulnerabilities including SQL injection, XSS, CSRF, and improper validation."

### UX Expert
Role: Evaluate user experience
Prompt style: User-focused, empathetic
Example: "As a UX expert, review this registration flow for potential friction points and accessibility issues."

Conclusion

The methodology presented by the kliewerdaniel/workflow repository offers a powerful approach to AI-assisted development that:

  1. Maintains developer control and learning
  2. Creates comprehensive documentation
  3. Follows software development best practices
  4. Reduces dependency on cloud services
  5. Builds a knowledge base for future reference

By implementing this approach, you can leverage AI assistance while continuing to develop your skills and build a personalized knowledge base that grows with each project.

This guide provides a starting point that you can adapt to your specific needs, tools, and preferences. The most important element is the structured, documentation-first approach that ensures you understand what you're building while creating valuable resources for future reference.

About

Structured AI-Assisted Development Workflow Guide

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published