@promptbook/components 0.114.0-24 → 0.114.0-26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -571,7 +571,7 @@ Prompts marked with `[-]` are not ready yet, prompts containing `@@@` are treate
571
571
 
572
572
  #### Features
573
573
 
574
- - **Multi-runner execution:** `openai-codex`, `github-copilot`, `cline`, `claude-code`, `opencode`, `gemini`
574
+ - **Multi-runner execution:** `openai-codex`, `github-copilot`, `cline`, `claude-code`, `opencode`, `gemini`, `qwen-code`
575
575
  - **Context injection:** `--agent agents/coding/developer.book --context AGENTS.md` or inline extra instructions
576
576
  - **Reasoning control:** `--thinking-level low|medium|high|xhigh` for supported runners
577
577
  - **Unattended or interactive runs:** default auto mode, or `--no-auto` to wait for user confirmation before each prompt
@@ -648,7 +648,7 @@ ptbk coder verify
648
648
  | Flag | Purpose |
649
649
  | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
650
650
  | `--harness <name>` | Selects the coding harness. |
651
- | `--model <model>` | Chooses the runner model; required for `openai-codex` and `gemini`, optional for `github-copilot`. |
651
+ | `--model <model>` | Chooses the runner model; required for `openai-codex`, `gemini` and `qwen-code`, optional for `github-copilot`. |
652
652
  | `--context <text-or-file>` | Appends extra instructions inline or from a file like `AGENTS.md`. |
653
653
  | `--test <command>` | Runs a verification command after each prompt attempt and feeds failing output back for retries. |
654
654
  | `--test-before <mode>` | Runs tests before coding: `no` (default), `yes-and-fail` (stop with results), or `yes-and-fix` (create one repair prompt first); defaults to `npm test` when enabled without `--test`. |
package/esm/index.es.js CHANGED
@@ -39,7 +39,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
39
39
  * @generated
40
40
  * @see https://github.com/webgptorg/promptbook
41
41
  */
42
- const PROMPTBOOK_ENGINE_VERSION = '0.114.0-24';
42
+ const PROMPTBOOK_ENGINE_VERSION = '0.114.0-26';
43
43
  /**
44
44
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
45
45
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -18033,29 +18033,36 @@ class UseUserLocationCommitmentDefinition extends BaseCommitmentDefinition {
18033
18033
  /**
18034
18034
  * `WRITING RULES` commitment definition.
18035
18035
  *
18036
- * It adds constraints that apply strictly to writing style and presentation
18037
- * rather than task-solving behavior.
18036
+ * The `WRITING RULES`/`WRITING RULE` commitment adds constraints that apply strictly to writing style
18037
+ * and presentation rather than task-solving behavior.
18038
+ *
18039
+ * Example usage in agent source:
18040
+ *
18041
+ * ```book
18042
+ * WRITING RULES Keep every response under 120 words
18043
+ * WRITING RULE Always end the message with an emoji
18044
+ * ```
18038
18045
  *
18039
18046
  * @private [🪔] Maybe export the commitments through some package
18040
18047
  */
18041
18048
  class WritingRulesCommitmentDefinition extends BaseCommitmentDefinition {
18042
- constructor() {
18043
- super('WRITING RULES');
18049
+ constructor(type = 'WRITING RULES') {
18050
+ super(type);
18044
18051
  }
18045
18052
  /**
18046
- * Short one-line description of `WRITING RULES`.
18053
+ * Short one-line description of `WRITING RULES`/`WRITING RULE`.
18047
18054
  */
18048
18055
  get description() {
18049
18056
  return 'Add writing-only constraints such as tone, length, formatting, or emoji usage.';
18050
18057
  }
18051
18058
  /**
18052
- * Icon for `WRITING RULES`.
18059
+ * Icon for `WRITING RULES`/`WRITING RULE`.
18053
18060
  */
18054
18061
  get icon() {
18055
18062
  return '📝';
18056
18063
  }
18057
18064
  /**
18058
- * Markdown documentation for `WRITING RULES`.
18065
+ * Markdown documentation for `WRITING RULES`/`WRITING RULE` commitment.
18059
18066
  */
18060
18067
  get documentation() {
18061
18068
  return spaceTrim$1(`
@@ -18065,6 +18072,7 @@ class WritingRulesCommitmentDefinition extends BaseCommitmentDefinition {
18065
18072
 
18066
18073
  ## Key aspects
18067
18074
 
18075
+ - All writing rules are treated equally regardless of singular/plural form.
18068
18076
  - Use it for writing-only constraints such as tone, formatting, length, emoji usage, punctuation, or reading level.
18069
18077
  - Do **not** use it for problem-solving behavior, policy, tool usage, or decision-making logic. Use \`RULE\` for that.
18070
18078
  - Newer writing-rules blocks override conflicting earlier writing-rules blocks.
@@ -18263,7 +18271,8 @@ const COMMITMENT_REGISTRY = [
18263
18271
  new LanguageCommitmentDefinition('LANGUAGE'),
18264
18272
  new LanguageCommitmentDefinition('LANGUAGES'),
18265
18273
  new WritingSampleCommitmentDefinition(),
18266
- new WritingRulesCommitmentDefinition(),
18274
+ new WritingRulesCommitmentDefinition('WRITING RULES'),
18275
+ new WritingRulesCommitmentDefinition('WRITING RULE'),
18267
18276
  new SampleCommitmentDefinition('SAMPLE'),
18268
18277
  new SampleCommitmentDefinition('EXAMPLE'),
18269
18278
  new FormatCommitmentDefinition('FORMAT'),