- name
- commit
- description
- Execute the EaseUI commit workflow end-to-end with branch safety, tests, changelog update, PM Hub sync, ByteRover deep sync, and push. Use when the user asks to commit, says Copu or Now, or requests commit message generation and git push.
# Commit (EaseUI Protocol)
Use this skill whenever a user asks to commit code, generate a commit message, says `Copu`, or says `Now` (changelog-first).
## Goal
Create a safe, high-quality, conventional commit that includes:
- validated code changes,
- updated changelog and docs when needed,
- PM Hub and ByteRover knowledge sync,
- and push to remote.
## Required Order
> **If user says `Now`:** Run Step 3 (Changelog) first, then continue from Step 0.
Always execute this sequence exactly:
0. Branch safety
1. ByteRover context query
2. Run tests
3. Update changelog
4. Review docs
5. Security check + Stage + Commit
6. ByteRover deep sync
7. PM Hub sync
8. Amend with knowledge + Push
## Step 0: Branch Safety
```bash
git branch --show-current
```
- If branch is `main` or `master`, create/switch to a feature branch unless user explicitly asks to commit to main.
- Never force-push `main` or `master`.
## Step 1: ByteRover Context Query (Mandatory)
```bash
brv query "<what was changed and why>"
```
## Step 2: Run Tests (Mandatory)
```bash
cd app && npx jest --passWithNoTests
```
Do not commit with known failing tests.
## Step 3: Update Changelog (Mandatory)
Edit `app/src/app/changelog/page.tsx`:
- Bump version by `0.01`
- Use today's date (`Month D, YYYY`)
- Add clear label + valid `labelType`
- Classify each change as `new`, `improved`, or `fix`
## Step 4: Review Related Docs (If Impacted)
Check and update only if affected: `README.md`, `docs/*`, roadmap docs.
## Step 5: Security Check + Stage + Commit
**Security scan:**
```bash
git diff --cached | grep -iE "(api[_-]?key|token|password|secret|credential)"
```
If secrets found: STOP, warn user.
**Split decision:** Split commits if different types mixed (feat + fix), multiple scopes, or FILES > 10 unrelated.
**Commit format:**
```text
<type>(<scope>): <Subject>
<Body explaining what and why>
<Footer>
```
Types: `feat`, `fix`, `ref`, `perf`, `docs`, `test`, `chore`
Subject: imperative, capitalized, no period, max 70 chars.
Footer always includes:
```
Co-Authored-By: Claude <noreply@anthropic.com>
```
Use heredoc for multi-line:
```bash
git commit -m "$(cat <<'EOF'
feat(scope): Subject line
Explain what changed and why.
Refs #123
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
```
### Revert Format
```
revert: feat(api): Add new endpoint
This reverts commit abc123def456.
Reason: Caused performance regression.
```
## Step 6: ByteRover Deep Sync (Mandatory)
```bash
git diff HEAD~1 --stat
```
Map to categories → curate per category (max 5 files per call):
```bash
brv curate "Specific architectural change and why." -f <file1> -f <file2>
```
Verify:
```bash
find .brv/context-tree -name "*.md" -newer .git/COMMIT_EDITMSG | head -20
```
## Step 7: PM Hub Sync (Mandatory)
Apply `.agent/workflows/pm-hub-sync.md`:
1. Update `plans/specs/{id}/STATUS.md`
2. Update `plans/specs/README.md` status icon
3. Run final `brv curate`
## Step 8: Amend With Knowledge + Push
```bash
git add .brv/
git commit --amend --no-edit
git push easestart-prd <branch> --force-with-lease
```
## Hard Gate Checklist
- [ ] Not committing accidentally on `main`/`master`
- [ ] `brv query` ran before commit
- [ ] Tests passed
- [ ] No secrets in staged changes
- [ ] Changelog entry added
- [ ] Commit uses valid conventional format
- [ ] Footer contains `Co-Authored-By`
- [ ] ByteRover deep sync completed
- [ ] PM Hub sync completed
- [ ] Push performed safely
## Done Condition
Code, changelog, docs, PM Hub status, and ByteRover knowledge are all synchronized in the pushed commit history.
View on GitHub