Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/prose/cases/discovery-commits-new-feature/act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Execute skills/workflow-start/SKILL.md from the top, as a user opening
the workflow with nothing on disk yet, and continue into whatever it
routes to. Stop once the work unit exists on disk and the prose turns to
routing the work into its first phase — do not enter that phase.
35 changes: 35 additions & 0 deletions tests/prose/cases/discovery-commits-new-feature/assert.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
The prose should have taken this path:

1. the empty project is shown as such, and starting a feature routes into
discovery with the work unit given as `none` — new work has no name to
pass until it is created
2. discovery reads the mode from that `none` and takes the new-work path,
with no seed material to read
3. the pre-seeded work type is treated as a hint, not a given: the read is
put to the user at a gate and only committed on their answer
4. a name is suggested, the user's own name is taken in its place, and it
is checked against existing work before anything is created
5. the session log is authored into the cache, and one engine transaction
creates the work unit, installs that log and commits — the log is never
written into the work unit directory by the walk

Further claims:

- nothing is on disk before the transaction: every earlier step of the
shaping is ephemeral, however much was said
- this is single-phase work, so no epic machinery runs — no discovery map,
no topics, no session close

EXPECTED WORLD — the walk should have produced, from a project that held
no work at all:

- a feature work unit named `search-filters`, in progress, registered in
the project manifest alongside its own manifest
- a description on it drawn from what the user actually said about saved
filters, not invented
- exactly one discovery session log for it, `session-001.md`, in the work
unit's `discovery/sessions/` directory
- that log naming no seeds and no imports, since the work came from
neither
- no research, discussion, or any other phase directory: the work unit
exists and nothing has begun
38 changes: 38 additions & 0 deletions tests/prose/cases/discovery-commits-new-feature/case.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"origin": "discovery — the universal first phase, walked to its durability boundary: the work-type commit, where a work unit first exists on disk",
"entry": "workflow-start",
"world": "claims",
"files": [
"skills/workflow-start/SKILL.md",
"skills/workflow-start/references/empty-state.md",
"skills/workflow-start/references/route-to-discovery.md",
"skills/workflow-discovery/SKILL.md",
"skills/workflow-discovery/references/opener-pattern.md",
"skills/workflow-discovery/references/shape-and-confirm.md",
"skills/workflow-discovery/references/confirm-trigger.md",
"skills/workflow-discovery/references/name-resolution.md",
"skills/workflow-discovery/references/template.md"
],
"answers": [
"f — start a new feature",
"Saved search filters on the orders list. A user picks the filters they use often — status, date range, customer — names the combination, and it appears in a dropdown above the list so they can apply it in one click. Filters are per-user, not shared. Nothing else about the orders list changes.",
"y — that's the right shape, set it up",
"search-filters"
],
"invariants": {
"engine_before_write": true,
"calls_include": [
"manifest exists search-filters",
"workunit create search-filters feature"
],
"calls_in_order": [
"manifest exists search-filters",
"workunit create search-filters feature"
],
"calls_exclude": [
"discovery-map",
"discovery-session close",
"topic start"
]
}
}
13 changes: 13 additions & 0 deletions tests/prose/cases/discovery-commits-new-feature/fixture-state.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use strict';

// An empty project: the store is up and migrations have run, and nothing
// has ever been started. The walk itself creates the first work unit,
// which is the point of the case.

const m = require('../../mainlines/feature.cjs');

module.exports = {
build(h) {
m.init(h);
},
};
6 changes: 6 additions & 0 deletions tests/prose/cases/discovery-commits-new-feature/fixture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
A project with the workflow system installed and nothing else. The
knowledge store is initialised, migrations have run, and no work has ever
been started — no work units, no inbox items, no history.

The user has just decided they want to build something, and has not yet
said what.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"showClearContextOnPlanAccept": true,
"permissions": {
"allow": [
"Edit(.workflows/**)",
"Bash(mv .workflows/:*)"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
88e88d312b8f83941c265b875f300ec5a34a4179d60d24c379806bc9af115f23
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.cache/
.manifest.json.*.tmp