Markdown Converter
Agent skill for markdown-converter
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
GOTN (Goal-Oriented Task Network) is a recursive workflow orchestration framework that unifies knowledge acquisition, artifact production, decision-making, and validation under a single abstraction: the WorkNode.
# Create virtual environment and install uv venv uv pip install -e ".[dev]" # Run CLI gotn --help gotn init "Your goal" --mode epistemic gotn run --continuous gotn status --tree # Run tests pytest tests/
The CLI is installed as
gotn and provides commands for initializing goal trees, running nodes, checking status, and managing the workflow.
The core insight: questions and objectives are the same thing at different abstraction levels. A question is an objective with
deliverable_type: knowledge; a build task produces artifact; a decision produces commitment; a validation produces verification.
Nodes follow a formal lifecycle with event-driven transitions:
stateDiagram-v2 [*] --> PENDING PENDING --> READY: dependencies_met READY --> RUNNING: start RUNNING --> BLOCKED: spawn_child BLOCKED --> RUNNING: children_done RUNNING --> COMPLETE: confidence >= threshold RUNNING --> DEGRADED: budget exhausted RUNNING --> ESCALATED: human required RUNNING --> FAILED: error
Key transitions:
dependencies_met: pending → readystart: ready → running (if within MAX_CONCURRENT_NODES)spawn_child: running → blockedchildren_done: blocked → runningcancel: any non-terminal → cancelled (cascades to children)| Edge Type | Blocking? | Cycle Detection | Behavior |
|---|---|---|---|
| Yes | Included | Must complete before source starts |
| Conditional | Included | Risk monitoring; triggers escalation on failure |
| No | Excluded | Opportunistic waiting; retroactive integration |
| No | Excluded | Unlocks target when source completes |
| N/A | Excluded | Parent-child; cascades cancellation |
| N/A | Excluded | Replaces old node; migrates dependencies |
docs/ ├── architecture.md # Complete GOTN specification with state machine ├── worknode-schema.md # TypeScript/JSON/YAML interface definitions (comprehensive) ├── mechanisms.md # Control mechanisms (shipping gates, VOI, caching, etc.) └── examples/ └── bedtime-story-pipeline.md # Worked example with full node definitions
src/gotn/ ├── __init__.py # Package exports ├── node.py # WorkNode Pydantic models (Goal, Criterion, Budget, etc.) ├── state.py # State machine + StateManager persistence ├── scheduler.py # DAG scheduling with priority queue, cycle detection ├── executor.py # Claude Code subprocess execution ├── confidence.py # Confidence aggregation with recency decay ├── cache.py # Semantic cache (L1 exact + L2 vector similarity) └── cli.py # Typer CLI (gotn command) src/prompts/ # Mode-specific prompt templates .claude/skills/ # Claude Code skill for /gotn command
claude --print --dangerously-skip-permissions subprocessdocs/worknode-schema.md for complete TypeScript interfaces and JSON Schemamust_pass criteria use minimum, others use weighted meancomplete, degraded, escalated, failed, cancelledproduction_anchor for what they enabledomain field for proper recency decay calculationblocks and depends_on both participate in deadlock prevention