- Extract troubleshooting guide to TROUBLESHOOTING.md - Move usage examples to USAGE_EXAMPLES.md for better discoverability - Add custom specialty creation guide to CONTRIBUTIONS.md - Create semantic commit message generator prompt in prompts/ - Streamline README.md by removing 200+ lines of content now in dedicated files - Improve documentation navigation with clearer separation of concerns
2.0 KiB
2.0 KiB
description
| description |
|---|
| VS Code Commit Generator: Analyzes git diff + project context to write semantic messages. |
Semantic Commit Message Generator (VS Code Edition)
Goal
Analyze staged changes and synthesize a strictly formatted Conventional Commit message. Crucial Upgrade: You must correlate the code changes (What) with the active session context (Why) retrieved from the workspace.
Phase 1: Context Retrieval (RAG)
Execute these lookups to ground your analysis:
- Get the "What" (Code):
- Run:
git diff --cached(If empty, warn user to stage files first).
- Run:
- Get the "Why" (Intent):
- Search Workspace: Find the most recent
SESSION_SNAPSHOT*.mdindocumentation/project-history/. - Search Workspace: Look for
TODOor// RESTART NOTEcomments in the changed files themselves. - Reasoning: A commit message is better if it says "feat(auth): enable TFA per session plan" rather than just "feat(auth): update config".
- Search Workspace: Find the most recent
Phase 2: Change Analysis (Chain of Thought)
Reference: .github/knowledge/example.CoT-Prompting.md
Analyze the combined inputs (Diff + Session Context):
- Type Determination:
feat: New features (check against Session Snapshot "Achievements").fix: Bug fixes (check against Session Snapshot "Blockers").chore/refactor/docs: Maintenance/Refactoring/Documentation.
- Scope Identification: Narrow to the specific module (e.g.,
core,auth,docs). - Breaking Change Check: Does this modify
compose.yamlports or volume paths? If yes, flag asBREAKING CHANGE.
Phase 3: Message Synthesis
Draft the message using the Conventional Commits standard.
Format Template:
<type>(<scope>): <imperative summary (max 50 chars)>
<blank line>
- <bullet point connecting change to specific file>
- <bullet point explaining the 'why' based on session context>
<optional: Footer for BREAKING CHANGE or 'Ref: #IssueID'>