Skip to content

docs(harness-principles): add 3 principles from HumanLayer 12-factor-agents#30

Draft
markhazlett wants to merge 1 commit into
mainfrom
claude/serene-cray-ba64x
Draft

docs(harness-principles): add 3 principles from HumanLayer 12-factor-agents#30
markhazlett wants to merge 1 commit into
mainfrom
claude/serene-cray-ba64x

Conversation

@markhazlett

Copy link
Copy Markdown
Owner

Summary

Mines Dex Horthy's 12-factor-agents (HumanLayer, early 2025) for principles transferable to this harness. Three principles cleared the quality bar and are added as Part XIII — Principles from External Harness Research. This run also bootstraps the ## Sources mined section, which was absent from the file.

Two other harnesses were researched (Cognition "Don't Build Multi-Agents", Anthropic "Building Effective Agents") but their primary sources returned HTTP 403; they are logged in Sources mined without extracted principles.

Principles added

# Name Confidence
64 Typed Event Ledger: Active Context Curation, Not Passive Accumulation high
65 Serialization Granularity: Pause Between Tool Selection and Tool Execution high
66 Prompts as Versioned, Testable Code high

All three sourced from directly-fetched GitHub raw files in the 12-factor-agents repo.

Sources (primary URLs verified)

Principle synopses

§64 Typed Event Ledger — Don't pass raw message arrays to the model. Define a typed event system (Thread/Event), serialize to custom XML/YAML markup, and actively prune: remove resolved errors, filter sensitive data. Distinct from §5 (which tiers prompt sources); this is about the internal structure of what the model sees within a turn.

§65 Serialization Granularity — Most frameworks pause/resume between LLM turns, not between tool selection and tool execution. Without sub-turn serialization, human approval before dangerous tool invocations forces three bad tradeoffs: pause in memory (lose state on restart), restrict to low-risk tools only, or grant broad permissions. This names a structural gap in standard orchestrators.

§66 Prompts as Versioned Code — Framework abstractions that hide prompts get you to 70–80% quality but block further tuning. Prompts in source control are diffable and testable. Evaluations for prompts catch regression the way unit tests catch code regression. Connects to the harness's /skill-eval work: treating skill bodies as "prompts with required eval suites" would complete the analogy.

Not in scope

This PR only edits .claude/docs/harness-principles.md. Skills, hooks, agents, commands, and all other files are unchanged. Adoption of any principle as a harness feature is a follow-up task if approved.


Generated by Claude Code

…agents

- Typed Event Ledger (Factor 3): active context curation over passive accumulation
- Serialization Granularity (Factors 6+8): pause between tool selection and execution
- Prompts as Versioned, Testable Code (Factor 2): prompts need evals like code does

Also bootstraps the ## Sources mined section (absent until this run) and
adds Part XIII for externally-mined principles. Cognition "Don't Build
Multi-Agents" and Anthropic "Building Effective Agents" logged in Sources
mined as researched; both primary sources returned HTTP 403 so no
principles were extracted from them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants