@xenonbyte/da-vinci-workflow 0.2.3 → 0.2.5

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +32 -7
  3. package/README.zh-CN.md +151 -7
  4. package/SKILL.md +45 -704
  5. package/commands/claude/dv/build.md +5 -0
  6. package/commands/claude/dv/continue.md +4 -0
  7. package/commands/claude/dv/tasks.md +6 -0
  8. package/commands/claude/dv/verify.md +2 -0
  9. package/commands/codex/prompts/dv-build.md +5 -0
  10. package/commands/codex/prompts/dv-continue.md +4 -0
  11. package/commands/codex/prompts/dv-tasks.md +6 -0
  12. package/commands/codex/prompts/dv-verify.md +2 -0
  13. package/commands/gemini/dv/build.toml +5 -0
  14. package/commands/gemini/dv/continue.toml +4 -0
  15. package/commands/gemini/dv/tasks.toml +6 -0
  16. package/commands/gemini/dv/verify.toml +2 -0
  17. package/commands/templates/dv-continue.shared.md +4 -0
  18. package/docs/discipline-and-orchestration-upgrade.md +83 -0
  19. package/docs/dv-command-reference.md +33 -5
  20. package/docs/execution-chain-migration.md +23 -0
  21. package/docs/prompt-entrypoints.md +6 -0
  22. package/docs/skill-contract-maintenance.md +14 -0
  23. package/docs/skill-usage.md +16 -0
  24. package/docs/workflow-overview.md +17 -0
  25. package/docs/zh-CN/dv-command-reference.md +31 -5
  26. package/docs/zh-CN/execution-chain-migration.md +23 -0
  27. package/docs/zh-CN/prompt-entrypoints.md +6 -0
  28. package/docs/zh-CN/skill-usage.md +16 -0
  29. package/docs/zh-CN/workflow-overview.md +17 -0
  30. package/lib/audit-parsers.js +148 -1
  31. package/lib/cli/helpers.js +43 -0
  32. package/lib/cli/lint-family.js +56 -0
  33. package/lib/cli/verify-family.js +79 -0
  34. package/lib/cli.js +123 -145
  35. package/lib/execution-profile.js +143 -0
  36. package/lib/execution-signals.js +19 -1
  37. package/lib/lint-tasks.js +86 -2
  38. package/lib/planning-parsers.js +263 -19
  39. package/lib/scaffold.js +454 -23
  40. package/lib/supervisor-review.js +2 -1
  41. package/lib/task-execution.js +160 -0
  42. package/lib/task-review.js +197 -0
  43. package/lib/utils.js +19 -0
  44. package/lib/verify.js +1308 -85
  45. package/lib/workflow-state.js +452 -30
  46. package/lib/worktree-preflight.js +214 -0
  47. package/package.json +1 -1
  48. package/references/artifact-templates.md +56 -6
  49. package/references/skill-workflow-detail.md +66 -0
@@ -15,6 +15,8 @@ Before broad implementation when shell access is available:
15
15
  - run `da-vinci scope-check --project <path> [--change <id>]`
16
16
  - if `tasks.md` exists, run `da-vinci lint-tasks --project <path> [--change <id>]`
17
17
  - if both `pencil-design.md` and `pencil-bindings.md` exist, run `da-vinci lint-bindings --project <path> [--change <id>]`
18
+ - inspect `executionProfile` and discipline blockers from `da-vinci next-step --project <path> [--change <id>] --json`
19
+ - if profile mode is `bounded_parallel`, run `da-vinci worktree-preflight --project <path> [--change <id>]` and downgrade to serial unless isolation is ready or explicitly accepted
18
20
  - treat command output as the gate; do not downgrade `BLOCK` or non-zero results into soft guidance
19
21
  - treat any `BLOCK` or missing required planning/design artifact as a hard stop before broad implementation
20
22
 
@@ -25,10 +27,13 @@ Focus on:
25
27
 
26
28
  During implementation:
27
29
  - run `execution checkpoint` after each top-level task group
30
+ - persist per-task implementer evidence via `da-vinci task-execution --project <path> --change <id> --task-group <id> --status <...> --summary <...>`
31
+ - persist ordered review evidence via `da-vinci task-review --project <path> --change <id> --task-group <id> --stage spec ...` then `--stage quality ...`
28
32
  - update source artifacts before continuing if drift is found
29
33
 
30
34
  Completion discipline:
31
35
  - treat `BUILD SUCCESSFUL` as compile-only evidence, not workflow completion
32
36
  - do not report `design complete` or `workflow complete` while in-scope task groups remain unfinished
37
+ - do not use terminal completion wording without fresh verification evidence
33
38
  - before any terminal completion claim, require `da-vinci audit --mode completion --change <change-id> <project-path>` to pass
34
39
  - if completion audit fails, continue from the minimal unfinished stage instead of exiting
@@ -23,14 +23,18 @@ Route discipline:
23
23
  - treat this route as prompt-first orchestration; do not assume a standalone CLI `continue` command exists
24
24
  - when shell access is available, run `da-vinci workflow-status --project <path> [--change <id>] --json` before deciding the primary continuation route
25
25
  - use `da-vinci next-step --project <path> [--change <id>]` as the first routing signal
26
+ - prefer `da-vinci next-step --project <path> [--change <id>] --json` when available so discipline markers, execution profile hints, and verification freshness are explicit
26
27
  - run `da-vinci scope-check --project <path> [--change <id>]` when page/state propagation looks ambiguous
