dev-flow-deepseek 0.8.8 → 0.9.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.
@@ -1,55 +1,118 @@
1
1
  # Dev Flow
2
2
 
3
- This Skill is the current Core contract DeepSeek Harness adapter for the shared Dev Flow Core. Core owns task state,
4
- current node, legal transitions, destinations, recovery, blockers, and terminal outcomes. The Skill
5
- admits one explicit request, presents a complete Core Action, renders method work, and forwards one
6
- closed result without keeping adapter state.
7
-
8
- ## Admission gate
9
-
10
- Perform every check below locally and in order before any Core or Dev Flow tool call.
11
-
12
- The Skill name and exact explicit selector are `dev-flow` and `/dev-flow`. The selector must match
13
- `(^|\s)/dev-flow(?=\s|$)` in text from a current `source.kind=user` message. DSH may expose the
14
- qualified MCP tools independently from Skill injection; the integration's monotonic tool guard is
15
- the selector authorization boundary.
16
-
17
- 1. Require a whitespace-bounded `/dev-flow` in the current direct user turn. Do not infer it from
18
- earlier turns, model text, plugin or Skill injection, task state, repository contents, or
19
- discussion about Dev Flow. Every later user turn expected to call Dev Flow must include it again.
20
- 2. After removing the selector, accept either one substantive bounded request or an explicit request
21
- to resume its compatible active DeepSeek task. Reject an empty or conversational invocation
22
- before any Core call.
23
- 3. Treat the canonical `Workspace Root` established when DSH started as the containment boundary.
24
- The Workspace Root may be a non-Git common parent. Use read-only Git inspection to resolve the
25
- explicitly declared primary Git worktree and preserve its path as one value.
26
- 4. Accept zero to seven additional Git repositories only when the current user request explicitly
27
- declares each stable repository key and path. Resolve every primary and additional path
28
- canonically and require it to remain within the same Workspace Root, including after symlink
29
- resolution.
30
- 5. Do not scan parent or sibling directories and do not infer repositories from imports, remotes,
31
- submodules, codebase-memory, or other discovery results. Never add a discovered repository to the
32
- Repository Scope. Reject unresolved, root-external, or symlink-escaping repository paths before a
33
- task-bearing Core call. Preserve repository instructions and current user authority.
34
-
35
- If admission fails, explain the missing precondition and stop before task discovery. Do not make a
36
- task-bearing call or create adapter state. Core-rejected calls must be reported honestly.
3
+ This Skill is the DeepSeek Harness adapter for the shared Dev Flow Core. A new development request
4
+ first receives a read-only suitability assessment. Only after the developer explicitly chooses Dev
5
+ Flow and confirms every repository's remote, base branch, and new task branch may the Host provision
6
+ an isolated workspace and open a Core Task. Core remains the sole owner of Task state, transitions,
7
+ recovery, blockers, and terminal outcomes.
8
+
9
+ ## Suitability assessment
10
+
11
+ Classify the current message before any Core call. An explicit request to resume an existing Task is
12
+ the only path that skips assessment. Every other new development request, including one containing
13
+ `/dev-flow`, first performs only read-only inspection and then stops for the developer's choice.
14
+
15
+ During assessment you may read the request, repository instructions and directly relevant docs,
16
+ inspect Git without changing it, and inspect candidate implementation, callers, tests, configuration,
17
+ and package manifests. Do not edit files, run tests or builds, install dependencies, call any Dev Flow
18
+ Core or Host tool, fetch, create a branch or worktree, or write a receipt.
19
+
20
+ Resolve candidate repositories from the current user request and applicable `AGENTS.md` instructions.
21
+ When those instructions require project-index discovery, read the index and each candidate's project
22
+ documentation, then inspect relevant code and configuration to establish the complete proposed
23
+ Repository Scope. Keep discovery read-only and within the current Workspace Root and Host permissions.
24
+ Otherwise use the repositories declared by the user. Every proposed repository must pass the explicit
25
+ worktree confirmation below before Task creation; index results alone do not authorize provisioning
26
+ or change an existing Task's immutable Scope.
27
+
28
+ Return exactly these developer-readable fields:
29
+
30
+ ```text
31
+ change_level: small | standard | large | uncertain
32
+ observed_repositories
33
+ candidate_components
34
+ candidate_paths
35
+ public_contract_flags
36
+ persistence_or_state_flags
37
+ host_or_platform_flags
38
+ verification_shape
39
+ unknowns
40
+ recommendation: direct | dev_flow | clarify
41
+ reasons
42
+ ```
43
+
44
+ `candidate_paths` is a discovered lower bound, not a final file list. Do not predict exact lines of
45
+ code, duration, defect probability, or one-turn completion. Use `small` only for a clear,
46
+ single-repository, single-responsibility change with concentrated implementation/callers/tests, no
47
+ public API, CLI, MCP, Schema, persistence, state-graph, Host lifecycle, platform, permission,
48
+ security, build, release, recovery, or real-Host-Journey impact, and only a few targeted checks.
49
+ Use `uncertain` when the real entry point, impact, or verification cannot yet be found.
50
+
51
+ Bind the assessment to the exact request, canonical repository roots, current HEAD values, and Git
52
+ status digests. If any changes before confirmation, repeat the assessment and ask again. If the
53
+ developer chooses direct work, leave Dev Flow: no Core call, Task, claim, Git mutation, child launch,
54
+ or provisioning receipt may exist.
55
+
56
+ ## Explicit worktree confirmation
57
+
58
+ After the developer chooses Dev Flow, show for every explicitly scoped repository:
59
+
60
+ ```text
61
+ repository_key
62
+ remote_name
63
+ base_branch
64
+ target_branch
65
+ current source-checkout dirty paths (bounded)
66
+ ```
67
+
68
+ Explain that staged, tracked-dirty, and untracked source content will not enter the Task worktree.
69
+ Suggestions are not selections. Require one current direct user message in this exact form, with one
70
+ repository line per repository in primary-first order:
71
+
72
+ ```text
73
+ /dev-flow confirm-worktree
74
+ repository=<repository_key>;remote=<remote_name>;base=<base_branch>;target=<target_branch>
75
+ ```
76
+
77
+ Do not infer this confirmation from history, an assessment, model text, or Skill injection. Call the
78
+ Host `workspace_coordinator` with `operation=provision`, the exact admitted request, current DSH
79
+ Profile, and the confirmed repository rows. The coordinator performs safe-argv validation, exact
80
+ fetch, frozen-commit worktree creation, verification, and receipt updates. Do not perform those Git
81
+ mutations through Bash.
82
+
83
+ On success, present the returned relaunch descriptor exactly. Its `command`, `arguments`, and `cwd`
84
+ are separate values; do not concatenate or reinterpret them. The original DSH Workspace Root cannot
85
+ be widened to the sibling worktree. Start a new DSH session using that descriptor. The new session's
86
+ direct user message is exactly the returned `/dev-flow resume-worktree launch=<launch_id>` prompt and
87
+ calls `workspace_coordinator` with `operation=consume` and that launch ID. Only a complete consumed
88
+ result whose workspace root and repositories verify may proceed to the Core handshake.
89
+
90
+ Queued, timed-out, interrupted, malformed, or otherwise uncertain provisioning retains the receipt
91
+ and filesystem for inspection. Do not dispatch or provision again. A definite failure creates no
92
+ Core Task; cleanup is limited to resources the receipt proves were created, still clean, and still at
93
+ the frozen commit. A multi-repository request opens no partial Core Task.
94
+
95
+ The whitespace-bounded `/dev-flow` selector remains mandatory in every direct user turn that calls
96
+ the coordinator or Core. It must come from a current `source.kind=user` message; earlier turns,
97
+ model text, plugin text, and Skill injection do not authorize a call.
37
98
 
