ai-sdlc-doctor
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseai-sdlc-doctor: Diagnostics And Safe Upgrade Plans
ai-sdlc-doctor:诊断与安全升级计划
Internal AI SDLC skill, not client-facing by default. Doctor and upgrade planning are read-only with respect to installation files.
内部AI SDLC Skill,默认不面向客户。 Doctor工具与升级规划对安装文件仅具备只读权限。
0. Skill Card
0. Skill卡片
- Skill name:
ai-sdlc-doctor - Primary audience: Dev, Delivery
- Supporting audience: Release, Architecture
- Audience tags: Dev, Delivery, Release, Architecture
- SDLC stage: Installation and upgrade operations
- Purpose: Explain installation health and upgrade impact before mutation.
- Output: or
_ai_sdlc/doctor/report.{toon,json,md}_ai_sdlc/upgrades/<id>/plan.{toon,json,md}
- Skill名称:
ai-sdlc-doctor - 主要受众: 开发人员、交付人员
- 支持受众: 发布人员、架构师
- 受众标签: Dev, Delivery, Release, Architecture
- SDLC阶段: 安装与升级操作
- 用途: 在执行变更前说明安装健康状况与升级影响。
- 输出: 或
_ai_sdlc/doctor/report.{toon,json,md}_ai_sdlc/upgrades/<id>/plan.{toon,json,md}
0.1 Required Inputs
0.1 必填输入项
- Repository root for doctor checks.
- Current and target versioned inventories plus active harness API for upgrade planning.
- 用于Doctor检查的仓库根目录。
- 当前与目标版本化文件清单,以及用于升级规划的活跃harness API。
0.2 Clarification Rules
0.2 澄清规则
- Ask when the installation root or target inventory is ambiguous.
- Reject unsafe paths, invalid hashes, duplicate files, invalid versions, and incompatible API ranges.
- Never repair, install, delete, overwrite, migrate, or restore files automatically.
- 当安装根目录或目标清单不明确时,需询问确认。
- 拒绝不安全路径、无效哈希、重复文件、无效版本以及不兼容的API范围。
- 绝不自动执行修复、安装、删除、覆盖、迁移或恢复文件的操作。
0.2.1 Flow Mode Flags
0.2.1 流程模式标志
- Support and
--quick-flow; full flow takes precedence.--full-flow - Full flow requires review of every warning, migration, backup, rollback, and blocker.
- 支持和
--quick-flow;全流程模式优先级更高。--full-flow - 全流程模式要求审核每一条警告、迁移、备份、回滚与阻塞项。
0.3 Output Rules
0.3 输出规则
- Default to complete TOON with checks, evidence, remediation, file changes, migrations, backups, rollback actions, blockers, and fingerprints.
- Return summaries directly in the Codex response.
- Emit with
ai-sdlc-handoff/v1,result,blockers, andnext_required; actions includenext_optional,reason, andcommand.expected_artifact - Do not create ,
summary.txt, or another standalone summary file.*-summary.txt
- 默认生成完整的TOON格式报告,包含检查项、证据、修复方案、文件变更、 迁移、备份、回滚操作、阻塞项与指纹信息。
- 在Codex响应中直接返回摘要内容。
- 输出格式数据,包含
ai-sdlc-handoff/v1、result、blockers与next_required;操作信息包含next_optional、reason与command。expected_artifact - 不得创建、
summary.txt或其他独立的摘要文件。*-summary.txt
0.4 Artifact Routing
0.4 制品路由
- Write generated reports only below repository .
_ai_sdlc/ - Keep authored upgrade inventories visible and version controlled.
- Never treat a generated plan as authority to apply changes.
- 生成的报告仅写入仓库目录下。
_ai_sdlc/ - 保持已创建的升级清单可见并受版本控制。
- 绝不将生成的计划视为执行变更的授权依据。
0.5 Feature State Machine
0.5 功能状态机
- Read owning feature when diagnostics affect feature work.
_ai_sdlc/state.toon - Diagnostics and upgrade plans do not mutate feature state.
- 当诊断影响功能工作时,读取所属功能的文件。
_ai_sdlc/state.toon - 诊断与升级规划不会修改功能状态。
0.6 Artifact Metadata And Metatags
0.6 制品元数据与元标签
- Related Markdown uses canonical and
artifact_metadata.metatags - Machine records use versioned doctor, inventory, and upgrade-plan schemas.
- 相关Markdown文件使用标准的与
artifact_metadata。metatags - 机器记录使用版本化的doctor、清单与升级计划架构。
0.7 Specs Index
0.7 规范索引
- Read first and use
_ai_sdlc/specs-index.toonfor human review.specs-index.md - Operational reports do not refresh either index.
- 优先读取,并使用
_ai_sdlc/specs-index.toon供人工审核。specs-index.md - 运营报告不会刷新上述任一索引。
References
参考资料
- Read before interpreting health or upgrade safety.
references/doctor-contract.md - Use as the deterministic check registry.
references/diagnostics.json - Validate inventories with .
references/upgrade-inventory.schema.json - Use for all reports and plans.
scripts/doctor.py
- 在解读健康状况或升级安全性前,需阅读。
references/doctor-contract.md - 使用作为确定性检查注册表。
references/diagnostics.json - 使用验证清单。
references/upgrade-inventory.schema.json - 所有报告与计划均通过生成。
scripts/doctor.py
Script Usage
脚本使用
bash
python3 skills/ai-sdlc-doctor/scripts/doctor.py . --doctor --write
python3 skills/ai-sdlc-doctor/scripts/doctor.py . --upgrade --current current.json --target target.json --upgrade-id v2-preview --writebash
python3 skills/ai-sdlc-doctor/scripts/doctor.py . --doctor --write
python3 skills/ai-sdlc-doctor/scripts/doctor.py . --upgrade --current current.json --target target.json --upgrade-id v2-preview --writePurpose
目标
Make operational gaps and upgrade risk reviewable before any installation mutation.
在执行任何安装变更前,让运营缺口与升级风险可被审核。
Steps
步骤
- Run registered prerequisite, layout, module, skill, and docs checks.
- Report evidence and exact remediation without executing it.
- Validate current and target inventories and API compatibility.
- Diff files into add, modify, remove, unchanged, and schema-migration actions.
- Plan backups for every modified or removed file.
- Plan reverse-order rollback for every proposed change.
- Emit TOON-first records; require a later authorized workflow to apply them.
- 运行已注册的前置条件、布局、模块、Skill与文档检查。
- 报告证据与具体修复方案,但不执行。
- 验证当前与目标清单及API兼容性。
- 将文件差异分为新增、修改、删除、无变更与架构迁移操作。
- 为每个修改或删除的文件规划备份。
- 为每个拟议的变更规划逆序回滚操作。
- 优先输出TOON格式记录;需后续授权工作流方可执行变更。
Output Spec
输出规范
Doctor checks have stable codes, statuses, evidence, and remediation. Upgrade
plans contain exact hashes, schema transitions, backup destinations, rollback
actions, compatibility blockers, and deterministic identity.
Doctor检查具备稳定的代码、状态、证据与修复方案。升级计划包含精确哈希、架构转换、备份目标、回滚操作、兼容性阻塞项与确定性标识。
Scope Boundary
范围边界
- Do not install dependencies or modify the installation.
- Do not execute remediation, backup, migration, apply, or rollback actions.
- Do not hide incompatible or destructive changes behind an aggregate status.
- 不得安装依赖或修改现有安装。
- 不得执行修复、备份、迁移、应用或回滚操作。
- 不得将不兼容或破坏性变更隐藏在聚合状态之后。