Feature submission phase. Invoke with `/submit` or when user says 'ready for review', 'create PR', 'submit'. Confirms the Definition of Done passed, pushes, opens a draft PR/MR, runs /code-review (posting to the PR) plus a fresh-context lens committee sized by the effort label, marks the PR ready, handles review iteration, and gates to merge.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Submit?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/joecotellese-submit)
---
name: submit
max_words: 2350
effort: low
description: "Feature submission phase. Invoke with `/submit` or when user says 'ready for review', 'create PR', 'submit'. Confirms the Definition of Done passed, pushes, opens a draft PR/MR, runs /code-review (posting to the PR) plus a fresh-context lens committee sized by the effort label, marks the PR ready, handles review iteration, and gates to merge."
---
# Feature Submission Phase
Submit completed work for review, iterate on feedback, and merge when approved.
## Usage
```
/submit
```
**Also triggers on:**
- "ready for review"
- "create PR" / "create MR"
- "submit for review"
- "push this"
- "open a pull request"
## Workflow Overview
```
┌─────────────────────────────────────────────────────────────────┐
│ SUBMIT PHASE │
│ │
│ Draft PR → Committee → Ready → Review Loop → Gate → Merge │
│ ↑ │ │
│ └────┘ │
│ (iterate on feedback) │
└─────────────────────────────────────────────────────────────────┘
```
## Workflow Steps
### Step 1: Verify Branch State
Before submission, verify the work is ready:
```bash
BRANCH=$(git branch --show-current)
if [ "$BRANCH" = "main" ] || [ "$BRANCH" = "master" ]; then
echo "ERROR: Cannot submit from main/master. Must be on a feature branch."
exit 1
fi
git status
```
Check that:
- Working on a feature branch (not main/master)
- All changes are committed (clean working directory)
- Branch name uses one of the prefixes in `~/.claude/docs/source-control.md`:
`feature/`, `fix/`, `bugfix/`, `hotfix/`, `chore/`, `docs/`, `test/`, `refactor/`
**TDD compliance check.** Read the branch's commit history:
```bash
git log --oneline --stat origin/main..HEAD
```
Tests should appear in commits *alongside* their implementation code, not lumped together
at the end. If all tests were written after all implementation, flag it to the user — TDD
was not followed. It runs on every issue regardless of the size gate, as a flag, not a
blocker.
**Check for an existing PR.**
```bash
PLATFORM=$(bash ${CLAUDE_PLUGIN_ROOT}/skills/submit/scripts/detect_git_platform.sh)
```
**GitHub:**
```bash
EXISTING=$(gh pr list --head $(git branch --show-current) --json url --jq '.[0].url')
if [ -n "$EXISTING" ]; then
echo "PR exists: $EXISTING"
fi
```
**GitLab:**
```bash
EXISTING=$(glab mr list --source-branch $(git branch --show-current) 2>/dev/null | grep -v "^$")
```
If a PR exists and is no longer a draft, skip Step 3 (committee) and Step 6 (mark ready), then enter the review loop.
Steps 2, 4, and 5 still run, so new commits pass the Definition of Done, the suite, and get pushed.
The committee reviewed this branch before the PR was marked ready; like a human reviewer, the loop
confirms fixes to its findings rather than re-reviewing the whole branch. A draft PR means the
committee has not finished: run Step 3 against it, skipping only the draft creation.
### Step 2: Confirm the Definition of Done Passed
Look for a `DOD VERDICT` line for this issue with `status=PASS` or `status=PASS-with-caveats`
(or `PASS-pending-manual` under autopilot, which never merges), and the results file it names.
If there is none, run `/dod` before going further, or the whole judgment falls on the
reviewers.
### Step 3: Run the Code Review Committee
**Push and open a draft PR first,** so `/code-review` can post its findings on the PR and the
committee reviews what is on the remote:
```bash
git push -u origin $(git branch --show-current)
gh pr create --draft --title "<Type> #<issue>: <description>" --body "Committee review in progress. Fixes #<issue>"
```
GitLab: `glab mr create --draft` with the same title. If the push is rejected, follow Step 5's
rebase path first.
**Size gating.** `/ready` recorded a committee tier in the issue from the `effort/` label.
Read it rather than re-deriving it. The tier sets the `/code-review` level and which lenses
turn on:
- **effort/S** — `/code-review low` + Lens A.
- **effort/M** — `/code-review medium` + Lens A + Lens B.
- **effort/L** — `/code-review high` + Lens A + Lens B + Lens C.
`/code-review ultra` is user-triggered and billed. Do not attempt to launch it from here.
#### The generic sweep — always
Invoke the built-in `code-review` skill against the branch diff at the level the tier names.
**Name the branch explicitly.** With no target, `/code-review` resolves to the working tree
and the upstream diff, and once the branch is pushed those match, so the sweep returns a
silent pass on an empty input. `--comment` posts its findings as inline comments on the draft PR:
```bash
BRANCH=$(git branch --show-current)
```
```
Skill tool: skill="code-review", args="<low|medium|high> --comment $BRANCH"
```
**An empty diff is a blocking condition.** If `/code-review` reports no diff to review, or
that the working tree matches upstream, do not record it as a clean sweep. A review that
inspected nothing is not one that found nothing, and a PR body recording it as a pass hides
the difference. Fix the target and re-run.
It owns generic correctness bugs and reuse/simplification/efficiency cleanups. Do not
hand-write a bug-hunting lens alongside it — that is the job it already does, better.
Findings come back through `ReportFindings`. **correctness** findings go through
`references/finding-triage.md`. Everything else is **non-blocking**: log it to the issue, then drop it.
#### The lenses
Lenses run in **fresh contexts** via the Agent tool. The builder does not grade its own
work: an agent that watched the code get written has already accepted every assumption in
it. Give each one the diff, the issue, and one lens only — overlapping lenses produce
three copies of the same finding. Zero findings is a correct result, and say so in each
brief: every speculative finding costs a reproduction-test round in triage.
**Lens A — acceptance-criteria conformance. Always.**
```
Agent tool: subagent_type="dev-jawn:acceptance-criteria-reviewer"
```
Give it the issue number, the acceptance criteria verbatim, and the diff. `/code-review`
reviews the diff, not the issue — it has no idea what the ticket asked for. This lens is
the only thing that checks the code against what was actually requested.
**Lens B — platform safety. effort/M and up.**
Detect the project domain using the detection script:
```bash
DOMAIN=$(bash ${CLAUDE_PLUGIN_ROOT}/skills/submit/scripts/detect_project_domain.sh)
echo "Detected domain: $DOMAIN"
```
Use the script's answer rather than inferring the domain, because it reports `ambiguous` where a guess would silently pick one.
- `swift` → `swift-swiftui-reviewer` agent — concurrency and main-actor safety
- `python` → `python-code-reviewer` skill
- `cpp-qt` → `cpp-qt-reviewer` skill
- `unknown` → no dedicated reviewer exists. Say so in one line and continue the committee.
- `ambiguous:<a>,<b>` → STOP, ask which reviewer the diff wants. A monorepo that matches
two domains has a real answer, and the user knows it.
**`unknown` is not a blocker.** `/code-review`, Lens A, and Lens C still run, so name
the gap and keep going. Print one line and move to the blocking triage:
```
Lens B skipped: no dedicated reviewer for this domain. Platform safety is uncovered on this PR.
```
Do not prompt the user to pick a reviewer or substitute a hand-written one: with no curated
checklist behind it, it repeats `/code-review`.
Add a domain to `detect_project_domain.sh` only when a reviewer for that language exists.
`effort/S` issues get no platform-safety pass. That is the deliberate cost of the S tier.
**Lens C — test adequacy. effort/L only.**
```
Agent tool: subagent_type="dev-jawn:test-adequacy-reviewer"
```
Would each test still fail if the fix were reverted? A test that passes either way guards
nothing. This lens also checks that every `[test: <name>]` acceptance criterion has the
test it names.
#### Blocking
**Each lens returns a blocking finding count.** Only blocking findings stop the
submission. Non-blocking findings get logged to the issue and dropped — without that rule
every submission takes another round on somebody's style preference.
Lens B blocking findings follow `finding-triage.md` too; its non-blocking findings are logged and dropped.
**If Lens A or Lens C returns a blocking finding, STOP.** Report and wait for fixes. A gap
the Definition of Ready should have caught is also a `/retro`.
### Step 4: Run Unit Tests and the Regression Sweep
**Unit suite.** `/dod` already ran it. Re-run only when a committee fix changed non-test code,
and scoped: drive it test-first with the project's single-test command (`CLAUDE.md` names
one, else `-only-testing:` or a test path), then run a build plus
the tests covering the touched files. Run the full suite only when the fix changes shared
behavior beyond an added case or field, or a reviewer asks.
**Regression sweep.** Run the acceptance tests the issue lists under **Regression sweep**, each
once. When the PR already exists, re-run it only if non-test code changed
since the last green sweep. When the project's `AGENTS.md` or `CLAUDE.md` names a sweep command, use it; otherwise run
them one by one. A test already red on main is not this branch's failure: file it as its own
issue (or record it where the project's policy says) and continue. Never patch around it inside
this issue's acceptance test.
**If a test this branch broke fails, STOP.** Report failures and wait for fixes.
### Step 5: Push Committee Fixes
The branch tracks its remote since Step 3. Push the fixes so the PR shows them:
```bash
git push
```
If rejected due to upstream changes:
```bash
git fetch origin
git rebase origin/main
# Resolve conflicts if needed
git push --force-with-lease
```
### Step 6: Mark the PR/MR Ready
Replace the draft body with the final one, then take the PR out of draft. Ready means the
committee finished and nothing blocking is open.
**GitHub:**
```bash
gh pr edit --body "$(cat <<'EOF'
## Summary
- Bullet point 1
- Bullet point 2
## Changes
- **file1.py**: What changed and why
## Testing
- [x] Unit tests pass
- [x] Definition of Done: PASS — <results file path>
- [x] Code review: `/code-review <level>` + <n> lenses; confirmed findings fixed: <severity, test>; false positives dropped: <n>; S3 logged: <n>
## Related Issues
Fixes #<issue>
EOF
)"
gh pr ready
```
**GitLab:**
```bash
glab mr update --description "..." --ready
```
**Hand the issue to the user.** As the build's last action, comment
`SUBMIT VERDICT: #<issue> route=stage:human blocking=none` on the issue with the PR link and
one sentence on what waits (review, then merge), then swap `stage:build` for `stage:human`.
Merging closes the issue, and closed means done.
### Step 7: Report PR and Enter Review Loop
Follow Phase closeout in `${CLAUDE_PLUGIN_ROOT}/skills/WORKFLOW.md`. Layer 1: the PR link,
what it ships in user terms, and any committee finding left open as non-blocking. Then say
you are waiting for review feedback or approval.
### Step 8: Review Iteration Loop
When user reports review feedback:
1. Read the feedback (user pastes or describes comments)
2. Make requested changes
3. Commit with message: `Update #<issue>: Address review feedback`
4. Push changes: `git push`
5. Report: "Changes pushed. PR updated."
6. Return to waiting for review outcome
### Step 9: Gate to Merge
When user confirms review is approved:
Use AskUserQuestion:
```
Merge #<issue>?
- Merge (Recommended) → Squash-merge the PR and clean up
- Tell me more → Layer 2
- Keep it open → Leave the PR for now
- Stop here → Pick it up later
```
### Step 10: Merge and Cleanup
If user confirms merge:
**GitHub:**
```bash
# Wait for CI if configured
gh pr checks
# Merge with squash
gh pr merge --squash --delete-branch
```
**GitLab:**
```bash
glab mr merge --squash --remove-source-branch
```
### Step 11: Return to Main
```bash
git checkout main
git pull origin main
# Delete local branch (remote already deleted by merge)
git branch -d <branch-name>
```
Stop any service this session started (for example `docker compose stop db`). Leave services
that were already running when the session began. Stopping waits until after the merge so the
user can still run the branch locally before deciding.
### Step 12: Report Success
Briefly: what shipped to main, in user terms, and anything still open, such as
a follow-up issue or a deploy that has not happened. Merging is not deploying.
## Error Handling
| Situation | Action |
|-----------|--------|
| On main/master branch | STOP - cannot submit from main |
| Uncommitted changes | STOP - commit first |
| Linting fails | STOP - fix before submission |
| Tests fail | STOP - fix before submission |
| Push rejected | Attempt rebase; if conflicts, STOP |
| PR exists, not a draft | Skip Steps 3 and 6, enter review loop |
| Draft PR exists | Run Step 3 against it, skip only the draft creation |
| Merge conflicts | STOP - ask user to resolve |
| CI checks failing | STOP - wait for fixes |
| No `DOD VERDICT` for the issue | Run `/dod` before submitting |
| Blocking Lens A or C finding | STOP - fix, then re-run that lens only |
| `/code-review` correctness or Lens B finding | Triage per `finding-triage.md` |
| `/code-review` reports an empty diff or no diff to review | STOP - the sweep reviewed nothing; fix the target and re-run |
| Domain is `ambiguous:...` at effort/M or L | STOP - ask which reviewer the diff wants |
| Domain is `unknown` at effort/M or L | Note Lens B skipped, continue the committee |
| Blocking finding the DoR should have caught | Fix it, then `/retro` the gate |
## Resources
### scripts/
- `detect_git_platform.sh` - Detects GitHub vs GitLab
- `detect_project_domain.sh` - Detects project domain for Lens B reviewer selection; reports
`ambiguous:<a>,<b>` when a repo matches more than one
### agents/
Lens A and Lens C ship as agent definitions in `plugins/dev-jawn/agents/`, each pinning
`model: opus`, so review quality does not follow whatever `/model` the session happens to be
set to. There is no per-agent effort key: `effort:` is skill-only, and putting it on an agent
stops that agent registering at all (#56). The model pin is the only lever holding committee
depth up, which is why it is a dependency here and not an optimization.
### references/
- `pr_template.md` - PR format examples
- `finding-triage.md` - severity triage and fix loop for Step 3 findings
## Phase Complete
After merge the loop is complete, back on main.