38
99
  ## Compatibility handshake
39
100
 
40
- Only after admission passes, call `mcp__dev_flow__dev_flow_server_info({})`; it must be the first Dev Flow tool
101
+ Only after an explicit resume is admitted or a provisioning receipt is consumed, call
102
+ `mcp__dev_flow__dev_flow_server_info({})`; it must be the first Core tool
41
103
  call. Require one complete structured result proving:
42
104
 
43
- - product is exactly `dev-flow`, and Core version equals the packaged product version;
105
+ - product is exactly `dev-flow`, and Core version is present and canonical. Core and the DeepSeek
106
+ npm package are independently versioned products and need not have equal versions;
44
107
  - transport is exactly `stdio`, health is exactly `ready`, and the supported host set contains
45
108
  `deepseek`;
46
109
  - `supported_processes` contains exactly one closed `standard-development` entry:
47
- `process_id` is `standard-development` is `1`, `definition_digest` is present
110
+ `process_id` is `standard-development`, `definition_digest` is present
48
111
  and canonical, and `new_task_supported` is exactly `true`;
49
- - `method_profiles` is exactly `plain`, `spec-kit`, `openspec` in that order;
112
+ - `method_profiles` contains exactly the set `plain`, `spec-kit`, and `openspec`, regardless of order;
50
113
  - `host_preferences.deepseek.codebase_memory` is present and is exactly a JSON boolean; it expresses
51
114
  a preference only and does not prove that codebase-memory is installed or available;
52
- - the tool catalog contains exactly these fifteen raw names, in this order:
115
+ - the tool catalog contains exactly these seventeen raw names, regardless of order:
53
116
 
54
117
  1. `dev_flow_server_info`
55
118
  2. `dev_flow_open_task`
@@ -63,12 +126,14 @@ call. Require one complete structured result proving:
63
126
  10. `dev_flow_submit_comprehension`
64
127
  11. `dev_flow_submit_refactor`
65
128
  12. `dev_flow_submit_delivery`
66
- 13. `dev_flow_resolve_blocker`
67
- 14. `dev_flow_recover_action`
68
- 15. `dev_flow_cancel_task`
129
+ 13. `dev_flow_prepare_task_relocation`
130
+ 14. `dev_flow_resolve_blocker`
131
+ 15. `dev_flow_recover_action`
132
+ 16. `dev_flow_cancel_task`
133
+ 17. `dev_flow_abandon_task`
69
134
 
70
135
  Any other schema, unsupported process version, absent process digest, false new-task support,
71
- incomplete method-profile set, missing/additional/reordered tool, or incomplete, truncated, malformed,
136
+ incomplete method-profile set, missing/additional tool, or incomplete, truncated, malformed,
72
137
  or incompatible result fails the handshake. Stop without task discovery or undocumented probing. Do
