narrative-handoff-contract
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "narrative-handoff-contract" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-39841475d315e8752222efb48f58f1048e3012ef060ba5837131b658f2f0208f. Verify the upstream source and version against https://github.com/lyndonkl/claude before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Defines and validates a machine-readable contract (architecture.json) for handing off narrative architecture between a structuring agent and a drafting agent. The contract specifies evidence-based slots, constrained scenario tags, handling of blanks, a “deprecated” column, and an escalation object for surfacing defects. A validator script is included to enforce rules rather than merely recommend them. Used when two agents or sessions need to hand off narrative work; to check the architecture before drafting; to report defects that cannot be fixed at a given level; or when a user mentions handoff, contract, pattern, validator, architecture.json, escalation, or “outline and draft have diverged.”
Introduction source: third_party · lyndonkl · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Defines and validates the machine-readable contract that passes a narrative architecture between a structural agent and a drafting agent — architecture.json with evidence-backed slots, capped scene tags, gap dispositions, a DEAD column, and an escalation object for sending defects back upward. Ships a validator script so the rules are enforced rather than requested. Use when two agents or two sessions must hand narrative work to each other, when an architecture needs checking before drafting begins, when a draft must report a defect it cannot fix at its own layer, or when the user mentions handoff, contract, schema, validator, architecture.json, escalation, or "the outline and the draft have drifted apart".
- Testing
- Not tested
Browse files
Frontmatter
name: narrative-handoff-contract
description: Defines and validates the machine-readable contract that passes a narrative architecture between a structural agent and a drafting agent — architecture.json with evidence-backed slots, capped scene tags, gap dispositions, a DEAD column, and an escalation object for sending defects back upward. Ships a validator script so the rules are enforced rather than requested. Use when two agents or two sessions must hand narrative work to each other, when an architecture needs checking before drafting begins, when a draft must report a defect it cannot fix at its own layer, or when the user mentions handoff, contract, schema, validator, architecture.json, escalation, or "the outline and the draft have drifted apart".Narrative Handoff Contract
Table of Contents
- Core Principles
- Workflow
- The three fields that carry the weight
- The escalation object
- Guardrails
- Quick Reference
Related skills: Use narrative-evidence-ledger to build the claim set this contract points at, narrative-arc-mapping to fill the slots, and narrative-fidelity-audit to check the prose that comes back.
Core Principles
- A pipeline whose interface is prose has no interface. Two agents that hand each other paragraphs cannot enforce anything. The handoff is a file.
- The evidence array is the validated field, not the value. A slot with a confident sentence and no claim ID fails here rather than reading well downstream.
- ABSENT is a passing state. An architecture with every slot filled is flagged, because real material always has holes.
- Enforce with a cap, not a request. "Never draft prose" decays as context fills. A length limit on scene lines does not.
- The channel runs both ways. Without an escalation object the drafting layer has no way to report a structural defect, so it papers over it with polish.
- Pointers resolve outward. A citation resolving into the pipeline's own earlier output is circular, invisible to reading, and a hard failure.
Workflow
Copy this checklist and track your progress:
Handoff Contract Progress:
- [ ] Step 1: Emit the architecture object
- [ ] Step 2: Validate before handing off
- [ ] Step 3: Write the demand manifest
- [ ] Step 4: Receive and route escalations
Step 1: Emit the architecture object
Step 1.1: Write architecture.json with the fields in resources/schema.md. Start from the worked example there rather than from an empty file.
Step 1.2: Stamp the run header — model, corpus reference, timestamp, and the list of claim IDs actually consulted. A run over a corpus too large to read linearly must record which claims it did not see. Silent partial coverage reported as full coverage defeats every audit downstream.
Step 1.3: Write incrementally. Append each slot as you settle it, so a run that dies partway loses one slot rather than the whole pass.
Step 2: Validate before handing off
Step 2.1: Run the validator. It reports every problem, not just the first:
python3 resources/validate_architecture.py path/to/architecture.json \
--corpus-root path/to/corpus --output-root path/to/pipeline/output
Step 2.2: Fix errors. Read warnings as diagnosis rather than noise — "0 slots ABSENT" usually means slot-filling, not unusually complete material.
Step 2.3: Use --strict in CI, where a warning should stop the build. Leave it off while drafting.
Step 3: Write the demand manifest
Step 3.1: Give the drafting agent absolute paths, an explicit scope in beat IDs, an explicit out-of-scope statement, the style contract, and the required return shape.
Step 3.2: Read it back as a stranger. If it only makes sense to someone who saw the previous conversation, it will fail. The downstream agent inherits nothing else.
Step 4: Receive and route escalations
Step 4.1: An escalation naming layer architecture is a defect in the spine or the slot. An escalation naming layer reporting means the corpus lacks something — route it to research, not to redrafting.
Step 4.2: A spine change is legal but never local. Bump spine_version, invalidate the draft, and re-pass from the scene weave down. Patching one section into a different structure while the rest keeps the old one is what readers register as untrustworthy without being able to say why.
The three fields that carry the weight
| Field | Rule | What it prevents |
|---|---|---|
slots[].evidence[] |
Non-empty for any slot not marked ABSENT | A fluent sentence standing in for a finding |
slots[].status |
ABSENT passes; all-filled warns |
Twenty-two slots producing twenty-two inventions |
scenes[].tagged_line |
Hard character cap | The structural agent quietly drafting, leaving the craft agent editing text instead of executing architecture |
Two more matter almost as much. dead_column[] keeps every killed finding, distinguishing did_not_support from CONTRADICTED — the second always reaches the reader, and its absence is how cherry-picking becomes undetectable. And scenes[].representativeness is assigned upstream against the corpus, never by the drafting agent, because a vivid case in the opener is selected for energy and energy correlates with being atypical.
The escalation object
{
"beat_id": "b14",
"layer": "architecture",
"defect": "No particular exists anywhere in the corpus for this beat; the ladder audit finds an R2 run with no R1 within two paragraphs.",
"what_would_resolve_it": "Either a dated artifact from the 1998 filings, or a redesign that does not require a scene here."
}
layer is architecture when only the spine can resolve it, and reporting when the material itself is missing. Both are successful outputs. Neither is a request for permission to invent.
Guardrails
Requirements:
- Validate before every handoff. An unvalidated contract is a suggestion.
- Absolute paths only. Relative paths across an agent boundary are a documented recurring failure.
- Version the contract. A run that cannot say which contract it was written against cannot be re-derived or diffed.
- Every gap carries exactly one disposition — RESEARCH, REDESIGN, DECLARE or CUT. There is no "draft and flag": flagged prose survives review at high rates because it reads well.
- Zero gaps is a red flag, not a success.
Common pitfalls:
- Treating the markdown companion as the artifact. Generate it from the JSON; never edit it by hand and expect the JSON to follow.
- Letting the drafting agent widen its own scope because "the next section obviously follows."
- Recording coverage as the whole corpus when the agent read the first N chunks.
- Deleting killed findings to tidy the file.
- Escalating by writing a note into the prose instead of emitting the object, where nothing will route it.
Quick Reference
Key resources:
- resources/schema.md: full field list, types, and a worked example for a system protagonist
- resources/validate_architecture.py: the validator; exit 0 pass, 1 violated, 2 unreadable
- resources/evaluators/rubric_narrative_handoff_contract.json: quality scoring
Inputs required:
- A claim set or evidence ledger with stable claim IDs
- A chosen structure and its slots
- The output directory, for the circular-citation check
Outputs produced:
architecture.json, validated- A demand manifest a stranger could execute
- Escalation objects routed by layer
Version history
-
0.1
GitHub ↗
Original release notes
## What's Changed * Improve writer skill navigation and structure by @lyndonkl in https://github.com/lyndonkl/claude/pull/1 * Consolidate stickiness content and reduce revision to 3 passes by @lyndonkl in https://github.com/lyndonkl/claude/pull/2 * Update README.md to reflect current writer skill structure by @lyndonkl in https://github.com/lyndonkl/claude/pull/3 * Add explicit instructions for AI agents to follow resource file workf… by @lyndonkl in https://github.com/lyndonkl/claude/pull/4 * Change analysis files from /tmp/ to project directory by @lyndonkl in https://github.com/lyndonkl/claude/pull/5 * Add five refined skills to production by @lyndonkl in https://github.com/lyndonkl/claude/pull/6 * Add causal-inference-root-cause skill and fix missing methodology files by @lyndonkl in https://github.com/lyndonkl/claude/pull/7 * Add workflow pattern to 6 completed skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/8 * Add chain-estimation and roleplay-debate skills with optimizations by @lyndonkl in https://github.com/lyndonkl/claude/pull/9 * Add 3 new skills and update writer skill workflow pattern by @lyndonkl in https://github.com/lyndonkl/claude/pull/10 * Add skills #12-13: constraint-based-creativity and data-schema-knowle… by @lyndonkl in https://github.com/lyndonkl/claude/pull/11 * Add skills #14-16: decision-matrix, decomposition-reconstruction, deliberation-debate-red-teaming by @lyndonkl in https://github.com/lyndonkl/claude/pull/12 * Add skills #17-19: design-of-experiments, dialectical-mapping-steelmanning, discovery-interviews-surveys by @lyndonkl in https://github.com/lyndonkl/claude/pull/13 * Add chef-assistant skill and update README by @lyndonkl in https://github.com/lyndonkl/claude/pull/14 * Fix README: Remove links to gitignored scratchpad files by @lyndonkl in https://github.com/lyndonkl/claude/pull/15 * Add skills #14-22: 9 new production-ready skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/16 * Add skills #20-24 and workflow pattern updates by @lyndonkl in https://github.com/lyndonkl/claude/pull/17 * Add skill #25: expected-value by @lyndonkl in https://github.com/lyndonkl/claude/pull/18 * Add skills #26-28: facilitation-patterns, financial-unit-economics, focus-timeboxing-8020 by @lyndonkl in https://github.com/lyndonkl/claude/pull/19 * Add skills #29-30: heuristics-and-checklists, hypotheticals-counterfactuals by @lyndonkl in https://github.com/lyndonkl/claude/pull/20 * Add skills #31-33: information-architecture, kill-criteria-exit-ramps, layered-reasoning by @lyndonkl in https://github.com/lyndonkl/claude/pull/21 * Add Claude Code plugin support by @lyndonkl in https://github.com/lyndonkl/claude/pull/22 * Fix plugin marketplace source path by @lyndonkl in https://github.com/lyndonkl/claude/pull/23 * Add skill #34: mapping-visualization-scaffolds by @lyndonkl in https://github.com/lyndonkl/claude/pull/24 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/25 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/26 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/27 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/28 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/29 * Add skill #59: skill-extraction by @lyndonkl in https://github.com/lyndonkl/claude/pull/30 * Add skill-creator: Transform documents into actionable skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/31 * Update skill count from 58 to 61 in README by @lyndonkl in https://github.com/lyndonkl/claude/pull/32 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/33 * Add d3-visualization skill: comprehensive D3.js implementation guide by @lyndonkl in https://github.com/lyndonkl/claude/pull/34 * Add comprehensive Superforecasting Toolkit with 4 skills and orchestr… by @lyndonkl in https://github.com/lyndonkl/claude/pull/35 * Add "Run in Smithery" badge by @gurdasnijor in https://github.com/lyndonkl/claude/pull/36 * Add Scientific Writing Toolkit with 6 skills and orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/37 * Improve skill invocation rules and update README by @lyndonkl in https://github.com/lyndonkl/claude/pull/38 * Add Geometric Deep Learning skill suite and orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/39 * Decompose writer skill into 4 focused skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/40 * Add GraphRAG skill suite with 5 skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/41 * Decompose cognitive-design skill into 3 focused skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/42 ## New Contributors * @lyndonkl made their first contribution in https://github.com/lyndonkl/claude/pull/1 * @gurdasnijor made their first contribution in https://github.com/lyndonkl/claude/pull/36 **Full Changelog**: https://github.com/lyndonkl/claude/commits/0.1
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决多代理/会话间叙事工作交接的标准化痛点,提供可执行契约与验证机制
- 显著提升叙事一致性与缺陷向上传递的可靠性,适用于高频协作场景
Highlights
- 触发词覆盖全面且边界清晰,包含 handoff、contract、schema、validator、architecture.json、escalation 等关键术语
- 支持多种变体表达,如“大纲与草稿已偏离”,触发条件精准
Areas to improve
-
缺少显式 When to Use 章节 Reported severity: Minor
文档未设置独立 When to Use 章节,使用场景描述融入 description 和 Core Principles
Recommendation: 建议增加显式 When to Use 章节以提升可读性
-
文档长度接近上限 Reported severity: Minor
主文档内容详尽但接近 500 行限制,可能影响快速浏览
Recommendation: 考虑将部分细节移至子文档或附录
Highlights
- 结构完整,含 Core Principles、Workflow(分步骤带清单)、Guardrails、Quick Reference
- 提供端到端示例(escalation object JSON)和具体资源链接
Highlights
- 提供具体验证脚本路径与调用方式,参数明确(--corpus-root, --output-root, --strict)
- 覆盖主要异常(circular citation, coverage reporting),不可逆操作有确认机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.