Ship a feature end-to-end: branch, code, test, changeset, PR, and merge.
- Local environment set up (see Getting Started)
- Familiarity with relevant standards
Start from an up-to-date main branch:
git checkout main
git pull origin main
git checkout -b feat/my-featureUse Conventional Commits-style branch naming: feat/, fix/, docs/, refactor/, chore/, etc.
Follow the coding standards:
constonly -- nolet, no mutation- No classes, loops, or
throw - Return
Resulttuples instead of exceptions - Use
command()factory for CLI commands - Prefer pure functions, composition, and
es-toolkitutilities
See the TypeScript standards and error handling standards for details.
Run the CI check suite as you work to catch issues early:
pnpm lint && pnpm format && pnpm typecheckAuto-fix formatting and lint issues:
pnpm format:fix && pnpm lint:fixAdd or update tests for changed code:
pnpm testUse Conventional Commits format:
git commit -m "feat(packages/core): add parallel script execution"Format: type(scope): description -- see Commit Standards for types, scopes, and examples.
Lefthook runs git hooks automatically:
| Hook | What it does |
|---|---|
commit-msg |
Validates Conventional Commits format via commitlint |
pre-commit |
Syncs package metadata and formats staged files with OXFmt |
pre-push |
Runs OXLint and typecheck |
If the change affects published packages (@kidd-cli/core, @kidd-cli/*), create a changeset:
pnpm changesetFollow the prompts to select the package, semver bump type (patch, minor, major), and write a summary. Commit the generated .changeset/*.md file with your other changes.
When to add a changeset:
- New features, bug fixes, or breaking changes to
@kidd-cli/coreor@kidd-cli/*packages
When to skip:
- Docs-only changes, CI updates, internal tooling, contributing docs
Check pending changesets:
pnpm changeset statusgit push -u origin feat/my-featureOpen a PR against main. Use the same type(scope): description format for the PR title and include these sections in the description:
## Summary
Brief description of changes (2-3 sentences).
## Changes
- Bullet list of specific changes
## Testing
1. Step-by-step testing instructions
2. Expected behavior
## Related Issues
Closes #123See Pull Request Standards for the full review and merge process.
CI runs: lint, format, typecheck, test.
Respond to review comments within 24 hours. Make fixup commits and push:
git commit -m "fix(packages/core): address review feedback"
git pushAfter approval and green CI, use Squash and Merge. The Changesets bot handles versioning and npm publishing on merge to main.
Before requesting review, confirm:
pnpm lint && pnpm format && pnpm typecheck && pnpm testall pass- PR title follows
type(scope): descriptionformat - Changeset included if the change affects published packages
Issue: git push is blocked by lint or typecheck errors.
Fix:
pnpm lint:fix && pnpm format:fixFix any remaining typecheck errors, then re-push.
Issue: Unsure whether a changeset is needed or what state it is in.
Fix:
pnpm changeset statusThis shows all pending changesets and which packages they affect.
Issue: PR cannot be merged due to conflicts with main.
Fix:
git fetch origin
git rebase origin/main
# Resolve conflicts
git push --force-with-lease