ワンクリックで
roster-ship
Ship — conventional commits, rebase-merge, GitHub PR. Gated on review + QA go.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Ship — conventional commits, rebase-merge, GitHub PR. Gated on review + QA go.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Audit code quality against KB-defined properties, invariants, and naming conventions.
Quality and compliance audit — combines code-quality and spec-compliance into one actionable report.
Periodic friction analysis — proposes new skills, deterministic tools, and adaptations.
Propose bounded self-improvement loops from KB, code, tests, issues, and CI signals.
Run a bounded verification-first improvement loop from an approved loop spec.
Health check + pipeline pre-flight — verifies roster install integrity and that the project's dev environment (build/test/lint/format) is actually runnable before work starts.
| name | roster-ship |
| description | Ship — conventional commits, rebase-merge, GitHub PR. Gated on review + QA go. |
| version | 1.4.0 |
| domain | pipeline |
| phase | ship |
| preamble | true |
| friction_log | true |
| allowed_tools | ["Read","Bash","AskUserQuestion"] |
| human_gate | both |
| tunables | {"merge_strategy":"rebase-merge","commit_convention":"conventional","pre_pr_checks":"","friction_warn_threshold":10,"push_mode":"pr","push_target":"main"} |
| artifacts | {"reads":["briefs/<task>-review.json","briefs/<task>-qa.md","briefs/<task>-impl.md"],"writes":["PR GitHub (external artifact — not tracked in briefs/)"]} |
| pipeline_role | {"triggered_by":"/roster-qa with GO status","receives":"ready branch, review.json GO, qa.md GO","produces":"PR opened or BLOCKED status with reason"} |
This preamble is injected into every roster skill that declares preamble: true.
It encodes the non-negotiable principles that govern all skill runs.
Do not defer tests, documentation, or robustness in the name of speed. A short-term shortcut is rarely faster than a complete solution. "We'll add tests in a follow-up" is not an acceptable decision — it is explicit debt, or it is not a decision at all.
Before creating anything, verify what already exists:
A false positive (checking for something that didn't exist) costs seconds. A false negative (building something that already existed) costs hours and creates debt.
Do not validate a direction if you have a grounded objection. Do not say "good idea" before verifying it is a good idea. If you spot a problem, say so — clearly, factually, without softening. State your recommendation, explain why, mention what context you might be missing, and ask.
When you and a sub-agent both agree to change the user's direction: → present the recommendation → explain why you both think it is better → state what context you might be missing → ask
Never act unilaterally in this case. The decision belongs to the user.
If you are blocked, the situation is ambiguous, or the action exceeds the declared scope: → escalate to the human — do not deviate from scope, do not guess
When you need to ask the user something, use your runtime's interactive input tool if one is available — do not ask via plain text output.
Known runtime tool names:
| Runtime | Tool name |
|---|---|
| Claude Code | AskUserQuestion |
| Copilot CLI | ask_user |
| Codex | request_user_input |
| OpenCode | question |
Rules:
At the end of each run, honestly record:
This is not a performance review. It is cross-run memory.
Format: see skills-meta/friction.jsonl.
If your skill's phase: frontmatter field is non-null (i.e. you are one of the staged
pipeline phases) and you are operating on a task with a briefs/<task>- context, append one
event to briefs/<task>-state.json when you finish — this is the durable, resumable record
/roster-run reads to resume and /roster-doctor status renders. Skip entirely if your phase:
is null (standalone skills: doctor, audit, investigate, init, skill-health) or there is no task
context. Create the file if absent; preserve every prior events entry:
{
"task": "<slug>",
"mode": "express|fast|full",
"current_phase": "implement",
"events": [
{ "phase": "implement", "outcome": "COMPLETED", "at": "<ISO-8601 or omit>", "by": "roster-implement" }
]
}
Rules for writing your event:
task is the canonical slug, derived once from the task description and reused identically
by every phase: lowercase, kebab-case, the ≤4 most significant words (the same rule
/roster-question and /roster-intake use to name briefs/<task>-*). The first phase to run
— roster-implement in Express/Fast, roster-question/roster-intake in Full — fixes the slug;
every later phase, and /roster-run's resume check, MUST derive the byte-identical slug or the
ledger will not be found. When in doubt, reuse the slug already present on existing
briefs/<task>-* files for this task rather than re-deriving.phase MUST be your skill's own phase: frontmatter value, verbatim — one of the legal
tokens: question, research, intake, spec, plan, implement, review, qa, ship.
Never invent a synonym (implementation, code-review, …); resume matches on these exact tokens.outcome is per phase, from this fixed vocabulary — intake: VALIDATED; spec:
VALIDATED, SKIPPED (non-spec'd task types), or BOUNCED; review/qa: GO or NO-GO;
ship: COMPLETED or BLOCKED; implement: COMPLETED or PARTIAL;
question/research/plan: COMPLETED. Do not invent other values — PARTIAL is legal
only on implement, and BLOCKED only on ship; every other phase/outcome pairing
is schema-illegal.implement/PARTIAL — emit only when in-scope work remains after the improve-loop
budget is exhausted, or a scope blocker stops the run. Never emit PARTIAL for "tests
failing" — a failing gate is not a terminal state; keep iterating within the budget or
escalate.ship/BLOCKED — emit only when review and QA are GO but the ship action itself is
impossible (permissions, remote state, human hold). A NO-GO gate is not BLOCKED.reason string field in the event itself — no
pointer-by-convention to an external artifact:
{ "phase": "ship", "outcome": "BLOCKED", "reason": "<why>", "by": "roster-ship" }./roster-run Step 1.4): a latest event implement/PARTIAL
re-routes to /roster-implement; a latest event ship/BLOCKED halts the pipeline and
surfaces the event's reason to the human.implement/review pair; that
repetition is the history, not a bug. Set current_phase to your phase (the latest completed).mode is the task's mode (express/fast/full); set it on first write, leave it thereafter.at if your runtime can produce one; otherwise omit the field. by is your
skill name (or human-gate for a gate decision).TASK environment variable — export it when invoking
hooks manually.You carry the implementation branch through to merge. Conventional commits, rebase-merge only, PR with closing issue. Never ship without the double review + QA gate.
Token discipline: terse — links not pastes, one-liner commit subjects.
Before any action, read:
briefs/<task>-review.json — BLOCK if status is NO-GO; read its mode fieldbriefs/<task>-impl.md — for commit messagesbriefs/<task>-qa.md — required for fast/full mode (BLOCK if NO-GO or absent).
Express mode skips QA (its pipeline is implement → review → ship), so a missing
qa.md is expected and not a block when review.json.mode == "express".If review.json.mode is absent and the impl brief has no Mode: line, require human
confirmation before treating a missing qa.md as expected — the mode cannot be safely
inferred without an authoritative source.
Block conditions (these are refusals to enter ship — they do not emit a
ship/BLOCKED ledger event, which is reserved for the Output Contract's definition):
⛔ DO NOT SHIP: review.json is NO-GO or absent → resolve before shipping. ⛔ DO NOT SHIP: qa.md is NO-GO, or absent on a non-express task → run /roster-qa first.
git status # repo clean?
git log --oneline -5 # branch state
If the repo is dirty on files outside the task scope → report and ask what to do.
If tunables.pre_pr_checks is defined, execute it and block on failure.
From briefs/<task>-impl.md, build the commits:
Format: type(scope): description
Types: feat, fix, refactor, docs, test, chore, perf, ci
Rules:
Closes #N if issue referencedgit add <scope files>
git commit -m "type(scope): description"
push_mode: pr only)This step applies only in pr mode. In direct mode there is no rebase-onto-main — the work is fast-forward pushed to tunables.push_target's configured long-lived branch (see Step 5).
git fetch origin
git rebase origin/main
If conflicts → resolve within the task scope only. If conflict is out of scope, report to the human.
Write the ship summary to briefs/<task>-ship-gate.md, then present the quiz per the human-validation.md protocol (at minimum 1 comprehension + 1 clarification + 1 consistency-check question). All questions uniform format — do not label by type.
Present:
Commits prepared:
<short sha> type(scope): description
...
Branch: <name>
Target: main
Push and open PR?
Wait for explicit human confirmation after the quiz passes.
Behavior depends on tunables.push_mode (default pr — preserves current behavior):
pr mode (default):
git push origin <branch> --force-with-lease
gh pr create \
--title "type(scope): description" \
--body "$(cat briefs/<task>-impl.md | head -20)
Closes #N" \
--base main
direct mode: fast-forward push to the long-lived branch configured in tunables.push_target — no PR, no rebase-onto-main (Step 3's rebase and Step 6's PR merge do not apply):
git push origin HEAD:<push_target> # must be a fast-forward — never force
If the push is not a fast-forward, stop and report — do not force-push (see escalation rules).
After review and CI green:
gh pr merge <N> --rebase --delete-branch
Rebase merge only. Never a merge commit, never squash.
✅ Shipped: PR #N merged to main
Branch deleted: <branch>
Closes: #N
[ -d kb ] && ([ -f kb/spec.md ] || [ -f kb/index.md ]) && echo "KB present" || echo "KB absent"
If KB is present:
→ Invoke skills/kb/kb-update.md skill.
→ If kb-update reports a contradiction (code contradicts KB spec):
<task-slug>" (describe the contradiction).
→ If KB updated cleanly:
Wait for human confirmation before pushing KB changes to main. Then:git add kb/
git commit -m "docs(kb): sync KB with <task-slug> changes"
git push
→ If KB is absent: skip silently.
GitHub PR opened (then merged after human approval), or BLOCKED status documented.
Ledger event. Per the preamble Pipeline State, append your event to
briefs/<task>-state.json as the last contractual act of the phase — after every ship
artifact is on disk. The metabolism counter, projection sync, and friction reminder below are
post-phase housekeeping, not part of the ship contract: a resumed run seeing ship/COMPLETED
may assume the ship itself is done even if housekeeping was interrupted.
{ "phase": "ship", "outcome": "COMPLETED", "by": "roster-ship" }.briefs/<task>-ship-gate.md) on disk, then append { "phase": "ship", "outcome": "BLOCKED", "reason": "<...>", "by": "roster-ship" } — the reason string summarizes why the
ship action is impossible. Emit BLOCKED only when review and QA are GO but the ship
action itself cannot be performed (permissions, remote state, human hold) — a NO-GO gate is
not BLOCKED (that is a refusal to enter this skill's push path, handled by the gates above).
On resume, /roster-run halts on a latest ship/BLOCKED and surfaces this reason.Next: tech-lead / human with merge confirmation.
Increment metabolism counter: After a GO ship (PR opened or merged), increment completed_tasks in .harness/harness.json (fall back to .claude/harness.json if absent):
# read → increment → write (jq required; use a project-local temp file, never /tmp)
HARNESS=".harness/harness.json"
[ -f "$HARNESS" ] || HARNESS=".claude/harness.json"
[ -f "$HARNESS" ] && jq '.layers.metabolism.completed_tasks += 1' "$HARNESS" > "${HARNESS}.tmp" && mv "${HARNESS}.tmp" "$HARNESS"
# Sync projections immediately — harness.json drift will fail the next npm test otherwise
[ -f "$HARNESS" ] && ./scripts/sync-harness.sh 2>/dev/null && git add -A && git commit -m "chore(harness): sync .claude projection after metabolism counter bump" || true
If jq is not available or neither harness file exists, note the missed increment in the friction log without blocking. The sync-harness step is best-effort (|| true) — if it fails (e.g. no git or no sync-harness.sh), the increment was still written; the drift will be caught by the next npm test.
Friction reminder: After incrementing, print the current friction log size.
Substitute tunables.friction_warn_threshold for THRESHOLD before running:
# THRESHOLD = tunables.friction_warn_threshold (default 10)
FRICTION_COUNT=$(awk 'END{print NR}' skills-meta/friction.jsonl 2>/dev/null || echo 0)
echo "💡 Friction log: ${FRICTION_COUNT} entries."
[ "$FRICTION_COUNT" -gt "THRESHOLD" ] && echo "⚠️ Consider running /roster-skill-health to surface improvement proposals."
| Condition | Action |
|---|---|
| QA brief is not GO | Stop — do not ship; return to /roster-qa or /roster-implement |
| Pre-ship gate check reveals a new failure | Stop — re-run /roster-qa before retrying |
kb-update reports code contradicts KB spec | Log WARNING, do not revert — open a KB amendment follow-up task |
Primary path: Done — PR opened, awaiting human merge approval Alternatives:
/roster-intake — start the next task/roster-skill-health — good moment to analyze friction after a completed cycle💡 A completed ship is the best time to run
/roster-skill-healthand capture what the cycle taught you.
{
"date": "<ISO-8601>",
"skill": "roster-ship",
"task": "<task-slug>",
"frictions": [],
"methods": [],
"suggestion_type": null,
"suggestion": null,
"effort_estimate": null
}