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-inspect AI Manual
|
|
2
|
-
|
|
3
|
-
## Source
|
|
4
|
-
|
|
5
|
-
- Skill source: [`skills/okstra-inspect/SKILL.md`](../../../skills/okstra-inspect/SKILL.md)
|
|
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
|
-
- CLI registry: [`src/cli-registry.mjs`](../../../src/cli-registry.mjs)
|
|
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
|
-
- container is a separate skill: [`okstra-container-build.md`](okstra-container-build.md)
|
|
13
|
-
|
|
14
|
-
## Purpose
|
|
15
|
-
|
|
16
|
-
`okstra-inspect` is the single entry point for okstra read-side work. Most of it is read-only, with two exceptions.
|
|
17
|
-
|
|
18
|
-
- `status.4`: writes the user-requested `workStatus` into `task-manifest.json`.
|
|
19
|
-
- `errors`, `error-zip`, `recap record`: produce report/zip/log artifacts from the information read.
|
|
20
|
-
|
|
21
|
-
No sub-command writes outside this machine.
|
|
22
|
-
|
|
23
|
-
## sub-command list
|
|
24
|
-
|
|
25
|
-
| Sub-command | Role | Writes? |
|
|
26
|
-
|---|---|---|
|
|
27
|
-
| `status` | check task/phase/workflow status, change workStatus | manifest edit in `status.4` |
|
|
28
|
-
| `history` | list past runs, assemble rerun/resume command | read by default |
|
|
29
|
-
| `report` | resolve final-report path and optionally read | read |
|
|
30
|
-
| `time` | aggregate elapsed time per task type/worker | read |
|
|
31
|
-
| `logs` | inventory wrapper `.log` sidecars and suggest cleanup commands | read |
|
|
32
|
-
| `cost` | estimate task bundle context/read cost | read |
|
|
33
|
-
| `errors` | aggregate task error logs into a timestamped markdown report | generates report |
|
|
34
|
-
| `error-zip` | build an anonymized zip of cross-project error logs | generates zip |
|
|
35
|
-
| `run-audit` | check every run's artifacts against progress invariants — catches a run that ended wrong without ever logging a failure | read |
|
|
36
|
-
| `recap` | summarize a task's before/after runs, or a task-group's per-brief status and latest conclusions, and record Q&A | appends `recap-log.jsonl` (task `recap/`, group `.recap/`) |
|
|
37
|
-
|
|
38
|
-
## Preflight
|
|
39
|
-
|
|
40
|
-
Run once before any sub-command.
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
okstra preflight --runtime claude-code
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
The project check only sees the cwd of the Bash call. For a project that is not the cwd (a sibling repo, a monorepo subdir, or a project named in the request), `Okstra preflight: failed` can be a false negative rather than missing setup. Retry with `okstra preflight --runtime claude-code --cwd <that-dir>` (`--cwd` is the sanctioned way to target a project without a leading `cd`). Only when that also reports `Okstra preflight: failed` do you show `Reason` and `Recovery`, then stop. On `Okstra preflight: ready`, carry `Project root` as a literal value and pass it to the sub-command CLIs that accept it (`recap`, `context-cost`, etc.) via `--cwd`/`--project-root <projectRoot>`.
|
|
47
|
-
|
|
48
|
-
## intent routing
|
|
49
|
-
|
|
50
|
-
Classify the user request into one or more facets. If ambiguous, show the entire sub-command table and let the user pick by number/name. Do not hide a facet because of AskUserQuestion's option limit.
|
|
51
|
-
|
|
52
|
-
If several facets appear in one message, execute them sequentially. Step 0 runs only once.
|
|
53
|
-
|
|
54
|
-
## task-key resolution — shared rule
|
|
55
|
-
|
|
56
|
-
Many facets accept the following target forms.
|
|
57
|
-
|
|
58
|
-
1. full task-key: `<project-id>:<task-group>:<task-id>`
|
|
59
|
-
2. bare task-id
|
|
60
|
-
3. task root path
|
|
61
|
-
|
|
62
|
-
A bare task-id uses the shared resolver.
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
okstra model-io task-selection-input --project-root <projectRoot> --task-ref <task-id>
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Handling the fixed text projection's `Match count` and repeated task lines:
|
|
69
|
-
|
|
70
|
-
- 0: say it cannot be found; do not guess.
|
|
71
|
-
- 1: use that `taskKey`.
|
|
72
|
-
- N: show the candidate `taskKey`s and `updatedAt`, and take a disambiguation.
|
|
73
|
-
|
|
74
|
-
## status
|
|
75
|
-
|
|
76
|
-
### Project overview
|
|
77
|
-
|
|
78
|
-
Run `okstra model-io status-input --project-root <projectRoot>`. Its fixed text task blocks are the projected source.
|
|
79
|
-
|
|
80
|
-
Sort: `updatedAt` desc, then `taskKey`.
|
|
81
|
-
|
|
82
|
-
Keep the table narrow.
|
|
83
|
-
|
|
84
|
-
- Task Key
|
|
85
|
-
- Category
|
|
86
|
-
- Phase
|
|
87
|
-
- workStatus
|
|
88
|
-
- Next
|
|
89
|
-
|
|
90
|
-
`nextRecommendedPhase` is an object `{phase, status, rationale}`. The Next cell is its `phase`, or `--` when that is empty. If `awaitingApproval`, or `nextRecommendedPhase.status` is anything but `ready`, add a marker to the Next cell and explain it. When `awaitingApproval` is true, the next human action is to approve the plan (`okstra-run` → `implementation`, or `--approve`); do not re-run `implementation-planning`. When the pointer is `blocked` after planning, send the user to `okstra-user-response` on the named `C-NNN` ids first.
|
|
91
|
-
|
|
92
|
-
### Specific task
|
|
93
|
-
|
|
94
|
-
For a single task's detail, run `okstra model-io status-input --project-root <projectRoot> --task-ref <task-key>` and use its named lines.
|
|
95
|
-
|
|
96
|
-
Information to show:
|
|
97
|
-
|
|
98
|
-
- work category
|
|
99
|
-
- current phase/state
|
|
100
|
-
- last completed phase
|
|
101
|
-
- next-phase pointer: `phase` (or `--`), its `status`, its `rationale`
|
|
102
|
-
- awaiting approval
|
|
103
|
-
- task status, latest run status
|
|
104
|
-
- latest report, resume command
|
|
105
|
-
- workStatus, note
|
|
106
|
-
- phase states
|
|
107
|
-
- safe resume checkpoint
|
|
108
|
-
|
|
109
|
-
### workStatus update
|
|
110
|
-
|
|
111
|
-
Write only when the user explicitly requests a status change.
|
|
112
|
-
|
|
113
|
-
Allowed values:
|
|
114
|
-
|
|
115
|
-
- `todo`
|
|
116
|
-
- `in-progress`
|
|
117
|
-
- `blocked`
|
|
118
|
-
- `done`
|
|
119
|
-
|
|
120
|
-
Procedure: update via a single `okstra set-work-status <token> <status> [--note <text>] --project-root <projectRoot> --text` call — do not edit the manifest by hand. On `Stage: ambiguous`, re-ask with the listed `Match` values; on `Stage: not-found`, answer that it cannot be found.
|
|
121
|
-
|
|
122
|
-
When `workStatus` is absent in a read display, infer it from the lifecycle state, but do not back-fill on read alone.
|
|
123
|
-
|
|
124
|
-
## history
|
|
125
|
-
|
|
126
|
-
First branch: distinguish re-run from resume.
|
|
127
|
-
|
|
128
|
-
- Re-run: create a new run from previous run parameters. A new run-seq is created.
|
|
129
|
-
- Resume: continue an interrupted existing run. No new run-seq is created.
|
|
130
|
-
|
|
131
|
-
Run `okstra model-io history-input --project-root <projectRoot>` for project history, or add `--task-ref <task-key>` for one task.
|
|
132
|
-
|
|
133
|
-
Re-run obtains `projectId`, `taskGroup`, `taskId`, `taskType`, `taskBriefPath`, workers, related tasks, model overrides, and executor provider through `okstra model-io rerun-input --run-manifest <runManifestPath>`. Omit `implementation`'s `--base-ref` to reuse a registration; if launch reports that a base is required, ask the user.
|
|
134
|
-
|
|
135
|
-
Resume checks `latestResumeCommandPath` or the timeline entry's `resumeCommandPath`, and if the file exists, guides/runs `bash <resume-command-path>`. If the path is empty or the file is missing, declare "no resume" and guide to history.3 (re-run).
|
|
136
|
-
|
|
137
|
-
## report
|
|
138
|
-
|
|
139
|
-
Run `okstra model-io report-input --project-root <projectRoot> --task-ref <task-key>` for the latest report. For a specific run, use the `Report` line from `okstra model-io history-input --project-root <projectRoot> --task-ref <task-key>`. Render a full reading copy on demand with `okstra render-final-report <that data.json>`.
|
|
140
|
-
|
|
141
|
-
Match read depth to the request (a final report is 300+ lines / 50K+ tokens). For summary/conclusion/pass questions ("summary", "just the key points", "conclusion", "did it pass?"), do not read the whole thing — read only the verdict in the `runs/<task-type-segment>/status/final-<task-type-segment>-<NNN>.status` (stage-isolated: `runs/<task-type-segment>/stage-<N>/status/`) sidecar plus the report's leading summary block. Ingest the whole file only for "the whole thing / read it all / full body". If a completion signal exists but the file does not, report it as a missing report; if it is not yet complete, show the current status and workStatus.
|
|
142
|
-
|
|
143
|
-
## time
|
|
144
|
-
|
|
145
|
-
The CLI does the time computation. The AI does not recompute duration by hand.
|
|
146
|
-
|
|
147
|
-
```bash
|
|
148
|
-
okstra time-report <task-key> --project-root <projectRoot> --text
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Convert every `*Ms` to `HH:MM:SS` for display. `CPU sum` is the overlapping cost of lead and workers time combined, not wall-clock. Show wall-clock from `perRunWallClock` only when the user explicitly asks. For `by stage`/`per stage`/`which stage took longest`, the task-type view (the By task type table) is the default answer — do not treat it as 'not measurable'. Render the intra-run `phaseTimelines` only on an explicit request like 'Phase 1–7' / 'which phase', and when it is empty, mention it only as a footnote rather than a headline.
|
|
152
|
-
|
|
153
|
-
`unavailable[]` is not summed into totals; show it as a separate note.
|
|
154
|
-
|
|
155
|
-
## cost
|
|
156
|
-
|
|
157
|
-
For context/read cost, the CLI output is the source of truth.
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
okstra context-cost <task-key> --project-root <projectRoot>
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
Interpretation points:
|
|
164
|
-
|
|
165
|
-
- the token estimate is a heuristic, not a billing figure.
|
|
166
|
-
- if `leadPhase1.mode == "active-run-context"`, the compact lead intake is primary.
|
|
167
|
-
- if `analysisWorker.mode == "analysis-packet-primary"`, the worker reads the analysis-packet first and opens the full source only when needed.
|
|
168
|
-
- if `skillAssets` is large, it is a prompt-diet target.
|
|
169
|
-
- if there are many legacy timestamp artifacts, propose current-view/cold-artifact separation rather than a destructive delete.
|
|
170
|
-
|
|
171
|
-
## logs
|
|
172
|
-
|
|
173
|
-
wrapper sidecar log inventory:
|
|
174
|
-
|
|
175
|
-
```bash
|
|
176
|
-
okstra log-report --project-root <projectRoot> --text
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
Scans `.okstra/tasks/**/runs/*/prompts/*.log`. Does not delete. The cleanup command merely presents a dry-run and `-delete` pair as fenced bash.
|
|
180
|
-
|
|
181
|
-
Deleting an active run's log loses the live trace, so recommend checking `status` first.
|
|
182
|
-
|
|
183
|
-
## errors
|
|
184
|
-
|
|
185
|
-
Aggregate task error logs into a markdown report.
|
|
186
|
-
|
|
187
|
-
```bash
|
|
188
|
-
okstra error-report <task-key> --project-root <projectRoot> --text
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
Read the fixed `Report path`, total, phase, agent, and parse-skipped labels and summarize. If the report path is `-` and total errors is 0, say there are no recorded error logs. Do not hide a nonzero parse-skipped count.
|
|
192
|
-
|
|
193
|
-
## error-zip
|
|
194
|
-
|
|
195
|
-
Bundle the machine's cross-project okstra errors into an anonymized zip.
|
|
196
|
-
|
|
197
|
-
Run `okstra model-io error-zip-input`. Recommend its `Previous output path` first when present; otherwise propose `~/okstra-error-feedback-<YYYY-MM-DD>.zip`.
|
|
198
|
-
|
|
199
|
-
Run:
|
|
200
|
-
|
|
201
|
-
```bash
|
|
202
|
-
okstra error-zip --out <path> --text
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
Summary fields:
|
|
206
|
-
|
|
207
|
-
- `outPath`
|
|
208
|
-
- `errorCount`
|
|
209
|
-
- `runCount`
|
|
210
|
-
- `unreachableRuns`
|
|
211
|
-
- `clusterCount`
|
|
212
|
-
- `projectCount`
|
|
213
|
-
|
|
214
|
-
At the end, guide the user to build a brief with the error-feedback variant of `/okstra-brief-gen`, then run `error-analysis` in the okstra repo.
|
|
215
|
-
|
|
216
|
-
## recap
|
|
217
|
-
|
|
218
|
-
The default is artifact mode. It builds the before/after summary and answers questions using only `.okstra/` artifacts.
|
|
219
|
-
|
|
220
|
-
Read the fixed recap projection:
|
|
221
|
-
|
|
222
|
-
```bash
|
|
223
|
-
okstra model-io recap-input --project-root <projectRoot> --task-ref <task-key>
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
Use the emitted `Run count` and repeated `Transition` fields in order. Do not parse recap JSON or open recap state files directly.
|
|
227
|
-
|
|
228
|
-
Group scope — when the user names a task-group, or the bare token resolves only via `taskGroup`:
|
|
229
|
-
|
|
230
|
-
```bash
|
|
231
|
-
okstra model-io recap-input --project-root <projectRoot> --task-group <task-group>
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
The projection joins the group's briefs (start order, `waits for` edges), the catalog / task-manifests (real status, progress, run count, next phase, report), and the group document's Task Memory (headline, decisions, watch-outs, follow-ups). Read `Brief count` / `Task count` / `Next in group`, then the repeated `Queue entry` and `Task` blocks. Run-count / time / error totals belong to `okstra-rollup`.
|
|
235
|
-
|
|
236
|
-
record:
|
|
237
|
-
|
|
238
|
-
```bash
|
|
239
|
-
okstra recap record <task-key> --project-root <projectRoot> --kind <summary|qa> --mode <artifact|code> --question "<question>" --answer "<summary>" --citation "<path:line>"
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
In group scope, `--task-group <task-group>` replaces `<task-key>` and the line lands at `.okstra/tasks/<task-group>/.recap/recap-log.jsonl`. `recap note` has no group form.
|
|
243
|
-
|
|
244
|
-
Enter code mode only when the user explicitly requests it, such as "including the diff" or "the code changes too". Entering recap alone does not read the code diff.
|
|
245
|
-
|
|
246
|
-
## Output rules
|
|
247
|
-
|
|
248
|
-
- Answer in Korean, spelling out task ids, phase names, and status values on first mention.
|
|
249
|
-
- Prefer project-relative paths.
|
|
250
|
-
- Show disk field values as-is without normalizing.
|
|
251
|
-
- Clearly indicate an awaiting-approval state.
|
|
252
|
-
- If there is no recent report, show `--`.
|
|
253
|
-
- Display dates in `YYYY-MM-DD HH:MM`.
|
|
254
|
-
|
|
255
|
-
## Forbidden patterns
|
|
256
|
-
|
|
257
|
-
- Failing immediately because the catalog is absent. There is a manifest fallback.
|
|
258
|
-
- Confusing `workStatus` with `currentStatus`.
|
|
259
|
-
- Hand-computing time duration without the CLI.
|
|
260
|
-
- Running a cleanup command directly.
|
|
261
|
-
- Arbitrarily reinterpreting raw files instead of CLI output in `errors`/`cost`/`time`.
|
|
262
|
-
- Automatically reading code changes in recap artifact mode.
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
# okstra-manager
|
|
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 [`scripts/okstra_ctl/manager_cli.py`](../../../scripts/okstra_ctl/manager_cli.py).
|
|
4
|
-
|
|
5
|
-
## When to Use
|
|
6
|
-
|
|
7
|
-
- The user says something like "multiple projects", "cross-project", "okstra manager", or "group projects together".
|
|
8
|
-
- Register projects under a manager, or discover candidate projects.
|
|
9
|
-
- Plan child project tasks under a shared task-group/task-id and assign roles/directives.
|
|
10
|
-
- Sync child project `.okstra` state into the manager snapshot, or view status.
|
|
11
|
-
- Prepare a launch packet and a manager child context for running a specific child task.
|
|
12
|
-
|
|
13
|
-
## Execution Rules
|
|
14
|
-
|
|
15
|
-
1. Every command starts with the literal `okstra`. Do not wrap it in shell variables, `$(...)`, `&&`, `eval`, or a leading env assignment.
|
|
16
|
-
2. The fixed CLI fields are the source of truth. Do not reconstruct manager state or child launch args from docs/memory.
|
|
17
|
-
Nested project, manifest, child, snapshot, and directive values use numbered count/name/value rows; carry every returned row.
|
|
18
|
-
3. `--workspace-root` is owned by the Node wrapper. The CLI rejects it if the user passes it.
|
|
19
|
-
4. `new project`'s `--project-root` must be an already-existing directory. It performs setup-equivalent registration only when there is no `.okstra/project.json` inside it.
|
|
20
|
-
5. The public child task identity is `project-id:task-group:task-id`. The `new task --task` example shows the full key form first.
|
|
21
|
-
6. When the actual child task id differs under the same manager task id, pass `--child-task-id <id>` to both `task assign` and `task run`.
|
|
22
|
-
|
|
23
|
-
## Command Surface
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
okstra manager init --manager-id <manager-id>
|
|
27
|
-
okstra manager discover-projects
|
|
28
|
-
okstra manager new project --manager-id <manager-id> --project-id <project-id> --project-root <abs-path> [--role <role>] [--tag <tag>]
|
|
29
|
-
okstra manager new task-group --manager-id <manager-id> --task-group <task-group>
|
|
30
|
-
okstra manager new task --manager-id <manager-id> --task-group <task-group> --task-id <task-id> [--task <project-id:task-group:task-id> ...] [--objective <text>] [--common-brief <path>] [--progress-mode <manual|auto>]
|
|
31
|
-
okstra manager task assign --manager-id <manager-id> --task-group <task-group> --task-id <task-id> --project-id <project-id> [--child-task-id <child-task-id>] [--role <role>] [--tag <tag>] [--assignment <text>]
|
|
32
|
-
okstra manager task note --manager-id <manager-id> --task-group <task-group> --task-id <task-id> --scope <shared|project> [--project-id <project-id>] --body <text>
|
|
33
|
-
okstra manager task sync --manager-id <manager-id> --task-group <task-group> --task-id <task-id>
|
|
34
|
-
okstra manager task status --manager-id <manager-id> --task-group <task-group> --task-id <task-id>
|
|
35
|
-
okstra manager task run --manager-id <manager-id> --project-id <project-id> --task-group <task-group> --task-id <task-id> [--child-task-id <child-task-id>]
|
|
36
|
-
okstra manager task split --manager-id <manager-id> --task-group <task-group> --task-id <task-id> --plan <split-plan.json> [--overwrite]
|
|
37
|
-
okstra manager list managers
|
|
38
|
-
okstra manager list projects --manager-id <manager-id>
|
|
39
|
-
okstra manager list tasks --manager-id <manager-id>
|
|
40
|
-
okstra manager view --manager-id <manager-id>
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
- `list managers`: every manager in this home with its project count and manager-task count.
|
|
44
|
-
- `list projects`: the manager's registered projects with root, role, tags and link time.
|
|
45
|
-
- `list tasks`: the manager's tasks by task-group and task-id with objective, progress mode and child count.
|
|
46
|
-
- `task split`: reads a tracker split plan (one Linear project or parent issue, each issue assigned to one or more projects with a scope), writes one brief per (issue, project) pair to `<projectRoot>/.okstra/briefs/<task-group>/<ticketId>-<file-title>.md` with a `## Project Scope` section, and registers each pair as child `<project-id>:<task-group>:<slug(ticketId)>`. Every brief passes the brief validator before any file is written; an existing brief with different content stops the run unless `--overwrite` is given. The skill's Tracker Split section defines the plan JSON and the fetch/confirm procedure.
|
|
47
|
-
- `view`: writes `view/index.html` (summary tiles, project table, one panel per task with child rows, directives and events) and returns `View path` and `View URL`. It does not sync; each panel shows its last sync time and the sync command.
|
|
48
|
-
|
|
49
|
-
## Storage Model
|
|
50
|
-
|
|
51
|
-
Manager state is stored under `~/.okstra/managers/<manager-id>/`, split into two layers: the manager root and the task directory.
|
|
52
|
-
|
|
53
|
-
Directly under the manager root:
|
|
54
|
-
|
|
55
|
-
- `manager.json`: manager id / schema / createdAt
|
|
56
|
-
- `projects.json`: registered projectId, projectRoot, role, tags
|
|
57
|
-
|
|
58
|
-
Under the task directory `task-groups/<safe-group>/<safe-task>/`:
|
|
59
|
-
|
|
60
|
-
- `manifest.json`: manager task objective, common brief, progress mode
|
|
61
|
-
- `children.json`: child task plan, assignment, launch metadata; children made by `task split` also carry `ticketId`, `briefPath`, `scope` and `recommendedPhase`
|
|
62
|
-
- `split-plan.json`: the last plan `task split` applied
|
|
63
|
-
- `directives.jsonl`: shared/project directive rows
|
|
64
|
-
- `snapshots.json`: the read-side snapshot `task sync` read from the project-local `.okstra`
|
|
65
|
-
- `events.jsonl`: manager events such as `task-created`, `task-split` and `child-launch-prepared`
|
|
66
|
-
- `child-context/<safe-project>-<safe-task>.md`: the child lead context `task run` produced
|
|
67
|
-
- `view/index.html` (under the manager root): the overview page `view` writes; rewritten on every run
|
|
68
|
-
|
|
69
|
-
A segment whose slug is empty (e.g. a non-ASCII task-group/task-id) uses a `u-<sha1-prefix>` path segment, but the manifest and the child `taskKey` preserve the original input value.
|
|
70
|
-
|
|
71
|
-
## Child launch
|
|
72
|
-
|
|
73
|
-
`task run` does not run the child work directly; it prepares a launch packet. The key fixed fields of the returned packet:
|
|
74
|
-
|
|
75
|
-
- `Task key`: the child's `project-id:task-group:task-id` (the public child-identity key — also recorded on the `child-launch-prepared` event)
|
|
76
|
-
- `Backend`: always `spawn-process` — the child lead runs as a separate host process started by the installed launcher
|
|
77
|
-
- `Worker dispatch backend`: always `subagent` in v1
|
|
78
|
-
- `Project root`: the child project root
|
|
79
|
-
- `Context path`: the manager child context markdown
|
|
80
|
-
- `Run command`: the installed launcher, `~/.okstra/bin/okstra.sh`
|
|
81
|
-
- every numbered `Run arg N`: the ordered launcher arguments `--project-root … --project-id … --task-group … --task-id … --directive "Read manager child context: …"`. A child made by `task split` also gets `--task-brief <briefPath>`, and `--task-type <recommendedPhase>` while the child task does not exist yet in its project
|
|
82
|
-
- `Shell command`: `Run command` plus every `Run arg N`, shell-quoted; the skill hands this line to the user to run in a new terminal
|
|
83
|
-
|
|
84
|
-
The launcher fills the task type and brief from the child task manifest when it exists and asks for the rest, then prepares the run and starts the lead with the directive in its prompt. `okstra run` is not a substitute: for a lead host it adds `--launch-only`, which drops the task inputs and the directive.
|
|
85
|
-
|
|
86
|
-
When packet creation succeeds, that child launch's status in `children.json` is updated to `prepared`, and a `child-launch-prepared` is appended to `events.jsonl`. On failure it does not modify the project-local task state.
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
# okstra-memory AI Manual
|
|
2
|
-
|
|
3
|
-
## Source
|
|
4
|
-
|
|
5
|
-
- Skill source: [`skills/okstra-memory/SKILL.md`](../../../skills/okstra-memory/SKILL.md)
|
|
6
|
-
- CLI registry: [`src/cli-registry.mjs`](../../../src/cli-registry.mjs)
|
|
7
|
-
- memory CLI: [`src/commands/memory/memory.mjs`](../../../src/commands/memory/memory.mjs)
|
|
8
|
-
|
|
9
|
-
## Purpose
|
|
10
|
-
|
|
11
|
-
`okstra-memory` manages the Memory Book in the user's home.
|
|
12
|
-
|
|
13
|
-
```text
|
|
14
|
-
~/.okstra/memory-book/
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
It is not a project-local `.okstra/` artifact. It can be used even without `<PROJECT_ROOT>/.okstra/project.json`.
|
|
18
|
-
|
|
19
|
-
## When to use
|
|
20
|
-
|
|
21
|
-
Use it when:
|
|
22
|
-
|
|
23
|
-
- The user explicitly asks to save, e.g. "remember this", "save the conversation", "organize and store this in okstra", "remember this", "save this decision".
|
|
24
|
-
- The user wants to search, list, read, or archive stored memory.
|
|
25
|
-
|
|
26
|
-
Do not use it when:
|
|
27
|
-
|
|
28
|
-
- The user is only brainstorming with no save request. In that case, ask a confirmation question first.
|
|
29
|
-
- The content should be kept as a project task artifact. In that case, use the brief/report/decision path of the relevant okstra task.
|
|
30
|
-
|
|
31
|
-
## safety rule
|
|
32
|
-
|
|
33
|
-
Do not save without an explicit save request. Do not store credentials, API keys, tokens, private personal data, or secrets. If the conversation includes sensitive material, exclude it from the summary and note the omission.
|
|
34
|
-
|
|
35
|
-
The CLI can also detect high-confidence secret shapes and refuse `memory add`. If refused, redact the content and retry.
|
|
36
|
-
|
|
37
|
-
## CLI availability
|
|
38
|
-
|
|
39
|
-
Check the help first.
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
okstra memory --help
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
If `okstra` is not on PATH, do not run `npx okstra@latest install` directly; tell the user to install it once and then retry.
|
|
46
|
-
|
|
47
|
-
## project-group selection
|
|
48
|
-
|
|
49
|
-
Every memory entry belongs to a project-group. Pick the group before storing or searching.
|
|
50
|
-
|
|
51
|
-
Enumerate existing groups:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
okstra memory groups
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Recommendations:
|
|
58
|
-
|
|
59
|
-
- the most-used existing group
|
|
60
|
-
- the second existing group
|
|
61
|
-
- Enter directly
|
|
62
|
-
|
|
63
|
-
For a personal note, recommend `private` first. If there is no group or no selection, use the CLI default `global`.
|
|
64
|
-
|
|
65
|
-
Pass the chosen group to `add`, `search`, and `list` as `--project-group <group>`. Omit the flag only when the user explicitly wants a cross-group search.
|
|
66
|
-
|
|
67
|
-
## Store procedure
|
|
68
|
-
|
|
69
|
-
Do not store the full conversation transcript. Extract only durable memory worth keeping long-term and turn it into a concise Markdown summary.
|
|
70
|
-
|
|
71
|
-
Include:
|
|
72
|
-
|
|
73
|
-
- the reason for storing
|
|
74
|
-
- source: `conversation`
|
|
75
|
-
- `--project` when the related project id is clear
|
|
76
|
-
- tags for search
|
|
77
|
-
- memory type
|
|
78
|
-
|
|
79
|
-
The `okstra memory --help` output is authoritative for the type values. Categories per the source:
|
|
80
|
-
|
|
81
|
-
- `decision`
|
|
82
|
-
- `preference`
|
|
83
|
-
- `requirement`
|
|
84
|
-
- `person`
|
|
85
|
-
- `project-hint`
|
|
86
|
-
- `follow-up`
|
|
87
|
-
- `context`
|
|
88
|
-
|
|
89
|
-
Store command shape:
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
okstra memory add --content "<summary markdown>" --title "<short title>" --type <type> --project-group <group> --tag <tag> --project <id> --source conversation --yes
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Repeat `--tag` and `--project` as needed. Omit `--project` when no related project is clear.
|
|
96
|
-
|
|
97
|
-
Use `--yes` only when the user explicitly asked to save.
|
|
98
|
-
|
|
99
|
-
## search / read / archive
|
|
100
|
-
|
|
101
|
-
The default scope is the chosen project-group.
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
okstra memory search "<query>" --project-group "<group>"
|
|
105
|
-
okstra memory list --project-group "<group>" --tag "<tag>"
|
|
106
|
-
okstra memory groups
|
|
107
|
-
okstra memory show "<memory-id>"
|
|
108
|
-
okstra memory archive "<memory-id>"
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
Read IDs from the fixed text rows. Show the user only a short summary plus the entry id/path.
|
|
112
|
-
|
|
113
|
-
## Output rules
|
|
114
|
-
|
|
115
|
-
- On store, summarize title, type, project-group, tags, and the generated id.
|
|
116
|
-
- On search, show the match count and the most relevant entry first.
|
|
117
|
-
- Run archive only when the user's intent is clear.
|
|
118
|
-
- Do not write into a project `.okstra/`.
|
|
119
|
-
|
|
120
|
-
## Forbidden patterns
|
|
121
|
-
|
|
122
|
-
- Auto-saving without an explicit request.
|
|
123
|
-
- Storing a secret/token/key.
|
|
124
|
-
- Storing the full transcript verbatim.
|
|
125
|
-
- Writing into `.okstra/` as if it were project-local task memory.
|
|
126
|
-
- Performing a cross-group search by default when the user did not ask for it.
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# okstra-pr-gen AI Manual
|
|
2
|
-
|
|
3
|
-
## Sources
|
|
4
|
-
|
|
5
|
-
- Skill source: [`skills/okstra-pr-gen/SKILL.md`](../../../skills/okstra-pr-gen/SKILL.md)
|
|
6
|
-
- Template core (CLI): [`scripts/okstra_ctl/pr_template.py`](../../../scripts/okstra_ctl/pr_template.py)
|
|
7
|
-
- Node wrapper: [`src/commands/pr/pr.mjs`](../../../src/commands/pr/pr.mjs)
|
|
8
|
-
- Bundled default template: [`src/commands/pr/default.md`](../../../src/commands/pr/default.md)
|
|
9
|
-
|
|
10
|
-
## Purpose
|
|
11
|
-
|
|
12
|
-
`okstra-pr-gen` registers PR body templates and generates PR descriptions from a branch diff. Templates live in the user home at `~/.okstra/template/pr/`. This skill is **global** — it does not require `<PROJECT_ROOT>/.okstra/project.json`. PR generation additionally requires the current directory to be a git repository.
|
|
13
|
-
|
|
14
|
-
## Check CLI availability
|
|
15
|
-
|
|
16
|
-
A separate Bash call with a literal leading token:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
okstra pr --help
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
If `okstra` is not on PATH: `okstra not installed — run npx okstra@latest install once, then retry`. Every Bash command starts with the literal `okstra` token and passes literal arguments (do not wrap it in `$(...)`/leading `VAR=`/`if`/`eval`/`||`/`&&`).
|
|
23
|
-
|
|
24
|
-
## Pick the mode (always first)
|
|
25
|
-
|
|
26
|
-
A 3-option picker via `AskUserQuestion`:
|
|
27
|
-
|
|
28
|
-
1. `Generate PR` — generate a PR body from a branch diff
|
|
29
|
-
2. `Register template` — save a new PR body template
|
|
30
|
-
3. `Enter directly` — always last (okstra picker convention)
|
|
31
|
-
|
|
32
|
-
## Mode A — Generate PR
|
|
33
|
-
|
|
34
|
-
1. Pick a template: `okstra pr template list`. If the numbered `Templates` rows are empty, use the bundled default. Carry the chosen name as `<template>` (`default` for the bundled one).
|
|
35
|
-
2. Pick the base branch: `okstra pr branches`. Build a 3-option picker from the numbered `Recommended` rows plus `Enter directly`. Carry the choice as `<base>`.
|
|
36
|
-
3. Generation bundle: `okstra pr gen --base <base> --template <template>`. Read the fixed `Base`, `Current branch`, `Template name`, `Commits`, `Diff stat`, and `Template` sections. Then **read the real diff honestly** (SSOT): `git diff <base>...HEAD` (large diffs section by section). Fill the placeholders from the diff and commits, describing **only actual changes**. Mark a checklist box `[x]` only when the diff supports it (tests touched → tests box, docs touched → docs box). If `Commits` or `Diff stat` is empty, say there is nothing to describe and stop. **Never append AI trailers/footers.**
|
|
37
|
-
4. Identifier allowlist for the title and body: only repo-relative source paths (optionally `path:line`), symbol names present in the diff, branch names / commit subjects / SHAs, and issue-tracker ticket ids the reviewer can open. okstra's own artifact identifiers are out of the allowlist — report item ids (`F-001`, `C-001`, `R-001`, `D-0001`, `PREP-001`), run artifact names and their `<task-type>-<seq>` suffixes, phase/stage/worker labels (`final-verification`, `stage-2`, `codex-worker`), and any path under `.okstra/`. They resolve to nothing for a reviewer; restate the substance in code terms instead of citing the id.
|
|
38
|
-
5. Output and offer to create the PR: print the filled PR body as a single fenced markdown block. Ask whether to open a PR. **Only on an explicit yes**: write the body to a temp file and run `gh pr create --base <base> --title "<title>" --body-file <path>`. If `gh` is missing or unauthenticated (`gh auth status` fails), leave the text in chat and give manual-creation guidance. **No push/PR creation without the user's confirmation.**
|
|
39
|
-
|
|
40
|
-
## Mode B — Register template
|
|
41
|
-
|
|
42
|
-
1. Template name (`AskUserQuestion`, free text) — must match `^[A-Za-z0-9._-]+$`, otherwise re-ask.
|
|
43
|
-
2. body — pasted text or an absolute path.
|
|
44
|
-
3. Save: `okstra pr template add --name <name> --file <abs-path>` (or, for pasted text, `--content "<body>"`). Add `--yes` only when the user confirmed overwriting a same-named template. Report the saved path (`saved: ...`).
|
|
45
|
-
|
|
46
|
-
## Output Rules
|
|
47
|
-
|
|
48
|
-
- Not read-side — write actions (PR creation, template saving) happen only after the user's explicit confirmation.
|
|
49
|
-
- Do not invent changes not in the diff. Stop if commit/diffStat is empty.
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
# okstra-rollup AI Manual
|
|
2
|
-
|
|
3
|
-
## Source
|
|
4
|
-
|
|
5
|
-
- Skill source: [`skills/okstra-rollup/SKILL.md`](../../../skills/okstra-rollup/SKILL.md)
|
|
6
|
-
- aggregation core (CLI): [`scripts/okstra_ctl/rollup.py`](../../../scripts/okstra_ctl/rollup.py)
|
|
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)
|
|
8
|
-
- catalog enumeration helper: [`scripts/okstra_project/state.py`](../../../scripts/okstra_project/state.py) (`list_project_tasks`)
|
|
9
|
-
- unit tests: [`tests/inspect/test_okstra_rollup.py`](../../../tests/inspect/test_okstra_rollup.py)
|
|
10
|
-
|
|
11
|
-
## Purpose
|
|
12
|
-
|
|
13
|
-
`okstra-rollup` **collects and summarizes the run results of multiple tasks at once**. It is a cross-task read-side layer, in contrast to `okstra-inspect` which looks at a single task.
|
|
14
|
-
|
|
15
|
-
- Input scope: one task-group, or the whole-project catalog when `--task-group` is omitted.
|
|
16
|
-
- Deterministic aggregation (counts, time sums, error sums, status/category/phase distributions) is handled entirely by the `okstra rollup` CLI. The skill renders that table and reads each task's report body to write a **cross-task synthesis (digest)**.
|
|
17
|
-
- Design principle: hand-computed aggregation is error-prone for an LLM, so it is pushed to the CLI (SSOT), and only the natural-language synthesis is left to the LLM. This is the same division of labor as `okstra-inspect time`, which insists on "never re-sum the time by hand".
|
|
18
|
-
|
|
19
|
-
This skill is read-only. It does not mutate task artifacts.
|
|
20
|
-
|
|
21
|
-
## When to use
|
|
22
|
-
|
|
23
|
-
Use it when:
|
|
24
|
-
|
|
25
|
-
- The user asks for "rollup", "task-group summary", "group-level report", "collect multiple task results", "whole-project task status summary", "run results all at once".
|
|
26
|
-
- You want to look across **multiple tasks** rather than a single one.
|
|
27
|
-
|
|
28
|
-
Do not use it when:
|
|
29
|
-
|
|
30
|
-
- A single task's report/time/errors/recap → `okstra-inspect` (report / time / errors / recap facet).
|
|
31
|
-
- "Where does the group stand" — which briefs are done / in progress / not started, what is next, each task's latest conclusion → `okstra-inspect` recap facet with `--task-group`. rollup keeps the numbers (runs, time, errors) and the cross-task digest.
|
|
32
|
-
- A forward-looking work plan (a client-facing schedule of non-done tasks) → `okstra-schedule-gen`. rollup is **retrospective**, collecting past run results; schedule is **forward-looking**, planning future work.
|
|
33
|
-
- Actual phase execution → `okstra-run`.
|
|
34
|
-
|
|
35
|
-
## Preflight
|
|
36
|
-
|
|
37
|
-
A single Bash call starting with the literal `okstra` token (not wrapped in `if`/`eval`/`$(...)`/`VAR=`/`||`/`&&`/`npx` fallback):
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
okstra preflight --runtime claude-code
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
On `Okstra preflight: ready`, carry `Project root` as a literal string. On
|
|
44
|
-
`Okstra preflight: failed`, show `Reason` and `Recovery`, then stop.
|
|
45
|
-
|
|
46
|
-
## scope resolution
|
|
47
|
-
|
|
48
|
-
- The user named a task-group ("summarize the alpha group") → `--task-group <group>`.
|
|
49
|
-
- "all tasks" / "the whole project" / no scope named → omit `--task-group` (whole catalog).
|
|
50
|
-
- If genuinely ambiguous, ask once: one task-group or the whole project? Do not silently guess a specific group.
|
|
51
|
-
|
|
52
|
-
## CLI call
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
okstra rollup --task-group <group> --project-root <projectRoot> --text
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
For the whole project, drop `--task-group`. The output is fixed, ordered label/value rows, and **all times are raw milliseconds**.
|
|
59
|
-
|
|
60
|
-
## Interpreting the output
|
|
61
|
-
|
|
62
|
-
Fixed fields:
|
|
63
|
-
|
|
64
|
-
- `Task group` and `Task count` identify the scope.
|
|
65
|
-
- Numbered `Tasks` rows carry task identity, status, phase, next phase, report path, run count, CPU, wall-clock, and error count.
|
|
66
|
-
- `Totals runs`, `Totals CPU sum ms`, `Totals wall clock ms`, and `Totals errors` are the aggregate values.
|
|
67
|
-
- Numbered `Work status`, `Work category`, `Current phase`, and `Task type` rows carry the aggregate distributions.
|
|
68
|
-
|
|
69
|
-
Numeric meanings (must observe):
|
|
70
|
-
|
|
71
|
-
- `Run count` is the **total number of runs** in the timeline. CPU and wall-clock rows reflect only runs that reached Phase 7 usage, so they can be `0` even when run count is positive.
|
|
72
|
-
- `CPU sum ms` is the **CPU sum** of the overlapping lead + workers, not wall-clock.
|
|
73
|
-
- `Report path` is project-relative and may be `-` for a task with no report yet.
|
|
74
|
-
- If `Task count` is `0`, say there are no okstra tasks in that scope and stop.
|
|
75
|
-
|
|
76
|
-
## Render
|
|
77
|
-
|
|
78
|
-
Convert every `*Ms` to `HH:MM:SS` (zero-pad; never expose raw ms — the same rule as `okstra-inspect time`). Sort tasks by `updatedAt` descending.
|
|
79
|
-
|
|
80
|
-
```markdown
|
|
81
|
-
## okstra Rollup — <task-group or "whole project"> (<taskCount> tasks)
|
|
82
|
-
|
|
83
|
-
| Task | Category | workStatus | Phase | Runs | CPU | Errors | Report |
|
|
84
|
-
|------|----------|------------|-------|------|-----|--------|--------|
|
|
85
|
-
| DEV-1 | bugfix | done | final-verification | 2 | 00:25:00 | 2 | ✓ |
|
|
86
|
-
| DEV-2 | feature | in-progress | implementation | 1 | 00:00:00 | 0 | — |
|
|
87
|
-
|
|
88
|
-
**Totals:** 3 runs · CPU 00:25:00 · 2 errors
|
|
89
|
-
**workStatus:** done 1 · in-progress 1 **category:** bugfix 1 · feature 1
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
- `Report` column: `✓` when `reportPath` is present, `—` when not.
|
|
93
|
-
- Build the status/category/phase lines from the `totals` tally maps **verbatim**. Do not count the `tasks[]` array yourself (the CLI is the SSOT for aggregation).
|
|
94
|
-
|
|
95
|
-
## Writing the digest (the summary — the skill's core value)
|
|
96
|
-
|
|
97
|
-
When the user asks to "summarize"/"organize"/"summarize"/"digest" (the common case):
|
|
98
|
-
|
|
99
|
-
1. For each task with a non-empty `reportPath` whose `<projectRoot>/<reportPath>` file actually exists, read the report and summarize in 1–2 lines **what it accomplished and its recommended next step**.
|
|
100
|
-
2. Above the per-task lines, write a 2–4 sentence group-level synthesis: what was delivered across the group, where the open work sits (using `byWorkStatus`/`byCurrentPhase`), and whether there are error hot-spots (tasks with high `errorCount`).
|
|
101
|
-
3. Cite each per-task claim with the report path (`<reportPath>`) so the reader can open it directly.
|
|
102
|
-
|
|
103
|
-
For a task with no report, do not invent a summary; state the current phase/workStatus instead. Do not read non-report artifacts to fill the gap (artifact-home rule). If a report is empty or missing, say so.
|
|
104
|
-
|
|
105
|
-
If a deep single-task drill-down (full report, per-worker time, error breakdown, run-to-run recap) is needed, point the user to `/okstra-inspect`.
|
|
106
|
-
|
|
107
|
-
## Forbidden patterns
|
|
108
|
-
|
|
109
|
-
- Re-counting aggregate numbers (totals, distributions) by hand from `tasks[]`. `totals` is the SSOT.
|
|
110
|
-
- Exposing raw ms. Always `HH:MM:SS`.
|
|
111
|
-
- Labeling `cpuSumMs` as if it were wall-clock.
|
|
112
|
-
- Inventing a summary for a task with no report. Substitute the current phase/workStatus.
|
|
113
|
-
- Reading files outside okstra artifacts (non-`.okstra`) to fill the summary.
|
|
114
|
-
- Handling single-task detail in rollup. Send it to `okstra-inspect`.
|