feat: Add Kiro hooks and configuration for Taskmaster integration (#1032)
* feat: Add Kiro hooks and configuration for Taskmaster integration - Introduced multiple Kiro hooks to automate task management workflows, including: - Code Change Task Tracker - Complexity Analyzer - Daily Standup Assistant - Git Commit Task Linker - Import Cleanup on Delete - New File Boilerplate - PR Readiness Checker - Task Dependency Auto-Progression - Test Success Task Completer - Added .mcp.json configuration for Taskmaster AI integration. - Updated development workflow documentation to reflect new hook-driven processes and best practices. This commit enhances the automation capabilities of Taskmaster, streamlining task management and improving developer efficiency. * chore: run format * chore: improve unit tests on kiro rules * chore: run format * chore: run format * feat: improve PR and add changeset
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
// Kiro profile for rule-transformer
|
||||
import { createProfile } from './base-profile.js';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { log } from '../../scripts/modules/utils.js';
|
||||
|
||||
// Create and export kiro profile using the base factory
|
||||
export const kiroProfile = createProfile({
|
||||
@@ -20,6 +23,7 @@ export const kiroProfile = createProfile({
|
||||
// 'rules/self_improve.mdc': 'self_improve.md'
|
||||
// 'rules/taskmaster.mdc': 'taskmaster.md'
|
||||
// We can add additional custom mappings here if needed
|
||||
'rules/taskmaster_hooks_workflow.mdc': 'taskmaster_hooks_workflow.md'
|
||||
},
|
||||
customReplacements: [
|
||||
// Core Kiro directory structure changes
|
||||
@@ -37,6 +41,45 @@ export const kiroProfile = createProfile({
|
||||
|
||||
// Kiro specific terminology
|
||||
{ from: /rules directory/g, to: 'steering directory' },
|
||||
{ from: /cursor rules/gi, to: 'Kiro steering files' }
|
||||
]
|
||||
{ from: /cursor rules/gi, to: 'Kiro steering files' },
|
||||
|
||||
// Transform frontmatter to Kiro format
|
||||
// This regex matches the entire frontmatter block and replaces it
|
||||
{
|
||||
from: /^---\n(?:description:\s*[^\n]*\n)?(?:globs:\s*[^\n]*\n)?(?:alwaysApply:\s*true\n)?---/m,
|
||||
to: '---\ninclusion: always\n---'
|
||||
}
|
||||
],
|
||||
|
||||
// Add lifecycle hook to copy Kiro hooks
|
||||
onPostConvert: (projectRoot, assetsDir) => {
|
||||
const hooksSourceDir = path.join(assetsDir, 'kiro-hooks');
|
||||
const hooksTargetDir = path.join(projectRoot, '.kiro', 'hooks');
|
||||
|
||||
// Create hooks directory if it doesn't exist
|
||||
if (!fs.existsSync(hooksTargetDir)) {
|
||||
fs.mkdirSync(hooksTargetDir, { recursive: true });
|
||||
}
|
||||
|
||||
// Copy all .kiro.hook files
|
||||
if (fs.existsSync(hooksSourceDir)) {
|
||||
const hookFiles = fs
|
||||
.readdirSync(hooksSourceDir)
|
||||
.filter((f) => f.endsWith('.kiro.hook'));
|
||||
|
||||
hookFiles.forEach((file) => {
|
||||
const sourcePath = path.join(hooksSourceDir, file);
|
||||
const targetPath = path.join(hooksTargetDir, file);
|
||||
|
||||
fs.copyFileSync(sourcePath, targetPath);
|
||||
});
|
||||
|
||||
if (hookFiles.length > 0) {
|
||||
log(
|
||||
'info',
|
||||
`[Kiro] Installed ${hookFiles.length} Taskmaster hooks in .kiro/hooks/`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user