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
data/lib/pm.rb
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
require 'pathname'
|
|
5
|
+
require 'yaml'
|
|
6
|
+
|
|
7
|
+
# PM (PromptManager) parses YAML metadata from markdown strings or files.
|
|
8
|
+
# Processing pipeline: strip HTML comments → extract metadata → shell expansion → ERB on demand.
|
|
9
|
+
module PM
|
|
10
|
+
METADATA_REGEXP = /
|
|
11
|
+
\A
|
|
12
|
+
[[:space:]]*
|
|
13
|
+
---
|
|
14
|
+
(?<metadata>.*?)
|
|
15
|
+
---
|
|
16
|
+
[[:blank:]]*$[\n\r]?
|
|
17
|
+
(?<content>.*)
|
|
18
|
+
\z
|
|
19
|
+
/mx
|
|
20
|
+
|
|
21
|
+
HTML_COMMENT_REGEXP = /<!--.*?-->/m
|
|
22
|
+
ENV_VAR_REGEXP = /\$\{([A-Z_][A-Z0-9_]*)\}|\$([A-Z_][A-Z0-9_]*)/
|
|
23
|
+
COMMAND_START = '$('
|
|
24
|
+
|
|
25
|
+
def self.config
|
|
26
|
+
@config ||= Configuration.new
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.configure
|
|
30
|
+
yield config
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# --- Parsing ---
|
|
34
|
+
|
|
35
|
+
# Parses a source through the full pipeline:
|
|
36
|
+
# strip HTML comments → extract YAML metadata → shell expansion (when shell: true).
|
|
37
|
+
#
|
|
38
|
+
# When source is a Pathname, responds to :to_path, is a String ending
|
|
39
|
+
# in ".md", a Symbol, or a single word (e.g. "greeting"), it is treated
|
|
40
|
+
# as a file path. Symbols and single-word strings are converted to
|
|
41
|
+
# "name.md" basenames. The file is read and parsed, and `directory`,
|
|
42
|
+
# `name`, `created_at`, `modified_at` are added to metadata.
|
|
43
|
+
#
|
|
44
|
+
# Otherwise source is parsed directly as a string.
|
|
45
|
+
def self.parse(source)
|
|
46
|
+
source = "#{source}.md" if source.is_a?(Symbol) || single_word?(source)
|
|
47
|
+
|
|
48
|
+
if file_source?(source)
|
|
49
|
+
raw = source.respond_to?(:to_path) ? source.to_path : source
|
|
50
|
+
unless config.prompts_dir.empty?
|
|
51
|
+
raw = (Pathname.new(config.prompts_dir) + raw).to_s
|
|
52
|
+
end
|
|
53
|
+
path = File.expand_path(raw)
|
|
54
|
+
parsed = parse_string(File.read(path))
|
|
55
|
+
|
|
56
|
+
stat = File.stat(path)
|
|
57
|
+
metadata = build_metadata(
|
|
58
|
+
parsed.metadata.to_h.merge(
|
|
59
|
+
directory: File.dirname(path),
|
|
60
|
+
name: File.basename(path),
|
|
61
|
+
created_at: stat.birthtime,
|
|
62
|
+
modified_at: stat.mtime
|
|
63
|
+
)
|
|
64
|
+
)
|
|
65
|
+
Parsed.new(metadata: metadata, content: parsed.content)
|
|
66
|
+
else
|
|
67
|
+
parse_string(source)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Returns true when source should be treated as a file path.
|
|
72
|
+
def self.file_source?(source)
|
|
73
|
+
source.respond_to?(:to_path) || (source.is_a?(String) && source.end_with?('.md'))
|
|
74
|
+
end
|
|
75
|
+
private_class_method :file_source?
|
|
76
|
+
|
|
77
|
+
# Returns true when source is a single word with no spaces,
|
|
78
|
+
# path separators, or file extension.
|
|
79
|
+
def self.single_word?(source)
|
|
80
|
+
source.is_a?(String) && source.match?(/\A\w+\z/)
|
|
81
|
+
end
|
|
82
|
+
private_class_method :single_word?
|
|
83
|
+
|
|
84
|
+
# Parses a string through the full pipeline.
|
|
85
|
+
def self.parse_string(string)
|
|
86
|
+
stripped = strip_comments(string)
|
|
87
|
+
match = stripped.match(METADATA_REGEXP)
|
|
88
|
+
|
|
89
|
+
if match
|
|
90
|
+
metadata = build_metadata(YAML.safe_load(match[:metadata], permitted_classes: [Date, Time]))
|
|
91
|
+
content = match[:content]
|
|
92
|
+
else
|
|
93
|
+
metadata = build_metadata({})
|
|
94
|
+
content = stripped
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
content = expand_shell(content) if metadata.shell?
|
|
98
|
+
|
|
99
|
+
Parsed.new(metadata: metadata, content: content)
|
|
100
|
+
end
|
|
101
|
+
private_class_method :parse_string
|
|
102
|
+
|
|
103
|
+
# Builds a Metadata object with defaults for shell and erb.
|
|
104
|
+
def self.build_metadata(hash)
|
|
105
|
+
defaults = { 'shell' => config.shell, 'erb' => config.erb }
|
|
106
|
+
Metadata.new(defaults.merge(hash.transform_keys(&:to_s)))
|
|
107
|
+
end
|
|
108
|
+
private_class_method :build_metadata
|
|
109
|
+
|
|
110
|
+
# Strips HTML comments from a string.
|
|
111
|
+
def self.strip_comments(string)
|
|
112
|
+
string.gsub(HTML_COMMENT_REGEXP, '')
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
require_relative 'pm/configuration'
|
|
117
|
+
require_relative 'pm/version'
|
|
118
|
+
require_relative 'pm/metadata'
|
|
119
|
+
require_relative 'pm/parsed'
|
|
120
|
+
require_relative 'pm/directives'
|
|
121
|
+
require_relative 'pm/shell'
|
data/lib/prompt_manager.rb
CHANGED
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
#
|
|
3
|
-
# frozen_string_literal: true
|
|
1
|
+
require_relative 'pm'
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
require_relative "prompt_manager/version"
|
|
8
|
-
require_relative "prompt_manager/prompt"
|
|
9
|
-
require_relative "prompt_manager/storage"
|
|
10
|
-
require_relative "prompt_manager/storage/file_system_adapter"
|
|
11
|
-
|
|
12
|
-
# The PromptManager module provides functionality for managing, storing,
|
|
13
|
-
# retrieving, and parameterizing text prompts used with generative AI systems.
|
|
14
|
-
# It supports different storage backends through adapters and offers features
|
|
15
|
-
# like parameter substitution, directives processing, and comment handling.
|
|
16
|
-
module PromptManager
|
|
17
|
-
# Base error class for all PromptManager-specific errors
|
|
18
|
-
class Error < StandardError; end
|
|
19
|
-
|
|
20
|
-
# Error class for storage-related issues
|
|
21
|
-
class StorageError < Error; end
|
|
22
|
-
|
|
23
|
-
# Error class for parameter substitution issues
|
|
24
|
-
class ParameterError < Error; end
|
|
25
|
-
|
|
26
|
-
# Error class for configuration issues
|
|
27
|
-
class ConfigurationError < Error; end
|
|
28
|
-
end
|
|
3
|
+
PromptManager = PM
|
data/mkdocs.yml
CHANGED
|
@@ -1,43 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# MkDocs Configuration for PM (PromptManager) Documentation
|
|
2
|
+
site_name: PM (PromptManager)
|
|
3
|
+
site_description: Parse YAML metadata from markdown prompts with shell expansion and ERB rendering
|
|
4
|
+
site_author: Dewayne VanHoozer
|
|
4
5
|
site_url: https://madbomber.github.io/prompt_manager
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
copyright: Copyright © 2025 Dewayne VanHoozer
|
|
7
|
+
|
|
8
|
+
# Repository information
|
|
9
|
+
repo_name: madbomber/prompt_manager
|
|
10
|
+
repo_url: https://github.com/madbomber/prompt_manager
|
|
7
11
|
edit_uri: edit/main/docs/
|
|
8
12
|
|
|
13
|
+
# Configuration
|
|
9
14
|
theme:
|
|
10
15
|
name: material
|
|
11
|
-
|
|
12
|
-
|
|
16
|
+
|
|
17
|
+
# Color scheme
|
|
13
18
|
palette:
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
primary: indigo
|
|
19
|
+
- scheme: default
|
|
20
|
+
primary: teal
|
|
17
21
|
accent: amber
|
|
18
22
|
toggle:
|
|
19
23
|
icon: material/brightness-7
|
|
20
24
|
name: Switch to dark mode
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
primary:
|
|
25
|
+
|
|
26
|
+
- scheme: slate
|
|
27
|
+
primary: teal
|
|
24
28
|
accent: amber
|
|
25
29
|
toggle:
|
|
26
30
|
icon: material/brightness-4
|
|
27
31
|
name: Switch to light mode
|
|
32
|
+
|
|
33
|
+
# Typography
|
|
34
|
+
font:
|
|
35
|
+
text: Roboto
|
|
36
|
+
code: Roboto Mono
|
|
37
|
+
|
|
38
|
+
# Logo and icon
|
|
39
|
+
icon:
|
|
40
|
+
repo: fontawesome/brands/github
|
|
41
|
+
logo: material/text-box-outline
|
|
42
|
+
|
|
43
|
+
# Theme features
|
|
28
44
|
features:
|
|
29
45
|
- navigation.instant
|
|
30
46
|
- navigation.tracking
|
|
31
47
|
- navigation.tabs
|
|
32
48
|
- navigation.tabs.sticky
|
|
33
|
-
- navigation.sections
|
|
34
|
-
- navigation.expand
|
|
35
49
|
- navigation.path
|
|
36
|
-
- navigation.prune
|
|
37
50
|
- navigation.indexes
|
|
38
51
|
- navigation.top
|
|
52
|
+
- navigation.footer
|
|
39
53
|
- toc.follow
|
|
40
|
-
- toc.integrate
|
|
41
54
|
- search.suggest
|
|
42
55
|
- search.highlight
|
|
43
56
|
- search.share
|
|
@@ -45,11 +58,17 @@ theme:
|
|
|
45
58
|
- content.code.copy
|
|
46
59
|
- content.code.annotate
|
|
47
60
|
- content.tabs.link
|
|
61
|
+
- content.tooltips
|
|
62
|
+
- content.action.edit
|
|
63
|
+
- content.action.view
|
|
48
64
|
|
|
65
|
+
# Plugins
|
|
49
66
|
plugins:
|
|
50
67
|
- search:
|
|
51
|
-
separator: '[\s\-,:!=\[\]()"
|
|
68
|
+
separator: '[\s\-,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])'
|
|
69
|
+
- tags
|
|
52
70
|
|
|
71
|
+
# Extensions
|
|
53
72
|
markdown_extensions:
|
|
54
73
|
- abbr
|
|
55
74
|
- admonition
|
|
@@ -57,26 +76,36 @@ markdown_extensions:
|
|
|
57
76
|
- def_list
|
|
58
77
|
- footnotes
|
|
59
78
|
- md_in_html
|
|
79
|
+
- tables
|
|
60
80
|
- toc:
|
|
61
81
|
permalink: true
|
|
62
|
-
|
|
82
|
+
title: On this page
|
|
83
|
+
|
|
63
84
|
- pymdownx.arithmatex:
|
|
64
85
|
generic: true
|
|
65
86
|
- pymdownx.betterem:
|
|
66
87
|
smart_enable: all
|
|
67
88
|
- pymdownx.caret
|
|
89
|
+
- pymdownx.critic
|
|
68
90
|
- pymdownx.details
|
|
69
91
|
- pymdownx.emoji:
|
|
70
|
-
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
|
71
92
|
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
|
93
|
+
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
|
72
94
|
- pymdownx.highlight:
|
|
73
95
|
anchor_linenums: true
|
|
74
96
|
line_spans: __span
|
|
75
97
|
pygments_lang_class: true
|
|
76
98
|
- pymdownx.inlinehilite
|
|
77
99
|
- pymdownx.keys
|
|
100
|
+
- pymdownx.magiclink:
|
|
101
|
+
repo_url_shorthand: true
|
|
102
|
+
user: madbomber
|
|
103
|
+
repo: prompt_manager
|
|
104
|
+
normalize_issue_symbols: true
|
|
78
105
|
- pymdownx.mark
|
|
79
106
|
- pymdownx.smartsymbols
|
|
107
|
+
- pymdownx.snippets:
|
|
108
|
+
check_paths: true
|
|
80
109
|
- pymdownx.superfences:
|
|
81
110
|
custom_fences:
|
|
82
111
|
- name: mermaid
|
|
@@ -88,59 +117,65 @@ markdown_extensions:
|
|
|
88
117
|
custom_checkbox: true
|
|
89
118
|
- pymdownx.tilde
|
|
90
119
|
|
|
120
|
+
# Extra CSS
|
|
121
|
+
extra_css:
|
|
122
|
+
- assets/css/custom.css
|
|
123
|
+
|
|
124
|
+
# Social media and extra configuration
|
|
91
125
|
extra:
|
|
92
126
|
social:
|
|
93
127
|
- icon: fontawesome/brands/github
|
|
94
|
-
link: https://github.com/
|
|
95
|
-
name: GitHub
|
|
128
|
+
link: https://github.com/madbomber/prompt_manager
|
|
129
|
+
name: PM on GitHub
|
|
96
130
|
- icon: fontawesome/solid/gem
|
|
97
131
|
link: https://rubygems.org/gems/prompt_manager
|
|
98
|
-
name: RubyGems
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
132
|
+
name: PM on RubyGems
|
|
133
|
+
|
|
134
|
+
analytics:
|
|
135
|
+
feedback:
|
|
136
|
+
title: Was this page helpful?
|
|
137
|
+
ratings:
|
|
138
|
+
- icon: material/emoticon-happy-outline
|
|
139
|
+
name: This page was helpful
|
|
140
|
+
data: 1
|
|
141
|
+
note: Thanks for your feedback!
|
|
142
|
+
- icon: material/emoticon-sad-outline
|
|
143
|
+
name: This page could be improved
|
|
144
|
+
data: 0
|
|
145
|
+
note: Thanks for your feedback! Help us improve by creating an issue.
|
|
102
146
|
|
|
147
|
+
# Navigation
|
|
103
148
|
nav:
|
|
104
|
-
- Home:
|
|
149
|
+
- Home:
|
|
150
|
+
- Overview: index.md
|
|
105
151
|
- Getting Started:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
- FileSystemAdapter: storage/filesystem-adapter.md
|
|
120
|
-
- ActiveRecordAdapter: storage/activerecord-adapter.md
|
|
121
|
-
- Custom Adapters: storage/custom-adapters.md
|
|
152
|
+
- getting-started/index.md
|
|
153
|
+
- Installation: getting-started/installation.md
|
|
154
|
+
- Quick Start: getting-started/quick-start.md
|
|
155
|
+
- Configuration: getting-started/configuration.md
|
|
156
|
+
- Guides:
|
|
157
|
+
- guides/index.md
|
|
158
|
+
- Parsing Prompts: guides/parsing.md
|
|
159
|
+
- Parameters: guides/parameters.md
|
|
160
|
+
- Shell Expansion: guides/shell-expansion.md
|
|
161
|
+
- ERB Rendering: guides/erb-rendering.md
|
|
162
|
+
- Including Files: guides/includes.md
|
|
163
|
+
- Custom Directives: guides/custom-directives.md
|
|
164
|
+
- Comment Stripping: guides/comment-stripping.md
|
|
122
165
|
- API Reference:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
166
|
+
- api/index.md
|
|
167
|
+
- PM Module: api/pm-module.md
|
|
168
|
+
- Configuration: api/configuration.md
|
|
169
|
+
- Metadata: api/metadata.md
|
|
170
|
+
- Parsed: api/parsed.md
|
|
171
|
+
- RenderContext: api/render-context.md
|
|
172
|
+
- Constants: api/constants.md
|
|
173
|
+
- Architecture:
|
|
174
|
+
- architecture/index.md
|
|
175
|
+
- Processing Pipeline: architecture/processing-pipeline.md
|
|
176
|
+
- Design Decisions: architecture/design-decisions.md
|
|
132
177
|
- Examples:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
- Development:
|
|
138
|
-
- Architecture: development/architecture.md
|
|
139
|
-
- Contributing: development/contributing.md
|
|
140
|
-
- Testing: development/testing.md
|
|
141
|
-
- Roadmap: development/roadmap.md
|
|
142
|
-
- Migration Guides:
|
|
143
|
-
- Version 0.9.0: migration/v0.9.0.md
|
|
144
|
-
- Version 1.0.0: migration/v1.0.0.md
|
|
145
|
-
|
|
146
|
-
copyright: Copyright © 2024 MadBomber - MIT License
|
|
178
|
+
- examples/index.md
|
|
179
|
+
- Code Review Prompt: examples/code-review-prompt.md
|
|
180
|
+
- Multi-File Composition: examples/multi-file-composition.md
|
|
181
|
+
- AI Agent Prompts: examples/ai-agent-prompts.md
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: prompt_manager
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dewayne VanHoozer
|
|
@@ -10,13 +10,13 @@ cert_chain: []
|
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
|
-
name:
|
|
13
|
+
name: ostruct
|
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
18
|
version: '0'
|
|
19
|
-
type: :
|
|
19
|
+
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
@@ -65,34 +65,6 @@ dependencies:
|
|
|
65
65
|
- - ">="
|
|
66
66
|
- !ruby/object:Gem::Version
|
|
67
67
|
version: '0'
|
|
68
|
-
- !ruby/object:Gem::Dependency
|
|
69
|
-
name: ostruct
|
|
70
|
-
requirement: !ruby/object:Gem::Requirement
|
|
71
|
-
requirements:
|
|
72
|
-
- - ">="
|
|
73
|
-
- !ruby/object:Gem::Version
|
|
74
|
-
version: '0'
|
|
75
|
-
type: :development
|
|
76
|
-
prerelease: false
|
|
77
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
78
|
-
requirements:
|
|
79
|
-
- - ">="
|
|
80
|
-
- !ruby/object:Gem::Version
|
|
81
|
-
version: '0'
|
|
82
|
-
- !ruby/object:Gem::Dependency
|
|
83
|
-
name: tocer
|
|
84
|
-
requirement: !ruby/object:Gem::Requirement
|
|
85
|
-
requirements:
|
|
86
|
-
- - ">="
|
|
87
|
-
- !ruby/object:Gem::Version
|
|
88
|
-
version: '0'
|
|
89
|
-
type: :development
|
|
90
|
-
prerelease: false
|
|
91
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
92
|
-
requirements:
|
|
93
|
-
- - ">="
|
|
94
|
-
- !ruby/object:Gem::Version
|
|
95
|
-
version: '0'
|
|
96
68
|
- !ruby/object:Gem::Dependency
|
|
97
69
|
name: simplecov
|
|
98
70
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -107,23 +79,10 @@ dependencies:
|
|
|
107
79
|
- - ">="
|
|
108
80
|
- !ruby/object:Gem::Version
|
|
109
81
|
version: '0'
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
- - ">="
|
|
115
|
-
- !ruby/object:Gem::Version
|
|
116
|
-
version: '0'
|
|
117
|
-
type: :development
|
|
118
|
-
prerelease: false
|
|
119
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
120
|
-
requirements:
|
|
121
|
-
- - ">="
|
|
122
|
-
- !ruby/object:Gem::Version
|
|
123
|
-
version: '0'
|
|
124
|
-
description: "Manage the parameterized prompts (text) used in generative AI (aka chatGPT,
|
|
125
|
-
\nOpenAI, et.al.) using storage adapters such as FileSystemAdapter, \nSqliteAdapter,
|
|
126
|
-
and ActiveRecordAdapter.\n"
|
|
82
|
+
description: |
|
|
83
|
+
PM (PromptManager) parses YAML metadata from markdown strings or files.
|
|
84
|
+
It expands shell references, extracts metadata and content, and renders
|
|
85
|
+
ERB templates on demand.
|
|
127
86
|
email:
|
|
128
87
|
- dvanhoozer@gmail.com
|
|
129
88
|
executables: []
|
|
@@ -137,63 +96,45 @@ files:
|
|
|
137
96
|
- LICENSE
|
|
138
97
|
- README.md
|
|
139
98
|
- Rakefile
|
|
140
|
-
- docs/.keep
|
|
141
|
-
- docs/advanced/custom-keywords.md
|
|
142
|
-
- docs/advanced/dynamic-directives.md
|
|
143
|
-
- docs/advanced/performance.md
|
|
144
|
-
- docs/advanced/search-integration.md
|
|
145
99
|
- docs/api/configuration.md
|
|
146
|
-
- docs/api/
|
|
147
|
-
- docs/api/
|
|
148
|
-
- docs/api/
|
|
149
|
-
- docs/
|
|
150
|
-
- docs/
|
|
151
|
-
- docs/
|
|
152
|
-
- docs/
|
|
153
|
-
- docs/
|
|
154
|
-
- docs/
|
|
155
|
-
- docs/
|
|
156
|
-
- docs/
|
|
157
|
-
- docs/
|
|
158
|
-
- docs/
|
|
159
|
-
- docs/
|
|
160
|
-
- docs/
|
|
161
|
-
- docs/
|
|
162
|
-
- docs/
|
|
163
|
-
- docs/
|
|
164
|
-
- docs/examples/basic.md
|
|
165
|
-
- docs/examples/real-world.md
|
|
166
|
-
- docs/getting-started/basic-concepts.md
|
|
100
|
+
- docs/api/constants.md
|
|
101
|
+
- docs/api/index.md
|
|
102
|
+
- docs/api/metadata.md
|
|
103
|
+
- docs/api/parsed.md
|
|
104
|
+
- docs/api/pm-module.md
|
|
105
|
+
- docs/api/render-context.md
|
|
106
|
+
- docs/architecture/design-decisions.md
|
|
107
|
+
- docs/architecture/index.md
|
|
108
|
+
- docs/architecture/processing-pipeline.md
|
|
109
|
+
- docs/assets/css/custom.css
|
|
110
|
+
- docs/assets/images/prompt_manager.gif
|
|
111
|
+
- docs/assets/images/prompt_manager.mp4
|
|
112
|
+
- docs/examples/ai-agent-prompts.md
|
|
113
|
+
- docs/examples/code-review-prompt.md
|
|
114
|
+
- docs/examples/index.md
|
|
115
|
+
- docs/examples/multi-file-composition.md
|
|
116
|
+
- docs/getting-started/configuration.md
|
|
117
|
+
- docs/getting-started/index.md
|
|
167
118
|
- docs/getting-started/installation.md
|
|
168
119
|
- docs/getting-started/quick-start.md
|
|
120
|
+
- docs/guides/comment-stripping.md
|
|
121
|
+
- docs/guides/custom-directives.md
|
|
122
|
+
- docs/guides/erb-rendering.md
|
|
123
|
+
- docs/guides/includes.md
|
|
124
|
+
- docs/guides/index.md
|
|
125
|
+
- docs/guides/parameters.md
|
|
126
|
+
- docs/guides/parsing.md
|
|
127
|
+
- docs/guides/shell-expansion.md
|
|
169
128
|
- docs/index.md
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
-
|
|
177
|
-
- examples/directives.rb
|
|
178
|
-
- examples/prompts_dir/advanced_demo.txt
|
|
179
|
-
- examples/prompts_dir/directive_example.json
|
|
180
|
-
- examples/prompts_dir/directive_example.txt
|
|
181
|
-
- examples/prompts_dir/todo.json
|
|
182
|
-
- examples/prompts_dir/todo.txt
|
|
183
|
-
- examples/prompts_dir/toy/8-ball.txt
|
|
184
|
-
- examples/rgfzf
|
|
185
|
-
- examples/simple.rb
|
|
186
|
-
- examples/using_search_proc.rb
|
|
187
|
-
- improvement_plan.md
|
|
129
|
+
- lib/pm.rb
|
|
130
|
+
- lib/pm/configuration.rb
|
|
131
|
+
- lib/pm/directives.rb
|
|
132
|
+
- lib/pm/metadata.rb
|
|
133
|
+
- lib/pm/parsed.rb
|
|
134
|
+
- lib/pm/shell.rb
|
|
135
|
+
- lib/pm/version.rb
|
|
188
136
|
- lib/prompt_manager.rb
|
|
189
|
-
- lib/prompt_manager/directive_processor.rb
|
|
190
|
-
- lib/prompt_manager/prompt.rb
|
|
191
|
-
- lib/prompt_manager/storage.rb
|
|
192
|
-
- lib/prompt_manager/storage/active_record_adapter.rb
|
|
193
|
-
- lib/prompt_manager/storage/file_system_adapter.rb
|
|
194
|
-
- lib/prompt_manager/version.rb
|
|
195
137
|
- mkdocs.yml
|
|
196
|
-
- prompt_manager_logo.png
|
|
197
138
|
homepage: https://github.com/MadBomber/prompt_manager
|
|
198
139
|
licenses:
|
|
199
140
|
- MIT
|
|
@@ -216,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
216
157
|
- !ruby/object:Gem::Version
|
|
217
158
|
version: '0'
|
|
218
159
|
requirements: []
|
|
219
|
-
rubygems_version:
|
|
160
|
+
rubygems_version: 4.0.5
|
|
220
161
|
specification_version: 4
|
|
221
|
-
summary:
|
|
162
|
+
summary: Parse YAML metadata from markdown prompts with shell expansion and ERB rendering
|
|
222
163
|
test_files: []
|
data/docs/.keep
DELETED
|
File without changes
|