特性-目标评审
本文档检查当前 kgent 特性集合是否能强支撑产品目标。
产品目标
kgent 应成为一个技能驱动、记忆增强、沙箱优先的专业智能体运行时。
它应允许用户配置一个能够完成需求访谈、旅行规划、课程设计、视频节目设计、研究、Coding 和审查等工作的专业智能体。
最小成功运行不是一次聊天回答,而是一次包含过程记录和沙箱交付物的可审计专业任务执行。
目标与特性匹配
| 目标 | 当前支撑特性 | 匹配度 | 说明 |
|---|---|---|---|
| 配置不同专业智能体 | Profile、YAML config、system prompt、responsibilities、style、constraints | 强 | Profile 直接支撑角色和职责定义。 |
| 完成专业工作而非聊天 | Skills、tools、deliverable contracts、sandbox workspace | 强 | 技能包和交付物让 kgent 超越对话。 |
| 支持多个领域 | Skill registry、progressive skill loading、profile-specific deliverables | 强 | 领域扩展可通过 skills 和 profiles 完成。 |
| 保持运行时轻量 | Pydantic AI boundary、简单 CLI run flow、MVP 不需要重型 graph | 强 | Pydantic AI 是执行引擎,kgent 负责产品概念。 |
| 将技能作为专业能力 | SKILL.md、references、templates、scripts、quality standards、promotion workflow | 强 | 这是 kgent 设计的核心。 |
| 保持上下文小 | Skill index、list_skills、load_skill、external memory recall | 强 | 渐进式加载支撑小上下文执行。 |
| 使用外部记忆 | Memory tools、layered memory model、candidate memory policy | 强 | 记忆显式且不被框架锁定。 |
| 产出可审计工作 | Run directory、events、transcript、logs、deliverables、archive | 强 | 每次运行创建持久 artifacts。 |
| 安全操作文件 | Sandbox policy、read/write boundaries、默认禁用破坏性操作 | 中强 | 需要实现和测试来强制执行。 |
| 未来支持多智能体 | Intake、Coordinator、Worker、Reviewer roles 和 handoff artifacts | 中 | 概念清楚,但任务编排和 schema 还需细化。 |
| 确保输出质量 | Reviewer Agent、deliverable contracts | 中 | 需要 guardrails、validation hooks 和 acceptance checks。 |
| 从已完成工作中学习 | Candidate memories、candidate skills、session archives | 中 | 方向正确,但 distillation 和 promotion policy 需要实现细节。 |
当前优势
当前设计在五个方面强支撑目标:
- 通过 profiles 和 system prompts 实现专业角色配置。
- 通过 skill packages 实现专业能力扩展。
- 通过 sandbox run directories 实现持久工作执行。
- 通过 explicit memory tools 集成外部记忆。
- 通过 Pydantic AI 实现轻量技术路径,而不是重型 workflow engine。
主要缺口
这些缺口不否定设计,但应进入候选特性池。
1. 交付物校验
设计要求每次运行创建交付物,但需要校验机制。
候选特性:
- declarative deliverable schema
- required file checks
- typed final output validation
- acceptance criteria checks
- reviewer-triggered validation
2. 能力和权限模型
沙箱策略已定义,但权限需要成为一等模型。
候选特性:
- tool permission manifest
- skill permission manifest
- per-run allowlist
- approval hooks for sensitive actions
- deny-by-default destructive operations
3. 任务状态和阶段跟踪
设计提到了轻量 stages,但还没有 stage state model。
候选特性:
- run stage state
- stage-specific instructions
- stage-specific deliverables
- pause/resume by stage
- stage transition events
4. Intake 质量
Intake Agent 有 brief schema,但需要质量控制。
候选特性:
- ambiguity taxonomy
- question strategy
- completeness scoring
- brief readiness score
- final confirmation step
5. 工具可观测性
运行目录记录 logs,但工具可观测性需要细化。
候选特性:
- normalized tool event schema
- tool input/output redaction policy
- tool duration and failure tracking
- file operation diff records
- web source records
6. 技能生命周期
候选技能生成已有概念,但生命周期需要治理。
候选特性:
- skill manifest schema
- skill versioning
- skill review status
- skill tests or examples
- promotion command
- deprecation command
7. 记忆治理
记忆是外部且显式的,但写回需要策略。
候选特性:
- candidate memory schema
- memory confidence score
- memory scope enforcement
- memory review workflow
- memory retention policy
8. 评测体系
为了判断 kgent 是否在变好,需要评测任务。
候选特性:
- golden task suites
- expected deliverable checks
- skill-specific evals
- regression runs
- cost and latency metrics
9. 人机交互模式
CLI run 模式适合执行,但 intake 工作需要交互。
候选特性:
- interactive CLI session
- ask-user tool
- structured question rounds
- draft brief review loop
- resume from saved intake session
10. Handoff 契约
多智能体概念存在,但 handoff artifacts 需要 schema。
候选特性:
idea_brief.yamltask_plan.yamlworker_result.yamlreview_report.yaml- handoff status and ownership fields
候选特性池
| Feature | Priority | 原因 |
|---|---|---|
| Deliverable contract schema | P0 | 让“专业工作输出”可执行。 |
| Sandbox permission manifest | P0 | 让安全文件和工具操作可执行。 |
| Skill manifest schema | P0 | 让技能可发现、可治理、可测试。 |
| Run event schema | P0 | 让审计记录一致。 |
| External memory tool contract | P0 | 在不锁定实现的情况下让记忆集成具体化。 |
| Intake brief readiness scoring | P1 | 提升上游需求质量。 |
| Interactive CLI mode | P1 | 支撑 Intake Agent 与人类澄清。 |
| Stage state model | P1 | 不引入重型 graph,也能让专业工作流更可靠。 |
| Reviewer validation hooks | P1 | 提升质量和验收检查。 |
| Candidate skill lifecycle | P1 | 让已完成工作可以安全沉淀能力。 |
| Candidate memory lifecycle | P1 | 让长期学习更安全。 |
| Tool observability schema | P1 | 提升调试性和可信度。 |
| Handoff artifact schemas | P1 | 支撑未来 kgent 群组。 |
| Evaluation harness | P2 | 支撑长期质量和回归跟踪。 |
推荐 MVP 增补
为了让 Phase 1 真正支撑产品目标,MVP 范围应加入:
- Deliverable contract schema。
- Sandbox permission manifest。
- Skill manifest schema。
- Run event schema。
- External memory tool contract。
这些内容足够小,适合早期实现,也足够关键,可以避免运行时退化成无结构 prompt runner。
关键特性抽象
并非所有达成目标所需的机制都应成为 kgent 顶层特性。
例如,deliverable contract schema 很重要,但它不是关键产品特性本身。它是更高层关键特性 Sandbox-First Work Execution 下的实现机制。
kgent 的关键特性应表达为更高层的产品能力属性。
1. Configurable Professional Identity
kgent agents 应是可配置的专业员工。
最佳实现路径:
- profile configuration
- system prompt composition
- role、responsibility、style、boundary fields
- domain-specific default profiles
支撑机制:
- YAML config
- profile schema
- effective system prompt archive
2. Skill-Driven Capability System
kgent 应通过技能扩展专业能力。
最佳实现路径:
- 含
SKILL.md的技能包 - progressive skill discovery and loading
- skill references、templates、scripts、quality standards
- skill promotion workflow
支撑机制:
- skill manifest schema
- skill registry
list_skillsload_skill- candidate skill lifecycle
3. Tool-Mediated Action System
kgent 应通过显式工具行动,而不是隐藏副作用。
最佳实现路径:
- Pydantic AI toolsets
- filesystem tools
- web tools
- memory tools
- future shell or external service tools
支撑机制:
- tool permission manifest
- tool event schema
- approval hooks
- tool observability
4. Memory-Aware Context System
kgent 应使用长期上下文,但不绑定某个记忆实现。
最佳实现路径:
- external memory tool contract
- pre-run memory recall
- in-run memory tools
- post-run candidate memory extraction
支撑机制:
- layered memory model
- memory scopes
- candidate memory schema
- memory review policy
5. Sandbox-First Work Execution
kgent 应在持久、可审计的工作区中完成任务。
最佳实现路径:
- per-run sandbox directory
- workspace and deliverables folders
- process records and logs
- artifact-based final outputs
支撑机制:
- deliverable contract schema
- run event schema
- transcript
- tool logs
- filesystem policy
6. Professional Workflow Orchestration
kgent 应支持专业工作模式,但第一版不需要重型 workflow engine。
最佳实现路径:
- lightweight run stages
- stage-specific instructions
- stage-specific outputs
- Intake、Coordinator、Worker、Reviewer 等角色型 agent
支撑机制:
- stage state model
- handoff artifact schemas
- reviewer validation hooks
- task plan schema
7. Learning and Capability Evolution
kgent 应以受控方式从已完成工作中学习。
最佳实现路径:
- session archive
- reusable pattern extraction
- candidate skill generation
- candidate memory generation
支撑机制:
- candidate skill review and promotion
- candidate memory review
- archive indexing
- evaluation harness
重构后的关键特性
| Key Feature | Priority | 产品含义 | 重要机制 |
|---|---|---|---|
| Configurable Professional Identity | P0 | 将 kgent 变成不同专业员工。 | Profile schema、system prompt composition、YAML config。 |
| Skill-Driven Capability System | P0 | 通过可复用技能获得领域专业能力。 | Skill packages、skill registry、progressive loading、skill promotion。 |
| Tool-Mediated Action System | P0 | 让 kgent 安全、显式地行动。 | Pydantic AI toolsets、permission manifests、tool events、approvals。 |
| Memory-Aware Context System | P0 | 让 kgent 拥有长期上下文但不被 memory 实现锁定。 | External memory tools、recall/write contracts、candidate memories。 |
| Sandbox-First Work Execution | P0 | 让工作可审计并以 artifact 为中心。 | Run directory、deliverables、event logs、transcripts、filesystem policy。 |
| Quality and Governance System | P1 | 确保输出、工具、技能、记忆和交接物满足质量与安全标准。 | Acceptance criteria、validation hooks、permissions、review、evals。 |
| Professional Workflow Orchestration | P1 | 支持 intake、planning、execution、review。 | Lightweight stages、handoff artifacts、agent roles、validation hooks。 |
| Learning and Capability Evolution | P2 | 让 kgent 随时间安全改进。 | Session archive、candidate skills、candidate memories、evals。 |
MVP 关键特性覆盖
Phase 1 不应被描述成低层机制列表。它应证明五个 P0 关键特性,并包含最小 P1 治理基线:
- Configurable Professional Identity。
- Skill-Driven Capability System。
- Tool-Mediated Action System。
- Memory-Aware Context System。
- Sandbox-First Work Execution。
- Minimal Quality and Governance baseline。
低层机制仍然必要,但它们应归属于这些关键特性,而不是作为独立产品特性。
Objective-to-Key-Feature Review
本节检查重构后的关键特性是否支撑 kgent 的 objectives。
Objectives
kgent 当前有六个产品目标:
- Professional work execution:完成真实专业任务,而不只是聊天。
- Domain extensibility:跨旅行、课程设计、视频节目设计、研 究和 Coding 等领域工作。
- Context continuity:使用长期用户、项目、组织和会话上下文。
- Auditable delivery:将过程记录和交付物保存到沙箱。
- Group-ready operation:通过 intake、coordination、execution、review 和 handoff artifacts 支持未来智能体群组。
- Professional reliability:具备明确质量和安全控制。
支撑矩阵
| Objective | 强支撑关键特性 | 支撑度 | 说明 |
|---|---|---|---|
| Professional work execution | Configurable Professional Identity, Skill-Driven Capability System, Tool-Mediated Action System, Sandbox-First Work Execution | 强 | 角色、技能、工具和 artifacts 共同让 kgent 从回答生成转为工作完成。 |
| Domain extensibility | Configurable Professional Identity, Skill-Driven Capability System, Tool-Mediated Action System | 强 | 新领域可通过 profiles、skills、tools 添加,无需修改核心运行时。 |
| Context continuity | Memory-Aware Context System, Sandbox-First Work Execution, Learning and Capability Evolution | 强 | 外部记忆处理长期上下文;归档提供会话上下文;候选学习支持复用。 |
| Auditable delivery | Sandbox-First Work Execution, Tool-Mediated Action System, Professional Workflow Orchestration | 强 | runs、tool events、transcripts、deliverables 和 stage transitions 让工作可检查。 |
| Group-ready operation | Professional Workflow Orchestration, Configurable Professional Identity, Sandbox-First Work Execution, Skill-Driven Capability System | 中强 | 角色清楚,但 handoff schemas 和 coordination runtime 还需细化。 |
覆盖评估
八个关键特性足以支撑当前目标。
覆盖最强的领域:
- professional work execution
- domain extensibility
- auditable delivery
仍需更多设计细节的领域:
- group-ready operation
- learning and capability evolution
- 跨专业领域质量保证
已加入关键特性:Quality and Governance System
Quality and Governance 已提升为顶层关键特性,因为 kgent 应像可靠专业员工一样工作,而不只是任务执行器。
Quality and Governance System
确保输出、工具、技能、记忆和交接物满足明确质量和安全标准。
优先级:
整体 P1,Phase 1 做最小 P0 基线。
最佳实现路径:
- deliverable acceptance criteria
- reviewer agent
- validation hooks
- tool and skill permissions
- skill review and promotion
- memory write governance
- evaluation harness
修订后的目标覆盖
当前关键特性集合:
- Configurable Professional Identity。
- Skill-Driven Capability System。
- Tool-Mediated Action System。
- Memory-Aware Context System。
- Sandbox-First Work Execution。
- Quality and Governance System。
- Professional Workflow Orchestration。
- Learning and Capability Evolution。
这增强了以下目标覆盖:
- professional reliability
- safe tool use
- skill lifecycle management
- memory write control
- review and acceptance workflows