Add enhance-prompt workflow for upgrading prompt assets#261
Open
abeltrano wants to merge 4 commits into
Open
Conversation
Add an interactive workflow that takes an existing prompt asset (raw prompt, Copilot prompt file, agent definition, instruction/skill file, or a combination) and enhances it with current PromptKit capabilities. It enriches non-PromptKit assets and upgrades PromptKit-generated ones to features added since they were authored, with a document mode (enhancement plan) and an action mode (apply in place after explicit confirmation). New components: - template: enhance-prompt (agent-authoring, interactive, dual-mode) - protocol (reasoning): prompt-enhancement - format: enhancement-report - taxonomy: enhancement-categories (E1-E8) Reuses the promptkit-contributor persona and the anti-hallucination and self-verification guardrails. Updates manifest.yaml; both the validate-manifest and validate-graph-integrity checks pass. Closes #260. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new interactive PromptKit workflow, enhance-prompt, to upgrade/enrich existing prompt assets (both PromptKit-generated and non-PromptKit) using current library components, producing an enhancement report and optionally applying confirmed edits in-place.
Changes:
- Introduces the
enhance-promptinteractive template orchestrating a dual-mode (document/action) enhancement flow. - Adds the
prompt-enhancementreasoning protocol plus theenhancement-reportformat andenhancement-categoriestaxonomy to structure classification, planning, application, and verification. - Updates
manifest.yamlto register the new protocol/format/taxonomy/template.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| templates/enhance-prompt.md | New interactive template coordinating the enhancement workflow and confirmation gates. |
| protocols/reasoning/prompt-enhancement.md | New end-to-end reasoning protocol for ingestion → provenance/version detect → baseline → gap analysis → propose → apply → verify. |
| formats/enhancement-report.md | New report format defining full/abbreviated structures, statuses, and required sections. |
| taxonomies/enhancement-categories.md | New E1–E8 taxonomy to classify enhancement opportunities and allow user scoping. |
| manifest.yaml | Registers the new template/protocol/format/taxonomy in the library manifest. |
Resolve four review threads on #261: - enhancement-report: expand the abbreviated Coverage section to the full four self-verification fields (Examined/Method/Excluded/Limitations) so it no longer contradicts the format's own coverage rule. - prompt-enhancement: ground the E8 provenance version stamp in the top-level version: scalar in manifest.yaml (the source bootstrap.md uses), and fall back to "version unknown" instead of guessing. - enhance-prompt / enhancement-categories / prompt-enhancement: replace references to undefined "short names" with the supported identifiers (numeric IDs E1-E8 and full label IDs like E1_MISSING_GUARDRAIL). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolve three more review threads on #261: - enhancement-report: add the Preserves field to the abbreviated Enhancement Plan block so it satisfies the format's own rule requiring every edit to name the customizations it preserves. - prompt-enhancement: correct the Phase 1 asset-type heuristics to match the repository's formats - tools frontmatter is optional for .prompt.md files (only description/agent are required), and custom agents use the .agent.md suffix. - enhance-prompt: stop hard-coding the full-format "summary table" structure and defer to the enhancement-report format's own abbreviated/full selection rule, removing the conflicting instruction. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ran PromptKit's own review-code + self-verification methodology over the four enhance-prompt components. It confirmed the recurring abbreviated-format issues from the GitHub review share a single root cause and surfaced four additional latent issues. Fix them all so the component set is internally consistent: - enhancement-report: remove the abbreviated format variant entirely. The only consumer (enhance-prompt) already requires the full structure in both modes, and the abbreviated variant lacked the provenance, applied-changes, and residual-gaps sections the workflow needs. This resolves the section-3 / section-6 cross-reference breakage (review threads on the template) at the source. The report now has one required structure. - enhance-prompt: reference report sections by name (Provenance and Version Detection, Applied Changes) instead of by number, for resilience. - enhance-prompt: split the confirmation vocabulary by mode - action mode offers apply/defer/skip; document mode offers recommend/defer/skip (document mode cannot produce Applied status). - enhance-prompt / enhancement-report: include Deferred in the "no changes applied" wording (was "Proposed or Skipped", omitting a valid status). - enhance-prompt: validate output_mode up front - it must be exactly document or action; ask when blank/invalid; never enter action mode without an explicit action. - prompt-enhancement / enhancement-report: rename provenance labels to "PromptKit provenance detected (version known/unknown)" / "No PromptKit provenance detected" to match the detection model, which includes structurally inferred (not only generated) provenance. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
enhance-prompt, an interactive PromptKit workflow that takes anexisting prompt asset (raw prompt, Copilot prompt file, agent definition,
instruction/skill file, or a combination) and enhances it with current
PromptKit capabilities — enriching non-PromptKit assets and upgrading
PromptKit-generated ones to features added since they were authored. Supports a
document mode (enhancement plan) and an action mode (apply in place after
confirmation). Closes #260.
New Components
enhance-prompttemplates/enhance-prompt.mdprompt-enhancementprotocols/reasoning/prompt-enhancement.mdenhancement-reportformats/enhancement-report.mdenhancement-categoriestaxonomies/enhancement-categories.mdReuses the existing
promptkit-contributorpersona and theanti-hallucinationand
self-verificationguardrails.manifest.yamlupdated with all fourcomponents.
Design Decisions
decompose-prompt, and complementary.decompose-promptextracts reusable components from a prompt into the library (output: a
library contribution).
enhance-promptgoes the other direction: it enrichesthe user's asset from the library (output: the improved asset + a report).
No functional overlap. It reuses the same persona/guardrail set as
decompose-promptfor consistency.the corpus for language/synchronization/cryptographic primitives; reusing it
for prompt-like assets would collide. Following
decompose-promptandlint-prompt, "prompt" is used as the loose umbrella and the body defines"prompt asset" explicitly. "artifact" was avoided because it denotes pipeline
document outputs.
review-pull-request. Document mode produces aplan; action mode applies confirmed enhancements in place. A mandatory
confirmation gate precedes any edit.
<!-- Generated by PromptKit … -->marker when present and infers fromstructure otherwise; a missing marker is a normal result. E3 (version
upgrade) labels require provenance evidence, otherwise gaps are E2 (new
capability) — the protocol never fabricates a prior version.
none is given, the workflow scans the asset and suggests categories.
version-stamping of generated outputs (extending the provenance marker to
carry a version in
bootstrap.mdand the output formats) is intentionallynot implemented here;
enhance-promptonly reads such markers and can add oneto a user asset (category E8). The workflow does not depend on it.
Follow-ups (not in this PR)
README.mdcomponent counts andCATALOG.mdare not updated here (thePromptKit-pull-request format restricts changes to component files +
manifest.yaml, and the README counts are already maintained out-of-band).Regenerate as part of the normal docs-refresh process if desired.
exploration.
Checklist
manifest.yamlupdated with all new componentspython tests/validate-manifest.pypassespython tests/validate-graph-integrity.pypasses