1. Title: feat(root): add TODO.md for project roadmap and tasks
This commit is contained in:
3 files changed
+55
-1
No files matched your search
@@ -0,0 +1,30 @@
|
||||
# 📋 Project Roadmap & TODOs
|
||||
|
||||
This document outlines future improvements, features, and technical debt for `devgen`.
|
||||
|
||||
## 🚀 Priority: Short-Term (Reliability & DX)
|
||||
- [ ] **Full Test Suite**: Implement `pytest` for all modules, especially `commit_generator` and `utils`.
|
||||
- [ ] **Interactive Commit Review**: Add a `--check` flag to `devgen commit run` that allows users to approve/edit the AI message before committing.
|
||||
- [ ] **Project-Level Config**: Support `.devgen.yaml` in the repository root that overrides global `~/.devgen.yaml`.
|
||||
- [ ] **Improved Gitignore Detection**: Auto-detect project type (Python, Node, Go) and suggest relevant `.gitignore` templates during `devgen gitignore run`.
|
||||
|
||||
## 🤖 AI & Intelligence
|
||||
- [ ] **Custom Prompts**: Allow users to define their own Jinja2 templates for commits in the config file.
|
||||
- [ ] **Context-Aware Commits**: Send the manifest file (`package.json`, `pyproject.toml`) to the AI to provide better context for dependency changes.
|
||||
- [ ] **Token Usage Dashboard**: Add a `devgen config tokens` command to estimate or track AI token consumption.
|
||||
- [ ] **More Providers**: Add support for **Mistral**, **Cohere**, and **Groq** for faster/cheaper generations.
|
||||
|
||||
## 🛠️ Developer Experience (DX)
|
||||
- [ ] **Pre-commit Hook Integration**: Provide a command to easily install `devgen` as a pre-commit hook.
|
||||
- [x] **Shell Completion**: Implement `typer` shell completion for `bash`, `zsh`, and `fish`.
|
||||
- [x] **Commit Undo**: `devgen commit undo` to easily revert the last AI-generated commit and unstage files.
|
||||
- [ ] **Multi-Group Commits**: Better handling of repositories where changes are spread across many unrelated directories.
|
||||
|
||||
## 🏗️ Refactoring & Technical Debt
|
||||
- [ ] **Code Split**: Move CLI logic out of `devgen/cli` into separate service classes to improve testability.
|
||||
- [ ] **Consistent Logging**: Standardize log output across all modules.
|
||||
- [ ] **API Documentation**: Use Sphinx or MkDocs to generate documentation for the core modules.
|
||||
|
||||
## 🌍 Ecosystem
|
||||
- [ ] **GitHub Action**: Create an official `devgen` GitHub Action for automated changelog updates on PR merge.
|
||||
- [ ] **VS Code Extension**: A simple extension to trigger `devgen commit` from the sidebar.
|
||||
@@ -1,5 +1,6 @@
|
||||
from typing import Annotated
|
||||
|
||||
import questionary
|
||||
import typer
|
||||
|
||||
from devgen.modules.commit_generator import run_commit_engine
|
||||
@@ -94,3 +95,26 @@ def validate() -> None:
|
||||
typer.echo(f"- {f}")
|
||||
else:
|
||||
typer.secho("[i] No staged files.", fg=typer.colors.RED)
|
||||
|
||||
|
||||
@app.command("undo")
|
||||
def undo_commit() -> None:
|
||||
"""Undoes the last commit but keeps changes staged."""
|
||||
from devgen.utils import run_git_command
|
||||
|
||||
try:
|
||||
# Check if there's at least one commit
|
||||
run_git_command(["git", "rev-parse", "HEAD"])
|
||||
except Exception:
|
||||
typer.secho("No commits found to undo.", fg=typer.colors.RED)
|
||||
return
|
||||
|
||||
if questionary.confirm(
|
||||
"Are you sure you want to undo the last commit? (Changes will remain staged)",
|
||||
default=False,
|
||||
).ask():
|
||||
try:
|
||||
run_git_command(["git", "reset", "--soft", "HEAD~1"])
|
||||
typer.secho("Last commit undone. Changes are still staged.", fg=typer.colors.GREEN)
|
||||
except Exception as e:
|
||||
typer.secho(f"Failed to undo commit: {e}", fg=typer.colors.RED)
|
||||
+1
-1
@@ -15,7 +15,7 @@ from devgen.cli.setup import app as setup_app
|
||||
app = typer.Typer(
|
||||
name="devgen",
|
||||
help="devgen-py: AI-Powered Git Commit & Release Automation.",
|
||||
add_completion=False,
|
||||
add_completion=True,
|
||||
no_args_is_help=True,
|
||||
rich_markup_mode="markdown",
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user