Context as Code
Git-Native Context Management for AI Projects
HCP is an open protocol for managing AI context in software projects using Git. Treat context as versionable, structured code. Validated by SPDD industry frameworks.
What is HCP?
Solve the "context drift" problem by treating AI context as versionable code
❌ Without HCP
- • Lost context between sessions
- • Repeated explanations to AI
- • No version control for decisions
- • Spec-code drift
- • Tribal knowledge loss
✅ With HCP
- • Persistent, git-native context
- • AI reads structured .procontext/
- • Decisions tracked and versionable
- • Context = Code (always in sync)
- • Knowledge preserved in repo
Industry & Academic Validation
HCP is empirically backed by SPDD (Structured Prompt-Driven Development) frameworks
Convergencia Industrial y Académica
HCP converge con las metodologías más avanzadas de desarrollo de software: desde Knowledge-Driven Development (KDD) hasta Specification-Driven Development (SDD) y Structured Prompt-Driven Development (SPDD) de Martin Fowler.
KDD → SDD → SPDD Convergence
Specification-Driven Development (SDD)
SDD Quality Gates Workflow
Click images to enlarge · Multiple perspectives converge in Context Engineering
"Prompts must transition from informal conversational text into structured, versionable, and testable engineering artifacts, deeply integrated with the software lifecycle."— Formal SPDD (Structured Prompt-Driven Development) Papers
HCP extends the academic SPDD foundation by adding robust context management, predictable lifecycle states (RPI+C), and the strict VERIFY workflow required for enterprise compliance.
Our architecture provides the verifiable infrastructure necessary to meet the standards of the EU AI Act.
The HCP Hierarchy
SKILLS (Base)
56 atomic operations: clarify-first, debug-memory-leak, etc.
PATTERNS
23 composable strategies: Multi-Agent, Context Engineering
ROLES
Agents with focused profiles for review and synthesis
OPERATING MODES
Abstraction levels: Exploration, Design, Refactor, Audit
RPI+V+C State
Core Concepts
Four fundamental patterns that make HCP work
.procontext/ Structure
Structured directory hierarchy for features, planning, decisions, learnings, and sessions
.procontext/ ├── 01-features/ ├── 02-planning/ ├── 03-decisions/ ├── 04-learnings/ └── 06-sessions/View Specification →
Lifecycle States (RPI+C)
Research → Planning → Implementation → Completed states for features
Track feature progress explicitly in STATUS.md files
View Patterns →VERIFY Workflow
Validation → Evidence → Review → Iterate → Finalize → Yank pattern
Ensure quality through structured validation gates
View Patterns →Context Inheritance
Hierarchical context propagation from project to feature level
DRY principle applied to AI context management
View Patterns →Who Uses HCP?
From enterprises to solo developers
🏢 Enterprises
Banking, Healthcare, Legal — Context compliance, decision traceability, audit trails
🚀 Startups
Fast iteration with AI agents, persistent context, no knowledge loss on pivots
👨💻 Developers
Multi-project workflows, AI pair programming, context management across sessions
🏗️ Architects
ADRs, design docs, architectural decisions tracked and versioned
By the Numbers
Production-ready and battle-tested
Validated in Production
8+ months. 43 real projects. Measured results.
HCP just launched publicly. Be among the first to adopt it and share your results.
Get Started in 5 Minutes
Setup HCP in your project right now
Clone and Initialize
git clone https://github.com/haletheia/human-code-ai-protocol
cd your-project
hcp init Edit Project Context
Add your project's context to .procontext/README.md
# Project Context
Stack: Node.js, PostgreSQL, Docker
Architecture: Microservices
Conventions: ESLint, Prettier Configure Your IDE
Set up HCP integration in Cursor, Windsurf, Cline, Aider, or Codex
See integrations guide for IDE-specific setup
Start Coding with AI
Your AI now has persistent context automatically. Create features, document decisions, track learnings.
HCP + MCP Integration
HCP provides context, MCP provides tools. Together they create more capable agents.
| HCP Context | MCP Bridge | Agent |
|---|---|---|
| .procontext/ | stdio / HTTP | Tool Calls |
| session.md | Available Tools | Parallel exec |
| memory/ | Git, Web, DB | State tracking |
Works With HALETHEIA Security Stack
HCP integrates seamlessly with the full security ecosystem
- 🛡️ Sentinel: Validate dependencies before AI writes code
- ⚡ aronly: Optimize token costs (60-90% savings)
- 🎮 babuino: Execute AI-generated code safely in sandbox
Resources
Documentation, code, and community
📦 GitHub Repository
Full source code, templates, examples, and 43+ production projects
📚 Documentation
Complete technical docs: concepts, guides, reference, integrations, examples
🧠 Skills Catalog
56 professional skills for AI agents: development, architecture, DevOps, security
🛠️ HCP-Toolkit
CLI tools, MCP server, observability, and search utilities
Ready to eliminate context drift?
Join 43+ projects using HCP in production. Setup in 5 minutes.