@promptbook/documents 0.114.0-49 → 0.114.0-50

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.
Files changed (34) hide show
  1. package/README.md +3 -3
  2. package/esm/index.es.js +3 -2
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/src/cli/cli-commands/coder/add.d.ts +7 -2
  5. package/esm/src/cli/cli-commands/coder/ensureCoderGitattributesFile.d.ts +13 -0
  6. package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
  7. package/esm/src/cli/cli-commands/coder/fix.d.ts +7 -0
  8. package/esm/src/cli/cli-commands/coder/fix.test.d.ts +1 -0
  9. package/esm/src/cli/cli-commands/coder/fixWorkflow.test.d.ts +1 -0
  10. package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +1 -0
  11. package/esm/src/cli/cli-commands/coder.d.ts +1 -0
  12. package/esm/src/cli/cli-commands/common/coderCheckCliOptions.d.ts +1 -1
  13. package/esm/src/cli/cli-commands/common/ensureProjectTextFile.d.ts +7 -0
  14. package/esm/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +3 -1
  15. package/esm/src/cli/cli-commands/common/validateCoderRunOptions.d.ts +1 -1
  16. package/esm/src/cli/cli-commands/common/workspaceRepository.d.ts +12 -0
  17. package/esm/src/version.d.ts +1 -1
  18. package/package.json +2 -2
  19. package/umd/index.umd.js +3 -2
  20. package/umd/index.umd.js.map +1 -1
  21. package/umd/src/cli/cli-commands/coder/add.d.ts +7 -2
  22. package/umd/src/cli/cli-commands/coder/ensureCoderGitattributesFile.d.ts +13 -0
  23. package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
  24. package/umd/src/cli/cli-commands/coder/fix.d.ts +7 -0
  25. package/umd/src/cli/cli-commands/coder/fix.test.d.ts +1 -0
  26. package/umd/src/cli/cli-commands/coder/fixWorkflow.test.d.ts +1 -0
  27. package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +1 -0
  28. package/umd/src/cli/cli-commands/coder.d.ts +1 -0
  29. package/umd/src/cli/cli-commands/common/coderCheckCliOptions.d.ts +1 -1
  30. package/umd/src/cli/cli-commands/common/ensureProjectTextFile.d.ts +7 -0
  31. package/umd/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +3 -1
  32. package/umd/src/cli/cli-commands/common/validateCoderRunOptions.d.ts +1 -1
  33. package/umd/src/cli/cli-commands/common/workspaceRepository.d.ts +12 -0
  34. package/umd/src/version.d.ts +1 -1
package/README.md CHANGED
@@ -420,7 +420,7 @@ In short: tools like Claude Code, Codex, or GitHub Copilot are the **engines**;
420
420
 
421
421
  #### How the workflow works
422
422
 
423
- 1. `ptbk coder init` prepares the project for the coder workflow, seeds project-owned generic templates in `prompts/templates/`, creates a starter `AGENTS.md` context file, adds helper `npm run coder:*` scripts, ensures `.gitignore` ignores `/.promptbook`, and configures VS Code prompt screenshots in `prompts/screenshots/`.
423
+ 1. `ptbk coder init` prepares the project for the coder workflow, seeds project-owned generic templates in `prompts/templates/`, creates a starter `AGENTS.md` context file, adds helper `npm run coder:*` scripts, ensures `.gitignore` ignores `node_modules` and `/.promptbook`, creates missing `.gitattributes` for LF line endings, and configures VS Code prompt screenshots in `prompts/screenshots/`.
424
424
  2. `ptbk coder generate-boilerplates` creates prompt files in `prompts/`.
425
425
  3. You replace placeholder `@@@` sections with real coding tasks.
426
426
  4. `ptbk coder run` sends the next ready `[ ]` prompt to the selected coding agent and immediately marks it as in progress `[^]`, naming the harness, the model and the step which is running.
@@ -491,13 +491,13 @@ ptbk coder find-refactor-candidates --level xhigh
491
491
  ptbk coder verify
