/plugin marketplace add dominikdrag/devflow/plugin install dominikdrag-devflow@dominikdrag/devflowDefined in hooks/hooks.json
{
"PreCompact": [
{
"hooks": [
{
"type": "prompt",
"prompt": "Check if a /feature or /tdd workflow is active. If NO active workflow, return: {\"decision\": \"allow\"}.\n\nFOR /feature WORKFLOW:\n1) Build phaseHistory array from conversation. For each phase completed or in progress, create entry: {\"phase\": N, \"name\": \"...\", \"status\": \"completed|in_progress\", \"startedAt\": \"ISO\", \"completedAt\": \"ISO or null\", \"outputs\": {...}}\n2) Phase-specific outputs:\n - Phase 1 Discovery: {\"requirements\": [...], \"constraints\": [...]}\n - Phase 2 Exploration: {\"agentCount\": N, \"keyFiles\": [...], \"patterns\": [...], \"integrationPoints\": [...]}\n - Phase 3 Clarifications: {\"clarifications\": [{\"question\": \"...\", \"answer\": \"...\"}]}\n - Phase 4 Architecture: {\"agentCount\": N, \"optionsPresented\": [...], \"selectedArchitecture\": \"...\", \"selectionRationale\": \"...\"}\n - Phase 5 Planning: {\"taskCount\": N, \"testCount\": N, \"reviewCount\": N, \"planFile\": \"claude-tmp/devflow-plan.md\"}\n - Phase 6 Implementation: {\"tasksCompleted\": [...], \"tasksRemaining\": [...], \"filesModified\": [...]}\n - Phase 7 Testing: {\"testsWritten\": [...], \"testsPassing\": true|false}\n - Phase 8 Review: {\"issuesFound\": N, \"issuesFixed\": [...], \"issuesSkipped\": [...]}\n3) Write to claude-tmp/devflow-state.json: {\"active\": true, \"workflowType\": \"feature\", \"featureDescription\": \"...\", \"startedAt\": \"ISO\", \"lastUpdatedAt\": \"ISO\", \"currentPhase\": N, \"currentTask\": \"TASK-NNN\" or null, \"phaseHistory\": [...], \"decisions\": {\"architecture\": \"...\", \"testStrategy\": \"...\"}, \"summary\": \"...\"}\n4) Update claude-tmp/devflow-plan.md if exists: update Current Task, add progress log entry, mark completed tasks.\n\nFOR /tdd WORKFLOW:\n1) Build phaseHistory array. Phase-specific outputs same as feature except:\n - Phase 4 Test Planning: {\"agentCount\": N, \"testCases\": [...], \"testPlanApproved\": true|false}\n - Phase 6 Planning: {\"tddTaskCount\": N, \"planFile\": \"claude-tmp/tdd-plan.md\"}\n - Phase 7 TDD Implementation: {\"completedTasks\": [...], \"blockedTasks\": [...], \"skippedRefactors\": [...]}\n2) Write to claude-tmp/tdd-state.json: {\"active\": true, \"workflowType\": \"tdd\", \"featureDescription\": \"...\", \"startedAt\": \"ISO\", \"lastUpdatedAt\": \"ISO\", \"currentPhase\": N, \"currentTask\": {\"id\": \"TDD-NNN\", \"substep\": \"red|green|refactor\", \"attempts\": N, \"errors\": [...]}, \"phaseHistory\": [...], \"decisions\": {\"testPlan\": \"...\", \"architecture\": \"...\"}, \"summary\": \"...\"}\n3) Update claude-tmp/tdd-plan.md if exists.\n\nReturn: {\"decision\": \"allow\"}",
"timeout": 120
}
]
}
]
}{
"riskFlags": {
"touchesBash": false,
"matchAllTools": false,
"touchesFileWrites": false
},
"typeStats": {
"prompt": 1
},
"eventStats": {
"PreCompact": 1
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 0,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 0
}
}