@hunter-harness/workflow-harness 0.2.13 → 0.2.15
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-run/reference.md +3 -1
- package/harness/bundles/general/claude-code/harness-submit/SKILL.md +2 -2
- package/harness/bundles/general/claude-code/harness-submit/checklist.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_archive.py +204 -0
- package/harness/bundles/general/claude-code/scripts/harness_change.py +310 -16
- package/harness/bundles/general/claude-code/scripts/harness_deploy.py +177 -0
- package/harness/bundles/general/claude-code/scripts/harness_events.py +113 -1
- package/harness/bundles/general/claude-code/scripts/harness_gate.py +57 -4
- package/harness/bundles/general/claude-code/scripts/harness_integration.py +67 -7
- package/harness/bundles/general/claude-code/scripts/harness_ledger.py +15 -3
- package/harness/bundles/general/claude-code/scripts/harness_plan_finalize.py +85 -0
- package/harness/bundles/general/claude-code/scripts/harness_preflight.py +193 -77
- package/harness/bundles/general/claude-code/scripts/harness_state.py +12 -4
- package/harness/bundles/general/claude-code/scripts/harness_test_guard.py +86 -13
- 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-run/reference.md +3 -1
- package/harness/bundles/general/codebuddy/harness-submit/SKILL.md +2 -2
- package/harness/bundles/general/codebuddy/harness-submit/checklist.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_archive.py +204 -0
- package/harness/bundles/general/codebuddy/scripts/harness_change.py +310 -16
- package/harness/bundles/general/codebuddy/scripts/harness_deploy.py +177 -0
- package/harness/bundles/general/codebuddy/scripts/harness_events.py +113 -1
- package/harness/bundles/general/codebuddy/scripts/harness_gate.py +57 -4
- package/harness/bundles/general/codebuddy/scripts/harness_integration.py +67 -7
- package/harness/bundles/general/codebuddy/scripts/harness_ledger.py +15 -3
- package/harness/bundles/general/codebuddy/scripts/harness_plan_finalize.py +85 -0
- package/harness/bundles/general/codebuddy/scripts/harness_preflight.py +193 -77
- package/harness/bundles/general/codebuddy/scripts/harness_state.py +12 -4
- package/harness/bundles/general/codebuddy/scripts/harness_test_guard.py +86 -13
- 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-run/reference.md +3 -1
- package/harness/bundles/general/codex/harness-submit/SKILL.md +2 -2
- package/harness/bundles/general/codex/harness-submit/checklist.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_archive.py +204 -0
- package/harness/bundles/general/codex/scripts/harness_change.py +310 -16
- package/harness/bundles/general/codex/scripts/harness_deploy.py +177 -0
- package/harness/bundles/general/codex/scripts/harness_events.py +113 -1
- package/harness/bundles/general/codex/scripts/harness_gate.py +57 -4
- package/harness/bundles/general/codex/scripts/harness_integration.py +67 -7
- package/harness/bundles/general/codex/scripts/harness_ledger.py +15 -3
- package/harness/bundles/general/codex/scripts/harness_plan_finalize.py +85 -0
- package/harness/bundles/general/codex/scripts/harness_preflight.py +193 -77
- package/harness/bundles/general/codex/scripts/harness_state.py +12 -4
- package/harness/bundles/general/codex/scripts/harness_test_guard.py +86 -13
- 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-run/reference.md +3 -1
- package/harness/bundles/general/cursor/harness-submit/SKILL.md +2 -2
- package/harness/bundles/general/cursor/harness-submit/checklist.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_archive.py +204 -0
- package/harness/bundles/general/cursor/scripts/harness_change.py +310 -16
- package/harness/bundles/general/cursor/scripts/harness_deploy.py +177 -0
- package/harness/bundles/general/cursor/scripts/harness_events.py +113 -1
- package/harness/bundles/general/cursor/scripts/harness_gate.py +57 -4
- package/harness/bundles/general/cursor/scripts/harness_integration.py +67 -7
- package/harness/bundles/general/cursor/scripts/harness_ledger.py +15 -3
- package/harness/bundles/general/cursor/scripts/harness_plan_finalize.py +85 -0
- package/harness/bundles/general/cursor/scripts/harness_preflight.py +193 -77
- package/harness/bundles/general/cursor/scripts/harness_state.py +12 -4
- package/harness/bundles/general/cursor/scripts/harness_test_guard.py +86 -13
- 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 +2 -2
- package/harness/bundles/java/claude-code/harness-submit/checklist.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_archive.py +204 -0
- package/harness/bundles/java/claude-code/scripts/harness_change.py +310 -16
- package/harness/bundles/java/claude-code/scripts/harness_deploy.py +177 -0
- package/harness/bundles/java/claude-code/scripts/harness_events.py +113 -1
- package/harness/bundles/java/claude-code/scripts/harness_gate.py +57 -4
- package/harness/bundles/java/claude-code/scripts/harness_integration.py +67 -7
- package/harness/bundles/java/claude-code/scripts/harness_ledger.py +15 -3
- package/harness/bundles/java/claude-code/scripts/harness_plan_finalize.py +85 -0
- package/harness/bundles/java/claude-code/scripts/harness_preflight.py +193 -77
- package/harness/bundles/java/claude-code/scripts/harness_state.py +12 -4
- package/harness/bundles/java/claude-code/scripts/harness_test_guard.py +86 -13
- 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 +2 -2
- package/harness/bundles/java/codebuddy/harness-submit/checklist.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_archive.py +204 -0
- package/harness/bundles/java/codebuddy/scripts/harness_change.py +310 -16
- package/harness/bundles/java/codebuddy/scripts/harness_deploy.py +177 -0
- package/harness/bundles/java/codebuddy/scripts/harness_events.py +113 -1
- package/harness/bundles/java/codebuddy/scripts/harness_gate.py +57 -4
- package/harness/bundles/java/codebuddy/scripts/harness_integration.py +67 -7
- package/harness/bundles/java/codebuddy/scripts/harness_ledger.py +15 -3
- package/harness/bundles/java/codebuddy/scripts/harness_plan_finalize.py +85 -0
- package/harness/bundles/java/codebuddy/scripts/harness_preflight.py +193 -77
- package/harness/bundles/java/codebuddy/scripts/harness_state.py +12 -4
- package/harness/bundles/java/codebuddy/scripts/harness_test_guard.py +86 -13
- 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 +2 -2
- package/harness/bundles/java/codex/harness-submit/checklist.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_archive.py +204 -0
- package/harness/bundles/java/codex/scripts/harness_change.py +310 -16
- package/harness/bundles/java/codex/scripts/harness_deploy.py +177 -0
- package/harness/bundles/java/codex/scripts/harness_events.py +113 -1
- package/harness/bundles/java/codex/scripts/harness_gate.py +57 -4
- package/harness/bundles/java/codex/scripts/harness_integration.py +67 -7
- package/harness/bundles/java/codex/scripts/harness_ledger.py +15 -3
- package/harness/bundles/java/codex/scripts/harness_plan_finalize.py +85 -0
- package/harness/bundles/java/codex/scripts/harness_preflight.py +193 -77
- package/harness/bundles/java/codex/scripts/harness_state.py +12 -4
- package/harness/bundles/java/codex/scripts/harness_test_guard.py +86 -13
- 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 +2 -2
- package/harness/bundles/java/cursor/harness-submit/checklist.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_archive.py +204 -0
- package/harness/bundles/java/cursor/scripts/harness_change.py +310 -16
- package/harness/bundles/java/cursor/scripts/harness_deploy.py +177 -0
- package/harness/bundles/java/cursor/scripts/harness_events.py +113 -1
- package/harness/bundles/java/cursor/scripts/harness_gate.py +57 -4
- package/harness/bundles/java/cursor/scripts/harness_integration.py +67 -7
- package/harness/bundles/java/cursor/scripts/harness_ledger.py +15 -3
- package/harness/bundles/java/cursor/scripts/harness_plan_finalize.py +85 -0
- package/harness/bundles/java/cursor/scripts/harness_preflight.py +193 -77
- package/harness/bundles/java/cursor/scripts/harness_state.py +12 -4
- package/harness/bundles/java/cursor/scripts/harness_test_guard.py +86 -13
- package/harness/manifests/general/claude-code.json +25 -25
- package/harness/manifests/general/codebuddy.json +25 -25
- package/harness/manifests/general/codex.json +25 -25
- package/harness/manifests/general/cursor.json +25 -25
- package/harness/manifests/java/claude-code.json +26 -26
- package/harness/manifests/java/codebuddy.json +26 -26
- package/harness/manifests/java/codex.json +26 -26
- package/harness/manifests/java/cursor.json +26 -26
- package/hunter-workflow-family.json +2 -2
- package/package.json +15 -15
|
@@ -177,6 +177,82 @@ def _terminal_exists(change_dir: Path, run_id: str, attempt: int) -> bool:
|
|
|
177
177
|
)
|
|
178
178
|
|
|
179
179
|
|
|
180
|
+
def _read_design_capabilities(staging: Path, change_name: str) -> list[str]:
|
|
181
|
+
"""Read capabilities from design frontmatter (retro §5.4)."""
|
|
182
|
+
design_path = staging / "spec" / f"{change_name}-design.md"
|
|
183
|
+
if not design_path.is_file():
|
|
184
|
+
return []
|
|
185
|
+
try:
|
|
186
|
+
text = design_path.read_text(encoding="utf-8-sig")
|
|
187
|
+
except OSError:
|
|
188
|
+
return []
|
|
189
|
+
frontmatter = _frontmatter(text)
|
|
190
|
+
if not frontmatter:
|
|
191
|
+
return []
|
|
192
|
+
raw = frontmatter.get("capabilities") or ""
|
|
193
|
+
if not raw:
|
|
194
|
+
return []
|
|
195
|
+
# capabilities may be comma-separated or YAML list
|
|
196
|
+
if raw.startswith("["):
|
|
197
|
+
try:
|
|
198
|
+
parsed = json.loads(raw)
|
|
199
|
+
if isinstance(parsed, list):
|
|
200
|
+
return [str(c) for c in parsed if isinstance(c, str)]
|
|
201
|
+
except json.JSONDecodeError:
|
|
202
|
+
pass
|
|
203
|
+
return [c.strip() for c in raw.split(",") if c.strip()]
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
def _reclassify_gate_policy(
|
|
207
|
+
staging: Path,
|
|
208
|
+
change_name: str,
|
|
209
|
+
) -> dict[str, Any]:
|
|
210
|
+
"""Reclassify gate policy based on approved design capabilities (retro §5.4).
|
|
211
|
+
|
|
212
|
+
Reads design frontmatter `capabilities`, invokes harness_gate.py classify
|
|
213
|
+
to recompute the gate DAG, and updates staging/meta/gate-policy.json.
|
|
214
|
+
Returns {"ok": bool, "capabilities": [...], "drift": bool}.
|
|
215
|
+
"""
|
|
216
|
+
capabilities = _read_design_capabilities(staging, change_name)
|
|
217
|
+
if not capabilities:
|
|
218
|
+
return {"ok": True, "capabilities": [], "drift": False, "updated": False}
|
|
219
|
+
|
|
220
|
+
gate_policy_path = staging / "meta" / "gate-policy.json"
|
|
221
|
+
try:
|
|
222
|
+
existing = json.loads(gate_policy_path.read_text(encoding="utf-8-sig"))
|
|
223
|
+
except (OSError, json.JSONDecodeError):
|
|
224
|
+
existing = {}
|
|
225
|
+
|
|
226
|
+
existing_caps = set(existing.get("capabilities") or [])
|
|
227
|
+
design_caps = set(capabilities)
|
|
228
|
+
drift = existing_caps != design_caps
|
|
229
|
+
|
|
230
|
+
if drift:
|
|
231
|
+
# Update gate-policy.json with design capabilities
|
|
232
|
+
existing["capabilities"] = sorted(design_caps)
|
|
233
|
+
try:
|
|
234
|
+
gate_policy_path.write_text(
|
|
235
|
+
json.dumps(existing, ensure_ascii=False, indent=2) + "\n",
|
|
236
|
+
encoding="utf-8",
|
|
237
|
+
newline="\n",
|
|
238
|
+
)
|
|
239
|
+
except OSError as exc:
|
|
240
|
+
return {
|
|
241
|
+
"ok": False,
|
|
242
|
+
"error": f"failed to update gate-policy.json: {exc}",
|
|
243
|
+
"capabilities": capabilities,
|
|
244
|
+
"drift": True,
|
|
245
|
+
"updated": False,
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
return {
|
|
249
|
+
"ok": True,
|
|
250
|
+
"capabilities": sorted(design_caps),
|
|
251
|
+
"drift": drift,
|
|
252
|
+
"updated": drift,
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
|
|
180
256
|
def _append_terminal(change_dir: Path, run_id: str, attempt: int) -> tuple[int, str]:
|
|
181
257
|
stdout = io.StringIO()
|
|
182
258
|
stderr = io.StringIO()
|
|
@@ -214,6 +290,15 @@ def finalize_plan(
|
|
|
214
290
|
) -> dict[str, Any]:
|
|
215
291
|
change_dir = change_dir.resolve()
|
|
216
292
|
staging = staging.resolve()
|
|
293
|
+
|
|
294
|
+
# C2 (retro §5.4): reclassify gate policy based on approved design capabilities.
|
|
295
|
+
# This updates staging/meta/gate-policy.json before validation, so the hash
|
|
296
|
+
# reflects the final gate policy. Drift between design capabilities and
|
|
297
|
+
# gate-policy capabilities is resolved in favor of the approved design.
|
|
298
|
+
reclassify = _reclassify_gate_policy(staging, change_name)
|
|
299
|
+
if not reclassify.get("ok"):
|
|
300
|
+
return _result_error("CAPABILITY_GATE_DRIFT", reclassify.get("error", "reclassify failed"))
|
|
301
|
+
|
|
217
302
|
validation = validate_staging(staging, change_name)
|
|
218
303
|
if not validation["ok"]:
|
|
219
304
|
return validation
|
|
@@ -29,6 +29,7 @@ if hasattr(sys.stderr, "reconfigure"):
|
|
|
29
29
|
sys.stderr.reconfigure(encoding="utf-8")
|
|
30
30
|
|
|
31
31
|
|
|
32
|
+
import harness_change as hc # noqa: E402
|
|
32
33
|
import harness_profile as hprof # noqa: E402
|
|
33
34
|
|
|
34
35
|
|
|
@@ -69,6 +70,52 @@ def cmd_check(project: Path) -> dict[str, Any]:
|
|
|
69
70
|
return result
|
|
70
71
|
|
|
71
72
|
|
|
73
|
+
def check_concurrency(project: Path) -> dict[str, Any]:
|
|
74
|
+
"""Report the configured concurrency mode and active Change landscape.
|
|
75
|
+
|
|
76
|
+
Retro §5.2: preflight must surface concurrencyMode, activeChanges, and
|
|
77
|
+
allowedParallelLevels so agents don't have to guess whether parallel
|
|
78
|
+
Changes are supported.
|
|
79
|
+
"""
|
|
80
|
+
mode = hc.read_concurrency_mode(project)
|
|
81
|
+
active = hc.list_active_changes(project)
|
|
82
|
+
shared_conflicts: list[dict[str, Any]] = []
|
|
83
|
+
# In isolated-multi-active, surface any shared-state conflicts (e.g. same
|
|
84
|
+
# worktree path) so callers know isolation is incomplete.
|
|
85
|
+
if mode == "isolated-multi-active" and len(active) > 1:
|
|
86
|
+
seen_worktrees: dict[str, str] = {}
|
|
87
|
+
for entry in active:
|
|
88
|
+
change_dir = Path(entry["path"])
|
|
89
|
+
worktree_meta = change_dir / "meta" / "worktree.json"
|
|
90
|
+
if not worktree_meta.is_file():
|
|
91
|
+
continue
|
|
92
|
+
try:
|
|
93
|
+
meta = json.loads(worktree_meta.read_text(encoding="utf-8"))
|
|
94
|
+
except (OSError, json.JSONDecodeError):
|
|
95
|
+
continue
|
|
96
|
+
wt = meta.get("path") if isinstance(meta, dict) else None
|
|
97
|
+
if isinstance(wt, str) and wt:
|
|
98
|
+
if wt in seen_worktrees:
|
|
99
|
+
shared_conflicts.append({
|
|
100
|
+
"kind": "worktree",
|
|
101
|
+
"path": wt,
|
|
102
|
+
"changes": [seen_worktrees[wt], entry["changeId"]],
|
|
103
|
+
})
|
|
104
|
+
else:
|
|
105
|
+
seen_worktrees[wt] = entry["changeId"]
|
|
106
|
+
levels = ["change-internal"] if mode == "single-active" else [
|
|
107
|
+
"change-internal",
|
|
108
|
+
"multi-change",
|
|
109
|
+
]
|
|
110
|
+
return {
|
|
111
|
+
"ok": True,
|
|
112
|
+
"concurrencyMode": mode,
|
|
113
|
+
"activeChanges": active,
|
|
114
|
+
"sharedStateConflicts": shared_conflicts,
|
|
115
|
+
"allowedParallelLevels": levels,
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
|
|
72
119
|
# ---------------------------------------------------------------------------
|
|
73
120
|
# record-quirk — 适配 v2 commands(source=user override)
|
|
74
121
|
# ---------------------------------------------------------------------------
|
|
@@ -320,10 +367,41 @@ def _resolve_agents_root(skills_root: Path, agents_root: Path | None) -> tuple[P
|
|
|
320
367
|
if skills_root.name == "skills" and skills_root.parent.name in (".claude", ".codebuddy"):
|
|
321
368
|
return (skills_root.parent / "agents").resolve(), None
|
|
322
369
|
if skills_root.name == "skills" and skills_root.parent.name in (".agents", ".cursor"):
|
|
323
|
-
|
|
370
|
+
# These adapters (Codex/Cursor) may provide agent roles via host
|
|
371
|
+
# capability manifest rather than local .md files. Return None without
|
|
372
|
+
# a hard error; the caller checks runtime.json for host capabilities.
|
|
373
|
+
return None, None
|
|
324
374
|
return (skills_root / "agents").resolve(), None
|
|
325
375
|
|
|
326
376
|
|
|
377
|
+
def _read_host_capabilities(skills_root: Path) -> set[str]:
|
|
378
|
+
"""Read agent capabilities declared by the host adapter (retro §5.3).
|
|
379
|
+
|
|
380
|
+
Adapter installs may declare available agent roles in
|
|
381
|
+
`meta/runtime.json` under `agentCapabilities` (list of role names).
|
|
382
|
+
Returns an empty set if the file or field is absent.
|
|
383
|
+
"""
|
|
384
|
+
# runtime.json lives in the change's meta/ dir, but agent capabilities are
|
|
385
|
+
# project-level. Check the adapter's runtime.json at the project root.
|
|
386
|
+
candidates = [
|
|
387
|
+
skills_root.parent / "runtime.json",
|
|
388
|
+
skills_root / "runtime.json",
|
|
389
|
+
]
|
|
390
|
+
for path in candidates:
|
|
391
|
+
if not path.is_file():
|
|
392
|
+
continue
|
|
393
|
+
try:
|
|
394
|
+
data = json.loads(path.read_text(encoding="utf-8-sig"))
|
|
395
|
+
except (OSError, json.JSONDecodeError):
|
|
396
|
+
continue
|
|
397
|
+
if not isinstance(data, dict):
|
|
398
|
+
continue
|
|
399
|
+
caps = data.get("agentCapabilities")
|
|
400
|
+
if isinstance(caps, list):
|
|
401
|
+
return {str(c) for c in caps if isinstance(c, str)}
|
|
402
|
+
return set()
|
|
403
|
+
|
|
404
|
+
|
|
327
405
|
def cmd_check_agents(
|
|
328
406
|
skills_root: Path,
|
|
329
407
|
agent: str,
|
|
@@ -341,98 +419,136 @@ def cmd_check_agents(
|
|
|
341
419
|
"reason": "agent name is empty",
|
|
342
420
|
}
|
|
343
421
|
|
|
344
|
-
resolved_agents_root,
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
422
|
+
resolved_agents_root, _ = _resolve_agents_root(skills_root, agents_root)
|
|
423
|
+
host_capabilities = _read_host_capabilities(skills_root)
|
|
424
|
+
host_callable = agent_name in host_capabilities
|
|
425
|
+
|
|
426
|
+
# Three independent fields (retro §5.3):
|
|
427
|
+
# - definitionPresent: local .md file exists
|
|
428
|
+
# - hostCallable: host adapter declares this agent role
|
|
429
|
+
# - toolContractValid: tools declaration is valid (non-empty list)
|
|
430
|
+
definition_present = False
|
|
431
|
+
tool_contract_valid = False
|
|
432
|
+
agent_path: Path | None = None
|
|
433
|
+
meta: dict[str, Any] | None = None
|
|
434
|
+
|
|
435
|
+
if resolved_agents_root is not None:
|
|
436
|
+
filename = agent_name if agent_name.endswith(".md") else f"{agent_name}.md"
|
|
437
|
+
agent_path = resolved_agents_root / filename
|
|
438
|
+
definition_present = agent_path.is_file()
|
|
439
|
+
|
|
440
|
+
# If no local definition and host doesn't declare the role, we can't
|
|
441
|
+
# determine usability. Distinguish "host says no" from "unknown".
|
|
442
|
+
if not definition_present and not host_callable:
|
|
443
|
+
# Check if this adapter is known to not support custom agents
|
|
444
|
+
adapter_name = skills_root.parent.name
|
|
445
|
+
if adapter_name in (".agents", ".cursor"):
|
|
446
|
+
# Codex/Cursor: may support via host manifest. If runtime.json
|
|
447
|
+
# has agentCapabilities but this role isn't listed, it's a
|
|
448
|
+
# genuine "not available". If no agentCapabilities field at all,
|
|
449
|
+
# we can't know — return UNKNOWN.
|
|
450
|
+
runtime_path = skills_root.parent / "runtime.json"
|
|
451
|
+
if not runtime_path.is_file():
|
|
452
|
+
return {
|
|
453
|
+
"ok": True,
|
|
454
|
+
"action": "check-agents",
|
|
455
|
+
"agent": agent_name,
|
|
456
|
+
"usable": False,
|
|
457
|
+
"definitionPresent": False,
|
|
458
|
+
"hostCallable": False,
|
|
459
|
+
"toolContractValid": False,
|
|
460
|
+
"reasonCode": "UNKNOWN",
|
|
461
|
+
"reason": (
|
|
462
|
+
"no local agent definition and no host capability manifest; "
|
|
463
|
+
"cannot determine agent availability"
|
|
464
|
+
),
|
|
465
|
+
}
|
|
363
466
|
return {
|
|
364
467
|
"ok": False,
|
|
365
468
|
"action": "check-agents",
|
|
366
469
|
"agent": agent_name,
|
|
367
|
-
"path": str(agent_path),
|
|
368
|
-
"agentsRoot": str(resolved_agents_root),
|
|
470
|
+
"path": str(agent_path) if agent_path else None,
|
|
471
|
+
"agentsRoot": str(resolved_agents_root) if resolved_agents_root else None,
|
|
369
472
|
"usable": False,
|
|
370
|
-
"
|
|
371
|
-
"
|
|
473
|
+
"definitionPresent": False,
|
|
474
|
+
"hostCallable": False,
|
|
475
|
+
"toolContractValid": False,
|
|
372
476
|
"reasonCode": "AGENT_DEFINITION_NOT_FOUND",
|
|
373
|
-
"reason": f"agent file not found: {
|
|
477
|
+
"reason": f"agent file not found and host does not declare role: {agent_name}",
|
|
374
478
|
}
|
|
375
479
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
480
|
+
# If definition present, validate frontmatter and tools
|
|
481
|
+
if definition_present and agent_path is not None:
|
|
482
|
+
try:
|
|
483
|
+
text = agent_path.read_text(encoding="utf-8")
|
|
484
|
+
except OSError as exc:
|
|
485
|
+
return {
|
|
486
|
+
"ok": False,
|
|
487
|
+
"action": "check-agents",
|
|
488
|
+
"agent": agent_name,
|
|
489
|
+
"path": str(agent_path),
|
|
490
|
+
"usable": False,
|
|
491
|
+
"definitionPresent": True,
|
|
492
|
+
"hostCallable": host_callable,
|
|
493
|
+
"toolContractValid": False,
|
|
494
|
+
"reason": f"cannot read agent file: {exc}",
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
meta, err = parse_frontmatter(text)
|
|
498
|
+
if err or meta is None:
|
|
499
|
+
return {
|
|
500
|
+
"ok": False,
|
|
501
|
+
"action": "check-agents",
|
|
502
|
+
"agent": agent_name,
|
|
503
|
+
"path": str(agent_path),
|
|
504
|
+
"usable": False,
|
|
505
|
+
"definitionPresent": True,
|
|
506
|
+
"hostCallable": host_callable,
|
|
507
|
+
"toolContractValid": False,
|
|
508
|
+
"reason": f"frontmatter parse failed: {err or 'unknown'}",
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
tools = meta.get("tools")
|
|
512
|
+
if tools is None:
|
|
513
|
+
tool_contract_valid = False
|
|
514
|
+
elif isinstance(tools, list) and len(tools) > 0:
|
|
515
|
+
tool_contract_valid = True
|
|
516
|
+
else:
|
|
517
|
+
tool_contract_valid = False
|
|
387
518
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
"agent": agent_name,
|
|
394
|
-
"path": str(agent_path),
|
|
395
|
-
"usable": False,
|
|
396
|
-
"reason": f"frontmatter parse failed: {err or 'unknown'}",
|
|
397
|
-
}
|
|
519
|
+
# usable = hostCallable (host provides the agent role, tools validated by host)
|
|
520
|
+
# OR definitionPresent AND toolContractValid (definition-based adapters)
|
|
521
|
+
usable = host_callable or (
|
|
522
|
+
definition_present and tool_contract_valid
|
|
523
|
+
)
|
|
398
524
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
"path": str(agent_path),
|
|
406
|
-
"usable": False,
|
|
407
|
-
"reason": "tools declaration missing",
|
|
408
|
-
"frontmatter": meta,
|
|
409
|
-
}
|
|
410
|
-
if not isinstance(tools, list) or len(tools) == 0:
|
|
411
|
-
return {
|
|
412
|
-
"ok": False,
|
|
413
|
-
"action": "check-agents",
|
|
414
|
-
"agent": agent_name,
|
|
415
|
-
"path": str(agent_path),
|
|
416
|
-
"usable": False,
|
|
417
|
-
"reason": "tools declaration empty or invalid",
|
|
418
|
-
"frontmatter": meta,
|
|
419
|
-
}
|
|
525
|
+
name_field = meta.get("name") if meta else None
|
|
526
|
+
tools_field = meta.get("tools") if meta else None
|
|
527
|
+
|
|
528
|
+
reason_code = "READY" if usable else "AGENT_DEFINITION_NOT_FOUND"
|
|
529
|
+
if not definition_present and host_callable:
|
|
530
|
+
reason_code = "DEFINITION_NOT_FOUND_HOST_CAPABLE"
|
|
420
531
|
|
|
421
|
-
name_field = meta.get("name")
|
|
422
532
|
return {
|
|
423
533
|
"ok": True,
|
|
424
534
|
"action": "check-agents",
|
|
425
535
|
"agent": agent_name,
|
|
426
|
-
"path": str(agent_path),
|
|
427
|
-
"agentsRoot": str(resolved_agents_root),
|
|
428
|
-
"usable":
|
|
429
|
-
"
|
|
430
|
-
"
|
|
431
|
-
"
|
|
432
|
-
"
|
|
536
|
+
"path": str(agent_path) if agent_path else None,
|
|
537
|
+
"agentsRoot": str(resolved_agents_root) if resolved_agents_root else None,
|
|
538
|
+
"usable": usable,
|
|
539
|
+
"definitionPresent": definition_present,
|
|
540
|
+
"hostCallable": host_callable,
|
|
541
|
+
"toolContractValid": tool_contract_valid,
|
|
542
|
+
"reasonCode": reason_code,
|
|
543
|
+
"reason": (
|
|
544
|
+
"agent available; "
|
|
545
|
+
f"definition={'present' if definition_present else 'absent'}, "
|
|
546
|
+
f"hostCallable={host_callable}, "
|
|
547
|
+
f"tools={'valid' if tool_contract_valid else 'invalid'}"
|
|
548
|
+
),
|
|
433
549
|
"name": name_field,
|
|
434
|
-
"tools":
|
|
435
|
-
"frontmatterKeys": sorted(meta.keys()),
|
|
550
|
+
"tools": tools_field,
|
|
551
|
+
"frontmatterKeys": sorted(meta.keys()) if meta else [],
|
|
436
552
|
}
|
|
437
553
|
|
|
438
554
|
|
|
@@ -268,6 +268,7 @@ def capture_current_state(
|
|
|
268
268
|
changed: list[str] = []
|
|
269
269
|
baseline_created = previous is None
|
|
270
270
|
unresolved: list[str] = []
|
|
271
|
+
unresolved_reasons: list[dict[str, str]] = []
|
|
271
272
|
if previous:
|
|
272
273
|
old_segments = previous.get("segments") or {}
|
|
273
274
|
for name, segment in fresh["segments"].items():
|
|
@@ -276,13 +277,17 @@ def capture_current_state(
|
|
|
276
277
|
segment["capturedAt"] = old.get("capturedAt", segment["capturedAt"])
|
|
277
278
|
else:
|
|
278
279
|
changed.append(name)
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
280
|
+
# First observation establishes the baseline; it is not evidence that
|
|
281
|
+
# segments changed, nor that they are "unresolved". Segments are only
|
|
282
|
+
# unresolved when they genuinely fail to read/compute (retro §5.6).
|
|
283
|
+
# On first capture, all successfully-captured segments are baseline,
|
|
284
|
+
# not unresolved.
|
|
283
285
|
fresh["baselineCreated"] = baseline_created
|
|
284
286
|
fresh["changedSegments"] = sorted(changed)
|
|
285
287
|
fresh["unresolvedSegments"] = unresolved
|
|
288
|
+
fresh["unresolvedReasons"] = unresolved_reasons
|
|
289
|
+
fresh["comparisonAvailable"] = not baseline_created
|
|
290
|
+
fresh["baselineStatus"] = "created" if baseline_created else "reused"
|
|
286
291
|
write_snapshot(change_dir, fresh)
|
|
287
292
|
return fresh, changed
|
|
288
293
|
|
|
@@ -325,7 +330,10 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
325
330
|
- set(snapshot.get("unresolvedSegments") or [])
|
|
326
331
|
),
|
|
327
332
|
"baselineCreated": bool(snapshot.get("baselineCreated")),
|
|
333
|
+
"baselineStatus": snapshot.get("baselineStatus", "reused"),
|
|
334
|
+
"comparisonAvailable": bool(snapshot.get("comparisonAvailable", True)),
|
|
328
335
|
"unresolvedSegments": list(snapshot.get("unresolvedSegments") or []),
|
|
336
|
+
"unresolvedReasons": list(snapshot.get("unresolvedReasons") or []),
|
|
329
337
|
"git": snapshot["git"],
|
|
330
338
|
}
|
|
331
339
|
if args.json:
|
|
@@ -448,9 +448,18 @@ def _validate_existing_manifest(
|
|
|
448
448
|
tracked_now = _git(
|
|
449
449
|
project, "ls-files", "--error-unmatch", "--", rel
|
|
450
450
|
).returncode == 0
|
|
451
|
-
|
|
451
|
+
checkpointed = not item["trackedBefore"] and tracked_now
|
|
452
|
+
if (
|
|
453
|
+
item["trackedBefore"] != tracked_now and not checkpointed
|
|
454
|
+
) or (
|
|
455
|
+
item["ignored"] != ignored_now and not checkpointed
|
|
456
|
+
):
|
|
452
457
|
return "MANIFEST_INVALID", {}
|
|
453
|
-
|
|
458
|
+
normalized_item = dict(item)
|
|
459
|
+
if checkpointed:
|
|
460
|
+
normalized_item["trackedBefore"] = True
|
|
461
|
+
normalized_item["ignored"] = ignored_now
|
|
462
|
+
validated[rel] = normalized_item
|
|
454
463
|
return None, validated
|
|
455
464
|
|
|
456
465
|
|
|
@@ -734,11 +743,26 @@ def _stage_locked(
|
|
|
734
743
|
error, entries = validator(project_root, manifest, require_files=True)
|
|
735
744
|
if error:
|
|
736
745
|
return _result(False, action, error, [])
|
|
737
|
-
rels = [
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
746
|
+
rels: list[str] = []
|
|
747
|
+
for rel, entry in entries.items():
|
|
748
|
+
if is_v2:
|
|
749
|
+
if entry.get("commitScope") == "current-change":
|
|
750
|
+
rels.append(rel)
|
|
751
|
+
continue
|
|
752
|
+
if not entry["trackedBefore"]:
|
|
753
|
+
rels.append(rel)
|
|
754
|
+
continue
|
|
755
|
+
changed = _git(project_root, "diff", "--quiet", "HEAD", "--", rel)
|
|
756
|
+
if changed.returncode == 1:
|
|
757
|
+
rels.append(rel)
|
|
758
|
+
elif changed.returncode != 0:
|
|
759
|
+
return _result(
|
|
760
|
+
False,
|
|
761
|
+
action,
|
|
762
|
+
"GIT_DIFF_FAILED",
|
|
763
|
+
[rel],
|
|
764
|
+
error=changed.stderr.strip(),
|
|
765
|
+
)
|
|
742
766
|
if not rels:
|
|
743
767
|
return _result(True, action, "STAGED", [])
|
|
744
768
|
|
|
@@ -925,9 +949,22 @@ def close(project: Path | str, change_dir: Path | str) -> dict[str, Any]:
|
|
|
925
949
|
if (
|
|
926
950
|
not isinstance(snapshot, dict)
|
|
927
951
|
or snapshot.get("schemaVersion") != SCHEMA_VERSION
|
|
928
|
-
or snapshot.get("projectRoot") != str(project_root)
|
|
929
952
|
):
|
|
930
953
|
return _result(False, action, "SNAPSHOT_INVALID", [])
|
|
954
|
+
# Execution-root contract (retro §5.10): a snapshot captured against a
|
|
955
|
+
# different project root must fail with EXECUTION_ROOT_MISMATCH before
|
|
956
|
+
# the generic SNAPSHOT_INVALID, so callers can distinguish "wrong root"
|
|
957
|
+
# from "corrupt snapshot".
|
|
958
|
+
snapshot_root = snapshot.get("projectRoot")
|
|
959
|
+
if snapshot_root is not None and snapshot_root != str(project_root):
|
|
960
|
+
return _result(
|
|
961
|
+
False,
|
|
962
|
+
action,
|
|
963
|
+
"EXECUTION_ROOT_MISMATCH",
|
|
964
|
+
[],
|
|
965
|
+
expectedRoot=snapshot_root,
|
|
966
|
+
actualRoot=str(project_root),
|
|
967
|
+
)
|
|
931
968
|
|
|
932
969
|
before_entries = snapshot.get("files")
|
|
933
970
|
if not isinstance(before_entries, list):
|
|
@@ -963,15 +1000,51 @@ def close(project: Path | str, change_dir: Path | str) -> dict[str, Any]:
|
|
|
963
1000
|
if before[rel]["sha256"] != digest:
|
|
964
1001
|
touched.append((rel, "test-updated"))
|
|
965
1002
|
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
1003
|
+
for reason in ("tdd-created", "test-updated"):
|
|
1004
|
+
rels = [rel for rel, item_reason in touched if item_reason == reason]
|
|
1005
|
+
if not rels:
|
|
1006
|
+
continue
|
|
1007
|
+
result = record(
|
|
1008
|
+
project_root,
|
|
1009
|
+
change_root,
|
|
1010
|
+
[str(project_root / rel) for rel in rels],
|
|
1011
|
+
reason,
|
|
1012
|
+
)
|
|
969
1013
|
if not result.get("ok"):
|
|
970
1014
|
code = result.get("code", "RECORD_FAILED")
|
|
971
1015
|
if code == "TEST_PATH_NOT_ALLOWED":
|
|
972
|
-
return _result(False, action, "UNCLASSIFIABLE_TEST",
|
|
1016
|
+
return _result(False, action, "UNCLASSIFIABLE_TEST", rels)
|
|
973
1017
|
return result
|
|
974
|
-
|
|
1018
|
+
|
|
1019
|
+
recorded = [rel for rel, _ in touched]
|
|
1020
|
+
|
|
1021
|
+
# Cross-check (retro §5.10): if the manifest has active entries for this
|
|
1022
|
+
# change but close computed recordedCount=0, the snapshot/manifest/diff
|
|
1023
|
+
# are inconsistent. Fail closed instead of silently returning success.
|
|
1024
|
+
manifest_path = _manifest_path(change_root)
|
|
1025
|
+
if manifest_path is not None and manifest_path.is_file():
|
|
1026
|
+
try:
|
|
1027
|
+
manifest = _read_json(manifest_path)
|
|
1028
|
+
except (OSError, json.JSONDecodeError):
|
|
1029
|
+
manifest = None
|
|
1030
|
+
if isinstance(manifest, dict):
|
|
1031
|
+
manifest_files = manifest.get("files")
|
|
1032
|
+
if isinstance(manifest_files, list):
|
|
1033
|
+
active_entries = [
|
|
1034
|
+
f for f in manifest_files
|
|
1035
|
+
if isinstance(f, dict)
|
|
1036
|
+
and f.get("reason") in ("tdd-created", "test-updated", "stale-test-repair")
|
|
1037
|
+
]
|
|
1038
|
+
if active_entries and not recorded:
|
|
1039
|
+
return _result(
|
|
1040
|
+
False,
|
|
1041
|
+
action,
|
|
1042
|
+
"MANIFEST_DIFF_HASH_MISMATCH",
|
|
1043
|
+
[],
|
|
1044
|
+
manifestEntries=len(active_entries),
|
|
1045
|
+
recordedCount=0,
|
|
1046
|
+
detail="manifest has active entries but close computed 0 recorded tests",
|
|
1047
|
+
)
|
|
975
1048
|
|
|
976
1049
|
return _result(
|
|
977
1050
|
True,
|
|
@@ -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=0e12e18a8a2b6489; 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=
|
|
23
|
+
<!-- generated by harness_deploy.py; core=0e12e18a8a2b6489; 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=
|
|
23
|
+
<!-- generated by harness_deploy.py; core=0e12e18a8a2b6489; 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=
|
|
23
|
+
<!-- generated by harness_deploy.py; core=0e12e18a8a2b6489; 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/` 索引。
|
|
@@ -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=0e12e18a8a2b6489; overlay=java; 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=0e12e18a8a2b6489; overlay=java; agent=claude-code; do not edit -->
|
|
24
24
|
# harness-package — 增量模块打包(Java overlay)
|
|
25
25
|
|
|
26
26
|
## Purpose
|