73
138
  not inspect local source or an installed binary, and do not start a second MCP server to bypass a
74
139
  failed handshake.
@@ -76,17 +141,20 @@ failed handshake.
76
141
  ## Optional code discovery
77
142
 
78
143
  After the successful handshake, consume only `host_preferences.deepseek.codebase_memory` and the
79
- capabilities actually visible in this DeepSeek session:
144
+ capabilities actually visible in this DeepSeek session. Current user instructions and applicable
145
+ `AGENTS.md` instructions take precedence over this default preference when choosing code-discovery
146
+ tools. Use the preference rules below only when those instructions do not select a discovery method:
80
147
 
81
- - When the preference is `false`, do not call any codebase-memory tool even when one is visible. Use
82
- built-in Git inspection, file reads, file search, and text search, and do not prompt for installation.
148
+ - When the preference is `false`, use built-in Git inspection, file reads, file search, and text
149
+ search, and do not prompt for installation.
83
150
  - When the preference is `true` and codebase-memory is already visible and usable, it may be
84
- preferred for cross-repository symbol discovery, relationships, and impact analysis. Repository
85
- Scope still comes only from the user's declarations, Workspace Root remains the permission
86
- boundary, and file modification uses ordinary Host file tools.
87
- - When the preference is `true` but the capability is absent, incomplete, or becomes unavailable,
88
- notify the user at most once in the current Dev Flow session and immediately fall back to built-in
89
- search without blocking Task creation or progress.
151
+ preferred for symbol discovery, relationships, and impact analysis within the confirmed Task Scope.
152
+
153
+ Whether selected by user instructions, `AGENTS.md`, or the preference, an absent, incomplete, or
154
+ unavailable index triggers at most one notice in the current Dev Flow session and an immediate
155
+ fallback to built-in search without blocking Task creation or progress. Repository Scope remains
156
+ the complete set confirmed before provisioning and retained by Core; Workspace Root remains the
157
+ permission boundary, and file modification uses ordinary Host file tools.
90
158
 
91
159
  Never install, configure, upgrade, start, repair, or remove codebase-memory; never call plugin
92
160
  management to install it; never change MCP configuration; and never start a daemon. Index results
@@ -96,35 +164,36 @@ presentation state and must not be written into the Core Task.
96
164
 
97
165
  ## Task discovery
98
166
 
99
- After the handshake, call `mcp__dev_flow__dev_flow_open_task` with `host=deepseek` and the following
100
- Scope rules:
101
-
102
- - For a new request, send `repository_path` for the explicitly declared primary repository,
103
- `primary_repository_key` when supplied, and `additional_repositories` as the user's explicit
104
- closed `{key, repository_path}` declarations. A single-repository request may omit both optional
105
- Scope fields and keeps ordinary repository-relative paths.
106
- - For a resume from any participating repository, send that repository as `repository_path`, omit
107
- the Scope creation fields, and omit `new_task` or send `new_task=null`. Accept the immutable primary
108
- repository, ordered Scope, profile, revision, and current Action returned by Core.
109
-
110
- - For an explicit resume, omit `new_task` or send `new_task=null`. Do not resend a guessed intent or
111
- select another profile; accept the immutable profile returned by Core.
112
- - For a new request, select one profile from explicit current user intent. An explicit `plain`,
113
- `spec-kit`, or `openspec` request selects that exact profile. An explicit request to use Spec Kit
114
- selects `spec-kit`; an explicit request to use OpenSpec selects `openspec`; otherwise use the
115
- conservative `plain` profile.
116
- - Installed tooling does not select or switch a profile. Never change the profile after creation. If
117
- the user explicitly requests conflicting profiles, report the profile conflict and stop.
118
- - Derive the new-task contract only from the admitted user request, repository instructions, known
119
- initial bounds, known acceptance, and granted verification authority. Formal acceptance does not
120
- need to be complete at creation; the current requirements work forms that authority.
121
- - Forward `new_task` with exactly the members `request`, `initial_scope`,
122
- `initial_out_of_scope`, `known_acceptance_criteria`, `verification_budget`, and `method_profile`,
123
- with no additional members. Forward `verification_budget` with exactly `level`,
124
- `max_automatic_commands`, `allow_full_suite`, and `allow_manual_handoff`.
125
- - `request` is a JSON string. `initial_scope`, `initial_out_of_scope`, and
126
- `known_acceptance_criteria` are JSON arrays of strings and may be empty. Never collapse an array
127
- into prose. `verification_budget.level` is exactly `minimal`, `targeted`, or `full`.
167
+ After the handshake, call `mcp__dev_flow__dev_flow_open_task` with `host=deepseek`.
168
+
169
+ For a new request, use only the complete `workspace_coordinator` consume result from this relaunch:
170
+
171
+ - `repository_path` and `workspace_origin` come from its primary repository descriptor;
172
+ - `primary_repository_key` is that descriptor's key;
173
+ - every `additional_repositories` entry contains exactly `key`, `repository_path`, and
174
+ `workspace_origin` from the same launch;
175
+ - every Host-supplied `workspace_origin` contains exactly `mode="dedicated_worktree"`,
176
+ `remote_name`, `base_branch`, `base_commit`, `task_branch`, and
177
+ `provisioning_receipt_id`;
178
+ - never add Core-computed source-group, canonical-root, or worktree-Git-dir members;
179
+ - all repositories from the confirmed launch must be present. Never open a partial Scope or use a
180
+ source checkout after provisioning.
181
+
182
+ For an explicit resume, send the participating original worktree as `repository_path`, omit
183
+ `workspace_origin`, `primary_repository_key`, and `additional_repositories`, and omit `new_task` or
184
+ send `new_task=null`. Do not create a replacement directory, use a same-named branch, resend guessed
185
+ intent, or select another profile. Accept the immutable original worktree instance and profile from
186
+ Core. `WORKSPACE_UNAVAILABLE` requires restoration of that exact instance or an explicit
187
+ `mcp__dev_flow__dev_flow_abandon_task` request; ordinary cancel cannot invent a successful
188
+ observation.
189
+
190
+ For a new request, select one profile from explicit current user intent. `plain`, `spec-kit`, and
191
+ `openspec` select themselves; otherwise use `plain`. Installed tooling does not select or change a
192
+ profile. Derive `new_task` only from the admitted request, repository instructions, known bounds,
193
+ and known acceptance. It contains exactly `request`, `initial_scope`, `initial_out_of_scope`,
194
+ `known_acceptance_criteria`, and `method_profile`. Do not send a creation-time
195
+ `verification_budget`: requirements, design, impact, work breakdown, and the existing test structure
196
+ have not been analyzed yet.
128
197
 
