diff --git a/CHANGELOG.md b/CHANGELOG.md index 87a48f8..a04cbbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to Plan2Code will be documented in this file. +## v1.11.1 + +### 🔧 Changed + +- **Task complexity check in Document workflow** — Enhanced task writing guidance with lightweight cognitive complexity heuristics (inspired by PR #26) + - "Time-boxed" criterion now includes explicit split triggers: 5+ logic branches, 2+ integration points, or shared interface mutation + - New "Complexity check" prompt: before finalizing each task, LLM considers logic branches, distinct behaviors, integration points, shared interface impact, and error/edge cases + - Tasks complex on 3+ signals must be split; adjacent trivial tasks forming a cohesive unit should be combined + - Process step 7 updated to reinforce the complexity check during phase file authoring + ## v1.11.0 ### ✨ Added @@ -13,7 +23,15 @@ All notable changes to Plan2Code will be documented in this file. - State file (`.plan2code-bot-state.json`) saved after each step; automatically deleted on full success, preserved on failure for later resume - Resume auto-detects state files in current directory (enhancement mode) or immediate subdirectories (new-project mode) - Artifact validation after each step (aborts on missing expected outputs) - - Auto-responder handles `AskUserQuestion` prompts autonomously (approvals, testing gates, name questions) + - **LLM-as-judge evaluation system** — Always-on quality assessment that transforms bot from "yes-man" to authentic QA agent + - **Intelligent decision making**: Uses LLM to answer `AskUserQuestion` prompts based on current observations (tools used, files created, errors) instead of hardcoded keyword matching + - **Post-step evaluation**: Comprehensive quality assessment after each step using step-specific criteria (score 0-100, strengths, weaknesses, suggestions, critical issues) + - **Observation tracking**: Full execution history captured (tools, files, messages, errors, questions with LLM reasoning) + - **Quality gate**: Blocks finalization if average score < 60, ensuring minimum quality standards + - **Evaluation artifacts**: Creates `BOT-EVALUATION.md` (quality assessments) and `BOT-NOTES.md` (execution observations) for metrics analysis + - **Color-coded output**: Green (≥85), yellow (70-84), red (<70) score display in console + - **Honest scoring**: Evaluation criteria emphasize realistic assessment (most work scores 70-85, not inflated) + - **Metrics-ready data**: Structured `EvaluationResult` and `ExecutionObservation` in state file for `plan2code-metrics` analysis - Bot-friendly skill installation (copies plan2code skills with `disable-model-invocation` stripped) - Implement step loops up to 10 passes until all phases are complete - Installer integration: `C > B` menu option to install bot CLI only diff --git a/install.js b/install.js index 21ad9da..e570882 100644 --- a/install.js +++ b/install.js @@ -1387,32 +1387,43 @@ function runInteractive() { console.log(padEndVisible(`${COLORS.CYAN}║${COLORS.RESET} ${COLORS.BRIGHT}INSTALL PLAN2CODE${COLORS.RESET}`, 58) + `${COLORS.CYAN}║${COLORS.RESET}`); console.log(`${COLORS.CYAN}╠═════════════════════════════════════════════════════════╣${COLORS.RESET}`); console.log(padEndVisible(`${COLORS.CYAN}║${COLORS.RESET} ${COLORS.BRIGHT}I.${COLORS.RESET} ${COLORS.GREEN}INSTALL${COLORS.RESET} Install Plan2Code for all platforms`, 58) + `${COLORS.CYAN}║${COLORS.RESET}`); + console.log(padEndVisible(`${COLORS.CYAN}║${COLORS.RESET} ${COLORS.BRIGHT}A.${COLORS.RESET} ${COLORS.MAGENTA}ALL${COLORS.RESET} Install Plan2Code + dev tools`, 58) + `${COLORS.CYAN}║${COLORS.RESET}`); console.log(padEndVisible(`${COLORS.CYAN}║${COLORS.RESET} ${COLORS.BRIGHT}U.${COLORS.RESET} ${COLORS.RED}UNINSTALL${COLORS.RESET} Remove Plan2Code files`, 58) + `${COLORS.CYAN}║${COLORS.RESET}`); console.log(padEndVisible(`${COLORS.CYAN}║${COLORS.RESET} ${COLORS.BRIGHT}C.${COLORS.RESET} ${COLORS.BLUE}CUSTOM${COLORS.RESET} Advanced options`, 58) + `${COLORS.CYAN}║${COLORS.RESET}`); console.log(padEndVisible(`${COLORS.CYAN}║${COLORS.RESET} ${COLORS.BRIGHT}Q.${COLORS.RESET} ${COLORS.DIM}QUIT${COLORS.RESET} Exit`, 58) + `${COLORS.CYAN}║${COLORS.RESET}`); console.log(`${COLORS.CYAN}╚═════════════════════════════════════════════════════════╝${COLORS.RESET}`); console.log(''); - // Task 2.2: Input prompt + // Input prompt console.log(''); - const answer = await question(`${COLORS.CYAN}${SYMBOLS.SELECT} SELECT OPTION${COLORS.RESET} (I, U, C, Q) [I]: `); + const answer = await question(`${COLORS.CYAN}${SYMBOLS.SELECT} SELECT OPTION${COLORS.RESET} (I, A, U, C, Q) [I]: `); const input = answer.trim().toUpperCase() || 'I'; - // Task 2.3: I path — Install All + // I path — Install prompts + loop if (input === 'I') { rl.close(); const loopResult = installPlan2CodeLoop(); console.log(''); - const metricsResult = installPlan2CodeMetrics(); - console.log(''); - const botResult = installPlan2CodeBot(); - console.log(''); const installResult = install(); - const exitCode = loopResult !== 0 ? loopResult : metricsResult !== 0 ? metricsResult : botResult !== 0 ? botResult : installResult; + const exitCode = loopResult !== 0 ? loopResult : installResult; process.exit(exitCode); } - // Task 2.4: U path — Uninstall All + // A path — Install Everything (prompts + loop + bot + metrics) + if (input === 'A') { + rl.close(); + const loopResult = installPlan2CodeLoop(); + console.log(''); + const botResult = installPlan2CodeBot(); + console.log(''); + const metricsResult = installPlan2CodeMetrics(); + console.log(''); + const installResult = install(); + const exitCode = loopResult !== 0 ? loopResult : installResult !== 0 ? installResult : botResult !== 0 ? botResult : metricsResult; + process.exit(exitCode); + } + + // U path — Uninstall All if (input === 'U') { console.log(''); console.log(`${COLORS.RED} o o${COLORS.RESET}`); @@ -1442,7 +1453,7 @@ function runInteractive() { } } - // Task 2.5: C path — CUSTOM sub-menu + // C path — CUSTOM sub-menu if (input === 'C') { console.log(''); console.log(`${COLORS.CYAN}╔════════════════════════════════════════════════════════════════╗${COLORS.RESET}`); @@ -1458,13 +1469,13 @@ function runInteractive() { const customAnswer = await question(`${COLORS.CYAN}${SYMBOLS.SELECT} SELECT OPTION${COLORS.RESET} (L, O, M, B, Q) [Q]: `); const customInput = customAnswer.trim().toUpperCase() || 'Q'; - // Task 2.6: C > L — show local install instructions + // C > L — show local install instructions if (customInput === 'L') { rl.close(); process.exit(displayLocalInstructions()); } - // Task 2.7: C > O — install loop CLI only + // C > O — install loop CLI only if (customInput === 'O') { rl.close(); const result = installPlan2CodeLoop(); @@ -1485,19 +1496,19 @@ function runInteractive() { process.exit(result); } - // Task 2.8: C > Q — back to main menu + // C > Q — back to main menu return main(); } - // Task 2.8: Q — exit + // Q — exit if (input === 'Q') { console.log(`\n${COLORS.YELLOW}${SYMBOLS.WARNING} CANCELLED${COLORS.RESET}\n`); rl.close(); process.exit(0); } - // Task 2.8: Invalid input — loop back - console.log(`\n${COLORS.RED}${SYMBOLS.ERROR} Invalid option. Please choose I, U, C, or Q.${COLORS.RESET}\n`); + // Invalid input — loop back + console.log(`\n${COLORS.RED}${SYMBOLS.ERROR} Invalid option. Please choose I, A, U, C, or Q.${COLORS.RESET}\n`); return main(); } diff --git a/version.json b/version.json index d807009..8ce448d 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "name": "Plan2Code", - "version": "1.10.0", + "version": "1.11.1", "description": "A structured 4-step workflow methodology for AI-assisted software development", "keywords": [ "ai",