harness-context-layer

Audit agent context readiness and generate ARCHITECTURE.md, PRODUCT.md, and RELIABILITY.md from codebase analysis.

Updated Jul 29, 2026
One-click install
npx skills add https://github.com/MaiconGambini/opencode-harness-guide --skill harness-context-layer-maicongambini
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: harness-context-layer
Source: https://github.com/MaiconGambini/opencode-harness-guide/tree/main/skills/harness-context-layer
Command: npx skills add https://github.com/MaiconGambini/opencode-harness-guide --skill harness-context-layer-maicongambini

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents often make inconsistent architectural decisions or reinvent existing patterns because they lack a documented understanding of the system. This Skill audits the agent's grasp of architecture, product, and reliability, then builds the missing context documents directly from codebase evidence. ## Core Features & Use Cases - Context Layer Audit: Scores the agent's understanding across architecture, product, and reliability categories with a 3/4 gap threshold before proposing any files. - Evidence-Based Doc Generation: Creates ARCHITECTURE.md, PRODUCT.md, or RELIABILITY.md from actual sources like directory trees, package.json, middleware, and CI/CD files — never from assumptions. - Approval-Gated Writes: Produces a scored audit report and waits for explicit approval before writing, creating only one document per invocation. - Use Case: After a major refactor, an agent keeps proposing patterns that already exist. Run the audit, identify that architecture understanding scores 2/4, and generate ARCHITECTURE.md from the real directory tree and entry points. ## Quick Start Audit my project's context layer and tell me which of ARCHITECTURE.md, PRODUCT.md, or RELIABILITY.md is missing or stale.

Frequently Asked Questions about harness-context-layer

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

FAQPage Schema
How do I create an ARCHITECTURE.md for an existing codebase?

Run the context layer audit, which scores architecture understanding across subsystems, data flow, tech stack, and entry points. If it scores below 3/4, the Skill proposes generating ARCHITECTURE.md from the directory tree, package.json, and main entry points after your approval.

What documentation does an AI coding agent need to work consistently?

Three documents cover the core context layer: ARCHITECTURE.md for subsystems and data flow, PRODUCT.md for purpose and user journeys, and RELIABILITY.md for error handling and observability. Each must be extracted from codebase evidence, not invented.

Does this Skill overwrite existing documentation files?

No. It creates only what is missing and updates stale documents rather than duplicating them. If all three documents exist and are current, it reports the context layer as complete with no gaps.

Why does my AI agent keep reinventing existing patterns?

This usually signals a missing or stale context layer — the agent cannot see how subsystems connect or which patterns already exist. The audit identifies which understanding category scores below 3/4 and generates the corresponding document from codebase sources.

Can the Skill generate all three context documents at once?

No. It enforces one document per invocation, proposing the most critical gap first and waiting for approval before writing. Each document is capped at 200 lines and must trace every claim to a file in the codebase.