# How the RIA-TV++ Pipeline Works: A Complete Guide to Its 7 Stages

> Uncover the 7 stages of the RIA-TV++ pipeline Learn how it transforms text into agent-executable skills through extraction verification and testing

- Repository: [kangarooking/cangjie-skill](https://github.com/kangarooking/cangjie-skill)
- Tags: deep-dive
- Published: 2026-08-16

---

**The RIA-TV++ pipeline transforms raw text into structured, agent-executable skills through seven sequential stages that include parallel extraction, triple verification, and pressure testing.**

The **RIA-TV++** pipeline is the core methodology powering the **cangjie-skill** open-source project. It converts unstructured sources—books, transcripts, podcasts—into a corpus of **atomic, traceable, and runnable AI skills**. Each stage produces a defined artefact and enforces a quality gate, with automatic rollback on failure.

## The Seven Stages of RIA-TV++ Pipeline Processing

| Stage | Name | Core Purpose | Output File |
|-------|------|--------------|-------------|
| 0 | **整书理解** (Adler Analysis) | Whole-book comprehension via Mortimer Adler's four-step method | [`BOOK_OVERVIEW.md`](https://github.com/kangarooking/cangjie-skill/blob/main/BOOK_OVERVIEW.md) |
| 1 | **并行提取** (Parallel Extraction) | Five sub-agents harvest candidate units simultaneously | `candidates/*.md` |
| 1.5 | **三重验证** (Triple Verification) | Quality gates for cross-domain support, predictive power, and uniqueness | Accepted/rejected candidate lists |
| 2 | **RIA++ 构造** (RIA++ Construction) | Build executable skill skeleton with E (Execution) and B (Boundary) extensions | Individual [`SKILL.md`](https://github.com/kangarooking/cangjie-skill/blob/main/SKILL.md) files |
| 3 | **链接** (Zettelkasten Linking) | Atomise skills and create explicit inter-skill relationships | [`INDEX.md`](https://github.com/kangarooking/cangjie-skill/blob/main/INDEX.md) |
| 4 | **压力测试** (Pressure Testing) | Robustness verification via bait questions and confusion tests | [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) |
| 5 | **交付** (Delivery) | Human-readable digest and agent-ready installation | [`DIGEST.md`](https://github.com/kangarooking/cangjie-skill/blob/main/DIGEST.md) + installed skills |

The pipeline is **linear but feedback-enabled**: failures trigger rollback to the appropriate earlier stage.

## Stage 0: Adler-Style Whole-Book Comprehension

The first stage applies **Mortimer Adler's four-step reading methodology**—Structure, Interpret, Critical, Applicability—to build a high-level overview.

This stage outputs [`BOOK_OVERVIEW.md`](https://github.com/kangarooking/cangjie-skill/blob/main/BOOK_OVERVIEW.md), documented in [[`methodology/01-stage0-adler.md`](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/01-stage0-adler.md)](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/01-stage0-adler.md). The overview serves as the foundation for all subsequent extraction decisions.

## Stage 1: Parallel Extraction with Five Specialized Agents

Stage 1 deploys **five extractor sub-agents concurrently** to harvest candidate skill units from the source text. According to [[`methodology/02-stage1-parallel-extract.md`](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/02-stage1-parallel-extract.md)](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/02-stage1-parallel-extract.md), the extractors specialize in:

- **Framework** extraction (mental models and systems)
- **Principle** extraction (core rules and heuristics)
- **Case** extraction (concrete examples and applications)
- **Counter-example** extraction (failure modes and edge cases)
- **Glossary** extraction (defined terms and domain vocabulary)

The prompt templates reside in [`extractors/*.md`](https://github.com/kangarooking/cangjie-skill/tree/main/extractors), enabling customization for different content domains.

## Stage 1.5: Triple Verification Quality Gate

This sub-stage enforces **three independent validation criteria** per [[`methodology/03-stage1.5-triple-verify.md`](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/03-stage1.5-triple-verify.md)](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/03-stage1.5-triple-verify.md):

- **V1: Cross-domain support** — Does the skill transfer beyond its original context?
- **V2: Predictive power** — Does it enable accurate future-state predictions?
- **V3: Uniqueness** — Does it avoid duplication with existing skills?

Accepted candidates proceed; rejected ones are archived to `rejected/` with failure tags for auditability.

## Stage 2: RIA++ Construction — Making Skills Agent-Executable

Stage 2 assembles verified units into the **RIA++ skeleton**, extending the classic **R-I-A** (Quote-Reconstruction-Application) format with two agent-oriented fields:

- **E: Executable steps** — Concrete, runnable instructions
- **B: Boundary** — Scope limits and safety constraints

The output is a collection of individual [`SKILL.md`](https://github.com/kangarooking/cangjie-skill/blob/main/SKILL.md) files, one per atomic skill, following the template in [`templates/SKILL.md.template`](https://github.com/kangarooking/cangjie-skill/tree/main/templates). Full specification is in [[`methodology/04-stage2-ria-plus.md`](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/04-stage2-ria-plus.md)](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/04-stage2-ria-plus.md).

## Stage 3: Zettelkasten Linking for Composability

Stage 3 applies **Luhmann's Zettelkasten principles** to create explicit links between skills. This produces [[`INDEX.md`](https://github.com/kangarooking/cangjie-skill/blob/main/INDEX.md)](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/05-stage3-zettelkasten.md)—a graph of inter-skill relationships that enables:

- Complex reasoning chains across multiple skills
- Discovery of related capabilities
- Evolution tracking as the skill corpus grows

## Stage 4: Pressure Testing with Automatic Reconstruction

Stage 4 designs **adversarial test prompts** including bait questions and cross-skill confusion scenarios, as specified in [[`methodology/06-stage4-pressure-test.md`](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/06-stage4-pressure-test.md)](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/06-stage4-pressure-test.md).

Failures trigger a **full reconstruction loop** returning to Stage 2. Successful tests produce [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) and finalised [`SKILL.md`](https://github.com/kangarooking/cangjie-skill/blob/main/SKILL.md) files.

## Stage 5: Delivery and Installation

The final stage produces:

- **[`DIGEST.md`](https://github.com/kangarooking/cangjie-skill/blob/main/DIGEST.md)** — A long-form, human-readable summary
- **Installed skill packs** — Agent-invocable modules in `skills/`

Per [[`methodology/07-stage5-deliver.md`](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/07-stage5-deliver.md)](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/07-stage5-deliver.md), this completes the **Standard Operating Procedure (SOP)** for skill distillation.

## Running the RIA-TV++ Pipeline: Code Examples

### Command-Line Interface

```bash

# Prepare raw source text

cp /path/to/book.txt books/my-book/raw.txt

# Execute full pipeline

cangjie-skill run --book books/my-book/raw.txt --output skills/my-book

# Inspect outputs

cat skills/my-book/BOOK_OVERVIEW.md
ls skills/my-book/candidates/
cat skills/my-book/skills/001-framework.md

# Run pressure tests

cangjie-skill test --skill-dir skills/my-book

# View final delivery

cat skills/my-book/DIGEST.md

```

### Programmatic Python API

```python
from cangjie_skill.pipeline import Pipeline

pipeline = Pipeline(
    source_path="books/my-book/raw.txt",
    output_dir="skills/my-book"
)

pipeline.run()               # Stages 0-5

pipeline.run_pressure_test()  # Explicit Stage 4

pipeline.generate_digest()    # Stage 5 delivery

```

## Key Architectural Features of RIA-TV++

- **Agent-Oriented Extension (`++`)** — Adds Executable (`E`) and Boundary (`B`) fields for safe agent invocation
- **Parallelism** — Five extractors run concurrently for speed and coverage
- **Triple Verification** — Three independent quality gates prevent low-quality skills from entering the corpus
- **Zettelkasten Linking** — Graph-based relationships enable composable reasoning
- **Pressure Testing** — Systematic blind-test mimics real-world prompting scenarios

## Summary

- The **RIA-TV++ pipeline** in kangaroking/cangjie-skill converts raw text into **structured, agent-executable skills** through seven defined stages
- **Stage 0** produces [`BOOK_OVERVIEW.md`](https://github.com/kangarooking/cangjie-skill/blob/main/BOOK_OVERVIEW.md) via Adler's four-step reading method
- **Stages 1-1.5** use **five parallel extractors** followed by **triple verification** (V1/V2/V3)
- **Stage 2** builds the **RIA++ skeleton** with Execution (`E`) and Boundary (`B`) extensions
- **Stage 3** generates [`INDEX.md`](https://github.com/kangarooking/cangjie-skill/blob/main/INDEX.md) via Zettelkasten linking principles
- **Stage 4** runs **pressure tests** with automatic rollback to Stage 2 on failure
- **Stage 5** delivers [`DIGEST.md`](https://github.com/kangarooking/cangjie-skill/blob/main/DIGEST.md) and installs skills for agent invocation
- The pipeline exposes both **CLI** (`cangjie-skill run`) and **Python API** (`Pipeline.run()`)

## Frequently Asked Questions

### What does "RIA-TV++" stand for?

**RIA-TV++** abbreviates **R**eading-**I**nterpretation-**A**pplication with **T**riple-**V**erification and the agent-oriented **++** extension (Execution + Boundary). The naming reflects its dual heritage: classic reading methodology plus modern AI-agent engineering requirements. As implemented in kangaroking/cangjie-skill, the `++` specifically denotes the **E** (Executable steps) and **B** (Boundary) fields added to the traditional R-I-A skeleton.

### How does the triple verification in Stage 1.5 prevent skill duplication?

The **V3: Uniqueness** criterion explicitly checks each candidate against the existing skill corpus using semantic similarity and functional overlap detection. Per [[`methodology/03-stage1.5-triple-verify.md`](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/03-stage1.5-triple-verify.md)](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/03-stage1.5-triple-verify.md), a candidate fails V3 if it replicates an existing skill's core mechanism without adding novel predictive power or cross-domain applicability. Rejected candidates are tagged and archived to `rejected/` with failure reason codes.

### Can I customize the five parallel extractors for my domain?

Yes. The extractor prompts in [`extractors/*.md`](https://github.com/kangarooking/cangjie-skill/tree/main/extractors) are template-based and fully editable. Each extractor (framework, principle, case, counter-example, glossary) follows a consistent schema: role definition, extraction criteria, and output format. Domain adaptation typically involves modifying the criteria section—for example, adjusting "framework" definitions for legal versus medical texts—while preserving the parallel execution structure in [[`methodology/02-stage1-parallel-extract.md`](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/02-stage1-parallel-extract.md)](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/02-stage1-parallel-extract.md).

### What triggers a rollback to Stage 2 during pressure testing?

Per [[`methodology/06-stage4-pressure-test.md`](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/06-stage4-pressure-test.md)](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/06-stage4-pressure-test.md), rollback occurs when a skill fails any of three test categories: **bait questions** (the skill responds to trick prompts), **cross-skill confusion** (the skill mispatterns inputs belonging to other skills), or **boundary violations** (the skill executes outside its declared scope). The reconstruction loop preserves the original candidate source from Stage 1 but requires rebuilding the RIA++ skeleton with adjusted Execution steps or tightened Boundary constraints.