# Cobalt — household notes, review, and local drafts

An original synthetic demonstration of a small household workflow. It turns structured meeting-note action lines into a review list, accepts a selection bound to that exact revision, and creates local calendar suggestions and email-draft objects. Replaying the same approval against the saved ledger creates no additional draft records.

**No email is sent, no calendar is modified, and no external account is connected.** Every example is invented. Email recipients use the reserved `.invalid` domain. There is no language model, document index, credential, API call, or client data in this package.

## Inspect it in two minutes

Requires Node.js 22.22.3 or a compatible later version for the standalone demo. No package installation is needed.

```sh
node verify.cjs
node cli.cjs prepare fixtures/notes.json
```

The first command runs the recorded verification checks. The second returns three proposed action items and a revision fingerprint, without creating drafts.

The included approval is an explicitly synthetic test fixture selecting only A1 and A2. It is not evidence that a real household user reviewed anything. Apply it twice to see persistent replay suppression:

```sh
node cli.cjs apply fixtures/notes.json fixtures/approval.json demo-state
node cli.cjs apply fixtures/notes.json fixtures/approval.json demo-state
```

The first run creates one local calendar suggestion and one local email draft. The second creates zero new records and reports two existing drafts. A3 remains unapproved. The actual stored draft objects are in `demo-state/ledger.json`.

## The n8n export

`workflow.json` is an inactive workflow with one Manual Trigger and two JavaScript Code nodes. It starts with **approval empty** and does not contain HTTP, email, calendar, filesystem, or credential nodes.

- Executed version pin: **n8n 2.3.6 with Node.js 22.22.3**, Manual Trigger node version 1, Code node version 2. The workflow was imported into a fresh isolated database and executed in three synthetic cases.
- Current npm metadata was also checked for n8n 2.43.8, which requires Node.js 24 or later. That newer runtime was not installed or tested because of available disk space.
- The Code node requires the built-in `crypto` module. A self-hosted environment must allow that module in the applicable runner configuration. Do not enable all modules just to run this example.
- `build-workflow.cjs` embeds the same domain engine used by the standalone demo; the local verification also evaluates the actual exported Code strings.
- Actual n8n execution evidence is in `REPORT.md` and `evidence/n8n-runtime-results.json`: all three workflow nodes succeeded for default review, approved drafts, and replay. The separate local Code-wrapper checks are also retained.

The workflow returns `state` as an output. It does **not** persist that state between independent n8n executions. To demonstrate replay in n8n, supply the previous output's state as `previous_state` in the next synthetic input. Production use needs a durable transactional store and concurrency policy before connecting any external actions. The standalone CLI supplies a local file ledger and lock for its own runs.

## What is implemented and what remains

| Implemented in this demonstration | Requires a separately agreed integration |
| --- | --- |
| Structured action-line parsing | Natural-language or model-based extraction |
| Review of exact meeting revision and selected action IDs | Authenticated household review interface |
| Local draft objects and calendar suggestions | Google or Notion connectors and credential lifecycle |
| Persistent replay suppression in the CLI | Durable transactional storage for a deployed n8n workflow |
| Visible failures and recovery instructions | Notification delivery, monitoring, backups, and device setup |
| Synthetic-only email addresses | A reviewed policy for real recipients and outgoing fields |

Changing notes creates a new revision and requires fresh approval. A newly approved revision is a new draft version; automatic reconciliation against earlier revisions is not implemented. Keep the original ledger: deleting it or using an empty one removes replay memory.

The `local_only` field is checked by the engine, but a JSON flag cannot enforce where n8n is hosted. A household deployment must use the agreed local host and storage policy. This demonstration has no model quality, Mac mini performance, production security, whole-house setup, or prior client-experience claim.

See `RUNBOOK.md` for steps a household user can follow, `REPORT.md` for measured results, and `evidence/` for recorded runs.

## Reference sources

- [Official n8n Code node documentation](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/)
- [Official n8n Manual Trigger documentation](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.manualworkflowtrigger/)
- [Official n8n static-data limitations](https://docs.n8n.io/code/cookbook/builtin/get-workflow-static-data/)
- [Official npm package metadata for the executed n8n version](https://registry.npmjs.org/n8n/2.3.6)

Prepared with disclosed AI-assisted engineering. No customer source or personal profile is included.
