---
name: cn-ib-ipo-workflow
description: Route and control Chinese IPO sponsor-execution work by lifecycle stage. Use when a task spans several files or skills, the IPO stage is unclear, or the user asks for an end-to-end plan covering 尽调、申报材料、申报前质控、签字盖章、审核问询、回复更新、加期更新 or 补充申报. Select and sequence the existing CN IB skills, define stage gates, and return one deliverable manifest without duplicating their substantive checks. Exclude secondary-market investment analysis.
---

# CN IB IPO Workflow

Identify the current IPO stage, invoke only the necessary specialist skills, and control the handoffs between them.

## Principles

1. Route before drafting. Do not run every skill merely because it is installed.
2. Treat the five IPO stages as lifecycle states, not independent checklists.
3. Reuse specialist skills; do not reproduce their rules in this orchestrator.
4. Require evidence and closure before moving to the next stage.
5. Preserve originals. For existing DOCX edits, default to native tracked changes.
6. Mark professional judgments and unresolved limitations for sponsor, counsel, or accountant review.

## Workflow

### 1. Identify the stage

Run:

```bash
python3 scripts/route_ipo_workflow.py "申报前检查全套文件并确认签章"
```

Read `references/stage-routing.md` when the task contains signals from several stages. State both the primary stage and any upstream dependency.

### 2. Build the task inventory

List:

- files and file types;
- transaction entity and board;
- reporting period and as-of date;
- current versions and comparison versions;
- requested output and reviewer;
- confidentiality or data-license constraints.

Do not assume a directory is complete. Record excluded files and unreadable formats.

### 3. Select specialist skills

Use `assets/ipo-stage-gates.csv`:

- Stage 1: `cn-ib-diligence-workpaper`, `cn-ib-regulatory-case-research`, `cn-ib-memo-builder`;
- Stage 2: `cn-ib-source-verifier`, `cn-ib-cross-document-check`;
- Stage 3: `cn-ib-filing-proofreader`, `cn-ib-cross-document-check`, `cn-ib-document-control`, optionally `cn-ib-deck-qc`;
- Stage 4: `cn-ib-inquiry-response-review`, plus case, source, and cross-document skills;
- Stage 5: `cn-ib-filing-refresh-control`, plus source, cross-document, proofreader, and document-control skills.

### 4. Execute in dependency order

Use this order unless the task requires a narrower path:

```text
inventory -> source/evidence checks -> substantive comparison -> drafting/redline
-> release QC -> document control -> reviewer closure
```

Never update prose before identifying the source and downstream documents affected.

### 5. Apply the stage gate

For each required gate in `assets/ipo-stage-gates.csv`, record:

```text
gate_id, status, evidence, owner, reviewer, limitation, next_action
```

Allowed statuses are `not_started`, `in_progress`, `blocked`, `ready_for_review`, and `closed`. A stage is not closed when a required gate lacks evidence or a reviewer.

### 6. Deliver one manifest

Return:

1. primary IPO stage and rationale;
2. files reviewed and scope limitations;
3. specialist skills used and why;
4. prioritized findings;
5. deliverables produced, including redline/clean status;
6. open items by owner;
7. stage-gate status and readiness for the next stage.

Do not create duplicate issue lists from each skill. Consolidate by issue ID and preserve the originating skill and evidence locator.
