create_knowledge_doc
Create a knowledge/documentation entry for a project — a convention, workflow note, metric definition, reference guide, or ADR to persist across sessions and be surfaced back to you (or other agents) as context. Call list_knowledge_docs first to check a similar doc doesn't already exist: there is no update tool yet, so calling this again produces a duplicate, not an overwrite — delete_knowledge_doc the stale one first if you need to replace it. Cannot target "global" (read-only).
ADRs (type "adr") are Architecture Decision Records — one specific architectural decision, not a general note. content MUST include a "## Context", "## Decision", and "## Consequences" section (any other structure is rejected) — write Context as the problem/forces at play, Decision as specifically what was decided (concrete enough that a future agent can check compliance against it), and Consequences as what becomes easier/harder as a result. ADRs are never deleted once accepted — to reverse one, create a new ADR and set the old one's status to "superseded" (via update_knowledge_doc's adrStatus) with supersededBy pointing at the new one's id. An accepted ADR gets synced into a coding-agent repo automatically the next time a task runs there (see repoUrl below for which one), and is injected into every agent's context for that project going forward — so only record a decision here once it is actually decided, not while still exploring options (use adrStatus "proposed" for that, the default).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Optional free-form tags to help filter/search this doc later | |
| type | Yes | Doc category: "metric" (a KPI/number definition), "workflow" (how the team works — process, cadence, handoffs), "convention" (a rule/standard the team follows), "guide" (general reference material), or "adr" (a single architectural decision record — see this tool's own description for the required content shape). | |
| title | Yes | Short, searchable title for this doc | |
| content | Yes | The doc's full body text. For type "adr", must contain ## Context, ## Decision, and ## Consequences sections. | |
| repoUrl | No | Only meaningful for type "adr". A PROJECT can have several actual git repos behind it (a frontend, a backend, separate microservices...) — if this decision is about ONE specific repo, name it here ("owner/repo" or a full github.com URL) so it only ever syncs into that repo's docs/adr/ and only that repo's coding-agent tasks get checked against it. Omit for a decision that genuinely applies across every repo in the project (or if you're not sure yet) — that's the safe default, not a shortcut to avoid thinking about it. | |
| adrStatus | No | Only meaningful for type "adr". "proposed" (default) while still under discussion, "accepted" once decided (this is what triggers repo-sync and context injection), or "superseded" if this record is being created already-replaced by another (rare — normally you accept first, then supersede later via update_knowledge_doc). | |
| projectId | Yes | The project this doc belongs to — any project id used elsewhere with mFlow (Jira, Trello, or standalone). Must already exist. Cannot be "__global__", which is read-only. |