turnfile-codex-collaboration
Skill9 starsChanged 5 months agoApache-2.0View on GitHub
Execute the Turnfile protocol workflow in Codex for mailbox lifecycle, payload-first review exchange, lock-safe shared-file updates, session close/resume, and Turnfile task/lock coordination. Use when the maintainer explicitly asks Codex to run a protocol module or produce an auditable protocol-conforming change.
In this repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- docs/llms.txtllms.txt
- turnfile-protocol-geminiSkill
- turnfile-protocol-claudeSkill
- turnfile-protocol-claudeSkill
- turnfile-codex-collaborationSkill
- turnfile-protocol-geminiSkill
- skill-provenanceSkill
- turnfile-<agent>-collaborationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
27 rules. About 0 are common, 18 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Run modules only on explicit maintainer instruction.
- Distinctive: line 12
Start in propose-only mode.
- Distinctive: line 13
Treat invocation as write permission only when maintainer explicitly includes apply intent (for example, "run and apply").
- Very specific: line 15
Keep all substantive actions audit-visible in working-session/MAILBOX.md, working-session/WORKLOG.md, or working-session/TURNFILE.yaml.
- Very specific: line 19
Read working-session/MAILBOX.md first for active-turn boundary checks.
- Distinctive: line 21
Do not declare turn complete if Codex unread count is non-zero.
- Very specific: line 24
Ensure Open Queue does not retain stale entries for threads Codex just resolved.
- Very specific: line 29
Read working-session/WORKLOG.md status block.
- Very specific: line 30
Read working-session/MAILBOX.md inbox snapshot + assigned unread cards.
- Distinctive: line 31
Read scope-specific protocol docs and PRDs.
- Very specific: line 32
Read working-session/OPEN_QUESTIONS.md when work affects unresolved or deferred items.
- Distinctive: line 36
After milestone/task completion, refresh coordination artifacts in the same turn:
- Very specific: line 40
After mailbox edits, regenerate working-session/MAILBOX.json.
- Distinctive: line 41
Keep skill metadata accurate when protocol state changes materially (module behavior, validation status, tooling dependencies).
- Distinctive: line 61
Stop if closure owner/decision authority is unclear.
- Distinctive: line 79
Stop if decision scope is ambiguous or contradictory.
- Very specific: line 90
Ask type (apply, apply-or-counter, ack-or-counter).
- Distinctive: line 97
Stop if payload cannot be tied to deterministic revision lineage.
- Distinctive: line 115
Stop if source docs conflict and no authoritative tie-break is available.
- Distinctive: line 130
No partial writes across related control-plane artifacts.
- Distinctive: line 135
Stop if lock ownership or revision check fails.
- Distinctive: line 154
Stop if closeout would hide unresolved high-priority items.
- Very specific: line 173
Stop if update would modify non-owned Turnfile sections.
- Distinctive: line 192
Stop if resolution authority is ambiguous.
- Distinctive: line 197
If helper tooling is unavailable, run manual equivalent steps and log the fallback.
- Distinctive: line 198
If schema or lint checks are unavailable, perform explicit structure checks and call out residual risk.
- Distinctive: line 199
If concurrent edits occur, re-read the target file before applying any write.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Turnfile Codex Collaboration
Run modules only on explicit maintainer instruction.
Execution Contract
- Start in propose-only mode.
- Treat invocation as write permission only when maintainer explicitly includes apply intent (for example, "run and apply").
- Require explicit maintainer confirmation before any file write if apply intent is absent.
- Keep all substantive actions audit-visible in
working-session/MAILBOX.md,working-session/WORKLOG.md, orworking-session/TURNFILE.yaml.
Active-Turn Boundary Discipline
- Read
working-session/MAILBOX.mdfirst for active-turn boundary checks. - Re-check
working-session/MAILBOX.mdbefore declaring completion. - Do not declare turn complete if Codex unread count is non-zero.
- Escalate with explicit blocker context when unread cannot be cleared in-turn.
- Close or explicitly defer Codex-owned actionable threads before turn completion.
- Ensure
Open Queuedoes not retain stale entries for threads Codex just resolved.
Startup Orientation Read Order
- Read
working-session/TURNFILE.yaml. - Read
working-session/WORKLOG.mdstatus block. - Read
working-session/MAILBOX.mdinbox snapshot + assigned unread cards. - Read scope-specific protocol docs and PRDs.
- Read
working-session/OPEN_QUESTIONS.mdwhen work affects unresolved or deferred items.
State Freshness Hooks
- After milestone/task completion, refresh coordination artifacts in the same turn:
working-session/WORKLOG.mdstatus blockworking-session/TURNFILE.yamltask metadata / signalworking-session/MAILBOX.mdlifecycle status when a thread changed
- After mailbox edits, regenerate
working-session/MAILBOX.json. - Keep skill metadata accurate when protocol state changes materially (module behavior, validation status, tooling dependencies).
Module Catalog
M-01 Mailbox Lifecycle + SLA
Trigger examples:
- "Run mailbox lifecycle for MSG-20260208-040."
- "Process unread Codex messages and apply."
Expected inputs:
- Target message IDs or inbox scope.
- Desired action (
acknowledged,actioned,closed).
Deterministic outputs:
- Updated message status and Ack/Reply lines in
working-session/MAILBOX.md. - Updated inbox/open-queue snapshot.
- Regenerated
working-session/MAILBOX.jsonwhen mailbox changed.
Stop/escalate:
- Stop if closure owner/decision authority is unclear.
- Escalate if status transition violates PRD-003 lifecycle.
M-02 Maintainer Decision Request/Reply
Trigger examples:
- "Prepare decision-required message for maintainer on PRD-012 scope."
- "Apply maintainer decision from MSG-####."
Expected inputs:
- Decision context and requested outcome.
- Priority and due cycle.
Deterministic outputs:
- Decision-required mailbox card with explicit ask and evidence references.
- WORKLOG decision index entry when decision is final/substantive.
Stop/escalate:
- Stop if decision scope is ambiguous or contradictory.
- Escalate if prior maintainer decisions conflict.
M-03 Payload-First Review Envelope
Trigger examples:
- "Prepare apply-or-counter payload for PRD-013."
- "Validate revision token and payload envelope."
Expected inputs:
- Target files and review scope (
full,critical-only,interface-only). - Ask type (
apply,apply-or-counter,ack-or-counter).
Deterministic outputs:
- Revision-tagged payload envelope with explicit file list.
- Mailbox update referencing payload and expected response mode.
Stop/escalate:
- Stop if payload cannot be tied to deterministic revision lineage.
- Escalate if envelope conflicts with PRD-008/009 requirements.
M-04 Cross-PRD Reconciliation
Trigger examples:
- "Run reconciliation for PRD-006/007/010 interfaces."
- "Reconcile interface deltas and propose cross-doc fixes."
Expected inputs:
- File set and interface boundaries.
- Decision evidence and delta acceptance criteria.
Deterministic outputs:
- Delta summary with required/recommended classifications.
- Mailbox evidence trail for review outcomes.
Stop/escalate:
- Stop if source docs conflict and no authoritative tie-break is available.
- Escalate unresolved contradictions with explicit options.
M-05 Shared-File Transaction Discipline
Trigger examples:
- "Apply shared-file-safe update to MAILBOX and WORKLOG."
- "Run lock-safe control-plane mutation."
Expected inputs:
- Target shared files.
- Intended mutation and invariant checks.
Deterministic outputs:
- Transactional update sequence aligned with PRD-010/013.
- No partial writes across related control-plane artifacts.
- Projection regeneration when required.
- Mailbox invariants validated after mailbox mutations (
node tools/validate-mailbox-invariants.mjs).
Stop/escalate:
- Stop if lock ownership or revision check fails.
- Escalate after bounded retry on unchanged coordination revision.
M-06 Session Close/Resume Snapshot
Trigger examples:
- "Prepare closeout handoff for session end."
- "Run startup resumption checklist."
Expected inputs:
- Session scope and carry-over anchors.
- Required compaction/cleanup expectations.
Deterministic outputs:
- Updated boot/worklog handoff sections.
- Clear carry-over + next-owner designation.
- Explicit unresolved blocker list if present.
Stop/escalate:
- Stop if closeout would hide unresolved high-priority items.
- Escalate when compaction or archival decisions require maintainer call.
M-07 Turnfile Coordination Read/Write
Trigger examples:
- "Claim P2-D task and signal readiness."
- "Update task status and release lock in Turnfile."
Expected inputs:
- Task ID, status transition, and signal intent.
- Coordination revision expectations.
Deterministic outputs:
- Turnfile updates respecting section ownership and revision progression.
- Task claim/completion metadata (
claim_rev,completed_rev, notes). - Coordination signal entry under
messages.
Stop/escalate:
- Stop if update would modify non-owned Turnfile sections.
- Escalate on repeated revision contention.
M-08 OQ Registry Operations (OQ-only lane)
Trigger examples:
- "Register OQ for PRD-016 threshold wording."
- "Resolve OQ-050 and sync references."
Expected inputs:
- OQ IDs or new-question prompt.
- Resolution evidence (maintainer decision, accepted payload, or cross-review outcome).
Deterministic outputs:
- Updated
working-session/OPEN_QUESTIONS.mdlifecycle state (active,deferred,resolved). - Referenced PRD OQ section updated with matching resolution text when authorized.
- Mailbox/WORKLOG linkage to the governing decision evidence.
Stop/escalate:
- Stop if resolution authority is ambiguous.
- Escalate when OQ resolution would alter required protocol semantics without maintainer decision.
Fallback Rules
- If helper tooling is unavailable, run manual equivalent steps and log the fallback.
- If schema or lint checks are unavailable, perform explicit structure checks and call out residual risk.
- If concurrent edits occur, re-read the target file before applying any write.
Output Format Requirements
- State module executed.
- State whether run mode was propose-only or apply-authorized.
- List changed files with exact paths.
- List verification commands and outcomes.
- List blockers and next owner.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

