# press-release

Intelligent press-release drafting microservice: turn a who/what/when/where/quote brief into a fully structured, AP-style press release (dateline, lead paragraph, body, boilerplate, media contact...


Intelligent press-release drafting microservice. Turns a `who / what / when / where / quote` brief
into a fully structured, AP-style press release, and provides the supporting building blocks
(boilerplate, quote formatting, headline, subhead) plus a rule-based AP-style linter.

Every tool has a **deterministic template/rule core that runs fully offline** (AP dateline formatting,
inverted-pyramid lead assembly, boilerplate template, a rule-based AP-style checker). `draft`,
`headline` and `subhead` additionally have an **optional LLM path** that enriches the prose and
silently falls back to the template — results tagged `{ mode: 'heuristic' | 'llm' }`.

## Tools

| Tool | Args | Returns |
|---|---|---|
| `draft` | `{ who, what, when?, where?, quote?, speaker?, boilerplate?, details?, options? }` | full structured release + assembled `text` |
| `boilerplate` | `{ who, details?:{ description, url, founded, industry } }` | `{ text }` (About-X paragraph) |
| `quote` | `{ quote, speaker?:{name,title}, who? }` | `{ text, attribution, speaker }` |
| `apStyleCheck` | `{ text }` | `{ score, clean, flags:[{ rule, level, message }] }` |
| `headline` | `{ what, who?, options? }` | `{ headline }` |
| `subhead` | `{ what, who?, options? }` | `{ subhead }` |

`speaker` may be a string name or `{ name, title }`. `when` accepts ISO or free text; the dateline is
AP-formatted (Jan./Feb./Aug./Sept./Oct./Nov./Dec. abbreviate with a date).

## Example

```js
import pack from './index.js';

await pack.adapters.draft({
  who: 'Acme Corp', what: 'the launch of its AI assistant',
  when: '2026-03-04', where: 'San Francisco',
  quote: 'This changes how our customers work. We could not be prouder.',
  speaker: { name: 'Jane Doe', title: 'chief executive officer' },
  details: { url: 'https://acme.example', contact: { name: 'PR Team', email: 'press@acme.example' } },
});
// → { mode, dateline:'SAN FRANCISCO, March 4, 2026', lead, quote, boilerplate, text:'FOR IMMEDIATE RELEASE …###…' }

pack.adapters.apStyleCheck({ text: 'The company grew 5 percent over 3 years, and shipped fast!' });
// → flags: numbers-under-10, "percent"→"%", Oxford comma, exclamation point, over→more than
```

## AP-style checker rules

Numbers under 10 spelled out · `%` vs "percent" · serial/Oxford comma omitted · `&`→"and" in body ·
month abbreviation with a date · lowercase `a.m.`/`p.m.` (+ noon/midnight) · lowercase titles after a
name · no two-letter state postal codes · no exclamation points · "more than" vs "over".

## DRY boundaries

- **Not `landing-copy`** (marketing landing blocks), **not `seo`**, **not `a-templates`** (generic
  templating). `apStyleCheck` is a purpose-built AP-style linter, distinct from any grammar/nlp tool.
- Self-contained: the only cross-file import is `../_shared/llm.js` for the optional AI path.


---
Source: shared/engines/adapters/domain/press-release/README.md
Canonical: https://docs.leumas.tech/p/adapters/domain/press-release
