fix template, remove okr, use casan.*

This commit is contained in:
thanhnv
2026-07-18 16:45:31 +07:00
parent 0dfd1742d3
commit 13fae3e6c3
249 changed files with 4881 additions and 5702 deletions
@@ -21,6 +21,8 @@ import os
import subprocess
import sys
from project_manifest import load as load_project_manifest
# Plan-01: this script lives at <harness>/scripts/bash/; the harness root is two levels up.
_HARNESS = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", ".."))
@@ -51,6 +53,17 @@ def status_rc(env_key):
def main():
root, run_id, pack_dir = sys.argv[1:4]
try:
project = load_project_manifest(root)
domain_root = os.path.join(root, project["domain_root"])
requirements_path = os.path.join(root, project["requirements"])
feature_id = project["feature"]["id"]
except (OSError, ValueError):
domain_root = os.environ.get("CASAN_DOMAIN_ROOT", os.path.join(root, "apps/okr/domain"))
requirements_path = os.path.join(domain_root, "input", "requirement.md")
if not os.path.isfile(requirements_path):
requirements_path = os.path.join(domain_root, "input", "okr-requirement.md")
feature_id = "casan-demo"
os.makedirs(pack_dir, exist_ok=True)
logs = os.path.join(root, ".specify", "logs")
@@ -59,7 +72,7 @@ def main():
# H1 context
reports["h1-context-report.json"] = {
"harness": "H1-context", "run_id": run_id,
"context_yaml": os.path.exists(os.path.join(root, "docs/output/output_logs/casan-demo/pipeline-context.yaml")),
"context_yaml": os.path.exists(os.path.join(root, "docs/output/output_logs", feature_id, "pipeline-context.yaml")),
"note": "path/artifact validation performed by context-validate.sh at run time",
}
@@ -88,9 +101,9 @@ def main():
sys.executable,
traceability_script,
"--requirements",
os.path.join(root, "apps/okr/domain/input/okr-requirement.md"),
requirements_path,
"--map",
os.path.join(root, "apps/okr/domain/traceability-map.json"),
os.path.join(domain_root, "traceability-map.json"),
"--out",
traceability_out,
"--gate",
@@ -148,7 +161,7 @@ def main():
fp = json.load(open(fp_json, encoding="utf-8"))
except ValueError:
fp = None
vectors_path = os.path.join(root, "apps/okr/domain/corpus/redteam-vectors.jsonl")
vectors_path = os.path.join(domain_root, "corpus", "redteam-vectors.jsonl")
vectors = read_jsonl(vectors_path)
reports["redteam-result.json"] = {
"run_id": run_id, "vectors_defined": len(vectors),