kenaz 0.3.22 → 0.3.23
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/core/.claude/hooks/_user-scope.js +1 -1
- package/core/.claude/hooks/core-resolve.js +1 -1
- package/core/.claude/hooks/worktree-create.js +6 -6
- package/core/.claude/hooks/worktree-remove.js +4 -4
- package/core/.collaboration/core/reconcile.js +16 -1
- package/core/.collaboration/core/task-2467-lifecycle.test.js +63 -0
- package/core/.collaboration/core/task-api.js +37 -7
- package/core/.formation/bifrost/launch.js +1 -1
- package/core/.formation/tools/kenaz-stats.js +1 -1
- package/core/.formation/tools/post-complete/git-merge.js +1 -1
- package/core/.formation/tools/prompt.js +1 -1
- package/core/.kenaz/specialist/ansuz_rules.yaml +7 -51
- package/core/.kenaz/specialist/ansuz_session_handoff.schema.json +2 -6
- package/core/.rule/general/project-self-containment.yaml +2 -2
- package/core/.specialist/Amelia/README.md +1 -1
- package/core/.specialist/Amelia/rule.yaml +1 -1
- package/core/.specialist/Ansuz/RULES.md +1 -1
- package/core/.specialist/Ansuz/concepts/commitment_layer.yaml +1 -1
- package/core/.specialist/Ansuz/concepts/evolvable_guardrails.yaml +1 -1
- package/core/.specialist/Ansuz/knowledge.yaml +1 -3
- package/core/.specialist/tools/__tests__/task-2409-lessons.test.js +10 -0
- package/core/.specialist/tools/__tests__/task-2427-harvest.test.js +25 -0
- package/core/.specialist/tools/ansuz-boot-fast.js +1 -1
- package/core/.specialist/tools/failure-detector.js +4 -4
- package/core/.specialist/tools/handoff-doc.js +1 -1
- package/core/.specialist/tools/lessons.js +2 -2
- package/core/CLAUDE.md +5 -5
- package/core/KENAZ_CORE_VERSION +1 -1
- package/core/dashboard/scripts/install-kenaz-cli.js +21 -6
- package/core/dev/scripts/check-file-size.js +1 -1
- package/core/dev/scripts/ci-feedback.js +1 -1
- package/core/dev/scripts/gc-agent-worktrees.js +11 -11
- package/core/dev/scripts/kenaz-session.js +3 -3
- package/core/dev/scripts/peer-identity-e2e.js +3 -3
- package/core/dev/scripts/run-rust-tests.js +2 -2
- package/core/dev/scripts/skill-routing-replay.js +3 -3
- package/core/dev/scripts/task1961/selftest.js +2 -2
- package/core/dev/scripts/windows-hide-guard.test.js +97 -0
- package/core/plugins/kenaz/guidance.md +1 -0
- package/core/plugins/kenaz/hooks/core-resolve.js +1 -1
- package/core/plugins/kenaz/hooks/kenaz-hook.js +52 -4
- package/core/plugins/kenaz/scripts/kenaz.test.js +72 -5
- package/lib/cli.js +9 -5
- package/package.json +6 -6
- package/vendor/install-kenaz-cli.js +21 -6
- package/core/.kenaz/designs/METAPLASTICITY_CONFIDENCE_DESIGN.md +0 -537
- package/core/.kenaz/designs/REFLEX_INITIATOR_DESIGN.md +0 -501
- package/core/.kenaz/designs/TASK_1385_handoff_mcp_design.md +0 -426
- package/core/.kenaz/designs/TASK_932_hippocampus_consolidation.md +0 -103
- package/core/.kenaz/designs/TASK_934_efe_signal_engine.md +0 -97
- package/core/.kenaz/designs/TASK_935_self_evolution_framework.md +0 -154
- package/core/.kenaz/designs/VISION_cognitive_architecture_roadmap.md +0 -159
- package/core/.kenaz/designs/metaplasticity_simulation_results.json +0 -696
- package/core/.kenaz/main-memory/README.md +0 -230
- package/core/.kenaz/main-memory/kenaz/cortex/001_cortex_overview.md +0 -168
- package/core/.kenaz/main-memory/kenaz/cortex/001_rag_engine_overview.md +0 -30
- package/core/.kenaz/main-memory/kenaz/memory-system/001_three_tier_architecture.md +0 -361
- package/core/.kenaz/main-memory/kenaz/pipeline/001_task_execution_flow.md +0 -117
- package/core/.kenaz/main-memory/kenaz/pipeline/001_task_granularity.md +0 -154
- package/core/.kenaz/main-memory/kenaz/pipeline/002_team_priority.md +0 -51
- package/core/.kenaz/main-memory/kenaz/pipeline/003_feature_id_system.md +0 -46
- package/core/.kenaz/main-memory/kenaz/rules/001_gen_007_self_containment.md +0 -108
- package/core/.kenaz/main-memory/kenaz/rules/001_rule_priority_system.md +0 -121
- package/core/.kenaz/main-memory/kenaz/rules/002_agt_006_pre_check.md +0 -0
- package/core/.kenaz/main-memory/kenaz/rules/003_ppl_002_task_archival.md +0 -48
- package/core/.kenaz/main-memory/kenaz/system/001_dual_track_task_system.md +0 -197
- package/core/.kenaz/main-memory/knowledge/patterns/001_json_bom_issue.md +0 -78
- package/core/.kenaz/main-memory/knowledge/patterns/001_leader_worker_pattern.md +0 -0
- package/core/.kenaz/main-memory/knowledge/patterns/002_scope_path_conflict.md +0 -115
- package/core/.kenaz/main-memory/knowledge/patterns/002_task_dependency_resolution.md +0 -223
- package/core/.kenaz/main-memory/knowledge/patterns/003_question_protocol.md +0 -242
- package/core/.kenaz/main-memory/knowledge/patterns/004_user_insight_value.md +0 -111
- package/core/.kenaz/main-memory/knowledge/patterns/005_file_lock_pattern.md +0 -274
- package/core/.kenaz/main-memory/knowledge/references/001_ppl_rules.md +0 -28
- package/core/.kenaz/main-memory/knowledge/solutions/001_json_bom_issue.md +0 -137
- package/core/.kenaz/main-memory/knowledge/solutions/001_team_invocation.md +0 -0
- package/core/.kenaz/main-memory/knowledge/solutions/002_passive_monitoring.md +0 -0
- package/core/.kenaz/main-memory/knowledge/solutions/003_windows_file_race_condition.md +0 -239
- package/core/.kenaz/main-memory/registry.json +0 -326
- package/core/.kenaz/main-memory/version.yaml +0 -58
- package/core/.kenaz/specialist/memory_guard_fired.json +0 -1
- package/core/.kenaz/specialist/memory_guard_trigger_cache.json +0 -1
- package/core/.kenaz/specialist/memory_source_priority.yaml +0 -260
- package/core/.kenaz/specialist/prompt_1775.txt +0 -317
- package/core/.kenaz/specialist/prompt_1776.txt +0 -326
- package/core/.kenaz/specialist/prompt_1791.txt +0 -320
- package/core/.kenaz/specialist/prompt_1792.txt +0 -320
- package/core/.kenaz/specialist/prompt_1795.txt +0 -281
- package/core/.kenaz/specialist/prompt_1813.txt +0 -332
- package/core/.kenaz/specialist/prompt_1814.txt +0 -401
- package/core/.kenaz/specialist/prompt_1815.txt +0 -394
- package/core/.kenaz/specialist/prompt_1816.txt +0 -437
- package/core/.kenaz/specialist/prompt_1818.txt +0 -361
- package/core/.kenaz/specialist/prompt_1819.txt +0 -421
- package/core/.kenaz/specialist/prompt_1821.txt +0 -345
- package/core/.kenaz/specialist/prompt_1822.txt +0 -313
- package/core/.kenaz/specialist/prompt_1824.txt +0 -348
- package/core/.kenaz/specialist/prompt_1826.txt +0 -388
- package/core/.kenaz/specialist/rune_efe_salience_gap.md +0 -21
- package/core/.kenaz/specialist/task1825_update.json +0 -43
- package/core/.kenaz/specialist/taskgen/consolidation_i.json +0 -38
- package/core/.kenaz/specialist/taskgen/csharp_a.json +0 -44
- package/core/.kenaz/specialist/taskgen/csharp_b.json +0 -40
- package/core/.kenaz/specialist/taskgen/embedding_e.json +0 -34
- package/core/.kenaz/specialist/taskgen/hygiene_fg.json +0 -39
- package/core/.kenaz/specialist/taskgen/pathology_h.json +0 -36
- package/core/.kenaz/specialist/taskgen/unity_noise_d.json +0 -38
- package/core/.kenaz/specialist/taskgen/visibility_c.json +0 -38
- package/core/.specialist/Ansuz/decisions/ADR-requirement-graph-layer.md +0 -390
- package/core/.specialist/Ansuz/self_model_seed.backup.json +0 -100
- package/core/.specialist/ansuz_session_handoff.json +0 -96
- package/core/dev/ALAYA_FIELD_FEEDBACK_DESIGN.md +0 -126
- package/core/dev/ANSUZ_SCAFFOLD_DIET_2026-09-20.md +0 -231
- package/core/dev/ANSUZ_STARTUP_INJECTION_REVIEW.md +0 -355
- package/core/dev/ANSUZ_WORKFLOW_MODERNIZATION.md +0 -143
- package/core/dev/CORTEX_META_GRAPH_ASSESSMENT.md +0 -99
- package/core/dev/FREYA_DOWNSTREAM_BUGS_2026-09-19.md +0 -44
- package/core/dev/GLOBAL_MEMORY_IDENTITY_CONSOLIDATION.md +0 -263
- package/core/dev/GUARD_EFFECTIVENESS_DESIGN.md +0 -180
- package/core/dev/HEALTH_GATE_VARIANCE_ASSESSMENT.md +0 -271
- package/core/dev/HOOK_DIET_2026-09-21.md +0 -126
- package/core/dev/JEV_INTEGRATION_PLAN.md +0 -189
- package/core/dev/KENAZ_AGENT_CONNECT_v1_SPEC.md +0 -139
- package/core/dev/MOBILE_DESIGN_SPEC.md +0 -569
- package/core/dev/MULTI_ANSUZ_SPEC.md +0 -136
- package/core/dev/MUNINN_RETIREMENT.md +0 -115
- package/core/dev/PHASE3_ATTRIBUTION_POPULATION_DIAGNOSIS.md +0 -211
- package/core/dev/PHASE3_P3-2B_TASKLEVEL_PROBE.md +0 -83
- package/core/dev/PHASE3_P3-2_POPULATION_DISJOINTNESS.md +0 -83
- package/core/dev/PHASE3_P3-2_REMEASURE_REPORT.md +0 -231
- package/core/dev/PREDICTION_GROUNDING_DESIGN.md +0 -376
- package/core/dev/PRODUCT_SPEC.md +0 -317
- package/core/dev/PROJECT_REGISTRY_DUPLICATE_ASSESSMENT.md +0 -86
- package/core/dev/STARTUP_TIMELINE_TASK_1995.md +0 -181
- package/core/dev/SYNAPSE_WORKER_PER_PROJECT.md +0 -881
- package/core/dev/TASK_1680_P3-3_DISPATCH_SPEC.md +0 -96
- package/core/dev/TASK_1684_CALIBRATION_IMPACT_ANALYSIS.md +0 -170
- package/core/dev/TASK_1684_FORK_A_GOODHART_DESIGN.md +0 -171
- package/core/dev/TASK_1684_P3_2_REMEASURE_VALIDATION.md +0 -262
- package/core/dev/TASK_1903_SIGNAL_AUC_MEASUREMENT.md +0 -207
- package/core/dev/TASK_1904_BRANCH_INTEGRITY_AUDIT.md +0 -146
- package/core/dev/ansuz-eval/README.md +0 -38
- package/core/dev/ansuz-eval/build-fixtures.js +0 -87
- package/core/dev/ansuz-eval/grade.js +0 -96
- package/core/dev/ansuz-eval/grader.test.js +0 -117
- package/core/dev/ansuz-eval/tasks.md +0 -32
- package/core/dev/archive/ansuz/BOOT_FULL.md +0 -141
- package/core/dev/archive/ansuz/agents/ansuz-boot.md +0 -176
- package/core/dev/archive/ansuz/designs/alaya-passive-surfacing.md +0 -84
- package/core/dev/archive/ansuz/designs/cc_memory_indexing.md +0 -307
- package/core/dev/archive/ansuz/designs/check_guard.md +0 -322
- package/core/dev/archive/ansuz/designs/consequence_loop.md +0 -227
- package/core/dev/archive/ansuz/designs/mcp_kuzudb_lock_architecture.md +0 -312
- package/core/dev/archive/ansuz/designs/phase0_git_enrichment.md +0 -278
- package/core/dev/archive/ansuz/designs/refactor_mcp_tools_synapse.md +0 -490
- package/core/dev/archive/ansuz/designs/semantic_markdown_extraction.md +0 -167
- package/core/dev/archive/ansuz/designs/task_1372_prompt_injects_into.md +0 -193
- package/core/dev/archive/ansuz/designs/thought_stack.md +0 -286
- package/core/dev/archive/ansuz/investigations/reachability_unified_api_2026-04-11.md +0 -330
- package/core/dev/archive/ansuz/investigations/synapse_orphans_indexing_bug_2026-04-11.md +0 -352
- package/core/dev/archive/ansuz/investigations/synapse_orphans_reindex_verification_2026-04-11.md +0 -48
- package/core/dev/archive/ansuz/investigations/synapse_orphans_verification_2026-04-11.md +0 -170
- package/core/dev/archive/ansuz/legacy/kernel.yaml +0 -399
- package/core/dev/archive/ansuz/legacy/phases/phase_0.yaml +0 -418
- package/core/dev/archive/ansuz/legacy/phases/phase_1.yaml +0 -376
- package/core/dev/archive/ansuz/legacy/phases/phase_10.yaml +0 -35
- package/core/dev/archive/ansuz/legacy/phases/phase_11.yaml +0 -582
- package/core/dev/archive/ansuz/legacy/phases/phase_2.yaml +0 -94
- package/core/dev/archive/ansuz/legacy/phases/phase_3.yaml +0 -274
- package/core/dev/archive/ansuz/legacy/phases/phase_4.yaml +0 -67
- package/core/dev/archive/ansuz/legacy/phases/phase_5.yaml +0 -32
- package/core/dev/archive/ansuz/legacy/phases/phase_6.yaml +0 -91
- package/core/dev/archive/ansuz/legacy/phases/phase_7.yaml +0 -58
- package/core/dev/archive/ansuz/legacy/phases/phase_8.yaml +0 -146
- package/core/dev/archive/ansuz/legacy/phases/phase_9.yaml +0 -424
- package/core/dev/archive/ansuz/specs/INDEX_bifrost_hook_parity.yaml +0 -92
- package/core/dev/archive/ansuz/specs/active-inference-formation.yaml +0 -453
- package/core/dev/archive/ansuz/specs/brief_TASK_1228_userpromptsubmit.yaml +0 -191
- package/core/dev/archive/ansuz/specs/brief_TASK_1229_pretooluse_posttooluse.yaml +0 -250
- package/core/dev/archive/ansuz/specs/brief_TASK_1230_sessionstart_stop.yaml +0 -301
- package/core/dev/archive/ansuz/specs/brief_TASK_1231_verification.yaml +0 -272
- package/core/dev/archive/skills/feature_agent/SKILL.md +0 -289
- package/core/dev/design/PHASE4_DESIGN.md +0 -559
- package/core/dev/design/dashboard_docs_integration_PLAN.md +0 -388
- package/core/dev/design/matrix_format_ABBREVIATIONS.md +0 -655
- package/core/dev/design/matrix_format_DESIGN_SPEC.md +0 -601
- package/core/dev/design/matrix_format_DISCUSSION_SUMMARY.md +0 -484
- package/core/dev/design/matrix_format_EXAMPLE_memory.matrix +0 -13
- package/core/dev/design/matrix_format_EXAMPLE_project_status.matrix +0 -9
- package/core/dev/design/matrix_format_EXAMPLE_tasks.matrix +0 -14
- package/core/dev/design/matrix_format_SYNTAX_BNF.md +0 -754
- package/core/dev/design/matrix_format_TOKEN_COMPARISON.md +0 -484
- package/core/dev/design/matrix_v2_COGNITIVE_DESIGN.md +0 -503
- package/core/dev/design/matrix_v2_DISCUSSION_SUMMARY.md +0 -414
- package/core/dev/design/matrix_v2_EXAMPLE.matrix +0 -67
- package/core/dev/designs/EXPANDABLE_CARD_DESIGN_SPEC.md +0 -509
- package/core/dev/jev-eval/ACTIVE_CORRECTION.md +0 -52
- package/core/dev/jev-eval/ANNOTATION_GUIDE.md +0 -68
- package/core/dev/jev-eval/BASELINE_COMPARISON.md +0 -45
- package/core/dev/jev-eval/CONTEXT_REVIEW.md +0 -31
- package/core/dev/jev-eval/EVALUATION_STATUS.md +0 -39
- package/core/dev/jev-eval/HISTORICAL_CORPUS.md +0 -33
- package/core/dev/jev-eval/PACKAGING_VERIFICATION.md +0 -42
- package/core/dev/jev-eval/README.md +0 -101
- package/core/dev/jev-eval/THALAMUS_RANKING.md +0 -58
- package/core/dev/jev-eval/VALIDATION_PROGRESS.md +0 -54
- package/core/dev/jev-eval/cli.mjs +0 -50
- package/core/dev/jev-eval/context.mjs +0 -183
- package/core/dev/jev-eval/corpus.mjs +0 -186
- package/core/dev/jev-eval/fixtures/conversation-review.seed.jsonl +0 -6
- package/core/dev/jev-eval/fixtures/synthetic.jsonl +0 -11
- package/core/dev/jev-eval/metrics.mjs +0 -67
- package/core/dev/jev-eval/muninn-baseline.mjs +0 -119
- package/core/dev/jev-eval/providers.mjs +0 -95
- package/core/dev/jev-eval/reports/annotation-pilot-2026-09-20.json +0 -32
- package/core/dev/jev-eval/reports/context-review-2026-09-20.json +0 -48
- package/core/dev/jev-eval/reports/conversation-review.pending.json +0 -151
- package/core/dev/jev-eval/reports/history-corpus-2026-09-20.json +0 -52
- package/core/dev/jev-eval/reports/length-probe-2026-09-20.json +0 -133
- package/core/dev/jev-eval/reports/live-smoke-2026-09-20.json +0 -616
- package/core/dev/jev-eval/reports/muninn-baseline-2026-09-20.json +0 -52
- package/core/dev/jev-eval/reports/resilience-2026-09-20.json +0 -520
- package/core/dev/jev-eval/reports/rules-baseline.json +0 -197
- package/core/dev/jev-eval/reports/synthetic-review.pending.json +0 -357
- package/core/dev/jev-eval/resilience.mjs +0 -71
- package/core/dev/jev-eval/review.mjs +0 -78
- package/core/dev/jev-eval/schema.mjs +0 -87
- package/core/dev/jev-eval/test/context.test.mjs +0 -95
- package/core/dev/jev-eval/test/corpus.test.mjs +0 -102
- package/core/dev/jev-eval/test/eval.test.mjs +0 -146
- package/core/dev/jev-eval/test/muninn-baseline.test.mjs +0 -71
- package/core/dev/jev-eval/test/resilience.test.mjs +0 -72
- package/core/dev/jev-eval/test/review.test.mjs +0 -61
- package/core/dev/pipeline/PHASE3_PLANNING_SUMMARY.md +0 -338
- package/core/dev/pipeline/PROGRESS.md +0 -113
- package/core/dev/pipeline/PROGRESS_template.md +0 -860
- package/core/dev/pipeline/QA_REPORT_F008.md +0 -431
- package/core/dev/pipeline/QA_REPORT_LOCAL_CLAUDE_DIAGNOSIS.md +0 -583
- package/core/dev/pipeline/README.md +0 -210
- package/core/dev/pipeline/WORKFLOW_GUIDE.md +0 -824
- package/core/dev/pipeline/archived/TASK_015_tauri_init.yaml +0 -53
- package/core/dev/pipeline/archived/TASK_016_tauri_commands.yaml +0 -54
- package/core/dev/pipeline/archived/TASK_017_rust_pty.yaml +0 -54
- package/core/dev/pipeline/archived/TASK_018_tauri_bundle.yaml +0 -53
- package/core/dev/pipeline/archived/TASK_019_release_workflow.yaml +0 -56
- package/core/dev/pipeline/archived/TASK_020_update_ui.yaml +0 -54
- package/core/dev/pipeline/archived/TASK_021_update_notification_ui.yaml +0 -55
- package/core/dev/pipeline/archived/TASK_022_remove_node_pty.yaml +0 -65
- package/core/dev/pipeline/archived/TASK_023_api_routes_migration.yaml +0 -86
- package/core/dev/pipeline/archived/TASK_024_feature_id_system.yaml +0 -51
- package/core/dev/pipeline/archived/TASK_025_executable_acceptance.yaml +0 -66
- package/core/dev/pipeline/archived/TASK_026_spec_versioning.yaml +0 -56
- package/core/dev/pipeline/archived/TASK_027_drift_detection.yaml +0 -60
- package/core/dev/pipeline/archived/TASK_028_tauri_pty_manager.yaml +0 -60
- package/core/dev/pipeline/archived/TASK_029_tauri_pty_commands.yaml +0 -62
- package/core/dev/pipeline/archived/TASK_030_frontend_session_adapter.yaml +0 -54
- package/core/dev/pipeline/archived/TASK_031_terminal_tauri_events.yaml +0 -56
- package/core/dev/pipeline/archived/TASK_041_scheduler_data_models.yaml +0 -54
- package/core/dev/pipeline/archived/TASK_042_path_lock_manager.yaml +0 -53
- package/core/dev/pipeline/archived/TASK_043_process_manager.yaml +0 -57
- package/core/dev/pipeline/archived/TASK_044_git_integration.yaml +0 -85
- package/core/dev/pipeline/archived/TASK_045_task_queue_manager.yaml +0 -54
- package/core/dev/pipeline/archived/TASK_046_scheduler_dispatcher.yaml +0 -60
- package/core/dev/pipeline/archived/TASK_047_tauri_scheduler_commands.yaml +0 -55
- package/core/dev/pipeline/archived/TASK_048_realtime_status_push.yaml +0 -92
- package/core/dev/pipeline/archived/TASK_049_frontend_scheduler_integration.yaml +0 -58
- package/core/dev/pipeline/archived/TASK_050_error_recovery.yaml +0 -56
- package/core/dev/pipeline/archived/TASK_051_optimization_proposals_backend.yaml +0 -53
- package/core/dev/pipeline/archived/TASK_052_optimization_proposals_ui.yaml +0 -58
- package/core/dev/pipeline/archived/TASK_053_optimization_proposals_diff_view.yaml +0 -54
- package/core/dev/pipeline/archived/TASK_054_multi_project_scheduler_state.yaml +0 -76
- package/core/dev/pipeline/archived/TASK_055_scheduler_api_project_scope.yaml +0 -64
- package/core/dev/pipeline/archived/TASK_056_frontend_scheduler_project_scope.yaml +0 -62
- package/core/dev/pipeline/archived/TASK_057_scheduler_module_structure.yaml +0 -54
- package/core/dev/pipeline/archived/TASK_058_scheduler_models_extract.yaml +0 -51
- package/core/dev/pipeline/archived/TASK_059_scheduler_core_extract.yaml +0 -51
- package/core/dev/pipeline/archived/TASK_060_scheduler_commands_extract.yaml +0 -51
- package/core/dev/pipeline/archived/TASK_061_scheduler_specialized_commands.yaml +0 -53
- package/core/dev/pipeline/archived/TASK_062_process_manager_module_structure.yaml +0 -56
- package/core/dev/pipeline/archived/TASK_063_process_manager_core_extract.yaml +0 -56
- package/core/dev/pipeline/archived/TASK_064_recovery_module_structure.yaml +0 -57
- package/core/dev/pipeline/archived/TASK_065_recovery_core_extract.yaml +0 -56
- package/core/dev/pipeline/archived/TASK_066_self_enhancement_scheduler_models.yaml +0 -60
- package/core/dev/pipeline/archived/TASK_067_agents_section_quick_actions.yaml +0 -53
- package/core/dev/pipeline/archived/TASK_067_self_enhancement_scheduler_core.yaml +0 -65
- package/core/dev/pipeline/archived/TASK_068_agent_workflow_rule_enhancement.yaml +0 -46
- package/core/dev/pipeline/archived/TASK_068_self_enhancement_tauri_commands.yaml +0 -61
- package/core/dev/pipeline/archived/TASK_069_agent_wizard_responsive.yaml +0 -46
- package/core/dev/pipeline/archived/TASK_069_self_enhancement_ui.yaml +0 -62
- package/core/dev/pipeline/archived/TASK_070_preview_panel_redesign.yaml +0 -62
- package/core/dev/pipeline/archived/TASK_070_self_enhancement_integration.yaml +0 -57
- package/core/dev/pipeline/archived/TASK_071_preview_panel_qa.yaml +0 -98
- package/core/dev/pipeline/archived/TASK_071_single_agent_config.yaml +0 -57
- package/core/dev/pipeline/archived/TASK_072_preview_modal_esc_fix.yaml +0 -71
- package/core/dev/pipeline/archived/TASK_072_product_review_module.yaml +0 -57
- package/core/dev/pipeline/archived/TASK_073_agents_page_component_refactor.yaml +0 -68
- package/core/dev/pipeline/archived/TASK_073_rename_single_agent.yaml +0 -64
- package/core/dev/pipeline/archived/TASK_074_preview_mode_ui_diagnosis.yaml +0 -71
- package/core/dev/pipeline/archived/TASK_074_single_agent_ui_toggle.yaml +0 -56
- package/core/dev/pipeline/archived/TASK_075_agents_page_component_refactor.yaml +0 -69
- package/core/dev/pipeline/archived/TASK_075_single_agent_integration_test.yaml +0 -75
- package/core/dev/pipeline/archived/TASK_076_preview_mode_ui_diagnosis.yaml +0 -70
- package/core/dev/pipeline/archived/TASK_076_single_agent_continuous_mode.yaml +0 -65
- package/core/dev/pipeline/archived/TASK_077_failure_directory_structure.yaml +0 -51
- package/core/dev/pipeline/archived/TASK_077_single_agent_typescript_types.yaml +0 -59
- package/core/dev/pipeline/archived/TASK_078_fail_001_agent_no_output.yaml +0 -53
- package/core/dev/pipeline/archived/TASK_078_single_agent_ui_simplify.yaml +0 -74
- package/core/dev/pipeline/archived/TASK_079_dashboard_rwd_responsive.yaml +0 -63
- package/core/dev/pipeline/archived/TASK_079_fail_002_json_bom.yaml +0 -56
- package/core/dev/pipeline/archived/TASK_080_fail_003_queue_pollution.yaml +0 -56
- package/core/dev/pipeline/archived/TASK_080_http_server_module.yaml +0 -55
- package/core/dev/pipeline/archived/TASK_081_failure_logging_tools.yaml +0 -57
- package/core/dev/pipeline/archived/TASK_081_http_api_routes.yaml +0 -62
- package/core/dev/pipeline/archived/TASK_082_frontend_api_adapter.yaml +0 -51
- package/core/dev/pipeline/archived/TASK_082_integrate_failure_to_workflow.yaml +0 -60
- package/core/dev/pipeline/archived/TASK_083_cleanup_nextjs_api.yaml +0 -48
- package/core/dev/pipeline/archived/TASK_083_task_queue_cleanup.yaml +0 -67
- package/core/dev/pipeline/archived/TASK_084_rust_dead_code_cleanup.yaml +0 -66
- package/core/dev/pipeline/archived/TASK_084_scheduler_sync_logic_fix.yaml +0 -68
- package/core/dev/pipeline/archived/TASK_085_http_api_web_mode_fixes.yaml +0 -46
- package/core/dev/pipeline/archived/TASK_085_memory_consolidation_0204_0205.yaml +0 -98
- package/core/dev/pipeline/archived/TASK_086_collapsible_preview_panel.yaml +0 -161
- package/core/dev/pipeline/archived/TASK_086_web_mode_feature_parity.yaml +0 -62
- package/core/dev/pipeline/archived/TASK_087_manual_memory_archival.yaml +0 -163
- package/core/dev/pipeline/archived/TASK_087_mobile_http_control.yaml +0 -68
- package/core/dev/pipeline/archived/TASK_088_fail_003_to_ppl_002_rule.yaml +0 -63
- package/core/dev/pipeline/archived/TASK_088_mobile_http_qa.yaml +0 -121
- package/core/dev/pipeline/archived/TASK_089_agent_collaboration_topic.yaml +0 -60
- package/core/dev/pipeline/archived/TASK_089_web_mode_monitor_fix.yaml +0 -58
- package/core/dev/pipeline/archived/TASK_090_cli_detection_fix.yaml +0 -61
- package/core/dev/pipeline/archived/TASK_090_ui_ux_lessons_topic.yaml +0 -63
- package/core/dev/pipeline/archived/TASK_091_expandable_card_design.yaml +0 -56
- package/core/dev/pipeline/archived/TASK_091_move_agent_section_components.yaml +0 -65
- package/core/dev/pipeline/archived/TASK_092_expandable_card_component.yaml +0 -60
- package/core/dev/pipeline/archived/TASK_092_refactor_agent_create_wizard.yaml +0 -84
- package/core/dev/pipeline/archived/TASK_093_taskcard_detail_integration.yaml +0 -57
- package/core/dev/pipeline/archived/TASK_093_update_barrel_exports_test.yaml +0 -84
- package/core/dev/pipeline/archived/TASK_094_ai_agent_generation_enhancement.yaml +0 -115
- package/core/dev/pipeline/archived/TASK_094_proposalcard_detail_integration.yaml +0 -55
- package/core/dev/pipeline/archived/TASK_095_preview_fixes.yaml +0 -129
- package/core/dev/pipeline/archived/TASK_095_single_agent_task_selector.yaml +0 -60
- package/core/dev/pipeline/archived/TASK_096_agents_page_ux_improvements.yaml +0 -163
- package/core/dev/pipeline/archived/TASK_096_single_agent_status_sync.yaml +0 -60
- package/core/dev/pipeline/archived/TASK_097_local_claude_error_logging.yaml +0 -59
- package/core/dev/pipeline/archived/TASK_097_single_agent_monitor_events.yaml +0 -59
- package/core/dev/pipeline/archived/TASK_098_product_manager_team_phase2.yaml +0 -60
- package/core/dev/pipeline/archived/TASK_098_single_agent_refactor_test.yaml +0 -58
- package/core/dev/pipeline/archived/TASK_099_backend_team_creation.yaml +0 -258
- package/core/dev/pipeline/archived/TASK_100_frontend_team_creation.yaml +0 -61
- package/core/dev/pipeline/archived/TASK_101_orchestrator_system.yaml +0 -403
- package/core/dev/pipeline/archived/TASK_102_designer_sre_teams.yaml +0 -90
- package/core/dev/pipeline/archived/TASK_103_integration_testing.yaml +0 -86
- package/core/dev/pipeline/archived/TASK_128_integration_testing.yaml +0 -83
- package/core/dev/pipeline/archived/TASK_134_cortex_v2_phase3_file_watcher.yaml +0 -65
- package/core/dev/pipeline/archived/TASK_134_team_http_api.yaml +0 -96
- package/core/dev/pipeline/archived/TASK_135_cortex_v2_phase3_git_monitor.yaml +0 -63
- package/core/dev/pipeline/archived/TASK_136_cortex_v2_phase3_change_analyzer.yaml +0 -69
- package/core/dev/pipeline/archived/TASK_137_cortex_v2_phase3_cache_invalidator.yaml +0 -67
- package/core/dev/pipeline/archived/TASK_137_team_orchestrator_integration.yaml +0 -93
- package/core/dev/pipeline/archived/TASK_138_cortex_v2_phase3_distributed_cache.yaml +0 -68
- package/core/dev/pipeline/archived/TASK_138_matrix_folder_structure.yaml +0 -61
- package/core/dev/pipeline/archived/TASK_139_cortex_v2_phase3_cache_prewarming.yaml +0 -65
- package/core/dev/pipeline/archived/TASK_146_unified_documentation.yaml +0 -141
- package/core/dev/pipeline/archived/TASK_147_pipeline_execution_rules.yaml +0 -76
- package/core/dev/pipeline/archived/TASK_148_update_claude_md.yaml +0 -77
- package/core/dev/pipeline/archived/TASK_149_fix_nextjs_mdx_serialization.yaml +0 -63
- package/core/dev/pipeline/archived/TASK_149_update_team_docs.yaml +0 -77
- package/core/dev/pipeline/archived/TASK_150_pipeline_workflow_guide.yaml +0 -82
- package/core/dev/pipeline/archived/TASK_164_fix_smart_context_switch.yaml +0 -49
- package/core/dev/pipeline/archived/TASK_165_ctags_symbol_index.yaml +0 -53
- package/core/dev/pipeline/archived/TASK_166_symbol_search_mcp_tool.yaml +0 -48
- package/core/dev/pipeline/archived/TASK_167_llm_module_summary.yaml +0 -55
- package/core/dev/pipeline/archived/TASK_168_map_reduce_context.yaml +0 -51
- package/core/dev/pipeline/archived/TASK_169_v2_integration_testing.yaml +0 -52
- package/core/dev/pipeline/backups/archive_2026-02-04T22-07-22/TASK_QUEUE_backup.json +0 -95
- package/core/dev/pipeline/docs/multi-agent-coordination.md +0 -446
- package/core/dev/pipeline/docs/overview.md +0 -406
- package/core/dev/pipeline/docs/task-management.md +0 -412
- package/core/dev/pipeline/docs/workflows.md +0 -32
- package/core/dev/pipeline/orchestrator/schemas/task_queue_schema.json +0 -58
- package/core/dev/pipeline/orchestrator/schemas/task_schema.json +0 -139
- package/core/dev/pipeline/plans/PLAN_task_cli_refactor.md +0 -281
- package/core/dev/pipeline/test_results/TASK_TEST_PARALLEL_002_result.txt +0 -27
- package/core/dev/plans/ANSUZ_SLIM_PLAN.md +0 -68
- package/core/dev/plans/CLI_FIRST_INSTALL_FLOW.md +0 -120
- package/core/dev/plans/FORMATION_RETIREMENT_PLAN.md +0 -313
- package/core/dev/plans/KUZU_REPLACEMENT_PLAN.md +0 -126
- package/core/dev/scripts/CRASH_DIAGNOSIS.md +0 -47
- package/core/dev/scripts/README.md +0 -142
- package/core/dev/scripts/RUN_ONCE.bat +0 -40
- package/core/dev/scripts/START_DEV_AGENT.bat +0 -63
- package/core/dev/scripts/START_MULTI_AGENT.bat +0 -80
- package/core/dev/scripts/dev_agent_scheduler.ps1 +0 -536
- package/core/dev/scripts/init_git.ps1 +0 -396
- package/core/dev/scripts/init_git.sh +0 -337
- package/core/dev/scripts/init_project.ps1 +0 -851
- package/core/dev/scripts/init_project.sh +0 -477
- package/core/dev/scripts/multi_agent_scheduler.ps1 +0 -2021
- package/core/dev/scripts/multi_agent_scheduler.sh +0 -1344
- package/core/dev/scripts/run_once.sh +0 -47
- package/core/dev/scripts/setup_rag.ps1 +0 -304
- package/core/dev/scripts/setup_rag.sh +0 -230
- package/core/dev/scripts/start_dev_agent.sh +0 -137
- package/core/dev/scripts/start_multi_agent.sh +0 -41
- package/core/dev/scripts/sync_task_queue.ps1 +0 -505
- package/core/dev/scripts/sync_task_queue.sh +0 -392
- package/core/dev/specs/agent-connect/PROTOCOL.md +0 -177
- package/core/dev/specs/agent-connect/SDK_GUIDE.md +0 -915
- package/core/dev/specs/agent-connect/examples/minimal-site/README.md +0 -137
- package/core/dev/specs/agent-connect/examples/minimal-site/package.json +0 -12
- package/core/dev/specs/agent-connect/examples/minimal-site/public/index.html +0 -116
- package/core/dev/specs/agent-connect/examples/minimal-site/public/install-redirect.js +0 -73
- package/core/dev/specs/agent-connect/examples/minimal-site/server.js +0 -516
- package/core/dev/specs/agent-connect/examples/minimal-site/test/smoke.test.mjs +0 -263
- package/core/dev/specs/agent-connect/history/DEFECT_REPORT_kenaz-agent-hub_2026-09-09_v0.4-empty-prompt-no-first-turn.md +0 -77
- package/core/dev/specs/agent-connect/history/DEFECT_REPORT_kenaz-agent-hub_2026-09-09_v0.4-prompt-mojibake.md +0 -90
- package/core/dev/specs/agent-connect/history/FEATURE_REQUEST_kenaz-agent-hub_2026-09-07.md +0 -61
- package/core/dev/specs/agent-connect/history/FEATURE_REQUEST_kenaz-agent-hub_2026-09-08_relay-v1-conformance.md +0 -76
- package/core/dev/specs/agent-connect/history/FEATURE_REQUEST_kenaz-agent-hub_2026-09-09_v0.4-session-channel.md +0 -87
- package/core/dev/specs/agent-connect/history/FLOWPIX_REPLY_agent-hub_2026-09-08_relay-v1-answers.md +0 -68
- package/core/dev/specs/agent-connect/history/FLOWPIX_bridge_CONTRACT.md +0 -642
- package/core/dev/specs/agent-connect/history/FLOWPIX_spikes_relay_spike_relay.mjs +0 -244
- package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-07.md +0 -77
- package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-08_direction-change-v0.3.md +0 -44
- package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-08_relay-v1-answers-ack.md +0 -37
- package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-08_relay-v1-conformance.md +0 -56
- package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-09_annotations-install-coldstart.md +0 -44
- package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-09_empty-prompt-first-turn.md +0 -56
- package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-09_prompt-mojibake-fixed.md +0 -48
- package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-09_session-channel.md +0 -57
- package/core/dev/specs/agent-connect/history/PROTOCOL_v0.3_snapshot.md +0 -379
- package/core/dev/specs/agent-connect/history/README.md +0 -47
- package/core/dev/specs/peer/CODEX_INTERACTIVE_PUSH.md +0 -65
- package/core/dev/specs/peer/CODEX_MANAGED_DAEMON.md +0 -54
- package/core/dev/specs/peer/CODEX_PEER_PULL_SPIKE.md +0 -54
- package/core/dev/specs/peer/MODS_SPIKE.md +0 -133
- package/core/dev/specs/peer/PER_PROJECT_ADDRESSING.md +0 -143
- package/core/dev/specs/peer/SWARM_PROTOCOLS.md +0 -256
- package/core/dev/specs/peer/codex-hook-shim-peer.test.js +0 -113
- package/core/dev/specs/peer/codex-push-launcher.test.js +0 -142
- package/core/dev/specs/peer/setup-codex-hooks.test.js +0 -60
- package/core/dev/specs/peer-ansuz/DELIVERY_SPIKE.md +0 -397
- package/core/dev/specs/peer-ansuz/DESIGN.md +0 -109
- package/core/dev/specs/peer-ansuz/spike/claude_poke.js +0 -129
- package/core/dev/specs/peer-ansuz/spike/claude_session_start_hook.js +0 -37
- package/core/dev/specs/peer-ansuz/spike/claude_settings_hook.json +0 -14
- package/core/dev/specs/peer-ansuz/spike/codex_appserver_client.js +0 -105
- package/core/dev/specs/peer-ansuz/spike/codex_appserver_query.js +0 -29
- package/core/dev/specs/peer-ansuz/spike/extract_timeline.js +0 -26
- package/core/dev/specs/synapse/SYMBOL_IDENTITY.md +0 -305
- package/core/dev/spikes/A4-cypher-varlen.md +0 -176
- package/core/dev/spikes/bloat-rounds.sh +0 -25
- package/core/dev/spikes/mods/clean-claude.js +0 -9
- package/core/dev/spikes/mods/drive-probe.js +0 -29
- package/core/dev/spikes/mods/e2e-peer.js +0 -71
- package/core/dev/spikes/mods/evidence/e2e-peer-control.json +0 -17
- package/core/dev/spikes/mods/evidence/e2e-peer-mod.json +0 -17
- package/core/dev/spikes/mods/evidence/probe-006a6e65-d807-4bc1-b648-fd7d1edfe0b4.jsonl +0 -4
- package/core/dev/spikes/mods/evidence/probe-cebdf1f7-f9c4-47a8-83cd-7c0786177404.jsonl +0 -12
- package/core/dev/spikes/mods/evidence/probe-eb21147d-10ce-4c32-93ed-37ca37d88d5a.jsonl +0 -11
- package/core/dev/spikes/mods/evidence/stream-cebdf1f7.jsonl +0 -18
- package/core/dev/spikes/mods/kenaz-mod-probe/.claude-plugin/plugin.json +0 -1
- package/core/dev/spikes/mods/kenaz-mod-probe/hooks/hooks.json +0 -1
- package/core/dev/spikes/mods/kenaz-mod-probe/hooks/register.ts +0 -65
- package/core/dev/spikes/mods/kenaz-mod-probe/tsconfig.json +0 -3
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# TASK_167: LLM Module Summary 生成系統
|
|
2
|
-
# Schema: dev/schemas/TASK.schema.json
|
|
3
|
-
|
|
4
|
-
id: "TASK_167"
|
|
5
|
-
title: "LLM Module Summary 生成系統"
|
|
6
|
-
description: |
|
|
7
|
-
使用 LLM(Claude API)為每個目錄/模組自動生成 100-200 字摘要。
|
|
8
|
-
讓 Agent 先讀摘要再決定往哪裡深挖,避免「亂槍打鳥」式的向量檢索。
|
|
9
|
-
|
|
10
|
-
快取機制確保不重複調用 API,基於 Git hash 失效。
|
|
11
|
-
|
|
12
|
-
priority: "P1"
|
|
13
|
-
status: "pending"
|
|
14
|
-
agent_type: "backend"
|
|
15
|
-
source: "F-018"
|
|
16
|
-
feature_ids:
|
|
17
|
-
- "F-018"
|
|
18
|
-
|
|
19
|
-
dependencies:
|
|
20
|
-
- "TASK_164"
|
|
21
|
-
|
|
22
|
-
scope_paths:
|
|
23
|
-
- "kenaz-cortex/src/cortex/summary/"
|
|
24
|
-
- "kenaz-cortex/src/cortex/config.py"
|
|
25
|
-
|
|
26
|
-
requirements:
|
|
27
|
-
- "建立 kenaz-cortex/src/cortex/summary/ 模組"
|
|
28
|
-
- "建立 ModuleSummaryGenerator 類"
|
|
29
|
-
- "使用 Claude API(anthropic SDK)為每個目錄生成 100-200 字摘要"
|
|
30
|
-
- "輸入組裝:目錄下的 exports + 函數簽名 + docstrings + README(max 2000 tokens)"
|
|
31
|
-
- "快取機制:儲存在 .cortex/summaries/,key 為目錄路徑 + Git hash"
|
|
32
|
-
- "支援批量生成(全量)和單一模組更新(增量)"
|
|
33
|
-
- "在 config.py 新增 SummaryConfig 配置類"
|
|
34
|
-
- "API Key 從環境變數 ANTHROPIC_API_KEY 讀取"
|
|
35
|
-
|
|
36
|
-
acceptance_criteria:
|
|
37
|
-
- "每個目錄能生成 100-200 字的功能描述"
|
|
38
|
-
- "快取命中時不調用 LLM API(0 成本)"
|
|
39
|
-
- "Git commit 後只更新有變更的目錄摘要"
|
|
40
|
-
- "摘要內容準確描述模組的核心功能和職責"
|
|
41
|
-
- "API Key 缺失時 graceful degradation(返回靜態摘要或空)"
|
|
42
|
-
|
|
43
|
-
technical_notes:
|
|
44
|
-
- "使用 anthropic SDK,model 建議 claude-haiku-4-5-20251001(低成本)"
|
|
45
|
-
- "Prompt 設計:提供函數列表和 docstrings,要求生成模組功能摘要"
|
|
46
|
-
- "快取格式:.cortex/summaries/{dir_path_hash}.json"
|
|
47
|
-
- "Git hash 用 git rev-parse HEAD:{dir_path} 獲取"
|
|
48
|
-
- "批量生成時可並行調用 API(asyncio)"
|
|
49
|
-
|
|
50
|
-
estimated_hours: 8
|
|
51
|
-
complexity: "medium"
|
|
52
|
-
|
|
53
|
-
metadata:
|
|
54
|
-
created_at: "2026-02-12T00:00:00+08:00"
|
|
55
|
-
created_by: "PM Lead"
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# TASK_168: Map-Reduce Context 聚合模式
|
|
2
|
-
# Schema: dev/schemas/TASK.schema.json
|
|
3
|
-
|
|
4
|
-
id: "TASK_168"
|
|
5
|
-
title: "Map-Reduce Context 聚合模式"
|
|
6
|
-
description: |
|
|
7
|
-
當 Agent 需要理解「整個專案的邏輯」時,不要一次塞 50 個檔案。
|
|
8
|
-
先讓 Agent 針對每個文件/模組生成摘要(Map),再匯總為專案級概覽(Reduce)。
|
|
9
|
-
|
|
10
|
-
利用 TASK_167 的 Module Summary 快取,實現高效的全局理解。
|
|
11
|
-
|
|
12
|
-
priority: "P2"
|
|
13
|
-
status: "pending"
|
|
14
|
-
agent_type: "backend"
|
|
15
|
-
source: "F-018"
|
|
16
|
-
feature_ids:
|
|
17
|
-
- "F-018"
|
|
18
|
-
|
|
19
|
-
dependencies:
|
|
20
|
-
- "TASK_167"
|
|
21
|
-
|
|
22
|
-
scope_paths:
|
|
23
|
-
- "kenaz-cortex/src/cortex/context/"
|
|
24
|
-
- "kenaz-cortex/src/cortex/mcp/server.py"
|
|
25
|
-
|
|
26
|
-
requirements:
|
|
27
|
-
- "建立 MapReduceContext 類"
|
|
28
|
-
- "Map 階段:收集每個模組的摘要(複用 TASK_167 的快取)"
|
|
29
|
-
- "Reduce 階段:匯總所有摘要,生成專案級概覽(模組關係 + 職責 + 技術棧)"
|
|
30
|
-
- "新增 cortex_overview MCP 工具(或增強 cortex_context)"
|
|
31
|
-
- "自動判斷:當查詢是「全局理解」類型時觸發 Map-Reduce"
|
|
32
|
-
- "結果快取:專案級概覽按 Git HEAD hash 快取"
|
|
33
|
-
|
|
34
|
-
acceptance_criteria:
|
|
35
|
-
- "50 個文件的專案能在 < 5 秒生成概覽(大部分使用快取)"
|
|
36
|
-
- "概覽包含各模組關係和職責描述"
|
|
37
|
-
- "快取命中率 > 80%"
|
|
38
|
-
- "MCP 工具可正常調用並返回結構化結果"
|
|
39
|
-
|
|
40
|
-
technical_notes:
|
|
41
|
-
- "Map 階段使用 TASK_167 的 ModuleSummaryGenerator"
|
|
42
|
-
- "Reduce 階段可使用 LLM 或模板拼接"
|
|
43
|
-
- "快取 key:project_root + git_head_hash"
|
|
44
|
-
- "考慮 Reduce 結果的 token 上限(建議 2000-3000 tokens)"
|
|
45
|
-
|
|
46
|
-
estimated_hours: 6
|
|
47
|
-
complexity: "medium"
|
|
48
|
-
|
|
49
|
-
metadata:
|
|
50
|
-
created_at: "2026-02-12T00:00:00+08:00"
|
|
51
|
-
created_by: "PM Lead"
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# TASK_169: V2 架構層整合 + 端到端測試
|
|
2
|
-
# Schema: dev/schemas/TASK.schema.json
|
|
3
|
-
|
|
4
|
-
id: "TASK_169"
|
|
5
|
-
title: "V2 架構層整合 + 端到端測試"
|
|
6
|
-
description: |
|
|
7
|
-
將 Symbol Index、Module Summary、Map-Reduce 三個新能力
|
|
8
|
-
整合到 V2 四層架構中,並進行端到端測試確保所有 MCP 工具正常。
|
|
9
|
-
|
|
10
|
-
priority: "P1"
|
|
11
|
-
status: "pending"
|
|
12
|
-
agent_type: "backend"
|
|
13
|
-
source: "F-018"
|
|
14
|
-
feature_ids:
|
|
15
|
-
- "F-018"
|
|
16
|
-
|
|
17
|
-
dependencies:
|
|
18
|
-
- "TASK_165"
|
|
19
|
-
- "TASK_166"
|
|
20
|
-
- "TASK_167"
|
|
21
|
-
|
|
22
|
-
scope_paths:
|
|
23
|
-
- "kenaz-cortex/src/cortex/retrieval/architecture.py"
|
|
24
|
-
- "kenaz-cortex/src/cortex/retrieval/strategy.py"
|
|
25
|
-
- "kenaz-cortex/src/cortex/context/smart_switch.py"
|
|
26
|
-
- "kenaz-cortex/src/cortex/mcp/server.py"
|
|
27
|
-
|
|
28
|
-
requirements:
|
|
29
|
-
- "Layer 2 (Architecture) 輸出加入 Symbol Index 概覽(Top-level 符號列表)"
|
|
30
|
-
- "cortex_context 輸出加入 Module Summaries(每個目錄一行摘要)"
|
|
31
|
-
- "V2 策略選擇器新增 SYMBOL_LOOKUP 任務類型"
|
|
32
|
-
- "端到端測試:連續調用所有 MCP 工具確認無 error"
|
|
33
|
-
- "更新 .cortex.yaml 配置以包含新功能開關"
|
|
34
|
-
|
|
35
|
-
acceptance_criteria:
|
|
36
|
-
- "cortex_context 返回包含符號概覽 + 模組摘要"
|
|
37
|
-
- "cortex_search + cortex_symbols 互補工作(語義 + 精確)"
|
|
38
|
-
- "V2 策略自動選擇正確層組合"
|
|
39
|
-
- "所有 8 個 MCP 工具(原 6 + cortex_symbols + cortex_overview)無 error"
|
|
40
|
-
- "README.md 更新以反映新功能"
|
|
41
|
-
|
|
42
|
-
technical_notes:
|
|
43
|
-
- "architecture.py 的 get_architecture_context() 需要整合 SymbolIndex"
|
|
44
|
-
- "strategy.py 的 TASK_TYPE_STRATEGIES 需要新增 SYMBOL_LOOKUP"
|
|
45
|
-
- "考慮向後相容:Symbol Index 和 Summary 都是可選的增強"
|
|
46
|
-
|
|
47
|
-
estimated_hours: 4
|
|
48
|
-
complexity: "medium"
|
|
49
|
-
|
|
50
|
-
metadata:
|
|
51
|
-
created_at: "2026-02-12T00:00:00+08:00"
|
|
52
|
-
created_by: "PM Lead"
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "1.0.0",
|
|
3
|
-
"tasks": [
|
|
4
|
-
{
|
|
5
|
-
"id": "TASK_083",
|
|
6
|
-
"title": "TASK_QUEUE 清理機制(移除已完成任務)",
|
|
7
|
-
"priority": "P0",
|
|
8
|
-
"status": "completed",
|
|
9
|
-
"agent_type": "developer",
|
|
10
|
-
"skill_path": ".claude/skills/developer/SKILL.md",
|
|
11
|
-
"source_file": "TASK_083_task_queue_cleanup.yaml",
|
|
12
|
-
"scope_paths": [
|
|
13
|
-
"dev/pipeline/TASK_QUEUE.json",
|
|
14
|
-
"dev/pipeline/PROGRESS.md",
|
|
15
|
-
"dev/scripts/"
|
|
16
|
-
],
|
|
17
|
-
"dependencies": [
|
|
18
|
-
"TASK_080"
|
|
19
|
-
]
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"id": "TASK_084",
|
|
23
|
-
"title": "修復 Multi-Agent Scheduler 的任務同步邏輯",
|
|
24
|
-
"priority": "P0",
|
|
25
|
-
"status": "completed",
|
|
26
|
-
"agent_type": "backend",
|
|
27
|
-
"skill_path": ".claude/skills/backend_engineer/SKILL.md",
|
|
28
|
-
"source_file": "TASK_084_scheduler_sync_logic_fix.yaml",
|
|
29
|
-
"scope_paths": [
|
|
30
|
-
"dashboard/src-tauri/src/cmd_modules/scheduler/",
|
|
31
|
-
"dev/scripts/multi_agent_scheduler.ps1"
|
|
32
|
-
],
|
|
33
|
-
"dependencies": [
|
|
34
|
-
"TASK_083"
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"id": "TASK_085",
|
|
39
|
-
"title": "整合 2/4-2/5 開發記憶點到 .memory/ 系統",
|
|
40
|
-
"priority": "P1",
|
|
41
|
-
"status": "completed",
|
|
42
|
-
"agent_type": "developer",
|
|
43
|
-
"skill_path": ".claude/skills/developer/SKILL.md",
|
|
44
|
-
"source_file": "TASK_085_memory_consolidation_0204_0205.yaml",
|
|
45
|
-
"scope_paths": [
|
|
46
|
-
".memory/CONTEXT.md",
|
|
47
|
-
"C:/Users/User/.claude/projects/D--repo-side-ava-KenazAI/memory/MEMORY.md"
|
|
48
|
-
],
|
|
49
|
-
"dependencies": []
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"id": "TASK_086",
|
|
53
|
-
"title": "AgentCreateWizard 可摺疊大綱式預覽面板",
|
|
54
|
-
"priority": "P1",
|
|
55
|
-
"status": "completed",
|
|
56
|
-
"agent_type": "frontend",
|
|
57
|
-
"skill_path": ".claude/skills/frontend_agent/SKILL.md",
|
|
58
|
-
"source_file": "TASK_086_collapsible_preview_panel.yaml",
|
|
59
|
-
"scope_paths": [
|
|
60
|
-
"dashboard/src/components/agent-section/AgentCreateWizard.tsx",
|
|
61
|
-
"dashboard/src/components/agent-section/CollapsiblePreview.tsx"
|
|
62
|
-
],
|
|
63
|
-
"dependencies": []
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"id": "TASK_087",
|
|
67
|
-
"title": "建立手動記憶點封存指令(取代自動清理)",
|
|
68
|
-
"priority": "P0",
|
|
69
|
-
"status": "completed",
|
|
70
|
-
"agent_type": "developer",
|
|
71
|
-
"skill_path": ".claude/skills/developer/SKILL.md",
|
|
72
|
-
"source_file": "TASK_087_manual_memory_archival.yaml",
|
|
73
|
-
"scope_paths": [
|
|
74
|
-
"dev/scripts/",
|
|
75
|
-
"dashboard/src-tauri/src/cmd_modules/scheduler/",
|
|
76
|
-
".claude/commands/"
|
|
77
|
-
],
|
|
78
|
-
"dependencies": []
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
"statistics": {
|
|
82
|
-
"total": 55,
|
|
83
|
-
"pending": 0,
|
|
84
|
-
"in_progress": 0,
|
|
85
|
-
"blocked": 0,
|
|
86
|
-
"completed": 5,
|
|
87
|
-
"cancelled": 0
|
|
88
|
-
},
|
|
89
|
-
"metadata": {
|
|
90
|
-
"created_at": "2026-02-05T05:27:20.2281213+08:00",
|
|
91
|
-
"source_spec": "dev/PRODUCT_SPEC.md"
|
|
92
|
-
},
|
|
93
|
-
"last_updated": "2026-02-04T22:06:04.445Z",
|
|
94
|
-
"project": "kenaz-dashboard"
|
|
95
|
-
}
|
|
@@ -1,446 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: guide
|
|
3
|
-
title: Multi-Agent Coordination Guide
|
|
4
|
-
description: 多 Agent 並行開發協作機制與最佳實踐
|
|
5
|
-
tags: [pipeline, multi-agent, coordination, parallel, locking]
|
|
6
|
-
audience: developer
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Multi-Agent Coordination Guide
|
|
10
|
-
|
|
11
|
-
## 概述
|
|
12
|
-
|
|
13
|
-
多 Agent 協作模式允許多個 Agent 並行執行不同任務,大幅提升開發效率。
|
|
14
|
-
|
|
15
|
-
## 架構設計
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
Multi-Agent Scheduler
|
|
19
|
-
↓
|
|
20
|
-
分析 TASK_QUEUE → 找出無衝突任務組
|
|
21
|
-
↓
|
|
22
|
-
┌─────────────────┼─────────────────┐
|
|
23
|
-
↓ ↓ ↓
|
|
24
|
-
Feature Agent 1 Feature Agent 2 Feature Agent 3
|
|
25
|
-
Branch: task/101 Branch: task/102 Branch: task/103
|
|
26
|
-
Scope: api/ Scope: ui/ Scope: tests/
|
|
27
|
-
TASK_101 TASK_102 TASK_103
|
|
28
|
-
↓ ↓ ↓
|
|
29
|
-
Commit & Merge Commit & Merge Commit & Merge
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## 無衝突任務檢測
|
|
33
|
-
|
|
34
|
-
### 衝突定義
|
|
35
|
-
|
|
36
|
-
兩個任務衝突的條件:
|
|
37
|
-
1. **Scope 重疊** - 修改相同或包含的路徑
|
|
38
|
-
2. **依賴關係** - 一個任務依賴另一個
|
|
39
|
-
3. **資源競爭** - 需要獨占同一資源
|
|
40
|
-
|
|
41
|
-
### 衝突檢測算法
|
|
42
|
-
|
|
43
|
-
```python
|
|
44
|
-
def check_conflict(task_a, task_b):
|
|
45
|
-
# 1. 檢查 scope 重疊
|
|
46
|
-
if has_path_overlap(task_a.scope, task_b.scope):
|
|
47
|
-
return True
|
|
48
|
-
|
|
49
|
-
# 2. 檢查依賴關係
|
|
50
|
-
if task_b.id in task_a.dependencies:
|
|
51
|
-
return True
|
|
52
|
-
if task_a.id in task_b.dependencies:
|
|
53
|
-
return True
|
|
54
|
-
|
|
55
|
-
# 3. 檢查資源競爭
|
|
56
|
-
if has_resource_conflict(task_a, task_b):
|
|
57
|
-
return True
|
|
58
|
-
|
|
59
|
-
return False
|
|
60
|
-
|
|
61
|
-
def has_path_overlap(paths_a, paths_b):
|
|
62
|
-
for path_a in paths_a:
|
|
63
|
-
for path_b in paths_b:
|
|
64
|
-
# 檢查包含關係
|
|
65
|
-
if path_a.startswith(path_b) or path_b.startswith(path_a):
|
|
66
|
-
return True
|
|
67
|
-
# 檢查相同路徑
|
|
68
|
-
if path_a == path_b:
|
|
69
|
-
return True
|
|
70
|
-
return False
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### 範例
|
|
74
|
-
|
|
75
|
-
```yaml
|
|
76
|
-
# 無衝突(可並行)
|
|
77
|
-
TASK_101:
|
|
78
|
-
scope: [src/api/auth/]
|
|
79
|
-
|
|
80
|
-
TASK_102:
|
|
81
|
-
scope: [src/ui/login/]
|
|
82
|
-
|
|
83
|
-
TASK_103:
|
|
84
|
-
scope: [tests/integration/]
|
|
85
|
-
|
|
86
|
-
# 有衝突(不可並行)
|
|
87
|
-
TASK_201:
|
|
88
|
-
scope: [src/api/] # 包含 auth/
|
|
89
|
-
|
|
90
|
-
TASK_202:
|
|
91
|
-
scope: [src/api/auth/] # 被 api/ 包含
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## 路徑鎖定機制
|
|
95
|
-
|
|
96
|
-
### 鎖定模式
|
|
97
|
-
|
|
98
|
-
```python
|
|
99
|
-
class LockMode(Enum):
|
|
100
|
-
EXCLUSIVE = "exclusive" # 排他性(寫入)
|
|
101
|
-
SHARED = "shared" # 共享(只讀)
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### 獲取鎖定
|
|
105
|
-
|
|
106
|
-
```python
|
|
107
|
-
from dev.pipeline.orchestrator.lock_manager import LockManager
|
|
108
|
-
|
|
109
|
-
lock_mgr = LockManager()
|
|
110
|
-
|
|
111
|
-
# 嘗試獲取排他鎖
|
|
112
|
-
success = lock_mgr.acquire_lock(
|
|
113
|
-
path="src/api/auth/",
|
|
114
|
-
agent_id="agent_001",
|
|
115
|
-
task_id="TASK_101",
|
|
116
|
-
mode=LockMode.EXCLUSIVE
|
|
117
|
-
)
|
|
118
|
-
|
|
119
|
-
if success:
|
|
120
|
-
# 執行任務
|
|
121
|
-
execute_task("TASK_101")
|
|
122
|
-
|
|
123
|
-
# 釋放鎖定
|
|
124
|
-
lock_mgr.release_lock("src/api/auth/", "agent_001")
|
|
125
|
-
else:
|
|
126
|
-
print("路徑已被鎖定,等待中...")
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### 鎖定狀態
|
|
130
|
-
|
|
131
|
-
`LOCK_STATE.json`:
|
|
132
|
-
```json
|
|
133
|
-
{
|
|
134
|
-
"src/api/auth/": {
|
|
135
|
-
"locked_by": "agent_001",
|
|
136
|
-
"task_id": "TASK_101",
|
|
137
|
-
"mode": "exclusive",
|
|
138
|
-
"locked_at": "2026-02-09T10:30:00Z"
|
|
139
|
-
},
|
|
140
|
-
"src/ui/": {
|
|
141
|
-
"locked_by": "agent_002",
|
|
142
|
-
"task_id": "TASK_102",
|
|
143
|
-
"mode": "exclusive",
|
|
144
|
-
"locked_at": "2026-02-09T10:31:00Z"
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### 自動釋放
|
|
150
|
-
|
|
151
|
-
鎖定會在以下情況自動釋放:
|
|
152
|
-
- 任務完成
|
|
153
|
-
- 任務失敗
|
|
154
|
-
- 超時(預設 4 小時)
|
|
155
|
-
|
|
156
|
-
## Scheduler 調度策略
|
|
157
|
-
|
|
158
|
-
### 1. 優先級排序
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
P0 (Critical) > P1 (High) > P2 (Medium) > P3 (Low)
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
### 2. 依賴解析
|
|
165
|
-
|
|
166
|
-
```python
|
|
167
|
-
from dev.pipeline.orchestrator.dependency_resolver import DependencyResolver
|
|
168
|
-
|
|
169
|
-
resolver = DependencyResolver()
|
|
170
|
-
|
|
171
|
-
# 獲取可執行的任務(依賴已滿足)
|
|
172
|
-
ready_tasks = resolver.get_ready_tasks(pending_tasks)
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
### 3. 衝突檢測
|
|
176
|
-
|
|
177
|
-
```python
|
|
178
|
-
# 找出無衝突的任務組
|
|
179
|
-
def find_non_conflicting_group(tasks, max_agents=3):
|
|
180
|
-
selected = []
|
|
181
|
-
for task in tasks:
|
|
182
|
-
# 檢查是否與已選擇的任務衝突
|
|
183
|
-
if not any(check_conflict(task, t) for t in selected):
|
|
184
|
-
selected.append(task)
|
|
185
|
-
if len(selected) >= max_agents:
|
|
186
|
-
break
|
|
187
|
-
return selected
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
### 完整調度流程
|
|
191
|
-
|
|
192
|
-
```python
|
|
193
|
-
def schedule_tasks(max_agents=3):
|
|
194
|
-
# 1. 載入任務佇列
|
|
195
|
-
queue = TaskQueue()
|
|
196
|
-
pending = queue.get_pending_tasks()
|
|
197
|
-
|
|
198
|
-
# 2. 依賴解析
|
|
199
|
-
resolver = DependencyResolver()
|
|
200
|
-
ready = resolver.get_ready_tasks(pending)
|
|
201
|
-
|
|
202
|
-
# 3. 優先級排序
|
|
203
|
-
sorted_tasks = sorted(ready, key=lambda t: t.priority)
|
|
204
|
-
|
|
205
|
-
# 4. 找出無衝突任務組
|
|
206
|
-
selected = find_non_conflicting_group(sorted_tasks, max_agents)
|
|
207
|
-
|
|
208
|
-
# 5. 分派任務
|
|
209
|
-
for task in selected:
|
|
210
|
-
assign_to_feature_agent(task)
|
|
211
|
-
|
|
212
|
-
return selected
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
## Agent 類型
|
|
216
|
-
|
|
217
|
-
### Dev Agent (單一模式)
|
|
218
|
-
|
|
219
|
-
```bash
|
|
220
|
-
# 使用者調用
|
|
221
|
-
/dev
|
|
222
|
-
|
|
223
|
-
# 行為
|
|
224
|
-
- 單一 Agent 執行
|
|
225
|
-
- 順序處理任務
|
|
226
|
-
- 直接在 main branch 工作
|
|
227
|
-
- 適合簡單任務
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
### Feature Agent (並行模式)
|
|
231
|
-
|
|
232
|
-
```bash
|
|
233
|
-
# 系統調用
|
|
234
|
-
.\dev\scripts\START_MULTI_AGENT.bat
|
|
235
|
-
|
|
236
|
-
# 行為
|
|
237
|
-
- 多 Agent 並行執行
|
|
238
|
-
- 各自獨立 branch
|
|
239
|
-
- 自動合併到 main
|
|
240
|
-
- 適合複雜專案
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
### 比較
|
|
244
|
-
|
|
245
|
-
| 特性 | Dev Agent | Feature Agent |
|
|
246
|
-
|------|-----------|---------------|
|
|
247
|
-
| 並行數量 | 1 | 1-5 |
|
|
248
|
-
| Branch 隔離 | 否 | 是 |
|
|
249
|
-
| 路徑鎖定 | 不需要 | 需要 |
|
|
250
|
-
| 適用場景 | 單任務、學習 | 多任務、生產 |
|
|
251
|
-
| 執行速度 | 慢 | 快 (3倍) |
|
|
252
|
-
|
|
253
|
-
## Git Branch 策略
|
|
254
|
-
|
|
255
|
-
### Branch 命名
|
|
256
|
-
|
|
257
|
-
```
|
|
258
|
-
task/{task_id}-{slug}
|
|
259
|
-
|
|
260
|
-
範例:
|
|
261
|
-
task/101-auth-api
|
|
262
|
-
task/102-login-ui
|
|
263
|
-
task/103-auth-tests
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
### 工作流程
|
|
267
|
-
|
|
268
|
-
```bash
|
|
269
|
-
# Feature Agent 1
|
|
270
|
-
git checkout -b task/101-auth-api
|
|
271
|
-
# 開發...
|
|
272
|
-
git commit -m "[TASK_101] 實現認證 API"
|
|
273
|
-
git checkout main
|
|
274
|
-
git merge task/101-auth-api
|
|
275
|
-
git branch -d task/101-auth-api
|
|
276
|
-
|
|
277
|
-
# Feature Agent 2 (並行)
|
|
278
|
-
git checkout -b task/102-login-ui
|
|
279
|
-
# 開發...
|
|
280
|
-
git commit -m "[TASK_102] 建立登入 UI"
|
|
281
|
-
git checkout main
|
|
282
|
-
git merge task/102-login-ui
|
|
283
|
-
git branch -d task/102-login-ui
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
### 衝突解決
|
|
287
|
-
|
|
288
|
-
如果合併時發生衝突:
|
|
289
|
-
1. **自動解決** - 使用 Git 的自動合併
|
|
290
|
-
2. **手動介入** - 標記任務為 blocked,通知用戶
|
|
291
|
-
3. **重新排程** - 將衝突任務延後執行
|
|
292
|
-
|
|
293
|
-
## Agent 狀態管理
|
|
294
|
-
|
|
295
|
-
### AGENT_STATE.json
|
|
296
|
-
|
|
297
|
-
```json
|
|
298
|
-
{
|
|
299
|
-
"active_agents": [
|
|
300
|
-
{
|
|
301
|
-
"id": "agent_001",
|
|
302
|
-
"type": "feature_agent",
|
|
303
|
-
"task_id": "TASK_101",
|
|
304
|
-
"branch": "task/101-auth-api",
|
|
305
|
-
"started_at": "2026-02-09T10:30:00Z",
|
|
306
|
-
"status": "running"
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
"id": "agent_002",
|
|
310
|
-
"type": "feature_agent",
|
|
311
|
-
"task_id": "TASK_102",
|
|
312
|
-
"branch": "task/102-login-ui",
|
|
313
|
-
"started_at": "2026-02-09T10:31:00Z",
|
|
314
|
-
"status": "running"
|
|
315
|
-
}
|
|
316
|
-
],
|
|
317
|
-
"max_agents": 3,
|
|
318
|
-
"updated_at": "2026-02-09T10:31:00Z"
|
|
319
|
-
}
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
### 狀態監控
|
|
323
|
-
|
|
324
|
-
```python
|
|
325
|
-
from dev.pipeline.orchestrator.agent_assigner import AgentAssigner
|
|
326
|
-
|
|
327
|
-
assigner = AgentAssigner()
|
|
328
|
-
|
|
329
|
-
# 獲取活躍 Agent 數量
|
|
330
|
-
active_count = assigner.get_active_agent_count()
|
|
331
|
-
|
|
332
|
-
# 檢查是否可以分派新任務
|
|
333
|
-
can_assign = active_count < assigner.max_agents
|
|
334
|
-
|
|
335
|
-
# 獲取 Agent 狀態
|
|
336
|
-
agents = assigner.get_active_agents()
|
|
337
|
-
for agent in agents:
|
|
338
|
-
print(f"{agent['id']}: {agent['task_id']} ({agent['status']})")
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
## 成本控制
|
|
342
|
-
|
|
343
|
-
### 並行數量限制
|
|
344
|
-
|
|
345
|
-
```yaml
|
|
346
|
-
# PIPELINE_CONFIG.json - cost_control
|
|
347
|
-
cost_control:
|
|
348
|
-
enabled: true
|
|
349
|
-
max_parallel_agents: 3
|
|
350
|
-
token_budget_per_task: 100000
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
### 動態調整
|
|
354
|
-
|
|
355
|
-
```python
|
|
356
|
-
# 根據任務複雜度調整並行數量
|
|
357
|
-
def calculate_max_agents(task_complexity):
|
|
358
|
-
if task_complexity == "high":
|
|
359
|
-
return 2 # 複雜任務用較少 Agent
|
|
360
|
-
elif task_complexity == "medium":
|
|
361
|
-
return 3
|
|
362
|
-
else:
|
|
363
|
-
return 5 # 簡單任務可以多並行
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
## 最佳實踐
|
|
367
|
-
|
|
368
|
-
### ✅ 推薦
|
|
369
|
-
|
|
370
|
-
1. **明確的 Scope** - 確保任務 scope 不重疊
|
|
371
|
-
2. **合理拆分** - 任務大小適中(2-4 小時)
|
|
372
|
-
3. **依賴最小化** - 減少任務間依賴
|
|
373
|
-
4. **定期合併** - 避免 branch 過時
|
|
374
|
-
5. **監控狀態** - 追蹤 Agent 執行情況
|
|
375
|
-
|
|
376
|
-
### ❌ 避免
|
|
377
|
-
|
|
378
|
-
1. **過度並行** - 超過 5 個 Agent 會降低效率
|
|
379
|
-
2. **Scope 過大** - 單一任務影響太多文件
|
|
380
|
-
3. **忽略依賴** - 導致執行順序錯誤
|
|
381
|
-
4. **長時間 branch** - 增加合併衝突風險
|
|
382
|
-
|
|
383
|
-
## 效能對比
|
|
384
|
-
|
|
385
|
-
### 單 Agent vs 多 Agent
|
|
386
|
-
|
|
387
|
-
| 場景 | 單 Agent | 3 Agent 並行 |
|
|
388
|
-
|------|---------|--------------|
|
|
389
|
-
| 10 個獨立任務 | 150 分鐘 | 50-60 分鐘 |
|
|
390
|
-
| 複雜任務(有依賴) | 120 分鐘 | 80-90 分鐘 |
|
|
391
|
-
| 緊急修復 | 15 分鐘 | 15 分鐘(無優勢) |
|
|
392
|
-
|
|
393
|
-
### 建議
|
|
394
|
-
|
|
395
|
-
- **< 3 個任務** - 使用單 Agent
|
|
396
|
-
- **3-10 個任務** - 使用 3 Agent 並行
|
|
397
|
-
- **> 10 個任務** - 使用 5 Agent 並行
|
|
398
|
-
- **緊急任務** - 使用單 Agent(更快啟動)
|
|
399
|
-
|
|
400
|
-
## 故障排查
|
|
401
|
-
|
|
402
|
-
### Agent 卡住
|
|
403
|
-
|
|
404
|
-
**症狀**: Agent 長時間無回應
|
|
405
|
-
|
|
406
|
-
**檢查**:
|
|
407
|
-
```bash
|
|
408
|
-
cat dev/pipeline/AGENT_STATE.json
|
|
409
|
-
```
|
|
410
|
-
|
|
411
|
-
**解決**:
|
|
412
|
-
1. 手動停止 Agent
|
|
413
|
-
2. 釋放路徑鎖定
|
|
414
|
-
3. 重新分派任務
|
|
415
|
-
|
|
416
|
-
### 路徑鎖定死鎖
|
|
417
|
-
|
|
418
|
-
**症狀**: 多個任務互相等待
|
|
419
|
-
|
|
420
|
-
**檢查**:
|
|
421
|
-
```bash
|
|
422
|
-
cat dev/pipeline/LOCK_STATE.json
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
**解決**:
|
|
426
|
-
1. 強制釋放超時鎖定
|
|
427
|
-
2. 調整任務順序
|
|
428
|
-
3. 拆分衝突任務
|
|
429
|
-
|
|
430
|
-
### 合併衝突
|
|
431
|
-
|
|
432
|
-
**症狀**: Git merge 失敗
|
|
433
|
-
|
|
434
|
-
**解決**:
|
|
435
|
-
```bash
|
|
436
|
-
# 手動解決衝突
|
|
437
|
-
git checkout main
|
|
438
|
-
git merge task/101-auth-api
|
|
439
|
-
# 解決衝突...
|
|
440
|
-
git commit
|
|
441
|
-
```
|
|
442
|
-
|
|
443
|
-
---
|
|
444
|
-
|
|
445
|
-
**建立日期**: 2026-02-09
|
|
446
|
-
**維護者**: Developer Team
|