@hunter-harness/workflow-harness 0.2.39 → 0.2.40
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/harness/bundles/general/claude-code/.harness-build.json +1 -1
- package/harness/bundles/general/claude-code/harness-archive/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-plan/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-review/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-run/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-submit/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/harness-test/SKILL.md +1 -1
- package/harness/bundles/general/claude-code/scripts/harness_deploy.py +10 -51
- package/harness/bundles/general/codebuddy/.harness-build.json +1 -1
- package/harness/bundles/general/codebuddy/harness-archive/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-plan/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-review/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-run/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-submit/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/harness-test/SKILL.md +1 -1
- package/harness/bundles/general/codebuddy/scripts/harness_deploy.py +10 -51
- package/harness/bundles/general/codex/.harness-build.json +1 -1
- package/harness/bundles/general/codex/harness-archive/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-plan/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-review/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-run/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-submit/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/codex/harness-test/SKILL.md +1 -1
- package/harness/bundles/general/codex/scripts/harness_deploy.py +10 -51
- package/harness/bundles/general/cursor/.harness-build.json +1 -1
- package/harness/bundles/general/cursor/harness-archive/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-plan/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-review/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-run/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-submit/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-sync/SKILL.md +1 -1
- package/harness/bundles/general/cursor/harness-test/SKILL.md +1 -1
- package/harness/bundles/general/cursor/scripts/harness_deploy.py +10 -51
- package/harness/bundles/java/claude-code/.harness-build.json +1 -1
- package/harness/bundles/java/claude-code/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-archive/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-package/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-plan/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-review/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-run/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-submit/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/harness-test/SKILL.md +1 -1
- package/harness/bundles/java/claude-code/scripts/harness_deploy.py +10 -51
- package/harness/bundles/java/codebuddy/.harness-build.json +1 -1
- package/harness/bundles/java/codebuddy/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-archive/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-package/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-plan/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-review/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-run/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-submit/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/harness-test/SKILL.md +1 -1
- package/harness/bundles/java/codebuddy/scripts/harness_deploy.py +10 -51
- package/harness/bundles/java/codex/.harness-build.json +1 -1
- package/harness/bundles/java/codex/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-archive/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-package/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-plan/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-review/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-run/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-submit/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/codex/harness-test/SKILL.md +1 -1
- package/harness/bundles/java/codex/scripts/harness_deploy.py +10 -51
- package/harness/bundles/java/cursor/.harness-build.json +1 -1
- package/harness/bundles/java/cursor/harness-apidoc/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-archive/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-codebase-map/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-knowledge-ingest/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-knowledge-query/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-package/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-plan/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-review/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-run/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-submit/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-sync/SKILL.md +1 -1
- package/harness/bundles/java/cursor/harness-test/SKILL.md +1 -1
- package/harness/bundles/java/cursor/scripts/harness_deploy.py +10 -51
- package/harness/manifests/general/claude-code.json +12 -12
- package/harness/manifests/general/codebuddy.json +12 -12
- package/harness/manifests/general/codex.json +12 -12
- package/harness/manifests/general/cursor.json +12 -12
- package/harness/manifests/java/claude-code.json +14 -14
- package/harness/manifests/java/codebuddy.json +14 -14
- package/harness/manifests/java/codex.json +14 -14
- package/harness/manifests/java/cursor.json +14 -14
- package/hunter-workflow-family.json +1 -1
- package/package.json +1 -1
|
@@ -20,7 +20,7 @@ disallowed-tools:
|
|
|
20
20
|
- Bash(awk *)
|
|
21
21
|
- Bash(curl *)
|
|
22
22
|
---
|
|
23
|
-
<!-- generated by harness_deploy.py; core=
|
|
23
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=claude-code; do not edit -->
|
|
24
24
|
# harness-archive — 变更归档
|
|
25
25
|
|
|
26
26
|
## Purpose
|
|
@@ -20,7 +20,7 @@ disallowed-tools:
|
|
|
20
20
|
- Bash(awk *)
|
|
21
21
|
- Bash(curl *)
|
|
22
22
|
---
|
|
23
|
-
<!-- generated by harness_deploy.py; core=
|
|
23
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=claude-code; do not edit -->
|
|
24
24
|
# harness-codebase-map — 代码库地图
|
|
25
25
|
|
|
26
26
|
## Purpose
|
|
@@ -20,7 +20,7 @@ disallowed-tools:
|
|
|
20
20
|
- Bash(awk *)
|
|
21
21
|
- Bash(curl *)
|
|
22
22
|
---
|
|
23
|
-
<!-- generated by harness_deploy.py; core=
|
|
23
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=claude-code; do not edit -->
|
|
24
24
|
# harness-knowledge-ingest
|
|
25
25
|
|
|
26
26
|
从 `.harness/archive/**/reports/final/summary-data.json` 抽取项目知识,生成并维护本地 `.harness/knowledge/` 索引。
|
|
@@ -20,7 +20,7 @@ disallowed-tools:
|
|
|
20
20
|
- Bash(awk *)
|
|
21
21
|
- Bash(curl *)
|
|
22
22
|
---
|
|
23
|
-
<!-- generated by harness_deploy.py; core=
|
|
23
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=claude-code; do not edit -->
|
|
24
24
|
# harness-knowledge-query
|
|
25
25
|
|
|
26
26
|
并行 change 中查询必须传 `--change <change-id>`;成功后以该 change 的 `meta/knowledge-context.json` 为稳定指针。全局 `context-packs/latest.json` 仅向后兼容,不得用于判断多个 active change 的上下文归属。
|
|
@@ -20,7 +20,7 @@ disallowed-tools:
|
|
|
20
20
|
- Bash(awk *)
|
|
21
21
|
- Bash(curl *)
|
|
22
22
|
---
|
|
23
|
-
<!-- generated by harness_deploy.py; core=
|
|
23
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=claude-code; do not edit -->
|
|
24
24
|
# harness-plan — 需求规划
|
|
25
25
|
|
|
26
26
|
## Purpose
|
|
@@ -21,7 +21,7 @@ disallowed-tools:
|
|
|
21
21
|
- Bash(curl *)
|
|
22
22
|
- Bash(codegraph *)
|
|
23
23
|
---
|
|
24
|
-
<!-- generated by harness_deploy.py; core=
|
|
24
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=claude-code; do not edit -->
|
|
25
25
|
# harness-review — 代码审查
|
|
26
26
|
|
|
27
27
|
## Purpose
|
|
@@ -21,7 +21,7 @@ disallowed-tools:
|
|
|
21
21
|
- Bash(curl *)
|
|
22
22
|
- Bash(codegraph *)
|
|
23
23
|
---
|
|
24
|
-
<!-- generated by harness_deploy.py; core=
|
|
24
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=claude-code; do not edit -->
|
|
25
25
|
# harness-run — 需求编码
|
|
26
26
|
|
|
27
27
|
## Purpose
|
|
@@ -20,7 +20,7 @@ disallowed-tools:
|
|
|
20
20
|
- Bash(awk *)
|
|
21
21
|
- Bash(curl *)
|
|
22
22
|
---
|
|
23
|
-
<!-- generated by harness_deploy.py; core=
|
|
23
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=claude-code; do not edit -->
|
|
24
24
|
# harness-submit — 最终提交(含 worktree 合并)
|
|
25
25
|
|
|
26
26
|
## Purpose
|
|
@@ -19,7 +19,7 @@ disallowed-tools:
|
|
|
19
19
|
- Bash(awk *)
|
|
20
20
|
- Bash(curl *)
|
|
21
21
|
---
|
|
22
|
-
<!-- generated by harness_deploy.py; core=
|
|
22
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=claude-code; do not edit -->
|
|
23
23
|
# harness-sync
|
|
24
24
|
|
|
25
25
|
## Purpose
|
|
@@ -22,7 +22,7 @@ disallowed-tools:
|
|
|
22
22
|
- Bash(node *)
|
|
23
23
|
- Bash(codegraph *)
|
|
24
24
|
---
|
|
25
|
-
<!-- generated by harness_deploy.py; core=
|
|
25
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=claude-code; do not edit -->
|
|
26
26
|
# harness-test — 测试执行
|
|
27
27
|
|
|
28
28
|
## Purpose
|
|
@@ -316,48 +316,6 @@ def validate_build_paths(skills_root: Path, out_dir: Path) -> tuple[Path, Path]:
|
|
|
316
316
|
return skills_root, out_dir
|
|
317
317
|
|
|
318
318
|
|
|
319
|
-
def _git_repo_root(start: Path) -> Path | None:
|
|
320
|
-
"""Return the git toplevel containing ``start``, or None if not a git repo."""
|
|
321
|
-
try:
|
|
322
|
-
r = subprocess.run(
|
|
323
|
-
["git", "rev-parse", "--show-toplevel"],
|
|
324
|
-
cwd=str(start),
|
|
325
|
-
capture_output=True,
|
|
326
|
-
text=True,
|
|
327
|
-
timeout=5,
|
|
328
|
-
)
|
|
329
|
-
except (OSError, subprocess.SubprocessError):
|
|
330
|
-
return None
|
|
331
|
-
if r.returncode != 0 or not r.stdout.strip():
|
|
332
|
-
return None
|
|
333
|
-
return Path(r.stdout.strip())
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
def _git_blob_sha(path: Path, repo_root: Path) -> str | None:
|
|
337
|
-
"""Return the git blob sha for a tracked file (CRLF-normalized by .gitattributes),
|
|
338
|
-
or None if untracked / git unavailable. Caller falls back to working-copy sha256
|
|
339
|
-
for untracked build inputs (deterministic enough outside git's normalization)."""
|
|
340
|
-
try:
|
|
341
|
-
rel = path.resolve().relative_to(repo_root.resolve())
|
|
342
|
-
except ValueError:
|
|
343
|
-
return None
|
|
344
|
-
try:
|
|
345
|
-
r = subprocess.run(
|
|
346
|
-
["git", "ls-files", "-s", "--", rel.as_posix()],
|
|
347
|
-
cwd=str(repo_root),
|
|
348
|
-
capture_output=True,
|
|
349
|
-
text=True,
|
|
350
|
-
timeout=5,
|
|
351
|
-
)
|
|
352
|
-
except (OSError, subprocess.SubprocessError):
|
|
353
|
-
return None
|
|
354
|
-
if r.returncode != 0 or not r.stdout.strip():
|
|
355
|
-
return None
|
|
356
|
-
# format: "<mode> <sha> <stage>\t<path>"
|
|
357
|
-
parts = r.stdout.strip().splitlines()[0].split()
|
|
358
|
-
return parts[1] if len(parts) >= 2 else None
|
|
359
|
-
|
|
360
|
-
|
|
361
319
|
def core_content_hash(
|
|
362
320
|
skills_root: Path,
|
|
363
321
|
overlay_dir: Path | None,
|
|
@@ -387,17 +345,18 @@ def core_content_hash(
|
|
|
387
345
|
if agent_overlay_dir and agent_overlay_dir.is_dir():
|
|
388
346
|
files.extend(p for p in agent_overlay_dir.rglob("*") if p.is_file())
|
|
389
347
|
skills_root_resolved = skills_root.resolve()
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
348
|
+
files_by_relative_path = {
|
|
349
|
+
f.resolve().relative_to(skills_root_resolved).as_posix(): f
|
|
350
|
+
for f in files
|
|
351
|
+
}
|
|
352
|
+
for rel in sorted(files_by_relative_path):
|
|
353
|
+
f = files_by_relative_path[rel]
|
|
393
354
|
h.update(rel.encode("utf-8"))
|
|
394
355
|
h.update(b"\0")
|
|
395
|
-
#
|
|
396
|
-
#
|
|
397
|
-
#
|
|
398
|
-
|
|
399
|
-
blob = _git_blob_sha(f, repo_root) if repo_root else None
|
|
400
|
-
h.update((blob or sha256_file(f)).encode("ascii"))
|
|
356
|
+
# Hash the actual build input with one algorithm regardless of whether the
|
|
357
|
+
# source happens to live inside a Git checkout. Relative POSIX-path sorting
|
|
358
|
+
# keeps the order identical on case-insensitive Windows and Linux.
|
|
359
|
+
h.update(sha256_file(f).encode("ascii"))
|
|
401
360
|
h.update(b"\0")
|
|
402
361
|
return h.hexdigest()[:16]
|
|
403
362
|
|
|
@@ -3,7 +3,7 @@ name: harness-archive
|
|
|
3
3
|
description: 归档所有变更产出(计划/测试报告/审查/SQL/API文档)到
|
|
4
4
|
.harness/archive/,含归档元数据和可视化最终总结。使用场景:归档、完成归档、收尾、打包产出物
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=codebuddy; do not edit -->
|
|
7
7
|
# harness-archive — 变更归档
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -3,7 +3,7 @@ name: harness-codebase-map
|
|
|
3
3
|
description: 分析现有代码库并生成 .harness/codebase/map/
|
|
4
4
|
下的结构化代码库地图。用于陌生项目理解、重大改造前梳理、harness-sync 提示 map 过期后的人工刷新。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=codebuddy; do not edit -->
|
|
7
7
|
# harness-codebase-map — 代码库地图
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -3,7 +3,7 @@ name: harness-knowledge-ingest
|
|
|
3
3
|
description: 从 .harness/archive 归档整理、同步和维护项目知识索引。适用场景:ingest knowledge、sync
|
|
4
4
|
knowledge、rebuild knowledge index、promote knowledge、确认知识条目、检查知识库是否过期。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=codebuddy; do not edit -->
|
|
7
7
|
# harness-knowledge-ingest
|
|
8
8
|
|
|
9
9
|
从 `.harness/archive/**/reports/final/summary-data.json` 抽取项目知识,生成并维护本地 `.harness/knowledge/` 索引。
|
|
@@ -3,7 +3,7 @@ name: harness-knowledge-query
|
|
|
3
3
|
description: 根据新需求、设计任务、代码修改请求或问题排查,在规划和编码前查询 .harness/knowledge
|
|
4
4
|
历史上下文。适用场景:query knowledge、查找历史需求、根据归档理解需求、继续之前类似开发、生成需求上下文包。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=codebuddy; do not edit -->
|
|
7
7
|
# harness-knowledge-query
|
|
8
8
|
|
|
9
9
|
并行 change 中查询必须传 `--change <change-id>`;成功后以该 change 的 `meta/knowledge-context.json` 为稳定指针。全局 `context-packs/latest.json` 仅向后兼容,不得用于判断多个 active change 的上下文归属。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-plan
|
|
3
3
|
description: 将需求转化为设计文档+实施计划+完整测试场景表,必须在编码前完成。使用场景:需求分析、feature plan、技术方案设计、实现方案规划
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=codebuddy; do not edit -->
|
|
6
6
|
# harness-plan — 需求规划
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -3,7 +3,7 @@ name: harness-review
|
|
|
3
3
|
description: 6维度代码审查(架构/安全/规范/兼容/测试/性能),对照项目规则(见
|
|
4
4
|
.harness/context-index.json)和测试场景表,在隔离上下文运行。使用场景:代码审查、提交前检查、合并评审
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=codebuddy; do not edit -->
|
|
7
7
|
# harness-review — 代码审查
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-run
|
|
3
3
|
description: 按变更簇执行 TDD 编码循环(RED→GREEN→REFACTOR→编译验证),逐变更簇实现计划中的任务。使用场景:开始编码、实现功能、写代码、TDD 编码
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=codebuddy; do not edit -->
|
|
6
6
|
# harness-run — 需求编码
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -3,7 +3,7 @@ name: harness-submit
|
|
|
3
3
|
description: 最终提交封装:验证→中文 commit→提交/推送;worktree 模式含 --no-ff
|
|
4
4
|
合并回主分支。使用场景:提交代码、commit、push、合并分支、merge to main、完成开发
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=codebuddy; do not edit -->
|
|
7
7
|
# harness-submit — 最终提交(含 worktree 合并)
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -4,7 +4,7 @@ description: Use when the user asks to synchronize, refresh, or validate Harness
|
|
|
4
4
|
metadata, adapters, knowledge, rules, instruction entrypoints, config origins,
|
|
5
5
|
or CodeGraph status.
|
|
6
6
|
---
|
|
7
|
-
<!-- generated by harness_deploy.py; core=
|
|
7
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=codebuddy; do not edit -->
|
|
8
8
|
# harness-sync
|
|
9
9
|
|
|
10
10
|
## Purpose
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-test
|
|
3
3
|
description: 测试执行:读取场景表,执行单元测试+API接口测试+数据兼容验证,输出测试报告。当用户说'跑测试/验证/跑用例/接口测试/单元测试'时使用
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=0a3c1c8a8343600b; overlay=none; agent=codebuddy; do not edit -->
|
|
6
6
|
# harness-test — 测试执行
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -316,48 +316,6 @@ def validate_build_paths(skills_root: Path, out_dir: Path) -> tuple[Path, Path]:
|
|
|
316
316
|
return skills_root, out_dir
|
|
317
317
|
|
|
318
318
|
|
|
319
|
-
def _git_repo_root(start: Path) -> Path | None:
|
|
320
|
-
"""Return the git toplevel containing ``start``, or None if not a git repo."""
|
|
321
|
-
try:
|
|
322
|
-
r = subprocess.run(
|
|
323
|
-
["git", "rev-parse", "--show-toplevel"],
|
|
324
|
-
cwd=str(start),
|
|
325
|
-
capture_output=True,
|
|
326
|
-
text=True,
|
|
327
|
-
timeout=5,
|
|
328
|
-
)
|
|
329
|
-
except (OSError, subprocess.SubprocessError):
|
|
330
|
-
return None
|
|
331
|
-
if r.returncode != 0 or not r.stdout.strip():
|
|
332
|
-
return None
|
|
333
|
-
return Path(r.stdout.strip())
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
def _git_blob_sha(path: Path, repo_root: Path) -> str | None:
|
|
337
|
-
"""Return the git blob sha for a tracked file (CRLF-normalized by .gitattributes),
|
|
338
|
-
or None if untracked / git unavailable. Caller falls back to working-copy sha256
|
|
339
|
-
for untracked build inputs (deterministic enough outside git's normalization)."""
|
|
340
|
-
try:
|
|
341
|
-
rel = path.resolve().relative_to(repo_root.resolve())
|
|
342
|
-
except ValueError:
|
|
343
|
-
return None
|
|
344
|
-
try:
|
|
345
|
-
r = subprocess.run(
|
|
346
|
-
["git", "ls-files", "-s", "--", rel.as_posix()],
|
|
347
|
-
cwd=str(repo_root),
|
|
348
|
-
capture_output=True,
|
|
349
|
-
text=True,
|
|
350
|
-
timeout=5,
|
|
351
|
-
)
|
|
352
|
-
except (OSError, subprocess.SubprocessError):
|
|
353
|
-
return None
|
|
354
|
-
if r.returncode != 0 or not r.stdout.strip():
|
|
355
|
-
return None
|
|
356
|
-
# format: "<mode> <sha> <stage>\t<path>"
|
|
357
|
-
parts = r.stdout.strip().splitlines()[0].split()
|
|
358
|
-
return parts[1] if len(parts) >= 2 else None
|
|
359
|
-
|
|
360
|
-
|
|
361
319
|
def core_content_hash(
|
|
362
320
|
skills_root: Path,
|
|
363
321
|
overlay_dir: Path | None,
|
|
@@ -387,17 +345,18 @@ def core_content_hash(
|
|
|
387
345
|
if agent_overlay_dir and agent_overlay_dir.is_dir():
|
|
388
346
|
files.extend(p for p in agent_overlay_dir.rglob("*") if p.is_file())
|
|
389
347
|
skills_root_resolved = skills_root.resolve()
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
348
|
+
files_by_relative_path = {
|
|
349
|
+
f.resolve().relative_to(skills_root_resolved).as_posix(): f
|
|
350
|
+
for f in files
|
|
351
|
+
}
|
|
352
|
+
for rel in sorted(files_by_relative_path):
|
|
353
|
+
f = files_by_relative_path[rel]
|
|
393
354
|
h.update(rel.encode("utf-8"))
|
|
394
355
|
h.update(b"\0")
|
|
395
|
-
#
|
|
396
|
-
#
|
|
397
|
-
#
|
|
398
|
-
|
|
399
|
-
blob = _git_blob_sha(f, repo_root) if repo_root else None
|
|
400
|
-
h.update((blob or sha256_file(f)).encode("ascii"))
|
|
356
|
+
# Hash the actual build input with one algorithm regardless of whether the
|
|
357
|
+
# source happens to live inside a Git checkout. Relative POSIX-path sorting
|
|
358
|
+
# keeps the order identical on case-insensitive Windows and Linux.
|
|
359
|
+
h.update(sha256_file(f).encode("ascii"))
|
|
401
360
|
h.update(b"\0")
|
|
402
361
|
return h.hexdigest()[:16]
|
|
403
362
|
|
|
@@ -3,7 +3,7 @@ name: harness-archive
|
|
|
3
3
|
description: 归档所有变更产出(计划/测试报告/审查/SQL/API文档)到
|
|
4
4
|
.harness/archive/,含归档元数据和可视化最终总结。使用场景:归档、完成归档、收尾、打包产出物
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=38d0e758c0944151; overlay=none; agent=codex; do not edit -->
|
|
7
7
|
# harness-archive — 变更归档
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -3,7 +3,7 @@ name: harness-codebase-map
|
|
|
3
3
|
description: 分析现有代码库并生成 .harness/codebase/map/
|
|
4
4
|
下的结构化代码库地图。用于陌生项目理解、重大改造前梳理、harness-sync 提示 map 过期后的人工刷新。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=38d0e758c0944151; overlay=none; agent=codex; do not edit -->
|
|
7
7
|
# harness-codebase-map — 代码库地图
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -3,7 +3,7 @@ name: harness-knowledge-ingest
|
|
|
3
3
|
description: 从 .harness/archive 归档整理、同步和维护项目知识索引。适用场景:ingest knowledge、sync
|
|
4
4
|
knowledge、rebuild knowledge index、promote knowledge、确认知识条目、检查知识库是否过期。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=38d0e758c0944151; overlay=none; agent=codex; do not edit -->
|
|
7
7
|
# harness-knowledge-ingest
|
|
8
8
|
|
|
9
9
|
从 `.harness/archive/**/reports/final/summary-data.json` 抽取项目知识,生成并维护本地 `.harness/knowledge/` 索引。
|
|
@@ -3,7 +3,7 @@ name: harness-knowledge-query
|
|
|
3
3
|
description: 根据新需求、设计任务、代码修改请求或问题排查,在规划和编码前查询 .harness/knowledge
|
|
4
4
|
历史上下文。适用场景:query knowledge、查找历史需求、根据归档理解需求、继续之前类似开发、生成需求上下文包。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=38d0e758c0944151; overlay=none; agent=codex; do not edit -->
|
|
7
7
|
# harness-knowledge-query
|
|
8
8
|
|
|
9
9
|
并行 change 中查询必须传 `--change <change-id>`;成功后以该 change 的 `meta/knowledge-context.json` 为稳定指针。全局 `context-packs/latest.json` 仅向后兼容,不得用于判断多个 active change 的上下文归属。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-plan
|
|
3
3
|
description: 将需求转化为设计文档+实施计划+完整测试场景表,必须在编码前完成。使用场景:需求分析、feature plan、技术方案设计、实现方案规划
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=38d0e758c0944151; overlay=none; agent=codex; do not edit -->
|
|
6
6
|
# harness-plan — 需求规划
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -3,7 +3,7 @@ name: harness-review
|
|
|
3
3
|
description: 6维度代码审查(架构/安全/规范/兼容/测试/性能),对照项目规则(见
|
|
4
4
|
.harness/context-index.json)和测试场景表,在隔离上下文运行。使用场景:代码审查、提交前检查、合并评审
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=38d0e758c0944151; overlay=none; agent=codex; do not edit -->
|
|
7
7
|
# harness-review — 代码审查
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-run
|
|
3
3
|
description: 按变更簇执行 TDD 编码循环(RED→GREEN→REFACTOR→编译验证),逐变更簇实现计划中的任务。使用场景:开始编码、实现功能、写代码、TDD 编码
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=38d0e758c0944151; overlay=none; agent=codex; do not edit -->
|
|
6
6
|
# harness-run — 需求编码
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -3,7 +3,7 @@ name: harness-submit
|
|
|
3
3
|
description: 最终提交封装:验证→中文 commit→提交/推送;worktree 模式含 --no-ff
|
|
4
4
|
合并回主分支。使用场景:提交代码、commit、push、合并分支、merge to main、完成开发
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=38d0e758c0944151; overlay=none; agent=codex; do not edit -->
|
|
7
7
|
# harness-submit — 最终提交(含 worktree 合并)
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -4,7 +4,7 @@ description: Use when the user asks to synchronize, refresh, or validate Harness
|
|
|
4
4
|
metadata, adapters, knowledge, rules, instruction entrypoints, config origins,
|
|
5
5
|
or CodeGraph status.
|
|
6
6
|
---
|
|
7
|
-
<!-- generated by harness_deploy.py; core=
|
|
7
|
+
<!-- generated by harness_deploy.py; core=38d0e758c0944151; overlay=none; agent=codex; do not edit -->
|
|
8
8
|
# harness-sync
|
|
9
9
|
|
|
10
10
|
## Purpose
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-test
|
|
3
3
|
description: 测试执行:读取场景表,执行单元测试+API接口测试+数据兼容验证,输出测试报告。当用户说'跑测试/验证/跑用例/接口测试/单元测试'时使用
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=38d0e758c0944151; overlay=none; agent=codex; do not edit -->
|
|
6
6
|
# harness-test — 测试执行
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
@@ -316,48 +316,6 @@ def validate_build_paths(skills_root: Path, out_dir: Path) -> tuple[Path, Path]:
|
|
|
316
316
|
return skills_root, out_dir
|
|
317
317
|
|
|
318
318
|
|
|
319
|
-
def _git_repo_root(start: Path) -> Path | None:
|
|
320
|
-
"""Return the git toplevel containing ``start``, or None if not a git repo."""
|
|
321
|
-
try:
|
|
322
|
-
r = subprocess.run(
|
|
323
|
-
["git", "rev-parse", "--show-toplevel"],
|
|
324
|
-
cwd=str(start),
|
|
325
|
-
capture_output=True,
|
|
326
|
-
text=True,
|
|
327
|
-
timeout=5,
|
|
328
|
-
)
|
|
329
|
-
except (OSError, subprocess.SubprocessError):
|
|
330
|
-
return None
|
|
331
|
-
if r.returncode != 0 or not r.stdout.strip():
|
|
332
|
-
return None
|
|
333
|
-
return Path(r.stdout.strip())
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
def _git_blob_sha(path: Path, repo_root: Path) -> str | None:
|
|
337
|
-
"""Return the git blob sha for a tracked file (CRLF-normalized by .gitattributes),
|
|
338
|
-
or None if untracked / git unavailable. Caller falls back to working-copy sha256
|
|
339
|
-
for untracked build inputs (deterministic enough outside git's normalization)."""
|
|
340
|
-
try:
|
|
341
|
-
rel = path.resolve().relative_to(repo_root.resolve())
|
|
342
|
-
except ValueError:
|
|
343
|
-
return None
|
|
344
|
-
try:
|
|
345
|
-
r = subprocess.run(
|
|
346
|
-
["git", "ls-files", "-s", "--", rel.as_posix()],
|
|
347
|
-
cwd=str(repo_root),
|
|
348
|
-
capture_output=True,
|
|
349
|
-
text=True,
|
|
350
|
-
timeout=5,
|
|
351
|
-
)
|
|
352
|
-
except (OSError, subprocess.SubprocessError):
|
|
353
|
-
return None
|
|
354
|
-
if r.returncode != 0 or not r.stdout.strip():
|
|
355
|
-
return None
|
|
356
|
-
# format: "<mode> <sha> <stage>\t<path>"
|
|
357
|
-
parts = r.stdout.strip().splitlines()[0].split()
|
|
358
|
-
return parts[1] if len(parts) >= 2 else None
|
|
359
|
-
|
|
360
|
-
|
|
361
319
|
def core_content_hash(
|
|
362
320
|
skills_root: Path,
|
|
363
321
|
overlay_dir: Path | None,
|
|
@@ -387,17 +345,18 @@ def core_content_hash(
|
|
|
387
345
|
if agent_overlay_dir and agent_overlay_dir.is_dir():
|
|
388
346
|
files.extend(p for p in agent_overlay_dir.rglob("*") if p.is_file())
|
|
389
347
|
skills_root_resolved = skills_root.resolve()
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
348
|
+
files_by_relative_path = {
|
|
349
|
+
f.resolve().relative_to(skills_root_resolved).as_posix(): f
|
|
350
|
+
for f in files
|
|
351
|
+
}
|
|
352
|
+
for rel in sorted(files_by_relative_path):
|
|
353
|
+
f = files_by_relative_path[rel]
|
|
393
354
|
h.update(rel.encode("utf-8"))
|
|
394
355
|
h.update(b"\0")
|
|
395
|
-
#
|
|
396
|
-
#
|
|
397
|
-
#
|
|
398
|
-
|
|
399
|
-
blob = _git_blob_sha(f, repo_root) if repo_root else None
|
|
400
|
-
h.update((blob or sha256_file(f)).encode("ascii"))
|
|
356
|
+
# Hash the actual build input with one algorithm regardless of whether the
|
|
357
|
+
# source happens to live inside a Git checkout. Relative POSIX-path sorting
|
|
358
|
+
# keeps the order identical on case-insensitive Windows and Linux.
|
|
359
|
+
h.update(sha256_file(f).encode("ascii"))
|
|
401
360
|
h.update(b"\0")
|
|
402
361
|
return h.hexdigest()[:16]
|
|
403
362
|
|
|
@@ -3,7 +3,7 @@ name: harness-archive
|
|
|
3
3
|
description: 归档所有变更产出(计划/测试报告/审查/SQL/API文档)到
|
|
4
4
|
.harness/archive/,含归档元数据和可视化最终总结。使用场景:归档、完成归档、收尾、打包产出物
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=fdb3d1e38e10f19c; overlay=none; agent=cursor; do not edit -->
|
|
7
7
|
# harness-archive — 变更归档
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -3,7 +3,7 @@ name: harness-codebase-map
|
|
|
3
3
|
description: 分析现有代码库并生成 .harness/codebase/map/
|
|
4
4
|
下的结构化代码库地图。用于陌生项目理解、重大改造前梳理、harness-sync 提示 map 过期后的人工刷新。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=fdb3d1e38e10f19c; overlay=none; agent=cursor; do not edit -->
|
|
7
7
|
# harness-codebase-map — 代码库地图
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
@@ -3,7 +3,7 @@ name: harness-knowledge-ingest
|
|
|
3
3
|
description: 从 .harness/archive 归档整理、同步和维护项目知识索引。适用场景:ingest knowledge、sync
|
|
4
4
|
knowledge、rebuild knowledge index、promote knowledge、确认知识条目、检查知识库是否过期。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=fdb3d1e38e10f19c; overlay=none; agent=cursor; do not edit -->
|
|
7
7
|
# harness-knowledge-ingest
|
|
8
8
|
|
|
9
9
|
从 `.harness/archive/**/reports/final/summary-data.json` 抽取项目知识,生成并维护本地 `.harness/knowledge/` 索引。
|
|
@@ -3,7 +3,7 @@ name: harness-knowledge-query
|
|
|
3
3
|
description: 根据新需求、设计任务、代码修改请求或问题排查,在规划和编码前查询 .harness/knowledge
|
|
4
4
|
历史上下文。适用场景:query knowledge、查找历史需求、根据归档理解需求、继续之前类似开发、生成需求上下文包。
|
|
5
5
|
---
|
|
6
|
-
<!-- generated by harness_deploy.py; core=
|
|
6
|
+
<!-- generated by harness_deploy.py; core=fdb3d1e38e10f19c; overlay=none; agent=cursor; do not edit -->
|
|
7
7
|
# harness-knowledge-query
|
|
8
8
|
|
|
9
9
|
并行 change 中查询必须传 `--change <change-id>`;成功后以该 change 的 `meta/knowledge-context.json` 为稳定指针。全局 `context-packs/latest.json` 仅向后兼容,不得用于判断多个 active change 的上下文归属。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: harness-plan
|
|
3
3
|
description: 将需求转化为设计文档+实施计划+完整测试场景表,必须在编码前完成。使用场景:需求分析、feature plan、技术方案设计、实现方案规划
|
|
4
4
|
---
|
|
5
|
-
<!-- generated by harness_deploy.py; core=
|
|
5
|
+
<!-- generated by harness_deploy.py; core=fdb3d1e38e10f19c; overlay=none; agent=cursor; do not edit -->
|
|
6
6
|
# harness-plan — 需求规划
|
|
7
7
|
|
|
8
8
|
## Purpose
|