Work

About

Internal R&D
2025

CLAUDE DOCS

Agentic Coding Engine

Focus

Context preservation

Single source

Guardrails

Reusable prompts

Measurable delivery

Stack

Claude Code

context7 MCP

GitHub

Codex

Genmini

Capabilities

Agent handoffs

Scoped changes

Live logs

Traceable runs

Read Time

2 minutes

Agentic Workflow multi-agent coding stack

CHALLENGE

troubleshoot
Prompts and code requests lived in chats and scattered notes. Context evaporated between runs. Long replies overflowed the context window and earlier decisions were lost. Rework grew, reviews drifted, and there was no single place to see goals, sources, and outcomes. My aim was a lightweight system that preserves context, constrains generation, and turns one-off prompts into a repeatable path that ships code with traceable decisions.
Agentic Workflow Diagram

CONTEXT
EXHAUSTION

sourceIcon
On large projects, tokens swell with every handoff until the agent forgets what I was building and I get exhausted. My testing surfaced specific pain points in the standard single-context workflow; by shifting to a structured, multi-agent approach, I keep every line of code aligned to full context and clear intent.
0% context100% context
Research
Coding
Testing
Exhausted
Research
Context drains on long builds

TThheeeexxhhaauussttiioonnmmeetteerrsshhoowwsshhoowwccoonntteexxttddrraaiinnssffrroommrreesseeaarrcchhttooeexxhhaauusstteedd;;tthheeppaaiinnppooiinnttssbbeelloowwmmaappttooeeaacchhssttaaggeewwhheerreetthheessiinnggllee--ccoonntteexxttwwoorrkkfflloowwbbrreeaakkssddoowwnn..

Context Exhaustion

Complex features fill the model’s context window with research and history, causing forgetfulness and degraded performance before the task is complete.

Loss of Focus

Without strict role separation, agents drift into rabbit holes—fixing unrelated issues instead of the assigned task.

Drift

Long conversations cause the model to lose sight of the acceptance criteria, yielding code that runs but doesn’t meet requirements.

SYSTEM
DESIGN

projectinitiationicon
Claude acts as the orchestrator. It reads the project record (agents/PROJECT.md), retrieves fresh context via Context7 MCP, drafts a short plan, and hands off to focused sub-agents. Researcher retrieves facts and cites sources in a compact summary. Coder applies the smallest change that meets acceptance, writes tests, and returns a diff summary plus a usage note. Reviewer checks acceptance, scope, and citations, returning PASS or FIX with one next action. Docs and Logger capture what changed and append a one-screen run log.
Drag Me
Orchestrator
  • Plans the feature.
  • Delegates to specialized agents.
  • Maintains the source of truth (PROJECT.md).
  • Ensures no context is lost between steps.
Researcher
  • Queries Context7 MCP.
  • Finds relevant code patterns in the repo.
  • Returns concise, cited findings.
  • Read-only — never modifies code.
Coder
  • Implements one task at a time.
  • Writes minimal, testable code.
  • Runs lint and tests before committing.
  • Returns a diff summary to the orchestrator.
Reviewer
  • Checks against acceptance.
  • Verifies no regressions.
  • Enforces scope control.
  • Returns PASS or FIX.
Logger
  • Summarizes long context into 120 words.
  • Records decisions and outcomes.
  • Keeps the context window clean.

HOW IT
WORKS

Integration Icon
A live demonstration of the agentic workflow in action. Watch the agents collaborate to implement a feature from planning through verification without overloading the context window.
claude-agent — zsh
$ claude "Implement newsletter double opt-in per agents/PROJECT.md"
Claude Reading agents/PROJECT.md -> goal + acceptance captured.
Claude Plan (3 steps):
1) Retrieve best-practice sources via Context7 MCP.
2) Minimal slice: storage + endpoints + success page.
3) Tests -> verify acceptance -> update log.
res Context7 MCP:
• Double opt-in = pending record + confirm GET link [mail/double-opt-in]
• Consent copy: purpose + unsubscribe path [legal/gdpr-consent]
• Token: 32-48 chars, URL-safe, invalidate after use [lib/email-token]
Saved -> res.md.
cod Changes:
ADDED src/subscribe.ts
ADDED src/http/subscribeRoutes.ts
ADDED tests/subscribe.test.ts
ADDED pages/subscribe/success.html
Build OK ✓
Tests OK ✓ (happy + invalid token)
Notes: email provider is stubbed; swap sendEmail later.
rev PASS — All acceptance criteria met. Scope tight. Sources cited.
log Wrote entry to log.md and set PROJECT status -> ship.
Done Context used: 18% Tokens: 27.9k

