跳到正文
cccskills
免费在 GitHub 公开

schema-normalizer

Normalize cross-skill JSONL interfaces (ids + titles + citation key formats) so downstream skills do not rely on best-effort joins.

中文简介正在准备中。当前显示原文说明。

实测评分 未实测

查看安装方法

包含的文件(2)

  • SKILL.md3.8 KB
  • scripts/run.py13.9 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Schema Normalizer (NO PROSE)

Triggers & routing

  • Trigger: schema normalize, jsonl contract, interface drift, join drift, 字段不一致, schema 规范化.
  • Use when: you have generated C2-C4 JSONL artifacts (outline/briefs/bindings/packs/anchors) and want deterministic, stable fields before self-loops/writing.

Purpose: close a common failure mode in skills-first pipelines: schema drift across JSONL artifacts.

When fields are inconsistent (missing ids/titles, mixed citation-key formats), downstream skills start doing best-effort joins and fragile parsing. This skill makes the interface explicit and deterministic.

Inputs

  • outline/outline.yml (source of truth for section/subsection ids + titles)
  • Optional (for citation-key sanity): citations/ref.bib
  • Default JSONL artifacts to normalize (arxiv-survey(-latex) C4 bridge):
    • outline/subsection_briefs.jsonl
    • outline/chapter_briefs.jsonl
    • outline/evidence_bindings.jsonl
    • outline/evidence_drafts.jsonl
    • outline/anchor_sheet.jsonl
  • Optional (run after writer packs are generated):
    • outline/writer_context_packs.jsonl

Outputs

  • output/SCHEMA_NORMALIZATION_REPORT.md (always written; PASS/FAIL + what changed)
  • The processed JSONL files are normalized in place (a .bak.* is created if changes are applied).

What gets normalized

1) IDs + titles (join keys)

For any record with sub_id: "<H2>.<H3>":

  • Ensure section_id exists (derived from the prefix before the dot)
  • Ensure title, section_title exist (filled from outline/outline.yml)

For any record with section_id: "<H2>":

  • Ensure section_title exists (filled from outline/outline.yml)

2) Citation key format (reduce parsing drift)

Within these C2-C4 JSONL artifacts, normalize citation keys so they are raw BibTeX keys (no @ prefix):

  • "citations": ["smith2023", "jones2024"]

Notes:

  • Final prose still uses Markdown citations: [@smith2023].
  • This skill does not add/remove citations; it only normalizes formatting.

When to run

Recommended placement in arxiv-survey(-latex):

  • Run after evidence-draft + anchor-sheet and before writer-context-pack + evidence-selfloop.
  • This ensures outline/evidence_drafts.jsonl and outline/anchor_sheet.jsonl are schema-stable before drafting packs are built.

Failure modes

  • If outline/outline.yml is missing or cannot be parsed, the skill FAILs.
  • If any target JSONL contains invalid JSON lines, the skill reports them and FAILs (do not proceed on corrupted artifacts).

Script (optional)

Quick Start

  • uv run python .codex/skills/schema-normalizer/scripts/run.py --help
  • Normalize the C4 bridge artifacts:
    • uv run python .codex/skills/schema-normalizer/scripts/run.py --workspace <workspace>

All Options

  • --workspace <dir>
  • --unit-id <U###>
  • --inputs <semicolon-separated>
  • --outputs <semicolon-separated>
  • --checkpoint <C#>

Examples

  • Normalize the default C4 artifacts (ids/titles + citations format):

    • uv run python .codex/skills/schema-normalizer/scripts/run.py --workspace <workspace> --inputs outline/outline.yml;citations/ref.bib;outline/subsection_briefs.jsonl;outline/chapter_briefs.jsonl;outline/evidence_bindings.jsonl;outline/evidence_drafts.jsonl;outline/anchor_sheet.jsonl --outputs output/SCHEMA_NORMALIZATION_REPORT.md
  • Normalize writer packs too (if you are running this after writer-context-pack):

    • uv run python .codex/skills/schema-normalizer/scripts/run.py --workspace <workspace> --inputs outline/outline.yml;citations/ref.bib;outline/writer_context_packs.jsonl --outputs output/SCHEMA_NORMALIZATION_REPORT.md

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Internal template for creating or refactoring a skill into the repository's reference-first shape. **Trigger**: reference-first template, blueprint skill, create a reusable skill, refactor a script-heavy skill. **Use when**: you need a lean `SKILL.md`, explicit `references/`, machine-readable `assets/`, and a minimal deterministic `run.py`.

中文简介正在准备中。当前显示原文说明。

WILLOSCAR/research-units-pipeline-skills5152026年10月5日 更新

Download a small corpus of open-access arXiv survey/review PDFs about agentic systems and extract text for style learning.

中文简介正在准备中。当前显示原文说明。

WILLOSCAR/research-units-pipeline-skills5152026年10月5日 更新

Extract per-subsection “anchor facts” (NO PROSE) from evidence packs so the writer is forced to include concrete numbers/benchmarks/limitations instead of generic summaries.

中文简介正在准备中。当前显示原文说明。

WILLOSCAR/research-units-pipeline-skills5152026年10月5日 更新

Curate reader-facing survey tables for the Appendix (clean layout + high information density), using only in-scope evidence and existing citation keys.

中文简介正在准备中。当前显示原文说明。

WILLOSCAR/research-units-pipeline-skills5152026年10月5日 更新

Build a final, machine-readable argument snapshot from current H3 sections and refresh section fingerprints before merge.

中文简介正在准备中。当前显示原文说明。

WILLOSCAR/research-units-pipeline-skills5152026年10月5日 更新

Audit one research Workspace for declared Unit outputs and Pipeline target Artifacts, writing `output/CONTRACT_REPORT.md`; use for mid-Run coverage snapshots or final delivery completeness, not deep provenance integrity.

中文简介正在准备中。当前显示原文说明。

WILLOSCAR/research-units-pipeline-skills5152026年10月5日 更新

查看 WILLOSCAR 的全部技能

报告此技能的问题