Getting Started - ItsChrisOfficial/perchance-bot-workshop GitHub Wiki
Getting Started
This guide walks you through setting up your environment and creating your first Perchance bot export.
Prerequisites
- Node.js — required to run the export validator (
scripts/validate-perchance-export.js) - Python 3 — required to run validation tests (
tests/test-validate-perchance-export.py) - Git — for cloning and contributing to the repository
- A text editor or IDE with JSON support
Required Reading
Before making any changes, read these documents in order:
docs/PERCHANCE_IMPORT_VERIFICATION.md— mandatory when touching export JSON orcustomCodePROJECT_RULES.md— hard placement and structure rulesCONTRIBUTING.md— human workflow and PR expectationsREPO_MAP.md— current folder mapAGENTS.md— automation/agent execution rules
Your First Bot: Step by Step
1. Clone the repository
git clone https://github.com/ItsChrisOfficial/perchance-bot-workshop.git
cd perchance-bot-workshop
2. Choose a starter template
The repository provides starter templates in bots/templates/:
| Template | When to Use |
|---|---|
perchance-empty-minimal.json |
Default — use this for new bot builds |
perchance-empty-annotated.json |
When you need embedded schema guidance during authoring |
perchance_empty_customcode_template.json |
Legacy baseline (retained for backward compatibility) |
3. Create your bot workspace
mkdir bots/in-progress/my-bot-name
cp bots/templates/perchance-empty-minimal.json bots/in-progress/my-bot-name/my-bot-name-v0.1.0.json
Use kebab-case for folder and file names.
4. Edit your bot
Open the copied JSON file and modify the character row inside data.data[0].rows[0]. Key fields to customize:
name— your bot's display nameroleInstruction— the core behavior promptreminderMessage— recurring context remindercustomCode— runtime JavaScript (see Custom Code Guide)initialMessages— seeded conversation startersshortcutButtons— quick-action buttons
Important: Only modify row content. Do not change the export envelope structure unless explicitly required.
5. Validate your export
node scripts/validate-perchance-export.js "$(pwd)/bots/in-progress/my-bot-name/my-bot-name-v0.1.0.json"
Run the test suite:
python -m unittest tests/test-validate-perchance-export.py
Both must pass before promotion.
6. Promote to completed (when ready)
See the full Bot Lifecycle guide for promotion requirements.
What's Next
- Learn the Repository Structure
- Understand the Perchance Export Format
- Read the Contributing guide before opening a PR