492
492
  ```
493
493
 
494
- `ptbk coder init` also bootstraps a starter `AGENTS.md`, adds `package.json` scripts for the four main coder commands, adds the shared `/.promptbook` temp ignore to `.gitignore`, and configures `.vscode/settings.json` so pasted images from `prompts/*.md` land in `prompts/screenshots/`.
494
+ `ptbk coder init` also bootstraps a starter `AGENTS.md`, adds `package.json` scripts for the four main coder commands, adds `node_modules` and the shared `/.promptbook` temp ignore to `.gitignore`, and configures `.vscode/settings.json` so pasted images from `prompts/*.md` land in `prompts/screenshots/`. It creates a missing `.gitattributes` with `* text=auto eol=lf` and preserves existing attributes.
495
495
 
496
496
  #### What each command does
497
497
 
498
498
  | Command | What it does |
499
499
  | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------ | ---- | ----- | ------------------------------------------------------------------------ |
500
- | `ptbk coder init` | Creates `prompts/`, `prompts/done/`, the project-generic template files materialized in `prompts/templates/` (currently `common.md`), and a starter `AGENTS.md`; ensures `.env` contains `CODING_AGENT_GIT_NAME`, `CODING_AGENT_GIT_EMAIL`, and `CODING_AGENT_GIT_SIGNING_KEY`; adds helper coder scripts to `package.json`; ensures `.gitignore` contains `/.promptbook`; and configures `.vscode/settings.json` to save pasted prompt images into `prompts/screenshots/`. |
500
+ | `ptbk coder init` | Creates `prompts/`, `prompts/done/`, the project-generic template files materialized in `prompts/templates/` (currently `common.md`), and a starter `AGENTS.md`; ensures `.env` contains `CODING_AGENT_GIT_NAME`, `CODING_AGENT_GIT_EMAIL`, and `CODING_AGENT_GIT_SIGNING_KEY`; adds helper coder scripts to `package.json`; ensures `.gitignore` contains `node_modules` and `/.promptbook`; creates missing `.gitattributes` with `* text=auto eol=lf`; and configures `.vscode/settings.json` to save pasted prompt images into `prompts/screenshots/`. |
501
501
  | `ptbk coder generate-boilerplates` | Creates new prompt markdown files with fresh emoji tags so you can quickly fill in coding tasks; `--template` accepts either a built-in alias or a markdown file path relative to the project root. |
502
502
  | `ptbk coder run` | Picks the next ready prompt, can run project checks before coding to stop or repair pre-existing failures, appends optional context, runs it through the selected coding agent, can optionally check each attempt with the project command and feed failing output back for retries, then marks success or failure, commits the result, and pushes only when `--auto-push` is enabled. |
503
503
  | `ptbk coder find-refactor-candidates` | Scans the repository for oversized or overpacked files and writes prompt files for likely refactors; `--level <xlow | low | medium | high | xhigh | extreme>` ranges from a very benevolent scan to a very aggressive sweep. |
package/esm/index.es.js CHANGED
@@ -25,7 +25,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
25
25
  * @generated
26
26
  * @see https://github.com/webgptorg/promptbook
27
27
  */
28
- const PROMPTBOOK_ENGINE_VERSION = '0.114.0-49';
28
+ const PROMPTBOOK_ENGINE_VERSION = '0.114.0-50';
29
29
  /**
30
30
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
31
31
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1552,8 +1552,9 @@ function $execCommand(options) {
1552
1552
  resolve(spaceTrim$1(output.join('\n')));
1553
1553
  }
1554
1554
  };
1555
+ // `exit` can arrive before the stdout/stderr pipes finish. Git metadata and hook diagnostics
1556
+ // must be complete before a following repository inspection uses the command's result.
1555
1557
  commandProcess.on('close', finishWithCode);
1556
- commandProcess.on('exit', finishWithCode);
1557
1558
  commandProcess.on('disconnect', () => {
1558
1559
  // Note: Unexpected disconnection should always result in rejection
1559
1560
  reject(new Error(`Command "${humanReadableCommand}" disconnected`));