turnfile-protocol-claude
Skill9 starsChanged 6 months agoApache-2.0View on GitHub
Execute the Turnfile protocol (a SNAP protocol) in Claude for mailbox lifecycle, payload-first review, lock-safe shared-file updates, session start/close, Turnfile task/lock coordination, and OQ management. Use when the maintainer explicitly asks Claude 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-codex-collaborationSkill
- 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
82 rules. About 0 are common, 46 are distinctive, and 36 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈46
Distinctive · estimate
This author's own choices. Worth a look.
36
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Run modules only on explicit maintainer instruction.
- Distinctive: line 23
Start in propose-only mode.
- Distinctive: line 24
Treat invocation as write permission only when maintainer explicitly includes apply intent (e.g., "run and apply").
- Very specific: line 26
Keep all substantive actions audit-visible in working-session/MAILBOX.md, working-session/WORKLOG.md, or working-session/TURNFILE.yaml.
- Very specific: line 32
Read working-session/MAILBOX.md inbox snapshot first on every active turn.
- Distinctive: line 34
Do not declare turn complete if Claude unread count is non-zero.
- Distinctive: line 35
If unread cannot be cleared in-turn, keep turn open and escalate to maintainer with explicit blocker context.
- Distinctive: line 37
Verify open queue does not retain stale entries for threads Claude just resolved.
- Very specific: line 41
Read working-session/boot-claude.md — orientation, directory layout, current state.
- Very specific: line 42
Read working-session/TURNFILE.yaml — coordination state: phase, tasks, locks, agent status, signals.
- Very specific: line 43
Read working-session/WORKLOG.md status block (lines 1–11).
- Very specific: line 44
Read working-session/MAILBOX.md inbox snapshot + unread messages addressed to Claude.
- Very specific: line 45
Read working-session/OPEN_QUESTIONS.md — Active + Deferred sections only.
- Very specific: line 46
Read working-session/chat-claude.md — session close snapshot from predecessor (bottom of file).
- Distinctive: line 47
Read any files relevant to the current task (listed in snapshot "files to read on resume").
- Distinctive: line 51
After any milestone completion, task status change, or substantive protocol action, refresh coordination artifacts in the same turn:
- Very specific: line 56
After mailbox edits, regenerate working-session/MAILBOX.json.
- Distinctive: line 57
After skill file changes that affect protocol coverage or validation status, update the Versioning table.
- Very specific: line 71
Check if working-session/TURNFILE.yaml exists.
- Distinctive: line 72
If it exists → skip to Module 1 (Session Start).
- Distinctive: line 73
If it does not exist → continue with cold-start bootstrap below.
- Very specific: line 86
Add claude under agents with status: "active", session_id: "claude-session-<N>".
- Distinctive: line 91
Add Session 0 entry documenting the bootstrap.
- Distinctive: line 93
Add agent rows to Inbox Snapshot (Claude, Codex, Maintainer — all unread=0).
- Very specific: line 95
Verify skills/claude-opus_4.6/SKILL.md is readable and frontmatter parses.
- Very specific: line 96
Verify skills/skill-versioning/MANIFEST.yaml exists and file hashes match actual files.
- Distinctive: line 97
If preflight fails, escalate to maintainer before proceeding.
- Distinctive: line 102
Escalation: If templates are missing or corrupt, escalate to maintainer immediately.
- Very specific: line 117
If MAILBOX.json exists and is fresh, may use it for quick state check instead of full markdown parse.
- Very specific: line 118
After reads, update Turnfile:
- Very specific: line 122
Check turn_queue for pending work assigned to Claude.
- Very specific: line 123
Check locks for stale revision leases to clean up: (coordination.revision - acquired_rev) > lease_revs.
- Very specific: line 128
Escalation: If boot file or Turnfile is missing/corrupt, escalate to maintainer immediately.
- Very specific: line 142
Read working-session/MAILBOX.md (re-read immediately before any edit).
- Distinctive: line 151
Update inbox snapshot counts atomically with the status change (every message post or status transition must leave the snapshot consistent).
- Distinctive: line 152
Update open queue: add newly posted messages, remove actioned/closed messages.
- Very specific: line 153
Consistency self-check: Before writing, verify that snapshot counts match the actual unread message states in Active Messages.
- Distinctive: line 165
If a message exceeds its SLA window without acknowledgment, escalate to maintainer per PRD-003 R4 steps 1-4 (detection → WORKLOG escalation …
- Very specific: line 170
Escalation: If a message requires a decision Claude cannot make, post a decision-required message to the maintainer per PRD-004.
- Distinctive: line 212
Read the target document in full.
- Distinctive: line 214
Required [P1]: Must fix before acceptance.
- Distinctive: line 215
Recommended [P2]: Should fix, non-blocking.
- Distinctive: line 216
Note [informational]: No action needed, flagged for awareness.
- Distinctive: line 222
When response comes back:
- Very specific: line 223
If apply: verify changes were applied correctly.
- Very specific: line 224
If counter: assess counter-proposal, accept or re-counter.
- Distinctive: line 228
When reconciling cross-PRD interfaces, check for contradictory source-of-truth rules.
- Distinctive: line 230
Update OQ registry if new questions surface.
- Distinctive: line 234
Escalation: If review finds a blocking contradiction between PRDs, escalate to maintainer with both PRD references and the specific …
- Very specific: line 250
Check no conflicting lock exists in locks section for target files.
- Distinctive: line 251
Write new lock entry:
- Distinctive: line 261
If verification fails: remove lock entry, yield, retry.
- Distinctive: line 266
Run invariant checks if applicable.
- Very specific: line 267
If mailbox was mutated, regenerate MAILBOX.json in same transaction cycle.
- Very specific: line 270
Remove lock entry from TURNFILE.yaml.
- Very specific: line 274
If coordination.revision is unchanged across two consecutive lock-check attempts and Claude remains blocked: post blocked signal in …
- Distinctive: line 275
No indefinite spin-wait. Maintainer adjudicates via override (PRD-013 R4).
- Distinctive: line 299
Update status block (lines 1–11) with current state.
- Distinctive: line 300
Add session entry with handoff block.
- Distinctive: line 303
Remove any locks Claude holds.
- Very specific: line 304
Update completed tasks to status: done.
- Very specific: line 305
Remove Claude entries from turn_queue.
- Distinctive: line 326
Do not auto-push. Push only when maintainer directs.
- Distinctive: line 331
Escalation: If unable to reach unread = 0, do not close session.
- Very specific: line 349
If two agents claim simultaneously: lower claim_rev wins.
- Very specific: line 354
Update notes with outcome summary.
- Distinctive: line 366
Always read before write.
- Very specific: line 369
Update Last modified revision header comment.
- Distinctive: line 402
Add to Active section with: ID, PRD reference, question text, proposed owner.
- Distinctive: line 406
Update the source PRD's OQ section with resolution.
- Distinctive: line 409
Ensure WORKLOG records any OQ state changes.
- Very specific: line 419
If helper tooling is unavailable (e.g., export-mailbox-json.mjs fails), run manual equivalent steps and log the fallback.
- Distinctive: line 420
If schema or lint checks are unavailable, perform explicit structure checks and call out residual risk.
- Distinctive: line 421
If concurrent edits occur, re-read the target file before applying any write.
- Distinctive: line 425
After executing any module, report:
- Distinctive: line 439
If approaching context limits, prioritize session close (Module 6) over continuing work.
- Very specific: line 440
Use MAILBOX.json for quick state checks instead of parsing full MAILBOX.md when possible.
- Distinctive: line 443
Read files with the Read tool.
- Very specific: line 445
Use Bash for git operations, running scripts (e.g., node tools/export-mailbox-json.mjs), and directory listings.
- Distinctive: line 446
Use Grep for content searches, Glob for file pattern matching.
- Very specific: line 449
All actions must be audit-visible in mailbox, worklog, or Turnfile.
- Distinctive: line 450
No hidden channels or private state.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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 Protocol Skill File — Claude
Version: 0.3.0 Protocol revision baseline: PRD-003 through PRD-014 (all promoted to docs/prds/) Agent: Claude (Anthropic) Last updated: 2026-02-11
How to use this file
This is Claude's complete protocol execution guide. It encodes the Turnfile protocol (a SNAP protocol) as operational instructions for Claude's environment (tool-use patterns, context window management, chat-integrated output).
Run modules only on explicit maintainer instruction. (PRD-012 R3)
Execution Contract
- Start in propose-only mode.
- Treat invocation as write permission only when maintainer explicitly includes apply intent (e.g., "run and apply").
- Require explicit maintainer confirmation before any file write if apply intent is absent. (PRD-012 R5.1)
- Keep all substantive actions audit-visible in
working-session/MAILBOX.md,working-session/WORKLOG.md, orworking-session/TURNFILE.yaml. (PRD-012 R5.2)
Active-Turn Boundary Discipline (PRD-012 R2.2)
Note: this is the active-turn boundary check (mailbox-first). It is distinct from the startup orientation read order (Turnfile-first) defined above. See H-002 for the rationale.
- Read
working-session/MAILBOX.mdinbox snapshot first on every active turn. - Re-check
working-session/MAILBOX.mdbefore declaring turn complete. - Do not declare turn complete if Claude unread count is non-zero.
- If unread cannot be cleared in-turn, keep turn open and escalate to maintainer with explicit blocker context.
- Close or explicitly defer Claude-owned actionable threads before turn completion.
- Verify open queue does not retain stale entries for threads Claude just resolved.
Startup Orientation Read Order (PRD-011 R3 + PRD-013 R5.1)
- Read
working-session/boot-claude.md— orientation, directory layout, current state. - Read
working-session/TURNFILE.yaml— coordination state: phase, tasks, locks, agent status, signals. - Read
working-session/WORKLOG.mdstatus block (lines 1–11). - Read
working-session/MAILBOX.mdinbox snapshot + unread messages addressed to Claude. - Read
working-session/OPEN_QUESTIONS.md— Active + Deferred sections only. - Read
working-session/chat-claude.md— session close snapshot from predecessor (bottom of file). - Read any files relevant to the current task (listed in snapshot "files to read on resume").
State Freshness Hooks
After any milestone completion, task status change, or substantive protocol action, refresh coordination artifacts in the same turn:
working-session/WORKLOG.mdstatus block — update "Now Working" and "Next Review Checkpoint" lines.working-session/TURNFILE.yaml— update task metadata (status,completed_rev,notes) and post coordination signal.working-session/MAILBOX.md— update message lifecycle status, inbox snapshot, and open queue when a thread changed.- After mailbox edits, regenerate
working-session/MAILBOX.json. - After skill file changes that affect protocol coverage or validation status, update the Versioning table.
Module 0: Session Bootstrap (Cold Start)
Trigger examples:
- "Start a new working session on this branch."
- Agent reads
working-session/and finds no TURNFILE.yaml.
Inputs: None (detects cold start automatically).
Procedure:
- Check if
working-session/TURNFILE.yamlexists.- If it exists → skip to Module 1 (Session Start).
- If it does not exist → continue with cold-start bootstrap below.
- Copy all template files from
templates/working-session/intoworking-session/:TURNFILE.yaml,WORKLOG.md,MAILBOX.md,MAILBOX.json,MAILBOX_ARCHIVE.md,WORKLOG_ARCHIVE.md,OPEN_QUESTIONS.md
- Rename agent-generic files:
boot-agent.md→boot-claude.md(or use existing boot file if already present)chat-agent.md→chat-claude.md
- Fill
<PLACEHOLDER>values in all template files:<PROJECT_NAME>→Turnfile<project-name>→turnfile<maintainer-id>→snap<AGENT_NAME>→Claude<YYYY-MM-DD>→ current date
- Initialize TURNFILE.yaml agent section:
- Add
claudeunderagentswithstatus: "active",session_id: "claude-session-<N>". - Set
coordination.revision: 1. - Post initial signal:
SIG-001from claude, signalready, detail describing the bootstrap.
- Add
- Initialize WORKLOG.md:
- Fill status block with Claude active, awaiting maintainer direction.
- Add Session 0 entry documenting the bootstrap.
- Initialize MAILBOX.md:
- Add agent rows to Inbox Snapshot (Claude, Codex, Maintainer — all unread=0).
- Skills preflight (P-7):
- Verify
skills/claude-opus_4.6/SKILL.mdis readable and frontmatter parses. - Verify
skills/skill-versioning/MANIFEST.yamlexists and file hashes match actual files. - If preflight fails, escalate to maintainer before proceeding.
- Verify
- Report bootstrap complete to maintainer. Proceed to Module 1.
Outputs: Initialized working-session/ with all runtime artifacts. Status report.
Escalation: If templates are missing or corrupt, escalate to maintainer immediately. Do not attempt to create files from memory — templates are the source of truth.
Module 1: Session Start (PRD-011 R3 + PRD-013 R5.1)
Trigger examples:
- "Start session."
- "Resume from where we left off."
Inputs: None (reads from disk)
Procedure:
- Execute Startup Orientation Read Order (see above).
- If MAILBOX.json exists and is fresh, may use it for quick state check instead of full markdown parse.
- After reads, update Turnfile:
- Set
agents.claude.status: "active" - Set
agents.claude.session_id: "claude-session-<N>" - Set
agents.claude.last_seen: "claude-session-<N>" - Check
turn_queuefor pending work assigned to Claude. - Check
locksfor stale revision leases to clean up:(coordination.revision - acquired_rev) > lease_revs. - Increment
coordination.revision.
- Set
Outputs: Status report to maintainer summarizing: current phase/step, unread messages, active tasks, any stale locks found.
Escalation: If boot file or Turnfile is missing/corrupt, escalate to maintainer immediately.
Module 2: Mailbox Lifecycle (PRD-003 R1 + PRD-012 R2.2)
Trigger examples:
- "Check mailbox and process unread messages."
- "Handle MSG-20260208-042."
Inputs: Optional: specific MSG ID(s) to process.
Procedure:
- Read
working-session/MAILBOX.md(re-read immediately before any edit). - For each unread message addressed to Claude:
a. Read the full message body.
b. Determine appropriate status transition per PRD-003 R1 state machine:
unread → acknowledged: Claude has read and understood.unread → actioned: Claude reads and completes action in one step.acknowledged → actioned: Claude completes the requested action.acknowledged → blocked: Claude cannot act until dependency resolves. c. Only receiver (Claude) can ack/block/action. Only sender or maintainer can close.
- Update inbox snapshot counts atomically with the status change (every message post or status transition must leave the snapshot consistent).
- Update open queue: add newly posted messages, remove actioned/closed messages.
- Consistency self-check: Before writing, verify that snapshot counts match the actual unread message states in Active Messages. If mailbox invariant tooling exists (
tools/validate-mailbox-invariants.mjs), run it. - Regenerate MAILBOX.json:
node tools/export-mailbox-json.mjs working-session/MAILBOX.md working-session/MAILBOX.json
Turn-boundary discipline: See Active-Turn Boundary Discipline section above. Applies to all modules, not just mailbox.
SLA tiers (PRD-003 R2):
- P0: respond within next session turn.
- P1: respond within next session.
- P2: best effort.
- SLA is measured in session boundaries, not wall-clock time.
Stale message handling (PRD-003 R4):
- If a message exceeds its SLA window without acknowledgment, escalate to maintainer per PRD-003 R4 steps 1-4 (detection → WORKLOG escalation → maintainer notification → disposition).
- Claude does not auto-close stale messages.
Outputs: Updated MAILBOX.md, updated MAILBOX.json, status report of messages processed.
Escalation: If a message requires a decision Claude cannot make, post a decision-required message to the maintainer per PRD-004.
Module 3: Maintainer Decision Request (PRD-004)
Trigger examples:
- "Request decision from maintainer on PRD-012 scope."
- "Escalate this blocker to maintainer."
Inputs: The question or decision needed, relevant context, options if applicable.
Procedure:
- Compose a mailbox message to maintainer with:
- Type:
decision-required - Priority: appropriate tier (P0/P1/P2)
- Clear question with context
- Options if applicable (with trade-offs)
- Type:
- Post to MAILBOX.md following compact format.
- Record the decision request in WORKLOG with linkage to the MSG ID.
- When maintainer responds:
- Record the decision in WORKLOG decision index.
- Relay format for maintainer decisions:
> Maintainer: "<exact text>"blockquote. - Apply the decision to relevant artifacts.
Outputs: MSG in mailbox, WORKLOG entry.
Escalation: P0 decisions that block all work should be flagged clearly in both mailbox and Turnfile (agent status → blocked).
Module 4: Cross-Agent Review (PRD-008 + PRD-009)
Trigger examples:
- "Review PRD-013 and post findings."
- "Run reconciliation across PRD-005/006/007 interfaces."
Inputs: File path or PRD ID to review, scope (full / critical-only).
Procedure:
- Read the target document in full.
- Conduct review. Categorize findings:
- Required [P1]: Must fix before acceptance.
- Recommended [P2]: Should fix, non-blocking.
- Note [informational]: No action needed, flagged for awareness.
- Compose mailbox message with payload-first content (PRD-008):
- Include inline content (never path-only references).
- Include revision token:
REV-YYYYMMDD-<topic>-<seq>-h<8hex>. - Include review scope, ask (apply-or-counter), and file list.
- Post to MAILBOX.md.
- When response comes back:
- If
apply: verify changes were applied correctly. - If
counter: assess counter-proposal, accept or re-counter. - Content-modifying responses require new superseding revision token with
Relatedlinkage (PRD-009 R2).
- If
Reconciliation (PRD-009):
- When reconciling cross-PRD interfaces, check for contradictory source-of-truth rules.
- Register interface deltas in the appropriate tracking section (e.g., PRD-006 delta register).
- Update OQ registry if new questions surface.
Outputs: MSG with review findings, updated MAILBOX.md, MAILBOX.json regenerated.
Escalation: If review finds a blocking contradiction between PRDs, escalate to maintainer with both PRD references and the specific conflict.
Module 5: Shared-File Transaction (PRD-010 + PRD-013 R3.3)
Trigger examples:
- "Apply shared-file-safe update to MAILBOX and WORKLOG."
- "Acquire lock on WORKLOG.md for status block edit."
Inputs: File path(s) to lock, reason for edit.
Procedure:
Lock acquisition:
- Read TURNFILE.yaml.
- Check no conflicting lock exists in
lockssection for target files. - Write new lock entry:
<lock-id>: files: ["<file-path>"] holder: "claude" acquired_rev: <post-write coordination.revision> lease_revs: 2 reason: "<brief reason>" - Re-read TURNFILE.yaml and verify no overlapping competing lock has earlier
acquired_rev(or sameacquired_revwith lexicographically smallerlock_id). - If verification fails: remove lock entry, yield, retry.
Editing under lock: 6. Re-read the target file immediately before editing (it may have changed between reads). 7. Apply changes. 8. Run invariant checks if applicable. 9. If mailbox was mutated, regenerate MAILBOX.json in same transaction cycle.
Lock release:
10. Remove lock entry from TURNFILE.yaml.
11. Increment coordination.revision.
Low-activity liveness (PRD-010 R2.10-11 + PRD-013 R3.3 steps 8-9):
- If
coordination.revisionis unchanged across two consecutive lock-check attempts and Claude remains blocked: postblockedsignal in Turnfile and escalate via mailbox decision flow. - No indefinite spin-wait. Maintainer adjudicates via override (PRD-013 R4).
Deterministic mailbox ID allocation (PRD-010 R4.4-5):
next_id = (max existing sequence for current date) + 1from pre-write mailbox read.- On pre-commit re-check, if collision detected: abort and retry with incremented ID.
Outputs: Updated TURNFILE.yaml (lock acquired/released), edited file(s).
Escalation: Lock contention that persists beyond two revision checks → escalate with payload: lock_id, holder, acquired_rev, last-seen coordination.revision.
Module 6: Session Close (PRD-011 R1 + PRD-013 R5.2 + PRD-014)
Trigger examples:
- "Close session and prepare handoff."
- "Wrap up — write snapshot and archive boot file."
Inputs: None (operates on current state).
Procedure:
- Check mailbox — ensure Claude unread = 0. If not, process remaining messages first.
- Update WORKLOG:
- Update status block (lines 1–11) with current state.
- Add session entry with handoff block.
- Close open mailbox messages that Claude owns as closure owner.
- Update TURNFILE.yaml:
- Remove any locks Claude holds.
- Update completed tasks to
status: done. - Remove Claude entries from
turn_queue. - Set
agents.claude.status: "idle",current_task: null. - Compact signal log per PRD-013 R5.3: remove signals older than retention window (default 2 sessions), preserve last signal from each agent.
- Increment
coordination.revision.
- Write session state snapshot to bottom of
working-session/chat-claude.md:- YAML front matter: session ID, agent, timestamp, close reason, revision token (
REV-YYYYMMDD-snapshot-claude-<seq>-h<8hex>). - Active task status (complete/partial/blocked).
- Mailbox state summary.
- Open commitments.
- Files modified this session.
- Files to read on resume (ordered, with token budgets).
- Decision context.
- OQs touched.
- YAML front matter: session ID, agent, timestamp, close reason, revision token (
- Archive boot file to
docs/archive/boot-claude/boot-claude_v<N>.md(globally monotonic versioning per PRD-014). - Write new boot file with updated current state.
- Promote completed artifacts from
working-session/to trackeddocs/(copy, not move) — only when explicitly directed by maintainer and only for PRDs that pass the promotion gate (PRD_STATUS.jsoneligible = true +tools/validate-prd-promotion.mjspasses + maintainer acceptance evidence per PRD-006 R2a/R3). - Commit tracked changes — only when maintainer directs. Use granular commits, not one mega-commit:
- Each PRD promotion gets its own commit (e.g.,
Promote PRD-015: Gemini onboarding contract). - Each new tool or template gets its own commit.
- Structural changes (moves, renames, path updates) are separate from content changes.
- Remaining session work (doc updates, OQ resolutions, config changes) can be one commit summarizing the session.
- Do not auto-push. Push only when maintainer directs.
- Each PRD promotion gets its own commit (e.g.,
- Final mailbox check — confirm Claude unread = 0.
Outputs: Updated WORKLOG, MAILBOX, TURNFILE.yaml, chat-claude.md snapshot, new boot file, archived boot file.
Escalation: If unable to reach unread = 0, do not close session. Escalate blocking messages to maintainer.
Module 7: Turnfile Coordination (PRD-013 R3 + R6)
Trigger examples:
- "Claim the next available P2-D task and signal readiness."
- "Update task status and release lock in Turnfile."
Inputs: Task ID or signal details.
Procedure:
Task self-assignment (PRD-013 R6.1):
- Read TURNFILE.yaml.
- Find unassigned tasks where dependencies are all
status: done. - Claim by writing:
owner: "claude",status: "claimed",claim_rev: <current coordination.revision>. - If two agents claim simultaneously: lower
claim_revwins; if tied, lexicographically smallerownerwins.
Task status updates:
pending → claimed → in_progress → done(orblockedif stuck).- Set
completed_revwhen marking done. - Update
noteswith outcome summary.
Signal posting (PRD-013 R6.4):
- Append to
messagessection. Signals are lightweight coordination only:yield: done with turn, someone else can proceed.request_turn: need to write to a shared resource.ready: task complete, output available.blocked: can't proceed until [detail] resolved.handoff: passing work to target agent.
- Anything requiring rationale or content review → use mailbox instead.
Write protocol (PRD-013 R3.1):
- Always read before write.
- Validate ownership rules (R2.1): Claude writes only to
agents.claude, shared sections require lock. - Increment
coordination.revisionon every write. - Update
Last modified revisionheader comment.
Section ownership (PRD-013 R2.1):
| Section | Claude access |
agents.claude | Read/write (self-report) |
agents.codex | Read-only |
maintainer | Read-only |
coordination.tasks | Create tasks; update owned tasks |
locks | Acquire/release own locks |
turn_queue | Append own entries |
messages | Append signals |
coordination.active_phase/step | Read-only (maintainer-only writes) |
Outputs: Updated TURNFILE.yaml.
Escalation: Task contention or lock conflicts → use signal channel first, then mailbox if substantive discussion needed.
Module 8: OQ Registry Management (PRD-009)
Trigger examples:
- "Sync resolved OQs into the registry."
- "Register a new OQ for PRD-014."
Inputs: OQ ID(s) or topic for new question.
Procedure:
- Read
working-session/OPEN_QUESTIONS.md. - To register new OQ:
- Assign next sequential ID (
OQ-<NNN>). - Add to Active section with: ID, PRD reference, question text, proposed owner.
- Assign next sequential ID (
- To resolve OQ:
- Move from Active/Deferred to Resolved section.
- Record resolution text and who resolved.
- Update the source PRD's OQ section with resolution.
- To defer OQ:
- Move from Active to Deferred section with reason.
- Ensure WORKLOG records any OQ state changes.
Outputs: Updated OPEN_QUESTIONS.md, updated source PRD(s), WORKLOG entry.
Escalation: OQs that block PRD progression → escalate to maintainer via Module 3.
Fallback Rules
- If helper tooling is unavailable (e.g.,
export-mailbox-json.mjsfails), 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
After executing any module, report:
- State which module was 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.
Environment-specific notes (Claude)
Context window management:
- Claude operates within a fixed context window. The startup read order is optimized to front-load the most compact, actionable state.
- If approaching context limits, prioritize session close (Module 6) over continuing work.
- Use MAILBOX.json for quick state checks instead of parsing full MAILBOX.md when possible.
Tool-use patterns:
- Read files with the Read tool. Re-read immediately before editing.
- Edit files with the Edit tool (for targeted replacements) or Write tool (for new files).
- Use Bash for git operations, running scripts (e.g.,
node tools/export-mailbox-json.mjs), and directory listings. - Use Grep for content searches, Glob for file pattern matching.
Audit visibility (PRD-012 R5.2):
- All actions must be audit-visible in mailbox, worklog, or Turnfile.
- No hidden channels or private state.
- Log substantive governance actions in WORKLOG.
Versioning
| Field | Value |
| Skill file version | 0.3.0 |
| Protocol baseline | PRD-003 through PRD-014 (all promoted) |
| Policy test suite | PRD-012-M3-policy-test-suite.md (19 assertions, 4 scenario harnesses) — archived at examples/inception/skills/policy-tests/ |
| Last validated | M4 validation complete — all 4 scenarios PASS (rev 41, inception session 10) |
| Structural alignment | Aligned with Codex SKILL.md structure: front matter, execution contract, boundary discipline, startup read order, fallback rules, output format |
| v0.3.0 changes | Added Module 0 (Session Bootstrap) for cold-start initialization from templates. Bumped version. |
Changes to protocol semantics require maintainer approval (PRD-012 R7.2). Environment-specific changes that don't alter protocol semantics are Claude-owned but must be documented (PRD-012 R7.3).
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.

