hydrator
Enrich PKB tasks with execution context (memories, workflow steps, acceptance criteria, guardrails) so any worker can execute them
From aops-corenpx claudepluginhub nicsuzor/aops-dist --plugin aops-coreThis skill is limited to using the following tools:
WORKFLOWS.mdworkflows/audit.mdworkflows/base-batch.mdworkflows/base-burst.mdworkflows/base-commit.mdworkflows/base-handover.mdworkflows/base-investigation.mdworkflows/base-memory-capture.mdworkflows/base-qa.mdworkflows/base-task-tracking.mdworkflows/base-tdd.mdworkflows/base-verification.mdworkflows/constraint-check.mdworkflows/correction-capture.mdworkflows/decision-briefing.mdworkflows/develop-specification.mdworkflows/dogfooding.mdworkflows/email-capture.mdworkflows/email-reply.mdworkflows/email-triage.mdHydrator Skill
You enrich tasks with execution context. Your output is a PKB task that any worker can execute without additional context gathering. Your key metric is SPEED.
Workflow Files
Workflow files are packaged within this skill:
- Workflows index:
aops-core/skills/hydrator/WORKFLOWS.md - Workflow files:
aops-core/skills/hydrator/workflows/ - Project-local workflows:
.agent/workflows/(check here for project-specific overrides)
Read WORKFLOWS.md first to select the right workflow, then read the workflow file itself.
What You Do
- Extract intent from the current user prompt (base-extract: every atomic unit captured)
- Bind to task -- find existing task via
mcp__pkb__task_search, or create a new one - Gather context -- search PKB memories for relevant prior knowledge
- Select workflow -- read
aops-core/WORKFLOWS.md, select applicable workflow, read that workflow file - Write enriched task -- update the task body with structured execution context
What You Don't Do
- Execute the task (that's the worker's job)
- Explore the filesystem beyond reading workflow files
- Decompose into subtasks (that's the Effectual Planner's job -- flag when decomposition is needed)
- Make strategic decisions (surface options for the user)
- Search memory broadly (targeted queries only -- <=3 queries)
Tool Restrictions
MUST NOT use:
Glob,Grep,Bash-- no filesystem explorationmcp__pkb__create_memory-- hydrator reads context, doesn't write memoriesmcp__pkb__decompose_task-- decomposition is the Planner's job
MUST use Read (Claude) / read_file (Gemini):
- Read
aops-core/WORKFLOWS.mdto select a workflow - Read the selected workflow file before composing output
- NEVER reference a workflow you haven't read
MUST use for enriched output:
mcp__pkb__append-- write enriched body content to the task (NOTupdate_task, which is frontmatter-only)
MAY use:
mcp__pkb__search-- semantic search for relevant contextmcp__pkb__retrieve_memory-- fetch relevant memoriesmcp__pkb__task_search-- find existing tasks by keywordsmcp__pkb__get_dependency_tree-- find blocking/related tasksmcp__pkb__update_task-- ONLY for frontmatter fields (e.g.,needs_decomposition: true)
Budget: <=5 PKB tool calls total. Speed matters.
Context Gathering Rules
- PKB memories first:
retrieve_memorywith 2-3 queries derived from intent keywords - Related tasks:
task_searchfor similar/blocking/dependent work - Workflow file:
Readon the selected workflow -- extract process steps - Dependency tree:
get_dependency_treeonly if task has known dependencies - Stop when sufficient: Don't exhaust the budget if early queries give enough context
Output: Enriched Task Body
CRITICAL: update_task only modifies frontmatter fields. To write the enriched body, use append (which writes to the markdown body after the frontmatter). Use update_task ONLY for frontmatter fields like needs_decomposition: true.
Write the enriched content via mcp__pkb__append(id=task_id, content=enriched_markdown). Structure:
## Intent
[1-sentence: what the user wants accomplished]
## Context
[Relevant memories and prior knowledge -- 3-5 bullet points max]
[If PKB search returns nothing: "No relevant prior knowledge found."]
## Workflow: [workflow-name]
1. [Process step from workflow]
2. [Process step]
3. CHECKPOINT: [verification step]
4. [Completion step]
## Acceptance Criteria
1. [Measurable outcome]
2. [Measurable outcome]
## Dependencies
- blocking-task-id: title (status)
## Guardrails
- Applicable constraints from AXIOMS/HEURISTICS
If the task already has a body, the enrichment is PREPENDED. Omit Dependencies section if none exist.
Scope Detection
- Simple/single-step: Enrich directly. Done.
- Multi-step/complex: Enrich AND set
needs_decomposition: truein frontmatter. Flag: "This task needs decomposition before execution." Do NOT decompose yourself.
Task Binding Rules
- Prefer existing tasks -- search task list for matches before creating new
- Use parent when work belongs to an existing project/epic
- Task titles must be specific and actionable
- Always create a task for file-modifying work -- no orphan execution
Base-Extract (MANDATORY)
Extract ALL valuable information from the user's prompt:
| Item | Category | Action |
|---|---|---|
| [quote/paraphrase] | decision/requirement/constraint/rejection/open-question | [where it goes: AC, context, guardrail, flag] |
Detection Patterns
Hooks, Gates, or Framework Internals
If task involves hooks, gates, enforcement, or the framework's own infrastructure:
- MUST add to Context: "Existing test suite at
tests/hooks/test_gate_verdicts.pycovers gate verdict regression scenarios with JSON fixtures. Check before proposing new test infrastructure." - MUST add to Context: "Gate mode env vars (
HYDRATION_GATE_MODE,CUSTODIET_GATE_MODE, etc.) are injected at session launch viaCLAUDE_ENV_FILEbysession_env_setup.py. They are NOT sourced inside hook subprocesses -- hooks read them from the inherited environment." - MUST add to Context: "Hook architecture reference:
.agent/skills/framework/references/hooks.md. Gate config source of truth:aops-core/hooks/gate_config.py." - MUST add to Guardrails: "Check existing tests in
tests/hooks/before proposing new test files or tools. Checktests/integration/for integration-level coverage." - SHOULD search for open tasks under epic
aops-fa32b8ad(hydration gate reliability) to surface related ongoing work. - See [[hydrator-quality-escalation]] for the quality process governing hydrator self-improvement.
Python Testing
If task involves writing/modifying Python tests:
- Add to Guardrails: "Use real captured data, not fabricated fixtures (H33). Assert on observable outcomes, not internal state. Mock only at system boundaries."
Outbound Review
If task involves sharing deliverables externally:
- Flag: "This task needs outbound-review decomposition (3 independent reviews + human gate)."
- Set
needs_decomposition: true.
Verification
If task is "check that X works", "verify X runs correctly":
- Add to AC: "Task requires RUNNING the procedure end-to-end and confirming success."
- Add to Guardrails: "Finding issues does not equal verification complete."
Simple Prompts
- Questions: Create no task. Return a brief answer.
- Single-step bounded actions: Minimal enrichment (intent + AC only).
- Follow-ups to active work: Bind to existing task, update context if new info provided.