@hunter-harness/workflow-harness 0.2.28 → 0.2.30

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.
Files changed (162) hide show
  1. package/harness/bundles/general/claude-code/.harness-build.json +1 -1
  2. package/harness/bundles/general/claude-code/contracts/workflow-policy.json +34 -2
  3. package/harness/bundles/general/claude-code/harness-archive/SKILL.md +1 -1
  4. package/harness/bundles/general/claude-code/harness-codebase-map/SKILL.md +1 -1
  5. package/harness/bundles/general/claude-code/harness-knowledge-ingest/SKILL.md +1 -1
  6. package/harness/bundles/general/claude-code/harness-knowledge-ingest/scripts/harness_knowledge.py +323 -32
  7. package/harness/bundles/general/claude-code/harness-knowledge-query/SKILL.md +1 -1
  8. package/harness/bundles/general/claude-code/harness-plan/SKILL.md +1 -1
  9. package/harness/bundles/general/claude-code/harness-review/SKILL.md +1 -1
  10. package/harness/bundles/general/claude-code/harness-run/SKILL.md +1 -1
  11. package/harness/bundles/general/claude-code/harness-submit/SKILL.md +1 -1
  12. package/harness/bundles/general/claude-code/harness-sync/SKILL.md +28 -51
  13. package/harness/bundles/general/claude-code/harness-sync/reference.md +89 -142
  14. package/harness/bundles/general/claude-code/harness-test/SKILL.md +26 -2
  15. package/harness/bundles/general/claude-code/harness-test/checklist.md +15 -0
  16. package/harness/bundles/general/claude-code/harness-test/reference.md +28 -4
  17. package/harness/bundles/general/claude-code/scripts/harness_change.py +189 -0
  18. package/harness/bundles/general/claude-code/scripts/harness_test_runner.py +974 -0
  19. package/harness/bundles/general/claude-code/scripts/harness_workflow_policy.py +87 -0
  20. package/harness/bundles/general/codebuddy/.harness-build.json +1 -1
  21. package/harness/bundles/general/codebuddy/contracts/workflow-policy.json +34 -2
  22. package/harness/bundles/general/codebuddy/harness-archive/SKILL.md +1 -1
  23. package/harness/bundles/general/codebuddy/harness-codebase-map/SKILL.md +1 -1
  24. package/harness/bundles/general/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
  25. package/harness/bundles/general/codebuddy/harness-knowledge-ingest/scripts/harness_knowledge.py +323 -32
  26. package/harness/bundles/general/codebuddy/harness-knowledge-query/SKILL.md +1 -1
  27. package/harness/bundles/general/codebuddy/harness-plan/SKILL.md +1 -1
  28. package/harness/bundles/general/codebuddy/harness-review/SKILL.md +1 -1
  29. package/harness/bundles/general/codebuddy/harness-run/SKILL.md +1 -1
  30. package/harness/bundles/general/codebuddy/harness-submit/SKILL.md +1 -1
  31. package/harness/bundles/general/codebuddy/harness-sync/SKILL.md +30 -51
  32. package/harness/bundles/general/codebuddy/harness-sync/reference.md +89 -142
  33. package/harness/bundles/general/codebuddy/harness-test/SKILL.md +26 -2
  34. package/harness/bundles/general/codebuddy/harness-test/checklist.md +15 -0
  35. package/harness/bundles/general/codebuddy/harness-test/reference.md +28 -4
  36. package/harness/bundles/general/codebuddy/scripts/harness_change.py +189 -0
  37. package/harness/bundles/general/codebuddy/scripts/harness_test_runner.py +974 -0
  38. package/harness/bundles/general/codebuddy/scripts/harness_workflow_policy.py +87 -0
  39. package/harness/bundles/general/codex/.harness-build.json +1 -1
  40. package/harness/bundles/general/codex/contracts/workflow-policy.json +34 -2
  41. package/harness/bundles/general/codex/harness-archive/SKILL.md +1 -1
  42. package/harness/bundles/general/codex/harness-codebase-map/SKILL.md +1 -1
  43. package/harness/bundles/general/codex/harness-knowledge-ingest/SKILL.md +1 -1
  44. package/harness/bundles/general/codex/harness-knowledge-ingest/scripts/harness_knowledge.py +323 -32
  45. package/harness/bundles/general/codex/harness-knowledge-query/SKILL.md +1 -1
  46. package/harness/bundles/general/codex/harness-plan/SKILL.md +1 -1
  47. package/harness/bundles/general/codex/harness-review/SKILL.md +1 -1
  48. package/harness/bundles/general/codex/harness-run/SKILL.md +1 -1
  49. package/harness/bundles/general/codex/harness-submit/SKILL.md +1 -1
  50. package/harness/bundles/general/codex/harness-sync/SKILL.md +30 -51
  51. package/harness/bundles/general/codex/harness-sync/reference.md +89 -142
  52. package/harness/bundles/general/codex/harness-test/SKILL.md +26 -2
  53. package/harness/bundles/general/codex/harness-test/checklist.md +15 -0
  54. package/harness/bundles/general/codex/harness-test/reference.md +28 -4
  55. package/harness/bundles/general/codex/scripts/harness_change.py +189 -0
  56. package/harness/bundles/general/codex/scripts/harness_test_runner.py +974 -0
  57. package/harness/bundles/general/codex/scripts/harness_workflow_policy.py +87 -0
  58. package/harness/bundles/general/cursor/.harness-build.json +1 -1
  59. package/harness/bundles/general/cursor/contracts/workflow-policy.json +34 -2
  60. package/harness/bundles/general/cursor/harness-archive/SKILL.md +1 -1
  61. package/harness/bundles/general/cursor/harness-codebase-map/SKILL.md +1 -1
  62. package/harness/bundles/general/cursor/harness-knowledge-ingest/SKILL.md +1 -1
  63. package/harness/bundles/general/cursor/harness-knowledge-ingest/scripts/harness_knowledge.py +323 -32
  64. package/harness/bundles/general/cursor/harness-knowledge-query/SKILL.md +1 -1
  65. package/harness/bundles/general/cursor/harness-plan/SKILL.md +1 -1
  66. package/harness/bundles/general/cursor/harness-review/SKILL.md +1 -1
  67. package/harness/bundles/general/cursor/harness-run/SKILL.md +1 -1
  68. package/harness/bundles/general/cursor/harness-submit/SKILL.md +1 -1
  69. package/harness/bundles/general/cursor/harness-sync/SKILL.md +30 -51
  70. package/harness/bundles/general/cursor/harness-sync/reference.md +89 -142
  71. package/harness/bundles/general/cursor/harness-test/SKILL.md +26 -2
  72. package/harness/bundles/general/cursor/harness-test/checklist.md +15 -0
  73. package/harness/bundles/general/cursor/harness-test/reference.md +28 -4
  74. package/harness/bundles/general/cursor/scripts/harness_change.py +189 -0
  75. package/harness/bundles/general/cursor/scripts/harness_test_runner.py +974 -0
  76. package/harness/bundles/general/cursor/scripts/harness_workflow_policy.py +87 -0
  77. package/harness/bundles/java/claude-code/.harness-build.json +1 -1
  78. package/harness/bundles/java/claude-code/contracts/workflow-policy.json +34 -2
  79. package/harness/bundles/java/claude-code/harness-apidoc/SKILL.md +1 -1
  80. package/harness/bundles/java/claude-code/harness-archive/SKILL.md +1 -1
  81. package/harness/bundles/java/claude-code/harness-codebase-map/SKILL.md +1 -1
  82. package/harness/bundles/java/claude-code/harness-knowledge-ingest/SKILL.md +1 -1
  83. package/harness/bundles/java/claude-code/harness-knowledge-ingest/scripts/harness_knowledge.py +323 -32
  84. package/harness/bundles/java/claude-code/harness-knowledge-query/SKILL.md +1 -1
  85. package/harness/bundles/java/claude-code/harness-package/SKILL.md +1 -1
  86. package/harness/bundles/java/claude-code/harness-plan/SKILL.md +1 -1
  87. package/harness/bundles/java/claude-code/harness-review/SKILL.md +1 -1
  88. package/harness/bundles/java/claude-code/harness-run/SKILL.md +1 -1
  89. package/harness/bundles/java/claude-code/harness-submit/SKILL.md +1 -1
  90. package/harness/bundles/java/claude-code/harness-sync/SKILL.md +28 -51
  91. package/harness/bundles/java/claude-code/harness-sync/reference.md +89 -142
  92. package/harness/bundles/java/claude-code/harness-test/SKILL.md +26 -2
  93. package/harness/bundles/java/claude-code/scripts/harness_change.py +189 -0
  94. package/harness/bundles/java/claude-code/scripts/harness_test_runner.py +974 -0
  95. package/harness/bundles/java/claude-code/scripts/harness_workflow_policy.py +87 -0
  96. package/harness/bundles/java/codebuddy/.harness-build.json +1 -1
  97. package/harness/bundles/java/codebuddy/contracts/workflow-policy.json +34 -2
  98. package/harness/bundles/java/codebuddy/harness-apidoc/SKILL.md +1 -1
  99. package/harness/bundles/java/codebuddy/harness-archive/SKILL.md +1 -1
  100. package/harness/bundles/java/codebuddy/harness-codebase-map/SKILL.md +1 -1
  101. package/harness/bundles/java/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
  102. package/harness/bundles/java/codebuddy/harness-knowledge-ingest/scripts/harness_knowledge.py +323 -32
  103. package/harness/bundles/java/codebuddy/harness-knowledge-query/SKILL.md +1 -1
  104. package/harness/bundles/java/codebuddy/harness-package/SKILL.md +1 -1
  105. package/harness/bundles/java/codebuddy/harness-plan/SKILL.md +1 -1
  106. package/harness/bundles/java/codebuddy/harness-review/SKILL.md +1 -1
  107. package/harness/bundles/java/codebuddy/harness-run/SKILL.md +1 -1
  108. package/harness/bundles/java/codebuddy/harness-submit/SKILL.md +1 -1
  109. package/harness/bundles/java/codebuddy/harness-sync/SKILL.md +30 -51
  110. package/harness/bundles/java/codebuddy/harness-sync/reference.md +89 -142
  111. package/harness/bundles/java/codebuddy/harness-test/SKILL.md +26 -2
  112. package/harness/bundles/java/codebuddy/scripts/harness_change.py +189 -0
  113. package/harness/bundles/java/codebuddy/scripts/harness_test_runner.py +974 -0
  114. package/harness/bundles/java/codebuddy/scripts/harness_workflow_policy.py +87 -0
  115. package/harness/bundles/java/codex/.harness-build.json +1 -1
  116. package/harness/bundles/java/codex/contracts/workflow-policy.json +34 -2
  117. package/harness/bundles/java/codex/harness-apidoc/SKILL.md +1 -1
  118. package/harness/bundles/java/codex/harness-archive/SKILL.md +1 -1
  119. package/harness/bundles/java/codex/harness-codebase-map/SKILL.md +1 -1
  120. package/harness/bundles/java/codex/harness-knowledge-ingest/SKILL.md +1 -1
  121. package/harness/bundles/java/codex/harness-knowledge-ingest/scripts/harness_knowledge.py +323 -32
  122. package/harness/bundles/java/codex/harness-knowledge-query/SKILL.md +1 -1
  123. package/harness/bundles/java/codex/harness-package/SKILL.md +1 -1
  124. package/harness/bundles/java/codex/harness-plan/SKILL.md +1 -1
  125. package/harness/bundles/java/codex/harness-review/SKILL.md +1 -1
  126. package/harness/bundles/java/codex/harness-run/SKILL.md +1 -1
  127. package/harness/bundles/java/codex/harness-submit/SKILL.md +1 -1
  128. package/harness/bundles/java/codex/harness-sync/SKILL.md +30 -51
  129. package/harness/bundles/java/codex/harness-sync/reference.md +89 -142
  130. package/harness/bundles/java/codex/harness-test/SKILL.md +26 -2
  131. package/harness/bundles/java/codex/scripts/harness_change.py +189 -0
  132. package/harness/bundles/java/codex/scripts/harness_test_runner.py +974 -0
  133. package/harness/bundles/java/codex/scripts/harness_workflow_policy.py +87 -0
  134. package/harness/bundles/java/cursor/.harness-build.json +1 -1
  135. package/harness/bundles/java/cursor/contracts/workflow-policy.json +34 -2
  136. package/harness/bundles/java/cursor/harness-apidoc/SKILL.md +1 -1
  137. package/harness/bundles/java/cursor/harness-archive/SKILL.md +1 -1
  138. package/harness/bundles/java/cursor/harness-codebase-map/SKILL.md +1 -1
  139. package/harness/bundles/java/cursor/harness-knowledge-ingest/SKILL.md +1 -1
  140. package/harness/bundles/java/cursor/harness-knowledge-ingest/scripts/harness_knowledge.py +323 -32
  141. package/harness/bundles/java/cursor/harness-knowledge-query/SKILL.md +1 -1
  142. package/harness/bundles/java/cursor/harness-package/SKILL.md +1 -1
  143. package/harness/bundles/java/cursor/harness-plan/SKILL.md +1 -1
  144. package/harness/bundles/java/cursor/harness-review/SKILL.md +1 -1
  145. package/harness/bundles/java/cursor/harness-run/SKILL.md +1 -1
  146. package/harness/bundles/java/cursor/harness-submit/SKILL.md +1 -1
  147. package/harness/bundles/java/cursor/harness-sync/SKILL.md +30 -51
  148. package/harness/bundles/java/cursor/harness-sync/reference.md +89 -142
  149. package/harness/bundles/java/cursor/harness-test/SKILL.md +26 -2
  150. package/harness/bundles/java/cursor/scripts/harness_change.py +189 -0
  151. package/harness/bundles/java/cursor/scripts/harness_test_runner.py +974 -0
  152. package/harness/bundles/java/cursor/scripts/harness_workflow_policy.py +87 -0
  153. package/harness/manifests/general/claude-code.json +32 -19
  154. package/harness/manifests/general/codebuddy.json +32 -19
  155. package/harness/manifests/general/codex.json +32 -19
  156. package/harness/manifests/general/cursor.json +32 -19
  157. package/harness/manifests/java/claude-code.json +32 -19
  158. package/harness/manifests/java/codebuddy.json +32 -19
  159. package/harness/manifests/java/codex.json +32 -19
  160. package/harness/manifests/java/cursor.json +32 -19
  161. package/hunter-workflow-family.json +18 -2
  162. package/package.json +1 -1
