Skip to content

Commit 8a5420b

Browse files
committed
fix: require navigation in report artifacts
1 parent a530a79 commit 8a5420b

8 files changed

Lines changed: 79 additions & 1 deletion

‎content/prompts/report-analysis.prompt.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ applyTo: .devcodex/**/reports/analysis/**
2323
> **状态**: 进行中 / 已完成
2424
```
2525

26+
## 目录导航
27+
28+
- [§1 核心问题](#1-核心问题)
29+
- [§2 调研范围](#2-调研范围)
30+
- [§3 分析结论](#3-分析结论)
31+
- [§4 支撑证据](#4-支撑证据)
32+
- [§5 风险、限制与开放问题](#5-风险限制与开放问题)
33+
- [§6 行动建议](#6-行动建议)
34+
- [§7 附录](#7-附录)
35+
2636
## §1 核心问题
2737

2838
> 一句话描述本次分析要回答的核心问题。

‎content/prompts/report-audit.prompt.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ applyTo: ".devcodex/**/reports/audit/**, .devcodex/**/reports/self-fix/**"
2929
> **控制面证据**: Concept Sync Map / HostContractVerification / CliDiagnosticContract / CheckpointValidation / LocalTaskTrace / TurnLivenessRecovery / SCV / 新增探针 / 黄色偏离 / 部署同步(按适用填写)
3030
```
3131

32+
## 目录导航
33+
34+
- [§1 审查轮次摘要](#1-审查轮次摘要)
35+
- [§2 执行维度清单](#2-执行维度清单)
36+
- [§3 问题清单](#3-问题清单)
37+
- [§4 通过项汇总](#4-通过项汇总)
38+
- [§5 风险与限制](#5-风险与限制)
39+
- [§6 结论](#6-结论)
40+
- [§7 附录](#7-附录)
41+
3242
当审查范围包含修复验证时,清单必须核对 `RepairPreventionAssessmentReviewGate`:当前修复 closure 与长期 prospective evidence 分列;缺 assessment、无理由 `no-new-control`、repeat escape 未升级或 current rerun 晋级 prevention 均记为 blocker。
3343

3444
每轮 audit 报告必须引用 candidate-bound `ReviewExecutionPlanV1`、fresh `ReviewEvidenceReceiptV1`、EvidenceSaturation、唯一 `ReviewStateSnapshotV1.snapshotDigest` 与 `StageTimingV1`;targeted 两轮、full/security/release 三轮门禁不因复用而减少。

‎content/prompts/report-dev.prompt.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ applyTo: .devcodex/**/reports/requirements/**
3030
> **ContextHandoffCard**: 触发时填写;未触发写 N/A + skipReason
3131
```
3232

33+
## 目录导航
34+
35+
- [§1 执行摘要](#1-执行摘要)
36+
- [§2 完成内容](#2-完成内容)
37+
- [§3 文件变更清单](#3-文件变更清单)
38+
- [§4 接口变更](#4-接口变更)
39+
- [§5 Breaking Changes](#5-breaking-changes)
40+
- [§6 测试验证](#6-测试验证)
41+
- [§7 后置处理](#7-后置处理)
42+
- [§8 交付物](#8-交付物)
43+
- [§9 风险与后续建议](#9-风险与后续建议)
44+
3345
## §1 执行摘要
3446

3547
> 一段话描述本次开发的核心内容和结果。

‎content/prompts/report-fix.prompt.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ applyTo: .devcodex/**/reports/bugs/**
3131
> **ContextHandoffCard**: 触发时填写;未触发写 N/A + skipReason
3232
```
3333

34+
## 目录导航
35+
36+
- [§1 问题摘要](#1-问题摘要)
37+
- [§2 修复方案](#2-修复方案)
38+
- [§3 CP 确认记录](#3-cp-确认记录)
39+
- [§4 修复三步扫描](#4-修复三步扫描)
40+
- [§5 回归验证](#5-回归验证)
41+
- [§6 时间线](#6-时间线incident-类型必填秒级精度供响应时效审计)
42+
- [§7 问题/建议验证](#7-问题建议验证)
43+
- [§8 交付物与后续](#8-交付物与后续)
44+
3445
## §1 问题摘要
3546

3647
**现象**:

‎content/prompts/report-optimization.prompt.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ applyTo: .devcodex/**/reports/optimizations/**
2525
> **支撑产物**: ExecutionContract / TestRoute / ReleaseAudit / ReleaseVerification / ConceptSyncMap / HostContractVerification / TaskResolutionV1 / CliDiagnosticContract / CheckpointValidation / LocalTaskTrace / ProjectKnowledge / ExecutionAttemptLedger / TurnLivenessRecovery / 05-实施进度.md(按触发状态填写)
2626
```
2727

28+
## 目录导航
29+
30+
- [§1 执行摘要](#1-执行摘要)
31+
- [§2 基准数据(优化前)](#2-基准数据优化前)
32+
- [§3 优化内容](#3-优化内容)
33+
- [§4 优化后数据](#4-优化后数据)
34+
- [§5 接口行为一致性](#5-接口行为一致性)
35+
- [§6 测试验证](#6-测试验证)
36+
- [§7 遗留问题](#7-遗留问题)
37+
- [§8 后续建议](#8-后续建议)
38+
2839
## §1 执行摘要
2940

3041
> 一段话描述本次性能优化的核心内容和结果。

‎content/prompts/report-scenario-test.prompt.md‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@ applyTo: .devcodex/**/reports/scenario-tests/**
2424
> **支撑产物**: ExecutionContract / TestRoute / ReleaseAudit / ReleaseVerification / ConceptSyncMap / HostContractVerification / CliDiagnosticContract / CheckpointValidation / LocalTaskTrace / TurnLivenessRecovery / 05-实施进度.md(按触发状态填写)
2525
```
2626

27+
## 目录导航
28+
29+
- [§1 执行摘要](#1-执行摘要)
30+
- [§2 测试场景](#2-测试场景)
31+
- [§3 负载测试配置](#3-负载测试配置)
32+
- [§4 测试结果](#4-测试结果)
33+
- [§5 场景验证结果](#5-场景验证结果)
34+
- [§6 测试数据说明](#6-测试数据说明)
35+
- [§7 发现的问题](#7-发现的问题)
36+
- [§8 结论与建议](#8-结论与建议)
37+
2738
## §1 执行摘要
2839

2940
> 一段话描述本次场景测试的目标和结论。
@@ -113,4 +124,4 @@ applyTo: .devcodex/**/reports/scenario-tests/**
113124

114125
## §7 遗留问题
115126

116-
<!-- devcodex:include shared/report/issue-suggestion-validation-table.md -->
127+
<!-- devcodex:include shared/report/issue-suggestion-validation-table.md -->

‎scripts/lib/validate-governance-prompts.js‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,17 @@ function buildGovernancePromptChecks(ctx) {
332332
mustInclude('prompts/general-doc.prompt.md', '**文档类型**', 'general doc prompt')
333333
mustInclude('prompts/general-doc.prompt.md', '## 4. 核心内容', 'general doc prompt')
334334

335+
for (const promptName of [
336+
'report-analysis.prompt.md',
337+
'report-audit.prompt.md',
338+
'report-dev.prompt.md',
339+
'report-fix.prompt.md',
340+
'report-optimization.prompt.md',
341+
'report-scenario-test.prompt.md'
342+
]) {
343+
mustInclude(`prompts/${promptName}`, '## 目录导航', `${promptName} navigation`)
344+
}
345+
335346
mustInclude('skills/dev-docs/SKILL.md', 'general-doc', 'dev docs skill')
336347
mustInclude('skills/dev-docs/SKILL.md', '长篇独立 Markdown 默认包含 `## 目录导航`', 'dev docs conditional navigation rule')
337348
mustInclude('skills/dev-docs/SKILL.md', '自动生成 outline/侧栏已覆盖导航', 'dev docs generated navigation exception')

‎scripts/test-requirement-artifacts.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ try {
237237
const reportSlot = baseRegistry.slots.find(slot => slot.slotId === 'task-report')
238238
const auditReportPath = path.join(requirementsRoot, 'good-requirement', 'reports', 'codex', '20260831', '09--独立复审报告.md')
239239
const auditBinding = createArtifactTemplateBinding({ slot: reportSlot, target: auditReportPath, intent: 'audit' })
240+
assert(auditBinding.requiredSemanticIds.includes('heading:目录导航'),
241+
'formal report artifacts must require a directory navigation section from the report template')
240242
const auditLines = auditBinding.requiredSemanticIds.map(semanticId => {
241243
if (semanticId === 'document-title') return '# 独立复审报告\n\n> **类型**:audit'
242244
return semanticId.startsWith('heading:') ? `## ${semanticId.slice('heading:'.length).replace(/-/g, ' ')}` : ''

0 commit comments

Comments
 (0)