Skip to Content
harness-kit

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

DefaultValue
On by defaultno: an entry turns it on
Fail modeopen
Timeout10000 ms
EventsStop
Toolsevery tool, or as its options set
Agent typesevery agent, or as its options set

Options

OptionTypeDefaultDescription
keyPrefixesstring[]—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.
ruleDocstring—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',
    },
  ],
});

On this page