Gdd Turn Closeout logo

Gdd Turn Closeout

Community
hegemonart
gdd-turn-closeout

Portable mirror of the gdd-turn-closeout Stop hook (D-11). Closes the events.jsonl gap at turn-end and surfaces a stage-completion or paused-mid-task nudge. Tail-called by orchestrator skills ({{command_prefix}}next, {{command_prefix}}design, {{command_prefix}}verify) at exit on the 13 non-Claude runtimes that lack a Stop hook surface. Idempotent, non-blocking, ≤10ms typical.

Overview

Publisherhegemonart
Repositoryget-design-done
Skill namegdd-turn-closeout
Stars
3
Forks
1
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by hegemonart on GitHub. Read the source before you install it.

Installation

Install the Gdd Turn Closeout AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/turn-closeout
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hegemonart/get-design-done.git /tmp/get-design-done
mkdir -p .claude/skills
cp -r /tmp/get-design-done/scripts/skill-templates/turn-closeout .claude/skills/gdd-turn-closeout
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Gdd Turn Closeout in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Gdd Turn Closeout on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Gdd Turn Closeout is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

gdd-turn-closeout

Role

You are a deterministic closeout skill. You close the per-turn telemetry gap on runtimes that don't expose a Stop event (codex, gemini, and 11 others). You are a code-level mirror of hooks/gdd-turn-closeout.js (D-10): same conditions, same idempotence, same emitted event shape. The only difference: the JS hook emits the nudge as additionalContext via the harness; this skill prints the nudge directly to the user. A turn is "complete" when the verify command exits 0, the <done> criterion is observable, and the diff stays within the declared scope - any deviation is logged for the run summary.

When to invoke: orchestrator skills ({{command_prefix}}next, {{command_prefix}}design, {{command_prefix}}verify) tail-call this skill as their final step before returning. Adoption is incremental - each orchestrator can wire the tail-call independently; the skill exists as a stable, callable surface today.

Invocation Contract

  • Input: none. Operates on .design/STATE.md and .design/telemetry/events.jsonl in cwd.
  • Output: at most one printed line - the nudge - or silent return.
  • Latency budget: ≤10ms typical. Read only STATE.md and the tail of events.jsonl.
  • Idempotence: if the most recent event is already a turn_end for the current (stage, task_progress) tuple, skip append but still print nudge.
  • Non-blocking: any I/O failure → silent return. This skill never gates the user.

Algorithm

Execute in order; stop at the first early-return.

Step 1 - Read STATE.md

Read .design/STATE.md. Missing or unreadable → return silently (no print, no append).

Step 2 - Parse <position> block

Lightweight-parse only <position>…</position> (regex /<position>([\s\S]*?)<\/position>/ then per-line key: value). Extract stage, status, task_progress. Do not invoke the full STATE parser.

If status != "in_progress" → return silently. Pipeline is initialized / completed / blocked - no turn-end gap to close.

Step 3 - Tail the last event line

Read only the last 8 KiB of .design/telemetry/events.jsonl. Treat as "stale by definition":

  • File missing.
  • File empty.
  • Last line fails JSON parse.
  • Last line's timestamp is missing or unparseable.

Otherwise compute now - last_event.timestamp. Gap < 60 seconds → user is actively mid-turn → return silently (next real event closes the gap naturally). Bash one-liner for the tail: tail -n 1 .design/telemetry/events.jsonl 2>/dev/null.

Step 4 - Idempotence check, then append

If last event is already {type:"turn_end", stage:<same>, payload:{task_progress:<same>}} for the exact (stage, task_progress) from Step 2: skip append but proceed to Step 5.

Otherwise append one JSONL line to .design/telemetry/events.jsonl:

json
{"type":"turn_end","timestamp":"<ISO 8601 now>","sessionId":"<session-id-or-'turn-closeout'>","stage":"<stage>","payload":{"task_progress":"<N/M>"},"_meta":{"source":"gdd-turn-closeout-skill"}}

Create .design/telemetry/ if missing. Append is a single appendFile-equivalent call (writer assumes append-atomicity per Plan 20-06).

Step 5 - Print the nudge

Match task_progress against ^(\d+)/(\d+)$:

  • Numerator equals denominator and denominator > 0 (e.g. 5/5): Stage <stage> complete — run {{command_prefix}}next or {{command_prefix}}reflect.
  • Otherwise (mid-task, e.g. 3/7, 0/0, malformed): Stage <stage> paused mid-task — resume with {{command_prefix}}resume.

One line exactly. No commentary - the nudge is the user-facing surface.

Failure Modes

ConditionBehavior
STATE.md missing/unreadableSilent return
<position> absent or malformedSilent return
status != "in_progress"Silent return
events.jsonl missingTreat as stale → fall through to append + nudge
Last event unparseableTreat as stale → fall through
Last event < 60s oldSilent return
Append fails (permission, disk full)Print nudge anyway; do not surface I/O error
Any uncaught throwSilent return

Equivalence with the JS hook

This skill and hooks/gdd-turn-closeout.js MUST stay code-level equivalent: same four early-return branches, same 60-second staleness threshold, same idempotence guard (type=turn_end, stage, payload.task_progress), same event shape (only _meta.source differs: gdd-turn-closeout vs gdd-turn-closeout-skill so reflector telemetry can distinguish hook-driven vs skill-driven). Same nudge wording for both N/N and mid-task cases. Change one → change the other in the same plan. Plan 25-09's tests/turn-closeout-hook.test.cjs covers the JS hook.

Non-Goals

  • Not a state writer. Never edits STATE.md. The events.jsonl append is the only side effect.
  • Not a stage transition. turn_end is within-stage, not a state-machine move; downstream tools ignore it for transition gating.
  • Not a Stop-event harness. Cross-runtime Stop-event support at the harness level is out-of-scope for Phase 25 (CONTEXT.md OOS).

Integration Point

Canonical tail-call sites per D-11: {{command_prefix}}next, {{command_prefix}}design, {{command_prefix}}verify. Each orchestrator's final step before returning to the user invokes gdd-turn-closeout. Tail-call wiring intentionally not part of v1.25 (Plan 25-04 ships only the callable surface).

Frequently asked questions

What does the Gdd Turn Closeout AI skill do?

Portable mirror of the gdd-turn-closeout Stop hook (D-11). Closes the events.jsonl gap at turn-end and surfaces a stage-completion or paused-mid-task nudge. Tail-called by orchestrator skills ({{command_prefix}}next, {{command_prefix}}design, {{command_prefix}}verify) at exit on the 13 non-Claude runtimes that lack a Stop hook surface. Idempotent, non-blocking, ≤10ms typical.

Why use Gdd Turn Closeout on TypingMind?

Because you install it once and use it with any model. Gdd Turn Closeout is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Gdd Turn Closeout in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/turn-closeout. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Gdd Turn Closeout?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Gdd Turn Closeout?

As many as you like. As long as a model supports skills, you can use Gdd Turn Closeout with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Gdd Turn Closeout AI skill free?

Yes. It is published on GitHub by hegemonart under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