Presets
The kit's ready-made configuration values, generated from its code: command tables, formatters and the git conventions.
Command presets
{ use: 'command-policy', id: '…', options: { preset: '…' } } guards a command line with a preset's tables; a field written beside preset replaces the preset's. Each preset below is shown as the entries it stands for, one a table, every option with a comment saying what it does. package-manager refuses the commands of every package manager but the project's own.
argocd
{ use: 'command-policy', id: 'argocd', options: { preset: 'argocd' } } stands for:
import { defineConfig } from '@microeinhundert/harness-kit';
export default defineConfig({
// The Policy entries, in the order their Decisions merge in.
policies: [
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'argocd',
// The constructor's options, which it decodes.
options: {
// Words refused before anything else, among the tool's arguments or, with `anywhere`, in
// any word of any command.
alwaysDenyTokens: [
{
// Whether the word is refused in any word of any command the line runs, not only among
// the tool's arguments.
anywhere: true,
// The word that is refused wherever it stands.
token: 'argocd',
},
],
// What a command on no list gets: `allow` (the default), `ask` or `deny`.
default: 'deny',
// The fix the agent reads with every refusal, in place of the table's own.
message: 'Change the manifests in the repository and let the deployment sync them; ask the developer for anything else.',
// The program the table screens, by the last part of its path, such as `kubectl`; without
// it the table screens every command.
tool: 'argocd',
},
// The name of the kit's Policy constructor that builds the Policy.
use: 'command-policy',
},
],
});bun
{ use: 'command-policy', id: 'bun', options: { preset: 'bun' } } stands for:
import { defineConfig } from '@microeinhundert/harness-kit';
export default defineConfig({
// The Policy entries, in the order their Decisions merge in.
policies: [
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'bun',
// The constructor's options, which it decodes.
options: {
// The commands refused, as `allow` writes them.
deny: [
'a',
'add',
'i',
'install',
'link',
'remove',
'rm',
'unlink',
'update',
],
// Refuses the tool run without words (a bare `yarn`, which installs), with the deny list.
denyBare: false,
// When a refused command is let through: `outsideRepository`, when it surely runs in
// another repository.
exemptWhen: {
// Exempts a command that surely runs in another git repository than the session's,
// through a chain of plain `cd`s joined by `;` or `&&` before it, or through one of the
// `folderFlags`; a command whose folder is in doubt is not exempt.
outsideRepository: {
// Options that name the folder a command runs in, such as `--prefix <folder>`.
folderFlags: ['--cwd'],
},
},
// The options that take the next word as their value, such as `-n`; every other word that
// starts with `-` is an option on its own.
globalValueFlags: ['--cwd', '-c', '--config', '--registry'],
// The fix the agent reads with every refusal, in place of the table's own.
message: 'This repository uses another package manager: run the command with the one it uses.',
// The program the table screens, by the last part of its path, such as `kubectl`; without
// it the table screens every command.
tool: 'bun',
},
// The name of the kit's Policy constructor that builds the Policy.
use: 'command-policy',
},
],
});django-db
{ use: 'command-policy', id: 'django-db', options: { preset: 'django-db' } } stands for:
import { defineConfig } from '@microeinhundert/harness-kit';
export default defineConfig({
// The Policy entries, in the order their Decisions merge in.
policies: [
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'django-db',
// The constructor's options, which it decodes.
options: {
// Other names of the tool, such as `k`.
aliases: ['django-admin'],
// The commands refused, as `allow` writes them.
deny: ['flush', 'reset_db', 'reset_schema', 'sqlflush'],
// Word sequences that run the tool, such as `bundle exec`.
launchers: ['python', 'python3', 'uv run', 'poetry run'],
// The fix the agent reads with every refusal, in place of the table's own.
message: 'It empties or drops a database, and an agent never destroys local data: write a migration, or ask the developer to run it by hand.',
// The program the table screens, by the last part of its path, such as `kubectl`; without
// it the table screens every command.
tool: 'manage.py',
},
// The name of the kit's Policy constructor that builds the Policy.
use: 'command-policy',
},
],
});helm
{ use: 'command-policy', id: 'helm', options: { preset: 'helm' } } stands for:
import { defineConfig } from '@microeinhundert/harness-kit';
export default defineConfig({
// The Policy entries, in the order their Decisions merge in.
policies: [
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'helm',
// The constructor's options, which it decodes.
options: {
// The commands allowed, each a prefix of the command's words (`rollout status`, `*` for
// every command), inline or `{ file }` with one item per line.
allow: ['get', 'history', 'list', 'ls', 'status'],
// Where the context comes from: a flag (`context.flag`) or a command (`context.command`).
context: {
// The command that prints the context, its program and arguments, run once per command
// line when the flag is absent; a failed or empty answer leaves the context unknown.
command: ['kubectl', 'config', 'current-context'],
// The option that names the context on the command line, such as `--context`, also as
// `--context=<name>`; it is read anywhere in the command.
flag: '--kube-context',
// Options of the screened command copied into the command that prints the context, after
// its program.
passFlags: ['--kubeconfig'],
},
// What a command on no list gets: `allow` (the default), `ask` or `deny`.
default: 'deny',
// The commands refused, as `allow` writes them.
deny: [
'delete',
'install',
'plugin install',
'push',
'repo add',
'repo remove',
'rollback',
'uninstall',
'upgrade',
],
// The options that take the next word as their value, such as `-n`; every other word that
// starts with `-` is an option on its own.
globalValueFlags: [
'--kube-context',
'--kubeconfig',
'-n',
'--namespace',
'-o',
'--output',
'-f',
'--values',
'--set',
'--set-string',
'--version',
'--registry-config',
'--repository-cache',
'--repository-config',
],
// Commands allowed without the context being looked up, as `allow` writes them.
local: [
'completion',
'dependency list',
'env',
'help',
'lint',
'repo list',
'search',
'show',
'template',
'version',
],
// Patterns of production contexts, in which everything is refused.
production: ['prod'],
// The program the table screens, by the last part of its path, such as `kubectl`; without
// it the table screens every command.
tool: 'helm',
},
// The name of the kit's Policy constructor that builds the Policy.
use: 'command-policy',
},
],
});kubectl
{ use: 'command-policy', id: 'kubectl', options: { preset: 'kubectl' } } stands for:
import { defineConfig } from '@microeinhundert/harness-kit';
export default defineConfig({
// The Policy entries, in the order their Decisions merge in.
policies: [
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'kubectl',
// The constructor's options, which it decodes.
options: {
// Other names of the tool, such as `k`.
aliases: ['k'],
// The commands allowed, each a prefix of the command's words (`rollout status`, `*` for
// every command), inline or `{ file }` with one item per line.
allow: [
'api-resources',
'api-versions',
'auth can-i',
'cluster-info',
'describe',
'diff',
'events',
'explain',
'get',
'logs',
'rollout history',
'rollout status',
'top',
'wait',
],
// Words refused before anything else, among the tool's arguments or, with `anywhere`, in
// any word of any command.
alwaysDenyTokens: [
{
// The word that is refused wherever it stands.
token: 'apply',
},
],
// Where the context comes from: a flag (`context.flag`) or a command (`context.command`).
context: {
// The command that prints the context, its program and arguments, run once per command
// line when the flag is absent; a failed or empty answer leaves the context unknown.
command: ['kubectl', 'config', 'current-context'],
// The option that names the context on the command line, such as `--context`, also as
// `--context=<name>`; it is read anywhere in the command.
flag: '--context',
// Options of the screened command copied into the command that prints the context, after
// its program.
passFlags: ['--kubeconfig'],
},
// What a command on no list gets: `allow` (the default), `ask` or `deny`.
default: 'deny',
// The commands refused, as `allow` writes them.
deny: [
'annotate',
'apply',
'attach',
'autoscale',
'certificate',
'config delete-cluster',
'config delete-context',
'config delete-user',
'config rename-context',
'config set',
'config set-cluster',
'config set-context',
'config set-credentials',
'config unset',
'config use-context',
'cordon',
'cp',
'create',
'debug',
'delete',
'drain',
'edit',
'exec',
'expose',
'label',
'patch',
'port-forward',
'proxy',
'replace',
'rollout pause',
'rollout restart',
'rollout resume',
'rollout undo',
'run',
'scale',
'set',
'taint',
'uncordon',
],
// The options that take the next word as their value, such as `-n`; every other word that
// starts with `-` is an option on its own.
globalValueFlags: [
'--as',
'--as-group',
'--cache-dir',
'--certificate-authority',
'--client-certificate',
'--client-key',
'--cluster',
'--context',
'--kubeconfig',
'--profile',
'--profile-output',
'--request-timeout',
'--server',
'--tls-server-name',
'--token',
'--user',
'--v',
'--vmodule',
'-c',
'--config',
'--container',
'-f',
'--filename',
'-l',
'--selector',
'-n',
'--namespace',
'-o',
'--output',
'-s',
'-v',
],
// Commands allowed without the context being looked up, as `allow` writes them.
local: [
'completion',
'config current-context',
'config get-clusters',
'config get-contexts',
'help',
'kustomize',
'options',
'version',
],
// Patterns of production contexts, in which everything is refused.
production: ['prod'],
// The program the table screens, by the last part of its path, such as `kubectl`; without
// it the table screens every command.
tool: 'kubectl',
},
// The name of the kit's Policy constructor that builds the Policy.
use: 'command-policy',
},
],
});npm
{ use: 'command-policy', id: 'npm', options: { preset: 'npm' } } stands for:
import { defineConfig } from '@microeinhundert/harness-kit';
export default defineConfig({
// The Policy entries, in the order their Decisions merge in.
policies: [
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'npm',
// The constructor's options, which it decodes.
options: {
// The commands refused, as `allow` writes them.
deny: [
'add',
'ci',
'clean-install',
'ddp',
'dedupe',
'i',
'in',
'ins',
'install',
'install-clean',
'isntall',
'link',
'ln',
'prune',
'r',
'remove',
'rm',
'un',
'uninstall',
'unlink',
'up',
'update',
'upgrade',
],
// Refuses the tool run without words (a bare `yarn`, which installs), with the deny list.
denyBare: false,
// When a refused command is let through: `outsideRepository`, when it surely runs in
// another repository.
exemptWhen: {
// Exempts a command that surely runs in another git repository than the session's,
// through a chain of plain `cd`s joined by `;` or `&&` before it, or through one of the
// `folderFlags`; a command whose folder is in doubt is not exempt.
outsideRepository: {
// Options that name the folder a command runs in, such as `--prefix <folder>`.
folderFlags: ['--prefix'],
},
},
// The options that take the next word as their value, such as `-n`; every other word that
// starts with `-` is an option on its own.
globalValueFlags: [
'-w',
'-C',
'--workspace',
'--filter',
'--dir',
'--prefix',
'--registry',
'--cache',
'--userconfig',
'--globalconfig',
],
// The fix the agent reads with every refusal, in place of the table's own.
message: 'This repository uses another package manager: run the command with the one it uses.',
// The program the table screens, by the last part of its path, such as `kubectl`; without
// it the table screens every command.
tool: 'npm',
},
// The name of the kit's Policy constructor that builds the Policy.
use: 'command-policy',
},
],
});package-manager
{ use: 'command-policy', id: 'package-manager', options: { preset: 'package-manager' } } stands for:
import { defineConfig } from '@microeinhundert/harness-kit';
export default defineConfig({
// The Policy entries, in the order their Decisions merge in.
policies: [
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'package-manager',
// The constructor's options, which it decodes.
options: {
// The commands refused, as `allow` writes them.
deny: [
'a',
'add',
'i',
'install',
'link',
'remove',
'rm',
'unlink',
'update',
],
// Refuses the tool run without words (a bare `yarn`, which installs), with the deny list.
denyBare: false,
// When a refused command is let through: `outsideRepository`, when it surely runs in
// another repository.
exemptWhen: {
// Exempts a command that surely runs in another git repository than the session's,
// through a chain of plain `cd`s joined by `;` or `&&` before it, or through one of the
// `folderFlags`; a command whose folder is in doubt is not exempt.
outsideRepository: {
// Options that name the folder a command runs in, such as `--prefix <folder>`.
folderFlags: ['--cwd'],
},
},
// The options that take the next word as their value, such as `-n`; every other word that
// starts with `-` is an option on its own.
globalValueFlags: ['--cwd', '-c', '--config', '--registry'],
// The fix the agent reads with every refusal, in place of the table's own.
message: 'This repository uses another package manager: run the command with the one it uses.',
// The program the table screens, by the last part of its path, such as `kubectl`; without
// it the table screens every command.
tool: 'bun',
},
// The name of the kit's Policy constructor that builds the Policy.
use: 'command-policy',
},
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'package-manager-2',
// The constructor's options, which it decodes.
options: {
// The commands refused, as `allow` writes them.
deny: [
'add',
'ci',
'clean-install',
'ddp',
'dedupe',
'i',
'in',
'ins',
'install',
'install-clean',
'isntall',
'link',
'ln',
'prune',
'r',
'remove',
'rm',
'un',
'uninstall',
'unlink',
'up',
'update',
'upgrade',
],
// Refuses the tool run without words (a bare `yarn`, which installs), with the deny list.
denyBare: false,
// When a refused command is let through: `outsideRepository`, when it surely runs in
// another repository.
exemptWhen: {
// Exempts a command that surely runs in another git repository than the session's,
// through a chain of plain `cd`s joined by `;` or `&&` before it, or through one of the
// `folderFlags`; a command whose folder is in doubt is not exempt.
outsideRepository: {
// Options that name the folder a command runs in, such as `--prefix <folder>`.
folderFlags: ['--prefix'],
},
},
// The options that take the next word as their value, such as `-n`; every other word that
// starts with `-` is an option on its own.
globalValueFlags: [
'-w',
'-C',
'--workspace',
'--filter',
'--dir',
'--prefix',
'--registry',
'--cache',
'--userconfig',
'--globalconfig',
],
// The fix the agent reads with every refusal, in place of the table's own.
message: 'This repository uses another package manager: run the command with the one it uses.',
// The program the table screens, by the last part of its path, such as `kubectl`; without
// it the table screens every command.
tool: 'npm',
},
// The name of the kit's Policy constructor that builds the Policy.
use: 'command-policy',
},
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'package-manager-3',
// The constructor's options, which it decodes.
options: {
// The commands refused, as `allow` writes them.
deny: [
'add',
'dedupe',
'fetch',
'i',
'import',
'install',
'link',
'ln',
'prune',
'remove',
'rm',
'un',
'uninstall',
'unlink',
'up',
'update',
'upgrade',
],
// Refuses the tool run without words (a bare `yarn`, which installs), with the deny list.
denyBare: false,
// When a refused command is let through: `outsideRepository`, when it surely runs in
// another repository.
exemptWhen: {
// Exempts a command that surely runs in another git repository than the session's,
// through a chain of plain `cd`s joined by `;` or `&&` before it, or through one of the
// `folderFlags`; a command whose folder is in doubt is not exempt.
outsideRepository: {
// Options that name the folder a command runs in, such as `--prefix <folder>`.
folderFlags: ['-C', '--dir'],
},
},
// The options that take the next word as their value, such as `-n`; every other word that
// starts with `-` is an option on its own.
globalValueFlags: [
'-C',
'--dir',
'-F',
'--filter',
'--registry',
'--store-dir',
],
// The fix the agent reads with every refusal, in place of the table's own.
message: 'This repository uses another package manager: run the command with the one it uses.',
// The program the table screens, by the last part of its path, such as `kubectl`; without
// it the table screens every command.
tool: 'pnpm',
},
// The name of the kit's Policy constructor that builds the Policy.
use: 'command-policy',
},
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'package-manager-4',
// The constructor's options, which it decodes.
options: {
// The commands refused, as `allow` writes them.
deny: [
'add',
'dedupe',
'import',
'install',
'link',
'remove',
'unlink',
'up',
'upgrade',
'upgrade-interactive',
],
// Refuses the tool run without words (a bare `yarn`, which installs), with the deny list.
denyBare: true,
// When a refused command is let through: `outsideRepository`, when it surely runs in
// another repository.
exemptWhen: {
// Exempts a command that surely runs in another git repository than the session's,
// through a chain of plain `cd`s joined by `;` or `&&` before it, or through one of the
// `folderFlags`; a command whose folder is in doubt is not exempt.
outsideRepository: {
// Options that name the folder a command runs in, such as `--prefix <folder>`.
folderFlags: ['--cwd'],
},
},
// The options that take the next word as their value, such as `-n`; every other word that
// starts with `-` is an option on its own.
globalValueFlags: [
'--cwd',
'--registry',
'--cache-folder',
'--modules-folder',
],
// The fix the agent reads with every refusal, in place of the table's own.
message: 'This repository uses another package manager: run the command with the one it uses.',
// The program the table screens, by the last part of its path, such as `kubectl`; without
// it the table screens every command.
tool: 'yarn',
},
// The name of the kit's Policy constructor that builds the Policy.
use: 'command-policy',
},
],
});pnpm
{ use: 'command-policy', id: 'pnpm', options: { preset: 'pnpm' } } stands for:
import { defineConfig } from '@microeinhundert/harness-kit';
export default defineConfig({
// The Policy entries, in the order their Decisions merge in.
policies: [
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'pnpm',
// The constructor's options, which it decodes.
options: {
// The commands refused, as `allow` writes them.
deny: [
'add',
'dedupe',
'fetch',
'i',
'import',
'install',
'link',
'ln',
'prune',
'remove',
'rm',
'un',
'uninstall',
'unlink',
'up',
'update',
'upgrade',
],
// Refuses the tool run without words (a bare `yarn`, which installs), with the deny list.
denyBare: false,
// When a refused command is let through: `outsideRepository`, when it surely runs in
// another repository.
exemptWhen: {
// Exempts a command that surely runs in another git repository than the session's,
// through a chain of plain `cd`s joined by `;` or `&&` before it, or through one of the
// `folderFlags`; a command whose folder is in doubt is not exempt.
outsideRepository: {
// Options that name the folder a command runs in, such as `--prefix <folder>`.
folderFlags: ['-C', '--dir'],
},
},
// The options that take the next word as their value, such as `-n`; every other word that
// starts with `-` is an option on its own.
globalValueFlags: [
'-C',
'--dir',
'-F',
'--filter',
'--registry',
'--store-dir',
],
// The fix the agent reads with every refusal, in place of the table's own.
message: 'This repository uses another package manager: run the command with the one it uses.',
// The program the table screens, by the last part of its path, such as `kubectl`; without
// it the table screens every command.
tool: 'pnpm',
},
// The name of the kit's Policy constructor that builds the Policy.
use: 'command-policy',
},
],
});prisma-db
{ use: 'command-policy', id: 'prisma-db', options: { preset: 'prisma-db' } } stands for:
import { defineConfig } from '@microeinhundert/harness-kit';
export default defineConfig({
// The Policy entries, in the order their Decisions merge in.
policies: [
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'prisma-db',
// The constructor's options, which it decodes.
options: {
// The commands refused, as `allow` writes them.
deny: ['migrate reset'],
// Patterns an argument must match whole to be refused before anything else, such as
// `db:drop`.
denyArgs: ['--force-reset', '--accept-data-loss'],
// Word sequences that run the tool, such as `bundle exec`.
launchers: [
'bun x',
'bunx',
'npm exec',
'npx',
'pnpm dlx',
'pnpm exec',
'pnpm',
'yarn',
],
// The fix the agent reads with every refusal, in place of the table's own.
message: 'It drops a database or loses its data, and an agent never destroys local data: write a migration, or ask the developer to run it by hand.',
// The program the table screens, by the last part of its path, such as `kubectl`; without
// it the table screens every command.
tool: 'prisma',
},
// The name of the kit's Policy constructor that builds the Policy.
use: 'command-policy',
},
],
});rails-db
{ use: 'command-policy', id: 'rails-db', options: { preset: 'rails-db' } } stands for:
import { defineConfig } from '@microeinhundert/harness-kit';
export default defineConfig({
// The Policy entries, in the order their Decisions merge in.
policies: [
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'rails-db',
// The constructor's options, which it decodes.
options: {
// Other names of the tool, such as `k`.
aliases: ['rake'],
// Patterns an argument must match whole to be refused before anything else, such as
// `db:drop`.
denyArgs: [
'db:(?:drop|reset|purge|migrate:reset|schema:load|structure:load|setup)(?::all)?',
],
// Word sequences that run the tool, such as `bundle exec`.
launchers: ['bundle exec'],
// The fix the agent reads with every refusal, in place of the table's own.
message: 'It drops or reloads a database, and an agent never destroys local data: use a migration or a targeted fixture reload, or ask the developer to run it by hand.',
// The program the table screens, by the last part of its path, such as `kubectl`; without
// it the table screens every command.
tool: 'rails',
},
// The name of the kit's Policy constructor that builds the Policy.
use: 'command-policy',
},
],
});yarn
{ use: 'command-policy', id: 'yarn', options: { preset: 'yarn' } } stands for:
import { defineConfig } from '@microeinhundert/harness-kit';
export default defineConfig({
// The Policy entries, in the order their Decisions merge in.
policies: [
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'yarn',
// The constructor's options, which it decodes.
options: {
// The commands refused, as `allow` writes them.
deny: [
'add',
'dedupe',
'import',
'install',
'link',
'remove',
'unlink',
'up',
'upgrade',
'upgrade-interactive',
],
// Refuses the tool run without words (a bare `yarn`, which installs), with the deny list.
denyBare: true,
// When a refused command is let through: `outsideRepository`, when it surely runs in
// another repository.
exemptWhen: {
// Exempts a command that surely runs in another git repository than the session's,
// through a chain of plain `cd`s joined by `;` or `&&` before it, or through one of the
// `folderFlags`; a command whose folder is in doubt is not exempt.
outsideRepository: {
// Options that name the folder a command runs in, such as `--prefix <folder>`.
folderFlags: ['--cwd'],
},
},
// The options that take the next word as their value, such as `-n`; every other word that
// starts with `-` is an option on its own.
globalValueFlags: [
'--cwd',
'--registry',
'--cache-folder',
'--modules-folder',
],
// The fix the agent reads with every refusal, in place of the table's own.
message: 'This repository uses another package manager: run the command with the one it uses.',
// The program the table screens, by the last part of its path, such as `kubectl`; without
// it the table screens every command.
tool: 'yarn',
},
// The name of the kit's Policy constructor that builds the Policy.
use: 'command-policy',
},
],
});Formatter presets
{ use: 'format-on-edit', id: '…', options: { formatters: [{ preset: '…' }] } } runs the first formatter whose files take the edited file; {file} stands for it.
| Formatter | Files | Command | Only with | When missing |
|---|---|---|---|---|
biome | **/* | node_modules/.bin/biome format --write --files-ignore-unknown=true --no-errors-on-unmatched {file} | biome.json | run {install}; a fresh worktree has no node_modules |
gofmt | **/*.go | gofmt -w {file} | — | install Go, which brings gofmt |
oxfmt | **/* | node_modules/.bin/oxfmt --write --no-error-on-unmatched-pattern {file} | — | run {install}; a fresh worktree has no node_modules |
prettier | **/* | node_modules/.bin/prettier --write --ignore-unknown --log-level warn {file} | — | run {install}; a fresh worktree has no node_modules |
rubocop | **/*.rb, **/*.rake, **/*.gemspec, **/Gemfile, **/Rakefile, **/config.ru | rubocop --autocorrect {file} | .rubocop.yml | add rubocop to the Gemfile and run bundle install, or gem install rubocop |
ruff | **/*.py, **/*.pyi | ruff format {file} | — | install Ruff, such as with uv tool install ruff or pipx install ruff |
standardrb | **/*.rb, **/*.rake, **/*.gemspec, **/Gemfile, **/Rakefile, **/config.ru | standardrb --fix {file} | .standard.yml | add standard to the Gemfile and run bundle install, or gem install standard |
Git conventions
GIT_CONVENTIONS, exported by @microeinhundert/harness-kit, is a list of entries a configuration spreads into its policies. An id names one entry of a file, so a configuration changes an entry by mapping over the list, or filters it out and writes its own. Spreading it writes these entries:
import { defineConfig } from '@microeinhundert/harness-kit';
export default defineConfig({
// The Policy entries, in the order their Decisions merge in.
policies: [
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'branch-name',
// The name of the kit's Policy constructor that builds the Policy.
use: 'branch-name',
},
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'push-target',
// The name of the kit's Policy constructor that builds the Policy.
use: 'push-target',
},
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'stash-safety',
// The name of the kit's Policy constructor that builds the Policy.
use: 'stash-safety',
},
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'commit-subject',
// The name of the kit's Policy constructor that builds the Policy.
use: 'commit-subject',
},
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'readonly-agents',
// The name of the kit's Policy constructor that builds the Policy.
use: 'readonly-agents',
},
{
// The Policy's name, unique in the configuration; messages and logs name the Policy by it.
id: 'branch-switch',
// The name of the kit's Policy constructor that builds the Policy.
use: 'branch-switch',
},
],
});Configuration
Every key of harness.config.ts, with an example of each option, generated from the configuration Schema the kit decodes it with.
Protocol
The messages external Policies and adapters exchange with the kit, with an example of each field, generated from the JSON Schemas harness-kit protocol schema prints.