← ClaudeAtlas

dapei-cognitivelisted

Use when analyzing code repository behavior, understanding entry points, or documenting system architecture. Triggers on "analyze", "behavior", "discover", "orient", "cognitive" intents.
ygwa/dapei-skill · ★ 1 · AI & Automation · score 64
Install: claude install-skill ygwa/dapei-skill
# dapei.cognitive skill Engineering Cognitive Runtime 行为认知工作流。**只提供流程方法,不提供具体实现指导。** ## 边界 | dapei 平台 | Agent | |------------|-------| | 目录脚手架、产物 schema、evidence 校验、索引 | 读代码、判断栈、选择入口策略、生成候选与事实 | | 输出结构化 YAML 契约 | 理解「这个入口做什么」 | **禁止**:平台用 grep/regex/语言特定关键字替 Agent 做语义理解。 **禁止绕过**:紧急情况(如生产故障)不是跳过 artifact 记录的理由。 - 快速定位调用点 + 立即创建 artifact 是同时进行的,不是先后的 - grep/search 找到位置后必须写入 `docs/as-is/behavior/<id>.yaml` - "先快速解决,回头再补文档" = 违反此 skill ## 路由能力 | 意图 | Capability | |------|------------| | 准备 discover 工作区 | `cognitive.discover` | | 校验认知产物 | `cognitive.artifact.validate` | | 写入并索引 | `cognitive.artifact.upsert` | | 列出已确认产物 | `cognitive.artifact.list` | | state draft(可选) | `cognitive.state.suggest` | --- ## 工作流(方法,非实现) ### Phase 1 — Orient(定向) **目标**:判断这是什么项目、用什么语言/框架。 **Agent 自行决定怎么做**,常见起点包括: - 看目录结构(如 `tree`) - 读栈 manifest(如 `package.json`、`pom.xml`、`go.mod`、`Gemfile` 等——按实际存在的文件来) **产出**:对 repo 的栈与布局判断(写在分析报告或 `_candidates.yaml` 的备注中)。 `cognitive.discover` 仅提供 `directory_tree` + `manifest_files` 路径,**不**替 Agent 下结论。 ### Phase 2 — Strategy(入口策略) **目标**:决定如何在本栈中定位行为入口。 **由 Agent 根据 Phase 1 结论自行选择策略**——平台不 prescribe 关键字、注解名、目录约定。 行为入口类型(概念层,非搜索关键词): - HTTP/RPC 入口 - 消息消费 / 事件订阅 - 定时任务 - 其他触发系统状态变化的外部边界 ### Phase 3 — Candidates(候选清单) **目标**:列出待深析的行为入口。 1. Agent 按 Phase 2 策略阅读代码 2. 理解每个入口**做什么**(语义,非签名) 3. 写入 `docs/as-is/behavior/_candidates.yaml` 候选允许 `inference` / `unknown`;深析后再升为 `fact`。 ### Phase 4 — Deep Dive(逐个深析) 对每个 candidate: 1. 沿调用链追踪(Agent 自行决定读哪些文件)