27
28
  - do not restart discovery if the current artifacts already contain enough truth
28
29
  - determine route selection from artifact and checkpoint truth before reading contextual deltas
29
30
  - if workflow-status or next-step output is missing, stale, or unavailable, fall back to artifact scanning and checkpoint evidence
30
31
  - use contextual deltas as auxiliary recovery context only; they must not override route selection
31
32
  - if contextual deltas conflict with current artifacts, ignore them for routing and call out the conflict
33
+ - if design approval discipline markers are missing, malformed, or stale, keep routing in design/task refinement rather than promoting directly into implementation
32
34
  - do not default the user into `/dv:build` unless the project is clearly implementation-ready
33
35
  - if design artifacts exist but `tasks.md` does not, prefer a continuation prompt that moves into `/dv:tasks`
34
36
  - only prefer `/dv:build` once task generation and implementation readiness are already clear
35
37
  - do not route into `/dv:build` when any design gate is unresolved: missing shell-visible project-local `.pen`, active/unclosed Pencil session, runtime/design-source checkpoint still BLOCK, or required design-supervisor review still BLOCK/unaccepted
38
+ - if bounded-parallel execution is hinted, include `da-vinci worktree-preflight --project <path> [--change <id>]` before emitting a parallel implementation continuation prompt
39
+ - avoid terminal completion wording unless fresh verification evidence and completion audit requirements are explicit
36
40
  - continuation prompts should usually target the main workflow entry so Da Vinci can resume the full state machine
@@ -13,6 +13,12 @@ Focus on:
13
13
  - Pencil coverage
14
14
  - dependency order
15
15
 
16
+ Task-plan discipline:
17
+ - include exact file or code-area ownership targets per task group
18
+ - include explicit verification commands, not only abstract verification wording
19
+ - include execution intent hints (`serial`, `bounded_parallel`, or `review_required`) and review intent
20
+ - include parseable discipline markers for design approval, plan self-review, and operator review acknowledgment
21
+
16
22
  Create or update:
17
23
  - `tasks.md`
18
24
 
@@ -22,6 +22,8 @@ When shell access is available:
22
22
  - run `da-vinci verify-coverage --project <path> [--change <id>]`
23
23
  - treat command output as the gate; do not downgrade `BLOCK` or `FAIL` into soft guidance
24
24
  - if any verification surface is still `BLOCK` or `FAIL`, keep the workflow in verification and record the drift instead of claiming success
25
+ - require fresh verification evidence in `verify-coverage` and `workflow-status` before any terminal completion wording
26
+ - if task-review evidence is recorded, keep unresolved `WARN/BLOCK` task-review stages open instead of closing the task group
25
27
 
26
28
  If Pencil MCP is active and terminal completion is being considered, re-check the MCP runtime gate evidence before treating verification as complete.
