Skip to main content

Research-grounded domain writing pipeline prompts, domain packs, packet validation, and agent skill distribution.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

research_domain_writing-0.1.0.tar.gz (52.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

research_domain_writing-0.1.0-py3-none-any.whl (77.2 kB view details)

Uploaded Python 3

File details

Details for the file research_domain_writing-0.1.0.tar.gz.

File metadata

  • Download URL: research_domain_writing-0.1.0.tar.gz
  • Upload date:
  • Size: 52.9 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for research_domain_writing-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c5932e5a22da5f0a76a77418a429c16eaaf494bde59463e573a409294f4bf953
MD5 a32dc05c2bba819cddcc588424f34472
BLAKE2b-256 c14ad39ff2fefc60841d3abb226bbc28b773d969940f0d41e02cb5fc168d5a7d

See more details on using hashes here.

File details

Details for the file research_domain_writing-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: research_domain_writing-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 77.2 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for research_domain_writing-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2bb228fd3dd40885df94eda1cf03a31f5484681f3b915469107e8cfa8993a290
MD5 2fda8d0ada81a93a54aa09779b67f63c
BLAKE2b-256 fc6b7a392aea7055601f83202f46f26d8a912549157cce20338a5c526e66adb9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page