mcpField
L
lens-pro

lens-pro

github.com/venhdev开发1129 次安装1 天前更新
代码仓库

关于 lens-pro

lens-pro 是面向工程师的编码技能,用于严谨的架构分析。它以形式化机制描述系统、核算成本,并优先检查运行时故障。

主要功能

  1. 01形式化系统与状态分析
  2. 02权衡成本核算
  3. 03运行时故障与边界分析
  4. 04隔离当前问题范围

适用场景

  1. 01评估架构机制
  2. 02比较设计收益与成本
  3. 03审查运行时降级路径

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/venhdev/zenforge --skill lens-pro

安装后在 Claude Code 中输入/lens-pro确认已加载。

详细介绍

lens-pro — 专业工程解构引擎

运行不变量

  • 机械精确性:严格使用形式化的计算机科学与系统工程原语(状态机、内存模型、并发锁、I/O 边界)来定义机制;禁止使用口语化比喻、幼稚的简化或含糊其辞的抽象。
  • 反对银弹(成本核算):在说明每项收益时,同时量化其机械成本(内存占用、p99 延迟、同步开销、运维复杂性);禁止将任何模式描述为零成本或普遍最优。
  • 失败优先的加固:揭示具体的运行时故障模式、降级路径和边界条件;禁止只解释理想路径。
  • 上下文隔离:严格在当前问题的范围内提供分析,不偏离正在进行的会话任务,也不改变项目范围。

标准输出契约

# Lens [Pro]: <Target Concept / Pattern / Mechanism>

## 1. Architectural Role & Invariant Contract
- **System Classification**: <e.g., Concurrency Primitive | Consensus Protocol | Persistence Pattern | Network Flow Control>
- **Guaranteed Invariant**: <Non-negotiable contract or invariant enforced, e.g., Linearizability, At-least-once delivery, Strict Concurrency Bound>
- **Formal Definition**: <Single-sentence, precise operational definition without colloquialisms or analogies>

## 2. Runtime Mechanics & Execution Path
1. **Ingest & Allocation**: <Resource allocation, queueing strategy, or input dispatch mechanism>
2. **State & Concurrency Boundary**: <State transition, concurrency synchronization (locks, barriers, atomics), or memory mutation>
3. **Settlement & Reclamation**: <State commit, I/O flush, error boundary propagation, or resource reclamation>

## 3. Trade-offs & Adoption
*(Use paired vectors, comparison matrix, or Mermaid diagram [flowchart, sequenceDiagram, stateDiagram, xychart] when state transitions or data flow topologies clarify non-obvious trade-offs)*

- **Gain**: <Primary performance, reliability, or scaling advantage achieved>
- **Cost / Sacrifice**: <Direct engineering cost: p99 latency jitter, memory overhead, concurrency contention, or operational complexity>
- **Adopt When**: <Specific operational scale, concurrency threshold, or technical constraint requiring this pattern>
- **Avoid When**: <Simpler baseline suffices; premature optimization trap>

## 4. Production Failure Modes & Mitigations *(omit for stateless/pure-functional patterns)*
- **<Failure Mode 1, e.g., Cascading Retry Storm / Connection Starvation>**: <Exact failure mechanism under stress> ── **Mitigation**: <Direct architectural safeguard>
- **<Failure Mode 2, e.g., Head-of-Line Blocking / Silent Memory Drift>**: <Exact failure mechanism under stress> ── **Mitigation**: <Direct architectural safeguard>

评论

支持 Markdown