Feature
Pluggable methodologies
Kanbus describes the board and nothing else. How your team specifies behavior, uses branches or keeps code risk down comes from methodologies you choose, replace or write yourself.
Kanbus has no opinion about how you build software. Its generated agent instructions cover board mechanics: issue types, the hierarchy, workflows and commands. Everything about process, such as how behavior is specified, how branches are used and how change risk is kept low, comes from methodologies.
A methodology is a Markdown document, with a few lines of frontmatter, that Kanbus assembles into CONTRIBUTING_AGENT.md. Every agent that works in the repository reads the same process, in the order you chose.
Two are built in
bdd is outside-in Behavior-Driven Design. Behavior is specified in Gherkin before code, stories carry the specification, and every specification must pass.
git-flow keeps develop for continuous integration and main for releases, with short-lived feature and hotfix branches. Board changes go straight to develop.
Both are on by default, so a new project gets the same guidance as before. Choose different ones in .kanbus.yml:
methodologies:
- bdd
- git-flow
An empty list gives core guidance only, with no Gherkin and no branch rules. Nothing about specifications or branching is built into Kanbus itself.
Write your own
A methodology is a folder in your repository with a METHODOLOGY.md inside. Name it, give it a title, and write the guidance for your agents.
---
name: crap
title: CRAP Reduction
tools:
- name: report
command: tools/crap-report
purpose: Report the CRAP score of every Python function in files changed since the base branch, worst first.
---
## CRAP Reduction
Run the report before and after your change, and leave the functions you touched with a lower score.
List the folder next to the built-ins, or in place of one. A bundle that declares the same name as a built-in replaces it, so a team can fork bdd without forking Kanbus.
methodologies:
- path: methodologies/house-bdd # declares name: bdd
- git-flow
- path: methodologies/crap
Methodologies can ship tools
A methodology that comes with a script teaches agents how to run it. Kanbus adds each declared tool to the agents file with the exact command, and runs it for them from the repository root:
kbs methodology run crap report
The example in the Kanbus repository is a CRAP report. A CRAP score combines a function's cyclomatic complexity with how little of it the tests cover, and the report ranks the functions you changed by that score, so agents know where to simplify first.
See what is active
kbs methodology list
kbs methodology show git-flow
kbs doctor
list marks the active methodologies and shows where each comes from. show prints the guidance as it will appear in the agents file. doctor fails when a configured methodology cannot be loaded and warns when CONTRIBUTING_AGENT.md has drifted from what your configuration generates.
Learn more
- Methodologies for the bundle format, tool rules and every command.
- Configuration for the
methodologiessetting. - Related features: Policy as code, Command line, Lifecycle hooks.