원클릭으로
project-docs-update
当检测到项目结构变更(新增 Controller/Service/模块/数据库表/API 接口)或用户要求「更新项目文档」「同步知识图谱」时触发。负责识别哪些知识图谱文档需要更新并执行更新。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
当检测到项目结构变更(新增 Controller/Service/模块/数据库表/API 接口)或用户要求「更新项目文档」「同步知识图谱」时触发。负责识别哪些知识图谱文档需要更新并执行更新。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when writing, reviewing, or modifying source code in any language (Java / TypeScript / JavaScript / Dart / Python / Kotlin / Go / Vue / React 等). 跨语言通用编码铁律 7 条 + 注释三档,语言专属 skill (java-coding-standards / korepos-backend-service 等) 在此基础上叠加。MUST 自动触发,不需用户显式要求。
Use when writing, reviewing, or modifying any Java code. You MUST follow these mandatory rules at all times. Apply automatically without being asked. 通用条款见 coding-standards-common;本文件仅列 Java 独占规则(阿里巴巴黄山版强制项的 Java 专属部分)。
Use when the user asks to commit code or generate a commit message AND the staged diff is non-trivial (>2 files, >30 net lines, or contains new/renamed/deleted files). For trivial commits (≤2 files, ≤30 lines, only modifications to existing files) skip this skill and write a clear `git commit` message directly — `hooks/check-git-commit-skill.js` enforces the same threshold at the Bash layer (only blocks `git commit` when staged diff exceeds it). Compose the message from the current session's edit intent first; only re-read diffs to cover gaps. Automatic stage/commit/push applies ONLY to the team-standards plugin source repository, never to business projects that merely install this plugin.
Use BEFORE answering single-service backend questions about table relations / ER / SQL / state transitions / atomic capabilities or project-level technical pain points (subprocess, concurrency, perf, external deps); BEFORE Write/Edit any .md describing such content (anywhere — docs/, ai-docs/, scenarios/, work-log/). Auto-append candidates to `_candidates.md` after investigation discovers reusable facts, or when same tech concern raised ≥3 rounds in one session. Knowledge graph ownership = investigated service, not cwd. Detailed triggers (7 BLOCKING conditions) and scope boundaries listed in `## BLOCKING 强触发清单` section of SKILL.md body.
Use when writing or modifying code that integrates an LLM or builds an agent —— imports langchain4j / spring-ai / openai / anthropic 等 SDK;定义 @Tool / AiService / function-calling 工具;拼装 prompt;解析 LLM 输出。在 coding-standards-common 之上叠加的 LLM/Agent 集成编码铁律:确定性优先、LLM 输出当不可信入参、模糊→结构化用受控枚举、约定单一来源、工具描述是运行时契约、Agent 循环必须兜底、上下文由代码注入。MUST 自动触发,先满足 coding-standards-common 再走本 skill。
当用户要求「架构检查」「lint」「检测架构违规」时触发;当对 Flutter 项目的 presentation/domain/data/infrastructure 层代码执行 Edit/Write 后自动触发一次轻量检查。
| name | project-docs-update |
| description | 当检测到项目结构变更(新增 Controller/Service/模块/数据库表/API 接口)或用户要求「更新项目文档」「同步知识图谱」时触发。负责识别哪些知识图谱文档需要更新并执行更新。 |
用户说以下任意一种时,必须调用本 skill:
智能提醒(非强制,建议性触发):
git-commit-standards 检测到 commit 涉及新增 Controller/Service/Mapper/Entity 时,提醒用户运行本 skilldesign-doc-required 的设计文档涉及新增模块时,提醒用户初始化模块文档用户目录知识库 {KG_ROOT}/(= {USER_DOCUMENTS}/ai-docs/{project}/)下已存在知识图谱文档(通过 init-project-docs 生成)。
若 {KG_ROOT}/00_project_overview.md 不存在,提示用户先运行 init-project-docs。
知识图谱统一存放在用户目录知识库,不再写入项目
docs/。下文{KG_ROOT}/一律指{USER_DOCUMENTS}/ai-docs/{project}/。
flowchart TD
A([收到更新指令]) --> B["读取 {KG_ROOT}/00_project_overview.md 获取当前文档状态"]
B --> C[扫描代码结构 - 与文档对比]
C --> D[生成差异报告]
D --> E{用户选择模式}
E -->|自动模式| F[自动更新所有差异文档]
E -->|确认模式| G[逐项展示差异,等待用户确认]
F --> H[输出更新摘要]
G --> H
扫描:Controller/Service 包结构(Java)或 features/ 目录(Flutter)
对比:{KG_ROOT}/02_module_map.md
触发更新条件:
扫描:Controller 层的 @RequestMapping 等注解
对比:{KG_ROOT}/05_api_map.md
触发更新条件:
扫描:Entity/Model 类、Mapper XML、建表语句
对比:{KG_ROOT}/04_data_model_map.md
触发更新条件:
扫描:综合 Controller + 前端页面/路由
对比:{KG_ROOT}/06_frontend_backend_mapping.md
触发更新条件:
扫描:项目实际的分层结构和依赖关系
对比:{KG_ROOT}/08_constraints_and_rules.md
触发更新条件:
| 文档 | 变更类型 | 具体内容 | 优先级 |
|---|---|---|---|
02_module_map.md | 新增 | 发现新模块 {name} 未记录 | 高 |
05_api_map.md | 新增 | POST /api/xxx 未记录 | 高 |
04_data_model_map.md | 变更 | {table}.{field} 类型已变更 | 中 |
扫描完成:
- 检查文档数:{N}
- 需要更新:{N} 份
- 已自动更新:{N} 份
- 需人工确认:{N} 份(业务流程/术语类文档)
| 文档 | 默认模式 | 原因 |
|---|---|---|
02_module_map.md | 自动 | 可从代码结构推断 |
04_data_model_map.md | 自动 | 可从 Entity/DDL 推断 |
05_api_map.md | 自动 | 可从 Controller 注解推断 |
06_frontend_backend_mapping.md | 自动 | 可从代码引用关系推断 |
00_project_overview.md | 确认 | 项目定位需人工判断 |
03_business_flow_map.md | 确认 | 业务流程需人工确认 |
07_glossary.md | 确认 | 术语含义需人工确认 |
08_constraints_and_rules.md | 确认 | 架构规则需人工决策 |
09_refactor_plan.md | 确认 | 重构计划需人工决策 |
10_change_log.md | 自动 | 追加格式固定 |
来源:team-standards Mermaid 规范
=、,、/、<、>、(、)、[、]、: 时必须加引号< > 改用文字classDiagram 方法名不含中文design-doc-required(本 skill 属于文档维护类,非开发类){KG_ROOT}/ 下文件后,自动触发 doc-index-required Phase-B 更新索引init-project-docs 的后续维护阶段调用