ai-dev-harness 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COLLEAGUE_TRIAL_GUIDE.md +44 -16
- package/ONLINE_INSTALL_GUIDE.md +458 -0
- package/README.md +157 -22
- package/dist/agent.js +38 -19
- package/dist/approval.js +64 -0
- package/dist/audit.js +1 -0
- package/dist/checkpoint.js +83 -0
- package/dist/cli.js +322 -81
- package/dist/config.js +39 -1
- package/dist/context.js +14 -5
- package/dist/contextScore.js +44 -0
- package/dist/diagnostics.js +58 -0
- package/dist/doctor.js +100 -0
- package/dist/feedback.js +5 -0
- package/dist/integration.js +62 -2
- package/dist/loop.js +116 -0
- package/dist/mcp.js +1 -1
- package/dist/metrics.js +91 -0
- package/dist/replay.js +27 -0
- package/dist/runPaths.js +30 -0
- package/dist/summarize.js +139 -11
- package/package.json +3 -2
- package/scripts/read-evidence.ps1 +37 -1
- package/scripts/run-harness.ps1 +1 -1
- package/templates/default-project/TOOLS.md +6 -3
- package/templates/default-project/skills/add_feature/context.yaml +18 -15
- package/templates/default-project/skills/fix_bug/context.yaml +18 -15
- package/templates/default-project/skills/update_docs/context.yaml +16 -12
- package/templates/default-project/skills/write_tests/context.yaml +17 -14
- package/templates/integrations/claude/SKILL.md +47 -11
- package/templates/integrations/codex/AGENTS_BLOCK.md +42 -11
- package/templates/integrations/cursor/ai-dev-harness.mdc +55 -0
- package/templates/integrations/gemini/GEMINI_BLOCK.md +46 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 使用 AI Dev Harness 执行可审计研发任务
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AI Dev Harness
|
|
7
|
+
|
|
8
|
+
当用户要求使用 Harness、可审计执行、CodeGraph/Knowledge Graph 辅助研发,或要求执行 `fix_bug`、`add_feature`、`write_tests`、`update_docs` 时,优先使用 AI Dev Harness。
|
|
9
|
+
|
|
10
|
+
## MCP Preflight
|
|
11
|
+
|
|
12
|
+
运行 Harness 前,先使用 Cursor 当前可用的 MCP 工具收集上下文:
|
|
13
|
+
|
|
14
|
+
- CodeGraph:优先围绕任务、文件、符号、调用链和影响范围查询,记录使用过的工具与关键发现。
|
|
15
|
+
- Knowledge Graph:优先查找 ADR、模块说明、接口说明、runbook、历史决策和踩坑记录。
|
|
16
|
+
- 不要在 Harness 内实现 MCP transport;MCP 调用属于当前 Agent/编辑器的能力。
|
|
17
|
+
- 不要直接写入 Knowledge Graph,只在 Harness 产物 `persist_suggestions.md` 中提出沉淀建议。
|
|
18
|
+
|
|
19
|
+
请在当前对话中先输出:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
## MCP Preflight Findings
|
|
23
|
+
- CodeGraph tools used:
|
|
24
|
+
- CodeGraph primary query:
|
|
25
|
+
- Source grouped by file:
|
|
26
|
+
- Current line-numbered source:
|
|
27
|
+
- Call paths:
|
|
28
|
+
- Dynamic dispatch hops:
|
|
29
|
+
- Blast-radius summary:
|
|
30
|
+
- Knowledge Graph tools used:
|
|
31
|
+
- Candidate concept_ids:
|
|
32
|
+
- Read tools used:
|
|
33
|
+
- Evidence sections/chunks:
|
|
34
|
+
- ADRs / decisions:
|
|
35
|
+
- Module notes:
|
|
36
|
+
- API notes / runbooks:
|
|
37
|
+
- Audit/backlink findings:
|
|
38
|
+
- Missing context:
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Harness Command
|
|
42
|
+
|
|
43
|
+
MCP preflight 完成后,在仓库根目录运行:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
powershell -ExecutionPolicy Bypass -File ".harness/ai-dev-harness/scripts/run-harness.ps1" -Task "<task>" -Skill <skill> -Agent cursor -Live
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
兜底命令:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
{{HARNESS_COMMAND}} run --task "<task>" --skill <skill> --agent cursor --live
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
执行结束后,向用户报告 Harness 证据目录、生命周期状态、验证结果、审批门禁、Context Score、Loop Review 和知识沉淀建议。
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
## AI Dev Harness
|
|
2
|
+
|
|
3
|
+
当用户要求使用 Harness、可审计执行、CodeGraph/Knowledge Graph 辅助研发,或要求执行 `fix_bug`、`add_feature`、`write_tests`、`update_docs` 时,优先使用 AI Dev Harness CLI。
|
|
4
|
+
|
|
5
|
+
运行 Harness 前,先使用 Gemini 当前可用的 MCP 工具收集上下文:
|
|
6
|
+
|
|
7
|
+
- CodeGraph:围绕任务、文件、符号、调用链和影响范围查询,记录使用过的工具与关键发现。
|
|
8
|
+
- Knowledge Graph:查询 ADR、模块说明、接口说明、runbook、历史决策和踩坑记录。
|
|
9
|
+
- Harness 不负责连接 MCP;MCP 调用由当前 Agent 完成。
|
|
10
|
+
- 不要直接写入 Knowledge Graph,只在 Harness 产物 `persist_suggestions.md` 中提出沉淀建议。
|
|
11
|
+
|
|
12
|
+
请在当前对话中先输出:
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
## MCP Preflight Findings
|
|
16
|
+
- CodeGraph tools used:
|
|
17
|
+
- CodeGraph primary query:
|
|
18
|
+
- Source grouped by file:
|
|
19
|
+
- Current line-numbered source:
|
|
20
|
+
- Call paths:
|
|
21
|
+
- Dynamic dispatch hops:
|
|
22
|
+
- Blast-radius summary:
|
|
23
|
+
- Knowledge Graph tools used:
|
|
24
|
+
- Candidate concept_ids:
|
|
25
|
+
- Read tools used:
|
|
26
|
+
- Evidence sections/chunks:
|
|
27
|
+
- ADRs / decisions:
|
|
28
|
+
- Module notes:
|
|
29
|
+
- API notes / runbooks:
|
|
30
|
+
- Audit/backlink findings:
|
|
31
|
+
- Missing context:
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
MCP preflight 完成后,在仓库根目录运行:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
powershell -ExecutionPolicy Bypass -File ".harness/ai-dev-harness/scripts/run-harness.ps1" -Task "<task>" -Skill <skill> -Agent gemini -Live
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
兜底命令:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
{{HARNESS_COMMAND}} run --task "<task>" --skill <skill> --agent gemini --live
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
执行结束后,向用户报告 Harness 证据目录、生命周期状态、验证结果、审批门禁、Context Score、Loop Review 和知识沉淀建议。
|