kenaz 0.3.22 → 0.3.24
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 +11 -29
- package/core/.claude/hooks/worktree-remove.js +12 -38
- 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/dispatch-detail/worktree-subagent-mode.md +6 -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/.formation/tools/utils.js +5 -5
- package/core/.formation/tools/worktree-reclaim.js +73 -2
- package/core/.formation/tools/worktree-reclaim.test.js +113 -0
- 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 +6 -2
- 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 +56 -30
- 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 +13 -12
- package/core/dev/scripts/kenaz-session.js +3 -3
- package/core/dev/scripts/peer-identity-e2e.js +6 -4
- 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 +112 -0
- package/core/plugins/kenaz/guidance.md +1 -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 +58 -4
- package/core/plugins/kenaz/hooks/worktree-guard.js +121 -0
- package/core/plugins/kenaz/hooks/worktree-guard.test.js +75 -0
- package/core/plugins/kenaz/scripts/kenaz.test.js +72 -5
- package/core/plugins/kenaz-peer/hooks/register.test.ts +14 -2
- package/core/plugins/kenaz-peer/hooks/register.ts +6 -1
- package/lib/cli.js +9 -5
- package/package.json +6 -6
- package/vendor/install-kenaz-cli.js +56 -30
- 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,44 +0,0 @@
|
|
|
1
|
-
# Freya 下游 BUG 回饋處理
|
|
2
|
-
|
|
3
|
-
回饋日期:2026-09-19。調查日期:2026-09-20(Asia/Taipei)。本文件記錄開發工作樹的驗證,不代表已發布安裝版或 Freya 現場已恢復。
|
|
4
|
-
|
|
5
|
-
任務卡依本 session 指示放在 quotation;實際修改為 KenazAI core,不修改 quotation 應用程式。Jev 因供應商 waitlist 暫不進行實測。
|
|
6
|
-
|
|
7
|
-
## 原始回饋與查證
|
|
8
|
-
|
|
9
|
-
| 回饋 | 當前程式證據 | 處理 |
|
|
10
|
-
| --- | --- | --- |
|
|
11
|
-
| [Synapse wedge 與 full reindex 逾時](https://drive.google.com/file/d/1ftZatRH5PeYvhJIgtpiZ8_pcXjORJuOP/view) | connection::with_connection 每次建立獨立寫入 connection,沒有同 DB writer 排他;index::save_failed_state 對所有錯誤累加失敗;MCP tool_synapse_index 等待完整 spawn_blocking。 | TASK_29 處理寫入競爭與可查詢索引工作;TASK_31 處理 post-complete 失敗。尚Rust 驗證通過,詳見下方。 |
|
|
12
|
-
| [stale stream lease 累積](https://drive.google.com/file/d/1TAFYQ2OdAdgarERj6p7LOKCWKdBnQcoB/view) | 已有批次 reap(24h)及定點 reap(8h liveness),但 register 不自動清理。boot 已支援明確 conversation-id 或 transcript basename。 | TASK_28 在 register 保守清理超過 24h 的 stale lease;保留當前、恢復中、live、時間不明的 lease。缺真實 conversation-id 的警告保留。 |
|
|
13
|
-
| [dispatch subagent 契約不一致](https://drive.google.com/file/d/1pzHa-KrWvIeKhDIg6d8oy7bgDHk31ph9/view) | elixir 指令漏 --skill;promptText 與 isolation 刻意放頂層,不能整包當 Agent 工具參數。model translation 已走 stderr,但 resource lock 訊息仍走 stdout,ignore helper 不在 stderr 保護區。 | TASK_28 補齊 stdout 純 JSON;TASK_30 修指令及欄位解讀,保留既有 isolation 和 modelTranslation 契約。 |
|
|
14
|
-
| [task-api create 旗標與品質門檻](https://drive.google.com/file/d/1A2E_P3YHQDx3cXqxeLYzxPc3IjNKvTXS/view) | help 仍暗示單旗標接受多值;實際要重複旗標;--args-file 已實作。 | TASK_28 修 help,明列 requirements/acceptance/technical notes 最少 3/3/2 條及 JSON 檔案用法,未更換 parser。 |
|
|
15
|
-
|
|
16
|
-
## 重要判讀
|
|
17
|
-
|
|
18
|
-
TASK_1959 已在目前 HEAD(45b0136da)合併:server 收到 inscribe 後可將受阻寫入保存在 spool,且 busy gate 改為 per-project。這不代表交易衝突根因已修,也不能保護尚未送達 server 的 HTTP 請求。
|
|
19
|
-
|
|
20
|
-
13 次 socket hang up 不能直接稱為 13 次重試。cognitive.js 的 triggerPassiveRuneExtraction 對 changed files(上限 20)逐檔 fire-and-forget;目前回應 body 直接丟棄。milestone.js 則把預篩 parse/error/timeout 與正常空集合都轉成 [],讓失敗也觸發 unfiltered generalize。TASK_31 分開處理這兩種狀態。
|
|
21
|
-
|
|
22
|
-
進一步查證顯示 /temporal/replay-episodes 沒有在 temporal.rs 註冊,GeneralizeRequest 也沒有接收 preFilterClusters。generalize_inner 仍查舊的 project/.synapse 圖位置,查詢失敗轉為空結果;目前已有 SQLite get_episode_symbol_lists 可取相同用途的 episode-symbol 資料。TASK_32 負責補路由、傳遞失敗及讓 filter 實際作用,不只修改 client 的錯誤訊息。
|
|
23
|
-
|
|
24
|
-
stream lease 不以「程序 PID 仍存在」作唯一存活證據;原本 8h heartbeat 規則保留。自动回收採既有 24h 門檻並在刪除前重讀。此重讀不是跨程序原子 compare-and-delete,仍存在極小讀刪間隙;未宣稱完全消除競爭。沒有在本次測試刪除真實 lease,也不在缺 identity 時臆造 conversation-id 或跳過安全註冊。
|
|
25
|
-
|
|
26
|
-
dispatchMode 缺省仍維持既有 formation 相容行為,不強制改成 auto。回饋只證明下游檔案缺鍵,不能據此覆寫使用者路由策略。
|
|
27
|
-
|
|
28
|
-
## 驗證紀錄
|
|
29
|
-
|
|
30
|
-
TASK_29 的新 MCP 契約:synapse_index 預設最多等待 1000ms,可用 wait_ms 0–5000 調整;快速完成保留既有 status=ok 與統計欄位,長工作回 status=accepted 與 job_id。以相同 projectPath 呼叫 synapse_status 並帶 job_id 可查 running/succeeded/failed、進度與結果,不需要開啟圖資料庫。相同專案與選項的工作尚在執行時,重複提交會回現有工作;不同選項須先確認既有工作結果。工作歷史只保留本程序最近 64 件,Dashboard 重啟後不保留,不能宣稱為持久化 job queue。
|
|
31
|
-
|
|
32
|
-
TASK_32 在開啟 memory.db 前要求專案目錄與資料庫檔案已存在,錯誤不建立空資料庫來假裝成功。既有 MemoryDb::open 仍可能執行 schema/startup 維護,這不是新增的唯讀 connection。generalize 改讀 SQLite episode symbols,並依每個 cluster 的 episode-symbol 配對篩選;省略 preFilterClusters 保留手動無篩選行為,明確傳 [] 則選不到任何資料。JS 健康空 replay 仍省略此欄位,保留既有空集合行為。
|
|
33
|
-
|
|
34
|
-
- TASK_28 新增隔離測試:6/6;主代理獨立重跑通過。
|
|
35
|
-
- 主代理另獨立重跑 subagent-bifrost-guard 41、boot-lease-reuse 7、m1-claim-gate 16、m1-hmap-convid 56,全部通過。合計 126 項 assertions/checks;其中四個舊套件各自彙總,並非 node:test 顯示 126 個 test cases。
|
|
36
|
-
- elixir.yaml 經 js-yaml 解析成功,--skill=do 與 promptText 指引檢查通過。
|
|
37
|
-
- TASK_31:主代理獨立執行 bounded-http.test.js,16/16 通過。批次逐筆送出、總期限 10 秒、回應上限 1MB;首次失敗停止,單一摘要區分 successful/spooled/failed/skipped。HTTP 200 不等於写入成功。預篩失敗回 null 並跳過 generalize,健康空集合 [] 保留原有行為。
|
|
38
|
-
- TASK_31 範圍限 passive extraction 與 milestone;主 post-complete.js 的其他 inline fan-out 未改。主函式仍同步、背景請求保留既有生命週期;強制 process.exit 可截斷。未送出的寫入沒有 durable client spool,回應遺失亦可能是完成狀態未知,不能宣稱資料零遺失。
|
|
39
|
-
- TASK_29 / TASK_32:Rust 編譯與連結成功。透過既有 dev/scripts/run-rust-tests.js 補上 Windows Common Controls manifest,以 CARGO_TARGET_DIR=C:/t/kenaz-verify 避開執行中 tauri dev 的 DLL 鎖;不修改正式 DLL 或系統設定。
|
|
40
|
-
- 主代理獨立執行測試程式:replay_ 8、writer_ 6、index_jobs_ 3、index_admission_precedes_destructive_rebuild 1、connection::tests 29、index::tests 50、memory::tests 61,全部通過。扣除重複的兩項 index 測試,共 156 項不重複 Rust 測試;JavaScript 共 142 項檢查。不是全庫測試,也不是安裝版現場驗收。
|
|
41
|
-
- 真實 Kuzu 暫存資料庫已重現第二個寫入交易遭拒,第一個 rollback 後第二個可成功;Windows 可能將原始文字包成 native exception,正式分類器仍不將所有原生例外視為暫時競爭。排隊、其他資料庫與讀取的獨立性、錯誤釋放、工作去重與失敗查詢、實際 HTTP router、非空 SQLite 資料的篩選效果均有通過測試。
|
|
42
|
-
- 後續項目:既有 release_project 保留 local Arc 至 close_db 返回,會使 idle release 等待 drain timeout;connection 套件此次耗時 34.76 秒。本次沒有修改該生命週期,應另行驗證並修復。全工作區 diff check 另發現 .synapse/turn_outcome_shadow.jsonl 有既有衝突標記;本次修改範圍的 diff check 通過,未改該狀態檔。
|
|
43
|
-
|
|
44
|
-
所有變更尚未 commit/merge、未打包或發布。Freya 的安裝版本、現場日誌與更新後重現結果尚未取得,因此不將現場 bug 標成已關閉。
|
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
# Global Memory Identity Consolidation (TASK_2050)
|
|
2
|
-
|
|
3
|
-
Phase 1 only: root cause, the writer fix, a dry-run-capable migration
|
|
4
|
-
function, and real numbers computed against a disposable copy of this
|
|
5
|
-
machine's `~/.kenaz/cortex/global_memory.db`. The migration's non-dry-run
|
|
6
|
-
path is implemented but **not executed** by this task and **not wired to
|
|
7
|
-
any caller**.
|
|
8
|
-
|
|
9
|
-
## Symptom
|
|
10
|
-
|
|
11
|
-
`global_runes.project_id` / `project_name` (read-only `GROUP BY` over the
|
|
12
|
-
live DB) showed the same repo registered under up to 8 different
|
|
13
|
-
identities. Top rows for this repo alone:
|
|
14
|
-
|
|
15
|
-
| project_id | project_name | rune rows |
|
|
16
|
-
|---|---|---|
|
|
17
|
-
| `proj_1776613204237_0p34i5y` | KenazAI | 7320 |
|
|
18
|
-
| `unregistered_C___Users__user__Documents__GitHub__KenazAI` | KenazAI | 6431 |
|
|
19
|
-
| `default` | Kenaz | 6378 |
|
|
20
|
-
| `unregistered_C__Users_user_Documents_GitHub_KenazAI` | KenazAI | 3430 |
|
|
21
|
-
| `proj_1775750941226_3f6dcn8` | KenazAI | 3407 |
|
|
22
|
-
| `unregistered_..._.formation_worktrees_task_task_1065` | task_task_1065 | 2194 |
|
|
23
|
-
| `unregistered_..._.formation_worktrees_task_task_962` | task_task_962 | 2012 |
|
|
24
|
-
| `proj_1774545608638_gyvs5lz` | KenazAI | 1998 |
|
|
25
|
-
| `unregistered__c_Users_user_Documents_GitHub_KenazAI` | KenazAI | 6 |
|
|
26
|
-
| `unregistered_..._KenazAI_dashboard` | dashboard | 5 |
|
|
27
|
-
|
|
28
|
-
CognitiveLabs (a different, smaller sub-project) carried the same pattern
|
|
29
|
-
in miniature: `proj_1775339532602_0kcmwhf` (290 rows) and
|
|
30
|
-
`unregistered_C__Users_user_Documents_GitHub_CognitiveLabs` (6 rows).
|
|
31
|
-
|
|
32
|
-
## Root cause
|
|
33
|
-
|
|
34
|
-
Three independent bugs compound into this, all in
|
|
35
|
-
`dashboard/src-tauri/src/features/cortex/`:
|
|
36
|
-
|
|
37
|
-
**1. The `unregistered_*` id was minted from the raw path string, not a
|
|
38
|
-
normalized one.**
|
|
39
|
-
`sync.rs::find_project_by_path` (pre-TASK_2050, the fallback branch at the
|
|
40
|
-
end of the function) did:
|
|
41
|
-
|
|
42
|
-
```rust
|
|
43
|
-
id: format!("unregistered_{}", path_str.replace(['/', '\\', ':'], "_"))
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
`path_str` is `project_path.to_string_lossy()` — the caller's path,
|
|
47
|
-
verbatim. This has no case-folding and no slash-direction normalization,
|
|
48
|
-
so the SAME filesystem path produces a DIFFERENT id depending on:
|
|
49
|
-
- slash direction (`C:/Users/...` vs `C:\Users\...`) — both map to
|
|
50
|
-
underscores, but a path that had already been through one JSON
|
|
51
|
-
encode/decode round-trip without un-escaping (`\\` as two literal
|
|
52
|
-
backslash characters) produces DOUBLE underscores where a clean path
|
|
53
|
-
produces one — this is the `unregistered_C___Users__...` vs
|
|
54
|
-
`unregistered_C__Users_...` split above.
|
|
55
|
-
- drive-letter case (`C:` vs `c:`) — `unregistered__c_Users_...` (note the
|
|
56
|
-
leading underscore from the lone lowercase `c` before the colon-turned-
|
|
57
|
-
underscore).
|
|
58
|
-
|
|
59
|
-
**2. No notion of "repo root."**
|
|
60
|
-
Every subdirectory or worktree ever passed as `project_path` minted its
|
|
61
|
-
OWN `unregistered_<path>` id instead of resolving to the repo it lives
|
|
62
|
-
under. This machine's history shows three distinct worktree/subdir shapes,
|
|
63
|
-
none collapsed:
|
|
64
|
-
- `<repo>/.formation/worktrees/<name>` (Formation dispatch worktrees)
|
|
65
|
-
- `<repo>/.claude_worktrees/<name>` (Claude Code worktree agents)
|
|
66
|
-
- `<parent>/.kenaz-worktrees/<repo-name>/<wt-name>` (sibling-style
|
|
67
|
-
worktrees — **this is this very session's own working directory**:
|
|
68
|
-
`C:/Users/user/Documents/GitHub/.kenaz-worktrees/KenazAI/wt-0722c428-36164`)
|
|
69
|
-
- a bare subdirectory (`.../KenazAI/dashboard`)
|
|
70
|
-
|
|
71
|
-
Each of these synced independently at some point and each minted its own
|
|
72
|
-
`unregistered_*` id.
|
|
73
|
-
|
|
74
|
-
**3. `registry.rs`/`projects.json` never deduped re-registrations by
|
|
75
|
-
path.** `proj_1774545608638_gyvs5lz` and `proj_1775750941226_3f6dcn8` (both
|
|
76
|
-
labeled "KenazAI" in `global_runes`, 1998 and 3407 rows) are **not** in the
|
|
77
|
-
current `~/.kenaz/projects.json` at all — they're leftovers from earlier
|
|
78
|
-
registration cycles that got deregistered and re-registered under a fresh
|
|
79
|
-
`proj_*` id each time (the CURRENT registration is
|
|
80
|
-
`proj_1776613204237_0p34i5y`). `registry.rs::find_project_path_by_id`
|
|
81
|
-
(`dashboard/src-tauri/src/features/cortex/registry.rs:108`) simply has no
|
|
82
|
-
entry for a stale id and returns `None` — nothing before TASK_2050
|
|
83
|
-
resolved that back to "this is still the same repo."
|
|
84
|
-
|
|
85
|
-
**Compounding factor: `default` and a `proj_*` id can point at the exact
|
|
86
|
-
same real path without comparing equal as strings.** `projects.json`'s
|
|
87
|
-
`default` entry (the core project, fixed id) and, on this machine, the
|
|
88
|
-
KenazAI project's own `proj_1776613204237_0p34i5y` entry both have
|
|
89
|
-
`"path": "__kenaz_core__"` — a virtual token resolved at read time by
|
|
90
|
-
`virtual_path::resolve()` (`dashboard/src-tauri/src/common/virtual_path.rs:16`)
|
|
91
|
-
using the `KENAZ_SOURCE_DIR` env var. Any code comparing raw id/path
|
|
92
|
-
strings (rather than resolving the token first) will never see these two
|
|
93
|
-
as the same repo — this is why the consolidation migration below resolves
|
|
94
|
-
`default` via the registry's actual core project path, not the literal
|
|
95
|
-
token (see "core token pitfall" note in `identity_consolidation.rs`).
|
|
96
|
-
|
|
97
|
-
## The fix (this task)
|
|
98
|
-
|
|
99
|
-
**Writer** — `sync.rs`:
|
|
100
|
-
- `canonical_repo_root(project_path: &Path) -> PathBuf` (new): collapses
|
|
101
|
-
all three worktree shapes above to their repo root, and any other
|
|
102
|
-
subdirectory to the nearest ancestor containing a `.git` entry (file or
|
|
103
|
-
directory — a git worktree's `.git` is a file).
|
|
104
|
-
- `find_project_by_path` now canonicalizes first, then looks up (or
|
|
105
|
-
mints) an identity for the canonical root via `hints::slug()` — the SAME
|
|
106
|
-
normalization TASK_2049's read-time self-echo exclusion
|
|
107
|
-
(`hints::is_same_repo`) already relies on — instead of a raw
|
|
108
|
-
char-replace. `hints::slug` was `pub(crate)`-exposed for this reuse.
|
|
109
|
-
- `registry.rs::find_project_by_canonical_path` (new): finds a registered
|
|
110
|
-
project by slug-normalized path match instead of exact/lowercased
|
|
111
|
-
string match, and when `projects.json` carries more than one entry for
|
|
112
|
-
the same path, deterministically prefers the core project, then the
|
|
113
|
-
lexicographically smallest id.
|
|
114
|
-
|
|
115
|
-
Going forward, every sync for the same repo — worktree, subdir, or a
|
|
116
|
-
differently-encoded path string — mints the SAME identity. Unit tests:
|
|
117
|
-
`sync.rs::task_2050_canonical_repo_root_tests::*` (9 tests covering all
|
|
118
|
-
three worktree shapes, the `.formation`-without-`worktrees` false-positive
|
|
119
|
-
guard, bare subdirs, the `.git`-file worktree form, and `hints::slug`
|
|
120
|
-
equivalence for the exact KenazAI/CognitiveLabs variant strings above).
|
|
121
|
-
|
|
122
|
-
**Migration** — new file
|
|
123
|
-
`dashboard/src-tauri/src/features/cortex/identity_consolidation.rs`:
|
|
124
|
-
- `cluster_identities()`: pure, resolver-injected clustering of every
|
|
125
|
-
`(project_id, project_name)` pair currently in `global_runes` into
|
|
126
|
-
canonical repo clusters, using the same slug-prefix logic as
|
|
127
|
-
`hints::is_same_repo` generalized from "is this the current project" to
|
|
128
|
-
"do these two identities share a repo root at all." Canonical-id
|
|
129
|
-
priority: a CURRENTLY-registered `proj_*` id > `default` > any `proj_*`
|
|
130
|
-
id ever seen (even stale) > shortest/lexicographically-smallest
|
|
131
|
-
remaining id.
|
|
132
|
-
- `find_duplicate_rune_ids()`: within a cluster, groups rows by
|
|
133
|
-
`(symbol_stable_id, whitespace-normalized content)`; every row past the
|
|
134
|
-
first (kept by highest `confidence`, tie-broken by most recent
|
|
135
|
-
`created_at`) is a duplicate.
|
|
136
|
-
- `run_consolidation(conn, dry_run, ...)`: dry-run reads and reports only;
|
|
137
|
-
non-dry-run wraps identity rewrite (`global_runes` + `global_sigils` +
|
|
138
|
-
`sync_state`) + duplicate deletion + an FTS5 rebuild
|
|
139
|
-
(`INSERT INTO global_runes_fts(global_runes_fts) VALUES('rebuild')`) in
|
|
140
|
-
one `unchecked_transaction()` — nothing commits if any step errors.
|
|
141
|
-
Idempotent: a second call after a successful non-dry-run finds zero
|
|
142
|
-
clusters with pending merges/duplicates.
|
|
143
|
-
- `consolidate_global_memory(db_path, dry_run)`: the real-world entry
|
|
144
|
-
point — non-dry-run first does `PRAGMA wal_checkpoint(FULL)` then
|
|
145
|
-
`std::fs::copy`s the DB to `<path>.bak_<unix_ts>` before touching
|
|
146
|
-
anything. **Not called from anywhere else in the codebase** — Phase 1
|
|
147
|
-
scope is "implement, do not wire up or run non-dry-run."
|
|
148
|
-
|
|
149
|
-
Scope note: the migration rewrites the `project_id`/`project_name`
|
|
150
|
-
COLUMNS only. The `id`/`original_id` composite key text
|
|
151
|
-
(`{project_id}::{original_id}`, minted at sync time) is left as-is —
|
|
152
|
-
rewriting it would also require updating `alaya_exported.original_id`
|
|
153
|
-
(which references the old composite) and is deferred past Phase 1. This
|
|
154
|
-
is safe: `id` stays a unique, stable primary key either way, and every
|
|
155
|
-
reader keys off the `project_id` COLUMN, not a re-derivation from `id`.
|
|
156
|
-
|
|
157
|
-
Unit/fixture tests: `identity_consolidation.rs::task_2050_cluster_tests::*`
|
|
158
|
-
(9 tests, pure `cluster_identities()` — KenazAI's 10 variants into one
|
|
159
|
-
cluster, the stale-vs-registered `proj_*` tie-break, CognitiveLabs
|
|
160
|
-
clustering while staying distinct from KenazAI, stale-id-by-name
|
|
161
|
-
fallback, unrelated projects staying separate, `default` merging via the
|
|
162
|
-
resolved core path, the "kenazai" vs "kenazai2" boundary guard, and
|
|
163
|
-
registered-name overriding a drifted recorded name) and
|
|
164
|
-
`identity_consolidation.rs::task_2050_run_consolidation_tests::*` (5
|
|
165
|
-
tests against a real `GlobalMemoryDb::open_at` fixture — dry-run reports
|
|
166
|
-
without mutating, non-dry-run rewrites + dedups inside one transaction,
|
|
167
|
-
idempotent second run, empty DB).
|
|
168
|
-
|
|
169
|
-
## Dry-run numbers (real, computed without cargo)
|
|
170
|
-
|
|
171
|
-
Per the worktree dispatch rules, this session cannot run `cargo build`/
|
|
172
|
-
`cargo test`, so `cluster_identities()` + `find_duplicate_rune_ids()` were
|
|
173
|
-
re-implemented in a read-only Node.js script
|
|
174
|
-
(`node:sqlite`, `DatabaseSync(..., { readOnly: true })`) and run against a
|
|
175
|
-
**disposable copy** of the real DB
|
|
176
|
-
(`cp ~/.kenaz/cortex/global_memory.db <temp>/task_2050_global_memory_copy.db`,
|
|
177
|
-
never the live file — rule 7). The script mirrors `slug()` and the
|
|
178
|
-
clustering/dedup algorithm field-for-field, and resolves the
|
|
179
|
-
`__kenaz_core__` virtual token to this machine's real KenazAI checkout
|
|
180
|
-
path (confirmed via `virtual_path.rs`'s own test fixture and the dominant
|
|
181
|
-
`unregistered_C__Users_user_Documents_GitHub_KenazAI*` identities in the
|
|
182
|
-
data) rather than comparing the literal token — this is the exact "core
|
|
183
|
-
token pitfall" noted above; an earlier draft of the script that compared
|
|
184
|
-
the literal token produced two separate KenazAI clusters instead of one,
|
|
185
|
-
which is how that pitfall was caught. Both the copy and the script were
|
|
186
|
-
deleted after use; nothing was written to the live DB.
|
|
187
|
-
|
|
188
|
-
| Canonical identity | Identities merged | Rows total | Rows rewritten | Duplicates removed |
|
|
189
|
-
|---|---|---|---|---|
|
|
190
|
-
| `proj_1776613204237_0p34i5y` (KenazAI) | 24 | 33,201 | 25,881 | 25,813 |
|
|
191
|
-
| `proj_1776272260652_95upqs6` (dear-cs) | 0 | 5,807 | 0 | 3,317 |
|
|
192
|
-
| `proj_1781780904403_spf1f5l` (jiayao) | 0 | 450 | 0 | 6 |
|
|
193
|
-
| `proj_1775339532602_0kcmwhf` (CognitiveLabs) | 1 | 296 | 6 | 6 |
|
|
194
|
-
| `proj_1786456211214_xlzb0sc` (quotation) | 3 | 43 | 4 | 0 |
|
|
195
|
-
| **Total** | **28** | — | **25,891** | **29,142** |
|
|
196
|
-
|
|
197
|
-
("Rows rewritten" is the pre-dedup row count of every non-canonical
|
|
198
|
-
identity — the UPDATE runs before duplicate DELETE, so a row that gets
|
|
199
|
-
deleted as a duplicate is still counted as rewritten first, matching what
|
|
200
|
-
`ClusterReport.rune_rows_rewritten` / `run_consolidation`'s non-dry-run
|
|
201
|
-
path actually does.)
|
|
202
|
-
|
|
203
|
-
The KenazAI duplicate count (25,813 of 33,201 rows, ~78%) is large but
|
|
204
|
-
plausible: most of the 24 merged identities are short-lived Formation/
|
|
205
|
-
Claude/kenaz worktrees, each of which synced a near-complete copy of the
|
|
206
|
-
main repo's rune set at the time it branched. dear-cs's 3,317 duplicates
|
|
207
|
-
under a SINGLE identity (no merge) show the same pattern can occur without
|
|
208
|
-
any identity split at all — repeated re-syncs re-inserting near-identical
|
|
209
|
-
content under fresh `original_id`s.
|
|
210
|
-
|
|
211
|
-
Other projects in the DB (esp32, trip, Alaya, analyze, KenazCEO, demo1,
|
|
212
|
-
SoundDrop, deardear_web, AgentSystem_demo, and a handful of one-off
|
|
213
|
-
`unregistered_*` rows from `/AppData/Local/Temp` test runs and one
|
|
214
|
-
literal `unregistered_.` from a caller that passed a relative `"."`
|
|
215
|
-
path) had zero identities to merge and zero duplicates — omitted from the
|
|
216
|
-
table above (a cluster is only reported when `identities_merged() > 0` or
|
|
217
|
-
it has pending duplicates, matching `run_consolidation`'s actual filter).
|
|
218
|
-
|
|
219
|
-
## Does the identity string leave this machine?
|
|
220
|
-
|
|
221
|
-
**`project_id` (the encoded-path identity string, e.g.
|
|
222
|
-
`unregistered_C__Users_user_Documents_GitHub_KenazAI`,
|
|
223
|
-
`proj_1776613204237_0p34i5y`) — no, never.** `project_name` (the human
|
|
224
|
-
label, e.g. `"KenazAI"`) — yes, already, today, unaffected by this task
|
|
225
|
-
either way.
|
|
226
|
-
|
|
227
|
-
Evidence: `dashboard/src-tauri/src/features/cortex/alaya/mod.rs:177-190`'s
|
|
228
|
-
`SeedRecord` (what actually gets exported/uploaded to the Alaya hub) has
|
|
229
|
-
fields `seed_type`, `content`, `source_symbol`, `confidence`,
|
|
230
|
-
`project_name`, `exported_at` — **there is no `project_id` field on this
|
|
231
|
-
struct at all**. Both construction sites
|
|
232
|
-
(`alaya/hub_client.rs:100-105`, file-based JSONL export, and
|
|
233
|
-
`alaya/hub_client.rs:601-608`, the async hub-upload path) set
|
|
234
|
-
`project_name: r.project_name.clone()` sourced from `global_runes`, and
|
|
235
|
-
neither references `project_id`. `upload_seeds_to_hub_blocking` /
|
|
236
|
-
`upload_seeds_async` (`hub_client.rs:253/313`) POST a
|
|
237
|
-
`Vec<SeedRecord>` (via `serde_json`) to `{hub.url}/api/v1/seeds/upload` —
|
|
238
|
-
whatever `SeedRecord` serializes is exactly what crosses the wire.
|
|
239
|
-
|
|
240
|
-
So this migration is purely local-machine bookkeeping as far as
|
|
241
|
-
`project_id` goes (it never left and still won't). `project_name` already
|
|
242
|
-
leaves today; after consolidation, rows that used to carry a
|
|
243
|
-
worktree/subdir label (`"task_task_1065"`, `"dashboard"`) as their
|
|
244
|
-
`project_name` will instead carry the clean canonical name (`"KenazAI"`)
|
|
245
|
-
when re-exported — a minor quality improvement to what's already being
|
|
246
|
-
sent, not a new exposure.
|
|
247
|
-
|
|
248
|
-
## What Phase 2 (not this task) still needs
|
|
249
|
-
|
|
250
|
-
- Decide whether to also rewrite `id`/`original_id` (and
|
|
251
|
-
`alaya_exported.original_id` in lock-step) for full internal
|
|
252
|
-
consistency, or leave the composite-key scope decision from Phase 1 as
|
|
253
|
-
permanent.
|
|
254
|
-
- Actually run `consolidate_global_memory(path, dry_run: false)` against
|
|
255
|
-
the real DB, behind an explicit reviewed operation (CLI flag or a
|
|
256
|
-
one-time startup migration gate), after this Phase 1 lands and the
|
|
257
|
-
numbers above are re-verified with `cargo test` (this session could not
|
|
258
|
-
run cargo).
|
|
259
|
-
- The lone `unregistered_.` identity (37 rows, `project_name: "unknown"`)
|
|
260
|
-
has no recoverable path — some past caller passed a relative `"."`
|
|
261
|
-
`project_path`. Not mergeable without more information; left as a
|
|
262
|
-
residual oddity for Phase 2 to decide (delete, or leave as its own
|
|
263
|
-
permanent bucket).
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
# Guard Effectiveness Grounding — R0 Design
|
|
2
|
-
|
|
3
|
-
> **Status**: DESIGN (measure-first gate). Not yet a task.
|
|
4
|
-
> **Origin**: 2026-06-15 Ansuz session. User shared Akshay Pachaar tweet → Opik article
|
|
5
|
-
> "Your Agent Harness Should Repair Itself" (failure → executable regression test →
|
|
6
|
-
> self-improving loop). This design extracts the *one transferable idea* and grounds it
|
|
7
|
-
> against KenazAI's already-existing (but half-dormant) Reflection-to-Control pipeline.
|
|
8
|
-
> **Sibling track**: `dev/PREDICTION_GROUNDING_DESIGN.md` §8 (recall-confidence grounding).
|
|
9
|
-
> Both attack the same root: **the acted_on ceiling** — KenazAI converts failures into
|
|
10
|
-
> *advisory memory* whose behavior-change rate has a structural ceiling (~6–12%), and we
|
|
11
|
-
> have no observable signal for whether the advice ever worked.
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## 1. The idea worth stealing (and the part to reject)
|
|
16
|
-
|
|
17
|
-
Opik's marketed loop: tracing → AI diagnosis → **plain-English assertion compiled to an
|
|
18
|
-
LLM-as-judge test** → each failure becomes a regression test that hardens the harness.
|
|
19
|
-
|
|
20
|
-
KenazAI already exceeds Opik on tracing (Norn ΔGraph, Hippocampus), diagnosis (Huginn,
|
|
21
|
-
Heimdall), and sandbox (live dashboard, worktree dispatch). The **only** transferable
|
|
22
|
-
idea is: **stop relying on self-report that a lesson changed behavior; infer effectiveness
|
|
23
|
-
from observable outcomes.**
|
|
24
|
-
|
|
25
|
-
**Reject**: a hard blocking gate as the default. KenazAI's "agent" is open-ended Claude
|
|
26
|
-
Code sessions, not a deterministic pipeline. A pre-gate that *refuses* on a fuzzy predicate
|
|
27
|
-
will false-positive and block legitimate work. Hard gates are a *Tier-A subset* (R1),
|
|
28
|
-
gated on evidence — not the starting point.
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## 2. Ground-truth state (verified 2026-06-15, not asserted)
|
|
33
|
-
|
|
34
|
-
KenazAI's Reflection-to-Control pipeline (`TASK_1071` + schema `TASK_1075` + v2 fields
|
|
35
|
-
`TASK_1161/1163`) is the same mechanism in embryo. Evidence:
|
|
36
|
-
|
|
37
|
-
| Stage | Status | Evidence |
|
|
38
|
-
|-------|--------|----------|
|
|
39
|
-
| promote: rune/episode/manual → guard | ✅ live | `lesson-guard.js promote`; 11 guards L-001..L-011 |
|
|
40
|
-
| inject at phase enter (advisory text) | ✅ live | `phase-gate.js readLessonGuardsForPhase`; L-002/L-004 `injection_count: 14` |
|
|
41
|
-
| self-reported acted_on | ⚠️ ~dead | L-004: **14 injections / 0 acted_on**; L-002: 14 / 1 |
|
|
42
|
-
| `failure_signature` detector field | ❌ dormant | schema v2 defines it; **0 of 11 guards set it** (`grep -c` = 0) |
|
|
43
|
-
| detector ENGINE | ✅ **BUILT, but no caller** | `.specialist/tools/failure-detector.js` (TASK_1163): 5 detectors, shadow→live→auto-expire, hit_rate math — all complete |
|
|
44
|
-
| detector WIRING to post-complete | ❌ **never done** | engine header says "Used by: attribution-report.js" but `grep failure-detector .formation/tools/attribution-report.js` = **0 matches**. Stale/aspirational comment. Only reachable via its own CLI, which nothing automated calls. |
|
|
45
|
-
| outcome scoring → `hit_rate` | ⚠️ engine ready, never fed | `failure-detector.updateGuardStats` computes it, but with no caller + no signatures it never runs |
|
|
46
|
-
| `precompute` pre-execute block | ⚠️ partial | L-002/L-004 carry `precompute` (gitLogShort / gitCommitsAhead) but no runner enforces it; display-only |
|
|
47
|
-
|
|
48
|
-
**The gap, precisely (CORRECTED 2026-06-15 after reading `failure-detector.js`)**: the
|
|
49
|
-
executable-detector ENGINE is **fully built** (TASK_1163) — NOT greenfield. Dormancy is
|
|
50
|
-
two-fold: (1) the engine has **no production caller** (`attribution-report.js`, which runs
|
|
51
|
-
at post-complete, never invokes it), and (2) **no guard carries a `failure_signature` /
|
|
52
|
-
`detector_mode`**. Since 2026-04-11 the entire subsystem has been dead code. R0 = **wire
|
|
53
|
-
the existing engine + seed 2 signatures**, ~a config + integration task, not a build.
|
|
54
|
-
|
|
55
|
-
**Open integration question**: lesson guards are injected at *Ansuz phase-gate* (interactive
|
|
56
|
-
session chart), but `failure-detector` keys off a *task* chart's `lesson_guards_injected`.
|
|
57
|
-
R0 must resolve which chart actually records injected lesson guards, and feed the detector
|
|
58
|
-
from the right source.
|
|
59
|
-
|
|
60
|
-
**Why it matters** (ties to TASK_1652's NULL verdict): TASK_1652 couldn't measure whether
|
|
61
|
-
recall changes behavior because acted_on is too sparse. The guard layer has the *same*
|
|
62
|
-
ceiling with hard numbers — L-004 injected 14×, acted_on 0×. We have **zero evidence**
|
|
63
|
-
whether the worktree stale-base guard ever prevented the failure it encodes. The
|
|
64
|
-
`failure_signature`/`hit_rate` fields were designed to answer exactly this and were never
|
|
65
|
-
connected.
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## 3. R0 scope — measure-first (the ONLY thing built first)
|
|
70
|
-
|
|
71
|
-
Build the dormant detector half and **measure**, before any enforcement change.
|
|
72
|
-
|
|
73
|
-
### 3.1 Deliverables (CORRECTED — engine already exists)
|
|
74
|
-
1. **Wire the existing `failure-detector.js` engine into post-complete.** It is already
|
|
75
|
-
built but has no caller. Integrate `runDetectorsForTask(taskId, guardSnapshots, pcResult)`
|
|
76
|
-
into the post-complete path (alongside / inside `attribution-report.js`, which already
|
|
77
|
-
runs there). Do NOT rebuild the engine.
|
|
78
|
-
2. **Resolve the chart-source question** (§2 open integration question): determine where
|
|
79
|
-
`lesson_guards_injected` is actually recorded (Ansuz session chart vs worker-task chart)
|
|
80
|
-
and feed the detector the correct snapshots. This is the real integration work.
|
|
81
|
-
3. **Seed `failure_signature` + `detector_mode: shadow` on L-004 and L-010** (see §4).
|
|
82
|
-
Shadow mode is built-in: first 10 detections log to `guard_detector_shadow.jsonl` with
|
|
83
|
-
NO stat mutation / NO auto-expire — exactly the measure-first behavior we want.
|
|
84
|
-
4. **Measure** via the built-in `failure-detector.js shadow-log` + `lesson-guard.js status
|
|
85
|
-
--verbose`. The shadow→live unlock and auto-expire (hit_rate<0.3 after 5 live) lifecycle
|
|
86
|
-
already exists — R0 only needs to reach the end of shadow and review.
|
|
87
|
-
|
|
88
|
-
### 3.2 Detector types — USE THE ENGINE'S EXISTING 5 (do not invent new)
|
|
89
|
-
`failure-detector.js` already ships 5 detector types. R0 reuses two; no new detector code:
|
|
90
|
-
| Engine `detector_type` | Inspects | Fires `failure_detected` when | R0 use |
|
|
91
|
-
|------------------------|----------|-------------------------------|--------|
|
|
92
|
-
| `git_commit_pattern` | task branch commits | revert commit, OR `failure_signature` keyword in commit msg, OR large line delta | L-004 (approximate — catches reverts/overreach that correlate with stale-base) |
|
|
93
|
-
| `merge_conflict` | task status + failure_reason | status=blocked AND failure_reason~merge_conflict | **L-010 (exact fit)** |
|
|
94
|
-
| `acceptance_grep_miss` / `regression_test_failure` / `surprise_file_in_scope` | — | — | not used in R0 |
|
|
95
|
-
|
|
96
|
-
`failure_signature` is set as an **object** (`{type, ...}`); `validateGuardEntry` already
|
|
97
|
-
accepts object-with-`type` (schema says string — known drift, F3 documents object form).
|
|
98
|
-
The engine's 3-state result (`failure_detected` / `failure_avoided` / `null`=undetectable)
|
|
99
|
-
already excludes the unmeasurable — matches TASK_1652 discipline.
|
|
100
|
-
|
|
101
|
-
**Known limitation to verify in shadow**: `git_commit_pattern` matches keywords against
|
|
102
|
-
commit *messages*, not raw diff — so L-004's true signature ("new file mode 100644" in
|
|
103
|
-
diff) is NOT directly detectable by the current engine. R0 uses the revert/delta heuristic
|
|
104
|
-
as a proxy; if shadow shows it's too coarse, a diff-level detector is an engine extension
|
|
105
|
-
deferred to R1 (not built speculatively in R0).
|
|
106
|
-
|
|
107
|
-
### 3.3 Baseline = forward-only (F2 resolved 2026-06-15)
|
|
108
|
-
**No history mining.** Measurement starts at R0 landing; the detector records
|
|
109
|
-
`failure_detected` / `failure_avoided` going forward only. Cleaner (no noisy transcript
|
|
110
|
-
archaeology, detector stays a pure forward function), at the cost of a slower path to N≥5.
|
|
111
|
-
|
|
112
|
-
**Honest limitation**: with the guard always injected and no no-guard control, `hit_rate`
|
|
113
|
-
measures **co-occurrence** (guard-present → failure avoided), not proven causation. That is
|
|
114
|
-
acceptable for an R0 *measurement-capability* gate. Causal proof (intermittent injection /
|
|
115
|
-
A/B) is explicitly deferred to a possible R1 experiment — do NOT claim causation from R0.
|
|
116
|
-
|
|
117
|
-
### 3.4 Success / NULL criteria (gate for R1)
|
|
118
|
-
This is a **gate**, exactly like TASK_1652's R0. Decide R1 only on evidence:
|
|
119
|
-
- **SIGNAL** → for ≥1 guard, signature produced `inferred_acted_on + inferred_failure ≥ 5`
|
|
120
|
-
detectable events AND `failure_detected` rate is informatively low (guard-present
|
|
121
|
-
sessions mostly avoid the failure). → candidate for R1 (where a control A/B can test
|
|
122
|
-
causation).
|
|
123
|
-
- **NULL** → signatures fire too rarely to compute (< 5 detectable events over the window),
|
|
124
|
-
OR `failure_detected` stays high despite guard present (advisory text isn't preventing
|
|
125
|
-
the failure). → close R1, but R0 still delivered the *measurement capability* (net
|
|
126
|
-
positive) and flags which guards to **expire** (injected-much / failure-still-occurs =
|
|
127
|
-
noise, e.g. L-004's 14-inject/0-acted profile).
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## 4. Which guards qualify for R0 (mechanically detectable only)
|
|
132
|
-
| Guard | Lesson | Signature type | Detectable? |
|
|
133
|
-
|-------|--------|---------------|-------------|
|
|
134
|
-
| **L-004** | worktree stale-base → `new file mode 100644` mass-rebase | `git_diff_pattern` | ✅ strong — already has `precompute: gitCommitsAhead` |
|
|
135
|
-
| **L-010** | edit inside active task scope → post-complete conflict / stash leak | `post_complete_conflict` | ✅ — 29-stash incident is the ground-truth pattern |
|
|
136
|
-
| L-002 | run synapse_pulse before editing phase-gate.js callers | — | ❌ no observable outcome signature (process, not outcome) |
|
|
137
|
-
| L-005..L-009, L-011 | DDx / exo-cortex / staleness reflexes | — | ❌ cognitive process, not mechanically detectable |
|
|
138
|
-
|
|
139
|
-
R0 backfills **L-004 and L-010 only**. The rest stay advisory + self-report — they are
|
|
140
|
-
genuinely not outcome-detectable, and pretending otherwise would manufacture fake metrics
|
|
141
|
-
(the [[feedback_label_ritual_displaces_perception]] trap).
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
## 5. R1 — hard pre-gate (GATED on R0 SIGNAL, + user sign-off)
|
|
146
|
-
Only for guards whose **precondition is a computable predicate** (the `precompute` field's
|
|
147
|
-
original intent: "pre-execute compliance block") AND whose R0 `hit_rate` proves the
|
|
148
|
-
failure is real and the guard correlates with avoiding it:
|
|
149
|
-
- L-004: at dispatch time, if `gitCommitsAhead(baseRef) > 10` → **block dispatch**, force
|
|
150
|
-
baseRef refresh. (Predicate already computed; today it's display-only.)
|
|
151
|
-
- L-010: before Edit/Write, if target ∈ any `active/*.yaml` scope_paths → **refuse**, surface options.
|
|
152
|
-
|
|
153
|
-
R1 is the literal "Opik executable test" — but applied only to the thin subset where the
|
|
154
|
-
predicate is deterministic, so false-positives are near-zero. Everything fuzzy stays Tier-B
|
|
155
|
-
(retrospective score). Not in R0.
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
## 6. Non-goals / risks
|
|
160
|
-
- **NOT** adopting Opik (GEN-007 self-contained; our cognitive layer is deeper).
|
|
161
|
-
- **NOT** hard-gating fuzzy/cognitive guards — brittle, false-positive prone.
|
|
162
|
-
- **NOT** trusting self-reported `record-acted-on` as the effectiveness signal — that IS
|
|
163
|
-
the ceiling we're routing around.
|
|
164
|
-
- **Risk**: detector false-positives inflate `inferred_failure`. Mitigation: `undetectable`
|
|
165
|
-
third state; detectors are pure + unit-testable; audit log is append-only for forensics.
|
|
166
|
-
- **Risk**: schema/code drift on `failure_signature` type. Mitigation: R0 resolves it
|
|
167
|
-
(bump schema to allow object form, document in REFLECTION_TO_CONTROL.md).
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## 7. Open forks (need user decision before R0 task is scoped)
|
|
172
|
-
- **F1 — dispatch path**: R0 is rigor:medium, single-subsystem (`.specialist/tools` + 2
|
|
173
|
-
guard edits). Subagent (interactive) vs Formation? Leaning **subagent** (same-project,
|
|
174
|
-
not multi-hour).
|
|
175
|
-
- **F2 — baseline source**: ✅ RESOLVED 2026-06-15 → **forward-only**. No history mining;
|
|
176
|
-
detector measures from R0 landing forward. `hit_rate` = co-occurrence, not causation
|
|
177
|
-
(see §3.3). Causal A/B deferred to R1. Trade-off accepted: slower to N≥5, cleaner data.
|
|
178
|
-
- **F3 — schema version bump**: resolve `failure_signature` string→object as schema v3, or
|
|
179
|
-
keep v2 and lean on the existing permissive validator? v3 is cleaner but touches the
|
|
180
|
-
contract doc.
|