From cbf66fde93583a020ed85cc84d93942a279aca4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20Andr=C3=A9?= Date: Wed, 13 May 2026 10:24:05 +0200 Subject: [PATCH 1/3] feat: add drive-to-done workflow discipline --- AGENTS.md | 38 ++++++++++++++++++++++++++++++ agents/product_manager.md | 2 ++ agents/workflow_runner.md | 7 ++++++ docs/core/drive_to_done.md | 30 +++++++++++++++++++++++ docs/guides/WORKFLOW.md | 10 ++++++++ docs/setup/CONFIGURATION.md | 6 +++++ templates/nomadworks.yaml.template | 20 ++++++++++++++++ 7 files changed, 113 insertions(+) create mode 100644 AGENTS.md create mode 100644 docs/core/drive_to_done.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..a6ee0b8 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,38 @@ +# Agent Notes + +## Project Shape +- This is the npm package `@neuralnomads/nomadworks`, an OpenCode plugin. Source entrypoint is `src/index.js`; package entrypoint is built `dist/index.js`. +- The repo is ESM (`"type": "module"`). `typescript` is installed, but the build only copies JavaScript; there is no TS compile step. +- `npm pack` ships `dist`, `agents`, `docs`, `policies`, `templates`, and `Agents_Common.md`; update package contents with `package.json` `files` in mind. +- `.opencode/` has its own package lock for local OpenCode plugin state; the publishable package is the root npm package. + +## Commands +- Install root dependencies with `npm ci`. +- Test all: `npm test`. +- Run one Jest file or focused test: `npm test -- tests/validate.test.js -t "Respects .gitignore"`. +- Build: `npm run build`. It deletes `dist/` and copies only `src/*.js` into `dist/`. +- Release check: `npm run release:check` runs `npm test`, then `npm run build`, then `npm pack --dry-run`. + +## Plugin Runtime +- Runtime config is `.nomadworks/nomadworks.yaml`; some paths still fall back to legacy `.codenomad` locations. +- `nomadworks_init` requires `team_mode` of `mini` or `full` and only writes scaffold files when they do not already exist. +- `team_mode` defaults to `full`; `mini` enables only `product_manager`, `business_analyst`, and `tech_lead`. These three mandatory agents cannot be disabled. +- Repo-local full agent overrides live in `.nomadworks/agents/.md`; additive prompt fragments live in `.nomadworks/agent-additions/.md`; policy overrides live in `.nomadworks/policies/*.md`. +- Include resolution supports ``, ``, and ``; policy includes prefer repo-local `.nomadworks/policies/` before bundled `policies/`. +- Unless `features.keep_builtin_agents: true`, config generation disables existing and built-in OpenCode agents (`build`, `plan`, `general`, `explore`) and sets `product_manager` as `default_agent`. +- Unless `features.debug_dumps: false`, resolved agent prompts are dumped to `.nomadworks/generated/agents/` during config resolution. +- `nomadflow_run_workflow` is only usable when `workflow_runner` is enabled and `team_mode` is `full`; it blocks a second active shared-worktree `implementation` workflow. + +## Validation And CodeMaps +- `nomadworks_validate` fails immediately if root `codemap.yml` is missing. +- Validation honors `.gitignore`, skips hidden directory trees such as `.github/`, and exempts `tasks`, `evidences`, `docs`, `templates`, and `dist` from mandatory codemap and shadow-file checks. +- Module-scope codemaps must index every sibling source file with the extensions listed in `src/validate_logic.js`; unindexed source files fail validation. +- For `entrypoints`, `sources_of_truth`, and `links`, nested paths with `/` fail the Rule of Local Knowledge unless they start with `./`. +- Markdown placeholders `[To be defined]` and `[Insert ...]` fail validation outside `tasks/done`. + +## Release +- CI release runs only on pushes to `dev` and `main` using Node.js 24, `npm ci`, then `npm run release:check`. +- `dev` publishes `-rc.N` with npm dist-tag `rc`; `N` is derived from already-published npm versions. +- `main` publishes the exact stable `package.json` version with dist-tag `latest` and fails if that version already exists. +- Keep `package.json` on a stable semver base; do not commit prerelease versions like `1.4.0-rc.2`. +- Publishing uses npm Trusted Publishing with provenance, not `NPM_TOKEN`. diff --git a/agents/product_manager.md b/agents/product_manager.md index b3c6212..be8b9e6 100644 --- a/agents/product_manager.md +++ b/agents/product_manager.md @@ -43,6 +43,7 @@ You are the Product Manager Agent (PMA). You are the central orchestrator for al * **Post-Task Sync & Evidence:** You are the gatekeeper of implementation evidence. Ensure the Developer/QA has provided the verification artifacts required by the repository testing/evidence policy before calling the specialists for the Post-Task Sync. Instruct each specialist to **introduce themselves and their role** when providing verification feedback. * **Bounce Back Protocol:** If an implementation is rejected during the Post-Task Sync, reuse the original Task tool `task_id` when sending it back to the agent. This ensures they have the full execution history of the rejection. * **Formal Reopen Protocol:** If a task was marked done but later needs discrepancies fixed or minor same-scope changes after implementation, move that same task back into `Active`, append a `Reopen History` entry, and continue using the same task file ID. Reuse the same Task tool `task_id` when resuming delegated task work, and when resuming Workflow Runner execution, reuse both the same Task tool `task_id` and the same Workflow Runner `session_id` when possible. +* **Drive-To-Done:** When the user explicitly asks you to drive work to completion, or when repository config enables `features.drive_to_done`, keep the task lifecycle moving until `DONE`, `HARD BLOCKER`, or `CYCLE LIMIT`. Do not treat planning, delegation, or partial evidence as completion. * **Commit Authority:** You own final closure in all modes. Tech Lead is the default commit authority for direct execution paths, while Workflow Runner may perform the final commit only when you explicitly delegated a full-team complex workflow to it. ## Autonomous Delivery Readiness @@ -119,3 +120,4 @@ Record routine PO-proxy decisions in the task file under `Decisions Taken On PO + diff --git a/agents/workflow_runner.md b/agents/workflow_runner.md index 019117d..8ac9733 100644 --- a/agents/workflow_runner.md +++ b/agents/workflow_runner.md @@ -83,6 +83,12 @@ Your final summary must include `Decisions Taken On PO Behalf`. If none were mad 8. **Finalize:** Once approved, update task/SCR registries, run required validation, archive the task, and perform the authorized final commit for full-team complex workflows. 9. **Return Final Summary:** End with a concise PMA-facing report including Summary, Work Performed, AC Coverage, Evidence, Documentation Impact, Decisions Taken On PO Behalf, Commit, Open Risks, and Closure Recommendation. +## Drive-To-Done Discipline + +When PMA starts this workflow with Drive-To-Done expectations, do not stop at a partial lifecycle stage. Continue through the existing Operational Cycle until one terminal state is reached: `DONE`, `HARD BLOCKER`, or `CYCLE LIMIT`. + +At the end of each continuation cycle, inspect the task's Definition of Done and choose the next smallest concrete action needed for closure. Do not expand scope, skip required evidence, or perform implementation directly. + ## Hard Blocker Mechanism If you cannot proceed after reasonable orchestration attempts: @@ -102,3 +108,4 @@ If PMA later reopens the same task because discrepancies or minor same-scope cha + diff --git a/docs/core/drive_to_done.md b/docs/core/drive_to_done.md new file mode 100644 index 0000000..d9e6b0a --- /dev/null +++ b/docs/core/drive_to_done.md @@ -0,0 +1,30 @@ +# Drive-To-Done + +Drive-To-Done is an explicit NomadWorks execution discipline. It does not replace PMA, Workflow Runner, task files, SCRs, or evidence requirements. + +## Terminal States + +When Drive-To-Done is active, PMA or Workflow Runner continues the current task lifecycle until exactly one terminal state is reached: + +- `DONE`: Definition of Done is satisfied, evidence is recorded, required docs/registries are updated, and closure authority has approved the result. +- `HARD BLOCKER`: a specific missing input, failed dependency, rejected verification result, or unresolved contradiction prevents further safe progress. +- `CYCLE LIMIT`: the configured continuation limit is reached before `DONE` or `HARD BLOCKER`. + +## Operating Rules + +- Use the existing task file, acceptance criteria, verification map, and Definition of Done as the source of truth. +- Do not broaden scope to achieve completion. If scope must change, return to PMA/user for approval. +- After each continuation cycle, identify the next concrete unfinished closure requirement. +- If an implementation or verification handoff fails, bounce back to the responsible specialist with the same task context when possible. +- If progress cannot continue safely, stop with `HARD BLOCKER:` and name the exact missing input or failed condition. + +## Cycle Limit + +The default continuation limit is `drive_to_done.max_cycles` from `.nomadworks/nomadworks.yaml`. If absent, use `5`. + +When the limit is reached, report: + +- completed cycles +- remaining Definition of Done gaps +- recommended owner for the next action +- whether the task should be resumed with the same Task tool `task_id` or Workflow Runner `session_id` diff --git a/docs/guides/WORKFLOW.md b/docs/guides/WORKFLOW.md index c6a15e2..ae7ee80 100644 --- a/docs/guides/WORKFLOW.md +++ b/docs/guides/WORKFLOW.md @@ -93,6 +93,16 @@ Track these task files under `Active Discussions` in `tasks/current.md` until th - `investigation`: produce findings, reproduction notes, logs when useful, and a recommended next step. - `spec`: produce SCR and documentation updates that capture the accepted change definition and product/architecture impact. +## Drive-To-Done + +When Drive-To-Done is explicitly active, PMA or Workflow Runner continues the current task lifecycle until `DONE`, `HARD BLOCKER`, or `CYCLE LIMIT`. + +- `DONE`: Definition of Done is satisfied and closure authority approves the result. +- `HARD BLOCKER`: safe progress is impossible without a specific missing input or external fix. +- `CYCLE LIMIT`: the configured continuation limit is reached before closure. + +Drive-To-Done uses existing task files, acceptance criteria, evidence, and registries. It is not a separate workflow model. + SCR files use similarly lightweight frontmatter: ```yaml diff --git a/docs/setup/CONFIGURATION.md b/docs/setup/CONFIGURATION.md index 88da84f..db7cca4 100644 --- a/docs/setup/CONFIGURATION.md +++ b/docs/setup/CONFIGURATION.md @@ -17,6 +17,9 @@ defaults: features: debug_dumps: true codemap_verification: true + # drive_to_done: false + # session_memory: false + # pai_context: false policies: extract_defaults: none @@ -115,3 +118,6 @@ Create `.nomadworks/agents/.md` to: ## Feature flags - `features.keep_builtin_agents`: when `true`, NomadWorks will not disable agents that OpenCode already registered, including built-in agents such as `build`, `plan`, `general`, and `explore`. NomadWorks will still set `product_manager` as the default agent. +- `features.drive_to_done`: when `true`, PMA may explicitly keep a task lifecycle moving until `DONE`, `HARD BLOCKER`, or `CYCLE LIMIT` using the existing task/evidence workflow. +- `features.session_memory`: when `true`, enables portable workflow memory export/import tools. +- `features.pai_context`: when `true`, injects selected `.nomadworks/pai/USER` files into configured agent prompts. diff --git a/templates/nomadworks.yaml.template b/templates/nomadworks.yaml.template index c2f6a27..491fe82 100644 --- a/templates/nomadworks.yaml.template +++ b/templates/nomadworks.yaml.template @@ -13,6 +13,26 @@ features: # debug_logs: false # Enable detailed console logging for the plugin # keep_builtin_agents: false # If true, do not disable agents OpenCode already registered, including built-ins codemap_verification: true + # drive_to_done: false # If true, PMA may explicitly run tasks until DONE, HARD BLOCKER, or CYCLE LIMIT + # session_memory: false # If true, enables portable workflow memory export/import tools + # pai_context: false # If true, injects selected .nomadworks/pai/USER context into configured agents + +drive_to_done: + max_cycles: 5 + +session_memory: + # repo_path: ../nomadworks-memory # Optional Git-managed memory directory, absolute or relative to the worktree + include_runtime: false + +pai: + context_files: + - USER/ABOUTME.md + - USER/TELOS.md + - USER/AISTEERINGRULES.md + apply_to_agents: + - product_manager + - business_analyst + - tech_lead policies: extract_defaults: none # Set to 'all' to write bundled policy defaults to .nomadworks/generated/policies/ From 46b754a4dce9b20896f61c2f6947200e0b5af4d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20Andr=C3=A9?= Date: Fri, 15 May 2026 23:20:22 +0200 Subject: [PATCH 2/3] fix: align drive-to-done docs with runtime behavior Remove unsupported config/template claims for drive-to-done, session memory, and PAI so PR #3 only documents the explicit Drive-To-Done workflow discipline. --- AGENTS.md | 38 ------------------------------ agents/product_manager.md | 2 +- docs/core/drive_to_done.md | 6 ++--- docs/guides/WORKFLOW.md | 2 +- docs/setup/CONFIGURATION.md | 6 ----- templates/nomadworks.yaml.template | 20 ---------------- 6 files changed, 5 insertions(+), 69 deletions(-) delete mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md deleted file mode 100644 index a6ee0b8..0000000 --- a/AGENTS.md +++ /dev/null @@ -1,38 +0,0 @@ -# Agent Notes - -## Project Shape -- This is the npm package `@neuralnomads/nomadworks`, an OpenCode plugin. Source entrypoint is `src/index.js`; package entrypoint is built `dist/index.js`. -- The repo is ESM (`"type": "module"`). `typescript` is installed, but the build only copies JavaScript; there is no TS compile step. -- `npm pack` ships `dist`, `agents`, `docs`, `policies`, `templates`, and `Agents_Common.md`; update package contents with `package.json` `files` in mind. -- `.opencode/` has its own package lock for local OpenCode plugin state; the publishable package is the root npm package. - -## Commands -- Install root dependencies with `npm ci`. -- Test all: `npm test`. -- Run one Jest file or focused test: `npm test -- tests/validate.test.js -t "Respects .gitignore"`. -- Build: `npm run build`. It deletes `dist/` and copies only `src/*.js` into `dist/`. -- Release check: `npm run release:check` runs `npm test`, then `npm run build`, then `npm pack --dry-run`. - -## Plugin Runtime -- Runtime config is `.nomadworks/nomadworks.yaml`; some paths still fall back to legacy `.codenomad` locations. -- `nomadworks_init` requires `team_mode` of `mini` or `full` and only writes scaffold files when they do not already exist. -- `team_mode` defaults to `full`; `mini` enables only `product_manager`, `business_analyst`, and `tech_lead`. These three mandatory agents cannot be disabled. -- Repo-local full agent overrides live in `.nomadworks/agents/.md`; additive prompt fragments live in `.nomadworks/agent-additions/.md`; policy overrides live in `.nomadworks/policies/*.md`. -- Include resolution supports ``, ``, and ``; policy includes prefer repo-local `.nomadworks/policies/` before bundled `policies/`. -- Unless `features.keep_builtin_agents: true`, config generation disables existing and built-in OpenCode agents (`build`, `plan`, `general`, `explore`) and sets `product_manager` as `default_agent`. -- Unless `features.debug_dumps: false`, resolved agent prompts are dumped to `.nomadworks/generated/agents/` during config resolution. -- `nomadflow_run_workflow` is only usable when `workflow_runner` is enabled and `team_mode` is `full`; it blocks a second active shared-worktree `implementation` workflow. - -## Validation And CodeMaps -- `nomadworks_validate` fails immediately if root `codemap.yml` is missing. -- Validation honors `.gitignore`, skips hidden directory trees such as `.github/`, and exempts `tasks`, `evidences`, `docs`, `templates`, and `dist` from mandatory codemap and shadow-file checks. -- Module-scope codemaps must index every sibling source file with the extensions listed in `src/validate_logic.js`; unindexed source files fail validation. -- For `entrypoints`, `sources_of_truth`, and `links`, nested paths with `/` fail the Rule of Local Knowledge unless they start with `./`. -- Markdown placeholders `[To be defined]` and `[Insert ...]` fail validation outside `tasks/done`. - -## Release -- CI release runs only on pushes to `dev` and `main` using Node.js 24, `npm ci`, then `npm run release:check`. -- `dev` publishes `-rc.N` with npm dist-tag `rc`; `N` is derived from already-published npm versions. -- `main` publishes the exact stable `package.json` version with dist-tag `latest` and fails if that version already exists. -- Keep `package.json` on a stable semver base; do not commit prerelease versions like `1.4.0-rc.2`. -- Publishing uses npm Trusted Publishing with provenance, not `NPM_TOKEN`. diff --git a/agents/product_manager.md b/agents/product_manager.md index be8b9e6..b7ea7ec 100644 --- a/agents/product_manager.md +++ b/agents/product_manager.md @@ -43,7 +43,7 @@ You are the Product Manager Agent (PMA). You are the central orchestrator for al * **Post-Task Sync & Evidence:** You are the gatekeeper of implementation evidence. Ensure the Developer/QA has provided the verification artifacts required by the repository testing/evidence policy before calling the specialists for the Post-Task Sync. Instruct each specialist to **introduce themselves and their role** when providing verification feedback. * **Bounce Back Protocol:** If an implementation is rejected during the Post-Task Sync, reuse the original Task tool `task_id` when sending it back to the agent. This ensures they have the full execution history of the rejection. * **Formal Reopen Protocol:** If a task was marked done but later needs discrepancies fixed or minor same-scope changes after implementation, move that same task back into `Active`, append a `Reopen History` entry, and continue using the same task file ID. Reuse the same Task tool `task_id` when resuming delegated task work, and when resuming Workflow Runner execution, reuse both the same Task tool `task_id` and the same Workflow Runner `session_id` when possible. -* **Drive-To-Done:** When the user explicitly asks you to drive work to completion, or when repository config enables `features.drive_to_done`, keep the task lifecycle moving until `DONE`, `HARD BLOCKER`, or `CYCLE LIMIT`. Do not treat planning, delegation, or partial evidence as completion. +* **Drive-To-Done:** When the user or repository workflow explicitly asks you to drive work to completion, keep the task lifecycle moving until `DONE`, `HARD BLOCKER`, or `CYCLE LIMIT`. Do not treat planning, delegation, or partial evidence as completion. * **Commit Authority:** You own final closure in all modes. Tech Lead is the default commit authority for direct execution paths, while Workflow Runner may perform the final commit only when you explicitly delegated a full-team complex workflow to it. ## Autonomous Delivery Readiness diff --git a/docs/core/drive_to_done.md b/docs/core/drive_to_done.md index d9e6b0a..eb2c4ac 100644 --- a/docs/core/drive_to_done.md +++ b/docs/core/drive_to_done.md @@ -4,11 +4,11 @@ Drive-To-Done is an explicit NomadWorks execution discipline. It does not replac ## Terminal States -When Drive-To-Done is active, PMA or Workflow Runner continues the current task lifecycle until exactly one terminal state is reached: +When Drive-To-Done is explicitly requested by the user, PMA, or repository workflow, PMA or Workflow Runner continues the current task lifecycle until exactly one terminal state is reached: - `DONE`: Definition of Done is satisfied, evidence is recorded, required docs/registries are updated, and closure authority has approved the result. - `HARD BLOCKER`: a specific missing input, failed dependency, rejected verification result, or unresolved contradiction prevents further safe progress. -- `CYCLE LIMIT`: the configured continuation limit is reached before `DONE` or `HARD BLOCKER`. +- `CYCLE LIMIT`: the agreed continuation limit is reached before `DONE` or `HARD BLOCKER`. ## Operating Rules @@ -20,7 +20,7 @@ When Drive-To-Done is active, PMA or Workflow Runner continues the current task ## Cycle Limit -The default continuation limit is `drive_to_done.max_cycles` from `.nomadworks/nomadworks.yaml`. If absent, use `5`. +The default continuation limit is 5 cycles unless the user or PMA explicitly sets a different limit for the current task. When the limit is reached, report: diff --git a/docs/guides/WORKFLOW.md b/docs/guides/WORKFLOW.md index ae7ee80..586bc53 100644 --- a/docs/guides/WORKFLOW.md +++ b/docs/guides/WORKFLOW.md @@ -99,7 +99,7 @@ When Drive-To-Done is explicitly active, PMA or Workflow Runner continues the cu - `DONE`: Definition of Done is satisfied and closure authority approves the result. - `HARD BLOCKER`: safe progress is impossible without a specific missing input or external fix. -- `CYCLE LIMIT`: the configured continuation limit is reached before closure. +- `CYCLE LIMIT`: the agreed continuation limit is reached before closure. Drive-To-Done uses existing task files, acceptance criteria, evidence, and registries. It is not a separate workflow model. diff --git a/docs/setup/CONFIGURATION.md b/docs/setup/CONFIGURATION.md index db7cca4..88da84f 100644 --- a/docs/setup/CONFIGURATION.md +++ b/docs/setup/CONFIGURATION.md @@ -17,9 +17,6 @@ defaults: features: debug_dumps: true codemap_verification: true - # drive_to_done: false - # session_memory: false - # pai_context: false policies: extract_defaults: none @@ -118,6 +115,3 @@ Create `.nomadworks/agents/.md` to: ## Feature flags - `features.keep_builtin_agents`: when `true`, NomadWorks will not disable agents that OpenCode already registered, including built-in agents such as `build`, `plan`, `general`, and `explore`. NomadWorks will still set `product_manager` as the default agent. -- `features.drive_to_done`: when `true`, PMA may explicitly keep a task lifecycle moving until `DONE`, `HARD BLOCKER`, or `CYCLE LIMIT` using the existing task/evidence workflow. -- `features.session_memory`: when `true`, enables portable workflow memory export/import tools. -- `features.pai_context`: when `true`, injects selected `.nomadworks/pai/USER` files into configured agent prompts. diff --git a/templates/nomadworks.yaml.template b/templates/nomadworks.yaml.template index 491fe82..c2f6a27 100644 --- a/templates/nomadworks.yaml.template +++ b/templates/nomadworks.yaml.template @@ -13,26 +13,6 @@ features: # debug_logs: false # Enable detailed console logging for the plugin # keep_builtin_agents: false # If true, do not disable agents OpenCode already registered, including built-ins codemap_verification: true - # drive_to_done: false # If true, PMA may explicitly run tasks until DONE, HARD BLOCKER, or CYCLE LIMIT - # session_memory: false # If true, enables portable workflow memory export/import tools - # pai_context: false # If true, injects selected .nomadworks/pai/USER context into configured agents - -drive_to_done: - max_cycles: 5 - -session_memory: - # repo_path: ../nomadworks-memory # Optional Git-managed memory directory, absolute or relative to the worktree - include_runtime: false - -pai: - context_files: - - USER/ABOUTME.md - - USER/TELOS.md - - USER/AISTEERINGRULES.md - apply_to_agents: - - product_manager - - business_analyst - - tech_lead policies: extract_defaults: none # Set to 'all' to write bundled policy defaults to .nomadworks/generated/policies/ From cee2c2fa8cf47e764775ae97e17e73bc9b4aa465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20Andr=C3=A9?= Date: Fri, 15 May 2026 23:39:49 +0200 Subject: [PATCH 3/3] docs: soften Drive-To-Done enforcement language Clarifies Drive-To-Done as an explicit PMA/user/repository operating discipline instead of a code-enforced runtime mode. --- agents/product_manager.md | 2 +- agents/workflow_runner.md | 2 +- docs/core/drive_to_done.md | 4 ++-- docs/guides/WORKFLOW.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/agents/product_manager.md b/agents/product_manager.md index b7ea7ec..822cb82 100644 --- a/agents/product_manager.md +++ b/agents/product_manager.md @@ -43,7 +43,7 @@ You are the Product Manager Agent (PMA). You are the central orchestrator for al * **Post-Task Sync & Evidence:** You are the gatekeeper of implementation evidence. Ensure the Developer/QA has provided the verification artifacts required by the repository testing/evidence policy before calling the specialists for the Post-Task Sync. Instruct each specialist to **introduce themselves and their role** when providing verification feedback. * **Bounce Back Protocol:** If an implementation is rejected during the Post-Task Sync, reuse the original Task tool `task_id` when sending it back to the agent. This ensures they have the full execution history of the rejection. * **Formal Reopen Protocol:** If a task was marked done but later needs discrepancies fixed or minor same-scope changes after implementation, move that same task back into `Active`, append a `Reopen History` entry, and continue using the same task file ID. Reuse the same Task tool `task_id` when resuming delegated task work, and when resuming Workflow Runner execution, reuse both the same Task tool `task_id` and the same Workflow Runner `session_id` when possible. -* **Drive-To-Done:** When the user or repository workflow explicitly asks you to drive work to completion, keep the task lifecycle moving until `DONE`, `HARD BLOCKER`, or `CYCLE LIMIT`. Do not treat planning, delegation, or partial evidence as completion. +* **Drive-To-Done:** When the user or repository workflow explicitly asks you to drive work to completion, use Drive-To-Done as an operating discipline: keep the task lifecycle moving until `DONE`, `HARD BLOCKER`, or `CYCLE LIMIT`. Do not treat planning, delegation, or partial evidence as completion. * **Commit Authority:** You own final closure in all modes. Tech Lead is the default commit authority for direct execution paths, while Workflow Runner may perform the final commit only when you explicitly delegated a full-team complex workflow to it. ## Autonomous Delivery Readiness diff --git a/agents/workflow_runner.md b/agents/workflow_runner.md index 8ac9733..6fcdf45 100644 --- a/agents/workflow_runner.md +++ b/agents/workflow_runner.md @@ -85,7 +85,7 @@ Your final summary must include `Decisions Taken On PO Behalf`. If none were mad ## Drive-To-Done Discipline -When PMA starts this workflow with Drive-To-Done expectations, do not stop at a partial lifecycle stage. Continue through the existing Operational Cycle until one terminal state is reached: `DONE`, `HARD BLOCKER`, or `CYCLE LIMIT`. +When PMA starts this workflow with Drive-To-Done expectations, treat it as an explicit PMA/repository instruction rather than a separate runtime mode. Do not stop at a partial lifecycle stage; continue through the existing Operational Cycle until one terminal state is reached: `DONE`, `HARD BLOCKER`, or `CYCLE LIMIT`. At the end of each continuation cycle, inspect the task's Definition of Done and choose the next smallest concrete action needed for closure. Do not expand scope, skip required evidence, or perform implementation directly. diff --git a/docs/core/drive_to_done.md b/docs/core/drive_to_done.md index eb2c4ac..b478f78 100644 --- a/docs/core/drive_to_done.md +++ b/docs/core/drive_to_done.md @@ -4,7 +4,7 @@ Drive-To-Done is an explicit NomadWorks execution discipline. It does not replac ## Terminal States -When Drive-To-Done is explicitly requested by the user, PMA, or repository workflow, PMA or Workflow Runner continues the current task lifecycle until exactly one terminal state is reached: +When Drive-To-Done is explicitly requested by the user, PMA, or repository workflow, PMA or Workflow Runner should keep the current task lifecycle moving until one terminal state is reached: - `DONE`: Definition of Done is satisfied, evidence is recorded, required docs/registries are updated, and closure authority has approved the result. - `HARD BLOCKER`: a specific missing input, failed dependency, rejected verification result, or unresolved contradiction prevents further safe progress. @@ -20,7 +20,7 @@ When Drive-To-Done is explicitly requested by the user, PMA, or repository workf ## Cycle Limit -The default continuation limit is 5 cycles unless the user or PMA explicitly sets a different limit for the current task. +A 5-cycle continuation limit is the default PMA/Runner discipline recommendation unless the user or PMA explicitly sets a different limit for the current task. This is not runtime-enforced configuration; it is an operating expectation for deciding when to report `CYCLE LIMIT` instead of continuing indefinitely. When the limit is reached, report: diff --git a/docs/guides/WORKFLOW.md b/docs/guides/WORKFLOW.md index 586bc53..9d8f183 100644 --- a/docs/guides/WORKFLOW.md +++ b/docs/guides/WORKFLOW.md @@ -95,13 +95,13 @@ Track these task files under `Active Discussions` in `tasks/current.md` until th ## Drive-To-Done -When Drive-To-Done is explicitly active, PMA or Workflow Runner continues the current task lifecycle until `DONE`, `HARD BLOCKER`, or `CYCLE LIMIT`. +When Drive-To-Done is explicitly requested by the user, PMA, or repository workflow, PMA or Workflow Runner should keep the current task lifecycle moving until `DONE`, `HARD BLOCKER`, or `CYCLE LIMIT`. - `DONE`: Definition of Done is satisfied and closure authority approves the result. - `HARD BLOCKER`: safe progress is impossible without a specific missing input or external fix. - `CYCLE LIMIT`: the agreed continuation limit is reached before closure. -Drive-To-Done uses existing task files, acceptance criteria, evidence, and registries. It is not a separate workflow model. +Drive-To-Done uses existing task files, acceptance criteria, evidence, and registries. It is not a separate workflow model or code-enforced runtime mode. SCR files use similarly lightweight frontmatter: