hunter-harness 0.1.0
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/LICENSE +21 -0
- package/README.md +17 -0
- package/dist/bin.js +3356 -0
- package/package.json +34 -0
- package/resources/bootstrap-ir/manifest.json +19 -0
- package/resources/bootstrap-ir/skills/harness-apidoc.yaml +24 -0
- package/resources/bootstrap-ir/skills/harness-archive.yaml +24 -0
- package/resources/bootstrap-ir/skills/harness-codebase-map.yaml +24 -0
- package/resources/bootstrap-ir/skills/harness-knowledge-ingest.yaml +24 -0
- package/resources/bootstrap-ir/skills/harness-package.yaml +24 -0
- package/resources/bootstrap-ir/skills/harness-plan.yaml +24 -0
- package/resources/bootstrap-ir/skills/harness-review.yaml +24 -0
- package/resources/bootstrap-ir/skills/harness-run.yaml +24 -0
- package/resources/bootstrap-ir/skills/harness-skill-optimizer.yaml +28 -0
- package/resources/bootstrap-ir/skills/harness-submit.yaml +24 -0
- package/resources/bootstrap-ir/skills/harness-sync.yaml +24 -0
- package/resources/bootstrap-ir/skills/harness-test.yaml +24 -0
- package/resources/bootstrap-ir/templates/claude-code-skill.md +12 -0
- package/resources/harness/general/.harness-build.json +5 -0
- package/resources/harness/general/CONTEXT.md +65 -0
- package/resources/harness/general/README.md +478 -0
- package/resources/harness/general/agents/harness-evaluator.md +96 -0
- package/resources/harness/general/agents/harness-explorer.md +72 -0
- package/resources/harness/general/agents/harness-reviewer.md +69 -0
- package/resources/harness/general/harness-archive/SKILL.md +215 -0
- package/resources/harness/general/harness-archive/checklist.md +52 -0
- package/resources/harness/general/harness-archive/reference.md +103 -0
- package/resources/harness/general/harness-archive/scripts/gen-manifest.ps1 +31 -0
- package/resources/harness/general/harness-archive/templates/render-summary.mjs +171 -0
- package/resources/harness/general/harness-archive/templates/summary-data-template.json +128 -0
- package/resources/harness/general/harness-codebase-map/SKILL.md +112 -0
- package/resources/harness/general/harness-codebase-map/checklist.md +126 -0
- package/resources/harness/general/harness-codebase-map/reference.md +364 -0
- package/resources/harness/general/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
- package/resources/harness/general/harness-codebase-map/templates/CONCERNS.md +49 -0
- package/resources/harness/general/harness-codebase-map/templates/CONVENTIONS.md +57 -0
- package/resources/harness/general/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
- package/resources/harness/general/harness-codebase-map/templates/STACK.md +55 -0
- package/resources/harness/general/harness-codebase-map/templates/STRUCTURE.md +69 -0
- package/resources/harness/general/harness-codebase-map/templates/TESTING.md +64 -0
- package/resources/harness/general/harness-codebase-map/templates/map-manifest.schema.json +73 -0
- package/resources/harness/general/harness-codebase-map/templates/map-summary.md +64 -0
- package/resources/harness/general/harness-knowledge-ingest/SKILL.md +246 -0
- package/resources/harness/general/harness-knowledge-ingest/design.md +842 -0
- package/resources/harness/general/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +42 -0
- package/resources/harness/general/harness-knowledge-ingest/mcp-config.example.json +10 -0
- package/resources/harness/general/harness-knowledge-ingest/reference.md +309 -0
- package/resources/harness/general/harness-knowledge-ingest/scripts/harness_knowledge.py +4082 -0
- package/resources/harness/general/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +273 -0
- package/resources/harness/general/harness-knowledge-ingest/tests/fixtures/mcp-eval-project/.harness/archive/2026-01-10-ledger-reconciliation/reports/final/summary-data.json +43 -0
- package/resources/harness/general/harness-knowledge-ingest/tests/fixtures/mcp-eval-project/.harness/archive/2026-02-14-ledger-snapshot-followup/reports/final/summary-data.json +38 -0
- package/resources/harness/general/harness-knowledge-ingest/tests/fixtures/mcp-eval-project/.harness/archive/2026-03-05-webhook-contract/reports/final/summary-data.json +36 -0
- package/resources/harness/general/harness-knowledge-ingest/tests/fixtures/mcp-eval-project/.harness/project.yaml +1 -0
- package/resources/harness/general/harness-knowledge-ingest/tests/test_harness_knowledge.py +1792 -0
- package/resources/harness/general/harness-knowledge-query/SKILL.md +164 -0
- package/resources/harness/general/harness-plan/SKILL.md +127 -0
- package/resources/harness/general/harness-plan/checklist.md +243 -0
- package/resources/harness/general/harness-plan/protocols.md +124 -0
- package/resources/harness/general/harness-plan/reference.md +376 -0
- package/resources/harness/general/harness-review/SKILL.md +156 -0
- package/resources/harness/general/harness-review/checklist.md +124 -0
- package/resources/harness/general/harness-review/protocols.md +68 -0
- package/resources/harness/general/harness-review/reference.md +86 -0
- package/resources/harness/general/harness-run/SKILL.md +132 -0
- package/resources/harness/general/harness-run/checklist.md +259 -0
- package/resources/harness/general/harness-run/protocols.md +78 -0
- package/resources/harness/general/harness-run/reference.md +834 -0
- package/resources/harness/general/harness-submit/SKILL.md +159 -0
- package/resources/harness/general/harness-submit/checklist.md +407 -0
- package/resources/harness/general/harness-submit/reference.md +152 -0
- package/resources/harness/general/harness-sync/SKILL.md +82 -0
- package/resources/harness/general/harness-sync/reference.md +153 -0
- package/resources/harness/general/harness-test/SKILL.md +180 -0
- package/resources/harness/general/harness-test/checklist.md +319 -0
- package/resources/harness/general/harness-test/pitfalls.md +260 -0
- package/resources/harness/general/harness-test/reference.md +791 -0
- package/resources/harness/general/protocols/archive-report-protocol.md +175 -0
- package/resources/harness/general/protocols/evidence-based-reporting-protocol.md +134 -0
- package/resources/harness/general/protocols/ledger-protocol.md +270 -0
- package/resources/harness/general/protocols/powershell-protocol.md +181 -0
- package/resources/harness/general/protocols/report-pipeline-protocol.md +150 -0
- package/resources/harness/general/protocols/sensitive-info-protocol.md +92 -0
- package/resources/harness/general/protocols/state-layout-protocol.md +131 -0
- package/resources/harness/general/protocols/submit-protocol.md +78 -0
- package/resources/harness/general/scripts/harness_archive.py +2319 -0
- package/resources/harness/general/scripts/harness_deploy.py +613 -0
- package/resources/harness/general/scripts/harness_events.py +680 -0
- package/resources/harness/general/scripts/harness_ledger.py +671 -0
- package/resources/harness/general/scripts/harness_preflight.py +780 -0
- package/resources/harness/general/scripts/harness_service.py +1331 -0
- package/resources/harness/java/.harness-build.json +5 -0
- package/resources/harness/java/CONTEXT.md +65 -0
- package/resources/harness/java/README.md +478 -0
- package/resources/harness/java/agents/harness-evaluator.md +96 -0
- package/resources/harness/java/agents/harness-explorer.md +72 -0
- package/resources/harness/java/agents/harness-reviewer.md +69 -0
- package/resources/harness/java/harness-apidoc/SKILL.md +86 -0
- package/resources/harness/java/harness-apidoc/checklist.md +142 -0
- package/resources/harness/java/harness-apidoc/reference.md +233 -0
- package/resources/harness/java/harness-archive/SKILL.md +215 -0
- package/resources/harness/java/harness-archive/checklist.md +52 -0
- package/resources/harness/java/harness-archive/reference.md +103 -0
- package/resources/harness/java/harness-archive/scripts/gen-manifest.ps1 +31 -0
- package/resources/harness/java/harness-archive/templates/render-summary.mjs +171 -0
- package/resources/harness/java/harness-archive/templates/summary-data-template.json +128 -0
- package/resources/harness/java/harness-codebase-map/SKILL.md +112 -0
- package/resources/harness/java/harness-codebase-map/checklist.md +126 -0
- package/resources/harness/java/harness-codebase-map/reference.md +364 -0
- package/resources/harness/java/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
- package/resources/harness/java/harness-codebase-map/templates/CONCERNS.md +49 -0
- package/resources/harness/java/harness-codebase-map/templates/CONVENTIONS.md +57 -0
- package/resources/harness/java/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
- package/resources/harness/java/harness-codebase-map/templates/STACK.md +55 -0
- package/resources/harness/java/harness-codebase-map/templates/STRUCTURE.md +69 -0
- package/resources/harness/java/harness-codebase-map/templates/TESTING.md +64 -0
- package/resources/harness/java/harness-codebase-map/templates/map-manifest.schema.json +73 -0
- package/resources/harness/java/harness-codebase-map/templates/map-summary.md +64 -0
- package/resources/harness/java/harness-knowledge-ingest/SKILL.md +246 -0
- package/resources/harness/java/harness-knowledge-ingest/design.md +842 -0
- package/resources/harness/java/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +42 -0
- package/resources/harness/java/harness-knowledge-ingest/mcp-config.example.json +10 -0
- package/resources/harness/java/harness-knowledge-ingest/reference.md +309 -0
- package/resources/harness/java/harness-knowledge-ingest/scripts/harness_knowledge.py +4082 -0
- package/resources/harness/java/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +273 -0
- package/resources/harness/java/harness-knowledge-ingest/tests/fixtures/mcp-eval-project/.harness/archive/2026-01-10-ledger-reconciliation/reports/final/summary-data.json +43 -0
- package/resources/harness/java/harness-knowledge-ingest/tests/fixtures/mcp-eval-project/.harness/archive/2026-02-14-ledger-snapshot-followup/reports/final/summary-data.json +38 -0
- package/resources/harness/java/harness-knowledge-ingest/tests/fixtures/mcp-eval-project/.harness/archive/2026-03-05-webhook-contract/reports/final/summary-data.json +36 -0
- package/resources/harness/java/harness-knowledge-ingest/tests/fixtures/mcp-eval-project/.harness/project.yaml +1 -0
- package/resources/harness/java/harness-knowledge-ingest/tests/test_harness_knowledge.py +1792 -0
- package/resources/harness/java/harness-knowledge-query/SKILL.md +164 -0
- package/resources/harness/java/harness-package/SKILL.md +87 -0
- package/resources/harness/java/harness-package/checklist.md +322 -0
- package/resources/harness/java/harness-package/reference.md +210 -0
- package/resources/harness/java/harness-plan/SKILL.md +127 -0
- package/resources/harness/java/harness-plan/checklist.md +243 -0
- package/resources/harness/java/harness-plan/protocols.md +124 -0
- package/resources/harness/java/harness-plan/reference.md +376 -0
- package/resources/harness/java/harness-review/SKILL.md +156 -0
- package/resources/harness/java/harness-review/checklist.md +124 -0
- package/resources/harness/java/harness-review/protocols.md +68 -0
- package/resources/harness/java/harness-review/reference.md +86 -0
- package/resources/harness/java/harness-run/SKILL.md +148 -0
- package/resources/harness/java/harness-run/checklist.md +250 -0
- package/resources/harness/java/harness-run/protocols.md +78 -0
- package/resources/harness/java/harness-run/reference.md +814 -0
- package/resources/harness/java/harness-submit/SKILL.md +166 -0
- package/resources/harness/java/harness-submit/checklist.md +407 -0
- package/resources/harness/java/harness-submit/reference.md +152 -0
- package/resources/harness/java/harness-sync/SKILL.md +82 -0
- package/resources/harness/java/harness-sync/reference.md +153 -0
- package/resources/harness/java/harness-test/SKILL.md +192 -0
- package/resources/harness/java/harness-test/checklist.md +317 -0
- package/resources/harness/java/harness-test/pitfalls-java.md +16 -0
- package/resources/harness/java/harness-test/pitfalls.md +260 -0
- package/resources/harness/java/harness-test/reference.md +788 -0
- package/resources/harness/java/protocols/archive-report-protocol.md +175 -0
- package/resources/harness/java/protocols/evidence-based-reporting-protocol.md +134 -0
- package/resources/harness/java/protocols/ledger-protocol.md +270 -0
- package/resources/harness/java/protocols/powershell-protocol.md +181 -0
- package/resources/harness/java/protocols/report-pipeline-protocol.md +150 -0
- package/resources/harness/java/protocols/sensitive-info-protocol.md +92 -0
- package/resources/harness/java/protocols/state-layout-protocol.md +131 -0
- package/resources/harness/java/protocols/submit-protocol.md +78 -0
- package/resources/harness/java/scripts/harness_archive.py +2319 -0
- package/resources/harness/java/scripts/harness_deploy.py +613 -0
- package/resources/harness/java/scripts/harness_events.py +680 -0
- package/resources/harness/java/scripts/harness_ledger.py +671 -0
- package/resources/harness/java/scripts/harness_preflight.py +780 -0
- package/resources/harness/java/scripts/harness_service.py +1331 -0
- package/resources/harness/manifests/general.json +296 -0
- package/resources/harness/manifests/java.json +324 -0
- package/resources/manifest.json +19 -0
- package/resources/skills/harness-apidoc/SKILL.md +50 -0
- package/resources/skills/harness-archive/SKILL.md +48 -0
- package/resources/skills/harness-codebase-map/SKILL.md +53 -0
- package/resources/skills/harness-knowledge-ingest/SKILL.md +48 -0
- package/resources/skills/harness-package/SKILL.md +48 -0
- package/resources/skills/harness-plan/SKILL.md +51 -0
- package/resources/skills/harness-review/SKILL.md +50 -0
- package/resources/skills/harness-run/SKILL.md +48 -0
- package/resources/skills/harness-skill-optimizer/SKILL.md +54 -0
- package/resources/skills/harness-submit/SKILL.md +47 -0
- package/resources/skills/harness-sync/SKILL.md +48 -0
- package/resources/skills/harness-test/SKILL.md +50 -0
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
# harness-codebase-map Reference
|
|
2
|
+
|
|
3
|
+
## 1. 设计来源与迁移边界
|
|
4
|
+
|
|
5
|
+
`harness-codebase-map` 参考 GSD `map-codebase` 的核心思想:
|
|
6
|
+
|
|
7
|
+
- 使用多个 mapper focus 分别分析技术栈、架构、质量和风险。
|
|
8
|
+
- 输出结构化代码库文档。
|
|
9
|
+
- 主流程只收集确认和摘要,降低上下文占用。
|
|
10
|
+
|
|
11
|
+
但它不是 GSD 原始 skill 的机械复制。
|
|
12
|
+
|
|
13
|
+
必须移除的旧行为:
|
|
14
|
+
|
|
15
|
+
| 旧行为 | 新行为 |
|
|
16
|
+
|---|---|
|
|
17
|
+
| 输出到 `.planning/codebase/` | 输出到 `.harness/codebase/map/` |
|
|
18
|
+
| 自动 commit codebase map | 禁止自动 Git 写操作 |
|
|
19
|
+
| `gsd-map-codebase` / `gsd-codebase-mapper` 命名 | `harness-codebase-map` / harness mapper focus |
|
|
20
|
+
| GSD query intel | 不纳入本 skill MVP |
|
|
21
|
+
| 依赖 GSD runtime | 不依赖,作为 hunter-harness 自有能力 |
|
|
22
|
+
|
|
23
|
+
## 2. 输出文档职责
|
|
24
|
+
|
|
25
|
+
| 文档 | document_type | Focus | 作用 |
|
|
26
|
+
|---|---|---|---|
|
|
27
|
+
| `STACK.md` | `stack` | tech | 技术栈、运行时、构建工具、关键依赖 |
|
|
28
|
+
| `INTEGRATIONS.md` | `integrations` | tech | 外部系统、数据库、缓存、消息、第三方 API |
|
|
29
|
+
| `ARCHITECTURE.md` | `architecture` | arch | 架构模式、分层、模块边界、数据流 |
|
|
30
|
+
| `STRUCTURE.md` | `structure` | arch | 目录结构、关键文件位置、新代码应放哪里 |
|
|
31
|
+
| `CONVENTIONS.md` | `conventions` | quality | 命名、编码风格、错误处理、日志、配置约定 |
|
|
32
|
+
| `TESTING.md` | `testing` | quality | 测试框架、测试目录、运行方式、mock 和覆盖策略 |
|
|
33
|
+
| `CONCERNS.md` | `concerns` | concerns | 风险、技术债、易错点、安全与迁移关注点 |
|
|
34
|
+
| `map-summary.md` | `map-summary` | summary | AI 快速阅读入口,汇总代码库地图核心结论 |
|
|
35
|
+
| `map-manifest.json` | `map-manifest` | metadata | 工具和 sync 使用的文档清单、hash、stale policy |
|
|
36
|
+
|
|
37
|
+
## 2.1 模板文件规则
|
|
38
|
+
|
|
39
|
+
`templates/` 中的模板是可直接落地的目标文件骨架,不是说明型代码块。
|
|
40
|
+
|
|
41
|
+
- 生成 `STACK.md` 等 7 个主文档时,直接使用同名模板结构。
|
|
42
|
+
- 生成 `.harness/codebase/map-summary.md` 时,使用 `templates/map-summary.md`。
|
|
43
|
+
- 生成 `.harness/codebase/map-manifest.json` 时,参考 `templates/map-manifest.schema.json`。
|
|
44
|
+
- 不得把 `# xxx Template`、外层 ```markdown 代码块或模板说明文字复制到最终产物中。
|
|
45
|
+
|
|
46
|
+
## 3. 模式与刷新范围
|
|
47
|
+
|
|
48
|
+
### full / --refresh
|
|
49
|
+
|
|
50
|
+
刷新全部 7 个文档,适合首次生成或大型变更后使用。
|
|
51
|
+
|
|
52
|
+
### --fast
|
|
53
|
+
|
|
54
|
+
刷新:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
STACK.md
|
|
58
|
+
STRUCTURE.md
|
|
59
|
+
CONCERNS.md
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
适合依赖、目录、风险轻量更新。
|
|
63
|
+
|
|
64
|
+
### --focus tech
|
|
65
|
+
|
|
66
|
+
刷新:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
STACK.md
|
|
70
|
+
INTEGRATIONS.md
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### --focus arch
|
|
74
|
+
|
|
75
|
+
刷新:
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
ARCHITECTURE.md
|
|
79
|
+
STRUCTURE.md
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### --focus quality
|
|
83
|
+
|
|
84
|
+
刷新:
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
CONVENTIONS.md
|
|
88
|
+
TESTING.md
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### --focus concerns
|
|
92
|
+
|
|
93
|
+
刷新:
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
CONCERNS.md
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### --paths
|
|
100
|
+
|
|
101
|
+
增量扫描指定路径。
|
|
102
|
+
|
|
103
|
+
安全规则:
|
|
104
|
+
|
|
105
|
+
- 只允许 repo-relative path。
|
|
106
|
+
- 禁止 `..`。
|
|
107
|
+
- 禁止 `/` 开头或 Windows drive absolute path。
|
|
108
|
+
- 禁止 shell 元字符:`;`、`` ` ``、`$`、`&`、`|`、`<`、`>`。
|
|
109
|
+
- 路径值只作为扫描范围,不直接拼接到 shell 命令。
|
|
110
|
+
|
|
111
|
+
Git 只允许只读查询:`status`、`diff --name-only`、`rev-parse`。禁止 `add`、`commit`、`pull`、`merge`、`push`、`reset`、`checkout`、`rebase`、`clean` 等写入或改变工作区状态的操作。
|
|
112
|
+
|
|
113
|
+
## 4. Mapper Agent Prompt Contract
|
|
114
|
+
|
|
115
|
+
并行 agent 可使用以下任务格式。
|
|
116
|
+
|
|
117
|
+
### Tech Mapper
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
你是 harness-codebase-map 的 tech mapper。
|
|
121
|
+
|
|
122
|
+
目标:分析当前项目的技术栈和外部集成。
|
|
123
|
+
|
|
124
|
+
范围:<full repo or path scope>
|
|
125
|
+
|
|
126
|
+
必须直接写入:
|
|
127
|
+
- .harness/codebase/map/STACK.md
|
|
128
|
+
- .harness/codebase/map/INTEGRATIONS.md
|
|
129
|
+
|
|
130
|
+
要求:
|
|
131
|
+
- 使用 templates/STACK.md 和 templates/INTEGRATIONS.md 的结构。
|
|
132
|
+
- 包含实际文件路径。
|
|
133
|
+
- 不输出明文敏感信息。
|
|
134
|
+
- 不执行 Git 写操作。
|
|
135
|
+
- 完成后只返回文件路径、行数、warnings。
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Arch Mapper
|
|
139
|
+
|
|
140
|
+
```text
|
|
141
|
+
你是 harness-codebase-map 的 arch mapper。
|
|
142
|
+
|
|
143
|
+
目标:分析当前项目的架构模式、模块边界和物理目录结构。
|
|
144
|
+
|
|
145
|
+
必须直接写入:
|
|
146
|
+
- .harness/codebase/map/ARCHITECTURE.md
|
|
147
|
+
- .harness/codebase/map/STRUCTURE.md
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Quality Mapper
|
|
151
|
+
|
|
152
|
+
```text
|
|
153
|
+
你是 harness-codebase-map 的 quality mapper。
|
|
154
|
+
|
|
155
|
+
目标:分析编码约定、测试框架、测试组织方式和验证命令。
|
|
156
|
+
|
|
157
|
+
必须直接写入:
|
|
158
|
+
- .harness/codebase/map/CONVENTIONS.md
|
|
159
|
+
- .harness/codebase/map/TESTING.md
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Concerns Mapper
|
|
163
|
+
|
|
164
|
+
```text
|
|
165
|
+
你是 harness-codebase-map 的 concerns mapper。
|
|
166
|
+
|
|
167
|
+
目标:分析风险、技术债、易错点、安全注意事项和后续开发关注点。
|
|
168
|
+
|
|
169
|
+
必须直接写入:
|
|
170
|
+
- .harness/codebase/map/CONCERNS.md
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## 5. Manifest Schema
|
|
174
|
+
|
|
175
|
+
`map-manifest.json` 建议结构:
|
|
176
|
+
|
|
177
|
+
```json
|
|
178
|
+
{
|
|
179
|
+
"schema_version": 1,
|
|
180
|
+
"generator": "harness-codebase-map",
|
|
181
|
+
"generated_at": "YYYY-MM-DD HH:mm:ss",
|
|
182
|
+
"mode": "full",
|
|
183
|
+
"profile": "general",
|
|
184
|
+
"project_root": ".",
|
|
185
|
+
"last_mapped_commit": "unknown",
|
|
186
|
+
"path_scope": {
|
|
187
|
+
"type": "full",
|
|
188
|
+
"paths": []
|
|
189
|
+
},
|
|
190
|
+
"documents": [
|
|
191
|
+
{
|
|
192
|
+
"document_type": "stack",
|
|
193
|
+
"path": ".harness/codebase/map/STACK.md",
|
|
194
|
+
"sha256": "sha256:<hash>",
|
|
195
|
+
"line_count": 120,
|
|
196
|
+
"focus": "tech",
|
|
197
|
+
"status": "generated"
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"summary": {
|
|
201
|
+
"path": ".harness/codebase/map-summary.md",
|
|
202
|
+
"sha256": "sha256:<hash>",
|
|
203
|
+
"line_count": 60
|
|
204
|
+
},
|
|
205
|
+
"warnings": [],
|
|
206
|
+
"stale_policy": {
|
|
207
|
+
"max_age_days": 7,
|
|
208
|
+
"changed_files_threshold": 10
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## 6. Summary Template
|
|
214
|
+
|
|
215
|
+
`map-summary.md` 应简洁,面向 AI 快速加载:
|
|
216
|
+
|
|
217
|
+
```markdown
|
|
218
|
+
# Codebase Map Summary
|
|
219
|
+
|
|
220
|
+
**Generated At:** YYYY-MM-DD HH:mm
|
|
221
|
+
**Mode:** full
|
|
222
|
+
**Profile:** <profile>
|
|
223
|
+
**Commit:** unknown
|
|
224
|
+
|
|
225
|
+
## Project Snapshot
|
|
226
|
+
|
|
227
|
+
<项目一句话说明>
|
|
228
|
+
|
|
229
|
+
## Key Stack
|
|
230
|
+
|
|
231
|
+
- Language: ...
|
|
232
|
+
- Framework: ...
|
|
233
|
+
- Build: ...
|
|
234
|
+
- Database: ...
|
|
235
|
+
|
|
236
|
+
## Main Modules
|
|
237
|
+
|
|
238
|
+
- `<path>` — <purpose>
|
|
239
|
+
|
|
240
|
+
## Entry Points
|
|
241
|
+
|
|
242
|
+
- `<path>` — <purpose>
|
|
243
|
+
|
|
244
|
+
## Testing
|
|
245
|
+
|
|
246
|
+
- Command: ...
|
|
247
|
+
- Test location: ...
|
|
248
|
+
|
|
249
|
+
## Concerns
|
|
250
|
+
|
|
251
|
+
- ...
|
|
252
|
+
|
|
253
|
+
## Detailed Documents
|
|
254
|
+
|
|
255
|
+
- `.harness/codebase/map/STACK.md`
|
|
256
|
+
- `.harness/codebase/map/INTEGRATIONS.md`
|
|
257
|
+
- `.harness/codebase/map/ARCHITECTURE.md`
|
|
258
|
+
- `.harness/codebase/map/STRUCTURE.md`
|
|
259
|
+
- `.harness/codebase/map/CONVENTIONS.md`
|
|
260
|
+
- `.harness/codebase/map/TESTING.md`
|
|
261
|
+
- `.harness/codebase/map/CONCERNS.md`
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## 7. Freshness / Stale 判断
|
|
265
|
+
|
|
266
|
+
建议供 `harness-sync` 使用的判断规则:
|
|
267
|
+
|
|
268
|
+
| 条件 | 判定 | 状态 | 建议 |
|
|
269
|
+
|---|---|---|---|
|
|
270
|
+
| map 不存在 | missing | ❌FAIL(未生成) | 建议运行 full |
|
|
271
|
+
| 7 个文档缺失 | incomplete | 🟡WARN(不完整) | 建议运行 full |
|
|
272
|
+
| manifest 不存在 | unknown | 🟡WARN(元数据未知) | 建议运行 full 或 status 修复 |
|
|
273
|
+
| 超过 7 天且变更文件 > 10 | stale | 🟡WARN(过期) | 建议运行 full 或 focus |
|
|
274
|
+
| 超过 7 天且变更文件 ≤ 10 | aging | 🟡WARN(老化) | 可暂缓,提示用户 |
|
|
275
|
+
| 关键配置变化 | stale | 🟡WARN(过期) | 建议 focus tech |
|
|
276
|
+
| 目录结构变化明显 | stale | 🟡WARN(过期) | 建议 focus arch |
|
|
277
|
+
| 测试目录/依赖变化 | stale | 🟡WARN(过期) | 建议 focus quality |
|
|
278
|
+
|
|
279
|
+
关键配置包括:
|
|
280
|
+
|
|
281
|
+
```text
|
|
282
|
+
pom.xml
|
|
283
|
+
build.gradle
|
|
284
|
+
package.json
|
|
285
|
+
pnpm-lock.yaml
|
|
286
|
+
yarn.lock
|
|
287
|
+
requirements.txt
|
|
288
|
+
pyproject.toml
|
|
289
|
+
Dockerfile
|
|
290
|
+
docker-compose.yml
|
|
291
|
+
application*.yml
|
|
292
|
+
application*.properties
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
## 8. 敏感信息处理
|
|
296
|
+
|
|
297
|
+
禁止写入:
|
|
298
|
+
|
|
299
|
+
- token
|
|
300
|
+
- password
|
|
301
|
+
- secret
|
|
302
|
+
- Authorization header
|
|
303
|
+
- Cookie
|
|
304
|
+
- API key
|
|
305
|
+
- 私钥
|
|
306
|
+
- 真实生产账号密码
|
|
307
|
+
|
|
308
|
+
允许写入脱敏描述:
|
|
309
|
+
|
|
310
|
+
```text
|
|
311
|
+
配置文件 `<path>` 中存在数据库连接配置,敏感字段已脱敏。
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
## 9. CodeGraph 边界
|
|
315
|
+
|
|
316
|
+
代码探索优先使用 CodeGraph MCP 工具(`mcp__codegraph__codegraph_explore` 等);MCP 不可用时降级为 Glob/Grep 手动定位,并标注降级。`npx hunter-harness` 初始化阶段可检查 CodeGraph 是否安装,但不作为运行时探索手段。
|
|
317
|
+
|
|
318
|
+
本 skill:
|
|
319
|
+
|
|
320
|
+
- 不检查 CodeGraph 安装状态。
|
|
321
|
+
- 不触发 CodeGraph sync。
|
|
322
|
+
- 不修改 `.codegraph/`。
|
|
323
|
+
- 不上传 `.codegraph/`。
|
|
324
|
+
|
|
325
|
+
mapper 优先通过 CodeGraph MCP 探索代码;不得把本 skill 的成功建立在 CodeGraph 必须可用上——MCP 不可用时降级为 Glob/Grep 并标注降级。
|
|
326
|
+
|
|
327
|
+
## 10. 报告模板
|
|
328
|
+
|
|
329
|
+
```markdown
|
|
330
|
+
# harness-codebase-map Report
|
|
331
|
+
|
|
332
|
+
**Time:** YYYY-MM-DD HH:mm
|
|
333
|
+
**Mode:** full
|
|
334
|
+
**Scope:** full repo
|
|
335
|
+
**Status:** ✅OK
|
|
336
|
+
|
|
337
|
+
## Outputs
|
|
338
|
+
|
|
339
|
+
| Document | Path | Lines | Status |
|
|
340
|
+
|---|---|---:|---|
|
|
341
|
+
| STACK | `.harness/codebase/map/STACK.md` | 120 | generated |
|
|
342
|
+
|
|
343
|
+
## Manifest
|
|
344
|
+
|
|
345
|
+
- `.harness/codebase/map-manifest.json`
|
|
346
|
+
|
|
347
|
+
## Summary
|
|
348
|
+
|
|
349
|
+
- `.harness/codebase/map-summary.md`
|
|
350
|
+
|
|
351
|
+
## Context Index
|
|
352
|
+
|
|
353
|
+
updated / skipped / failed
|
|
354
|
+
|
|
355
|
+
## Warnings
|
|
356
|
+
|
|
357
|
+
- none
|
|
358
|
+
|
|
359
|
+
## Evidence
|
|
360
|
+
|
|
361
|
+
- All output files readable.
|
|
362
|
+
- Manifest JSON readable.
|
|
363
|
+
- Document hashes calculated.
|
|
364
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
harness:
|
|
3
|
+
origin: generated
|
|
4
|
+
generator: harness-codebase-map
|
|
5
|
+
file_kind: generated_reviewable
|
|
6
|
+
push_policy: full-diff-proposal
|
|
7
|
+
update_policy: skip-if-local-dirty
|
|
8
|
+
title: Codebase Architecture
|
|
9
|
+
document_type: architecture
|
|
10
|
+
profile: <profile-or-unknown>
|
|
11
|
+
mapped_at: <YYYY-MM-DD HH:mm>
|
|
12
|
+
last_mapped_commit: <sha-or-unknown>
|
|
13
|
+
path_scope: <full|fast|focus|paths>
|
|
14
|
+
status: active
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Codebase Architecture
|
|
18
|
+
|
|
19
|
+
**Analysis Date:** <YYYY-MM-DD>
|
|
20
|
+
|
|
21
|
+
## Architecture Style
|
|
22
|
+
|
|
23
|
+
- <layered / modular / microservice / monolith / plugin / etc.>
|
|
24
|
+
|
|
25
|
+
## Main Modules
|
|
26
|
+
|
|
27
|
+
| Module | Path | Responsibility |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| <module> | `<path>` | <responsibility> |
|
|
30
|
+
|
|
31
|
+
## Layering and Dependencies
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
<layer or module dependency diagram>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Request / Data Flow
|
|
38
|
+
|
|
39
|
+
1. <entry>
|
|
40
|
+
2. <service>
|
|
41
|
+
3. <persistence/integration>
|
|
42
|
+
|
|
43
|
+
## Key Entry Points
|
|
44
|
+
|
|
45
|
+
- `<path>` — <purpose>
|
|
46
|
+
|
|
47
|
+
## Extension Points
|
|
48
|
+
|
|
49
|
+
- `<path>` — <how to add new feature>
|
|
50
|
+
|
|
51
|
+
## Architectural Constraints
|
|
52
|
+
|
|
53
|
+
- <constraint>
|
|
54
|
+
|
|
55
|
+
## Notes for AI Agents
|
|
56
|
+
|
|
57
|
+
- <how future skills should navigate architecture>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
harness:
|
|
3
|
+
origin: generated
|
|
4
|
+
generator: harness-codebase-map
|
|
5
|
+
file_kind: generated_reviewable
|
|
6
|
+
push_policy: full-diff-proposal
|
|
7
|
+
update_policy: skip-if-local-dirty
|
|
8
|
+
title: Codebase Concerns
|
|
9
|
+
document_type: concerns
|
|
10
|
+
profile: <profile-or-unknown>
|
|
11
|
+
mapped_at: <YYYY-MM-DD HH:mm>
|
|
12
|
+
last_mapped_commit: <sha-or-unknown>
|
|
13
|
+
path_scope: <full|fast|focus|paths>
|
|
14
|
+
status: active
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Codebase Concerns
|
|
18
|
+
|
|
19
|
+
**Analysis Date:** <YYYY-MM-DD>
|
|
20
|
+
|
|
21
|
+
## High Priority Concerns
|
|
22
|
+
|
|
23
|
+
| Concern | Evidence | Impact | Suggested Handling |
|
|
24
|
+
|---|---|---|---|
|
|
25
|
+
| <concern> | `<path>` | <impact> | <guidance> |
|
|
26
|
+
|
|
27
|
+
## Technical Debt
|
|
28
|
+
|
|
29
|
+
- `<path>` — <issue>
|
|
30
|
+
|
|
31
|
+
## Risky Areas
|
|
32
|
+
|
|
33
|
+
- `<path>` — <why risky>
|
|
34
|
+
|
|
35
|
+
## Security / Sensitive Data Risks
|
|
36
|
+
|
|
37
|
+
- <redacted, evidence path only>
|
|
38
|
+
|
|
39
|
+
## Testing Gaps
|
|
40
|
+
|
|
41
|
+
- `<path>` — <gap>
|
|
42
|
+
|
|
43
|
+
## Migration / Refactor Risks
|
|
44
|
+
|
|
45
|
+
- <risk>
|
|
46
|
+
|
|
47
|
+
## Notes for AI Agents
|
|
48
|
+
|
|
49
|
+
- <warnings for plan/run/review>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
harness:
|
|
3
|
+
origin: generated
|
|
4
|
+
generator: harness-codebase-map
|
|
5
|
+
file_kind: generated_reviewable
|
|
6
|
+
push_policy: full-diff-proposal
|
|
7
|
+
update_policy: skip-if-local-dirty
|
|
8
|
+
title: Codebase Conventions
|
|
9
|
+
document_type: conventions
|
|
10
|
+
profile: <profile-or-unknown>
|
|
11
|
+
mapped_at: <YYYY-MM-DD HH:mm>
|
|
12
|
+
last_mapped_commit: <sha-or-unknown>
|
|
13
|
+
path_scope: <full|fast|focus|paths>
|
|
14
|
+
status: active
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Codebase Conventions
|
|
18
|
+
|
|
19
|
+
**Analysis Date:** <YYYY-MM-DD>
|
|
20
|
+
|
|
21
|
+
## Naming Conventions
|
|
22
|
+
|
|
23
|
+
- Files: <pattern>
|
|
24
|
+
- Classes / functions / modules: <pattern>
|
|
25
|
+
- Tests: <pattern>
|
|
26
|
+
|
|
27
|
+
## Code Organization
|
|
28
|
+
|
|
29
|
+
- <layering / module / package rules>
|
|
30
|
+
|
|
31
|
+
## Error Handling
|
|
32
|
+
|
|
33
|
+
- <observed pattern with path evidence>
|
|
34
|
+
|
|
35
|
+
## Logging
|
|
36
|
+
|
|
37
|
+
- <logging pattern and path evidence>
|
|
38
|
+
|
|
39
|
+
## Configuration
|
|
40
|
+
|
|
41
|
+
- <configuration pattern and path evidence>
|
|
42
|
+
|
|
43
|
+
## Database / Persistence Conventions
|
|
44
|
+
|
|
45
|
+
- <if applicable>
|
|
46
|
+
|
|
47
|
+
## API Conventions
|
|
48
|
+
|
|
49
|
+
- <if applicable>
|
|
50
|
+
|
|
51
|
+
## AI Agent Rules Derived from Conventions
|
|
52
|
+
|
|
53
|
+
- <practical rule>
|
|
54
|
+
|
|
55
|
+
## Evidence
|
|
56
|
+
|
|
57
|
+
- `<path>` — <why it supports the convention>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
harness:
|
|
3
|
+
origin: generated
|
|
4
|
+
generator: harness-codebase-map
|
|
5
|
+
file_kind: generated_reviewable
|
|
6
|
+
push_policy: full-diff-proposal
|
|
7
|
+
update_policy: skip-if-local-dirty
|
|
8
|
+
title: Codebase Integrations
|
|
9
|
+
document_type: integrations
|
|
10
|
+
profile: <profile-or-unknown>
|
|
11
|
+
mapped_at: <YYYY-MM-DD HH:mm>
|
|
12
|
+
last_mapped_commit: <sha-or-unknown>
|
|
13
|
+
path_scope: <full|fast|focus|paths>
|
|
14
|
+
status: active
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Codebase Integrations
|
|
18
|
+
|
|
19
|
+
**Analysis Date:** <YYYY-MM-DD>
|
|
20
|
+
|
|
21
|
+
## External Systems
|
|
22
|
+
|
|
23
|
+
| System | Evidence | Usage | Notes |
|
|
24
|
+
|---|---|---|---|
|
|
25
|
+
| <system> | `<path>` | <purpose> | <risk/notes> |
|
|
26
|
+
|
|
27
|
+
## Databases
|
|
28
|
+
|
|
29
|
+
- Type: <database>
|
|
30
|
+
- Config evidence: `<path>`
|
|
31
|
+
- Access layer: `<path>`
|
|
32
|
+
|
|
33
|
+
## Cache / Messaging / Search
|
|
34
|
+
|
|
35
|
+
- <component>: <usage and path evidence>
|
|
36
|
+
|
|
37
|
+
## HTTP / RPC Clients
|
|
38
|
+
|
|
39
|
+
- `<path>` — <external service or API>
|
|
40
|
+
|
|
41
|
+
## Auth / Security Integrations
|
|
42
|
+
|
|
43
|
+
- <auth mechanism, redacted if sensitive>
|
|
44
|
+
|
|
45
|
+
## Sensitive Information Handling
|
|
46
|
+
|
|
47
|
+
- Do not copy credentials.
|
|
48
|
+
- Mention only redacted config patterns.
|
|
49
|
+
|
|
50
|
+
## Notes for AI Agents
|
|
51
|
+
|
|
52
|
+
- <integration-specific cautions>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
harness:
|
|
3
|
+
origin: generated
|
|
4
|
+
generator: harness-codebase-map
|
|
5
|
+
file_kind: generated_reviewable
|
|
6
|
+
push_policy: full-diff-proposal
|
|
7
|
+
update_policy: skip-if-local-dirty
|
|
8
|
+
title: Codebase Stack
|
|
9
|
+
document_type: stack
|
|
10
|
+
profile: <profile-or-unknown>
|
|
11
|
+
mapped_at: <YYYY-MM-DD HH:mm>
|
|
12
|
+
last_mapped_commit: <sha-or-unknown>
|
|
13
|
+
path_scope: <full|fast|focus|paths>
|
|
14
|
+
status: active
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Codebase Stack
|
|
18
|
+
|
|
19
|
+
**Analysis Date:** <YYYY-MM-DD>
|
|
20
|
+
|
|
21
|
+
## Runtime and Language
|
|
22
|
+
|
|
23
|
+
- Language: <language and version>
|
|
24
|
+
- Runtime: <runtime and version>
|
|
25
|
+
- Package manager / build tool: <tool>
|
|
26
|
+
|
|
27
|
+
## Frameworks
|
|
28
|
+
|
|
29
|
+
- <framework>: <purpose>
|
|
30
|
+
|
|
31
|
+
## Build and Run
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
<build command>
|
|
35
|
+
<run command>
|
|
36
|
+
<test command>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Key Dependencies
|
|
40
|
+
|
|
41
|
+
| Dependency | Evidence | Purpose |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| `<name>` | `<path>` | <why it matters> |
|
|
44
|
+
|
|
45
|
+
## Configuration Files
|
|
46
|
+
|
|
47
|
+
- `<path>` — <purpose>
|
|
48
|
+
|
|
49
|
+
## Deployment / Runtime Environment
|
|
50
|
+
|
|
51
|
+
- <container, server, cloud, local runtime notes>
|
|
52
|
+
|
|
53
|
+
## Notes for AI Agents
|
|
54
|
+
|
|
55
|
+
- <practical guidance for future plan/run/review>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
harness:
|
|
3
|
+
origin: generated
|
|
4
|
+
generator: harness-codebase-map
|
|
5
|
+
file_kind: generated_reviewable
|
|
6
|
+
push_policy: full-diff-proposal
|
|
7
|
+
update_policy: skip-if-local-dirty
|
|
8
|
+
title: Codebase Structure
|
|
9
|
+
document_type: structure
|
|
10
|
+
profile: <profile-or-unknown>
|
|
11
|
+
mapped_at: <YYYY-MM-DD HH:mm>
|
|
12
|
+
last_mapped_commit: <sha-or-unknown>
|
|
13
|
+
path_scope: <full|fast|focus|paths>
|
|
14
|
+
status: active
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Codebase Structure
|
|
18
|
+
|
|
19
|
+
**Analysis Date:** <YYYY-MM-DD>
|
|
20
|
+
|
|
21
|
+
## Directory Layout
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
<project-root>/
|
|
25
|
+
├── <dir>/ # <purpose>
|
|
26
|
+
└── <file> # <purpose>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Directory Purposes
|
|
30
|
+
|
|
31
|
+
### `<dir>/`
|
|
32
|
+
|
|
33
|
+
- Purpose: <what lives here>
|
|
34
|
+
- Contains: <file types>
|
|
35
|
+
- Key files: `<path>`
|
|
36
|
+
|
|
37
|
+
## Key File Locations
|
|
38
|
+
|
|
39
|
+
### Entry Points
|
|
40
|
+
|
|
41
|
+
- `<path>` — <purpose>
|
|
42
|
+
|
|
43
|
+
### Configuration
|
|
44
|
+
|
|
45
|
+
- `<path>` — <purpose>
|
|
46
|
+
|
|
47
|
+
### Core Logic
|
|
48
|
+
|
|
49
|
+
- `<path>` — <purpose>
|
|
50
|
+
|
|
51
|
+
### Testing
|
|
52
|
+
|
|
53
|
+
- `<path>` — <purpose>
|
|
54
|
+
|
|
55
|
+
## Where to Add New Code
|
|
56
|
+
|
|
57
|
+
| Need | Location |
|
|
58
|
+
|---|---|
|
|
59
|
+
| New feature | `<path>` |
|
|
60
|
+
| New test | `<path>` |
|
|
61
|
+
| New config | `<path>` |
|
|
62
|
+
|
|
63
|
+
## Generated / Ignored Directories
|
|
64
|
+
|
|
65
|
+
- `<path>` — <generated/cache/internal/external>
|
|
66
|
+
|
|
67
|
+
## Notes for AI Agents
|
|
68
|
+
|
|
69
|
+
- <navigation guidance>
|