feat: improve PR and add changeset

This commit is contained in:
Ralph Khreish
2025-07-23 17:13:41 +03:00
parent 784fc65b21
commit 66f21b22db
6 changed files with 24 additions and 261 deletions

View File

@@ -0,0 +1,24 @@
---
"task-master-ai": minor
---
Add comprehensive Kiro IDE integration with autonomous task management hooks
- **Kiro Profile**: Added full support for Kiro IDE with automatic installation of 7 Taskmaster agent hooks
- **Hook-Driven Workflow**: Introduced natural language automation hooks that eliminate manual task status updates
- **Automatic Hook Installation**: Hooks are now automatically copied to `.kiro/hooks/` when running `task-master rules add kiro`
- **Language-Agnostic Support**: All hooks support multiple programming languages (JS, Python, Go, Rust, Java, etc.)
- **Frontmatter Transformation**: Kiro rules use simplified `inclusion: always` format instead of Cursor's complex frontmatter
- **Special Rule**: Added `taskmaster_hooks_workflow.md` that guides AI assistants to prefer hook-driven completion
Key hooks included:
- Task Dependency Auto-Progression: Automatically starts tasks when dependencies complete
- Code Change Task Tracker: Updates task progress as you save files
- Test Success Task Completer: Marks tasks done when tests pass
- Daily Standup Assistant: Provides personalized task status summaries
- PR Readiness Checker: Validates task completion before creating pull requests
- Complexity Analyzer: Auto-expands complex tasks into manageable subtasks
- Git Commit Task Linker: Links commits to tasks for better traceability
This creates a truly autonomous development workflow where task management happens naturally as you code!

View File

