ワンクリックで
doc-sync
Use when syncing Ship Flow plugin documentation after stage skill, invariant, workflow, shell primitive, or release changes.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when syncing Ship Flow plugin documentation after stage skill, invariant, workflow, shell primitive, or release changes.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when writing a ship-flow plan for a shaped entity, especially implementation tasks, TDD needs, runtime commands, or scope anchoring. Layer A delegation: superpowers:writing-plans owns plan authoring; ship-flow:test-driven-development owns fallback TDD contracts.
Use when shaping vague, complex, or ambiguous ship-flow requests into a Shape Up pitch, including `/shape`, discussion, or skill-authoring work.
Use when shape finds UI, domain, contract, interface, visual ambiguity, affects_ui, design_required, or no design reference before plan.
Use when ship-flow needs execute-stage implementation from an approved plan, including wave tasks, blocked work, or PR feedback re-entry. Layer A delegation: superpowers:subagent-driven-development owns wave dispatch discipline.
Use when `/ship` should run ship-flow for an entity id or good-enough raw requirement; vague inputs need shape clarification.
Use when verify passed and ship-flow needs review, PR readiness, PR body drafting, or canonical docs sync. Layer A delegation: pr-review-toolkit:review-pr owns PR review persona philosophy.
| name | doc-sync |
| description | Use when syncing Ship Flow plugin documentation after stage skill, invariant, workflow, shell primitive, or release changes. |
| user-invocable | true |
| argument-hint | [--check] [--auto] [--section <doc-file>] [--diff <ref>] [--probe-only] |
Keep Ship Flow plugin documentation aligned with stage skills, shell primitives, invariants, workflow templates, and release expectations. Docs conform to source behavior; when docs and source disagree, update docs or block release rather than changing implementation from this skill.
Resolve PLUGIN_ROOT before reading or scanning any files. Prefer ${CLAUDE_PLUGIN_ROOT} when present, then a runtime-provided Codex plugin root when available, then infer from this skill file by walking up from skills/doc-sync/SKILL.md to the plugin root. Installed plugin contexts resolve directly to the plugin cache/root.
All source globs, doc targets, and reference paths below are relative to PLUGIN_ROOT. Read references/doc-sync-context.md before scanning. It defines the Source Map, Doc Structure, Style Guide, Probe Config, and Post-Sync Hooks for this plugin.
| Input | Route |
|---|---|
| bare invocation | Full Sync |
--check | Report Only; never write files |
--auto | Full Sync without confirmation prompts |
--section <doc-file> | Targeted Sync for one doc target |
--diff <ref> | Use explicit diff base instead of latest ship-flow-v* tag |
--probe-only | Probe existing docs only; no inventory writes |
If no doc-probe worker is available, run Light Mode: static scan, history enrichment, report metrics, and probes skipped: no doc-probe scaffold.
Find the diff base before inventory:
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-${CODEX_PLUGIN_ROOT:-}}"
# If still empty, infer from this skill path or the current checkout before scanning.
DIFF_BASE=$(git -C "$PLUGIN_ROOT" tag -l "ship-flow-v*" --sort=-v:refname | head -1)
# If --diff <ref> is present, use that ref instead.
# If no tags exist, use HEAD~10 and warn that older changes may be missed.
Extract added lines from release-relevant source surfaces:
git -C "$PLUGIN_ROOT" diff "${DIFF_BASE:-HEAD~10}"..HEAD -- \
'skills/*/SKILL.md' \
'skills/architecture-lens/*.md' \
'bin/*.sh' \
'lib/*.sh' \
'hooks/*' \
'references/**/*' \
'registry/*.yaml' \
'workflow-template.yaml' \
'README.md' \
'INVARIANTS.md' \
'.claude-plugin/plugin.json' \
| grep '^+' | grep -v '^+++' | sed 's/^+//'
Group added lines by source file and cap the diff summary at 2000 characters.
references/doc-sync-context.md from PLUGIN_ROOT.skills/*/SKILL.md: skill name, description, routing, flags, stage artifacts, FO bridges, safety gates.skills/architecture-lens/*.md: domain lens triggers and routing implications.bin/*.sh and lib/*.sh: CLI contracts, flags, artifact writers, validators, sync primitives.hooks/*: hook event types, matchers, warning behavior.references/**/*, registry/*.yaml, and workflow-template.yaml: schema and workflow defaults.CONTRIBUTING.md, _mods/contribution-contract.md, and references/doc-coupling-map.yaml: bidirectional contribution edges, scoped exemptions, and FO/CI enforcement.README.md and INVARIANTS.md: canonical rationale and grep-enforced rules.doc-to-source is absent, never accept an exemption outside that row's exemptGlobs or scoped declaration, and require the exact standalone contract-migration: <row> — <reason> before removing a base row, direction, or source/doc glob, or adding/broadening an exemption. Removing an exemption strengthens the contract and does not require migration.--section is used. Any discovered source file without a Source Map row is a Critical gap.--check, stop after report generation and exit non-zero when Critical gaps exist.Check available memory sources independently:
accuracy_risk.Do not fail the sync because MCP history is unavailable.
Skip this phase for --check and --probe-only.
Unless --auto, present Critical and Warning gaps first and ask which to address. For each approved gap:
yes.ship-flow:doc-sync --check before publishing. Critical gaps block release until fixed or reported as an intentional blocked release.Skip probes in --check unless the captain explicitly asks for probe evidence.
For Full Sync and --probe-only:
--probe-only.bash <script> --help, bash bin/check-invariants.sh --help, cat, grep, rg, ls, git diff --name-only, and shell tests that operate only on bundled fixtures.rm, delete, push, --force, reset, drop, truncate, >, git checkout --, mv, chmod, chown, branch mutation, publish, release, archive mutation, or adopter-project writes.unsafe probe command filtered.Skip this phase for --check and --probe-only.
Compare inventory to doc-sync-context.md:
last_sync and version metadata in the reference file when a write occurred.Always report:
| Metric | Value |
|---|---|
| Gaps found | N |
| Gaps fixed | N |
| Critical gaps remaining | N |
| Accuracy risks found | N |
| Probes run | N |
| Probe pass rate | N% |
| Docs created | N |
| Docs updated | N |
| Reference self-updated | yes/no |
| Release gate | pass / blocked |
Release rule: before publishing Ship Flow, run ship-flow:doc-sync --check. If Critical gaps remain, the release is blocked unless the release report names the gap, owner, and explicit reason it is deferred.
--check and --probe-only are report-only.