Contributing - ItsChrisOfficial/perchance-bot-workshop GitHub Wiki
This guide covers the contribution workflow for both human contributors and automated agents.
Read these documents in order:
-
README.md— repo workflow overview -
PROJECT_RULES.md— placement constraints -
docs/PERCHANCE_IMPORT_VERIFICATION.md— mandatory when touching export JSON orcustomCode
-
Place files correctly — follow
PROJECT_RULES.mdworkspace ownership rules - Keep changes small — single-purpose, focused diffs
- Reuse shared assets — don't duplicate helpers across bot folders
-
Run validation — when touching export JSON or
customCode -
Update indexes —
REPO_MAP.md,BOT_CATALOG.md,SNIPPETS_INDEX.mdas needed -
Promote when ready — move from
in-progresstocompletedonly after full validation
| Content Type | Correct Location |
|---|---|
| New bot work | bots/in-progress/<bot-name>/ |
| Release-ready bots | bots/completed/<bot-name>/ |
| Starter templates | bots/templates/ |
| Shared logic/utilities | shared/ |
| Reusable fragments | snippets/ |
| Automation scripts | scripts/ |
| Standards/process docs | docs/ |
| Retired assets | archive/ |
- Creating new bot work directly in
bots/completed/ - Leaving reusable helper logic in a single bot folder
- Adding new assets at repo root instead of the correct workspace
- Putting snippets in
shared/or shared utilities insnippets/
- Use kebab-case for all new files and folders
- Keep folders single-purpose and predictable
- Prefer small, focused files and minimal diffs
- Bot exports:
<bot-name>-vMAJOR.MINOR.PATCH.json
When export JSON or customCode changes:
# Validate the export
node scripts/validate-perchance-export.js /absolute/path/to/export.json
# Run the test suite
python -m unittest tests/test-validate-perchance-export.pyBoth must pass. See Validation and Testing for details.
Every pull request should address these items:
- Files are placed in correct folders per
PROJECT_RULES.md -
docs/PERCHANCE_IMPORT_VERIFICATION.mdwas followed for export/customCodechanges - Validation commands were run and passed (when required)
-
REPO_MAP.mdupdated for structure changes -
BOT_CATALOG.mdupdated for bot add/move/retire -
SNIPPETS_INDEX.mdupdated for snippet changes - Relevant subtree
README.mdupdated when folder usage changed - Bot promotion to
completedonly done after validation and readiness
The repository includes a PR template at .github/pull_request_template.md with this checklist.
| Change | Files to Update |
|---|---|
| New/moved/removed top-level folder | REPO_MAP.md |
| Bot added/moved/retired | BOT_CATALOG.md |
| Snippet added/moved/removed | SNIPPETS_INDEX.md |
| Folder purpose changed | Affected subtree README.md
|
| Bot promoted to completed |
BOT_CATALOG.md + bot's RELEASE.md
|
Automated agents (GitHub Copilot, etc.) must also follow these rules from AGENTS.md:
- Make minimal, scoped diffs
- Reuse shared assets instead of duplicating helpers
- Keep filenames/folders kebab-case and predictable
- Update required indexes in the same change
- Do not mark bot work complete without required validation
- Treat
docs/PERCHANCE_IMPORT_VERIFICATION.mdas a release gate for any export work
The docs/Code_Documentation/ directory contains reference documentation for Perchance platform features:
- Custom code APIs and examples
- Initial messages format
- Message styling
- Memories and lore
- Text-to-image and TTS plugins
- Python (Pyodide) integration
Use these as reference when building bot behavior.