Skip to content

specdog/collar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

201 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

collar — DAG-first agent harness

Version License: MIT Python Semver dotdog validate semver guard DAG savings

Entity→Target:verb(card) — ground truth via .dag files.

.dog = human spec format. .dag = agent runtime format. .md = last resort.

Collar is a DAG-first AI agent harness — it reads .dag files as its behavioral ground truth. Skills auto-compile from .dog specs into .dag edges. No prose config, no baked-in prompts. Just DAG paths.

Created by Justin DiClemente (@logohere) under specdog.

Forked from NousResearch/hermes-agent. Rebuilt as a DAG-first harness.

Install

git clone https://github.com/specdog/collar.git
cd collar
python3 -m venv .venv && source .venv/bin/activate
pip install -e .
npm install -g dotdog           # spec compiler for .dag files

Requires Python >= 3.11.

The first run takes a few seconds to load. After that, it's instant.

collar is at .venv/bin/collar. To use it from anywhere:

ln -s "$(pwd)/.venv/bin/collar" ~/.local/bin/collar

Or activate the venv first: source .venv/bin/activate.

I don't have an API key

Have an AI subscription? Use OAuth — no API key needed.

# ChatGPT Plus / Pro ($20/mo+)
collar auth add openai-codex

# xAI SuperGrok / Premium+
collar auth add xai-oauth

# Qwen Plus / Pro
collar auth add qwen-oauth

# Nous Portal (free tier OK)
collar auth add nous

Then collar model to pick your provider. Done.

More providers and troubleshooting: skills/subscription-oauth/SKILL.md.

Prefer API keys? Set OPENROUTER_API_KEY in ~/.dag/.env — one key, 200+ models, pay-per-token.

Quick Start

collar              # interactive chat
collar chat -q "..." # single query
collar setup         # first-time setup wizard

Architecture

Layer Source Format Loader
System prompt dags/*.dag (13 defaults) DAG-path plain text _load_dag_text()
Skills skills/*/SKILL.dag (auto-gen) DAG-path plain text skill_view()
Projects *.dag (dotdog compiled) JSON v2/v3 MCP dotdog

Key Numbers

  • 95% compression: 383k → 17k (skills)
  • 74% compression: 15k → 4k (system prompt)
  • 0 deepsuck refs: 6974+ renamed

Related

  • dotdog.dog spec format + compiler
  • specdog — the org
  • PRs use an agentic template: .github/pull_request_template.md

PR system

Collar PRs should stay lean and agentic:

  • use .github/pull_request_template.md
  • explain the reasoning, not just the diff
  • prefer updating existing systems over adding new ones
  • keep .dag as the first-read source for agent behavior
  • avoid adding skills or layers that inflate token use unless the change clearly needs them
  • include tests or verification for behavior changes

Governance

  • Branch protection on main requires PR review and a passing check
  • Security issues should go through SECURITY.md
  • Bugs and features have issue templates in .github/ISSUE_TEMPLATE/

Dogfood

Collar's own behavioral guidance is written in .dog and compiled to .dag via dotdog:

dags/*.dog   →  dotdog compile  →  dags/*.dag   →  collar loads

The harness that reads .dag files uses .dag files itself.

About

collar — DAG-first agent harness. Entity→Target:verb(card). Reads .dag files. Rust router at 3ms.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages