zfc
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseZFC (Zero Framework Cognition) Principles
ZFC(零框架认知)原则
Core Architecture Principle: This application is pure orchestration that delegates ALL reasoning to external AI. We build a “thin, safe, deterministic shell” around AI reasoning with strong guardrails and observability.
核心架构原则:本应用为纯编排架构,将所有推理工作委托给外部AI。我们围绕AI推理构建一个“轻量、安全、确定性的外壳”,具备强大的防护机制和可观测性。
✅ ZFC-Compliant (Allowed)
✅ 符合ZFC规范(允许操作)
Pure Orchestration
纯编排
IO and Plumbing • Read/write files, list directories, parse JSON, serialize/deserialize • Persist to stores, watch events, index documents
Structural Safety Checks • Schema validation, required fields verification • Path traversal prevention, timeout enforcement, cancellation handling
Policy Enforcement • Budget caps, rate limits, confidence thresholds • “Don’t run without approval” gates
Mechanical Transforms • Parameter substitution (e.g., ${param} replacement) • Compilation • Formatting and rendering AI-provided data
State Management • Lifecycle tracking, progress monitoring • Mission journaling, escalation policy execution
Typed Error Handling • Use SDK-provided error classes (instanceof checks) • Avoid message parsing
IO与管道操作 • 读写文件、列出目录、解析JSON、序列化/反序列化 • 持久化到存储、监听事件、索引文档
结构安全检查 • 模式验证、必填字段校验 • 路径遍历防护、超时控制、取消操作处理
策略执行 • 预算上限、速率限制、置信度阈值 • “未经批准不得运行”的管控机制
机械转换 • 参数替换(例如${param}替换) • 编译 • 格式化和渲染AI提供的数据
状态管理 • 生命周期追踪、进度监控 • 任务日志记录、升级策略执行
类型化错误处理 • 使用SDK提供的错误类(instanceof检查) • 避免消息解析
❌ ZFC-Violations (Forbidden)
❌ 违反ZFC规范(禁止操作)
Local Intelligence/Reasoning
Ranking/Scoring/Selection • Any algorithm that chooses among alternatives based on heuristics or weights
Plan/Composition/Scheduling • Decisions about dependencies, ordering, parallelization, retry policies
Semantic Analysis • Inferring complexity, scope, file dependencies • Determining “what should be done next”
Heuristic Classification • Keyword-based routing • Fallback decision trees • Domain-specific rules
Quality Judgment • Opinionated validation beyond structural safety • Recommendations like “test-first recommended”
本地智能/推理
排名/评分/选择 • 任何基于启发式规则或权重在多个选项中做选择的算法
规划/组合/调度 • 关于依赖关系、执行顺序、并行化、重试策略的决策
语义分析 • 推断复杂度、范围、文件依赖 • 确定“下一步应该做什么”
启发式分类 • 基于关键词的路由 • 回退决策树 • 特定领域规则
质量判断 • 超出结构安全的主观验证 • 诸如“推荐先测试”之类的建议
🔄 ZFC-Compliant Pattern
🔄 符合ZFC规范的模式
The Correct Flow
-
Gather Raw Context (IO only) • User intent, project files, constraints, mission state
-
Call AI for Decisions • Classification, selection, composition • Ordering, validation, next steps
-
Validate Structure • Schema conformance • Safety checks • Policy enforcement
-
Execute Mechanically • Run AI’s decisions without modification
正确流程
-
收集原始上下文(仅IO操作) • 用户意图、项目文件、约束条件、任务状态
-
调用AI做决策 • 分类、选择、组合 • 排序、验证、下一步操作
-
验证结构 • 模式一致性 • 安全检查 • 策略执行
-
机械执行 • 完全按照AI的决策执行,不做任何修改