git » bitbop.git » master » tree

[master] / AGENTS.md

Repository Guidelines

Project Structure & Module Organization

Bitbop is a static client delivered from the repository root. index.html wires the layout and registers scripts. app.js houses custom editor behavior; create siblings (e.g., editor-controls.js) when splitting features and load them from index.html. style.css contains shared styling. ace-builds/ and JS-Interpreter/ are vendored upstream bundles; only update them by syncing from their sources and document the version bump in the commit message.

Build, Test, and Development Commands

No bundler or package manifest is required today. Serve the site locally with python3 -m http.server 8000 (rooted at the repository) or npx http-server . when Node tooling is preferred. When editing the Ace editor configuration, open index.html in a browser and use DevTools to verify resource loading. If you add a Node-based workflow, capture the exact command in this section for the next contributor.

Coding Style & Naming Conventions

Use 2-space indentation for JavaScript, HTML, and CSS. Favor ES6 syntax (const/let, arrow functions) and single quotes for strings, matching the current files. Keep module names hyphenated (editor-pane, run-button) to align with DOM ids. Run npx prettier --write app.js style.css before committing if you introduce formatting-sensitive changes.

Testing Guidelines

Automated tests are not bundled yet; validate changes by running the local server and exercising the core editor flow (load page, type code, confirm Ace highlights). When you introduce automated coverage, place specs beneath a new tests/ directory and use descriptive filenames like editor-controls.test.js. Target smoke coverage of any new feature before merging.

Commit & Pull Request Guidelines

Commits follow short, lowercase, imperative lines (add readme, init). Group related edits and avoid batching vendor upgrades with feature work. Pull requests should summarize the behavior change, list manual test steps, and link any tracking issue. Include screenshots or GIFs when UI changes affect the editor panel or theming.

Third-Party Assets

Treat ace-builds/ and JS-Interpreter/ as read-only. When updating, replace their contents wholesale from upstream releases and note the source tag in the PR description. Avoid editing generated files by hand; extend functionality through wrapper scripts in the repository root instead.