plugins/devflow/skills/research-objective/SKILL.md
Research how to build something before planning it — discovers best practices, architecture patterns, and pitfalls for the domain. Use when the user wants to investigate, research, or explore options before planning an objective. Triggers on: "research objective", "investigate before planning", "look into how to build", "what's the best approach for objective"
npx skillsauth add ao-cyber-systems/devflow-claude research-objectiveInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Note: This is a standalone research command. For most workflows, use /devflow:plan-objective which integrates research automatically.
Use this command when:
Orchestrator role: Parse objective, validate against roadmap, check existing research, gather context, spawn researcher agent, present results.
Why subagent: Research burns context fast (WebSearch, Context7 queries, source verification). Fresh 200k context for investigation. Main context stays lean for user interaction. </objective>
<context> Objective number: $ARGUMENTS (required)Normalize objective input in step 1 before any directory lookups. </context>
<process>INIT=$(node ~/.claude/devflow/bin/df-tools.cjs init objective-op "$ARGUMENTS")
Extract from init JSON: objective_dir, objective_number, objective_name, objective_found, commit_docs, has_research.
Resolve researcher model:
RESEARCHER_MODEL=$(node ~/.claude/devflow/bin/df-tools.cjs resolve-model objective-researcher --raw)
OBJECTIVE_INFO=$(node ~/.claude/devflow/bin/df-tools.cjs roadmap get-objective "${objective_number}")
If found is false: Error and exit. If found is true: Extract objective_number, objective_name, goal from JSON.
ls .planning/objectives/${OBJECTIVE}-*/RESEARCH.md 2>/dev/null
If exists: Offer: 1) Update research, 2) View existing, 3) Skip. Wait for response.
If doesn't exist: Continue.
Run the org-awareness scan to surface sibling-repo / eden-libs / org-Project signals BEFORE the researcher reads CONTEXT.md. This populates a durable ## Cross-Repo Considerations section in CONTEXT.md that the researcher reads as upstream input.
CONSIDERATIONS=$(node ~/.claude/devflow/bin/df-tools.cjs org-awareness considerations "${objective_number}" 2>/dev/null || echo "")
If CONSIDERATIONS is empty (df-tools failed or scanners returned nothing), proceed to step 3 without writing.
If CONSIDERATIONS is non-empty:
CONTEXT_PATH="${objective_dir}/${padded_objective}-CONTEXT.md"
SECTION_HEADER="## Cross-Repo Considerations"
if [[ ! -f "$CONTEXT_PATH" ]]; then
# Create CONTEXT.md with just this section as a starting scaffold
cat > "$CONTEXT_PATH" <<EOF
---
objective: ${objective_number}-${objective_slug}
title: ${objective_name}
created: $(date -u +%Y-%m-%dT%H:%M:%SZ)
status: in_progress
---
# Objective ${objective_number} — Context
${SECTION_HEADER}
${CONSIDERATIONS}
EOF
elif grep -q "^${SECTION_HEADER}" "$CONTEXT_PATH"; then
# Replace existing section body in-place
# Write body to a temp file first (avoids macOS BSD awk -v newline limitation)
BODY_TMP=$(mktemp)
printf '%s\n' "${CONSIDERATIONS}" > "$BODY_TMP"
awk -v section="${SECTION_HEADER}" -v bodyfile="$BODY_TMP" '
BEGIN {
in_section = 0
body = ""
while ((getline line < bodyfile) > 0) { body = body line "\n" }
close(bodyfile)
}
{
if ($0 == section) {
printf "%s\n%s", $0, body
in_section = 1
next
}
if (in_section && /^## /) { in_section = 0 }
if (!in_section) print $0
}
' "$CONTEXT_PATH" > "$CONTEXT_PATH.tmp" && mv "$CONTEXT_PATH.tmp" "$CONTEXT_PATH"
rm -f "$BODY_TMP"
else
# Append section at end
echo "" >> "$CONTEXT_PATH"
echo "${SECTION_HEADER}" >> "$CONTEXT_PATH"
echo "" >> "$CONTEXT_PATH"
echo "${CONSIDERATIONS}" >> "$CONTEXT_PATH"
fi
Display: "Cross-Repo Considerations refreshed in ${CONTEXT_PATH}"
# Objective section already loaded in OBJECTIVE_INFO
echo "$OBJECTIVE_INFO" | jq -r '.section'
cat .planning/REQUIREMENTS.md 2>/dev/null
cat .planning/objectives/${OBJECTIVE}-*/*-CONTEXT.md 2>/dev/null
grep -A30 "### Decisions Made" .planning/STATE.md 2>/dev/null
Present summary with objective description, requirements, prior decisions.
Research modes: ecosystem (default), feasibility, implementation, comparison.
<research_type>
Objective Research — investigating HOW to implement a specific objective well.
</research_type>
<key_insight>
The question is NOT "which library should I use?"
The question is: "What do I not know that I don't know?"
For this objective, discover:
- What's the established architecture pattern?
- What libraries form the standard stack?
- What problems do people commonly hit?
- What's SOTA vs what Claude's training thinks is SOTA?
- What should NOT be hand-rolled?
</key_insight>
<objective>
Research implementation approach for Objective {objective_number}: {objective_name}
Mode: ecosystem
</objective>
<context>
**Objective description:** {phase_description}
**Requirements:** {requirements_list}
**Prior decisions:** {decisions_if_any}
**Objective context:** {context_md_content}
</context>
<downstream_consumer>
Your RESEARCH.md will be loaded by `/devflow:plan-objective` which uses specific sections:
- `## Standard Stack` → Plans use these libraries
- `## Architecture Patterns` → Task structure follows these
- `## Don't Hand-Roll` → Tasks NEVER build custom solutions for listed problems
- `## Common Pitfalls` → Verification steps check for these
- `## Code Examples` → Task actions reference these patterns
Be prescriptive, not exploratory. "Use X" not "Consider X or Y."
</downstream_consumer>
<quality_gate>
Before declaring complete, verify:
- [ ] All domains investigated (not just some)
- [ ] Negative claims verified with official docs
- [ ] Multiple sources for critical claims
- [ ] Confidence levels assigned honestly
- [ ] Section names match what plan-objective expects
</quality_gate>
<output>
Write to: .planning/objectives/${OBJECTIVE}-{slug}/${OBJECTIVE}-RESEARCH.md
</output>
Task(
prompt="First, read ~/.claude/agents/objective-researcher.md for your role and instructions.\n\n" + filled_prompt,
subagent_type="general-purpose",
model="{researcher_model}",
description="Research Objective {objective}"
)
## RESEARCH COMPLETE: Display summary, offer: Plan objective, Dig deeper, Review full, Done.
## CHECKPOINT REACHED: Present to user, get response, spawn continuation.
## RESEARCH INCONCLUSIVE: Show what was attempted, offer: Add context, Try different mode, Manual.
<objective>
Continue research for Objective {objective_number}: {objective_name}
</objective>
<prior_state>
Research file: @.planning/objectives/${OBJECTIVE}-{slug}/${OBJECTIVE}-RESEARCH.md
</prior_state>
<checkpoint_response>
**Type:** {checkpoint_type}
**Response:** {user_response}
</checkpoint_response>
Task(
prompt="First, read ~/.claude/agents/objective-researcher.md for your role and instructions.\n\n" + continuation_prompt,
subagent_type="general-purpose",
model="{researcher_model}",
description="Continue research Objective {objective}"
)
</process>
<success_criteria>
development
Resolve a parked decision and resume autonomous execution. Use when you see a pending DECISION-NNN.md in .planning/decisions/pending/, when the user wants to choose an option for a blocked checkpoint:decision, or when you need to tell the executor which option to take. Triggers on: "resolve decision", "decide DECISION-", "pick option for DECISION-", "unblock DECISION-", "answer DECISION-", "choose option for decision", "I want option-a", "go with option-b", "my answer is".
development
Orchestrate a multi-step DevFlow workflow by chaining skills. Use when the user wants to invoke a sequence of skills as one ask (e.g., "build and sync to github", "research, plan, then build", "ship and announce"). Triggers on: "ship X to Y", "build and X", "plan and X", "X then Y", "in one go", "as a chain", "all in sequence", "chain", "ship-and-sync", "research-plan-build"
testing
Stamp a new polyglot monorepo using the AO Cyber Systems scaffold — root CLAUDE.md with Layout table, per-area CLAUDE.md, path-filtered CI workflows, comprehensive .gitignore, and the no-binaries pre-commit hook config. Use this for new product monorepos (the 5-monorepo architecture: aodex, aosentry, eden-biz, politihub, aohealth, plus future ones). Triggers on: "new monorepo", "scaffold a monorepo", "set up a monorepo", "create a new product monorepo".
development
Validate that a monorepo follows the AO Cyber Systems layout convention — root CLAUDE.md declares every area, every area has its own CLAUDE.md, no compiled binaries are tracked in git. Reads the root `CLAUDE.md` Layout table, walks the working tree, and reports drift in a single Markdown summary. Standalone — works on any repo. Triggers on: "audit monorepo layout", "monorepo doctor", "is this monorepo healthy?", "check the layout", "find binaries in the repo".