27
29
  Before any terminal completion claim, require `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
@@ -15,6 +15,8 @@ Before broad implementation when shell access is available:
15
15
  - run `da-vinci scope-check --project <path> [--change <id>]`
16
16
  - if `tasks.md` exists, run `da-vinci lint-tasks --project <path> [--change <id>]`
17
17
  - if both `pencil-design.md` and `pencil-bindings.md` exist, run `da-vinci lint-bindings --project <path> [--change <id>]`
18
+ - inspect `executionProfile` and discipline blockers from `da-vinci next-step --project <path> [--change <id>] --json`
19
+ - if profile mode is `bounded_parallel`, run `da-vinci worktree-preflight --project <path> [--change <id>]` and downgrade to serial unless isolation is ready or explicitly accepted
18
20
  - treat command output as the gate; do not downgrade `BLOCK` or non-zero results into soft guidance
19
21
  - treat any `BLOCK` or missing required planning/design artifact as a hard stop before broad implementation
20
22
 
@@ -22,7 +24,10 @@ Implementation rules:
22
24
  - requirements decide behavior
23
25
  - Pencil decides presentation
24
26
  - run `execution checkpoint` after each top-level task group
27
+ - persist per-task implementer evidence via `da-vinci task-execution --project <path> --change <id> --task-group <id> --status <...> --summary <...>`
28
+ - persist ordered review evidence via `da-vinci task-review --project <path> --change <id> --task-group <id> --stage spec ...` then `--stage quality ...`
25
29
  - treat `BUILD SUCCESSFUL` as compile-only evidence, not workflow completion
26
30
  - do not report `design complete` or `workflow complete` while in-scope task groups remain unfinished
31
+ - do not use terminal completion wording without fresh verification evidence
27
32
  - before any terminal completion claim, require `da-vinci audit --mode completion --change <change-id> <project-path>` to pass
28
33
  - if completion audit fails, continue from the minimal unfinished stage instead of exiting
@@ -23,14 +23,18 @@ Route discipline:
23
23
  - treat this route as prompt-first orchestration; do not assume a standalone CLI `continue` command exists
24
24
  - when shell access is available, run `da-vinci workflow-status --project <path> [--change <id>] --json` before deciding the primary continuation route
25
25
  - use `da-vinci next-step --project <path> [--change <id>]` as the first routing signal
26
+ - prefer `da-vinci next-step --project <path> [--change <id>] --json` when available so discipline markers, execution profile hints, and verification freshness are explicit
26
27
  - run `da-vinci scope-check --project <path> [--change <id>]` when page/state propagation looks ambiguous
27
28
  - do not restart discovery if the current artifacts already contain enough truth
28
29
  - determine route selection from artifact and checkpoint truth before reading contextual deltas
29
30
  - if workflow-status or next-step output is missing, stale, or unavailable, fall back to artifact scanning and checkpoint evidence
30
31
  - use contextual deltas as auxiliary recovery context only; they must not override route selection
31
32
  - if contextual deltas conflict with current artifacts, ignore them for routing and call out the conflict
33
+ - if design approval discipline markers are missing, malformed, or stale, keep routing in design/task refinement rather than promoting directly into implementation
32
34
  - do not default the user into `/prompts:dv-build` unless the project is clearly implementation-ready
33
35
  - if design artifacts exist but `tasks.md` does not, prefer a continuation prompt that moves into `/prompts:dv-tasks`
34
36
  - only prefer `/prompts:dv-build` once task generation and implementation readiness are already clear
35
37
  - do not route into `/prompts:dv-build` when any design gate is unresolved: missing shell-visible project-local `.pen`, active/unclosed Pencil session, runtime/design-source checkpoint still BLOCK, or required design-supervisor review still BLOCK/unaccepted
38
+ - if bounded-parallel execution is hinted, include `da-vinci worktree-preflight --project <path> [--change <id>]` before emitting a parallel implementation continuation prompt
39
+ - avoid terminal completion wording unless fresh verification evidence and completion audit requirements are explicit
36
40
  - continuation prompts should usually target the main workflow entry so Da Vinci can resume the full state machine
@@ -15,6 +15,12 @@ Tasks must cover:
15
15
  - Pencil-backed UI work
16
16
  - verification work
17
17
 
18
+ Task-plan discipline:
19
+ - each top-level task group should include exact file or code-area ownership targets
20
+ - include explicit verification commands, not only abstract verification wording
21
+ - include execution intent hints (`serial`, `bounded_parallel`, or `review_required`) and review intent
22
+ - include parseable discipline markers for design approval, plan self-review, and operator review acknowledgment
23
+
18
24
  Before claiming implementation-ready task planning:
19
25
  - re-check that the workflow is still in the `/dv:tasks` lane when route context is stale or unclear
20
26
  - run the `task checkpoint`
@@ -20,5 +20,7 @@ When shell access is available:
20
20
  - run `da-vinci verify-coverage --project <path> [--change <id>]`
21
21
  - treat command output as the gate; do not downgrade `BLOCK` or `FAIL` into soft guidance
22
22
  - if any verification surface is still `BLOCK` or `FAIL`, keep the workflow in verification and record the drift instead of claiming success
23
+ - require fresh verification evidence in `verify-coverage` and `workflow-status` before any terminal completion wording
24
+ - if task-review evidence is recorded, keep unresolved `WARN/BLOCK` task-review stages open instead of closing the task group
23
25
  If Pencil MCP is active and terminal completion is being considered, re-check the MCP runtime gate evidence before treating verification as complete.
24
26
  Before any terminal completion claim, require `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
@@ -14,6 +14,8 @@ Before broad implementation when shell access is available:
14
14
  - run `da-vinci scope-check --project <path> [--change <id>]`
15
15
  - if `tasks.md` exists, run `da-vinci lint-tasks --project <path> [--change <id>]`
16
16
  - if both `pencil-design.md` and `pencil-bindings.md` exist, run `da-vinci lint-bindings --project <path> [--change <id>]`
17
+ - inspect `executionProfile` and discipline blockers from `da-vinci next-step --project <path> [--change <id>] --json`
18
+ - if profile mode is `bounded_parallel`, run `da-vinci worktree-preflight --project <path> [--change <id>]` and downgrade to serial unless isolation is ready or explicitly accepted
17
19
  - treat command output as the gate; do not downgrade `BLOCK` or non-zero results into soft guidance
18
20
  - treat any `BLOCK` or missing required planning/design artifact as a hard stop before broad implementation
19
21
 
@@ -21,8 +23,11 @@ Implementation rules:
21
23
  - requirements decide behavior
22
24
  - Pencil decides presentation
23
25
  - run `execution checkpoint` after each top-level task group
26
+ - persist per-task implementer evidence via `da-vinci task-execution --project <path> --change <id> --task-group <id> --status <...> --summary <...>`
27
+ - persist ordered review evidence via `da-vinci task-review --project <path> --change <id> --task-group <id> --stage spec ...` then `--stage quality ...`
24
28
  - treat `BUILD SUCCESSFUL` as compile-only evidence, not workflow completion
25
29
  - do not report `design complete` or `workflow complete` while in-scope task groups remain unfinished
30
+ - do not use terminal completion wording without fresh verification evidence
26
31
  - before any terminal completion claim, require `da-vinci audit --mode completion --change <change-id> <project-path>` to pass
27
32
  - if completion audit fails, continue from the minimal unfinished stage instead of exiting
