agentic-harness-patterns-zh

Documents design patterns for building AI agent harnesses covering memory, permissions, context, and delegation.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/aicodepro/ai-agent-nexi --skill agentic-harness-patterns-zh-aicodepro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agentic-harness-patterns-zh
Source: https://github.com/aicodepro/ai-agent-nexi/tree/main/agent/skills/agentic-harness-patterns-zh
Command: npx skills add https://github.com/aicodepro/ai-agent-nexi --skill agentic-harness-patterns-zh-aicodepro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building a production-grade AI coding assistant involves far more than a model plus a tool-call loop. This Skill provides a Chinese-language pattern catalog for the harness around the agent — memory, skills, tool safety, context engineering, multi-agent coordination, and lifecycle extensibility — so engineers avoid the non-obvious failure modes that burn the most time. ## Core Features & Use Cases - Six Pattern Domains: Covers memory systems (layered instruction/auto/extracted memory), skill runtimes (lazy loading, budgeted discovery), tool registries and permission gates (fail-closed defaults, per-call concurrency classification), context engineering (select/write/compress/isolate), multi-agent orchestration (coordinator, fork, swarm), and lifecycle extensibility (hooks, task state machines, bootstrap sequencing). - Pitfall Guides: Each section lists counterintuitive failure modes, such as silent memory index truncation, memoized init hiding retry failures, and recursive fork cost explosion. - Use Case: An engineer designing a custom agent runtime reads the permission-gate pattern to implement a single authorization chokepoint with allow/deny/ask semantics before shipping any auto-approval mode. ## Quick Start Ask the agent to explain how to design a layered memory system with a bounded index and two-step save invariant for your coding assistant.

Frequently Asked Questions about agentic-harness-patterns-zh

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a memory system for an AI coding agent?

Layer memory by scope and persistence: instruction memory (human-curated, hierarchical config), auto memory (agent-written with typed taxonomy and bounded index), and session extraction (background agent writing at session end). Use a two-step save invariant: write the topic file first, then update the index.

How should an agent runtime handle tool permissions safely?

Route every tool call through a single permission gate returning allow, deny, or ask. Evaluate layered rules in strict priority order with fail-closed defaults, and make certain ask results non-bypassable so auto-approve modes cannot silently modify protected paths.

What is the difference between coordinator, fork, and swarm delegation patterns?

Coordinator workers start with zero inherited context and suit staged workflows. Fork children inherit full parent context but cannot fork again, suiting fast parallel splits. Swarm peers coordinate through a shared task list with a flat roster for long-running independent work.

When should this agent harness patterns guide not be used?

This guide does not cover prompt engineering, model selection or fine-tuning, general software architecture, chat UI design, or LLM API integration basics. It addresses the system around the model, not the model itself.

Why does lazy loading matter for agent skill systems?

Loading full skill content into every prompt exhausts the context window before the first user message. Budgeted discovery lists only metadata (roughly 1% of the context window), and full skill bodies load only on activation, keeping idle token cost near zero.