prompt_manager 0.5.8 → 1.0.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +33 -0
- data/README.md +206 -516
- data/Rakefile +0 -8
- data/docs/api/configuration.md +31 -327
- data/docs/api/constants.md +60 -0
- data/docs/api/index.md +14 -0
- data/docs/api/metadata.md +99 -0
- data/docs/api/parsed.md +98 -0
- data/docs/api/pm-module.md +131 -0
- data/docs/api/render-context.md +51 -0
- data/docs/architecture/design-decisions.md +70 -0
- data/docs/architecture/index.md +6 -0
- data/docs/architecture/processing-pipeline.md +112 -0
- data/docs/assets/css/custom.css +1 -0
- data/docs/assets/images/prompt_manager.gif +0 -0
- data/docs/assets/images/prompt_manager.mp4 +0 -0
- data/docs/examples/ai-agent-prompts.md +173 -0
- data/docs/examples/code-review-prompt.md +107 -0
- data/docs/examples/index.md +7 -0
- data/docs/examples/multi-file-composition.md +123 -0
- data/docs/getting-started/configuration.md +106 -0
- data/docs/getting-started/index.md +7 -0
- data/docs/getting-started/installation.md +10 -73
- data/docs/getting-started/quick-start.md +50 -225
- data/docs/guides/comment-stripping.md +64 -0
- data/docs/guides/custom-directives.md +115 -0
- data/docs/guides/erb-rendering.md +102 -0
- data/docs/guides/includes.md +146 -0
- data/docs/guides/index.md +11 -0
- data/docs/guides/parameters.md +96 -0
- data/docs/guides/parsing.md +127 -0
- data/docs/guides/shell-expansion.md +108 -0
- data/docs/index.md +54 -214
- data/lib/pm/configuration.rb +17 -0
- data/lib/pm/directives.rb +61 -0
- data/lib/pm/metadata.rb +17 -0
- data/lib/pm/parsed.rb +59 -0
- data/lib/pm/shell.rb +57 -0
- data/lib/pm/version.rb +5 -0
- data/lib/pm.rb +121 -0
- data/lib/prompt_manager.rb +2 -27
- data/mkdocs.yml +101 -66
- metadata +42 -101
- data/docs/.keep +0 -0
- data/docs/advanced/custom-keywords.md +0 -421
- data/docs/advanced/dynamic-directives.md +0 -535
- data/docs/advanced/performance.md +0 -612
- data/docs/advanced/search-integration.md +0 -635
- data/docs/api/directive-processor.md +0 -431
- data/docs/api/prompt-class.md +0 -354
- data/docs/api/storage-adapters.md +0 -462
- data/docs/assets/favicon.ico +0 -1
- data/docs/assets/logo.svg +0 -24
- data/docs/core-features/comments.md +0 -48
- data/docs/core-features/directive-processing.md +0 -38
- data/docs/core-features/erb-integration.md +0 -68
- data/docs/core-features/error-handling.md +0 -197
- data/docs/core-features/parameter-history.md +0 -76
- data/docs/core-features/parameterized-prompts.md +0 -500
- data/docs/core-features/shell-integration.md +0 -79
- data/docs/development/architecture.md +0 -544
- data/docs/development/contributing.md +0 -425
- data/docs/development/roadmap.md +0 -234
- data/docs/development/testing.md +0 -822
- data/docs/examples/advanced.md +0 -523
- data/docs/examples/basic.md +0 -688
- data/docs/examples/real-world.md +0 -776
- data/docs/examples.md +0 -337
- data/docs/getting-started/basic-concepts.md +0 -318
- data/docs/migration/v0.9.0.md +0 -459
- data/docs/migration/v1.0.0.md +0 -591
- data/docs/storage/activerecord-adapter.md +0 -348
- data/docs/storage/custom-adapters.md +0 -176
- data/docs/storage/filesystem-adapter.md +0 -236
- data/docs/storage/overview.md +0 -427
- data/examples/advanced_integrations.rb +0 -52
- data/examples/directives.rb +0 -102
- data/examples/prompts_dir/advanced_demo.txt +0 -79
- data/examples/prompts_dir/directive_example.json +0 -1
- data/examples/prompts_dir/directive_example.txt +0 -8
- data/examples/prompts_dir/todo.json +0 -1
- data/examples/prompts_dir/todo.txt +0 -7
- data/examples/prompts_dir/toy/8-ball.txt +0 -4
- data/examples/rgfzf +0 -44
- data/examples/simple.rb +0 -160
- data/examples/using_search_proc.rb +0 -68
- data/improvement_plan.md +0 -996
- data/lib/prompt_manager/directive_processor.rb +0 -47
- data/lib/prompt_manager/prompt.rb +0 -195
- data/lib/prompt_manager/storage/active_record_adapter.rb +0 -157
- data/lib/prompt_manager/storage/file_system_adapter.rb +0 -339
- data/lib/prompt_manager/storage.rb +0 -34
- data/lib/prompt_manager/version.rb +0 -5
- data/prompt_manager_logo.png +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 44ffbc06761a515acea5e843fefe10ac6df3cec9d3daf88dcca7f3696c700f07
|
|
4
|
+
data.tar.gz: da7892847261aec52d5db4807eb0d27d27e5a51611bb286e25dfdc24e7a6fb55
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a6b73bd17ff08c89658179a86ca6e69c22646119561d3339bb3f6204a61f9c249cc0acd34c48f049bb191689c72a52e66bc9565061482e0db29a36fea3ab6e38
|
|
7
|
+
data.tar.gz: fa017dfaf15bb2da2cb37407f1308e92031bd0ae28d26caef6e9d76e5a5056511efa1324e1f50a7e7116e5e93f26f0d6d9fd802d047d5ceb98585d646ae805d1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
## Unreleased
|
|
2
2
|
|
|
3
3
|
## Released
|
|
4
|
+
### [1.0.0] = 2026-02-03
|
|
5
|
+
|
|
6
|
+
**Complete rewrite** — repositioned from a prompt management system with storage adapters to a focused prompt parsing and rendering engine.
|
|
7
|
+
|
|
8
|
+
#### Breaking Changes
|
|
9
|
+
- **New `PM` module replaces `PromptManager`** — the entire codebase has been restructured under the `PM` namespace. A backward-compatibility alias (`PromptManager = PM`) is provided via `require 'prompt_manager'`.
|
|
10
|
+
- **Storage adapters removed** — `FileSystemAdapter`, `ActiveRecordAdapter`, and all database-backed persistence have been removed. The library now operates on strings, files, and Pathnames directly.
|
|
11
|
+
- **`Prompt` class removed** — replaced by the lightweight `PM::Parsed` struct.
|
|
12
|
+
- **`DirectiveProcessor` class removed** — replaced by a simple `PM.register` directive registration API.
|
|
13
|
+
- **Parameter history removed** — the library no longer tracks historical parameter values per keyword.
|
|
14
|
+
- **Configuration simplified** — only three settings remain: `prompts_dir`, `shell`, and `erb`. Options like `parameter_regex` and `search_proc` have been removed.
|
|
15
|
+
|
|
16
|
+
#### New Features
|
|
17
|
+
- **Symbol and single-word parsing** — `PM.parse(:code_review)` and `PM.parse('code_review')` automatically resolve to `code_review.md` in the configured `prompts_dir`.
|
|
18
|
+
- **Directive aliases** — `PM.register(:webpage, :website, :web) { |ctx, url| ... }` registers multiple names for a single directive with rollback on duplicate detection.
|
|
19
|
+
- **`PM::Metadata`** — OpenStruct-based metadata with automatic predicate methods for boolean fields (e.g., `metadata.shell?`).
|
|
20
|
+
- **`PM::Parsed`** — Struct-based result with `RenderContext` support and required-parameter validation in `to_s`.
|
|
21
|
+
- **Built-in `include` directive** — compose prompts from multiple files with loop protection.
|
|
22
|
+
- **Streamlined parsing pipeline** — strip HTML comments, extract YAML front matter, optional shell expansion (`$VAR`, `${VAR}`, `$(command)`), optional ERB rendering.
|
|
23
|
+
|
|
24
|
+
#### Removed
|
|
25
|
+
- `PromptManager::Prompt` class
|
|
26
|
+
- `PromptManager::DirectiveProcessor` class
|
|
27
|
+
- `PromptManager::Storage::FileSystemAdapter`
|
|
28
|
+
- `PromptManager::Storage::ActiveRecordAdapter`
|
|
29
|
+
- Custom error classes (`PromptManager::Error` hierarchy)
|
|
30
|
+
- Development dependencies on `activerecord`, `sqlite3`, and `tocer`
|
|
31
|
+
|
|
32
|
+
#### Added
|
|
33
|
+
- Runtime dependency on `ostruct`
|
|
34
|
+
- Comprehensive test suite (8 test files, 19 fixtures)
|
|
35
|
+
- Full documentation site under `docs/` with guides for parsing, shell expansion, ERB rendering, custom directives, and prompt composition
|
|
36
|
+
|
|
4
37
|
### [0.5.8] = 2025-09-01
|
|
5
38
|
- fixed issue where removed keywords from prompt text were still being included in parameters if they existed in the JSON file (addresses AIA issue #105)
|
|
6
39
|
- parameters now only include keywords currently present in the prompt text, while preserving historical values for existing keywords
|