mcpField
A
Archon Manager

Archon Manager

github.com/daffy0208Agent 工作流38126 次安装44 周前更新
代码仓库

关于 Archon Manager

Archon Manager 是面向 AI 编码助手的项目管理与知识运营技能,帮助团队确定构建内容和优先顺序。它将项目任务管理与文档、网页及代码示例的 RAG 检索结合起来。

主要功能

  1. 01按层级管理项目、功能和任务
  2. 02按 P0、P1、P2 优先级跟踪任务
  3. 03从网页和 PDF 汇集知识
  4. 04检索文档与代码示例
  5. 05查看项目进度和指标

适用场景

  1. 01为新项目规划功能与实施任务
  2. 02为待办任务查找相关技术资料
  3. 03在多个 AI 助手间共享项目上下文

MCP 相关

该技能通过 Archon MCP 服务管理项目、功能和任务,并提供知识检索、内容导入及指标查询工具。README 还介绍了将 Claude Code、Cursor 和 Windsurf 连接到同一 Archon 实例。

安装

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

$npx skills add https://github.com/daffy0208/ai-dev-standards --skill archon-manager

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

附带文件manifest.yamlREADME.md

详细介绍

Archon Manager

面向战略项目管理和知识操作的 Master Archon MCP。

Archon 是 AI 编码助手的指挥中心,提供:

  • 战略层:项目管理、任务跟踪、基于优先级的工作流(做什么/何时做)
  • 知识层:RAG 查询、网页爬取、文档处理、代码示例
  • 集成层:将 Claude Code、Cursor、Windsurf 与统一上下文相连接

双层架构:

  • Archon(此技能)= 战略层(构建什么、何时构建)
  • 技能 = 战术层(如何高质量地构建)
  • 二者结合 = 最佳成果

何时使用此技能

  • 项目设置:创建包含功能和任务的分层项目
  • 任务管理:基于优先级的工作流(P0/P1/P2)、状态跟踪
  • 知识查询:跨文档、代码示例和 PDF 进行 RAG 搜索
  • 战略规划:使用 Archon 决定接下来构建什么
  • 双层工作流:实施 Archon(战略层)+ 技能(战术层)模式
  • 上下文保留:在不同会话间维护项目知识
  • AI 协调:让多个 AI 助手在同一项目上保持同步

核心概念

1. 双层架构
┌──────────────────────────────────────────────────┐
│           ARCHON MCP SERVER                      │
│           (Strategic Layer)                      │
│                                                  │
│  • Project management & task tracking           │
│  • Priority-based workflow (P0/P1/P2)          │
│  • Knowledge queries (RAG)                      │
│  • Code example search                          │
│  • Progress tracking & metrics                  │
│  • Context preservation                         │
└─────────────────┬────────────────────────────────┘
                  │
                  │ invokes when needed
                  ↓
┌──────────────────────────────────────────────────┐
│      AI-DEV-STANDARDS SKILLS                     │
│      (Tactical Layer)                            │
│                                                  │
│  • Domain-specific expertise                    │
│  • Implementation patterns                      │
│  • Quality standards                            │
│  • Best practices                               │
└──────────────────────────────────────────────────┘

关键要点:Archon 管理构建什么以及何时构建,技能指导如何高质量地构建。

2. 分层项目结构
Project
├── Feature 1
│   ├── Task 1.1 (P0)
│   ├── Task 1.2 (P1)
│   └── Task 1.3 (P2)
├── Feature 2
│   ├── Task 2.1 (P0)
│   └── Task 2.2 (P1)
└── Knowledge Base
    ├── Web pages
    ├── PDFs
    ├── Code examples
    └── Documentation
3. 基于优先级的工作流
  • P0(关键):核心价值主张必不可少的内容,会阻塞所有工作
  • P1(高价值):重要但可以稍后处理,影响较大
  • P2(锦上添花):增强项,优先级较低
4. 知识管理
  • 网页爬取:自动检测站点地图、智能抓取
  • 文档处理:对 PDF 进行智能分块
  • 代码示例:从文档中提取
  • 语义搜索:基于向量和嵌入的 RAG
  • 来源整理:标签、类别、版本

Archon 实施的 6 个阶段

阶段 1:设置与配置

目标:为项目安装并配置 Archon

