references
The built-in Policy references, against a turn that ends with failing lint, unsaved work or an incomplete hand-off: its defaults, its options and a configuration that writes it.
To learn what it guards against and see it at work, read the guide: Stop checks and hand-off.
Defaults
| Default | Value |
|---|---|
| On by default | no: an entry turns it on |
| Fail mode | open |
| Timeout | 10000 ms |
| Events | Stop |
| Tools | every tool, or as its options set |
| Agent types | every agent, or as its options set |
Options
| Option | Type | Default | Description |
|---|---|---|---|
keyPrefixes | string[] | — | The project prefixes of tracker keys; without it, the tracker projects of the repository's project, and without either no tracker key is looked for. |
kinds | ("hash_number" | "owner_repo_number" | "pr_word_number" | "tracker_key")[] | — | The kinds of reference it looks for; all four when absent. |
ruleDoc | string | — | A document the refusal names for how references are written. |
Example
A configuration that writes every option, a comment above each:
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: 'references',
// The constructor's options, which it decodes.
options: {
// The project prefixes of tracker keys; without it, the tracker projects of the
// repository's project, and without either no tracker key is looked for.
keyPrefixes: ['SHOP'],
// The kinds of reference it looks for; all four when absent.
kinds: ['hash_number'],
// A document the refusal names for how references are written.
ruleDoc: 'docs/references.md',
},
// The name of the kit's Policy constructor that builds the Policy.
use: 'references',
},
],
});pull-request
The built-in Policy pull-request, against a turn that ends with failing lint, unsaved work or an incomplete hand-off: its defaults, its options and a configuration that writes it.
status-sync
The built-in Policy status-sync, against a turn that ends with failing lint, unsaved work or an incomplete hand-off: its defaults, its options and a configuration that writes it.