# Table Schema

Define evidence-first table schemas for a survey: what each table must answer, row...

- Repository: https://github.com/WILLOSCAR/research-units-pipeline-skills (517 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-10-05
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add WILLOSCAR/research-units-pipeline-skills --skill table-schema -g -a claude-code -y`
Codex: `npx skills add WILLOSCAR/research-units-pipeline-skills --skill table-schema -g -a codex -y`
Cursor: `npx skills add WILLOSCAR/research-units-pipeline-skills --skill table-schema -g -a cursor -y`
Gemini CLI: `npx skills add WILLOSCAR/research-units-pipeline-skills --skill table-schema -g -a gemini-cli -y`

## Description

Define evidence-first table schemas for a survey: what each table must answer, row unit, columns, and which evidence-pack fields are required to fill it.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Table Schema (two layers: index vs Appendix)

## Triggers & routing

- **Trigger**: table schema, schema-first tables, table design, 表格 schema, 先 schema 后填充.
- **Use when**: you want survey tables that are verifiable and fillable before LaTeX (typically Stage C4, after evidence packs exist).


Tables are not decorations; they are compression.

A common failure mode in this pipeline: the first table that gets generated looks like an internal index.
So we separate tables into two layers:

1) `outline/tables_index.md` (internal)
- purpose: coverage/debugging + fast evidence scan
- allowed to be more exhaustive
- should NOT be inserted into the paper

2) `outline/tables_appendix.md` (reader-facing)
- purpose: publishable survey tables (clean layout + high information density)
- can be inserted into the final PDF as Appendix

This skill designs both layers before filling.

## Default mode: semantic (LLM-first)

Treat this as a design task, not running a script.

If a column cannot be filled from existing evidence packs without guessing, the schema is wrong.

## Roles (use explicitly)

### Table Designer (reader lens)

Mission: choose tables that answer reader questions, not pipeline questions.

Do:
- make each table answer one question
- keep tables small enough to fill (two good tables beat one impossible mega-table)

Avoid:
- internal/log-style tables inside the paper
- column labels that only make sense inside this repo

### Evidence Steward (fillability)

Mission: refuse schemas that require invented facts.

Do:
- map every column to concrete upstream fields
- reject columns that would force long paragraph cells

Avoid:
- TODO columns
- placeholders ("TBD", "...", "(placeholder)")

## Workflow (explicit inputs)

The rest: https://github.com/WILLOSCAR/research-units-pipeline-skills/blob/HEAD/.codex/skills/table-schema/SKILL.md
