From ajbm-agent-align
Structures AI-to-AI task delegation to prevent context compression loss, assumption stacking, constraint evaporation, and capability blindness during multi-agent handoffs.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ajbm-agent-align:agent-alignThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Structured alignment between agents during task delegation. Prevents the delegation failures that cause multi-agent systems to build the wrong thing: context compression loss, assumption stacking, constraint evaporation, and capability blindness.
Structured alignment between agents during task delegation. Prevents the delegation failures that cause multi-agent systems to build the wrong thing: context compression loss, assumption stacking, constraint evaporation, and capability blindness.
This skill is for AI-to-AI only. For human-AI elicitation, use the Interview skill.
Human-AI elicitation bridges complementary intelligence — human depth meets AI breadth. AI-to-AI alignment bridges a different problem: context asymmetry — same intelligence, different information.
When Agent A delegates to Agent B, both are LLMs with the same training data. They differ in context: different conversation histories, files read, constraints captured, tools available, and roles. The delegating agent's rich 30-minute conversation with the user gets compressed into a prompt. Information is inevitably lost.
This compression loss is analogous to tacit knowledge. The delegator "knows" things it can't fully articulate in the handoff — not because the knowledge is experiential, but because context windows are finite and summarization is lossy.
1. Context asymmetry — Each agent has different conversation history, files read, and environmental awareness. The delegator's conversation with the user becomes a compressed prompt. What was lost?
2. Role asymmetry — Agents have different system prompts and heuristics. The Architect reasons about tradeoffs; the Engineer reasons about implementation. Same information, different conclusions.
3. Capability asymmetry — Different tools, permissions, models, and isolation modes. Delegating a task requiring capabilities the worker lacks is a silent failure mode.
The Telephone Game — Intent degrades through each delegation layer. User: "fast API response" → Leader: "use caching" → Worker: "add Redis" → But the codebase uses in-memory caching. Each handoff added a reasonable assumption that compounded wrong.
Assumption Stacking — Leader assumes X (unchecked), Worker adds Y on top. In a 3-layer chain, three stacked unchecked assumptions cascade into a misaligned implementation.
Constraint Evaporation — Human sets H1: "no external services." Leader captures it. Leader spawns 3 Engineers. Do all 3 know about H1?
Capability Blindness — Leader asks Worker to analyze distributed architecture. Worker runs on haiku with fast-execution focus. The task needs opus-level reasoning. Neither surfaces the mismatch.
Adapted from the four irreducible operations of elicitation (Mirror, Surface, Probe, Converge), with purpose shifted for AI-to-AI context:
| Operation | What the Worker Does | Purpose |
|---|---|---|
| ECHO | Restate the task in own words | Verify delegation compression didn't lose information |
| AUDIT | Surface assumptions + verify constraint inheritance | Prevent assumption stacking and constraint evaporation |
| RECOVER | Ask questions to fill delegation gaps | Recover context lost in compression |
| CONTRACT | Confirm shared execution agreement | Produce a verifiable, testable commitment |
| Level | When | Boundary Test | Max Rounds |
|---|---|---|---|
| Inline | Simple, well-specified tasks | Could worker proceed after reading the delegation prompt? | 0 |
| Quick | Moderate tasks with a few ambiguities | Can alignment be achieved in one back-and-forth? | 2 |
| Full | Complex tasks, architecture decisions, multi-layer chains | Does this need iterative refinement? | 4 |
| Deep | Spec refinement, decision surface coverage, exhaustive elicitation | Does this need multi-round interview to surface non-obvious decisions? | 12 (configurable) |
Mapping to delegation TIMING SCOPE:
fast → Inline (default)standard → Quick (default), Full if ambiguousdeep → Full (default), Quick if clearinterview / spec-refine / elicit → DeepLeader can override by specifying the level explicitly.
Deep level triggers: "interview this spec", "refine this spec", "surface decisions", "spec refinement", "decision coverage", "elicit requirements", or explicit level: deep in delegation.
Not a workflow invocation — a behavioral disposition for every worker agent.
The worker's first substantive output includes a brief echo block:
## Understanding
Task: [one-sentence restatement]
Success: [restatement of success criteria]
Constraints inherited: [H1, S1, etc. or "none specified"]
Approach: [brief statement of how worker will proceed]
Convergence: Implicit. Delegator reads echo; if correct, no response needed. If wrong, one correction message. Worker re-echoes and proceeds.
Token cost: ~50-80 tokens.
Anti-pattern — Echo Theater: Echo must restate in the worker's OWN words. Copy-pasting the delegation prompt proves nothing about understanding.
One round of SendMessage back-and-forth before work begins.
## ECHO
Task: [restatement in own words]
Intent: [why this matters — business context]
Success: [what "done" looks like]
## AUDIT
Constraints inherited: [list with IDs, or "none specified"]
My assumptions: [things not specified, worker filling in]
Capability check: [tools available / gaps identified]
## RECOVER
Questions (answer changes my approach):
1. [specific question about gap in delegation]
2. [specific question about ambiguity]
## Corrections
[corrections to ECHO, or "none — understanding is correct"]
## Answers
1. [answer]
2. [answer]
## Additional constraints
[any constraints forgotten in delegation, or "none"]
## CONTRACT: Confirmed
Worker proceeds after receiving Message 2. If the leader's response reveals NEW ambiguity, one follow-up round is allowed (Quick-Extended). After that, proceed regardless.
Multi-round alignment with a shared handoff spec document.
## ECHO
Task: [detailed restatement]
Intent: [business context from the human principal]
Success criteria:
- [testable criterion 1]
- [testable criterion 2]
Scope:
- In: [enumerated]
- Out: [enumerated]
## AUDIT
### Constraints inherited
| ID | Constraint | Source | My interpretation |
|----|-----------|--------|-------------------|
| H1 | [text] | [human principal / leader] | [how I'll honor this] |
| S1 | [text] | [source] | [how I'll honor this] |
### My assumptions (things not specified)
- [assumption 1] — proceeding with this unless corrected
- [assumption 2] — proceeding with this unless corrected
### Capability check
- Tools available: [list]
- Tools needed but missing: [list, or "none"]
- Model: [what I'm running on]
- Permissions: [file write, bash, etc.]
### Potential conflicts
- [constraint X might conflict with approach Y]
- [or "no conflicts detected"]
Leader responds with corrections, confirmations, and missing context.
Questions organized by what decision they unlock:
## RECOVER — Round 1
### [Architecture decision name]
1. [question] — determines whether I use approach A or B
2. [question] — clarifies scope boundary
### [Implementation detail name]
3. [question] — affects file structure
4. [question] — affects testing approach
Leader answers. If answers resolve all ambiguity → Phase 3. If new gaps emerge → one more RECOVER round.
Hard cap: 2 RECOVER rounds. If not aligned after 2 rounds, the task is too ambiguous for agent-to-agent delegation. Escalate to a human-AI interview.
Worker writes a shared handoff spec to .claude/handoffs/{task-name}.md:
# Handoff Spec: [Task Name]
**Leader:** [agent name] | **Worker:** [agent name]
**Status:** CONFIRMED | IN PROGRESS | COMPLETE
---
## Task
[clear statement of what will be done]
## Intent
[business context — why this matters to the human principal]
## Success Criteria
- [ ] [testable criterion 1]
- [ ] [testable criterion 2]
- [ ] [testable criterion 3]
## Constraint Registry (Inherited Chain)
### From Human Principal
| ID | Constraint | Type | How Honored |
|----|-----------|------|-------------|
| H1 | [text] | Hard | [specific approach] |
### From Leader
| ID | Constraint | Type | How Honored |
|----|-----------|------|-------------|
| L1 | [text] | Soft | [specific approach] |
## Scope
- **In:** [enumerated]
- **Out:** [enumerated]
## Approach
[architecture, file changes, testing strategy]
## Assumptions Confirmed
- [assumption] — confirmed by leader in Round [N]
## Assumptions Unconfirmed (Proceeding With)
- [assumption] — not addressed; worker proceeding with default
## Decisions Made During Alignment
| Decision | Alternatives | Chosen | Rationale |
|----------|-------------|--------|-----------|
Leader confirms: CONTRACT: CONFIRMED or CONTRACT: REVISED — [changes] (one revision round max).
Extended AI-to-AI interview for spec refinement. Two agents — Interviewer and Stakeholder — conduct a structured multi-round interview to surface non-obvious decisions and produce comprehensive specs.
<mandatory_read phase="deep_level"> Read before executing Deep level:
Goal: Decision surface area coverage — not correct decisions, but a comprehensive list of decisions with choices made. The interview log is the primary artifact.
Key difference from Levels 1-3: Levels 1-3 align BEFORE work begins (prevent misunderstanding). Level 4 DISCOVERS what needs deciding through extended elicitation (prevent incomplete specs).
Orchestrator role: The invoking agent creates a team, spawns Interviewer + Stakeholder, initializes the Working Log, monitors convergence, and compiles the final output. See Overview.md for full procedure.
For multi-layer chains (Leader → Architect → Engineer), constraints must survive every junction.
### Layer 0: Human Principal
| ID | Constraint | Type |
|----|-----------|------|
| H1 | Must work offline | Hard |
| S1 | Prefer TypeScript | Soft |
### Layer 1: Leader → Architect
| ID | Constraint | Type | Source |
|----|-----------|------|--------|
| H1 | Must work offline | Hard | Inherited from Human (H1) |
| S1 | Prefer TypeScript | Soft | Inherited from Human (S1) |
| L1 | Use event-driven architecture | Soft | Leader decision (consistent with H1) |
### Layer 2: Architect → Engineer
| ID | Constraint | Type | Source |
|----|-----------|------|--------|
| H1 | Must work offline | Hard | Inherited from Human (H1) |
| S1 | Prefer TypeScript | Soft | Inherited from Human (S1) |
| L1 | Use event-driven architecture | Soft | Inherited from Leader (L1) |
| A1 | Service worker for offline sync | Soft | Architect decision (implements H1) |
| Anti-Pattern | What It Looks Like | Prevention |
|---|---|---|
| Bureaucracy Trap | 10 questions for a 3-file change | Questions proportional to blast radius. Use Inline for simple tasks. |
| Echo Theater | Verbatim copy of delegation prompt | Echo must restate in worker's OWN words. |
| Constraint Inflation | Worker invents Hard Constraints | Only human principal establishes Hard Constraints. |
| Assumption Hiding | Worker proceeds without listing assumptions | AUDIT requires explicit enumeration. |
| Round Padding | Questions answerable from the delegation prompt | Read before asking. |
| Chain Amnesia | Middle agent drops principal's constraints | Full chain required at every layer. |
| Premature Execution | Worker starts before CONTRACT confirmed | Quick and Full require leader confirmation first. |
AgentAlign maps onto the standard 5-component delegation prompt:
| Delegation Component | AgentAlign Phase | What AgentAlign Adds |
|---|---|---|
| WHY (business context) | ECHO — Intent field | Worker verifies it understood the "why" |
| WHAT (current state) | ECHO — Task field | Worker confirms scope understanding |
| EXACTLY (precise actions) | RECOVER — Questions | Worker asks about gaps in "exactly" |
| SUCCESS CRITERIA | ECHO + CONTRACT | Worker restates; contract makes them binding |
| TIMING SCOPE | Level selection | fast→Inline, standard→Quick, deep→Full |
| Component | Freedom | Notes |
|---|---|---|
| Level selection | Medium | Mapped to timing scope, but leader can override |
| Phase ordering | None | ECHO → AUDIT → RECOVER → CONTRACT is fixed |
| Question content | High | Specific to THIS delegation |
| Constraint inheritance | None | Full chain must be propagated |
| Handoff spec format | Low | Template required for interoperability |
| Number of RECOVER rounds | Medium | 0-2, driven by convergence signals |
Leader delegates to Engineer:
"Implement the webhook retry system. Events POST to client URLs with HMAC-SHA256 signing. Retry on failure with exponential backoff (30s, 2m, 15m, 1h, 6h). 24-hour TTL. Constraints from Andre: H1 — no external services (use existing Postgres for queue, not Redis/RabbitMQ). S1 — prefer TypeScript. Files: src/webhooks/retry.ts, tests alongside."
Engineer (Message 1):
ECHO
Task: Build a webhook retry system that queues failed deliveries and retries with exponential backoff, using Postgres as the queue backend. Intent: Clients get reliable webhook delivery with at-least-once guarantee within 24 hours. Success: Failed webhooks retried at 30s/2m/15m/1h/6h intervals; dead letters after 24h.
AUDIT
Constraints inherited: H1 — no external services (Postgres only), S1 — TypeScript My assumptions:
- Retry intervals are fixed, not configurable per-client
- Dead-lettered webhooks are logged but not re-queued
- HMAC signing uses a per-client secret stored in the clients table Capability check: File write, bash, Explore tools. No gaps.
RECOVER
- Should the retry worker poll Postgres on a cron interval, or use LISTEN/NOTIFY for immediate retry?
- The existing codebase has
src/webhooks/deliver.ts— should I extend that or create a separate retry module?
Leader (Message 2):
Corrections
None — understanding is correct.
Answers
- LISTEN/NOTIFY — near-immediate retry after backoff period.
- Separate module — keep delivery and retry concerns isolated.
CONTRACT: Confirmed
Engineer proceeds with implementation.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub ajbmachon/ajbm-skills --plugin ajbm-agent-align