28
33
  """
@@ -22,15 +22,19 @@ Route discipline:
22
22
  - treat this route as prompt-first orchestration; do not assume a standalone CLI `continue` command exists
23
23
  - when shell access is available, run `da-vinci workflow-status --project <path> [--change <id>] --json` before deciding the primary continuation route
24
24
  - use `da-vinci next-step --project <path> [--change <id>]` as the first routing signal
25
+ - prefer `da-vinci next-step --project <path> [--change <id>] --json` when available so discipline markers, execution profile hints, and verification freshness are explicit
25
26
  - run `da-vinci scope-check --project <path> [--change <id>]` when page/state propagation looks ambiguous
26
27
  - do not restart discovery if the current artifacts already contain enough truth
27
28
  - determine route selection from artifact and checkpoint truth before reading contextual deltas
28
29
  - if workflow-status or next-step output is missing, stale, or unavailable, fall back to artifact scanning and checkpoint evidence
29
30
  - use contextual deltas as auxiliary recovery context only; they must not override route selection
30
31
  - if contextual deltas conflict with current artifacts, ignore them for routing and call out the conflict
32
+ - if design approval discipline markers are missing, malformed, or stale, keep routing in design/task refinement rather than promoting directly into implementation
31
33
  - do not default the user into `/dv:build` unless the project is clearly implementation-ready
32
34
  - if design artifacts exist but `tasks.md` does not, prefer a continuation prompt that moves into `/dv:tasks`
33
35
  - only prefer `/dv:build` once task generation and implementation readiness are already clear
34
36
  - do not route into `/dv:build` when any design gate is unresolved: missing shell-visible project-local `.pen`, active/unclosed Pencil session, runtime/design-source checkpoint still BLOCK, or required design-supervisor review still BLOCK/unaccepted
37
+ - if bounded-parallel execution is hinted, include `da-vinci worktree-preflight --project <path> [--change <id>]` before emitting a parallel implementation continuation prompt
38
+ - avoid terminal completion wording unless fresh verification evidence and completion audit requirements are explicit
35
39
  - continuation prompts should usually target the main workflow entry so Da Vinci can resume the full state machine
36
40
  """
@@ -11,6 +11,12 @@ Create or update:
11
11
 
12
12
  Tasks must cover spec behavior, Pencil-backed UI work, and verification.
13
13
 
14
+ Task-plan discipline:
15
+ - include exact file or code-area ownership targets per task group
16
+ - include explicit verification commands, not only abstract verification wording
17
+ - include execution intent hints (`serial`, `bounded_parallel`, or `review_required`) and review intent
18
+ - include parseable discipline markers for design approval, plan self-review, and operator review acknowledgment
19
+
14
20
  Before claiming implementation-ready task planning:
15
21
  - re-check that the workflow is still in the `/dv:tasks` lane when route context is stale or unclear
16
22
  - run the `task checkpoint`
@@ -19,6 +19,8 @@ When shell access is available:
19
19
  - run `da-vinci verify-coverage --project <path> [--change <id>]`
20
20
  - treat command output as the gate; do not downgrade `BLOCK` or `FAIL` into soft guidance
21
21
  - if any verification surface is still `BLOCK` or `FAIL`, keep the workflow in verification and record the drift instead of claiming success
22
+ - require fresh verification evidence in `verify-coverage` and `workflow-status` before any terminal completion wording
23
+ - if task-review evidence is recorded, keep unresolved `WARN/BLOCK` task-review stages open instead of closing the task group
22
24
  If Pencil MCP is active and terminal completion is being considered, re-check the MCP runtime gate evidence before treating verification as complete.