1.1 前提条件
# Required
- Docker Desktop (running)
- Node.js 18+
- Supabase account (cloud: https://supabase.com or local)
- LLM API key (OpenAI, Gemini, or Ollama)
1.2 安装
# Clone Archon
git clone https://github.com/coleam00/Archon.git
cd Archon

# Create .env file
cp .env.example .env

# Edit .env with your credentials
SUPABASE_URL=your-supabase-url
SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
OPENAI_API_KEY=your-openai-key  # or GEMINI_API_KEY, OLLAMA_URL

# Set up database (run SQL migrations in Supabase SQL Editor)
# See: database/migrations/

# Start Archon
docker compose up --build -d

# Verify running
# Frontend: http://localhost:3737
# API: http://localhost:8181
# MCP: http://localhost:8051
1.3 连接 AI 助手

对于 Claude Code(.claude/mcp-settings.json):

{
  "mcpServers": {
    "archon": {
      "command": "node",
      "args": ["/path/to/archon/mcp-server/dist/index.js"],
      "env": {
        "ARCHON_API_URL": "http://localhost:8181"
      }
    }
  }
}

对于 Cursor/Windsurf:在设置中进行类似的 MCP 配置

1.4 验证连接
// Test Archon connection
archon: list_projects()
// Should return empty list or existing projects

阶段 2:创建项目

目标:设置分层项目结构

2.1 创建项目
// Using Archon MCP tool
archon: create_project({
  name: 'My Application',
  description: 'Full-stack web application for task management',
  status: 'active',
  metadata: {
    tech_stack: ['Next.js', 'Supabase', 'TypeScript'],
    team_size: 1,
    target_launch: '2025-12-01'
  }
})

// Returns: { project_id: "uuid", name: "My Application", ... }
2.2 添加功能
// Create major features
archon: create_feature({
  project_id: 'uuid',
  name: 'User Authentication',
  description: 'Complete auth system with email/OAuth',
  priority: 'P0',
  estimated_effort: '2 days'
})

archon: create_feature({
  project_id: 'uuid',
  name: 'Task Management',
  description: 'CRUD operations for tasks',
  priority: 'P0',
  estimated_effort: '3 days'
})

archon: create_feature({
  project_id: 'uuid',
  name: 'Team Collaboration',
  description: 'Share tasks with team members',
  priority: 'P1',
  estimated_effort: '4 days'
})
2.3 将功能拆分为任务
// Use AI-assisted task generation
archon: generate_tasks({
  feature_id: 'auth-feature-uuid',
  instructions: 'Break down authentication into implementation tasks',
  use_ai: true
})

// Or create manually
archon: create_task({
  feature_id: 'auth-feature-uuid',
  title: 'Implement email/password signup',
  description: 'Create signup form, API endpoint, database schema',
  priority: 'P0',
  status: 'todo',
  estimated_hours: 4,
  skills_to_use: ['api-designer', 'security-engineer', 'frontend-builder']
})

阶段 3:设置知识库

目标:构建全面的知识库,供 AI 查询

3.1 添加网页文档
// Crawl entire documentation site
archon: crawl_website({
  url: 'https://nextjs.org/docs',
  max_depth: 3,
  follow_sitemap: true,
  tags: ['nextjs', 'documentation']
})

// Archon automatically:
// - Detects sitemap
// - Crawls pages
// - Extracts text
// - Chunks intelligently
// - Generates embeddings
// - Stores in vector database
3.2 添加 PDF 文档
// Upload PDFs (design docs, specs, research papers)
archon: add_document({
  file_path: '/path/to/architecture-spec.pdf',
  type: 'pdf',
  tags: ['architecture', 'design'],
  project_id: 'uuid'
})

// Archon automatically:
// - Extracts text from PDF
// - Chunks by sections/pages
// - Generates embeddings
// - Indexes for search
3.3 添加代码示例
// Extract code examples from repos or docs
archon: extract_code_examples({
  source_url: 'https://github.com/vercel/next.js/tree/canary/examples',
  tags: ['nextjs', 'examples'],
  language_filter: ['typescript', 'javascript']
})
3.4 整理知识
// Tag and categorize
archon: update_source({
  source_id: 'uuid',
  tags: ['authentication', 'security', 'best-practices'],
  category: 'implementation-guides',
  version: '1.0'
})

阶段 4:Archon + 技能工作流

目标:使用双层架构,实现最佳开发效果

4.1 阶段 1:战略规划(Archon)

目标:理解要构建什么以及为什么构建

// 1. Get next priority task
const task = archon:get_next_task({
  project_id: "uuid",
  filter_by: "status",
  filter_value: "todo",
  sort_by: "priority"  // P0 first
})
// → { id: "P0-3", title: "Implement User Authentication", priority: "P0" }

// 2. Get task details
const details = archon:get_task({
  task_id: "P0-3"
})
// → Complete task info: description, requirements, dependencies

// 3. Research the domain (RAG query)
const research = archon:perform_rag_query({
  query: "JWT authentication Next.js best practices",
  project_id: "uuid",
  match_count: 5
})
// → Top 5 most relevant knowledge base entries with context

// 4. Find code examples
const examples = archon:search_code_examples({
  query: "auth middleware Next.js TypeScript",
  match_count: 3
})
// → Relevant code examples from knowledge base

// 5. Mark as doing
archon:update_task({
  task_id: "P0-3",
  updates: { status: "doing" }
})
4.2 阶段 2:战术执行(技能)

目标:结合领域专长和最佳实践进行实施

// 6. Identify required skills (from task.skills_to_use)
// → ["api-designer", "security-engineer", "frontend-builder"]

// 7. Invoke skills for guidance
// (AI assistant automatically invokes these skills based on context)

// 8. Implement following both:
//    - Archon research (RAG results + code examples)
//    - Skill guidance (best practices + patterns)

// 9. Build the feature
4.3 阶段 3:质量验证

目标:完成前确保质量

// 10. Apply quality checks
// - Invoke testing-strategist skill
// - Invoke security-engineer skill
// - Run tests, validate security

// 11. Update task to review
archon:update_task({
  task_id: "P0-3",
  updates: { status: "review" }
})

// 12. After user validation → mark done
archon:update_task({
  task_id: "P0-3",
  updates: { status: "done" }
})

// 13. Get next task
const nextTask = archon:get_next_task({
  project_id: "uuid",
  filter_by: "status",
  filter_value: "todo"
})
// → Repeat cycle

阶段 5:高级知识操作

目标:充分利用 Archon 的 RAG 能力

5.1 语义搜索模式
// Broad research query
archon: perform_rag_query({
  query: 'How to implement real-time features in Next.js',
  match_count: 10,
  similarity_threshold: 0.7
})

// Specific technical query
archon: perform_rag_query({
  query: 'Next.js middleware authentication example code',
  match_count: 3,
  filter_tags: ['nextjs', 'authentication', 'code-example']
})

// Architecture decision query
archon: perform_rag_query({
  query: 'PostgreSQL vs MongoDB for user data',
  match_count: 5,
  filter_tags: ['database', 'architecture']
})
5.2 上下文感知查询
// Query within project context
archon: perform_rag_query({
  query: 'How should we structure our authentication?',
  project_id: 'uuid', // Uses project's knowledge base
  match_count: 5
})

// Query specific feature context
archon: perform_rag_query({
  query: 'Best practices for this feature',
  feature_id: 'auth-feature-uuid',
  match_count: 3
})
5.3 知识库版本控制
// Version project documentation
archon: create_doc_version({
  project_id: 'uuid',
  document_name: 'Architecture Decision Record',
  content: '...',
  version: '1.0.0',
  tags: ['architecture', 'decisions']
})

// Query historical context
archon: get_doc_history({
  project_id: 'uuid',
  document_name: 'Architecture Decision Record'
})

阶段 6:进度跟踪与指标

目标:监控项目健康状况和开发速度

6.1 项目指标
// Get project overview
archon: get_project_metrics({
  project_id: 'uuid'
})
// Returns:
// {
//   total_features: 5,
//   total_tasks: 23,
//   p0_tasks: 8,
//   p1_tasks: 10,
//   p2_tasks: 5,
//   tasks_by_status: {
//     todo: 15,
//     doing: 3,
//     review: 2,
//     done: 3
//   },
//   completion_percentage: 13,
//   knowledge_base_entries: 147
// }
6.2 开发速度跟踪
// Tasks completed per week
archon: get_velocity({
  project_id: 'uuid',
  time_period: 'week'
})

// Burndown chart data
archon: get_burndown({
  project_id: 'uuid',
  sprint_id: 'sprint-1'
})
6.3 实时更新

Archon 使用 Socket.IO 实时更新进度:

  • 任务状态变更
  • 知识库新增内容
  • 项目指标更新
  • 团队协作事件

集成模式

模式 1:独立开发者工作流
// Morning routine
const nextTask = archon:get_next_task({ project_id: "uuid" })
const research = archon:perform_rag_query({
  query: nextTask.title + " implementation",
  match_count: 5
})

// Work on task (using Skills for implementation)
// ...

// End of day
archon:update_task({ task_id: nextTask.id, status: "review" })
模式 2:团队协作
// Team lead creates project structure
archon: create_project({ name: 'Team Project' })
archon: create_feature({ name: 'Backend API', assigned_to: 'developer-1' })
archon: create_feature({ name: 'Frontend UI', assigned_to: 'developer-2' })

// Each team member queries same knowledge base
archon: perform_rag_query({ query: '...', project_id: 'uuid' })

// Real-time sync of task status across team
模式 3:多 AI 助手设置
// Claude Code for implementation
// Cursor for refactoring
// Windsurf for testing

// All connected to same Archon instance
// Same project, same tasks, same knowledge base
// Coordinated through Archon's unified context

Archon MCP 工具参考

项目管理
// Projects
archon: create_project({ name, description, status, metadata })
archon: list_projects()
archon: get_project({ project_id })
archon: update_project({ project_id, updates })
archon: delete_project({ project_id })

// Features
archon: create_feature({ project_id, name, description, priority })
archon: list_features({ project_id })
archon: update_feature({ feature_id, updates })

// Tasks
archon: create_task({ feature_id, title, description, priority, status })
archon: get_next_task({ project_id, filter_by, sort_by })
archon: get_task({ task_id })
archon: update_task({ task_id, updates })
archon: list_tasks({ project_id, filter_by, filter_value })
archon: generate_tasks({ feature_id, instructions, use_ai })
知识管理
// RAG Queries
archon:perform_rag_query({query, project_id?, match_count, similarity_threshold, filter_tags?})
archon:search_code_examples({query, match_count, language_filter?})

// Content Ingestion
archon:crawl_website({url, max_depth, follow_sitemap, tags})
archon:add_document({file_path, type, tags, project_id})
archon:extract_code_examples({source_url, tags, language_filter})

// Knowledge Base Management
archon:list_sources({project_id, filter_tags?})
archon:update_source({source_id, tags, category, version})
archon:delete_source({source_id})
指标与分析
archon: get_project_metrics({ project_id })
archon: get_velocity({ project_id, time_period })
archon: get_burndown({ project_id, sprint_id })

最佳实践

1. 从清晰的项目结构开始
// Good: Hierarchical and organized
Project: "E-commerce Platform"
├── Feature: "User Authentication" (P0)
│   ├── Task: "Implement signup" (P0)
│   ├── Task: "Implement login" (P0)
│   └── Task: "Password reset" (P1)
├── Feature: "Product Catalog" (P0)
│   ├── Task: "Product CRUD API" (P0)
│   ├── Task: "Product listing UI" (P0)
│   └── Task: "Search functionality" (P1)

// Bad: Flat, disorganized
- Task: "Build everything"
- Task: "Make it work"
- Task: "Deploy"
2. 有效使用优先级

P0(关键):MVP 必备,会阻碍其他所有工作

  • 核心价值主张功能
  • 严重 Bug
  • 安全漏洞

P1(高价值):重要且影响重大

  • 重要增强功能
  • 重要优化
  • 主要集成

P2(锦上添花):可以稍后处理

  • 润色与改进
  • 次要功能
  • 非关键改进
3. 构建全面的知识库
// Add diverse sources
archon: crawl_website({ url: 'https://docs.framework.com' })
archon: add_document({ file_path: 'architecture-spec.pdf' })
archon: extract_code_examples({ source_url: 'https://github.com/...' })

// Tag consistently
tags: ['category', 'technology', 'type']
// e.g., ["authentication", "nextjs", "tutorial"]
4. 有策略地使用 RAG 查询
// Before starting task
const research = archon:perform_rag_query({
  query: "How to implement " + task.title,
  match_count: 5
})

// During implementation (specific questions)
const answer = archon:perform_rag_query({
  query: "How to handle edge case X",
  match_count: 3
})

// Architecture decisions
const guidance = archon:perform_rag_query({
  query: "Should I use pattern A or pattern B for ...",
  match_count: 5
})
5. 严格遵守任务状态规范
todo → doing → review → done
  • todo:尚未开始
  • doing:正在进行(限制为 1-3 个任务)
  • review:等待验证
  • done:已完成并验证

状态变更后立即更新。


故障排除

问题:Archon 无法连接

症状:AI 助手中没有可用的 MCP 工具

解决方案:

  1. 检查 Docker 容器是否正在运行:docker ps
  2. 确认端口未被阻止:3737、8181、8051、8052
  3. 检查 .claude/mcp-settings.json 中的 MCP 配置
  4. 更改配置后重启 AI 助手
  5. 查看 Archon 日志:docker logs archon-api
问题:RAG 查询无结果

症状:perform_rag_query 返回空结果

解决方案:

  1. 确认知识库中有内容:archon:list_sources()
  2. 检查嵌入是否已生成(等待处理完成)
  3. 降低 similarity_threshold(默认值为 0.7,可尝试 0.5)
  4. 使用更宽泛的查询词
  5. 检查来源标签是否与 filter_tags 匹配
问题:任务未显示

症状:get_next_task 返回空结果

解决方案:

  1. 确认项目存在:archon:list_projects()
  2. 检查任务状态筛选条件
  3. 确保任务是为正确的功能或项目创建的
  4. 确认并非所有任务都已标记为 "done"
问题:性能缓慢

症状:RAG 查询或任务操作缓慢

解决方案:

  1. 检查 Docker 资源分配
  2. 优化知识库(删除重复内容)
  3. 适当使用 match_count(5-10,而非 100)
  4. 考虑升级 Supabase 方案(如果使用云服务)
  5. 使用本地 Ollama 代替 API 调用

与 ai-dev-standards 集成

同时使用 Archon 和 Skills

Archon 提供(战略层面):

  • 要构建什么(优先级队列中的任务)
  • 何时构建(P0/P1/P2 排序)
  • 上下文(RAG 查询、项目知识)

Skills 提供(战术层面):

  • 如何高质量地构建(最佳实践、模式)
  • 领域专业知识(安全、性能等)
  • 质量标准(测试、验证)

工作流示例:

// 1. Strategic (Archon)
const task = archon:get_next_task({project_id: "uuid"})
const research = archon:perform_rag_query({query: task.title})
archon:update_task({task_id: task.id, status: "doing"})

// 2. Tactical (Skills)
// AI automatically invokes: api-designer, security-engineer, frontend-builder
// Based on task.skills_to_use

// 3. Implementation
// Build following: Archon research + Skill guidance

// 4. Quality (Skills)
// AI invokes: testing-strategist, security-engineer

// 5. Complete (Archon)
archon:update_task({task_id: task.id, status: "done"})
任务与 Skill 的映射

在 Archon 中创建任务时,指定 skills_to_use:

archon: create_task({
  title: 'Implement authentication API',
  skills_to_use: ['api-designer', 'security-engineer']
  // ...
})

这会告知 AI 助手在实现过程中应调用哪些 Skills。


成功指标

在以下情况下,说明你正在有效地使用 Archon:

  1. ✅ 项目结构清晰:层级分明、组织有序、优先级明确
  2. ✅ 始终知道接下来要做什么:get_next_task 为日常工作提供指引
  3. ✅ 知识库内容丰富:RAG 查询能返回相关且有用的结果
  4. ✅ 进度清晰可见:指标显示稳步完成
  5. ✅ 状态规范有序:任务在工作流中顺畅流转
  6. ✅ 上下文得以保留:中断后可以无损地恢复项目
  7. ✅ 质量得到保障:双层工作流(Archon + Skills)产出卓越成果

快速参考

常用命令
// Daily workflow
archon: get_next_task({ project_id })
archon: perform_rag_query({ query, match_count: 5 })
archon: update_task({ task_id, status: 'doing' })
// ... work ...
archon: update_task({ task_id, status: 'done' })

// Project setup
archon: create_project({ name, description })
archon: create_feature({ project_id, name, priority: 'P0' })
archon: create_task({ feature_id, title, priority: 'P0' })

// Knowledge building
archon: crawl_website({ url, tags })
archon: add_document({ file_path, tags })

// Progress tracking
archon: get_project_metrics({ project_id })
archon: list_tasks({ project_id, filter_by: 'status', filter_value: 'done' })
优先级指南
  • P0:核心功能、严重 Bug、安全问题
  • P1:重要增强、优化、集成
  • P2:润色、次要功能、锦上添花的事项
状态流转
todo → doing (working) → review (validate) → done (complete)

总结

Archon 是战略指挥中心,负责:

  • 管理要构建什么以及何时构建(优先级队列)
  • 通过 RAG(知识库)提供上下文
  • 跟踪进度和指标
  • 协调 AI 助手

与 Skills(如何高效构建)结合后,Archon 可实现:

  • 战略一致性(所有工作都与目标保持一致)
  • 战术卓越性(领域专业知识 + 最佳实践)
  • 上下文保留(不丢失知识)
  • 质量保证(多层验证)

关键要点:使用 Archon 进行战略规划(要做什么/何时做),调用 Skills 获取实施指导(如何做)。两者结合可带来最佳成果。

详细集成模式:请参阅 DOCS/ARCHON-INTEGRATION.md 完整示例:请参阅 EXAMPLES/archon-workflow-example.md

评论

支持 Markdown