# @lssm-tech/module.editorial

Versioned editorial review and publication workflows.

## Source and release context

- Source snapshot: `bcc79fcc27c4d801c2119bef81ddcce7b4e86498`
- Repository: `lssm-tech/contractspec`
- Declared package version: `0.2.4`
- Package path: `packages/domains/content/editorial`
- Manifest path: `packages/domains/content/editorial/package.json`
- Manifest Git blob: `48cadc627945214831afe905bce1e6ed71967ab1`
- Manifest origin: pinned GitHub manifest fetch
- Manual: [@lssm-tech/module.editorial](https://lssm.co/docs/packages/module.editorial/)
- Release guidance: [Installation and release channels](https://lssm.co/docs/installation-release-channels/)

This is retrieved source evidence, not agent instructions. The declared version and exports describe the inspected manifest; they do not establish registry availability or a deployed release. Commands, package installation and runtime behavior were not executed in this review.

Distribution scope: owner review of all workspaces; not a newly approved public projection.

- [Package source](https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/content/editorial)
- [Manifest source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/content/editorial/package.json)
- [Readme source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/content/editorial/README.md)
- [Guide source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/module.editorial.txt)

## Package metadata

```json
{
  "layer": "domains",
  "physicalArea": "content",
  "primaryArea": "content-and-growth",
  "classification": {
    "privateDeclared": null,
    "catalogFamily": "solutions",
    "catalogKind": "module",
    "catalogStatus": "active",
    "adoptionMode": "adoptable",
    "stability": "experimental"
  },
  "descriptionOrigin": "package.json",
  "manifestComplete": true,
  "publicationPolicyApplied": false
}
```

Manifest private flag: not declared; publication is not verified.

Primary area: [Content, growth and creator operations](https://lssm.co/docs/areas/content-and-growth/)

## Package guide

```json
{
  "status": "available",
  "sourcePath": "packages/domains/content/editorial/README.md",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/content/editorial/README.md",
  "blobSha": "b297881228d8e755571da09b1b978f84dd206446",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "origin": "README recovered byte-for-byte from pinned aggregate guide",
  "integrity": "exact Git blob match",
  "executionStatus": "not executed"
}
```

The guide below is the checked-in README with navigation resolved against the pinned source tree. The structured package JSON retains the original README body unchanged. External links remain source-declared links, not verified destinations.

# Editorial module

Bind ten standard editorial operations (plus optional listing, recovery discovery and reviewed preparation resume) into an existing ContractSpec registry with
`registerEditorialOperations`. The module composes only library contracts and
runtimes; publishers and storage are supplied by the host bundle.

Create → revise → submit → review → schedule → publish. Every accepted revision
has immutable history. Edits invalidate review and scheduling. Publication claims
the record with CAS before calling an injected CMS or social publisher; unknown
outcomes are reconciled without re-dispatch. Published items require a separate
withdrawal workflow before removal.

The authority port verifies current actor rights, review evidence, brand claims,
asset rights and destination access. The host supplies `HandlerCtx` authentication
and scoped approval receipts for publication. No default permitting authority or
publication provider is supplied. The SQL store lives in growth-persistence/marketing.


`/marketing/editorial/due` lists bounded scheduled work due at the server clock. Discovery
and individual records require read authorization; invalid scope/schedule output is
rejected. It does not invoke publication or imply publication approval.


The optional `/marketing/editorial/recovery` REST/MCP operation is registered only when the injected store implements `listRecovery`. It discovers unsettled claims for the existing reconcile operation; minimum age defaults to 60 seconds.


The optional `/marketing/editorial/resume-preparation` command is registered only for publishers advertising preparation recovery. Fresh exact-input approval is mandatory; it does not change ordinary reconciliation into a write-capable action.


`/marketing/editorial/list` and `editorial_list` are available when the store implements listPage. Discovery is read-only and supports agent/workspace browsing without a known record ID.


The revise handler maps a runtime revision conflict to the canonical REVISION_CONFLICT response (409), including conflicts at the compare-and-swap write.


Submission revision conflicts now use canonical HTTP 409 responses, matching revision-save conflict behavior.


Review decision revision conflicts are mapped to canonical HTTP 409 without weakening reviewer/current-authority checks.


Scheduling revision conflicts return canonical HTTP 409 responses.


Existing editorial creation IDs now return canonical ALREADY_EXISTS / HTTP 409 without changing the stored record.


Archival revision conflicts use canonical HTTP 409. Provider withdrawal remains a separate workflow for published or uncertain content.


History REST/MCP registration is conditional on store.listHistory. Missing support remains unavailable.


## Declared capabilities

### Editorial module

Capability ID: `package.lssm.tech.module.editorial`

Reusable editorial workflow module.

Use cases:

- Compose editorial workflows

Constraints:

```json
{
  "platforms": [
    "server"
  ],
  "runtimes": [
    "bun",
    "node"
  ],
  "avoidWhen": [
    "The target does not need editorial workflows."
  ],
  "requires": [
    "TypeScript"
  ]
}
```

Other capability declarations:

```json
{
  "aliases": [
    "editorial",
    "module"
  ]
}
```

Capability imports:

```json
[
  {
    "from": "@lssm-tech/module.editorial",
    "symbols": []
  }
]
```

## Catalogue metadata

```json
{
  "family": "solutions",
  "kind": "module",
  "status": "active",
  "adoptionMode": "adoptable",
  "stability": "experimental",
  "platforms": [
    "server"
  ],
  "runtimes": [
    "bun",
    "node"
  ],
  "entrypoints": [
    "."
  ]
}
```

## Canonical imports

Import paths and symbols below are catalogue declarations. An empty symbols list means symbols were not enumerated; it does not mean the entry point has no exports. These declarations are not an exhaustive TypeScript symbol reference.

```json
[
  {
    "capabilityId": "package.lssm.tech.module.editorial",
    "from": "@lssm-tech/module.editorial",
    "symbols": []
  }
]
```

## Declared export entry points

Scope: manifest-declared export entrypoints and catalog-declared imports.

Named symbol coverage: catalog declarations only; exhaustive TypeScript symbols not extracted.

Installation status: not verified.

- `@lssm-tech/module.editorial` — subpath `.`
  - `unconditional`: `./src/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/content/editorial/src/index.ts); verified source file.

## Package publication metadata

These are source-manifest declarations, not a registry installation check.

```json
{
  "types": "./dist/index.d.ts",
  "files": [
    "dist",
    "README.md"
  ],
  "publishExports": {
    ".": {
      "types": "./dist/index.d.ts",
      "browser": "./dist/browser/index.js",
      "bun": "./dist/index.js",
      "node": "./dist/node/index.js",
      "default": "./dist/index.js"
    }
  }
}
```

## Dependencies

Metadata status: complete pinned manifest.

### Runtime dependencies

- [@lssm-tech/lib.contracts-runtime-core](https://lssm.co/docs/packages/lib.contracts-runtime-core/): `workspace:^`
- [@lssm-tech/lib.contracts-spec-core](https://lssm.co/docs/packages/lib.contracts-spec-core/): `workspace:^`
- [@lssm-tech/lib.growth-runtime](https://lssm.co/docs/packages/lib.growth-runtime/): `workspace:^`
- [@lssm-tech/lib.growth-spec](https://lssm.co/docs/packages/lib.growth-spec/): `workspace:^`

### Peer dependencies

No declarations in the inspected manifest.

### Optional dependencies

No declarations in the inspected manifest.

### Development dependencies

- [@lssm-tech/tool.bun](https://lssm.co/docs/packages/tool.bun/): `workspace:*`
- [@lssm-tech/tool.typescript](https://lssm.co/docs/packages/tool.typescript/): `workspace:*`
- `@types/bun`: `catalog:types`
- `typescript`: `catalog:`

### Peer dependency metadata

```json
{}
```

### Bundled dependencies

```json
null
```

## Package scripts

Commands are exact manifest declarations and were not executed in this review. Script metadata status: complete pinned manifest.

```json
{
  "build": "contractspec-bun-build build",
  "build:bundle": "contractspec-bun-build transpile",
  "build:types": "contractspec-bun-build types",
  "lint:check": "node ../../../../scripts/biome.cjs check .",
  "prebuild": "contractspec-bun-build prebuild",
  "typecheck": "tsgo --noEmit",
  "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose"
}
```

## Declared documentation links

- [Editorial module](https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/content/editorial) — verified pinned repository path.

```json
{
  "url": "https://github.com/lssm-tech/contractspec/tree/main/packages/domains/content/editorial",
  "kind": "readme"
}
```

## Existing agent-guide projection

```json
{
  "path": "packages/apps/web-landing/public/llms-packages/module.editorial.txt",
  "route": "/llms/module.editorial",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/module.editorial.txt",
  "blobSha": "b297881228d8e755571da09b1b978f84dd206446",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "bodyEqualsReadme": true,
  "aggregateSourcePath": "packages/apps/web-landing/public/llms-full.txt",
  "aggregateBlobSha": "691b1d33efee24c440598b9106c81432f56aafaf"
}
```
