Skip to main content

Research Domain Writing

Research Domain Writing (RDW) is an agent-first harness for research-grounded writing. It validates structured research packets, plans repeatable writing runs, emits exact prompt bundles, and keeps outputs auditable.

The rdw CLI in v0.1 is not an LLM runner. It does not browse, call model APIs, or draft autonomously. Your agent performs the research and writing by following the emitted prompts.

Install

From PyPI after release:

pip install research-domain-writing
rdw doctor

From a source checkout:

uv run rdw doctor

Install agent slash commands and skills:

rdw install --target all

For source checkouts, the compatibility wrapper still works:

./install/install.sh

First Run Paths

1. Check the install

rdw doctor

doctor checks Python version, packaged assets, writable output directories, and install target readiness.

2. Plan one task

rdw task plan \
  --request "improve the copy on my LIS leaderboard" \
  --out .rdw-runs/lis-leaderboard

This writes:

  • .rdw-runs/lis-leaderboard/task-contract.yaml
  • .rdw-runs/lis-leaderboard/prompt-bundle.md
  • .rdw-runs/lis-leaderboard/status.json

Give the prompt bundle to your agent. The agent is responsible for research, drafting, QA, and final output.

3. Plan a batch

rdw batch plan examples/batch-tasks.yaml --out .rdw-runs/demo-batch

This validates the batch file, expands each task into a deterministic task folder, and writes summary.yaml plus batch-log.jsonl with planned statuses.

Core Commands

rdw doctor
rdw validate-packet knowledge/basketball/demo-guard-2026-demo.yaml --strict
rdw validate-batch examples/batch-tasks.yaml
rdw new-domain finance "Finance Writing"
rdw task plan --request "explain idempotency keys" --domain technical --out .rdw-runs/idempotency
rdw batch plan examples/batch-tasks.yaml --out .rdw-runs/demo-batch
rdw install --target claude
rdw install --target cursor
rdw install --target agents

Legacy scripts remain as thin wrappers:

python scripts/validate-packet.py knowledge/basketball/demo-guard-2026-demo.yaml
./scripts/new-domain.sh finance "Finance Writing"

What RDW Provides

research-domain-writing/
  src/rdw/                # installable CLI and validators
  SKILL.md                # agent skill entrypoint
  config/                 # domain registry, style, sources, output formats
  domains/                # domain packs
  knowledge/              # reusable research packets
  prompts/                # stage prompts and orchestrators
  examples/               # curated example artifacts
  install/                # slash command and skill templates
  docs/                   # limitations and integration notes

Starter domains:

  • basketball - stat interpretation and player/ranking copy
  • music - review blurbs with explicit evidence limits
  • technical - product and feature explainers

Research Model

RDW separates knowledge work from style work:

Layer Responsibility
Research Facts, sources, uncertainty, terminology
Domain copywriter Structured, grounded draft
Domain QA Grounding, jargon, overclaiming
Humanizer/blader Style, rhythm, author voice only

Packets live in knowledge/<domain>/*.yaml and must include source notes, confidence, timestamps, and domain-specific extension data when required.

See docs/LIMITATIONS.md for v0.1 boundaries.

Validation

rdw validate-packet checks:

  • required packet fields
  • registered domains
  • ISO-like last_updated
  • confidence values: high, medium, low
  • source_notes shape and strict fact-id linkage
  • domain extension presence when strict mode requires it

rdw validate-batch checks:

  • unique task IDs
  • supported depth values: 1, 2, 3, 4, deep, standard, light, minimal
  • packet references when supplied
  • supported output formats

Examples

Example Artifacts
examples/basketball-example/ synthetic task, packet-derived knowledge, draft, QA, final
examples/music-example/ thin-evidence music task, research packet, knowledge, draft, QA, final
examples/technical-example/ technical feature task, research packet, knowledge, draft, QA, final
examples/batch-tasks.yaml deterministic batch planning input

The basketball example is explicitly fictional. It demonstrates schema and claim-boundary behavior, not real player analysis.

Add A Domain

rdw new-domain finance "Finance Writing"

Then edit:

  • domains/finance/domain-config.yaml
  • domains/finance/research-packet-template.yaml
  • domains/finance/qa-checklist.md
  • domains/finance/writing-templates.md
  • config/domains.yaml
  • config/research-sources.yaml

No core prompt edits should be required for normal domain additions.

Agent Usage

After rdw install --target all, start a fresh agent session and use:

/rdw improve the copy on my LIS leaderboard

or:

/rdw-batch examples/batch-tasks.yaml

Natural language is usually enough. The router infers domain, entity, output type, audience, and research depth; override only when needed.

Quality Bar

Before release or a serious PR:

uv run ruff check .
uv run ruff format --check .
uv run basedpyright src tests scripts
uv run pytest -q
uv build

Wheel smoke:

python -m venv /tmp/rdw-wheel-smoke
/tmp/rdw-wheel-smoke/bin/pip install dist/*.whl
/tmp/rdw-wheel-smoke/bin/rdw doctor

License

MIT. See LICENSE.

Metadata

Release files for research-domain-writing 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for research-domain-writing 0.1.0
File Size Uploaded
research_domain_writing-0.1.0.tar.gz 52.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for research-domain-writing 0.1.0
File Interpreter ABI Platform
research_domain_writing-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 130.2 kB

Release files / research_domain_writing-0.1.0.tar.gz

Download URL research_domain_writing-0.1.0.tar.gz
Size 52.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c5932e5a22da5f0a76a77418a429c16eaaf494bde59463e573a409294f4bf953
BLAKE2b-256 checksum
How to use checksums
c14ad39ff2fefc60841d3abb226bbc28b773d969940f0d41e02cb5fc168d5a7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / research_domain_writing-0.1.0-py3-none-any.whl

Download URL research_domain_writing-0.1.0-py3-none-any.whl
Size 77.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2bb228fd3dd40885df94eda1cf03a31f5484681f3b915469107e8cfa8993a290
BLAKE2b-256 checksum
How to use checksums
fc6b7a392aea7055601f83202f46f26d8a912549157cce20338a5c526e66adb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page