sumulige-claude 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/hooks/code-formatter.cjs +7 -2
- package/.claude/hooks/multi-session.cjs +9 -3
- package/.claude/hooks/pre-commit.cjs +0 -0
- package/.claude/hooks/pre-push.cjs +0 -0
- package/.claude/hooks/project-kickoff.cjs +22 -11
- package/.claude/hooks/rag-skill-loader.cjs +7 -0
- package/.claude/hooks/thinking-silent.cjs +9 -3
- package/.claude/hooks/todo-manager.cjs +19 -13
- package/.claude/hooks/verify-work.cjs +10 -4
- package/.claude/quality-gate.json +9 -3
- package/.claude/settings.local.json +18 -1
- package/.claude/templates/hooks/README.md +302 -0
- package/.claude/templates/hooks/hook.sh.template +94 -0
- package/.claude/templates/hooks/user-prompt-submit.cjs.template +116 -0
- package/.claude/templates/hooks/user-response-submit.cjs.template +94 -0
- package/.claude/templates/hooks/validate.js +173 -0
- package/.claude/workflow/document-scanner.js +426 -0
- package/.claude/workflow/knowledge-engine.js +941 -0
- package/.claude/workflow/notebooklm/browser.js +1028 -0
- package/.claude/workflow/phases/phase1-research.js +578 -0
- package/.claude/workflow/phases/phase1-research.ts +465 -0
- package/.claude/workflow/phases/phase2-approve.js +722 -0
- package/.claude/workflow/phases/phase3-plan.js +1200 -0
- package/.claude/workflow/phases/phase4-develop.js +894 -0
- package/.claude/workflow/search-cache.js +230 -0
- package/.claude/workflow/templates/approval.md +315 -0
- package/.claude/workflow/templates/development.md +377 -0
- package/.claude/workflow/templates/planning.md +328 -0
- package/.claude/workflow/templates/research.md +250 -0
- package/.claude/workflow/types.js +37 -0
- package/.claude/workflow/web-search.js +278 -0
- package/.claude-plugin/marketplace.json +2 -2
- package/AGENTS.md +416 -1
- package/CHANGELOG.md +7 -14
- package/Q&A.md +230 -213
- package/README.md +256 -230
- package/cli.js +20 -0
- package/config/quality-gate.json +9 -3
- package/development/cache/web-search/search_1193d605f8eb364651fc2f2041b58a31.json +36 -0
- package/development/cache/web-search/search_3798bf06960edc125f744a1abb5b72c5.json +36 -0
- package/development/cache/web-search/search_37c7d4843a53f0d83f1122a6f908a2a3.json +36 -0
- package/development/cache/web-search/search_44166fa0153709ee168485a22aa0ab40.json +36 -0
- package/development/cache/web-search/search_4deaebb1f77e86a8ca066dc5a49c59fd.json +36 -0
- package/development/cache/web-search/search_94da91789466070a7f545612e73c7372.json +36 -0
- package/development/cache/web-search/search_dd5de8491b8b803a3cb01339cd210fb0.json +36 -0
- package/development/knowledge-base/.index.clean.json +0 -0
- package/development/knowledge-base/.index.json +486 -0
- package/development/knowledge-base/test-best-practices.md +29 -0
- package/development/projects/proj_mkh1pazz_ixmt1/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4jvnb_z7rwf/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4jxkd_ewz5a/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4k84n_ni73k/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4wfyd_u9w88/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4wsbo_iahvf/development/projects/proj_mkh4xbpg_4na5w/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4wsbo_iahvf/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4xulg_1ka8x/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4xwhj_gch8j/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase2/requirements.md +226 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase3/PRD.md +345 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase3/TASK_PLAN.md +284 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase3/prototype/README.md +14 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/DEVELOPMENT_LOG.md +35 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/TASKS.md +34 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/.env.example +5 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/README.md +60 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/package.json +25 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/src/index.js +70 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/src/routes/index.js +48 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/tests/health.test.js +20 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/tests/jest.config.js +21 -0
- package/development/projects/proj_mkh7veqg_3lypc/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh7veqg_3lypc/phase2/requirements.md +226 -0
- package/development/projects/proj_mkh7veqg_3lypc/phase3/PRD.md +345 -0
- package/development/projects/proj_mkh7veqg_3lypc/phase3/TASK_PLAN.md +284 -0
- package/development/projects/proj_mkh7veqg_3lypc/phase3/prototype/README.md +14 -0
- package/development/projects/proj_mkh8k8fo_rmqn5/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh8xyhy_1vshq/phase1/feasibility-report.md +178 -0
- package/development/projects/proj_mkh8zddd_dhamf/phase1/feasibility-report.md +377 -0
- package/development/projects/proj_mkh8zddd_dhamf/phase2/requirements.md +442 -0
- package/development/projects/proj_mkh8zddd_dhamf/phase3/api-design.md +800 -0
- package/development/projects/proj_mkh8zddd_dhamf/phase3/architecture.md +625 -0
- package/development/projects/proj_mkh8zddd_dhamf/phase3/data-model.md +830 -0
- package/development/projects/proj_mkh8zddd_dhamf/phase3/risks.md +957 -0
- package/development/projects/proj_mkh8zddd_dhamf/phase3/wbs.md +381 -0
- package/development/todos/.state.json +14 -1
- package/development/todos/INDEX.md +31 -73
- package/development/todos/completed/develop/local-knowledge-index.md +85 -0
- package/development/todos/{active → completed/develop}/todo-system.md +13 -3
- package/development/todos/completed/develop/web-search-integration.md +83 -0
- package/development/todos/completed/test/phase1-e2e-test.md +103 -0
- package/docs/DEVELOPMENT.md +329 -291
- package/lib/commands.js +388 -0
- package/package.json +3 -2
- package/tests/config-manager.test.js +677 -0
- package/tests/config-validator.test.js +436 -0
- package/tests/errors.test.js +477 -0
- package/tests/manual/phase1-e2e.sh +389 -0
- package/tests/manual/phase2-test-cases.md +311 -0
- package/tests/manual/phase3-test-cases.md +309 -0
- package/tests/manual/phase4-test-cases.md +414 -0
- package/tests/manual/test-cases.md +417 -0
- package/tests/quality-gate.test.js +679 -0
- package/tests/quality-rules.test.js +619 -0
- package/tests/version-check.test.js +75 -0
package/lib/commands.js
CHANGED
|
@@ -2529,6 +2529,394 @@ All notable changes to this project will be documented in this file.
|
|
|
2529
2529
|
console.log(` to: ${JSON.stringify(change.to)}`);
|
|
2530
2530
|
}
|
|
2531
2531
|
}
|
|
2532
|
+
},
|
|
2533
|
+
|
|
2534
|
+
// ==========================================================================
|
|
2535
|
+
// Workflow Commands (Phase 1: NotebookLM Research)
|
|
2536
|
+
// ==========================================================================
|
|
2537
|
+
|
|
2538
|
+
workflow: (...args) => {
|
|
2539
|
+
const [action, ...rest] = args;
|
|
2540
|
+
|
|
2541
|
+
const COLORS = {
|
|
2542
|
+
reset: '\x1b[0m',
|
|
2543
|
+
green: '\x1b[32m',
|
|
2544
|
+
blue: '\x1b[34m',
|
|
2545
|
+
yellow: '\x1b[33m',
|
|
2546
|
+
gray: '\x1b[90m',
|
|
2547
|
+
red: '\x1b[31m',
|
|
2548
|
+
cyan: '\x1b[36m'
|
|
2549
|
+
};
|
|
2550
|
+
|
|
2551
|
+
const log = (msg, color = 'reset') => {
|
|
2552
|
+
console.log(`${COLORS[color]}${msg}${COLORS.reset}`);
|
|
2553
|
+
};
|
|
2554
|
+
|
|
2555
|
+
switch (action) {
|
|
2556
|
+
case 'start': {
|
|
2557
|
+
const idea = rest.join(' ');
|
|
2558
|
+
if (!idea) {
|
|
2559
|
+
log('Usage: smc workflow start "<your idea>" [context...]', 'gray');
|
|
2560
|
+
log('', 'gray');
|
|
2561
|
+
log('Example: smc workflow start "Build a REST API for task management"', 'gray');
|
|
2562
|
+
return;
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
// Import workflow modules
|
|
2566
|
+
const { createProject, generateProjectId } = require('../.claude/workflow/phases/phase1-research');
|
|
2567
|
+
|
|
2568
|
+
log('', 'gray');
|
|
2569
|
+
log('🚀 Starting Phase 1: Research', 'blue');
|
|
2570
|
+
log('=====================================', 'gray');
|
|
2571
|
+
log('', 'gray');
|
|
2572
|
+
log(`Idea: ${idea}`, 'cyan');
|
|
2573
|
+
log('', 'gray');
|
|
2574
|
+
|
|
2575
|
+
createProject(idea).then(projectId => {
|
|
2576
|
+
log('', 'gray');
|
|
2577
|
+
log('✅ Project initialized!', 'green');
|
|
2578
|
+
log(` Project ID: ${projectId}`, 'gray');
|
|
2579
|
+
log(` Report: development/projects/${projectId}/phase1/feasibility-report.md`, 'gray');
|
|
2580
|
+
log('', 'gray');
|
|
2581
|
+
log('Next steps:', 'gray');
|
|
2582
|
+
log(' 1. Complete the feasibility report', 'gray');
|
|
2583
|
+
log(' 2. Validate: smc workflow validate', 'gray');
|
|
2584
|
+
log(' 3. Proceed to Phase 2: Claude approval', 'gray');
|
|
2585
|
+
log('', 'gray');
|
|
2586
|
+
}).catch(err => {
|
|
2587
|
+
log('', 'gray');
|
|
2588
|
+
log(`❌ Error: ${err.message}`, 'red');
|
|
2589
|
+
process.exit(1);
|
|
2590
|
+
});
|
|
2591
|
+
break;
|
|
2592
|
+
}
|
|
2593
|
+
|
|
2594
|
+
case 'status': {
|
|
2595
|
+
const { getAllProjectsWithPhases } = require('../.claude/workflow/phases/phase4-develop');
|
|
2596
|
+
const projects = getAllProjectsWithPhases();
|
|
2597
|
+
|
|
2598
|
+
log('', 'gray');
|
|
2599
|
+
log('📋 Workflow Projects', 'blue');
|
|
2600
|
+
log('=====================================', 'gray');
|
|
2601
|
+
log('', 'gray');
|
|
2602
|
+
|
|
2603
|
+
if (projects.length === 0) {
|
|
2604
|
+
log('No projects yet.', 'gray');
|
|
2605
|
+
log('Start one with: smc workflow start "<your idea>"', 'gray');
|
|
2606
|
+
} else {
|
|
2607
|
+
projects.forEach(p => {
|
|
2608
|
+
const phaseNames = ['', 'Research', 'Approval', 'Planning', 'Development', 'Deployment'];
|
|
2609
|
+
const phaseIcons = ['', '🔍', '🤝', '📐', '💻', '🚀'];
|
|
2610
|
+
const phaseIcon = phaseIcons[p.currentPhase] || '📋';
|
|
2611
|
+
log(`${phaseIcon} ${p.id}`, 'gray');
|
|
2612
|
+
log(` Phase: ${p.currentPhase} - ${phaseNames[p.currentPhase] || 'Unknown'}`, 'gray');
|
|
2613
|
+
if (p.hasPhase1) {
|
|
2614
|
+
log(` ✅ Phase 1: feasibility-report.md`, 'gray');
|
|
2615
|
+
}
|
|
2616
|
+
if (p.hasPhase2) {
|
|
2617
|
+
log(` ✅ Phase 2: requirements.md`, 'gray');
|
|
2618
|
+
}
|
|
2619
|
+
if (p.hasPhase3) {
|
|
2620
|
+
log(` ✅ Phase 3: PRD.md`, 'gray');
|
|
2621
|
+
}
|
|
2622
|
+
if (p.hasPhase4) {
|
|
2623
|
+
log(` ✅ Phase 4: source/`, 'gray');
|
|
2624
|
+
}
|
|
2625
|
+
});
|
|
2626
|
+
}
|
|
2627
|
+
log('', 'gray');
|
|
2628
|
+
break;
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2631
|
+
case 'validate': {
|
|
2632
|
+
const [reportPath] = rest;
|
|
2633
|
+
|
|
2634
|
+
if (!reportPath) {
|
|
2635
|
+
log('Usage: smc workflow validate <file-path|project-id>', 'gray');
|
|
2636
|
+
log('', 'gray');
|
|
2637
|
+
log('Validates:', 'gray');
|
|
2638
|
+
log(' - Phase 1: feasibility-report.md', 'gray');
|
|
2639
|
+
log(' - Phase 2: requirements.md', 'gray');
|
|
2640
|
+
log(' - Phase 3: PRD.md or TASK_PLAN.md', 'gray');
|
|
2641
|
+
log(' - Phase 4: Pass project-id to validate development', 'gray');
|
|
2642
|
+
return;
|
|
2643
|
+
}
|
|
2644
|
+
|
|
2645
|
+
// Check if it's a project ID (for Phase 4 validation)
|
|
2646
|
+
if (reportPath.startsWith('proj_')) {
|
|
2647
|
+
const { DevelopmentValidator } = require('../.claude/workflow/phases/phase4-develop');
|
|
2648
|
+
const result = DevelopmentValidator.validateProjectDir(reportPath);
|
|
2649
|
+
log(DevelopmentValidator.generateReport(result));
|
|
2650
|
+
process.exit(result.passed ? 0 : 1);
|
|
2651
|
+
}
|
|
2652
|
+
|
|
2653
|
+
// Determine which validator to use based on file name
|
|
2654
|
+
const isPhase3 = reportPath.includes('PRD') || reportPath.includes('TASK_PLAN') || reportPath.includes('phase3');
|
|
2655
|
+
const isPhase2 = reportPath.includes('requirements') || reportPath.includes('phase2');
|
|
2656
|
+
|
|
2657
|
+
if (isPhase3) {
|
|
2658
|
+
const { PlanningValidator } = require('../.claude/workflow/phases/phase3-plan');
|
|
2659
|
+
const result = PlanningValidator.validateFile(reportPath);
|
|
2660
|
+
log(PlanningValidator.generateReport(result));
|
|
2661
|
+
process.exit(result.passed ? 0 : 1);
|
|
2662
|
+
} else if (isPhase2) {
|
|
2663
|
+
const { ApprovalValidator } = require('../.claude/workflow/phases/phase2-approve');
|
|
2664
|
+
const result = ApprovalValidator.validateFile(reportPath);
|
|
2665
|
+
log(ApprovalValidator.generateReport(result));
|
|
2666
|
+
process.exit(result.passed ? 0 : 1);
|
|
2667
|
+
} else {
|
|
2668
|
+
const { FeasibilityValidator } = require('../.claude/workflow/phases/phase1-research');
|
|
2669
|
+
const result = FeasibilityValidator.validateFile(reportPath);
|
|
2670
|
+
log(FeasibilityValidator.generateReport(result));
|
|
2671
|
+
process.exit(result.passed ? 0 : 1);
|
|
2672
|
+
}
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2675
|
+
case 'phase': {
|
|
2676
|
+
const [phaseNum] = rest;
|
|
2677
|
+
const phases = [
|
|
2678
|
+
'1 - Research (NotebookLM)',
|
|
2679
|
+
'2 - Approval (Claude)',
|
|
2680
|
+
'3 - Planning (Claude)',
|
|
2681
|
+
'4 - Development (Claude)',
|
|
2682
|
+
'5 - Deployment'
|
|
2683
|
+
];
|
|
2684
|
+
|
|
2685
|
+
if (phaseNum) {
|
|
2686
|
+
log(`Phase ${phaseNum}: ${phases[parseInt(phaseNum) - 1] || 'Unknown'}`, 'cyan');
|
|
2687
|
+
} else {
|
|
2688
|
+
log('', 'gray');
|
|
2689
|
+
log('🔄 Workflow Phases', 'blue');
|
|
2690
|
+
log('=====================================', 'gray');
|
|
2691
|
+
log('', 'gray');
|
|
2692
|
+
phases.forEach((p, i) => {
|
|
2693
|
+
log(` Phase ${i + 1}: ${p}`, 'gray');
|
|
2694
|
+
});
|
|
2695
|
+
log('', 'gray');
|
|
2696
|
+
}
|
|
2697
|
+
break;
|
|
2698
|
+
}
|
|
2699
|
+
|
|
2700
|
+
case 'approve':
|
|
2701
|
+
case 'next': {
|
|
2702
|
+
// Determine project ID
|
|
2703
|
+
let projectId;
|
|
2704
|
+
|
|
2705
|
+
if (action === 'approve') {
|
|
2706
|
+
projectId = rest[0];
|
|
2707
|
+
} else {
|
|
2708
|
+
// 'next' - find the latest project that needs the next phase
|
|
2709
|
+
const { getAllProjectsWithPhases } = require('../.claude/workflow/phases/phase4-develop');
|
|
2710
|
+
const projects = getAllProjectsWithPhases();
|
|
2711
|
+
|
|
2712
|
+
// Find project ready for next phase
|
|
2713
|
+
const readyForPhase4 = projects.find(p => p.hasPhase3 && !p.hasPhase4);
|
|
2714
|
+
const readyForPhase3 = projects.find(p => p.hasPhase2 && !p.hasPhase3);
|
|
2715
|
+
const readyForPhase2 = projects.find(p => p.hasPhase1 && !p.hasPhase2);
|
|
2716
|
+
|
|
2717
|
+
if (readyForPhase4) {
|
|
2718
|
+
projectId = readyForPhase4.id;
|
|
2719
|
+
} else if (readyForPhase3) {
|
|
2720
|
+
projectId = readyForPhase3.id;
|
|
2721
|
+
} else if (readyForPhase2) {
|
|
2722
|
+
projectId = readyForPhase2.id;
|
|
2723
|
+
} else if (projects.length === 0) {
|
|
2724
|
+
log('No projects found. Start one with: smc workflow start "<your idea>"', 'gray');
|
|
2725
|
+
return;
|
|
2726
|
+
} else {
|
|
2727
|
+
log('All projects are at the latest phase. Start a new project with: smc workflow start "<your idea>"', 'yellow');
|
|
2728
|
+
return;
|
|
2729
|
+
}
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
if (!projectId) {
|
|
2733
|
+
log('Usage: smc workflow approve <project-id>', 'gray');
|
|
2734
|
+
log('Or use: smc workflow next (auto-selects and advances latest project)', 'gray');
|
|
2735
|
+
return;
|
|
2736
|
+
}
|
|
2737
|
+
|
|
2738
|
+
// Determine which phase to execute
|
|
2739
|
+
const { getAllProjectsWithPhases } = require('../.claude/workflow/phases/phase4-develop');
|
|
2740
|
+
const projects = getAllProjectsWithPhases();
|
|
2741
|
+
const project = projects.find(p => p.id === projectId);
|
|
2742
|
+
|
|
2743
|
+
if (!project) {
|
|
2744
|
+
log(`Project not found: ${projectId}`, 'red');
|
|
2745
|
+
return;
|
|
2746
|
+
}
|
|
2747
|
+
|
|
2748
|
+
// Execute the appropriate phase
|
|
2749
|
+
if (project.hasPhase3 && !project.hasPhase4) {
|
|
2750
|
+
// Execute Phase 4
|
|
2751
|
+
const { Phase4DevelopmentExecutor } = require('../.claude/workflow/phases/phase4-develop');
|
|
2752
|
+
|
|
2753
|
+
log('', 'gray');
|
|
2754
|
+
log('💻 Starting Phase 4: Development', 'blue');
|
|
2755
|
+
log('=====================================', 'gray');
|
|
2756
|
+
log('', 'gray');
|
|
2757
|
+
log(`Project: ${projectId}`, 'cyan');
|
|
2758
|
+
log('', 'gray');
|
|
2759
|
+
|
|
2760
|
+
const executor = new Phase4DevelopmentExecutor(projectId);
|
|
2761
|
+
|
|
2762
|
+
// Check if Phase 3 task plan exists
|
|
2763
|
+
if (!fs.existsSync(executor.taskPlanPath)) {
|
|
2764
|
+
log(`❌ Phase 3 task plan not found: ${executor.taskPlanPath}`, 'red');
|
|
2765
|
+
log('Complete Phase 3 first.', 'yellow');
|
|
2766
|
+
process.exit(1);
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2769
|
+
executor.execute((msg, current, total) => {
|
|
2770
|
+
const progress = Math.round((current / total) * 100);
|
|
2771
|
+
log(`[${progress}%] ${msg}`, 'gray');
|
|
2772
|
+
}).then(result => {
|
|
2773
|
+
log('', 'gray');
|
|
2774
|
+
log('✅ Phase 4 initialized!', 'green');
|
|
2775
|
+
log(` Source: ${result.sourceDir}`, 'gray');
|
|
2776
|
+
log(` Tasks: ${result.tasksPath}`, 'gray');
|
|
2777
|
+
log(` Dev Log: ${result.devLogPath}`, 'gray');
|
|
2778
|
+
log('', 'gray');
|
|
2779
|
+
log('Next steps:', 'gray');
|
|
2780
|
+
log(' 1. Review the generated scaffold', 'gray');
|
|
2781
|
+
log(' 2. Implement tasks according to TASK_PLAN.md', 'gray');
|
|
2782
|
+
log(' 3. Write tests for each feature', 'gray');
|
|
2783
|
+
log(' 4. Update task progress in TASKS.md', 'gray');
|
|
2784
|
+
log(' 5. Validate: smc workflow validate ' + projectId, 'gray');
|
|
2785
|
+
log('', 'gray');
|
|
2786
|
+
}).catch(err => {
|
|
2787
|
+
log('', 'gray');
|
|
2788
|
+
log(`❌ Error: ${err.message}`, 'red');
|
|
2789
|
+
process.exit(1);
|
|
2790
|
+
});
|
|
2791
|
+
|
|
2792
|
+
} else if (project.hasPhase2 && !project.hasPhase3) {
|
|
2793
|
+
// Execute Phase 3
|
|
2794
|
+
const { Phase3PlanningExecutor } = require('../.claude/workflow/phases/phase3-plan');
|
|
2795
|
+
|
|
2796
|
+
log('', 'gray');
|
|
2797
|
+
log('📐 Starting Phase 3: Planning', 'blue');
|
|
2798
|
+
log('=====================================', 'gray');
|
|
2799
|
+
log('', 'gray');
|
|
2800
|
+
log(`Project: ${projectId}`, 'cyan');
|
|
2801
|
+
log('', 'gray');
|
|
2802
|
+
|
|
2803
|
+
const executor = new Phase3PlanningExecutor(projectId);
|
|
2804
|
+
|
|
2805
|
+
// Check if Phase 2 requirements exist
|
|
2806
|
+
if (!fs.existsSync(executor.phase2RequirementsPath)) {
|
|
2807
|
+
log(`❌ Phase 2 requirements not found: ${executor.phase2RequirementsPath}`, 'red');
|
|
2808
|
+
log('Complete Phase 2 first.', 'yellow');
|
|
2809
|
+
process.exit(1);
|
|
2810
|
+
}
|
|
2811
|
+
|
|
2812
|
+
executor.execute((msg, current, total) => {
|
|
2813
|
+
const progress = Math.round((current / total) * 100);
|
|
2814
|
+
log(`[${progress}%] ${msg}`, 'gray');
|
|
2815
|
+
}).then(result => {
|
|
2816
|
+
log('', 'gray');
|
|
2817
|
+
log('✅ Phase 3 initialized!', 'green');
|
|
2818
|
+
log(` PRD: ${result.prdPath}`, 'gray');
|
|
2819
|
+
log(` Task Plan: ${result.taskPlanPath}`, 'gray');
|
|
2820
|
+
log(` Prototype: ${result.prototypeDir}`, 'gray');
|
|
2821
|
+
log('', 'gray');
|
|
2822
|
+
log('Next steps:', 'gray');
|
|
2823
|
+
log(' 1. Review and complete the PRD', 'gray');
|
|
2824
|
+
log(' 2. Review and adjust the task plan', 'gray');
|
|
2825
|
+
log(' 3. Create prototypes/proofs-of-concept', 'gray');
|
|
2826
|
+
log(' 4. Validate: smc workflow validate ' + result.prdPath, 'gray');
|
|
2827
|
+
log(' 5. Proceed to Phase 4', 'gray');
|
|
2828
|
+
log('', 'gray');
|
|
2829
|
+
}).catch(err => {
|
|
2830
|
+
log('', 'gray');
|
|
2831
|
+
log(`❌ Error: ${err.message}`, 'red');
|
|
2832
|
+
process.exit(1);
|
|
2833
|
+
});
|
|
2834
|
+
|
|
2835
|
+
} else {
|
|
2836
|
+
// Execute Phase 2 (original logic)
|
|
2837
|
+
const { Phase2ApprovalExecutor } = require('../.claude/workflow/phases/phase2-approve');
|
|
2838
|
+
|
|
2839
|
+
log('', 'gray');
|
|
2840
|
+
log('🤝 Starting Phase 2: Approval', 'blue');
|
|
2841
|
+
log('=====================================', 'gray');
|
|
2842
|
+
log('', 'gray');
|
|
2843
|
+
log(`Project: ${projectId}`, 'cyan');
|
|
2844
|
+
log('', 'gray');
|
|
2845
|
+
|
|
2846
|
+
const executor = new Phase2ApprovalExecutor(projectId);
|
|
2847
|
+
|
|
2848
|
+
// Check if Phase 1 report exists
|
|
2849
|
+
if (!fs.existsSync(executor.phase1ReportPath)) {
|
|
2850
|
+
log(`❌ Phase 1 report not found: ${executor.phase1ReportPath}`, 'red');
|
|
2851
|
+
log('Complete Phase 1 first.', 'yellow');
|
|
2852
|
+
process.exit(1);
|
|
2853
|
+
}
|
|
2854
|
+
|
|
2855
|
+
executor.execute((msg, current, total) => {
|
|
2856
|
+
const progress = Math.round((current / total) * 100);
|
|
2857
|
+
log(`[${progress}%] ${msg}`, 'gray');
|
|
2858
|
+
}).then(result => {
|
|
2859
|
+
log('', 'gray');
|
|
2860
|
+
log('✅ Phase 2 initialized!', 'green');
|
|
2861
|
+
log(` Requirements: ${result.requirementsPath}`, 'gray');
|
|
2862
|
+
log('', 'gray');
|
|
2863
|
+
log('Next steps:', 'gray');
|
|
2864
|
+
log(' 1. Review and answer clarification questions', 'gray');
|
|
2865
|
+
log(' 2. Define functional requirements with acceptance criteria', 'gray');
|
|
2866
|
+
log(' 3. Validate: smc workflow validate ' + result.requirementsPath, 'gray');
|
|
2867
|
+
log(' 4. Proceed to Phase 3', 'gray');
|
|
2868
|
+
log('', 'gray');
|
|
2869
|
+
}).catch(err => {
|
|
2870
|
+
log('', 'gray');
|
|
2871
|
+
log(`❌ Error: ${err.message}`, 'red');
|
|
2872
|
+
process.exit(1);
|
|
2873
|
+
});
|
|
2874
|
+
}
|
|
2875
|
+
break;
|
|
2876
|
+
}
|
|
2877
|
+
|
|
2878
|
+
default:
|
|
2879
|
+
log('', 'gray');
|
|
2880
|
+
log('🔄 Workflow Commands', 'blue');
|
|
2881
|
+
log('=====================================', 'gray');
|
|
2882
|
+
log('', 'gray');
|
|
2883
|
+
log('Usage: smc workflow <action> [args...]', 'gray');
|
|
2884
|
+
log('', 'gray');
|
|
2885
|
+
log('Actions:', 'gray');
|
|
2886
|
+
log(' start <idea> Start a new project workflow (Phase 1)', 'gray');
|
|
2887
|
+
log(' approve <id> Start Phase 2 approval for a project', 'gray');
|
|
2888
|
+
log(' next Auto-advance to next phase', 'gray');
|
|
2889
|
+
log(' status Show all projects and their phases', 'gray');
|
|
2890
|
+
log(' validate <file> Validate a report (feasibility or requirements)', 'gray');
|
|
2891
|
+
log(' phase [n] Show phase information', 'gray');
|
|
2892
|
+
log('', 'gray');
|
|
2893
|
+
log('Examples:', 'gray');
|
|
2894
|
+
log(' smc workflow start "Build a REST API"', 'gray');
|
|
2895
|
+
log(' smc workflow approve proj_abc123', 'gray');
|
|
2896
|
+
log(' smc workflow next', 'gray');
|
|
2897
|
+
log(' smc workflow status', 'gray');
|
|
2898
|
+
log(' smc workflow validate development/projects/xxx/phase1/feasibility-report.md', 'gray');
|
|
2899
|
+
log(' smc workflow phase 1', 'gray');
|
|
2900
|
+
log('', 'gray');
|
|
2901
|
+
}
|
|
2902
|
+
},
|
|
2903
|
+
|
|
2904
|
+
// ==========================================================================
|
|
2905
|
+
// Knowledge Commands
|
|
2906
|
+
// ==========================================================================
|
|
2907
|
+
|
|
2908
|
+
knowledge: async (...args) => {
|
|
2909
|
+
const { handleKnowledgeCommand } = require('../.claude/workflow/knowledge-engine');
|
|
2910
|
+
await handleKnowledgeCommand(args);
|
|
2911
|
+
},
|
|
2912
|
+
|
|
2913
|
+
// ==========================================================================
|
|
2914
|
+
// NotebookLM Commands
|
|
2915
|
+
// ==========================================================================
|
|
2916
|
+
|
|
2917
|
+
notebooklm: async (...args) => {
|
|
2918
|
+
const { handleNotebookLMCommand } = require('../.claude/workflow/notebooklm/browser');
|
|
2919
|
+
await handleNotebookLMCommand(args);
|
|
2532
2920
|
}
|
|
2533
2921
|
};
|
|
2534
2922
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sumulige-claude",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "The Best Agent Harness for Claude Code",
|
|
5
5
|
"main": "cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -42,7 +42,8 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"ajv": "^8.17.1",
|
|
45
|
-
"ajv-formats": "^3.0.1"
|
|
45
|
+
"ajv-formats": "^3.0.1",
|
|
46
|
+
"patchright": "^1.57.0"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"jest": "^30.2.0",
|