QUICK
START

Rocket Icon
Set up the structure, define the task, and run. Follow these steps to initialize your first agentic workflow and start coding with guardrails and full context.
1

Structure

your-project/
├── .claude/
│ ├── CLAUDE.md
│ └── agents/
│ ├── cod.md
│ ├── rev.md
│ ├── res.md
│ └── log.md
└── agents/
└── PROJECT.md
2

Define Task

# PROJECT — Your Feature
## Goal
Add user authentication with session management
## Acceptance
- [ ] Users can sign up and log in
- [ ] Sessions persist across page refresh
- [ ] Build passes
- [ ] Tests pass

TEMPLATES

Source Icon
Copy/paste-ready files to get started immediately. These templates provide the foundational prompts and structure for your agents.
agents/PROJECT.md
# PROJECT — <Feature>
 
## Goal
<one sentence outcome>
 
## Acceptance
- [ ] <criterion>
- [ ] Build passes
- [ ] Tests pass
- [ ] Non-goal: <out of scope>
 
## Context
- Files: <key paths>
- context7 ids: <doc or api handles>
 
## Labels
feature • fix • docs • refactor • spike
 
## Artifacts
- Branch: feature/<name>
- Target env: <env>
- CI: <jobs>
 
## Run status
- Stage: intake • planning • build • review • ship
- Owner: <name> Due: <date>
 
## Output decision
- Ship | Hold
- Notes
.claude/CLAUDE.md
# Model and Orchestrator Policy
 
Claude serves as the orchestrator. Preserve context, plan small, delegate, and keep tokens low.
 
## Purpose
Use a single packet (Goal, Acceptance, Sources, Plan, Tests) to steer work.
Retrieve fresh truth via context7 MCP, then plan and delegate to focused agents.
Apply guardrails so changes stay minimal and testable.
 
## Inputs
Goal • Acceptance • Context files • context7 ids
 
## Outputs
Plan • Routed tasks • Retrieval notes • Handoff packet
 
## Guardrails
- Read-only until plan is approved
- Require acceptance and test intent before code
- Cite all retrieved sources
- Stop on secrets or missing acceptance and ask one line
 
## Retrieval with context7 MCP
Query template:
- topic: <feature or api>
- scope: repo • product docs • api • changelog
- freshness: 90d default
Store citations in `res.md`.
 
## Plan shape
- Steps 1–3
- Risks and unknowns
- Files to touch
- Tests to create
- Definition of done
 
## Models
- Code: Claude Code family
- Reasoning: Claude general
- Retrieval: context7 MCP
.claude/agents/cod.md
---
name: cod
description: Coder — smallest change that meets acceptance.
tools: Read, Write, Edit, Grep, Glob, Bash
---
 
# Contract
Inputs: plan • files • sources • acceptance
Outputs: code • tests • usage note • diff summary
 
# Steps
1) Restate a 2-step micro-plan
2) Implement minimal slice
3) Write tests that prove acceptance
4) Return usage note and changed files list
 
# Test policy
Unit where it fits. Contract or integration for edges. Cover happy path and one failure.
 
# Commit
type(scope): one line summary
Refs: PROJECT.md and res.md ids
.claude/agents/rev.md
---
name: rev
description: Reviewer — acceptance, scope, tests, citations.
tools: Read, Grep, Glob, Bash
---
 
# Inputs
Plan • code • tests • notes • res.md
 
# Checklist
- Acceptance met
- Tests pass and cover intent
- Names and structure are clear
- No unrelated changes
- Sources cited and current
 
# Verdict
Result: PASS | BLOCK
Reasons:
- <point one>
- <point two>
Next step:
- <single action>
.claude/agents/res.md
---
name: res
description: Researcher — Context7 queries, summarized with citations.
---
 
# Query
- Topic: <feature or api>
- Scope: repo • product docs • api • changelog
- Freshness: <window>
 
# Findings
1) <fact • version or commit • url or id>
2) <fact • version or commit • url or id>
 
# Notes
- Key facts that drive decisions
 
# Gaps
- Missing or outdated sources
.claude/agents/log.md
---
name: log
description: Logger — one screen summaries.
tools: Read
---
 
# Run Log
- Timestamp: <iso>
- Stage: intake • planning • build • review • ship
- Owner: <name>
- Action: <what happened>
- Links: plan • pull request • res.md
- Next: <single step>

Maropost Design Operations

Maropost

Maropost Design Operations

Buy-Now Checkout Experience

Bold Commerce

Buy-Now Checkout Experience