Skip to main content
prompt GP ChatGPT

_format — Claude Code prompt: ops/*.md documentation format

Defines the authoring format for ops/*.md files that document canonical edit operations in the genoffice slide editor.

Apache-2.0 ★ 12,746 updated 2026-10-29

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/_format.md
Open on GitHub

What _format does

The prompt lays out how ops/*.md files are structured: one file per operation group (text, element, insert, table, slide, deck), each operation block opening with ### <opName> followed immediately by a backtick-wrapped signature. Heading suffixes like (not-ai-callable) and (pending) control whether an op shows up in the model's vocabulary and signature index.

Every json example inside a block gets run through runTxn(dryRun) against a two-slide fixture deck (durable ids s_1, s_2), using placeholder element ids such as e_TEXT, e_SHAPE, e_TABLE. The files themselves are parsed by shared/op-docs.ts into OP_DOCS, which feeds opVocabulary(), opUsage(), opSignatureIndex(), and opGuide() — this guide is for the people writing those docs, not something loaded into the model's own prompt.

The suite in apps/slides/tests/op-docs.test.ts checks that the docs stay in sync with the op registry, that examples validate, and that no CJK characters slip in, which is why the writing rules call for English-only prose and example content.

What it helps with

  • write a new edit operation entry matching the op-docs.ts parser
  • structure a signature and field table for an operation
  • flag an operation as not-ai-callable or pending
  • build json examples that pass runTxn(dryRun) against the fixture deck
  • split an oversized group file into sub-files with a catalog entry

Example prompts for the agent

  • Add a new operation entry to ops/table.md following the _format rules
  • Check whether my ### insertRow block matches the _format conventions
  • Split this operation group file into sub-files per _format

How to install _format

Manually: put the files in place

.claude/commands/_format.md

Questions about _format

How do I install _format in Claude Code?

Place the file at .claude/commands/_format.md.

What does _format do?

It's an authoring guide for ops/*.md files that document canonical edit operations in genoffice's slide editor, covering block structure, signatures, flags and example conventions.

Why can't ops/*.md files contain CJK characters?

The op-docs.test.ts suite checks for the absence of CJK text in these files, and the writing rules require English-only content, including example text.

Source text

_format.md · Apache-2.0
# Op documentation format (authoring guide — not loaded into any prompt)

The `ops/*.md` files are the single source of truth for what the model knows
about canonical edit ops. `shared/op-docs.ts` parses them at import time into
`OP_DOCS`; `opVocabulary()` / `opUsage()` / `opSignatureIndex()` / `opGuide()`
are all derived from the parse. Tests in `apps/slides/tests/op-docs*.test.ts`
assert that the docs track the op registry exactly, that every example
validates against a fixture deck, and that the files contain no CJK text.

## File layout

```
# <Group title>
> <one-line summary shown in the load_guide catalog>

<optional group-level prose: addressing, units, conventions>

### <opName>
`<signature>`

<prose, field table, examples, common mistakes, related ops>

### <nextOpName> (not-ai-callable)
`<signature>`
...
```

- One file per group; the file name is the group id (`text`, `element`,
  `insert`, `table`, `slide`, `deck`).
- A block starts at `### <opName>`; `opName` must match a registered op.
- The first non-empty line after the heading is the **signature**, wrapped in
  single backticks. It is emitted verbatim as `Usage: <opName> <signature>` in
  guided errors, so keep it compact and free of backticks.
- Heading suffixes in parentheses set flags: `(not-ai-callable)` hides the op
  from the vocabulary and the signature index (byte / clipboard / part-path
  payloads the model cannot produce); `(pending)` hides it entirely until the
  registering branch lands. Combine as `(not-ai-callable, pending)`.
- Every ```json fenced block inside an AI-callable op block is an example that
  the test suite runs through `runTxn(dryRun)`. Use the placeholder ids below;
  the test substitutes real ids from its fixture deck.

## Placeholder ids for examples

| Placeholder  | Fixture element                 |
| ------------ | ------------------------------- |
| `e_TEXT`     | a text box on slide 0           |
| `e_SHAPE`    | a rounded rectangle on slide 0  |
| `e_PICTURE`  | a picture on slide 0            |
| `e_TABLE`    | a 2x2 table on slide 0          |
| `e_CHART`    | a bar chart on slide 0          |
| `e_LINE`     | a straight connector on slide 0 |
| `e_GROUP`    | a group on slide 0              |
| `e_CHILD`    | a direct child of that group    |
| `SECTION_ID` | an existing section GUID        |

The fixture deck has exactly two slides (indices 0 and 1; durable ids `s_1`
and `s_2`).

## Writing rules

- English only. Example text content (titles, labels, categories) is English too.
- Units are document-space EMU unless a field name says otherwise (`...Pt`,
  `...Pct`, `...Deg`). Say so in the field table.
- Field tables list every field the op's `validate` / `apply` reads, not only
  the ones in the signature.
- "Common mistakes" entries describe what the model tends to get wrong and the
  corrective action, in the same voice as the guided errors.
- Keep each group file under roughly 8 KB; split a group into sub-files (and
  add a catalog entry) rather than exceeding that.

© genspark-ai · Apache-2.0 · genspark-ai/genoffice

Similar prompts

All prompts for Writing and docs →

From the same set65

The whole set →
qc-geometry The qc-geometry prompt fixes slide geometry defects backed by audit findings. Use it to check a slide when the model cannot inspect its rendered image. GP ChatGPT ★ 12,746repo stars contract-drafter contract-drafter turns a rough brief into a Word contract draft, then lists the clauses that could bite you before signing. CX Codex +1 ★ 12,746repo stars qc-visual qc-visual inspects slide layouts to fix overlaps, bad contrast, and alignment issues from screenshots. Keeps original copy, palettes, and fonts intact. GP ChatGPT ★ 12,746repo stars shape-image The shape-image prompt guides Claude Code in adding shapes, labels, and in-cell trend charts to spreadsheets. Use it to annotate key figures or show a data pattern without adding chart objects. GP ChatGPT ★ 12,746repo stars data-attribution The data-attribution prompt for Claude Code defines how to cite external sources in spreadsheets, using a Source column, a footer block, or a separate Sources sheet. GP ChatGPT ★ 12,746repo stars meeting-minutes The meeting-minutes skill for Claude Code turns transcripts, chats, or rough notes into a Word meeting record with decisions and assigned tasks. It gives a discussion a clear written follow-up. CX Codex +1 ★ 12,746repo stars okr-planner okr-planner splits a team's goals into measurable objectives and key results, then hands back an Excel workbook with an alignment sheet and a review log. CX Codex +1 ★ 12,746repo stars brand-copy brand-copy turns product details and target audience inputs into Markdown taglines, selling points, and brand stories. CX Codex +1 ★ 12,746repo stars

More in the catalog

Project sponsors

Companies that keep this analytics open