@promptbook/cli 0.112.0-36 → 0.112.0-39
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 +10 -6
- package/esm/index.es.js +1079 -437
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/find-refactor-candidates/RefactorCandidateLevel.d.ts +45 -0
- package/esm/scripts/find-refactor-candidates/analyzeSourceFileForRefactorCandidate.d.ts +5 -0
- package/esm/scripts/find-refactor-candidates/find-refactor-candidates.constants.d.ts +2 -14
- package/esm/scripts/find-refactor-candidates/find-refactor-candidates.d.ts +13 -1
- package/esm/scripts/find-refactor-candidates/findRefactorCandidatesInProject.d.ts +23 -1
- package/esm/scripts/find-refactor-candidates/resolveRefactorCandidateProject.d.ts +23 -0
- package/esm/src/_packages/components.index.d.ts +2 -0
- package/esm/src/_packages/types.index.d.ts +48 -46
- package/esm/src/book-components/Chat/Chat/ChatActionsBar.d.ts +7 -0
- package/esm/src/book-components/Chat/Chat/ChatActionsBar.test.d.ts +2 -0
- package/esm/src/book-components/Chat/Chat/ChatInputArea.d.ts +4 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +8 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +2 -0
- package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +50 -1
- package/esm/src/book-components/Chat/Chat/ChatReplyPreview.d.ts +19 -0
- package/esm/src/book-components/Chat/Chat/createProgressCardChecklistMarkdown.d.ts +2 -2
- package/esm/src/book-components/Chat/MockedChat/MockedChat.d.ts +1 -1
- package/esm/src/book-components/Chat/types/ChatMessage.d.ts +35 -0
- package/esm/src/book-components/Chat/utils/resolveChatMessageReplyPreviewText.d.ts +25 -0
- package/esm/src/book-components/Chat/utils/resolveChatMessageReplySenderLabel.d.ts +12 -0
- package/esm/src/cli/cli-commands/coder/agentCodingFile.d.ts +14 -0
- package/esm/src/cli/cli-commands/coder/agentsFile.d.ts +12 -0
- package/esm/src/cli/cli-commands/coder/appendBlock.d.ts +6 -0
- package/esm/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +10 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderEnvFile.d.ts +15 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderMarkdownFile.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderVscodeSettingsFile.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/ensureDirectory.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +1 -1
- package/esm/src/cli/cli-commands/coder/find-refactor-candidates.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/coder/formatDisplayPath.d.ts +6 -0
- package/esm/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.d.ts +6 -0
- package/esm/src/cli/cli-commands/coder/getDefaultCoderVscodeSettings.d.ts +6 -0
- package/esm/src/cli/cli-commands/coder/init.d.ts +3 -38
- package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +25 -0
- package/esm/src/cli/cli-commands/coder/mergeStringRecordJsonFile.d.ts +18 -0
- package/esm/src/cli/cli-commands/coder/printInitializationSummary.d.ts +7 -0
- package/esm/src/cli/cli-commands/coder/readTextFileIfExists.d.ts +6 -0
- package/esm/src/types/string_agent_url.d.ts +7 -0
- package/esm/src/types/string_agent_url_private.d.ts +9 -0
- package/esm/src/types/string_base64.d.ts +13 -0
- package/esm/src/types/string_base64_private.d.ts +2 -2
- package/esm/src/types/string_base_url.d.ts +7 -0
- package/esm/src/types/string_base_url_private.d.ts +9 -0
- package/esm/src/types/string_email.d.ts +13 -0
- package/esm/src/types/string_email_private.d.ts +2 -2
- package/esm/src/types/string_host.d.ts +42 -0
- package/esm/src/types/string_host_private.d.ts +7 -7
- package/esm/src/types/string_href.d.ts +19 -0
- package/esm/src/types/string_href_private.d.ts +24 -0
- package/esm/src/types/string_mime_type.d.ts +15 -0
- package/esm/src/types/string_mime_type_private.d.ts +2 -2
- package/esm/src/types/string_pipeline_root_url.d.ts +7 -0
- package/esm/src/types/string_pipeline_root_url_private.d.ts +9 -0
- package/esm/src/types/string_pipeline_url.d.ts +13 -0
- package/esm/src/types/string_pipeline_url_private.d.ts +17 -0
- package/esm/src/types/string_promptbook_server_url.d.ts +7 -0
- package/esm/src/types/string_promptbook_server_url_private.d.ts +9 -0
- package/esm/src/types/string_url.d.ts +14 -141
- package/esm/src/types/string_url_image.d.ts +7 -0
- package/esm/src/types/string_url_image_private.d.ts +9 -0
- package/esm/src/types/string_url_private.d.ts +0 -80
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -1
- package/umd/index.umd.js +1082 -440
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/find-refactor-candidates/RefactorCandidateLevel.d.ts +45 -0
- package/umd/scripts/find-refactor-candidates/analyzeSourceFileForRefactorCandidate.d.ts +5 -0
- package/umd/scripts/find-refactor-candidates/find-refactor-candidates.constants.d.ts +2 -14
- package/umd/scripts/find-refactor-candidates/find-refactor-candidates.d.ts +13 -1
- package/umd/scripts/find-refactor-candidates/findRefactorCandidatesInProject.d.ts +23 -1
- package/umd/scripts/find-refactor-candidates/resolveRefactorCandidateProject.d.ts +23 -0
- package/umd/src/_packages/components.index.d.ts +2 -0
- package/umd/src/_packages/types.index.d.ts +48 -46
- package/umd/src/book-components/Chat/Chat/ChatActionsBar.d.ts +7 -0
- package/umd/src/book-components/Chat/Chat/ChatActionsBar.test.d.ts +2 -0
- package/umd/src/book-components/Chat/Chat/ChatInputArea.d.ts +4 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +8 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +2 -0
- package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +50 -1
- package/umd/src/book-components/Chat/Chat/ChatReplyPreview.d.ts +19 -0
- package/umd/src/book-components/Chat/Chat/createProgressCardChecklistMarkdown.d.ts +2 -2
- package/umd/src/book-components/Chat/MockedChat/MockedChat.d.ts +1 -1
- package/umd/src/book-components/Chat/types/ChatMessage.d.ts +35 -0
- package/umd/src/book-components/Chat/utils/resolveChatMessageReplyPreviewText.d.ts +25 -0
- package/umd/src/book-components/Chat/utils/resolveChatMessageReplySenderLabel.d.ts +12 -0
- package/umd/src/cli/cli-commands/coder/agentCodingFile.d.ts +14 -0
- package/umd/src/cli/cli-commands/coder/agentsFile.d.ts +12 -0
- package/umd/src/cli/cli-commands/coder/appendBlock.d.ts +6 -0
- package/umd/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +10 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderEnvFile.d.ts +15 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderMarkdownFile.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderVscodeSettingsFile.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/ensureDirectory.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +1 -1
- package/umd/src/cli/cli-commands/coder/find-refactor-candidates.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/coder/formatDisplayPath.d.ts +6 -0
- package/umd/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.d.ts +6 -0
- package/umd/src/cli/cli-commands/coder/getDefaultCoderVscodeSettings.d.ts +6 -0
- package/umd/src/cli/cli-commands/coder/init.d.ts +3 -38
- package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +25 -0
- package/umd/src/cli/cli-commands/coder/mergeStringRecordJsonFile.d.ts +18 -0
- package/umd/src/cli/cli-commands/coder/printInitializationSummary.d.ts +7 -0
- package/umd/src/cli/cli-commands/coder/readTextFileIfExists.d.ts +6 -0
- package/umd/src/types/string_agent_url.d.ts +7 -0
- package/umd/src/types/string_agent_url_private.d.ts +9 -0
- package/umd/src/types/string_base64.d.ts +13 -0
- package/umd/src/types/string_base64_private.d.ts +2 -2
- package/umd/src/types/string_base_url.d.ts +7 -0
- package/umd/src/types/string_base_url_private.d.ts +9 -0
- package/umd/src/types/string_email.d.ts +13 -0
- package/umd/src/types/string_email_private.d.ts +2 -2
- package/umd/src/types/string_host.d.ts +42 -0
- package/umd/src/types/string_host_private.d.ts +7 -7
- package/umd/src/types/string_href.d.ts +19 -0
- package/umd/src/types/string_href_private.d.ts +24 -0
- package/umd/src/types/string_mime_type.d.ts +15 -0
- package/umd/src/types/string_mime_type_private.d.ts +2 -2
- package/umd/src/types/string_pipeline_root_url.d.ts +7 -0
- package/umd/src/types/string_pipeline_root_url_private.d.ts +9 -0
- package/umd/src/types/string_pipeline_url.d.ts +13 -0
- package/umd/src/types/string_pipeline_url_private.d.ts +17 -0
- package/umd/src/types/string_promptbook_server_url.d.ts +7 -0
- package/umd/src/types/string_promptbook_server_url_private.d.ts +9 -0
- package/umd/src/types/string_url.d.ts +14 -141
- package/umd/src/types/string_url_image.d.ts +7 -0
- package/umd/src/types/string_url_image_private.d.ts +9 -0
- package/umd/src/types/string_url_private.d.ts +0 -80
- package/umd/src/version.d.ts +1 -1
package/README.md
CHANGED
|
@@ -527,7 +527,7 @@ In short: tools like Claude Code, Codex, or GitHub Copilot are the **engines**;
|
|
|
527
527
|
|
|
528
528
|
#### How the workflow works
|
|
529
529
|
|
|
530
|
-
1. `ptbk coder init` prepares the project for the coder workflow, seeds project-owned templates in `prompts/templates/`, adds helper `npm run coder:*` scripts, ensures `.gitignore` ignores `/.tmp`, and configures VS Code prompt screenshots in `prompts/screenshots/`.
|
|
530
|
+
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 `/.tmp`, and configures VS Code prompt screenshots in `prompts/screenshots/`.
|
|
531
531
|
2. `ptbk coder generate-boilerplates` creates prompt files in `prompts/`.
|
|
532
532
|
3. You replace placeholder `@@@` sections with real coding tasks.
|
|
533
533
|
4. `ptbk coder run` sends the next ready `[ ]` prompt to the selected coding agent.
|
|
@@ -564,6 +564,8 @@ npx ts-node ./src/cli/test/ptbk.ts coder run --agent github-copilot --model gpt-
|
|
|
564
564
|
|
|
565
565
|
npx ts-node ./src/cli/test/ptbk.ts coder find-refactor-candidates
|
|
566
566
|
|
|
567
|
+
npx ts-node ./src/cli/test/ptbk.ts coder find-refactor-candidates --level xhigh
|
|
568
|
+
|
|
567
569
|
npx ts-node ./src/cli/test/ptbk.ts coder verify
|
|
568
570
|
```
|
|
569
571
|
|
|
@@ -578,7 +580,7 @@ ptbk coder init
|
|
|
578
580
|
|
|
579
581
|
npx ptbk coder generate-boilerplates
|
|
580
582
|
|
|
581
|
-
npx ptbk coder generate-boilerplates --template prompts/templates/
|
|
583
|
+
npx ptbk coder generate-boilerplates --template prompts/templates/common.md
|
|
582
584
|
|
|
583
585
|
npx ptbk coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md
|
|
584
586
|
|
|
@@ -586,19 +588,21 @@ npx ptbk coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh
|
|
|
586
588
|
|
|
587
589
|
npx ptbk coder find-refactor-candidates
|
|
588
590
|
|
|
591
|
+
npx ptbk coder find-refactor-candidates --level xhigh
|
|
592
|
+
|
|
589
593
|
npx ptbk coder verify
|
|
590
594
|
```
|
|
591
595
|
|
|
592
|
-
`ptbk coder init` also bootstraps `package.json` scripts for the four main coder commands, adds the coder temp ignore to `.gitignore`, and configures `.vscode/settings.json` so pasted images from `prompts/*.md` land in `prompts/screenshots/`.
|
|
596
|
+
`ptbk coder init` also bootstraps a starter `AGENTS.md`, adds `package.json` scripts for the four main coder commands, adds the coder temp ignore to `.gitignore`, and configures `.vscode/settings.json` so pasted images from `prompts/*.md` land in `prompts/screenshots/`.
|
|
593
597
|
|
|
594
598
|
#### What each command does
|
|
595
599
|
|
|
596
600
|
| Command | What it does |
|
|
597
601
|
| --- | --- |
|
|
598
|
-
| `ptbk coder init` | Creates `prompts/`, `prompts/done/`, `prompts/templates
|
|
602
|
+
| `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 `/.tmp`; and configures `.vscode/settings.json` to save pasted prompt images into `prompts/screenshots/`. |
|
|
599
603
|
| `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. |
|
|
600
604
|
| `ptbk coder run` | Picks the next ready prompt, appends optional context, runs it through the selected coding agent, marks success or failure, then commits and pushes the result. |
|
|
601
|
-
| `ptbk coder find-refactor-candidates` | Scans the repository for oversized or overpacked files and writes prompt files for likely refactors. |
|
|
605
|
+
| `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. |
|
|
602
606
|
| `ptbk coder verify` | Walks through completed prompts, archives truly finished work, and adds follow-up repair prompts for unfinished results. |
|
|
603
607
|
|
|
604
608
|
#### Most useful `ptbk coder run` flags
|
|
@@ -620,7 +624,7 @@ npx ptbk coder verify
|
|
|
620
624
|
|
|
621
625
|
1. Initialize once with `ptbk coder init`.
|
|
622
626
|
2. Customize `prompts/templates/*.md` if needed, then create or write prompt files in `prompts/`.
|
|
623
|
-
3.
|
|
627
|
+
3. Customize the starter `AGENTS.md` with repository-specific instructions, then pass `--context AGENTS.md`.
|
|
624
628
|
4. Run one prompt at a time interactively, or use `--no-wait` for unattended batches.
|
|
625
629
|
5. Finish with `ptbk coder verify` so resolved prompts are archived and broken ones get explicit repair follow-ups.
|
|
626
630
|
|