Moving to 0.2: repo folders and topic files
0.2 adds two layouts. Both are optional: a 0.1 knowledge base keeps working as it is.
- Repo folders: one KB for several code repos,
knowledge/<repo>/<area>/, with shared rules inknowledge/core/. A session gets the shared rules plus its own repo’s, never another repo’s. - Topic files: rules grouped into one file per topic,
knowledge/<repo>/<area>/<topic>.md, one##section per rule, instead of one file per rule.
homeostat migrate moves a 0.1 KB into repo folders and, with --topics, into topic files as well.
Before you start
Section titled “Before you start”- Upgrade the CLI pin in your CI files and the plugin to 0.2 (
claude plugin update homeostat@homeostat). - Decide or close the open
homeostat/PRs:migratemoves every file, so an open PR would conflict. It asks the host and stops if one is open (--skip-pr-checkwhen you have no token at hand and know there is none). - Work on a branch of the KB checkout.
One code repo
Section titled “One code repo”homeostat migrate --dry-run # the plan: every move, and the new confighomeostat migrate --topics --dry-run # also group the rules into topics the model proposeshomeostat migrate --topics- The repo’s short name defaults to its own name on the host; set it with
--repo api. --sharedkeeps thecorerules inknowledge/core/for repos you add later; without it, they move toknowledge/<repo>/core/.--topicsasks the model once per repo (and once for the shared rules) for a topic list, a name and a one-line description each, covering every rule. It writes the list intorepos.<name>.topicsand folds the rules into topic files. Rename or merge topics in the PR: the list is the team’s to approve.
Several code repos
Section titled “Several code repos”When one KB already serves several repos, say which repo each area belongs to:
homeostat migrate --map integrations=api --map frontend=web --shared --dry-runAfter it runs
Section titled “After it runs”migrate rewrites homeostat.yaml (keeping its comments): areas and sources.repos become repos.<name>.{source, areas, topics}, and migrated.on and migrated.areas record what moved where. Then:
homeostat codeowners # owners per repo folderhomeostat validategit diff --stat # review, commit on a branch, open a PROnce it merges:
- the daily run files each new lesson under the repo its PR came from, and the drafter picks its topic from the list (a new topic sends the lesson to a reviewer)
learntakes the repo from the comment URL or the checkout’s remote, and--topic(else a word match, elsegeneral)- developers’ pending lessons move to the new paths on their next sync
- the dashboard filters by repo, and
exportwrites each repo’s own rules
To add a repo later, add it under repos with its source and areas, and run homeostat bootstrap --repo <name> for a first base.