@@ -1,185 +0,0 @@
# Kiro Hooks for Taskmaster Integration
This directory contains Kiro Agent Hooks that automate Taskmaster workflows using natural language prompts.
## What are Kiro Hooks?
Kiro hooks are automated workflows that trigger when specific events occur in your IDE:
- **File Save**: When you save a file
- **File Create**: When you create a new file
- **File Delete**: When you delete a file
- **Manual**: When you explicitly run them
Each hook sends a natural language prompt to Kiro's AI agent, which then executes the requested actions.
## Installation
1. **Install Kiro IDE** from [kiro.dev](https://kiro.dev)
2. **Open your Taskmaster project** in Kiro
3. **Hooks are automatically loaded** from `.kiro/hooks/*.kiro.hook` files
- They appear in Kiro's Agent Hooks panel
- Enable/disable hooks as needed for your workflow
## Philosophy: Hook-Driven Task Management
Traditional task management requires manual status updates - you complete work, then remember to mark tasks done. Taskmaster's Kiro hooks flip this model:
**Old Way**: Code → Test → Remember to update task → Mark as done → Check dependencies → Start next task
**Hook Way**: Code → Test → Hooks detect completion → Auto-update → Auto-progress
This creates a truly autonomous workflow where task management happens naturally as you work!
## Available Hooks
### 🔄 [TM] Task Dependency Auto-Progression
- **File**: `tm-task-dependency-auto-progression.kiro.hook`
- **Trigger**: Save `.taskmaster/tasks/tasks.json`
- **Action**: Automatically starts tasks when their dependencies are completed
- **Use**: Just mark a task as done - dependent tasks start automatically!
### 📝 [TM] Code Change Task Tracker
- **File**: `tm-code-change-task-tracker.kiro.hook`
- **Trigger**: Save any source code file
- **Action**: Updates in-progress tasks with implementation notes
- **Use**: Your progress is automatically tracked as you code
### ✅ [TM] Test Success Task Completer
- **File**: `tm-test-success-task-completer.kiro.hook`
- **Trigger**: Save test files
- **Action**: Suggests marking tasks as done when tests pass
- **Use**: Complete tasks by making tests green - no manual status updates!
### 🏗️ [TM] New File Boilerplate
- **File**: `tm-new-file-boilerplate.kiro.hook`
- **Trigger**: Create new source file
- **Action**: Generates language-appropriate boilerplate and links to relevant task
- **Use**: Smart scaffolding for any programming language
### ☀️ [TM] Daily Standup Assistant
- **File**: `tm-daily-standup-assistant.kiro.hook`
- **Trigger**: Manual (userTriggered)
- **Action**: Shows completed, in-progress, and suggested next tasks
- **Use**: Run each morning for a personalized standup
### 🚀 [TM] PR Readiness Checker
- **File**: `tm-pr-readiness-checker.kiro.hook`
- **Trigger**: Manual (userTriggered)
- **Action**: Validates all tasks are complete before PR
- **Use**: Run before creating pull requests
### 🧹 [TM] Import Cleanup on Delete
- **File**: `tm-import-cleanup-on-delete.kiro.hook`
- **Trigger**: Delete a source file
- **Action**: Removes/comments related imports automatically
- **Use**: Keep codebase clean when refactoring
### 📊 [TM] Complexity Analyzer
- **File**: `tm-complexity-analyzer.kiro.hook`
- **Trigger**: Save tasks.json (disabled by default)
- **Action**: Auto-expands complex tasks into subtasks
- **Use**: Enable for automatic task breakdown
### 🔗 [TM] Git Commit Task Linker
- **File**: `tm-git-commit-task-linker.kiro.hook`
- **Trigger**: Manual (userTriggered)
- **Action**: Links commits to tasks and generates messages
- **Use**: Maintain task-commit traceability
## Creating Custom Hooks
1. Open Kiro's Agent Hooks panel
2. Click "+" to create a new hook
3. Write your prompt in natural language, for example:
```
When I save a markdown file in the docs folder, check if any
tasks mention documentation updates. If so, add a note to those
tasks saying which doc was updated and mark any documentation
tasks as complete if appropriate.
```
## Best Practices
1. **Start Simple**: Begin with one or two hooks and expand gradually
2. **Test First**: Test hooks on a feature branch before enabling globally
3. **Be Specific**: Clear, detailed prompts give better results
4. **Use Task IDs**: Reference specific task IDs in your prompts when possible
5. **Safety First**: Always include safety checks for destructive operations
## Hook Configuration
Each `.kiro.hook` file contains:
- `name`: Display name in Kiro
- `description`: What the hook does
- `version`: Hook format version
- `enabled`: Whether it's active
- `when`: Trigger configuration
- `type`: `fileEdited`, `fileCreated`, `fileDeleted`, or `manual`
- `patterns`: File glob patterns (for file-based triggers)
- `then`: Action configuration
- `type`: `askAgent` (sends prompt to AI)
- `prompt`: Natural language instructions for the AI
## Customization
To customize a hook:
1. Open the Agent Hooks panel in Kiro
2. Select the hook to edit
3. Modify the prompt to match your workflow
4. Save and test the changes
## Team Sharing
Share hooks with your team:
1. Commit the `.kiro/hooks/` directory to version control
2. Team members pull the changes
3. Hooks are automatically available in their Kiro IDE
## Troubleshooting
- **Hook not triggering?** Check file patterns match your files
- **Unexpected behavior?** Review and clarify the prompt
- **Performance issues?** Disable resource-intensive hooks
- **Need help?** Check Kiro docs at [kiro.dev/docs/hooks](https://kiro.dev/docs/hooks)
## Examples in Action
### Example 1: Auto-progression
```
1. You complete Task 1: "Set up database schema"
2. Save tasks.json with status: "done"
3. Hook detects Task 2 "Create API endpoints" depends only on Task 1
4. Automatically runs: tm set-status --id=2 --status=in-progress
5. You get a notification: "Task 2 is ready to start!"
```
### Example 2: Progress Tracking
```
1. You're working on Task 3: "Implement user authentication"
2. You save src/auth/login.js
3. Hook detects the in-progress task
4. Automatically adds note: "Implemented login functionality in auth/login.js"
5. Your task history is maintained automatically
```
## Integration with Taskmaster
These hooks use Taskmaster CLI commands:
- `tm list` - List tasks
- `tm next` - Get next task
- `tm set-status` - Update task status
- `tm update-task` - Add task notes
- `tm analyze-complexity` - Check task complexity
Make sure Taskmaster CLI is installed and accessible in your terminal.
## Next Steps
1. Enable the hooks that match your workflow
2. Run the Daily Standup Assistant to see your tasks
3. Start coding and watch the automation work!
4. Create custom hooks for your specific needs
5. Share successful hooks with your team
Happy automating! 🚀

View File

@@ -1,19 +0,0 @@
{
"enabled": true,
"name": "[TM] Import Cleanup on Delete",
"description": "Clean up imports when files are deleted",
"version": "1",
"when": {
"type": "fileDeleted",
"patterns": [
"**/*.{js,ts,jsx,tsx,py,go,rs,java,cpp,c,h,hpp,cs,rb,php,swift,kt}",
"!**/node_modules/**",
"!**/vendor/**",
"!**/.git/**"
]
},
"then": {
"type": "askAgent",
"prompt": "A source file was just deleted. Please:\n\n1. Based on the file type, search for all references to this file across the codebase (imports, includes, requires, use statements, etc.)\n2. Comment out or remove these references using the appropriate syntax for each language\n3. Check if any tasks mention this file and add a note about its deletion\n4. If this deletion completes a 'remove' or 'refactor' task, ask if it should be marked as done\n\nNote: Reference patterns vary by language (import/from, #include, require, use, etc.)"
}
}

View File

@@ -1,19 +0,0 @@
{
"enabled": true,
"name": "[TM] New File Boilerplate",
"description": "Create task-aware file scaffolding for any language",
"version": "1",
"when": {
"type": "fileCreated",
"patterns": [
"**/*.{js,ts,jsx,tsx,py,go,rs,java,cpp,c,h,hpp,cs,rb,php,swift,kt}",
"!**/node_modules/**",
"!**/vendor/**",
"!**/.git/**"
]
},
"then": {
"type": "askAgent",
"prompt": "A new source file was created. Please:\n\n1. Check if there's a task related to creating this file or its functionality\n2. Based on the file extension and project context, generate appropriate boilerplate code:\n - Language-specific structure (class, function, module, component, etc.)\n - Common imports/includes for the detected language\n - Basic documentation/comments in the language's style\n - Comment linking to the relevant task ID if found\n3. If appropriate for the language/framework, suggest creating a corresponding test file\n4. Update the task notes to indicate the file was created"
}
}

View File

@@ -1,19 +0,0 @@
{
"enabled": true,
"name": "[TM] Import Cleanup on Delete",
"description": "Clean up imports when files are deleted",
"version": "1",
"when": {
"type": "fileDeleted",
"patterns": [
"**/*.{js,ts,jsx,tsx,py,go,rs,java,cpp,c,h,hpp,cs,rb,php,swift,kt}",
"!**/node_modules/**",
"!**/vendor/**",
"!**/.git/**"
]
},
"then": {
"type": "askAgent",
"prompt": "A source file was just deleted. Please:\n\n1. Based on the file type, search for all references to this file across the codebase (imports, includes, requires, use statements, etc.)\n2. Comment out or remove these references using the appropriate syntax for each language\n3. Check if any tasks mention this file and add a note about its deletion\n4. If this deletion completes a 'remove' or 'refactor' task, ask if it should be marked as done\n\nNote: Reference patterns vary by language (import/from, #include, require, use, etc.)"
}
}

View File

@@ -1,19 +0,0 @@
{
"enabled": true,
"name": "[TM] New File Boilerplate",
"description": "Create task-aware file scaffolding for any language",
"version": "1",
"when": {
"type": "fileCreated",
"patterns": [
"**/*.{js,ts,jsx,tsx,py,go,rs,java,cpp,c,h,hpp,cs,rb,php,swift,kt}",
"!**/node_modules/**",
"!**/vendor/**",
"!**/.git/**"
]
},
"then": {
"type": "askAgent",
"prompt": "A new source file was created. Please:\n\n1. Check if there's a task related to creating this file or its functionality\n2. Based on the file extension and project context, generate appropriate boilerplate code:\n - Language-specific structure (class, function, module, component, etc.)\n - Common imports/includes for the detected language\n - Basic documentation/comments in the language's style\n - Comment linking to the relevant task ID if found\n3. If appropriate for the language/framework, suggest creating a corresponding test file\n4. Update the task notes to indicate the file was created"
}
}