-
Notifications
You must be signed in to change notification settings - Fork 115
docs: add CONTRIBUTING.md guide for new contributors #484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
JDis03
wants to merge
4
commits into
NeuralNomadsAI:dev
Choose a base branch
from
JDis03:docs/contributing-guide
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+154
−0
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1f08dd9
docs: add CONTRIBUTING.md guide for new contributors
JDis03 2e60b38
fix: address review feedback on project structure, paths, and prerequ…
JDis03 86b5721
fix: restore key UI files table until architecture skill PR lands
JDis03 2df8c5d
fix: correct malformed table separator in project structure
JDis03 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,154 @@ | ||
| # Contributing to CodeNomad | ||
|
|
||
| Thank you for your interest in contributing! This guide will help you get started. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - **Node.js 18+** and npm | ||
| - **OpenCode CLI** in your `PATH` (the server connects to the OpenCode binary to manage workspaces) | ||
|
|
||
| ## Quick Start | ||
|
|
||
| ```bash | ||
| git clone https://github.com/NeuralNomadsAI/CodeNomad.git | ||
| cd CodeNomad | ||
| npm install | ||
| npm run dev | ||
| ``` | ||
|
|
||
| ## Finding Issues to Work On | ||
|
|
||
| Browse [open issues](https://github.com/NeuralNomadsAI/CodeNomad/issues) and look for these labels: | ||
|
|
||
| | Label | Meaning | | ||
| |---|---| | ||
| | `ready-to-work` | Clear scope, ready for anyone to pick up | | ||
| | `good-first-issue` | Good for first-time contributors | | ||
| | `enhancement` | New feature requests | | ||
| | `bug` | Bug reports | | ||
|
|
||
| **Before starting:** comment on the issue so we can discuss approach and avoid duplicate work. | ||
|
|
||
| ## Development Workflow | ||
|
|
||
| ### 1. Fork and Branch | ||
|
|
||
| ```bash | ||
| # Fork the repo on GitHub, then clone your fork | ||
| git clone https://github.com/YOUR_USERNAME/CodeNomad.git | ||
| cd CodeNomad | ||
|
|
||
| # Add the upstream remote | ||
| git remote add upstream https://github.com/NeuralNomadsAI/CodeNomad.git | ||
|
|
||
| # Create a branch from upstream/dev | ||
| git fetch upstream | ||
| git checkout -b fix/your-branch-name upstream/dev | ||
| ``` | ||
|
|
||
| ### 2. Branch Naming | ||
|
|
||
| | Prefix | Use for | | ||
| |---|---| | ||
| | `fix/` | Bug fixes | | ||
| | `feat/` | New features | | ||
| | `docs/` | Documentation changes | | ||
| | `refactor/` | Code refactoring | | ||
| | `chore/` | Build, config, maintenance | | ||
|
|
||
| Examples: `fix/question-queue-ordering`, `feat/retry-tool-call`, `docs/contributing-guide` | ||
|
|
||
| ### 3. Make Your Changes | ||
|
|
||
| ```bash | ||
| # Install dependencies | ||
| npm install | ||
|
|
||
| # Run the dev server | ||
| npm run dev | ||
|
|
||
| # Run type checking | ||
| npm run typecheck --workspace @codenomad/ui | ||
| ``` | ||
|
|
||
| ### 4. Commit | ||
|
|
||
| Write clear, descriptive commit messages. Explain **what** changed and **why**. | ||
|
|
||
| ```bash | ||
| git add . | ||
| git commit -m "fix(ui): preserve question queue order when upserting duplicate requests | ||
|
|
||
| When a question arrives as a global entry and later resolves to a tool | ||
| part with a newer timestamp, the original enqueue time was lost, causing | ||
| the question to move behind newer entries and break interruption order." | ||
| ``` | ||
|
|
||
| ### 5. Push and Create a PR | ||
|
|
||
| ```bash | ||
| git push origin your-branch-name | ||
| ``` | ||
|
|
||
| Then open a pull request on GitHub targeting the `dev` branch. | ||
|
|
||
| **PR checklist:** | ||
| - [ ] Branch is based on latest `upstream/dev` | ||
| - [ ] One issue per PR (don't mix unrelated changes) | ||
| - [ ] Type checking passes: `npm run typecheck` (root) or the workspace-specific script matching your change area | ||
| - [ ] Tests pass (if applicable) | ||
| - [ ] PR description explains the change and links the issue | ||
|
|
||
| ## Project Structure | ||
|
|
||
| | Package | Description | | ||
| |---|---| | ||
| | `packages/server` | Core logic & CLI — workspaces, OpenCode proxy, API, auth | | ||
| | `packages/ui` | SolidJS frontend — reactive UI components and stores | | ||
| | `packages/electron-app` | Electron desktop shell | | ||
| | `packages/tauri-app` | Tauri desktop shell (experimental) | | ||
| | `packages/opencode-plugin` | OpenCode plugin integration | | ||
| | `packages/cloudflare` | Cloudflare deployment adapters | | ||
|
|
||
| ### Key UI Files | ||
|
|
||
| | Path | Purpose | | ||
| |---|---| | ||
| | `packages/ui/src/stores/session-events.ts` | SSE event handlers (idle, status, permissions, questions) | | ||
| | `packages/ui/src/stores/session-actions.ts` | User actions (send message, abort, revert, fork) | | ||
| | `packages/ui/src/stores/message-v2/` | Message store (v2 architecture) | | ||
| | `packages/ui/src/stores/instances.ts` | Instance management and interruption queues | | ||
| | `packages/ui/src/components/tool-call.tsx` | Tool call rendering | | ||
| | `packages/ui/src/components/message-block.tsx` | Message display blocks | | ||
| | `packages/ui/src/components/session/session-view.tsx` | Main session view | | ||
| | `packages/ui/src/lib/i18n/messages/` | Translation files (en, es, fr, ja, ru, he, zh-Hans) | | ||
|
|
||
| > For a comprehensive map of all six functional areas (server, UI, desktop, speech/audio, build, Cloudflare), SDK integration patterns, and feature traces, load the `codenomad-architecture-guide` skill: | ||
| > `.opencode/skills/codenomad-architecture-guide/SKILL.md` (available after [PR #493](https://github.com/NeuralNomadsAI/CodeNomad/pull/493) lands) | ||
|
|
||
| ### Styling | ||
|
|
||
| - Tokens: `packages/ui/src/styles/tokens.css` | ||
| - Utilities: `packages/ui/src/styles/utilities.css` | ||
| - Component styles: `packages/ui/src/styles/components/`, `packages/ui/src/styles/messaging/`, `packages/ui/src/styles/panels/` | ||
| - Keep style files under ~150 lines; split by component | ||
|
|
||
| ### Internationalization (i18n) | ||
|
|
||
| - Use `useI18n()` in components, `tGlobal()` in stores | ||
| - Messages live in `packages/ui/src/lib/i18n/messages/<locale>/` | ||
| - When adding a string: add to `en/` first, then add the same key to every other locale | ||
| - Placeholders use `{name}` syntax (word characters only) | ||
|
|
||
| ## Code Principles | ||
|
|
||
| - **KISS**: Keep modules narrowly scoped | ||
| - **DRY**: Share helpers before copy-pasting | ||
| - **Single responsibility**: Split files when concerns diverge | ||
| - **Composable primitives**: Prefer signals, hooks, utilities over deep inheritance | ||
|
|
||
| ## Need Help? | ||
|
|
||
| - Check existing [issues](https://github.com/NeuralNomadsAI/CodeNomad/issues) and [PRs](https://github.com/NeuralNomadsAI/CodeNomad/pulls) | ||
| - Ask in the issue you're working on | ||
| - Review the [server documentation](packages/server/README.md) for CLI flags and configuration | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR description explains the change, has relevant screenshots if UI change.
No need to create a separate issue if its a new feature.