Log negotiation learnings, negotiation issues, and feature requests to markdown files for continuous improvement. Capture preparation gaps, framing misses, concession leakage, weak BATNA posture, recurring objections, escalation mistakes, contract-term ambiguity, and agreement quality risk.
Optional extras (off by default):
extract-skill.sh (dry-run unless --write and the user asked in this session)Promote validated, redacted patterns into playbooks, objection libraries, concession guardrails, BATNA checklists, or deal review templates after a reviewed diff and explicit approval.
Default behavior is local markdown logging and reminders.
It does not:
git cloneextract-skill.sh --writeAlways require explicit human approval for high-impact concessions and for final terms.
Do not log BATNA values, reservation prices, discount floors, confidential customer terms, legal advice, approval tokens, or raw transcripts. Use redacted process-level summaries (what went wrong, what guardrail to add). Keep .learnings/ local or access-controlled; do not commit it until a human has reviewed entries.
Before logging, ensure .learnings/ exists in project/workspace root. Create missing files only:
bash
mkdir -p .learnings
[ -f .learnings/LEARNINGS.md ] || printf "# Negotiation Learnings\n\nNegotiation strategy insights, framing improvements, BATNA lessons, concession tactics, objection handling patterns, escalation learnings, and agreement quality improvements.\n\n**Categories**: concession_leak | batna_weakness | framing_miss | objection_handling_gap | escalation_misalignment | value_articulation_gap | anchor_error | agreement_risk\n**Areas**: preparation | discovery | framing | bargaining | concessions | closing | stakeholder_alignment | escalation | contract_terms | follow_up\n\n---\n" > .learnings/LEARNINGS.md
[ -f .learnings/NEGOTIATION_ISSUES.md ] || printf "# Negotiation Issues Log\n\nNegotiation failures, concession breakdowns, unresolved redlines, escalation misalignment, and agreement quality risks.\n\n---\n" > .learnings/NEGOTIATION_ISSUES.md
[ -f .learnings/FEATURE_REQUESTS.md ] || printf "# Feature Requests\n\nNegotiation tooling, preparation automation, objection support, BATNA planning, concession controls, and agreement-risk analysis capabilities.\n\n---\n" > .learnings/FEATURE_REQUESTS.md
Never overwrite existing files.
SituationActionConcession made without reciprocal valueLog NEG in .learnings/NEGOTIATION_ISSUES.md category concession_leakBATNA undefined or weakLog NEG category batna_weakness in preparationOpening anchor failed or driftedLog LRN category anchor_errorSame objection repeated across dealsLog LRN category objection_handling_gapEscalation executed to wrong owner/timingLog NEG category escalation_misalignmentRedline unresolved at close stageLog NEG category agreement_riskValue reframing improved movementLog LRN category value_articulation_gapClause ambiguity discoveredLog NEG category agreement_risk in contract_termsWorkflow/tooling neededLog FEAT in .learnings/FEATURE_REQUESTS.mdPattern repeats 3+ timesLink entries; propose a redacted playbook patch after approval
OpenClaw supports workspace-based skill loading and hook reminders.
Prefer the registry install (no extra clone). This uses the network to ClawHub:
bash
clawdhub install self-improving-negotiation
Manual clone is optional network access to GitHub. Use only if you trust that repository:
bash
git clone https://github.com/jose-compu/self-improving-negotiation.git ~/.openclaw/skills/self-improving-negotiation
text
~/.openclaw/workspace/
├── AGENTS.md
├── SOUL.md
├── TOOLS.md
├── MEMORY.md
├── memory/
│ └── YYYY-MM-DD.md
└── .learnings/
├── LEARNINGS.md
├── NEGOTIATION_ISSUES.md
└── FEATURE_REQUESTS.md
bash
mkdir -p ~/.openclaw/workspace/.learnings
Then create:
LEARNINGS.mdNEGOTIATION_ISSUES.mdFEATURE_REQUESTS.mdDo not install into ~/.openclaw/hooks/ (user-global). If reminders are needed, keep hooks in this workspace only:
bash
mkdir -p .openclaw/hooks
cp -r hooks/openclaw .openclaw/hooks/self-improving-negotiation
See references/openclaw-integration.md.
For Claude Code, Codex CLI, Copilot, or other assistants:
bash
mkdir -p .learnings
Create the same 3 files in .learnings/.
Add to AGENTS.md, CLAUDE.md, or .github/copilot-instructions.md:
When negotiation patterns are discovered:
.learnings/LEARNINGS.md, .learnings/NEGOTIATION_ISSUES.md, or .learnings/FEATURE_REQUESTS.mdLRN = learningNEG = negotiation issueFEAT = feature requestAppend to .learnings/LEARNINGS.md:
markdown
## [LRN-YYYYMMDD-XXX] category
**Logged**: ISO-8601 timestamp
**Priority**: low | medium | high | critical
**Status**: pending
**Area**: preparation | discovery | framing | bargaining | concessions | closing | stakeholder_alignment | escalation | contract_terms | follow_up
### Summary
One-line negotiation learning.
### Details
What happened, why it mattered, and what to improve.
### Negotiation Context
**Trigger / Objection:**
> Quote or paraphrase
**Response Used:**
> Action, phrase, offer, or decision
**Outcome:**
advanced | stalled | rejected | escalated | closed
### Suggested Action
Concrete change to framing, concession strategy, BATNA prep, or escalation.
### Metadata
- Source: transcript_review | negotiation_debrief | legal_review | pricing_review | post_mortem
- Negotiation Type: procurement | renewal | enterprise_new_logo | partner | vendor | internal_budget
- Counterparty Role: procurement | legal | finance | exec | ops | technical
- Related Issues: NEG-YYYYMMDD-XXX
- Tags: tag1, tag2
- See Also: LRN-YYYYMMDD-XXX
- Pattern-Key: framing.anchor_drift (optional)
- Recurrence-Count: 1 (optional)
- First-Seen: YYYY-MM-DD (optional)
- Last-Seen: YYYY-MM-DD (optional)
---
Append to .learnings/NEGOTIATION_ISSUES.md:
markdown
## [NEG-YYYYMMDD-XXX] issue_type
**Logged**: ISO-8601 timestamp
**Priority**: high
**Status**: pending
**Area**: preparation | discovery | framing | bargaining | concessions | closing | stakeholder_alignment | escalation | contract_terms | follow_up
### Summary
Brief description of failure/risk.
### Context
- **Stage**: current stage
- **Counterparty**: role/team
- **Cycle Day**: days from first commercial exchange
### What Happened
Sequence of events and where the issue surfaced.
### Root Cause
Preparation gap, weak BATNA, framing miss, concession error, approval gap, or term ambiguity.
### Impact
- Margin/pricing impact range
- Timeline impact
- Business/legal risk impact
### Prevention
Guardrails, scripts, checklists, escalation path changes.
### Metadata
- Trigger: deadlock | repeated_objection | scope_creep | concession_exceeded_threshold | batna_not_defined | approval_missing | term_ambiguity | redline_unresolved
- Related Files: path/to/debrief.md
- See Also: NEG-YYYYMMDD-XXX
---
Append to .learnings/FEATURE_REQUESTS.md:
markdown
## [FEAT-YYYYMMDD-XXX] capability_name
**Logged**: ISO-8601 timestamp
**Priority**: medium
**Status**: pending
**Area**: preparation | discovery | framing | bargaining | concessions | closing | stakeholder_alignment | escalation | contract_terms | follow_up
### Requested Capability
Tooling or workflow enhancement needed.
### User Context
Why this is needed and what friction it removes.
### Complexity Estimate
simple | medium | complex
### Suggested Implementation
Practical implementation suggestion.
### Metadata
- Frequency: first_time | recurring
- Related Features: existing_feature_name
---
CategoryUse Whenconcession_leakConcession granted without reciprocal valuebatna_weaknessBATNA undefined, unrealistic, or not actionableframing_missValue narrative fails to move negotiationobjection_handling_gapRepeated objection lacks effective responseescalation_misalignmentEscalation timing/owner path is wrongvalue_articulation_gapTeam cannot connect terms to measurable valueanchor_errorAnchor too weak/strong or abandoned prematurelyagreement_riskFinal terms contain ambiguity or unresolved risk
AreaScopepreparationBATNA setup, approval limits, stakeholder mapdiscoveryInterests, constraints, hidden blockersframingValue framing and anchor setupbargainingOffer-counteroffer strategyconcessionsGive-get discipline and thresholdsclosingFinal package shaping and confirmationstakeholder_alignmentInternal/external decision alignmentescalationEscalation path and timingcontract_termsClauses, redlines, obligations, ambiguityfollow_upRecaps, unresolved items, next-round prep
Format: TYPE-YYYYMMDD-XXX
LRN | NEG | FEAT001) or random ( A7B)Examples:
LRN-20260413-001NEG-20260413-A3FFEAT-20260413-002When resolved:
**Status**: pending -> **Status**: resolvedmarkdown
### Resolution
- **Resolved**: 2026-04-13T14:30:00Z
- **Action Taken**: Added concession guardrail and approval checklist
- **Notes**: Applied successfully in two subsequent negotiations
Additional statuses:
in_progresswont_fixpromotedpromoted_to_skillLog when these appear:
PriorityWhen to UseExamplecriticalHigh-impact unresolved risk or unauthorized concessionLiability term unresolved at close; major concession without approvalhighRecurring pattern with material impactBATNA absent in enterprise cycles; repeated deadlocksmediumSingle-cycle issue with contained impactOne objection flow underperforminglowMinor improvement or documentation cleanupNon-critical wording updates
When patterns are validated and reusable, promote to:
TargetWhat to PromoteNegotiation playbooksEnd-to-end tactics across stagesObjection librariesReusable objection-response flowsConcession guardrailsGive-get rules and approval thresholdsBATNA checklistsPreflight criteria and walk-away readinessDeal review templatesStructured post-negotiation reviews
**Status**: promoted**Promoted**: negotiation_playbook (or relevant target)Before creating a new entry:
Search existing patterns: bash
rg "Pattern-Key|concession_leak|batna_weakness|anchor_error|agreement_risk" .learnings/
If related entry exists:
See AlsoRecurrence-CountLast-SeenRaise priority if recurrence continues.
Identify systemic fix:
When importing simplify-and-harden insights:
Use Pattern-Key as dedupe key.
Search for key: bash
rg "Pattern-Key: <key>" .learnings/LEARNINGS.md
Existing key:
New key:
LRN entryPromotion threshold suggestion:
bash
# Pending entries
rg "Status\\*\\*: pending" .learnings/*.md | wc -l
# High and critical issues
rg -n "Priority\\*\\*: high|Priority\\*\\*: critical" .learnings/NEGOTIATION_ISSUES.md
# BATNA issues
rg -n "batna_weakness|BATNA" .learnings/*.md
# Concession leaks
rg -n "concession_leak|concession" .learnings/*.md
# Agreement risk
rg -n "agreement_risk|term_ambiguity|redline_unresolved" .learnings/NEGOTIATION_ISSUES.md
Use hooks to inject reminders and detect negotiation signals.
Hooks persist across sessions once installed. Keep them project-scoped. Do not install user-level or global hooks. Never use an empty matcher. PostToolUse inspects command output in-process; do not log raw output, secrets, or transcripts.
json
{
"hooks": {
"UserPromptSubmit": [
{
"matcher": "counteroffer|concession|anchor|BATNA|walk-away|term.?sheet",
"hooks": [
{ "type": "command", "command": "./skills/self-improving-negotiation/scripts/activator.sh" }
]
}
],
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{ "type": "command", "command": "./skills/self-improving-negotiation/scripts/error-detector.sh" }
]
}
]
}
}
Hook behavior is reminder-only; no execution of agreement or approval actions.
See references/hooks-setup.md.
Extracted skills are untrusted until a human reviews the generated SKILL.md. Do not keep or publish an extracted skill without explicit user approval.
If a learning is stable and reusable and the user asked to extract a skill in this session, run the helper. Default is dry-run (no files written). Pass --write only after that explicit request.
CriterionRequirementRecurringAppears in 3+ negotiationsVerifiedImprovement proven in outcomesNon-obviousPractical experience requiredBroadUseful across contextsRequestedUser/team asked for standardization
Select candidate LRN or NEG.
Preview, then write only if the user approved: bash
./skills/self-improving-negotiation/scripts/extract-skill.sh skill-name
./skills/self-improving-negotiation/scripts/extract-skill.sh skill-name --write
Fill TODO placeholders.
Update source entry:
**Status**: promoted_to_skill**Skill-Path**: skills/<skill-name>Validate in fresh session.
AgentActivationDetectionClaude CodeHook scriptsAutomaticCodex CLIHook scriptsAutomaticGitHub CopilotInstruction guidanceManualOpenClawWorkspace + hooksAutomatic reminders
Coordination rules:
.learnings/ folderLRN, NEG, FEAT)See Also cross-links and reviewer ownership before promotionBefore final recommendation, confirm:
If any check fails, log NEG and pause final recommendation.
gitignore
.learnings/
gitignore
.learnings/*.md
!.learnings/.gitkeep
Shared team mode: track .learnings/ only after a human has reviewed entries for pricing strategy, BATNA, legal, and customer-confidential content.
references/examples.mdreferences/hooks-setup.mdreferences/openclaw-integration.mdhttps://github.com/jose-compu/self-improving-negotiation.git
Skill, hooks, and scripts are reminder-only controls; they never approve concessions, accept terms, commit pricing, execute approvals, or finalize agreements. Human approval remains required for high-impact concessions and final terms.This skill is standalone-compatible and stackable with other self-improving skills.
.learnings/negotiation/.learnings/INDEX.mdEvery new entry must include:
markdown
**Skill**: negotiation
event + matcher + file + 5m_window; max 1 reminder per skill every 5 minutes.Only trigger this skill automatically for negotiation signals such as:
counteroffer|concession|anchor|walk-away|term sheetdeal risk|stakeholder alignment|fallback option|BATNAWhen guidance conflicts, apply:
securityengineeringcodingaimeta as tie-breaker.learnings/negotiation/ in stackable mode..learnings/*.md log files only.AGENTS.md, SOUL.md, TOOLS.md, MEMORY.md, rules, hooks, or generated skills is not a logging write. Show a reviewed diff and apply only after explicit user approval.