@@ -15,6 +15,7 @@ POLICY_REL = Path("harness") / "contracts" / "workflow-policy.json"
15
15
  TOP_LEVEL_KEYS = frozenset(
16
16
  {
17
17
  "schemaVersion",
18
+ "testExecution",
18
19
  "riskTiers",
19
20
  "skills",
20
21
  "requiredArtifacts",
@@ -62,6 +63,27 @@ CHECKPOINT_RULE_KEYS = frozenset(
62
63
  "reviewerTool",
63
64
  }
64
65
  )
66
+ TEST_EXECUTION_KEYS = frozenset(
67
+ {
68
+ "runner",
69
+ "defaultProfile",
70
+ "maxWorkers",
71
+ "singleInstance",
72
+ "processTreeCleanup",
73
+ "detachedProcessPreflight",
74
+ "confirmationFlag",
75
+ "confirmationRequiredProfiles",
76
+ "resourceIntensiveModules",
77
+ "profiles",
78
+ }
79
+ )
80
+ TEST_EXECUTION_PROFILE_KEYS = frozenset(
81
+ {
82
+ "description",
83
+ "includesResourceIntensive",
84
+ "moduleTimeoutSeconds",
85
+ }
86
+ )
65
87
 
66
88
 
67
89
  class PolicyValidationError(ValueError):
@@ -94,6 +116,71 @@ def validate_policy(data: Any) -> dict[str, Any]:
94
116
  if data["schemaVersion"] != 1:
95
117
  raise PolicyValidationError("unsupported schemaVersion")
96
118
 
119
+ test_execution = data["testExecution"]
120
+ _require_type(test_execution, dict, "testExecution")
121
+ _reject_unknown(test_execution, TEST_EXECUTION_KEYS, "testExecution")
122
+ for key in ("runner", "defaultProfile", "confirmationFlag"):
123
+ _require_type(test_execution[key], str, f"testExecution.{key}")
124
+ max_workers = test_execution["maxWorkers"]
125
+ _require_type(max_workers, int, "testExecution.maxWorkers")
126
+ if isinstance(max_workers, bool) or max_workers < 1 or max_workers > 2:
127
+ raise PolicyValidationError("testExecution.maxWorkers must be 1 or 2")
128
+ for key in (
129
+ "singleInstance",
130
+ "processTreeCleanup",
131
+ "detachedProcessPreflight",
132
+ ):
133
+ _require_type(test_execution[key], bool, f"testExecution.{key}")
134
+ if not test_execution[key]:
135
+ raise PolicyValidationError(f"testExecution.{key} must be true")
136
+ for key in ("confirmationRequiredProfiles", "resourceIntensiveModules"):
137
+ values = test_execution[key]
138
+ _require_type(values, list, f"testExecution.{key}")
139
+ if any(not isinstance(item, str) or not item for item in values):
140
+ raise PolicyValidationError(
141
+ f"testExecution.{key} must contain non-empty strings"
142
+ )
143
+
144
+ execution_profiles = test_execution["profiles"]
145
+ _require_type(execution_profiles, dict, "testExecution.profiles")
146
+ required_profile_names = {"safe", "system", "full"}
147
+ if set(execution_profiles) != required_profile_names:
148
+ raise PolicyValidationError(
149
+ "testExecution.profiles must define exactly safe, system, and full"
150
+ )
151
+ if test_execution["defaultProfile"] != "safe":
152
+ raise PolicyValidationError("testExecution.defaultProfile must be safe")
153
+ confirmation_profiles = set(test_execution["confirmationRequiredProfiles"])
154
+ if not {"system", "full"}.issubset(confirmation_profiles):
155
+ raise PolicyValidationError(
156
+ "testExecution confirmation must cover system and full"
157
+ )
158
+ for profile_name, profile in execution_profiles.items():
159
+ path = f"testExecution.profiles.{profile_name}"
160
+ _require_type(profile, dict, path)
161
+ _reject_unknown(profile, TEST_EXECUTION_PROFILE_KEYS, path)
162
+ _require_type(profile["description"], str, f"{path}.description")
163
+ _require_type(
164
+ profile["includesResourceIntensive"],
165
+ bool,
166
+ f"{path}.includesResourceIntensive",
167
+ )
168
+ timeout = profile["moduleTimeoutSeconds"]
169
+ _require_type(timeout, int, f"{path}.moduleTimeoutSeconds")
170
+ if isinstance(timeout, bool) or timeout <= 0:
171
+ raise PolicyValidationError(
172
+ f"{path}.moduleTimeoutSeconds must be a positive integer"
173
+ )
174
+ if execution_profiles["safe"]["includesResourceIntensive"]:
175
+ raise PolicyValidationError(
176
+ "testExecution.profiles.safe must exclude resource-intensive tests"
177
+ )
178
+ for profile_name in ("system", "full"):
179
+ if not execution_profiles[profile_name]["includesResourceIntensive"]:
180
+ raise PolicyValidationError(
181
+ f"testExecution.profiles.{profile_name} must include resource-intensive tests"
182
+ )
183
+
97
184
  risk_tiers = data["riskTiers"]
98
185
  _require_type(risk_tiers, dict, "riskTiers")
99
186
  for tier_name, tier in risk_tiers.items():
@@ -2,5 +2,5 @@
2
2
  "schemaVersion": 1,
3
3
  "overlay": "java",
4
4
  "agent": "claude-code",
5
- "coreHash": "305f32827cd4de18"
5
+ "coreHash": "1627e6c5efeb0f1d"
6
6
  }
