AI draft artifacts
Reviewable generated output with provenance and safe promotion
AI commands write into generated zones first. The goal is to make model output useful without letting it silently become canonical truth.
org2 ai run currently provides a provider-free draft writer for manifest-selected source files. It reads local Org2 source files, records source hashes, stamps artifact metadata, and writes a review-required draft under views/ or compiled/.
npm run org2 -- ai run --job jobs/team-sync.org2-ai.json --apply
npm run org2 -- ai run --job jobs/team-sync.org2-ai.json --out views/team-sync-summary.org2 --apply
Without --apply, the command prints a safe preview and writes nothing.
Meeting/transcript summarization
summarize-meeting is the first concrete AI workflow. A manifest such as examples/jobs/meeting-summary.org2-ai.json turns raw meeting or transcript material into a reviewable Org2 artifact:
npm run org2 -- ai run \
--task summarize-meeting \
--file raw/meeting.org2 \
--out views/meeting-summary.org2
npm run org2 -- ai run \
--job examples/jobs/meeting-summary.org2-ai.json \
--out views/meeting-summary.org2
The generated draft is safe-by-default: preview-only unless --apply is passed, stored as a generated view artifact, and marked ORG2_REVIEW_STATUS: review-required. The body includes:
a concise meeting summary
key decisions with
file:path::linecitationsTODO-style action item suggestions
people/org/project entity candidates
suggested link candidates that must be reviewed before promotion
source citation and provenance metadata, including source hashes and adapter/model metadata
The built-in deterministic mock adapter keeps tests and local examples provider-free while exercising the same adapter/request boundary that hosted or local model adapters can implement later.
Draft format
A generated draft starts with an Org2 property drawer:
:PROPERTIES:
:ID: team-sync-summary-team-sync-summary.org2
:ORG2_ARTIFACT_SCHEMA: org2-artifact-metadata/v1
:ORG2_ARTIFACT_ROLE: view
:ORG2_PROVENANCE: file:raw/team-sync.org2
:ORG2_GENERATOR: org2 ai run team-sync-summary adapter=local-default model=fixture-model
:ORG2_GENERATED_AT: 2026-05-20T01:00:00.000Z
:ORG2_AI_JOB_ID: team-sync-summary
:ORG2_AI_TASK: summarize-meeting
:ORG2_PROMPT_TEMPLATE: meeting-summary@v1
:ORG2_AI_ADAPTER: local-default
:ORG2_AI_MODEL: fixture-model
:ORG2_SOURCE_HASHES: file:raw/team-sync.org2=sha256:...
:ORG2_REVIEW_STATUS: review-required
:END:
The body includes a review checklist, job metadata, source list, generated summary or extraction section, and cited source excerpts using file:path::line links.
Review and promotion
Promotion is explicit:
Inspect the draft and verify generated claims against cited source lines.
Edit the draft until the accepted content is safe for canonical notes.
Change
ORG2_REVIEW_STATUSfromreview-requiredtoreviewed.Run
org2 ai promotewith--applyto append the reviewed body to a canonical note file.
npm run org2 -- ai promote \
--file views/team-sync-summary.org2 \
--to-file notes/team-sync.org2 \
--apply
Promotion refuses drafts that are still generated or review-required. On success it appends only the draft body to the target note, omits the generated artifact drawer from canonical notes, and marks the source draft promoted.
Lint rules
org2 lint flags generated artifacts that still need review with artifact-generated-unreviewed. Existing artifact checks also catch missing provenance, stale provenance mtimes, invalid or mismatched source hashes, and invalid review statuses.
This makes AI output behave like a build artifact: useful, traceable, lintable, and overwriteable until a human explicitly reviews and promotes it.
VS Code commands
The VS Code extension exposes the same safe path through command-palette actions:
org2.aiRunDraftpicks a job manifest, previewsorg2 ai run, confirms, writes the draft, and opens it for review.org2.aiPromoteDraftpreviewsorg2 ai promotefor the active/selected draft, requires confirmation, and opens the canonical target after promotion.
Both commands use the CLI; the editor does not bypass review status checks or write canonical notes without the explicit promote confirmation.