@surlymochan/evalid 0.0.0-stage → 0.4.1
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/CHANGELOG.md +94 -0
- package/LICENSE +21 -0
- package/README.md +315 -2
- package/RELEASE_NOTES.md +124 -0
- package/atoms/registry.json +758 -0
- package/bin/xflow.js +7261 -0
- package/docs/adoption/README.md +128 -0
- package/docs/adoption/openflow-release-hardening.md +61 -0
- package/docs/benchmark-openflow-vs-gstack-superpowers-openspec-2026-05-25.md +81 -0
- package/docs/compatibility.md +52 -0
- package/docs/competitive-benchmark.md +108 -0
- package/docs/corps-operator-guide.md +75 -0
- package/docs/demo-proof.md +126 -0
- package/docs/examples-gallery.md +115 -0
- package/docs/fixtures/tracker-item.json +7 -0
- package/docs/goal-vs-codex.md +129 -0
- package/docs/gstack-comparison.md +88 -0
- package/docs/install-upgrade.md +133 -0
- package/docs/integrations.md +49 -0
- package/docs/launch-demo.md +123 -0
- package/docs/launch-dossier.md +180 -0
- package/docs/methodology.md +149 -0
- package/docs/npm-publish-handoff.md +96 -0
- package/docs/openspec-migration.md +106 -0
- package/docs/public-benchmark.md +68 -0
- package/docs/public-release.md +145 -0
- package/docs/quality-assessment.md +139 -0
- package/docs/quickstart.md +156 -0
- package/docs/reviewer-guide.md +43 -0
- package/docs/spec-kit-benchmark.md +73 -0
- package/docs/super-assistant-comparison.md +106 -0
- package/docs/superpowers-comparison.md +82 -0
- package/docs/team-adoption.md +123 -0
- package/docs/tooling-matrix.md +91 -0
- package/docs/walkthrough.md +76 -0
- package/docs/workflow-manual.md +1130 -0
- package/package.json +83 -4
- package/prompts/pencil-draft.md +46 -0
- package/prompts/pencil-refine.md +46 -0
- package/prompts/phase-artifact.md +24 -0
- package/prompts/phase-execution.md +32 -0
- package/schemas/competitor-reconstruction-contract.schema.json +91 -0
- package/schemas/llm-design-review-aggregate.schema.json +83 -0
- package/schemas/visual-benchmark.schema.json +978 -0
- package/schemas/workflow.schema.json +100 -0
- package/scripts/run-tests.mjs +23 -0
- package/scripts/takein_digest.py +139 -0
- package/specs/README.md +118 -0
- package/specs/architecture.md +36 -0
- package/specs/product.md +33 -0
- package/specs/workflow.md +349 -0
- package/src/agent_team/atoms/codex-app-bridge.js +8 -0
- package/src/agent_team/atoms/design/competitor-reconstruction-review.js +44 -0
- package/src/agent_team/atoms/design/contract-freeze.js +8 -0
- package/src/agent_team/atoms/design/generation-contract.js +442 -0
- package/src/agent_team/atoms/design/reconstruction-pack.js +246 -0
- package/src/agent_team/atoms/design/reference-surface-lock.js +49 -0
- package/src/agent_team/atoms/patch-challenge.js +19 -0
- package/src/agent_team/atoms/pencil/accept.js +9 -0
- package/src/agent_team/atoms/pencil/draft.js +365 -0
- package/src/agent_team/atoms/pencil/refine.js +229 -0
- package/src/agent_team/atoms/phase-run-dispatch.js +8 -0
- package/src/agent_team/atoms/team-run.js +380 -0
- package/src/agent_team/atoms/visual/aesthetic-review.js +231 -0
- package/src/agent_team/atoms/visual/benchmark-repair-plan.js +291 -0
- package/src/agent_team/atoms/visual/benchmark.js +1652 -0
- package/src/agent_team/atoms/visual/design-selection.js +23 -0
- package/src/agent_team/atoms/visual/direction-synthesis.js +124 -0
- package/src/agent_team/atoms/visual/dom-rect-export.js +129 -0
- package/src/agent_team/atoms/visual/image-diff.js +186 -0
- package/src/agent_team/atoms/visual/layout-competition.js +8 -0
- package/src/agent_team/atoms/visual/page-evidence-capture.js +806 -0
- package/src/agent_team/atoms/visual/playwright-runtime.js +8 -0
- package/src/agent_team/atoms/visual/review-aggregate.js +87 -0
- package/src/agent_team/atoms/visual/review.js +77 -0
- package/src/agent_team/atoms/visual/visual-report.js +197 -0
- package/src/agent_team/atoms/visual/visual-token-export.js +417 -0
- package/src/agent_team/common.js +311 -0
- package/src/core/atoms/agent-invoke.js +684 -0
- package/src/core/atoms/event/ingest.js +30 -0
- package/src/core/atoms/experience/digest.js +55 -0
- package/src/core/atoms/gate/artifact-verify.js +83 -0
- package/src/core/atoms/gate/competitor-contract-validate.js +119 -0
- package/src/core/atoms/gate/evidence-collect.js +64 -0
- package/src/core/atoms/gate/payload-from-phase-run.js +78 -0
- package/src/core/atoms/gate/visual-benchmark-validate.js +183 -0
- package/src/core/atoms/gate/workbench.js +79 -0
- package/src/core/atoms/intake/classify.js +15 -0
- package/src/core/atoms/intake/design-skill-select.js +16 -0
- package/src/core/atoms/intake/preview-or-refine.js +19 -0
- package/src/core/atoms/intake/recommend.js +20 -0
- package/src/core/atoms/intake/research-same-category.js +19 -0
- package/src/core/atoms/intervention/create.js +30 -0
- package/src/core/atoms/memory/manage.js +27 -0
- package/src/core/atoms/memory/mount.js +13 -0
- package/src/core/atoms/mission/create.js +19 -0
- package/src/core/atoms/mission/list.js +14 -0
- package/src/core/atoms/mission/show.js +26 -0
- package/src/core/atoms/notify/checkpoint.js +46 -0
- package/src/core/atoms/phase-run/complete.js +42 -0
- package/src/core/atoms/phase-run/fail.js +40 -0
- package/src/core/atoms/phase-run/persist.js +39 -0
- package/src/core/atoms/phase-run/start.js +30 -0
- package/src/core/atoms/plugin/run.js +76 -0
- package/src/core/atoms/policy/gate.js +90 -0
- package/src/core/atoms/policy/resolve.js +11 -0
- package/src/core/atoms/storage/sync.js +57 -0
- package/src/core/atoms/workflow/advance.js +25 -0
- package/src/core/atoms/workflow/guard.js +127 -0
- package/src/core/atoms/workflow/state-load.js +37 -0
- package/src/core/bindings.js +37 -0
- package/src/core/change-artifacts.js +134 -0
- package/src/core/competitive-score.js +265 -0
- package/src/core/concurrency-policy.js +35 -0
- package/src/core/execution-log.js +108 -0
- package/src/core/intake-recommendation.js +134 -0
- package/src/core/memory-state.js +62 -0
- package/src/core/mission-state.js +780 -0
- package/src/core/pending-gates.js +66 -0
- package/src/core/phase-cost.js +116 -0
- package/src/core/phase-run-read.js +27 -0
- package/src/core/policy-overlay.js +180 -0
- package/src/core/state-store.js +201 -0
- package/src/core/workflow-executor.js +1014 -0
- package/src/core/workflow-integrity.js +111 -0
- package/src/core/workflow-loader.js +163 -0
- package/src/core/workflow-rerun.js +84 -0
- package/src/core/workflow-state.js +119 -0
- package/src/server.js +1307 -0
- package/workflows/corps.yaml +481 -0
- package/workflows/yolo.yaml +241 -0
- package/xflow/README.md +76 -0
- package/xflow/aha/SKILL.md +82 -0
- package/xflow/aha/scripts/append_aha.py +50 -0
- package/xflow/archive/scripts/archive_change.py +338 -0
- package/xflow/archive/templates/merge-design.md +54 -0
- package/xflow/archive/templates/merge-workflow.md +26 -0
- package/xflow/atoms/__init__.py +6 -0
- package/xflow/atoms/a1_issue_create_or_patch.py +70 -0
- package/xflow/atoms/a2_branch_create_and_link.py +42 -0
- package/xflow/atoms/a3_repo_doctor.py +11 -0
- package/xflow/atoms/a4_project_set_status.py +11 -0
- package/xflow/atoms/a5_archive_commit_push_close.py +11 -0
- package/xflow/atoms/a6_pr_create.py +72 -0
- package/xflow/atoms/b1_change_scaffold.py +11 -0
- package/xflow/atoms/b2_status_read.py +16 -0
- package/xflow/atoms/b2b_status_write.py +20 -0
- package/xflow/atoms/b3_status_transition.py +27 -0
- package/xflow/atoms/b4_handoff_scaffold_or_refresh.py +11 -0
- package/xflow/atoms/b5_aha_append.py +11 -0
- package/xflow/atoms/b6_takein_digest.py +11 -0
- package/xflow/atoms/b6b_lookback_digest.py +11 -0
- package/xflow/atoms/b7_change_mission_bind.py +43 -0
- package/xflow/atoms/c1_mem.py +54 -0
- package/xflow/atoms/e6_gate_local_precheck.py +23 -0
- package/xflow/atoms/h1_design_lite_gate.py +74 -0
- package/xflow/atoms/i6a_tdd_run.py +107 -0
- package/xflow/atoms/i6b_tdd_proof_validate.py +184 -0
- package/xflow/atoms/i6c_tdd_quality_review.py +372 -0
- package/xflow/atoms/j1_tests_run.py +129 -0
- package/xflow/atoms/j4a_spec_consistency_structural.py +105 -0
- package/xflow/atoms/j4b_spec_delta_review.py +316 -0
- package/xflow/atoms/j4c_openspec_migration_map.py +121 -0
- package/xflow/atoms/j4d_spec_clarify_gate.py +373 -0
- package/xflow/atoms/j6_cr_review.py +443 -0
- package/xflow/atoms/k1_artifacts_complete_check.py +39 -0
- package/xflow/atoms/k2_merge_snippets_apply.py +11 -0
- package/xflow/atoms/k3_handoff_refresh.py +14 -0
- package/xflow/atoms/k4_mem_lesson_persist.py +65 -0
- package/xflow/atoms/k5_archive_publish.py +21 -0
- package/xflow/atoms/k6_aha_merge.py +42 -0
- package/xflow/atoms/tdd_lib.py +956 -0
- package/xflow/corps/SKILL.md +109 -0
- package/xflow/exec/scripts/set_issue_in_progress.py +159 -0
- package/xflow/goal/SKILL.md +150 -0
- package/xflow/handoff/SKILL.md +95 -0
- package/xflow/handoff/scripts/scaffold_handoff.py +304 -0
- package/xflow/lookback/SKILL.md +66 -0
- package/xflow/lookback/scripts/lookback_digest.py +46 -0
- package/xflow/openissue/scripts/open_issue_flow.py +438 -0
- package/xflow/plan/SKILL.md +47 -0
- package/xflow/ralph/SKILL.md +123 -0
- package/xflow/scripts/check_installed_xflow_skill_sync.sh +44 -0
- package/xflow/scripts/common.py +483 -0
- package/xflow/scripts/doctor.py +278 -0
- package/xflow/scripts/sync_installed_xflow_skill.sh +134 -0
- package/xflow/takein/SKILL.md +81 -0
- package/xflow/takein/scripts/takein_digest.py +88 -0
- package/xflow/yolo/SKILL.md +75 -0
- package/xflow/yolo/scripts/scaffold_specs_change.py +673 -0
- package/xflow/yolo/scripts/yolo_gate.py +312 -0
- package/xflow/yolo/templates/DESIGN.md +179 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. Detailed notes live in
|
|
4
|
+
[RELEASE_NOTES.md](RELEASE_NOTES.md).
|
|
5
|
+
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
## [0.4.1] - 2026-11-06
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **TDD gate counts skipped/todo tests again on Node 24**: the gate parsed skip/todo counts only from the TAP reporter's `# skipped / # todo` summary lines, but Node 24's built-in runner defaults to the spec reporter when piped, whose summary lines carry a `ℹ` marker — an all-skipped/todo run exited 0, parsed as zero skips, and was waved through as green. The parser now reads the runner's summary block in both reporter formats (anchored to the summary lines, gated on the full node signature), and fails closed: a node summary whose gate counts cannot be fully parsed classifies as `counts_unknown` and is rejected by proof validation (`tests_counts_unknown`) instead of reading as zero skipped.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- **Phase cost evidence on every run (issue #5 P1-1)**: the per-phase timing/token report (`src/core/phase-cost.js`, landed in 0.3.0) now also rides on the `workflow_failed` execution-log event — a run that stops mid-way still reports where its time and tokens went — and is persisted as a standalone artifact at `.as-xflow/phase-cost.json` on both completion and failure, so the breakdown is readable without mining the ndjson execution log. Acceptance rerun on the SWE-bench cells stays pending the benchmark environment; the accounting structure (phase sum vs wall clock within 5%) is covered by `test/phase-cost.test.js`.
|
|
15
|
+
|
|
16
|
+
## [0.4.0] - 2026-11-04
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- **Overhead cut 1 (v0.4 F2, issue #5 P1-2/P1-4)**: the lite (yolo) track seals the TDD red proof immediately after `plan` — the issue/branch ceremony no longer sits between planning and red-proof, and the planning pass now authors the failing test, so plan and red share one agent pass. `xflow workflow run --title "..."` also derives the change id from the title when the branch cannot provide one (previously a hard stop on `main` that pushed agents into manual atom-by-atom driving). TDD snapshots are scoped: inside a git work tree I6a seals only the files that differ from HEAD plus the files the test command names, and I6b materializes the rest from the recorded HEAD at replay — on the SWE-bench sympy tree the sealed manifest drops from 1,543 files / 164 KB to the changed files only (2 files / 197 B for a one-file change), and the snapshot copy from 26.9 MB to ~51 KB. Proofs sealed before this change keep verifying (the scope joins the binding only when present).
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- **CR gate `J6.cr.review` wired into the verify stage (v0.4 F1)**: closes the v0.3.0 known gap where J6 was registered and unit-tested but no workflow phase invoked it. The yolo `verify-consistency` phase and the corps `qa` phase now run J6 on every change — after the spec-delta review, before the stage flips to verify — and declare its verdict record `specs/changes/<change_id>/cr/review-0.json` as a required artifact. A failing verdict (spec misalignment, changed code with no test follow, net assertion decrease, blown loop budget) stops the workflow at verify instead of waving the change through to archive. Orchestration evidence: `test/cr-review-wiring.test.js` drives the real yolo verify phase through `WorkflowExecutor` against a git fixture — an aligned, tested change passes with a verdict record, and an untested change is stopped at the phase.
|
|
23
|
+
- **SWE-bench predictions emitted directly by `run.py` (v0.4 F3)**: the bench harness no longer relies on a one-off converter outside the repo. A stdlib-only `bench/swebench/harness/predictions.py` builds records with exactly `instance_id`, `model_name_or_path`, `model_patch`, re-applies the P0-2 evidence filter (`specs/`, `.xflow/`, `.as-xflow/`) on both paths, and upserts per-arm files so resumable reruns never duplicate lines; `run.py --export-predictions` rebuilds the same files from saved patches with no model calls. Regression: all four pilot arms rebuilt through the new path are byte-identical to the hand-converted pilot files (`cmp` = 0 across 24 instances), and the largest openflow-arm patch stays at 9,650 bytes, well under the 200 KB line.
|
|
24
|
+
- **`xflow init` writes the project `.gitignore` (v0.4 F4)**: init now creates or merges `.gitignore` entries for evalid local state (`.as-xflow/`, `specs/changes/`), appending only the entries that are missing and never modifying existing lines; `.xflow/` stays tracked on purpose (`GOAL.md` is a reviewable project document). Re-running `init --force` tops up projects initialized before v0.4. Closes the v0.3.0 known gap.
|
|
25
|
+
|
|
26
|
+
## [0.3.1] - 2026-11-04
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
- **Renamed: OpenFlow → evalid.** The repository is now `surlymochan/evalid` (old links redirect) and the npm package is now `evalid`. Same code and behaviour as 0.3.0; the rename matches the repositioned first screen — a runtime verification layer for coding agents ("Claimed ≠ verified"). The `xflow` CLI name is unchanged in this release.
|
|
30
|
+
|
|
31
|
+
## [0.3.0] - 2026-11-04
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
- **SPEC clarification gate `J4d.spec_clarify.gate`** (#11): blocks ambiguous specs before the loop starts. Flags MUST clauses with no quantified anchor, missing WHEN/THEN scenarios, vague wording (EN/CN tables) and TBD/placeholder text; every finding carries an answerable clarification question. Available as `xflow spec clarify` and wired into the yolo/corps proposal-consistency stage.
|
|
35
|
+
- **Code review gate `J6.cr.review`** (#10): deterministic review checks — spec alignment (zero alignment fails), test-follow (untested changes fail unless `cr_allow_untested` is declared in status), net assertion decrease fails, test files may not be edited to force green, and a loop budget (default 10 files / 400 lines; warn over budget, fail at 2x).
|
|
36
|
+
- **Test gate v2 checks in `I6c`** (#12): rejects expected values sourced from the implementation itself, dead-callback assertions, and self-comparison tautologies. Adds per-phase cost accounting (`src/core/phase-cost.js`): wall-clock and token spend per phase, flagged when it diverges from total wall-clock by more than 5%.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
- **Benchmark evidence no longer leaks into solution patches** (#8): `run.py` now excludes `specs/` when generating `solution.diff`, with a second filter in the harness (regrade strips it from old patches too). A real openflow-arm patch shrank from 17.0 MB to 24 KB — 99.9% of it was evidence files, not code.
|
|
40
|
+
- **Per-run uv cache** (#8): `UV_CACHE_DIR` is set per run instead of sharing one cache across benchmark arms.
|
|
41
|
+
- **CI runner pinned to `ubuntu-24.04`** (#9): Playwright 1.59.1 does not support chromium on ubuntu 26.04, which silently killed the verify job.
|
|
42
|
+
|
|
43
|
+
### Docs
|
|
44
|
+
- Added `CONTRIBUTING.md` and issue/PR templates (#8, #11, #10). Workflow manual atom count updated 83 → 85.
|
|
45
|
+
|
|
46
|
+
### Known gaps
|
|
47
|
+
- `J6.cr.review` is registered and tested but not yet wired into the yolo/corps verify stage (planned for v0.4).
|
|
48
|
+
- `xflow init` does not yet add OpenFlow artefacts to the user project's `.gitignore` (planned for v0.4).
|
|
49
|
+
|
|
50
|
+
## [0.2.2] - 2026-10-18
|
|
51
|
+
|
|
52
|
+
### Docs
|
|
53
|
+
- Added the SWE-bench Verified results to the README and `bench/swebench/`: 6 hard sympy, pytest and pylint instances on DeepSeek-V4.1-Flash (`deepseek-flash`), n=1 per cell.
|
|
54
|
+
- Corrected the first published results after a pytest temp-directory race in grading: `pytest-5787` and `pytest-6197` became resolved for all arms; `pytest-10356` is unresolved by every arm. See the [regrade notes](bench/swebench/README.md#regrade-2026-10-18).
|
|
55
|
+
- Linked the [optimization backlog issue #5](https://github.com/surlymochan/openflow/issues/5).
|
|
56
|
+
|
|
57
|
+
No CLI or gate changes in this release.
|
|
58
|
+
|
|
59
|
+
## [0.2.1] - 2026-10-17
|
|
60
|
+
|
|
61
|
+
### Changed
|
|
62
|
+
- TDD proofs are bound to a tree snapshot. `I6b` recomputes the binding and re-runs the recorded command. Green also checks that snapshotted test files still match disk.
|
|
63
|
+
- Red and green must run the same test, or green must be a superset. Skip, todo, and focused tests do not count. Import-only or empty failures do not count as red. Type-only assertions fail when they are the only assertions.
|
|
64
|
+
- `J4b` fails when the same subject has contradictory `MUST`/`SHALL` verb/value clauses.
|
|
65
|
+
- `self.assert*`, `pytest.raises`, and bare `assert` count as assertions.
|
|
66
|
+
- `tdd_mode` `refactor` and `docs` (status.json or `--tdd-mode`) are the exemption path for an honest refactor or a docs-only diff. Misuse fails.
|
|
67
|
+
|
|
68
|
+
## [0.2.0] - 2026-10-17 (relaunch)
|
|
69
|
+
|
|
70
|
+
### Added
|
|
71
|
+
- Policy overlay execution mode: `xflow policy validate`, plus policy, notify, storage, plugin and
|
|
72
|
+
experience-digest atoms.
|
|
73
|
+
- `xflow intake recommend` for adaptive yolo/corps track selection.
|
|
74
|
+
- `xflow profile show|set` for execution profiles.
|
|
75
|
+
- `xflow compare super-assistant`.
|
|
76
|
+
- `docs/assets/demo.gif`, recorded from a real CLI run, and a README rewrite.
|
|
77
|
+
- `CHANGELOG.md`.
|
|
78
|
+
|
|
79
|
+
### Changed
|
|
80
|
+
- The npm package is now named `@surlymochan/openflow`, because the unscoped `openflow` name is taken. The CLI is still `xflow`.
|
|
81
|
+
- `package.json` adds repository/homepage/bugs/keywords/author, `engines.node >= 22.5` and public `publishConfig`.
|
|
82
|
+
- The `xflow serve` fallback message no longer links to an unpublished repository.
|
|
83
|
+
|
|
84
|
+
### Fixed
|
|
85
|
+
- `agent_invoke` no longer crashes with an uncaught `EPIPE` when an agent CLI exits before reading its stdin prompt. This fixes an intermittent `heavy-atoms` test failure.
|
|
86
|
+
|
|
87
|
+
## [0.1.0] - 2026-05-25
|
|
88
|
+
|
|
89
|
+
### Added
|
|
90
|
+
- First public extraction:
|
|
91
|
+
- YAML workflows (`yolo`, `corps`) validated against the atom registry.
|
|
92
|
+
- Red/green TDD proof gates and a test-quality review.
|
|
93
|
+
- Handoff and AHA state, archive ordering, and the `xflow` CLI.
|
|
94
|
+
- Adapters: `xflow adapter import-file` and `xflow adapter github-issue`.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 evalid contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,316 @@
|
|
|
1
|
-
#
|
|
1
|
+
# evalid
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://github.com/surlymochan/evalid/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@surlymochan/evalid)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+

|
|
7
|
+
[](https://hub.xerj.org/contributors/surlymochan)
|
|
8
|
+
|
|
9
|
+
**Claimed ≠ verified.**
|
|
10
|
+
|
|
11
|
+
evalid is a runtime verification layer for coding agents. Your agent says the tests pass — evalid seals the run, replays it from a clean snapshot, and shows you the gap between what was claimed and what actually passed.
|
|
12
|
+
|
|
13
|
+
- **Sealed evidence, replayed — not re-asked.** When tests run, the whole tree is hashed and sealed together with the command, exit code, and output. Verification copies the sealed snapshot to a clean directory and actually re-runs it, comparing exit codes and failure classes — and in the green phase, test files must hash-match the seal. If the agent edited the tests after the run, the seal breaks.
|
|
14
|
+
- **A zero-judge pipeline.** Spec clarification, code review, and test verification are plain deterministic code — no LLM judge anywhere in the chain, zero tokens spent on checking, every stage leaving an artifact you can inspect. Ambiguous specs are blocked before the loop starts; changes without test follow-through are blocked at review; unproven claims are blocked at replay.
|
|
15
|
+
- **The claim-vs-evidence ledger, with the cost attached.** Every delivery carries one record: what was claimed, what the replay showed, and what each phase cost in time and tokens — and when the phase ledger disagrees with wall-clock time by more than 5%, it flags itself as untrustworthy.
|
|
16
|
+
|
|
17
|
+
> An LLM judge can be persuaded, is non-deterministic, and bills you for every opinion. A replay can't be talked out of anything: same sealed snapshot, same commands, same exit codes — or the claim doesn't ship.
|
|
18
|
+
|
|
19
|
+
> **What the seal does and doesn't prove.** The seal is a content hash, not a cryptographic signature. A fully self-consistent forged snapshot could, in theory, still pass — we state this openly rather than oversell. What the seal does guarantee is narrower and real: the tests must actually have run at seal time, the test files at verification time are byte-identical to the ones that ran, and any tampering after the run breaks the hash and shows up. It is built to catch misreporting and test tampering — the failure modes agents actually exhibit — not to defeat a determined forger.
|
|
20
|
+
|
|
21
|
+
Underneath, a workflow engine (spec → implement → verify loops with per-phase budgets) produces the work that gets verified. It's the chassis, not the headline: verification is the product. The `xflow` CLI runs the same workflows from Codex, Claude Code, Cursor, OpenCode, Gemini or a plain terminal.
|
|
22
|
+
|
|
23
|
+
_Renamed from OpenFlow in v0.3.1 (2026-11-04); old repository and package links redirect._
|
|
24
|
+
|
|
25
|
+
## Benchmarks: evalid vs superpowers (2026-10-17)
|
|
26
|
+
|
|
27
|
+
_These results were measured before the rename, when the project was named OpenFlow; product names in this section have been unified to the current names (evalid, swrm), and all versions and figures are the original measurements._
|
|
28
|
+
|
|
29
|
+
For the synthetic and evidence-check results below, the same model (`grok-4.7-high` via local `cursor-agent`) and same
|
|
30
|
+
harness are used for every arm; the SWE-bench block uses DeepSeek via Pi. Pinned: evalid 0.2.1,
|
|
31
|
+
[superpowers](https://github.com/obra/superpowers) v7.0.0 (`bb92a77`). Scripts, raw results and methodology:
|
|
32
|
+
[`bench/`](bench/README.md) and [`bench/e2e/`](bench/e2e/README.md). Losses are shown as measured.
|
|
33
|
+
|
|
34
|
+
**Real GitHub issues (SWE-bench Verified), 2026-10-18.** Six hard instances from sympy, pytest and pylint; success
|
|
35
|
+
means the official FAIL_TO_PASS and PASS_TO_PASS tests all pass. Every arm runs on the Pi coding agent with
|
|
36
|
+
DeepSeek-V4.1-Flash (`deepseek-flash`), n=1 per cell, 20-minute cap; details and commands are in
|
|
37
|
+
[`bench/swebench/`](bench/swebench/README.md).
|
|
38
|
+
|
|
39
|
+
| Arm | Resolved (official tests) | Median wall-clock (IQR) | Median $ per task (DeepSeek list price) | Total $ (all runs) | n |
|
|
40
|
+
| --- | --- | --- | --- | --- | --- |
|
|
41
|
+
| Plain agent (baseline) | 3/6 (50%) | 124 s (110–175) | $0.0234 | $0.16 | 6 |
|
|
42
|
+
| superpowers v7.0.0 | 2/6 (33%) | 154 s (136–340) | $0.0285 | $0.31 | 6 |
|
|
43
|
+
| evalid 0.2.1 | 4/6 (67%) | 230 s (200–266) | $0.0412 | $0.23 | 6 |
|
|
44
|
+
| swrm (Pi executor) | 5/6 (83%) | 228 s (187–254) | $0.0377 | $0.21 | 6 |
|
|
45
|
+
|
|
46
|
+
**Caveats:** n=1 on 6 instances, so one or two resolves are within noise. The two workflow tools took about 1.8x the
|
|
47
|
+
baseline's median wall-clock and cost 76% (evalid) / 61% (swrm) more per task. The first published table undercounted
|
|
48
|
+
pytest because of a shared temp-dir race in grading; it is now fixed and regraded
|
|
49
|
+
([regrade notes](bench/swebench/README.md#regrade-2026-10-18)). On the MiniMax-M3.1-Flash-Preview subset, baseline
|
|
50
|
+
resolved 3/4 and superpowers 2/4; evalid had no clean MiniMax run because the plan's usage cap was hit.
|
|
51
|
+
|
|
52
|
+
Raw per-run records and logs: [`bench/swebench/results/`](bench/swebench/results/). Optimization backlog from these
|
|
53
|
+
results: [#5](https://github.com/surlymochan/evalid/issues/5).
|
|
54
|
+
|
|
55
|
+
**Synthetic end-to-end tasks.** 8 small real tasks (4 JS, 4 Python), hidden acceptance tests applied only after the agent exits, 20-minute cap per run.
|
|
56
|
+
|
|
57
|
+
| Arm | Success (hidden tests) | Median wall time (IQR) | Median tokens: total / input+output | n |
|
|
58
|
+
| --- | --- | --- | --- | --- |
|
|
59
|
+
| Plain agent (baseline) | 24/24 (100%) | 55 s (46–132) | 105k / 28k | 24 |
|
|
60
|
+
| superpowers v7.0.0 | 24/24 (100%) | 187 s (121–299) | 312k / 59k | 24 |
|
|
61
|
+
| evalid 0.2.1 | 11/12 (92%) | 985 s (920–1195) | 5.29M / 233k ¹ | 12 ² |
|
|
62
|
+
|
|
63
|
+
On tasks this small the plain agent already succeeds every time, and evalid's full ceremony is the slowest and most
|
|
64
|
+
token-hungry arm. 3 of 12 evalid runs hit the 20-minute cap while still running the workflow; their code already passed.
|
|
65
|
+
¹ Tokens counted only for runs that reported usage (not the 3 capped runs). Most of "total" is cache reads.
|
|
66
|
+
² 3 repeats on 2 tasks, 1 on the other 6, to save quota. Matched repeat-1 view (n=8 each): baseline 8/8, 57 s, 104k; superpowers 8/8, 154 s, 289k; evalid 8/8, 1008 s, 5.32M.
|
|
67
|
+
|
|
68
|
+
**Catching fake TDD / verification evidence.** 36 scripted episodes: 25 faulty (red proof recorded after the fix, forged
|
|
69
|
+
proofs, skipped tests, weak or wrong assertions, contradictory specs, …) and 11 honest ones. Of these, 12 are a held-out set written after the fixes.
|
|
70
|
+
|
|
71
|
+
| Checker | Faulty caught | Honest wrongly rejected | Cost per check |
|
|
72
|
+
| --- | --- | --- | --- |
|
|
73
|
+
| evalid 0.2.1 gates (deterministic code) | 22/25 (88%): original 16/17, held-out 6/8 | 0/11 | ~0.1–0.2 s, no model tokens |
|
|
74
|
+
| superpowers v7.0.0 skills + LLM judge | 25/25 (100%) | 1/11 | one agent call per check |
|
|
75
|
+
| LLM judge, no skills | 25/25 (100%) ³ | 0/11 | one agent call per check |
|
|
76
|
+
| evalid 0.2.0 (before this benchmark, original 24 only) | 10/17 (59%) | 3/7 | – |
|
|
77
|
+
|
|
78
|
+
An LLM reviewer that is explicitly asked to audit an episode, and is allowed to rerun the tests, caught more than evalid's static gates did.
|
|
79
|
+
evalid's gates are deterministic and cost no model calls, but they still miss plausible-but-wrong expected values,
|
|
80
|
+
assertions in callbacks that never run, and behavior changes hidden inside a declared refactor.
|
|
81
|
+
³ 1 of the 11 honest runs timed out and counts as incorrect. LLM arms used 1 run per scenario.
|
|
82
|
+
|
|
83
|
+
Prompt-based workflows *ask* an agent to write the failing test first, run the suite and keep notes. evalid
|
|
84
|
+
*checks* that it did. Workflows are YAML phases made of small deterministic "atoms". Gates are code: a
|
|
85
|
+
red/green TDD proof, a test-quality review, artifact checks, and archive ordering. The `xflow` CLI runs the
|
|
86
|
+
same workflows from Codex, Claude Code, Cursor, OpenCode, Gemini or a plain terminal.
|
|
87
|
+
|
|
88
|
+

|
|
89
|
+
|
|
90
|
+
<sub>Recorded from a real run of the CLI in an empty project. The last two commands show an agent "recording" a
|
|
91
|
+
red proof after the fix, and the gate rejecting it.</sub>
|
|
92
|
+
|
|
93
|
+
## Why
|
|
94
|
+
|
|
95
|
+
Agent workflow kits are good at shaping behaviour, but the checks only live in prose. Agents skip the red
|
|
96
|
+
step, write tests that assert nothing, lose context between sessions, and open PRs before verification has
|
|
97
|
+
finished. evalid adds a harder layer underneath:
|
|
98
|
+
|
|
99
|
+
- **Workflow as data.** `workflows/yolo.yaml` and `workflows/corps.yaml` are validated against an atom registry before they run.
|
|
100
|
+
- **TDD proof checked by code.**
|
|
101
|
+
- `I6a` snapshots the tree and binds the command, exit code, output hash, and failure class. `I6b` recomputes that binding and re-runs the command on the snapshot. A hand-edited proof does not pass unless that snapshot really exits as claimed.
|
|
102
|
+
- Red and green must target the same test, or green must be a superset of the red test. Skipped, todo, and focused tests do not count as red or green.
|
|
103
|
+
- `I6c.tdd.quality_review` rejects code changes that have:
|
|
104
|
+
- no meaningful test changes,
|
|
105
|
+
- empty assertions,
|
|
106
|
+
- snapshot-only tests,
|
|
107
|
+
- mock-heavy tests without real assertions,
|
|
108
|
+
- only a type or existence assertion (`typeof`, `!== undefined`).
|
|
109
|
+
- `tdd_mode` in `status.json` (or `--tdd-mode`) may be `red-green` (default), `refactor`, or `docs`. Refactor requires the existing tests to pass before and after, with no assertion removed. Docs allows a non-code diff and does not require a red proof. Declaring docs while changing code, or refactor while deleting assertions, fails.
|
|
110
|
+
- **Context that survives sessions.**
|
|
111
|
+
- The `.xflow/GOAL.md` project anchor.
|
|
112
|
+
- `HANDOFF.md` and `AHA.md`.
|
|
113
|
+
- Per-change `status.json` and proof files under `specs/changes/<id>/`.
|
|
114
|
+
- **Executable finish.** Verify → archive → commit/push → PR ordering is a tested atom, not a checklist.
|
|
115
|
+
|
|
116
|
+
## Features
|
|
117
|
+
|
|
118
|
+
- **YAML workflows, validated before they run** — phases are data (`workflows/*.yaml`), checked against an atom registry before execution.
|
|
119
|
+
- **Red/green TDD proof gates enforced by code** — proofs bind the command, exit code and output hash, and are re-verified on a snapshot; hand-edited or faked proofs are rejected, and skipped, todo or focused tests do not count.
|
|
120
|
+
- **Automatic test-quality review** — changes with no meaningful test changes, empty assertions, snapshot-only tests or mock-heavy tests without real assertions are rejected.
|
|
121
|
+
- **Context that survives sessions** — `.xflow/GOAL.md`, `HANDOFF.md` and per-change `status.json` carry state across sessions and agents.
|
|
122
|
+
- **Executable finish line** — verify → archive → commit/push → PR ordering is a tested workflow atom, not a prose checklist.
|
|
123
|
+
- **One CLI for multiple agents** — the `xflow` CLI drives Codex, Claude Code and Cursor from the same workflow files.
|
|
124
|
+
|
|
125
|
+
## 3 Minute Start
|
|
126
|
+
|
|
127
|
+
Requires Node.js ≥ 22.5 (for `node:sqlite`) and Python 3 (atoms are small Python scripts).
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
npm install -g evalid # installs the `xflow` CLI
|
|
131
|
+
cd your-project
|
|
132
|
+
xflow init --project-root . # writes .as-xflow/config.json
|
|
133
|
+
xflow goal set "Ship the next verified change" --project-root .
|
|
134
|
+
xflow goal audit --project-root . --json
|
|
135
|
+
xflow doctor --project-root .
|
|
136
|
+
xflow workflow validate yolo --project-root .
|
|
137
|
+
xflow guide # the delivery loop in one screen
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
For a source checkout:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
git clone https://github.com/surlymochan/evalid.git
|
|
144
|
+
cd evalid
|
|
145
|
+
npm ci && npm test
|
|
146
|
+
node bin/xflow.js quickstart
|
|
147
|
+
node bin/xflow.js evaluate
|
|
148
|
+
node bin/xflow.js compare codex-goal
|
|
149
|
+
node bin/xflow.js launch copy
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Run a change
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
git checkout -b feat/example-change
|
|
156
|
+
xflow workflow run yolo \
|
|
157
|
+
--title "Example change" --change-type backend \
|
|
158
|
+
--tdd-red-command "npm test -- --grep new-behavior" \
|
|
159
|
+
--tdd-green-command "npm test"
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
The lite track runs `tdd-red -> execute -> tdd-green -> verify -> archive` and stops at human or LLM gates. Every
|
|
163
|
+
phase leaves evidence in `specs/changes/<change-id>/`. Add `--dry-run` to print the phases, atoms and gates
|
|
164
|
+
first.
|
|
165
|
+
|
|
166
|
+
You can also run a single gate directly, as in the demo:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
xflow atom run I6a.tdd.run --change-id my-change --phase red --test-command "npm test"
|
|
170
|
+
xflow atom run I6a.tdd.run --change-id my-change --phase green --test-command "npm test"
|
|
171
|
+
xflow atom run I6b.tdd.proof_validate --change-id my-change --phase red
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Evaluate it
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
xflow quickstart # copy-paste-safe first-run commands
|
|
178
|
+
xflow evaluate # one-shot brief: quality score, comparisons, blockers, next actions
|
|
179
|
+
xflow assess # scorecard for goal, yolo, corps and the skill family
|
|
180
|
+
xflow score # competitive readiness score with evidence per dimension
|
|
181
|
+
xflow demo launch # goal -> yolo and goal -> corps proof paths
|
|
182
|
+
xflow launch dossier # one-page narrative backed by the same audit
|
|
183
|
+
xflow launch copy # claim-safe announcement copy plus forbidden phrases
|
|
184
|
+
xflow release status # the single next release blocker
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
<details>
|
|
188
|
+
<summary>Release-owner gates (fail until real adoption / npm evidence exists)</summary>
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
xflow adoption trial --name <team-or-project> --source <tracker-or-pr> --track yolo
|
|
192
|
+
xflow adoption status --json
|
|
193
|
+
xflow package preflight --check-registry --check-auth --json
|
|
194
|
+
xflow package audit --check-registry --json
|
|
195
|
+
xflow launch audit --pre-publish --strict --json
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
</details>
|
|
199
|
+
|
|
200
|
+
## Choose a track
|
|
201
|
+
|
|
202
|
+
| Track | Use when | Entry |
|
|
203
|
+
| --- | --- | --- |
|
|
204
|
+
| `goal` | You want a project-level direction anchor that later work reads and audits | `xflow goal set`, `xflow goal audit` |
|
|
205
|
+
| `plan` | You only need a reusable implementation plan | `xflow:plan` skill |
|
|
206
|
+
| `yolo` | Backend, docs, infra, small UI; low ceremony | `xflow workflow run yolo` |
|
|
207
|
+
| `corps` | Product/UI-heavy or multi-agent work with governed proof | `xflow corps --explain`, then `xflow corps` and `xflow proof --track corps` |
|
|
208
|
+
| `ralph` | Keep implementing, verifying and repairing until the completion evidence is clean | `xflow:ralph` skill |
|
|
209
|
+
|
|
210
|
+
Not sure which one fits? Run `xflow intake recommend --change-id <id> --title "<title>" --description "<text>"`.
|
|
211
|
+
|
|
212
|
+
## How it fits together
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
workflows/*.yaml ──validate──► atoms/registry.json ──► xflow/atoms/*.py (deterministic steps)
|
|
216
|
+
│ │
|
|
217
|
+
▼ ▼
|
|
218
|
+
xflow workflow run ──► gates: deterministic | artifact-verify | human | llm
|
|
219
|
+
│
|
|
220
|
+
▼
|
|
221
|
+
specs/changes/<id>/ status.json · tdd/red-0.json · tdd/green-0.json · quality-0.json · logs/*.ndjson
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
- `bin/xflow.js`: the CLI. `src/`: workflow loader, runner, policy overlays, scoring.
|
|
225
|
+
- `xflow/`: the portable skill family (`xflow:plan`, `xflow:yolo`, `xflow:corps`, `xflow:ralph`, …) for agent hosts.
|
|
226
|
+
- `schemas/`: JSON schemas for workflows, proofs and policy overlays.
|
|
227
|
+
|
|
228
|
+
## Compared with other tools
|
|
229
|
+
|
|
230
|
+
evalid aims to complement prompt-level workflow kits and spec tools, not replace them. `xflow compare
|
|
231
|
+
<superpowers|openspec|gstack|spec-kit|codex-goal>` prints a side-by-side with sources.
|
|
232
|
+
|
|
233
|
+
<details>
|
|
234
|
+
<summary>Full capability table</summary>
|
|
235
|
+
|
|
236
|
+
| Surface | evalid Position |
|
|
237
|
+
| --- | --- |
|
|
238
|
+
| Goal alignment | Project-level `.xflow/GOAL.md` that yolo, corps, Ralph, handoff, and takein consume |
|
|
239
|
+
| One-shot evaluation | `xflow evaluate` combines quality score, Codex goal / Superpowers / Super-Assistant comparison, ordinary and splash launch blockers, release-owner status, claim boundaries, next actions, and first-run path |
|
|
240
|
+
| Quality assessment | `xflow assess` gives a public scorecard for goal, yolo, corps, and the skill family |
|
|
241
|
+
| Launch demo | `xflow demo launch` shows goal -> yolo and goal -> corps proof paths |
|
|
242
|
+
| Launch audit | `xflow launch audit` separates ready engine and adoption evidence from missing registry proof |
|
|
243
|
+
| Launch dossier | `xflow launch dossier` prints the one-page public narrative backed by the same audit payload |
|
|
244
|
+
| Launch claims | `xflow launch claims` separates what can be said publicly now from claims blocked by missing evidence |
|
|
245
|
+
| Launch copy | `xflow launch copy` generates claim-safe announcement copy and forbidden phrases from the same evidence |
|
|
246
|
+
| Package status | `xflow package status` gives a non-failing publish/install status summary |
|
|
247
|
+
| Package audit | `xflow package audit` validates public npm registry evidence before splash-launch claims |
|
|
248
|
+
| Release status | `xflow release status` gives the release owner one focused blocker, next action, package status, and handoff doc |
|
|
249
|
+
| Adoption status | `xflow adoption status` gives a non-failing ordinary/splash adoption blocker summary |
|
|
250
|
+
| Adoption trial | `xflow adoption trial` gives external teams the exact commands and evidence checklist before a trial packet is written |
|
|
251
|
+
| Publish handoff | `docs/npm-publish-handoff.md` records the exact auth, preflight, publish, and post-publish gates |
|
|
252
|
+
| TDD | Executable red/green proof plus quality review |
|
|
253
|
+
| Workflow | YAML phases validated against atom registry |
|
|
254
|
+
| Spec migration | OpenSpec mapping report plus deterministic `spec_delta_review.json` |
|
|
255
|
+
| Local closure | Doctor, drift scan, release pack, archive ordering |
|
|
256
|
+
| Team handoff | `HANDOFF.md`, `AHA.md`, reviewer guide |
|
|
257
|
+
| Team adoption | Role model, CI boundary, PR acceptance, release ownership |
|
|
258
|
+
| Cross-tool use | Plain CLI and skill docs for Codex, Claude Code, Cursor, OpenCode, Gemini |
|
|
259
|
+
| Competitive proof | `xflow compare codex-goal`, `xflow compare superpowers`, `xflow compare super-assistant`, `xflow compare openspec`, `xflow compare gstack`, `xflow compare spec-kit`, benchmark docs |
|
|
260
|
+
| Adoption proof | Minimal clean project runs in CI, plus public adoption-record templates |
|
|
261
|
+
|
|
262
|
+
</details>
|
|
263
|
+
|
|
264
|
+
## Docs
|
|
265
|
+
|
|
266
|
+
<details>
|
|
267
|
+
<summary>All guides</summary>
|
|
268
|
+
|
|
269
|
+
- [Quickstart](docs/quickstart.md)
|
|
270
|
+
- [Install and upgrade](docs/install-upgrade.md)
|
|
271
|
+
- [Tooling matrix](docs/tooling-matrix.md)
|
|
272
|
+
- [Compatibility notes](docs/compatibility.md)
|
|
273
|
+
- [Demo proof](docs/demo-proof.md)
|
|
274
|
+
- [Examples gallery](docs/examples-gallery.md)
|
|
275
|
+
- [Public benchmark](docs/public-benchmark.md)
|
|
276
|
+
- [Quality assessment](docs/quality-assessment.md)
|
|
277
|
+
- [Launch demo](docs/launch-demo.md)
|
|
278
|
+
- [Launch dossier](docs/launch-dossier.md)
|
|
279
|
+
- [Corps operator guide](docs/corps-operator-guide.md)
|
|
280
|
+
- [Superpowers comparison](docs/superpowers-comparison.md)
|
|
281
|
+
- [Super-Assistant comparison](docs/super-assistant-comparison.md)
|
|
282
|
+
- [Adoption evidence template](docs/adoption/README.md)
|
|
283
|
+
- [Maintainer adoption record](docs/adoption/openflow-release-hardening.md)
|
|
284
|
+
- [xflow Goal vs Codex native goal](docs/goal-vs-codex.md)
|
|
285
|
+
- [Walkthrough](docs/walkthrough.md)
|
|
286
|
+
- [OpenSpec migration](docs/openspec-migration.md)
|
|
287
|
+
- [spec-kit benchmark](docs/spec-kit-benchmark.md)
|
|
288
|
+
- [Integration matrix](docs/integrations.md)
|
|
289
|
+
- [Public release gate](docs/public-release.md)
|
|
290
|
+
- [npm publish handoff](docs/npm-publish-handoff.md)
|
|
291
|
+
- [Release notes](RELEASE_NOTES.md)
|
|
292
|
+
- [Adapter fixture](docs/fixtures/tracker-item.json)
|
|
293
|
+
- [Methodology](docs/methodology.md)
|
|
294
|
+
- [Reviewer guide](docs/reviewer-guide.md)
|
|
295
|
+
- [Team adoption operating model](docs/team-adoption.md)
|
|
296
|
+
- [Competitive benchmark](docs/competitive-benchmark.md)
|
|
297
|
+
- [2026-05-25 benchmark report](docs/benchmark-evalid-vs-gstack-superpowers-openspec-2026-05-25.md)
|
|
298
|
+
|
|
299
|
+
</details>
|
|
300
|
+
|
|
301
|
+
## Development
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
npm ci
|
|
305
|
+
npx playwright install chromium # browser-evidence tests
|
|
306
|
+
npm test # 270+ tests
|
|
307
|
+
npm run drift:scan # docs/skill/workflow drift checks
|
|
308
|
+
npm run pack:check # what would be published
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
Contributions are welcome: open an issue describing the workflow problem first, then a PR with tests. Keep
|
|
312
|
+
claims in docs tied to a command that reproduces them.
|
|
313
|
+
|
|
314
|
+
## License
|
|
315
|
+
|
|
316
|
+
[MIT](LICENSE)
|
package/RELEASE_NOTES.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Release Notes
|
|
2
|
+
|
|
3
|
+
## 0.4.1 - Failed runs report phase costs; Node 24 test counts fail closed
|
|
4
|
+
|
|
5
|
+
Patch release. Two fixes, both about the gate trusting evidence it had not actually read.
|
|
6
|
+
|
|
7
|
+
**Failed runs now report where the time and tokens went (#22).** The per-phase cost report landed in 0.3.0 but only rode on successful runs. It now also rides on the `workflow_failed` execution-log event — a run that stops mid-way still reports its per-phase timing/token breakdown — and is persisted as a standalone artifact at `.as-xflow/phase-cost.json` on both completion and failure, so the breakdown is readable without mining the ndjson execution log. The accounting structure (phase sum vs wall clock within 5%) is covered by `test/phase-cost.test.js`. This lands item P1-1 from issue #5.
|
|
8
|
+
|
|
9
|
+
**TDD gate reads test counts correctly on Node 24, and fails closed when it cannot (#23).** The gate parsed skip/todo counts only from the TAP reporter's summary lines. Node 24's built-in runner defaults to the spec reporter when piped, whose summary lines carry a different marker — an all-skipped/todo run on Node 24 exited 0, parsed as zero skips, and was waved through as green. The parser now reads the runner's summary block in both reporter formats (TAP and spec), requires the full node signature before treating a block as a node summary, and anchors summary lines at line start so test names or program output cannot forge counts. When a detected node summary cannot be fully parsed, the run classifies as `counts_unknown` and proof validation rejects it (`tests_counts_unknown`) instead of reading unknown counts as zero. Measured against pinned captured outputs: the new count-parsing tests pass 9/9 under Node 22 and 9/9 under Node 24; the end-to-end TDD proof suite passes 18/18 under both (it was 17/18 on Node 24 before this fix).
|
|
10
|
+
|
|
11
|
+
With P1-1 landed here, the P0/P1 items tracked on the optimization backlog in #5 stand checked off as verified; the remaining longer-horizon items stay tracked there.
|
|
12
|
+
|
|
13
|
+
## 0.4.0 - CR gate wired in, overhead cut 1, predictions direct
|
|
14
|
+
|
|
15
|
+
**The CR gate now runs inside the pipeline (F1, #15).** In 0.3.0 `J6.cr.review` was registered and unit-tested but no workflow invoked it — the release notes said so, and this release closes that gap. The yolo `verify-consistency` phase and the corps `qa` phase run J6 on every change, after the spec-delta review and before the stage flips to verify, and the verdict record `cr/review-0.json` is a required artifact: a failing verdict stops the workflow instead of waving the change through to archive. The wiring is proven end-to-end, not just by unit tests: `test/cr-review-wiring.test.js` drives the real yolo verify phase through `WorkflowExecutor` against a git fixture — an aligned, tested change passes with a verdict record on disk, and a code change with no test follow is stopped at the phase with the `cr_code_without_test` finding.
|
|
16
|
+
|
|
17
|
+
**Overhead cut 1 (F2, #17).** The lite (yolo) track seals the TDD red proof immediately after `plan` — the issue/branch ceremony no longer sits between planning and red-proof, and the planning pass authors the failing test, so plan and red share one agent pass. `xflow workflow run --title "..."` derives the change id from the title when the branch cannot provide one. TDD snapshots are scoped: inside a git work tree, I6a seals only the files that differ from HEAD plus the files the test command names, and I6b materializes the rest from the recorded HEAD at replay. Offline measurements on the SWE-bench sympy tree: the sealed manifest drops from 1,543 files / 164 KB to the changed files only (2 files / 197 B for a one-file change), and the snapshot copy from 26.9 MB to ~51 KB. Proofs sealed before this change keep verifying.
|
|
18
|
+
|
|
19
|
+
Acceptance debt, stated plainly: the v0.4 acceptance line for F2 was a live rerun of the same 6 SWE-bench instances — wall-clock ≤ 1.3× the baseline median, total tokens ≤ 2.0M, resolved ≥ 4/6. The bench generation environment is not currently restored, so those three numbers are still owed; they are not claimed here. If the rerun misses the line when it lands, the remaining overhead work continues as v0.4.1 rather than being declared done.
|
|
20
|
+
|
|
21
|
+
**Predictions come straight out of `run.py` (F3, #16).** The official SWE-bench predictions format (`instance_id`, `model_name_or_path`, `model_patch`) is now produced by the bench harness itself, with the P0-2 evidence filter re-applied on both the live and replay paths — the one-off converter outside the repo is retired. Regression evidence: all four pilot arms rebuilt through `run.py --export-predictions` are byte-identical to the hand-converted pilot files (`cmp` = 0, 24 instances).
|
|
22
|
+
|
|
23
|
+
**`xflow init` writes `.gitignore` (F4, #18).** Init now creates or merges the project `.gitignore` for evalid local state (`.as-xflow/`, `specs/changes/`), appending only missing entries and never modifying existing lines — the first line of defense ahead of the diff filtering added in #8. This closes the second v0.3.0 known gap; both are now done.
|
|
24
|
+
|
|
25
|
+
## 0.3.1 - Renamed: OpenFlow → evalid
|
|
26
|
+
|
|
27
|
+
Same code as 0.3.0, new name and positioning. The project is now **evalid** — a runtime verification layer for coding agents: it seals each test run and replays it from a clean snapshot, so a claim only ships if the evidence replays green. Repository: `surlymochan/evalid` (old `openflow` links redirect); npm package: `evalid`. The `xflow` CLI name is unchanged in this release.
|
|
28
|
+
|
|
29
|
+
## 0.3.0 - Three-stage gates: SPEC, CR, Test
|
|
30
|
+
|
|
31
|
+
OpenFlow's gates now cover the three stages where agent work usually goes wrong, each with deterministic checks instead of another model's opinion.
|
|
32
|
+
|
|
33
|
+
**SPEC clarification gate (`J4d.spec_clarify.gate`, #11).** Ambiguity is cheapest before the loop starts. J4d blocks specs whose MUST clauses carry no quantified anchor (a clause whose value is itself a vague word does not count as anchored), scenarios without WHEN/THEN, vague wording in English or Chinese, and TBD/placeholder text. Every finding comes with a concrete question a human can answer. False-positive control is deliberate: MUST NOT clauses are exempt, already-quantified lines are not flagged, and code blocks and headings are not scanned. Ships as `xflow spec clarify` and in the yolo/corps proposal-consistency stage.
|
|
34
|
+
|
|
35
|
+
**Code review gate (`J6.cr.review`, #10).** A diff fails review when nothing in it aligns with the spec, when behaviour changes ship without tests (an explicit `cr_allow_untested` status marker is the only, auditable, exemption), when assertions decrease net, or when test files were edited to make a red run look green. A loop budget (default 10 files / 400 changed lines) warns over budget and fails at 2x. Known gap: J6 is registered in the atom registry (now 85 atoms) and covered by its own tests, but is not yet wired into the yolo/corps verify stage — that wiring is planned for v0.4.
|
|
36
|
+
|
|
37
|
+
**Test gate v2 (`I6c`, #12) and per-phase cost accounting.** I6c now also rejects tests whose expected value is computed from the implementation under test, assertions inside callbacks that never fire, and self-comparisons that are always true — each check ships with a passing counter-example so honest tests are not blocked. `src/core/phase-cost.js` records wall-clock and tokens per phase; a run whose phase sum diverges from total wall-clock by more than 5% is flagged `within_tolerance: false`, so cost claims stay auditable.
|
|
38
|
+
|
|
39
|
+
**Clean benchmark patches (#8).** The SWE-bench harness generated `solution.diff` with the whole `specs/` evidence tree inside: one real openflow-arm patch was 17.0 MB, of which 99.9% was evidence files. Generation now excludes `specs/`, a harness-side filter strips it as a second line of defence, and regrade applies the same filter to old patches. The same patch is now 24 KB. `UV_CACHE_DIR` is also per-run now, and the repo gained `CONTRIBUTING.md` plus issue/PR templates.
|
|
40
|
+
|
|
41
|
+
**CI fix (#9).** The verify job died at "Install Playwright" because `ubuntu-latest` had rolled to 26.04, which Playwright 1.59.1 does not support. The runner is pinned to `ubuntu-24.04`; upgrading Playwright itself is a separate, larger change.
|
|
42
|
+
|
|
43
|
+
Also known: `xflow init` does not yet write OpenFlow entries into the user project's `.gitignore` (planned for v0.4).
|
|
44
|
+
|
|
45
|
+
## 0.2.2 - Benchmark docs
|
|
46
|
+
|
|
47
|
+
No CLI or gate changes: this release only updates documentation. The README now leads with the SWE-bench Verified result on DeepSeek-V4.1-Flash: OpenFlow resolved 4/6 and the plain baseline resolved 3/6 (n=1 per cell). It also states the caveats: n=1 on 6 instances puts one or two resolves within noise, and the two workflow tools took about 1.8x the baseline's median wall-clock and cost 76% (OpenFlow) / 61% (openswarm) more per task. The first published table undercounted pytest because of a shared temp-dir race in grading; it is now fixed and regraded, with notes in [bench/swebench/README.md](bench/swebench/README.md#regrade-2026-10-18). The optimization backlog from these results is tracked in [issue #5](https://github.com/surlymochan/openflow/issues/5).
|
|
48
|
+
|
|
49
|
+
## 0.2.1 - Tighter TDD and spec gates
|
|
50
|
+
|
|
51
|
+
Proof files are no longer trusted as JSON alone. `I6a` records a snapshot and a digest over the command, exit code, output hash, failure class, and file hashes. `I6b` recomputes that digest and re-runs the command on the snapshot. An agent who can rewrite the tree can still produce a self-consistent failing snapshot; a hand edit of the proof cannot.
|
|
52
|
+
|
|
53
|
+
`I6c` requires red and green to target the same test (or a green superset), rejects skip/todo/only on the changed tests, and rejects a type-only assertion when it is the only assertion. A plausible but wrong expected value is still not decidable statically. `J4b` rejects contradictory `MUST`/`SHALL` values for the same subject.
|
|
54
|
+
|
|
55
|
+
`tdd_mode` may be `red-green` (default), `refactor`, or `docs`, via `status.json` or `--tdd-mode`. Refactor checks that existing tests pass before and after and that assertions were not removed. Docs checks that the diff stays off code and tests.
|
|
56
|
+
|
|
57
|
+
## 0.2.0 - Relaunch (first npm release)
|
|
58
|
+
|
|
59
|
+
OpenFlow is published to npm as **`@surlymochan/openflow`**. The CLI is still `xflow`. The unscoped
|
|
60
|
+
`openflow` name on npm belongs to an unrelated project.
|
|
61
|
+
|
|
62
|
+
### Highlights
|
|
63
|
+
|
|
64
|
+
- **Policy overlays.** `xflow policy validate` checks personal and team policy layered over the built-in
|
|
65
|
+
workflows. Policy, notify, storage, plugin and experience-digest atoms ship with it.
|
|
66
|
+
- **Adaptive intake.** `xflow intake recommend` reads a demand profile (title, description, repo count) and
|
|
67
|
+
recommends `yolo` or `corps` plus gate overlays. It writes `workflow_recommendation.json`.
|
|
68
|
+
- **Execution profiles.** `xflow profile show|set` handles personal and team execution modes and provider
|
|
69
|
+
preferences.
|
|
70
|
+
- **Comparisons.** `xflow compare super-assistant` is new, next to the Superpowers, OpenSpec, gstack,
|
|
71
|
+
spec-kit and Codex goal comparisons.
|
|
72
|
+
- **New README.** It covers the problem, a demo GIF recorded from a real run, a 3-minute start and
|
|
73
|
+
single-gate usage (`xflow atom run I6a.tdd.run ...`).
|
|
74
|
+
|
|
75
|
+
### Packaging
|
|
76
|
+
|
|
77
|
+
- `package.json` now has `repository`, `homepage`, `bugs`, `keywords`, `author`,
|
|
78
|
+
`engines.node >= 22.5` (`node:sqlite`) and `publishConfig.access = public`.
|
|
79
|
+
- Install docs and the CLI's copy-paste commands now use `npm install -g @surlymochan/openflow`.
|
|
80
|
+
- `xflow serve` no longer points to an unpublished server repository.
|
|
81
|
+
- Fixed an uncaught `EPIPE` in `agent_invoke` when an agent CLI exits without reading stdin.
|
|
82
|
+
|
|
83
|
+
### Verified for this release
|
|
84
|
+
|
|
85
|
+
- `npm test`: 275 passed, 1 skipped, 0 failed (Node 22, Playwright Chromium installed).
|
|
86
|
+
- `npm run drift:scan`: 9/9.
|
|
87
|
+
- `npm publish --dry-run`: `@surlymochan/openflow@0.2.0`, 187 files, about 321 kB.
|
|
88
|
+
- Clean install from the packed tarball into an empty project: `xflow init`, `goal set`, `doctor` and
|
|
89
|
+
`workflow validate yolo` all pass.
|
|
90
|
+
|
|
91
|
+
## 0.1.0 - Public Readiness Candidate
|
|
92
|
+
|
|
93
|
+
This release turns `openflow` from a local skill/workflow repo into a package-ready workflow runtime for AI coding agents.
|
|
94
|
+
|
|
95
|
+
### Highlights
|
|
96
|
+
|
|
97
|
+
- CLI package entry: `xflow` is exposed through `bin/xflow.js`.
|
|
98
|
+
- First-run loop: `xflow guide`, `xflow demo clean`, `xflow init`, `xflow doctor`, and `xflow workflow validate yolo`.
|
|
99
|
+
- Executable workflow data: `workflows/yolo.yaml` and `workflows/corps.yaml` are schema-validated.
|
|
100
|
+
- TDD enforcement: red proof, green proof, and changed-test quality review are separate gates.
|
|
101
|
+
- Spec durability: `xflow spec delta` and `xflow spec openspec-map` create local review/migration artifacts.
|
|
102
|
+
- Competitive proof: `xflow score`, `xflow compare openspec`, and `xflow compare spec-kit`.
|
|
103
|
+
- Adapter entrypoints: `xflow adapter import-file` and `xflow adapter github-issue` import external tracker context into local change artifacts.
|
|
104
|
+
- Public release gate: `npm run publish:check` runs tests, drift scan, skill diff, package dry-run, and npm publish dry-run.
|
|
105
|
+
|
|
106
|
+
### Adapter Commands
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
xflow adapter import-file --input docs/fixtures/tracker-item.json --json
|
|
110
|
+
xflow adapter github-issue --repo owner/name --issue 123 --project-root .
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Adapters are intentionally thin. They copy source context into `specs/changes/<change-id>/proposal.md` and `status.json`; they do not make GitHub, Linear, Jira, or any tracker the workflow source of truth.
|
|
114
|
+
|
|
115
|
+
### Required Proof Before Real Publish
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npm run publish:check
|
|
119
|
+
xflow score
|
|
120
|
+
xflow compare openspec
|
|
121
|
+
xflow compare spec-kit
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
`npm publish --access public` is the only remaining registry-mutating step. It requires an authenticated npm session and should only run after the dry-run gate is green.
|