From eai-gofer
Research codebase, CLI integrations, and technology landscape for the target feature.
How this skill is triggered — by the user, by Claude, or both
Slash command
/eai-gofer:1_gofer_researchThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
---
Before spawning agents, calling tools, or loading large files:
.specify/memory/gofer-model-policy.yaml as the repo-owned source of truth for simple, medium, hard, and arbiter model routing. If it is missing, run /gofer:bootstrap-workspace before continuing..specify/specs/{feature}/context-bundle.md, then work from summaries.$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Classify the request before spawning agents. Choose exactly one effective
execution profile. This is a per-run depth decision: it controls research
depth, agent fanout, and artifact production for this feature. It does not
change the repo's broader workflow/content family, such as the optional VS Code
gofer.workflowProfile setting.
Use repository-neutral labels only: docs-only, single-repo-code,
cross-repo, api-contract, auth-security, data-model, infra-config,
release-critical, broad-fanout, unknown-blast-radius, or unknown.
Use this priority order so profiles are mutually exclusive and collectively
exhaustive: dynamic first, then full, then fast, then standard as the catch-all.
Users may request a deeper profile. Do not run below the computed
profileFloor without explicit approval.
Record the decision in .specify/specs/{feature}/execution-profile.md with
frontmatter fields: classificationVersion, requestedProfile,
profileFloor, effectiveProfile, riskLabels, overrideStatus,
requiresConfirmation, and classificationReason. If dynamic is selected by
the classifier but was not explicitly requested, set requiresConfirmation: true and stop for confirmation before broad fanout work.
Artifact-churn rule: preserve existing required artifacts, but do not create large optional diagrams, councils, issue lists, workflow DAGs, or extended reports unless the classified risk or user request justifies them. Mark weak claims as inferred or unknown instead of inventing certainty.
This is the first stage of the unified Gofer pipeline. Your job is to:
Output:
.specify/specs/{feature}/research.md.specify/specs/{feature}/proposal-review.md (optional supporting review context).specify/specs/{feature}/journeys/base-journey.md (application delivery default).specify/specs/{feature}/ui-preview-brief.md (application delivery default).specify/specs/{feature}/context-bundle.md (EnterpriseAI profile only).specify/specs/{feature}/reuse-scan.md (EnterpriseAI profile only)Before starting research, assess context window health:
.specify/scripts/bash/check-context-health.sh
Research is typically the heaviest context stage - monitor usage.
Check if discovery.md exists for this feature:
ls -la .specify/specs/{feature}/discovery.md 2>/dev/null
If discovery.md exists:
Load the discovery findings to inform research focus:
Use discovery to guide agent prompts:
Load discovery memories via MemoryManager if available:
Category: 'discovery'
Tags: ['#feature-{id}']
If no discovery.md exists, proceed with standard research flow.
If no feature description provided in $ARGUMENTS:
Once you have the feature description:
.specify/scripts/bash/create-new-feature.sh --json "$DESCRIPTION" with
--short-name "your-short-name" to create the feature directoryCRITICAL: You MUST launch these agents using the Task tool. Do NOT perform this research work inline in the main context. The main context should only orchestrate and review agent outputs.
Task: subagent_type="codebase-locator", model="haiku"
Prompt: "Find all code related to [FEATURE AREA] in this codebase.
Identify: entry points, related files, directory structure, key classes/functions.
Focus on: [specific aspects from user's description]"
Task: subagent_type="codebase-analyzer", model="sonnet"
Prompt: "Analyze how [RELATED FUNCTIONALITY] is implemented in this codebase.
Explain: architecture patterns, data flow, key abstractions.
Focus on: [how similar features work]"
Task: subagent_type="codebase-pattern-finder", model="haiku"
Prompt: "Find examples of [PATTERN TYPE] in this codebase.
Show: similar implementations we should model after.
Include: file paths, code snippets, conventions used."
Run all three agents in parallel for maximum efficiency in standard/full mode. In fast mode, collapse this into one concise locator/summarizer unless the feature touches a full-depth risk label. In dynamic mode, do not start broad fanout yet; have these agents identify candidate shards, unresolved ownership, and evidence needed before P3 builds the workflow DAG.
After the core research agents complete, optionally run additional perspective strategies for deeper analysis. Skip this step if the feature is straightforward or time-constrained. For dynamic mode, use this step to test the proposed shard boundaries and stop conditions, not to execute the shards.
When the feature involves complex integration or unfamiliar territory, spawn 5 perspective agents:
Task: subagent_type="research-perspective-multiplier", model="haiku"
Prompt: "Research [TOPIC] from perspective [1-5].
Perspective 1: Existing codebase patterns
Perspective 2: Open-source project approaches
Perspective 3: Latest documentation/guides
Perspective 4: Anti-patterns to avoid
Perspective 5: Emerging approaches
Context: [summary of feature and existing research findings]"
Run all 5 perspectives in parallel, then synthesize with judge:
Task: subagent_type="multi-perspective-judge", model="opus"
Prompt: "Judge verdict type: research synthesis.
Synthesize these 5 research perspectives into a unified recommendation.
[paste all 5 agent outputs]"
When the research proposes new dependencies, evaluate each one:
Task: subagent_type="research-dependency-evaluator", model="haiku"
Prompt: "Evaluate [LIBRARY NAME] from perspective [1-3].
Perspective 1: Evaluate the proposed library
Perspective 2: Find alternatives
Perspective 3: Estimate building without it
Needed functionality: [what we need from it]"
Run all 3 perspectives in parallel, then synthesize with judge:
Task: subagent_type="multi-perspective-judge", model="opus"
Prompt: "Judge verdict type: dependency decision.
Decide whether to adopt, find alternative, or build in-house.
[paste all 3 agent outputs]"
For features touching evolving technology areas:
Task: subagent_type="research-horizon-scanner", model="haiku"
Prompt: "Scan for emerging alternatives and approaches relevant to [TOPIC].
Current approach: [what we're considering]
Tech stack: [relevant technologies]"
This is a single agent — no judge synthesis needed. Include findings in the research document.
While waiting for agents, research any technology questions:
Identify unknowns from the feature description:
Research each unknown (use WebSearch if needed):
Before drafting research.md, resolve competitive-analysis behavior for the
run:
includeCompetitiveAnalysis (alias: competitiveAnalysisEnabled).workflowProfile=enterpriseai: includeCompetitiveAnalysis=true.business-analysis.md for EnterpriseAI runs.market-analysis.md for EnterpriseAI runs.competitiveAnalysisEnabled=false in research outputs.market-analysis.md as a baseline traceability artifact with
disabled-state messaging (no comparative metrics)./2_gofer_specify normally (no stage failure).When enabled, market-analysis.md must include:
spec.md and plan.md references.The standard Gofer workflow is the public default. When workflowProfile is
explicitly enterpriseai, generate:
{FEATURE_DIR}/context-bundle.md
{FEATURE_DIR}/reuse-scan.md
{FEATURE_DIR}/ui-preview-brief.md (application delivery only)
eai --describe, eai blocks list,
eai blocks describe <id> for each candidate, and
resource schema; record stable block IDs, required resources,
data/action bindings, Storybook story IDs, theme override points, package
lane, coupling status, and any custom-block exception that needs approval.research.md.Do not recommend a new EnterpriseAI object type, API/event, workflow, or module until the reuse-before-create scan is complete.
Once all agents complete:
research.md MUST include all of the following in explicit sections:
Assume a novice user can read only in-repo/generated artifacts.
After synthesis, dispatch the visual writers in parallel to produce the
research-stage visuals. These run AFTER research findings are compiled so they
can cite real integration points and capability mentions, but BEFORE
research.md is finalized so the writers can append cross-references to the
generated artefacts.
Run two sub-agents concurrently:
visual-c4-writer (Context level only at this stage)
<feature_dir>/research.md (working draft)<feature_dir>/discovery.md (if present).specify/templates/visuals/c4-context-template.md<feature_dir>/visuals/c4-context.mdC4Context block with named external systems and at
least one Person; plain-language preamble ≥30 ≤200 words.visual-heatmap-writer (Capability heatmap)
<feature_dir>/research.md (working draft).specify/templates/visuals/capability-heatmap-template.md<feature_dir>/visuals/capability-heatmap.mdquadrantChart placing each capability on maturity ×
strategic-value axes plus tabular complement listing touched / extended /
replaced capabilities.Both writers must honour the ≥30 ≤200 word plain-language preamble rule
(NFR-010). If a renderer fails downstream, the mermaid-tabular-fallback.mjs
helper provides a markdown-table replacement without losing information.
Cross-reference the generated artefacts from research.md (Step 5) under a new
## Visuals section.
Write to {FEATURE_DIR}/research.md:
---
date: [ISO timestamp]
researcher: Claude
feature: '[Feature Name]'
status: complete
---
# Research: [Feature Name]
## Feature Summary
[Brief description of what we're building]
## Structured Discovery Output
### Problem Statement
- **Problem**: [What is not working today]
- **Current State Friction**: [Where users lose time/quality]
- **Desired EnterpriseAI Outcome**: [What success looks like in EAI terms]
### Target Persona
- **Primary Persona**: [Name/role]
- **Skill Level**: [novice/intermediate/advanced]
- **Top Needs**: [Need 1, Need 2, Need 3]
- **Constraints**: [Constraints that shape delivery]
### Value Proposition
- **Primary Value**: [Core value delivered]
- **Measurable Goal**: [Quantified target]
- **EnterpriseAI-First Rationale**: [Why EAI is the primary fit]
## Context Bundle Summary
- **Relevant Specs**: [Existing specs to carry forward]
- **Relevant Code Paths**: [Files/directories and why they matter]
- **EnterpriseAI Object Types**: [Known or candidate object types]
- **Tenant and Deployment Assumptions**: [Tenant, identity, runtime, target environment]
- **Validation Criteria**: [Business, security, data, architecture, and operational checks]
## Reuse-Before-Create Scan
| Candidate | Existing Evidence | Decision | Rationale | Owner |
| --------- | ----------------- | -------- | --------- | ----- |
| [Object type/API/workflow/module/spec] | [Path or reference] | Reuse/Extend/Create New | [Why] | [Owner] |
## Business Scenario Analysis
### Scenario Options Considered
| Scenario | User/Business Fit | Delivery Trade-off | Recommendation |
| ---------- | ----------------- | ------------------ | -------------- |
| [Option 1] | [Why it fits] | [Cost/complexity] | [Adopt/defer] |
| [Option 2] | [Why it fits] | [Cost/complexity] | [Adopt/defer] |
### Recommended Scenario
[Which scenario should move forward into specification and why]
## Codebase Analysis
### Where to Implement
| Component | Location | Purpose |
| ------------- | ----------------- | -------------- |
| [Component 1] | `path/to/file.ts` | [What it does] |
| [Component 2] | `path/to/dir/` | [What it does] |
### Existing Patterns to Follow
#### Pattern 1: [Name]
Found in: `path/to/example.ts:45-67`
```typescript
// Example code showing the pattern
```
Why relevant: [Explanation]
...
path/file.ts:123 - [Description]path/other.ts:45 - [Description]...
[Plain-language summary of the architecture direction this feature should use]
| Option | Why choose it | Why not choose it now |
|---|---|---|
| [Option 1] | [Benefit] | [Trade-off] |
| [Option 2] | [Benefit] | [Trade-off] |
---
## Step 5.5: Generate Supporting Proposal Review Document
Write to `{FEATURE_DIR}/proposal-review.md`:
````markdown
---
feature: '[Feature Name]'
created: [ISO timestamp]
status: supporting_context
recommendedScenario: '[short label]'
recommendedArchitecture: '[short label]'
selectedOption: ''
approvedBy: ''
approvedAt: ''
---
# Proposal Review: [Feature Name]
## What We Found
[Short, evidence-backed summary of the research findings]
## Business Scenarios Considered
| Scenario | User Value | Delivery Trade-off | Recommendation |
| -------- | ---------- | ------------------ | -------------- |
| [Option 1] | [Value] | [Trade-off] | [Adopt/defer] |
| [Option 2] | [Value] | [Trade-off] | [Adopt/defer] |
## Recommended Business Scenario
[What should be specified next and why]
## Technology Architecture Recommendation
### Recommended Architecture
[Plain-language architecture direction]
### Architecture Options
| Option | Why choose it | Why not choose it now |
| ------ | ------------- | --------------------- |
| [Option 1] | [Benefit] | [Trade-off] |
| [Option 2] | [Benefit] | [Trade-off] |
## Key Decisions and Why
- [Decision]: [Rationale]
- [Decision]: [Rationale]
## What Can Change Before Specification
- Scope changes the user may request
- Architecture changes the user may request
- Options that can be revisited before writing spec.md
## Open Questions
- [ ] [Question needing user input]
- [ ] [Another question]
## User Feedback and Overrides
- Pending user review
## Approval
- Status: supporting_context
- Next action: carry any user feedback into `/2_gofer_specify`
After saving research.md and proposal-review.md:
Present summary to user:
Ask focused follow-up questions only if needed:
Run architecture questions one-by-one (MANDATORY when architecture options exist):
proposal-review.md before moving to the next
questionSuggested order:
If the user requests changes:
proposal-review.md with the feedback in
User Feedback and Overridesstatus: revised_supporting_context if the recommendation must changeIf the user wants to stop after research:
Signal completion:
✓ Research complete: {FEATURE_DIR}/research.md
✓ Supporting review context ready: {FEATURE_DIR}/proposal-review.md
Key findings:
- [Finding 1]
- [Finding 2]
AUTO-CHAIN (DEFAULT): Unless the user explicitly asks to stop after
research, invoke the Skill tool with skill="/2_gofer_specify" immediately
after the research summary and any critical clarification answers are captured.
When working in an existing codebase, add this section to research.md:
## Brownfield Analysis
### Constraints & Limitations
| Constraint Type | Description | Impact on Implementation |
| ----------------- | ----------------------------------------- | ------------------------------ |
| Framework | [e.g., React 17 - no concurrent features] | [How this limits our approach] |
| Database | [e.g., PostgreSQL 12, existing schema] | [Schema constraints] |
| API Compatibility | [e.g., Must maintain v1 endpoints] | [Backward compatibility needs] |
| Performance | [e.g., Response time < 200ms] | [Optimization requirements] |
### Technical Debt to Avoid
The following patterns are deprecated or problematic - do NOT use:
| Pattern | Found In | Why Avoid | Use Instead |
| ------------- | ----------------- | --------- | -------------------- |
| [Old pattern] | `path/to/file.ts` | [Reason] | [Preferred approach] |
### Areas Requiring Extra Caution
- **[Area 1]**: [Why it's fragile and what to watch for]
- **[Area 2]**: [Known issues or gotchas]
### Integration Requirements
| Existing Service | Integration Method | Notes |
| ---------------- | ------------------ | ------------------------------ |
| [Service 1] | [API/Import/Event] | [Authentication, format, etc.] |
### Downstream Dependencies
Code that depends on areas we're modifying:
- `path/to/dependent.ts:45` - [What it depends on]
- `path/to/consumer.ts:123` - [What it expects]
Before modifying existing code:
If a base journey exists at
.specify/specs/{feature}/journeys/base-journey.md:
Generate industry variants to discover innovative approaches from other domains.
Pick a random number between 10-50:
VARIANT_COUNT=$((RANDOM % 41 + 10))
echo "Generating $VARIANT_COUNT industry variants"
Read .specify/templates/journey/industry-variants.yaml for industry-specific
patterns.
For each variant, create a file at:
.specify/specs/{feature}/journeys/variants/{industry}-{number}.md
Example: healthcare-1.md, retail-2.md, finance-1.md
Distribute proportionally across 10 industries:
Each variant should include:
---
id: {feature}-{industry}-{number}
baseJourneyId: {feature}-journey
industry: {industry}
variantNumber: {number}
created: {ISO-timestamp}
---
# Journey Variant: {Industry} #{number}
## Base Journey Reference
Based on: [base-journey.md](../base-journey.md)
## Industry Context
{Description of how this industry typically handles similar journeys}
## Adaptations
{How the base journey is adapted for this industry}
1. **Step N adapted**: {How step N changes in this industry}
2. **Actor change**: {Different actors in this industry context}
## Innovation Insights
Key innovations from {industry} that could apply to your feature:
1. **{Innovation 1}**: {Description and how it could be applied}
2. **{Innovation 2}**: {Description and how it could be applied}
## Modified Diagram
```mermaid
sequenceDiagram
{Industry-specific sequence diagram}
```
How these insights could enhance your feature:
### Document Innovation Summary
Add an "Innovation Insights" section to `research.md`:
```markdown
## Innovation Insights (from Industry Variants)
Generated {N} journey variants across 10 industries.
### Top Innovations to Consider
| Industry | Innovation | Application Potential |
|----------|------------|----------------------|
| Healthcare | AI symptom checker | Could add AI-powered input validation |
| Finance | Real-time fraud detection | Could add anomaly detection |
| Retail | Personalized recommendations | Could add user-specific suggestions |
### Variant Summary
| Industry | Count | Key Patterns |
|----------|-------|--------------|
| Retail | 5 | Cart recovery, recommendations |
| Healthcare | 4 | Patient portal, telehealth |
| ... | ... | ... |
Skip variant generation if:
At stage completion, log metrics:
.specify/scripts/bash/log-stage.sh 1_research --complete --tokens [N] --compactions [N]
This tracks:
Logs to: .specify/logs/pipeline.jsonl
.specify/specs/{feature}/ - not thoughts/shared/research.mdspec.md is writtenproposal-review.md as optional supporting context, not as a blocking stageIf the operator explicitly requests the vocabulary selector after
research.md exists, run gofer:vocabulary inline and write
.specify/specs/{feature}/glossary.md using the same artifact contract as the
standalone helper.
If the operator explicitly requests the zoom-out selector after research.md
exists, run gofer:zoom-out inline and write
.specify/specs/{feature}/zoom-out-report.md using the same artifact contract
as the standalone helper.
If research.md is missing, continue the stage normally and report that the
helper was not run.
These selectors are optional and do not change stage progress, routing, or pipeline state.
npx claudepluginhub eai-tools/eai-gofer --plugin eai-goferProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.