Contributing
How to contribute to DubStack — setup, workflow, conventions, and coding agent guidance.
DubStack accepts contributions from both humans and coding agents. The goal is predictable, safe changes to stacked-branch workflows.
Prerequisites
- Node
>=22 pnpm(pnpm@10.29.1)
pnpm installDevelopment Workflow
- Read
AGENTS.md(required for repo-specific conventions). - Make focused source changes in
src/. - Add/update tests near the changed behavior.
- Run verification commands.
- Open a PR using the repository PR template.
pnpm check:all
# or run the steps individually
pnpm test
pnpm typecheck
pnpm checksBefore submitting stacked PRs, run dub ready to validate health + submit preflight. Changes are not ready to merge unless all three verification commands pass.
If you change AI-generated metadata or prompt behavior, also run the local Evalite suite:
pnpm evalsUse pnpm evals:watch while iterating and pnpm evals:export to export the latest local report.
pnpm check:all already includes unsafe Biome fixes, typecheck, tests, and evals.
Formatting and Naming
- Biome is the source of truth for formatting/linting.
- Use 2 spaces (not tabs) for indentation.
- Use single quotes in JavaScript/TypeScript.
- Use kebab-case file names.
Using a Coding Agent
If you use Codex, Claude Code, Cursor Agent, or similar:
- Point the agent to
AGENTS.mdand.agents/docs first. - Keep edits minimal and scoped to the requested behavior.
- Require tests for behavior changes.
- Do not use git worktrees unless a maintainer explicitly asks.
- Prefer safe, non-destructive git operations.
Commit Messages (Conventional Commits)
type(scope): short description
# Examples:
feat(submit): support draft PR creation
fix(restack): preserve parent mapping after rebase
test(create): cover ensureState auto-init
docs(contributing): add coding-agent workflowCommon types: feat, fix, docs, refactor, test, chore
Pull Requests
- Keep PRs focused and reviewable.
- Include behavioral impact and risk in PR description.
- If UX or command semantics change, update docs in the same PR.
mainis configured for squash merge only + linear history + required checks.- For stacked PRs, merge in order and prefer
dub merge-nextto avoid out-of-order merges.