129
198
  Use this exact `new_task` JSON shape, changing only values derived from the admitted request:
130
199
 
@@ -135,20 +204,15 @@ Use this exact `new_task` JSON shape, changing only values derived from the admi
135
204
  "initial_scope": ["Update the endpoint response"],
136
205
  "initial_out_of_scope": ["Change unrelated endpoints"],
137
206
  "known_acceptance_criteria": ["The response contains the requested field"],
138
- "verification_budget": {
139
- "level": "targeted",
140
- "max_automatic_commands": 4,
141
- "allow_full_suite": false,
142
- "allow_manual_handoff": true
143
- },
144
207
  "method_profile": "plain"
145
208
  }
146
209
  ```
147
210
  <!-- new-task-example:end -->
148
211
 
149
- Ask before opening only when a material request, initial-bound, verification, or profile choice
150
- cannot be derived without changing user intent. Let Core decide whether a compatible intent creates
151
- or resumes a task. Report an ownership or contract conflict unchanged in meaning and stop.
212
+ The Core call occurs only after all repository descriptors were consumed and verified. A new Task
213
+ opened without a dedicated-worktree origin is a contract defect, not permission to fall back to the
214
+ source checkout. Report ownership, provisioning, workspace, or contract conflicts unchanged in
215
+ meaning and stop.
152
216
 
153
217
  ## Governed action loop
154
218
 
@@ -156,16 +220,18 @@ The inseparable Action fields are exactly `task_id`, `revision`, `action_id`, `a
156
220
  `process_id`, `process_definition_digest`, `current_node`, `node_purpose`,
157
221
  `entry_conditions`, `completion_conditions`, `allowed_effects`, `required_evidence`,
158
222
  `method_profile`, `method_steps`, `available_transitions`, `payload_contract`, `guidance`,
159
- `repository_binding_digest`, and `issued_at`.
223
+ `repository_binding_digest`, `issuance_identity_digest`, `issuance_history_digest`,
224
+ `issuance_content_digest`, and `issued_at`.
160
225
 
161
226
  For an active task, perform each iteration in this order:
162
227
 
163
228
  1. Obtain one complete fresh Action from the open result or `mcp__dev_flow__dev_flow_get_next_action`, and bind it as
164
229
  `fresh_action` from `result.task.current_action` or `result.action` respectively.
165
- 2. Treat its task ID, revision, action ID, action kind, process ID, process version,
230
+ 2. Treat its task ID, revision, action ID, action kind, process ID,
166
231
  process-definition digest, current node, node purpose, entry conditions, completion conditions,
167
232
  allowed effects, required evidence, method profile, method steps, available transitions, payload
168
- schema/contract, guidance, repository-binding digest, and issued time as one inseparable Core
233
+ schema/contract, guidance, repository-binding and issuance identity/history/content digests, and
234
+ issued time as one inseparable Core
169
235
  result. Stop if any field is absent, malformed, or truncated.
170
236
  3. Present the current node, purpose, entry and completion conditions, allowed effects, required
171
237
  evidence, immutable method profile, every method step, and all `available_transitions`. For every
@@ -180,10 +246,8 @@ For an active task, perform each iteration in this order:
180
246
  instructions, verification budget, and current user authority.
181
247
  7. Select only a Core-returned transition and build the closed input of
182
248
  `fresh_action.submission_tool` from the actual typed node facts.
183
- `changed_paths` contains only repository paths newly changed while performing this current Action,
184
- relative to its issuance binding. Do not repeat paths changed by an earlier node. When the current
185
- Action only reads files or runs verification commands, submit `changed_paths=[]` and
186
- `no_file_changes=true`, even when the Task's implementation already has uncommitted paths.
249
+ File effects are not Host payload fields. Core re-observes the dedicated worktree and computes the
250
+ Action delta and complete current Task surface.
187
251
  8. Submit exactly one call to that qualified tool with `host`, `task_id`, `action_id`, the selected
