新增: Phase2 阶段收尾(Sprint 1-20)

重构:删 5 零引用 crate(df-evolve/plugin/stages/task/traceability)+ 清死模块、ai.rs 拆 11 子 module、ai.ts 拆 6 composable、i18n 拆目录
功能:知识库全栈(df-project/scan + CRUD + 时间线 + 前端)、Settings 拆分、appSettings KV 迁移、模型池、LLM 并发 Semaphore
修复:审批持久化根治、ConditionEngine 默认拒绝、NodeRegistry unimplemented 清除、promote 补偿删除、工具结果截断 50KB、路径校验防 symlink 逃逸
文档:B-03 人工审批设计、决策记录三分档、规格契约自检、经验记录、todo 看板、PROGRESS 更新

详见 PROGRESS.md。src-tauri/儿童每日打卡应用/ 与本项目无关,已排除。
This commit is contained in:
2026-06-14 14:08:20 +08:00
parent 98393b4908
commit cf017f81e2
167 changed files with 19549 additions and 6886 deletions

View File

@@ -1,14 +1,15 @@
//! 想法晋升 — 将想法转为项目
use anyhow::Result;
use serde::Serialize;
use df_core::types::{IdeaId, ProjectId};
use crate::adversarial::Recommendation;
use crate::capture::Idea;
use crate::evaluator::Recommendation;
/// 晋升结果
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Serialize)]
pub struct PromotionResult {
pub idea_id: IdeaId,
pub project_id: ProjectId,
@@ -44,7 +45,7 @@ impl IdeaPromoter {
pub fn try_promote(&self, idea: &Idea, recommendation: &Recommendation) -> Result<PromotionResult> {
match self.policy {
PromotionPolicy::Auto => {
if matches!(recommendation, Recommendation::StrongApprove | Recommendation::Approve) {
if matches!(recommendation, Recommendation::ImmediateAction | Recommendation::Soon) {
self.do_promote(idea)
} else {
Ok(PromotionResult {