一键导入
specsafe
Slice lifecycle CLI for SpecSafe — begin, end, and inspect the open slice in `.pi/.specsafe-state.json`.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Slice lifecycle CLI for SpecSafe — begin, end, and inspect the open slice in `.pi/.specsafe-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 cross-source consistency checker. Surfaces drift between Linear issue state, SpecSafe slice files, and commit Spec-Slice trailers. No mutations, no network writes.
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-only pre-flight verifier. Checks Linear, gh, omp, agent symlinks, and SpecSafe state-file integrity before a dogfood session. No mutations, no --i-approve gate.
This skill should be used when the user asks to add, update, or review evaluation coverage for agent behavior, LLM workflows, SpecSafe slices, harness prompts, or evalfly suites; when a PR changes agent instructions, slash commands, skills, schemas, or workflow-critical behavior; or when asked whether an eval is required.
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/.specsafe-state.json`. |
Manages the SpecSafe slice lifecycle by mutating .pi/.specsafe-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/.specsafe-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 initializes but does not mutate the cost counter; external memory accounting is not included in this public bundle.