188
252
  transition, result text, artifact slots, method results and the exact node result. Core fills and
189
253
  retains the complete Action identity and payload envelope.
@@ -218,8 +282,8 @@ reuse an `allow_once` decision for a different write, expand Repository Scope, o
218
282
  path.
219
283
 
220
284
  The gate covers the structured tools above; it is not a filesystem or shell sandbox. Bash, external
221
- processes, and other tool paths may write before Core observes them. Implementation, Refactor and
222
- Delivery submissions must therefore use the exact current changed surface and obey Core's final
285
+ processes, and other tool paths may write before Core observes them. Core derives the complete Task
286
+ surface from the frozen base, commits, index, worktree, and untracked entries, and applies the final
223
287
  scope guard. If the gate is unavailable, stop the supported write rather than describing prompt
224
288
  compliance as interception.
225
289
 
@@ -430,26 +494,141 @@ recovery-before-retry contract.
430
494
 
431
495
  ## Evidence and verification budget
432
496
 
433
- - Count verification commands exactly against Core's immutable budget.
434
- - Do not run a prohibited full suite. When automatic capacity is exhausted, report the remaining
435
- permitted work as manual handoff without claiming it ran.
436
- - Preserve repository instructions and explicit user authority.
437
- - Keep static inspection, simulated Core execution, user-performed evidence, and native automated
438
- evidence distinctly labelled.
439
- - Submit actual sources and outcomes. Never relabel failed, skipped, or unavailable work as passed.
440
- - `source=automated` uses `command_count` 1 to 20 and may set `full_suite` when the budget allows it.
441
- - `source=user`, `source=static`, and `source=host_observed` use `command_count=0` and
442
- `full_suite=false`. Shell commands a person ran by hand belong in that check's `summary`; they
443
- never consume the automatic command budget.
444
- - A verification the user already completed belongs in `checks` with `source=user`. Remove it from
445
- `manual_handoff_items`; that list keeps only work nobody has executed yet.
497
+ At TASKS, after reading the current requirements and design, decomposing the work, identifying its
498
+ expected paths and causal impact, and inspecting the existing tests, create the initial
499
+ `verification_plan`. Record the intended checks, a concrete rationale for each, the expected
500
+ automatic-command budget, whether a full suite is expected, and whether test-code changes are
501
+ expected. Use the smallest level and command count that cover the analyzed change. Task creation has
502
+ no final verification budget.
503
+
504
+ Before each automatic check, compare it with the current plan, current diff, causal impact,
505
+ acceptance criteria, an observed failure, or a real regression. A small local change uses the closest
506
+ targeted check first. Remaining capacity does not justify widening to package, module, or repository
507
+ scope, and verification stops when the current acceptance and actual impact are sufficiently checked.
508
+
509
+ If capacity is insufficient, do not stop merely because it is exhausted and do not run the extra
510
+ command first. Re-read the Task and TEST Action, then submit the returned
511
+ `verification_budget_increased` transition with one closed basis (`new_impact`, `new_risk`,
512
+ `verification_failure`, or `verification_gap`), newly needed checks and rationales, only the extra
513
+ commands or permissions required now, and a concrete reason. Core stays in TEST and returns a new
514
+ Action. “For completeness”, “increase confidence”, “to be safe”, or the existence of remaining
515
+ budget are not specific reasons and cannot authorize an increase.
516
+
517
+ Before every full-suite command, including a rerun after a small fix, freshly decide whether the
518
+ change has broad causal impact, why targeted or package checks are insufficient, which concrete risk
519
+ the suite covers, and whether repository instructions require it at this checkpoint. Budget
520
+ permission alone is never a reason. Run the closest targeted check when those facts do not justify a
521
+ suite. Otherwise send the fresh explanation as `full_suite_reason`; never automatically reuse an
522
+ earlier reason after another edit.
523
+
524
+ Before adding or changing test code, require lasting value: stable product behavior, a public
525
+ contract, an important failure path, or an observed regression. Prefer an existing test location
526
+ with the matching responsibility; create a new file only for a genuinely independent test
527
+ responsibility. A one-time edit or transient prose requirement normally gets a one-time check. For
528
+ example, a forbidden README word is checked with one text search and creates no permanent test file
529
+ or full-suite run.
530
+
531
+ Count and submit actual outcomes. Keep static inspection, simulated execution, user evidence, and
532
+ native automation distinct. `source=automated` uses `command_count` 1 to 20. Non-full checks send an
533
+ empty `full_suite_reason`; full suites send the fresh concrete reason. `source=user`, `source=static`,
534
+ and `source=host_observed` use `command_count=0`, `full_suite=false`, and an empty
535
+ `full_suite_reason`. Put only work nobody has run in `manual_handoff_items`.
536
+
537
+ ## Bounded post-change review
538
+
539
+ For ordinary implementation work, review only the current diff, callers, dependencies and runtime
540
+ paths directly or indirectly affected by it, plus material required for current acceptance. Do not
541
+ restart a repository-wide audit after each edit. Any added review area needs a stated causal path
542
+ from the current change.
543
+
544
+ Fix only defects introduced by the current change or caused in another location by that change.
545
+ Report findings only when they have that causal relationship. Unrelated historical problems stay
546
+ outside the review, Task work, and delivery summary.
547
+
548
+ After fixing a review finding, re-check only the original finding, related regressions, affected
549
+ acceptance criteria, and matching targeted checks. Never restart a broad audit because one finding
550
+ was fixed. End when current acceptance, planned checks, justified increases, and the bounded review
551
+ are complete, with unrun checks and current-design risks reported honestly.
552
+
553
+ An explicit code review, code audit, or repository-wide audit is read-only. Complete that requested
554
+ scope, report all findings and their impact, then stop for a later explicit repair request. Do not
555
+ edit, format, create a patch, or move from review into repair automatically.
556
+
557
+ ## Relocation and unavailable workspaces
558
+
559
+ Relocation keeps one Core Task. After explicit developer authority, call
560
+ `mcp__dev_flow__dev_flow_prepare_task_relocation` with exactly `host`, `task_id`, and `revision` from
561
+ the fresh Task before changing the Host workspace. Core enters `BLOCKED` and returns the relocation
562
+ ID and retained source facts. Then
563
+ perform only the same-machine DSH relaunch or supported Host handoff. Resolve the relocation blocker
564
+ only after the target workspace is available, using `mcp__dev_flow__dev_flow_resolve_blocker` with
565
+ the normal blocked Action identity plus `relocation_id` and
566
+ `relocation_destinations=[{key,repository_path}]` for every repository. Core verifies the same Git
567
+ group, base, content, Task surface, and claim availability and atomically replaces bindings and
568
+ claims. A failure retains the old claim. An uncertain Host response
569
+ requires reading the retained relocation operation and actual Host state; never repeat the handoff
570
+ blindly.
571
+
572
+ `WORKSPACE_UNAVAILABLE` cannot be bypassed by creating a directory at the old path or selecting a
573
+ same-named branch. Restore the exact worktree instance or, after explicit current-turn authority,
574
+ call `mcp__dev_flow__dev_flow_abandon_task` with exact host, Task ID, revision, and a non-empty reason.
575
+ Abandon records the last known binding, releases claims, and ends at `CANCELLED`; it does not inspect
576
+ or delete Git resources.
577
+
578
+ For a prepared workspace-history blocker, use only
579
+ `history_resolution={choice:"accept_current_history",reason:<non-empty>}` after explicit review and
580
+ authorization. Do not mix history, relocation, and file-scope decision members.
446
581
 
