@rsaglobaltech/specgate 0.25.0 → 0.27.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 +87 -42
- package/README.md +6 -0
- package/dist/packages/core/src/domain/AgentPrompt.js +12 -0
- package/dist/packages/core/src/domain/AgentPrompt.js.map +1 -1
- package/dist/packages/core/src/domain/ChangeMeasures.js +198 -0
- package/dist/packages/core/src/domain/ChangeMeasures.js.map +1 -0
- package/dist/packages/core/src/domain/Clarification.js +5 -0
- package/dist/packages/core/src/domain/Clarification.js.map +1 -1
- package/dist/packages/core/src/domain/ConventionalCommit.js +73 -0
- package/dist/packages/core/src/domain/ConventionalCommit.js.map +1 -0
- package/dist/packages/core/src/domain/HarnessConfig.js.map +1 -1
- package/dist/packages/core/src/domain/HarnessReport.js +2 -0
- package/dist/packages/core/src/domain/HarnessReport.js.map +1 -1
- package/dist/packages/core/src/domain/QualityChecks.js +218 -0
- package/dist/packages/core/src/domain/QualityChecks.js.map +1 -0
- package/dist/packages/core/src/domain/QualitySummary.js +58 -0
- package/dist/packages/core/src/domain/QualitySummary.js.map +1 -0
- package/dist/packages/core/src/domain/RequirementPlan.js +11 -0
- package/dist/packages/core/src/domain/RequirementPlan.js.map +1 -1
- package/dist/packages/core/src/domain/Sarif.js +121 -0
- package/dist/packages/core/src/domain/Sarif.js.map +1 -0
- package/dist/packages/core/src/infrastructure/ChangeWorkspace.js +15 -3
- package/dist/packages/core/src/infrastructure/ChangeWorkspace.js.map +1 -1
- package/dist/packages/core/src/infrastructure/GitContributionStager.js +1 -1
- package/dist/packages/core/src/infrastructure/GitContributionStager.js.map +1 -1
- package/dist/packages/core/src/infrastructure/HarnessConfigFile.js +26 -0
- package/dist/packages/core/src/infrastructure/HarnessConfigFile.js.map +1 -1
- package/dist/packages/core/src/infrastructure/IdsAcrossBranches.js +4 -1
- package/dist/packages/core/src/infrastructure/IdsAcrossBranches.js.map +1 -1
- package/dist/packages/core/src/infrastructure/QualityBaselineFile.js +67 -0
- package/dist/packages/core/src/infrastructure/QualityBaselineFile.js.map +1 -0
- package/dist/packages/core/test/unit/rework.test.js +62 -0
- package/dist/packages/core/test/unit/rework.test.js.map +1 -0
- package/dist/scripts/cli/commands/change/ChangeCommand.js +38 -1
- package/dist/scripts/cli/commands/change/ChangeCommand.js.map +1 -1
- package/dist/scripts/cli/commands/change/TicketCommand.js +1 -1
- package/dist/scripts/cli/commands/change/TicketCommand.js.map +1 -1
- package/dist/scripts/cli/commands/harness/RunCommand.js +269 -17
- package/dist/scripts/cli/commands/harness/RunCommand.js.map +1 -1
- package/dist/scripts/cli/commands/quality/CheckCommand.js +54 -3
- package/dist/scripts/cli/commands/quality/CheckCommand.js.map +1 -1
- package/dist/scripts/cli/commands/quality/QualityCommand.js +314 -0
- package/dist/scripts/cli/commands/quality/QualityCommand.js.map +1 -0
- package/dist/scripts/cli/commands/spec/DoneCommand.js +4 -1
- package/dist/scripts/cli/commands/spec/DoneCommand.js.map +1 -1
- package/dist/scripts/cli/commands/spec/DraftCommand.js +44 -4
- package/dist/scripts/cli/commands/spec/DraftCommand.js.map +1 -1
- package/dist/scripts/cli/commands/spec/StatusCommand.js +5 -1
- package/dist/scripts/cli/commands/spec/StatusCommand.js.map +1 -1
- package/dist/scripts/cli/commands/spec/StudioCommand.js +208 -1
- package/dist/scripts/cli/commands/spec/StudioCommand.js.map +1 -1
- package/dist/scripts/docs/nav.js +13 -2
- package/dist/scripts/docs/nav.js.map +1 -1
- package/dist/scripts/docs/record-journey.js +1 -0
- package/dist/scripts/docs/record-journey.js.map +1 -1
- package/dist/scripts/docs/record-terminal.js +18 -0
- package/dist/scripts/docs/record-terminal.js.map +1 -1
- package/dist/scripts/draft/drafting-guide.js +11 -1
- package/dist/scripts/draft/drafting-guide.js.map +1 -1
- package/dist/scripts/harness/prompt.js +4 -0
- package/dist/scripts/harness/prompt.js.map +1 -1
- package/dist/scripts/harness/report.js +13 -0
- package/dist/scripts/harness/report.js.map +1 -1
- package/dist/scripts/lib/change-review.js +145 -0
- package/dist/scripts/lib/change-review.js.map +1 -0
- package/dist/scripts/lib/clarification.js +24 -5
- package/dist/scripts/lib/clarification.js.map +1 -1
- package/dist/scripts/lib/harness-guard.js +18 -0
- package/dist/scripts/lib/harness-guard.js.map +1 -1
- package/dist/scripts/lib/in-flight.js +17 -11
- package/dist/scripts/lib/in-flight.js.map +1 -1
- package/dist/scripts/lib/live-model.js +7 -1
- package/dist/scripts/lib/live-model.js.map +1 -1
- package/dist/scripts/lib/live-page.js +72 -11
- package/dist/scripts/lib/live-page.js.map +1 -1
- package/dist/scripts/lib/quality-presets.js +378 -0
- package/dist/scripts/lib/quality-presets.js.map +1 -0
- package/dist/scripts/lib/quality-run.js +579 -0
- package/dist/scripts/lib/quality-run.js.map +1 -0
- package/dist/scripts/lib/screen-requirements.js +149 -0
- package/dist/scripts/lib/screen-requirements.js.map +1 -0
- package/dist/scripts/lib/sonar-local.js +308 -0
- package/dist/scripts/lib/sonar-local.js.map +1 -0
- package/dist/scripts/lib/studio-app-page.js +1023 -0
- package/dist/scripts/lib/studio-app-page.js.map +1 -0
- package/dist/scripts/lib/studio-app.js +442 -0
- package/dist/scripts/lib/studio-app.js.map +1 -0
- package/dist/scripts/lib/studio-route.js +996 -0
- package/dist/scripts/lib/studio-route.js.map +1 -0
- package/dist/scripts/lib/surface.js +11 -0
- package/dist/scripts/lib/surface.js.map +1 -1
- package/dist/scripts/lib/ticket-keys.js +1 -1
- package/dist/scripts/lib/ticket-keys.js.map +1 -1
- package/dist/scripts/quality.js +10 -0
- package/dist/scripts/quality.js.map +1 -0
- package/package.json +1 -1
- package/templates/harness/harness.config.yaml.tpl +10 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,72 @@ The release process is in [`docs/release-process.md`](docs/release-process.md).
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [0.27.1] — 2026-10-28
|
|
13
|
+
|
|
14
|
+
0.27.0 reached ghcr.io only: its npm and GitHub Packages publish stopped on a quality check that failed on CI runners. This is that release, with the fix and the studio's new-project step working in an empty folder.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **A quality check run as the person has a home it can write**: in Docker on Linux, a check runs with your uid, and Semgrep failed when that uid was not the image's own user (uid 1001 on a CI runner) because it could not create its cache in `/`. It now runs with `HOME=/tmp`.
|
|
19
|
+
- **The studio stays up in an empty folder** (REQ-213): any request it does not serve, such as the browser's own `/favicon.ico`, made it read the matrix and exit when there was none, so the new-project step died on its first load. It answers 404 until the project exists. The step also says it asks five questions, not four.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- **The documentation shows the quality checks and the studio**: a band for each on the landing page, the studio under Start with a screenshot of every step, and the gate's section named after the tools it runs.
|
|
24
|
+
|
|
25
|
+
## [0.27.0] — 2026-10-28
|
|
26
|
+
|
|
27
|
+
Quality, not only tests: your team's checks in the gate — coverage and mutation of the lines a change adds, SpotBugs, PMD, Semgrep, secrets, dependencies, SonarQube and Conventional Commits — each in Docker, without an account, and only what a change adds fails.
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- **Quality and security checks in the gate** (REQ-218, REQ-219, ADR-0040): `checks:` in `harness.config.yaml` names your team's tools — each with `when` (attempt, end, ci), whether it gates, and how it runs (Docker by default, local or auto). `check` runs them after the tests, `check --ci` adds the CI-only ones and fails a check that cannot run, and the harness runs them per attempt and before a requirement is kept.
|
|
32
|
+
- **Only what a change adds fails** (REQ-222, REQ-223): SARIF findings are compared with `.specgate/quality-baseline.json`; `specgate quality baseline --accept` records today's debt. Diff coverage (JaCoCo, LCOV, Cobertura) and mutation score (PIT, Stryker) are measured on the lines the change touched, against `diff_coverage` and `mutation_score`.
|
|
33
|
+
- **Presets for Maven, Gradle and Node** (REQ-225, REQ-230): `specgate quality init [--level basic|strict]` writes the checks for the stack it detects — JaCoCo, PIT, SpotBugs, PMD, Semgrep, gitleaks, osv-scanner, Vitest/Stryker — all in pinned Docker images, with dependency caches in named volumes. `quality list`, `quality doctor [--pull]` and `quality run` show and run them.
|
|
34
|
+
- **Conventional Commits** (REQ-234): `builtin:commits` checks each commit of the change against Conventional Commits 1.0.0, with `commit_types` to set the types.
|
|
35
|
+
- **SonarQube without an account** (REQ-226): `builtin:sonar` starts SonarQube Community in Docker on 127.0.0.1, analyses the change and judges its issues like any SARIF; the token stays in `.specgate/sonar.local`, ignored by git.
|
|
36
|
+
- **An agent that reviews** (REQ-227): `builtin:review` and `builtin:adversary` run a profile as reviewer of the diff; its verdict gates or advises.
|
|
37
|
+
- **Architecture as findings** (REQ-231): with `arch_sarif:`, only an architecture violation the change adds fails.
|
|
38
|
+
- **The quality of what was delivered** (REQ-220, REQ-221, REQ-228, REQ-229): each run record keeps its checks; `harness report` and the studio's report show diff coverage, mutation score and findings per requirement; the studio's Project page lists the checks and its new-project step asks for the level.
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- **Commit messages follow Conventional Commits** (REQ-234): a failed attempt is committed as `chore(REQ-NNN): attempt FAILED the gate` (resume still reads the old `wip` form), a green one as `feat(REQ-NNN): …`, and the agent's prompt asks for the same.
|
|
43
|
+
|
|
44
|
+
- **The studio commits the specification before a build** (REQ-233): the brief, approvals, answers and drafts the studio wrote are committed with the person's own git identity, so the harness finds the clean tree it needs. Any other uncommitted file stops the build, named, and is never committed.
|
|
45
|
+
|
|
46
|
+
## [0.26.0] — 2026-10-27
|
|
47
|
+
|
|
48
|
+
The studio becomes an app: from an empty folder to the report of what was built, step by step, without the commands. And a clean slate: everything a brief-to-app run left on the list, the test suite green on Windows.
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- **The studio is an app you use without the commands** (REQ-204): `specgate studio` opens on a route of seven steps — Project, Brief, Drafts, Questions, Review, Build, Report — each done, current or locked as the project's files say, with one next action (REQ-212). A simple mode hides the commands and an advanced one shows each action's; Spanish and English. Every write is a POST with the page's token; the overview it replaced is at `/overview`.
|
|
53
|
+
- **A project from an empty folder** (REQ-213): four questions — name, web/API/mobile, stack, agent — and the studio runs `specgate init`, writes the harness configuration and the agent's profiles, a brief to fill and a first commit. A folder with files is left alone, with the command that adopts it.
|
|
54
|
+
- **The brief as a form** (REQ-214): product, who uses it, and per module its rules, examples and open questions, saved into `docs/brief.md` keeping every other line; markdown in advanced mode; the brief rules come back with each save. A client's text can be pasted for the agent to structure (REQ-215).
|
|
55
|
+
- **Drafting each module from the studio** (REQ-216): in the background, one at a time, with its progress and the checklist in plain words, and a way to stop it.
|
|
56
|
+
- **Review and approve a draft** (REQ-206, REQ-207): `specgate change approve <id>` records that a person approved it, refused while the checklist has errors or a question is open; `specgate change note <id> "<text>" --req REQ-x` asks for a change in your words. Review in the studio does both.
|
|
57
|
+
- **Build from the studio** (REQ-208, REQ-209): what is ready, an estimate, the harness started in the background, its steps in plain words, and a stop that takes effect after the requirement in progress. Answering a question releases the requirements it held (REQ-210).
|
|
58
|
+
- **The agent chosen per run** (REQ-211): `harness run --profile <name>` and `propose --from-brief --profile <name>` run that profile of `.harness/profiles.yaml`; the studio lists the profiles with their cost hint and whether they stream usage.
|
|
59
|
+
- **The report** (REQ-217): what was built of the total, each requirement with the scenario that proves it, what is missing and why, the decisions taken, cost and time; downloadable as one HTML page.
|
|
60
|
+
- **Answer a question from the live view** (REQ-201): under each question the agent asked, Needs attention has a form to answer it and then mark it reviewed. The write, `POST /live/answer`, goes through the same code as `specgate answer` and needs the token its own page carries, a JSON body and a loopback origin; any other method than GET or HEAD gets 405.
|
|
61
|
+
- **Every open question in the live view** (REQ-203): an Open questions section lists what `specgate questions` lists, each with the same form, so drafts' questions are answered from studio too; a question the agent asked shows as waiting for an answer, not as a failure.
|
|
62
|
+
- **A requirement used on a screen needs an end-to-end test** (REQ-199): with `e2e_dir` in `harness.config.yaml`, a requirement whose actor uses web, mobile, tablet or desktop passes the gate only once a file there names it, and its prompt says so.
|
|
63
|
+
- **A requirement an open change modifies is reworked** (REQ-198): the harness gives it `NEEDS_REWORK` instead of `NEEDS_STATUS_UPDATE`, and its prompt says the tests and code are for the old text.
|
|
64
|
+
|
|
65
|
+
### Changed
|
|
66
|
+
|
|
67
|
+
- **The harness template shows the streaming agent** (REQ-200): the Claude Code command that feeds studio's live view, and `e2e_dir`.
|
|
68
|
+
- **Opening a module says which drafts stop growing** (REQ-197).
|
|
69
|
+
- **Status names the module** of the next use case (REQ-193), and **DRAFTING.md gives the draft's real limit** with how to grow it (REQ-194).
|
|
70
|
+
|
|
71
|
+
### Fixed
|
|
72
|
+
|
|
73
|
+
- **The dry run names the agent only when one is set**, so `harness prompt` prints no `Agent none`.
|
|
74
|
+
- **The Cucumber gate on Windows** (REQ-196): the message stream went to a path Cucumber did not write, so a filter matching nothing passed. The four tests that failed only on Windows pass, tests remove their temp folders, and `docs:terminal` / `docs:journey` say they need a POSIX shell.
|
|
75
|
+
- **Ids reserved from a mention** (REQ-202): "GIVEN REQ-999 is defined nowhere" in a scenario made the next change start at REQ-1000; only headings, matrix rows and `req_range` count now.
|
|
76
|
+
- **No inline code split across changelog lines** (REQ-195), checked by a test.
|
|
77
|
+
|
|
12
78
|
## [0.25.0] — 2026-10-27
|
|
13
79
|
|
|
14
80
|
Questions you answer with a command, and a specification that evolves without copying by hand: what taking a brief to a delivered app asked for.
|
|
@@ -113,8 +179,7 @@ What a first project from a brief tripped over, from statuses to the harness's f
|
|
|
113
179
|
|
|
114
180
|
### Fixed
|
|
115
181
|
|
|
116
|
-
- **Approved owes a test, as the strict gate says** (REQ-173): `apply
|
|
117
|
-
--status Approved` wrote Approved on a requirement no test named, and the
|
|
182
|
+
- **Approved owes a test, as the strict gate says** (REQ-173): `apply --status Approved` wrote Approved on a requirement no test named, and the
|
|
118
183
|
next `validate --strict` failed TDD-1 for the whole project, so every
|
|
119
184
|
`harness run` went red whatever requirement it worked on. `apply` and `done`
|
|
120
185
|
now refuse it with the TDD-1 reason and the fix, as they already did for
|
|
@@ -260,8 +325,7 @@ ticket to Done, the board moved by its own automation.
|
|
|
260
325
|
|
|
261
326
|
### Changed
|
|
262
327
|
|
|
263
|
-
- **A draft is not opened over a broken brief.** `propose --from-brief
|
|
264
|
-
<module>` refuses with `brief_not_ready` while the brief has an error: an
|
|
328
|
+
- **A draft is not opened over a broken brief.** `propose --from-brief <module>` refuses with `brief_not_ready` while the brief has an error: an
|
|
265
329
|
empty body, an empty module section, a module without its section once the
|
|
266
330
|
brief uses sections, or rules without examples. A brief with no module
|
|
267
331
|
sections — a pasted email — drafts as before.
|
|
@@ -446,8 +510,7 @@ while it works (ADR-0037).
|
|
|
446
510
|
first. forja is fetched with `npx` only when chosen, so Specgate keeps zero
|
|
447
511
|
runtime dependencies; `SPECGATE_FORJA_CMD` points at another forja.
|
|
448
512
|
- **`specgate add usecase|entity|port`** in a forja project: the class where the
|
|
449
|
-
architecture expects it, its test and its wiring, through `forja add`; `add
|
|
450
|
-
usecase` also creates the requirement and names it in the test. Outside a forja
|
|
513
|
+
architecture expects it, its test and its wiring, through `forja add`; `add usecase` also creates the requirement and names it in the test. Outside a forja
|
|
451
514
|
project it says to use `new`. In a forja project, `status` suggests it as the
|
|
452
515
|
next step for a requirement with no code.
|
|
453
516
|
- **`arch_cmd`: your architecture check in the gate** ([ADR-0028](docs/specs/adr/0028-architecture-conformance-is-part-of-the-gate.md), points 1–2).
|
|
@@ -837,8 +900,7 @@ From a second and third cycle on the same product (reservas_app), on 0.17.1.
|
|
|
837
900
|
archiving names the scenarios it lacks (`archive_feature_stale`).
|
|
838
901
|
- **`plan` and `status` agree with `validate` about untested scenarios.** A
|
|
839
902
|
requirement with two scenarios no test named was "Ready to close — its test
|
|
840
|
-
is in place", and `NEEDS_STATUS_UPDATE` to the harness, while `validate
|
|
841
|
-
--strict` said "Nothing proves" them. It is now `NEEDS_TEST`.
|
|
903
|
+
is in place", and `NEEDS_STATUS_UPDATE` to the harness, while `validate --strict` said "Nothing proves" them. It is now `NEEDS_TEST`.
|
|
842
904
|
- **`draft --check`:** a requirement can say it lives on one surface
|
|
843
905
|
(`surfaces=web` in its trace), so a menu is not asked for an API scenario
|
|
844
906
|
(D3); a value already in the project's specification — reviewed in an
|
|
@@ -863,8 +925,7 @@ From a second and third cycle on the same product (reservas_app), on 0.17.1.
|
|
|
863
925
|
Found building a second real product from a client brief (reservas_app,
|
|
864
926
|
written in Spanish).
|
|
865
927
|
|
|
866
|
-
- **A draft archives into feature files, in its own language.** `change
|
|
867
|
-
archive` wrote no `.feature` for a requirement whose trace named none — a
|
|
928
|
+
- **A draft archives into feature files, in its own language.** `change archive` wrote no `.feature` for a requirement whose trace named none — a
|
|
868
929
|
draft that passed `draft --check` archived with "0 materialised". Each
|
|
869
930
|
requirement with scenarios now gets `features/<capability>/<REQ>.feature`.
|
|
870
931
|
Scenarios written with `DADO / CUANDO / ENTONCES` become Spanish Gherkin
|
|
@@ -887,8 +948,7 @@ archive` wrote no `.feature` for a requirement whose trace named none — a
|
|
|
887
948
|
without saying which, or how. The warning now names the detected command and
|
|
888
949
|
the one line that turns it on (`specgate harness init`). The first gate after
|
|
889
950
|
adoption still checks the specification only, as documented.
|
|
890
|
-
- **`draft --check`:** an answered question (an `Answer` column, or `Answer
|
|
891
|
-
(Q1): …` below the table) no longer keeps its requirement waiting; a value
|
|
951
|
+
- **`draft --check`:** an answered question (an `Answer` column, or `Answer (Q1): …` below the table) no longer keeps its requirement waiting; a value
|
|
892
952
|
repeated in a scenario is one finding, not one per mention; "responsive" is
|
|
893
953
|
not read as a promised response time, and `px` is a unit.
|
|
894
954
|
- **`status` shows the title of a requirement archived from a change** instead
|
|
@@ -979,8 +1039,7 @@ archive` wrote no `.feature` for a requirement whose trace named none — a
|
|
|
979
1039
|
(`openspec:<capability>/<requirement>/<scenario>`), while the suite is red
|
|
980
1040
|
(`--run`), or after a scenario's text changed since `--record` pinned it.
|
|
981
1041
|
`--since <ref>` gates only claims made after the ref, so adopting it never
|
|
982
|
-
fails a project for its past. `--ids` prints the ids to name; `--format
|
|
983
|
-
github` annotates the spec lines; `actions/verify` runs it on pull requests.
|
|
1042
|
+
fails a project for its past. `--ids` prints the ids to name; `--format github` annotates the spec lines; `actions/verify` runs it on pull requests.
|
|
984
1043
|
Read against OpenSpec's own repository: 747 scenarios, 108 claims, including
|
|
985
1044
|
its archived history from before the structured format.
|
|
986
1045
|
|
|
@@ -1069,8 +1128,7 @@ Found adopting the Golden State Reinforcing app with six domain packs on the
|
|
|
1069
1128
|
published 0.14.1:
|
|
1070
1129
|
|
|
1071
1130
|
- **A pack keeps a generated matrix generated.** Installing a pack wrote
|
|
1072
|
-
matrix rows and turned the project back into a hand-kept matrix; `matrix
|
|
1073
|
-
--migrate` then wrote 47 placeholder sections into `spec.md` titled after
|
|
1131
|
+
matrix rows and turned the project back into a hand-kept matrix; `matrix --migrate` then wrote 47 placeholder sections into `spec.md` titled after
|
|
1074
1132
|
use cases. Now each requirement's use case, command, aggregate, event and
|
|
1075
1133
|
context go into the `csda:trace` of its section — the pack's capability
|
|
1076
1134
|
spec, or a new `spec.md` section carrying the pack's own description — and
|
|
@@ -1084,8 +1142,7 @@ published 0.14.1:
|
|
|
1084
1142
|
- **The harness runs each requirement once.** It processed one plan row per
|
|
1085
1143
|
scenario: a requirement with two scenarios ran two paid agent sessions on
|
|
1086
1144
|
the same branch.
|
|
1087
|
-
- **`setup_cmd`** prepares each fresh worktree before the agent (`harness
|
|
1088
|
-
init` proposes `npm ci` / `pnpm install` / `yarn install` from the
|
|
1145
|
+
- **`setup_cmd`** prepares each fresh worktree before the agent (`harness init` proposes `npm ci` / `pnpm install` / `yarn install` from the
|
|
1089
1146
|
lockfile), so the agent can run the tests it writes and `check` no longer
|
|
1090
1147
|
needs `npm ci` in `test_cmd`. The generated prompt prefix teaches linking by
|
|
1091
1148
|
mention instead of "the test named in the matrix".
|
|
@@ -1282,8 +1339,7 @@ Found by following the documentation step by step on the published 0.13.0:
|
|
|
1282
1339
|
`fix`, `plan`, `report`, `req list/done/rm`, `config`, `schema`,
|
|
1283
1340
|
`completion`, `studio`, `onboard` — take it from 14 to 34 of 60 commands, and
|
|
1284
1341
|
offline journeys for packs — `specops add/diff/sync/remove` against a local
|
|
1285
|
-
git remote with tags, `pack bundle` for an air-gapped install, `pack
|
|
1286
|
-
init/lint/infer`, `expand` — to 43, and the change cycle (`new` → `archive`
|
|
1342
|
+
git remote with tags, `pack bundle` for an air-gapped install, `pack init/lint/infer`, `expand` — to 43, and the change cycle (`new` → `archive`
|
|
1287
1343
|
→ delivered with `done`), `change author` reverting an agent's write outside
|
|
1288
1344
|
the change, `harness init/prompt/run/report` and `specops contribute` to 55.
|
|
1289
1345
|
|
|
@@ -1585,8 +1641,7 @@ Agent files generated by earlier versions are named `csda`; run
|
|
|
1585
1641
|
- **`git worktree add` raced itself under `--concurrency`.** Each requirement
|
|
1586
1642
|
runs in its own process and every one creates a worktree in the same
|
|
1587
1643
|
repository; git writes `.git/worktrees/<name>/` incrementally, so a sibling
|
|
1588
|
-
read an entry that was half there and failed with `failed to read …
|
|
1589
|
-
/commondir`. Worse, the failure was _attributed_: the run reported the
|
|
1644
|
+
read an entry that was half there and failed with `failed to read … /commondir`. Worse, the failure was _attributed_: the run reported the
|
|
1590
1645
|
requirement as failed with "the agent produced no files", so a race in the
|
|
1591
1646
|
harness read as the agent's fault.
|
|
1592
1647
|
|
|
@@ -1680,8 +1735,7 @@ the one that finishes the rename past the layer where it had stopped.
|
|
|
1680
1735
|
`ghcr.io/<owner>/specgate`. Images already published as `csda` are never
|
|
1681
1736
|
rebuilt in place and keep working.
|
|
1682
1737
|
|
|
1683
|
-
`docs/release-process.md` gains the one-time cutover: the exact `npm
|
|
1684
|
-
deprecate` invocation for `create-spec-driven-app`, why the old package is
|
|
1738
|
+
`docs/release-process.md` gains the one-time cutover: the exact `npm deprecate` invocation for `create-spec-driven-app`, why the old package is
|
|
1685
1739
|
deprecated and never unpublished (npm blocks reusing an unpublished name, and
|
|
1686
1740
|
a pinned dependency would break for no gain), and the sequencing constraint —
|
|
1687
1741
|
the rename and the release that publishes `specgate` are one event, because
|
|
@@ -1728,8 +1782,7 @@ deliberately _not_ built, is [ADR-0023](docs/specs/adr/0023-checking-content-gat
|
|
|
1728
1782
|
a response clause reliably, and a check claiming a grammar it cannot parse is
|
|
1729
1783
|
the H13 mistake. These two rules are what a regex can assert honestly.
|
|
1730
1784
|
|
|
1731
|
-
The point is upstream of any code checking: `- Max 5 failed attempts per hour
|
|
1732
|
-
per user` is not something a machine can hold code to. RFC 2119 detection also
|
|
1785
|
+
The point is upstream of any code checking: `- Max 5 failed attempts per hour per user` is not something a machine can hold code to. RFC 2119 detection also
|
|
1733
1786
|
stops being duplicated — `DeltaSpec` enforced it for requirements inside a
|
|
1734
1787
|
change while a capability spec at rest was never checked; both now read one
|
|
1735
1788
|
definition.
|
|
@@ -1765,8 +1818,7 @@ per user` is not something a machine can hold code to. RFC 2119 detection also
|
|
|
1765
1818
|
different values here, on purpose.
|
|
1766
1819
|
|
|
1767
1820
|
- **`csda change new <id> --from-value-drift <REQ-ID>:<value_id>`** turns a
|
|
1768
|
-
diverging value into a reviewable change. It writes a `## MODIFIED
|
|
1769
|
-
Requirements` delta carrying the full requirement, with the structured
|
|
1821
|
+
diverging value into a reviewable change. It writes a `## MODIFIED Requirements` delta carrying the full requirement, with the structured
|
|
1770
1822
|
`value_<id>` rewritten to the value the code declares.
|
|
1771
1823
|
|
|
1772
1824
|
**The prose is left alone.** Turning "expires after 15 minutes" into "after
|
|
@@ -1870,8 +1922,7 @@ Requirements` delta carrying the full requirement, with the structured
|
|
|
1870
1922
|
|
|
1871
1923
|
- **`specgate adopt` did not run at all.** `templates/adopt/spec.md.tpl` asks
|
|
1872
1924
|
for `{{PROPOSED_REQUIREMENTS}}` and nothing supplied it, so the brownfield
|
|
1873
|
-
entry point died on `Missing variable 'PROPOSED_REQUIREMENTS' required by
|
|
1874
|
-
template` for every repository.
|
|
1925
|
+
entry point died on `Missing variable 'PROPOSED_REQUIREMENTS' required by template` for every repository.
|
|
1875
1926
|
|
|
1876
1927
|
Two parallel branches caused it. P6 taught `adopt` to seed one requirement per
|
|
1877
1928
|
capability `onboard` reads off the layout, and added `--monorepo` and
|
|
@@ -1971,8 +2022,7 @@ H16, all four measured before anything was written and reproduced after.
|
|
|
1971
2022
|
is the gradual path for a repository brought in with `csda adopt`.
|
|
1972
2023
|
|
|
1973
2024
|
- **`csda harness run --skip-not-ready`** skips a requirement an agent could not
|
|
1974
|
-
succeed at — no feature file, unmet dependencies, `Deprecated`, or `Needs
|
|
1975
|
-
Clarification`. `csda plan --format json` now carries `ready` and `blockers[]`
|
|
2025
|
+
succeed at — no feature file, unmet dependencies, `Deprecated`, or `Needs Clarification`. `csda plan --format json` now carries `ready` and `blockers[]`
|
|
1976
2026
|
per requirement, each blocker with a fix. Default is to warn and run it
|
|
1977
2027
|
anyway; an unrunnable scenario skips regardless, because an empty scenario
|
|
1978
2028
|
passes and a green run over one proves nothing.
|
|
@@ -2004,8 +2054,7 @@ Clarification`. `csda plan --format json` now carries `ready` and `blockers[]`
|
|
|
2004
2054
|
or let the harness add the flag to a direct `cucumber-js` invocation.
|
|
2005
2055
|
|
|
2006
2056
|
- **`csda harness report`** gains where attempts end, which requirements spend
|
|
2007
|
-
every attempt, a series over time, and `--mark-false-failure REQ-NNN --reason
|
|
2008
|
-
"…"`. The real-failure rate reads `—` until somebody marks one: nothing
|
|
2057
|
+
every attempt, a series over time, and `--mark-false-failure REQ-NNN --reason "…"`. The real-failure rate reads `—` until somebody marks one: nothing
|
|
2009
2058
|
recorded can tell a gate that was wrong from work that was.
|
|
2010
2059
|
|
|
2011
2060
|
- **`depends_on`** on a pack's requirements. The harness cuts a dependent's
|
|
@@ -2054,8 +2103,7 @@ Clarification`. `csda plan --format json` now carries `ready` and `blockers[]`
|
|
|
2054
2103
|
installer's did not.
|
|
2055
2104
|
|
|
2056
2105
|
- **`parseYamlLite` split inline sequences on every comma**, including the ones
|
|
2057
|
-
inside quotes, so `responsibilities: ["Invoice line items, totals, status,
|
|
2058
|
-
aging"]` parsed as four items carrying stray quote characters.
|
|
2106
|
+
inside quotes, so `responsibilities: ["Invoice line items, totals, status, aging"]` parsed as four items carrying stray quote characters.
|
|
2059
2107
|
|
|
2060
2108
|
### Security
|
|
2061
2109
|
|
|
@@ -2111,8 +2159,7 @@ date.
|
|
|
2111
2159
|
28 scenarios under `packs/**` wrote their keywords in upper case —
|
|
2112
2160
|
`GIVEN` / `WHEN` / `THEN` — and Gherkin keywords are case-sensitive. Cucumber
|
|
2113
2161
|
read those lines as the scenario's _description_, so the scenario existed with
|
|
2114
|
-
**zero steps**, and an empty scenario passes: `1 scenario (1 passed) · 0 steps
|
|
2115
|
-
· exit 0`.
|
|
2162
|
+
**zero steps**, and an empty scenario passes: `1 scenario (1 passed) · 0 steps · exit 0`.
|
|
2116
2163
|
|
|
2117
2164
|
Every project seeded with `csda specops add` therefore inherited an acceptance
|
|
2118
2165
|
criterion that approves anything, and a harness run over those requirements
|
|
@@ -2141,8 +2188,7 @@ date.
|
|
|
2141
2188
|
full agent run with `--keep-worktrees`, fifteen minutes to recover what the
|
|
2142
2189
|
first run already had.
|
|
2143
2190
|
|
|
2144
|
-
The attempt is now committed on the branch with a `wip(REQ-NNN): FAILED the
|
|
2145
|
-
gate — do not merge as is` subject. The requirement stays `Draft`, because
|
|
2191
|
+
The attempt is now committed on the branch with a `wip(REQ-NNN): FAILED the gate — do not merge as is` subject. The requirement stays `Draft`, because
|
|
2146
2192
|
`csda done` never ran, so nothing about the matrix claims the work is good. A
|
|
2147
2193
|
human reads it and decides; git just stops throwing it away. The report says
|
|
2148
2194
|
whether the work was preserved, and distinguishes that from an agent that
|
|
@@ -2538,8 +2584,7 @@ and brownfield onboarding have all landed since.
|
|
|
2538
2584
|
|
|
2539
2585
|
### Added
|
|
2540
2586
|
|
|
2541
|
-
- **Change lifecycle** — `csda change new | list | show | status | validate |
|
|
2542
|
-
archive`. Modify a spec that already shipped through a reviewable delta.
|
|
2587
|
+
- **Change lifecycle** — `csda change new | list | show | status | validate | archive`. Modify a spec that already shipped through a reviewable delta.
|
|
2543
2588
|
Archiving merges it into the spec tree, writes the traceability rows and
|
|
2544
2589
|
materialises the feature files.
|
|
2545
2590
|
- **`csda change instructions <artifact>`** — the single context engine.
|
package/README.md
CHANGED
|
@@ -89,6 +89,12 @@ you have:
|
|
|
89
89
|
- **Unattended delivery.** `specgate harness run` hands each pending requirement
|
|
90
90
|
to your coding agent in its own git worktree and keeps only what passes the
|
|
91
91
|
gate. → [The harness](docs/harness.md)
|
|
92
|
+
- **Quality, not only tests.** Coverage and mutation of the lines a change adds,
|
|
93
|
+
SpotBugs, PMD, Semgrep, secrets, dependencies, SonarQube and Conventional
|
|
94
|
+
Commits — each in Docker, no account, only new findings fail.
|
|
95
|
+
→ [Quality and security checks](docs/quality.md)
|
|
96
|
+
- **Without the commands.** `specgate studio` is the whole path as an app: from
|
|
97
|
+
an empty folder to the report of what was built. → [The studio](docs/studio.md)
|
|
92
98
|
- **Domain knowledge as a dependency.** Versioned domain packs install
|
|
93
99
|
requirements a team has already proved. → [Domain packs](docs/domain-packs.md)
|
|
94
100
|
- **Already on OpenSpec?** `specgate verify` checks what OpenSpec calls done
|
|
@@ -24,7 +24,19 @@ class AgentPrompt {
|
|
|
24
24
|
`- Test artifact (write this first — TDD): ${field("testArtifact", "test_artifact") || "(none declared)"}`,
|
|
25
25
|
`- Production artifact: ${field("technicalArtifact", "technical_artifact") || "(none declared)"}`,
|
|
26
26
|
`- Current status: ${req.status || "(none)"}`,
|
|
27
|
+
...(opts.e2eDir
|
|
28
|
+
? [
|
|
29
|
+
`- Screen requirement: its actor uses a screen, so the gate also needs an end-to-end test under \`${opts.e2eDir}\` whose name or content says ${req.requirement} — a use case and a unit test alone do not pass.`,
|
|
30
|
+
]
|
|
31
|
+
: []),
|
|
27
32
|
].join("\n");
|
|
33
|
+
// REQ-198: a modified requirement already has a test and code, for its old text.
|
|
34
|
+
if (req.category === "NEEDS_REWORK") {
|
|
35
|
+
parts.push(AgentPrompt.section("This requirement changed", "An open change modified this requirement: its tests and code exist, but for the old text. " +
|
|
36
|
+
"Bring the tests to the requirement and scenarios below first — they must fail against the " +
|
|
37
|
+
"current behaviour — then change the code until they pass. Do not leave a test that only " +
|
|
38
|
+
"checks the old behaviour."));
|
|
39
|
+
}
|
|
28
40
|
// Before the facts, because it is the thing being implemented and the facts
|
|
29
41
|
// are only pointers to where it goes.
|
|
30
42
|
if (opts.requirementText && String(opts.requirementText).trim()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentPrompt.js","sourceRoot":"","sources":["../../../../../packages/core/src/domain/AgentPrompt.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"AgentPrompt.js","sourceRoot":"","sources":["../../../../../packages/core/src/domain/AgentPrompt.ts"],"names":[],"mappings":";;;AA6DA,MAAa,WAAW;IACf,MAAM,CAAC,KAAK,CAAC,GAAsB,EAAE,OAAsB,EAAE;QAClE,MAAM,KAAK,GAAa,EAAE,CAAC;QAE3B,IAAI,IAAI,CAAC,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;YAC1D,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;YAChD,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC;QAED,KAAK,CAAC,IAAI,CACR,eAAe,GAAG,CAAC,WAAW,MAAM;YAClC,yEAAyE;YACzE,+BAA+B,GAAG,CAAC,WAAW,+BAA+B;YAC7E,qDAAqD,CACxD,CAAC;QAEF,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,KAAa,EAAE,EAAE;YAC7C,MAAM,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC,CAAC,CAA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jB,oCAAoC,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE;gBAC3D,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EACzD,8EAA8E;gBAC5E,sBAAsB;gBACtB,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;gBAChD,OAAO,CACV,CACF,CAAC;QACJ,CAAC;QAED,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACxB,KAAK,CAAC,IAAI,CACR,WAAW,CAAC,OAAO,CACjB,mBAAmB,EACnB,6EAA6E;gBAC3E,0EAA0E;gBAC1E,4CAA4C;gBAC5C,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;gBAC/C,OAAO,CACV,CACF,CAAC;QACJ,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAEO,MAAM,CAAC,OAAO,CAAC,KAAa,EAAE,IAAY;QAChD,OAAO,MAAM,KAAK,OAAO,IAAI,IAAI,CAAC;IACpC,CAAC;CACF;AAzND,kCAyNC"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The two measures Specgate computes itself (ADR-0040 point 4): how much of
|
|
4
|
+
* the code a change touched its tests run, and how many of the mutants on
|
|
5
|
+
* those lines its tests kill. Read from the reports the project's tools
|
|
6
|
+
* already write — JaCoCo XML, LCOV, Cobertura; PIT `mutations.xml`, StrykerJS
|
|
7
|
+
* `mutation.json` — so no tool is bundled. Pure: the caller hands texts in.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.changedLines = changedLines;
|
|
11
|
+
exports.readJacoco = readJacoco;
|
|
12
|
+
exports.readLcov = readLcov;
|
|
13
|
+
exports.readCobertura = readCobertura;
|
|
14
|
+
exports.diffCoverage = diffCoverage;
|
|
15
|
+
exports.readPit = readPit;
|
|
16
|
+
exports.readStryker = readStryker;
|
|
17
|
+
exports.mutationScore = mutationScore;
|
|
18
|
+
/** Lines added or changed per file, from `git diff --unified=0`. */
|
|
19
|
+
function changedLines(diff) {
|
|
20
|
+
const out = new Map();
|
|
21
|
+
let file = "";
|
|
22
|
+
for (const line of diff.split(/\r?\n/)) {
|
|
23
|
+
const to = /^\+\+\+ (?:b\/)?(.+)$/.exec(line);
|
|
24
|
+
if (to) {
|
|
25
|
+
file = to[1] === "/dev/null" ? "" : to[1].trim();
|
|
26
|
+
if (file && !out.has(file))
|
|
27
|
+
out.set(file, new Set());
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
const hunk = /^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@/.exec(line);
|
|
31
|
+
if (hunk && file) {
|
|
32
|
+
const start = Number(hunk[1]);
|
|
33
|
+
const count = hunk[2] === undefined ? 1 : Number(hunk[2]);
|
|
34
|
+
for (let i = 0; i < count; i += 1)
|
|
35
|
+
out.get(file).add(start + i);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return out;
|
|
39
|
+
}
|
|
40
|
+
/** An attribute's value, in double or single quotes: PIT writes `status='KILLED'`. */
|
|
41
|
+
const attr = (tag, name) => (new RegExp(`\\b${name}=(?:"([^"]*)"|'([^']*)')`).exec(tag) || [])
|
|
42
|
+
.slice(1)
|
|
43
|
+
.find((v) => v !== undefined);
|
|
44
|
+
/** JaCoCo XML: `package/SourceFile.java` → its lines. */
|
|
45
|
+
function readJacoco(xml) {
|
|
46
|
+
const out = new Map();
|
|
47
|
+
const pkgRe = /<package\b([^>]*)>([\s\S]*?)<\/package>/g;
|
|
48
|
+
for (const pkg of xml.matchAll(pkgRe)) {
|
|
49
|
+
const pkgName = attr(pkg[1], "name") || "";
|
|
50
|
+
for (const src of pkg[2].matchAll(/<sourcefile\b([^>]*)>([\s\S]*?)<\/sourcefile>/g)) {
|
|
51
|
+
const key = `${pkgName ? `${pkgName}/` : ""}${attr(src[1], "name")}`;
|
|
52
|
+
const cov = { executable: new Set(), covered: new Set() };
|
|
53
|
+
for (const l of src[2].matchAll(/<line\b([^>]*)\/?>/g)) {
|
|
54
|
+
const nr = Number(attr(l[1], "nr"));
|
|
55
|
+
const mi = Number(attr(l[1], "mi") || 0);
|
|
56
|
+
const ci = Number(attr(l[1], "ci") || 0);
|
|
57
|
+
if (mi + ci > 0)
|
|
58
|
+
cov.executable.add(nr);
|
|
59
|
+
if (ci > 0)
|
|
60
|
+
cov.covered.add(nr);
|
|
61
|
+
}
|
|
62
|
+
out.set(key, cov);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return out;
|
|
66
|
+
}
|
|
67
|
+
/** LCOV: `SF:` path → its `DA:line,hits`. */
|
|
68
|
+
function readLcov(text) {
|
|
69
|
+
const out = new Map();
|
|
70
|
+
let cur = null;
|
|
71
|
+
for (const line of text.split(/\r?\n/)) {
|
|
72
|
+
if (line.startsWith("SF:")) {
|
|
73
|
+
cur = { executable: new Set(), covered: new Set() };
|
|
74
|
+
out.set(line.slice(3).trim().replace(/\\/g, "/"), cur);
|
|
75
|
+
}
|
|
76
|
+
else if (cur && line.startsWith("DA:")) {
|
|
77
|
+
const [nr, hits] = line.slice(3).split(",").map(Number);
|
|
78
|
+
cur.executable.add(nr);
|
|
79
|
+
if (hits > 0)
|
|
80
|
+
cur.covered.add(nr);
|
|
81
|
+
}
|
|
82
|
+
else if (line.startsWith("end_of_record"))
|
|
83
|
+
cur = null;
|
|
84
|
+
}
|
|
85
|
+
return out;
|
|
86
|
+
}
|
|
87
|
+
/** Cobertura: `<class filename>` → its `<line number hits>`. */
|
|
88
|
+
function readCobertura(xml) {
|
|
89
|
+
const out = new Map();
|
|
90
|
+
for (const cls of xml.matchAll(/<class\b([^>]*)>([\s\S]*?)<\/class>/g)) {
|
|
91
|
+
const file = (attr(cls[1], "filename") || "").replace(/\\/g, "/");
|
|
92
|
+
const cov = out.get(file) || { executable: new Set(), covered: new Set() };
|
|
93
|
+
for (const l of cls[2].matchAll(/<line\b([^>]*)\/?>/g)) {
|
|
94
|
+
const nr = Number(attr(l[1], "number"));
|
|
95
|
+
cov.executable.add(nr);
|
|
96
|
+
if (Number(attr(l[1], "hits") || 0) > 0)
|
|
97
|
+
cov.covered.add(nr);
|
|
98
|
+
}
|
|
99
|
+
out.set(file, cov);
|
|
100
|
+
}
|
|
101
|
+
return out;
|
|
102
|
+
}
|
|
103
|
+
/** The report's entry for a repository file: the same path, or one ending the other. */
|
|
104
|
+
function entryFor(map, file) {
|
|
105
|
+
const f = file.replace(/\\/g, "/");
|
|
106
|
+
if (map.has(f))
|
|
107
|
+
return map.get(f);
|
|
108
|
+
for (const [k, v] of map) {
|
|
109
|
+
const key = k.replace(/\\/g, "/").replace(/^\.\//, "");
|
|
110
|
+
if (f.endsWith(`/${key}`) || key.endsWith(`/${f}`) || key === f)
|
|
111
|
+
return v;
|
|
112
|
+
}
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
const pct = (passed, total) => total === 0 ? null : Math.round((passed / total) * 1000) / 10;
|
|
116
|
+
/** Coverage of the executable lines a change touched. */
|
|
117
|
+
function diffCoverage(changed, report) {
|
|
118
|
+
let total = 0;
|
|
119
|
+
let passed = 0;
|
|
120
|
+
const misses = [];
|
|
121
|
+
for (const [file, lines] of changed) {
|
|
122
|
+
const cov = entryFor(report, file);
|
|
123
|
+
if (!cov)
|
|
124
|
+
continue;
|
|
125
|
+
for (const n of [...lines].sort((a, b) => a - b)) {
|
|
126
|
+
if (!cov.executable.has(n))
|
|
127
|
+
continue;
|
|
128
|
+
total += 1;
|
|
129
|
+
if (cov.covered.has(n))
|
|
130
|
+
passed += 1;
|
|
131
|
+
else
|
|
132
|
+
misses.push(`${file}:${n} not run by any test`);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return { value: pct(passed, total), total, passed, misses };
|
|
136
|
+
}
|
|
137
|
+
/** PIT `mutations.xml`: KILLED and TIMED_OUT count as killed. */
|
|
138
|
+
function readPit(xml) {
|
|
139
|
+
const out = [];
|
|
140
|
+
for (const m of xml.matchAll(/<mutation\b([^>]*)>([\s\S]*?)<\/mutation>/g)) {
|
|
141
|
+
const tag = (name) => ((new RegExp(`<${name}>([\\s\\S]*?)</${name}>`).exec(m[2]) || [])[1] || "").trim();
|
|
142
|
+
const status = attr(m[1], "status") || "";
|
|
143
|
+
const cls = tag("mutatedClass").replace(/\$.*$/, "");
|
|
144
|
+
const source = tag("sourceFile");
|
|
145
|
+
const pkg = cls.includes(".") ? cls.slice(0, cls.lastIndexOf(".")).replace(/\./g, "/") : "";
|
|
146
|
+
out.push({
|
|
147
|
+
file: `${pkg ? `${pkg}/` : ""}${source}`,
|
|
148
|
+
line: Number(tag("lineNumber")),
|
|
149
|
+
killed: status === "KILLED" || status === "TIMED_OUT",
|
|
150
|
+
excluded: status === "NON_VIABLE" || status === "RUN_ERROR",
|
|
151
|
+
mutator: tag("mutator").split(".").pop() || "",
|
|
152
|
+
description: tag("description"),
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
return out;
|
|
156
|
+
}
|
|
157
|
+
/** StrykerJS `mutation.json` (mutation-testing-elements schema). */
|
|
158
|
+
function readStryker(text) {
|
|
159
|
+
const doc = JSON.parse(text);
|
|
160
|
+
const out = [];
|
|
161
|
+
for (const [file, f] of Object.entries(doc.files || {})) {
|
|
162
|
+
for (const m of f.mutants || []) {
|
|
163
|
+
const status = String(m.status || "");
|
|
164
|
+
out.push({
|
|
165
|
+
file: file.replace(/\\/g, "/"),
|
|
166
|
+
line: Number(m.location?.start?.line) || 0,
|
|
167
|
+
killed: status === "Killed" || status === "Timeout",
|
|
168
|
+
excluded: ["Ignored", "CompileError", "RuntimeError", "Pending"].includes(status),
|
|
169
|
+
mutator: String(m.mutatorName || ""),
|
|
170
|
+
description: m.replacement ? `replaced with ${m.replacement}` : "",
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return out;
|
|
175
|
+
}
|
|
176
|
+
/** The mutation score over the mutants on lines a change touched. */
|
|
177
|
+
function mutationScore(changed, mutants) {
|
|
178
|
+
let total = 0;
|
|
179
|
+
let passed = 0;
|
|
180
|
+
const misses = [];
|
|
181
|
+
const byFile = new Map();
|
|
182
|
+
for (const m of mutants)
|
|
183
|
+
byFile.set(m.file, [...(byFile.get(m.file) || []), m]);
|
|
184
|
+
for (const [file, lines] of changed) {
|
|
185
|
+
const list = entryFor(byFile, file) || [];
|
|
186
|
+
for (const m of list) {
|
|
187
|
+
if (m.excluded || !lines.has(m.line))
|
|
188
|
+
continue;
|
|
189
|
+
total += 1;
|
|
190
|
+
if (m.killed)
|
|
191
|
+
passed += 1;
|
|
192
|
+
else
|
|
193
|
+
misses.push(`${file}:${m.line} ${m.mutator} survived${m.description ? ` — ${m.description}` : ""}`);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return { value: pct(passed, total), total, passed, misses };
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=ChangeMeasures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChangeMeasures.js","sourceRoot":"","sources":["../../../../../packages/core/src/domain/ChangeMeasures.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAGH,oCAkBC;AAeD,gCAmBC;AAGD,4BAcC;AAGD,sCAaC;AA0BD,oCAkBC;AAcD,0BAmBC;AAGD,kCA6BC;AAGD,sCAmBC;AAzND,oEAAoE;AACpE,SAAgB,YAAY,CAAC,IAAY;IACvC,MAAM,GAAG,GAAG,IAAI,GAAG,EAAuB,CAAC;IAC3C,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,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AE,MAAM,IAAI,CAAC,CAAC;;gBAExB,MAAM,CAAC,IAAI,CACT,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,YAAY,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CACvF,CAAC;QACN,CAAC;IACH,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC9D,CAAC"}
|
|
@@ -64,6 +64,7 @@ function questionTable(md) {
|
|
|
64
64
|
const textAt = col(t, "question", "pregunta");
|
|
65
65
|
const blocksAt = col(t, "blocks");
|
|
66
66
|
const answerAt = col(t, "answer", "respuesta");
|
|
67
|
+
const optionsAt = col(t, "options seen", "options", "opciones");
|
|
67
68
|
return t.rows.map((i) => {
|
|
68
69
|
const c = cells(t.lines[i]);
|
|
69
70
|
const answer = answerAt >= 0 ? c[answerAt] || "" : "";
|
|
@@ -73,6 +74,10 @@ function questionTable(md) {
|
|
|
73
74
|
blocks: (blocksAt >= 0 ? c[blocksAt] || "" : "").match(/REQ-[A-Za-z0-9.]+/g) || [],
|
|
74
75
|
answered: answer.length > 0 && !deferredAnswer(answer),
|
|
75
76
|
line: i + 1,
|
|
77
|
+
options: (optionsAt >= 0 ? c[optionsAt] || "" : "")
|
|
78
|
+
.split(/\s*[;·]\s*/)
|
|
79
|
+
.map((o) => o.trim())
|
|
80
|
+
.filter(Boolean),
|
|
76
81
|
};
|
|
77
82
|
});
|
|
78
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Clarification.js","sourceRoot":"","sources":["../../../../../packages/core/src/domain/Clarification.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAaH,wCAGC;
|
|
1
|
+
{"version":3,"file":"Clarification.js","sourceRoot":"","sources":["../../../../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