Build Status NPM Version License: GPL-3.0-or-later
A CLI tool for building modular AI instructions. Treat your prompts like code.
The Instructions Composer helps you move away from monolithic, hard-to-maintain prompts and towards a structured, collaborative, and version-controlled workflow.
- 🧱 Modular by Design: Break down large, complex prompts into small, reusable
Modulesthat are easy to manage. - 🧩 Composable: Build powerful and targeted
Personasby combining modules in a specific, layered order. - ♻️ Reusable & Consistent: Share modules across different personas to ensure consistency and save time.
- ✅ Version-Controlled: Because instructions are defined in simple YAML files, you can use Git to track changes, review contributions, and manage history.
- 🔍 Discoverable: Easily
listandsearchyour library of modules to find the building blocks you need.
Get up and running with a single command to build the example persona.
# 1. Clone the repository
git clone https://github.com/synthable/copilot-instructions-cli.git
cd copilot-instructions-cli
# 2. Install dependencies
npm install
# 3. Build the example persona!
npm start build personas/cli-build-test-v1-0.persona.yml -o example-build.mdNow, check example-build.md to see the final, compiled instruction set.
Here’s how you create your own persona from scratch.
A module is a small, atomic piece of instruction. Create a file named my-principle.module.yml:
# ./modules/my-principle.module.yml
id: principle.my-rule.be-concise
schemaVersion: '1.0'
description: 'Instructs the AI to be concise.'
meta:
name: 'Be Concise'
semantic: 'The AI should provide clear and concise answers.'
body:
principles:
- 'Be concise and to the point.'A persona combines one or more modules. Create my-persona.persona.yml:
# ./personas/my-persona.persona.yml
name: 'Concise Assistant'
description: 'A persona that is always concise.'
moduleGroups:
- groupName: 'Core Principles'
modules:
- 'principle.my-rule.be-concise' # <-- Reference the module by its IDRun the build command to compile your new persona:
npm start build ./personas/my-persona.persona.yml -o concise-assistant.mdThat's it! You now have a custom-built instruction set in concise-assistant.md.
| Command | Description | Example Usage |
|---|---|---|
build |
Compiles a .persona.yml into a single instruction document. |
npm start build ./personas/my-persona.yml |
list |
Lists all discoverable modules. | npm start list --category technology |
search |
Searches for modules by keyword. | npm start search "error handling" |
validate |
Validates the syntax and integrity of module and persona files. | npm start validate ./instructions-modules/ |
For a deep dive into the Unified Module System, advanced features, and configuration, please read our Comprehensive Guide.
Contributions are welcome! We encourage you to open issues and submit pull requests. Please follow the existing code style and ensure all tests pass.
- Run tests:
npm run test - Check linting:
npm run lint
This project is licensed under the GPL-3.0-or-later.