447
582
  ## Blocked and terminal behavior
448
583
 
449
584
  Stop repository work when Core returns authoritative `BLOCKED`, `DONE`, `CANCELLED`, an ownership or
450
585
  contract conflict, or another safe-stop. Report Core's blocker and condition, terminal outcome,
451
586
  evidence summary, cancellation, or conflict without replacing or merging a task. Use
452
- `mcp__dev_flow__dev_flow_cancel_task` only after explicit user authority and a fresh current Core identity.
587
+ `mcp__dev_flow__dev_flow_cancel_task` only after explicit user authority, a fresh current Core
588
+ identity, and a successful workspace observation. Use abandon only for a genuinely unavailable
589
+ worktree.
590
+
591
+ Terminal state releases Core claims but never means commit, push, merge, PR, handoff, worktree
592
+ removal, or branch removal. Show the remote/base/frozen commit, task branch/current HEAD, worktree
593
+ path, clean state, current changed paths, and completed verification. Keep, review, handoff,
594
+ worktree cleanup, and branch cleanup are distinct choices. Never automatically remove an active,
595
+ dirty, unpushed, uncertain, or unknown-origin worktree; worktree and branch deletion require separate
596
+ current user authorization and may touch only resources owned by the retained provisioning receipt.
597
+
598
+ Cleanup never deletes the DSH process's current Workspace Root in place. First choose a surviving
599
+ source checkout in the same Git group and require:
600
+
601
+ ```text
602
+ /dev-flow prepare-cleanup launch=<launch_id> repository=<repository_key> task=<task_id> revision=<revision>
603
+ ```
604
+
605
+ Call `workspace_coordinator` with `operation=prepare_cleanup`, those identities, and the transient
606
+ `source_repository_path`. It verifies the terminal Core Task and receipt, does not persist the source
607
+ path, and returns a `command`/`arguments`/`cwd` relaunch descriptor. Relaunch DSH from that source
608
+ checkout. The relaunch turn deletes nothing and asks for the separate worktree decision below.
609
+
610
+ For worktree removal, require the exact current message returned by the Adapter:
611
+
612
+ ```text
613
+ /dev-flow cleanup-worktree launch=<launch_id> repository=<repository_key> task=<task_id> revision=<revision>
614
+ ```
615
+
616
+ Then call `workspace_coordinator` with `operation=cleanup_worktree` and those exact values. The
617
+ Coordinator performs a nested fresh Core read and removes only a terminal receipt-owned worktree
618
+ whose branch and HEAD match Core, whose tracked/index/worktree/submodule state is clean, and whose
619
+ remote task branch equals the terminal HEAD. It never uses force. The task branch remains.
620
+
621
+ Branch deletion is a second decision in a later current user message:
622
+
623
+ ```text
624
+ /dev-flow cleanup-branch launch=<launch_id> repository=<repository_key> task=<task_id> revision=<revision>
625
+ ```
626
+
627
+ Call `workspace_coordinator` with `operation=cleanup_branch`, the same identities, and a current
628
+ source checkout path. The Coordinator does not persist that source path. It verifies the same Git
629
+ group, terminal Core HEAD, exact remote branch, and that no worktree uses the task branch, then uses
630
+ non-force branch deletion. If the branch is not merged, Git refuses and the branch remains. A failed
631
+ or uncertain safety check preserves the resource.
453
632
 
