okstra 0.173.0 → 0.175.1
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.
- package/README.md +18 -9
- package/bin/okstra +8 -4
- package/dist/cli-registry.d.mts +16 -0
- package/dist/cli-registry.mjs +560 -0
- package/dist/cli-registry.mjs.map +1 -0
- package/dist/commands/execute/agent-prompt.d.mts +1 -0
- package/{src → dist}/commands/execute/agent-prompt.mjs +10 -11
- package/dist/commands/execute/agent-prompt.mjs.map +1 -0
- package/dist/commands/execute/codex-dispatch.d.mts +3 -0
- package/dist/commands/execute/codex-dispatch.mjs +6 -0
- package/dist/commands/execute/codex-dispatch.mjs.map +1 -0
- package/dist/commands/execute/codex-run.d.mts +3 -0
- package/{src → dist}/commands/execute/codex-run.mjs +30 -37
- package/dist/commands/execute/codex-run.mjs.map +1 -0
- package/dist/commands/execute/convergence.d.mts +1 -0
- package/{src → dist}/commands/execute/convergence.mjs +15 -16
- package/dist/commands/execute/convergence.mjs.map +1 -0
- package/dist/commands/execute/error-log.d.mts +1 -0
- package/{src → dist}/commands/execute/error-log.mjs +2 -3
- package/dist/commands/execute/error-log.mjs.map +1 -0
- package/dist/commands/execute/git-reconcile.d.mts +1 -0
- package/{src → dist}/commands/execute/git-reconcile.mjs +10 -11
- package/dist/commands/execute/git-reconcile.mjs.map +1 -0
- package/dist/commands/execute/handoff.d.mts +1 -0
- package/{src → dist}/commands/execute/handoff.mjs +10 -11
- package/dist/commands/execute/handoff.mjs.map +1 -0
- package/dist/commands/execute/incremental-carry.d.mts +1 -0
- package/{src → dist}/commands/execute/incremental-carry.mjs +2 -3
- package/dist/commands/execute/incremental-carry.mjs.map +1 -0
- package/dist/commands/execute/incremental-scope.d.mts +1 -0
- package/{src → dist}/commands/execute/incremental-scope.mjs +2 -3
- package/dist/commands/execute/incremental-scope.mjs.map +1 -0
- package/dist/commands/execute/integrate-stages.d.mts +1 -0
- package/{src → dist}/commands/execute/integrate-stages.mjs +10 -11
- package/dist/commands/execute/integrate-stages.mjs.map +1 -0
- package/dist/commands/execute/pane-title.d.mts +1 -0
- package/dist/commands/execute/pane-title.mjs +20 -0
- package/dist/commands/execute/pane-title.mjs.map +1 -0
- package/dist/commands/execute/plan-items.d.mts +1 -0
- package/dist/commands/execute/plan-items.mjs +9 -0
- package/dist/commands/execute/plan-items.mjs.map +1 -0
- package/dist/commands/execute/plan-validate.d.mts +1 -0
- package/dist/commands/execute/plan-validate.mjs +68 -0
- package/dist/commands/execute/plan-validate.mjs.map +1 -0
- package/dist/commands/execute/plan-verify.d.mts +1 -0
- package/{src → dist}/commands/execute/plan-verify.mjs +13 -16
- package/dist/commands/execute/plan-verify.mjs.map +1 -0
- package/dist/commands/execute/render-bundle.d.mts +3 -0
- package/{src → dist}/commands/execute/render-bundle.mjs +65 -61
- package/dist/commands/execute/render-bundle.mjs.map +1 -0
- package/dist/commands/execute/run.d.mts +24 -0
- package/dist/commands/execute/run.mjs +196 -0
- package/dist/commands/execute/run.mjs.map +1 -0
- package/dist/commands/execute/spawn-followups.d.mts +1 -0
- package/{src → dist}/commands/execute/spawn-followups.mjs +6 -7
- package/dist/commands/execute/spawn-followups.mjs.map +1 -0
- package/dist/commands/execute/team.d.mts +3 -0
- package/dist/commands/execute/team.mjs +56 -0
- package/dist/commands/execute/team.mjs.map +1 -0
- package/dist/commands/execute/token-usage.d.mts +1 -0
- package/{src → dist}/commands/execute/token-usage.mjs +2 -3
- package/dist/commands/execute/token-usage.mjs.map +1 -0
- package/dist/commands/execute/wizard.d.mts +8 -0
- package/dist/commands/execute/wizard.mjs +191 -0
- package/dist/commands/execute/wizard.mjs.map +1 -0
- package/dist/commands/execute/worker-audit-check.d.mts +1 -0
- package/{src → dist}/commands/execute/worker-audit-check.mjs +11 -12
- package/dist/commands/execute/worker-audit-check.mjs.map +1 -0
- package/dist/commands/execute/worker-dispatch.d.mts +7 -0
- package/{src → dist}/commands/execute/worker-dispatch.mjs +34 -46
- package/dist/commands/execute/worker-dispatch.mjs.map +1 -0
- package/dist/commands/execute/worker-state.d.mts +1 -0
- package/{src → dist}/commands/execute/worker-state.mjs +15 -16
- package/dist/commands/execute/worker-state.mjs.map +1 -0
- package/dist/commands/execute/worktree-lookup.d.mts +1 -0
- package/{src → dist}/commands/execute/worktree-lookup.mjs +38 -37
- package/dist/commands/execute/worktree-lookup.mjs.map +1 -0
- package/dist/commands/execute/worktree-status.d.mts +1 -0
- package/dist/commands/execute/worktree-status.mjs +115 -0
- package/dist/commands/execute/worktree-status.mjs.map +1 -0
- package/dist/commands/inspect/code-review.d.mts +1 -0
- package/{src → dist}/commands/inspect/code-review.mjs +16 -19
- package/dist/commands/inspect/code-review.mjs.map +1 -0
- package/dist/commands/inspect/container.d.mts +1 -0
- package/{src → dist}/commands/inspect/container.mjs +11 -13
- package/dist/commands/inspect/container.mjs.map +1 -0
- package/dist/commands/inspect/context-cost.d.mts +1 -0
- package/{src → dist}/commands/inspect/context-cost.mjs +11 -13
- package/dist/commands/inspect/context-cost.mjs.map +1 -0
- package/dist/commands/inspect/design-prep.d.mts +1 -0
- package/{src → dist}/commands/inspect/design-prep.mjs +10 -11
- package/dist/commands/inspect/design-prep.mjs.map +1 -0
- package/dist/commands/inspect/error-report.d.mts +1 -0
- package/{src → dist}/commands/inspect/error-report.mjs +11 -13
- package/dist/commands/inspect/error-report.mjs.map +1 -0
- package/dist/commands/inspect/error-zip.d.mts +1 -0
- package/{src → dist}/commands/inspect/error-zip.mjs +11 -12
- package/dist/commands/inspect/error-zip.mjs.map +1 -0
- package/dist/commands/inspect/log-report.d.mts +1 -0
- package/{src → dist}/commands/inspect/log-report.mjs +11 -13
- package/dist/commands/inspect/log-report.mjs.map +1 -0
- package/dist/commands/inspect/profile-show.d.mts +1 -0
- package/{src → dist}/commands/inspect/profile-show.mjs +10 -11
- package/dist/commands/inspect/profile-show.mjs.map +1 -0
- package/dist/commands/inspect/recap.d.mts +1 -0
- package/{src → dist}/commands/inspect/recap.mjs +11 -13
- package/dist/commands/inspect/recap.mjs.map +1 -0
- package/dist/commands/inspect/resolve-task-key.d.mts +1 -0
- package/{src → dist}/commands/inspect/resolve-task-key.mjs +11 -13
- package/dist/commands/inspect/resolve-task-key.mjs.map +1 -0
- package/dist/commands/inspect/rollup.d.mts +1 -0
- package/{src → dist}/commands/inspect/rollup.mjs +11 -13
- package/dist/commands/inspect/rollup.mjs.map +1 -0
- package/dist/commands/inspect/run-audit.d.mts +1 -0
- package/{src → dist}/commands/inspect/run-audit.mjs +11 -12
- package/dist/commands/inspect/run-audit.mjs.map +1 -0
- package/dist/commands/inspect/set-work-status.d.mts +1 -0
- package/{src → dist}/commands/inspect/set-work-status.mjs +11 -13
- package/dist/commands/inspect/set-work-status.mjs.map +1 -0
- package/dist/commands/inspect/stage-map.d.mts +1 -0
- package/dist/commands/inspect/stage-map.mjs +110 -0
- package/dist/commands/inspect/stage-map.mjs.map +1 -0
- package/dist/commands/inspect/task-list.d.mts +1 -0
- package/dist/commands/inspect/task-list.mjs +103 -0
- package/dist/commands/inspect/task-list.mjs.map +1 -0
- package/dist/commands/inspect/task-show.d.mts +1 -0
- package/dist/commands/inspect/task-show.mjs +108 -0
- package/dist/commands/inspect/task-show.mjs.map +1 -0
- package/dist/commands/inspect/time-report.d.mts +1 -0
- package/{src → dist}/commands/inspect/time-report.mjs +11 -13
- package/dist/commands/inspect/time-report.mjs.map +1 -0
- package/dist/commands/inspect/usage-report.d.mts +1 -0
- package/{src → dist}/commands/inspect/usage-report.mjs +11 -13
- package/dist/commands/inspect/usage-report.mjs.map +1 -0
- package/dist/commands/inspect/user-response.d.mts +1 -0
- package/{src → dist}/commands/inspect/user-response.mjs +10 -11
- package/dist/commands/inspect/user-response.mjs.map +1 -0
- package/dist/commands/inspect/worker-liveness.d.mts +1 -0
- package/{src → dist}/commands/inspect/worker-liveness.mjs +11 -13
- package/dist/commands/inspect/worker-liveness.mjs.map +1 -0
- package/dist/commands/lifecycle/check-project.d.mts +21 -0
- package/dist/commands/lifecycle/check-project.mjs +175 -0
- package/dist/commands/lifecycle/check-project.mjs.map +1 -0
- package/dist/commands/lifecycle/config.d.mts +1 -0
- package/dist/commands/lifecycle/config.mjs +369 -0
- package/dist/commands/lifecycle/config.mjs.map +1 -0
- package/dist/commands/lifecycle/doctor.d.mts +10 -0
- package/dist/commands/lifecycle/doctor.mjs +317 -0
- package/dist/commands/lifecycle/doctor.mjs.map +1 -0
- package/dist/commands/lifecycle/install.d.mts +17 -0
- package/dist/commands/lifecycle/install.mjs +1077 -0
- package/dist/commands/lifecycle/install.mjs.map +1 -0
- package/dist/commands/lifecycle/migrate.d.mts +1 -0
- package/{src → dist}/commands/lifecycle/migrate.mjs +10 -11
- package/dist/commands/lifecycle/migrate.mjs.map +1 -0
- package/dist/commands/lifecycle/model.d.mts +1 -0
- package/dist/commands/lifecycle/model.mjs +22 -0
- package/dist/commands/lifecycle/model.mjs.map +1 -0
- package/dist/commands/lifecycle/paths.d.mts +1 -0
- package/dist/commands/lifecycle/paths.mjs +102 -0
- package/dist/commands/lifecycle/paths.mjs.map +1 -0
- package/dist/commands/lifecycle/preflight.d.mts +1 -0
- package/dist/commands/lifecycle/preflight.mjs +124 -0
- package/dist/commands/lifecycle/preflight.mjs.map +1 -0
- package/dist/commands/lifecycle/setup.d.mts +1 -0
- package/dist/commands/lifecycle/setup.mjs +297 -0
- package/dist/commands/lifecycle/setup.mjs.map +1 -0
- package/dist/commands/lifecycle/uninstall.d.mts +4 -0
- package/dist/commands/lifecycle/uninstall.mjs +262 -0
- package/dist/commands/lifecycle/uninstall.mjs.map +1 -0
- package/dist/commands/manager.d.mts +3 -0
- package/{src → dist}/commands/manager.mjs +25 -32
- package/dist/commands/manager.mjs.map +1 -0
- package/dist/commands/memory/memory.d.mts +1 -0
- package/dist/commands/memory/memory.mjs +569 -0
- package/dist/commands/memory/memory.mjs.map +1 -0
- package/dist/commands/pr/pr.d.mts +33 -0
- package/dist/commands/pr/pr.mjs +296 -0
- package/dist/commands/pr/pr.mjs.map +1 -0
- package/dist/commands/report/agent-activity.d.mts +1 -0
- package/{src → dist}/commands/report/agent-activity.mjs +11 -12
- package/dist/commands/report/agent-activity.mjs.map +1 -0
- package/dist/commands/report/finalize.d.mts +4 -0
- package/dist/commands/report/finalize.mjs +64 -0
- package/dist/commands/report/finalize.mjs.map +1 -0
- package/dist/commands/report/inject-report-index.d.mts +1 -0
- package/{src → dist}/commands/report/inject-report-index.mjs +6 -7
- package/dist/commands/report/inject-report-index.mjs.map +1 -0
- package/dist/commands/report/render-final-report.d.mts +1 -0
- package/{src → dist}/commands/report/render-final-report.mjs +6 -7
- package/dist/commands/report/render-final-report.mjs.map +1 -0
- package/dist/commands/report/render-views.d.mts +1 -0
- package/{src → dist}/commands/report/render-views.mjs +6 -7
- package/dist/commands/report/render-views.mjs.map +1 -0
- package/dist/commands/report/translate.d.mts +1 -0
- package/{src → dist}/commands/report/translate.mjs +6 -7
- package/dist/commands/report/translate.mjs.map +1 -0
- package/dist/lib/helper-scripts.d.mts +3 -0
- package/{src → dist}/lib/helper-scripts.mjs +11 -14
- package/dist/lib/helper-scripts.mjs.map +1 -0
- package/dist/lib/host-registry-client.d.mts +25 -0
- package/dist/lib/host-registry-client.mjs +152 -0
- package/dist/lib/host-registry-client.mjs.map +1 -0
- package/dist/lib/install-assets.d.mts +8 -0
- package/{src → dist}/lib/install-assets.mjs +17 -20
- package/dist/lib/install-assets.mjs.map +1 -0
- package/dist/lib/okstra-dirs.d.mts +4 -0
- package/{src → dist}/lib/okstra-dirs.mjs +3 -6
- package/dist/lib/okstra-dirs.mjs.map +1 -0
- package/dist/lib/paths.d.mts +4 -0
- package/dist/lib/paths.mjs +78 -0
- package/dist/lib/paths.mjs.map +1 -0
- package/dist/lib/proc.d.mts +3 -0
- package/dist/lib/proc.mjs +31 -0
- package/dist/lib/proc.mjs.map +1 -0
- package/dist/lib/python-helper.d.mts +8 -0
- package/dist/lib/python-helper.mjs +123 -0
- package/dist/lib/python-helper.mjs.map +1 -0
- package/dist/lib/runtime-manifest.d.mts +7 -0
- package/dist/lib/runtime-manifest.mjs +73 -0
- package/dist/lib/runtime-manifest.mjs.map +1 -0
- package/dist/lib/skill-catalog.d.mts +4 -0
- package/dist/lib/skill-catalog.mjs +50 -0
- package/dist/lib/skill-catalog.mjs.map +1 -0
- package/dist/lib/types.d.mts +129 -0
- package/dist/lib/types.mjs +2 -0
- package/dist/lib/types.mjs.map +1 -0
- package/dist/lib/version.d.mts +2 -0
- package/dist/lib/version.mjs +27 -0
- package/dist/lib/version.mjs.map +1 -0
- package/docs/architecture/storage-model.md +17 -3
- package/docs/architecture.md +12 -22
- package/docs/cli.md +29 -8
- package/docs/container.md +1 -1
- package/docs/contributor-change-matrix.md +3 -3
- package/docs/project-structure-overview.md +29 -20
- package/docs/task-process/README.md +3 -1
- package/docs/task-process/implementation-planning.md +2 -2
- package/docs/task-process/implementation.md +1 -1
- package/package.json +11 -5
- package/runtime/BUILD.json +2 -2
- package/runtime/agents/workers/claude-worker.md +3 -2
- package/runtime/agents/workers/report-writer-worker.md +3 -1
- package/runtime/agents/workers/translator-worker.md +3 -1
- package/runtime/bin/lib/okstra/cli.sh +12 -0
- package/runtime/bin/lib/okstra/globals.sh +4 -1
- package/runtime/bin/lib/okstra/usage.sh +4 -4
- package/runtime/bin/okstra-error-log.py +27 -0
- package/runtime/bin/okstra-provider-exec.py +245 -16
- package/runtime/bin/okstra-trace-cleanup.sh +58 -129
- package/runtime/bin/okstra.sh +10 -0
- package/runtime/prompts/lead/adapters/cmux.md +2 -0
- package/runtime/prompts/lead/convergence.md +27 -18
- package/runtime/prompts/lead/okstra-lead-contract.md +4 -2
- package/runtime/prompts/lead/plan-body-verification.md +13 -6
- package/runtime/prompts/lead/report-writer.md +6 -6
- package/runtime/prompts/lead/team-contract.md +1 -1
- package/runtime/prompts/profiles/_common-contract.md +2 -2
- package/runtime/prompts/profiles/_implementation-executor.md +2 -0
- package/runtime/prompts/profiles/_implementation-verifier.md +2 -2
- package/runtime/prompts/profiles/change-impact-analysis.md +16 -0
- package/runtime/prompts/profiles/error-analysis.md +21 -1
- package/runtime/prompts/profiles/feature-analysis.md +16 -0
- package/runtime/prompts/profiles/final-verification.md +16 -0
- package/runtime/prompts/profiles/implementation-option-selection.md +16 -0
- package/runtime/prompts/profiles/implementation-planning.md +32 -9
- package/runtime/prompts/profiles/implementation.md +17 -1
- package/runtime/prompts/profiles/improvement-discovery.md +16 -0
- package/runtime/prompts/profiles/project-analysis.md +16 -0
- package/runtime/prompts/profiles/release-handoff.md +5 -1
- package/runtime/prompts/profiles/requirements-discovery.md +20 -0
- package/runtime/prompts/wizard/prompts.ko.json +18 -0
- package/runtime/python/okstra_ctl/adapters/dispatch/__init__.py +1 -6
- package/runtime/python/okstra_ctl/adapters/dispatch/cli_wrapper.py +8 -0
- package/runtime/python/okstra_ctl/adapters/dispatch/cmux.py +8 -0
- package/runtime/python/okstra_ctl/adapters/dispatch/native_team.py +13 -0
- package/runtime/python/okstra_ctl/adapters/hosts/antigravity/adapter.py +2 -2
- package/runtime/python/okstra_ctl/adapters/hosts/claude-code/adapter.py +25 -5
- package/runtime/python/okstra_ctl/adapters/hosts/codex/adapter.py +2 -2
- package/runtime/python/okstra_ctl/adapters/hosts/external/adapter.py +4 -1
- package/runtime/python/okstra_ctl/adapters/hosts/external/relay.md +4 -4
- package/runtime/python/okstra_ctl/adapters/hosts/grok/adapter.py +2 -2
- package/runtime/python/okstra_ctl/adapters/hosts/kimi/adapter.py +2 -2
- package/runtime/python/okstra_ctl/adapters/providers/antigravity/adapter.py +79 -11
- package/runtime/python/okstra_ctl/adapters/providers/claude/adapter.py +100 -25
- package/runtime/python/okstra_ctl/adapters/providers/codex/adapter.py +59 -14
- package/runtime/python/okstra_ctl/adapters/providers/grok/adapter.py +55 -9
- package/runtime/python/okstra_ctl/adapters/providers/kimi/adapter.py +51 -12
- package/runtime/python/okstra_ctl/agent_activity.py +5 -1
- package/runtime/python/okstra_ctl/agent_invocation.py +608 -14
- package/runtime/python/okstra_ctl/agent_prompt_cli.py +249 -50
- package/runtime/python/okstra_ctl/application/resolve_assignment.py +53 -12
- package/runtime/python/okstra_ctl/assignment_environment.py +102 -0
- package/runtime/python/okstra_ctl/assignment_resolver.py +790 -0
- package/runtime/python/okstra_ctl/attempt_evidence.py +342 -0
- package/runtime/python/okstra_ctl/conformance.py +68 -0
- package/runtime/python/okstra_ctl/convergence.py +409 -3
- package/runtime/python/okstra_ctl/convergence_engine.py +248 -15
- package/runtime/python/okstra_ctl/convergence_store.py +170 -1
- package/runtime/python/okstra_ctl/dispatch_core.py +1181 -102
- package/runtime/python/okstra_ctl/dispatch_state.py +835 -22
- package/runtime/python/okstra_ctl/doctor.py +16 -2
- package/runtime/python/okstra_ctl/domain/host.py +32 -1
- package/runtime/python/okstra_ctl/domain/provider.py +212 -6
- package/runtime/python/okstra_ctl/domain/role.py +125 -0
- package/runtime/python/okstra_ctl/domain/wizard/interaction.py +13 -0
- package/runtime/python/okstra_ctl/domain/worker_exec.py +39 -1
- package/runtime/python/okstra_ctl/domain/worker_role.py +13 -3
- package/runtime/python/okstra_ctl/domain/worker_stream.py +24 -0
- package/runtime/python/okstra_ctl/error_log_write.py +9 -0
- package/runtime/python/okstra_ctl/error_report.py +21 -1
- package/runtime/python/okstra_ctl/execution_identity.py +529 -0
- package/runtime/python/okstra_ctl/execution_manifest.py +1281 -0
- package/runtime/python/okstra_ctl/execution_mutation_audit.py +619 -0
- package/runtime/python/okstra_ctl/final_report_schema.py +5 -4
- package/runtime/python/okstra_ctl/index.py +6 -2
- package/runtime/python/okstra_ctl/initial_prompt_materialization.py +43 -3
- package/runtime/python/okstra_ctl/legacy_model_selection.py +490 -0
- package/runtime/python/okstra_ctl/model_cli.py +278 -0
- package/runtime/python/okstra_ctl/model_defaults.py +46 -0
- package/runtime/python/okstra_ctl/model_discovery.py +26 -7
- package/runtime/python/okstra_ctl/model_pool.py +501 -0
- package/runtime/python/okstra_ctl/models.py +47 -27
- package/runtime/python/okstra_ctl/mutation_recovery.py +293 -0
- package/runtime/python/okstra_ctl/pane_reclaim.py +13 -22
- package/runtime/python/okstra_ctl/pane_title.py +151 -0
- package/runtime/python/okstra_ctl/ports/host_model.py +48 -17
- package/runtime/python/okstra_ctl/ports/worker_dispatch.py +4 -0
- package/runtime/python/okstra_ctl/registry/provider_registry.py +8 -4
- package/runtime/python/okstra_ctl/render.py +78 -10
- package/runtime/python/okstra_ctl/render_final_report.py +34 -19
- package/runtime/python/okstra_ctl/report_contract.py +39 -1
- package/runtime/python/okstra_ctl/report_finalize.py +84 -9
- package/runtime/python/okstra_ctl/report_html/render.py +1 -0
- package/runtime/python/okstra_ctl/role_requirements.py +217 -0
- package/runtime/python/okstra_ctl/run.py +1250 -260
- package/runtime/python/okstra_ctl/run_index_row.py +7 -1
- package/runtime/python/okstra_ctl/schema_excerpt.py +1 -1
- package/runtime/python/okstra_ctl/scope_provenance.py +1 -1
- package/runtime/python/okstra_ctl/session.py +69 -12
- package/runtime/python/okstra_ctl/team.py +51 -25
- package/runtime/python/okstra_ctl/time_report.py +38 -4
- package/runtime/python/okstra_ctl/tmux.py +19 -149
- package/runtime/python/okstra_ctl/usage_identity.py +86 -0
- package/runtime/python/okstra_ctl/usage_report.py +15 -3
- package/runtime/python/okstra_ctl/wizard.py +1253 -62
- package/runtime/python/okstra_ctl/worker_audit_ledger.py +68 -65
- package/runtime/python/okstra_ctl/worker_request.py +9 -1
- package/runtime/python/okstra_ctl/worker_runner.py +130 -5
- package/runtime/python/okstra_ctl/workers.py +7 -5
- package/runtime/python/okstra_ctl/worktree.py +69 -3
- package/runtime/python/okstra_ctl/write_policy.py +571 -0
- package/runtime/python/okstra_token_usage/cli.py +1 -1
- package/runtime/python/okstra_token_usage/collect.py +66 -6
- package/runtime/schemas/convergence-groups-v2.0.schema.json +128 -0
- package/runtime/schemas/execution-manifest-v2.schema.json +340 -0
- package/runtime/schemas/final-report-v2.0.schema.json +25 -0
- package/runtime/skills/okstra-run/SKILL.md +9 -9
- package/runtime/skills/okstra-setup/references/project-config.md +11 -0
- package/runtime/templates/report-writer-prompt-preamble.md +2 -0
- package/runtime/templates/reports/final-report-v2.template.md +7 -1
- package/runtime/templates/reports/html/base.template.html +21 -0
- package/runtime/templates/reports/html/i18n/en.json +4 -0
- package/runtime/templates/reports/html/i18n/ko.json +4 -0
- package/runtime/templates/reports/settings.template.json +0 -24
- package/runtime/templates/worker-prompt-preamble.md +6 -2
- package/runtime/validators/lib/fixtures.sh +98 -33
- package/runtime/validators/validate-implementation-plan-stages.py +63 -3
- package/runtime/validators/validate-run.py +443 -508
- package/runtime/validators/validate_session_conformance.py +26 -8
- package/runtime/bin/okstra-subagent-reclaim.sh +0 -26
- package/runtime/schemas/final-report-v1.0.schema.json +0 -6366
- package/runtime/templates/reports/final-report.template.md +0 -1258
- package/src/cli-registry.mjs +0 -532
- package/src/commands/execute/codex-dispatch.mjs +0 -10
- package/src/commands/execute/plan-items.mjs +0 -9
- package/src/commands/execute/plan-validate.mjs +0 -68
- package/src/commands/execute/run.mjs +0 -208
- package/src/commands/execute/team.mjs +0 -63
- package/src/commands/execute/wizard.mjs +0 -167
- package/src/commands/inspect/stage-map.mjs +0 -98
- package/src/commands/inspect/task-list.mjs +0 -97
- package/src/commands/inspect/task-show.mjs +0 -100
- package/src/commands/lifecycle/check-project.mjs +0 -187
- package/src/commands/lifecycle/config.mjs +0 -385
- package/src/commands/lifecycle/doctor.mjs +0 -308
- package/src/commands/lifecycle/install.mjs +0 -1172
- package/src/commands/lifecycle/paths.mjs +0 -104
- package/src/commands/lifecycle/preflight.mjs +0 -125
- package/src/commands/lifecycle/setup.mjs +0 -333
- package/src/commands/lifecycle/uninstall.mjs +0 -279
- package/src/commands/memory/memory.mjs +0 -524
- package/src/commands/pr/pr.mjs +0 -261
- package/src/commands/report/finalize.mjs +0 -64
- package/src/lib/host-registry-client.mjs +0 -176
- package/src/lib/paths.mjs +0 -86
- package/src/lib/proc.mjs +0 -31
- package/src/lib/python-helper.mjs +0 -142
- package/src/lib/runtime-manifest.mjs +0 -70
- package/src/lib/skill-catalog.mjs +0 -53
- package/src/lib/version.mjs +0 -20
- /package/{src → dist}/commands/pr/default.md +0 -0
|
@@ -52,36 +52,12 @@
|
|
|
52
52
|
"SessionEnd": [
|
|
53
53
|
{
|
|
54
54
|
"hooks": [
|
|
55
|
-
{
|
|
56
|
-
"type": "command",
|
|
57
|
-
"command": "$HOME/.okstra/bin/okstra-trace-cleanup.sh --reap"
|
|
58
|
-
},
|
|
59
55
|
{
|
|
60
56
|
"type": "command",
|
|
61
57
|
"command": "$HOME/.okstra/bin/okstra-team-reconcile.sh --session-end"
|
|
62
58
|
}
|
|
63
59
|
]
|
|
64
60
|
}
|
|
65
|
-
],
|
|
66
|
-
"SubagentStop": [
|
|
67
|
-
{
|
|
68
|
-
"hooks": [
|
|
69
|
-
{
|
|
70
|
-
"type": "command",
|
|
71
|
-
"command": "$HOME/.okstra/bin/okstra-subagent-reclaim.sh"
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
"TaskCompleted": [
|
|
77
|
-
{
|
|
78
|
-
"hooks": [
|
|
79
|
-
{
|
|
80
|
-
"type": "command",
|
|
81
|
-
"command": "$HOME/.okstra/bin/okstra-subagent-reclaim.sh"
|
|
82
|
-
}
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
61
|
]
|
|
86
62
|
}
|
|
87
63
|
}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
This file is the audience-specific contract for initial `analysis` workers. Read it end-to-end from the path selected by the dispatch prompt. Before doing work, also read the shared file named by `**Worker Error Contract Path:**`; that file is the only source for error-sidecar rules.
|
|
4
4
|
|
|
5
|
+
Your identity is the stored role execution (`executionLabel`). Canonical roles are `leader`, `analyser`, `critic`, `designer`, `planner`, `implementer`, `verifier`, `report-writer`, and `translator`. `lead` and `executor` are compatibility aliases only.
|
|
6
|
+
|
|
5
7
|
## Required reading
|
|
6
8
|
|
|
7
9
|
Read `analysis-packet.md`, the primary compact input, end-to-end. Source files named as fallback/evidence paths are read only when a finding needs to verify a citation, fill a packet gap, or resolve ambiguity. Do not read `final-report-template.md` or `final-report-schema.json`; analysis workers produce findings, not the final report.
|
|
@@ -27,7 +29,9 @@ Append one canonical JSON row to the audit sidecar for each command that produce
|
|
|
27
29
|
|
|
28
30
|
- Evidence command: {"command":"npm run check","cwd":"<project-root>","exitCode":0,"outputSummary":"all checks passed"}
|
|
29
31
|
|
|
30
|
-
Do not record commands used only to explore, including `rg`, `ls`, and file-opening commands.
|
|
32
|
+
Do not record commands used only to explore, including `rg`, `ls`, and file-opening commands. `okstra worker-audit-check` rejects malformed command rows through `okstra_ctl.worker_audit_ledger`.
|
|
33
|
+
|
|
34
|
+
Write the command as you ran it. Nothing scans these rows for secrets, so a row is never refused for how a setting is named — `AUTH_MODE=off` and `TOKEN_TTL=60` record verbatim. What the row needs to carry is the command's shape, its keys; a value that must not be written down is yours to leave out or pass as a `$VAR` reference, and at execution time that value comes from the environment or from the person running the command.
|
|
31
35
|
|
|
32
36
|
## Anchor headers (lead-injected, BLOCKING)
|
|
33
37
|
|
|
@@ -50,7 +54,7 @@ Every initial analysis prompt begins with these generated anchors in this exact
|
|
|
50
54
|
|
|
51
55
|
## Worker output sections
|
|
52
56
|
|
|
53
|
-
Every analysis result starts with YAML frontmatter containing the task identity and `
|
|
57
|
+
Every analysis result starts with YAML frontmatter containing the task identity, `participantRef`, `roleExecutionRef`, `executionLabel`, `invocationRef`, and `attempt`, followed by a header with the actual `**Model:**` value. Copy these execution fields from the generated prompt metadata; do not derive them from the provider or model name. Legacy v1 prompts may expose only `workerId`, which is a read-only compatibility projection and must not be written into a v2 result. Then emit these sections in exact order:
|
|
54
58
|
|
|
55
59
|
1. Findings
|
|
56
60
|
2. Missing Information or Assumptions
|
|
@@ -138,6 +138,7 @@ prompt_path.write_text(
|
|
|
138
138
|
f"{target_worker_id}-errors.json",
|
|
139
139
|
f"Assigned worker prompt history path: {prompt_relative}",
|
|
140
140
|
"**Prompt Delivery Mode:** eager-include",
|
|
141
|
+
f"**Model:** Fixture worker, {target_worker.get('modelExecutionValue', '')}",
|
|
141
142
|
f"- Primary analysis packet: `{analysis_packet_path}`",
|
|
142
143
|
"",
|
|
143
144
|
"# Initial Analysis Prompt",
|
|
@@ -222,7 +223,7 @@ for worker in team_state.get("workers", []):
|
|
|
222
223
|
worker["reason"] = reason_by_worker_id.get(worker_id, "Validation fixture not used")
|
|
223
224
|
|
|
224
225
|
prompt_relative = str(worker.get("promptPath", "")).strip()
|
|
225
|
-
if prompt_relative
|
|
226
|
+
if prompt_relative:
|
|
226
227
|
prompt_path = project_root / prompt_relative
|
|
227
228
|
prompt_path.parent.mkdir(parents=True, exist_ok=True)
|
|
228
229
|
prompt_lines = [
|
|
@@ -232,6 +233,7 @@ for worker in team_state.get("workers", []):
|
|
|
232
233
|
f"{worker_id}-errors.json",
|
|
233
234
|
f"Assigned worker prompt history path: {prompt_relative}",
|
|
234
235
|
"**Prompt Delivery Mode:** eager-include",
|
|
236
|
+
f"**Model:** Fixture worker, {worker.get('modelExecutionValue', '')}",
|
|
235
237
|
]
|
|
236
238
|
if worker_id != "report-writer":
|
|
237
239
|
prompt_lines.append(
|
|
@@ -428,7 +430,7 @@ if WORKSPACE_ROOT:
|
|
|
428
430
|
task_type = str(task_manifest.get("taskType", ""))
|
|
429
431
|
sample_path = (
|
|
430
432
|
Path(WORKSPACE_ROOT)
|
|
431
|
-
/ "tests" / "fixtures" / "final-report-data"
|
|
433
|
+
/ "tests" / "fixtures" / "final-report-data-v2"
|
|
432
434
|
/ f"{task_type}-001.data.json"
|
|
433
435
|
)
|
|
434
436
|
if sample_path.is_file():
|
|
@@ -439,6 +441,25 @@ if WORKSPACE_ROOT:
|
|
|
439
441
|
sample["frontmatter"]["projectId"] = str(task_manifest.get("projectId", ""))
|
|
440
442
|
sample["header"]["taskKey"] = str(task_manifest.get("taskKey", ""))
|
|
441
443
|
sample["header"]["taskType"] = task_type
|
|
444
|
+
# The shipped fixture carries its own roster; this run's contract names
|
|
445
|
+
# a different one, and the validator compares the report's agent rows
|
|
446
|
+
# against that contract. Restate the rows under the contract's names so
|
|
447
|
+
# the fixture exercises the check instead of tripping over it.
|
|
448
|
+
_required = (
|
|
449
|
+
(run_manifest.get("teamContract") or {}).get("requiredAgentStatusEntries")
|
|
450
|
+
or (task_manifest.get("resultContract") or {}).get(
|
|
451
|
+
"requiredAgentStatusEntries"
|
|
452
|
+
)
|
|
453
|
+
or []
|
|
454
|
+
)
|
|
455
|
+
_rows = sample.get("executionStatus") or []
|
|
456
|
+
if _required and _rows:
|
|
457
|
+
# `agent` is the runtime (a schema enum); `role` carries the label the
|
|
458
|
+
# validator looks for in the rendered markdown.
|
|
459
|
+
sample["executionStatus"] = [
|
|
460
|
+
{**_rows[min(i, len(_rows) - 1)], "role": role}
|
|
461
|
+
for i, role in enumerate(_required)
|
|
462
|
+
]
|
|
442
463
|
name = report_path.name
|
|
443
464
|
data_path = (
|
|
444
465
|
report_path.with_name(name[:-3] + ".data.json")
|
|
@@ -452,23 +473,36 @@ if WORKSPACE_ROOT:
|
|
|
452
473
|
|
|
453
474
|
import sys as _sys
|
|
454
475
|
_sys.path.insert(0, str(Path(WORKSPACE_ROOT) / "scripts"))
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
476
|
+
# The markdown seeded above this block predates the data.json contract, so
|
|
477
|
+
# re-render it from the data.json the fixture just wrote. Otherwise the pair
|
|
478
|
+
# disagrees and the validator's AI-handoff heading scan fails on a fixture
|
|
479
|
+
# that never claimed to be hand-authored.
|
|
480
|
+
if sample_path.is_file():
|
|
481
|
+
try:
|
|
482
|
+
from okstra_ctl.render_final_report import render_to_file
|
|
483
|
+
|
|
484
|
+
render_to_file(data_path, report_path)
|
|
485
|
+
except Exception as exc: # pragma: no cover — fixture path only
|
|
486
|
+
raise SystemExit(f"failed to render final report in fixture: {exc}")
|
|
487
|
+
# Go through the same CLI the run uses, so the fixture picks the schema's
|
|
488
|
+
# own view (v2 task template) rather than a second copy of that choice.
|
|
489
|
+
import subprocess as _subprocess
|
|
490
|
+
_views = _subprocess.run(
|
|
491
|
+
[
|
|
492
|
+
_sys.executable,
|
|
493
|
+
str(Path(WORKSPACE_ROOT) / "scripts" / "okstra-render-report-views.py"),
|
|
494
|
+
str(report_path),
|
|
495
|
+
"--task-key", str(task_manifest.get("taskKey", "validation/fixture")),
|
|
496
|
+
"--task-type", str(task_manifest.get("taskType", "validation")),
|
|
497
|
+
"--seq", "001",
|
|
498
|
+
],
|
|
499
|
+
capture_output=True,
|
|
500
|
+
text=True,
|
|
501
|
+
)
|
|
502
|
+
if _views.returncode != 0:
|
|
503
|
+
raise SystemExit(
|
|
504
|
+
f"failed to render report views in fixture: {_views.stderr or _views.stdout}"
|
|
469
505
|
)
|
|
470
|
-
except Exception as exc: # pragma: no cover — fixture path only
|
|
471
|
-
raise SystemExit(f"failed to render report views in fixture: {exc}")
|
|
472
506
|
|
|
473
507
|
if final_status_path.exists():
|
|
474
508
|
final_status_path.unlink()
|
|
@@ -538,6 +572,7 @@ if WORKSPACE_ROOT:
|
|
|
538
572
|
AgentInstructionSource,
|
|
539
573
|
AgentInvocationRequest,
|
|
540
574
|
agent_model_assignment_from_payload,
|
|
575
|
+
invocation_execution_identity_from_manifest,
|
|
541
576
|
prepare_agent_invocation,
|
|
542
577
|
)
|
|
543
578
|
from okstra_ctl.dispatch_state import (
|
|
@@ -570,7 +605,7 @@ if WORKSPACE_ROOT:
|
|
|
570
605
|
contract = run_manifest["agentContract"]
|
|
571
606
|
reservation_root = project_root / contract["invocationReservationRootPath"]
|
|
572
607
|
for worker in team_state.get("workers", []):
|
|
573
|
-
if not isinstance(worker, dict)
|
|
608
|
+
if not isinstance(worker, dict):
|
|
574
609
|
continue
|
|
575
610
|
worker_id = str(worker.get("workerId") or "").strip()
|
|
576
611
|
prompt_relative = str(worker.get("promptPath") or "").strip()
|
|
@@ -583,18 +618,37 @@ if WORKSPACE_ROOT:
|
|
|
583
618
|
assignment_ref = f"initial/{worker_id}"
|
|
584
619
|
invocation_id = f"validation-fixture-{worker_id}"
|
|
585
620
|
invocation_prompt = reservation_root / f"{invocation_id}.prompt.md"
|
|
621
|
+
audience = (
|
|
622
|
+
"report-writer" if worker_id == "report-writer"
|
|
623
|
+
else analysis_audience
|
|
624
|
+
)
|
|
625
|
+
assignment = agent_model_assignment_from_payload(
|
|
626
|
+
assignments[assignment_ref]
|
|
627
|
+
)
|
|
628
|
+
identity = invocation_execution_identity_from_manifest(
|
|
629
|
+
run_manifest,
|
|
630
|
+
assignment=assignment,
|
|
631
|
+
assignment_ref=assignment_ref,
|
|
632
|
+
duty_id=audience,
|
|
633
|
+
)
|
|
634
|
+
identity_args = {
|
|
635
|
+
"participant_ref": (
|
|
636
|
+
identity.participant_ref if identity is not None else None
|
|
637
|
+
),
|
|
638
|
+
"role_execution_ref": (
|
|
639
|
+
identity.role_execution_ref if identity is not None else None
|
|
640
|
+
),
|
|
641
|
+
"duty_id": identity.duty_id if identity is not None else None,
|
|
642
|
+
"invocation_ref": invocation_id if identity is not None else None,
|
|
643
|
+
"attempt": 1,
|
|
644
|
+
}
|
|
586
645
|
prepared = prepare_agent_invocation(AgentInvocationRequest(
|
|
587
646
|
invocation_id=invocation_id,
|
|
588
|
-
worker_id=worker_id,
|
|
589
|
-
audience=
|
|
590
|
-
"report-writer" if worker_id == "report-writer"
|
|
591
|
-
else analysis_audience
|
|
592
|
-
),
|
|
647
|
+
worker_id=worker_id if identity is None else None,
|
|
648
|
+
audience=audience,
|
|
593
649
|
assignment_ref=assignment_ref,
|
|
594
650
|
purpose=None,
|
|
595
|
-
assignment=
|
|
596
|
-
assignments[assignment_ref]
|
|
597
|
-
),
|
|
651
|
+
assignment=assignment,
|
|
598
652
|
instruction=AgentInstruction(
|
|
599
653
|
anchor_lines=(),
|
|
600
654
|
body=source_prompt.read_text(encoding="utf-8"),
|
|
@@ -610,6 +664,7 @@ if WORKSPACE_ROOT:
|
|
|
610
664
|
invocation_prompt.name + ".meta.json"
|
|
611
665
|
),
|
|
612
666
|
dispatch_kind="validation-fixture",
|
|
667
|
+
**identity_args,
|
|
613
668
|
))
|
|
614
669
|
dispatch = record_verified_agent_dispatch(
|
|
615
670
|
project_root=project_root,
|
|
@@ -621,11 +676,21 @@ if WORKSPACE_ROOT:
|
|
|
621
676
|
else "core-pre-dispatch"
|
|
622
677
|
),
|
|
623
678
|
)
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
679
|
+
if worker.get("status") == "completed":
|
|
680
|
+
link_agent_dispatch_result(
|
|
681
|
+
project_root=project_root,
|
|
682
|
+
run_manifest_path=run_manifest_path,
|
|
683
|
+
dispatch_id=dispatch["dispatchId"],
|
|
684
|
+
result_path=project_root / result_relative,
|
|
685
|
+
)
|
|
686
|
+
|
|
687
|
+
# Preserve the workflow's historical missing-prompt negative after the v2
|
|
688
|
+
# invocation record has captured the prompt bytes that were actually sent.
|
|
689
|
+
for worker in team_state.get("workers", []):
|
|
690
|
+
if isinstance(worker, dict) and worker.get("workerId") == omitted_worker_id:
|
|
691
|
+
omitted_prompt = str(worker.get("promptPath") or "").strip()
|
|
692
|
+
if omitted_prompt:
|
|
693
|
+
(project_root / omitted_prompt).unlink(missing_ok=True)
|
|
694
|
+
break
|
|
630
695
|
PY
|
|
631
696
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""S1–
|
|
2
|
+
"""S1–S13 checks for the Stage Map structure of an approved
|
|
3
3
|
implementation-planning final-report.md. Run from prepare_task_bundle
|
|
4
4
|
of `implementation` task or standalone."""
|
|
5
5
|
|
|
@@ -43,9 +43,26 @@ EXIT_CONTRACT_HEADING = re.compile(r"^###\s+Stage Exit Contract\b", re.M)
|
|
|
43
43
|
PATH_TOKEN = re.compile(r"(?:[\w.@-]+/)+[\w.@-]+")
|
|
44
44
|
|
|
45
45
|
|
|
46
|
+
# S12 — a step command that reads an okstra artifact back out of a git object
|
|
47
|
+
# (`git cat-file -e <rev>:.okstra/...`, `git show <rev>:.okstra/...`). `.okstra/**`
|
|
48
|
+
# is never committed: `_implementation-executor.md` forbids `git add -f` and makes
|
|
49
|
+
# a staged ignored path abort the commit, and `_implementation-verifier.md` reports
|
|
50
|
+
# a committed `.okstra` path as a branch defect. A verification step built on such
|
|
51
|
+
# a read can never pass, whatever the stage does.
|
|
52
|
+
GIT_OBJECT_OKSTRA_READ = re.compile(
|
|
53
|
+
r"\bgit\b[^&|;]*?\b(?:cat-file|show|ls-tree|archive|grep)\b[^&|;]*?"
|
|
54
|
+
r"(?<![\w./@'\"-])[\w./@{}~^-]+:\.okstra/"
|
|
55
|
+
)
|
|
56
|
+
# S13 — a clean-worktree assertion built on a bare `git status`. okstra provisions
|
|
57
|
+
# `.okstra`, the configured sync entries, and (for implementation) a nested stage
|
|
58
|
+
# worktree into every task worktree, so a bare status is never empty there.
|
|
59
|
+
BARE_GIT_STATUS = re.compile(r"\bgit\b[^&|;]*?\bstatus\b[^&|;]*?--(?:porcelain|short)\b")
|
|
60
|
+
CLEAN_GATE_COMMAND = "okstra worktree-status --check-clean"
|
|
61
|
+
|
|
62
|
+
|
|
46
63
|
@dataclass
|
|
47
64
|
class ValidationError:
|
|
48
|
-
code: str # S1..
|
|
65
|
+
code: str # S1..S13
|
|
49
66
|
stage: int # 0 = global
|
|
50
67
|
message: str
|
|
51
68
|
|
|
@@ -92,10 +109,14 @@ def _slice_stage_section(text: str, stage_number: int) -> str:
|
|
|
92
109
|
return text[start: start + nxt.start()] if nxt else text[start:]
|
|
93
110
|
|
|
94
111
|
|
|
112
|
+
STEP_COMMAND_CELL = 3
|
|
113
|
+
|
|
114
|
+
|
|
95
115
|
def _effective_step_rows(section: str) -> List[List[str]]:
|
|
96
116
|
"""Effective (non header/divider/comment) rows of the `### Stepwise
|
|
97
117
|
Execution Order` table, each as a list of stripped cells. Columns are
|
|
98
|
-
`step | action | files | command | expected`, so action is
|
|
118
|
+
`step | action | files | command | outcome | expected`, so action is
|
|
119
|
+
index 1, command index 3, outcome index 4."""
|
|
99
120
|
m = re.search(r"^###\s+Stepwise Execution Order\b", section, re.M)
|
|
100
121
|
if not m:
|
|
101
122
|
return []
|
|
@@ -267,6 +288,40 @@ def _check_red_green_steps(section: str, stage_number: int) -> List[ValidationEr
|
|
|
267
288
|
return errs
|
|
268
289
|
|
|
269
290
|
|
|
291
|
+
def _check_step_command(command: str, stage_number: int) -> List[ValidationError]:
|
|
292
|
+
"""S12 / S13 over one step's `command` cell.
|
|
293
|
+
|
|
294
|
+
The command cell is what actually closes a step, so it has to be runnable
|
|
295
|
+
inside the worktree layout okstra provisions. Both rules reject a command
|
|
296
|
+
that can never pass there, regardless of what the stage implements.
|
|
297
|
+
"""
|
|
298
|
+
errs: List[ValidationError] = []
|
|
299
|
+
if GIT_OBJECT_OKSTRA_READ.search(command):
|
|
300
|
+
errs.append(ValidationError("S12", stage_number,
|
|
301
|
+
"S12: step command reads an `.okstra/` path out of a git object — "
|
|
302
|
+
"`.okstra/**` is gitignored and never committed, so the read can "
|
|
303
|
+
"never resolve. Pass the artifact forward through the stage carry "
|
|
304
|
+
"sidecar / verifier result, or read it from the working tree"))
|
|
305
|
+
if BARE_GIT_STATUS.search(command):
|
|
306
|
+
errs.append(ValidationError("S13", stage_number,
|
|
307
|
+
"S13: step command asserts a clean worktree with a bare `git status` — "
|
|
308
|
+
"okstra provisions `.okstra`, the synced entries, and any nested stage "
|
|
309
|
+
f"worktree there, so it is never empty. Use `{CLEAN_GATE_COMMAND}`"))
|
|
310
|
+
return errs
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
def _check_markdown_step_commands(
|
|
314
|
+
text: str, stages: List[StageMapStage]
|
|
315
|
+
) -> List[ValidationError]:
|
|
316
|
+
"""S12 / S13 over the rendered `### Stepwise Execution Order` rows."""
|
|
317
|
+
errs: List[ValidationError] = []
|
|
318
|
+
for s in stages:
|
|
319
|
+
for row in _effective_step_rows(_slice_stage_section(text, s.stage_number)):
|
|
320
|
+
if len(row) > STEP_COMMAND_CELL:
|
|
321
|
+
errs.extend(_check_step_command(row[STEP_COMMAND_CELL], s.stage_number))
|
|
322
|
+
return errs
|
|
323
|
+
|
|
324
|
+
|
|
270
325
|
def _check_conformance_declaration(
|
|
271
326
|
text: str, stages: List[StageMapStage]
|
|
272
327
|
) -> List[ValidationError]:
|
|
@@ -383,6 +438,7 @@ def collect_validation_errors(text: str) -> List[ValidationError]:
|
|
|
383
438
|
if stages:
|
|
384
439
|
errors.extend(_check_each_stage_section(text, stages))
|
|
385
440
|
errors.extend(_check_slice_tdd(text, stages))
|
|
441
|
+
errors.extend(_check_markdown_step_commands(text, stages))
|
|
386
442
|
errors.extend(_check_conformance_declaration(text, stages))
|
|
387
443
|
errors.extend(_check_depends_on(stages))
|
|
388
444
|
errors.extend(_check_parallel_safety(text, stages))
|
|
@@ -605,6 +661,10 @@ def collect_data_validation_errors(planning: dict) -> List[ValidationError]:
|
|
|
605
661
|
}))
|
|
606
662
|
for stage in stages:
|
|
607
663
|
errors.extend(_check_data_slice_tdd(stage))
|
|
664
|
+
number = stage.get("stage") if isinstance(stage.get("stage"), int) else 0
|
|
665
|
+
for step in stage.get("stepwiseExecution") or []:
|
|
666
|
+
if isinstance(step, dict):
|
|
667
|
+
errors.extend(_check_step_command(str(step.get("command") or ""), number))
|
|
608
668
|
return errors
|
|
609
669
|
|
|
610
670
|
|