Save Learning Draft
save_learning_draftSaves a new technical knowledge card as a draft so agents can capture learnings now and verify them later.
Instructions
Save a new knowledge card. Cards from an agent always start in status "draft" — verification is a separate, later action.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"title": "<title>",
"type": "<type>",
"scope": "<scope>",
"applies_to": "<applies_to>",
"stack": "<stack>",
"version_range": "<version_range>",
"body": "<body>",
"source_commit": "<source_commit>",
"provenance": "<provenance>"
},
"name": "save_learning_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Card body in GitHub-flavored Markdown — never continuous prose. Break it into `##` sections (adapt names to the card type, e.g. Context/Decision/Why for a decision, or Symptom/Root Cause/Fix for a gotcha), each a short paragraph or bullet list. Use `> Note: ...` blockquote lines for caveats or exceptions worth flagging separately. For any technical detail (a type/interface, function signature, config shape, API/CLI call), include a real snippet in a fenced ```lang code block — do not just name it inline and describe it in prose; reserve single backticks for short identifiers with no snippet to show. This keeps rendering scannable across the web viewer, search snippets, and get_card output. | |
| type | Yes | Card type | |
| scope | Yes | Applicability scope | |
| stack | Yes | Tech stack tags this card applies to | |
| title | Yes | Card title (combined with type to derive the immutable card id) | |
| domain | No | Optional domain facet | |
| project | No | Project key from the repo's .knowledge-map.yaml, e.g. "acme/billing-api". Only for scope "project" cards; lowercased and trimmed on save, and a filesystem path is rejected. | |
| task_type | No | Optional task-type facet | |
| applies_to | Yes | Project/target identifiers this card applies to | |
| provenance | Yes | How this learning was derived | |
| supersedes | No | Id of an existing card this one supersedes — recorded as a pending marker only; the old card is left unchanged | |
| sensitivity | No | Defaults to "normal" | |
| source_repo | No | GitHub "owner/name" of the repo source_commit belongs to. Set it whenever source_commit is a sha: it is how merge promotion finds the commit and checks it reached the default branch. | |
| source_commit | Yes | Commit this learning came from: a bare sha (7-40 hex), nothing else, when there is one. Free text here ("working tree", "local changes") means merge promotion can never verify the card. | |
| version_range | Yes | Semver range this card applies to | |
| conflicts_with | No | Ids explicitly declared as conflicting with this card | |
| error_signature | No | Required (non-empty) when type is "gotcha" |