kenaz 0.3.21 → 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/commands/Ansuz.md +2 -0
- package/core/.claude/hooks/__tests__/peer-session-fill.test.js +37 -0
- package/core/.claude/hooks/_ansuz-conversation.js +32 -1
- package/core/.claude/hooks/_user-scope.js +1 -1
- package/core/.claude/hooks/core-resolve.js +1 -1
- package/core/.claude/hooks/peer-optin.test.js +74 -0
- package/core/.claude/hooks/peer-session-fill.js +38 -0
- package/core/.claude/hooks/turn-context.js +5 -4
- package/core/.claude/hooks/worktree-create.js +6 -6
- package/core/.claude/hooks/worktree-remove.js +4 -4
- package/core/.claude/settings.json +9 -0
- 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/bifrost/openai/codex-hook-shim.js +21 -4
- package/core/.formation/bifrost/openai/codex-peer-pull.test.js +42 -0
- package/core/.formation/bifrost/provider-launch.js +2 -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 +471 -0
- 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/commands/Ansuz.md +2 -0
- package/core/plugins/kenaz/guidance.md +2 -0
- package/core/plugins/kenaz/hooks/core-resolve.js +1 -1
- package/core/plugins/kenaz/hooks/hooks.json +9 -0
- package/core/plugins/kenaz/hooks/kenaz-hook.js +53 -4
- package/core/plugins/kenaz/scripts/kenaz.test.js +72 -5
- package/core/plugins/kenaz/scripts/ygg.js +40 -4
- package/core/plugins/kenaz/scripts/ygg.test.js +63 -3
- package/core/plugins/kenaz-peer/hooks/register.test.ts +59 -2
- package/core/plugins/kenaz-peer/hooks/register.ts +24 -1
- 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,72 +0,0 @@
|
|
|
1
|
-
import test from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
|
-
import { setTimeout as delay } from 'node:timers/promises';
|
|
4
|
-
import { evaluateMode, runMatrix } from '../resilience.mjs';
|
|
5
|
-
import { template } from '../cli.mjs';
|
|
6
|
-
import { rules, liveProvider, prediction, MODEL } from '../providers.mjs';
|
|
7
|
-
|
|
8
|
-
test('offline fault matrix delivers exactly once and distinguishes failure from fallback', async () => {
|
|
9
|
-
const matrix = await runMatrix(); assert.equal(matrix.count, 27); assert.equal(matrix.promotion_eligible, false);
|
|
10
|
-
assert.equal(matrix.production_fallback_verified, false); assert.equal(matrix.installed_application_verified, false); assert.equal(matrix.timeouts, 4);
|
|
11
|
-
for (const o of matrix.observations) {
|
|
12
|
-
if (o.mode !== 'off' && ['delayed_headers', 'stalled_body'].includes(o.fault)) assert.equal(o.provider_outcome.status, 'timeout', JSON.stringify(o));
|
|
13
|
-
assert.equal(o.deliveries, 1); assert.equal(o.input_unchanged, true); assert.equal(o.late_output_unchanged, true);
|
|
14
|
-
if (o.mode === 'off' || o.fault === 'missing_key') { assert.equal(o.transport_calls, 0); assert.equal(o.requests, 0); }
|
|
15
|
-
else { assert.equal(o.transport_calls, 1); assert.equal(o.requests, 1); }
|
|
16
|
-
const usesJev = o.mode === 'evaluation-active' && o.fault === 'valid';
|
|
17
|
-
assert.equal(o.delivered_source, usesJev ? 'jev' : 'baseline'); assert.equal(o.baseline_calls, usesJev ? 0 : 1); assert.equal(o.baseline_equal, !usesJev);
|
|
18
|
-
if (o.mode !== 'off' && o.fault !== 'valid') assert.notEqual(o.provider_outcome.status, 'ok');
|
|
19
|
-
assert.equal(o.delivered_status, 'ok');
|
|
20
|
-
}
|
|
21
|
-
assert.equal(JSON.stringify(matrix).includes('local-resilience-dummy'), false);
|
|
22
|
-
for (const status of [401, 422, 429, 529, 500]) assert.ok(matrix.observations.some(o => o.provider_outcome.http_status === status));
|
|
23
|
-
});
|
|
24
|
-
test('off never constructs provider; missing/invalid keys do not reach injected network', async () => {
|
|
25
|
-
let factoryCalls = 0, network = 0;
|
|
26
|
-
const off = await evaluateMode(template(), { mode: 'off', providerFactory: () => { factoryCalls++; throw new Error('unused'); } });
|
|
27
|
-
assert.equal(off.deliveries, 1); assert.equal(factoryCalls, 0);
|
|
28
|
-
for (const apiKey of ['', ' ', 'not-empty\ninvalid']) {
|
|
29
|
-
const r = await evaluateMode(template(), { mode: 'evaluation-active', providerFactory: () => liveProvider({ apiKey, fetchImpl: () => { network++; } }) });
|
|
30
|
-
assert.equal(r.provider_outcome.status, 'missing_key'); assert.equal(r.baseline_calls, 1);
|
|
31
|
-
}
|
|
32
|
-
assert.equal(network, 0);
|
|
33
|
-
});
|
|
34
|
-
test('shadow delivers baseline before waiting, late completion never delivers again', async () => {
|
|
35
|
-
const row = template(), baseline = rules(row); let resolveProvider, calls = 0;
|
|
36
|
-
const pending = evaluateMode(row, { mode: 'shadow', baseline: () => baseline, deliver: value => { calls++; assert.deepEqual(value, baseline); }, providerFactory: () => () => new Promise(resolve => { resolveProvider = resolve; }) });
|
|
37
|
-
await delay(0); assert.equal(calls, 1);
|
|
38
|
-
resolveProvider(prediction(row, 'ok', 0.99)); const result = await pending;
|
|
39
|
-
assert.equal(calls, 1); assert.deepEqual(result.delivered, baseline);
|
|
40
|
-
});
|
|
41
|
-
test('invalid identity and partial provider scores fall back without mutating input', async () => {
|
|
42
|
-
const row = template(), before = structuredClone(row);
|
|
43
|
-
const r = await evaluateMode(row, { mode: 'evaluation-active', providerFactory: () => input => { input.state.message = 'changed'; return prediction(input, 'ok', 0.9); } });
|
|
44
|
-
assert.equal(r.source, 'baseline'); assert.equal(r.provider_outcome.status, 'invalid'); assert.deepEqual(row, before);
|
|
45
|
-
const relevance = { ...row, purpose: 'relevance', candidates: [{ id: 'a', text: 'a', grade: 1 }, { id: 'b', text: 'b', grade: 0 }] }; delete relevance.labels;
|
|
46
|
-
const partial = await evaluateMode(relevance, { mode: 'evaluation-active', providerFactory: () => input => prediction(input, 'ok', { a: 3 }) });
|
|
47
|
-
assert.equal(partial.source, 'baseline'); assert.equal(partial.provider_outcome.status, 'ok'); assert.equal(partial.baseline_calls, 1);
|
|
48
|
-
});
|
|
49
|
-
test('transport completion after timeout cannot redeliver or replace baseline', async () => {
|
|
50
|
-
const row = template(), baseline = rules(row); let complete = false, deliveries = 0;
|
|
51
|
-
const result = await evaluateMode(row, { mode: 'evaluation-active', baseline: () => baseline, deliver: () => { deliveries++; }, providerFactory: () => liveProvider({
|
|
52
|
-
apiKey: 'local-test-only', timeoutMs: 20, fetchImpl: async () => {
|
|
53
|
-
await delay(100); complete = true;
|
|
54
|
-
return new Response(JSON.stringify({ model: MODEL, answers: { correction: { type: 'noul', noul: 0.99 } }, usage: { input_tokens: 1, output_tokens: 1 } }));
|
|
55
|
-
},
|
|
56
|
-
}) });
|
|
57
|
-
assert.equal(result.provider_outcome.status, 'timeout'); assert.equal(complete, false); const snapshot = JSON.stringify(result);
|
|
58
|
-
await delay(130); assert.equal(complete, true); assert.equal(deliveries, 1); assert.equal(JSON.stringify(result), snapshot); assert.deepEqual(result.delivered, baseline);
|
|
59
|
-
});
|
|
60
|
-
test('baseline rejection propagates without retry or provider activation in shadow', async () => {
|
|
61
|
-
let calls = 0, providerCalls = 0;
|
|
62
|
-
await assert.rejects(evaluateMode(template(), { mode: 'shadow', baseline: () => { calls++; throw new Error('baseline_failed'); }, providerFactory: () => { providerCalls++; } }), /baseline_failed/);
|
|
63
|
-
assert.equal(calls, 1); assert.equal(providerCalls, 0);
|
|
64
|
-
});
|
|
65
|
-
test('non-Error provider exceptions and wrong-model success fail closed', async () => {
|
|
66
|
-
for (const thrown of [null, 'arbitrary-secret', undefined]) {
|
|
67
|
-
const result = await evaluateMode(template(), { mode: 'evaluation-active', providerFactory: () => { throw thrown; } });
|
|
68
|
-
assert.equal(result.source, 'baseline'); assert.equal(result.provider_outcome.status, 'invalid'); assert.equal(result.baseline_calls, 1);
|
|
69
|
-
}
|
|
70
|
-
const result = await evaluateMode(template(), { mode: 'evaluation-active', providerFactory: () => rules });
|
|
71
|
-
assert.equal(result.source, 'baseline'); assert.equal(result.provider_outcome.status, 'invalid');
|
|
72
|
-
});
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import test from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
|
-
import { mkdtemp, readFile, writeFile, readdir, unlink, rmdir } from 'node:fs/promises';
|
|
4
|
-
import { tmpdir } from 'node:os';
|
|
5
|
-
import { join } from 'node:path';
|
|
6
|
-
import { readJsonl } from '../schema.mjs';
|
|
7
|
-
import { exportReview, applyReview, main, datasetHash } from '../review.mjs';
|
|
8
|
-
|
|
9
|
-
const rows = await readJsonl(new URL('../fixtures/synthetic.jsonl', import.meta.url));
|
|
10
|
-
function filled() {
|
|
11
|
-
const review = exportReview(rows);
|
|
12
|
-
for (const item of review.items) {
|
|
13
|
-
item.reviewed = true; item.reviewer = 'test-attestation-only'; item.reviewed_at = '2026-09-20T12:00:00Z';
|
|
14
|
-
if (item.purpose === 'correction') item.decision.correction = false;
|
|
15
|
-
else for (const grade of item.decision.grades) grade.grade = 2;
|
|
16
|
-
}
|
|
17
|
-
return review;
|
|
18
|
-
}
|
|
19
|
-
test('blinded export contains context but no original gold/provenance/predictions', () => {
|
|
20
|
-
const before = JSON.stringify(rows), review = exportReview(rows);
|
|
21
|
-
assert.equal(review.items.length, rows.length); assert.equal(JSON.stringify(rows), before);
|
|
22
|
-
for (const item of review.items) {
|
|
23
|
-
for (const key of ['labels', 'provenance', 'model', 'scores', 'grade']) assert.equal(Object.hasOwn(item, key), false);
|
|
24
|
-
assert.equal(item.reviewed, false); assert.equal(item.reviewer, null);
|
|
25
|
-
if (item.purpose === 'correction') assert.equal(item.decision.correction, null);
|
|
26
|
-
else { assert.ok(item.candidates.every(c => Object.keys(c).sort().join() === 'id,text')); assert.ok(item.decision.grades.every(c => c.grade === null)); }
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
test('complete attested review applies separate labels preserving input identity and source', () => {
|
|
30
|
-
const before = JSON.stringify(rows), result = applyReview(rows, filled());
|
|
31
|
-
assert.equal(JSON.stringify(rows), before);
|
|
32
|
-
for (let i = 0; i < rows.length; i++) {
|
|
33
|
-
const { provenance, labels, candidates, ...original } = rows[i];
|
|
34
|
-
const { provenance: p, labels: l, candidates: c, ...actual } = result[i];
|
|
35
|
-
assert.deepEqual(actual, original); assert.equal(p.source, provenance.source); assert.equal(p.annotation, 'human_verified');
|
|
36
|
-
if (l) assert.equal(l.correction, false); else assert.ok(c.every(x => x.grade === 2));
|
|
37
|
-
}
|
|
38
|
-
const shuffled = filled(); shuffled.items.reverse(); assert.deepEqual(applyReview(rows, shuffled), result);
|
|
39
|
-
});
|
|
40
|
-
test('rejects incomplete, stale, duplicated, tampered or unauthored reviews', () => {
|
|
41
|
-
assert.throws(() => applyReview(rows, exportReview(rows)), /unreviewed/);
|
|
42
|
-
const changes = [r => r.items.pop(), r => r.items[1] = r.items[0], r => r.dataset_hash = 'stale', r => r.review_version = 'v2', r => r.model_scores = [], r => r.items[0].context.message = 'tampered', r => r.items[0].project_id = 'other', r => r.items[0].state_hash = 'bad', r => r.items[0].reviewed = false, r => r.items[0].reviewer = ' ', r => r.items[0].reviewed_at = '2026-02-30T12:00:00Z', r => r.items[0].decision.correction = null, r => r.items[0].decision.extra = true, r => r.items[8].decision.grades[0].id = 'unknown', r => r.items[8].decision.grades[0].grade = 1.5, r => r.items[8].decision.grades[1].id = r.items[8].decision.grades[0].id];
|
|
43
|
-
for (const change of changes) { const review = filled(); change(review); assert.throws(() => applyReview(rows, review)); }
|
|
44
|
-
const changedDataset = structuredClone(rows); changedDataset[0].labels.correction = !changedDataset[0].labels.correction;
|
|
45
|
-
assert.notEqual(datasetHash(rows), datasetHash(changedDataset)); assert.throws(() => applyReview(changedDataset, filled()), /stale/);
|
|
46
|
-
});
|
|
47
|
-
test('CLI exclusively creates outputs, rejects partial reviews without output, preserves sources', async t => {
|
|
48
|
-
const dir = await mkdtemp(join(tmpdir(), 'jev-review-test-'));
|
|
49
|
-
t.after(async () => { for (const name of await readdir(dir)) await unlink(join(dir, name)); await rmdir(dir); });
|
|
50
|
-
const dataset = join(dir, 'data.jsonl'), review = join(dir, 'review.json'), out = join(dir, 'reviewed.jsonl');
|
|
51
|
-
await writeFile(dataset, rows.map(r => JSON.stringify(r)).join('\n')); const original = await readFile(dataset, 'utf8');
|
|
52
|
-
assert.equal((await main(['export', '--dataset', dataset, '--out', review])).count, rows.length);
|
|
53
|
-
await assert.rejects(main(['export', '--dataset', dataset, '--out', review]), /EEXIST/);
|
|
54
|
-
await assert.rejects(main(['apply', '--dataset', dataset, '--reviews', review, '--out', out]), /unreviewed/);
|
|
55
|
-
assert.equal((await readdir(dir)).includes('reviewed.jsonl'), false);
|
|
56
|
-
await writeFile(review, JSON.stringify(filled()));
|
|
57
|
-
await main(['apply', '--dataset', dataset, '--reviews', review, '--out', out]);
|
|
58
|
-
assert.equal((await readJsonl(out))[0].provenance.annotation, 'human_verified');
|
|
59
|
-
await assert.rejects(main(['apply', '--dataset', dataset, '--reviews', review, '--out', dataset]), /overwrite/);
|
|
60
|
-
assert.equal(await readFile(dataset, 'utf8'), original); assert.equal((await readdir(dir)).some(x => x.endsWith('.tmp')), false);
|
|
61
|
-
});
|
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
# Kenaz Cortex V2 - Phase 3 規劃總結
|
|
2
|
-
|
|
3
|
-
> **規劃日期**: 2026-02-07
|
|
4
|
-
> **規劃者**: Architect Agent
|
|
5
|
-
> **狀態**: ✅ PLANNING COMPLETE
|
|
6
|
-
> **下一步**: 等待用戶確認並啟動開發
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## 📊 執行總結
|
|
11
|
-
|
|
12
|
-
Phase 3 架構設計已完成!我們將 Kenaz Cortex V2 從「智能檢索系統」升級為「生產就緒的動態智能系統」。
|
|
13
|
-
|
|
14
|
-
### 核心目標
|
|
15
|
-
|
|
16
|
-
| 維度 | Phase 2 | Phase 3 目標 | 改善幅度 |
|
|
17
|
-
|------|---------|-------------|---------|
|
|
18
|
-
| **快取容量** | 100 項 | 10,000+ 項 | **+100x** |
|
|
19
|
-
| **快取共享** | ❌ 單機 | ✅ 團隊共享 | **NEW** |
|
|
20
|
-
| **首次查詢** | 1.5s (冷啟動) | 0.6s (預熱) | **-60%** |
|
|
21
|
-
| **變更感知** | ❌ 無 | ✅ 實時追蹤 | **NEW** |
|
|
22
|
-
| **快取失效** | ⏰ 手動 TTL | ✅ 自動智能失效 | **NEW** |
|
|
23
|
-
| **整體性能** | - | > +20% | **+20%** |
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## 🏗️ 四大核心系統
|
|
28
|
-
|
|
29
|
-
### 1. Layer 4: 動態追蹤層 🎯
|
|
30
|
-
|
|
31
|
-
**解決什麼問題?**
|
|
32
|
-
- Layer 1-3 無法感知文件變更
|
|
33
|
-
- 文件修改後快取已過時但無法自動失效
|
|
34
|
-
- 缺乏全局視角
|
|
35
|
-
|
|
36
|
-
**提供什麼?**
|
|
37
|
-
- ✅ 實時監控文件系統和 Git 變更(File Watcher + Git Monitor)
|
|
38
|
-
- ✅ 智能分析變更影響範圍(BFS 依賴鏈,最大深度 3)
|
|
39
|
-
- ✅ 自動失效相關快取(影響分析 → 快取失效)
|
|
40
|
-
- ✅ 動態維護專案架構視圖
|
|
41
|
-
|
|
42
|
-
**核心組件**:
|
|
43
|
-
```
|
|
44
|
-
File Watcher (watchdog) → Change Analyzer (BFS) → Cache Invalidator
|
|
45
|
-
Git Monitor (GitPython) ↗
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
**性能指標**:
|
|
49
|
-
- 變更追蹤延遲 < 500ms
|
|
50
|
-
- 快取失效準確率 > 95%
|
|
51
|
-
- CPU 佔用 < 5%
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
### 2. 分佈式快取系統 🌐
|
|
56
|
-
|
|
57
|
-
**解決什麼問題?**
|
|
58
|
-
- 單機快取容量有限(100 項)
|
|
59
|
-
- 無法團隊共享
|
|
60
|
-
- 進程重啟後快取丟失
|
|
61
|
-
|
|
62
|
-
**兩層快取架構**:
|
|
63
|
-
```
|
|
64
|
-
L1 Local Cache (100 項, LRU, <1ms)
|
|
65
|
-
↓ miss
|
|
66
|
-
L2 Redis Cache (10,000+ 項, 團隊共享, <10ms)
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
**核心特性**:
|
|
70
|
-
- ✅ L1 → L2 兩層查詢策略
|
|
71
|
-
- ✅ 同時寫入 L1 + L2
|
|
72
|
-
- ✅ L1 回填機制(L2 命中時回填 L1)
|
|
73
|
-
- ✅ Redis 連接失敗時優雅降級
|
|
74
|
-
|
|
75
|
-
**容量提升**: 100 項 → 10,000+ 項 (+100x)
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
### 3. 智能快取預熱系統 🚀
|
|
80
|
-
|
|
81
|
-
**解決什麼問題?**
|
|
82
|
-
- 用戶首次查詢必須等待完整 RAG 檢索(1-2 秒)
|
|
83
|
-
- 高頻查詢每次冷啟動都需重複計算
|
|
84
|
-
|
|
85
|
-
**預熱流程**:
|
|
86
|
-
```
|
|
87
|
-
專案啟動 → 分析歷史查詢(7 天)→ 識別高頻模式(Top 20)→ 預生成 Context
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
**優先級計算**:
|
|
91
|
-
```python
|
|
92
|
-
priority = frequency * (1.0 / days_since_last_use)
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
**預熱效果**:
|
|
96
|
-
- 首次查詢命中率:0% → 60%+
|
|
97
|
-
- 預熱完成時間:< 5 秒
|
|
98
|
-
- 首次查詢延遲:1.5s → 0.6s (-60%)
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
### 4. 自適應優化引擎 🔧
|
|
103
|
-
|
|
104
|
-
**解決什麼問題?**
|
|
105
|
-
- 固定 TTL(24h)無法適應不同文件的修改頻率
|
|
106
|
-
- 快取資源分配不智能
|
|
107
|
-
|
|
108
|
-
**自適應 TTL 策略**:
|
|
109
|
-
| 修改頻率 | 30天修改次數 | TTL | 適用場景 |
|
|
110
|
-
|---------|-------------|-----|---------|
|
|
111
|
-
| 高頻 | > 50 次 | 1 小時 | 活躍開發文件 |
|
|
112
|
-
| 中頻 | 10-50 次 | 6 小時 | 正常維護文件 |
|
|
113
|
-
| 低頻 | < 10 次 | 24 小時 | 穩定文件 |
|
|
114
|
-
|
|
115
|
-
**動態資源分配**:
|
|
116
|
-
- 高頻查詢(> 100 次)→ 分配 2x 快取空間
|
|
117
|
-
- 低頻查詢 → 更快驅逐
|
|
118
|
-
|
|
119
|
-
---
|
|
120
|
-
|
|
121
|
-
## 📋 任務拆解(8 個任務)
|
|
122
|
-
|
|
123
|
-
| ID | 任務名稱 | 複雜度 | 工時 | Agent | 依賴 | 可並行 |
|
|
124
|
-
|----|---------|--------|------|-------|------|--------|
|
|
125
|
-
| **TASK_134** | Layer 4 - 文件監控器 | Medium | 16h | backend | - | ✅ |
|
|
126
|
-
| **TASK_135** | Layer 4 - Git 變更監控器 | Medium | 12h | backend | - | ✅ |
|
|
127
|
-
| **TASK_136** | Layer 4 - 變更影響分析器 | Complex | 20h | backend | 134, 135 | ❌ |
|
|
128
|
-
| **TASK_137** | Layer 4 - 智能快取失效器 | Medium | 16h | backend | 136 | ❌ |
|
|
129
|
-
| **TASK_138** | 分佈式快取系統(Redis) | Complex | 24h | backend | - | ✅ |
|
|
130
|
-
| **TASK_139** | 智能快取預熱系統 | Medium | 16h | backend | 138 | ❌ |
|
|
131
|
-
| **TASK_140** | 自適應優化引擎 | Medium | 12h | backend | 136, 138 | ❌ |
|
|
132
|
-
| **TASK_141** | Phase 3 整合測試與文檔 | Medium | 20h | qa | 134-140 | ❌ |
|
|
133
|
-
|
|
134
|
-
**總工時**: 136 小時
|
|
135
|
-
**可並行任務**: 3 個(TASK_134, TASK_135, TASK_138)
|
|
136
|
-
**預計完成時間**: 4 週
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
## 🔀 依賴關係圖
|
|
141
|
-
|
|
142
|
-
```
|
|
143
|
-
並行開始(Week 1):
|
|
144
|
-
TASK_134 (16h) ────┐
|
|
145
|
-
├──> TASK_136 (20h) ──> TASK_137 (16h) ──┐
|
|
146
|
-
TASK_135 (12h) ────┘ │
|
|
147
|
-
│
|
|
148
|
-
TASK_138 (24h) ──> TASK_139 (16h) ─────────────────────────┼──> TASK_141 (20h)
|
|
149
|
-
│ │
|
|
150
|
-
└──> TASK_140 (12h) ─────────────────────┘
|
|
151
|
-
|
|
152
|
-
Week 1: TASK_134, TASK_135, TASK_138 (並行)
|
|
153
|
-
Week 2: TASK_136, TASK_139 (並行)
|
|
154
|
-
Week 3: TASK_137, TASK_140 (並行)
|
|
155
|
-
Week 4: TASK_141 (整合測試)
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
---
|
|
159
|
-
|
|
160
|
-
## 📊 性能目標與驗收標準
|
|
161
|
-
|
|
162
|
-
### 性能目標
|
|
163
|
-
|
|
164
|
-
| 指標 | Phase 2 | Phase 3 目標 | 改善幅度 |
|
|
165
|
-
|------|---------|-------------|---------|
|
|
166
|
-
| 快取容量 | 100 項 | 10,000+ 項 | +100x |
|
|
167
|
-
| 快取命中率 | 87.5% | 90%+ | +2.5% |
|
|
168
|
-
| 首次查詢延遲 | 1.5s | 0.6s | -60% |
|
|
169
|
-
| 變更追蹤延遲 | N/A | < 500ms | NEW |
|
|
170
|
-
| 快取失效準確率 | N/A | > 95% | NEW |
|
|
171
|
-
| 預熱完成時間 | N/A | < 5s | NEW |
|
|
172
|
-
| 整體性能提升 | - | > 20% | +20% |
|
|
173
|
-
|
|
174
|
-
### 驗收標準(TASK_141)
|
|
175
|
-
|
|
176
|
-
**必須達成**:
|
|
177
|
-
- ✅ 所有 E2E 測試通過
|
|
178
|
-
- ✅ Layer 4 追蹤延遲 < 500ms
|
|
179
|
-
- ✅ 分佈式快取命中率 > 80%
|
|
180
|
-
- ✅ 預熱首次命中率 > 60%
|
|
181
|
-
- ✅ 自適應 TTL 效果驗證
|
|
182
|
-
- ✅ 測試覆蓋率 > 85%
|
|
183
|
-
|
|
184
|
-
**期望達成**:
|
|
185
|
-
- 🎯 整體性能提升 > 20%(相比 Phase 2)
|
|
186
|
-
- 🎯 Redis 連接失敗時優雅降級
|
|
187
|
-
- 🎯 並發場景(10+ 用戶)穩定性
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
## 📦 已交付成果
|
|
192
|
-
|
|
193
|
-
### 1. 任務定義文件(8 個)
|
|
194
|
-
- ✅ `TASK_134_cortex_v2_phase3_file_watcher.yaml`
|
|
195
|
-
- ✅ `TASK_135_cortex_v2_phase3_git_monitor.yaml`
|
|
196
|
-
- ✅ `TASK_136_cortex_v2_phase3_change_analyzer.yaml`
|
|
197
|
-
- ✅ `TASK_137_cortex_v2_phase3_cache_invalidator.yaml`
|
|
198
|
-
- ✅ `TASK_138_cortex_v2_phase3_distributed_cache.yaml`
|
|
199
|
-
- ✅ `TASK_139_cortex_v2_phase3_cache_prewarming.yaml`
|
|
200
|
-
- ✅ `TASK_140_cortex_v2_phase3_adaptive_optimizer.yaml`
|
|
201
|
-
- ✅ `TASK_141_cortex_v2_phase3_integration_testing.yaml`
|
|
202
|
-
|
|
203
|
-
### 2. 架構設計文檔
|
|
204
|
-
- ✅ `kenaz-cortex/docs/V2_PHASE3_ARCHITECTURE.md` (完整架構設計)
|
|
205
|
-
|
|
206
|
-
### 3. Pipeline 更新
|
|
207
|
-
- ✅ `dev/pipeline/TASK_QUEUE.json` (新增 8 個任務)
|
|
208
|
-
- pending: 5 → 13 (+8)
|
|
209
|
-
- total: 30 → 38 (+8)
|
|
210
|
-
|
|
211
|
-
### 4. Git Commit
|
|
212
|
-
- ✅ Commit Hash: `c795b53`
|
|
213
|
-
- ✅ Commit Message: "[Phase 3] Kenaz Cortex V2 架構設計完成 🏗️"
|
|
214
|
-
|
|
215
|
-
---
|
|
216
|
-
|
|
217
|
-
## 🚀 啟動方式
|
|
218
|
-
|
|
219
|
-
### 方式一:並行執行(推薦,最快)
|
|
220
|
-
```bash
|
|
221
|
-
# 同時啟動 3 個獨立任務(Week 1)
|
|
222
|
-
/dev 並行 TASK_134 TASK_135 TASK_138
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
**預期結果**:
|
|
226
|
-
- 3 個 Agent 同時執行
|
|
227
|
-
- Week 1 完成 52 小時工作量
|
|
228
|
-
- 實際耗時 ~24 小時(最長任務時間)
|
|
229
|
-
|
|
230
|
-
### 方式二:單任務執行(順序)
|
|
231
|
-
```bash
|
|
232
|
-
# 逐個執行
|
|
233
|
-
/dev TASK_134 # 16h
|
|
234
|
-
/dev TASK_135 # 12h
|
|
235
|
-
/dev TASK_138 # 24h
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
### 方式三:手動分配(細粒度控制)
|
|
239
|
-
```bash
|
|
240
|
-
# 調用特定 Agent
|
|
241
|
-
/後端 TASK_134
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
---
|
|
245
|
-
|
|
246
|
-
## 📚 相關文檔
|
|
247
|
-
|
|
248
|
-
| 文檔 | 路徑 | 用途 |
|
|
249
|
-
|------|------|------|
|
|
250
|
-
| **Phase 3 架構設計** | `kenaz-cortex/docs/V2_PHASE3_ARCHITECTURE.md` | 完整技術設計 |
|
|
251
|
-
| **Phase 2 完成報告** | `kenaz-cortex/docs/V2_PHASE2_COMPLETE.md` | 當前狀態基準 |
|
|
252
|
-
| **系統架構** | `kenaz-cortex/docs/ARCHITECTURE.md` | 整體架構 |
|
|
253
|
-
| **Task Queue** | `dev/pipeline/TASK_QUEUE.json` | 任務佇列 |
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
## 🔍 風險與緩解
|
|
258
|
-
|
|
259
|
-
| 風險 | 影響 | 緩解策略 | 優先級 |
|
|
260
|
-
|------|------|---------|--------|
|
|
261
|
-
| **Redis 依賴** | 無 Redis 無法使用 L2 快取 | 優雅降級,只使用 L1 | P1 |
|
|
262
|
-
| **文件監控性能** | 大型專案監控成本高 | 輪詢模式 + 白名單過濾 | P2 |
|
|
263
|
-
| **依賴圖構建** | 初始構建耗時長 | 異步構建 + 增量更新 | P2 |
|
|
264
|
-
| **快取一致性** | 分佈式環境快取不一致 | Layer 4 自動失效機制 | P1 |
|
|
265
|
-
|
|
266
|
-
---
|
|
267
|
-
|
|
268
|
-
## 📈 Phase 回顧(完整旅程)
|
|
269
|
-
|
|
270
|
-
### Phase 1: 四層架構基礎(✅ 已完成)
|
|
271
|
-
- Layer 1: Rule-First(規則優先)
|
|
272
|
-
- Layer 2: Architecture(架構感知)
|
|
273
|
-
- 配置系統(Pydantic + YAML)
|
|
274
|
-
- 測試覆蓋率 90%+
|
|
275
|
-
|
|
276
|
-
**成果**: 建立了混合檢索的基礎架構
|
|
277
|
-
|
|
278
|
-
---
|
|
279
|
-
|
|
280
|
-
### Phase 2: 智能檢索增強(✅ 已完成)
|
|
281
|
-
- Layer 3: Smart Retrieval(RAG + 依賴擴展 + 相似檢索)
|
|
282
|
-
- LRU 快取機制(100 項)
|
|
283
|
-
- 異步處理(加速 75%)
|
|
284
|
-
- 性能優化(響應時間 -57%,記憶體 -40%)
|
|
285
|
-
|
|
286
|
-
**成果**: 實現了智能檢索和性能優化
|
|
287
|
-
|
|
288
|
-
---
|
|
289
|
-
|
|
290
|
-
### Phase 3: 生產就緒與智能優化(📐 規劃完成)
|
|
291
|
-
- Layer 4: Dynamic Tracking(實時追蹤)
|
|
292
|
-
- 分佈式快取(L1 + L2)
|
|
293
|
-
- 智能預熱(首次命中率 60%+)
|
|
294
|
-
- 自適應優化(動態 TTL)
|
|
295
|
-
|
|
296
|
-
**目標**: 實現生產級別的動態智能系統
|
|
297
|
-
|
|
298
|
-
---
|
|
299
|
-
|
|
300
|
-
## ✅ 下一步行動
|
|
301
|
-
|
|
302
|
-
### 立即行動(用戶確認後)
|
|
303
|
-
1. **選擇啟動方式**:
|
|
304
|
-
- 推薦:並行執行 3 個任務(最快)
|
|
305
|
-
- 或:逐個執行(更穩定)
|
|
306
|
-
|
|
307
|
-
2. **預估時間軸**:
|
|
308
|
-
- Week 1: 並行 3 任務(TASK_134, 135, 138)
|
|
309
|
-
- Week 2: 並行 2 任務(TASK_136, 139)
|
|
310
|
-
- Week 3: 並行 2 任務(TASK_137, 140)
|
|
311
|
-
- Week 4: 整合測試(TASK_141)
|
|
312
|
-
|
|
313
|
-
3. **資源需求**:
|
|
314
|
-
- 3 個並行 Backend Agent(Week 1)
|
|
315
|
-
- 1 個 QA Agent(Week 4)
|
|
316
|
-
- Redis 環境(本地或遠端)
|
|
317
|
-
|
|
318
|
-
---
|
|
319
|
-
|
|
320
|
-
## 🎯 成功定義
|
|
321
|
-
|
|
322
|
-
**Phase 3 成功 = 當所有指標達成時**:
|
|
323
|
-
- ✅ 8/8 任務完成
|
|
324
|
-
- ✅ 快取容量提升 100x
|
|
325
|
-
- ✅ 首次查詢延遲減少 60%
|
|
326
|
-
- ✅ 變更追蹤 < 500ms
|
|
327
|
-
- ✅ 快取失效準確率 > 95%
|
|
328
|
-
- ✅ 整體性能提升 > 20%
|
|
329
|
-
- ✅ 測試覆蓋率 > 85%
|
|
330
|
-
|
|
331
|
-
**當這些達成時,Kenaz Cortex V2 將成為生產就緒的動態智能系統!** 🚀
|
|
332
|
-
|
|
333
|
-
---
|
|
334
|
-
|
|
335
|
-
**規劃者**: Architect Agent
|
|
336
|
-
**規劃時間**: 2026-02-07 06:30-07:00 (30 分鐘)
|
|
337
|
-
**文檔版本**: v1.0.0
|
|
338
|
-
**狀態**: ✅ READY FOR EXECUTION
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
# Pipeline Progress Tracking
|
|
2
|
-
|
|
3
|
-
## Last Update
|
|
4
|
-
- **Time**: 2026-02-24 00:00
|
|
5
|
-
- **Agent**: Product Manager Agent
|
|
6
|
-
- **Action**: 建立 3 個新任務 — Self-Enhancement 獨立化(TASK_248~250)
|
|
7
|
-
- **TASK_248**: Rust 後端:獨立 Self-Enhancement Service(整點定時 + Proposal 輸出)(P1, 6h)
|
|
8
|
-
- **TASK_249**: 前端:Self-Enhancement 獨立 Toggle Card (P1, 3h)
|
|
9
|
-
- **TASK_250**: 清理:解耦 Self-Enhancement 與排程器 (P2, 2h)
|
|
10
|
-
- 依賴關係: TASK_249 → TASK_248, TASK_250 → TASK_248
|
|
11
|
-
- 總預估工時: 11h
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Statistics
|
|
16
|
-
|
|
17
|
-
### Current Queue Status(舊系統 TASK_QUEUE.json)
|
|
18
|
-
```
|
|
19
|
-
Active Tasks: 0
|
|
20
|
-
Pending: 0 (0%)
|
|
21
|
-
In Progress: 0 (0%)
|
|
22
|
-
Completed: 8 (100%)
|
|
23
|
-
Blocked: 0 (0%)
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
### New System Status(新系統 .collaboration/tasks/)
|
|
27
|
-
```
|
|
28
|
-
Total: 15(最近批次)
|
|
29
|
-
Pending: 3 (TASK_248, TASK_249, TASK_250)
|
|
30
|
-
In Progress: 0
|
|
31
|
-
Completed: 12 (TASK_188~196, TASK_197~199)
|
|
32
|
-
Blocked: 0
|
|
33
|
-
Cancelled: 0
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Historical Record (from .memory/ + completed/)
|
|
37
|
-
```
|
|
38
|
-
Completed Tasks: 187+
|
|
39
|
-
Total Historical: 187+
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Overall Progress (累積制)
|
|
43
|
-
```
|
|
44
|
-
Total Tasks: 187+ (佇列 8 + 歷史 179+)
|
|
45
|
-
Completed: 187+ (100%)
|
|
46
|
-
Active: 0 (0%)
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
**說明**:統計採用**累積制**,TASK_QUEUE.json 只保留活躍任務,已完成任務封存於 `.memory/COMPLETED_TASKS.json` 和 `dev/pipeline/completed/`
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## Current Queue
|
|
54
|
-
|
|
55
|
-
**佇列狀態**: 3 個待處理任務
|
|
56
|
-
|
|
57
|
-
### Pending Tasks (Self-Enhancement 獨立化)
|
|
58
|
-
|
|
59
|
-
| Task ID | Title | Agent | Priority | Est. Hours | Dependencies |
|
|
60
|
-
|---------|-------|-------|----------|------------|--------------|
|
|
61
|
-
| TASK_248 | 獨立 Self-Enhancement Service(整點定時 + Proposal 輸出)| backend | P1 | 6h | - |
|
|
62
|
-
| TASK_249 | Self-Enhancement 獨立 Toggle Card | frontend | P1 | 3h | TASK_248 |
|
|
63
|
-
| TASK_250 | 解耦 Self-Enhancement 與排程器 | frontend | P2 | 2h | TASK_248 |
|
|
64
|
-
|
|
65
|
-
**Total Pending**: 3 任務 (約 11h)
|
|
66
|
-
|
|
67
|
-
### Recently Completed (F-020: Platform Adapter 架構統一)
|
|
68
|
-
|
|
69
|
-
| Task ID | Title | Agent | Priority | Completed At |
|
|
70
|
-
|---------|-------|-------|----------|--------------|
|
|
71
|
-
| TASK_180 | 移除 Quick Actions 的 Single Agent Panel | frontend | P2 | 2026-02-15 01:42 |
|
|
72
|
-
| TASK_181 | 修復 PTY Server UTF-8 多字節字元截斷問題 | frontend | P1 | 2026-02-14 16:44 |
|
|
73
|
-
| TASK_182 | 修復 Scheduler Active Agents 殘留顯示問題 | frontend | P1 | 2026-02-15 01:30 |
|
|
74
|
-
| TASK_183 | 建立 PlatformAdapter 介面 + TauriAdapter + WebAdapter | frontend | P0 | 2026-02-15 12:00 |
|
|
75
|
-
| TASK_184 | 重構 api.ts 改用 PlatformAdapter | frontend | P1 | 2026-02-15 12:00 |
|
|
76
|
-
| TASK_185 | 合併 Mobile 組件到主佈局(響應式統一) | frontend | P1 | 2026-02-15 12:00 |
|
|
77
|
-
| TASK_186 | 移除 Electron 相關代碼 + 清理 | frontend | P2 | 2026-02-15 12:00 |
|
|
78
|
-
| TASK_187 | QA 測試 Platform Adapter 架構統一 | frontend | P1 | 2026-02-15 12:00 |
|
|
79
|
-
|
|
80
|
-
**Total Completed**: 8 任務 (約 8.5h)
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## Recent Activity
|
|
85
|
-
|
|
86
|
-
| Date | Event | Description |
|
|
87
|
-
|------|-------|-------------|
|
|
88
|
-
| 2026-02-24 00:00 | 📋 Tasks Created | **Self-Enhancement 獨立化!** 3 個任務(TASK_248~250, 11h)- 從排程器拆出為獨立服務,整點定時 + Proposal 輸出 |
|
|
89
|
-
| 2026-02-19 10:35 | ✅ Task Completed | **TASK_199** 系統文檔更新:Formation 調度系統(整合新任務系統,loader.js 三層 fallback)(實際 0.3h)|
|
|
90
|
-
| 2026-02-19 10:35 | ✅ Task Completed | **TASK_197** 系統文檔更新:.collaboration 新任務系統(驗證完整性)(實際 0.3h)|
|
|
91
|
-
| 2026-02-19 10:30 | ✅ Task Completed | **TASK_198** 系統文檔更新:dev/pipeline 舊任務系統(標記為 Legacy,引導遷移)(實際 0.3h)|
|
|
92
|
-
| 2026-02-19 00:15 | ✅ Task Completed | **TASK_192** 系統文檔:Formation 多陣型調度系統(實際 0.3h)|
|
|
93
|
-
| 2026-02-19 00:10 | ✅ Task Completed | **TASK_195** 系統文檔:dev/pipeline 舊任務系統(實際 0.3h)|
|
|
94
|
-
| 2026-02-18 23:50 | ✅ Task Completed | **TASK_194** 系統文檔:.collaboration 新任務系統(實際 0.3h)|
|
|
95
|
-
| 2026-02-15 12:00 | 📋 Tasks Created | **F-020!** Platform Adapter 架構統一(4 個任務,20h)- 以 Tauri 為主版本,消除 if/else 分支 |
|
|
96
|
-
| 2026-02-15 01:00 | 🐛 Bug Reported | **TASK_182** Scheduler Active Agents 殘留問題(Race Condition)|
|
|
97
|
-
| 2026-02-15 00:00 | 📋 Tasks Created | **TASK_180 + TASK_181** UI 優化 + PTY UTF-8 修復(2 個任務,3h)|
|
|
98
|
-
| 2026-02-13 12:00 | 📋 Tasks Created | **F-019!** Kenaz Cortex Panel 優化(5 個任務,18h)- 移除 RAG Status + 修復 404 + Memory 切換 + QA |
|
|
99
|
-
| 2026-02-12 22:10 | 📋 Tasks Created | **F-018 Phase 2!** Cortex RAG 品質優化(5 個任務,20h)- YAML/MD Chunker + 多語言 Embedding + 噪音過濾 |
|
|
100
|
-
| 2026-02-12 21:30 | 🧹 Queue Cleanup | 精簡佇列,只保留 F-018 的 6 個任務,其餘移至 completed/ |
|
|
101
|
-
| 2026-02-12 00:00 | 📋 Tasks Created | **F-018 Phase 1 建立!** 結構化 RAG 精準度優化(6 個任務,30h)- Symbol Index + Module Summary + Map-Reduce |
|
|
102
|
-
| 2026-02-10 00:12 | 🔀 Task Split | TASK_146 拆分為 3 階段,TASK_151 已建立(Phase 1) |
|
|
103
|
-
| 2026-02-09 23:28 | 📦 Archive | 33 個已完成任務封存到 .memory/ |
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Notes
|
|
108
|
-
|
|
109
|
-
- **Archive Location**: `.memory/COMPLETED_TASKS.json` 包含所有已完成任務的元數據
|
|
110
|
-
- **Task Files**:
|
|
111
|
-
- Pending: `dev/pipeline/tasks/`
|
|
112
|
-
- Completed: `dev/pipeline/completed/`
|
|
113
|
-
- **Backups**: `dev/pipeline/backups/` 保留任務文件備份
|