Knowledge Basephilsj

Start here — reading and amending the KB

onboardingactive owner: philip · updated 2026-11-14

relates: agent-skill-packaging

Onboarding — reading and amending the KB

This is the front door. Read this first, whether you are human or an AI agent.

What this is

The company knowledge base: every pattern, component, infrastructure choice, DSL element, copy rule, decision, audience fact, regulation decode, market analysis, and framework idea in one git-canonical repo. Humans write markdown; scripts/compile.py projects it to machine/*.dsl; AI agents read only the projections and cite entries as kb:<id>.

Reading (published site)

Amending (the only write path)

All changes arrive via pull request — never push to the default branch (SEC-02). The workflow:

  1. Clone the repo; read AGENTS.md, SPEC.md, types.dsl.
  2. Search machine/index.dsl — amend an existing entry rather than duplicating.
  3. Pick the directory matching the type (directory name = type name). Never invent one.
  4. Read instructions/ai/<type>.md and follow templates/<type>.md.
  5. One entry per file; file name = entry id; flat frontmatter (id, type, title, status, owner, updated + optional relates, uses).
  6. Never include secrets (SEC-01) — the compiler rejects them.
  7. Run python3 scripts/compile.py in the same commit as the content change. machine/ is generated — never hand-edit it.
  8. Verify: python3 scripts/compile.py --check and the unit tests.
  9. Open a PR; CI runs the drift gate.

The installable agent skill skills/knowledge-base/SKILL.md encodes this exact workflow for Claude Code / Cursor / Devin.

Install the agent skills

Skills live in skills/<name>/SKILL.md in this repo. Install by copying the skill folder into your agent's skills directory (e.g. .agents/skills/ in a project, or your agent's global skills path):

# from a clone of this repo
cp -r skills/knowledge-base skills/learner-retro .agents/skills/

Or from the zip: unzip and place each folder so <skills-dir>/knowledge-base/SKILL.md and <skills-dir>/learner-retro/SKILL.md exist.

skilluse
knowledge-baseauthor or amend KB entries — enforces the compile gate and PR-only workflow
learner-retroextract learnings (rules, acceptance criteria, DoD gaps) from finished work into KB entries, high-level to detailed

Type map

typediruse for
onboardingonboarding/front-door guides (this entry)
industryindustry/segment-specific knowledge (regulatory landscape, buyer, GTM)
factoryfactory/monorepo system topics (pipeline, harness, infra seams)
productproduct/product commitments: ACs, pricing, beat-market, notify-market
patternpatterns/UI layout archetypes
componentcomponents/reusable UI components
infrastructureinfrastructure/infra/tooling with configs
dsldsl/DSL language elements (qform/qapp/flow)
copycopy/copy/text guidance per channel
decisiondecisions/architecture/product decisions
contextcontext/brand voice, audiences, product facts
regulationregulations/decoded instruments, traceable criteria
marketmarket/competitor/pricing/positioning analyses
frameworkframeworks/reusable architecture ideas from shipped code
skillsskills/agent-skill catalog: triggers, contract, version, install
instructionsinstructions/meta-docs about the KB itself

Sources