From 9abf6a4691448594db59a4356d09dc78d50f07ea Mon Sep 17 00:00:00 2001 From: Tom Softreck Date: Tue, 1 Sep 2026 19:12:03 +0200 Subject: [PATCH 1/2] chore(todo2code): wire npm test CI via pyqual and koru policy Add scripts/ci-test.sh, pyqual pipeline, committed koru policy.yaml, regix.yaml, and .koru/topology.yaml so koru ci run executes unit tests before regix/redup gates. Gitignore keeps other .planfile/.koru cache local. Co-authored-by: Cursor --- .gitignore | 5 +++-- .koru/topology.yaml | 22 +++++++++++++++++++++ .planfile/.koru/policy.yaml | 21 ++++++++++++++++++++ pyqual.yaml | 12 ++++++++++++ regix.yaml | 38 +++++++++++++++++++++++++++++++++++++ scripts/ci-test.sh | 7 +++++++ 6 files changed, 103 insertions(+), 2 deletions(-) create mode 100644 .koru/topology.yaml create mode 100644 .planfile/.koru/policy.yaml create mode 100644 pyqual.yaml create mode 100644 regix.yaml create mode 100755 scripts/ci-test.sh diff --git a/.gitignore b/.gitignore index 9c422379..97d98412 100644 --- a/.gitignore +++ b/.gitignore @@ -368,8 +368,9 @@ _archive/ # Claude Code per-user settings .claude/auth.json -# Koru local runtime cache -.planfile/.koru/ +# Koru local runtime cache (keep policy.yaml in git for CI) +.planfile/.koru/* +!.planfile/.koru/policy.yaml # Hardcoded-duplicate scan artifacts (regenerate via make detect-hardcoded-duplicates) project/refactor/hardcoded-duplicates.* diff --git a/.koru/topology.yaml b/.koru/topology.yaml new file mode 100644 index 00000000..9bc09891 --- /dev/null +++ b/.koru/topology.yaml @@ -0,0 +1,22 @@ +schema_version: "1" +components: + regix: + enabled: true + kind: cli + role: quality + redup: + enabled: true + kind: cli + role: quality + testql: + enabled: false + kind: cli + role: e2e + vallm: + enabled: false + kind: cli + role: quality + sumr: + enabled: false + kind: cli + role: quality diff --git a/.planfile/.koru/policy.yaml b/.planfile/.koru/policy.yaml new file mode 100644 index 00000000..06b30a20 --- /dev/null +++ b/.planfile/.koru/policy.yaml @@ -0,0 +1,21 @@ +# todo2code — Koru agent policy (strict defaults; relax only via deliberate commit). + +llm: + allow_commit: false + allow_push: false + allow_branch_create: false + allow_branch_switch: false + allow_tag: false + allow_destructive_shell: false + require_planfile_lifecycle: true + require_ci_pass_before_complete: true + +ci: + command: | + set -euo pipefail + bash scripts/ci-test.sh + timeout_seconds: 900 + +notes: + - "Unit tests: bash scripts/ci-test.sh (npm run build && npm test)." + - "Full verify: npm run verify" diff --git a/pyqual.yaml b/pyqual.yaml new file mode 100644 index 00000000..6a1d9641 --- /dev/null +++ b/pyqual.yaml @@ -0,0 +1,12 @@ +pipeline: + name: todo2code-quality + + stages: + - name: test + run: bash scripts/ci-test.sh + timeout: 900 + + - name: regix + tool: regix + optional: true + timeout: 120 diff --git a/regix.yaml b/regix.yaml new file mode 100644 index 00000000..c61b1a79 --- /dev/null +++ b/regix.yaml @@ -0,0 +1,38 @@ +regix: + workdir: . + + gates: + hard: + cc: 20 + mi: 0 + coverage: 0 + length: 200 + docstring: 0 + quality: 0.0 + target: + cc: 12 + mi: 20 + coverage: 30 + length: 120 + docstring: 40 + quality: 0.50 + on_regression: warn + fail_exit_code: 1 + + exclude: + - "dist/*" + - "node_modules/*" + - "test/*" + - "tests/*" + - "docs/*" + - "examples/*" + - "evaluation/*" + - "scripts/*" + - ".governance/*" + - "python/*" + - "sdk/python/*" + + output: + format: rich + dir: .regix/ + show_improvements: true diff --git a/scripts/ci-test.sh b/scripts/ci-test.sh new file mode 100755 index 00000000..3e0efcf8 --- /dev/null +++ b/scripts/ci-test.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# Repo-local verify — used by pyqual.yaml and .planfile/.koru/policy.yaml. +set -euo pipefail +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +cd "$ROOT" +npm run build +npm test From a7708dfe609fb630205fda27205e12d295dbf607 Mon Sep 17 00:00:00 2001 From: Tom Softreck Date: Tue, 1 Sep 2026 19:32:13 +0200 Subject: [PATCH 2/2] chore(todo2code): extend pyqual CI pipeline with regix and redup stages Add single-iteration pyqual loop aligned with env2llm: npm test via ci-test.sh, regix gates, redup check and regix compare. Co-authored-by: Cursor --- pyqual.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pyqual.yaml b/pyqual.yaml index 6a1d9641..bf97bf91 100644 --- a/pyqual.yaml +++ b/pyqual.yaml @@ -1,12 +1,26 @@ pipeline: name: todo2code-quality + loop: + max_iterations: 1 + on_fail: report + stages: - name: test run: bash scripts/ci-test.sh timeout: 900 - - name: regix - tool: regix + - name: regix-gates + run: regix gates --workdir . + optional: true + timeout: 120 + + - name: redup-check + run: redup check . + optional: true + timeout: 120 + + - name: regix-compare + run: regix compare HEAD~1 HEAD optional: true timeout: 120