ship-end
Wrap up the current session — update docs, commit, and push
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- ship-end
- type
- shipping
- version
- v0.11
- description
- Wrap up the current session — update docs, commit, and push
- argument-hint
- [--no-deploy] [--save-conversation] [--save-all-conversations]
- required_conventions
- [ "social-ledger" ]
03 SKILL.md 正文
Ship End
Wrap up the current session: mark progress, commit, and push. If $ARGUMENTS contains --save-conversation, save the current conversation to conversations/. If $ARGUMENTS contains --save-all-conversations, export all past conversations to conversations/.
Process
-
Check for changes:
- Run
git statusandgit diffto see all changes. - If the working tree is clean and no unpushed commits: report "nothing to ship" and stop.
- Run
-
Update task tracking:
- Update
tasks/todo.md— mark completed items as done, note any outstanding items or blockers. - Update milestone progress in
tasks/roadmap.mdif criteria were met. - Check
tasks/manual-todo.md(if it exists) — note the status of manual tasks (how many checked vs unchecked). Do NOT modify checked items. - Check
tasks/record-todo.mdandtasks/recurring-todo.mdif they exist — note unchecked advisory counts only. Do NOT treat them as blockers unless an item has been promoted intotasks/todo.md. - Update
tasks/history.md— append a brief record of what was accomplished this session (phase/step completed, key changes). Create it if it doesn't exist. - If
tasks/todo.md,tasks/roadmap.md,tasks/manual-todo.md,tasks/record-todo.md, ortasks/recurring-todo.mdchanged andscripts/audit-task-docs.mjsexists, runnode scripts/audit-task-docs.mjsand fix any failures before final next-work routing.
- Update
-
Deploy (skip if
--no-deploy): After shipping, deploy only when the project has an explicit manual deploy contract.- Check for deploy contract. Look for
deploy.mdortasks/deploy.md. - If neither file exists, skip deploy and report
Deploy skipped: no explicit manual deploy contract (deploy.md or tasks/deploy.md). - If a deploy contract exists, continue.
- Invoke
/deploy(release-ops pack) targeting the default environment (staging). - Pass the deploy contract context to
/deploy. - Skip ledger recording and staleness reporting — those are for standalone
/deployinvocations only. - If
/deploy(release-ops pack) reports failure, report the error. Do not retry.
- Check for deploy contract. Look for
-
Save conversation (skip if
--save-conversationand--save-all-conversationsboth absent):- Run
scripts/save-conversation.shto export the current Claude Code conversation as a markdown file inconversations/. If the script is not found or fails (e.g., not running in Claude Code, no local conversation history), warn and continue — do not block shipping. Include the generated file in the shipping boundary. - If
$ARGUMENTScontains--save-all-conversations, runscripts/save-conversation.sh --allinstead.
- Run
-
Ship the session changes:
- Use the
/commit-and-push-by-featureworkflow: group changes into logical feature/function buckets, use conventional commit messages, land the resulting commits onmainormaster, and push them there when the workflow succeeds. - Pack install artifact boundary: Treat
.agents/project.jsonas the committed project designation. When pack configuration changed, include.agents/project.jsonin the shipping boundary. Treat.claude/skills/**and.codex/skills/**as generated local skill roots recreated byscripts/pack.sh refresh; generated skill roots must not be staged or committed. If those roots are untracked, leave them uncommitted and report them as generated local artifacts. If any path under those roots is already tracked or modified as a tracked file, stop unless the current task explicitly includes repository hygiene to untrack or ignore generated skill roots.
- Use the
-
Report session summary:
- What was accomplished
- Deploy status (if deployed)
- Test status — explicitly state whether any failing tests are expected (red phase: tests written before implementation) or unexpected (regressions/bugs that need fixing)
- What's outstanding
- Branch and commit list
- Confirm working tree is clean
-
BIP post suggestions (advisory; never blocks wrap-up — run after the summary, even if shipping reported nothing):
- Read
.agents/project.json. - If
alignment.build_in_public === true, skip only the enablement question, then run the enabled BIP post-suggestion path below. Do not report only that the BIP gate was skipped. - Else if
alignment.bip_prompt_dismissed === true, skip both enablement and post suggestions. - Otherwise ask the user once, concisely — explain that Build-In-Public mode generates source-safe social posts from your alignment pages and shipped work, and ask whether to enable it for this project.
- On yes: run
scripts/pack.sh set-bip on(ornpx skillpacks set-bip on) andscripts/pack.sh set-bip-prompt dismiss(or thenpxequivalent). Then run the enabled BIP post-suggestion path for this shipped session. - On no: run
scripts/pack.sh set-bip-prompt dismiss(or thenpxequivalent). Do not ask again. - Enabled BIP post-suggestion path: inspect the shipped boundary from the session summary, changed files, commits, task/history notes, and any alignment pages. Read
.agents/project.json.alignment.bip_platformsonly as optional priority/ranking metadata. Do not ask a project-platform setup question and do not use saved platforms as a filter. Load the shared social routers and every bundled text/community and video channel convention. - Infer
bip_phaseas exactly one ofresearch,prototyping, orimplementationfrom the shipped boundary. Followingdocs/social-ledger-convention.mdplus every bundled channel convention, draft an exhaustive phase-aware batch of source-safe Build-In-Public post candidates for every bundled channel, or state that there is no safe public angle for this wrap-up. Mark top-ranked options clearly and keep rejected/not-now options visible when useful for dedupe or future context. For each candidate, include target channel, optional priority rank from savedalignment.bip_platforms,bip_phase, angle, source basis, loaded convention path, risk level, claim-safety notes, publish precheck, and draft post text or a concise video/community-post outline. - Write the batch to the single HTML BIP page, not inline. Treat the successful ship as the equivalent of alignment-page confirmation and write the exhaustive per-channel batch to
alignment/bip-ship-end.html, following the shared post-confirmation BIP page shape: setdata-alignment-page-kind="bip",data-bip-generation="post-confirmation",data-bip-source-skill="ship-end", anddata-alignment-status="confirmed"on<html>; cover every bundled text/community and video channel; include the recommendation-notes, source-basis, claim-safety-notes, risk-level, publish-precheck, and loaded-convention-path fields with the recommended/not-now/rejected statuses; add the responsive viewport meta and the Brief Me TTS include before</body>; and use no embeds or active approval gates. Ifalignment/bip-ship-end.htmlalready exists, archive it first todocs/history/archive/YYYY-MM-DD/HHMMSS/alignment/bip-ship-end.html. Include the page inalignment/index.html(with today's date), run the TTS inject step, and attempt to open it after wrap-up. Print a one-line terminal pointer to the file instead of dumping candidates inline. Do not publish externally or write social-ledger records without later explicit approval.
- Read
Output
## Session Summary
- **Accomplished**: [what was done]
- **Deploy**: [status]
- **Tests**: [pass/fail — expected or unexpected]
- **Manual tasks**: [X/Y complete, or "none"]
- **Advisory tasks**: [record/recurring counts, or "none"]
- **Outstanding**: [remaining work]
- **Branch**: [branch name]
- **Commits**: [list]
- **Working tree**: clean
- **Next work:** [specific task, blocker, verification gap, or "none"]
- **Recommended next command:** [one command or route]
Next-Step Routing
Before closing out the session, identify the next concrete work item from project state, then recommend the executor and invocation.
Output exactly two lines beyond the normal session summary:
- Next work: <specific task name, manual blocker, verification gap, or "none">
- Recommended next command: <one command or route>
Rules:
- Make the next work item primary. Derive it from
tasks/todo.md,tasks/manual-todo.md, deploy status, validation gaps, smoke-test gaps, outstanding session work, or the absence of any remaining work. Do not use agent mode itself as the next work item. - Treat
tasks/todo.mdas the only executable current-task surface. Historical roadmap entries and unchecked advisory/manual/record/recurring items are reconciliation candidates, not next executable work, unless the current active todo section explicitly promotes them. - Use
./scripts/agent-mode.shonly to choose command text. If it is missing, unset, or non-zero, infer routing from the current invocation and task type instead of asking the user to select a mode by default. - Prefer an owning workflow/domain route over execution-loop defaults. If the next work item names a research, alignment, design, UI, UX, prototype-test, or copy-audit artifact or review page, recommend the specific owning skill, required user review, or compiled-YAML step directly. Use
/execonly when no narrower installed skill, artifact contract, or review route owns the next action. - Inference defaults:
- Hybrid execution handoff → check
.agents/project.json.enabled_packsforagent-bridge— ifagent-bridgeis not enabled, recommendnpx skillpacks install agent-bridgefrom the project shell first; ifagent-bridgeis enabled, recommend/delegate $exec. - Claude-only or orchestration-heavy work → after applying owning-route precedence above, recommend
/exec. - Codex-only execution → after applying owning-route precedence above, recommend
$exec. - External human-only manual work (browser/auth/DNS/service dashboard work with no reliable authenticated CLI/API path, paid account setup, real-device checks, or production smoke-test work needing human sign-off) → check
.agents/project.json.enabled_packsforguided-walkthrough— ifguided-walkthroughis not enabled, recommendnpx skillpacks install guided-walkthroughfrom the project shell first; ifguided-walkthroughis enabled, recommend/guide— or a Claude-guided manual step rather than/exec. - Agent-executable work misfiled in
tasks/manual-todo.md, task-doc bookkeeping, staletasks/manual-todo.mdcleanup, or reconciliation against repo/history reality → check.agents/project.json.enabled_packsfordocs-health— ifdocs-healthis not enabled, recommendnpx skillpacks install docs-healthfrom the project shell first; ifdocs-healthis enabled, recommend/reconcile-dev-docs fix tasks— promotion totasks/todo.md, or a direct dev-doc audit, not/guide.
- Hybrid execution handoff → check
- Only present multiple commands when the ambiguity materially changes execution safety or there are equally valid next work items. Otherwise choose the best route and mention degraded mode lookup inline.
Constraints
- When recommending a skill from another pack, verify the pack is installed via
.agents/project.jsonenabled_packs. If not installed, includenpx skillpacks install <pack-name>from the project shell as the prerequisite. - Fix unrelated issues: If any step surfaces errors, warnings, or lint issues — even ones unrelated to the current work — investigate and fix them before continuing. Commit these fixes separately with a descriptive message.
- Do NOT modify CLAUDE.md. CLAUDE.md is for project conventions and config only — not progress tracking.
- Progress and active work go in
tasks/todo.md. Completed work history goes intasks/history.md. - Do not execute or block wrap-up on
tasks/record-todo.mdortasks/recurring-todo.mditems unless they were explicitly promoted intotasks/todo.md. - When task docs changed, do not finish with a next-work recommendation until
node scripts/audit-task-docs.mjspasses, if that script exists. - Do not switch branches or create new branches unless the current state requires it.
- Do not amend or rewrite history.
- Do not commit secrets.
- Do not push session-wrap-up commits to an existing feature branch. Use
/commit-and-push-by-featureto move the work ontomainormasterand push it there, or stop and report a blocker if that cannot be done safely. - If pre-commit hooks fail, fix and retry.
- Never use GitHub Actions for deployment. Only use manual deploy scripts, Makefiles, or CLI commands.
- Never deploy to production without explicit user confirmation.
Default Shipping Contract
Follow the shared shipping contract convention in CLAUDE.md.
04 同仓库更多 Skills
source-checkout-allowed
Valid source-checkout-only fixture.
deck-install-valid
Valid deck install fixture.
codex-pack-guard-valid
Valid Codex Pack Availability Guard fixture.
codex-missing-skill-valid
Valid Codex missing skill fallback fixture.
codex-base-skill-fallback-valid
Valid Codex base skill fallback fixture.
claude-pack-guard-valid
Valid Claude Pack Availability Guard fixture.