diff --git a/tests/prose/cases/discovery-commits-new-feature/act.md b/tests/prose/cases/discovery-commits-new-feature/act.md new file mode 100644 index 000000000..8d50d7719 --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-feature/act.md @@ -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. diff --git a/tests/prose/cases/discovery-commits-new-feature/assert.md b/tests/prose/cases/discovery-commits-new-feature/assert.md new file mode 100644 index 000000000..de1f2cff9 --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-feature/assert.md @@ -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 diff --git a/tests/prose/cases/discovery-commits-new-feature/case.json b/tests/prose/cases/discovery-commits-new-feature/case.json new file mode 100644 index 000000000..36231b11b --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-feature/case.json @@ -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" + ] + } +} diff --git a/tests/prose/cases/discovery-commits-new-feature/fixture-state.cjs b/tests/prose/cases/discovery-commits-new-feature/fixture-state.cjs new file mode 100644 index 000000000..d5ee1bcc5 --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-feature/fixture-state.cjs @@ -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); + }, +}; diff --git a/tests/prose/cases/discovery-commits-new-feature/fixture.md b/tests/prose/cases/discovery-commits-new-feature/fixture.md new file mode 100644 index 000000000..1c1d83d8d --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-feature/fixture.md @@ -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. diff --git a/tests/prose/cases/discovery-commits-new-feature/fixture/.claude/settings.json b/tests/prose/cases/discovery-commits-new-feature/fixture/.claude/settings.json new file mode 100644 index 000000000..ae019ede5 --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-feature/fixture/.claude/settings.json @@ -0,0 +1,9 @@ +{ + "showClearContextOnPlanAccept": true, + "permissions": { + "allow": [ + "Edit(.workflows/**)", + "Bash(mv .workflows/:*)" + ] + } +} diff --git a/tests/prose/cases/discovery-commits-new-feature/fixture/.recipe-hash b/tests/prose/cases/discovery-commits-new-feature/fixture/.recipe-hash new file mode 100644 index 000000000..712443ffb --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-feature/fixture/.recipe-hash @@ -0,0 +1 @@ +88e88d312b8f83941c265b875f300ec5a34a4179d60d24c379806bc9af115f23 diff --git a/tests/prose/cases/discovery-commits-new-feature/fixture/.workflows/.state/migrations b/tests/prose/cases/discovery-commits-new-feature/fixture/.workflows/.state/migrations new file mode 100644 index 000000000..3c7162acc --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-feature/fixture/.workflows/.state/migrations @@ -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 diff --git a/tests/prose/cases/discovery-commits-new-feature/fixture/.workflows/_gitignore.fixture b/tests/prose/cases/discovery-commits-new-feature/fixture/.workflows/_gitignore.fixture new file mode 100644 index 000000000..779cbf28a --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-feature/fixture/.workflows/_gitignore.fixture @@ -0,0 +1,2 @@ +.cache/ +.manifest.json.*.tmp