okstra 0.186.7 → 0.187.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cli-registry.d.mts +88 -1
- package/dist/cli-registry.mjs +68 -111
- package/dist/cli-registry.mjs.map +1 -1
- package/dist/commands/execute/render-bundle.mjs +0 -1
- package/dist/commands/execute/render-bundle.mjs.map +1 -1
- package/dist/commands/execute/run.mjs +8 -3
- package/dist/commands/execute/run.mjs.map +1 -1
- package/dist/commands/lifecycle/check-project.mjs +1 -14
- package/dist/commands/lifecycle/check-project.mjs.map +1 -1
- package/dist/commands/lifecycle/config.mjs +38 -40
- package/dist/commands/lifecycle/config.mjs.map +1 -1
- package/dist/commands/lifecycle/doctor.d.mts +22 -7
- package/dist/commands/lifecycle/doctor.mjs +77 -49
- package/dist/commands/lifecycle/doctor.mjs.map +1 -1
- package/dist/commands/lifecycle/install.d.mts +12 -10
- package/dist/commands/lifecycle/install.mjs +104 -39
- package/dist/commands/lifecycle/install.mjs.map +1 -1
- package/dist/commands/lifecycle/paths.mjs +8 -3
- package/dist/commands/lifecycle/paths.mjs.map +1 -1
- package/dist/commands/lifecycle/preflight.mjs +2 -1
- package/dist/commands/lifecycle/preflight.mjs.map +1 -1
- package/dist/commands/lifecycle/setup.mjs +22 -36
- package/dist/commands/lifecycle/setup.mjs.map +1 -1
- package/dist/commands/lifecycle/uninstall.d.mts +4 -2
- package/dist/commands/lifecycle/uninstall.mjs +59 -15
- package/dist/commands/lifecycle/uninstall.mjs.map +1 -1
- package/dist/commands/memory/memory.mjs +7 -1
- package/dist/commands/memory/memory.mjs.map +1 -1
- package/dist/lib/helper-scripts.d.mts +1 -1
- package/dist/lib/helper-scripts.mjs +10 -18
- package/dist/lib/helper-scripts.mjs.map +1 -1
- package/dist/lib/host-config.d.mts +72 -0
- package/dist/lib/host-config.mjs +404 -0
- package/dist/lib/host-config.mjs.map +1 -0
- package/dist/lib/host-registry-client.d.mts +2 -2
- package/dist/lib/host-registry-client.mjs +0 -3
- package/dist/lib/host-registry-client.mjs.map +1 -1
- package/dist/lib/install-assets.d.mts +1 -0
- package/dist/lib/install-assets.mjs +4 -0
- package/dist/lib/install-assets.mjs.map +1 -1
- package/dist/lib/proc.d.mts +2 -0
- package/dist/lib/proc.mjs +12 -0
- package/dist/lib/proc.mjs.map +1 -1
- package/dist/lib/python-command.d.mts +2 -0
- package/dist/lib/python-command.mjs +52 -0
- package/dist/lib/python-command.mjs.map +1 -0
- package/dist/lib/python-helper.d.mts +2 -5
- package/dist/lib/python-helper.mjs +3 -52
- package/dist/lib/python-helper.mjs.map +1 -1
- package/dist/lib/runtime-payload.d.mts +23 -0
- package/dist/lib/runtime-payload.mjs +57 -0
- package/dist/lib/runtime-payload.mjs.map +1 -0
- package/dist/lib/types.d.mts +24 -13
- package/docs/architecture/storage-model.md +21 -5
- package/docs/architecture.md +37 -36
- package/docs/cli.md +55 -76
- package/docs/coding-rules.md +295 -0
- package/docs/container.md +10 -36
- package/docs/contributor-change-matrix.md +1 -1
- package/docs/for-ai/skills/okstra-code-review.md +0 -1
- package/docs/for-ai/skills/okstra-container-build.md +8 -41
- package/docs/for-ai/skills/okstra-inspect.md +4 -4
- package/docs/for-ai/skills/okstra-manager.md +2 -2
- package/docs/for-ai/skills/okstra-rollup.md +0 -1
- package/docs/for-ai/skills/okstra-run.md +3 -3
- package/docs/for-ai/skills/okstra-user-response.md +0 -1
- package/docs/performance-improvement-plan-v2.md +1 -1
- package/docs/project-structure-overview.md +62 -62
- package/docs/task-process/README.md +3 -3
- package/docs/task-process/common-flow.md +1 -1
- package/docs/task-process/error-analysis.md +3 -3
- package/docs/task-process/implementation-planning.md +3 -1
- package/docs/task-process/release-handoff.md +1 -1
- package/package.json +3 -2
- package/runtime/BUILD.json +2 -2
- package/runtime/agents/workers/claude-worker.md +6 -11
- package/runtime/agents/workers/report-writer-worker.md +1 -1
- package/runtime/bin/lib/okstra/cli.sh +4 -0
- package/runtime/bin/lib/okstra/globals.sh +2 -0
- package/runtime/bin/lib/okstra/interactive.sh +26 -173
- package/runtime/bin/lib/okstra/project-resolver.sh +23 -61
- package/runtime/bin/lib/okstra/usage.sh +3 -3
- package/runtime/bin/okstra-compact-reminder.sh +1 -5
- package/runtime/bin/okstra-error-log.py +19 -2
- package/runtime/bin/okstra-import-check.py +26 -0
- package/runtime/bin/okstra-inject-report-index.py +5 -4
- package/runtime/bin/okstra-provider-exec.py +22 -17
- package/runtime/bin/okstra-render-final-report.py +16 -6
- package/runtime/bin/okstra-render-report-views.py +25 -18
- package/runtime/bin/okstra-report-translate.py +30 -18
- package/runtime/bin/okstra-spawn-followups.py +4 -0
- package/runtime/bin/okstra-token-usage.py +3 -0
- package/runtime/bin/okstra.sh +4 -2
- package/runtime/bin/okstra_bootstrap.py +58 -0
- package/runtime/prompts/coding-preflight/overview.md +1 -1
- package/runtime/prompts/duties/planning-worker.md +1 -1
- package/runtime/prompts/launch.template.md +35 -9
- package/runtime/prompts/lead/convergence.md +96 -87
- package/runtime/prompts/lead/okstra-lead-contract.md +63 -12
- package/runtime/prompts/lead/plan-body-verification.md +65 -46
- package/runtime/prompts/lead/report-writer.md +34 -4
- package/runtime/prompts/lead/team-contract.md +4 -1
- package/runtime/prompts/profiles/_clarification-recommendation.md +2 -1
- package/runtime/prompts/profiles/_coding-conventions-preflight.md +1 -1
- package/runtime/prompts/profiles/_common-contract.md +3 -3
- package/runtime/prompts/profiles/_coverage-critic.md +1 -1
- package/runtime/prompts/profiles/_implementation-deliverable.md +2 -2
- package/runtime/prompts/profiles/_implementation-executor.md +3 -1
- package/runtime/prompts/profiles/_implementation-verifier.md +16 -2
- package/runtime/prompts/profiles/error-analysis.md +4 -3
- package/runtime/prompts/profiles/final-verification.md +2 -2
- package/runtime/prompts/profiles/implementation-planning.md +22 -17
- package/runtime/prompts/profiles/implementation.md +3 -2
- package/runtime/prompts/profiles/requirements-discovery.md +2 -1
- package/runtime/prompts/wizard/prompts.ko.json +29 -8
- package/runtime/python/okstra_ctl/__init__.py +6 -27
- package/runtime/python/okstra_ctl/adapters/hosts/claude-code/relay.md +4 -5
- package/runtime/python/okstra_ctl/adapters/hosts/codex/adapter.py +21 -2
- package/runtime/python/okstra_ctl/adapters/hosts/external/adapter.py +3 -12
- package/runtime/python/okstra_ctl/adapters/providers/antigravity/adapter.py +40 -22
- package/runtime/python/okstra_ctl/adapters/providers/claude/adapter.py +14 -21
- package/runtime/python/okstra_ctl/adapters/providers/codex/adapter.py +37 -20
- package/runtime/python/okstra_ctl/adapters/providers/grok/adapter.py +86 -14
- package/runtime/python/okstra_ctl/adapters/providers/kimi/adapter.py +12 -12
- package/runtime/python/okstra_ctl/adapters/runtime/cmux.py +4 -7
- package/runtime/python/okstra_ctl/agent/__init__.py +1 -0
- package/runtime/python/okstra_ctl/{agent_activity.py → agent/activity.py} +12 -1
- package/runtime/python/okstra_ctl/{agent_invocation.py → agent/invocation.py} +34 -5
- package/runtime/python/okstra_ctl/agent/prompt_cli/__init__.py +19 -0
- package/runtime/python/okstra_ctl/agent/prompt_cli/__main__.py +11 -0
- package/runtime/python/okstra_ctl/agent/prompt_cli/cli.py +215 -0
- package/runtime/python/okstra_ctl/agent/prompt_cli/dynamic_verifier.py +155 -0
- package/runtime/python/okstra_ctl/agent/prompt_cli/emit.py +66 -0
- package/runtime/python/okstra_ctl/agent/prompt_cli/inputs.py +138 -0
- package/runtime/python/okstra_ctl/agent/prompt_cli/materialize.py +408 -0
- package/runtime/python/okstra_ctl/agent/prompt_cli/results.py +197 -0
- package/runtime/python/okstra_ctl/agent/prompt_cli/run_identity.py +107 -0
- package/runtime/python/okstra_ctl/analysis_packet.py +47 -4
- package/runtime/python/okstra_ctl/approval_decisions.py +260 -8
- package/runtime/python/okstra_ctl/assignment_resolver.py +0 -12
- package/runtime/python/okstra_ctl/attempt_evidence.py +12 -24
- package/runtime/python/okstra_ctl/blocking_checks.py +251 -0
- package/runtime/python/okstra_ctl/brief_frontmatter.py +0 -7
- package/runtime/python/okstra_ctl/clarification_items/__init__.py +102 -0
- package/runtime/python/okstra_ctl/clarification_items/carry.py +224 -0
- package/runtime/python/okstra_ctl/clarification_items/dispositions.py +135 -0
- package/runtime/python/okstra_ctl/clarification_items/parsing.py +253 -0
- package/runtime/python/okstra_ctl/clarification_items/rows.py +115 -0
- package/runtime/python/okstra_ctl/clarification_items/scan.py +215 -0
- package/runtime/python/okstra_ctl/clarification_items/sidecars.py +211 -0
- package/runtime/python/okstra_ctl/cmux.py +38 -31
- package/runtime/python/okstra_ctl/code_review_target.py +163 -1
- package/runtime/python/okstra_ctl/conformance.py +23 -0
- package/runtime/python/okstra_ctl/container.py +38 -421
- package/runtime/python/okstra_ctl/context_cost.py +16 -2
- package/runtime/python/okstra_ctl/contract_graph_cli.py +7 -0
- package/runtime/python/okstra_ctl/convergence.py +101 -15
- package/runtime/python/okstra_ctl/convergence_critic_prompt.py +345 -0
- package/runtime/python/okstra_ctl/convergence_engine.py +382 -70
- package/runtime/python/okstra_ctl/convergence_store.py +5 -29
- package/runtime/python/okstra_ctl/design_prep.py +108 -12
- package/runtime/python/okstra_ctl/design_snapshot.py +11 -1
- package/runtime/python/okstra_ctl/design_surfaces.py +29 -2
- package/runtime/python/okstra_ctl/dispatch_core.py +102 -25
- package/runtime/python/okstra_ctl/dispatch_state.py +268 -39
- package/runtime/python/okstra_ctl/doctor_cli.py +48 -0
- package/runtime/python/okstra_ctl/domain/worker_exec.py +10 -5
- package/runtime/python/okstra_ctl/domain/worker_presentation.py +21 -1
- package/runtime/python/okstra_ctl/domain/worker_stream.py +52 -21
- package/runtime/python/okstra_ctl/domain/write_policy.py +219 -0
- package/runtime/python/okstra_ctl/entrypoints/hosts.py +9 -2
- package/runtime/python/okstra_ctl/error_log_core.py +1 -1
- package/runtime/python/okstra_ctl/error_report.py +14 -0
- package/runtime/python/okstra_ctl/error_zip.py +18 -2
- package/runtime/python/okstra_ctl/execution_identity.py +100 -7
- package/runtime/python/okstra_ctl/execution_manifest.py +67 -20
- package/runtime/python/okstra_ctl/execution_mutation_audit.py +90 -8
- package/runtime/python/okstra_ctl/final_report_paths.py +17 -0
- package/runtime/python/okstra_ctl/final_report_schema.py +90 -16
- package/runtime/python/okstra_ctl/git_reconcile.py +22 -2
- package/runtime/python/okstra_ctl/handoff.py +24 -1
- package/runtime/python/okstra_ctl/ids.py +6 -16
- package/runtime/python/okstra_ctl/implementation_direction.py +142 -33
- package/runtime/python/okstra_ctl/implementation_options.py +25 -11
- package/runtime/python/okstra_ctl/implementation_outcome.py +5 -2
- package/runtime/python/okstra_ctl/improvement_lenses.py +0 -14
- package/runtime/python/okstra_ctl/incremental_carry.py +69 -8
- package/runtime/python/okstra_ctl/incremental_scope.py +173 -12
- package/runtime/python/okstra_ctl/index.py +2 -2
- package/runtime/python/okstra_ctl/initial_prompt_materialization.py +48 -8
- package/runtime/python/okstra_ctl/interactive_cli.py +223 -0
- package/runtime/python/okstra_ctl/json_boundary.py +10 -0
- package/runtime/python/okstra_ctl/listing.py +0 -91
- package/runtime/python/okstra_ctl/locks.py +5 -19
- package/runtime/python/okstra_ctl/log_report.py +14 -0
- package/runtime/python/okstra_ctl/manager_cli.py +22 -3
- package/runtime/python/okstra_ctl/manager_launch.py +4 -8
- package/runtime/python/okstra_ctl/material.py +2 -2
- package/runtime/python/okstra_ctl/migrate.py +23 -1
- package/runtime/python/okstra_ctl/model_cli.py +19 -5
- package/runtime/python/okstra_ctl/model_discovery.py +46 -47
- package/runtime/python/okstra_ctl/model_io/__init__.py +1 -0
- package/runtime/python/okstra_ctl/model_io/lines.py +163 -0
- package/runtime/python/okstra_ctl/model_io/references.py +370 -0
- package/runtime/python/okstra_ctl/model_io/renderers.py +498 -0
- package/runtime/python/okstra_ctl/model_io_cli.py +30 -945
- package/runtime/python/okstra_ctl/model_pool.py +10 -6
- package/runtime/python/okstra_ctl/models.py +8 -8
- package/runtime/python/okstra_ctl/mutation_recovery.py +5 -63
- package/runtime/python/okstra_ctl/next_phase.py +121 -69
- package/runtime/python/okstra_ctl/pane_reclaim.py +23 -0
- package/runtime/python/okstra_ctl/pane_title.py +11 -8
- package/runtime/python/okstra_ctl/path_hints.py +36 -11
- package/runtime/python/okstra_ctl/paths.py +76 -8
- package/runtime/python/okstra_ctl/plan_items.py +132 -16
- package/runtime/python/okstra_ctl/plan_items_cli.py +486 -36
- package/runtime/python/okstra_ctl/plan_run_root.py +1 -1
- package/runtime/python/okstra_ctl/plan_validate_cli.py +51 -0
- package/runtime/python/okstra_ctl/plan_verify_cli.py +80 -0
- package/runtime/python/okstra_ctl/prepare_error.py +20 -0
- package/runtime/python/okstra_ctl/prior_planning.py +157 -0
- package/runtime/python/okstra_ctl/profile_show.py +18 -1
- package/runtime/python/okstra_ctl/project_setup_cli.py +140 -0
- package/runtime/python/okstra_ctl/recap.py +22 -1
- package/runtime/python/okstra_ctl/reconcile.py +84 -0
- package/runtime/python/okstra_ctl/registry/host_registry.py +18 -1
- package/runtime/python/okstra_ctl/render.py +98 -32
- package/runtime/python/okstra_ctl/render_final_report.py +3 -7
- package/runtime/python/okstra_ctl/report_assembly.py +297 -7
- package/runtime/python/okstra_ctl/report_contract.py +30 -7
- package/runtime/python/okstra_ctl/report_finalize.py +206 -15
- package/runtime/python/okstra_ctl/report_html/common.py +2 -2
- package/runtime/python/okstra_ctl/report_html/render.py +8 -12
- package/runtime/python/okstra_ctl/report_language.py +8 -4
- package/runtime/python/okstra_ctl/report_narrative.py +90 -3
- package/runtime/python/okstra_ctl/report_projections.py +8 -2
- package/runtime/python/okstra_ctl/report_synthesis_packet.py +258 -1
- package/runtime/python/okstra_ctl/report_translation.py +2 -35
- package/runtime/python/okstra_ctl/report_views.py +4 -22
- package/runtime/python/okstra_ctl/resolve_task_key.py +13 -0
- package/runtime/python/okstra_ctl/rollup.py +13 -0
- package/runtime/python/okstra_ctl/run.py +639 -138
- package/runtime/python/okstra_ctl/run_audit.py +13 -0
- package/runtime/python/okstra_ctl/run_index_row.py +0 -12
- package/runtime/python/okstra_ctl/seeding.py +21 -11
- package/runtime/python/okstra_ctl/sequence.py +1 -1
- package/runtime/python/okstra_ctl/session.py +64 -14
- package/runtime/python/okstra_ctl/set_work_status.py +18 -0
- package/runtime/python/okstra_ctl/stage_integrate.py +15 -1
- package/runtime/python/okstra_ctl/stage_ledger.py +1 -1
- package/runtime/python/okstra_ctl/stage_map.py +57 -11
- package/runtime/python/okstra_ctl/stage_map_cli.py +83 -0
- package/runtime/python/okstra_ctl/stage_map_view.py +65 -0
- package/runtime/python/okstra_ctl/stage_targets.py +3 -12
- package/runtime/python/okstra_ctl/task_list_cli.py +138 -0
- package/runtime/python/okstra_ctl/task_show_cli.py +66 -0
- package/runtime/python/okstra_ctl/task_target.py +4 -16
- package/runtime/python/okstra_ctl/team.py +49 -2
- package/runtime/python/okstra_ctl/time_report.py +17 -2
- package/runtime/python/okstra_ctl/usage_report.py +11 -0
- package/runtime/python/okstra_ctl/user_response.py +55 -218
- package/runtime/python/okstra_ctl/user_response_values.py +242 -0
- package/runtime/python/okstra_ctl/validation_contract.py +3 -0
- package/runtime/python/okstra_ctl/verification_target.py +68 -0
- package/runtime/python/okstra_ctl/wizard.py +457 -92
- package/runtime/python/okstra_ctl/worker_artifacts.py +75 -16
- package/runtime/python/okstra_ctl/worker_audit_check.py +22 -0
- package/runtime/python/okstra_ctl/worker_dispatch.py +21 -0
- package/runtime/python/okstra_ctl/worker_liveness.py +33 -0
- package/runtime/python/okstra_ctl/worker_prompt_body.py +15 -2
- package/runtime/python/okstra_ctl/worker_prompt_contract.py +98 -7
- package/runtime/python/okstra_ctl/worker_prompt_headers.py +24 -2
- package/runtime/python/okstra_ctl/worker_prompt_policy.py +18 -3
- package/runtime/python/okstra_ctl/worker_request.py +2 -1
- package/runtime/python/okstra_ctl/worker_runner.py +16 -9
- package/runtime/python/okstra_ctl/worker_state.py +16 -1
- package/runtime/python/okstra_ctl/workflow.py +18 -1
- package/runtime/python/okstra_ctl/worktree/__init__.py +92 -0
- package/runtime/python/okstra_ctl/worktree/cleanliness.py +89 -0
- package/runtime/python/okstra_ctl/worktree/decisions.py +127 -0
- package/runtime/python/okstra_ctl/worktree/git_ops.py +165 -0
- package/runtime/python/okstra_ctl/worktree/linking.py +249 -0
- package/runtime/python/okstra_ctl/worktree/naming.py +91 -0
- package/runtime/python/okstra_ctl/worktree/provision.py +385 -0
- package/runtime/python/okstra_ctl/worktree/sync_config.py +181 -0
- package/runtime/python/okstra_ctl/worktree_cli.py +75 -0
- package/runtime/python/okstra_ctl/worktree_lookup_cli.py +39 -0
- package/runtime/python/okstra_ctl/worktree_registry.py +7 -0
- package/runtime/python/okstra_ctl/worktree_status_cli.py +53 -0
- package/runtime/python/okstra_ctl/write_policy.py +90 -213
- package/runtime/python/okstra_project/__init__.py +0 -4
- package/runtime/python/okstra_project/dirs.py +2 -2
- package/runtime/python/okstra_project/phase_pointer.py +84 -0
- package/runtime/python/okstra_project/slug.py +24 -0
- package/runtime/python/okstra_project/state.py +22 -230
- package/runtime/python/okstra_token_usage/claude.py +9 -1
- package/runtime/python/okstra_token_usage/cli.py +3 -1
- package/runtime/python/okstra_token_usage/collect.py +71 -10
- package/runtime/python/okstra_token_usage/cursor.py +2 -0
- package/runtime/python/okstra_token_usage/grok.py +1 -5
- package/runtime/python/okstra_token_usage/paths.py +26 -0
- package/runtime/python/okstra_token_usage/pricing.py +19 -7
- package/runtime/schemas/convergence-critic-results-v1.0.schema.json +5 -0
- package/runtime/schemas/execution-manifest-v2.schema.json +10 -10
- package/runtime/schemas/final-report-v2.0.schema.json +9 -26
- package/runtime/schemas/final-report-v3.0.schema.json +173 -41
- package/runtime/schemas/report-narrative-v3.0.schema.json +3 -2
- package/runtime/skills/okstra-brief-gen/SKILL.md +35 -2
- package/runtime/skills/okstra-container-build/SKILL.md +16 -47
- package/runtime/skills/okstra-inspect/facets/history.md +1 -1
- package/runtime/skills/okstra-inspect/facets/status.md +7 -6
- package/runtime/skills/okstra-pr-gen/SKILL.md +1 -1
- package/runtime/skills/okstra-run/SKILL.md +7 -5
- package/runtime/templates/report-writer-prompt-preamble.md +1 -1
- package/runtime/templates/reports/brief.template.md +6 -2
- package/runtime/templates/reports/error-analysis-input.template.md +2 -0
- package/runtime/templates/reports/final-verification-input.template.md +2 -0
- package/runtime/templates/reports/implementation-input.template.md +7 -1
- package/runtime/templates/reports/implementation-planning-input.template.md +4 -0
- package/runtime/templates/reports/quick-input.template.md +2 -0
- package/runtime/templates/reports/release-handoff-input.template.md +6 -1
- package/runtime/templates/reports/report.js +20 -3
- package/runtime/templates/reports/schedule.template.md +2 -0
- package/runtime/templates/reports/settings.template.json +0 -10
- package/runtime/templates/reports/task-brief.template.md +3 -0
- package/runtime/templates/reports/user-response.template.md +7 -3
- package/runtime/validators/checks/fixtures-01.py +57 -0
- package/runtime/validators/checks/fixtures-02.py +565 -0
- package/runtime/validators/checks/runners-01.py +108 -0
- package/runtime/validators/checks/validate-assets-01.py +60 -0
- package/runtime/validators/checks/validate-prompt-metadata-01.py +261 -0
- package/runtime/validators/checks/validate-tasks-01.py +46 -0
- package/runtime/validators/checks/validate-tasks-02.py +85 -0
- package/runtime/validators/checks/validate-tasks-03.py +61 -0
- package/runtime/validators/checks/validate-tasks-04.py +118 -0
- package/runtime/validators/forbidden_actions.py +73 -3
- package/runtime/validators/lib/common.sh +5 -0
- package/runtime/validators/lib/fixtures.sh +7 -591
- package/runtime/validators/lib/paths.sh +13 -0
- package/runtime/validators/lib/runners.sh +6 -104
- package/runtime/validators/lib/summary.sh +1 -1
- package/runtime/validators/lib/validate-assets.sh +6 -56
- package/runtime/validators/lib/validate-prompt-metadata.sh +6 -257
- package/runtime/validators/lib/validate-tasks.sh +9 -294
- package/runtime/validators/validate-implementation-plan-stages.py +4 -4
- package/runtime/validators/validate-run.py +1369 -2654
- package/runtime/validators/validate-workflow.sh +56 -16
- package/runtime/validators/validate_improvement_report.py +2 -1
- package/runtime/validators/validate_session_conformance.py +295 -49
- package/dist/commands/execute/agent-prompt.d.mts +0 -1
- package/dist/commands/execute/agent-prompt.mjs +0 -24
- package/dist/commands/execute/agent-prompt.mjs.map +0 -1
- package/dist/commands/execute/codex-dispatch.d.mts +0 -3
- package/dist/commands/execute/codex-dispatch.mjs +0 -6
- package/dist/commands/execute/codex-dispatch.mjs.map +0 -1
- package/dist/commands/execute/codex-run.d.mts +0 -3
- package/dist/commands/execute/codex-run.mjs +0 -62
- package/dist/commands/execute/codex-run.mjs.map +0 -1
- package/dist/commands/execute/convergence.d.mts +0 -1
- package/dist/commands/execute/convergence.mjs +0 -38
- package/dist/commands/execute/convergence.mjs.map +0 -1
- package/dist/commands/execute/error-log.d.mts +0 -1
- package/dist/commands/execute/error-log.mjs +0 -18
- package/dist/commands/execute/error-log.mjs.map +0 -1
- package/dist/commands/execute/git-reconcile.d.mts +0 -1
- package/dist/commands/execute/git-reconcile.mjs +0 -30
- package/dist/commands/execute/git-reconcile.mjs.map +0 -1
- package/dist/commands/execute/handoff.d.mts +0 -1
- package/dist/commands/execute/handoff.mjs +0 -31
- package/dist/commands/execute/handoff.mjs.map +0 -1
- package/dist/commands/execute/incremental-carry.d.mts +0 -1
- package/dist/commands/execute/incremental-carry.mjs +0 -20
- package/dist/commands/execute/incremental-carry.mjs.map +0 -1
- package/dist/commands/execute/incremental-scope.d.mts +0 -1
- package/dist/commands/execute/incremental-scope.mjs +0 -29
- package/dist/commands/execute/incremental-scope.mjs.map +0 -1
- package/dist/commands/execute/integrate-stages.d.mts +0 -1
- package/dist/commands/execute/integrate-stages.mjs +0 -24
- package/dist/commands/execute/integrate-stages.mjs.map +0 -1
- package/dist/commands/execute/pane-title.d.mts +0 -1
- package/dist/commands/execute/pane-title.mjs +0 -20
- package/dist/commands/execute/pane-title.mjs.map +0 -1
- package/dist/commands/execute/plan-items.d.mts +0 -1
- package/dist/commands/execute/plan-items.mjs +0 -9
- package/dist/commands/execute/plan-items.mjs.map +0 -1
- package/dist/commands/execute/plan-validate.d.mts +0 -1
- package/dist/commands/execute/plan-validate.mjs +0 -68
- package/dist/commands/execute/plan-validate.mjs.map +0 -1
- package/dist/commands/execute/plan-verify.d.mts +0 -1
- package/dist/commands/execute/plan-verify.mjs +0 -43
- package/dist/commands/execute/plan-verify.mjs.map +0 -1
- package/dist/commands/execute/spawn-followups.d.mts +0 -1
- package/dist/commands/execute/spawn-followups.mjs +0 -22
- package/dist/commands/execute/spawn-followups.mjs.map +0 -1
- package/dist/commands/execute/team.d.mts +0 -3
- package/dist/commands/execute/team.mjs +0 -66
- package/dist/commands/execute/team.mjs.map +0 -1
- package/dist/commands/execute/token-usage.d.mts +0 -1
- package/dist/commands/execute/token-usage.mjs +0 -19
- package/dist/commands/execute/token-usage.mjs.map +0 -1
- package/dist/commands/execute/worker-audit-check.d.mts +0 -1
- package/dist/commands/execute/worker-audit-check.mjs +0 -34
- package/dist/commands/execute/worker-audit-check.mjs.map +0 -1
- package/dist/commands/execute/worker-dispatch.d.mts +0 -7
- package/dist/commands/execute/worker-dispatch.mjs +0 -64
- package/dist/commands/execute/worker-dispatch.mjs.map +0 -1
- package/dist/commands/execute/worker-state.d.mts +0 -1
- package/dist/commands/execute/worker-state.mjs +0 -28
- package/dist/commands/execute/worker-state.mjs.map +0 -1
- package/dist/commands/execute/worktree-lookup.d.mts +0 -1
- package/dist/commands/execute/worktree-lookup.mjs +0 -92
- package/dist/commands/execute/worktree-lookup.mjs.map +0 -1
- package/dist/commands/execute/worktree-status.d.mts +0 -1
- package/dist/commands/execute/worktree-status.mjs +0 -121
- package/dist/commands/execute/worktree-status.mjs.map +0 -1
- package/dist/commands/inspect/code-review.d.mts +0 -1
- package/dist/commands/inspect/code-review.mjs +0 -32
- package/dist/commands/inspect/code-review.mjs.map +0 -1
- package/dist/commands/inspect/container.d.mts +0 -1
- package/dist/commands/inspect/container.mjs +0 -25
- package/dist/commands/inspect/container.mjs.map +0 -1
- package/dist/commands/inspect/context-cost.d.mts +0 -1
- package/dist/commands/inspect/context-cost.mjs +0 -25
- package/dist/commands/inspect/context-cost.mjs.map +0 -1
- package/dist/commands/inspect/design-prep.d.mts +0 -1
- package/dist/commands/inspect/design-prep.mjs +0 -22
- package/dist/commands/inspect/design-prep.mjs.map +0 -1
- package/dist/commands/inspect/error-report.d.mts +0 -1
- package/dist/commands/inspect/error-report.mjs +0 -25
- package/dist/commands/inspect/error-report.mjs.map +0 -1
- package/dist/commands/inspect/error-zip.d.mts +0 -1
- package/dist/commands/inspect/error-zip.mjs +0 -24
- package/dist/commands/inspect/error-zip.mjs.map +0 -1
- package/dist/commands/inspect/log-report.d.mts +0 -1
- package/dist/commands/inspect/log-report.mjs +0 -26
- package/dist/commands/inspect/log-report.mjs.map +0 -1
- package/dist/commands/inspect/model-io.d.mts +0 -1
- package/dist/commands/inspect/model-io.mjs +0 -25
- package/dist/commands/inspect/model-io.mjs.map +0 -1
- package/dist/commands/inspect/profile-show.d.mts +0 -1
- package/dist/commands/inspect/profile-show.mjs +0 -28
- package/dist/commands/inspect/profile-show.mjs.map +0 -1
- package/dist/commands/inspect/recap.d.mts +0 -1
- package/dist/commands/inspect/recap.mjs +0 -30
- package/dist/commands/inspect/recap.mjs.map +0 -1
- package/dist/commands/inspect/resolve-task-key.d.mts +0 -1
- package/dist/commands/inspect/resolve-task-key.mjs +0 -24
- package/dist/commands/inspect/resolve-task-key.mjs.map +0 -1
- package/dist/commands/inspect/rollup.d.mts +0 -1
- package/dist/commands/inspect/rollup.mjs +0 -25
- package/dist/commands/inspect/rollup.mjs.map +0 -1
- package/dist/commands/inspect/run-audit.d.mts +0 -1
- package/dist/commands/inspect/run-audit.mjs +0 -25
- package/dist/commands/inspect/run-audit.mjs.map +0 -1
- package/dist/commands/inspect/set-work-status.d.mts +0 -1
- package/dist/commands/inspect/set-work-status.mjs +0 -29
- package/dist/commands/inspect/set-work-status.mjs.map +0 -1
- package/dist/commands/inspect/stage-map.d.mts +0 -1
- package/dist/commands/inspect/stage-map.mjs +0 -131
- package/dist/commands/inspect/stage-map.mjs.map +0 -1
- package/dist/commands/inspect/task-list.d.mts +0 -1
- package/dist/commands/inspect/task-list.mjs +0 -149
- package/dist/commands/inspect/task-list.mjs.map +0 -1
- package/dist/commands/inspect/task-show.d.mts +0 -1
- package/dist/commands/inspect/task-show.mjs +0 -108
- package/dist/commands/inspect/task-show.mjs.map +0 -1
- package/dist/commands/inspect/time-report.d.mts +0 -1
- package/dist/commands/inspect/time-report.mjs +0 -24
- package/dist/commands/inspect/time-report.mjs.map +0 -1
- package/dist/commands/inspect/usage-report.d.mts +0 -1
- package/dist/commands/inspect/usage-report.mjs +0 -23
- package/dist/commands/inspect/usage-report.mjs.map +0 -1
- package/dist/commands/inspect/user-response.d.mts +0 -1
- package/dist/commands/inspect/user-response.mjs +0 -35
- package/dist/commands/inspect/user-response.mjs.map +0 -1
- package/dist/commands/inspect/worker-liveness.d.mts +0 -1
- package/dist/commands/inspect/worker-liveness.mjs +0 -45
- package/dist/commands/inspect/worker-liveness.mjs.map +0 -1
- package/dist/commands/lifecycle/contract-check.d.mts +0 -1
- package/dist/commands/lifecycle/contract-check.mjs +0 -18
- package/dist/commands/lifecycle/contract-check.mjs.map +0 -1
- package/dist/commands/lifecycle/migrate.d.mts +0 -1
- package/dist/commands/lifecycle/migrate.mjs +0 -30
- package/dist/commands/lifecycle/migrate.mjs.map +0 -1
- package/dist/commands/lifecycle/model.d.mts +0 -1
- package/dist/commands/lifecycle/model.mjs +0 -22
- package/dist/commands/lifecycle/model.mjs.map +0 -1
- package/dist/commands/manager.d.mts +0 -3
- package/dist/commands/manager.mjs +0 -50
- package/dist/commands/manager.mjs.map +0 -1
- package/dist/commands/report/agent-activity.d.mts +0 -1
- package/dist/commands/report/agent-activity.mjs +0 -20
- package/dist/commands/report/agent-activity.mjs.map +0 -1
- package/dist/commands/report/approval-decision.d.mts +0 -1
- package/dist/commands/report/approval-decision.mjs +0 -21
- package/dist/commands/report/approval-decision.mjs.map +0 -1
- package/dist/commands/report/design-snapshot.d.mts +0 -1
- package/dist/commands/report/design-snapshot.mjs +0 -19
- package/dist/commands/report/design-snapshot.mjs.map +0 -1
- package/dist/commands/report/finalize.d.mts +0 -4
- package/dist/commands/report/finalize.mjs +0 -64
- package/dist/commands/report/finalize.mjs.map +0 -1
- package/dist/commands/report/inject-report-index.d.mts +0 -1
- package/dist/commands/report/inject-report-index.mjs +0 -21
- package/dist/commands/report/inject-report-index.mjs.map +0 -1
- package/dist/commands/report/render-final-report.d.mts +0 -1
- package/dist/commands/report/render-final-report.mjs +0 -23
- package/dist/commands/report/render-final-report.mjs.map +0 -1
- package/dist/commands/report/render-views.d.mts +0 -1
- package/dist/commands/report/render-views.mjs +0 -27
- package/dist/commands/report/render-views.mjs.map +0 -1
- package/dist/commands/report/translate.d.mts +0 -1
- package/dist/commands/report/translate.mjs +0 -33
- package/dist/commands/report/translate.mjs.map +0 -1
- package/runtime/bin/lib/okstra/tmux-pane.sh +0 -40
- package/runtime/bin/lib/okstra-ctl/cmd-batch.sh +0 -59
- package/runtime/bin/lib/okstra-ctl/cmd-list.sh +0 -35
- package/runtime/bin/lib/okstra-ctl/cmd-open.sh +0 -36
- package/runtime/bin/lib/okstra-ctl/cmd-projects.sh +0 -26
- package/runtime/bin/lib/okstra-ctl/cmd-reconcile.sh +0 -29
- package/runtime/bin/lib/okstra-ctl/cmd-reindex.sh +0 -38
- package/runtime/bin/lib/okstra-ctl/cmd-rerun.sh +0 -345
- package/runtime/bin/lib/okstra-ctl/cmd-show.sh +0 -27
- package/runtime/bin/lib/okstra-ctl/cmd-tail.sh +0 -92
- package/runtime/bin/lib/okstra-ctl/main.sh +0 -41
- package/runtime/bin/lib/okstra-ctl/prepare.sh +0 -31
- package/runtime/bin/lib/okstra-ctl/usage.sh +0 -23
- package/runtime/bin/okstra-central.sh +0 -152
- package/runtime/bin/okstra-incremental-carry.py +0 -10
- package/runtime/bin/okstra-incremental-scope.py +0 -10
- package/runtime/bin/okstra-team-reconcile.sh +0 -36
- package/runtime/python/okstra_ctl/agent_prompt_cli.py +0 -1156
- package/runtime/python/okstra_ctl/batch.py +0 -60
- package/runtime/python/okstra_ctl/clarification_items.py +0 -1050
- package/runtime/python/okstra_ctl/container_registry.py +0 -72
- package/runtime/python/okstra_ctl/improvement_assignment.py +0 -61
- package/runtime/python/okstra_ctl/resolver.py +0 -54
- package/runtime/python/okstra_ctl/team_reconcile.py +0 -275
- package/runtime/python/okstra_ctl/tmux.py +0 -134
- package/runtime/python/okstra_ctl/worktree.py +0 -1099
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
# Coding Rules
|
|
2
|
+
|
|
3
|
+
Rules that hold for every file this repository authors. They exist because both failure modes below
|
|
4
|
+
have already shipped here, and both were invisible to the test suite at the time.
|
|
5
|
+
|
|
6
|
+
Two of these are enforced mechanically. The rest are review criteria and say so. A rule with no named
|
|
7
|
+
enforcement point is a wish, not a rule.
|
|
8
|
+
|
|
9
|
+
| Rule | Enforcement |
|
|
10
|
+
|---|---|
|
|
11
|
+
| R1 — No foreign source inside a string literal | `tests-js/coding-rules.test.mjs` (runs in `npm run check`) |
|
|
12
|
+
| R2 — No exception swallowed without a signal | `tests-js/coding-rules.test.mjs` |
|
|
13
|
+
| R3 — No untracked `TODO` / `FIXME` / `HACK` / `XXX` | `tests-js/coding-rules.test.mjs` |
|
|
14
|
+
| G1–G4 — Comment honesty | Code review. Not mechanical |
|
|
15
|
+
|
|
16
|
+
Scanner: [`tools/coding-rules.mjs`](../tools/coding-rules.mjs). Allowance ledger:
|
|
17
|
+
[`config/coding-rules-baseline.json`](../config/coding-rules-baseline.json).
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## How the enforcement works: a ratchet, not a wall
|
|
22
|
+
|
|
23
|
+
At the time these rules landed the repository already violated R1 in 138 places and R2 in 21. R3 stood at zero.
|
|
24
|
+
All three are at zero today, but the ratchet stays — it is what holds them there.
|
|
25
|
+
A rule that turns the whole repository red on day one never gets switched on. So the check is a ratchet.
|
|
26
|
+
|
|
27
|
+
- `config/coding-rules-baseline.json` records the per-file violation count at landing time.
|
|
28
|
+
- The test fails when a file's count **exceeds** its baseline entry, or when a file with no entry
|
|
29
|
+
gains a violation. New code is held to zero.
|
|
30
|
+
- The test also fails when a file's count **drops below** its baseline entry and the baseline was not
|
|
31
|
+
updated. Fixing a violation must tighten the ledger in the same commit. Without this half the
|
|
32
|
+
ratchet does not ratchet.
|
|
33
|
+
|
|
34
|
+
After removing violations:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
node tools/coding-rules.mjs --write-baseline
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Commit the regenerated baseline together with the fix. Never regenerate it to make a new violation pass —
|
|
41
|
+
that is the one use of the flag that defeats the rule.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## R1 — No foreign source inside a string literal
|
|
46
|
+
|
|
47
|
+
**A program written in language A must not carry the source of a program in language B inside a string
|
|
48
|
+
literal, heredoc, or template.**
|
|
49
|
+
|
|
50
|
+
### What it looks like
|
|
51
|
+
|
|
52
|
+
```js
|
|
53
|
+
// forbidden
|
|
54
|
+
const SCRIPT = `
|
|
55
|
+
import json, sys
|
|
56
|
+
from okstra_project import list_project_tasks
|
|
57
|
+
print(json.dumps(list_project_tasks(sys.argv[1])))
|
|
58
|
+
`;
|
|
59
|
+
await runPythonSnippet({ script: SCRIPT, args: [root] });
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# forbidden
|
|
64
|
+
python3 - "$PYTHONPATH" "$explicit" <<'PY'
|
|
65
|
+
from okstra_project import resolve_project_root
|
|
66
|
+
print(resolve_project_root(explicit_root=sys.argv[2]))
|
|
67
|
+
PY
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Why it is banned
|
|
71
|
+
|
|
72
|
+
Embedded source is invisible to every tool that would otherwise catch a defect in it. `tsc` sees a
|
|
73
|
+
string. `ruff` and `mypy` never open it. `pytest` cannot import it. Coverage reports it as one line.
|
|
74
|
+
The defect is not that the code is ugly — it is that **the code is unreachable by the checks the rest
|
|
75
|
+
of the repository relies on**, so a bug there survives a green `npm run check`.
|
|
76
|
+
|
|
77
|
+
Escapes are the second cost: `\\n` inside a template that becomes `\n` in the emitted program is a
|
|
78
|
+
class of bug that exists only because of the embedding.
|
|
79
|
+
|
|
80
|
+
### What to do instead
|
|
81
|
+
|
|
82
|
+
Put the code in a real file with the right extension, so its toolchain sees it, and call it by path or
|
|
83
|
+
module name.
|
|
84
|
+
|
|
85
|
+
```js
|
|
86
|
+
// allowed — the python lives in scripts/okstra_ctl/task_list_cli.py and is importable, testable, lintable
|
|
87
|
+
await runPythonModule({ module: "okstra_ctl.task_list_cli", args: [root] });
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Detected forms
|
|
91
|
+
|
|
92
|
+
| Pattern | Example |
|
|
93
|
+
|---|---|
|
|
94
|
+
| `py-heredoc` | `python3 - <<'PY'` |
|
|
95
|
+
| `py-dash-c` | `python3 -c "..."` |
|
|
96
|
+
| `py-arg-c` | `spawn("python3", ["-c", ...])` |
|
|
97
|
+
| `run-py-snippet` | `runPythonSnippet({ script: ... })` |
|
|
98
|
+
| `node-dash-e` | `node -e "..."` |
|
|
99
|
+
|
|
100
|
+
### Not covered by this rule
|
|
101
|
+
|
|
102
|
+
- Invoking a real command with arguments — `git rev-parse HEAD`, `python3 -m okstra_ctl.run --flag v`.
|
|
103
|
+
A module or file reference is not embedded source.
|
|
104
|
+
- Prompt and report templates under `prompts/` and `templates/`. They are read by humans and models,
|
|
105
|
+
never executed, and are not scanned.
|
|
106
|
+
- A fixture file whose *content* is foreign source, when the fixture is a real file on disk. Inline
|
|
107
|
+
fixture strings are still violations — write the fixture to a file.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## R2 — No exception swallowed without a signal
|
|
112
|
+
|
|
113
|
+
**A handler whose body neither re-raises, nor records the failure, nor returns a value the caller can
|
|
114
|
+
distinguish from success, must declare itself with an `expected-miss:` tag.**
|
|
115
|
+
|
|
116
|
+
### What it looks like
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
# forbidden — the row vanishes and nothing anywhere knows
|
|
120
|
+
try:
|
|
121
|
+
entry = json.loads(line)
|
|
122
|
+
except Exception:
|
|
123
|
+
pass
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
```js
|
|
127
|
+
// forbidden — same shape, and the comment makes it look considered
|
|
128
|
+
try {
|
|
129
|
+
entries.push(JSON.parse(line));
|
|
130
|
+
} catch {
|
|
131
|
+
// Drop the unparseable row.
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Why it is banned
|
|
136
|
+
|
|
137
|
+
A swallowed exception converts a defect into missing data. The program keeps running, the output is
|
|
138
|
+
wrong, and there is no line anywhere that says so. This is the most direct form of hiding a bug: the
|
|
139
|
+
evidence is destroyed at the moment it is produced.
|
|
140
|
+
|
|
141
|
+
The comment does not help. A comment is read by whoever opens the file; it is not read by the person
|
|
142
|
+
staring at output that is short by three rows.
|
|
143
|
+
|
|
144
|
+
### What to do instead
|
|
145
|
+
|
|
146
|
+
Pick one, in order of preference:
|
|
147
|
+
|
|
148
|
+
1. Let it propagate. If the caller cannot continue without the value, that is the correct behaviour.
|
|
149
|
+
2. Record it — a counter in the return value, a `stderr` line, an entry in the run error log
|
|
150
|
+
([`okstra error-log`](cli.md)). The caller can then report "3 rows skipped".
|
|
151
|
+
3. If the exception genuinely marks a non-error branch, say so with the tag:
|
|
152
|
+
|
|
153
|
+
```python
|
|
154
|
+
try:
|
|
155
|
+
(src_root / rel).stat()
|
|
156
|
+
except FileNotFoundError:
|
|
157
|
+
# expected-miss: 페이로드에 없는 파일 = orphan. 존재하지 않는 것이 정상 분기다.
|
|
158
|
+
orphans.append(rel)
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
The tag is what makes the check pass. Its purpose is to force the author to answer one question in
|
|
162
|
+
writing: *is this an error I am ignoring, or a branch that is not an error?* Those are different, and
|
|
163
|
+
a bare comment does not distinguish them.
|
|
164
|
+
|
|
165
|
+
An `expected-miss:` tag whose text does not name why the absence is normal is an R2 violation that
|
|
166
|
+
happened to get past the scanner. Reviewers reject it under G1.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## R3 — No untracked marker
|
|
171
|
+
|
|
172
|
+
**`TODO`, `FIXME`, `HACK`, `XXX` must carry a task reference or a URL on the same line, or be removed.**
|
|
173
|
+
|
|
174
|
+
```js
|
|
175
|
+
// forbidden
|
|
176
|
+
// TODO: handle the multi-stage case
|
|
177
|
+
|
|
178
|
+
// allowed
|
|
179
|
+
// TODO(dev-10174): handle the multi-stage case
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
A marker without a reference is a defect that has been noticed, recorded where no tracker will find it,
|
|
183
|
+
and left. Either it is worth tracking — then track it — or it is not, and the line should go.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## G1–G4 — Comment honesty (review criteria)
|
|
188
|
+
|
|
189
|
+
These are not mechanically checkable. They are rejection criteria in code review.
|
|
190
|
+
|
|
191
|
+
### G1 — A comment must not assert a property the code does not enforce
|
|
192
|
+
|
|
193
|
+
```python
|
|
194
|
+
# forbidden — nothing in this function makes that true
|
|
195
|
+
def load(path: str):
|
|
196
|
+
# path 는 항상 절대경로다
|
|
197
|
+
return json.loads(open(path).read())
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
If the property matters, enforce it (assert, validate, or type it). If it does not matter, delete the
|
|
201
|
+
sentence. A comment that states an unenforced invariant is worse than no comment: the next reader
|
|
202
|
+
writes code that depends on it.
|
|
203
|
+
|
|
204
|
+
### G2 — A comment must not justify a duplicate instead of removing it
|
|
205
|
+
|
|
206
|
+
A real example from this repository, since removed. `src/commands/lifecycle/config.mts` carried:
|
|
207
|
+
|
|
208
|
+
> "Mirror the python resolver order without depending on it … Python remains the source of truth at run
|
|
209
|
+
> time; this is informational."
|
|
210
|
+
|
|
211
|
+
The comment was accurate and the code was still wrong. Two implementations of one resolution order
|
|
212
|
+
existed, one of them declared non-authoritative, and nothing detected the day they disagreed. The
|
|
213
|
+
correct change is to call the authority, not to annotate the copy — which is what
|
|
214
|
+
[`project_setup_cli.py`](../scripts/okstra_ctl/project_setup_cli.py) now is: one resolution, called
|
|
215
|
+
from every entry point that used to keep its own copy.
|
|
216
|
+
|
|
217
|
+
If a duplicate is genuinely unavoidable, the comment must name the drift detector — the test that fails
|
|
218
|
+
when the two diverge. No detector, no duplicate.
|
|
219
|
+
|
|
220
|
+
### G3 — A comment must not stand in for a missing test
|
|
221
|
+
|
|
222
|
+
"이 경로는 테스트하기 어려워서 수동 확인함" records that a gap exists and closes the discussion. Write the
|
|
223
|
+
test, or record the gap where it will be triaged (R3 applies), but do not settle it in a comment.
|
|
224
|
+
|
|
225
|
+
### G4 — A comment must not argue that a known defect is acceptable
|
|
226
|
+
|
|
227
|
+
The pattern: a comment explains why the wrong behaviour is fine here. It is a review conversation
|
|
228
|
+
compressed into a line no reviewer will see again, and it converts a bug into a documented feature
|
|
229
|
+
without anyone deciding to.
|
|
230
|
+
|
|
231
|
+
Say what the code does and why it is built that way. Do not argue for it. If the defect is acceptable,
|
|
232
|
+
that is a decision, and decisions belong in
|
|
233
|
+
[`<PROJECT_ROOT>/.okstra/decisions/`](architecture/storage-model.md) or an ADR — somewhere with a date
|
|
234
|
+
and an owner.
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## What a good comment does
|
|
239
|
+
|
|
240
|
+
The rules above are all prohibitions, so state the positive form once. A comment earns its line when it
|
|
241
|
+
carries something the code cannot:
|
|
242
|
+
|
|
243
|
+
- **Why this and not the obvious alternative.** [`src/lib/python-helper.mts:99`](../src/lib/python-helper.mts:99)
|
|
244
|
+
explains that chunks are joined once because `s += chunk` is quadratic for large rendered prompts.
|
|
245
|
+
The code shows the how; only the comment shows the why.
|
|
246
|
+
- **A constraint that lives outside this file** — an upstream bug with a link, a host contract, a
|
|
247
|
+
protocol requirement.
|
|
248
|
+
- **A non-obvious consequence of an ordering.** Why this call must precede that one.
|
|
249
|
+
|
|
250
|
+
Repeating what the next line already says is filler. Delete it.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Applying these to existing code
|
|
255
|
+
|
|
256
|
+
The baseline is not a target to preserve. Its entries are the work list.
|
|
257
|
+
|
|
258
|
+
**All three rules are at zero.** R1 started at 138, R2 at 21, R3 at zero and stayed there. The baseline
|
|
259
|
+
file holds no entries; the ratchet now holds every file to zero.
|
|
260
|
+
|
|
261
|
+
R1 was cleared by moving the code into files, not by loosening the rule. 44 assertion blocks came out of
|
|
262
|
+
`tests-e2e/*.sh` and `validators/lib/*.sh` heredocs into `tests-e2e/checks/` and `validators/checks/`,
|
|
263
|
+
byte-for-byte — each carries a header naming the shell line that calls it. The recurring one-liners
|
|
264
|
+
collapsed into `tests-e2e/lib/jsonq.py`, which replaced the same three lines of JSON-field extraction in
|
|
265
|
+
eight places and, unlike the inline form, exits non-zero on a missing key instead of handing the shell an
|
|
266
|
+
empty string. The rest were one-offs given their own file: a branch name computed through
|
|
267
|
+
`compute_branch_name` rather than assembled by hand, an N+1 fixture, a provider stub's recorder.
|
|
268
|
+
|
|
269
|
+
Four sites were not embedded code at all — a docstring in `forbidden_actions.py` describing the very
|
|
270
|
+
forms the rule bans, a markdown census fixture, and this file's own examples. Those were reworded or
|
|
271
|
+
split so the source no longer carries the literal token while the runtime value stays the same. The
|
|
272
|
+
scanner reads source text and has no waiver syntax, so quoting a banned form costs a rewording. That is
|
|
273
|
+
the price of a rule with no exceptions, and it is cheap.
|
|
274
|
+
|
|
275
|
+
Two extractions surfaced a fragility the heredocs had been hiding: `tests-e2e/scenario-13` and `-14` name
|
|
276
|
+
the repo root rather than their own directory, and `validators/lib/*.sh` took its path from whichever
|
|
277
|
+
caller had sourced it. Both produced an unbound variable the moment the code moved out of the string.
|
|
278
|
+
The e2e completion marker caught the first pair; `validators/lib` now resolves `checks/` from its own
|
|
279
|
+
`BASH_SOURCE` so a lib file works whether the whole validator or one contract test sourced it.
|
|
280
|
+
|
|
281
|
+
**R2 was cleared the same week.** Every handler was one of two things, and the split is the point of the
|
|
282
|
+
rule:
|
|
283
|
+
|
|
284
|
+
- A real swallow, fixed by recording it. The malformed `LEAD_ASSIGNMENT_JSON` / `WORKER_ASSIGNMENTS_JSON`
|
|
285
|
+
fallbacks in `render.py` produced a *different* roster with no way for the caller to tell; `memory.mts`
|
|
286
|
+
dropped truncated index rows so a Memory Book came back short and looked complete; `report.js` swallowed
|
|
287
|
+
a refused clipboard copy, so the button read as broken. Each now names what it lost.
|
|
288
|
+
- A branch that is not an error, declared with `expected-miss:`. `worker_runner`'s `ProcessLookupError`
|
|
289
|
+
means the group it was about to kill already exited — that is success. `install.mts` uses `fs.access`
|
|
290
|
+
as an existence probe, so the throw *is* the answer.
|
|
291
|
+
|
|
292
|
+
Two handlers turned out to be both, and were split: reading a previous run's team-state
|
|
293
|
+
(`okstra_token_usage/collect.py`) treats a missing file as normal and a corrupt one as worth saying, and
|
|
294
|
+
the session-jsonl reader in `claude.py` does the same with `FileNotFoundError` against every other
|
|
295
|
+
`OSError`. Writing the tag forces that question, which is what the rule is for.
|
package/docs/container.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# okstra container — CLI Reference
|
|
2
2
|
|
|
3
|
-
> `okstra container` is a nonlinear tool that launches code from a verified task as a local docker compose group
|
|
3
|
+
> `okstra container` is a nonlinear tool that launches code from a verified task as a local docker compose group. Because it is a separate entry point from the phase flags in `okstra.sh`, it is documented here rather than in [cli.md](cli.md). See [project-structure-overview](project-structure-overview.md) §4.3 for the module location.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
|
9
|
-
- **What it is:** Deploys (`up`) the integrated code for a specific task to a task-specific docker compose container group
|
|
9
|
+
- **What it is:** Deploys (`up`) the integrated code for a specific task to a task-specific docker compose container group and manages the lifecycle through `status`/`down`.
|
|
10
10
|
- **Orchestration only (does not generate files):** **Reuses** the target project's existing `docker-compose.yml`. It does not generate configuration files; if `docker-compose.yml` is missing, it reports what is missing and stops (the same applies if only a `Dockerfile` exists).
|
|
11
11
|
- **Nonlinear:** This is not a phase in `PHASE_SEQUENCE`. Any task key can be launched regardless of whether it has passed verification.
|
|
12
12
|
- **Single entry point:** The `/okstra-container-build` skill, `bin okstra container`, and Python `okstra_ctl.container` all converge on [`scripts/okstra_ctl/container.py`](../scripts/okstra_ctl/container.py) and its `provision_container_group`.
|
|
13
|
-
- **Source of truth (SSOT) for container existence:** Docker labels.
|
|
13
|
+
- **Source of truth (SSOT) for container existence:** Docker labels.
|
|
14
14
|
|
|
15
15
|
## Prerequisites
|
|
16
16
|
|
|
@@ -21,16 +21,14 @@
|
|
|
21
21
|
## Command format
|
|
22
22
|
|
|
23
23
|
```
|
|
24
|
-
okstra container <up|status|
|
|
24
|
+
okstra container <up|status|down> --project-root <PATH> --task-key <KEY> [--text] [options]
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
| sub-command | Behavior | Additional options |
|
|
28
28
|
|---|---|---|
|
|
29
|
-
| `up` | Verify stage integration → validate `docker-compose.yml` → compose env override → `docker compose -p <project> up -d` → poll health checks
|
|
29
|
+
| `up` | Verify stage integration → validate `docker-compose.yml` → compose env override → `docker compose -p <project> up -d` → poll health checks | — |
|
|
30
30
|
| `status` | Show the live container group status by querying Docker labels | — |
|
|
31
|
-
| `
|
|
32
|
-
| `stop-watcher` | Stop the watcher panes for the task (containers remain running) | — |
|
|
33
|
-
| `down` | Tear down the container group and stop attached watchers | `--all` |
|
|
31
|
+
| `down` | Tear down the container group | `--all` |
|
|
34
32
|
|
|
35
33
|
## Arguments
|
|
36
34
|
|
|
@@ -40,15 +38,10 @@ Absolute path to the target project root. Required for every sub-command.
|
|
|
40
38
|
### `--task-key` (effectively required)
|
|
41
39
|
Identifier of the task to deploy, in the form `<project-id>:<task-group>:<task-id>`. The default is an empty string, but actual operations require a valid task key.
|
|
42
40
|
|
|
43
|
-
### `--service` (`logs` only)
|
|
44
|
-
`--service <NAME>` filters the returned watcher metadata by compose service name. When omitted, all registered watcher entries are returned; an unknown name produces an empty `watchers` object.
|
|
45
|
-
|
|
46
|
-
The actual `logs` output from `logs_container_group()` contains `watchersDir` and registered watcher entries in `watchers`. It does not run `docker compose logs` and does not stream Docker container logs. Inspect each watcher's `findings_path` and the files beneath `watchersDir` for monitoring results.
|
|
47
|
-
|
|
48
41
|
`--text` emits command-specific fixed labels for model-facing skills. Without it, the command preserves the full machine JSON bytes and exit codes.
|
|
49
42
|
|
|
50
43
|
### `--all` (`down` only)
|
|
51
|
-
|
|
44
|
+
Tear down **all** task container groups discovered under the current project root's `.okstra/` scope. Without `--all`, `down` tears down exactly the group named by `--task-key`.
|
|
52
45
|
|
|
53
46
|
## How `up` works
|
|
54
47
|
|
|
@@ -58,7 +51,6 @@ Clean up **all** task container groups and watchers within the current project r
|
|
|
58
51
|
4. **Compose env override** — In the okstra-owned worktree, layer task overrides over `.env`, write the result to `env.override`, and pass the files in the order `--env-file <worktree .env> --env-file <env.override>` (the latter takes precedence).
|
|
59
52
|
5. **Deploy** — Run `docker compose -p <project-name> ... up -d`. Obtain the service list from `docker compose config --services` (the canonical source).
|
|
60
53
|
6. **Poll health checks** — Use `docker compose ps` to verify that each service has started. Success means reaching healthy for services with a health check, or `running` for services without one.
|
|
61
|
-
7. **Start monitoring** — If `tmux` is available, start a tail pane and watcher agent for each container in the detached session `okstra-container-<slug>`. If it is unavailable, launch only the containers and state "monitoring disabled (tmux unavailable)" in the result.
|
|
62
54
|
|
|
63
55
|
### Fixed defaults (not currently exposed as CLI flags)
|
|
64
56
|
|
|
@@ -66,19 +58,9 @@ Clean up **all** task container groups and watchers within the current project r
|
|
|
66
58
|
|---|---|---|
|
|
67
59
|
| healthcheck timeout | 120 seconds | Stop and report services that failed to start after this limit |
|
|
68
60
|
| healthcheck interval | 3 seconds | Polling interval for `docker compose ps` |
|
|
69
|
-
| watcher scan interval | 5 seconds | Interval for scanning incremental watcher logs |
|
|
70
61
|
|
|
71
62
|
> These values exist as named arguments to `provision_container_group`, but because they are not exposed as CLI flags, they currently operate as fixed values.
|
|
72
63
|
|
|
73
|
-
## watcher (two-stage error trigger)
|
|
74
|
-
|
|
75
|
-
One watcher per container runs in the detached session.
|
|
76
|
-
|
|
77
|
-
1. **Lightweight scan** — Fetch incremental logs with `docker compose logs --since` and match only regular expressions (`ERROR`/`FATAL`/`Exception`/`Traceback`/abnormal exit codes, and so on). If there are no matches, proceed to the next interval without an LLM call → zero token cost during healthy periods.
|
|
78
|
-
2. **Deep analysis** — Only when a pattern is detected, the watcher AI analyzes the relevant log window and appends its findings to `findings.md`. Identical error signatures are debounced (meaningful numbers such as HTTP statuses and exit codes are preserved, while only noise such as timestamps and pids is normalized). The watcher **only detects and reports**; it does not modify code or configuration.
|
|
79
|
-
|
|
80
|
-
Watcher/tail panes carry only the dedicated `@okstra_container_run` tag and survive a Claude session ending — no session-end hook reclaims panes any more. Stop them with `stop-watcher` or `down`.
|
|
81
|
-
|
|
82
64
|
## Labels and artifacts
|
|
83
65
|
|
|
84
66
|
Three labels are attached to deployed containers. The label queries used by `status`/`down` use them to locate the group.
|
|
@@ -87,16 +69,14 @@ Three labels are attached to deployed containers. The label queries used by `sta
|
|
|
87
69
|
|---|---|
|
|
88
70
|
| `okstra.task-key` | `<project-id>:<task-group>:<task-id>` |
|
|
89
71
|
| `okstra.project-name` | compose project name `okstra-<proj>-<group>-<task>` |
|
|
90
|
-
| `okstra.run-trace` |
|
|
72
|
+
| `okstra.run-trace` | run-trace slug (`okstra-container-<slug>`) |
|
|
91
73
|
|
|
92
74
|
All okstra artifacts are stored under `<project-root>/.okstra/tasks/<group>/<task-id>/container/` (the original project files remain unchanged):
|
|
93
75
|
|
|
94
76
|
```
|
|
95
77
|
container/
|
|
96
78
|
├── env.override # per-task variables layered over the project .env
|
|
97
|
-
|
|
98
|
-
├── deploy-state.json # compose project name, running containers, labels
|
|
99
|
-
└── watchers/<service>-findings.md # per-watcher error analysis log
|
|
79
|
+
└── deploy-state.json # compose project name, running containers, labels
|
|
100
80
|
```
|
|
101
81
|
|
|
102
82
|
## Exit behavior/output
|
|
@@ -106,18 +86,12 @@ Each sub-command returns exit code 0 on success. `--text` writes its command-spe
|
|
|
106
86
|
## Usage examples
|
|
107
87
|
|
|
108
88
|
```bash
|
|
109
|
-
# Deploy
|
|
89
|
+
# Deploy
|
|
110
90
|
okstra container up --project-root /path/to/proj --task-key proj:auth:login-fix --text
|
|
111
91
|
|
|
112
92
|
# Status
|
|
113
93
|
okstra container status --project-root /path/to/proj --task-key proj:auth:login-fix
|
|
114
94
|
|
|
115
|
-
# Filter watcher metadata for one service
|
|
116
|
-
okstra container logs --project-root /path/to/proj --task-key proj:auth:login-fix --service api
|
|
117
|
-
|
|
118
|
-
# Stop only the watcher (keep containers running)
|
|
119
|
-
okstra container stop-watcher --project-root /path/to/proj --task-key proj:auth:login-fix
|
|
120
|
-
|
|
121
95
|
# Tear down the group
|
|
122
96
|
okstra container down --project-root /path/to/proj --task-key proj:auth:login-fix
|
|
123
97
|
|
|
@@ -7,7 +7,7 @@ Use this matrix before changing high-risk repo contracts. Update the source file
|
|
|
7
7
|
| Add CLI flag | `src/`, `scripts/okstra_ctl/run.py`, `docs/cli.md`, `prompts/wizard/` | JS CLI tests and pytest CLI contracts |
|
|
8
8
|
| Add Node subcommand | `src/cli-registry.mts`, `src/commands/`, `docs/cli.md`, `docs/project-structure-overview.md` | `tests-js/cli-registry.test.mjs` plus command-specific JS/Python tests |
|
|
9
9
|
| Add public skill | `src/lib/skill-catalog.mts`, `.claude-plugin/plugin.json`, `skills/<name>/SKILL.md`, `docs/for-ai/README.md`, `docs/project-structure-overview.md`, `README.md` | `tests-js/skill-catalog.test.mjs`, `tests/contract/test_docs_runtime_contract.py` |
|
|
10
|
-
| Change manager contract | `scripts/okstra_ctl/manager_*.py`, `
|
|
10
|
+
| Change manager contract | `scripts/okstra_ctl/manager_*.py`, `skills/okstra-manager/SKILL.md`, `docs/for-ai/skills/okstra-manager.md`, `docs/cli.md`, `docs/architecture/storage-model.md` | `tests-js/cli-wrapper-contract.test.mjs`, `tests/test_okstra_manager_*.py` |
|
|
11
11
|
| Add phase | `scripts/okstra_ctl/workflow.py`, `prompts/profiles/`, `validators/`, `tests/` | workflow and validation contract tests |
|
|
12
12
|
| Change worker roster | `prompts/profiles/*.md`, `scripts/okstra_ctl/workers.py`, `tests/contract/test_repo_contracts.py` | worker roster contract tests |
|
|
13
13
|
| Change report section | `schemas/final-report-v2.0.schema.json`, `templates/reports/final-report-v2.template.md`, `scripts/okstra_ctl/render_final_report.py`, `validators/validate-run.py` | final-report schema, renderer, and validator tests |
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
- Review calibration: [`skills/okstra-code-review/references/review-calibration.md`](../../../skills/okstra-code-review/references/review-calibration.md)
|
|
8
8
|
- Target core (CLI): [`scripts/okstra_ctl/code_review_target.py`](../../../scripts/okstra_ctl/code_review_target.py)
|
|
9
9
|
- Review path core: [`scripts/okstra_ctl/code_review_paths.py`](../../../scripts/okstra_ctl/code_review_paths.py)
|
|
10
|
-
- Node wrapper: [`src/commands/inspect/code-review.mjs`](../../../src/commands/inspect/code-review.mjs)
|
|
11
10
|
- Rules the review applies: [`prompts/coding-preflight/`](../../../prompts/coding-preflight/)
|
|
12
11
|
|
|
13
12
|
## Purpose
|
|
@@ -3,24 +3,21 @@
|
|
|
3
3
|
## Source
|
|
4
4
|
|
|
5
5
|
- Skill source: [`skills/okstra-container-build/SKILL.md`](../../../skills/okstra-container-build/SKILL.md)
|
|
6
|
-
- container CLI
|
|
6
|
+
- container CLI: [`scripts/okstra_ctl/container.py`](../../../scripts/okstra_ctl/container.py)
|
|
7
7
|
- container runtime: [`scripts/okstra_ctl/container.py`](../../../scripts/okstra_ctl/container.py)
|
|
8
|
-
- container registry: [`scripts/okstra_ctl/container_registry.py`](../../../scripts/okstra_ctl/container_registry.py)
|
|
9
8
|
- stage integration gate: [`scripts/okstra_ctl/stage_targets.py`](../../../scripts/okstra_ctl/stage_targets.py)
|
|
10
9
|
|
|
11
10
|
## Purpose
|
|
12
11
|
|
|
13
|
-
`okstra-container-build` manages a user-test container group using the `docker-compose.yml` in an implementation task worktree. okstra labels the compose group with the task/run trace
|
|
12
|
+
`okstra-container-build` manages a user-test container group using the `docker-compose.yml` in an implementation task worktree. okstra labels the compose group with the task/run trace so later sub-commands can find it.
|
|
14
13
|
|
|
15
14
|
## sub-command
|
|
16
15
|
|
|
17
16
|
| Sub-command | Role | side effect |
|
|
18
17
|
|---|---|---|
|
|
19
|
-
| `up` | Integrate the implementation stages into the task worktree, then `docker compose up -d`, poll healthchecks
|
|
20
|
-
| `status` | Check running containers (by label query)
|
|
21
|
-
| `
|
|
22
|
-
| `stop-watcher` | Reap the watcher/tail tmux panes only | keep containers, remove panes |
|
|
23
|
-
| `down` | Remove the container group by label query, reap orphan watcher panes | stop/remove containers |
|
|
18
|
+
| `up` | Integrate the implementation stages into the task worktree, then `docker compose up -d`, poll healthchecks | create/start containers |
|
|
19
|
+
| `status` | Check running containers (by label query) | read |
|
|
20
|
+
| `down` | Remove the container group by label query | stop/remove containers |
|
|
24
21
|
|
|
25
22
|
## Preflight
|
|
26
23
|
|
|
@@ -55,8 +52,6 @@ Clear verbs:
|
|
|
55
52
|
|
|
56
53
|
- "bring up/deploy", "up": `up`
|
|
57
54
|
- "status": `status`
|
|
58
|
-
- "logs": `logs`
|
|
59
|
-
- "stop watcher", "stop-watcher": `stop-watcher`
|
|
60
55
|
- "tear down", "down": `down`
|
|
61
56
|
|
|
62
57
|
If ambiguous, show the full facet list and offer an Enter directly option. When multiple facets are in one message, run Step 0 once and execute the sub-commands sequentially.
|
|
@@ -82,7 +77,7 @@ Handling failure messages:
|
|
|
82
77
|
- `final-verification(whole-task): stage N not done`: tell the user to finish that stage via implementation.
|
|
83
78
|
- healthcheck failure: relay the failing service and the `docker compose ... logs` line the CLI provides, verbatim.
|
|
84
79
|
|
|
85
|
-
On success, read the fixed `Service`
|
|
80
|
+
On success, read the fixed `Service` rows, then run the `status --text` command below and read its numbered container `ports` fields. Tell the user that management from here is via `okstra container status <task-key>` and `down <task-key>`. For *what to verify* once it is up, point to the implementation report's §5.7.9 Manual User Test (Draft) — those steps and expected results are the manual test script for this build.
|
|
86
81
|
|
|
87
82
|
## status
|
|
88
83
|
|
|
@@ -96,35 +91,8 @@ Fixed fields:
|
|
|
96
91
|
|
|
97
92
|
- `projectName`: compose project name
|
|
98
93
|
- `containers`: running containers found by run-trace label
|
|
99
|
-
- `watchers`: watcher metadata from the registry
|
|
100
94
|
|
|
101
|
-
The
|
|
102
|
-
|
|
103
|
-
## logs
|
|
104
|
-
|
|
105
|
-
Run:
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
okstra container logs --project-root <projectRoot> --task-key <task-key> --text
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
service scope:
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
okstra container logs --project-root <projectRoot> --task-key <task-key> --service <service> --text
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Show the fixed `Watchers dir` and numbered `Watchers` rows. The live stream is in the tmux watcher pane, not a file. If raw compose logs are needed, get `Project name` from `status`, then tell the user they can run `docker compose -p <projectName> logs -f <service>`.
|
|
118
|
-
|
|
119
|
-
## stop-watcher
|
|
120
|
-
|
|
121
|
-
Run:
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
okstra container stop-watcher --project-root <projectRoot> --task-key <task-key> --text
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
Remove only the watcher/tail panes and keep the containers. Summarize the fixed `Reaped panes` and `Note` rows. If the user actually intends to bring the containers down, route to `down`.
|
|
95
|
+
The label query is authoritative for whether it is alive. If `containers` is empty, say the group is not running and offer `up`. To follow a service's live logs, get `Project name` from `status`, then tell the user they can run `docker compose -p <projectName> logs -f <service>`.
|
|
128
96
|
|
|
129
97
|
## down
|
|
130
98
|
|
|
@@ -142,7 +110,7 @@ okstra container down --project-root <projectRoot> --all --text
|
|
|
142
110
|
|
|
143
111
|
A single-task down is fine to run after resolving the task-key. `--all` takes down every okstra container group in the project, so confirm with the user before running it.
|
|
144
112
|
|
|
145
|
-
Report the fixed `Downed`
|
|
113
|
+
Report the fixed `Downed` rows. Show each torn-down project name.
|
|
146
114
|
|
|
147
115
|
## Output rules
|
|
148
116
|
|
|
@@ -157,6 +125,5 @@ Report the fixed `Downed` and `Orphan panes reaped` rows. Show each project name
|
|
|
157
125
|
- Trying to start the Docker daemon yourself.
|
|
158
126
|
- Guessing the cause of an `up` failure and editing the compose file.
|
|
159
127
|
- Dressing up a partial-stage task as deployable.
|
|
160
|
-
- Judging a container as alive from the watcher registry alone.
|
|
161
128
|
- Running `down --all` without user confirmation.
|
|
162
129
|
- Overriding the CLI result arbitrarily with a raw docker query.
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
- Skill source: [`skills/okstra-inspect/SKILL.md`](../../../skills/okstra-inspect/SKILL.md)
|
|
6
6
|
- Facet bodies: `skills/okstra-inspect/facets/<sub-command>.md` — the skill is a thin core (preflight + dispatch + shared rules); each sub-command's full procedure is a lazily loaded facet file, guarded by `tests/contract/test_okstra_inspect_facets.py`
|
|
7
7
|
- CLI registry: [`src/cli-registry.mjs`](../../../src/cli-registry.mjs)
|
|
8
|
-
- context-cost CLI: `
|
|
9
|
-
- time-report CLI: `
|
|
10
|
-
- log-report CLI: `
|
|
11
|
-
- error-report CLI: `
|
|
8
|
+
- context-cost CLI: `scripts/okstra_ctl/context_cost.py`
|
|
9
|
+
- time-report CLI: `scripts/okstra_ctl/time_report.py`
|
|
10
|
+
- log-report CLI: `scripts/okstra_ctl/log_report.py`
|
|
11
|
+
- error-report CLI: `scripts/okstra_ctl/error_report.py`
|
|
12
12
|
- container is a separate skill: [`okstra-container-build.md`](okstra-container-build.md)
|
|
13
13
|
|
|
14
14
|
## Purpose
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# okstra-manager
|
|
2
2
|
|
|
3
|
-
Use this to bundle okstra tasks across multiple projects into a single manager-owned context. The authoritative contract is [`skills/okstra-manager/SKILL.md`](../../../skills/okstra-manager/SKILL.md); the CLI implementation is [`
|
|
3
|
+
Use this to bundle okstra tasks across multiple projects into a single manager-owned context. The authoritative contract is [`skills/okstra-manager/SKILL.md`](../../../skills/okstra-manager/SKILL.md); the CLI implementation is [`scripts/okstra_ctl/manager_cli.py`](../../../scripts/okstra_ctl/manager_cli.py).
|
|
4
4
|
|
|
5
5
|
## When to Use
|
|
6
6
|
|
|
@@ -60,7 +60,7 @@ A segment whose slug is empty (e.g. a non-ASCII task-group/task-id) uses a `u-<s
|
|
|
60
60
|
`task run` does not run the child work directly; it prepares a launch packet. The key fixed fields of the returned packet:
|
|
61
61
|
|
|
62
62
|
- `Task key`: the child's `project-id:task-group:task-id` (the public child-identity key — also recorded on the `child-launch-prepared` event)
|
|
63
|
-
- `Backend`:
|
|
63
|
+
- `Backend`: always `subagent-child-lead`
|
|
64
64
|
- `Worker dispatch backend`: always `subagent` in v1
|
|
65
65
|
- `Project root`: the child project root
|
|
66
66
|
- `Context path`: the manager child context markdown
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
- Skill source: [`skills/okstra-rollup/SKILL.md`](../../../skills/okstra-rollup/SKILL.md)
|
|
6
6
|
- aggregation core (CLI): [`scripts/okstra_ctl/rollup.py`](../../../scripts/okstra_ctl/rollup.py)
|
|
7
|
-
- Node wrapper: [`src/commands/inspect/rollup.mjs`](../../../src/commands/inspect/rollup.mjs)
|
|
8
7
|
- reused single-task aggregators: [`scripts/okstra_ctl/time_report.py`](../../../scripts/okstra_ctl/time_report.py), [`scripts/okstra_ctl/error_log_core.py`](../../../scripts/okstra_ctl/error_log_core.py)
|
|
9
8
|
- catalog enumeration helper: [`scripts/okstra_project/state.py`](../../../scripts/okstra_project/state.py) (`list_project_tasks`)
|
|
10
9
|
- unit tests: [`tests/inspect/test_okstra_rollup.py`](../../../tests/inspect/test_okstra_rollup.py)
|
|
@@ -213,7 +213,7 @@ Read the scope and path from the persist action of `okstra wizard outcome`, not
|
|
|
213
213
|
|
|
214
214
|
## Okstra lead takeover
|
|
215
215
|
|
|
216
|
-
After render-bundle, read
|
|
216
|
+
After render-bundle, read the run manifest's `resources.leadExecutionPromptPath` (project-relative, under `runs/<task-type>/prompts/`), read that file verbatim, and proceed from Phase 1 in that prompt's order. Before any in-run approval or clarification question, follow the lead contract "User confirmation before an approval blocker": read cited plan items, worker findings, and files, then ask in the user's language with each option's outcome.
|
|
217
217
|
|
|
218
218
|
Inform the user on one line.
|
|
219
219
|
|
|
@@ -221,7 +221,7 @@ Inform the user on one line.
|
|
|
221
221
|
Took over as Okstra lead (`<host-runtime>`) for `<taskKey>` (`<task-type>`). Run dir: `<RUN_DIR_RELATIVE_PATH>`. Beginning Phase 1 (context loading).
|
|
222
222
|
```
|
|
223
223
|
|
|
224
|
-
For a single-element chain, the end of Step 6 is the end of the run. Step 7 below applies only when the `chain-stages` CSV has 2 or more elements. When the run is over, close with the user's next action — one command they can run now. A prohibition is not a next action. After `implementation-planning`: open approval blockers → `/okstra-user-response`; a recorded `accept-risk` / `select` / `answer` is not an open blocker;
|
|
224
|
+
For a single-element chain, the end of Step 6 is the end of the run. Step 7 below applies only when the `chain-stages` CSV has 2 or more elements. When the run is over, close with the user's next action — one command they can run now. A prohibition is not a next action. Take it from the `report-finalize` result: `nextCommand` (`{command, note}`) is the table below already applied, and `nextRecommendedPhase` (`phase`, `status`, `rationale`) is what it was applied to — do not re-derive either from the report, and treat `nextRecommendedPhaseError` as "pointer unreadable", said in one line before the `validate-run` branch. After `implementation-planning`: open approval blockers → `/okstra-user-response`; a recorded `accept-risk` / `select` / `answer` is not an open blocker; no open approval blocker → `/okstra-run` → `implementation` or `--approve` (do not start another planning run; do not say `/okstra-inspect`). For every other task type: pointer `ready` → `/okstra-run` for that phase; `validate-run` failed → one-line cause then `/okstra-run`; otherwise `/okstra-inspect status`.
|
|
225
225
|
|
|
226
226
|
## implementation unattended chaining (chain-stages)
|
|
227
227
|
|
|
@@ -230,7 +230,7 @@ When `task-type == implementation` and the render-args `chain-stages` CSV has 2
|
|
|
230
230
|
1. Re-call render-bundle with the same arguments but `--stage N` (the base commit is auto-computed by prepare from the predecessor's done `head_commit` — do not pass it by hand). The `io`-only conformance waiver·concurrent-run·git-reconcile gates apply identically to each stage's render-bundle.
|
|
231
231
|
2. As in Step 6, become the host-native Okstra lead and run that stage's Phase 1–7 inline. Phase 6's lead persistence appends that stage's `status:"done"` row to `runs/<plan-task-key>/consumers.jsonl`.
|
|
232
232
|
3. After confirming the `done` row was written, move to the next stage. Clean up context (leftover panes·finished teammates) at each stage boundary. A `status:"failed"` row in place of `done` means the stage ended `FAIL` — stop the queue per the FAIL branch below.
|
|
233
|
-
4. One-line report at each stage start/finish: `stage N
|
|
233
|
+
4. One-line report at each stage start/finish: `stage N start` / `stage N done → next K`.
|
|
234
234
|
|
|
235
235
|
Once the whole queue is consumed, end the chain and report completion.
|
|
236
236
|
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
- Skill source: [`skills/okstra-user-response/SKILL.md`](../../../skills/okstra-user-response/SKILL.md)
|
|
6
6
|
- Response core: [`scripts/okstra_ctl/user_response.py`](../../../scripts/okstra_ctl/user_response.py)
|
|
7
|
-
- Node wrapper: [`src/commands/inspect/user-response.mts`](../../../src/commands/inspect/user-response.mts)
|
|
8
7
|
|
|
9
8
|
## Purpose
|
|
10
9
|
|
|
@@ -82,7 +82,7 @@ Therefore, "P1 convergence improvement" in this document does not change the tas
|
|
|
82
82
|
|
|
83
83
|
`prepare_task_bundle()` writes the instruction set and manifest-related files sequentially.
|
|
84
84
|
|
|
85
|
-
- Instruction set: `analysis-profile.md`, `analysis-material.md`, `task-brief.md`, optional carry-in/directive, `reference-expectations.md`, `final-report-template.md
|
|
85
|
+
- Instruction set: `analysis-profile.md`, `analysis-material.md`, `task-brief.md`, optional carry-in/directive, `reference-expectations.md`, `final-report-template.md`. The lead prompt is written separately, to `runs/<task-type>/prompts/lead-execution-prompt-<task-type>-<seq>.md`.
|
|
86
86
|
- Manifest/discovery: `team-state`, `task-manifest`, `task-index`, `run-manifest`, `timeline`, task catalog, and latest task.
|
|
87
87
|
|
|
88
88
|
This serial rendering has room for improvement, but it is generally cheaper than external worker dispatch. Render parallelization is therefore not the first priority.
|