context-lookup

Retrieve CFN Loop context from Redis with optional caching.

14|2|Updated Sep 23, 2025
One-click install
npx skills add https://github.com/masharratt/claude-flow-novice --skill context-lookup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-lookup
Source: https://github.com/masharratt/claude-flow-novice/tree/main/.claude/cfn-loop-orchestration-v2/lib/orchestrator/src/helpers/context-lookup.ts
Command: npx skills add https://github.com/masharratt/claude-flow-novice --skill context-lookup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Retrieves CFN Loop context from Redis, with optional caching for faster subsequent lookups.

Core Features & Use Cases

  • Single and batch lookups: Get context by task and optional iteration.
  • Validation: Ensure context structure correctness.
  • Caching: Optional in-memory cache to speed repeated reads.

Quick Start

const lookup = new ContextLookup(redis, logger, true); await lookup.lookupContext('task-123', 2);

Frequently Asked Questions about context-lookup

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

FAQPage Schema
How do I retrieve workflow context from Redis with caching?

Context lookup retrieves CFN Loop context stored in Redis with optional in-memory caching to accelerate repeated reads. Initialize ContextLookup with a Redis client, logger, and cache flag enabled, then call lookupContext with task ID and iteration number to fetch and cache the result.

Can I validate context structure before processing in a workflow?

Yes, context lookup includes built-in validation to ensure retrieved context meets structural correctness requirements. This prevents downstream processing errors by catching malformed or incomplete context early in the orchestration pipeline.

What's the best way to handle batch context lookups across multiple tasks?

Context lookup supports both single and batch lookups, allowing you to retrieve context for multiple tasks and iterations in one operation. Batch mode is efficient for agent ecosystems coordinating multiple Loop implementations simultaneously.

When should I enable in-memory caching for Redis context lookups?

Enable caching when your workflow repeatedly accesses the same task context within a session. Caching reduces Redis round trips and latency for consensus collection, gate checks, and Product Owner decision flows in container-based agent orchestration.

Does context lookup work with Docker-based agent ecosystems?

Yes, context lookup is designed for container-based CFN Loop execution, agent spawning, and loop management across Docker environments. It provides Redis-backed state management and consensus collection for Loop 3 implementers and Loop 2 validators.

What happens if Redis context retrieval fails during agent consensus collection?

Context lookup includes error handling for retrieval failures. Failures during consensus collection block the GOAP-informed decision flow; implement retry logic or fallback handlers to manage transient Redis unavailability in your orchestration workflow.