23
25
  Before any terminal completion claim, require `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
24
26
  """
@@ -20,14 +20,18 @@ Route discipline:
20
20
  - treat this route as prompt-first orchestration; do not assume a standalone CLI `continue` command exists
21
21
  - when shell access is available, run `da-vinci workflow-status --project <path> [--change <id>] --json` before deciding the primary continuation route
22
22
  - use `da-vinci next-step --project <path> [--change <id>]` as the first routing signal
23
+ - prefer `da-vinci next-step --project <path> [--change <id>] --json` when available so discipline markers, execution profile hints, and verification freshness are explicit
23
24
  - run `da-vinci scope-check --project <path> [--change <id>]` when page/state propagation looks ambiguous
24
25
  - do not restart discovery if the current artifacts already contain enough truth
25
26
  - determine route selection from artifact and checkpoint truth before reading contextual deltas
26
27
  - if workflow-status or next-step output is missing, stale, or unavailable, fall back to artifact scanning and checkpoint evidence
27
28
  - use contextual deltas as auxiliary recovery context only; they must not override route selection
28
29
  - if contextual deltas conflict with current artifacts, ignore them for routing and call out the conflict
30
+ - if design approval discipline markers are missing, malformed, or stale, keep routing in design/task refinement rather than promoting directly into implementation
29
31
  - do not default the user into `{{BUILD_ROUTE}}` unless the project is clearly implementation-ready
30
32
  - if design artifacts exist but `tasks.md` does not, prefer a continuation prompt that moves into `{{TASKS_ROUTE}}`
31
33
  - only prefer `{{BUILD_ROUTE}}` once task generation and implementation readiness are already clear
32
34
  - do not route into `{{BUILD_ROUTE}}` when any design gate is unresolved: missing shell-visible project-local `.pen`, active/unclosed Pencil session, runtime/design-source checkpoint still BLOCK, or required design-supervisor review still BLOCK/unaccepted
35
+ - if bounded-parallel execution is hinted, include `da-vinci worktree-preflight --project <path> [--change <id>]` before emitting a parallel implementation continuation prompt
36
+ - avoid terminal completion wording unless fresh verification evidence and completion audit requirements are explicit
33
37
  - continuation prompts should usually target the main workflow entry so Da Vinci can resume the full state machine
@@ -0,0 +1,83 @@
1
+ # Discipline And Orchestration Upgrade
2
+
3
+ This document explains the implemented `discipline-and-orchestration-upgrade` change and how to use its artifacts.
4
+
5
+ Status:
6
+
7
+ - completed (runtime surfaces and docs rolled out)
8
+ - tracking path: `openspec/changes/discipline-and-orchestration-upgrade/`
9
+
10
+ ## Purpose
11
+
12
+ This upgrade imports bounded ideas from external projects while preserving Da Vinci's core truth model.
13
+
14
+ Primary intent:
15
+
16
+ - improve execution discipline from `design` to `tasks` to `build` to `verify`
17
+ - improve task-plan quality and implementation review structure
18
+ - expose orchestration hints without allowing orchestration to override workflow truth
19
+
20
+ Core boundary:
21
+
22
+ - artifacts, checkpoints, execution signals, and `audit` remain workflow truth
23
+ - orchestration remains advisory or explicitly bounded
24
+
25
+ ## External Inspiration (Source-Tracked)
26
+
27
+ - `obra/superpowers`:
28
+ - design-first discipline
29
+ - plan-quality discipline
30
+ - two-stage implementation review
31
+ - verification-before-completion wording discipline
32
+ - optional worktree isolation practice
33
+ - `ruvnet/ruflo`:
34
+ - bounded orchestration profiles
35
+ - anti-drift execution patterns
36
+ - role and concurrency guidance
37
+
38
+ See exact source files in:
39
+
40
+ - `openspec/changes/discipline-and-orchestration-upgrade/README.md`
41
+
42
+ ## OpenSpec Structure
43
+
44
+ Use these files in order:
45
+
46
+ 1. `openspec/changes/discipline-and-orchestration-upgrade/proposal.md`
47
+ 2. `openspec/changes/discipline-and-orchestration-upgrade/design.md`
48
+ 3. `openspec/changes/discipline-and-orchestration-upgrade/specs/workflow-discipline/spec.md`
49
+ 4. `openspec/changes/discipline-and-orchestration-upgrade/specs/execution-orchestration/spec.md`
50
+ 5. `openspec/changes/discipline-and-orchestration-upgrade/specs/execution-evidence-and-isolation/spec.md`
51
+ 6. `openspec/changes/discipline-and-orchestration-upgrade/tasks.md`
52
+
53
+ ## Documentation Rollout Scope
54
+
55
+ During implementation of this upgrade, keep the following docs aligned:
56
+
57
+ - `README.md`
58
+ - `README.zh-CN.md`
59
+ - `docs/workflow-overview.md`
60
+ - `docs/dv-command-reference.md`
61
+ - `docs/skill-usage.md`
62
+ - `docs/prompt-entrypoints.md`
63
+ - `docs/zh-CN/workflow-overview.md`
64
+ - `docs/zh-CN/dv-command-reference.md`
65
+ - `docs/zh-CN/skill-usage.md`
66
+ - `docs/zh-CN/prompt-entrypoints.md`
67
+
68
+ Prompt and command assets that must stay aligned:
69
+
70
+ - `commands/codex/**`
71
+ - `commands/claude/**`
72
+ - `commands/gemini/**`
73
+
74
+ Maintainer rollout and source-trace checklist:
75
+
76
+ - `openspec/changes/discipline-and-orchestration-upgrade/docs-update-plan.md`
77
+
78
+ ## Documentation Guardrails
79
+
80
+ - Do not document planned behavior as already shipped behavior.
81
+ - Keep advisory vs blocking semantics explicit in operator docs.
82
+ - Keep completion-audit authority explicit; do not imply replacement by orchestration hints.
83
+ - When English operator docs are updated, update existing `docs/zh-CN` mirrors in the same rollout.
@@ -43,10 +43,11 @@ These commands do not replace route selection, but they support design execution
43
43
  - useful when the command surface is harder to remember than the workflow itself
44
44
  - `da-vinci workflow-status --project <path> [--change <id>] [--json]`
45
45
  - derives the current workflow stage from artifact and checkpoint truth
46
- - reports blockers, warnings, handoff-gate state, and one primary route recommendation
46
+ - reports blockers, warnings, handoff-gate state, discipline markers, execution profile hints, and verification-evidence freshness
47
47
  - keep this distinct from `audit`: route guidance is not completion truth
48
48
  - `da-vinci next-step --project <path> [--change <id>] [--json]`
49
49
  - provides a route-first continuation summary from the same derived workflow state
50
+ - JSON output includes `nextStep`, `executionProfile`, `worktreePreflight`, and discipline/freshness metadata for orchestration consumers
50
51
  - use this as the first continuation signal before free-form artifact scanning
51
52
  - `da-vinci lint-spec --project <path> [--change <id>] [--strict] [--json]`
52
53
  - validates Da Vinci runtime `spec.md` schema sections (`Behavior`, `States`, `Inputs`, `Outputs`, `Acceptance`, `Edge Cases`)
@@ -57,7 +58,7 @@ These commands do not replace route selection, but they support design execution
57
58
  - emits a machine-readable coverage matrix for pages and states
58
59
  - default behavior is advisory (`WARN` with zero exit); `--strict` upgrades findings to blocking
59
60
  - `da-vinci lint-tasks --project <path> [--change <id>] [--strict] [--json]`
60
- - validates top-level task groups, ordering, verification actions, and behavior-to-task coverage hints
61
+ - validates top-level task groups, ordering, discipline markers, execution-mode hints, file targets, verification commands, and behavior-to-task coverage hints
61
62
  - default behavior is advisory (`WARN` with zero exit); `--strict` upgrades findings to blocking
62
63
  - `da-vinci lint-bindings --project <path> [--change <id>] [--strict] [--json]`
63
64
  - validates implementation-to-Pencil mappings for parseability, source shape, and implementation landings
@@ -65,9 +66,30 @@ These commands do not replace route selection, but they support design execution
65
66
  - `da-vinci generate-sidecars --project <path> [--change <id>] [--json]`
66
67
  - explicitly generates deterministic planning sidecars: `spec.index.json`, `tasks.index.json`, `page-map.index.json`, `bindings.index.json`
67
68
  - this is the only write surface for planning sidecars; lint/status/verify surfaces should not silently rewrite them
68
- - `da-vinci verify-bindings|verify-implementation|verify-structure|verify-coverage --project <path> [--change <id>] [--strict] [--json]`
69
- - verifies code landings, planned-state implementation evidence, and structural consistency against bindings
70
- - `verify-structure` reports whether checks used markup-backed analysis or heuristic fallback and exposes confidence
69
+ - `da-vinci verify-bindings --project <path> [--change <id>] [--strict] [--json]`
70
+ - validates implementation landing resolution from `pencil-bindings.md`
71
+ - `da-vinci verify-implementation --project <path> [--change <id>] [--changed-files <csv>] [--strict] [--json]`
72
+ - verifies planned-state/task-group implementation evidence with per-check `mode` + `confidence` metadata
73
+ - JS/TS checks are syntax-aware and do not count comment-only or string-literal-only matches as normal coverage
74
+ - when `--changed-files` is used, the run is explicit incremental scope (partial semantics) and reports selected/scanned/filtered file counts
75
+ - `da-vinci verify-structure --project <path> [--change <id>] [--changed-files <csv>] [--strict] [--json]`
76
+ - verifies structural consistency against bindings and reports `markup` vs `heuristic` confidence surfaces
77
+ - when `--changed-files` is used, unmatched or irrelevant entries stay visible instead of silently widening to full scan
78
+ - `da-vinci verify-coverage --project <path> [--change <id>] [--changed-files <csv>] [--strict] [--json]`
79
+ - aggregates upstream verification surfaces and marks incremental upstream results as partial freshness
80
+ - `da-vinci scaffold --project <path> [--change <id>] [--output <path>] [--json]`
81
+ - generates reviewable TODO scaffold templates with framework-aware shape (`next`/`react`/`vue`/`svelte`/`html`)
82
+ - keeps known implementation landing extension/route shape when a concrete landing already exists
83
+ - unknown/ambiguous framework detection falls back to HTML with explicit warning; traversal/output-root safety remains enforced
84
+ - `da-vinci task-execution --project <path> --change <id> --task-group <id> --status <DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED> --summary <text> [--changed-files <csv>] [--test-evidence <csv>] [--concerns <csv>] [--blockers <csv>] [--json]`
85
+ - persists normalized implementer-status envelopes into execution signals
86
+ - use this to keep resume routing machine-readable when implementation is blocked or concerns remain
87
+ - `da-vinci task-review --project <path> --change <id> --task-group <id> --stage <spec|quality> --status <PASS|WARN|BLOCK> --summary <text> [--issues <csv>] [--reviewer <name>] [--write-verification] [--json]`
88
+ - persists ordered two-stage task review evidence (`spec` before `quality`)
89
+ - rejects out-of-order quality approval and can append evidence into `verification.md`
90
+ - `da-vinci worktree-preflight --project <path> [--change <id>] [--json]`
91
+ - runs advisory worktree isolation checks (`.worktrees/` or `worktrees/` ignore safety, dirty workspace, baseline test heuristics)
92
+ - does not replace route truth; use it to decide whether bounded-parallel execution should downgrade to serial
71
93
  - `da-vinci diff-spec --project <path> [--change <id>] [--from <sidecars-dir>] [--json]`
72
94
  - compares normalized planning sidecars and reports added/removed/modified requirement planning items
73
95
  - includes normalized spec deltas plus broader planning summaries (tasks/page-map/bindings) under one surface
@@ -255,6 +277,10 @@ Build-stage self-check:
255
277
  - run `da-vinci scope-check --project <path> [--change <id>]`
256
278
  - if `tasks.md` exists, run `da-vinci lint-tasks --project <path> [--change <id>]`
257
279
  - if both `pencil-design.md` and `pencil-bindings.md` exist, run `da-vinci lint-bindings --project <path> [--change <id>]`
280
+ - inspect `executionProfile` from `da-vinci next-step --project <path> [--change <id>] --json`
281
+ - if profile mode is `bounded_parallel`, run `da-vinci worktree-preflight --project <path> [--change <id>]` and downgrade to serial unless isolation is ready or explicitly accepted
282
+ - persist per-task implementer outcomes via `da-vinci task-execution ...` and keep unresolved concerns visible before closure
283
+ - run task review in order: `da-vinci task-review ... --stage spec ...` then `da-vinci task-review ... --stage quality ...`
258
284
  - treat command output as the gate; do not downgrade `BLOCK` or non-zero results into soft guidance
259
285
  - treat any `BLOCK` or missing required planning/design artifact as a hard stop before broad implementation
260
286
 
@@ -286,6 +312,8 @@ Verify-stage self-check:
286
312
  - run `da-vinci verify-coverage --project <path> [--change <id>]`
287
313
  - treat command output as the gate; do not downgrade `BLOCK` or `FAIL` into soft guidance
288
314
  - if any verification surface is still `BLOCK` or `FAIL`, keep the workflow in verification and record the drift instead of claiming success
315
+ - require fresh verification evidence in `verify-coverage` and `workflow-status` before terminal completion wording
316
+ - if task-review evidence is being recorded, keep unresolved `WARN/BLOCK` review stages open instead of closing the task group
289
317
  - before terminal completion, require `da-vinci audit --mode completion --change <change-id> <project-path>` to pass
290
318
 
291
319
  ## State-Based Next-Step Rules
@@ -44,3 +44,26 @@ If any check fails, Da Vinci falls back to derived state from artifacts and reco
44
44
  - no multi-framework expansion in the MVP
45
45
  - scaffold boundaries come from `pencil-bindings.md` mappings
46
46
  - verify scaffold output with `verify-bindings`, `verify-implementation`, and `verify-structure` before acceptance
47
+
48
+ ## 5. Planned Next Upgrade: Discipline And Orchestration
49
+
50
+ After execution-chain surfaces are enabled, the next planned upgrade is:
51
+
52
+ - `openspec/changes/discipline-and-orchestration-upgrade/`
53
+
54
+ This planned change adds:
55
+
56
+ - stronger handoff discipline before implementation
57
+ - stronger task-plan quality checks
58
+ - bounded orchestration hints tied to workflow state
59
+ - structured task execution and review evidence
60
+ - completion wording discipline backed by fresh verification evidence
61
+ - optional worktree preflight guidance
62
+
63
+ Important boundary:
64
+
65
+ - this does not replace artifact truth, checkpoint truth, or completion-audit authority
66
+
67
+ See:
68
+
69
+ - `docs/discipline-and-orchestration-upgrade.md`
@@ -66,13 +66,18 @@ Continuation precedence:
66
66
 
67
67
  - when shell access is available, run `da-vinci workflow-status --project <path> [--change <id>] --json` before route selection
68
68
  - use `da-vinci next-step --project <path> [--change <id>]` as the first continuation routing signal
69
+ - prefer reading `da-vinci next-step --project <path> [--change <id>] --json` when available so discipline marker state, execution-profile hints, and verification freshness are explicit
69
70
  - run `da-vinci lint-spec --project <path> [--change <id>]` when runtime spec quality is uncertain before routing into `build`
70
71
  - run `da-vinci scope-check --project <path> [--change <id>]` when page or state propagation across planning artifacts is uncertain
72
+ - run `da-vinci lint-tasks --project <path> [--change <id>]` before routing into `build` when task metadata quality is uncertain
71
73
  - run `da-vinci verify-bindings --project <path> [--change <id>]` and `da-vinci verify-coverage --project <path> [--change <id>]` before terminal completion routing
74
+ - if using `--changed-files` with `verify-implementation`/`verify-structure`/`verify-coverage`, treat results as explicit incremental partial evidence, not full-project freshness
72
75
  - run `da-vinci diff-spec --project <path> [--change <id>]` after planning edits when continuation must reason about changed requirement slices
73
76
  - determine routing from artifact and checkpoint truth first
74
77
  - use contextual checkpoint deltas only as auxiliary recovery context
75
78
  - if contextual deltas conflict with current artifacts, ignore them for routing and note the conflict
79
+ - if design approval discipline markers are missing, malformed, or stale, keep routing in `design` or `tasks` and avoid direct promotion into `build`
80
+ - if bounded-parallel execution is hinted, run `da-vinci worktree-preflight --project <path> [--change <id>]` before emitting a parallel build continuation prompt
76
81
 
77
82
  ## Default Flow
78
83
 
@@ -93,6 +98,7 @@ State rule:
93
98
 
94
99
  - if design is done but `tasks.md` does not exist yet, the next recommended route should usually be `tasks`, not `build`
95
100
  - only recommend `build` as the primary next step once tasks and implementation readiness are already clear
101
+ - never include terminal completion wording unless fresh verification evidence is present and completion audit is explicitly required
96
102
 
97
103
  ## Platform Syntax
98
104
 
@@ -0,0 +1,14 @@
1
+ # SKILL Contract Maintenance
2
+
3
+ Use this policy when editing workflow guidance:
4
+
5
+ 1. Keep invariant route/execution truth in `SKILL.md` only.
6
+ 2. Keep stage-specific procedure in one owned reference file.
7
+ 3. Ensure `SKILL.md` `Load References On Demand` map points to that owner.
8
+ 4. Avoid duplicate prose across `SKILL.md`, `references/`, and generated command assets unless tests explicitly require duplication.
9
+ 5. Update `references/skill-workflow-detail.md` move map when relocating sections.
10
+
11
+ Boundary rule:
12
+
13
+ - If a rule changes workflow truth, route semantics, or execution policy, edit core.
14
+ - If a rule is tactical for one stage (design/build/review/scaffold), edit reference docs.
@@ -85,6 +85,12 @@ When design is mostly ready and implementation is next, use these checks:
85
85
  - use this when runtime spec quality is still uncertain
86
86
  - `da-vinci scope-check`
87
87
  - use this when page/state propagation across planning artifacts looks ambiguous
88
+ - `da-vinci lint-tasks`
89
+ - confirm task groups have discipline markers, exact ownership targets, execution intent, and verification commands
90
+ - `da-vinci lint-bindings`
91
+ - run this when `pencil-design.md` and `pencil-bindings.md` both exist so implementation landing evidence stays parseable
92
+ - `da-vinci worktree-preflight`
93
+ - run this before bounded-parallel execution to decide whether local worktree isolation is recommended
88
94
 
89
95
  If you are already inside the project root directory, `--project` is optional because the CLI falls back to `cwd`.
90
96
 
@@ -95,8 +101,17 @@ da-vinci workflow-status
95
101
  da-vinci next-step
96
102
  da-vinci lint-spec
97
103
  da-vinci scope-check
104
+ da-vinci lint-tasks
98
105
  ```
99
106
 
107
+ During implementation, persist machine-readable task evidence instead of relying on chat-only summaries:
108
+
109
+ - `da-vinci task-execution --project <path> --change <id> --task-group <id> --status <DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED> --summary <text> ...`
110
+ - `da-vinci task-review --project <path> --change <id> --task-group <id> --stage spec ...`
111
+ - `da-vinci task-review --project <path> --change <id> --task-group <id> --stage quality ...`
112
+
113
+ `quality` review is valid only after `spec` review has a `PASS` record for the same task group.
114
+
100
115
  ## After Pausing Midway
101
116
 
102
117
  The safest resume order is:
@@ -107,6 +122,7 @@ The safest resume order is:
107
122
  4. if planning propagation is unclear, run `da-vinci scope-check`
108
123
  5. if planning artifacts changed since the last stable snapshot, run `da-vinci generate-sidecars` and `da-vinci diff-spec`
109
124
  6. before terminal completion, run `da-vinci verify-bindings` and `da-vinci verify-coverage`
125
+ 7. if completion wording is needed, confirm `verify-coverage` freshness is current and run `da-vinci audit --mode completion --change <id> <project-path>`
110
126
 
111
127
  Resume should follow the artifacts, not old conversation state:
112
128
 
@@ -30,6 +30,12 @@ This means:
30
30
  - project-local `.pen` files remain the design source of truth
31
31
  - implementation must stay traceable to both
32
32
 
33
+ Truth-versus-orchestration boundary:
34
+
35
+ - route and completion truth comes from artifacts, checkpoints, execution signals, and `audit`
36
+ - orchestration hints such as execution profiles and worktree preflight remain advisory guidance
37
+ - orchestration hints must never override explicit `BLOCK` truth from artifacts, checkpoints, or completion audit
38
+
33
39
  ## Main Flow
34
40
 
35
41
  1. Choose the correct mode.
@@ -60,6 +66,12 @@ Use these command surfaces to inspect route readiness before selecting the next
60
66
  - explicitly generates deterministic planning sidecars used by diff and downstream tooling
61
67
  - `da-vinci verify-bindings|verify-implementation|verify-structure|verify-coverage --project <path> [--change <id>] [--strict] [--json]`
62
68
  - validates execution-chain evidence from bindings through implementation and structural coverage
69
+ - `da-vinci task-execution --project <path> --change <id> --task-group <id> --status <DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED> --summary <text> ...`
70
+ - persists normalized implementer evidence per task group so pause/resume routing can read unresolved blockers and concerns
71
+ - `da-vinci task-review --project <path> --change <id> --task-group <id> --stage <spec|quality> --status <PASS|WARN|BLOCK> --summary <text> ...`
72
+ - persists ordered two-stage review evidence (`spec` before `quality`) and can append review records into `verification.md`
73
+ - `da-vinci worktree-preflight --project <path> [--change <id>] [--json]`
74
+ - runs advisory worktree isolation checks before bounded-parallel execution
63
75
  - `da-vinci diff-spec --project <path> [--change <id>] [--from <sidecars-dir>] [--json]`
64
76
  - reports normalized planning deltas for spec/tasks/page-map/bindings sidecars to support safe continuation
65
77
 
@@ -185,7 +197,11 @@ These checks verify that:
185
197
  After mapping passes:
186
198
 
187
199
  - generate `tasks.md`
200
+ - keep task groups parseable with discipline markers plus explicit file targets, execution intent, review intent, and verification commands
188
201
  - implement from requirements plus Pencil data
202
+ - inspect `executionProfile` from `workflow-status` or `next-step --json` before broad implementation
203
+ - if bounded parallelism is suggested, run `da-vinci worktree-preflight --project <path> [--change <id>]` and downgrade to serial when isolation is not ready
204
+ - persist per-task implementer and review evidence via `task-execution` and ordered `task-review` records
189
205
  - verify requirement drift and design drift
190
206
 
191
207
  ### 8. Terminal Completion
@@ -195,6 +211,7 @@ The workflow must not report `design complete`, `workflow complete`, or any equi
195
211
  - design checkpoint is no longer blocking
196
212
  - design-source checkpoint is at least `PASS`
197
213
  - MCP runtime gate is acceptable when Pencil MCP was used
214
+ - fresh verification evidence is present for in-scope implementation and coverage claims
198
215
  - `da-vinci audit --mode completion --change <change-id> <project-path>` passes
199
216
 
200
217
  Notes: