Skip to content

kingxiaozhe/zero-workflow

Repository files navigation

Zero Workflow

Evidence-first research for Codex and Claude Code.

Zero Workflow turns local documents and web sources into durable source cards, a cross-check matrix, a cited report, and claim-level verification receipts. The workflow is designed for research that must remain inspectable after the chat context is gone.

What it gives you

  • A transparent $zw router for quick product research, claim critique, multi-source reporting, and expert-perspective follow-up.
  • An R1–R8 report pipeline: brief → collect → read → cross-check → analyze → write → verify → deliver.
  • Mixed-source support for PDF, Markdown, DOCX, text, websites, and optional social/video acquisition backends.
  • Prompt-injection boundaries, source provenance, explicit retrieval degradation, and high-stakes redlines.
  • Codex-native Skills plus Claude Code compatibility installers.
  • Deterministic structure, safety, version, and Windows-path checks in CI.

Quick start

Codex

Clone the repository, then install it as a personal local plugin:

git clone https://github.com/kingxiaozhe/zero-workflow.git
cd zero-workflow
./install-codex.sh

Start a new Codex thread and use:

$zw research these files and choose the right workflow
$zw-report 深研 ./sources https://example.com
$zw-check

Claude Code

./install.sh

Claude Code discovers the same Skills as /zw, /zw-report, and /zw-check. On macOS and Linux the installer also generates the historical aliases /zw:report and /zw:check. Windows uses the portable hyphenated names only:

.\install.ps1 -Force

See installation for isolated installs, update behavior, and optional tools.

How the report pipeline works

R1 brief + approval
  → R2 acquisition
  → R3 source cards
  → R4 cross-check matrix
  → R5 evidence-led outline
  → R6 cited report
  → R7 adversarial claim review
  → R8 delivery gates + metrics + lessons

R1 is the only routine human gate. After approval, source failures degrade honestly instead of freezing the entire run. All important state is written to the selected work directory:

brief.md                 approved research contract
sources/manifest.md      source inventory and acquisition state
sources/raw/             retrieved source material
notes/                   one evidence card per source
analysis/crosscheck.md   consensus, conflicts, orphan claims, gaps
analysis/outline.md      evidence-led report structure
report/report.md         cited deliverable
report/.verify/          claim-level review receipts
运行日志.jsonl            machine-readable event log
logs/RUNLOG.md           human-readable timeline
METRICS.md               workflow measurements
LESSONS.md               durable lessons

Parallel source workers are optional. When the runtime cannot provide isolated workers, the same pipeline runs serially and records that fact. Independent review is never claimed without evidence.

Repository layout

.codex-plugin/           Codex plugin manifest
skills/
  zw/                    transparent router
  zw-report/             R1–R8 controller and node references
  zw-check/              deterministic self-check entrypoint
  zw-*                   collector, analyst, writer, verifier, lens, persona
runtime/                 shared path, orchestration, source-safety, review contracts
agents/                  optional isolated source-worker contract
templates/               brief, source-card, reports, log/status helpers
compat/                  generated Claude legacy-alias sources
scripts/                 validation and safety checks

The tracked tree contains no colon filenames, so it can be checked out on Windows. Legacy /zw:* command files are created only at install time on filesystems that support them.

Optional acquisition helpers

Agent-Reach is an optional MIT backend for supported social and video sources. Zero Workflow still works without it; unsupported sources are marked fetch_failed and excluded explicitly. Browser-based retrieval must use a channel already authorized by the user.

Validation

./scripts/zw-check-runtime.sh
python3 scripts/validate-public-repo.py
python3 scripts/scan-public-safety.py

The project is licensed under MIT. Upstream idea provenance and license status are recorded in third-party notices.

About

Evidence-first research workflow for Codex and Claude Code: collect, cross-check, cite, and verify mixed sources.

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages