feat(ai-autopilot): built-in prompts library (#111)#119
Merged
Conversation
Ships eight stack-aware prompt bodies as markdown under prompts/ (review TLDR + thorough, code-quality, security, refactor, UX, QA, knowledge-base) that already know Vike + universal-orm. builtinLibrary() / loadPromptsFrom(dir) load them into a PromptLibrary, parsed via @gemstack/ai-skills frontmatter so a contributor edits prose, not code. loopPromptsFor(library, makeAgent) materializes them into loop prompts so defaultLoopRules() ids resolve to real bodies (a fresh agent per pass); promptInstructions composes a body with the decisions briefing (#112) and renderTask turns a LoopEvent into the worker task. Closes the turnkey wire across #111 / #112 / #113. Child #111 of the AI-framework epic (#110).
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.
Closes #111. Child of the AI-framework epic #110; supplies the bodies the loop (#113) dispatches and consults the decisions ledger (#112). This closes the turnkey wire across all three.
What
The stack-aware prompt bodies, shipped as data. Eight markdown bundles under
prompts/(published in the tarball):@gemstack/ai-skills(metadata.loopId/passes/event), so a contributor improves a prompt by editing prose, not code (the main OSS contribution surface).Loaded with
builtinLibrary()/loadPromptsFrom(dir)into aPromptLibrary.loopPromptsFor(library, makeAgent)materializes them into loop prompts sodefaultLoopRules()ids (review/code-quality/security/qa/ux) resolve to real bodies, a fresh agent per pass.promptInstructionscomposes a body with the decisions briefing;renderTaskturns aLoopEventinto the worker's task.The turnkey wire (what this unlocks)
Design notes
.mdfiles loaded at runtime relative to the module (../../prompts/), added tofilesand verified present innpm pack. Works in dev, test, and a published install.review-thoroughdispatch asreviewwhilereview-tldrstays a standalone body.Verification
npm packincludes all 8prompts/*.md.dist:builtinLibraryloads all 8 bodies from disk, amajor-changeevent fires review (2 fresh passes) + code-quality + security,ui-flowfires qa + ux, each composed with the decisions briefing.