Knowledge Base
The knowledge base is the team memory for agentic coding. It stores decisions, session notes, project vocabulary, skill notes, agent patterns, and source-of-truth links.
Markdown First
Plain Markdown is the default:
This creates:
.coding-scaffold/KNOWLEDGE.md.coding-scaffold/knowledge.json.coding-scaffold/knowledge/
The generated knowledge base separates raw inputs from curated wiki pages, and includes scaffolding for decision records, session notes, reusable skills and agents, and the optional hierarchical-sharing layers:
Raw notes are source material. Curated wiki pages are the reviewable source of truth for agents.
The layered folders (team / department / unit / company) are optional — see
Hierarchical Sharing for when to use them.
Shared GitHub Or GitLab Memory
Use a shared remote when multiple people should contribute:
You can keep the knowledge base inside the project repo, or clone a separate repo into
.coding-scaffold/knowledge.
Hierarchical Sharing
Hierarchical sharing is an optional organization pattern. Start with structure before adding multiple remotes:
Use each layer for a different audience:
team: project facts, local prompts, first skill drafts, session findings.department: reusable runbooks, system patterns, validated agent roles.unit: domain vocabulary, reference architecture, shared provider policy.company: standards, approved skills, approved agents, security and privacy rules.
Use frontmatter to make ownership and promotion visible:
Use maturity levels as a trust ladder:
draft: captured from real work but not reviewed.validated: tried in at least one project and reviewed by peers.recommended: useful across multiple teams or systems.standard: approved default for this scope.
Promote knowledge upward by pull request. Keep secrets out of every layer. Use separate Git remotes only when access boundaries differ; otherwise one shared repo with folders, tags, and CODEOWNERS is easier to operate.
Check the current state:
The status command counts notes by scope and maturity, and flags missing frontmatter on layered
notes. It also distinguishes raw notes from curated wiki pages, flags missing owner,
last_reviewed, and source_refs, and warns when curated pages have not been reviewed recently.
The budget command estimates whether the knowledge base is still a healthy size for an agent
session. See Context Hygiene before compressing or loading large shared notes.
Create reviewable curated proposals from raw notes:
The first version is deterministic and review-first. It writes .new proposal files under
knowledge/wiki/ and never silently rewrites curated pages.
Do not treat raw agent chats as durable team knowledge. If your workflow captures conversation
output, distill it first: remove secrets and irrelevant history, compress repeated context, abstract
the reusable decision or pattern, and review the proposal before promoting it into wiki/.
Automatic chat ingestion, if added later, should follow that same proposal-first shape instead of
writing raw transcripts into the shared wiki.
Obsidian
Obsidian mode keeps Markdown as the source of truth while adding vault structure, backlinks, frontmatter templates, and graph-friendly navigation:
Use this when humans want a better reading and navigation layer. In WSL, install the desktop app on
Windows and open .coding-scaffold/knowledge as a vault.
Obsidian is free for personal use. Organizations of more than two people using Obsidian for business work need an Obsidian Commercial license (paid per user). If that's a blocker for your team, see the Foam section below — Foam is MIT-licensed and offers a similar workflow on top of VS Code.
Foam
Foam mode is a free, MIT-licensed alternative to Obsidian. It runs as a VS Code extension and
reads plain Markdown with [[wikilink]] syntax. The scaffold writes a self-contained VS Code
workspace under .coding-scaffold/knowledge/:
This generates:
.vscode/extensions.json— recommendsfoam.foam-vscodeon first open..vscode/settings.json— Foam workspace defaults (graph view, daily-note directory, ignore patterns for.git/and_repo/)..foam/templates/{decision,skill,agent}.md— Foam note templates.FOAM.md— entry note explaining the workflow.
Open .coding-scaffold/knowledge/ as a VS Code workspace and accept the extension recommendation
to enable backlinks, the graph view, and template-based note creation. The scaffold's curated
wiki/ pages keep standard relative-link Markdown so they render on GitHub; use [[wikilinks]]
in your own notes under raw/, sessions/, decisions/, and the layered scopes if you want
Foam's graph view to connect them.
Pick Foam over Obsidian when your organization needs commercial-friendly licensing or already standardizes on VS Code. Pick Obsidian when you want the dedicated desktop reading surface.
MemPalace
MemPalace mode adds notes for optional local semantic retrieval and MCP-compatible memory workflows:
Use this when the Markdown corpus grows large enough that search and semantic retrieval matter.
What To Capture
Good knowledge entries answer:
- what did we decide?
- why did we decide it?
- where is the source of truth?
- which skill or agent should use this?
- when should this knowledge be reviewed or removed?