npm package: @ownclaw/own-prose
Description: Natural-language workflow compiler and executor for OpenClaw.
Latest version: 0.1.5

# @ownclaw/own-prose

`@ownclaw/own-prose` is a natural-language workflow compiler and executor for
OpenClaw.

It lets you define a workflow in Markdown, compile it into a strict execution
plan, and run it through OpenClaw.

## Before You Install

This package is meant to be used as an OpenClaw plugin.

Install and initialize OpenClaw first:

```bash
npm install -g openclaw@latest
openclaw onboard --install-daemon
```

## Install In OpenClaw

The recommended install path for normal users is:

```bash
openclaw plugins install @ownclaw/own-prose
openclaw gateway restart
```

After installation, OpenClaw will load the plugin and expose the
`own_prose_start`, `own_prose_status`, `own_prose_reply`, and
`own_prose_drive` tools to agent sessions. The `own_prose_background_run` tool
is internal and should not be called directly by normal users.

If your OpenClaw setup uses a restrictive tool policy, also add the own-prose
tools to `tools.alsoAllow` in `~/.openclaw/openclaw.json`:

```json
{
  "tools": {
    "profile": "coding",
    "alsoAllow": [
      "own_prose_start",
      "own_prose_drive",
      "own_prose_status",
      "own_prose_reply",
      "own_prose_background_run"
    ]
  }
}
```

## Recommended Agent Tools

- `own_prose_start(programPath, input)`
  Recommended default entry point. Starts the workflow in background mode and
  returns a `runId`.
- `own_prose_status(runId | programPath)`
  Poll an existing run or inspect whether a workflow file parses correctly.
- `own_prose_reply(runId, answer, runDir?)`
  Resume a workflow that is currently waiting in a `blocked` ask/reply state.
- `own_prose_drive(programPath, input)`
  Use only when the caller explicitly wants a blocking, end-to-end result.

## CLI Helpers For Debugging

- `openclaw own-prose inspect <program>`
- `openclaw own-prose compile <program>`
- `openclaw own-prose drive <program>`
- `openclaw own-prose reply <run-id>`
- `openclaw own-prose start <program>`
- `openclaw own-prose status <run-id>`

## Typical Workflow Layout

```text
my-workflow/
├── program.md
└── agents/
    ├── writer.md
    ├── reviewer.md
    └── finalizer.md
```

## Example `program.md`

```md
---
name: article-workflow
version: 1
description: Draft, review, and finalize an article.
---

## Goal

Produce a final article from a topic input.

## Inputs

- topic: article topic

## Agents

- writer
- reviewer
- finalizer

## Workflow

Write a draft for the topic, review whether it is ready, and if approved,
return the final article text.

## Constraints

- maxSteps: 6
- allowLoops: false

## Output Contract

- Return only the final article
```

## Quick Start

Send the agent a message like this:

```text
Call the own_prose_start tool exactly once.
Use programPath "/ABSOLUTE/PATH/TO/my-workflow/program.md" and input {
  "topic": "OpenClaw plugin workflows"
}.
After the tool returns, reply with only the runId.
```

Keep the returned `runId`. If the workflow was started from an agent session,
own-prose will queue the completion notification back to that same session.

For manual debugging or polling, use:

```bash
openclaw own-prose status <run-id>
```

If the workflow enters a `blocked` clarification step, resume it with:

```bash
openclaw own-prose reply <run-id> --answer "Use the Saturday 02:00-03:00 UTC maintenance window."
```

## Notes

- This package is intended for OpenClaw environments.
- Prefer `own_prose_start` for normal agent usage so the main conversation does
  not block.
- Use `own_prose_reply` only when you explicitly want to continue a blocked run;
  ordinary user follow-up messages should still be treated as new tasks unless
  the caller intentionally resumes the old run.
- Use `own_prose_drive` only when the caller explicitly wants a blocking
  workflow run.
- More detailed user and repository documentation is available in the project
  repository.