This file provides guidance to Claude Code when working with code in this repository.
hiivmind-blueprint-lib is a type definition library for the hiivmind-blueprint workflow system. It provides:
- 43 consequence types - Operations that workflows can execute
- 27 precondition types - Conditions workflows can check
- 5 node types - Building blocks for workflow graphs
- 1 reusable workflow - Intent detection with 3-valued logic
The key paradigm: LLM-as-execution-engine. Type definitions include effect pseudocode that the LLM interprets directly - no traditional runtime engine required.
All types are consolidated into single YAML files per category:
consequences/consequences.yaml # All 43 consequence types
preconditions/preconditions.yaml # All 27 precondition types
nodes/workflow_nodes.yaml # All 5 node types
execution/engine_execution.yaml # Execution engine semantics
Each directory also has:
index.yaml- Registry pointing to the consolidated file_deprecated/- Old directory structure (do not modify)
schema/
├── definitions/ # Type definition schemas (consequence, precondition, node, execution)
├── authoring/ # Workflow authoring schemas (workflow, node-types, intent-mapping)
├── runtime/ # Runtime schemas (logging)
├── config/ # Configuration schemas (output-config, prompts-config)
├── resolution/ # Type loading schemas
└── common.json # Shared definitions
When modifying YAML type definitions, you MUST also update related files to prevent divergence.
Any change to these files:
consequences/consequences.yamlconsequences/index.yamlpreconditions/preconditions.yamlpreconditions/index.yamlnodes/workflow_nodes.yamlnodes/index.yamlexecution/engine_execution.yamlexecution/index.yaml
MUST be synchronized with:
| Location | Purpose |
|---|---|
schema/ (this repo) |
JSON schemas must match YAML structure |
examples/ (this repo) |
Usage examples must reflect current API |
hiivmind-blueprint-author/references/ |
Reference documentation for authors |
hiivmind-blueprint-author/lib/patterns/ |
Pattern libraries using these types |
Before completing any YAML change:
-
Schema sync - Update JSON schemas in
schema/if:- New parameters added
- Parameter types changed
- Required/optional status changed
- New type added
-
Example sync - Update
examples/if:- Type behavior changed
- New type added
- Parameters renamed or removed
-
External reference sync - Check and update:
/home/nathanielramm/git/hiivmind/hiivmind-blueprint-author/references//home/nathanielramm/git/hiivmind/hiivmind-blueprint-author/lib/patterns/
When analyzing or planning changes to type definitions, ALWAYS consider impact on:
- Schema validation (will existing workflows fail validation?)
- Examples (do they still work?)
- External documentation (is it now incorrect?)
- Pattern libraries (do patterns use the changed type?)
Each type follows this structure:
type_name:
description:
brief: One-line description
detailed: Extended explanation (optional)
category: category_name
parameters:
- name: param_name
type: string|boolean|number|object|array
required: true|false
default: value (if not required)
description: What this parameter does
payload:
kind: state_mutation|tool_call|composite|display
effect: |
# Pseudocode that the LLM interprets
state.computed[params.store_as] = resultThe intent category uses Kleene 3-valued logic:
T(True) - Definite matchF(False) - Definite non-matchU(Unknown) - Uncertain or "don't care" (in rules)
Key types: evaluate_keywords, parse_intent_flags, match_3vl_rules, dynamic_route
-
Open the appropriate consolidated file:
consequences/consequences.yamlfor consequencespreconditions/preconditions.yamlfor preconditions
-
Add the type definition following the schema structure
-
Update
package.yamlstats if needed -
Update README.md type counts if changed
Edit execution/engine_execution.yaml. This contains the complete execution engine pseudocode including:
- Traversal logic (3-phase model)
- State management
- Consequence dispatch
- Precondition evaluation
- Logging configuration
JSON schemas in schema/ define valid structures. Key schemas:
schema/definitions/consequence-definition.jsonschema/definitions/precondition-definition.jsonschema/definitions/node-definition.json
This library follows semantic versioning:
| Change Type | Version Bump |
|---|---|
| Remove type or required parameter | Major |
| Change parameter semantics | Major |
| Add new types | Minor |
| Add optional parameters | Minor |
| Documentation fixes | Patch |
Current version: Check package.yaml
- Main branch:
main - PRs to
mainmust come fromrelease/*orhotfix/*branches — enforced by CI (Validate PR Source Branchrequired check) - Use
/prepare-releaseto automate: create release branch, bump version, update changelog, and open PR tomain - Releases are tagged (e.g.,
v2.0.0,v2.1.0) automatically when PRs tomainare merged - Workflows reference specific versions via GitHub raw URLs
- See
RELEASING.mdfor the full release process
This project uses hiivmind-pulse-gh for GitHub automation.
Route ALL GitHub operations through the plugin for automatic context enrichment:
/hiivmind-pulse-gh:hiivmind-pulse-gh create issue for [description]/hiivmind-pulse-gh:hiivmind-pulse-gh discoverto explore capabilities
Since types are interpreted by LLMs (not compiled code), validation focuses on:
- Schema compliance - JSON schemas validate structure
- Pseudocode clarity -
effectblocks must be unambiguous - Parameter completeness - Required params must be documented
- Example coverage - Types should have usage examples
This library has no runtime dependencies. It's fetched via raw GitHub URLs:
https://raw.githubusercontent.com/hiivmind/hiivmind-blueprint-lib/v2.0.0/
Consuming workflows specify the version in their definitions block.