Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

`@code-first-agents/tool` — the TypeScript implementation of the **Code-First Agents** pattern. This library provides the `Tool` base class that enforces the tool contract from the spec: deterministic CLI tools with Zod input/output schemas, JSON envelope output, self-describing `schema`/`help` introspection, and always-exit-0 semantics.

**Spec:** https://github.com/beogip/code-first-agents/blob/main/specs/code-first-agents.md — the authoritative reference for the pattern. Key concepts this library implements:
**Spec:** https://code-first-agents.com/patterns/deterministic-tools.html — the authoritative reference for the pattern. Key concepts this library implements:
- **Tool contract:** named input params, JSON-only output, no LLM calls inside tools, deterministic results, `--schema` for self-description, loud failure modes.
- **Output spectrum:** L1 (data — raw signals for LLM interpretation), L2 (classification — discrete categories with branching), L3 (instructions — complete procedures the LLM executes verbatim).
- **Separation principle:** deterministic work lives in code (Tools), the LLM orchestrates judgment (Skills). This repo is the Tool side.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![CI](https://github.com/beogip/code-first-agents-tool/actions/workflows/ci.yml/badge.svg)
[![npm](https://img.shields.io/npm/v/@code-first-agents/tool)](https://www.npmjs.com/package/@code-first-agents/tool)

TypeScript implementation of the [Code-First Agents](https://github.com/beogip/code-first-agents/blob/main/specs/code-first-agents.md) pattern. Provides a `Tool` base class that enforces the tool contract: deterministic CLI tools with Zod input/output schemas, JSON envelope output, self-describing introspection (`--schema`, `--help`), and always-exit-0 semantics.
TypeScript implementation of the [Code-First Agents](https://code-first-agents.com/patterns/deterministic-tools.html) pattern. Provides a `Tool` base class that enforces the tool contract: deterministic CLI tools with Zod input/output schemas, JSON envelope output, self-describing introspection (`--schema`, `--help`), and always-exit-0 semantics.

**Key idea:** deterministic work lives in code (Tools), the LLM orchestrates judgment (Skills). This library is the Tool side.

Expand Down Expand Up @@ -208,7 +208,7 @@ The CI workflow handles changelog generation, npm publishing, GitHub releases, a

## The Code-First Agents Pattern

This library implements the tool contract from the [Code-First Agents spec](https://github.com/beogip/code-first-agents/blob/main/specs/code-first-agents.md). The spec defines a separation principle:
This library implements the tool contract from the [Code-First Agents spec](https://code-first-agents.com/patterns/deterministic-tools.html). The spec defines a separation principle:

- **Tools** (this library) — deterministic, no LLM calls, Zod-validated I/O, JSON envelope output.
- **Skills** — LLM-powered orchestrators that call tools and apply judgment.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1.2",
"description": "Code-first agent tool definitions with Zod schemas",
"license": "MIT",
"homepage": "https://code-first-agents.com",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/tool-class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* so LLM callers can self-correct
* - Always exits with code 0; errors communicated via `ok: false` envelope
*
* Spec: https://beogip.github.io/code-first-agents/patterns/deterministic-tools.html
* Spec: https://code-first-agents.com/patterns/deterministic-tools.html
*
* ## Usage
*
Expand Down
Loading