454
633
  Adapter belief that work is complete does not override Core, and a blocker is not success.
455
634
 
@@ -75,18 +75,19 @@ only when actually visible and appropriate to the current authorized artifacts.
75
75
  | `tasks.decompose` | Decompose the current design into bounded, ordered work items. | Create bounded items with dependencies and expected paths. | `speckit-tasks`. | Revise proposal task artifacts through visible `openspec-propose`. | Current bounded task plan. |
76
76
  | `tasks.map_acceptance` | Map every current acceptance criterion to work and verification. | Record acceptance-to-work and verification traceability. | `speckit-tasks`. | Review delta specifications and tasks through visible `openspec-propose`. | Acceptance traceability. |
77
77
  | `tasks.analyze_consistency` | Check requirements, design, and tasks for gaps or contradictions. | Perform a direct cross-artifact consistency review. | `speckit-analyze`. | `openspec-validate` plus direct consistency review. | No unresolved blocking consistency gap, or exact findings. |
78
+ | `tasks.plan_verification` | Set initial verification effort after scope, impact, work, and existing tests are understood. | Record intended checks and rationales, expected automatic commands, full-suite expectation, and test-code expectation. | Direct Task Plan work after `speckit-tasks`; no separate capability. | Revise proposal task artifacts through visible `openspec-propose`. | Current `verification_plan` inside the Task Plan baseline. |
78
79
  | `implementation.execute_plan` | Execute only the work authorized by the current task plan. | Implement the current authorized slice. | `speckit-implement`. | `openspec-apply`. | Implemented current work slice. |
79
- | `implementation.record_surface` | Record exact changed paths or the no-change state and deviations. | Observe and record the exact changed surface. | Direct implementation result; no mandatory capability. | Direct apply result; no mandatory capability. | Changed paths or explicit no-change result. |
80
+ | `implementation.record_surface` | Reconcile the implementation summary with Core's observed Task surface. | Review the actual worktree state and summarize deviations; Core computes paths. | Direct implementation result; no mandatory capability. | Direct apply result; no mandatory capability. | Implementation summary aligned with the observed Task surface. |
80
81
  | `implementation.classify_deviations` | Classify deviations as requirement, design, or complexity concerns. | Record the exact concern and route it through Core facts. | Direct classification; amend active artifacts before continuing when semantics change. | Direct classification and current change-artifact update. | Exact deviations and findings. |
81
- | `test.run_budgeted_checks` | Run only verification authorized by the current verification budget. | Run the current bounded verification steps. | Direct plan-defined checks; no mandatory Spec Kit capability. | Use `openspec-verify` only when visible; otherwise run plan-defined checks. | Actual current verification result. |
82
- | `test.record_evidence` | Record actual evidence sources, outcomes, and unverified or manual items. | Record actual sources and statuses without relabeling; report only file changes newly produced by this TEST Action. Verification-only work uses `changed_paths=[]` and `no_file_changes=true`. | Direct evidence recording; no mandatory capability. | Direct evidence recording; no mandatory capability. | Current bounded evidence summary. |
82
+ | `test.run_budgeted_checks` | Choose the closest necessary checks and adjust insufficient capacity before extra commands run. | Recheck scope before every command; use a justified TEST self-transition before exceeding budget and reassess every full suite. | Direct plan-defined checks; no mandatory Spec Kit capability. | Use `openspec-verify` only when visible and justified; otherwise run plan-defined checks. | Actual bounded result or a recorded pre-run budget increase. |
83
+ | `test.record_evidence` | Record actual evidence or the exact pre-run budget adjustment. | Record actual sources and statuses; full suites include the current reason, while an adjustment records its basis, checks, increment, and reason. | Direct evidence recording; no mandatory capability. | Direct evidence recording; no mandatory capability. | Current evidence summary or budget-adjustment record. |
83
84
  | `test.classify_failure` | Classify failures as implementation, design, or requirement problems. | Classify current failures from observed facts. | Direct classification; no mandatory capability. | Direct classification; no mandatory capability. | Exact failure class and findings. |
84
85
  | `comprehension.explain` | Explain current behavior, design, and code paths in developer-readable terms. | Present a bounded explanation to the developer. | Direct review; no Spec Kit command owns the verdict. | Direct review; no OpenSpec command owns the verdict. | Developer-readable explanation. |
85
86
  | `comprehension.identify_complexity` | Identify unnecessary abstractions and maintenance risks. | List concrete complexity and maintenance concerns. | Direct review; no mandatory capability. | Direct review; no mandatory capability. | Exact abstraction and risk findings. |
86
87
  | `comprehension.obtain_user_verdict` | Obtain the developer's explicit understanding or remediation verdict. | Ask the developer and wait for an explicit answer. | Direct user interaction; no Spec Kit capability can answer. | Direct user interaction; no OpenSpec capability can answer. | Explicit current user verdict. |
