# L123 Harness

> Three-Tier Memory Framework: Externalizes state from the model, ensures objective observation, prevents internal divergence, and requires approval for upgrades. It provides a structural skeleton and templates for L1 (resident layer), L2 (index), and L3 (details); implements access control via approv

L123 Harness is a free AI agent skill pack (several skills in one listing) on Agensi by Miaosong Zhang, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Miaosong Zhang](https://www.agensi.io/creators/miaosong-zhang)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Version: 1.0
- Last updated: 2026-11-26
- Security: scan passed (2026-11-26); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/l123-harness
- Tags: ai-agents, prompt-engineering, tdd, memory-management, context-optimization

## About this skill

Managing project state and agent memory shouldn't feel like a manual chore. This package implements a three-tier memory architecture—L1 Permanent, L2 Index, and L3 Detail—to prevent context drift and keep your agent's knowledge base clean, structured, and strictly governed.

### What it does
- **Memory Tiering** organizes data into an L1 constant layer (`CLAUDE.md`), an L2 index, and an L3 detail directory to optimize context usage.
- **Event Review** automates weekly audits of event logs to distill recurring patterns into permanent knowledge or pitfalls.
- **Strict Governance** implements a "gate" system requiring explicit tokens for modifying protected core files, preventing accidental overwrites.
- **Vertical TDD** enforces a test-driven development loop that prioritizes public behavior over implementation details.
- **Skill Scaffolding** provides templates and logic for creating new agent capabilities with progressive disclosure.

### How it works
1. **Initialize** the harness using `/l123-harness:init-harness` to generate the `.agents/` directory and memory skeleton.
2. **Execute Tasks** using the TDD skill to ensure every feature is backed by behavior-driven integration tests.
3. **Log Events** automatically as the agent works, tracking errors, successful flows, and user feedback.
4. **Review and Upgrade** by running `event-review` to move validated patterns from the inbox to permanent storage.

### Frameworks & tools
The harness is framework-agnostic but optimized for projects using **Claude Code** and **Cursor**. It utilizes shell scripts for initialization and JSONL for immutable event logging.

### Why this beats prompting it yourself
Prompting an agent to "remember" often leads to hallucinated context or bloated system prompts. This skill provides a physical filesystem structure and a deterministic review process that ensures only verified, high-value information makes it into the long-term memory.

### Use cases
- **Project Onboarding** to bootstrap a new repository with standardized memory and safety rules.
- **Knowledge Capture** to systematically document "gotchas" and recurring bugs without manual writing.
- **Behavioral Testing** to guide an agent through a strict red-green-refactor loop.
- **Skill Development** to author and organize custom agent skills for team-wide use.

### Known limitations
Initialization will not overwrite existing `CLAUDE.md` files without user intervention. The memory upgrade process requires manual approval via gate tokens for protected files.

## Requires

- Git

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the L123 Harness skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does the three-tier memory architecture improve agent performance compared to standard prompting?

It prevents "context drift" and bloated prompts by organizing knowledge into three physical tiers (L1-L3), ensuring the agent only accesses the most relevant high-level or granular data as needed.

### Which AI agents or IDEs are compatible with l123-harness?

This skill is framework-agnostic but is specifically optimized for developers using Claude Code and Cursor, utilizing shell scripts and JSONL logging for seamless integration into those workflows.

### What is the 'Event Review' process, and does it require manual data entry?

The Event Review system automatically audits your logs to identify recurring patterns or pitfalls, allowing you to "upgrade" these insights into permanent memory via a secure gate token system.

### What exactly is included in the l123-harness package?

You receive the full harness package including initialization scripts, the .agents/ directory framework, TDD logic templates, and the governance 'gate' system for protected files.

### How does the governance framework prevent my agent from overwriting critical project files?

The harness implements a strict governance layer that requires explicit user tokens to modify core files, preventing the agent from accidentally overwriting your project's permanent memory or safety rules.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
