ai-harness-tool-cli
v1.0.0
Published
AI-powered development harness scaffold for Vue/React SPA projects
Downloads
168
Maintainers
Readme
Harness Scaffold
AI-powered 开发工作流脚手架。一键在项目中初始化 .claude/ harness 目录,包含 6 阶段 Feature Workflow、阶段 Agent、产物模板和规则系统。
快速开始
# 在当前项目初始化(交互式)
npx create-harness
# 指定预设
npx create-harness --preset vue-spa
npx create-harness --preset react-spa
# 指定目标目录
npx create-harness /path/to/my-project --preset vue-spa预设 (Presets)
| 预设 | 技术栈 | 说明 |
|------|--------|------|
| vue-spa | Vue 3 + Vite + TypeScript + Pinia + SCSS | 单页应用,支持多项目 monorepo |
| react-spa | React 18 + Vite + TypeScript + Zustand + SCSS | 单页应用 |
生成内容
.claude/
├── CLAUDE.md # 项目入口导航
├── workflow.md # 6 阶段 Feature 工作流
├── KNOWLEDGE.md # 知识系统导航
├── KNOWLEDGE_GUIDE.md # 知识文档建设指南
├── agents/ # AI Agent 定义
│ ├── feature-01-domain-match-agent.md # 阶段一:领域匹配
│ ├── feature-02-requirement-explore-agent.md # 阶段二:需求探索
│ ├── feature-03-explore-review-agent.md # 阶段三:探索审查
│ ├── feature-04-design-agent.md # 阶段四:方案设计
│ ├── feature-05-implementation-agent.md # 阶段五:编码实现
│ ├── feature-06-acceptance-agent.md # 阶段六:验收归档
│ ├── source-explorer-agent.md # 源码探索
│ └── rules-loader-agent.md # 规则加载
├── prompts/ # Agent Prompt 文件
│ ├── feature-01-match-prompt.md
│ ├── feature-01-review-prompt.md
│ └── feature-04-review-prompt.md
├── templates/ # 产物模板
│ ├── feature/ # 10 个 Feature 产物模板
│ └── knowledge/ # 知识文档模板 (L0/L1/L2)
├── rules/ # 编码规则(技术栈特定)
│ ├── architecture-constraints.md
│ ├── architecture-map.md
│ ├── coding-conventions.md
│ ├── constraints.md
│ ├── forbidden.md
│ └── project-rules.md
├── knowledge/ # 领域知识骨架(待填充)
│ ├── domain-registry.md
│ ├── system-map.md
│ └── domains/ # L0/L1/L2 占位
├── reference/ # 参考文档
│ └── knowledge-quality-rules.md
└── skills/ # (可选)项目特定 skill工作流架构
PRD 输入
↓
Stage 1: 领域匹配与意图拆分 → 01-domain.md
↓
Stage 2: 需求探索 + Pipeline → 03-explore.md
↓
Stage 3: 探索文档审查 → 04-review.md
↓
Stage 4: 方案设计与验证 → 05-design.md + 05-task.md + 06-verify-report.md
↓
Stage 5: 编码实现 → 代码变更 + 07-process.md
↓
Stage 6: 验收归档 → 08-release.md配置模型
项目根目录的 .claude/harness.config.yaml(生成后):
project:
name: my-project
type: vue-spa
constraints:
dirLayout:
pages: src/views/
components: src/components/
api: src/api/
store: src/store/
importAlias: "@/"
cssPreprocessor: scss
stateManagement: pinia
rules:
architectureCheck: strict
forbiddenPatterns:
- "any"
- "!!"自定义
添加新规则
在 .claude/rules/ 下创建 .md 文件,AI agent 会自动加载。
扩展 Agent
在 .claude/agents/ 下创建新的 agent 定义文件,在 workflow.md 中注册到对应阶段。
添加知识文档
按 L0 → L1 → L2 三层模型填充 knowledge/ 目录:
- 在
knowledge/domain-registry.md注册 L0 域 - 创建
knowledge/domains/<project>/L0-domain.md - 创建
knowledge/domains/<project>/routes/<route>/L1-route.md - 创建
knowledge/domains/<project>/routes/<route>/L2-module-map.md
升级
# 升级通用引擎文件(保留项目特定配置)
npx create-harness --upgrade升级仅覆盖 Layer 1 文件(workflow.md / agents / prompts / templates),不覆盖项目特定的 rules / knowledge。
License
MIT