87
88
  | `refactor.simplify` | Remove unnecessary complexity within the approved behavior boundary. | Perform the bounded simplification. | `speckit-implement` only after affected artifacts and tasks are current. | Update change artifacts as needed, then use visible `openspec-apply`. | Bounded simplification. |
88
89
  | `refactor.reconcile_artifacts` | Reconcile affected process artifacts with the simplification. | Amend only artifacts affected by the simplification. | Use visible `speckit-clarify`, `speckit-plan`, `speckit-tasks`, or `speckit-analyze` only as needed. | Revise proposal/design/spec/task artifacts through visible `openspec-propose` as needed. | Current affected artifacts. |
89
- | `refactor.record_surface` | Record exact simplifications and the changed surface. | Record simplifications and exact changed paths. | Direct refactor result; no mandatory capability. | Direct apply result; no mandatory capability. | Refactor summary and changed surface. |
90
+ | `refactor.record_surface` | Reconcile simplifications with Core's observed Task surface. | Record simplifications and deviations; Core computes paths. | Direct refactor result; no mandatory capability. | Direct apply result; no mandatory capability. | Refactor summary aligned with the observed Task surface. |
90
91
  | `delivery.reconcile_acceptance` | Map the latest acceptance criteria to current test and comprehension evidence. | Reconcile every current criterion with current evidence. | `speckit-analyze` or direct final consistency review. | Use visible `openspec-verify` and/or `openspec-validate` as appropriate. | Current acceptance/evidence mapping. |
91
92
  | `delivery.reconcile_method_artifacts` | Reconcile method artifacts with delivered behavior. | Ensure current process artifacts describe the delivered behavior. | Direct status reconciliation; `speckit-converge` may be used only when available and appropriate. | Use visible `openspec-sync` and/or `openspec-archive` only when appropriate. | Current reconciled or archived change artifacts. |
92
93
  | `delivery.prepare_summary` | Prepare a bounded delivery summary and remaining risks. | Write the final bounded summary and risks. | Direct summary; no mandatory capability. | Direct summary; no mandatory capability. | Delivery summary and remaining risks. |
@@ -114,28 +115,31 @@ For each step returned by Core:
114
115
  6. Record completion only after the semantic work actually completes.
115
116
 
116
117
  For `plain`, render external capability availability as `not_applicable`. When the ordinary work
117
- actually completes, evidence uses `status="plain_fallback"` and an empty `capability`; plain work is
118
- never labeled as an external capability completion. The same `plain_fallback` rule applies when a
119
- selected external capability is unavailable but the equivalent work actually completes.
118
+ actually completes, submit an empty `capability`; Core records `status="plain_fallback"`. The same
119
+ rule applies when a selected external capability is unavailable but the equivalent work actually
120
+ completes. A non-empty `capability` names the actual external capability that completed the step.
120
121
 
121
- When equivalent work remains incomplete, record `unavailable` or `not_run` honestly. Neither status
122
- can satisfy a required semantic step, so the Adapter must not call apply for that Action.
122
+ When equivalent work remains incomplete, report `unavailable` or `not_run` honestly to the user.
123
+ An incomplete required semantic step prevents submission for that Action.
123
124
 
124
- ## MethodEvidence
125
+ ## Method results
125
126
 
126
- A normal mutation supplies exactly one `MethodEvidence` item for every current Action method step,
127
- in Action order. Each item contains only `step_id`, `status`, `capability`, and `summary`.
127
+ A normal submission supplies `method_results` as a closed object keyed by every current Action
128
+ `method_steps[].step_id`. Each value contains only `capability` and `summary`. Core creates the
129
+ internal `MethodEvidence` items in Action order and fills their `step_id` and `status`.
128
130
 
129
- - `completed` requires the non-empty ID of the actual capability that completed the work.
130
- - `plain_fallback` requires an empty `capability` and completed plain-equivalent work.
131
- - `unavailable` and `not_run` do not satisfy a required step.
132
- - Unknown, duplicate, previous-node, reordered, or omitted steps are invalid.
131
+ - Completed external work supplies the actual non-empty capability ID; Core records `completed`.
132
+ - Completed plain-equivalent work supplies an empty `capability`; Core records `plain_fallback`.
133
+ - Incomplete required steps prevent submission; availability and execution status are not input fields.
134
+ - Unknown, duplicate, previous-node, or omitted step keys are invalid. Core determines item order.
133
135
  - Capability output cannot substitute for the typed `node_result` or any current Core evidence gate.
134
136
 
135
137
  ## Artifact references
136
138
 
137
- Submit artifact evidence only as `role`, contract `path`, `digest`, and `summary`. A single-repository
138
- Task uses an ordinary repository-relative path; a multi-repository Task uses
139
+ Put current-node artifacts in `artifacts.current` when the live schema exposes that slot, and related
140
+ method artifacts in `artifacts.other_process`. Each entry contains only contract `path`, `digest`,
141
+ and `summary`; Core assigns `role` from the slot and current node. A single-repository Task uses an
142
+ ordinary repository-relative path; a multi-repository Task uses
139
143
  `<repository-key>::<repository-relative-path>`. Refer
140
144
  only to a file actually observed by the Host. Never submit full contents, command output, prompts,
141
145
  token data, runtime configuration, or private locations. An artifact digest does not replace the