# Narrative Spine Designer

> 生成综述叙事主线与论证骨架。 Use when: consensus_map 已完成. Do not use when: narrative_spine.md 已批准.

- **Type:** Skill
- **Install:** `agentstack add skill-woshixiguaweierde-codex-sci-review-agent-s13-narrative-spine-designer`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [woshixiguaweierde](https://agentstack.voostack.com/s/woshixiguaweierde)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [woshixiguaweierde](https://github.com/woshixiguaweierde)
- **Source:** https://github.com/woshixiguaweierde/codex-sci-review-agent/tree/main/.agents/skills/S13-narrative-spine-designer

## Install

```sh
agentstack add skill-woshixiguaweierde-codex-sci-review-agent-s13-narrative-spine-designer
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## Identity
- Skill ID: S13
- Slug: narrative-spine-designer
- Directory: .agents/skills/S13-narrative-spine-designer/
- Name: Narrative Spine Designer
- 中文角色: 综述叙事主线设计
- Stage: C_structure_writing
- Skill Type: business
- Human Gate: G3
- Required QA Hooks: - Q02
- Q04

## Mission
生成综述叙事主线与论证骨架。

此 skill 在综述生产流水线中的角色：综述叙事主线设计。它在"C_structure_writing"阶段运行，
生成结构化产物供下游 skill 消费，并在 G3 处接受人工审核。

## Scientific Role in the Workflow
- **所处阶段**: 叙事架构阶段——基于证据共识/冲突图，设计贯穿全文的论证逻辑链
- **产出形式**: narrative_spine.md + thesis_map.json
- **人机协同点**: 产物在 G3 处需人工审签；关键决策记录在 decision_log.md 中
- **对下游的价值**: 为 S14 大纲提供叙事骨架，确保综述'有论点而非堆文献'

## Scope of Responsibility
- 本 skill 仅负责 叙事策略选择、central thesis 提炼、论点-证据映射
- 不负责 章节大纲生成（那是 S14 的职责）
- 不负责 实际写作（那是 S16-S19 的职责）

## Trigger When
consensus_map 已完成

## Do Not Trigger When
narrative_spine.md 已批准

## Required Inputs
- evidence_matrix.json
- consensus_map.md
- benchmark_notes.md

## Optional Inputs
- 用户指定的叙事风格偏好

## Output Contract
1. 所有输出文件写入 `/artifacts/run-/stage-3/` 目录下
2. 结构化输出（.json / .csv）优先于叙述性输出（.md），必须通过 schemas/ 下对应 JSON Schema 校验
3. 每个输出产物在 artifact registry 中注册时，须记录其上游依赖、生成时间、生成器和版本号
4. 产物格式优先级：结构化数据 (.json) > 表格 (.csv) > 叙述性 Markdown (.md) > 自由文本
5. 产物路径和命名遵循 `configs/artifact_registry_rules.json` 中定义的规范

## Expected Outputs
- narrative_spine.md
- thesis_map.json

## Operational Steps
1. 验证所有 Required Inputs 存在且可读，缺失则立即停止并报告
2. 加载相关 Schema 和契约文件（schemas/ 目录下）
3. 仅执行 Purpose 与 Scope of Responsibility 中定义的任务，不漂移到相邻 skill 的职责
4. 先产出结构化数据（.json / .csv），再生成叙述性说明（.md）
5. 记录所有假设、未解决的歧义和失败追踪信息
6. 若置信度不足（如关键数据缺失导致无法做出科学判断），停止执行并升级给人工，不得猜测或编造

## Decision / Writing / Validation Principles
- 结构化字段优先：先填满 schema 的 required 字段，再补充 optional 字段
- 证据三元组：每个科学论断必须包含 (source_id, finding_direction, evidence_strength)
- 冲突分类：如发现证据方向矛盾，标记为 direction_conflict 而非强行选边
- 术语一致性：同一实体在全文中使用统一的 canonical term（参见 configs/ontology/）
- 保守推断：不在证据不足时声称"clearly" "definitively" "proves"

## Hard Constraints
- 不得编造 DOI、PMID、样本量、统计值、期刊身份或研究结论
- 不得静默覆盖已有高版本 artifact（必须 version incrementally，参见 AGENTS.md）
- 不得删除上游可审计痕迹（raw exports、screening decisions、extraction logs 必须保留）
- 不得绕过 Gate 或把 QA 结论写成"已人工确认"（除非真正通过了人工审核）
- 叙事主线不能与证据矩阵脱节——每个论点必须有 evidence 锚
- 不能为了'故事好听'而忽略/淡化矛盾证据
- 不能在 weak evidence 的基础上写 strong claims

## QA Hooks
- Q02
- Q04

## Human-in-the-Loop Checkpoint
- 产出物完成后，进入 G3 等待人工审核
- 审核通过前，下游 skill 不得启动
- 若人工审核要求修订，返回上游 skill（参见 `orchestrator/state_machine/transitions.yaml`）

## Acceptance Checklist (Self-Verification Before Declaring Done)
- [ ] 所有 Required Inputs 已加载且完整
- [ ] 所有 Expected Outputs 已生成且非空
- [ ] 结构化输出通过对应 JSON Schema 校验
- [ ] 产物已在 artifact registry 中注册（含 checksum + version）
- [ ] QA hooks 中列出的所有 QA skill 已触发
- [ ] decision_log.md 记录了关键决策及其理由

## Failure Handling
- **缺少输入**: 发出 blocking error，立即停止，不继续执行
- **Schema 校验失败**: 重试一次（带错误上下文修正）；若第二次仍失败，升级给 checkpoint manager
- **下游污染风险**: 如果当前产物可能影响下游 skill 的正确性，标记为 `status: blocked`，阻止流水线继续
- **领域特定失败**: 若 central thesis 无法形成（证据过于零散）→ 标记 narrative_readiness: low
- **重试耗尽**: 若达到 orchestrator/retry_policies/ 中定义的最大重试次数，升级给人工

## Logging and Observability
每个 skill 必须产出以下日志文件（写入 `/artifacts/run-/logs/S13/`）：
- `input_manifest.json` — 所有输入的路径和校验和
- `output_manifest.json` — 所有输出的路径和校验和
- `validation_result.json` — Schema 校验结果
- `decision_log.md` — 关键决策及其理由
- `failure_trace.md` — 失败时的错误堆栈（如有）

## Collaboration Notes for Codex / Orchestrator
- 执行前先读取 `AGENTS.md` 获取项目级非协商规则
- 执行前先读取 `configs/skills_manifest.json` 确认本 skill 的上下游依赖
- 产物注册使用 `orchestrator/artifact_registry/registry_v2.py` 的统一接口

## Definition of Done
1. 所有 Expected Outputs 已写入磁盘并通过 Schema 校验
2. 所有 Required QA Hooks 已触发并获得非 blocking 结果
3. 产物已在 artifact registry 中注册，具备完整的 provenance 记录

## Examples

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [woshixiguaweierde](https://github.com/woshixiguaweierde)
- **Source:** [woshixiguaweierde/codex-sci-review-agent](https://github.com/woshixiguaweierde/codex-sci-review-agent)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-woshixiguaweierde-codex-sci-review-agent-s13-narrative-spine-designer
- Seller: https://agentstack.voostack.com/s/woshixiguaweierde
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
