shipwright-state
Per-worktree Shipwright state read and write contract. Use when resuming /sw-ship phases or reading runDir and phase status across worktrees. Resolves gitdir state; does not merge branches.
- License 许可
- MIT
- 最近更新
- 2026-11-03
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- shipwright-state
- description
- Per-worktree Shipwright state read and write contract. Use when resuming /sw-ship phases or reading runDir and phase status across worktrees. Resolves gitdir state; does not merge branches.
03 SKILL.md 正文
Per-worktree Shipwright state
Phase context lives in the worktree gitdir, not a shared repo-global file.
Model tier: cheap — resolve via python3 scripts/sw_bootstrap.py resolve-model-tier.py -- --skill shipwright-state. When using the Task tool for subagent dispatch, resolve concrete model IDs from models.tiers in config (never semantic tier names in subagent model: frontmatter).
Location
| Checkout | State path |
|---|---|
| Linked worktree | .git/worktrees/<name>/shipwright.json (via git rev-parse --git-dir) |
| Main / bare | <git-dir>/shipwright.json |
Resolve with:
python3 scripts/shipwright-state.py path
Fields
| Field | Purpose |
|---|---|
parentBranch |
Real parent for diffs and PR base |
currentBranch |
Active phase branch |
phaseSlug |
Short phase identifier |
branchPrefix |
feat / fix / docs / … |
startedAt |
ISO timestamp |
issueNumbers |
Optional GitHub issues |
lastCommand |
Ship resume point |
phaseStatus |
running / blocked / green |
iteration |
Stabilize/ship iteration counter |
shipStartedAt |
Orchestrator start |
tier |
Work tier (quick/standard/heavy) |
workstream |
e.g. implementation |
scaffold |
Port/DB/deps from /sw-worktree |
worktreeName / worktreePath |
Provisioning metadata |
deliverIssueBatch |
045 R74 — active deliver issue-batch journal path (under run dir) |
deliverRunId |
045 R70 — original runId for batch resume (inherited on resume, never rotated) |
Deliver issue-batch journal (PRD 045 R74/R70)
Multi-issue annotation and close operations persist an append-only journal under the phase run dir
(.cursor/sw-deliver-runs/<phase>/issue-batch-journal.json). Journal states mirror PRD 044 migration journal
(pending → annotated → closed | skipped | failed). Partial API failure →
deliver-aborted-inconsistent halt; resume inherits the original deliverRunId and upserts annotations
by deterministic marker hash (no duplicates).
python3 scripts/shipwright-state.py read # inspect deliverIssueBatch + deliverRunId
Never commit journal files — they live under .cursor/sw-deliver-runs/ (excluded by /sw-commit).
Operations
python3 scripts/shipwright-state.py read
python3 scripts/shipwright-state.py write '{"phaseSlug":"auth-api","parentBranch":"main"}'
python3 scripts/shipwright-state.py index # read-only aggregate — never write a shared index file
Guardrails
- Commands read/write state only through this contract.
- Never commit
shipwright.jsonor memory-sync markers. - Two worktrees must never share or overwrite each other's state file.
Phase-mode deliver runs persist status under .cursor/sw-deliver-runs/<phase-slug>/status.json with merge-ready-green or blocked verdicts (PRD 046 phase ship).
04 同仓库更多 Skills
wrong-name
Missing use when phrase and wrong directory name for critical lint failure.
demo-skill
Demo workflow pack skill fixture. Use when validating workflow-pack-sdk golden paths in CI.
good-skill
Validates Agent Skills spec conformance for fixture trees. Use when testing skills-spec-guard pass paths across core and dist mirrors. Does not ship production skills.
wrong-name
Fixture with name/dir mismatch for guard failure tests. Use when verifying skills-spec-guard rejects invalid identity. Does not ship production skills.
bad-description
Missing the required when trigger phrase in this fixture skill.
dropin-demo
暂无简介