| name | lance-yichao-context-engineering |
| description | Designs production-grade context-engineering infrastructure for AI agents using Lance Martin (LangChain) and Yichao "Peak" Ji (Manus) methodologies — action-space layering, sandbox configurations, security guardrails, reversible compaction, structured summarization, KV-cache optimization, and pre-rot benchmarking. Use when designing a new agentic system from scratch, migrating a prototype to production, hitting performance degradation across long sessions, token costs scaling faster than value delivered, benchmarking agent reliability, selecting models per task, or simplifying a bloated harness. Trigger proactively whenever the user asks "why is my agent slower after 100 tool calls" or "how do I deploy this to production" — the Lance/Yichao surface is the production-deployment lane. For memory-crisis architecture, sovereign persistent memory, or TurboQuant compression theory, use nate-b-jones-context-engineering instead. |
| version | 2.0 |
| format | completion-engine |
| workflows | 3 |
Lance Martin & Yichao "Peak" Ji - Context Engineering
Production-grade context engineering methodology for building AI agents that maintain performance across hundreds of tool calls without degradation.
Available Workflows
| # | Workflow | Produces | Use When |
|---|
| production | Production Agent Infrastructure Blueprint | A comprehensive architectural specification including action-space layers, sandbox configurations, and security guardrails. | You are designing a new agentic system from scratch or migrating a prototype to a production-grade environment. |
| context | Context Management & Efficiency Engine | A technical implementation plan for reversible compaction, structured summarization, and KV-cache optimization. | The agent is suffering from performance degradation due to long-running sessions or high token costs. |
| performance | Performance Discovery & Optimization Protocol | An evaluation report detailing the pre-rot threshold, model routing logic, and a simplified architecture roadmap. | You need to benchmark agent reliability, select the right models for specific tasks, or simplify a bloated system. |
Quick Reference
Execution Prompts (structure-pure v2)
17 deterministic practitioner prompts — each carries an Output Contract, Output Skeleton, and Quality Gate. When a deliverable matches one, Read it and honor its contract instead of improvising the output shape.
- LANCE MARTIN & PEAK JI — CONTEXT ARCHITECTURE DESIGN —
skills/lance-yichao-context-engineering/references/prompts-v2/01-context-architecture-design.md
- LANCE MARTIN & PEAK JI — COMPACTION SYSTEM GENERATOR —
skills/lance-yichao-context-engineering/references/prompts-v2/02-compaction-system-generator.md
- LANCE MARTIN & PEAK JI — THREE-LAYER ACTION SPACE DESIGN —
skills/lance-yichao-context-engineering/references/prompts-v2/03-action-space-design.md
- LANCE MARTIN & PEAK JI — AGENT-AS-TOOL ORCHESTRATOR —
skills/lance-yichao-context-engineering/references/prompts-v2/04-agent-as-tool-orchestrator.md
- LANCE MARTIN & PEAK JI — STRUCTURED SUMMARIZATION SCHEMA DESIGNER —
skills/lance-yichao-context-engineering/references/prompts-v2/05-summarization-schema-designer.md
- Future-Proof Assessment — [architecture name] —
skills/lance-yichao-context-engineering/references/prompts-v2/06-future-proof-validator.md
- LANCE MARTIN & PEAK JI — CONTEXT MANAGEMENT PIPELINE GENERATOR —
skills/lance-yichao-context-engineering/references/prompts-v2/07-context-management-pipeline.md
- LANCE MARTIN & PEAK JI — MCP INTEGRATION ARCHITECTURE —
skills/lance-yichao-context-engineering/references/prompts-v2/08-mcp-integration-architecture.md
- LANCE MARTIN & PEAK JI — AGENT EVALUATION SYSTEM DESIGNER —
skills/lance-yichao-context-engineering/references/prompts-v2/09-evaluation-system-designer.md
- LANCE MARTIN & PEAK JI — MODEL ROUTING STRATEGY DESIGNER —
skills/lance-yichao-context-engineering/references/prompts-v2/10-model-routing-strategy.md
- LANCE MARTIN & PEAK JI — COLLECTIVE FEEDBACK MINING SYSTEM —
skills/lance-yichao-context-engineering/references/prompts-v2/11-collective-feedback-mining.md
- LANCE MARTIN & PEAK JI — AGENTIC MAP-REDUCE ORCHESTRATOR —
skills/lance-yichao-context-engineering/references/prompts-v2/12-agentic-map-reduce.md
- LANCE MARTIN & PEAK JI — PRE-ROT THRESHOLD DISCOVERY PROTOCOL —
skills/lance-yichao-context-engineering/references/prompts-v2/13-prerot-threshold-discovery.md
- LANCE MARTIN & PEAK JI — AGENT SECURITY & GUARDRAIL ARCHITECTURE —
skills/lance-yichao-context-engineering/references/prompts-v2/14-agent-security-guardrails.md