mcpField
B
blueprint-research

blueprint-research

github.com/majesticlabs-devAgent 工作流5062 次安装7 周前更新
代码仓库

关于 blueprint-research

blueprint-research 是蓝图工作流中的研究阶段技能,面向需要基于代码库和需求准备方案的 Agent。它结合本地代码研究、条件式外部调研和规格审查,并收集工具箱与经验资料。

主要功能

  1. 01解析工具箱并发现经验
  2. 02并行研究本地代码库
  3. 03按风险和不确定性决定外部调研
  4. 04运行规格审查并加载编码风格

适用场景

  1. 01为新功能规划收集代码库模式
  2. 02高风险或不确定主题的外部调研
  3. 03检查方案遗漏和边缘情况

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/majesticlabs-dev/majestic-marketplace --skill blueprint-research

安装后在 Claude Code 中输入/blueprint-research确认已加载。

详细介绍

蓝图研究

处理蓝图工作流的研究阶段:工具箱解析、经验教训发现、本地/外部研究决策以及规格审查。

输入

feature_description: string
tech_stack: string | string[]  # From config-reader
discovery_result:
  user_familiarity: high | medium | low  # Do they know the codebase?
  user_intent: speed | thoroughness      # What matters more?
  topic_risk: high | medium | low        # Security, payments, external APIs?
  uncertainty_level: high | medium | low # Is the approach clear?

1. 解析工具箱 + 发现经验教训

并行读取配置:

config_read("tech_stack", "generic")
config_read("lessons_path", ".agents/lessons/")

并行启动 Agent:

Task(majestic-engineer:workflow:toolbox-resolver):
  prompt: "Stage: blueprint | Tech Stack: {tech_stack}"

Task(majestic-engineer:workflow:lessons-discoverer):
  prompt: "workflow_phase: planning | tech_stack: {tech_stack} | task: {feature_description}"

存储输出:

  • research_hooks → 用于步骤 4(外部研究)
  • coding_styles → 用于步骤 5(技能注入)
  • lessons_context → 用于架构师 Agent

非阻塞错误:

  • 未找到工具箱 → 继续使用核心 Agent
  • 经验教训目录缺失 → 继续
  • 发现结果为 0 条经验教训 → 记录日志,继续
  • 发现失败 → 记录警告,继续

2. 本地研究(始终运行)

开展快速的本地研究,在决定是否进行外部研究之前了解代码库模式。

Task(majestic-engineer:research:git-researcher, prompt="{feature}")
Task(majestic-engineer:research:repo-analyst, prompt="{feature}")

存储: local_findings - 模式、约定、相似实现

3. 研究决策

根据发现的信号和本地结果,决定外部研究是否有价值。

决策矩阵:

条件外部研究
topic_risk: high(安全、支付、外部 API)始终进行 - 漏掉重要信息的代价太高
local_findings 中有强模式 + user_familiarity: high跳过 - 代码库具有权威性
uncertainty_level: high 或 user_familiarity: low研究 - 外部视角很有价值
user_intent: speed + 充分的本地模式跳过 - 优先提升速度
默认(没有强烈信号)研究 - 宁可全面一些
research_decision = evaluate(discovery_result, local_findings)
  → SKIP_EXTERNAL | RUN_EXTERNAL

If research_decision == SKIP_EXTERNAL:
  Announce: "Codebase has solid patterns for this. Proceeding without external research."
Else:
  Announce: "Running external research for {reason}."

4. 外部研究(有条件运行)

仅当 research_decision == RUN_EXTERNAL 时运行

Task(majestic-engineer:research:docs-researcher, prompt="{feature}")
Task(majestic-engineer:research:best-practices-researcher, prompt="{feature}")

特定技术栈的 Agent(来自工具箱):

For each hook in research_hooks:
  If hook.triggers.any_substring matches feature_description:
    Task(subagent_type=hook.agent, prompt="{feature} | Context: {hook.context}")

上限: 最多 4 个外部 Agent,以避免产生噪声。

等待: 收集所有结果后再继续。

5. 规格审查 + 技能注入

并行运行:

Apply spec-reviewer skill:
  context: "Feature: {feature} | Research: {combined_research}"

For each skill in coding_styles:
  Skill(skill: skill)

输出:

  • spec_findings → 缺漏、边缘情况、问题
  • skill_content → 已加载的编码风格内容

输出

research_result:
  toolbox:
    research_hooks: array
    coding_styles: array
  lessons_context: string | null
  research_decision: SKIP_EXTERNAL | RUN_EXTERNAL
  research_decision_reason: string
  research_findings:
    local:
      git: string
      repo: string
    external:              # null if research_decision == SKIP_EXTERNAL
      docs: string | null
      best_practices: string | null
      stack_specific: array | null
  spec_findings:
    gaps: array
    edge_cases: array
    questions: array
  skill_content: string
  ready_for_architecture: boolean

评论

支持 Markdown