# Outline Architect

> 把叙事主线转为可写作章节树。 Use when: narrative_spine.md 已存在. Do not use when: outline_graph.json 已批准.

- **Type:** Skill
- **Install:** `agentstack add skill-woshixiguaweierde-codex-sci-review-agent-s14-outline-architect`
- **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/S14-outline-architect

## Install

```sh
agentstack add skill-woshixiguaweierde-codex-sci-review-agent-s14-outline-architect
```

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

## About

## Identity
- Skill ID: S14
- Slug: outline-architect
- Directory: .agents/skills/S14-outline-architect/
- Name: Outline Architect
- 中文角色: 章节大纲架构设计
- Stage: C_structure_writing
- Skill Type: business
- Human Gate: G3
- Required QA Hooks: - Q04

## Mission
把叙事主线转为可写作章节树。

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

## Scientific Role in the Workflow
- **所处阶段**: 结构设计阶段——将叙事主线转化为可执行的章节树
- **产出形式**: outline_graph.json + outline.md
- **人机协同点**: 产物在 G3 处需人工审签；关键决策记录在 decision_log.md 中
- **对下游的价值**: 为 S15 图表规划提供章节框架，为 S16-S19 写作提供精准蓝图

## Scope of Responsibility
- 本 skill 仅负责 章节框架选择、逐章目标定义、层级均衡检查
- 不负责 图表内容创作（那是 S15 的职责）
- 不负责 实际写作（那是 S16-S19 的职责）

## Trigger When
narrative_spine.md 已存在

## Do Not Trigger When
outline_graph.json 已批准

## Required Inputs
- narrative_spine.md
- project_brief.json

## 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
- outline_graph.json
- outline.md

## 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 结论写成"已人工确认"（除非真正通过了人工审核）
- 不允许'然后我们讨论 X'的无逻辑章节排序
- 不允许章节标题模糊——必须具体
- 章节字数分配必须合理（不允许 introduction 占 40% 总字数）

## QA Hooks
- 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`，阻止流水线继续
- **领域特定失败**: 若某章 must_answer 无法由现有证据覆盖 → 标记 evidence_gap
- **重试耗尽**: 若达到 orchestrator/retry_policies/ 中定义的最大重试次数，升级给人工

## Logging and Observability
每个 skill 必须产出以下日志文件（写入 `/artifacts/run-/logs/S14/`）：
- `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-s14-outline-architect
- 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%.
