ddd-ts-kit 0.26.0 → 0.27.0
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 +96 -0
- package/README.fr.md +4 -3
- package/README.md +3 -2
- package/dist/acceptance/acceptance-file-of.d.ts +5 -0
- package/dist/acceptance/acceptance-file-of.d.ts.map +1 -0
- package/dist/acceptance/acceptance-file-of.js +7 -0
- package/dist/acceptance/acceptance-file-of.js.map +1 -0
- package/dist/acceptance/acceptance-gate.d.ts +8 -0
- package/dist/acceptance/acceptance-gate.d.ts.map +1 -0
- package/dist/acceptance/acceptance-gate.js +2 -0
- package/dist/acceptance/acceptance-gate.js.map +1 -0
- package/dist/acceptance/acceptance-lock.d.ts +32 -0
- package/dist/acceptance/acceptance-lock.d.ts.map +1 -0
- package/dist/acceptance/acceptance-lock.js +2 -0
- package/dist/acceptance/acceptance-lock.js.map +1 -0
- package/dist/acceptance/acceptance-problem.d.ts +15 -0
- package/dist/acceptance/acceptance-problem.d.ts.map +1 -0
- package/dist/acceptance/acceptance-problem.js +2 -0
- package/dist/acceptance/acceptance-problem.js.map +1 -0
- package/dist/acceptance/commentless.d.ts +4 -0
- package/dist/acceptance/commentless.d.ts.map +1 -0
- package/dist/acceptance/commentless.js +31 -0
- package/dist/acceptance/commentless.js.map +1 -0
- package/dist/acceptance/counts-for.d.ts +5 -0
- package/dist/acceptance/counts-for.d.ts.map +1 -0
- package/dist/acceptance/counts-for.js +8 -0
- package/dist/acceptance/counts-for.js.map +1 -0
- package/dist/acceptance/criteria-in.d.ts +14 -0
- package/dist/acceptance/criteria-in.d.ts.map +1 -0
- package/dist/acceptance/criteria-in.js +34 -0
- package/dist/acceptance/criteria-in.js.map +1 -0
- package/dist/acceptance/drift.d.ts +30 -0
- package/dist/acceptance/drift.d.ts.map +1 -0
- package/dist/acceptance/drift.js +44 -0
- package/dist/acceptance/drift.js.map +1 -0
- package/dist/acceptance/format-acceptance.d.ts +5 -0
- package/dist/acceptance/format-acceptance.d.ts.map +1 -0
- package/dist/acceptance/format-acceptance.js +40 -0
- package/dist/acceptance/format-acceptance.js.map +1 -0
- package/dist/acceptance/lock-acceptance.d.ts +24 -0
- package/dist/acceptance/lock-acceptance.d.ts.map +1 -0
- package/dist/acceptance/lock-acceptance.js +58 -0
- package/dist/acceptance/lock-acceptance.js.map +1 -0
- package/dist/acceptance/lock-file-of.d.ts +3 -0
- package/dist/acceptance/lock-file-of.d.ts.map +1 -0
- package/dist/acceptance/lock-file-of.js +6 -0
- package/dist/acceptance/lock-file-of.js.map +1 -0
- package/dist/acceptance/lock-problems.d.ts +21 -0
- package/dist/acceptance/lock-problems.d.ts.map +1 -0
- package/dist/acceptance/lock-problems.js +58 -0
- package/dist/acceptance/lock-problems.js.map +1 -0
- package/dist/acceptance/read-acceptance.d.ts +9 -0
- package/dist/acceptance/read-acceptance.d.ts.map +1 -0
- package/dist/acceptance/read-acceptance.js +76 -0
- package/dist/acceptance/read-acceptance.js.map +1 -0
- package/dist/acceptance/read-lock.d.ts +5 -0
- package/dist/acceptance/read-lock.d.ts.map +1 -0
- package/dist/acceptance/read-lock.js +45 -0
- package/dist/acceptance/read-lock.js.map +1 -0
- package/dist/acceptance/read-verdicts.d.ts +9 -0
- package/dist/acceptance/read-verdicts.d.ts.map +1 -0
- package/dist/acceptance/read-verdicts.js +35 -0
- package/dist/acceptance/read-verdicts.js.map +1 -0
- package/dist/acceptance/scenario-problems.d.ts +12 -0
- package/dist/acceptance/scenario-problems.d.ts.map +1 -0
- package/dist/acceptance/scenario-problems.js +74 -0
- package/dist/acceptance/scenario-problems.js.map +1 -0
- package/dist/acceptance/scenario.d.ts +23 -0
- package/dist/acceptance/scenario.d.ts.map +1 -0
- package/dist/acceptance/scenario.js +2 -0
- package/dist/acceptance/scenario.js.map +1 -0
- package/dist/acceptance/scenarios-in.d.ts +4 -0
- package/dist/acceptance/scenarios-in.d.ts.map +1 -0
- package/dist/acceptance/scenarios-in.js +68 -0
- package/dist/acceptance/scenarios-in.js.map +1 -0
- package/dist/acceptance/story-acceptance.d.ts +29 -0
- package/dist/acceptance/story-acceptance.d.ts.map +1 -0
- package/dist/acceptance/story-acceptance.js +2 -0
- package/dist/acceptance/story-acceptance.js.map +1 -0
- package/dist/acceptance/story-file-of.d.ts +4 -0
- package/dist/acceptance/story-file-of.d.ts.map +1 -0
- package/dist/acceptance/story-file-of.js +8 -0
- package/dist/acceptance/story-file-of.js.map +1 -0
- package/dist/acceptance/story-of-file.d.ts +3 -0
- package/dist/acceptance/story-of-file.d.ts.map +1 -0
- package/dist/acceptance/story-of-file.js +6 -0
- package/dist/acceptance/story-of-file.js.map +1 -0
- package/dist/acceptance/story-of-row.d.ts +3 -0
- package/dist/acceptance/story-of-row.d.ts.map +1 -0
- package/dist/acceptance/story-of-row.js +6 -0
- package/dist/acceptance/story-of-row.js.map +1 -0
- package/dist/acceptance/story-problems.d.ts +16 -0
- package/dist/acceptance/story-problems.d.ts.map +1 -0
- package/dist/acceptance/story-problems.js +48 -0
- package/dist/acceptance/story-problems.js.map +1 -0
- package/dist/acceptance/verdict-on.d.ts +8 -0
- package/dist/acceptance/verdict-on.d.ts.map +1 -0
- package/dist/acceptance/verdict-on.js +9 -0
- package/dist/acceptance/verdict-on.js.map +1 -0
- package/dist/acceptance/verdict.d.ts +14 -0
- package/dist/acceptance/verdict.d.ts.map +1 -0
- package/dist/acceptance/verdict.js +2 -0
- package/dist/acceptance/verdict.js.map +1 -0
- package/dist/acceptance/verdicts-dir.d.ts +3 -0
- package/dist/acceptance/verdicts-dir.d.ts.map +1 -0
- package/dist/acceptance/verdicts-dir.js +3 -0
- package/dist/acceptance/verdicts-dir.js.map +1 -0
- package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
- package/dist/check/catalogue/architecture-rules.js +2 -0
- package/dist/check/catalogue/architecture-rules.js.map +1 -1
- package/dist/check/catalogue/default-severities.d.ts.map +1 -1
- package/dist/check/catalogue/default-severities.js +1 -0
- package/dist/check/catalogue/default-severities.js.map +1 -1
- package/dist/check/configuration/config-inspection.d.ts +1 -0
- package/dist/check/configuration/config-inspection.d.ts.map +1 -1
- package/dist/check/configuration/config-inspection.js +9 -1
- package/dist/check/configuration/config-inspection.js.map +1 -1
- package/dist/check/explain/tree-docs.d.ts.map +1 -1
- package/dist/check/explain/tree-docs.js +9 -0
- package/dist/check/explain/tree-docs.js.map +1 -1
- package/dist/check/fixtures/test-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/test-fixtures.js +35 -0
- package/dist/check/fixtures/test-fixtures.js.map +1 -1
- package/dist/check/project/walk-directory.js +1 -1
- package/dist/check/project/walk-directory.js.map +1 -1
- package/dist/check/rules/config-valid.d.ts.map +1 -1
- package/dist/check/rules/config-valid.js +1 -0
- package/dist/check/rules/config-valid.js.map +1 -1
- package/dist/check/rules/test-acceptance-black-box.d.ts +3 -0
- package/dist/check/rules/test-acceptance-black-box.d.ts.map +1 -0
- package/dist/check/rules/test-acceptance-black-box.js +38 -0
- package/dist/check/rules/test-acceptance-black-box.js.map +1 -0
- package/dist/commands/acceptance.d.ts +11 -0
- package/dist/commands/acceptance.d.ts.map +1 -0
- package/dist/commands/acceptance.js +63 -0
- package/dist/commands/acceptance.js.map +1 -0
- package/dist/commands/plan-waves.d.ts.map +1 -1
- package/dist/commands/plan-waves.js +1 -2
- package/dist/commands/plan-waves.js.map +1 -1
- package/dist/commands/stories.d.ts +9 -0
- package/dist/commands/stories.d.ts.map +1 -0
- package/dist/commands/stories.js +16 -0
- package/dist/commands/stories.js.map +1 -0
- package/dist/commands/story-scope.d.ts +4 -0
- package/dist/commands/story-scope.d.ts.map +1 -0
- package/dist/commands/story-scope.js +34 -0
- package/dist/commands/story-scope.js.map +1 -0
- package/dist/commands/story.d.ts +9 -0
- package/dist/commands/story.d.ts.map +1 -0
- package/dist/commands/story.js +45 -0
- package/dist/commands/story.js.map +1 -0
- package/dist/commands/worker-scope.d.ts.map +1 -1
- package/dist/commands/worker-scope.js +2 -0
- package/dist/commands/worker-scope.js.map +1 -1
- package/dist/commands/worktree.d.ts +7 -0
- package/dist/commands/worktree.d.ts.map +1 -0
- package/dist/commands/worktree.js +34 -0
- package/dist/commands/worktree.js.map +1 -0
- package/dist/config/config.d.ts +7 -0
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -0
- package/dist/config/index.js.map +1 -1
- package/dist/config/parse-config.js +1 -0
- package/dist/config/parse-config.js.map +1 -1
- package/dist/config/serialize-config.js +1 -0
- package/dist/config/serialize-config.js.map +1 -1
- package/dist/config/worktree-modes.d.ts +3 -0
- package/dist/config/worktree-modes.d.ts.map +1 -0
- package/dist/config/worktree-modes.js +3 -0
- package/dist/config/worktree-modes.js.map +1 -0
- package/dist/generate/kinds/acceptance-kind.d.ts +3 -0
- package/dist/generate/kinds/acceptance-kind.d.ts.map +1 -0
- package/dist/generate/kinds/acceptance-kind.js +69 -0
- package/dist/generate/kinds/acceptance-kind.js.map +1 -0
- package/dist/generate/kinds.d.ts.map +1 -1
- package/dist/generate/kinds.js +2 -0
- package/dist/generate/kinds.js.map +1 -1
- package/dist/generate/shared-writes.d.ts.map +1 -1
- package/dist/generate/shared-writes.js +3 -0
- package/dist/generate/shared-writes.js.map +1 -1
- package/dist/help/notes.d.ts +1 -1
- package/dist/help/notes.d.ts.map +1 -1
- package/dist/help/notes.js +50 -2
- package/dist/help/notes.js.map +1 -1
- package/dist/help/usage.d.ts +1 -1
- package/dist/help/usage.d.ts.map +1 -1
- package/dist/help/usage.js +6 -0
- package/dist/help/usage.js.map +1 -1
- package/dist/init/agent-permissions.d.ts.map +1 -1
- package/dist/init/agent-permissions.js +9 -1
- package/dist/init/agent-permissions.js.map +1 -1
- package/dist/init/ignore-worktrees.d.ts +7 -0
- package/dist/init/ignore-worktrees.d.ts.map +1 -0
- package/dist/init/ignore-worktrees.js +15 -0
- package/dist/init/ignore-worktrees.js.map +1 -0
- package/dist/init/manifest/versions.js +24 -24
- package/dist/init/run-init.d.ts.map +1 -1
- package/dist/init/run-init.js +9 -3
- package/dist/init/run-init.js.map +1 -1
- package/dist/plan/batched-waves.d.ts +0 -2
- package/dist/plan/batched-waves.d.ts.map +1 -1
- package/dist/plan/batched-waves.js +4 -4
- package/dist/plan/batched-waves.js.map +1 -1
- package/dist/plan/plan-waves.d.ts +0 -2
- package/dist/plan/plan-waves.d.ts.map +1 -1
- package/dist/plan/plan-waves.js +2 -2
- package/dist/plan/plan-waves.js.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +10 -0
- package/dist/run.js.map +1 -1
- package/dist/slice/plan-staging.d.ts +1 -1
- package/dist/slice/plan-staging.d.ts.map +1 -1
- package/dist/slice/plan-staging.js +5 -2
- package/dist/slice/plan-staging.js.map +1 -1
- package/dist/stories/forecast-merge.d.ts +14 -0
- package/dist/stories/forecast-merge.d.ts.map +1 -0
- package/dist/stories/forecast-merge.js +44 -0
- package/dist/stories/forecast-merge.js.map +1 -0
- package/dist/stories/format-stories.d.ts +4 -0
- package/dist/stories/format-stories.d.ts.map +1 -0
- package/dist/stories/format-stories.js +66 -0
- package/dist/stories/format-stories.js.map +1 -0
- package/dist/stories/format-story-phases.d.ts +5 -0
- package/dist/stories/format-story-phases.d.ts.map +1 -0
- package/dist/stories/format-story-phases.js +14 -0
- package/dist/stories/format-story-phases.js.map +1 -0
- package/dist/stories/merge-forecast.d.ts +18 -0
- package/dist/stories/merge-forecast.d.ts.map +1 -0
- package/dist/stories/merge-forecast.js +2 -0
- package/dist/stories/merge-forecast.js.map +1 -0
- package/dist/stories/open-stories.d.ts +8 -0
- package/dist/stories/open-stories.d.ts.map +1 -0
- package/dist/stories/open-stories.js +31 -0
- package/dist/stories/open-stories.js.map +1 -0
- package/dist/stories/open-story-scope.d.ts +23 -0
- package/dist/stories/open-story-scope.d.ts.map +1 -0
- package/dist/stories/open-story-scope.js +86 -0
- package/dist/stories/open-story-scope.js.map +1 -0
- package/dist/stories/open-story.d.ts +11 -0
- package/dist/stories/open-story.d.ts.map +1 -0
- package/dist/stories/open-story.js +2 -0
- package/dist/stories/open-story.js.map +1 -0
- package/dist/stories/read-stories.d.ts +9 -0
- package/dist/stories/read-stories.d.ts.map +1 -0
- package/dist/stories/read-stories.js +60 -0
- package/dist/stories/read-stories.js.map +1 -0
- package/dist/stories/read-story-phases.d.ts +10 -0
- package/dist/stories/read-story-phases.d.ts.map +1 -0
- package/dist/stories/read-story-phases.js +144 -0
- package/dist/stories/read-story-phases.js.map +1 -0
- package/dist/stories/read-story-place.d.ts +4 -0
- package/dist/stories/read-story-place.d.ts.map +1 -0
- package/dist/stories/read-story-place.js +23 -0
- package/dist/stories/read-story-place.js.map +1 -0
- package/dist/stories/review-file-of.d.ts +4 -0
- package/dist/stories/review-file-of.d.ts.map +1 -0
- package/dist/stories/review-file-of.js +7 -0
- package/dist/stories/review-file-of.js.map +1 -0
- package/dist/stories/section-of.d.ts +3 -0
- package/dist/stories/section-of.d.ts.map +1 -0
- package/dist/stories/section-of.js +11 -0
- package/dist/stories/section-of.js.map +1 -0
- package/dist/stories/stories-view.d.ts +13 -0
- package/dist/stories/stories-view.d.ts.map +1 -0
- package/dist/stories/stories-view.js +2 -0
- package/dist/stories/stories-view.js.map +1 -0
- package/dist/stories/story-crossing.d.ts +16 -0
- package/dist/stories/story-crossing.d.ts.map +1 -0
- package/dist/stories/story-crossing.js +2 -0
- package/dist/stories/story-crossing.js.map +1 -0
- package/dist/stories/story-gate.d.ts +4 -0
- package/dist/stories/story-gate.d.ts.map +1 -0
- package/dist/stories/story-gate.js +2 -0
- package/dist/stories/story-gate.js.map +1 -0
- package/dist/stories/story-phase.d.ts +13 -0
- package/dist/stories/story-phase.d.ts.map +1 -0
- package/dist/stories/story-phase.js +2 -0
- package/dist/stories/story-phase.js.map +1 -0
- package/dist/stories/story-place.d.ts +14 -0
- package/dist/stories/story-place.d.ts.map +1 -0
- package/dist/stories/story-place.js +2 -0
- package/dist/stories/story-place.js.map +1 -0
- package/dist/stories/story-scope-file.d.ts +3 -0
- package/dist/stories/story-scope-file.d.ts.map +1 -0
- package/dist/stories/story-scope-file.js +3 -0
- package/dist/stories/story-scope-file.js.map +1 -0
- package/dist/stories/story-scope.d.ts +17 -0
- package/dist/stories/story-scope.d.ts.map +1 -0
- package/dist/stories/story-scope.js +2 -0
- package/dist/stories/story-scope.js.map +1 -0
- package/dist/stories/story-state.d.ts +13 -0
- package/dist/stories/story-state.d.ts.map +1 -0
- package/dist/stories/story-state.js +2 -0
- package/dist/stories/story-state.js.map +1 -0
- package/dist/stories/trunk-phase.d.ts +8 -0
- package/dist/stories/trunk-phase.d.ts.map +1 -0
- package/dist/stories/trunk-phase.js +27 -0
- package/dist/stories/trunk-phase.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worker/add-worktree.d.ts +7 -0
- package/dist/worker/add-worktree.d.ts.map +1 -0
- package/dist/worker/add-worktree.js +13 -0
- package/dist/worker/add-worktree.js.map +1 -0
- package/dist/worker/branch-exists.d.ts +3 -0
- package/dist/worker/branch-exists.d.ts.map +1 -0
- package/dist/worker/branch-exists.js +6 -0
- package/dist/worker/branch-exists.js.map +1 -0
- package/dist/worker/briefed-rows.js +1 -1
- package/dist/worker/briefed-rows.js.map +1 -1
- package/dist/worker/ensure-ignored.d.ts +7 -0
- package/dist/worker/ensure-ignored.d.ts.map +1 -0
- package/dist/worker/ensure-ignored.js +17 -0
- package/dist/worker/ensure-ignored.js.map +1 -0
- package/dist/worker/install-notes.d.ts +9 -0
- package/dist/worker/install-notes.d.ts.map +1 -0
- package/dist/worker/install-notes.js +25 -0
- package/dist/worker/install-notes.js.map +1 -0
- package/dist/worker/is-worktree.d.ts +3 -0
- package/dist/worker/is-worktree.d.ts.map +1 -0
- package/dist/worker/is-worktree.js +15 -0
- package/dist/worker/is-worktree.js.map +1 -0
- package/dist/worker/open-worker-scope.d.ts +6 -1
- package/dist/worker/open-worker-scope.d.ts.map +1 -1
- package/dist/worker/open-worker-scope.js +29 -36
- package/dist/worker/open-worker-scope.js.map +1 -1
- package/dist/worker/repository-prefix.d.ts +3 -0
- package/dist/worker/repository-prefix.d.ts.map +1 -0
- package/dist/worker/repository-prefix.js +14 -0
- package/dist/worker/repository-prefix.js.map +1 -0
- package/dist/worker/upstream-of.d.ts +8 -0
- package/dist/worker/upstream-of.d.ts.map +1 -0
- package/dist/worker/upstream-of.js +18 -0
- package/dist/worker/upstream-of.js.map +1 -0
- package/dist/worker/worktree-home.d.ts +9 -0
- package/dist/worker/worktree-home.d.ts.map +1 -0
- package/dist/worker/worktree-home.js +17 -0
- package/dist/worker/worktree-home.js.map +1 -0
- package/dist/worker/worktree-of.d.ts +13 -0
- package/dist/worker/worktree-of.d.ts.map +1 -0
- package/dist/worker/worktree-of.js +30 -0
- package/dist/worker/worktree-of.js.map +1 -0
- package/dist/worktree/open-worktree.d.ts +20 -0
- package/dist/worktree/open-worktree.d.ts.map +1 -0
- package/dist/worktree/open-worktree.js +57 -0
- package/dist/worktree/open-worktree.js.map +1 -0
- package/dist/worktree/worktree-scope.d.ts +15 -0
- package/dist/worktree/worktree-scope.d.ts.map +1 -0
- package/dist/worktree/worktree-scope.js +2 -0
- package/dist/worktree/worktree-scope.js.map +1 -0
- package/package.json +2 -2
- package/templates/acceptance/acceptance.spec.ts.tpl +35 -0
- package/templates/init/docker/dockerignore.tpl +1 -0
- package/templates/init/e2e/jest.e2e.config.js.tpl +1 -1
- package/templates/init/e2e/vitest.e2e.config.ts.tpl +1 -1
- package/templates/init/gitignore.tpl +1 -0
- package/templates/pipeline/biome.json.tpl +1 -0
- package/templates/pipeline/package-scripts.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,102 @@ What each version changes for someone who uses the kit. The packages of `package
|
|
|
4
4
|
together, under one version; the notes of each [GitHub release](https://github.com/gbourgeat/ddd-ts-kit/releases)
|
|
5
5
|
list the pull requests behind it.
|
|
6
6
|
|
|
7
|
+
## 0.27.0
|
|
8
|
+
|
|
9
|
+
**The worktrees of a project live inside it, and a new project writes its code in a worktree.**
|
|
10
|
+
`worker-scope`, `story-scope` and the new `ddd-ts-kit worktree <name>` (any other piece of work,
|
|
11
|
+
on `work/<name>`, cut from `origin/main` when run from the trunk, installed) open their worktree
|
|
12
|
+
in `.worktrees/` of the main checkout, whichever worktree they run from, instead of a sibling
|
|
13
|
+
folder `../<project>-<name>`; `plan-waves` names `.worktrees/<context>-<batch>`. `init` lists
|
|
14
|
+
`.worktrees/` in `.gitignore`, the formatter, ESLint, the checker and the Docker context leave it
|
|
15
|
+
out. A new project gets `"worktrees": "required"`: the guard of the plugin refuses the code of a
|
|
16
|
+
context and the generators that write it (`context`, `adr` and `acceptance` aside) in the main
|
|
17
|
+
checkout of the trunk, and says so at session start with the command that opens a worktree; the
|
|
18
|
+
conductor of a parallel build writes its contracts and skeletons in a worktree of its own and
|
|
19
|
+
lands them as a pull request. In a worktree of `.worktrees/` without its own `node_modules`,
|
|
20
|
+
whose Node would resolve the packages of the main checkout above it, the guard refuses that code
|
|
21
|
+
until it is installed. `story-scope` and `worktree` take the remote branch of the trunk as their
|
|
22
|
+
base only from the trunk itself: any other branch is its own base.
|
|
23
|
+
|
|
24
|
+
To move: nothing is required. A project started before has no `worktrees` key, read as
|
|
25
|
+
`"advised"`: the guard only says where the code goes. Run `npx ddd-ts-kit init` once to add
|
|
26
|
+
`.worktrees/` to `.gitignore` (until then the commands open their worktrees next to the project,
|
|
27
|
+
as before, with a note), commit it, and set `"worktrees": "required"` when the team works in
|
|
28
|
+
worktrees. Update the plugin, and `@ddd-ts-kit/eslint-plugin` for its ignore of `.worktrees/`;
|
|
29
|
+
add `"!**/.worktrees"` to the `files.includes` of `biome.json`. A worktree opened before keeps its
|
|
30
|
+
place: `git worktree move <path> .worktrees/<name>` moves it.
|
|
31
|
+
|
|
32
|
+
**Where the open stories meet, while they are built.** The new command `ddd-ts-kit stories`
|
|
33
|
+
lists the stories open in the worktrees of the repository and, for each pair that meets, the
|
|
34
|
+
contexts the rows of both name, the files both worktrees change (committed or not, those
|
|
35
|
+
`merge-trunk` settles by their kind aside), and what merging the branch of one into the other
|
|
36
|
+
would leave to settle by hand and what `merge-trunk` settles alone, computed with
|
|
37
|
+
`git merge-tree` without writing anything; for each story, how far it is behind its trunk and
|
|
38
|
+
what bringing the trunk in would leave to a person. From the worktree of a story it names the
|
|
39
|
+
stories that one meets. The guard of the plugin says it at session start in the worktree of a
|
|
40
|
+
story, with the trunk that moved and a last fetch more than an hour old, and says once per file
|
|
41
|
+
when the session writes a file another open story changes. `story --gate close` now also waits
|
|
42
|
+
for the trunk merged in (the phase `trunk`), and `story-scope` cuts a story from the branch the
|
|
43
|
+
current one follows (`origin/main` for `main`) when it has one, so that a `git fetch` is enough
|
|
44
|
+
to see the trunk move: nothing of the kit goes to the network. The skill `story` reads
|
|
45
|
+
`stories` before cutting the rows and before each row, and fetches before closing.
|
|
46
|
+
|
|
47
|
+
To move: `npx ddd-ts-kit init` adds the permission of `npx ddd-ts-kit stories`; update the
|
|
48
|
+
plugin. A story opened before this version keeps its base: `story-scope` resumes it as it was.
|
|
49
|
+
|
|
50
|
+
**One session takes one user story to its pull request, one story per terminal.** The new skill
|
|
51
|
+
`/ddd-ts-kit:story <code>` (run by the owner) works in the worktree of the story: it asks every
|
|
52
|
+
question at once, then without stopping writes `docs/architecture/stories/<code>.md` (statement,
|
|
53
|
+
questions and answers, acceptance criteria, decisions), the rows of the story, a design review
|
|
54
|
+
section per row in `docs/architecture/reviews/<code>.md` read by `architecture-reviewer`, the
|
|
55
|
+
acceptance written and locked; it builds row by row with one `context-builder` agent confined to
|
|
56
|
+
one context, merges the trunk in, reviews, verifies, writes `## Report` (each provisional
|
|
57
|
+
decision, compromise and amendment) and opens the pull request. New commands:
|
|
58
|
+
`ddd-ts-kit story-scope <code>` opens the worktree of a story on `story/<code>` (or finds it
|
|
59
|
+
again), refuses a story open in another worktree and names the other open stories with the
|
|
60
|
+
contexts they change; `ddd-ts-kit story [<code>] [--gate build|close]` says where a story stands,
|
|
61
|
+
phase by phase, and its next step; `worker-scope <context> --here` briefs the next agent inside
|
|
62
|
+
the worktree of a story, without a worktree of its own. In the worktree of a story, the guard of
|
|
63
|
+
the plugin refuses any code of a context until `story --gate build` passes, says the phase at
|
|
64
|
+
session start, and refuses once to end the session before the report. New guide:
|
|
65
|
+
[story workflow](docs/guides/story-workflow.md).
|
|
66
|
+
|
|
67
|
+
To move: update the plugin; `npx ddd-ts-kit init` adds the permissions of `story` and
|
|
68
|
+
`story-scope`.
|
|
69
|
+
|
|
70
|
+
**A story's acceptance tests are written, locked and run before its code, and a locked scenario
|
|
71
|
+
changes only with its criterion.** A story states its acceptance criteria in
|
|
72
|
+
`docs/architecture/stories/<story>.md` (`- AC1: ...` under `## Acceptance criteria`).
|
|
73
|
+
`ddd-ts-kit generate acceptance <story>` writes `test/acceptance/<story>.acceptance.spec.ts`, an
|
|
74
|
+
`it.todo` per criterion (per slice row when the story states none), on the support of
|
|
75
|
+
`test/e2e/`. Each scenario names the rows that make it pass and the criterion it proves
|
|
76
|
+
(`'#US5.02 AC1 ...'`) and runs wrapped in the new `pending(...)` of `@ddd-ts-kit/testing/e2e`:
|
|
77
|
+
it passes while an assertion fails, and fails once the scenario passes (the slice removes the
|
|
78
|
+
wrapper) or stops on anything but an assertion (the scenario is broken). The new command
|
|
79
|
+
`ddd-ts-kit acceptance [<story>]` reads the scenarios against the rows of `slices.md` and the
|
|
80
|
+
criteria: `--gate written` before the code (every slice row and criterion covered, nothing left
|
|
81
|
+
to write, the acceptance locked), `--gate passing` before the story closes. `--lock` writes
|
|
82
|
+
`test/acceptance/<story>.acceptance.lock.json`, the fingerprint of each criterion and scenario
|
|
83
|
+
(the wrapper, the layout and the comments aside). Afterwards a criterion changed, or a scenario
|
|
84
|
+
changed or removed while its criteria were not, is reported whatever the gate, and locking again
|
|
85
|
+
takes a verdict `amend` on that very version from the new `acceptance-judge` agent, which compares
|
|
86
|
+
the locked version, the new one, the criterion and the owner's answers
|
|
87
|
+
(`test/acceptance/verdicts/*.md`); a refusal wins, and the verdicts become amendments the command
|
|
88
|
+
lists for the owner to validate. The guard of the plugin lets a sub-agent only remove
|
|
89
|
+
`pending(...)` in an acceptance spec, refuses it `acceptance --lock`, lets the judge alone write a
|
|
90
|
+
verdict and nothing else, refuses the lock and the verdicts to any hand edit or shell write, and
|
|
91
|
+
refuses an acceptance spec written by hand instead of generated. `verify-slice` stages the
|
|
92
|
+
acceptance spec with the slice. The new rule `test/acceptance-black-box` (a warning) refuses an
|
|
93
|
+
acceptance spec that imports from the source root anything but the builders and the published
|
|
94
|
+
language of a context. The skills `testing`, `use-case`, `plan-slices`, `quality-gate`,
|
|
95
|
+
`parallel-work` and the `context-builder` agent follow.
|
|
96
|
+
|
|
97
|
+
To move: a new project runs its acceptance specs with `npm run test:e2e`; in an existing one, add
|
|
98
|
+
`'test/acceptance/**/*.acceptance.spec.ts'` to the `include` of `vitest.e2e.config.ts` (the
|
|
99
|
+
`testMatch` of `jest.e2e.config.js`). `npx ddd-ts-kit init` adds the permission of
|
|
100
|
+
`npx ddd-ts-kit acceptance *` and the refusal to edit a lock; update the plugin.
|
|
101
|
+
`ddd-ts-kit check --rule test/acceptance-black-box` lists the acceptance specs to take up.
|
|
102
|
+
|
|
7
103
|
## 0.26.0
|
|
8
104
|
|
|
9
105
|
**The guard recognises the CLI of the kit however it is launched.** The refusal of
|
package/README.fr.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[English](README.md) · **Français**
|
|
2
|
-
<!-- translation-of: README.md sha256:
|
|
2
|
+
<!-- translation-of: README.md sha256:3d01b78606d29a72 -->
|
|
3
3
|
|
|
4
4
|
# ddd-ts-kit
|
|
5
5
|
|
|
@@ -525,7 +525,7 @@ choix sont enregistrés sous `stack` dans la configuration, `docsUi`, `ci` et `l
|
|
|
525
525
|
| `README.md`, `AGENTS.md`, `CLAUDE.md`, `.claude/rules/*.md`, `.github/instructions/*.instructions.md` | comment le lancer ; un guide léger dans `AGENTS.md`, que lisent Codex, Copilot et la plupart des agents de code et qu'importe `CLAUDE.md` (commandes, comment lire moins, la carte des règles, fichiers générés, note sur le compilateur, les *skills* du *plugin* : `/ddd-ts-kit:start`, `glossary`, `use-case`, `document`, `quality-gate`) et les invariants dans sept fichiers de règles, `domain.md`, `application.md`, `published-language.md`, `infrastructure.md`, `presentation.md`, `platform.md` et `tests.md`, chacun délimité par un frontmatter `paths`, et les mêmes sept pour GitHub Copilot, chacun délimité par `applyTo` |
|
|
526
526
|
| `.github/copilot/settings.json` | le *plugin* du kit, déclaré pour GitHub Copilot (`extraKnownMarketplaces`, `enabledPlugins`) : son agent cloud l'installe, la CLI Copilot et VS Code le recommandent ; un fichier existant garde ce qu'il contient et reçoit les deux entrées |
|
|
527
527
|
| `.claude/settings.json` | des permissions seulement : les vérifications et les générateurs s'exécutent sans demander, les fichiers `.env` sont illisibles (`.env.example` reste lisible), les trois documents générés ne sont pas modifiés à la main, `git push`, `npm publish` et toute modification des fichiers qui portent les règles et le *pipeline* (`ddd-ts-kit.config.json`, `eslint.config.mjs`, `biome.json`, `.dependency-cruiser.cjs`, `knip.json`, `lefthook.yml`, `.gitlab-ci.yml`, `.github/workflows/**`, `.claude/settings.json`, `.github/copilot/settings.json`) demandent d'abord |
|
|
528
|
-
| `.gitignore` | `node_modules`, `dist`, `coverage`, `.env`, `*.tsbuildinfo
|
|
528
|
+
| `.gitignore` | `node_modules`, `dist`, `coverage`, `.env`, `*.tsbuildinfo`, `.ddd-ts-kit/`, où écrit `worker-scope`, et `.worktrees/`, où vivent les *worktrees* |
|
|
529
529
|
|
|
530
530
|
`--ci both` écrit les deux *pipelines*, `--ci none` aucun (et pas de `renovate.json`). Les
|
|
531
531
|
fichiers de *pipeline* sont des copies des fichiers du répertoire `pipeline/` du dépôt, livrées
|
|
@@ -1264,7 +1264,8 @@ ddd-ts-kit worker-scope <context> --resume [--worktree <path> | --branch <name>]
|
|
|
1264
1264
|
```
|
|
1265
1265
|
|
|
1266
1266
|
Prépare la place d'un *worker* d'un build réparti par contexte : crée un *worktree* git du projet
|
|
1267
|
-
(
|
|
1267
|
+
(`.worktrees/<context>` du *checkout* principal par défaut, à côté du projet tant que son
|
|
1268
|
+
`.gitignore` ne contient pas `.worktrees/`) sur la branche `build/<context>`, à partir de `--base` (une
|
|
1268
1269
|
branche, une étiquette ou un *commit* : `origin/main` ; par défaut la branche courante), y écrit
|
|
1269
1270
|
`.ddd-ts-kit/worker.json` (`{ context, rows, base, baseCommit, branch }`, `baseCommit` étant le
|
|
1270
1271
|
*commit* que nomme la base à ce moment ; `init` ignore `.ddd-ts-kit/`), et
|
package/README.md
CHANGED
|
@@ -509,7 +509,7 @@ config, `docsUi`, `ci` and `logger` included.
|
|
|
509
509
|
| `README.md`, `AGENTS.md`, `CLAUDE.md`, `.claude/rules/*.md`, `.github/instructions/*.instructions.md` | how to run it; a slim guide in `AGENTS.md`, which Codex, Copilot and most coding agents read and `CLAUDE.md` imports (commands, how to read less, the map of the rules, generated files, compiler note, the skills of the plugin: `/ddd-ts-kit:start`, `glossary`, `use-case`, `document`, `quality-gate`) and the invariants in seven rule files, `domain.md`, `application.md`, `published-language.md`, `infrastructure.md`, `presentation.md`, `platform.md` and `tests.md`, each scoped by a `paths` frontmatter, and the same seven for GitHub Copilot, each scoped by `applyTo` |
|
|
510
510
|
| `.github/copilot/settings.json` | the plugin of the kit, declared for GitHub Copilot (`extraKnownMarketplaces`, `enabledPlugins`): its cloud agent installs it, the Copilot CLI and VS Code recommend it; an existing file keeps what it holds and gains the two entries |
|
|
511
511
|
| `.claude/settings.json` | permissions only: the checks and generators run without asking, `.env` files are unreadable (`.env.example` stays readable), the three generated documents are not edited by hand, `git push`, `npm publish` and any edit of the files that hold the rules and the pipeline (`ddd-ts-kit.config.json`, `eslint.config.mjs`, `biome.json`, `.dependency-cruiser.cjs`, `knip.json`, `lefthook.yml`, `.gitlab-ci.yml`, `.github/workflows/**`, `.claude/settings.json`, `.github/copilot/settings.json`) ask first |
|
|
512
|
-
| `.gitignore` | `node_modules`, `dist`, `coverage`, `.env`, `*.tsbuildinfo
|
|
512
|
+
| `.gitignore` | `node_modules`, `dist`, `coverage`, `.env`, `*.tsbuildinfo`, `.ddd-ts-kit/`, where `worker-scope` writes, and `.worktrees/`, where the worktrees live |
|
|
513
513
|
|
|
514
514
|
`--ci both` writes the two pipelines, `--ci none` neither (and no `renovate.json`). The pipeline
|
|
515
515
|
files are copies of the assets of the repository's `pipeline/` directory, shipped in
|
|
@@ -1200,7 +1200,8 @@ ddd-ts-kit worker-scope <context> --resume [--worktree <path> | --branch <name>]
|
|
|
1200
1200
|
```
|
|
1201
1201
|
|
|
1202
1202
|
Prepares the place of one worker of a build split by context: creates a git worktree of the
|
|
1203
|
-
project (
|
|
1203
|
+
project (`.worktrees/<context>` of the main checkout by default, next to the project while its
|
|
1204
|
+
`.gitignore` does not hold `.worktrees/`) on the branch `build/<context>`, cut from
|
|
1204
1205
|
`--base` (a branch, a tag or a commit: `origin/main`; by default the current branch), writes
|
|
1205
1206
|
`.ddd-ts-kit/worker.json` in it (`{ context, rows, base, baseCommit, branch }`, `baseCommit` being
|
|
1206
1207
|
the commit the base names at that moment; `init` ignores `.ddd-ts-kit/`), and
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Where the acceptance scenarios of the stories live, at the project root next to `test/e2e/`. */
|
|
2
|
+
export declare const ACCEPTANCE_DIR = "test/acceptance";
|
|
3
|
+
/** The acceptance spec of a story: `US5` is `test/acceptance/us5.acceptance.spec.ts`. */
|
|
4
|
+
export declare function acceptanceFileOf(story: string): string;
|
|
5
|
+
//# sourceMappingURL=acceptance-file-of.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance-file-of.d.ts","sourceRoot":"","sources":["../../src/acceptance/acceptance-file-of.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAEhD,yFAAyF;AACzF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Where the acceptance scenarios of the stories live, at the project root next to `test/e2e/`. */
|
|
2
|
+
export const ACCEPTANCE_DIR = 'test/acceptance';
|
|
3
|
+
/** The acceptance spec of a story: `US5` is `test/acceptance/us5.acceptance.spec.ts`. */
|
|
4
|
+
export function acceptanceFileOf(story) {
|
|
5
|
+
return `${ACCEPTANCE_DIR}/${story.toLowerCase()}.acceptance.spec.ts`;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=acceptance-file-of.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance-file-of.js","sourceRoot":"","sources":["../../src/acceptance/acceptance-file-of.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,MAAM,CAAC,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAEhD,yFAAyF;AACzF,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,OAAO,GAAG,cAAc,IAAI,KAAK,CAAC,WAAW,EAAE,qBAAqB,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a story is held to: `written`, before the code of its rows, every slice covered by a
|
|
3
|
+
* scenario written and none left to write; `passing`, before the story closes, none pending
|
|
4
|
+
* either.
|
|
5
|
+
*/
|
|
6
|
+
export type AcceptanceGate = 'written' | 'passing';
|
|
7
|
+
export declare const ACCEPTANCE_GATES: readonly AcceptanceGate[];
|
|
8
|
+
//# sourceMappingURL=acceptance-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance-gate.d.ts","sourceRoot":"","sources":["../../src/acceptance/acceptance-gate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,CAAC;AAEnD,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance-gate.js","sourceRoot":"","sources":["../../src/acceptance/acceptance-gate.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,gBAAgB,GAA8B,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** A scenario as the lock recorded it. */
|
|
2
|
+
export interface LockedScenario {
|
|
3
|
+
readonly title: string;
|
|
4
|
+
readonly criteria: readonly string[];
|
|
5
|
+
readonly fingerprint: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A change since the previous lock that the acceptance-judge agent let through: a scenario changed
|
|
9
|
+
* while its criteria were not, or a criterion changed; with the verdict, for the owner to validate.
|
|
10
|
+
*/
|
|
11
|
+
export interface Amendment {
|
|
12
|
+
/** `scenario "<title>"` or `criterion AC1`. */
|
|
13
|
+
readonly subject: string;
|
|
14
|
+
readonly criteria: readonly string[];
|
|
15
|
+
readonly reason: string;
|
|
16
|
+
/** The file of the verdict. */
|
|
17
|
+
readonly verdict: string;
|
|
18
|
+
readonly on: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The acceptance of a story once agreed, `test/acceptance/<story>.acceptance.lock.json`, written by
|
|
22
|
+
* `ddd-ts-kit acceptance <story> --lock` only: the fingerprint of each criterion and of each
|
|
23
|
+
* scenario. A scenario may then change only with its criterion; a criterion, or a scenario whose
|
|
24
|
+
* criteria stayed, only with a verdict of the acceptance-judge agent, which the lock keeps.
|
|
25
|
+
*/
|
|
26
|
+
export interface AcceptanceLock {
|
|
27
|
+
readonly story: string;
|
|
28
|
+
readonly criteria: Readonly<Record<string, string>>;
|
|
29
|
+
readonly scenarios: readonly LockedScenario[];
|
|
30
|
+
readonly amendments: readonly Amendment[];
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=acceptance-lock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance-lock.d.ts","sourceRoot":"","sources":["../../src/acceptance/acceptance-lock.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,+BAA+B;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,QAAQ,CAAC,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;IAC9C,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;CAC3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance-lock.js","sourceRoot":"","sources":["../../src/acceptance/acceptance-lock.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What keeps the acceptance of a story from a gate. `always` problems are inconsistencies whatever
|
|
3
|
+
* the gate: a scenario that names no row, an unknown row or an unknown criterion, a scenario put
|
|
4
|
+
* aside, a pending one whose rows are all done, a locked one changed without its criterion. The
|
|
5
|
+
* others are what the gate asks for.
|
|
6
|
+
*/
|
|
7
|
+
export interface AcceptanceProblem {
|
|
8
|
+
readonly kind: 'no-rows' | 'no-file' | 'todo' | 'uncovered' | 'uncovered-criterion' | 'no-criterion' | 'unknown-criterion' | 'unlocked' | 'drift' | 'pending' | 'skipped' | 'no-row' | 'unknown-row' | 'done-pending';
|
|
9
|
+
/** `file:line`, or `#<id>` for a row. */
|
|
10
|
+
readonly at: string;
|
|
11
|
+
readonly message: string;
|
|
12
|
+
/** The gate from which it counts; undefined when it always does. */
|
|
13
|
+
readonly from?: 'written' | 'passing';
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=acceptance-problem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance-problem.d.ts","sourceRoot":"","sources":["../../src/acceptance/acceptance-problem.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EACT,SAAS,GACT,SAAS,GACT,MAAM,GACN,WAAW,GACX,qBAAqB,GACrB,cAAc,GACd,mBAAmB,GACnB,UAAU,GACV,OAAO,GACP,SAAS,GACT,SAAS,GACT,QAAQ,GACR,aAAa,GACb,cAAc,CAAC;IACnB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,oEAAoE;IACpE,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance-problem.js","sourceRoot":"","sources":["../../src/acceptance/acceptance-problem.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Scan } from '../check/scan/scan.js';
|
|
2
|
+
/** The source with its comments blanked and everything else as written, strings and expressions alike: offsets are preserved. */
|
|
3
|
+
export declare function commentless(source: string, scanned: Scan): string;
|
|
4
|
+
//# sourceMappingURL=commentless.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commentless.d.ts","sourceRoot":"","sources":["../../src/acceptance/commentless.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAGlD,iIAAiI;AACjI,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,MAAM,CAcjE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { blank } from '../check/scan/blank.js';
|
|
2
|
+
/** The source with its comments blanked and everything else as written, strings and expressions alike: offsets are preserved. */
|
|
3
|
+
export function commentless(source, scanned) {
|
|
4
|
+
const ranges = [...lineComments(source, scanned), ...blockComments(source, scanned)].sort(([left], [right]) => left - right);
|
|
5
|
+
let text = '';
|
|
6
|
+
let at = 0;
|
|
7
|
+
for (const [start, end] of ranges) {
|
|
8
|
+
text += source.slice(at, start) + blank(source.slice(start, end));
|
|
9
|
+
at = end;
|
|
10
|
+
}
|
|
11
|
+
return text + source.slice(at);
|
|
12
|
+
}
|
|
13
|
+
/** A line comment runs from the first `//` of its line after which the code is blank, to the end of the line. */
|
|
14
|
+
function lineComments(source, { code, comments }) {
|
|
15
|
+
return comments.map(({ end }) => {
|
|
16
|
+
const lineStart = source.lastIndexOf('\n', end - 1) + 1;
|
|
17
|
+
let start = source.indexOf('//', lineStart);
|
|
18
|
+
while (start !== -1 && start < end && code.slice(start, end).trim() !== '') {
|
|
19
|
+
start = source.indexOf('//', start + 1);
|
|
20
|
+
}
|
|
21
|
+
return [start === -1 || start >= end ? end : start, end];
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/** A block comment is its opening delimiter, its text, then its closing one unless it is left open at the end of the file. */
|
|
25
|
+
function blockComments(source, { blockComments: comments }) {
|
|
26
|
+
return comments.map(({ text, end }) => {
|
|
27
|
+
const closing = source.endsWith('*/', end) && end - text.length >= 4 ? 2 : 0;
|
|
28
|
+
return [end - closing - text.length - 2, end];
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=commentless.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commentless.js","sourceRoot":"","sources":["../../src/acceptance/commentless.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,iIAAiI;AACjI,MAAM,UAAU,WAAW,CAAC,MAAc,EAAE,OAAa;IACvD,MAAM,MAAM,GAAG,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CACvF,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,IAAI,GAAG,KAAK,CAClC,CAAC;IAEF,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,IAAI,EAAE,GAAG,CAAC,CAAC;IAEX,KAAK,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,MAAM,EAAE,CAAC;QAClC,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;QAClE,EAAE,GAAG,GAAG,CAAC;IACX,CAAC;IAED,OAAO,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACjC,CAAC;AAED,iHAAiH;AACjH,SAAS,YAAY,CAAC,MAAc,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAQ;IAC5D,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;QAC9B,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QACxD,IAAI,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAE5C,OAAO,KAAK,KAAK,CAAC,CAAC,IAAI,KAAK,GAAG,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YAC3E,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;QAC1C,CAAC;QAED,OAAO,CAAC,KAAK,KAAK,CAAC,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACL,CAAC;AAED,8HAA8H;AAC9H,SAAS,aAAa,CAAC,MAAc,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAQ;IACtE,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE;QACpC,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAE7E,OAAO,CAAC,GAAG,GAAG,OAAO,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AcceptanceGate } from './acceptance-gate.js';
|
|
2
|
+
import type { AcceptanceProblem } from './acceptance-problem.js';
|
|
3
|
+
/** True when the problem keeps a story from the gate; without a gate, only the inconsistencies count. */
|
|
4
|
+
export declare function countsFor(problem: AcceptanceProblem, gate: AcceptanceGate | undefined): boolean;
|
|
5
|
+
//# sourceMappingURL=counts-for.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"counts-for.d.ts","sourceRoot":"","sources":["../../src/acceptance/counts-for.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,yGAAyG;AACzG,wBAAgB,SAAS,CAAC,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO,CAM/F"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** True when the problem keeps a story from the gate; without a gate, only the inconsistencies count. */
|
|
2
|
+
export function countsFor(problem, gate) {
|
|
3
|
+
if (problem.from === undefined) {
|
|
4
|
+
return true;
|
|
5
|
+
}
|
|
6
|
+
return gate === 'passing' || (gate === 'written' && problem.from === 'written');
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=counts-for.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"counts-for.js","sourceRoot":"","sources":["../../src/acceptance/counts-for.ts"],"names":[],"mappings":"AAGA,yGAAyG;AACzG,MAAM,UAAU,SAAS,CAAC,OAA0B,EAAE,IAAgC;IACpF,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,IAAI,KAAK,SAAS,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;AAClF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** One acceptance criterion of a story, as its specification states it. */
|
|
2
|
+
export interface Criterion {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly text: string;
|
|
5
|
+
readonly line: number;
|
|
6
|
+
/** The digest of its text, white space aside: a scenario may change when this changes. */
|
|
7
|
+
readonly fingerprint: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The criteria under the `## Acceptance criteria` heading of a story's specification, one list item
|
|
11
|
+
* each, `- AC1: <what a client observes>`, an indented line continuing the item above it.
|
|
12
|
+
*/
|
|
13
|
+
export declare function criteriaIn(text: string): Criterion[];
|
|
14
|
+
//# sourceMappingURL=criteria-in.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"criteria-in.d.ts","sourceRoot":"","sources":["../../src/acceptance/criteria-in.ts"],"names":[],"mappings":"AAEA,2EAA2E;AAC3E,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0FAA0F;IAC1F,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAKD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,CAapD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
const SECTION = /^##\s+acceptance criteria\s*$/i;
|
|
3
|
+
const ITEM = /^\s*[-*]\s+\**(AC\d+)\**\s*[:.)]\**\s*(.*)$/;
|
|
4
|
+
/**
|
|
5
|
+
* The criteria under the `## Acceptance criteria` heading of a story's specification, one list item
|
|
6
|
+
* each, `- AC1: <what a client observes>`, an indented line continuing the item above it.
|
|
7
|
+
*/
|
|
8
|
+
export function criteriaIn(text) {
|
|
9
|
+
const lines = text.split('\n');
|
|
10
|
+
const heading = lines.findIndex((line) => SECTION.test(line));
|
|
11
|
+
if (heading === -1) {
|
|
12
|
+
return [];
|
|
13
|
+
}
|
|
14
|
+
const end = lines.findIndex((line, at) => at > heading && /^#{1,2}\s/.test(line));
|
|
15
|
+
const section = lines.slice(heading + 1, end === -1 ? undefined : end);
|
|
16
|
+
const found = section.reduce((stated, line, at) => withLine(stated, line, heading + at + 2), []);
|
|
17
|
+
return found.map((criterion) => ({ ...criterion, fingerprint: digest(criterion.text) }));
|
|
18
|
+
}
|
|
19
|
+
/** The criteria read so far and one more line of the section: a new item, or the continuation of the last one. */
|
|
20
|
+
function withLine(stated, line, number) {
|
|
21
|
+
const item = ITEM.exec(line);
|
|
22
|
+
const last = stated.at(-1);
|
|
23
|
+
if (item !== null) {
|
|
24
|
+
return [...stated, { id: item[1] ?? '', text: item[2] ?? '', line: number }];
|
|
25
|
+
}
|
|
26
|
+
if (last === undefined || !/^\s+\S/.test(line)) {
|
|
27
|
+
return [...stated];
|
|
28
|
+
}
|
|
29
|
+
return [...stated.slice(0, -1), { ...last, text: `${last.text} ${line.trim()}` }];
|
|
30
|
+
}
|
|
31
|
+
function digest(text) {
|
|
32
|
+
return createHash('sha256').update(text.replace(/\s+/g, ' ').trim()).digest('hex').slice(0, 16);
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=criteria-in.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"criteria-in.js","sourceRoot":"","sources":["../../src/acceptance/criteria-in.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAWzC,MAAM,OAAO,GAAG,gCAAgC,CAAC;AACjD,MAAM,IAAI,GAAG,6CAA6C,CAAC;AAE3D;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAE9D,IAAI,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC;QACnB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAClF,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACvE,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAW,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAE3G,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,WAAW,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3F,CAAC;AAQD,kHAAkH;AAClH,SAAS,QAAQ,CAAC,MAAyB,EAAE,IAAY,EAAE,MAAc;IACvE,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7B,MAAM,IAAI,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAE3B,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,OAAO,CAAC,GAAG,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/C,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC;IACrB,CAAC;IAED,OAAO,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;AACpF,CAAC;AAED,SAAS,MAAM,CAAC,IAAY;IAC1B,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAClG,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { AcceptanceLock } from './acceptance-lock.js';
|
|
2
|
+
import type { Criterion } from './criteria-in.js';
|
|
3
|
+
import type { Scenario } from './scenario.js';
|
|
4
|
+
/**
|
|
5
|
+
* A change since the lock that only a verdict of the acceptance-judge agent lets through: a
|
|
6
|
+
* criterion changed or removed, or a scenario changed or removed while every criterion it proves
|
|
7
|
+
* stayed as locked. `subject` is how a verdict names it.
|
|
8
|
+
*/
|
|
9
|
+
export interface Judged {
|
|
10
|
+
/** `scenario "<title>"` or `criterion AC1`. */
|
|
11
|
+
readonly subject: string;
|
|
12
|
+
/** The fingerprint of what it is now, or `removed`: a verdict holds for that version only. */
|
|
13
|
+
readonly fingerprint: string;
|
|
14
|
+
/** The criteria it proves (a scenario) or is (a criterion). */
|
|
15
|
+
readonly criteria: readonly string[];
|
|
16
|
+
}
|
|
17
|
+
/** How the scenarios stand against the lock of their story. */
|
|
18
|
+
export interface Drift {
|
|
19
|
+
/** What needs a verdict of the acceptance-judge agent before the acceptance is locked again. */
|
|
20
|
+
readonly toJudge: readonly Judged[];
|
|
21
|
+
/** What only needs locking again: a new scenario or criterion, a scenario changed with its criterion. */
|
|
22
|
+
readonly toLock: readonly string[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The scenarios and criteria of a story against its lock. A new scenario or criterion adds to the
|
|
26
|
+
* acceptance and only needs locking; a changed or removed criterion, and a scenario changed or
|
|
27
|
+
* removed while its criteria were not, need a verdict first: what makes a test easier to pass.
|
|
28
|
+
*/
|
|
29
|
+
export declare function driftOf(lock: AcceptanceLock, scenarios: readonly Scenario[], criteria: readonly Criterion[]): Drift;
|
|
30
|
+
//# sourceMappingURL=drift.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drift.d.ts","sourceRoot":"","sources":["../../src/acceptance/drift.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,sBAAsB,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAK9C;;;;GAIG;AACH,MAAM,WAAW,MAAM;IACrB,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,8FAA8F;IAC9F,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED,+DAA+D;AAC/D,MAAM,WAAW,KAAK;IACpB,gGAAgG;IAChG,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,yGAAyG;IACzG,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,QAAQ,EAAE,EAAE,QAAQ,EAAE,SAAS,SAAS,EAAE,GAAG,KAAK,CAkCnH"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** What a locked scenario or criterion became: its new fingerprint, or `removed`. */
|
|
2
|
+
const REMOVED = 'removed';
|
|
3
|
+
/**
|
|
4
|
+
* The scenarios and criteria of a story against its lock. A new scenario or criterion adds to the
|
|
5
|
+
* acceptance and only needs locking; a changed or removed criterion, and a scenario changed or
|
|
6
|
+
* removed while its criteria were not, need a verdict first: what makes a test easier to pass.
|
|
7
|
+
*/
|
|
8
|
+
export function driftOf(lock, scenarios, criteria) {
|
|
9
|
+
const current = new Map(criteria.map((criterion) => [criterion.id, criterion.fingerprint]));
|
|
10
|
+
const written = scenarios.filter(({ state }) => state === 'pending' || state === 'active');
|
|
11
|
+
const changed = Object.keys(lock.criteria).filter((id) => lock.criteria[id] !== current.get(id));
|
|
12
|
+
const added = [...current.keys()].filter((id) => lock.criteria[id] === undefined);
|
|
13
|
+
const toJudge = changed.map((id) => ({
|
|
14
|
+
subject: `criterion ${id}`,
|
|
15
|
+
fingerprint: current.get(id) ?? REMOVED,
|
|
16
|
+
criteria: [id],
|
|
17
|
+
}));
|
|
18
|
+
const toLock = added.map((id) => `criterion ${id} is new`);
|
|
19
|
+
for (const locked of lock.scenarios) {
|
|
20
|
+
const now = written.find((scenario) => scenario.title === locked.title);
|
|
21
|
+
if (now?.fingerprint === locked.fingerprint) {
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
if (locked.criteria.some((id) => changed.includes(id))) {
|
|
25
|
+
toLock.push(`"${locked.title}" ${now === undefined ? 'removed' : 'changed'} with its criterion`);
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
toJudge.push(scenarioChange(locked, now));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const titles = new Set(lock.scenarios.map(({ title }) => title));
|
|
32
|
+
return {
|
|
33
|
+
toJudge,
|
|
34
|
+
toLock: [...toLock, ...written.filter(({ title }) => !titles.has(title)).map(({ title }) => `"${title}" is new`)],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function scenarioChange(locked, now) {
|
|
38
|
+
return {
|
|
39
|
+
subject: `scenario "${locked.title}"`,
|
|
40
|
+
fingerprint: now?.fingerprint ?? REMOVED,
|
|
41
|
+
criteria: locked.criteria,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=drift.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drift.js","sourceRoot":"","sources":["../../src/acceptance/drift.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AcceptanceGate } from './acceptance-gate.js';
|
|
2
|
+
import type { StoryAcceptance } from './story-acceptance.js';
|
|
3
|
+
/** The acceptance of each story as text: its spec, each row with its scenarios, then what keeps it from the gate. */
|
|
4
|
+
export declare function formatAcceptance(stories: readonly StoryAcceptance[], gate: AcceptanceGate | undefined): string;
|
|
5
|
+
//# sourceMappingURL=format-acceptance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-acceptance.d.ts","sourceRoot":"","sources":["../../src/acceptance/format-acceptance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAiB,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE5E,qHAAqH;AACrH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,EAAE,IAAI,EAAE,cAAc,GAAG,SAAS,GAAG,MAAM,CAM9G"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { countsFor } from './counts-for.js';
|
|
2
|
+
/** The acceptance of each story as text: its spec, each row with its scenarios, then what keeps it from the gate. */
|
|
3
|
+
export function formatAcceptance(stories, gate) {
|
|
4
|
+
if (stories.length === 0) {
|
|
5
|
+
return 'No story: docs/architecture/slices.md has no row and test/acceptance/ no spec.';
|
|
6
|
+
}
|
|
7
|
+
return stories.map((story) => formatStory(story, gate)).join('\n\n');
|
|
8
|
+
}
|
|
9
|
+
function formatStory(story, gate) {
|
|
10
|
+
const problems = story.problems.filter((problem) => countsFor(problem, gate));
|
|
11
|
+
const verdict = gate === undefined
|
|
12
|
+
? []
|
|
13
|
+
: [problems.length === 0 ? ` gate ${gate}: met` : ` gate ${gate}: ${problems.length} left`];
|
|
14
|
+
return [
|
|
15
|
+
`${story.story} ${story.file ?? '(no acceptance spec)'}${story.lock === undefined ? '' : ', locked'}`,
|
|
16
|
+
...(story.specification === undefined ? [] : [` specification ${story.specification}: ${criteriaOf(story)}`]),
|
|
17
|
+
...story.rows.map((row) => ` #${row.id} ${row.kind} "${row.slice}" (${row.status}): ${scenariosOf(row)}`),
|
|
18
|
+
...story.amendments.map((amendment) => ` amended on ${amendment.on}, for the owner to validate: ${amendment.subject} (${amendment.verdict}): ${amendment.reason}`),
|
|
19
|
+
...problems.map((problem) => ` ${problem.at} ${problem.message}`),
|
|
20
|
+
...verdict,
|
|
21
|
+
].join('\n');
|
|
22
|
+
}
|
|
23
|
+
function criteriaOf({ criteria, scenarios }) {
|
|
24
|
+
if (criteria.length === 0) {
|
|
25
|
+
return 'no acceptance criterion stated';
|
|
26
|
+
}
|
|
27
|
+
const proved = criteria.filter(({ id }) => scenarios.some((scenario) => scenario.criteria.includes(id))).length;
|
|
28
|
+
return `${criteria.length} criteria, ${proved} named by a scenario`;
|
|
29
|
+
}
|
|
30
|
+
function scenariosOf(row) {
|
|
31
|
+
if (row.scenarios.length === 0) {
|
|
32
|
+
return row.kind === 'slice' ? 'no scenario' : 'no scenario needed';
|
|
33
|
+
}
|
|
34
|
+
const states = ['active', 'pending', 'todo', 'skipped'].flatMap((state) => {
|
|
35
|
+
const count = row.scenarios.filter((scenario) => scenario.state === state).length;
|
|
36
|
+
return count === 0 ? [] : [`${count} ${state}`];
|
|
37
|
+
});
|
|
38
|
+
return `${row.scenarios.length} scenario${row.scenarios.length === 1 ? '' : 's'}, ${states.join(', ')}`;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=format-acceptance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-acceptance.js","sourceRoot":"","sources":["../../src/acceptance/format-acceptance.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Workspace } from '../workspace/index.js';
|
|
2
|
+
import type { Amendment } from './acceptance-lock.js';
|
|
3
|
+
import type { StoryAcceptance } from './story-acceptance.js';
|
|
4
|
+
/** What to lock: the acceptance of the story as read, and the day the amendments carry. */
|
|
5
|
+
export interface LockRequest {
|
|
6
|
+
readonly story: StoryAcceptance;
|
|
7
|
+
/** `YYYY-MM-DD`. */
|
|
8
|
+
readonly on: string;
|
|
9
|
+
}
|
|
10
|
+
/** What a lock wrote: the file and the amendments this lock added. */
|
|
11
|
+
export interface Locked {
|
|
12
|
+
readonly file: string;
|
|
13
|
+
readonly scenarios: number;
|
|
14
|
+
readonly amendments: readonly Amendment[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Records the scenarios and the criteria of a story as agreed. Refused while the scenarios are not
|
|
18
|
+
* written (an it.todo, a slice row or a criterion without a scenario), and while a change since the
|
|
19
|
+
* previous lock that only a verdict lets through (a criterion changed, a scenario changed while its
|
|
20
|
+
* criteria were not) has no `amend` verdict of the acceptance-judge agent for its very version: the
|
|
21
|
+
* verdicts become amendments of the lock, which `acceptance` lists for the owner to validate.
|
|
22
|
+
*/
|
|
23
|
+
export declare function lockAcceptance(ws: Workspace, request: LockRequest): Locked;
|
|
24
|
+
//# sourceMappingURL=lock-acceptance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lock-acceptance.d.ts","sourceRoot":"","sources":["../../src/acceptance/lock-acceptance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAkB,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAMtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAM7D,2FAA2F;AAC3F,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,oBAAoB;IACpB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,sEAAsE;AACtE,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;CAC3C;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,GAAG,MAAM,CAqB1E"}
|