saphan prompt
Manages the prompt library: reusable prompt documents that a person picks and copies into a model.
Manages the prompt library: reusable prompt documents that a person picks and copies into a model. Bodies are kept byte for byte (nothing reformats or renders them), categories, platforms, roles and languages come from closed lists that are printed when a value is refused, and a prompt's inputs are derived from the <placeholders> in its body. The library is a directory in the workspace unless --db-url points it at a CouchDB database. add and edit always save a new document and nothing is deleted, so earlier versions stay available; only import --replace overwrites a stored document. Adding and editing need an identity (--actor, SAPHAN_ACTOR or your configuration).
saphan prompt add
Adds one prompt, either a whole JSON document (--file) or a new prompt built from --title and --body-file (giving both forms is refused). Fields the document omits are derived and filled in, any field that contradicts the body is refused, and an ID the store already holds is refused rather than overwritten.
| flag | type | default | what it does |
|---|---|---|---|
--body-file | string | The file holding the new prompt's body, read verbatim; - reads standard input. | |
--category | stringSlice | A category from the closed list; repeatable. | |
--code-lang | stringSlice | A programming language; repeatable, any value. | |
--file | string | A complete prompt document, in JSON, to add. | |
--lang | string | The prompt's language: en, pl or th. | |
--platform | stringSlice | A platform from the closed list; repeatable. | |
--role | stringSlice | A role the prompt is offered to, from the closed list (advisor, master, scribe, any); repeatable. | |
--tag | stringSlice | A free-form tag; repeatable. | |
--tech | stringSlice | A technology or framework; repeatable, any value. | |
--title | string | The title of a new prompt. |
saphan prompt edit
Saves changes to a prompt as a new document; the prompt you named is left exactly as it was. Editing your own prompt continues its version chain; editing a built-in prompt starts your own copy at version 1, which no later upgrade can overwrite. Inputs and the body digest are recomputed from the new body.
| flag | type | default | what it does |
|---|---|---|---|
--body-file | string | The file holding the new body, read verbatim; - reads standard input. | |
--category | stringSlice | Replace the categories; repeatable. | |
--lang | string | The new language: en, pl or th. | |
--platform | stringSlice | Replace the platforms; repeatable. | |
--role | stringSlice | Replace the roles; repeatable. | |
--tag | stringSlice | Replace the tags; repeatable. | |
--title | string | The new title. |
saphan prompt export
Writes every prompt, or only the named IDs, to a directory as one canonical <id>.json file each, the same format the built-in set ships in, so moving a library between machines is copying files. A file of the same name already in the directory is overwritten; a named ID the store does not hold makes the command fail after writing the rest. Export, import and export again produce identical bytes.
| flag | type | default | what it does |
|---|---|---|---|
--to | string | The directory to write into, created if missing. Required. |
saphan prompt import
Reads prompt documents from files or directories into the store in two passes, and the first writes nothing. An invalid document, a duplicate ID in the batch, a store that could not be checked, or a set that would leave a version chain with no latest version stops the import before anything is written, and so, without --replace, does an ID the store already holds. If the store fails part-way through writing, the documents already written stay written and are named.
| flag | type | default | what it does |
|---|---|---|---|
--replace | bool | false | ⚠ Overwrite documents whose IDs the store already holds, including ones this binary cannot read; the overwritten document is not kept. The CouchDB store does not accept in-place replacement, so there it is refused by name. |
saphan prompt list
Lists the latest version of each prompt (ID, scope, language, categories, version and title) and how many older versions stand behind it. The header shows how many documents the store holds beside how many the filters show, so an empty result and an empty library can be told apart.
| flag | type | default | what it does |
|---|---|---|---|
--category | string | Show only one category: development, analysis, research, debug, bugfix, planning, design, review, testing, security, docs, saphan or other. | |
--domain | string | Show only one domain: coding, devops, qa or security. | |
--kind | string | Show only one kind: completion, template or skill. | |
--lang | string | Show only one language: en, pl or th. | |
--platform | string | Show only one platform: android, ios, frontend, backend, cli, infra, data or any. | |
--role | string | Show only prompts offered to this role: advisor, master, scribe or any. | |
--scope | string | Show only one scope: builtin, user or team. | |
--search | string | Show only prompts whose title, body or tags contain this text. | |
--tag | string | Show only prompts carrying this tag. | |
--versions | bool | false | Show every version, marking the superseded ones, instead of only the latest of each chain. |
saphan prompt seed
Writes the built-in prompts carried in this binary into the configured CouchDB store as scope builtin: missing ones are created and identical ones left alone; a prompt that is not built-in is never overwritten and nothing is deleted. ⚠ Replacing an older built-in is currently refused, because the store accepts each document only once. If CouchDB is not configured the command says so and exits 0, and prompt list keeps reading the built-in set from the binary.
saphan prompt show
Prints one prompt as canonical JSON, exactly as stored.
| flag | type | default | what it does |
|---|---|---|---|
--body | bool | false | Print only the body's bytes, with nothing added: the form to pipe to a clipboard. |
saphan prompt validate
Validates prompt documents in files or directories against the schema and the closed lists, reporting every broken document rather than stopping at the first. Each row also says whether re-encoding reproduces the file byte for byte; that is reported, not enforced.
| flag | type | default | what it does |
|---|---|---|---|
--quiet | bool | false | Print only the refusals and the totals. |
Global options apply to every command — see Every command.
saphan pr-preflight
Runs seven checks on the current branch before you open a pull request (branch name, working-tree status, commit subjects, how far it is behind the base, submodules, a clean build and a passing scoped
saphan refusal-class
Records and reads the owner's ratification of refusal classes — the named categories of reason, such as gate-integrity, for which Saphan Studio refuses an act.