Setup tool for Improved Spec-Driven Development projects with AI assistant templates and GitLab Flow integration
Project description
Improved-SDD
A GitHub Copilot Studio project with Improved Spec-Driven Development templates for building high-quality Python CLI applications.
Features
- Spec-Driven Development: Structured approach to software development with comprehensive specifications
- GitLab Flow Integration: Built-in workflow guidance with automatic commit prompts and PR creation
- Python CLI Framework: Built with Typer and Rich for modern, beautiful command-line interfaces
- Automated Code Quality: Pre-commit hooks with Flake8, Black, isort, and mypy
- GitHub Copilot Integration: Custom templates and instructions for AI-assisted development
- CI/CD Ready: GitHub Actions workflow for automated testing and linting
- Cross-Platform: Works on Windows, macOS, and Linux
Quick Start
-
Clone the repository
git clone <repository-url> cd improved-sdd
-
Install dependencies
pip install -r requirements.txt
-
Set up development environment
pip install pre-commit pre-commit install
-
Open in VS Code and start developing with GitHub Copilot using the provided templates
Usage
CLI Commands
The project includes a CLI tool for managing spec-driven development projects:
# Initialize a new project with GitLab Flow (default)
python src/improved_sdd_cli.py init <project-name>
# Initialize without GitLab Flow integration
python src/improved_sdd_cli.py init <project-name> --no-gitlab-flow
# Delete a project (with confirmation)
python src/improved_sdd_cli.py delete <project-name>
# Check project configuration
python src/improved_sdd_cli.py check <project-name>
# Get help
python src/improved_sdd_cli.py --help
Development Workflow
- Create a specification in
specs/ - Use the CLI to initialize your project structure
- Develop following the spec-driven approach
- Commit changes (linting runs automatically)
GitLab Flow Integration
The improved-sdd CLI includes built-in GitLab Flow support that provides workflow guidance during spec development:
Automatic Workflow Integration
- Setup Guidance: Branch creation and repository validation before starting specs
- Phase Commit Prompts: Commit guidance after completing each spec phase (feasibility, requirements, design, tasks)
- PR Creation: Step-by-step PR creation guidance after implementation completion
- Platform-Specific Commands: Windows PowerShell vs Unix/macOS bash command syntax
How It Works
GitLab Flow uses a dynamic keyword integration approach:
- Markdown Files as Variables: GitLab Flow content stored in
templates/gitlab-flow/*.mdfiles - Keyword Replacement: Keywords like
{GITLAB_FLOW_SETUP},{GITLAB_FLOW_COMMIT},{GITLAB_FLOW_PR}in chatmode files - Conditional Loading: Keywords replaced with GitLab Flow content when enabled, empty when disabled
- Platform Detection: Commands automatically adjusted for Windows vs Unix systems
CLI Flag Control
# Enable GitLab Flow (default behavior)
python src/improved_sdd_cli.py init my-project --gitlab-flow
# Disable GitLab Flow
python src/improved_sdd_cli.py init my-project --no-gitlab-flow
Example Workflow
- Project Initialization:
improved-sdd init my-feature --gitlab-flow - Branch Setup: Follow GitLab Flow setup guidance in chatmode
- Spec Development: Complete feasibility → requirements → design → tasks
- Automatic Commits: Commit after each phase using provided guidance
- Implementation: Execute tasks with commit prompts between tasks
- PR Creation: Create pull request when all implementation complete
GitLab Flow Templates
The system includes three core templates:
gitlab-flow-setup.md: Repository validation and branch creationgitlab-flow-commit.md: Phase completion commit guidance with conventional commit formatgitlab-flow-pr.md: PR creation with timing safeguards and templates
Benefits
- ✅ Integrated Workflow: Git operations embedded naturally in spec development
- ✅ Zero Breaking Changes: Existing workflows unchanged when disabled
- ✅ Platform Agnostic: Works on Windows, macOS, and Linux
- ✅ Flexible Control: Easy to enable/disable via CLI flag
- ✅ Best Practices: Conventional commits and proper PR timing
Development Setup
Prerequisites
- Python 3.8 or higher
- VS Code with Python extension
- Git
Installation
-
Clone the repository
-
Install dependencies:
pip install -r requirements.txt
-
Install pre-commit hooks:
pip install pre-commit pre-commit install
Code Quality Tools
This project uses comprehensive linting and formatting tools:
Automatic Linting (Pre-commit Hooks)
Pre-commit hooks run automatically on each commit. Install them with:
pre-commit install
Run manually on all files:
pre-commit run --all-files
Manual Tools
# Style guide enforcement
flake8 src/ --max-line-length=120
# Code formatting
black src/
# Import sorting
isort src/ --profile=black
# Type checking
mypy src/
VS Code Integration
The project includes optimized VS Code settings for:
- Real-time linting with Flake8
- Automatic formatting with Black on save
- Import sorting
- 120-character line ruler
CI/CD
GitHub Actions automatically runs quality checks on:
- Pushes to main/develop branches
- Pull requests
Project Structure
improved-sdd/
├── src/ # Source code
├── specs/ # Project specifications
├── templates/ # Development templates
│ ├── chatmodes/ # AI behavior patterns
│ ├── instructions/ # Development guidance
│ ├── prompts/ # Structured AI prompts
│ └── gitlab-flow/ # GitLab Flow workflow templates
├── memory/ # Project memory and constitution
├── .github/ # GitHub templates and workflows
├── requirements.txt # Python dependencies
├── pyproject.toml # Project configuration
├── .pre-commit-config.yaml # Pre-commit hooks
└── .flake8 # Linting configuration
Templates Available
- Chatmodes: AI behavior patterns for different development scenarios
- Instructions: Context-specific development guidance
- Prompts: Structured prompts for AI interactions
- GitLab Flow: Workflow templates for git operations and branch management
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes and ensure tests pass
- Commit with pre-commit hooks:
git commit -m "Add your feature" - Push to your branch:
git push origin feature/your-feature - Create a Pull Request
Development Guidelines
- Follow the spec-driven development approach
- Write clear, documented code
- Use type hints for better code quality
- Run pre-commit hooks before committing
- Update specifications for new features
Resources
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file improved_sdd-0.1.4.tar.gz.
File metadata
- Download URL: improved_sdd-0.1.4.tar.gz
- Upload date:
- Size: 44.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1820ba782f858aea74bbfc677b25f377f23c99fd3d856eb4a2463aad9ea17f4
|
|
| MD5 |
b33edf7bab44bce0acefd2d920b48461
|
|
| BLAKE2b-256 |
6a6b1e6a0e485fef2a12f1b1e51f81579aa4977dcf18a4e073617adea6ded86b
|
File details
Details for the file improved_sdd-0.1.4-py3-none-any.whl.
File metadata
- Download URL: improved_sdd-0.1.4-py3-none-any.whl
- Upload date:
- Size: 44.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9ce75cdbfc82d0f79953a20318a2362cce03e62d17d5fcff5db304991f6771b
|
|
| MD5 |
7353dd82bc913727ab42fd6005383e8d
|
|
| BLAKE2b-256 |
fd55ed18ed158a1fca72a1982033055ec5bc7791825fc61b31df8696c62a154b
|