drift-session-handover-authoring
Skill14 starsChanged 7 months agoMITView on GitHub
Drift-specific workflow for authoring session handover artifacts before calling drift_session_end (ADR-079). Use when writing work_artifacts/session_<id>.md, preparing versioned benchmark_results evidence JSON, or drafting ADRs that pair with a session. Keywords: session handover, drift_session_end, DRIFT-6100, handover gate, work_artifacts, session_md, feature evidence, ADR draft, bypass_reason.
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- llms.txtllms.txt
- brainstormingSkill
- drift-adr-workflowSkill
- drift-agent-prompt-authoringSkill
- drift-commit-pushSkill
- drift-dependency-updateSkill
- drift-docs-gap-fixSkill
- drift-evidence-artifact-authoringSkill
- drift-finding-message-authoringSkill
- drift-ground-truth-fixture-developmentSkill
- drift-mcp-repo-ops-usageSkill
- drift-pr-review-loopSkill
- drift-pr-reviewSkill
- drift-releaseSkill
- drift-risk-audit-artifact-updatesSkill
- drift-security-triageSkill
- drift-signal-development-full-lifecycleSkill
- fix-failing-actionsSkill
- grill-meSkill
- guard-src-drift-apiSkill
- guard-src-drift-commandsSkill
- guard-src-drift-ingestionSkill
- guard-src-drift-outputSkill
- guard-src-drift-signalsSkill
- guard-src-driftSkill
- improve-codebase-architectureSkill
- prd-to-issuesSkill
- self-improving-agentSkill
- simplify-and-hardenSkill
- skill-creatorSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- tddSkill
- test-driven-developmentSkill
- verification-before-completionSkill
- workspace-automation-orchestratorSkill
- write-a-prdSkill
- writing-plansSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Use this skill when you are about to call drift_session_end and must produce the handover artifacts required by ADR-079 and the …
- Very specific: line 46
Before writing artifacts, run the mandatory gate from .github/instructions/drift-policy.instructions.md.
- Distinctive: line 52
Ask yourself what the session actually changed:
- Distinctive: line 62
When in doubt, pick the highest-priority class that applies.
- Very specific: line 93
Use the drift-evidence-artifact-authoring skill to produce a versioned file in benchmark_results/.
- Very specific: line 106
Use the drift-adr-workflow skill.
- Very specific: line 126
If the gate blocks, read the missing_artifacts, shape_errors, and placeholder_flags arrays in the response and fix the specific issue …
- Distinctive: line 132
Only if a release-critical hotfix makes full artifacts impossible and a follow-up task is already queued:
- Very specific: line 148
After the limit of 5 blocked retries the gate auto-unblocks if — and only if — a valid bypass_reason is supplied.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Drift Session Handover Authoring
Use this skill when you are about to call drift_session_end and must produce
the handover artifacts required by ADR-079 and the session-handover contract in
.github/prompts/_partials/session-handover-contract.md.
When To Use
- You touched files under
src/drift/during the session. - You completed one or more fix-plan tasks.
- You ran multiple scans / diffs / nudges and want to hand off to the next agent (or to the maintainer).
drift_session_endreturnedDRIFT-6100and you need to fill the missing artifacts.
When Not To Use
- Empty sessions (no tool calls beyond session start, no completed tasks, no touched files). The gate auto-exempts them.
- Pure read-only exploration that touched no code.
Core Rules
- Agent writes, server validates. You author the artifacts. The MCP server only checks existence, shape, placeholders (and optionally runs an LLM review). Do not try to satisfy the gate with generated filler.
- No placeholder tokens.
TODO,FIXME,XXX,TBD,???,<N>,<NNN>,LOREM,IPSUM,FOO,BAR,BAZoutside of ≥5-line code fences block the gate at L3. - Cross-check session id. The
session_idin the Markdown frontmatter must match the active session exactly. - SIGNAL / ARCHITECTURE classes require all three artifacts. Evidence JSON, ADR draft, and session markdown.
force=trueis a last resort. It requires an auditablebypass_reasonof at least 40 characters without placeholder tokens, and it is logged and persisted in the session trace.
Step 1: Policy Gate
Before writing artifacts, run the mandatory gate from
.github/instructions/drift-policy.instructions.md. If the underlying change
is inadmissible the gate blocks you here, not at drift_session_end.
Step 2: Determine Your Change Class
Ask yourself what the session actually changed:
| Touched paths | Class | Required artifacts |
src/drift/signals/** or src/drift/scoring/** | signal | evidence + ADR + session_md |
src/drift/ingestion/**, output/**, api/**, mcp_*, session* | architecture | evidence + ADR + session_md |
Other src/drift/** | fix | session_md |
docs/**, docs-site/**, .github/prompts/**, skills, instructions | docs | session_md |
| Only config, lockfiles, CI, tasks.json | chore | session_md |
When in doubt, pick the highest-priority class that applies.
Step 3: Author the Session Markdown
Copy docs/session_handover_template.md into
work_artifacts/session_<first 8 chars of session_id>.md and fill every
required section. Minimum length ≥ 200 bytes (the template already exceeds
this when filled meaningfully).
Required frontmatter fields:
session_id(full id, matching the active session)duration_secondstool_callstasks_completedfindings_deltachange_class
Required sections:
## Scope— what you changed and what you deliberately did not.## Ergebnisse— observable outcomes (tests, metrics, behaviour).## Offene Enden— known follow-ups. Write "Keine offenen Enden" (no "TODO") if there really are none.## Next-Agent-Einstieg— the exact first tool call and the first file path the next agent should open.## Evidenz— pointers to the evidence JSON, ADR, and updated audit artifacts.
Step 4: Author the Evidence JSON (signal / architecture only)
Use the drift-evidence-artifact-authoring skill to produce a versioned file
in benchmark_results/. The gate's L2 layer requires these JSON keys at
minimum:
versionfeaturedescriptiontestsaudit_artifacts_updated(non-empty list when the class issignalorarchitecture)
Step 5: Author the ADR Draft (signal / architecture only)
Use the drift-adr-workflow skill. The gate's L2 layer requires:
- Frontmatter
status: proposedoraccepted. ## Kontextwith ≥ 120 substantive characters.- At least two explicit "Alternative" mentions.
## Entscheidungand## Konsequenzensections with non-empty content.
Step 6: Call drift_session_end
Pass explicit paths so the server can skip path-discovery:
drift_session_end(
session_id="<sid>",
session_md_path="work_artifacts/session_<id8>.md",
evidence_path="benchmark_results/v<ver>_<slug>_feature_evidence.json",
adr_path="docs/decisions/ADR-<NNN>-<slug>.md",
)If the gate blocks, read the missing_artifacts, shape_errors, and
placeholder_flags arrays in the response and fix the specific issue before
retrying.
Step 7: Force-Bypass (Notausgang)
Only if a release-critical hotfix makes full artifacts impossible and a follow-up task is already queued:
drift_session_end(
session_id="<sid>",
force=True,
bypass_reason=(
"Hotfix-Session fuer Release-Blocker; Evidence-JSON und ADR "
"werden im Follow-up-Task <task-id> bis <date> nachgereicht."
),
)The reason must be specific, meaningful, and free of placeholder tokens.
force=true is logged at WARNING level and recorded in the session trace.
After the limit of 5 blocked retries the gate auto-unblocks if — and only if —
a valid bypass_reason is supplied.
Validation
drift_session_endreturnsstatus: okwithhandover_gate.ok=true, orhandover_bypass.forced=truewith a valid reason.- The session markdown shows up in
git statusunderwork_artifacts/. - Evidence JSON and ADR are parseable and referenced from the session
markdown's
## Evidenzsection.
References
docs/decisions/ADR-079-session-handover-artifact-gate.md.github/prompts/_partials/session-handover-contract.mddocs/session_handover_template.mdsrc/drift/session_handover.py
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.

