Add persistent agent instruction file output mode (Copilot, Claude Code, Cursor)#14
Merged
Alan-Jowett merged 5 commits intomainfrom Mar 18, 2026
Merged
Conversation
…e, and Cursor Co-authored-by: Alan-Jowett <20480683+Alan-Jowett@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add output for GitHub Copilot custom instructions files
Add persistent agent instruction file output mode (Copilot, Claude Code, Cursor)
Mar 18, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new PromptKit output mode for generating persistent, version-controlled agent instruction files (for GitHub Copilot, Claude Code, and Cursor) in addition to the existing ephemeral “raw prompt” output.
Changes:
- Introduces a new
agent-instructionsformat spec describing structure and platform constraints. - Adds a new
author-agent-instructionstemplate to condense personas/protocols into platform-ready instruction files (including “All” multi-platform output). - Updates
bootstrap.mdandmanifest.yamlto support selecting this new output mode and registering the new format/template.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tests/references/copilot-instructions-memory-safety.md |
Adds a reference instruction-file output targeting GitHub Copilot. |
templates/author-agent-instructions.md |
New template for producing persistent agent instruction files across supported platforms. |
manifest.yaml |
Registers the new agent-instructions format and the new agent-authoring template category. |
formats/agent-instructions.md |
New format spec defining output structure, platform notes, and formatting rules for instruction-file output. |
bootstrap.md |
Extends the bootstrap flow to support output mode selection (raw prompt vs instruction file) and platform-based default paths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…t-instructions.md The original implementation produced a single .github/copilot-instructions.md blob. This rework produces composable GitHub Copilot skill files under .github/instructions/*.instructions.md — each with YAML frontmatter (description, applyTo) for file-targeted activation. This aligns with: - Issue #8's request for 'skill files' - PromptKit's own compositional architecture (one skill per protocol) - Copilot's modern instruction file model (per-file targeting via applyTo) Changes across all 5 files in this PR: formats/agent-instructions.md: - Define skill file output structure with YAML frontmatter spec - Document decomposition strategy (persona+guardrails skill + per-protocol skills) - Add applyTo glob guidance per protocol category templates/author-agent-instructions.md: - Add Step 2 (skill decomposition planning) before content generation - Generate one skill file per logical concern with applyTo targeting - Quality checklist validates frontmatter, filenames, and composability bootstrap.md: - Output path: .github/instructions/<name>.instructions.md (not copilot-instructions.md) - Updated example shows multiple skill files with applyTo globs manifest.yaml: - Updated descriptions to reference skill files tests/references/: - Renamed to memory-safety-c-skill.instructions.md - Added proper YAML frontmatter (description, applyTo: **/*.c, **/*.h) - Restructured as a self-contained, independently-loadable skill Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The bootstrap must ask the user for their target project directory before writing agent instruction files. The output belongs in the user's project (.github/instructions/ etc.), not in the PromptKit repository itself. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Move output-mode selection (now step 5b) before parameter collection (now step 6) so that switching to author-agent-instructions does not invalidate already-collected params. - Restrict scope param to 'project' only since no platform defines user-level output paths or behavior. 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.
PromptKit currently only outputs ephemeral raw prompts that live in a single chat session. This adds a second output mode that produces persistent, version-controlled agent instruction files automatically loaded by agent runtimes.
New components
formats/agent-instructions.md— Format spec for platform-appropriate instruction files. Defines output structure, per-platform constraints (file paths, size limits, loading behavior, test verification), and formatting rules (second-person directives, no PromptKit section headers, no unresolved{{param}}placeholders).templates/author-agent-instructions.md— Template that condenses a PromptKit persona + protocol set into a ready-to-commit instruction file. Handles per-platform size adaptation (Copilot ≤8 KB, Cursor ≤2 KB, Claude Code unconstrained) and explicitAllmulti-platform output generating three distinct files.tests/references/copilot-instructions-memory-safety.md— Reference output for a systems-engineer + memory-safety-c instruction file targeting GitHub Copilot.Modified components
bootstrap.md— Adds step 6: output mode selection (raw prompt vs. agent instruction file) with platform targeting and auto-computed output paths:.github/copilot-instructions.mdCLAUDE.md.cursorrulesAlso adds a guideline to proactively suggest agent instruction mode for recurring/project-wide tasks, and a second example interaction demonstrating the flow.
manifest.yaml— Registersagent-instructionsformat and adds newagent-authoringtemplate category containingauthor-agent-instructions.Original prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.