diff --git a/tests/prose/cases/discovery-commits-new-epic/act.md b/tests/prose/cases/discovery-commits-new-epic/act.md new file mode 100644 index 000000000..01f1758b8 --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-epic/act.md @@ -0,0 +1,5 @@ +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 discovery has been run for the newly created work +unit and the prose turns to initialising it — do not initialise, and name +no topics. diff --git a/tests/prose/cases/discovery-commits-new-epic/assert.md b/tests/prose/cases/discovery-commits-new-epic/assert.md new file mode 100644 index 000000000..ea633753e --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-epic/assert.md @@ -0,0 +1,39 @@ +The prose should have taken this path: + +1. the empty project is shown as such, and starting an epic routes into + discovery with the work unit given as `none` +2. the work type is put to the user at the gate and committed on their + answer — the pre-seed is a hint, and the several interacting strands + they describe are what makes it an epic rather than the menu key they + pressed +3. a name is checked against existing work before anything is created, + and one engine transaction then creates the work unit, installs the + session log staged in the cache, and commits +4. resume detection is skipped: it answers whether an earlier session was + interrupted, and work created moments ago cannot have been +5. the commit does not conclude the work as it would for a single-phase + type — discovery is run for the new work unit, and the conversation + carries on into topic territory + +Further claims: + +- the shaping conversation continues rather than restarting: the session + the confirm-trigger opened is the one the work carries forward, and no + second session log is authored + +EXPECTED WORLD — the walk should have produced, from a project that held +no work at all: + +- an epic work unit named `search-relevance`, in progress, registered in + the project manifest alongside its own manifest +- a description drawn from what the user said about ranking signals, + synonyms and measurement — not invented, and not narrowed to one of them +- exactly one discovery session log, `session-001.md`, naming no seeds and + no imports +- that log recording the map as empty at the start of this first session, + which is the epic's shape — not the "not applicable" a single-topic work + type would carry +- the epic marked as having a discovery session open, which is the state a + feature never acquires +- no topics anywhere: no map items, no research or discussion directories. + The work unit exists and its topics have not been named yet diff --git a/tests/prose/cases/discovery-commits-new-epic/case.json b/tests/prose/cases/discovery-commits-new-epic/case.json new file mode 100644 index 000000000..c5ba46ed1 --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-epic/case.json @@ -0,0 +1,41 @@ +{ + "origin": "discovery — the epic arm of the same commit the feature case walks: the work unit is created, then the work continues into topic territory instead of concluding", + "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": [ + "e — start a new epic", + "Search relevance across the catalogue is poor and it is several problems at once. Ranking barely uses behavioural signals. Synonyms and misspellings are handled by a hand-maintained list nobody trusts. And we have no way to tell whether a change made results better or worse, so every tweak is an argument. I want to take the whole thing on rather than patch one piece.", + "y — that's the right shape, set it up", + "search-relevance" + ], + "invariants": { + "engine_before_write": true, + "calls_include": [ + "manifest exists search-relevance", + "workunit create search-relevance epic", + "workflow-discovery/scripts/gateway.cjs search-relevance" + ], + "calls_in_order": [ + "manifest exists search-relevance", + "workunit create search-relevance epic", + "workflow-discovery/scripts/gateway.cjs search-relevance" + ], + "calls_exclude": [ + "topic start", + "discussion-map", + "workflow-discussion-entry", + "workflow-research-entry" + ] + } +} diff --git a/tests/prose/cases/discovery-commits-new-epic/fixture-state.cjs b/tests/prose/cases/discovery-commits-new-epic/fixture-state.cjs new file mode 100644 index 000000000..857c13e35 --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-epic/fixture-state.cjs @@ -0,0 +1,12 @@ +'use strict'; + +// An empty project, exactly as the feature case starts. What the walk +// makes of it is the whole difference. + +const m = require('../../mainlines/feature.cjs'); + +module.exports = { + build(h) { + m.init(h); + }, +}; diff --git a/tests/prose/cases/discovery-commits-new-epic/fixture.md b/tests/prose/cases/discovery-commits-new-epic/fixture.md new file mode 100644 index 000000000..94cda6c43 --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-epic/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 something larger in mind than a single change, and has not +yet said what. diff --git a/tests/prose/cases/discovery-commits-new-epic/fixture/.claude/settings.json b/tests/prose/cases/discovery-commits-new-epic/fixture/.claude/settings.json new file mode 100644 index 000000000..ae019ede5 --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-epic/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-epic/fixture/.recipe-hash b/tests/prose/cases/discovery-commits-new-epic/fixture/.recipe-hash new file mode 100644 index 000000000..e7d6a571a --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-epic/fixture/.recipe-hash @@ -0,0 +1 @@ +3e44d2307ed2aa0fafc1f4ac0d8bd5eb585501c158714be81c690d229f6bd522 diff --git a/tests/prose/cases/discovery-commits-new-epic/fixture/.workflows/.state/migrations b/tests/prose/cases/discovery-commits-new-epic/fixture/.workflows/.state/migrations new file mode 100644 index 000000000..3c7162acc --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-epic/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-epic/fixture/.workflows/_gitignore.fixture b/tests/prose/cases/discovery-commits-new-epic/fixture/.workflows/_gitignore.fixture new file mode 100644 index 000000000..779cbf28a --- /dev/null +++ b/tests/prose/cases/discovery-commits-new-epic/fixture/.workflows/_gitignore.fixture @@ -0,0 +1,2 @@ +.cache/ +.manifest.json.*.tmp