ai-sdlc-quality-lenses
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseai-sdlc-quality-lenses: Traceable Cross-Artifact Review
ai-sdlc-quality-lenses:可追溯的跨工件审查
Internal AI SDLC skill, not client-facing by default. Every rule below is important to follow. None of it can be skipped. Findings are proposals for review, not authority to change source artifacts.
内部AI SDLC Skill,默认不面向客户。 以下每条规则都必须遵守,无一例外。 审查结论是供评审的提议,而非修改源工件的权限。
0. Skill Card
0. Skill卡片
- Skill name:
ai-sdlc-quality-lenses - Primary audience: BA, QA, Dev, Delivery
- Supporting audience: PM, Architecture, Security
- Audience tags: BA, QA, Dev, Delivery, PM
- SDLC stage: Cross-lifecycle quality review
- Purpose: Apply reusable challenge lenses and finalize evidence-backed findings.
- Output: and
quality-lens-report.md_ai_sdlc/quality-lens-report.toon
- Skill名称:
ai-sdlc-quality-lenses - 主要受众: BA、QA、Dev、交付人员
- 支持受众: PM、架构师、安全人员
- 受众标签: BA, QA, Dev, Delivery, PM
- SDLC阶段: 跨生命周期质量审查
- 目的: 应用可复用的质疑视角,最终确定有证据支持的审查结论。
- 输出: 和
quality-lens-report.md_ai_sdlc/quality-lens-report.toon
0.1 Required Inputs
0.1 必填输入项
- One readable source artifact.
- One or more lens identifiers from .
references/quality-lenses.json - A feature or initiative identifier.
- An owner for every finding.
- 一份可读的源工件。
- 一个或多个来自的视角标识符。
references/quality-lenses.json - 一个特性或举措标识符。
- 每个审查结论的负责人。
0.2 Clarification Rules
0.2 澄清规则
- Ask only when the artifact, review objective, or accountable owner is ambiguous.
- Record uncertainty as a finding; do not invent evidence or trace targets.
- Treat a lens with no supported finding as a valid clean result.
- Do not silently convert a finding into a requirement, decision, or task.
- 仅当工件、审查目标或负责人不明确时才提出询问。
- 将不确定性记录为审查结论;不得编造证据或追溯目标。
- 未发现问题的视角视为有效的无问题结果。
- 不得擅自将审查结论转换为需求、决策或任务。
0.2.1 Flow Mode Flags
0.2.1 流程模式标识
- Support and
--quick-flow; full flow takes precedence.--full-flow - Quick flow uses the explicitly selected lenses, or the registry defaults.
- Full flow applies every lens whose includes the artifact kind.
applies_to - Both modes use the same finding schema and finalization gates.
- 支持和
--quick-flow;完整流程优先级更高。--full-flow - 快速流程使用明确选定的视角,或注册表默认视角。
- 完整流程应用所有包含工件类型的视角。
applies_to - 两种模式使用相同的审查结论 schema 和最终确认门槛。
0.3 Output Rules
0.3 输出规则
- Return selected lenses, finding counts by severity and status, blockers, and output paths directly in the Codex response.
- Before the final response, emit with
ai-sdlc-handoff/v1,result,blockers, andnext_required; every action includesnext_optional,reason, andcommand.expected_artifact - Do not create ,
summary.txt, or unregistered review files.*-summary.txt - Never finalize a finding without evidence, severity, trace targets, owner, resolution status, and next action.
- 在Codex响应中直接返回选定的视角、按严重程度和状态统计的结论数量、阻塞项以及输出路径。
- 在最终响应前,发送带有、
result、blockers和next_required的next_optional;每个操作都包含ai-sdlc-handoff/v1、reason和command。expected_artifact - 不得创建、
summary.txt或未注册的审查文件。*-summary.txt - 若无证据、严重程度、追溯目标、负责人、解决状态和下一步操作,不得最终确认任何审查结论。
0.4 Artifact Routing
0.4 工件路由
- Default human output: .
<artifact-parent>/quality-lens-report.md - Default machine output: .
<artifact-parent>/_ai_sdlc/quality-lens-report.toon - Use to route the pair to an owning feature directory.
--output-root - Keep the source artifact unchanged; reports are review evidence.
- 默认人类可读输出: 。
<artifact-parent>/quality-lens-report.md - 默认机器可读输出: 。
<artifact-parent>/_ai_sdlc/quality-lens-report.toon - 使用将这两份文件路由至所属特性目录。
--output-root - 保持源工件不变;报告作为审查证据。
0.5 Feature State Machine
0.5 特性状态机
- Quality review does not advance lifecycle state by itself.
- Read to understand the current stage and valid owner.
_ai_sdlc/state.toon - is read-only;
--state-checkand--begin-stateare rejected by the report finalizer.--complete-state - Route accepted findings to the owning workflow for lifecycle changes.
- 质量审查本身不会推进生命周期状态。
- 读取以了解当前阶段和有效负责人。
_ai_sdlc/state.toon - 为只读;报告最终器会拒绝
--state-check和--begin-state。--complete-state - 将已接受的审查结论路由至所属工作流以进行生命周期变更。
0.6 Artifact Metadata And Metatags
0.6 工件元数据与元标签
- Markdown starts with using schema
artifact_metadata.ai-sdlc-quality-report-metadata/v1 - Include for
metatags,ai-sdlc, selected lenses, andquality-lens.evidence-backed - Record the source artifact, registry version, feature, flow mode, and trace identifiers in metadata.
- Markdown文件开头需使用,遵循
artifact_metadataschema。ai-sdlc-quality-report-metadata/v1 - 包含:
metatags、ai-sdlc、选定的视角以及quality-lens。evidence-backed - 在元数据中记录源工件、注册表版本、特性、流程模式和追溯标识符。
0.7 Specs Index
0.7 规范索引
- Review the relevant or
specs/_ai_sdlc/specs-index.toonbefore broad reads.specs-refiniment/_ai_sdlc/specs-index.toon - Refresh or
specs/specs-index.mdonly when the report is routed into that workspace and the owning workflow requires it.specs-refiniment/specs-index.md - Do not use a quality report as a replacement for source requirements, decisions, tests, tasks, or state.
- 在进行广泛阅读前,查看相关的或
specs/_ai_sdlc/specs-index.toon。specs-refiniment/_ai_sdlc/specs-index.toon - 仅当报告被路由至该工作区且所属工作流要求时,才刷新或
specs/specs-index.md。specs-refiniment/specs-index.md - 不得将质量报告作为源需求、决策、测试、任务或状态的替代。
References
参考资料
- Read to select applicable lenses.
references/quality-lenses.json - Read before creating or changing findings.
references/finding-contract.md - Use to list lenses, validate findings, and emit or atomically write the canonical report pair.
scripts/quality_lens_report.py
- 读取以选择适用的视角。
references/quality-lenses.json - 在创建或修改审查结论前,阅读。
references/finding-contract.md - 使用列出视角、验证审查结论,并生成或原子性写入标准报告文件对。
scripts/quality_lens_report.py
Script Usage
脚本使用方法
bash
python3 skills/ai-sdlc-quality-lenses/scripts/quality_lens_report.py --list-lenses --format markdown
python3 skills/ai-sdlc-quality-lenses/scripts/quality_lens_report.py --artifact specs/example/requirements.md --artifact-kind requirements --feature example --findings /tmp/findings.json --lens edge-case-hunt --emit --quick-flow
python3 skills/ai-sdlc-quality-lenses/scripts/quality_lens_report.py --artifact specs/example/design.md --artifact-kind design --feature example --findings /tmp/findings.json --write --full-flow--emit--writebash
python3 skills/ai-sdlc-quality-lenses/scripts/quality_lens_report.py --list-lenses --format markdown
python3 skills/ai-sdlc-quality-lenses/scripts/quality_lens_report.py --artifact specs/example/requirements.md --artifact-kind requirements --feature example --findings /tmp/findings.json --lens edge-case-hunt --emit --quick-flow
python3 skills/ai-sdlc-quality-lenses/scripts/quality_lens_report.py --artifact specs/example/design.md --artifact-kind design --feature example --findings /tmp/findings.json --write --full-flow--emit--writePurpose
目的
Turn reusable critical-thinking modes into consistent, portable review
evidence instead of one-off prose that loses ownership and traceability.
将可复用的批判性思维模式转化为一致、可移植的审查证据,而非失去所有权和可追溯性的一次性文字记录。
Inputs
输入项
- Read the source artifact and its direct trace sources.
- Select lenses by applicability and review risk.
- Create a JSON array conforming to .
references/finding-contract.md - Anchor evidence to an exact repository-relative path and positive line.
- 读取源工件及其直接追溯来源。
- 根据适用性和审查风险选择视角。
- 创建符合的JSON数组。
references/finding-contract.md - 将证据锚定到精确的仓库相对路径和具体行号。
Steps
步骤
- Inspect the registry and select applicable lenses.
- Read the source artifact plus targeted requirement, decision, test, or task evidence needed by those lenses.
- Apply each lens independently; distinguish observed evidence from impact.
- Create findings with stable IDs and all required contract fields.
- Run the finalizer with and correct every validation error.
--emit - Run only after owners and trace targets are credible.
--write - Route open findings to the owning skill; preserve accepted, mitigated, rejected, and deferred resolution states in later reviews.
- 检查注册表并选择适用的视角。
- 读取源工件以及这些视角所需的针对性需求、决策、测试或任务证据。
- 独立应用每个视角;区分观察到的证据与影响。
- 创建带有稳定ID和所有必填合约字段的审查结论。
- 使用运行最终器,并修正所有验证错误。
--emit - 仅当负责人和追溯目标可信后,才运行。
--write - 将未解决的审查结论路由至所属Skill;在后续审查中保留已接受、已缓解、已拒绝和已推迟的解决状态。
Output Spec
输出规范
The TOON schema contains registry version, artifact,
artifact kind, feature, flow mode, selected lenses, summary counts, and findings
with , , , , ,
, , , , and .
ai-sdlc-quality-report/v1idlensevidence_pathevidence_lineevidence_detailseveritytrace_targetsownerresolution_statusnext_actionQuality gate:
- Pass when every finding uses a registered selected lens and contains all required evidence, traceability, ownership, state, and action fields.
- Fail when evidence is vague, a trace target is empty, a status is unknown, a severity is invalid, or a selected lens is not registered/applicable.
TOON schema 包含注册表版本、工件、工件类型、特性、流程模式、选定的视角、汇总统计以及审查结论,结论包含、、、、、、、、和。
ai-sdlc-quality-report/v1idlensevidence_pathevidence_lineevidence_detailseveritytrace_targetsownerresolution_statusnext_action质量门槛:
- 当每个审查结论都使用已注册的选定视角,且包含所有必填的证据、可追溯性、所有权、状态和操作字段时,视为通过。
- 当证据模糊、追溯目标为空、状态未知、严重程度无效或选定视角未注册/不适用时,视为失败。
Examples
示例
Valid finding:
json
{"id":"QL-001","lens":"edge-case-hunt","evidence":{"path":"specs/payments/requirements.md","line":88,"detail":"Timeout behavior is unspecified"},"severity":"high","trace_targets":["AC-004","TC-012"],"owner":"BA","resolution_status":"open","next_action":"Define timeout and retry acceptance behavior."}Invalid counter-example: It has no exact evidence,
trace target, owner, status, or executable next action.
The design feels risky.有效审查结论:
json
{"id":"QL-001","lens":"edge-case-hunt","evidence":{"path":"specs/payments/requirements.md","line":88,"detail":"Timeout behavior is unspecified"},"severity":"high","trace_targets":["AC-004","TC-012"],"owner":"BA","resolution_status":"open","next_action":"Define timeout and retry acceptance behavior."}无效反例: 该表述没有精确的证据、追溯目标、负责人、状态或可执行的下一步操作。
The design feels risky.Edge Cases
边缘案例
- An empty findings array is valid and explicitly reports zero findings.
- Full flow selects only lenses applicable to the declared artifact kind.
- A finding may trace to multiple requirement, test, task, risk, or decision identifiers; preserve them as slash-separated values in TOON.
- Rejected and deferred findings still retain evidence and next action so the decision remains auditable.
- 空审查结论数组是有效的,会明确报告零结论。
- 完整流程仅选择适用于已声明工件类型的视角。
- 一份审查结论可追溯至多个需求、测试、任务、风险或决策标识符;在TOON中保留为斜杠分隔的值。
- 已拒绝和已推迟的审查结论仍需保留证据和下一步操作,以便决策具备可审计性。
Scope Boundary
范围边界
- Do not edit the reviewed artifact as part of report finalization.
- Do not accept, reject, or defer findings without the accountable owner.
- Do not use generic model opinion as evidence.
- Do not advance lifecycle state or weaken protected rigor gates.
- Use when the owning remediation workflow is unclear.
$ai-sdlc-navigator
- 不得在报告最终确认时编辑被审查的工件。
- 未经负责人确认,不得接受、拒绝或推迟审查结论。
- 不得将通用模型观点作为证据。
- 不得推进生命周期状态或削弱受保护的严谨门槛。
- 当所属整改工作流不明确时,使用。
$ai-sdlc-navigator