okstra 0.26.0 → 0.27.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.kr.md +15 -0
- package/README.md +15 -0
- package/docs/kr/architecture.md +2 -6
- package/docs/kr/cli.md +40 -6
- package/docs/kr/performance-improvement-plan-v2.md +23 -0
- package/docs/kr/performance-improvement-plan.md +22 -0
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/bin/okstra.sh +0 -1
- package/runtime/prompts/profiles/_common-contract.md +25 -1
- package/runtime/prompts/profiles/error-analysis.md +12 -0
- package/runtime/prompts/profiles/implementation-planning.md +20 -0
- package/runtime/prompts/profiles/requirements-discovery.md +20 -0
- package/runtime/python/lib/okstra/cli.sh +1 -7
- package/runtime/python/lib/okstra/globals.sh +0 -1
- package/runtime/python/lib/okstra/usage.sh +1 -4
- package/runtime/python/okstra_ctl/render.py +3 -0
- package/runtime/python/okstra_ctl/run.py +0 -6
- package/runtime/python/okstra_ctl/run_context.py +1 -1
- package/runtime/python/okstra_ctl/wizard.py +25 -2
- package/runtime/python/okstra_token_usage/blocks.py +5 -1
- package/runtime/python/okstra_token_usage/claude.py +16 -1
- package/runtime/python/okstra_token_usage/collect.py +17 -3
- package/runtime/python/okstra_token_usage/pricing.py +159 -24
- package/runtime/skills/okstra-brief/SKILL.md +532 -65
- package/runtime/skills/okstra-context-loader/SKILL.md +25 -11
- package/runtime/skills/okstra-convergence/SKILL.md +37 -13
- package/runtime/skills/okstra-history/SKILL.md +68 -37
- package/runtime/skills/okstra-logs/SKILL.md +26 -4
- package/runtime/skills/okstra-report-finder/SKILL.md +49 -22
- package/runtime/skills/okstra-report-writer/SKILL.md +59 -64
- package/runtime/skills/okstra-run/SKILL.md +35 -34
- package/runtime/skills/okstra-schedule/SKILL.md +51 -20
- package/runtime/skills/okstra-setup/SKILL.md +31 -12
- package/runtime/skills/okstra-status/SKILL.md +20 -8
- package/runtime/skills/okstra-team-contract/SKILL.md +27 -15
- package/runtime/skills/okstra-time-summary/SKILL.md +53 -16
- package/runtime/templates/reports/settings.template.json +7 -4
- package/runtime/validators/lib/fixtures.sh +10 -2
- package/runtime/validators/lib/validate-assets.sh +50 -24
- package/runtime/validators/validate-brief.py +385 -0
- package/runtime/validators/validate-brief.sh +35 -0
- package/runtime/validators/validate-workflow.sh +7 -33
package/README.kr.md
CHANGED
|
@@ -4,6 +4,21 @@
|
|
|
4
4
|
>
|
|
5
5
|
> English: [`README.md`](README.md)
|
|
6
6
|
|
|
7
|
+
## 인덱스
|
|
8
|
+
|
|
9
|
+
- [1. 용도](#1-용도)
|
|
10
|
+
- [2. 구조](#2-구조)
|
|
11
|
+
- [2.1 repo 레이아웃](#21-repo-레이아웃)
|
|
12
|
+
- [2.2 설치 후 사용자 머신 레이아웃](#22-설치-후-사용자-머신-레이아웃)
|
|
13
|
+
- [2.3 단일 권위 요약](#23-단일-권위-요약)
|
|
14
|
+
- [3. 사용 매뉴얼](#3-사용-매뉴얼)
|
|
15
|
+
- [3.1 최초 셋업 (머신당 1회)](#31-최초-셋업-머신당-1회)
|
|
16
|
+
- [3.2 프로젝트 등록 (프로젝트당 1회)](#32-프로젝트-등록-프로젝트당-1회)
|
|
17
|
+
- [3.3 일상 명령](#33-일상-명령)
|
|
18
|
+
- [3.4 CLI 모드 (선택)](#34-cli-모드-선택)
|
|
19
|
+
- [3.5 운영 명령](#35-운영-명령)
|
|
20
|
+
- [4. 더 읽을 자료](#4-더-읽을-자료)
|
|
21
|
+
|
|
7
22
|
## 1. 용도
|
|
8
23
|
|
|
9
24
|
`okstra` 는 **Claude Code 안에서 lead + worker 모델로 작업을 cross-verify 하기 위한 정형화된 task 실행 러너**입니다. Claude lead 가 phase 진행을 주도하고, 독립된 분석 worker — **기본 Claude · Codex** (Gemini 는 옵션으로 명시할 때만 추가) — 와 최종 보고서 작성을 전담하는 report-writer 를 dispatch 합니다.
|
package/README.md
CHANGED
|
@@ -4,6 +4,21 @@
|
|
|
4
4
|
>
|
|
5
5
|
> 한국어 매뉴얼: [`README.kr.md`](README.kr.md)
|
|
6
6
|
|
|
7
|
+
## Index
|
|
8
|
+
|
|
9
|
+
- [1. Purpose](#1-purpose)
|
|
10
|
+
- [2. Structure](#2-structure)
|
|
11
|
+
- [2.1 Repo layout](#21-repo-layout)
|
|
12
|
+
- [2.2 User-machine layout after install](#22-user-machine-layout-after-install)
|
|
13
|
+
- [2.3 Single-authority map](#23-single-authority-map)
|
|
14
|
+
- [3. Manual](#3-manual)
|
|
15
|
+
- [3.1 First-time setup (once per machine)](#31-first-time-setup-once-per-machine)
|
|
16
|
+
- [3.2 Register a project (once per project)](#32-register-a-project-once-per-project)
|
|
17
|
+
- [3.3 Day-to-day commands](#33-day-to-day-commands)
|
|
18
|
+
- [3.4 CLI mode (optional)](#34-cli-mode-optional)
|
|
19
|
+
- [3.5 Ops commands](#35-ops-commands)
|
|
20
|
+
- [4. Further reading](#4-further-reading)
|
|
21
|
+
|
|
7
22
|
## 1. Purpose
|
|
8
23
|
|
|
9
24
|
`okstra` is a **structured task-execution runner for Claude Code that cross-verifies work with a lead + worker model**. The Claude lead drives phase progression and dispatches independent analysis workers — **Claude and Codex by default** (with **Gemini** available as an opt-in extra) — plus a dedicated report-writer for the final synthesis.
|
package/docs/kr/architecture.md
CHANGED
|
@@ -449,10 +449,7 @@ scripts/okstra.sh workflow가 사용하는 project-local Claude assets는 아래
|
|
|
449
449
|
- `.project-docs/okstra/discovery/latest-task.json`: 현재 프로젝트에서 가장 최근에 준비된 okstra task bundle을 가리키는 current-task convenience pointer
|
|
450
450
|
- `.project-docs/okstra/discovery/task-catalog.json`: 현재 프로젝트에 준비된 okstra task bundle 목록을 `taskKey`, `taskGroup`, `taskId` 기준으로 유지하는 canonical project-level catalog
|
|
451
451
|
- `instruction-set/reference-expectations.md`: 현재 task가 참조해야 할 config files, deployment manifests, expected values를 task-level canonical artifact로 정리한 파일
|
|
452
|
-
-
|
|
453
|
-
|
|
454
|
-
기본 rerun에서는 이미 존재하는 project-local asset을 유지합니다.
|
|
455
|
-
`--refresh-assets`를 주면 mapped okstra asset을 source 기준으로 다시 생성합니다.
|
|
452
|
+
- `~/.claude/skills/okstra-*/...`, `~/.claude/agents/...`: `okstra install` 이 사용자 홈에 seed하는 Claude asset (project-local 시딩은 더 이상 발생하지 않음 — `okstra install --refresh` 로 갱신)
|
|
456
453
|
|
|
457
454
|
이전의 아래 파일들은 더 이상 okstra 생성 대상이 아닙니다.
|
|
458
455
|
|
|
@@ -867,7 +864,6 @@ Claude가 작성하는 최종 보고서는 brief에 더 구체적인 형식이
|
|
|
867
864
|
- brief의 `Configuration References and Expected Values`, `Deployment Manifests and Expected Values` 섹션은 task별 expected state의 canonical source입니다.
|
|
868
865
|
- `task-type`가 프로필 선택까지 결정합니다.
|
|
869
866
|
- `--render-only`는 dry-run 확인용이지만 task bundle과 run manifest는 생성합니다.
|
|
870
|
-
- `--refresh-assets`는 `.claude/skills/`와 `.claude/agents/`의 okstra mapped asset을 source 기준으로 다시 생성합니다.
|
|
871
867
|
- 기본 실행은 Claude print-mode 수집이 아니라 interactive handoff입니다.
|
|
872
868
|
- 기본 최종 보고서 템플릿은 task bundle의 `instruction-set/final-report-template.md`에 렌더링됩니다.
|
|
873
869
|
- task bundle의 `instruction-set/reference-expectations.md`는 config/deployment expected-state reference로 함께 생성됩니다.
|
|
@@ -880,7 +876,7 @@ Claude가 작성하는 최종 보고서는 brief에 더 구체적인 형식이
|
|
|
880
876
|
- Executor 별 worktree cwd 주입: codex / gemini executor 는 wrapper(`okstra-codex-exec.sh -C` / `okstra-gemini-exec.sh --include-directories`) 가 CLI layer 에서 cwd 를 worktree 로 고정합니다. Claude executor 는 Bash tool 에 per-call cwd 인자가 없어 cwd 민감 toolchain (`cargo`/`npm`/`pnpm`/`bun`/`pytest`/`make`/`go`) 호출을 같은 Bash invocation 안에서 `cd {{EXECUTOR_WORKTREE_PATH}} && <cmd>` 로 prefix 합니다 — `bash -lc`/`bash -c` 래핑은 금지되며 (`cd` leading token 이 가려져 permission auto-allow 우회 실패), 작업 디렉터리 플래그 (`git -C`, `cargo --manifest-path` 등) 가 있으면 그것을 우선합니다. 자세한 규약은 `prompts/profiles/implementation.md` 의 *Executor Worktree* 블록과 `agents/workers/claude-worker.md` 의 Executor exception 항목 참고.
|
|
881
877
|
- project-level current-task convenience pointer는 `.project-docs/okstra/discovery/latest-task.json`입니다.
|
|
882
878
|
- project-level canonical task inventory는 `.project-docs/okstra/discovery/task-catalog.json`입니다.
|
|
883
|
-
-
|
|
879
|
+
- okstra Claude asset은 `~/.claude/skills/`와 `~/.claude/agents/` 아래에 `okstra install` 시점에 seed되며, `okstra install --refresh` 로 갱신할 수 있습니다 (per-project seeding은 더 이상 수행되지 않음).
|
|
884
880
|
- seeded okstra Claude assets는 Agent Teams 우선, sequential/background fallback 차선 규칙을 Claude에게 제공합니다.
|
|
885
881
|
- 최종 판단은 스크립트가 아니라 Claude가 수행합니다.
|
|
886
882
|
- stable task key를 유지해야 이후 bug 추적, 재수정, 재검증이 가능합니다.
|
package/docs/kr/cli.md
CHANGED
|
@@ -4,12 +4,51 @@
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## 인덱스
|
|
8
|
+
|
|
9
|
+
- [Command forms](#command-forms)
|
|
10
|
+
- [Required arguments](#required-arguments)
|
|
11
|
+
- [`--project-id`](#--project-id)
|
|
12
|
+
- [`--task-group`](#--task-group)
|
|
13
|
+
- [`--task-id`](#--task-id)
|
|
14
|
+
- [`--task-type`](#--task-type)
|
|
15
|
+
- [`--task-brief`](#--task-brief)
|
|
16
|
+
- [`--yes`](#--yes)
|
|
17
|
+
- [Optional arguments and options](#optional-arguments-and-options)
|
|
18
|
+
- [`--task-key`](#--task-key)
|
|
19
|
+
- [`--clarification-response`](#--clarification-response)
|
|
20
|
+
- [`--resume-clarification`](#--resume-clarification)
|
|
21
|
+
- [`--project-root`](#--project-root)
|
|
22
|
+
- [`--directive`](#--directive)
|
|
23
|
+
- [`--workers`](#--workers)
|
|
24
|
+
- [`--claude-model`](#--claude-model)
|
|
25
|
+
- [`--lead-model`](#--lead-model)
|
|
26
|
+
- [`--codex-model`](#--codex-model)
|
|
27
|
+
- [`--gemini-model`](#--gemini-model)
|
|
28
|
+
- [`--report-writer-model`](#--report-writer-model)
|
|
29
|
+
- [`--executor`](#--executor)
|
|
30
|
+
- [`--approved-plan`](#--approved-plan)
|
|
31
|
+
- [`--approve`](#--approve)
|
|
32
|
+
- [`--work-category`](#--work-category)
|
|
33
|
+
- [`--related-tasks`](#--related-tasks)
|
|
34
|
+
- [`--render-only`](#--render-only)
|
|
35
|
+
- [Interactive input flow](#interactive-input-flow)
|
|
36
|
+
- [Confirmation flow](#confirmation-flow)
|
|
37
|
+
- [okstra Control Center — 설치 / 자주 쓰는 명령](#okstra-control-center--설치--자주-쓰는-명령)
|
|
38
|
+
- [okstra Control Center](#okstra-control-center)
|
|
39
|
+
- [설치 (전역 wrapper)](#설치-전역-wrapper)
|
|
40
|
+
- [자주 쓰는 명령](#자주-쓰는-명령)
|
|
41
|
+
- [`okstra` Node CLI — introspection subcommands](#okstra-node-cli--introspection-subcommands)
|
|
42
|
+
- [Live-log sidecar](#live-log-sidecar)
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
7
46
|
## Command forms
|
|
8
47
|
|
|
9
48
|
기본 명령(첫 진입 / full args):
|
|
10
49
|
|
|
11
50
|
```bash
|
|
12
|
-
scripts/okstra.sh [--render-only] [--yes] [--
|
|
51
|
+
scripts/okstra.sh [--render-only] [--yes] [--no-plan-verification] --task-type <task-type> [--workers worker1,worker2] [--lead-model <model>] [--claude-model <model>] [--codex-model <model>] [--gemini-model <model>] [--report-writer-model <model>] [--executor claude|codex|gemini] [--related-tasks taskA,taskB] [--work-category bugfix|feature|refactor|ops|improvement|unknown] [--clarification-response <previous-final-report>] [--approved-plan <plan-path>] [--approve] --project-id <project-id> --task-group <task-group> --task-id <task-id> --task-brief <brief-path> [--directive <directive>]
|
|
13
52
|
```
|
|
14
53
|
|
|
15
54
|
후속 phase 단축 형식(기존 task-manifest.json이 존재할 때):
|
|
@@ -394,11 +433,6 @@ scripts/okstra.sh --task-type error-analysis --related-tasks scanner-regression,
|
|
|
394
433
|
- `history/timeline.json` 갱신
|
|
395
434
|
- project-level discovery pointer 생성 또는 갱신
|
|
396
435
|
|
|
397
|
-
### `--refresh-assets`
|
|
398
|
-
|
|
399
|
-
project-local `.claude/skills/`와 `.claude/agents/` 아래의 okstra mapped asset을 workspace source 기준으로 다시 생성합니다.
|
|
400
|
-
기본 rerun에서는 기존 project-local asset을 유지합니다.
|
|
401
|
-
|
|
402
436
|
### `--no-plan-verification`
|
|
403
437
|
|
|
404
438
|
`implementation-planning` task-type 의 Phase 6 plan-body verification 라운드를 끕니다. 기본값은 활성. 다른 task-type 에서는 무시됩니다.
|
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# okstra-run 성능 개선 계획 v2
|
|
2
2
|
|
|
3
|
+
## 인덱스
|
|
4
|
+
|
|
5
|
+
- [1. 목적](#1-목적)
|
|
6
|
+
- [2. 현재 구조 요약](#2-현재-구조-요약)
|
|
7
|
+
- [2.1 진입점](#21-진입점)
|
|
8
|
+
- [2.2 두 종류의 phase를 구분한다](#22-두-종류의-phase를-구분한다)
|
|
9
|
+
- [2.3 prepare 단계의 비용 특성](#23-prepare-단계의-비용-특성)
|
|
10
|
+
- [2.4 worker 구조](#24-worker-구조)
|
|
11
|
+
- [3. 성능 병목 가설](#3-성능-병목-가설)
|
|
12
|
+
- [4. 측정 기준](#4-측정-기준)
|
|
13
|
+
- [5. 개선 우선순위](#5-개선-우선순위)
|
|
14
|
+
- [P0. Baseline 계측과 용어 정리](#p0-baseline-계측과-용어-정리)
|
|
15
|
+
- [P1. Convergence 재검증 범위 축소](#p1-convergence-재검증-범위-축소)
|
|
16
|
+
- [P2. Prompt diet: analysis worker 입력 축소](#p2-prompt-diet-analysis-worker-입력-축소)
|
|
17
|
+
- [P3. Fast-track routing](#p3-fast-track-routing)
|
|
18
|
+
- [P4. Prompt caching 가능성 검증](#p4-prompt-caching-가능성-검증)
|
|
19
|
+
- [P5. Prepare render 병렬화](#p5-prepare-render-병렬화)
|
|
20
|
+
- [P6. Token usage 증분화](#p6-token-usage-증분화)
|
|
21
|
+
- [6. 병렬 작업 계획](#6-병렬-작업-계획)
|
|
22
|
+
- [7. P1 구현 체크리스트](#7-p1-구현-체크리스트)
|
|
23
|
+
- [8. 리스크와 방어선](#8-리스크와-방어선)
|
|
24
|
+
- [9. 이번 계획의 결론](#9-이번-계획의-결론)
|
|
25
|
+
|
|
3
26
|
## 1. 목적
|
|
4
27
|
|
|
5
28
|
`okstra-run` 스킬 또는 `scripts/okstra.sh`로 시작하는 cross-verification run이 무겁게 느껴지는 문제를 줄인다. 이 문서는 현재 구조를 정확한 레이어로 나누고, 개선 후보의 우선순위, 측정 기준, 병렬 작업 가능성, 1차 구현 범위를 정리한다.
|
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# okstra-run 성능 개선 계획
|
|
2
2
|
|
|
3
|
+
## 인덱스
|
|
4
|
+
|
|
5
|
+
- [1. 배경](#1-배경)
|
|
6
|
+
- [2. 현재 구조 요약](#2-현재-구조-요약)
|
|
7
|
+
- [2.1 진입점](#21-진입점)
|
|
8
|
+
- [2.2 라이프사이클 (Phase 1~7)](#22-라이프사이클-phase-17)
|
|
9
|
+
- [2.3 워커 구조](#23-워커-구조)
|
|
10
|
+
- [2.4 핵심 파이프라인](#24-핵심-파이프라인)
|
|
11
|
+
- [3. 무거움의 원인 분석](#3-무거움의-원인-분석)
|
|
12
|
+
- [4. 개선 방안 우선순위](#4-개선-방안-우선순위)
|
|
13
|
+
- [4.1 (P1) Convergence 루프 축소](#41-p1-convergence-루프-축소--본-작업의-1번-대상)
|
|
14
|
+
- [4.2 (P2) 프롬프트 캐싱 적용](#42-p2-프롬프트-캐싱-적용)
|
|
15
|
+
- [4.3 (P3) Phase 1 fast-track 라우팅](#43-p3-phase-1-fast-track-라우팅)
|
|
16
|
+
- [4.4 (P4) 워커 정의 공통부 추출 / 템플릿 슬림화](#44-p4-워커-정의-공통부-추출--템플릿-슬림화)
|
|
17
|
+
- [4.5 (P5~) Render 병렬화, token-usage 증분화](#45-p5-render-병렬화-token-usage-증분화)
|
|
18
|
+
- [5. 병렬 작업 가능성](#5-병렬-작업-가능성)
|
|
19
|
+
- [5.1 의존성 매트릭스](#51-의존성-매트릭스)
|
|
20
|
+
- [5.2 권장 분할](#52-권장-분할)
|
|
21
|
+
- [5.3 실행 형태](#53-실행-형태)
|
|
22
|
+
- [6. P1 작업 착수 시 다음 단계](#6-p1-작업-착수-시-다음-단계)
|
|
23
|
+
- [7. 트레이드오프 / 리스크](#7-트레이드오프--리스크)
|
|
24
|
+
|
|
3
25
|
## 1. 배경
|
|
4
26
|
|
|
5
27
|
`okstra-run` 스킬(또는 `scripts/okstra.sh`)을 통한 cross-verification 실행이 무겁게 느껴진다는 사용자 피드백을 바탕으로, 현재 파이프라인 구조를 분석하고 개선 후보를 도출한다. 본 문서는 분석 결과와 우선순위, 그리고 병렬 작업 가능성을 정리한다.
|
package/package.json
CHANGED
package/runtime/BUILD.json
CHANGED
package/runtime/bin/okstra.sh
CHANGED
|
@@ -121,7 +121,6 @@ PY_ARGS=(
|
|
|
121
121
|
[[ -n "${WORK_CATEGORY-}" ]] && PY_ARGS+=(--work-category "$WORK_CATEGORY")
|
|
122
122
|
[[ -n "${BASE_REF-}" ]] && PY_ARGS+=(--base-ref "$BASE_REF")
|
|
123
123
|
[[ "$RENDER_ONLY" == "true" ]] && PY_ARGS+=(--render-only)
|
|
124
|
-
[[ "$REFRESH_OKSTRA_ASSETS" == "true" ]] && PY_ARGS+=(--refresh-assets)
|
|
125
124
|
[[ "$PLAN_VERIFICATION_ENABLED" == "false" ]] && PY_ARGS+=(--no-plan-verification)
|
|
126
125
|
|
|
127
126
|
if [[ "$RENDER_ONLY" == "true" ]]; then
|
|
@@ -37,10 +37,34 @@ profile document.
|
|
|
37
37
|
- On `아니오` / `n` / `keep` → leave the panes intact; remind the user that they will be cleaned up automatically when Claude `/exit` fires the `SessionEnd` hook.
|
|
38
38
|
- The question MUST be a clean yes/no — do NOT offer "close some / keep some" partial answers, do NOT propose alternatives like "close only codex panes". The whole-set decision keeps the wrap-up predictable.
|
|
39
39
|
- This step is mandatory for every phase (`requirements-discovery`, `error-analysis`, `implementation-planning`, `implementation`, `final-verification`, `release-handoff`). It is silent-skipped when `$TMUX_PANE` is unset (lead running outside tmux); the lead MUST NOT fabricate a synthetic pane list in that case.
|
|
40
|
+
- Brief handoff contract (shared — applies whenever the run consumes a task brief produced by `okstra-brief`):
|
|
41
|
+
- the brief is a **pre-discovery artifact**: it converts a domain-reporter's words (non-expert *or* developer) into expert-consumable form so this and later phases can run with zero fill-in questions to the operator. The brief is **not** authoritative on solution decisions; it is authoritative on the reporter's intent.
|
|
42
|
+
- **Reporter confirmation precondition (BLOCKING)**: the brief's frontmatter carries `reporter-confirmations: <complete | partial | pending | skipped>` set by `okstra-brief` Step 6.5. Every phase that consumes the brief MUST read this field before doing analysis. The handling matrix is:
|
|
43
|
+
- `complete` → proceed normally.
|
|
44
|
+
- `partial` → proceed; treat still-unmarked `intent-check:` / `conversion-block:` rows as the `skipped` branch.
|
|
45
|
+
- `skipped` → do NOT silently infer the missing answers. Promote each unmarked `intent-check:` / `conversion-block:` row into this run's `## 5. Clarification Items` as `Kind=decision`. Use `Blocks=approval` in `implementation-planning`, where the row gates the User Approval Request; otherwise use `Blocks=next-phase`. The recommended answer is drawn from the brief's matching content and clearly labelled `보고자 직접 확인 권장`.
|
|
46
|
+
- `pending` (or field missing) → ABORT analysis; write only `## 0. Reporter Confirmation Required` summarising which rows are pending. The final report carries `Blocks=approval` in `implementation-planning`, otherwise `Blocks=next-phase`. The operator must rerun `okstra-brief` Step 6.5.
|
|
47
|
+
`[CONFIRMED <YYYY-MM-DD> → RC-N]` markers on `Open Questions` rows are the per-row signal that the reporter has answered; their answers live verbatim under `## Reporter Confirmations` in the brief.
|
|
48
|
+
- `Source Material` is reporter-verbatim. Do NOT paraphrase, summarize, reorder, or restructure it. Quote it directly when needed.
|
|
49
|
+
- `Augmentation` entries carry one of four labels — `evidence-link`, `format-conversion`, `terminology-mapping`, `intent-inference`. Treat them as follows:
|
|
50
|
+
- `evidence-link` / `format-conversion` → trust without re-verification.
|
|
51
|
+
- `terminology-mapping` → verify against `<PROJECT_ROOT>/.project-docs/okstra/glossary.md` (authoritative); raise a `Clarification Items` row if the mapping is missing or contradicts the glossary.
|
|
52
|
+
- `intent-inference` → treat as an **unverified hypothesis**. Every `intent-inference` augmentation MUST be paired in the brief with an `Open Questions` row prefixed `intent-check:`. Promote that row into the run's `## 5. Clarification Items` table as `Kind=decision, Blocks=next-phase` (or `Blocks=approval` for `implementation-planning`) with the recommended answer set to "보고자에게 직접 확인 후 응답" unless the codebase can be inspected to confirm or refute the inference.
|
|
53
|
+
- `Open Questions` row prefixes are signals — do not strip them when promoting:
|
|
54
|
+
- `intent-check:` → `Kind=decision`, recommended answer = reporter confirmation. NEVER silently resolve an `intent-check:` by inference at this layer.
|
|
55
|
+
- `terminology:` → `Kind=decision`, recommended answer = canonical term from `<PROJECT_ROOT>/.project-docs/okstra/glossary.md` (or "extend okstra glossary via brief Step 4.5").
|
|
56
|
+
- `conversion-block:` → `Kind=decision`, recommended answer = "보고자에게 직접 확인". The brief is explicitly signalling that translation failed; further inference is forbidden until the reporter clarifies.
|
|
57
|
+
- `adr-candidate:` → handled by `implementation-planning`; carry forward without modification. Approved decision files land at `<PROJECT_ROOT>/.project-docs/okstra/decisions/<NNNN>-<slug>.md` (okstra-internal), never at external `<PROJECT_ROOT>/docs/adr/`.
|
|
58
|
+
- `general:` → free-form; classify per the standard `Clarification Items` rules.
|
|
59
|
+
- Any decision in this run that contradicts the brief's `Source Material` must be raised back to the reporter via a `Clarification Items` row; it must NOT be silently overridden. Disagreement with the reporter is allowed only after the row is resolved.
|
|
60
|
+
- This contract is the single authority on brief consumption. Phase-specific addenda may *tighten* these rules but may not relax them.
|
|
40
61
|
- Clarification request policy (shared — applies whenever a profile uses `## 5. Clarification Items`):
|
|
62
|
+
- **Canonical column schema (SSOT — must match `templates/reports/final-report.template.md` §5.1 exactly):** every `## 5. Clarification Items` table has exactly these 8 columns, in this order:
|
|
63
|
+
`| ID | Ticket ID | Kind | Statement | Expected form | Blocks | Status | User input |`.
|
|
64
|
+
Profile-specific addenda may tighten cell content but MUST NOT add, remove, rename, or reorder columns. The `ID` cell uses `C-NNN` (3-digit zero-padded), the `Status` cell ∈ `{open, answered, resolved, obsolete}`, and the `Kind` / `Blocks` legal values are listed below.
|
|
41
65
|
- section 5 is a **single unified table** per `final-report-template.md`. Every clarification item — whether the user must attach a file, choose between options, or supply a single number/path — is one row of that table. Do not split it into sub-sections, do not create a parallel table elsewhere in the report, and do not duplicate the same item into `## 4.5.8 User Approval Request` or any other section.
|
|
42
66
|
- each row's `Kind` column picks one of `{material, decision, data-point}`: `material` for files / snapshots / logs / screenshots the user must attach (the `User input` cell will hold a path or URL); `decision` for choices and yes/no confirmations only the user can make; `data-point` for a single number, ID, date, or short string the user can answer inline. Items that mix "yes/no + file path if yes" are one row of `Kind=material` with the combined expectation written into `Expected form`.
|
|
43
|
-
- each row's `Blocks` column picks one of `{approval, next-phase, none}`. `approval` is reserved for items that gate the `implementation-planning` User Approval Request
|
|
67
|
+
- each row's `Blocks` column picks one of `{approval, next-phase, none}`. `approval` is reserved for items that gate an approval action, especially the `implementation-planning` User Approval Request; outside `implementation-planning`, unresolved brief reporter-confirmation rows use `next-phase` instead. `next-phase` blocks the next run from starting cleanly. `none` is informational/audit-only.
|
|
44
68
|
- write every entry in full, descriptive sentences that a non-developer can act on without further context. Avoid abbreviations and internal jargon. The `Statement` cell must state *what* is needed, *why* the answer / attachment changes the next step, and (for `material`) *where* the user can find it and *where* to place it. The `Expected form` cell must state the shape of the answer (예/아니오, 보기 중 하나, 숫자/날짜, 파일 경로, 짧은 서술 등); supply concrete option choices when applicable.
|
|
45
69
|
- the same `final-report.md` file is the canonical artifact carried into the next run; the user appends answers inline before rerunning. The preferred turn-around is `scripts/okstra.sh --resume-clarification --task-key <project-id>:<task-group>:<task-id>` (opens the latest report in `$EDITOR`, then auto-reruns the same phase with `--clarification-response` carry-in). The lower-level form `--clarification-response <path>` remains available for scripted runs.
|
|
46
70
|
- if a clarification response was carried in for this run, walk every `C-*` row of the prior report's `## 5. Clarification Items` table in section 0 of this report, reconcile each one against new evidence, and update its `Status` to `resolved` or `obsolete` before issuing the next decision/verdict.
|
|
@@ -8,6 +8,15 @@
|
|
|
8
8
|
- Optional workers (opt-in via `--workers`):
|
|
9
9
|
- gemini — when added to the roster it joins the analyser set; omitted by default
|
|
10
10
|
{{INCLUDE:_common-contract.md}}
|
|
11
|
+
- Brief consumption (phase-specific addendum — shared rules live in `_common-contract.md` under "Brief handoff contract"):
|
|
12
|
+
- **Precondition check (BLOCKING — runs before any analysis)**: read the brief's frontmatter `reporter-confirmations:` field and inspect every `Open Questions` row prefixed `intent-check:` / `conversion-block:` for the `[CONFIRMED …]` marker.
|
|
13
|
+
- `reporter-confirmations: complete` → proceed normally.
|
|
14
|
+
- `reporter-confirmations: partial` → proceed; treat still-unmarked `intent-check:` / `conversion-block:` rows per the `skipped` branch below.
|
|
15
|
+
- `reporter-confirmations: skipped` (or `partial` with remainder) → do NOT silently infer the missing answers. Promote each unmarked `intent-check:` / `conversion-block:` row into this run's `## 5. Clarification Items` as `Kind=decision, Blocks=next-phase`, with the recommended answer drawn from the brief's matching `intent-inference` / `conversion-block:` text and clearly labelled `보고자 직접 확인 권장`. Then proceed with the root-cause analysis using the inference as a *hypothesis* only.
|
|
16
|
+
- `reporter-confirmations: pending` (or field missing) → ABORT analysis. Write only `## 0. Reporter Confirmation Required` summarising which rows are pending and stop. The final report carries `Blocks=next-phase`.
|
|
17
|
+
- the reporter's symptom description in `Source Material` is the ground truth for what to reproduce. Do not paraphrase it when stating the symptom in the report; quote it.
|
|
18
|
+
- any `intent-inference` augmentation that re-characterises the symptom (e.g. classifying "가끔 안 됨" as "intermittent failure on a specific code path") is a **hypothesis**, not a confirmed symptom. If `[CONFIRMED …]` appears on the matching `intent-check:` row, treat the confirmation as the symptom; otherwise, follow the precondition's `skipped` branch above and keep the inference labelled as hypothesis in the root-cause analysis.
|
|
19
|
+
- `conversion-block:` rows mean the brief could not map a reporter statement to project vocabulary; never attempt to invent the missing mapping in this phase — the precondition above already handled them.
|
|
11
20
|
- Primary focus areas:
|
|
12
21
|
- symptom and trigger clarification
|
|
13
22
|
- root-cause candidates
|
|
@@ -22,6 +31,9 @@
|
|
|
22
31
|
- Clarification request policy (phase-specific addenda — shared policy is in `_common-contract.md`):
|
|
23
32
|
- if any blocking uncertainty remains at the time of writing the final report, populate `## 5. Clarification Items` in `final-report-template.md` (a single unified table; `Blocks=next-phase` for items the next run cannot start without)
|
|
24
33
|
- prefer plain Korean over abbreviations (e.g. write "초당 평균 요청 수" instead of "QPS", "재현 절차" instead of "repro")
|
|
34
|
+
- every clarification row carries a `Recommended` answer + one-line rationale; rows that lack a recommendation are rejected as half-formed.
|
|
35
|
+
- **Codebase-first ambiguity resolution (defect rule)**: any ambiguity about repro, file behavior, or symbol semantics that can be answered by `Read` / `Grep` / log inspection MUST be resolved that way and recorded with file:line (or log-line) evidence. Writing a clarification row for something the codebase or shipped logs already answer is a defect of this phase.
|
|
36
|
+
- **`evidence-checked:` cell required**: every clarification row carries an `evidence-checked: <path:line> | none` cell. `evidence-checked: <path:line>` means the codebase / log / reproducer was inspected and the row records what was found. `evidence-checked: none` is allowed ONLY when the row's nature is "only the reporter can answer this" (reporter-side data, business priority, environment they observed); the row body must state which one in one line. A row with `evidence-checked: none` that *could* have been answered by code or logs is a defect.
|
|
25
37
|
- Non-goals:
|
|
26
38
|
- implementation details unless they are necessary to validate the cause
|
|
27
39
|
- **source code edits, builds, migrations, or deployments** — this run produces evidence and cause analysis only; the fix belongs to a later `implementation-planning` run followed by an `implementation` run
|
|
@@ -8,11 +8,21 @@
|
|
|
8
8
|
- Optional workers (opt-in via `--workers`):
|
|
9
9
|
- gemini — when added to the roster it joins the analyser set; omitted by default
|
|
10
10
|
{{INCLUDE:_common-contract.md}}
|
|
11
|
+
- Brief consumption (phase-specific addendum — shared rules live in `_common-contract.md` under "Brief handoff contract"):
|
|
12
|
+
- **Precondition check (BLOCKING — runs before option drafting)**: read the brief's frontmatter `reporter-confirmations:` field and inspect every `Open Questions` row prefixed `intent-check:` / `conversion-block:` for the `[CONFIRMED …]` marker.
|
|
13
|
+
- `reporter-confirmations: complete` → proceed normally.
|
|
14
|
+
- `reporter-confirmations: partial` → proceed; treat still-unmarked `intent-check:` / `conversion-block:` rows per the `skipped` branch below.
|
|
15
|
+
- `reporter-confirmations: skipped` (or `partial` with remainder) → do NOT silently infer the missing answers. Promote each unmarked `intent-check:` / `conversion-block:` row into this run's `## 5. Clarification Items` as `Kind=decision, Blocks=approval`, with the recommended answer drawn from the brief's matching `intent-inference` / `conversion-block:` text and clearly labelled `보고자 직접 확인 권장`. Then proceed; the operator cannot toggle `User Approval Request` until those rows are resolved.
|
|
16
|
+
- `reporter-confirmations: pending` (or field missing) → ABORT planning. Write only `## 0. Reporter Confirmation Required` summarising which rows are pending and stop. The final report carries `Blocks=approval`.
|
|
17
|
+
- never plan around an unconfirmed `intent-inference` augmentation as if it were a settled requirement. After the precondition runs, a `[CONFIRMED …]` marker on the matching `intent-check:` row is the signal that the inference can be treated as settled; otherwise it remains a `Blocks=approval` clarification item per the precondition's `skipped` branch.
|
|
18
|
+
- `conversion-block:` rows are handled by the precondition; planning around an untranslated reporter phrase is forbidden until it is resolved.
|
|
11
19
|
- Pre-planning context exploration (mandatory before option drafting):
|
|
12
20
|
- read the task brief, related-task briefs, and any cited spec / design doc end-to-end
|
|
13
21
|
- inspect the current state of every file the task names (or the closest matching files if names are stale) — record current responsibilities, public interfaces, and known coupling points
|
|
14
22
|
- skim recent commits touching those files (`git log -- <path>`) to surface in-flight work or contested areas
|
|
23
|
+
- **codebase-first ambiguity resolution**: any ambiguity that can be answered by `Read` / `Grep` MUST be resolved that way and recorded with file:line evidence. Only ambiguities that genuinely require a human decision are escalated as `Clarification Items` rows. Writing a clarification row for something the code already answers is a defect of this phase.
|
|
15
24
|
- flag any requirement that is ambiguous, contradictory, or missing success criteria — register each one as a row in the report's `## 5. Clarification Items` table with `Blocks=approval` instead of guessing
|
|
25
|
+
- read in priority order — (authoritative) `<PROJECT_ROOT>/.project-docs/okstra/glossary.md` and `<PROJECT_ROOT>/.project-docs/okstra/decisions/` titles if present; (supplementary) `<PROJECT_ROOT>/CONTEXT.md` (or `CONTEXT-MAP.md` → per-context `CONTEXT.md`) and `<PROJECT_ROOT>/docs/adr/` titles if present. Absent external files are the normal state — do not error. Treat the brief's `terminology:*` resolutions from `requirements-discovery` (if any) as authoritative; if missing, resolve any remaining fuzzy term as a `Blocks=approval` clarification row.
|
|
16
26
|
- Primary focus areas:
|
|
17
27
|
- requirement gaps
|
|
18
28
|
- affected components and boundaries
|
|
@@ -38,6 +48,9 @@
|
|
|
38
48
|
- this run stays in `implementation-planning` regardless of user phrasing — the shared anti-escalation rule applies
|
|
39
49
|
- dispatching parallel sub-agents beyond the required worker roster — okstra owns worker fan-out
|
|
40
50
|
- writing artifacts to `docs/superpowers/specs/` or `docs/superpowers/plans/` — the run's `reports/` directory is the canonical location
|
|
51
|
+
- Clarification request policy (phase-specific addenda — shared policy is in `_common-contract.md`):
|
|
52
|
+
- every clarification row carries a `Recommended` answer + one-line rationale; rows that lack a recommendation are rejected as half-formed.
|
|
53
|
+
- **`evidence-checked:` cell required**: every clarification row carries an `evidence-checked: <path:line> | none` cell. `evidence-checked: <path:line>` means the codebase was inspected and the row records what was found. `evidence-checked: none` is allowed ONLY when the row's nature is "only a human can answer this" (reporter intent, business priority, organisational decision); the row body must state which one in one line. A row with `evidence-checked: none` that *could* have been answered by the codebase is a defect of this phase, restated from the pre-planning rule above.
|
|
41
54
|
- Section heading contract (BLOCKING — validator scans for these literal English substrings):
|
|
42
55
|
- The final report MUST include section headings containing each of the following exact strings: `Option Candidates`, `Trade-off`, `Recommended Option`, `Stepwise Execution Order`, `Dependency`, `Validation Checklist`, `Rollback`, `User Approval Request`.
|
|
43
56
|
- Korean translations are allowed in parentheses (e.g. `### Recommended Option (권장 옵션)`), but the English keyword must be present verbatim in the heading line.
|
|
@@ -60,6 +73,13 @@
|
|
|
60
73
|
- **the marker line is rendered only when the plan-body verification gate (§4.5.9) returns `passed` or `passed-with-dissent`.** When the gate returns `blocked-by-disagreement` or `aborted-non-result`, the top-of-report Approval block is rendered **without** the canonical `- [ ] Approved` bullet (the rest of the block — title, summary, audit lines — stays). The `validators/validate-run.py` `validate_phase_boundary` function enforces this exact correspondence between gate result and marker line presence.
|
|
61
74
|
- every ambiguity flagged during pre-planning that the user must resolve before approval registered as a `Blocks=approval` row in the `## 5. Clarification Items` table (do NOT create a separate `Open Questions` block under `4.5.x` — the unified table is the single home)
|
|
62
75
|
- **§4.5.9 Plan Body Verification (BLOCKING).** After report-writer finishes the draft, the lead MUST run a worker peer-review round on the consolidated plan body (sections 4.5.1 – 4.5.7) and populate `### 4.5.9 Plan Body Verification` in the final report. The round protocol, plan-item ID scheme (`P-Opt-*` / `P-Step-*` / `P-Dep-*` / `P-Val-*` / `P-Rb-*`), verdict semantics, gate-result classification, and dissent log format are defined in `skills/okstra-convergence/SKILL.md` "Plan-body verification mode". The four gate-result values are `passed`, `passed-with-dissent`, `blocked-by-disagreement`, `aborted-non-result`. When the gate would have been `blocked-by-disagreement` or `aborted-non-result`, the lead MUST NOT silently flip it to one of the passing values to "unblock" the run — that is a contract violation.
|
|
76
|
+
- **ADR evaluation (grill-with-docs adopted, sole owner)**: this phase is the **single owner** of ADR evaluation in the okstra lifecycle. The brief never evaluates or drafts ADRs — it only forwards `adr-candidate:*` signals. Every `adr-candidate:*` entry inherited from the brief's `Open Questions` is a mandatory evaluation target. In addition, evaluate every decision the recommended option introduces against the three ADR criteria:
|
|
77
|
+
1. **Hard to reverse** — would changing the decision later cost meaningfully more than deciding now?
|
|
78
|
+
2. **Surprising without context** — would a future reader, seeing only the code, wonder "why was it built this way?"?
|
|
79
|
+
3. **Real trade-off** — were there named alternatives, and was one picked for specific reasons?
|
|
80
|
+
If **all three** hold, attach a decision draft as a report appendix section titled `Decision Drafts` (one decision per subsection). Each draft uses the `## Context / ## Decision / ## Consequences / ## Alternatives Considered` shape, names the alternatives that were rejected and why, and starts with `## Status: Proposed`. The next decision number is `(max existing in <PROJECT_ROOT>/.project-docs/okstra/decisions/ + 1)` zero-padded to 4 digits. If any of the three criteria is missing, do NOT raise a decision draft — instead record `skipped adr-candidate: <topic> — reason: <criterion that failed>` on one line under `Decision Drafts` so the next reader knows the candidate was evaluated and intentionally dropped.
|
|
81
|
+
The drafts are NOT written by this phase. The approved plan's stepwise execution order MUST include the step `Create <PROJECT_ROOT>/.project-docs/okstra/decisions/<NNNN>-<slug>.md from the decision draft in section X` so the `implementation` run commits the file. External `<PROJECT_ROOT>/docs/adr/` is never touched.
|
|
82
|
+
- **Domain-doc proposals**: if `CONTEXT.md` / `CONTEXT-MAP.md` needs a new term or edited definition, add the step `Update CONTEXT.md: <term> = <definition>` to the stepwise execution order. Do NOT edit the file in this phase.
|
|
63
83
|
- No-placeholder rule (plan failures — reject any option or step that contains these):
|
|
64
84
|
- "TBD", "TODO", "implement later", "fill in details", "add appropriate error handling", "handle edge cases", "write tests for the above" without actual test code
|
|
65
85
|
- "similar to Option/Task N" without repeating the concrete content (readers may consume sections out of order)
|
|
@@ -8,19 +8,39 @@
|
|
|
8
8
|
- Optional workers (opt-in via `--workers`):
|
|
9
9
|
- gemini — when added to the roster it joins the analyser set; omitted by default
|
|
10
10
|
{{INCLUDE:_common-contract.md}}
|
|
11
|
+
- Brief consumption (phase-specific addendum — shared rules live in `_common-contract.md` under "Brief handoff contract"):
|
|
12
|
+
- **Precondition check (BLOCKING — runs before any analysis)**: read the brief's frontmatter `reporter-confirmations:` field and inspect every `Open Questions` row prefixed `intent-check:` / `conversion-block:` for the `[CONFIRMED …]` marker.
|
|
13
|
+
- `reporter-confirmations: complete` → proceed normally (no unresolved reporter-only rows).
|
|
14
|
+
- `reporter-confirmations: partial` → proceed; treat the still-unmarked `intent-check:` / `conversion-block:` rows per the `skipped` branch below.
|
|
15
|
+
- `reporter-confirmations: skipped` (or `partial` with remainder) → do NOT silently infer the missing answers. Promote each unmarked `intent-check:` / `conversion-block:` row into this run's `## 5. Clarification Items` as `Kind=decision, Blocks=next-phase`, with the recommended answer drawn from the brief's matching `intent-inference` / `conversion-block:` text and clearly labelled `보고자 직접 확인 권장`. Then proceed with the rest of the classification work.
|
|
16
|
+
- `reporter-confirmations: pending` (or field missing) → ABORT analysis. Write only `## 0. Reporter Confirmation Required` summarising which rows are pending and stop. The operator must rerun `okstra-brief` Step 6.5 to collect answers, then restart this phase. The final report carries `Blocks=next-phase`.
|
|
17
|
+
- before classifying (after the precondition passes), scan the brief for every `Open Questions` row prefixed `intent-check:` / `terminology:` / `conversion-block:` and every `Augmentation` entry labelled `intent-inference` / `terminology-mapping`. Each one is a translation signal that this phase must resolve OR carry forward.
|
|
18
|
+
- `intent-inference` augmentations whose paired `intent-check:` row carries `[CONFIRMED …]` are treated as **confirmed**; trust the confirmation text in `## Reporter Confirmations` over the original inference if they differ. Unconfirmed `intent-inference` rows under `reporter-confirmations: skipped` follow the precondition's `skipped` branch above.
|
|
19
|
+
- `conversion-block:` rows are explicit "translation failed" signals — never attempt to resolve them by inference here; the precondition above already handled them.
|
|
11
20
|
- Primary focus areas:
|
|
12
21
|
- classify the work as bugfix, feature, improvement, refactor, or ops-change
|
|
13
22
|
- determine whether `error-analysis` or `implementation-planning` is the next safe step; direct `implementation` handoff is not a valid routing target because implementation requires an approved `implementation-planning` report
|
|
14
23
|
- identify missing materials that block reliable routing
|
|
15
24
|
- define task continuity expectations for long-running work under the same task key
|
|
16
25
|
- capture approval or confirmation points before the next phase starts
|
|
26
|
+
- **domain alignment check**: read in priority order — (authoritative) `<PROJECT_ROOT>/.project-docs/okstra/glossary.md` and `<PROJECT_ROOT>/.project-docs/okstra/decisions/` titles if present; (supplementary) `<PROJECT_ROOT>/CONTEXT.md` (or `CONTEXT-MAP.md` → per-context `CONTEXT.md`) and `<PROJECT_ROOT>/docs/adr/` titles if present. Absent external files are normal — do not error. Validate that every `terminology:*` entry under the brief's `Open Questions` has a canonical resolution before routing. Fuzzy or overloaded terms in the brief MUST be resolved to a single canonical term in this phase.
|
|
27
|
+
- Decision-tree walk (grill-me adopted, bounded):
|
|
28
|
+
- When the brief's `Desired Outcome`, classification, or routing target depends on a chain of decisions, walk that chain one branch at a time. Each branch is one `Clarification Items` row, not a free-form interview.
|
|
29
|
+
- For every clarification row, write the row's `Recommended` cell with the single best answer plus a one-line rationale. Other options are listed in `Alternatives` with one-sentence consequences.
|
|
30
|
+
- **Codebase-first rule**: if a branch can be resolved by `Read` / `Grep` / file inspection, resolve it that way and record the evidence in the same row's `Evidence` cell. Do NOT escalate to the user.
|
|
31
|
+
- Budget: the unified `## 5. Clarification Items` table caps at the smaller of (a) one row per unresolved decision branch, (b) 8 rows total. Beyond the cap, fold remaining ambiguity into the routing recommendation's risk notes.
|
|
17
32
|
- Expected output emphasis:
|
|
18
33
|
- evidence-backed routing decision
|
|
19
34
|
- uncertainty boundaries and missing inputs
|
|
20
35
|
- next recommended phase and safe resume guidance
|
|
36
|
+
- canonical-term resolution for every `terminology:*` brief item, written as a one-line `<term> = <definition>` line in a new `Domain Alignment` subsection of the final report; alongside each, propose whether `<PROJECT_ROOT>/.project-docs/okstra/glossary.md` should be updated (proposal only — actual writes happen via `okstra-brief` Step 4.5 on a subsequent run)
|
|
21
37
|
- Clarification request policy (phase-specific addenda — shared policy is in `_common-contract.md`):
|
|
22
38
|
- if any blocking input is missing at the time of writing the final report, populate `## 5. Clarification Items` in `final-report-template.md` (a single unified table; `Blocks=next-phase` for items the next run cannot start without)
|
|
23
39
|
- prefer concrete questions whose answers map directly to a routing decision (`bugfix` vs `feature`, `error-analysis` vs `implementation-planning`, etc.). State each option in plain language with one sentence describing what choosing it would mean for the next phase.
|
|
40
|
+
- every clarification row carries a `Recommended` answer + one-line rationale; rows that lack a recommendation are rejected as half-formed.
|
|
41
|
+
- **Codebase-first ambiguity resolution (defect rule)**: any ambiguity that can be answered by `Read` / `Grep` / file inspection MUST be resolved that way and recorded with file:line evidence. Writing a clarification row for something the codebase already answers is a defect of this phase.
|
|
42
|
+
- **`evidence-checked:` cell required**: every clarification row carries an `evidence-checked: <path:line> | none` cell. `evidence-checked: <path:line>` means the codebase was inspected and the row records what was found (or that the code did not contain the answer). `evidence-checked: none` is allowed ONLY when the row's nature is "only a human can answer this" (reporter intent, business priority, external authority); the row body must state which one in one line. A row with `evidence-checked: none` that *could* have been answered by the codebase is a defect.
|
|
24
43
|
- Non-goals:
|
|
25
44
|
- full implementation design unless it is required to decide the next phase
|
|
26
45
|
- **source code edits, plan authoring, builds, or deployments** — this run only classifies the work and routes it; deeper analysis and planning belong to subsequent phases
|
|
46
|
+
- **edits to any path outside `<PROJECT_ROOT>/.project-docs/okstra/`** — okstra never writes to external paths. Glossary additions land in `<PROJECT_ROOT>/.project-docs/okstra/glossary.md` (via `okstra-brief` Step 4.5); decision drafts land in `<PROJECT_ROOT>/.project-docs/okstra/decisions/` (via `implementation-planning`). External `<PROJECT_ROOT>/CONTEXT.md` / `CONTEXT-MAP.md` / `docs/adr/` are read-only references.
|
|
@@ -102,12 +102,6 @@ while [[ $# -gt 0 ]]; do
|
|
|
102
102
|
ASSUME_YES="true"
|
|
103
103
|
shift
|
|
104
104
|
;;
|
|
105
|
-
--refresh-assets)
|
|
106
|
-
printf 'warning: --refresh-assets is deprecated. okstra now installs into ~/.claude and ~/.okstra via okstra-install.sh.\n' >&2
|
|
107
|
-
printf ' re-run "%s/scripts/okstra-install.sh --refresh" to refresh installed assets.\n' "$WORKSPACE_ROOT" >&2
|
|
108
|
-
REFRESH_OKSTRA_ASSETS="true"
|
|
109
|
-
shift
|
|
110
|
-
;;
|
|
111
105
|
--workers)
|
|
112
106
|
WORKERS_OVERRIDE="$(require_option_value --workers "${2-}")"
|
|
113
107
|
shift 2
|
|
@@ -231,7 +225,7 @@ while [[ $# -gt 0 ]]; do
|
|
|
231
225
|
printf ' hint: did you mean --task-id?\n' >&2
|
|
232
226
|
;;
|
|
233
227
|
esac
|
|
234
|
-
printf ' valid options: --render-only --resume-clarification --yes --
|
|
228
|
+
printf ' valid options: --render-only --resume-clarification --yes --workers --lead-model --claude-model --codex-model --gemini-model --report-writer-model --related-tasks --task-type --project-id --project-root --task-group --task-id --task-brief --directive --clarification-response --approved-plan --approve --no-plan-verification -h|--help\n' >&2
|
|
235
229
|
usage
|
|
236
230
|
exit 1
|
|
237
231
|
;;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
usage() {
|
|
4
4
|
cat >&2 <<USAGE_EOF
|
|
5
5
|
usage:
|
|
6
|
-
$DISPLAY_COMMAND_NAME [--render-only] [--yes] [--
|
|
6
|
+
$DISPLAY_COMMAND_NAME [--render-only] [--yes] [--no-plan-verification] --task-type <task-type> [--workers worker1,worker2] [--lead-model <model>] [--claude-model <model>] [--codex-model <model>] [--gemini-model <model>] [--report-writer-model <model>] [--executor claude|codex|gemini] [--related-tasks taskA,taskB] --project-id <project-id> [--project-root <path>] --task-group <task-group> --task-id <task-id> --task-brief <brief-path> [--directive <directive>]
|
|
7
7
|
|
|
8
8
|
summary:
|
|
9
9
|
$DISPLAY_TOOL_NAME prepares a task-keyed instruction bundle for Claude Code and launches an interactive Claude session by default.
|
|
@@ -69,9 +69,6 @@ options:
|
|
|
69
69
|
(--project-id/--task-group/--task-id or --task-key). Mutually
|
|
70
70
|
exclusive with --clarification-response and --approved-plan.
|
|
71
71
|
--yes Skip interactive prompting and confirmation. Requires all required arguments.
|
|
72
|
-
--refresh-assets Deprecated. okstra now installs skills/agents into ~/.claude and the codex
|
|
73
|
-
wrapper into ~/.okstra/bin via scripts/okstra-install.sh. Re-run that
|
|
74
|
-
installer with --refresh to update installed assets.
|
|
75
72
|
--workers Comma-separated worker list for this run. Default: claude,codex,report-writer
|
|
76
73
|
(Gemini worker is optional; add `gemini` explicitly, e.g. --workers claude,codex,gemini,report-writer)
|
|
77
74
|
--lead-model Model for Claude lead. Default: OKSTRA_DEFAULT_LEAD_MODEL or opus
|
|
@@ -338,6 +338,9 @@ def render_task_catalog_discovery(output_path: str, ctx: dict) -> None:
|
|
|
338
338
|
"taskType": s(manifest, "taskType"),
|
|
339
339
|
"workCategory": s(manifest, "workCategory"),
|
|
340
340
|
"currentStatus": s(manifest, "currentStatus"),
|
|
341
|
+
"workStatus": s(manifest, "workStatus"),
|
|
342
|
+
"workStatusUpdatedAt": s(manifest, "workStatusUpdatedAt"),
|
|
343
|
+
"workStatusNote": s(manifest, "workStatusNote"),
|
|
341
344
|
"updatedAt": s(manifest, "updatedAt"),
|
|
342
345
|
"currentPhase": (workflow or {}).get("currentPhase", "") if isinstance(workflow, dict) else "",
|
|
343
346
|
"currentPhaseState": (workflow or {}).get("currentPhaseState", "") if isinstance(workflow, dict) else "",
|
|
@@ -113,7 +113,6 @@ class PrepareInputs:
|
|
|
113
113
|
# project.json → global config → 스킬 디폴트 순으로 해석된다.
|
|
114
114
|
pr_template_path: str = ""
|
|
115
115
|
render_only: bool = False
|
|
116
|
-
refresh_assets: bool = False
|
|
117
116
|
approve_plan_ack: bool = False
|
|
118
117
|
# Phase 6 plan-body verification opt-out. Default True (round runs after
|
|
119
118
|
# report-writer draft). Flipped to False by CLI `--no-plan-verification`.
|
|
@@ -385,8 +384,6 @@ def _canonical_argv(inp: PrepareInputs, ctx: dict) -> list[str]:
|
|
|
385
384
|
argv.extend([flag, val])
|
|
386
385
|
if inp.render_only:
|
|
387
386
|
argv.append("--render-only")
|
|
388
|
-
if inp.refresh_assets:
|
|
389
|
-
argv.append("--refresh-assets")
|
|
390
387
|
if not inp.plan_verification_enabled:
|
|
391
388
|
argv.append("--no-plan-verification")
|
|
392
389
|
argv.append("--yes")
|
|
@@ -806,7 +803,6 @@ def prepare_task_bundle(inp: PrepareInputs) -> PrepareOutputs:
|
|
|
806
803
|
"approvedPlanPath": inp.approved_plan_path,
|
|
807
804
|
"clarificationResponsePath": inp.clarification_response_path,
|
|
808
805
|
"renderOnly": inp.render_only,
|
|
809
|
-
"refreshAssets": inp.refresh_assets,
|
|
810
806
|
},
|
|
811
807
|
)
|
|
812
808
|
|
|
@@ -923,7 +919,6 @@ def main(argv: list[str]) -> int:
|
|
|
923
919
|
),
|
|
924
920
|
)
|
|
925
921
|
p.add_argument("--render-only", action="store_true", dest="render_only")
|
|
926
|
-
p.add_argument("--refresh-assets", action="store_true", dest="refresh_assets")
|
|
927
922
|
p.add_argument(
|
|
928
923
|
"--no-plan-verification",
|
|
929
924
|
action="store_false",
|
|
@@ -1000,7 +995,6 @@ def main(argv: list[str]) -> int:
|
|
|
1000
995
|
clarification_response_path=clarification_abs,
|
|
1001
996
|
pr_template_path=args.pr_template_path,
|
|
1002
997
|
render_only=args.render_only,
|
|
1003
|
-
refresh_assets=args.refresh_assets,
|
|
1004
998
|
approve_plan_ack=args.approve_plan_ack,
|
|
1005
999
|
plan_verification_enabled=args.plan_verification_enabled,
|
|
1006
1000
|
)
|
|
@@ -140,7 +140,7 @@ def write_run_inputs(
|
|
|
140
140
|
inputs schema (모든 키 optional):
|
|
141
141
|
taskBriefPath, directive, workers, leadModel, claudeModel, codexModel,
|
|
142
142
|
geminiModel, reportWriterModel, relatedTasks, approvedPlanPath,
|
|
143
|
-
clarificationResponsePath, renderOnly
|
|
143
|
+
clarificationResponsePath, renderOnly
|
|
144
144
|
"""
|
|
145
145
|
run_manifests_dir = Path(run_manifests_dir)
|
|
146
146
|
path = run_manifests_dir / _run_inputs_filename(task_type_segment, seq)
|
|
@@ -1398,7 +1398,7 @@ def _cli(argv: list[str]) -> int:
|
|
|
1398
1398
|
|
|
1399
1399
|
Subcommands:
|
|
1400
1400
|
init --state-file PATH --workspace-root P --project-root P --project-id ID
|
|
1401
|
-
step --state-file PATH
|
|
1401
|
+
step --state-file PATH (--answer VALUE | --no-submit)
|
|
1402
1402
|
render-args --state-file PATH
|
|
1403
1403
|
confirmation --state-file PATH
|
|
1404
1404
|
"""
|
|
@@ -1416,6 +1416,11 @@ def _cli(argv: list[str]) -> int:
|
|
|
1416
1416
|
p_step = sub.add_parser("step")
|
|
1417
1417
|
p_step.add_argument("--state-file", required=True)
|
|
1418
1418
|
p_step.add_argument("--answer", default=None)
|
|
1419
|
+
p_step.add_argument(
|
|
1420
|
+
"--no-submit",
|
|
1421
|
+
action="store_true",
|
|
1422
|
+
help="Fetch the current prompt without submitting an answer.",
|
|
1423
|
+
)
|
|
1419
1424
|
|
|
1420
1425
|
p_render = sub.add_parser("render-args")
|
|
1421
1426
|
p_render.add_argument("--state-file", required=True)
|
|
@@ -1440,8 +1445,26 @@ def _cli(argv: list[str]) -> int:
|
|
|
1440
1445
|
|
|
1441
1446
|
if args.cmd == "step":
|
|
1442
1447
|
state = load_state_file(state_path)
|
|
1448
|
+
if args.no_submit and args.answer is not None:
|
|
1449
|
+
print(json.dumps(
|
|
1450
|
+
{"ok": False, "error": "--no-submit and --answer are mutually exclusive"},
|
|
1451
|
+
ensure_ascii=False, indent=2,
|
|
1452
|
+
))
|
|
1453
|
+
return 2
|
|
1454
|
+
if not args.no_submit and args.answer is None:
|
|
1455
|
+
print(json.dumps(
|
|
1456
|
+
{
|
|
1457
|
+
"ok": False,
|
|
1458
|
+
"error": (
|
|
1459
|
+
"step requires --answer VALUE (use --answer '' to submit an "
|
|
1460
|
+
"empty value, or --no-submit to peek at the current prompt)"
|
|
1461
|
+
),
|
|
1462
|
+
},
|
|
1463
|
+
ensure_ascii=False, indent=2,
|
|
1464
|
+
))
|
|
1465
|
+
return 2
|
|
1443
1466
|
try:
|
|
1444
|
-
if args.
|
|
1467
|
+
if args.no_submit:
|
|
1445
1468
|
result = {"echo": "", "next": next_prompt(state).to_json()}
|
|
1446
1469
|
else:
|
|
1447
1470
|
result = submit(state, args.answer)
|
|
@@ -18,18 +18,21 @@ def usage_block(totals: dict, source: str, note: str | None = None) -> dict:
|
|
|
18
18
|
"source": source,
|
|
19
19
|
"collectedAt": utc_now(),
|
|
20
20
|
}
|
|
21
|
-
for key in ("cacheCreationTokens", "
|
|
21
|
+
for key in ("cacheCreationTokens", "cacheCreation5mTokens", "cacheCreation1hTokens",
|
|
22
|
+
"cacheReadTokens", "cachedInputTokens",
|
|
22
23
|
"reasoningOutputTokens", "cachedTokens", "thoughtsTokens", "toolTokens"):
|
|
23
24
|
if totals.get(key):
|
|
24
25
|
block[key] = totals[key]
|
|
25
26
|
|
|
26
27
|
# Billable-equivalent + cost.
|
|
27
28
|
if source == "claude-jsonl":
|
|
29
|
+
cc_1h = totals.get("cacheCreation1hTokens", 0) or 0
|
|
28
30
|
be = claude_billable_equivalent(
|
|
29
31
|
totals.get("inputTokens", 0) or 0,
|
|
30
32
|
totals.get("cacheCreationTokens", 0) or 0,
|
|
31
33
|
totals.get("cacheReadTokens", 0) or 0,
|
|
32
34
|
totals.get("outputTokens", 0) or 0,
|
|
35
|
+
cache_create_1h_t=cc_1h,
|
|
33
36
|
)
|
|
34
37
|
block["billableEquivalentTokens"] = be
|
|
35
38
|
cost = claude_cost_usd(
|
|
@@ -38,6 +41,7 @@ def usage_block(totals: dict, source: str, note: str | None = None) -> dict:
|
|
|
38
41
|
totals.get("cacheCreationTokens", 0) or 0,
|
|
39
42
|
totals.get("cacheReadTokens", 0) or 0,
|
|
40
43
|
totals.get("outputTokens", 0) or 0,
|
|
44
|
+
cache_create_1h_t=cc_1h,
|
|
41
45
|
)
|
|
42
46
|
if cost is not None:
|
|
43
47
|
block["estimatedCostUsd"] = cost
|