一键导入
specsafe
Slice lifecycle CLI for SpecSafe — begin, end, and inspect the open slice in `.pi/.honcho-state.json`.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Slice lifecycle CLI for SpecSafe — begin, end, and inspect the open slice in `.pi/.honcho-state.json`.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Initialize a foreign project to use the pi-seshat system. Symlinks .omp/, drops AGENTS.md and CLAUDE.md templates, scaffolds specs/ and .pi/, updates .gitignore. Dry-run by default; --i-approve gates all mutations.
Read-only pre-flight verifier. Checks Honcho/Linear/gh/omp connectivity, agent symlinks, and state-file integrity before a dogfood session. No mutations, no --i-approve gate.
Fetch, cache, and expose the latest official documentation for registered libraries, SDKs, and APIs. Turns Luci's "always check latest official docs" rule from prose into an executable contract.
Fetch, cache, and expose the latest official documentation for registered libraries, SDKs, and APIs. Turns Luci's "always check latest official docs" rule from prose into an executable contract.
Propose-review-apply flow for BMad artifacts (PRDs, UX specs, architecture, briefs). All applies require --i-approve and produce commits with Proposed-By/Approved-By trailers.
Read and draft-mutate GitHub PRs, issues, and API endpoints via gh(1). All mutations require --i-approve. PR creation enforces a Linear-state invariant and is logged to .pi/.github-log.jsonl.
| name | specsafe |
| description | Slice lifecycle CLI for SpecSafe — begin, end, and inspect the open slice in `.pi/.honcho-state.json`. |
Manages the SpecSafe slice lifecycle by mutating .pi/.honcho-state.json in the current working directory. State-file shape is identical to the vanilla-Pi .pi/extensions/specsafe-session extension; types are imported from .omp/hooks/specsafe-session so drift is caught by tsc.
Open a new slice. Fails with exit 1 if a slice is already open.
bun run .omp/skills/specsafe/bin/specsafe.ts begin SPEC-20260427-009 ws-abc sess-123
Writes currentSlice with a freshly zeroed costCounter and beganAt set to new Date().toISOString(). History is preserved.
Archive the open slice into history with the given outcome and clear currentSlice. Fails with exit 1 if no slice is open. Outcome must be exactly one of PASS, FAIL, ABANDONED.
bun run .omp/skills/specsafe/bin/specsafe.ts end PASS
The archived HistoryEntry.costSummary is a by-value copy of the slice's costCounter at end-time.
Print whether a slice is open and the number of history entries.
bun run .omp/skills/specsafe/bin/specsafe.ts status
Output is one of:
OPEN: <slice-id>
<n> history entries
no slice open
<n> history entries
.pi/.honcho-state.json (resolved via statePathFor(process.cwd())).0600, enforced after every write.<path>.tmp-<pid>-<ts> + renameSync + explicit chmodSync.<path>.corrupt-<timestamp> (via readStateFileOrNull); the CLI then proceeds as if state were empty.| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Lifecycle violation (begin while open, end while closed) |
| 2 | Usage error (missing/unknown subcommand or argument) |
This CLI is the Oh My Pi counterpart to the vanilla-Pi specsafe_begin/specsafe_end/specsafe_status ExtensionAPI tools registered by .pi/extensions/specsafe-session/index.ts. Both writers target the same on-disk state file so an operator can switch between runtimes within a single slice. The CLI does not mutate the cost counter — that is the honcho tool's responsibility (see bumpHonchoCallCounter in .pi/extensions/honcho).