# Decision Tree Template Pack

This pack records neutral, pre-decision branching logic. It keeps the editable source, structured data, validation rules, and accessible views together so reviewers can inspect the same tree in several formats.

The included Harbor Finch example is fictional. It maps documentation-readiness questions only. It does not recommend an option, approve work, score a person or organization, define or execute a workflow, diagnose a root cause, predict an outcome, or automate a regulated decision.

## Files

- `decision-tree-template.md`: blank planning worksheet
- `decision-tree-example.md`: completed fictional worksheet
- `decision-tree-example.json`: canonical structured example
- `decision-tree.schema.json`: closed JSON Schema Draft 2020-12 contract
- `decision-tree-example.mmd`: editable Mermaid projection
- `decision-tree-example.svg`: accessible visual projection
- `decision-tree-description.md`: visible structured long description
- `project-decision-tree.mjs`: dependency-free deterministic projector
- `validate-decision-tree.mjs`: dependency-free semantic validator
- `validate-decision-tree.test.mjs`: mutation tests for invalid states
- `pack-manifest.mjs`: exact archive allowlist
- `build-pack.mjs`: deterministic ZIP builder

## Use the worksheet

1. State the narrow purpose and what the tree cannot decide.
2. Give every question an evidence or assumption reference.
3. Write mutually distinguishable branch labels.
4. End each path in an information need, external handoff, candidate path, or stop-and-escalate state.
5. Keep approvals, recommendations, scoring, diagnosis, predictions, and regulated decisions outside the tree.
6. Update the canonical JSON, then regenerate the Mermaid, SVG, and long description.

## Verify and rebuild

Node.js 20 or later is sufficient. The scripts have no package dependencies.

```sh
npm test
npm run validate
npm run project
npm run build
```

`npm run project` validates the canonical JSON before replacing the generated views. `npm run build` creates `decision-tree-template-pack.zip` with a fixed file order, timestamp, mode, and byte representation.

## Accessibility

The SVG has a programmatic title and description, but the visible `decision-tree-description.md` remains the primary detailed text alternative. Review the visual and the long description together after every graph change.

## Boundary

This is an informational documentation artifact for low-stakes review. A terminal node records only what information, handoff, or candidate path is present. It is not an approval, recommendation, authorization, score, workflow result, root-cause finding, model prediction, regulated decision, or guaranteed outcome.
