okstra 0.202.0 → 0.205.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 +7 -6
- package/dist/cli-registry.mjs +7 -7
- package/dist/cli-registry.mjs.map +1 -1
- package/dist/commands/lifecycle/install.mjs +50 -124
- package/dist/commands/lifecycle/install.mjs.map +1 -1
- package/dist/commands/memory/memory.mjs +41 -8
- package/dist/commands/memory/memory.mjs.map +1 -1
- package/dist/lib/install-assets.mjs +3 -0
- package/dist/lib/install-assets.mjs.map +1 -1
- package/dist/lib/runtime-manifest.mjs +2 -1
- package/dist/lib/runtime-manifest.mjs.map +1 -1
- package/dist/lib/types.d.mts +2 -1
- package/docs/architecture/storage-model.md +14 -11
- package/docs/architecture.md +26 -20
- package/docs/cli.md +15 -12
- package/docs/contributor-change-matrix.md +3 -2
- package/docs/performance-improvement-plan-v2.md +3 -9
- package/docs/project-structure-overview.md +39 -11
- package/docs/task-process/README.md +1 -1
- package/docs/task-process/common-flow.md +1 -1
- package/docs/task-process/final-verification.md +3 -1
- package/docs/task-process/implementation-option-selection.md +1 -1
- package/docs/task-process/implementation.md +1 -1
- package/docs/task-process/release-handoff.md +36 -39
- package/package.json +1 -2
- package/runtime/BUILD.json +2 -2
- package/runtime/agents/common.json +28 -0
- package/runtime/agents/operations/code-review.json +6 -0
- package/runtime/agents/operations/report-translation.json +6 -0
- package/runtime/agents/operations/schedule-verification.json +6 -0
- package/runtime/agents/roles/analyser.json +18 -0
- package/runtime/agents/roles/critic.json +18 -0
- package/runtime/agents/roles/designer.json +18 -0
- package/runtime/agents/roles/implementer.json +20 -0
- package/runtime/agents/roles/leader.json +20 -0
- package/runtime/agents/roles/planner.json +18 -0
- package/runtime/agents/roles/report-writer.json +19 -0
- package/runtime/agents/roles/translator.json +19 -0
- package/runtime/agents/roles/verifier.json +18 -0
- package/runtime/bin/lib/okstra/usage.sh +5 -5
- package/runtime/prompts/duties/acceptance-critic.json +32 -0
- package/runtime/prompts/duties/acceptance-verifier.json +32 -0
- package/runtime/prompts/duties/analysis-worker.json +32 -0
- package/runtime/prompts/duties/code-reviewer.json +32 -0
- package/runtime/prompts/duties/diagnosis-worker.json +32 -0
- package/runtime/prompts/duties/direction-selection-worker.json +32 -0
- package/runtime/prompts/duties/discovery-worker.json +32 -0
- package/runtime/prompts/duties/implementation-executor.json +32 -0
- package/runtime/prompts/duties/implementation-verifier.json +32 -0
- package/runtime/prompts/duties/lead.json +32 -0
- package/runtime/prompts/duties/planning-worker.json +36 -0
- package/runtime/prompts/duties/report-writer.json +32 -0
- package/runtime/prompts/duties/reverification-worker.json +32 -0
- package/runtime/prompts/duties/schedule-verifier.json +32 -0
- package/runtime/prompts/duties/scope-critic.json +32 -0
- package/runtime/prompts/duties/technical-verification-worker.json +32 -0
- package/runtime/prompts/duties/translator.json +32 -0
- package/runtime/prompts/launch.template.md +2 -1
- package/runtime/prompts/lead/adapters/cmux.md +1 -1
- package/runtime/prompts/lead/convergence.md +4 -4
- package/runtime/prompts/lead/okstra-lead-contract.md +115 -6
- package/runtime/prompts/lead/plan-body-verification.md +6 -6
- package/runtime/prompts/lead/report-writer.md +3 -3
- package/runtime/prompts/profiles/_common-contract.md +2 -2
- package/runtime/prompts/profiles/_implementation-diff-review.md +1 -1
- package/runtime/prompts/profiles/_implementation-executor.md +4 -1
- package/runtime/prompts/profiles/_implementation-self-check.md +1 -1
- package/runtime/prompts/profiles/_implementation-verifier.md +2 -2
- package/runtime/prompts/profiles/change-impact-analysis.json +31 -0
- package/runtime/prompts/profiles/change-impact-analysis.md +0 -20
- package/runtime/prompts/profiles/error-analysis.json +39 -0
- package/runtime/prompts/profiles/error-analysis.md +0 -25
- package/runtime/prompts/profiles/feature-analysis.json +31 -0
- package/runtime/prompts/profiles/feature-analysis.md +0 -20
- package/runtime/prompts/profiles/final-verification.json +30 -0
- package/runtime/prompts/profiles/final-verification.md +4 -23
- package/runtime/prompts/profiles/forbidden-actions.json +4 -3
- package/runtime/prompts/profiles/implementation-option-selection.json +31 -0
- package/runtime/prompts/profiles/implementation-option-selection.md +0 -20
- package/runtime/prompts/profiles/implementation-planning.json +40 -0
- package/runtime/prompts/profiles/implementation-planning.md +4 -29
- package/runtime/prompts/profiles/implementation.json +30 -0
- package/runtime/prompts/profiles/implementation.md +1 -20
- package/runtime/prompts/profiles/improvement-discovery.json +31 -0
- package/runtime/prompts/profiles/improvement-discovery.md +0 -20
- package/runtime/prompts/profiles/project-analysis.json +31 -0
- package/runtime/prompts/profiles/project-analysis.md +0 -20
- package/runtime/prompts/profiles/release-handoff.json +5 -0
- package/runtime/prompts/profiles/release-handoff.md +74 -74
- package/runtime/prompts/profiles/requirements-discovery.json +39 -0
- package/runtime/prompts/profiles/requirements-discovery.md +0 -25
- package/runtime/prompts/profiles/technical-verification.json +39 -0
- package/runtime/prompts/profiles/technical-verification.md +0 -25
- package/runtime/prompts/wizard/prompts.ko.json +14 -18
- package/runtime/python/okstra_ctl/adapters/hosts/antigravity/relay.md +1 -0
- package/runtime/python/okstra_ctl/adapters/hosts/claude-code/adapter.py +3 -0
- package/runtime/python/okstra_ctl/adapters/hosts/claude-code/manifest.json +1 -1
- package/runtime/python/okstra_ctl/adapters/hosts/claude-code/relay.md +4 -3
- package/runtime/python/okstra_ctl/adapters/hosts/claude-code/worker-session.md +108 -0
- package/runtime/python/okstra_ctl/adapters/hosts/codex/relay.md +1 -0
- package/runtime/python/okstra_ctl/adapters/hosts/grok/relay.md +2 -0
- package/runtime/python/okstra_ctl/adapters/hosts/kimi/relay.md +2 -0
- package/runtime/python/okstra_ctl/adapters/providers/antigravity/adapter.py +8 -1
- package/runtime/python/okstra_ctl/adapters/providers/claude/adapter.py +8 -0
- package/runtime/python/okstra_ctl/adapters/providers/codex/adapter.py +23 -6
- package/runtime/python/okstra_ctl/adapters/providers/grok/adapter.py +6 -2
- package/runtime/python/okstra_ctl/agent/invocation.py +168 -113
- package/runtime/python/okstra_ctl/agent/prompt_cli/cli.py +120 -0
- package/runtime/python/okstra_ctl/agent/prompt_cli/materialize.py +107 -2
- package/runtime/python/okstra_ctl/agent/prompt_cli/run_identity.py +0 -49
- package/runtime/python/okstra_ctl/analysis_packet.py +4 -1
- package/runtime/python/okstra_ctl/application/open_worker.py +6 -1
- package/runtime/python/okstra_ctl/assignment_resolver.py +16 -5
- package/runtime/python/okstra_ctl/cmux.py +69 -20
- package/runtime/python/okstra_ctl/code_review_target.py +16 -8
- package/runtime/python/okstra_ctl/conformance.py +43 -0
- package/runtime/python/okstra_ctl/consumers.py +23 -8
- package/runtime/python/okstra_ctl/container.py +31 -8
- package/runtime/python/okstra_ctl/context_cost.py +11 -15
- package/runtime/python/okstra_ctl/contract_refreeze.py +156 -0
- package/runtime/python/okstra_ctl/convergence_engine.py +38 -0
- package/runtime/python/okstra_ctl/convergence_provenance.py +7 -1
- package/runtime/python/okstra_ctl/design_prep.py +34 -1
- package/runtime/python/okstra_ctl/dispatch_core.py +53 -27
- package/runtime/python/okstra_ctl/domain/host.py +5 -0
- package/runtime/python/okstra_ctl/domain/worker_runtime.py +10 -0
- package/runtime/python/okstra_ctl/error_report.py +4 -3
- package/runtime/python/okstra_ctl/execution_manifest.py +71 -18
- package/runtime/python/okstra_ctl/handoff.py +384 -286
- package/runtime/python/okstra_ctl/handoff_verification.py +25 -6
- package/runtime/python/okstra_ctl/implementation_stage.py +9 -0
- package/runtime/python/okstra_ctl/initial_prompt_materialization.py +113 -0
- package/runtime/python/okstra_ctl/lead_progress.py +1 -1
- package/runtime/python/okstra_ctl/legacy_model_selection.py +2 -2
- package/runtime/python/okstra_ctl/manager_cli.py +92 -4
- package/runtime/python/okstra_ctl/manager_launch.py +1 -1
- package/runtime/python/okstra_ctl/manager_paths.py +14 -3
- package/runtime/python/okstra_ctl/manager_store.py +210 -3
- package/runtime/python/okstra_ctl/manager_sync.py +4 -1
- package/runtime/python/okstra_ctl/manager_view.py +2 -1
- package/runtime/python/okstra_ctl/model_discovery.py +30 -0
- package/runtime/python/okstra_ctl/model_io/lines.py +14 -1
- package/runtime/python/okstra_ctl/model_io/renderers.py +4 -3
- package/runtime/python/okstra_ctl/models.py +1 -1
- package/runtime/python/okstra_ctl/next_phase.py +16 -6
- package/runtime/python/okstra_ctl/operation_invocation.py +86 -0
- package/runtime/python/okstra_ctl/option_comparison.py +168 -0
- package/runtime/python/okstra_ctl/path_hints.py +9 -0
- package/runtime/python/okstra_ctl/paths.py +3 -0
- package/runtime/python/okstra_ctl/profile_show.py +42 -1
- package/runtime/python/okstra_ctl/registry/host_discovery.py +20 -12
- package/runtime/python/okstra_ctl/registry/host_registry.py +11 -0
- package/runtime/python/okstra_ctl/render.py +79 -0
- package/runtime/python/okstra_ctl/report_contract.py +1 -1
- package/runtime/python/okstra_ctl/report_html/view_models/release_handoff.py +21 -3
- package/runtime/python/okstra_ctl/report_synthesis_packet.py +177 -17
- package/runtime/python/okstra_ctl/report_translation.py +2 -1
- package/runtime/python/okstra_ctl/report_translation_dispatch.py +69 -9
- package/runtime/python/okstra_ctl/role_requirements.py +142 -129
- package/runtime/python/okstra_ctl/rollup.py +3 -1
- package/runtime/python/okstra_ctl/run.py +76 -29
- package/runtime/python/okstra_ctl/schedule_semantics.py +17 -6
- package/runtime/python/okstra_ctl/stage_fix_carry.py +23 -4
- package/runtime/python/okstra_ctl/stage_integrate.py +178 -18
- package/runtime/python/okstra_ctl/stage_map.py +16 -2
- package/runtime/python/okstra_ctl/stage_targets.py +209 -43
- package/runtime/python/okstra_ctl/team.py +22 -13
- package/runtime/python/okstra_ctl/time_report.py +2 -1
- package/runtime/python/okstra_ctl/usage_report.py +3 -1
- package/runtime/python/okstra_ctl/wizard/confirmation.py +3 -9
- package/runtime/python/okstra_ctl/wizard/ids.py +1 -1
- package/runtime/python/okstra_ctl/wizard/registry.py +1 -1
- package/runtime/python/okstra_ctl/wizard/state.py +3 -5
- package/runtime/python/okstra_ctl/wizard/steps_plan.py +12 -21
- package/runtime/python/okstra_ctl/worker_prompt_contract.py +5 -1
- package/runtime/python/okstra_ctl/worker_prompt_headers.py +35 -7
- package/runtime/python/okstra_ctl/worker_prompt_policy.py +66 -48
- package/runtime/python/okstra_ctl/workflow.py +1 -1
- package/runtime/python/okstra_ctl/worktree/__init__.py +3 -1
- package/runtime/python/okstra_ctl/worktree/naming.py +9 -0
- package/runtime/python/okstra_ctl/worktree_registry.py +38 -9
- package/runtime/python/okstra_token_usage/pricing.py +6 -4
- package/runtime/schemas/agent-common-v1.schema.json +34 -0
- package/runtime/schemas/agent-duty-v1.schema.json +38 -0
- package/runtime/schemas/agent-operation-v1.schema.json +11 -0
- package/runtime/schemas/agent-profile-v1.schema.json +46 -0
- package/runtime/schemas/agent-role-v1.schema.json +29 -0
- package/runtime/schemas/final-report-v2.0.schema.json +118 -97
- package/runtime/schemas/final-report-v3.0.schema.json +118 -97
- package/runtime/skills/okstra-brief-gen/SKILL.md +84 -4
- package/runtime/skills/okstra-chat/SKILL.md +2 -2
- package/runtime/skills/okstra-code-review/SKILL.md +23 -9
- package/runtime/skills/okstra-container-build/SKILL.md +10 -10
- package/runtime/skills/okstra-inspect/SKILL.md +1 -1
- package/runtime/skills/okstra-inspect/facets/cost.md +1 -1
- package/runtime/skills/okstra-inspect/facets/error-zip.md +9 -9
- package/runtime/skills/okstra-inspect/facets/errors.md +16 -16
- package/runtime/skills/okstra-inspect/facets/logs.md +7 -7
- package/runtime/skills/okstra-inspect/facets/recap.md +2 -2
- package/runtime/skills/okstra-inspect/facets/report.md +1 -1
- package/runtime/skills/okstra-inspect/facets/status.md +4 -3
- package/runtime/skills/okstra-inspect/facets/time.md +11 -10
- package/runtime/skills/okstra-manager/SKILL.md +18 -2
- package/runtime/skills/okstra-pr-gen/SKILL.md +6 -5
- package/runtime/skills/okstra-rollup/SKILL.md +5 -5
- package/runtime/skills/okstra-run/SKILL.md +31 -12
- package/runtime/skills/okstra-schedule-gen/SKILL.md +19 -14
- package/runtime/skills/okstra-setup/SKILL.md +12 -10
- package/runtime/skills/okstra-setup/references/project-config.md +7 -6
- package/runtime/skills/okstra-usage/SKILL.md +1 -1
- package/runtime/skills/okstra-user-response/SKILL.md +1 -1
- package/runtime/templates/manager/view.template.html +1 -0
- package/runtime/templates/report-writer-prompt-preamble.md +8 -0
- package/runtime/templates/reports/brief.template.md +14 -4
- package/runtime/templates/reports/html/i18n/en.json +5 -4
- package/runtime/templates/reports/html/i18n/ko.json +5 -4
- package/runtime/templates/reports/html/tasks/release-handoff.template.html +8 -5
- package/runtime/templates/reports/i18n/en.json +1 -1
- package/runtime/templates/reports/md/tasks/release-handoff.template.md +1 -1
- package/runtime/templates/reports/release-handoff-input.template.md +6 -4
- package/runtime/templates/translator-prompt-preamble.md +36 -0
- package/runtime/validators/checks/validate-assets-01.py +7 -8
- package/runtime/validators/validate-brief.py +70 -0
- package/runtime/validators/validate-implementation-plan-stages.py +2 -1
- package/runtime/validators/validate-run.py +72 -15
- package/runtime/validators/validate-schedule.py +9 -0
- package/docs/for-ai/README.md +0 -68
- package/docs/for-ai/skills/okstra-brief-gen.md +0 -262
- package/docs/for-ai/skills/okstra-chat.md +0 -34
- package/docs/for-ai/skills/okstra-code-review.md +0 -57
- package/docs/for-ai/skills/okstra-container-build.md +0 -129
- package/docs/for-ai/skills/okstra-inspect.md +0 -262
- package/docs/for-ai/skills/okstra-manager.md +0 -86
- package/docs/for-ai/skills/okstra-memory.md +0 -126
- package/docs/for-ai/skills/okstra-pr-gen.md +0 -49
- package/docs/for-ai/skills/okstra-rollup.md +0 -114
- package/docs/for-ai/skills/okstra-run.md +0 -250
- package/docs/for-ai/skills/okstra-schedule-gen.md +0 -240
- package/docs/for-ai/skills/okstra-setup.md +0 -167
- package/docs/for-ai/skills/okstra-usage.md +0 -29
- package/docs/for-ai/skills/okstra-user-response.md +0 -72
- package/runtime/agents/workers/claude-worker.md +0 -128
- package/runtime/agents/workers/report-writer-worker.md +0 -37
- package/runtime/agents/workers/translator-worker.md +0 -63
- package/runtime/prompts/duties/acceptance-critic.md +0 -44
- package/runtime/prompts/duties/acceptance-verifier.md +0 -44
- package/runtime/prompts/duties/analysis-worker.md +0 -44
- package/runtime/prompts/duties/code-reviewer.md +0 -44
- package/runtime/prompts/duties/common.md +0 -39
- package/runtime/prompts/duties/diagnosis-worker.md +0 -44
- package/runtime/prompts/duties/direction-selection-worker.md +0 -44
- package/runtime/prompts/duties/discovery-worker.md +0 -44
- package/runtime/prompts/duties/implementation-executor.md +0 -44
- package/runtime/prompts/duties/implementation-verifier.md +0 -44
- package/runtime/prompts/duties/lead.md +0 -44
- package/runtime/prompts/duties/planning-worker.md +0 -52
- package/runtime/prompts/duties/report-writer.md +0 -44
- package/runtime/prompts/duties/reverification-worker.md +0 -44
- package/runtime/prompts/duties/schedule-verifier.md +0 -44
- package/runtime/prompts/duties/scope-critic.md +0 -44
- package/runtime/prompts/duties/technical-verification-worker.md +0 -44
- package/runtime/prompts/duties/translator.md +0 -44
- package/runtime/python/okstra_ctl/pane_title.py +0 -154
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
# okstra-brief-gen AI Manual
|
|
2
|
-
|
|
3
|
-
## Source
|
|
4
|
-
|
|
5
|
-
- Skill source: [`skills/okstra-brief-gen/SKILL.md`](../../../skills/okstra-brief-gen/SKILL.md)
|
|
6
|
-
- brief template: [`templates/reports/brief.template.md`](../../../templates/reports/brief.template.md)
|
|
7
|
-
- brief validator: [`validators/validate-brief.py`](../../../validators/validate-brief.py)
|
|
8
|
-
- lens enum SSOT: [`scripts/okstra_ctl/improvement_lenses.py`](../../../scripts/okstra_ctl/improvement_lenses.py)
|
|
9
|
-
|
|
10
|
-
## Purpose
|
|
11
|
-
|
|
12
|
-
`okstra-brief-gen` produces a task brief to feed into the okstra pipeline. A brief is a pre-discovery artifact. It is not a document that turns requirements into an implementation plan; it is a handoff document that separates the reporter's verbatim material from the AI-verified evidence/interpretation using labels, so the next phase can start without questions.
|
|
13
|
-
|
|
14
|
-
Output location:
|
|
15
|
-
|
|
16
|
-
```text
|
|
17
|
-
<PROJECT_ROOT>/.okstra/briefs/<task-group>/<brief-id>.md
|
|
18
|
-
<PROJECT_ROOT>/.okstra/briefs/<task-group>/sub/.../<brief-id>.md
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Three variants
|
|
22
|
-
|
|
23
|
-
| Variant | Input | Recommended next phase |
|
|
24
|
-
|---|---|---|
|
|
25
|
-
| Reporter input | files, tickets, URLs, conversation/free text | `requirements-discovery` or `error-analysis` |
|
|
26
|
-
| Codebase scan | scan scope, priority lenses, candidate cap, context | `improvement-discovery` |
|
|
27
|
-
| Error feedback | a single error cluster from the zip produced by `okstra error-zip` | `error-analysis` |
|
|
28
|
-
|
|
29
|
-
## Core invariants
|
|
30
|
-
|
|
31
|
-
1. Source Material is a verbatim-preservation area. Do not paraphrase, summarize, or reorder.
|
|
32
|
-
2. The AI's interpretation, file links, terminology mapping, and format conversion all go under `Augmentation` or a `> augmented:` blockquote.
|
|
33
|
-
3. An augmentation carries one of four labels: `evidence-link`, `format-conversion`, `terminology-mapping`, `intent-inference`.
|
|
34
|
-
4. `intent-inference` is paired with `intent-check:` in `Open Questions`. This relationship is checked by `validators/validate-brief.py`.
|
|
35
|
-
5. A `terminology-mapping` augmentation is paired with `terminology:` in `Open Questions` (validator-checked). Exception: the Step 4.5 result markers `applied glossary:` / `skipped glossary:` need no paired row.
|
|
36
|
-
6. Questions only the reporter can answer are collected in Step 6.5 and recorded verbatim under `## Reporter Confirmations`.
|
|
37
|
-
7. Ticket split/link/order relations go in the structured table of `## Related Task Graph`. Do not infer work order from parent-id alone.
|
|
38
|
-
8. Every okstra-owned write stays inside `<PROJECT_ROOT>/.okstra/`. External files are read only when the reporter explicitly cited them as source.
|
|
39
|
-
9. Every row in `Open Questions` starts with one of five prefixes: `general:`, `terminology:`, `intent-check:`, `conversion-block:`, `adr-candidate:` (validator-enforced). `adr-candidate:` is only a signal — the decision file is written by `implementation-planning` into `<PROJECT_ROOT>/.okstra/decisions/`.
|
|
40
|
-
|
|
41
|
-
## Preflight
|
|
42
|
-
|
|
43
|
-
Run as a single call.
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
okstra preflight --runtime claude-code
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
On `Okstra preflight: ready`, carry the fixed `Project root` line. On
|
|
50
|
-
`Okstra preflight: failed`, show `Reason` and `Recovery`, then stop. This skill
|
|
51
|
-
does not use an `npx` fallback.
|
|
52
|
-
|
|
53
|
-
## Input collection
|
|
54
|
-
|
|
55
|
-
### Reporter input
|
|
56
|
-
|
|
57
|
-
More than one source type is allowed, but each source is stored as a separate block under `Source Material`.
|
|
58
|
-
|
|
59
|
-
- File: read the entire file and insert it as-is.
|
|
60
|
-
- Issue tracker ticket: detect Linear/Jira/GitHub/Notion and use MCP or the `gh` CLI. If no access tool is available, ask the user to paste the body or skip.
|
|
61
|
-
- Link URL: fetch it. On failure / login wall / body truncation, ask the user to paste.
|
|
62
|
-
- User input: if conversation context is sufficient, use conversation synthesis; if thin, take a single free-text input.
|
|
63
|
-
|
|
64
|
-
If a ticket has children/sub-tasks, ask once at the parent how to handle the tree.
|
|
65
|
-
|
|
66
|
-
- Full tree: generate a brief per descendant.
|
|
67
|
-
- Parent only: put child keys/URLs in Related Artifacts and leave a `parent-of` edge in `Related Task Graph`.
|
|
68
|
-
- Selected: recurse only into the chosen direct-child branch.
|
|
69
|
-
|
|
70
|
-
During recursion, manage the visited set as `<tracker>:<ticket-id>`, and on re-run reseed from the existing brief frontmatter's `ticket-id` + `source-type`.
|
|
71
|
-
When Full tree or Selected produces multiple briefs, copy the same `Related Task Graph` into every generated brief. That way, even if only one child brief is passed to a downstream phase, the split topology, predecessor/successor relations, and de-duplication signals are preserved.
|
|
72
|
-
|
|
73
|
-
`Related Task Graph` table schema:
|
|
74
|
-
|
|
75
|
-
| Column | Meaning |
|
|
76
|
-
|---|---|
|
|
77
|
-
| From | task key, brief id, tracker id, or URL |
|
|
78
|
-
| Relation | `parent-of`, `child-of`, `depends-on`, `blocks`, `blocked-by`, `follow-up-of`, `split-from`, `duplicates`, `related-to` |
|
|
79
|
-
| To | task key, brief id, tracker id, or URL |
|
|
80
|
-
| Direction | `directed` or `undirected` |
|
|
81
|
-
| Source | tracker linked issue, task-list checkbox, reporter statement, manual split, prior okstra task |
|
|
82
|
-
| Impact | meaning the downstream phase must preserve |
|
|
83
|
-
|
|
84
|
-
`depends-on`, `blocks`, parent/child, follow-up, and split relations are `directed`. `duplicates` and `related-to` are `undirected`. Do not create a relation with no source.
|
|
85
|
-
|
|
86
|
-
### Codebase scan
|
|
87
|
-
|
|
88
|
-
Collected values:
|
|
89
|
-
|
|
90
|
-
- `scan_scope`: a list of real paths inside the project.
|
|
91
|
-
- `priority_lenses`: 1–4 of the `LENSES` enum.
|
|
92
|
-
- `out_of_scope`: optional.
|
|
93
|
-
- `candidate_cap`: 1–12, default 8.
|
|
94
|
-
- context, desired outcome, constraints.
|
|
95
|
-
|
|
96
|
-
Verify path existence, the lens enum subset, and the candidate-cap range before writing. Final validation is done by `validate-brief.py`, which checks `scope: codebase`, `Scan Scope`, and `Priority Lenses`.
|
|
97
|
-
|
|
98
|
-
### Error feedback
|
|
99
|
-
|
|
100
|
-
The input is the zip produced by `okstra error-zip --out <path>`.
|
|
101
|
-
|
|
102
|
-
Processing:
|
|
103
|
-
|
|
104
|
-
1. Confirm the zip contains `report.md` and `errors/anonymized.jsonl`.
|
|
105
|
-
2. Pick exactly one cluster from the frequent-cluster table.
|
|
106
|
-
3. Move only the chosen cluster's anonymized records into Source Material.
|
|
107
|
-
4. Do not mix different errorTypes into one brief.
|
|
108
|
-
5. Set the next-step guidance to `error-analysis`.
|
|
109
|
-
|
|
110
|
-
## task-group and filename
|
|
111
|
-
|
|
112
|
-
For task-group, show existing-group recommendations first. Call `okstra task-list --text`, read the distinct fixed `Task group` values in `Updated at` order, and offer the 2 most recent + enter-directly. If `Status` is `error`, report `Failure stage` and `Failure reason`, then stop. If `Task count` is `0`, ask for free text. In tracker recursion, task-group must be obtained before building any child path.
|
|
113
|
-
|
|
114
|
-
File path rule:
|
|
115
|
-
|
|
116
|
-
```text
|
|
117
|
-
depth 0: .okstra/briefs/<task-group>/<ticket-id>-<file-title>.md
|
|
118
|
-
depth 1: .okstra/briefs/<task-group>/sub/<ticket-id>-<file-title>.md
|
|
119
|
-
depth N: .okstra/briefs/<task-group>/<sub/ repeated N>/<ticket-id>-<file-title>.md
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
The frontmatter's `depth` must equal the number of `sub/` segments in the path. The validator checks this.
|
|
123
|
-
|
|
124
|
-
On collision, the default is Skip. You may offer Append suffix or Overwrite. Do not silently perform a bulk overwrite in tracker multi-generation.
|
|
125
|
-
|
|
126
|
-
## Domain alignment
|
|
127
|
-
|
|
128
|
-
First look at okstra's internal memory.
|
|
129
|
-
|
|
130
|
-
- `<PROJECT_ROOT>/.okstra/glossary.md`
|
|
131
|
-
- `<PROJECT_ROOT>/.okstra/decisions/`
|
|
132
|
-
- the related task's `history/fix-cycles.jsonl`
|
|
133
|
-
|
|
134
|
-
Read external domain docs only when the reporter explicitly cited them as source material. Record conflicting/ambiguous terms under `Augmentation > Domain alignment` with `terminology-mapping`, and put a `terminology:` row in `Open Questions`.
|
|
135
|
-
|
|
136
|
-
When a file path or symbol is mentioned, find the actual in-repo reference with `Read`/`Grep` and record it as `evidence-link`. If it cannot be mapped, do not guess — leave a `conversion-block:` row.
|
|
137
|
-
|
|
138
|
-
## Sharpening pass
|
|
139
|
-
|
|
140
|
-
Do not run a full interview. Ask only about gaps that source and codebase cannot fill.
|
|
141
|
-
|
|
142
|
-
Default budget:
|
|
143
|
-
|
|
144
|
-
- at most 1 question per section the source skill designates as fill-in.
|
|
145
|
-
- at most 2 questions for terminology/fuzzy disambiguation.
|
|
146
|
-
- at most 6 questions overall.
|
|
147
|
-
- codebase-scan up to 8 questions.
|
|
148
|
-
|
|
149
|
-
Prefer codebase-first checks over questions. Put remaining gaps in `_(none)_` or `Open Questions`.
|
|
150
|
-
|
|
151
|
-
## template writing rules
|
|
152
|
-
|
|
153
|
-
The template `templates/reports/brief.template.md` is the SSOT. Follow the section order, frontmatter keys, top blockquote shape, and HTML comment guidance.
|
|
154
|
-
|
|
155
|
-
Reporter input and Error feedback:
|
|
156
|
-
|
|
157
|
-
- keep `## Source Material`.
|
|
158
|
-
- keep `## Problem / Symptom`.
|
|
159
|
-
- omit `## Scan Scope`, `## Priority Lenses`.
|
|
160
|
-
|
|
161
|
-
Codebase scan:
|
|
162
|
-
|
|
163
|
-
- `scope: codebase` in frontmatter.
|
|
164
|
-
- omit `## Source Material`, `## Problem / Symptom`.
|
|
165
|
-
- keep `## Scan Scope`, `## Priority Lenses`.
|
|
166
|
-
|
|
167
|
-
Do not fabricate empty sections. When there is no value, use `_(none)_`.
|
|
168
|
-
|
|
169
|
-
## frontmatter key
|
|
170
|
-
|
|
171
|
-
Every brief carries the following keys. The key set is checked by `validate-brief.py`.
|
|
172
|
-
|
|
173
|
-
- `type`
|
|
174
|
-
- `brief-id`
|
|
175
|
-
- `parent-id`
|
|
176
|
-
- `ticket-id`
|
|
177
|
-
- `source-type`
|
|
178
|
-
- `task-group`
|
|
179
|
-
- `depth`
|
|
180
|
-
- `created`
|
|
181
|
-
- `generator`
|
|
182
|
-
- `reporter-confirmations`
|
|
183
|
-
|
|
184
|
-
`brief-id` must equal the filename stem. At depth 0 the `parent-id` is `self`; a descendant's `parent-id` is its direct parent's `brief-id`.
|
|
185
|
-
|
|
186
|
-
## Recommended next phase
|
|
187
|
-
|
|
188
|
-
Write it into the `Recommended next phase:` of the brief body's top blockquote.
|
|
189
|
-
|
|
190
|
-
- observable error, repro, stack trace, error-zip record: `error-analysis`
|
|
191
|
-
- a requirement with ambiguity or large Open Questions: `requirements-discovery`
|
|
192
|
-
- `scope: codebase`: `improvement-discovery`
|
|
193
|
-
- if ambiguous: `requirements-discovery`
|
|
194
|
-
|
|
195
|
-
Do not auto-start `okstra-run`.
|
|
196
|
-
|
|
197
|
-
## Reporter Confirmations
|
|
198
|
-
|
|
199
|
-
Collect the rows in `Open Questions` that only the reporter can answer.
|
|
200
|
-
|
|
201
|
-
- `intent-check:`
|
|
202
|
-
- `conversion-block:`
|
|
203
|
-
|
|
204
|
-
If a `[CONFIRMED <date> → RC-N]` marker already exists, exclude it from pending. Ask the user whether to answer now; if they answer, record it verbatim under `## Reporter Confirmations`. Do not delete the row — attach a marker.
|
|
205
|
-
|
|
206
|
-
At most 12 questions per run. If pending exceeds 12, ask only the top 12 in `conversion-block:` → `intent-check:` order, leave the rest as `partial`, then tell the user which rows remain.
|
|
207
|
-
|
|
208
|
-
Status values:
|
|
209
|
-
|
|
210
|
-
- `complete`: all pending reporter-only rows are answered. The validator checks that every `intent-check:`/`conversion-block:` row has a `[CONFIRMED …]` marker.
|
|
211
|
-
- `partial`: only some are answered. The validator checks that at least one row has a `[CONFIRMED …]` marker (if nothing was received, `skipped`).
|
|
212
|
-
- `skipped`: the user chose to defer to a downstream phase.
|
|
213
|
-
- `pending`: treated as a pre-handoff state; do not proceed.
|
|
214
|
-
|
|
215
|
-
## Validation
|
|
216
|
-
|
|
217
|
-
After writing, run the validator before emitting the handoff message.
|
|
218
|
-
|
|
219
|
-
Installed copy:
|
|
220
|
-
|
|
221
|
-
```bash
|
|
222
|
-
~/.okstra/lib/validators/validate-brief.sh "<PROJECT_ROOT>/.okstra/briefs" --briefs-root "<PROJECT_ROOT>/.okstra/briefs"
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
repo checkout:
|
|
226
|
-
|
|
227
|
-
```bash
|
|
228
|
-
validators/validate-brief.sh "<PROJECT_ROOT>/.okstra/briefs" --briefs-root "<PROJECT_ROOT>/.okstra/briefs"
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
On failure, fix the cited brief and re-run. Fall back to a manual checklist only when the validator is absent.
|
|
232
|
-
When a `Related Task Graph` is present, the validator also checks the table header, relation enum, direction enum, and directed/undirected mismatch.
|
|
233
|
-
|
|
234
|
-
## Completion message
|
|
235
|
-
|
|
236
|
-
Single brief:
|
|
237
|
-
|
|
238
|
-
```text
|
|
239
|
-
brief saved: <abs-path>
|
|
240
|
-
next: /okstra-run (recommended task-type: <phase>)
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
Multi-brief:
|
|
244
|
-
|
|
245
|
-
```text
|
|
246
|
-
briefs saved (N):
|
|
247
|
-
- <abs>/<task-group>/<brief>.md (depth 0, parent, recommended: <phase>)
|
|
248
|
-
- <abs>/<task-group>/sub/<brief>.md (depth 1, child, recommended: <phase>)
|
|
249
|
-
next: /okstra-run
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
Before the hand-off block, once per task-group (Step 7a): if `<PROJECT_ROOT>/.okstra/briefs/<task-group>/group-context.md` is absent, ask whether to create the skeleton (`okstra group-context init --project-root <PROJECT_ROOT> --task-group <task-group>`; recommended for a new group) or skip. Never fill it from the tickets. When created, add `group context skeleton: <abs>/<task-group>/group-context.md (fill before /okstra-run)` to the block — preparation refuses the group's tasks while a `<...>` placeholder line remains. The file's trailing `## Task Memory` region is okstra's (rewritten by `report-finalize` with the group's start order and each task's latest conclusion); `init` inserts the human sections above an existing region. Brief ordinals (`<TICKET>-<n>-<slug>`) are the start order okstra reads; `Related Task Graph` edges are quoted beside it as `waits for`.
|
|
253
|
-
|
|
254
|
-
## Forbidden patterns
|
|
255
|
-
|
|
256
|
-
- Summarizing or tidying Source Material before inserting it.
|
|
257
|
-
- Guessing tracker/URL content without tool verification.
|
|
258
|
-
- Writing unlabelled augmentation.
|
|
259
|
-
- Leaving `intent-inference` without `intent-check:`.
|
|
260
|
-
- Writing a decision file into external docs/ADR. okstra decisions belong only in `<PROJECT_ROOT>/.okstra/decisions/`.
|
|
261
|
-
- Silently overwriting an entire child tree.
|
|
262
|
-
- Auto-starting `okstra-run` right after brief generation.
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# okstra-chat AI Manual
|
|
2
|
-
|
|
3
|
-
## Source
|
|
4
|
-
|
|
5
|
-
- Skill source: [`skills/okstra-chat/SKILL.md`](../../../skills/okstra-chat/SKILL.md)
|
|
6
|
-
- CLI: [`src/commands/chat/chat.mts`](../../../src/commands/chat/chat.mts)
|
|
7
|
-
|
|
8
|
-
## Purpose
|
|
9
|
-
|
|
10
|
-
Global rooms under the okstra home so host sessions from different providers can send and read messages. Not a project `.okstra/` artifact.
|
|
11
|
-
|
|
12
|
-
## CLI
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
okstra chat rooms
|
|
16
|
-
okstra chat create --room <name>
|
|
17
|
-
okstra chat join --room <name> --name <display>
|
|
18
|
-
okstra chat members --room <name>
|
|
19
|
-
okstra chat send --room <name> --as <display> (--to <all|name> | --reply-to <id>) (--body <text> | --body-file <path>)
|
|
20
|
-
okstra chat unread --room <name> --as <display>
|
|
21
|
-
okstra chat inbox --room <name> --as <display>
|
|
22
|
-
okstra chat log --room <name> --as <display>
|
|
23
|
-
okstra chat ack --room <name> --as <display> --through <id>
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Display names are typed. The CLI does not generate them.
|
|
27
|
-
|
|
28
|
-
Unread is the inbox after the read cursor minus messages whose `from` equals `--as`. It does not move the cursor. `inbox` and `log` keep those messages. Rows are `id @from YYYY-MM-DD HH:MM body`. A reply inserts `↑parentId` after the time. Recipient is not on the line. A body with several lines continues on rows indented by two spaces; those rows carry no id.
|
|
29
|
-
|
|
30
|
-
`send --to` may equal `--as`. `--to` and `--reply-to` are exactly one. `--body` and `--body-file` are exactly one; either may hold several lines, and only an all-blank body is rejected. A reply inherits `to` from the parent. `members` is the full roster. `ack --through` rejects an id behind the current cursor. `.` and `..` are reserved names. A stale `.lock` (dead owner pid, or older than 5 s) is reclaimed by the next writer.
|
|
31
|
-
|
|
32
|
-
The skill picker is `all` plus `members` minus the current display name. Skill send and reply use `--body`, not `--body-file`. Before joining an existing room the skill runs `members`; if the typed display name is already listed, it asks whether this session is already in the room under that name (a re-entry after context loss) and, if so, continues with `--as` without joining. After showing unread rows, the skill runs `ack --through` with the id of the last row that starts with an id, unless the output is `no unread`. The Step 3 menu is send, unread, inbox, log, reply, done. Reply takes a free-input id and body; there is no recipient picker and no `okstra chat reply` subcommand.
|
|
33
|
-
|
|
34
|
-
Read the fixed text rows. Do not parse JSON.
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# okstra-code-review AI Manual
|
|
2
|
-
|
|
3
|
-
## Sources
|
|
4
|
-
|
|
5
|
-
- Skill source: [`skills/okstra-code-review/SKILL.md`](../../../skills/okstra-code-review/SKILL.md)
|
|
6
|
-
- Census rules: [`skills/okstra-code-review/references/census-rules.md`](../../../skills/okstra-code-review/references/census-rules.md)
|
|
7
|
-
- Review calibration: [`skills/okstra-code-review/references/review-calibration.md`](../../../skills/okstra-code-review/references/review-calibration.md)
|
|
8
|
-
- Target core (CLI): [`scripts/okstra_ctl/code_review_target.py`](../../../scripts/okstra_ctl/code_review_target.py)
|
|
9
|
-
- Review path core: [`scripts/okstra_ctl/code_review_paths.py`](../../../scripts/okstra_ctl/code_review_paths.py)
|
|
10
|
-
- Rules the review applies: [`prompts/coding-preflight/`](../../../prompts/coding-preflight/)
|
|
11
|
-
|
|
12
|
-
## Purpose
|
|
13
|
-
|
|
14
|
-
`okstra-code-review` reviews what a diff changed — one okstra `implementation` stage, or any branch unrelated to an okstra run — against this project's coding-preflight rules, and leaves the result as a file under the project.
|
|
15
|
-
|
|
16
|
-
**Core principle — the census is law.** The orchestrator turns the diff into an explicit worklist of cells **once, deterministically**, before any reviewer is dispatched. Reviewers receive their slice as input and never rebuild, reinterpret, or extend it. Each returns a verdict for **every** cell it was given (`clean` or findings), so a skipped cell is visible rather than silently absent, and the coverage audit re-dispatches every cell that came back without one.
|
|
17
|
-
|
|
18
|
-
**Second principle — the rules are not in the skill.** They live in `prompts/coding-preflight/` (`overview.md` router + `clean-code.md` + the routed `languages/` / `frameworks/` / `architectures/` resources). Briefs point at absolute pack paths; they never restate a rule.
|
|
19
|
-
|
|
20
|
-
Distinguish it from writing a PR body (`okstra-pr-gen`), starting a run (`okstra-run`), and inspecting a finished task (`okstra-inspect`).
|
|
21
|
-
|
|
22
|
-
## Modes
|
|
23
|
-
|
|
24
|
-
| Mode | Trigger | Diff range | Result file |
|
|
25
|
-
|---|---|---|---|
|
|
26
|
-
| stage | a task token (`DEV-9184`, or a full `project-id:task-group:task-id` key) | the stage's registry `base_ref` → the stage branch head | `.okstra/tasks/<task-group>/<task-id>/code-reviews/stage-<NN>.md` (re-review: `-r2`, `-r3`, …) |
|
|
27
|
-
| branch | a branch name | `--base` when given, otherwise the CLI's estimate against the default branch | `.project-docs/code-reviews/<branch>/<YYYY-MM-DD>-<NN>.md` |
|
|
28
|
-
|
|
29
|
-
The branch-mode result path is the one deliberate exception to the `.okstra/`-only artifact rule: a branch review belongs to no task bundle.
|
|
30
|
-
|
|
31
|
-
## Preflight
|
|
32
|
-
|
|
33
|
-
A single Bash call with the literal `okstra` token (not wrapped in `if` / `eval` / `export` / `$(...)` / `VAR=` / `||` / `&&` / `npx`):
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
okstra preflight --runtime claude-code
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
`Okstra preflight: ready` → carry `Project root` as a literal. `Okstra preflight: failed` → retry the intended directory with `--cwd <dir>`; if that also fails, show `Reason` and `Recovery`, then stop. `unknown command: preflight` or `unknown command: code-review` means the `okstra` binary predates the skill — `npm i -g okstra@latest`, then stop.
|
|
40
|
-
|
|
41
|
-
## Flow
|
|
42
|
-
|
|
43
|
-
1. **Resolve the target.** A full `project-id:task-group:task-id` token is already the key. For a bare token, run `okstra model-io task-selection-input --project-root <projectRoot> --task-ref <token>` and use the fixed `Match count`, `Task`, and `Updated at` rows. Then run `okstra stage-map <taskKey> --project <projectRoot> --text` and pick from the fixed `Stages` and `Done stages` rows with a 3-option picker (recommendations first, `Enter directly` last). Branch mode picks the branch the same way; a detached HEAD is refused.
|
|
44
|
-
2. **Call the target CLI**: `okstra code-review target --task-key <k> --stage <N> --project-root <dir> --text`, or `okstra code-review target --branch <name> [--base <ref>] --project-root <dir> --text`. Carry the returned `Project root`, `Mode`, `Worktree path`, `Branch`, `Base commit`, `Head commit`, `Review path`, and `Round` values; stage mode also carries `Task key`, `Task root`, and `Stage`. Then run `okstra model-io code-review-input --project-root <projectRoot> --base <baseCommit> --head <headCommit>` and pass only that fixed Markdown view to model prompts. **Never derive the base** — the CLI owns it, and `Base commit` may be a ref rather than a commit id, so pass it through verbatim. Run git in `Worktree path` when non-empty, otherwise in `Project root` against `Branch`.
|
|
45
|
-
3. **Show the base and confirm it** with a 3-option picker before censusing anything — the returned `baseCommit` plus `git log -1 --oneline <baseCommit>` first, `Enter directly` last. Only an override calls the target CLI a second time, with `--base <ref>`.
|
|
46
|
-
4. **Census the diff** per `census-rules.md`: four axes (`structural`, `semantic`, `state-and-tests`, `general`), one cell per target per axis — the axis **is** the rule group, never one cell per individual rule. Membership is mechanical; judgment only ever decides a verdict. Route the coding-preflight packs exactly once here (`okstra paths --field home` → `<okstraHome>/prompts/coding-preflight/overview.md`), and fix the calibration path the briefs carry (`~/.claude/skills/okstra-code-review/references/review-calibration.md`). Print every cell table, every exclusion with its reason, the applied packs, and both completion criteria. Never truncate a large census — report the cell count and confirm.
|
|
47
|
-
5. **Materialize and dispatch four reviewers in parallel.** Each reviewer is a separate standalone invocation under `.okstra/agent-invocations/code-review/`. Write `<invocation-id>.instructions.md`, run `okstra agent-prompt materialize --purpose code-review --audience code-reviewer ...`, and verify the returned `metadataPath` before dispatch. A native host call receives the verified prompt body and `hostModelValue`; a deterministic provider process receives the prompt path and `modelExecutionValue` through `okstra worker-dispatch`. Each brief carries the diff, the work directory, its own axis's cell list verbatim, its packs' absolute paths, and the absolute calibration path.
|
|
48
|
-
6. **Complete and audit the results.** Capture each raw return under the purpose directory's `.tmp/`, then run `agent-prompt materialize-result`, `complete`, and `verify-completion` in order. Parse only the verified `returnedBody`. Diff those cells against the assigned slice; re-dispatch one gap-fill invocation per axis for missing cells, using a new invocation ID and the same full materialize/verify/result/completion boundary. A missing or unverified verdict is unfinished work, never an implicit `clean`.
|
|
49
|
-
7. **Merge and write.** Dedupe across axes, never re-grade a severity, and write the report to `reviewPath` with `Write` (frontmatter `mode` / `taskKey` / `branch` / `stage` / `round` / `baseCommit` / `headCommit` / `packs` / `generatedAt`; body `## Coverage`, `## Must-fix`, `## Should-fix`, `## Nits`, `## Score`). An empty diff dispatches no reviewer and still writes the report — Coverage reading zero cells and a Score table totalling 0.
|
|
50
|
-
|
|
51
|
-
## Output Rules
|
|
52
|
-
|
|
53
|
-
- The file is the deliverable. In session, print only `reviewPath`, the count per severity, and the score total — do not replay the findings in chat.
|
|
54
|
-
- The report's prose is Korean; paths, identifiers, rule names, and quoted code stay verbatim.
|
|
55
|
-
- Every finding cites a line **this diff changed**, and carries a concrete fix (a pseudocode sketch for readability, an alternative name for naming, a destination for structural).
|
|
56
|
-
- Read-only against the repository: `okstra code-review target` creates no directory and no file, and the review never reconciles git history. A rewritten base is reported, not force-fixed.
|
|
57
|
-
- Branch mode keeps the final review at `.project-docs/code-reviews/<branch>/`, but its invocation prompts, result envelopes, and completion markers remain under `.okstra/agent-invocations/code-review/`.
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
# okstra-container-build AI Manual
|
|
2
|
-
|
|
3
|
-
## Source
|
|
4
|
-
|
|
5
|
-
- Skill source: [`skills/okstra-container-build/SKILL.md`](../../../skills/okstra-container-build/SKILL.md)
|
|
6
|
-
- container CLI: [`scripts/okstra_ctl/container.py`](../../../scripts/okstra_ctl/container.py)
|
|
7
|
-
- container runtime: [`scripts/okstra_ctl/container.py`](../../../scripts/okstra_ctl/container.py)
|
|
8
|
-
- stage integration gate: [`scripts/okstra_ctl/stage_targets.py`](../../../scripts/okstra_ctl/stage_targets.py)
|
|
9
|
-
|
|
10
|
-
## Purpose
|
|
11
|
-
|
|
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.
|
|
13
|
-
|
|
14
|
-
## sub-command
|
|
15
|
-
|
|
16
|
-
| Sub-command | Role | side effect |
|
|
17
|
-
|---|---|---|
|
|
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 |
|
|
21
|
-
|
|
22
|
-
## Preflight
|
|
23
|
-
|
|
24
|
-
Single call:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
okstra preflight --runtime claude-code
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
On `Okstra preflight: ready`, carry the fixed `Project root` line. On
|
|
31
|
-
`Okstra preflight: failed`, show `Reason` and `Recovery`, then stop. A Docker
|
|
32
|
-
daemon is required. On a Docker connection error, tell the user to start Docker
|
|
33
|
-
Desktop/daemon; do not start Docker yourself.
|
|
34
|
-
|
|
35
|
-
## task-key resolution
|
|
36
|
-
|
|
37
|
-
Most sub-commands need a full task-key.
|
|
38
|
-
|
|
39
|
-
1. If a full task-key is given, use it as-is.
|
|
40
|
-
2. For a bare task-id, use the resolver:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
okstra model-io task-selection-input --project-root <projectRoot> --task-ref <task-id>
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
3. On multiple matches, show the candidates and let the user pick.
|
|
47
|
-
4. Only `down --all` can run without a task-key.
|
|
48
|
-
|
|
49
|
-
## intent routing
|
|
50
|
-
|
|
51
|
-
Clear verbs:
|
|
52
|
-
|
|
53
|
-
- "bring up/deploy", "up": `up`
|
|
54
|
-
- "status": `status`
|
|
55
|
-
- "tear down", "down": `down`
|
|
56
|
-
|
|
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.
|
|
58
|
-
|
|
59
|
-
## up
|
|
60
|
-
|
|
61
|
-
Run:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
okstra container up --project-root <projectRoot> --task-key <task-key> --text
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Preconditions:
|
|
68
|
-
|
|
69
|
-
- The task must have an implementation worktree registered in the registry.
|
|
70
|
-
- The worktree root must contain a `docker-compose.yml`.
|
|
71
|
-
- Every stage of the approved plan must be `done`. Do not deploy a partial-stage state as if it were a complete task.
|
|
72
|
-
|
|
73
|
-
Handling failure messages:
|
|
74
|
-
|
|
75
|
-
- Message that the task worktree is not in the registry: tell the user to run the implementation phase first.
|
|
76
|
-
- No compose file: show the CLI message verbatim.
|
|
77
|
-
- `final-verification(whole-task): stage N not done`: tell the user to finish that stage via implementation.
|
|
78
|
-
- healthcheck failure: relay the failing service and the `docker compose ... logs` line the CLI provides, verbatim.
|
|
79
|
-
|
|
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.
|
|
81
|
-
|
|
82
|
-
## status
|
|
83
|
-
|
|
84
|
-
Run:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
okstra container status --project-root <projectRoot> --task-key <task-key> --text
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Fixed fields:
|
|
91
|
-
|
|
92
|
-
- `projectName`: compose project name
|
|
93
|
-
- `containers`: running containers found by run-trace label
|
|
94
|
-
|
|
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>`.
|
|
96
|
-
|
|
97
|
-
## down
|
|
98
|
-
|
|
99
|
-
Single task:
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
okstra container down --project-root <projectRoot> --task-key <task-key> --text
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Whole project:
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
okstra container down --project-root <projectRoot> --all --text
|
|
109
|
-
```
|
|
110
|
-
|
|
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.
|
|
112
|
-
|
|
113
|
-
Report the fixed `Downed` rows. Show each torn-down project name.
|
|
114
|
-
|
|
115
|
-
## Output rules
|
|
116
|
-
|
|
117
|
-
- The fixed text fields are the source of truth.
|
|
118
|
-
- Do not second-guess it with raw `docker` commands. The only exception is when the CLI failed and the user asked for a manual fallback.
|
|
119
|
-
- Show the resolved task-key in the heading or on the first line.
|
|
120
|
-
- Show CLI failure messages verbatim, including the remediation line.
|
|
121
|
-
- Show container/service state as the fixed values, without normalizing.
|
|
122
|
-
|
|
123
|
-
## Forbidden patterns
|
|
124
|
-
|
|
125
|
-
- Trying to start the Docker daemon yourself.
|
|
126
|
-
- Guessing the cause of an `up` failure and editing the compose file.
|
|
127
|
-
- Dressing up a partial-stage task as deployable.
|
|
128
|
-
- Running `down --all` without user confirmation.
|
|
129
|
-
- Overriding the CLI result arbitrarily with a raw docker query.
|