Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when starting a complex or ambiguous task that risks scope drift
.claude/skills/nyldn-skill-intent-contract/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-10 | ✗→✓ | ▲ Improved | 131% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 427% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 128% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 133% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 240% | 0% |
The intent contract creates a persistent record of user intent that:
This closes the loop between intention and delivery.
The intent contract is stored in the current resolved plan run directory as session-intent.md. Use scripts/plan-storage.sh to create or recover that directory; never write a loose intent file into .claude/.
markdown# Intent Contract **Created**: [ISO timestamp] **Workflow**: [discover/embrace/review/etc.] **Status**: [active/validating/completed] ## Job Statement What the user is trying to accomplish (JTBD framework). [User's goal in plain language] ## Success Criteria ### Good Enough - [Minimum viable success criterion 1] - [Minimum viable success criterion 2] ### Exceptional - [Excellence criterion 1] - [Excellence criterion 2] ## Boundaries What this should NOT be: - [Boundary 1: What to avoid] - [Boundary 2: What's out of scope] ## Context & Constraints **Stakeholders**: [Who needs this to work for them] **Existing Assets**: [What to build on] **Timeline**: [Time constraints if any] **Technical Constraints**: [Platform, language, dependencies] ## Clarifying Context [Any answers from the 3-question pattern] ## Task Allocation **Risk**: [low | intermediate | high] **Initiative**: [human | AI | shared] — who starts and proposes **Control**: [human | AI | shared] — who oversees execution as it runs **Decision rights**: [human | AI] — who has final say on the outcome **AI role**: [none | executor | collaborator | challenger] **Execution disposition**: [AI-assisted | human-only | pending-user-decision] **Escalation decision**: [not-needed | pending | user's recorded resolution] **Resolved AUTONOMY_MODE**: [supervised | semi-autonomous | loop-until-approved | autonomous | not-applicable (contract-only sentinel)] ## Validation Checklist - [ ] Meets "good enough" criteria - [ ] Respects all boundaries - [ ] Works for all stakeholders - [ ] Builds on existing assets appropriately - [ ] Allocation still fits what the task turned out to be
Create an intent contract when:
/octo:embrace, /octo:discover, /octo:plan)Do NOT create for:
Run this before capturing intent. The question is not how to run the task across agents but whether it should be delegated at all, and if so, which parts of the authority go where. Framework: Afroogh, Varshney & D'Cruz (2025), A Task-Driven Human-AI Collaboration (arXiv:2505.18422).
Classify risk. Complexity is already scored elsewhere — defer to estimate_complexity and classify_cynefin in scripts/lib/routing.sh rather than re-deriving it. Risk is a separate axis that nothing in the codebase measures, so judge it here on three questions:
| Risk | Reading | |------|---------| | Low | Reversible, no material consequence, no named accountability. | | Intermediate | Reversible only at real cost, or consequence is unclear. | | High | Irreversible, materially consequential, or someone must answer for it. |
Allocate the three dimensions separately. They are independent, and treating them as one axis is the mistake this step exists to prevent. People readily hand AI the initiative on unfamiliar work while keeping control and decision rights — an allocation a single autonomy slider cannot express.
Record every outcome explicitly:
| Risk / complexity | Initiative | Control | Decision rights | AI role | Execution disposition | Escalation decision | Mode | |---|---|---|---|---|---|---|---| | Low / low | AI | AI | AI | executor | AI-assisted | not-needed | autonomous | | Low / high | shared | human | human | collaborator | AI-assisted | not-needed | loop-until-approved | | High / low | human | human | human | executor | AI-assisted | not-needed | supervised | | High / high | human | human | human | challenger | AI-assisted | not-needed | supervised |
The High / high allocation is adversarial: the human leads while AI attacks the proposed decision as a deliberate counterweight to the human's own bias. In High / low work, AI may execute only the bounded actions the human directly approves.
The rule that inverts. For intermediate-risk work where uncertainty is highest, the cited evidence says avoid AI entirely — "neither as a gatekeeper nor as a second opinion". This contradicts the smooth intuition that middling risk implies middling involvement, and it also sits in tension with the same paper's broader claim that complete human autonomy is rarely justified. That tension is real and unresolved; surface it to the user and let them decide rather than quietly picking a side.
Resolve to a setting. The workflow engine reads one variable, AUTONOMY_MODE, with four values:
| Allocation | AUTONOMY_MODE | |---|---| | Human holds control and decision rights, approving each phase | supervised | | AI runs; human is pulled in on failures and quality gates | semi-autonomous | | AI runs and iterates; human holds final decision rights | loop-until-approved | | AI holds all three | autonomous |
Record the three dimensions and the resolved mode. The mapping is lossy: one axis cannot represent three independent allocations, so a contract that stores only the mode loses the reason it was chosen. That record is what a later reviewer needs when the allocation turns out to have been wrong.
not-applicable is a persisted, contract-only sentinel for human-only work; it is not a fifth runtime value and must not be passed to the workflow engine.
For intermediate risk, record Execution disposition: pending-user-decision. Record Escalation decision: pending, then stop before execution. Ask the user to choose human-only handling or a specific documented AI allocation. Record their answer, rewrite the Task Allocation fields to match it, and change Escalation decision to the user's resolution before continuing. For a human-only resolution, record AI role: none and Resolved AUTONOMY_MODE: not-applicable; human-only not-applicable must not be passed to the workflow engine. Resolve to the supported human-only behavior and do not execute AI work in that state.
For a documented AI-assisted resolution, record every Task Allocation field:
Initiative, Control, Decision rights, and AI role from the chosen allocationExecution disposition: AI-assistedEscalation decision: user's recorded resolutionResolved AUTONOMY_MODE: exactly one of supervised, semi-autonomous,loop-until-approved, or autonomous, mapped using the table above
Validate the selected runtime mode and only then execute. The runtime must reject not-applicable and every unknown or unsupported mode before workflow execution rather than defaulting to autonomous behavior.
After asking the 3 clarifying questions in a workflow, prompt the user to define:
javascriptAskUserQuestion({ questions: [ { question: "What are you ultimately trying to accomplish?", header: "Goal", multiSelect: false, options: [ {label: "Let me describe it", description: "I'll write my own goal statement"}, {label: "Make a decision", description: "Choose between options"}, {label: "Create deliverable", description: "Build something specific"}, {label: "Understand a problem", description: "Research and learn"} ] }, { question: "What defines success for this?", header: "Success", multiSelect: true, options: [ {label: "Clear recommendation", description: "Know what to do next"}, {label: "Working implementation", description: "Code that functions"}, {label: "Team alignment", description: "Everyone understands"}, {label: "Problem solved", description: "Issue is resolved"} ] }, { question: "What should this NOT be or do?", header: "Boundaries", multiSelect: true, options: [ {label: "Over-engineered", description: "Keep it simple"}, {label: "Incomplete", description: "Must be production-ready"}, {label: "Disconnected", description: "Must fit our architecture"}, {label: "Risky", description: "Avoid experimental approaches"} ] } ] })
If user selects "Let me describe it", follow up with a text prompt for their custom goal.
Resolve a unique run directory, then use the Write tool to create its session-intent.md:
bashPLAN_STORAGE="${CLAUDE_PLUGIN_ROOT:-${HOME}/.claude-octopus/plugin}/scripts/plan-storage.sh" OCTO_PLAN_DIR="$("$PLAN_STORAGE" current "$PWD" 2>/dev/null || "$PLAN_STORAGE" create "$PWD")" cat > "${OCTO_PLAN_DIR}/session-intent.md" <<EOF # Intent Contract **Created**: $(date -u +"%Y-%m-%dT%H:%M:%SZ") **Workflow**: ${WORKFLOW_NAME} **Status**: active ## Job Statement ${USER_GOAL} ## Success Criteria ### Good Enough ${MIN_SUCCESS_CRITERIA} ### Exceptional ${EXCEPTIONAL_CRITERIA} ## Boundaries What this should NOT be: ${BOUNDARIES} ## Context & Constraints **Stakeholders**: ${STAKEHOLDERS} **Timeline**: ${TIMELINE} ## Clarifying Context ${THREE_QUESTION_ANSWERS} ## Validation Checklist - [ ] Meets "good enough" criteria - [ ] Respects all boundaries - [ ] Works for all stakeholders EOF
Throughout the workflow, recover the current plan directory with plan-storage.sh current "$PWD" and periodically read its session-intent.md to:
At key decision points, explicitly say:
Checking against intent contract: [reference specific criterion]When the workflow completes, read the resolved plan directory's session-intent.md and validate:
Validation Process:
markdown# Validation Report ## Success Criteria Check ### Good Enough Criteria - [✓] Criterion 1: [How it was met] - [✗] Criterion 2: [Why not met, what's needed] ### Exceptional Criteria - [~] Criterion 1: [Partial progress explanation] ## Boundary Check All boundaries respected: [Yes/No] - Boundary 1: [✓/✗] [Explanation] ## Gaps & Next Steps [If any criteria not met, list concrete next steps] ## Overall Assessment [Summary: Does this fulfill the original intent?]
Update the Status field in the resolved plan directory's session-intent.md:
active → workflow in progressvalidating → checking against criteriacompleted → all criteria met, boundaries respectedincomplete → some criteria not met, gaps identified1. Ask 3 clarifying questions (scope, focus, autonomy)
2. Create intent contract
3. DISCOVER phase (reference intent)
4. DEFINE phase (reference intent)
5. DEVELOP phase (reference intent)
6. DELIVER phase (reference intent)
7. Validate against intent contract
8. Present validation report1. Ask 3 clarifying questions (depth, focus, output)
2. Create intent contract
3. Execute multi-provider research
4. Synthesize findings
5. Validate against intent contract
6. Present validation report1. Capture comprehensive intent
2. Create intent contract
3. Route to appropriate workflows
4. Execute custom sequence
5. Validate against intent contract
6. Present validation reportmarkdown# Intent Contract **Created**: 2026-01-21T15:30:00Z **Workflow**: embrace **Status**: active ## Job Statement Build a user authentication system that our team can implement and maintain. ## Success Criteria ### Good Enough - Team understands what to build - Clear technical approach selected - Security considerations documented - Implementation plan with steps ### Exceptional - Multiple authentication methods evaluated - Security audit performed - Code examples provided - Integration tests included ## Boundaries What this should NOT be: - Over-engineered with unnecessary features - Disconnected from our existing Node.js/Express stack - Experimental or unproven technologies ## Context & Constraints **Stakeholders**: Development team (5 engineers), Product manager **Existing Assets**: Express.js API, PostgreSQL database **Timeline**: Need to start implementation next sprint **Technical Constraints**: Must work with Express.js, PostgreSQL ## Clarifying Context **Scope**: Medium feature (multiple components) **Focus Areas**: Security, Architecture design **Autonomy**: Supervised (review after each phase) ## Validation Checklist - [ ] Meets "good enough" criteria - [ ] Respects all boundaries - [ ] Works for all stakeholders - [ ] Builds on existing assets appropriately
For Users:
For Workflows:
Ready to use! Workflows can now create and validate against persistent intent contracts.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 19,144 | 27,806 | +45% | 1 | 1 | 0% | 2,164 | 4,806 | +122% | 0 | 0 | — |
case-02 | fail→fail | 24,921 | 17,836 | -28% | 1 | 1 | 0% | 3,062 | 3,917 | +28% | 0 | 0 | — |
case-03 | fail→fail | 19,711 | 23,931 | +21% | 1 | 1 | 0% | 2,117 | 5,252 | +148% | 0 | 0 | — |
case-04 | fail→fail | 17,843 | 23,640 | +32% | 1 | 1 | 0% | 2,031 | 6,683 | +229% | 0 | 0 | — |
case-10 | fail→pass | 20,500 | 16,690 | -19% | 1 | 1 | 0% | 2,468 | 5,706 | +131% | 0 | 0 | — |
case-05 | fail→pass | 10,746 | 10,664 | -1% | 1 | 1 | 0% | 897 | 4,723 | +427% | 0 | 0 | — |
case-06 | fail→pass | 19,530 | 11,762 | -40% | 1 | 1 | 0% | 2,123 | 4,843 | +128% | 0 | 0 | — |
case-07 | fail→pass | 19,972 | 13,694 | -31% | 1 | 1 | 0% | 2,260 | 5,268 | +133% | 0 | 0 | — |
case-08 | fail→pass | 14,522 | 10,677 | -26% | 1 | 1 | 0% | 1,408 | 4,792 | +240% | 0 | 0 | — |
case-09 | fail→pass | 19,884 | 13,242 | -33% | 1 | 1 | 0% | 2,309 | 4,887 | +112% | 0 | 0 | — |
case-11 | pass→pass | 17,234 | 11,441 | -34% | 1 | 1 | 0% | 2,149 | 4,748 | +121% | 0 | 0 | — |
case-12 | pass→pass | 16,327 | 10,354 | -37% | 1 | 1 | 0% | 1,834 | 4,522 | +147% | 0 | 0 | — |
case-13 | fail→pass | 14,716 | 12,412 | -16% | 1 | 1 | 0% | 1,510 | 4,653 | +208% | 0 | 0 | — |
case-14 | fail→pass | 13,016 | 12,232 | -6% | 1 | 1 | 0% | 1,342 | 4,838 | +261% | 0 | 0 | — |
case-15 | fail→pass | 13,505 | 7,550 | -44% | 1 | 1 | 0% | 1,356 | 4,032 | +197% | 0 | 0 | — |
case-22 | fail→fail | 7,836 | 15,552 | +98% | 1 | 1 | 0% | 248 | 3,844 | +1450% | 0 | 0 | — |
case-16 | fail→pass | 17,562 | 14,015 | -20% | 1 | 1 | 0% | 1,962 | 5,173 | +164% | 0 | 0 | — |
case-17 | fail→pass | 19,184 | 15,209 | -21% | 1 | 1 | 0% | 2,190 | 5,242 | +139% | 0 | 0 | — |
case-18 | pass→pass | 18,856 | 13,040 | -31% | 1 | 1 | 0% | 2,188 | 5,002 | +129% | 0 | 0 | — |
case-19 | fail→fail | 7,583 | 15,363 | +103% | 1 | 1 | 0% | 204 | 3,737 | +1732% | 0 | 0 | — |
case-20 | fail→fail | 10,267 | 16,701 | +63% | 1 | 1 | 0% | 674 | 3,977 | +490% | 0 | 0 | — |
case-21 | pass→pass | 16,516 | 13,355 | -19% | 1 | 1 | 0% | 1,931 | 4,922 | +155% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 17 counted toward the lift figure. The other 5 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +50 percentage points is the difference between those two pass rates over the 17 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 8/17/2026 | +36% |
| gemini-3.6-flash | verified | 8/11/2026 | +58% |
Other measured skills in the registry, with their headline benchmark lift.