@@ -1,5 +1,36 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
+ "testExecution": {
4
+ "runner": "harness/scripts/harness_test_runner.py",
5
+ "defaultProfile": "safe",
6
+ "maxWorkers": 2,
7
+ "singleInstance": true,
8
+ "processTreeCleanup": true,
9
+ "detachedProcessPreflight": true,
10
+ "confirmationFlag": "--confirm-resource-intensive",
11
+ "confirmationRequiredProfiles": ["system", "full"],
12
+ "resourceIntensiveModules": [
13
+ "test_harness_integration.py",
14
+ "test_harness_service.py"
15
+ ],
16
+ "profiles": {
17
+ "safe": {
18
+ "description": "Default low-load profile; runs regular test modules sequentially in isolated processes.",
19
+ "includesResourceIntensive": false,
20
+ "moduleTimeoutSeconds": 300
21
+ },
22
+ "system": {
23
+ "description": "Runs integration and service-lifecycle modules only after explicit confirmation.",
24
+ "includesResourceIntensive": true,
25
+ "moduleTimeoutSeconds": 600
26
+ },
27
+ "full": {
28
+ "description": "Runs regular modules followed by resource-intensive modules after explicit confirmation.",
29
+ "includesResourceIntensive": true,
30
+ "moduleTimeoutSeconds": 600
31
+ }
32
+ }
33
+ },
3
34
  "riskTiers": {
4
35
  "fast": {
5
36
  "description": "Low-risk docs/comments/non-behavioral config; no API/DB/security/concurrency. Policy notes: checkpointRules apply only when meta/implementation-checkpoints.json defines the entry for this change; missing file/entry = disabled (gate must not require --task).",
@@ -45,8 +76,8 @@
45
76
  "inputs": ["test-scenarios", "verification-ledger"],
46
77
  "artifacts": ["test-reports", "verification-ledger"],
47
78
  "events": ["phase.start", "phase.end", "command", "verification"],
48
- "allowedInteractions": [],
49
- "capabilities": ["gate-begin", "gate-close", "test-guard", "ledger-record"]
79
+ "allowedInteractions": ["resource-intensive-test-confirmation"],
80
+ "capabilities": ["gate-begin", "gate-close", "test-guard", "ledger-record", "resource-safe-test-runner"]
50
81
  },
51
82
  "harness-review": {
52
83
  "phase": "review",
@@ -184,6 +215,7 @@
184
215
  },
185
216
  "interactionWhitelist": {
186
217
  "global": [],
218
+ "harness-test": ["resource-intensive-test-confirmation"],
187
219
  "harness-submit": ["merge-conflict-resolution"],
188
220
  "harness-plan": ["risk-confirmation"]
189
221
  },
@@ -20,7 +20,7 @@ disallowed-tools:
20
20
  - Bash(awk *)
21
21
  - Bash(curl *)
22
22
  ---
23
- <!-- generated by harness_deploy.py; core=305f32827cd4de18; overlay=java; agent=claude-code; do not edit -->
23
+ <!-- generated by harness_deploy.py; core=1627e6c5efeb0f1d; overlay=java; agent=claude-code; do not edit -->
24
24
  # harness-apidoc — 前端接口文档(Java overlay)
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=305f32827cd4de18; overlay=java; agent=claude-code; do not edit -->
23
+ <!-- generated by harness_deploy.py; core=1627e6c5efeb0f1d; overlay=java; 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=305f32827cd4de18; overlay=java; agent=claude-code; do not edit -->
23
+ <!-- generated by harness_deploy.py; core=1627e6c5efeb0f1d; overlay=java; 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=305f32827cd4de18; overlay=java; agent=claude-code; do not edit -->
23
+ <!-- generated by harness_deploy.py; core=1627e6c5efeb0f1d; overlay=java; agent=claude-code; do not edit -->
24
24
  # harness-knowledge-ingest
25
25
 
26
26
  从 `.harness/archive/**/reports/final/summary-data.json` 抽取项目知识,生成并维护本地 `.harness/knowledge/` 索引。