بنقرة واحدة
state-mutation-locking
Durable state mutation and locking workflow.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Durable state mutation and locking workflow.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Iterative multi-round codebase audit with diminishing-returns detection. Run 5-20+ rounds, each focusing on one specific area. Built from 19 rounds of dogfooding pi-crew on itself.
Pi TUI crew widget data sources, display priority, and rendering performance.
Multi-phase orchestration for planners and executors.
Spawn 3 adversarial subagents (Skeptic, Pragmatist, Critic) to evaluate a decision, architecture choice, or plan. Anti-anchoring: each role receives ONLY the question, not conversation history. Aggregates votes into consensus recommendation with dissent tracking. Use when facing critical decisions, architecture choices, security tradeoffs, or plan reviews where single-perspective analysis is insufficient.
Background worker, heartbeat, stale-run, crash-recovery, and deadletter workflow. Use when debugging stuck/dead workers or changing async run reliability.
Child Pi worker spawning, lifecycle callbacks, and failure modes.
| name | state-mutation-locking |
| description | Durable state mutation and locking workflow. |
| origin | pi-crew |
| triggers | ["modify manifest","update tasks","stale reconciliation","cancel run","respond to task"] |
Use this skill before modifying pi-crew run state.
src/state/locks.ts — run-level sync/async lockssrc/state/state-store.ts — manifest/tasks persistencesrc/state/contracts.ts — allowed status transitionssrc/state/mailbox.ts, src/state/task-claims.ts, src/state/atomic-write.tssrc/runtime/crash-recovery.ts, src/runtime/stale-reconciler.ts, src/runtime/team-runner.tsmanifest.json, tasks.json, mailbox delivery state, claims, or recovery status must be protected by a run lock when concurrent actions are possible.atomicWriteJson, async variants, or state-store helpers). Do not partially write JSON files.Before mutating run state, verify:
If ANY answer is NO → Stop. Verify locking and atomicity before mutating.
tasks.json from a reconciler or watcher without a lock.fs.writeFileSync for JSON state outside atomic helpers.cd pi-crew
npx tsc --noEmit
node --experimental-strip-types --test test/unit/cancel-ownership.test.ts test/unit/respond-tool.test.ts test/unit/stale-reconciler.test.ts test/unit/api-claim.test.ts
npm test