ace-prompt-prep 0.23.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 +7 -0
- data/.ace-defaults/nav/protocols/prompt-sources/ace-prompt-prep.yml +31 -0
- data/.ace-defaults/nav/protocols/tmpl-sources/ace-prompt-prep.yml +13 -0
- data/.ace-defaults/prompt-prep/config.yml +59 -0
- data/CHANGELOG.md +416 -0
- data/LICENSE +21 -0
- data/README.md +40 -0
- data/Rakefile +12 -0
- data/exe/ace-prompt-prep +16 -0
- data/handbook/prompts/prompt-enhance-instructions.system.md +134 -0
- data/handbook/skills/as-prompt-prep/SKILL.md +26 -0
- data/handbook/templates/the-prompt-base.template.md +36 -0
- data/handbook/templates/the-prompt-bug.template.md +40 -0
- data/handbook/workflow-instructions/prompt-prep.wf.md +16 -0
- data/lib/ace/prompt_prep/atoms/content_hasher.rb +24 -0
- data/lib/ace/prompt_prep/atoms/defaults.rb +10 -0
- data/lib/ace/prompt_prep/atoms/frontmatter_extractor.rb +66 -0
- data/lib/ace/prompt_prep/atoms/session_id_generator.rb +37 -0
- data/lib/ace/prompt_prep/atoms/task_path_resolver.rb +78 -0
- data/lib/ace/prompt_prep/cli/commands/process.rb +147 -0
- data/lib/ace/prompt_prep/cli/commands/setup.rb +87 -0
- data/lib/ace/prompt_prep/cli.rb +126 -0
- data/lib/ace/prompt_prep/molecules/bundle_loader.rb +178 -0
- data/lib/ace/prompt_prep/molecules/enhancement_tracker.rb +139 -0
- data/lib/ace/prompt_prep/molecules/prompt_archiver.rb +109 -0
- data/lib/ace/prompt_prep/molecules/prompt_reader.rb +64 -0
- data/lib/ace/prompt_prep/molecules/template_manager.rb +163 -0
- data/lib/ace/prompt_prep/molecules/template_resolver.rb +118 -0
- data/lib/ace/prompt_prep/organisms/enhancement_session_manager.rb +232 -0
- data/lib/ace/prompt_prep/organisms/prompt_enhancer.rb +153 -0
- data/lib/ace/prompt_prep/organisms/prompt_initializer.rb +165 -0
- data/lib/ace/prompt_prep/organisms/prompt_processor.rb +163 -0
- data/lib/ace/prompt_prep/version.rb +7 -0
- data/lib/ace/prompt_prep.rb +138 -0
- metadata +206 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: dbbc42da981352708923f3a6e92ad50cbcbec5e5caea99d278fa857cf4c09cf5
|
|
4
|
+
data.tar.gz: 3353c7f051d4096d0b5f4bf1794ada5ab23cb17bfc599983d640425e8e2e5607
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 423db1c4abd0cebe471fb58197102a937514fd4471300d6f906bced76cb264af163da22bd7efa74e6893831e50b74f9f0dcdd16b815a4c52f591913047a1a5ec
|
|
7
|
+
data.tar.gz: 81faed05d0ec3fbd81815d6701d5ac16040faf8ac6350e4cf7054fca70f545407b1e29e7bec8563b7f9d8ce65b747191044f40f3fd6195ef33fee120808f269c
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Prompt Sources Protocol Configuration for ace-prompt-prep gem
|
|
3
|
+
# This enables prompt discovery from the installed ace-prompt-prep gem
|
|
4
|
+
|
|
5
|
+
name: ace-prompt-prep
|
|
6
|
+
type: gem
|
|
7
|
+
description: Prompt enhancement system prompts from ace-prompt-prep gem
|
|
8
|
+
priority: 10
|
|
9
|
+
|
|
10
|
+
# Configuration for prompt discovery within the gem
|
|
11
|
+
config:
|
|
12
|
+
# Relative path within the gem
|
|
13
|
+
relative_path: handbook/prompts
|
|
14
|
+
|
|
15
|
+
# Pattern for finding prompt files
|
|
16
|
+
pattern: "*.md"
|
|
17
|
+
|
|
18
|
+
# Enable discovery
|
|
19
|
+
enabled: true
|
|
20
|
+
|
|
21
|
+
# Categories of prompts available
|
|
22
|
+
categories:
|
|
23
|
+
- enhancement # LLM prompt enhancement system prompts
|
|
24
|
+
|
|
25
|
+
# Notes for users
|
|
26
|
+
notes: |
|
|
27
|
+
ace-prompt-prep provides system prompts for LLM-powered prompt enhancement:
|
|
28
|
+
- Enhancement: System prompts for improving user prompts via LLM
|
|
29
|
+
|
|
30
|
+
Use prompt:// URIs to reference these prompts in your configurations.
|
|
31
|
+
Example: prompt://prompt-enhance-instructions
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
# ace-prompt-prep template sources for ace-nav
|
|
3
|
+
# Copy this file to .ace/nav/protocols/tmpl-sources/ to enable
|
|
4
|
+
|
|
5
|
+
name: ace-prompt-prep
|
|
6
|
+
type: gem
|
|
7
|
+
description: ace-prompt-prep templates
|
|
8
|
+
priority: 10
|
|
9
|
+
|
|
10
|
+
config:
|
|
11
|
+
relative_path: handbook/templates
|
|
12
|
+
pattern: "*.template.md"
|
|
13
|
+
enabled: true
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# ace-prompt-prep configuration
|
|
2
|
+
# Place this in .ace/prompt-prep/config.yml in your project
|
|
3
|
+
#
|
|
4
|
+
# Configuration cascade: ./.ace/prompt-prep/config.yml → ~/.ace/prompt-prep/config.yml
|
|
5
|
+
# Values in project config take precedence over home directory config.
|
|
6
|
+
|
|
7
|
+
# Paths configuration
|
|
8
|
+
# All paths are relative to project root
|
|
9
|
+
paths:
|
|
10
|
+
cache_dir: ".ace-local/prompt-prep" # Base cache directory
|
|
11
|
+
prompt_file: "prompts/the-prompt.md" # Main prompt file (relative to cache_dir)
|
|
12
|
+
enhance_cache: "enhance-cache" # Enhancement cache directory (relative to cache_dir)
|
|
13
|
+
archive_dir: "prompts/archive" # Archive directory (relative to cache_dir)
|
|
14
|
+
previous_symlink: "prompts/_previous.md" # Previous prompt symlink (relative to cache_dir)
|
|
15
|
+
|
|
16
|
+
# Default model and temperature settings
|
|
17
|
+
defaults:
|
|
18
|
+
model: "glite"
|
|
19
|
+
temperature:
|
|
20
|
+
min: 0.0
|
|
21
|
+
max: 2.0
|
|
22
|
+
|
|
23
|
+
# Context loading configuration
|
|
24
|
+
# When enabled, ace-prompt-prep will load project context via ace-bundle
|
|
25
|
+
# based on frontmatter in the prompt file.
|
|
26
|
+
bundle:
|
|
27
|
+
enabled: false
|
|
28
|
+
# sources:
|
|
29
|
+
# - file: "docs/architecture.md"
|
|
30
|
+
# - preset: "project-overview"
|
|
31
|
+
# - command: "git status --short"
|
|
32
|
+
|
|
33
|
+
# Task detection configuration
|
|
34
|
+
# When enabled, ace-prompt-prep will auto-detect task from current git branch
|
|
35
|
+
# and use the task's prompts directory instead of the default location.
|
|
36
|
+
task:
|
|
37
|
+
detection: false # Auto-detect task ID from branch name (e.g., 121.06-feature-name -> task 121.06)
|
|
38
|
+
branch_patterns: # Regex patterns to extract task ID (first capture group is used)
|
|
39
|
+
- '^(\d+(?:\.\d+)?)-' # Default: 121-feature, 121.01-archive
|
|
40
|
+
# - '^(?:feat|fix|task)/(\d+)-' # Example: feat/123-description
|
|
41
|
+
|
|
42
|
+
# Security configuration
|
|
43
|
+
# Controls security limits and validation for context loading
|
|
44
|
+
security:
|
|
45
|
+
max_file_size_mb: 10 # Maximum file size for context loading (10MB default)
|
|
46
|
+
|
|
47
|
+
# Debug configuration
|
|
48
|
+
# Enables debug logging for troubleshooting and development
|
|
49
|
+
debug:
|
|
50
|
+
enabled: false # Enable debug logging globally
|
|
51
|
+
bundle_loading: false # Detailed bundle loading logs
|
|
52
|
+
|
|
53
|
+
# Enhancement configuration
|
|
54
|
+
# Controls LLM-powered prompt enhancement via `ace-prompt-prep -e`
|
|
55
|
+
enhance:
|
|
56
|
+
enabled: false # Whether enhancement is enabled by default
|
|
57
|
+
model: glite # Model alias or provider:model (e.g., groq:llama-3.3-70b-versatile)
|
|
58
|
+
temperature: 0.3 # Lower = more focused, higher = more creative
|
|
59
|
+
system_prompt: prompt://prompt-enhance-instructions.system # System prompt for enhancement
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to ace-prompt-prep will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.23.0] - 2026-03-23
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- Removed stale `docs/security.md` which contained pervasively outdated references to old package name, module paths, CLI commands, and placeholder contact info.
|
|
14
|
+
- Re-recorded getting-started demo GIF.
|
|
15
|
+
|
|
16
|
+
### Technical
|
|
17
|
+
- Updated `docs/handbook.md` to remove broken security doc link.
|
|
18
|
+
|
|
19
|
+
## [0.22.3] - 2026-03-23
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- Refreshed `README.md` to align with the current ACE package layout pattern (quick links, use cases, works-with links, and standardized package sections).
|
|
23
|
+
|
|
24
|
+
## [0.22.2] - 2026-03-22
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
- Replaced a broken CLI help markdown link in `README.md` with a valid inline command reference.
|
|
28
|
+
|
|
29
|
+
## [0.22.1] - 2026-03-22
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
- Corrected the task-specific getting-started command to use `ace-prompt-prep process --task <id>` instead of an unsupported top-level `--task` invocation.
|
|
33
|
+
- Fixed handbook documentation links in `docs/handbook.md` so they resolve to the package `handbook/` directory.
|
|
34
|
+
|
|
35
|
+
## [0.22.0] - 2026-03-22
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
- Reworked `ace-prompt-prep` documentation surface for user onboarding: landed a value-first README with new demo context, added `docs/getting-started.md`, rebuilt `docs/usage.md` and `docs/handbook.md`, and aligned package messaging to the new README headline.
|
|
39
|
+
- Added/updated demo assets under `docs/demo/` including a VHS tape + GIF showing setup and prompt enhancement flow.
|
|
40
|
+
- Updated gemspec metadata to match the documentation-centric positioning.
|
|
41
|
+
|
|
42
|
+
## [0.21.0] - 2026-03-21
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
- Expanded `TS-PREP-001` E2E coverage with a new bundle-context goal and tightened runner/verifier artifact-evidence contracts across existing goals.
|
|
46
|
+
|
|
47
|
+
## [0.20.1] - 2026-03-18
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
- Migrated CLI namespace from `Ace::Core::CLI::*` to `Ace::Support::Cli::*` (ace-support-cli is now the canonical home for CLI infrastructure).
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## [0.20.0] - 2026-03-18
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
- Removed legacy backward-compatibility behavior as part of the 0.10 cleanup release.
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
## [0.19.5] - 2026-03-17
|
|
60
|
+
|
|
61
|
+
### Fixed
|
|
62
|
+
- Updated CLI routing tests to accept `COMMANDS`/`USAGE` header rendering introduced by shared help formatting.
|
|
63
|
+
|
|
64
|
+
## [0.19.4] - 2026-03-15
|
|
65
|
+
|
|
66
|
+
### Changed
|
|
67
|
+
- Migrated CLI framework from dry-cli to ace-support-cli
|
|
68
|
+
|
|
69
|
+
## [0.19.3] - 2026-03-13
|
|
70
|
+
|
|
71
|
+
### Changed
|
|
72
|
+
- Updated the canonical prompt-prep skill to explicitly run its bundled workflow in the current project and execute it end-to-end.
|
|
73
|
+
|
|
74
|
+
## [0.19.2] - 2026-03-13
|
|
75
|
+
|
|
76
|
+
### Changed
|
|
77
|
+
- Removed the Codex-specific delegated execution metadata from the canonical `as-prompt-prep` skill so provider projections now inherit the canonical skill body unchanged.
|
|
78
|
+
|
|
79
|
+
## [0.19.1] - 2026-03-12
|
|
80
|
+
|
|
81
|
+
### Fixed
|
|
82
|
+
- Registered the package WFI source so `wfi://prompt-prep` resolves for the canonical prompt-prep skill.
|
|
83
|
+
|
|
84
|
+
## [0.19.0] - 2026-03-12
|
|
85
|
+
|
|
86
|
+
### Added
|
|
87
|
+
- Added Codex-specific delegated execution metadata to the canonical `as-prompt-prep` skill so the generated Codex skill runs in fork context on `gpt-5.3-codex-spark`.
|
|
88
|
+
|
|
89
|
+
## [0.18.0] - 2026-03-10
|
|
90
|
+
|
|
91
|
+
### Added
|
|
92
|
+
- Added the canonical handbook-owned prompt-prep skill and workflow entrypoint for prompt workspace preparation.
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## [0.17.4] - 2026-03-09
|
|
96
|
+
|
|
97
|
+
### Fixed
|
|
98
|
+
- Updated bundle-enabled prompt-prep test expectations to match the current `ace-bundle` contract, asserting successful compressed bundle output instead of stale raw-markdown responses.
|
|
99
|
+
|
|
100
|
+
## [0.17.3] - 2026-03-04
|
|
101
|
+
|
|
102
|
+
### Fixed
|
|
103
|
+
- README migration note corrected: old path was `.cache/ace-prep` (not `.ace-local/ace-prep`)
|
|
104
|
+
|
|
105
|
+
## [0.17.2] - 2026-03-04
|
|
106
|
+
|
|
107
|
+
### Fixed
|
|
108
|
+
- Usage docs corrected to short-name path convention (`.ace-local/prompt-prep/` not `.ace-local/ace-prompt-prep/`)
|
|
109
|
+
|
|
110
|
+
## [0.17.1] - 2026-03-04
|
|
111
|
+
|
|
112
|
+
### Fixed
|
|
113
|
+
- README and usage docs updated to short-name path convention (`.ace-local/prompt-prep` not `.ace-local/ace-prompt-prep`)
|
|
114
|
+
|
|
115
|
+
## [0.17.0] - 2026-03-04
|
|
116
|
+
|
|
117
|
+
### Changed
|
|
118
|
+
- Default cache directory migrated from `.cache/ace-prompt-prep` to `.ace-local/prompt-prep`
|
|
119
|
+
- `PromptInitializer.default_prompt_dir` now returns path under `.ace-local/prompt-prep/prompts`
|
|
120
|
+
|
|
121
|
+
## [0.16.9] - 2026-03-02
|
|
122
|
+
|
|
123
|
+
### Changed
|
|
124
|
+
- Replace `ace-taskflow` dependency with `ace-task` — migrate `TaskPathResolver` to use `Ace::Task::Organisms::TaskManager.show()` API (returns struct with `.path` instead of hash with `:path`)
|
|
125
|
+
|
|
126
|
+
## [0.16.8] - 2026-02-25
|
|
127
|
+
|
|
128
|
+
### Technical
|
|
129
|
+
- Bump runtime dependency constraint from `ace-git ~> 0.10` to `ace-git ~> 0.11`.
|
|
130
|
+
|
|
131
|
+
## [0.16.7] - 2026-02-25
|
|
132
|
+
|
|
133
|
+
### Fixed
|
|
134
|
+
- Align `BundleLoader` security test expectations with current return behavior for debug logging paths
|
|
135
|
+
- Resolve three failing tests in `bundle_loader_security_test.rb` by asserting returned content instead of empty string
|
|
136
|
+
|
|
137
|
+
## [0.16.6] - 2026-02-23
|
|
138
|
+
|
|
139
|
+
### Technical
|
|
140
|
+
- Updated internal dependency version constraints to current releases
|
|
141
|
+
|
|
142
|
+
## [0.16.5] - 2026-02-22
|
|
143
|
+
|
|
144
|
+
### Changed
|
|
145
|
+
- Migrate to standard dry-cli help pattern (Task 278.28)
|
|
146
|
+
- Remove DefaultRouting pattern in favor of explicit HelpCommand registration
|
|
147
|
+
- No args now shows help instead of running default command
|
|
148
|
+
- Update tests to use Dry::CLI.new().call() pattern
|
|
149
|
+
|
|
150
|
+
## [0.16.3] - 2026-02-12
|
|
151
|
+
|
|
152
|
+
### Added
|
|
153
|
+
- Support `bundle.enabled: false` in prompt frontmatter to skip ace-bundle processing
|
|
154
|
+
|
|
155
|
+
### Changed
|
|
156
|
+
- Deduplicate `FrontmatterExtractor.extract` call — extract once and reuse for both bundle check and body fallback
|
|
157
|
+
|
|
158
|
+
## [0.16.2] - 2026-01-19
|
|
159
|
+
|
|
160
|
+
### Fixed
|
|
161
|
+
- E2E test documentation: update sample-prompt.md to use `bundle:` format instead of legacy `context:` format
|
|
162
|
+
- E2E test documentation: correct Base36 ID length from "6-7 characters" to exactly "6 characters" (3 locations)
|
|
163
|
+
|
|
164
|
+
## [0.16.1] - 2026-01-19
|
|
165
|
+
|
|
166
|
+
### Changed
|
|
167
|
+
- Rename `--context` flag to `--bundle` for clarity (Task 217)
|
|
168
|
+
- CLI: `--context/-c` → `--bundle/-b`
|
|
169
|
+
- CLI: `--no-context` → `--no-bundle`
|
|
170
|
+
- Rename `ContextLoader` class to `BundleLoader`
|
|
171
|
+
- Rename `context_loader.rb` → `bundle_loader.rb`
|
|
172
|
+
- Update all test files and references
|
|
173
|
+
- Add backward compatibility for legacy `"context"` config key
|
|
174
|
+
|
|
175
|
+
### Technical
|
|
176
|
+
- Update test files for renamed flags and classes
|
|
177
|
+
- Update E2E test TC-005 to use `--bundle` flag
|
|
178
|
+
|
|
179
|
+
## [0.16.0] - 2026-01-19
|
|
180
|
+
|
|
181
|
+
### Changed
|
|
182
|
+
- **BREAKING**: Renamed gem from `ace-prep` to `ace-prompt-prep` (Task 217)
|
|
183
|
+
- Gem name: `ace-prep` → `ace-prompt-prep`
|
|
184
|
+
- Module namespace: `Ace::Prep` → `Ace::PromptPrep`
|
|
185
|
+
- Binary: `ace-prep` → `ace-prompt-prep`
|
|
186
|
+
- Config directory: `.ace/prep/` → `.ace/prompt-prep/`
|
|
187
|
+
- Cache directory: `.cache/ace-prep/` → `.cache/ace-prompt-prep/`
|
|
188
|
+
- Follows compound naming pattern like `ace-git-commit`, `ace-git-secrets`
|
|
189
|
+
- Makes semantic meaning explicit: this tool prepares prompts
|
|
190
|
+
|
|
191
|
+
### Migration
|
|
192
|
+
- Rename config directory: `mv .ace/prep .ace/prompt-prep`
|
|
193
|
+
- Update command references: `ace-prep` → `ace-prompt-prep`
|
|
194
|
+
- Update require statements: `require 'ace/prep'` → `require 'ace/prompt_prep'`
|
|
195
|
+
- Old cache at `.cache/ace-prep/` will be orphaned (no automatic migration)
|
|
196
|
+
|
|
197
|
+
## [0.14.1] - 2026-01-16
|
|
198
|
+
|
|
199
|
+
### Changed
|
|
200
|
+
- Rename context: to bundle: keys in configuration files
|
|
201
|
+
|
|
202
|
+
## [0.14.0] - 2026-01-15
|
|
203
|
+
|
|
204
|
+
### Changed
|
|
205
|
+
- **Dependency Migration**: Replaced ace-context dependency with ace-bundle (~> 0.29)
|
|
206
|
+
- Updated gemspec dependency from `ace-context ~> 0.8` to `ace-bundle ~> 0.29`
|
|
207
|
+
- Updated all `require 'ace/context'` to `require 'ace/bundle'`
|
|
208
|
+
- Updated all `Ace::Context` references to `Ace::Bundle`
|
|
209
|
+
- All context loading now uses the ace-bundle API
|
|
210
|
+
- Updated CLI help text references from ace-context to ace-bundle
|
|
211
|
+
|
|
212
|
+
### Technical
|
|
213
|
+
- Updated test helpers to use ace-bundle path in load path
|
|
214
|
+
- Updated test mocks and stubs to reference Ace::Bundle
|
|
215
|
+
|
|
216
|
+
## [0.13.2] - 2026-01-10
|
|
217
|
+
|
|
218
|
+
### Changed
|
|
219
|
+
- Use shared `Ace::Core::CLI::DryCli::DefaultRouting` module for CLI routing
|
|
220
|
+
- Removed duplicate routing code in favor of shared implementation
|
|
221
|
+
- Maintains same behavior with less code duplication
|
|
222
|
+
|
|
223
|
+
## [0.13.1] - 2026-01-10
|
|
224
|
+
|
|
225
|
+
### Fixed
|
|
226
|
+
- Fix CLI default command routing to properly handle flags
|
|
227
|
+
- Removed flawed `!args.first.start_with?("-")` check from routing condition
|
|
228
|
+
- Flags like `--enhance`, `-t` now correctly route to default `process` command
|
|
229
|
+
- Built-in flags (`--help`, `--version`) continue working via KNOWN_COMMANDS
|
|
230
|
+
|
|
231
|
+
## [0.13.0] - 2026-01-07
|
|
232
|
+
|
|
233
|
+
### Changed
|
|
234
|
+
- **BREAKING**: Migrated CLI framework from Thor to dry-cli (task 179.11)
|
|
235
|
+
- Replaced `thor` dependency with `dry-cli ~> 1.0`
|
|
236
|
+
- Created dry-cli command classes in `lib/ace/prompt/commands/`
|
|
237
|
+
- All commands and options maintain parity with Thor implementation
|
|
238
|
+
|
|
239
|
+
### Added
|
|
240
|
+
- `Process` command for prompt processing (default command)
|
|
241
|
+
- `Setup` command for workspace initialization
|
|
242
|
+
|
|
243
|
+
## [0.12.0] - 2026-01-07
|
|
244
|
+
|
|
245
|
+
### Changed
|
|
246
|
+
- **BREAKING**: Archive filenames changed from 14-character timestamps to 6-character Base36 compact IDs
|
|
247
|
+
- Example: `20251129-143000.md` → `i50jj3.md`
|
|
248
|
+
- Existing timestamp-formatted archives remain readable (dual-format support)
|
|
249
|
+
- Archives are git-ignored, so no migration needed for existing files
|
|
250
|
+
- `_previous.md` symlink now points to Base36-formatted archives
|
|
251
|
+
- Migrate to Base36 compact IDs for session archiving (via ace-timestamp)
|
|
252
|
+
- Renamed TimestampGenerator to SessionIdGenerator (atom refactor)
|
|
253
|
+
|
|
254
|
+
### Added
|
|
255
|
+
- Base36 compact ID format documentation in README with precision notes (~1.85s)
|
|
256
|
+
|
|
257
|
+
## [0.11.0] - 2026-01-05
|
|
258
|
+
|
|
259
|
+
### Added
|
|
260
|
+
- Thor CLI migration with ConfigSummary display
|
|
261
|
+
|
|
262
|
+
### Changed
|
|
263
|
+
- Adopted Ace::Core::CLI::Base for standardized options
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
## [0.10.0] - 2026-01-03
|
|
267
|
+
|
|
268
|
+
### Changed
|
|
269
|
+
- **BREAKING**: Minimum Ruby version raised to 3.3.0 (was 3.1.0)
|
|
270
|
+
- Standardized gemspec file patterns with deterministic Dir.glob
|
|
271
|
+
- Added MIT LICENSE file
|
|
272
|
+
|
|
273
|
+
## [0.9.2] - 2026-01-01
|
|
274
|
+
|
|
275
|
+
### Changed
|
|
276
|
+
|
|
277
|
+
* Add thread-safe configuration initialization with Mutex pattern
|
|
278
|
+
* Centralize cache paths in gem config file
|
|
279
|
+
* Improve error logging with gem prefix and exception class
|
|
280
|
+
|
|
281
|
+
## [0.9.1] - 2025-12-30
|
|
282
|
+
|
|
283
|
+
### Changed
|
|
284
|
+
|
|
285
|
+
- Replace ace-support-core dependency with ace-config for configuration cascade
|
|
286
|
+
- Migrate from Ace::Core to Ace::Config.create() API
|
|
287
|
+
- Migrate from `resolve_for` to `resolve_namespace` for cleaner config loading
|
|
288
|
+
|
|
289
|
+
## [0.9.0] - 2025-12-30
|
|
290
|
+
|
|
291
|
+
### Changed
|
|
292
|
+
|
|
293
|
+
* Rename `.ace.example/` to `.ace-defaults/` for gem defaults directory
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
## [0.8.0] - 2025-12-29
|
|
297
|
+
|
|
298
|
+
### Changed
|
|
299
|
+
- Migrate ProjectRootFinder dependency from `Ace::Core::Molecules` to `Ace::Support::Fs::Molecules` for direct ace-support-fs usage
|
|
300
|
+
|
|
301
|
+
## [0.7.0] - 2025-12-28
|
|
302
|
+
|
|
303
|
+
### Added
|
|
304
|
+
- **ADR-022 Configuration Pattern**: Migrate to gem defaults from `.ace.example/` with user override support
|
|
305
|
+
- Load defaults from `.ace.example/prompt/config.yml` at runtime
|
|
306
|
+
- Deep merge with user config via ace-core cascade
|
|
307
|
+
- Follows "gem defaults < user config" priority
|
|
308
|
+
|
|
309
|
+
## [0.6.0] - 2025-12-26
|
|
310
|
+
|
|
311
|
+
### Changed
|
|
312
|
+
- **Migrate to ace-git** (Task 140.04): Replace local `GitBranchReader` molecule with `Ace::Git::Molecules::BranchReader` for unified git operations across ace-* gems
|
|
313
|
+
- Add ace-git ~> 0.3 dependency for shared git operations
|
|
314
|
+
|
|
315
|
+
### Added
|
|
316
|
+
- Test for nil/failure path when `BranchReader.current_branch` returns nil (graceful fallback to project-level prompt)
|
|
317
|
+
|
|
318
|
+
### Removed
|
|
319
|
+
- `Ace::Prompt::Molecules::GitBranchReader` - functionality now provided by ace-git
|
|
320
|
+
|
|
321
|
+
## [0.5.1] - 2025-12-09
|
|
322
|
+
|
|
323
|
+
### Fixed
|
|
324
|
+
- Added Questions section back to template structure (now 7 sections)
|
|
325
|
+
|
|
326
|
+
## [0.5.0] - 2025-12-09
|
|
327
|
+
|
|
328
|
+
### Added
|
|
329
|
+
- New 6-section default template structure: Purpose, Variables, Codebase Structure, Instructions, Workflow, Report
|
|
330
|
+
- Updated enhance system prompt output format to match new template sections
|
|
331
|
+
|
|
332
|
+
## [0.4.0] - 2025-12-01
|
|
333
|
+
|
|
334
|
+
### Added
|
|
335
|
+
- **LLM Enhancement** (Task 121.04, 121.05)
|
|
336
|
+
- `--enhance/-e` flag for LLM-powered prompt improvement
|
|
337
|
+
- `--model` option with built-in aliases: `glite`, `claude`, `haiku`
|
|
338
|
+
- `--temperature` option for LLM creativity control
|
|
339
|
+
- `--system-prompt` option to customize enhancement instructions
|
|
340
|
+
- EnhancementTracker molecule for content-based caching
|
|
341
|
+
- PromptEnhancer organism integrating with ace-llm Ruby API
|
|
342
|
+
- Enhancement archiving with `_e001` suffix pattern
|
|
343
|
+
- System prompt loading via `prompt://` protocol
|
|
344
|
+
- Frontmatter preservation when writing enhanced content back to source
|
|
345
|
+
|
|
346
|
+
- **Task Folder Support** (Task 121.06)
|
|
347
|
+
- `--task/-t` flag for task-specific prompt directories
|
|
348
|
+
- Branch detection for automatic task resolution (e.g., `121-feature` → task 121)
|
|
349
|
+
- TaskPathResolver atom for task directory lookup
|
|
350
|
+
- Subtask fallback support (121.01 → 121)
|
|
351
|
+
- Integration with ace-taskflow for task path discovery
|
|
352
|
+
|
|
353
|
+
### Fixed
|
|
354
|
+
- Enhancement output now clean markdown (no JSON wrapper, no system prompt echo)
|
|
355
|
+
- Enhanced content correctly written back to `the-prompt.md`
|
|
356
|
+
- Archive path returns enhanced version, symlink updated properly
|
|
357
|
+
|
|
358
|
+
## [0.3.0] - 2025-11-28
|
|
359
|
+
|
|
360
|
+
### Added
|
|
361
|
+
- Global configuration via `Ace::Prompt.config` using ace-core config cascade
|
|
362
|
+
- Configuration file support at `.ace/prompt/config.yml`
|
|
363
|
+
- `context.enabled` config option to control context loading behavior
|
|
364
|
+
- Example config at `.ace.example/prompt/config.yml`
|
|
365
|
+
|
|
366
|
+
### Changed
|
|
367
|
+
- CLI now uses `Ace::Prompt.config` instead of custom ConfigLoader molecule
|
|
368
|
+
- Removed `ConfigLoader` molecule (replaced by standard ace-* config pattern)
|
|
369
|
+
- Simplified `ContextLoader` to pass file path directly to ace-context
|
|
370
|
+
|
|
371
|
+
## [0.2.0] - 2025-11-28
|
|
372
|
+
|
|
373
|
+
### Added
|
|
374
|
+
- Setup command for template initialization (Task 121.02)
|
|
375
|
+
- `ace-prompt-prep setup` - Initialize workspace with template
|
|
376
|
+
- Template resolution via `tmpl://` protocol (ace-nav Ruby API)
|
|
377
|
+
- TemplateResolver molecule with short form support (`--template bug`)
|
|
378
|
+
- TemplateManager molecule for template operations
|
|
379
|
+
- PromptInitializer organism using ProjectRootFinder
|
|
380
|
+
- Default `the-prompt-base` template with frontmatter
|
|
381
|
+
- Protocol registration for ace-nav (`tmpl://ace-prompt-prep/the-prompt-base`)
|
|
382
|
+
- `--template` option for custom templates (short form and full URI)
|
|
383
|
+
- `--no-archive` and `--force` options to skip archiving
|
|
384
|
+
- Automatic directory creation if not exists
|
|
385
|
+
- Archive functionality by default (consolidated from reset)
|
|
386
|
+
- Comprehensive test suite for new features
|
|
387
|
+
|
|
388
|
+
### Changed
|
|
389
|
+
- Setup uses project root directory (via ProjectRootFinder) instead of home directory (Task 121.08)
|
|
390
|
+
- Consolidated reset command into setup (reset removed from CLI)
|
|
391
|
+
- Template naming pattern: `the-prompt-{name}.template.md`
|
|
392
|
+
- Template resolution uses ace-nav Ruby API (no shell execution)
|
|
393
|
+
- TemplateResolver now validates URI format before resolution (rejects spaces)
|
|
394
|
+
- Added DEBUG-gated logging for ace-nav LoadError
|
|
395
|
+
|
|
396
|
+
### Fixed
|
|
397
|
+
- CLI exit code handling for Thor Array return (Task 121.08)
|
|
398
|
+
|
|
399
|
+
## [0.1.0] - 2025-11-28
|
|
400
|
+
|
|
401
|
+
### Added
|
|
402
|
+
- Initial release with basic functionality (Task 121.01)
|
|
403
|
+
- Read prompt file from `.cache/ace-prompt-prep/prompts/the-prompt.md`
|
|
404
|
+
- Archive with timestamp format `YYYYMMDD-HHMMSS.md`
|
|
405
|
+
- Update `_previous.md` symlink to latest archive
|
|
406
|
+
- Output to stdout by default
|
|
407
|
+
- `--output` option to write to file
|
|
408
|
+
- ATOM architecture: atoms, molecules, organisms
|
|
409
|
+
- Comprehensive test suite with edge cases
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
## [0.16.4] - 2026-02-22
|
|
413
|
+
|
|
414
|
+
### Fixed
|
|
415
|
+
- Stripped duplicate command name prefixes from example strings
|
|
416
|
+
- Standardized quiet, verbose, debug option descriptions to canonical strings
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Michal Czyz
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1> ACE - Prompt Prep </h1>
|
|
3
|
+
|
|
4
|
+
Prepare prompts in a structured workspace with optional LLM enhancement and bundled project context.
|
|
5
|
+
|
|
6
|
+
<img src="https://raw.githubusercontent.com/cs3b/ace/main/docs/brand/AgenticCodingEnvironment.Logo.XS.jpg" alt="ACE Logo" width="480">
|
|
7
|
+
<br><br>
|
|
8
|
+
|
|
9
|
+
<a href="https://rubygems.org/gems/ace-prompt-prep"><img alt="Gem Version" src="https://img.shields.io/gem/v/ace-prompt-prep.svg" /></a>
|
|
10
|
+
<a href="https://www.ruby-lang.org"><img alt="Ruby" src="https://img.shields.io/badge/Ruby-3.2+-CC342D?logo=ruby" /></a>
|
|
11
|
+
<a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-blue.svg" /></a>
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
> Works with: Claude Code, Codex CLI, OpenCode, Gemini CLI, pi-agent, and more.
|
|
16
|
+
|
|
17
|
+
[Getting Started](docs/getting-started.md) | [Usage Guide](docs/usage.md) | [Handbook - Skills, Agents, Templates](docs/handbook.md)
|
|
18
|
+
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
`ace-prompt-prep` helps developers and coding agents keep prompt authoring repeatable: initialize templates, archive every revision, enrich prompt context with [ace-bundle](../ace-bundle), and optionally run enhancement through [ace-llm](../ace-llm). Use `/as-prompt-prep` to drive the full workflow from inside a coding agent.
|
|
22
|
+
|
|
23
|
+
## How It Works
|
|
24
|
+
|
|
25
|
+
1. Initialize a prompt workspace from templates with `ace-prompt-prep setup`, optionally scoping to a task via `--task` and [ace-task](../ace-task).
|
|
26
|
+
2. Process the prompt to inject bundled context from [ace-bundle](../ace-bundle) sources, archive the previous version, and write output.
|
|
27
|
+
3. Optionally enhance the prompt through [ace-llm](../ace-llm) with `--enhance` and model selection before handing it to an agent or API.
|
|
28
|
+
|
|
29
|
+
## Use Cases
|
|
30
|
+
|
|
31
|
+
**Keep prompt history without manual bookkeeping** - initialize and process prompts in a stable workspace where archives and `_previous.md` are maintained automatically.
|
|
32
|
+
|
|
33
|
+
**Improve prompt quality before execution** - run `--enhance` with model selection via [ace-llm](../ace-llm) to rewrite prompts for clarity and completeness before handing them to an agent.
|
|
34
|
+
|
|
35
|
+
**Inject project context directly into prompts** - use `bundle` frontmatter sources so prompts include selected files, presets, and command output from [ace-bundle](../ace-bundle) at processing time.
|
|
36
|
+
|
|
37
|
+
**Scope prompts to tasks** - use `--task` to route prompt workspaces into [ace-task](../ace-task) directories, keeping prompts connected to delivery work alongside [ace-git](../ace-git) branch workflows.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
[Getting Started](docs/getting-started.md) | [Usage Guide](docs/usage.md) | [Handbook - Skills, Agents, Templates](docs/handbook.md) | Part of [ACE](https://github.com/cs3b/ace)
|
data/Rakefile
ADDED
data/exe/ace-prompt-prep
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require_relative "../lib/ace/prompt_prep"
|
|
5
|
+
require "ace/support/cli"
|
|
6
|
+
|
|
7
|
+
# No args → show help
|
|
8
|
+
args = ARGV.empty? ? ["--help"] : ARGV
|
|
9
|
+
|
|
10
|
+
# Start ace-support-cli with exception-based exit code handling (per ADR-023)
|
|
11
|
+
begin
|
|
12
|
+
Ace::Support::Cli::Runner.new(Ace::PromptPrep::CLI).call(args: args)
|
|
13
|
+
rescue Ace::Support::Cli::Error => e
|
|
14
|
+
warn e.message
|
|
15
|
+
exit(e.exit_code)
|
|
16
|
+
end
|