okstra 0.36.1 → 0.37.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.
Files changed (66) hide show
  1. package/README.kr.md +6 -6
  2. package/README.md +6 -6
  3. package/bin/okstra +4 -2
  4. package/docs/kr/architecture.md +29 -29
  5. package/docs/kr/cli.md +7 -6
  6. package/docs/pr-template-usage.md +2 -2
  7. package/docs/project-structure-overview.md +4 -4
  8. package/docs/superpowers/plans/2026-05-25-okstra-project-root-rename.md +159 -0
  9. package/docs/superpowers/plans/2026-05-26-wizard-3-option-picker.md +860 -0
  10. package/docs/task-process/common-flow.md +2 -2
  11. package/package.json +1 -1
  12. package/runtime/BUILD.json +2 -2
  13. package/runtime/agents/SKILL.md +2 -2
  14. package/runtime/agents/workers/claude-worker.md +1 -1
  15. package/runtime/prompts/profiles/_common-contract.md +6 -6
  16. package/runtime/prompts/profiles/_implementation-executor.md +2 -2
  17. package/runtime/prompts/profiles/_implementation-verifier.md +1 -1
  18. package/runtime/prompts/profiles/final-verification.md +1 -1
  19. package/runtime/prompts/profiles/implementation-planning.md +5 -5
  20. package/runtime/prompts/profiles/release-handoff.md +1 -1
  21. package/runtime/prompts/profiles/requirements-discovery.md +3 -3
  22. package/runtime/prompts/wizard/prompts.ko.json +80 -6
  23. package/runtime/python/lib/okstra/interactive.sh +2 -2
  24. package/runtime/python/lib/okstra/project-resolver.sh +1 -1
  25. package/runtime/python/lib/okstra/usage.sh +5 -5
  26. package/runtime/python/lib/okstra-ctl/cmd-rerun.sh +1 -1
  27. package/runtime/python/okstra_ctl/backfill.py +5 -3
  28. package/runtime/python/okstra_ctl/migrate.py +408 -0
  29. package/runtime/python/okstra_ctl/paths.py +12 -3
  30. package/runtime/python/okstra_ctl/pr_template.py +4 -2
  31. package/runtime/python/okstra_ctl/render.py +8 -6
  32. package/runtime/python/okstra_ctl/render_final_report.py +4 -1
  33. package/runtime/python/okstra_ctl/run.py +5 -5
  34. package/runtime/python/okstra_ctl/seeding.py +12 -6
  35. package/runtime/python/okstra_ctl/sequence.py +3 -1
  36. package/runtime/python/okstra_ctl/wizard.py +412 -77
  37. package/runtime/python/okstra_ctl/worktree.py +8 -6
  38. package/runtime/python/okstra_project/__init__.py +35 -5
  39. package/runtime/python/okstra_project/dirs.py +67 -0
  40. package/runtime/python/okstra_project/resolver.py +8 -8
  41. package/runtime/python/okstra_project/state.py +11 -9
  42. package/runtime/python/okstra_token_usage/collect.py +3 -1
  43. package/runtime/python/okstra_token_usage/report.py +6 -2
  44. package/runtime/skills/okstra-brief/SKILL.md +30 -30
  45. package/runtime/skills/okstra-context-loader/SKILL.md +7 -7
  46. package/runtime/skills/okstra-inspect/SKILL.md +25 -25
  47. package/runtime/skills/okstra-run/templates/pr-body.template.md +1 -1
  48. package/runtime/skills/okstra-schedule/SKILL.md +7 -7
  49. package/runtime/skills/okstra-setup/SKILL.md +8 -8
  50. package/runtime/templates/okstra.CLAUDE.md +4 -4
  51. package/runtime/templates/reports/brief.template.md +5 -5
  52. package/runtime/templates/reports/task-brief.template.md +1 -1
  53. package/runtime/validators/lib/fixtures.sh +2 -2
  54. package/runtime/validators/lib/paths.sh +9 -3
  55. package/runtime/validators/validate-brief.py +2 -2
  56. package/runtime/validators/validate-brief.sh +1 -1
  57. package/runtime/validators/validate-run.py +3 -1
  58. package/runtime/validators/validate-workflow.sh +2 -2
  59. package/src/check-project.mjs +3 -3
  60. package/src/config.mjs +6 -5
  61. package/src/install.mjs +5 -5
  62. package/src/migrate.mjs +163 -0
  63. package/src/okstra-dirs.mjs +37 -0
  64. package/src/paths.mjs +17 -0
  65. package/src/setup.mjs +8 -4
  66. package/src/uninstall.mjs +3 -3
package/README.kr.md CHANGED
@@ -79,7 +79,7 @@ okstra/ npm 패키지 = repo 루트
79
79
  └── {claude,codex,gemini,report-writer}-worker.md worker subagent 정의
80
80
  (multi-agent dispatch 필수)
81
81
 
82
- <프로젝트 루트>/.project-docs/okstra/
82
+ <프로젝트 루트>/.okstra/
83
83
  ├── project.json {projectId, projectRoot, ...} (`/okstra-setup` 이 작성)
84
84
  ├── discovery/{task-catalog,latest-task}.json
85
85
  ├── glossary.md okstra-owned project terminology
@@ -95,7 +95,7 @@ okstra/ npm 패키지 = repo 루트
95
95
  | agents/prompts/schemas/templates/validators | npm 패키지의 `runtime/` | `okstra` 패키지 자체 (`okstra paths` 로 해석) |
96
96
  | 스킬 마크다운 | `~/.claude/skills/<name>/SKILL.md` | `okstra install` (`installed-skills.json` 에 트래킹) |
97
97
  | 워커 에이전트 마크다운 | `~/.claude/agents/<worker>.md` | `okstra install` (`installed-agents.json` 에 트래킹) |
98
- | 프로젝트 메타데이터 | `<project>/.project-docs/okstra/` | `/okstra-setup` + 프로젝트 자체 |
98
+ | 프로젝트 메타데이터 | `<project>/.okstra/` | `/okstra-setup` + 프로젝트 자체 |
99
99
  | Run 인덱스 | `~/.okstra/{recent,active}.jsonl` | `prepare_task_bundle` |
100
100
 
101
101
  ## 3. 사용 매뉴얼
@@ -145,7 +145,7 @@ npx -y okstra@latest setup --project-id <id> # 예: INV-1234, my-app, okstra
145
145
  /okstra-setup
146
146
  ```
147
147
 
148
- 둘 다 `<project>/.project-docs/okstra/project.json` 을 작성합니다. CLI 는 `--project-id` 가 주어지면 non-interactive 로 동작하므로 CI 에서 사용할 수 있고, 슬래시 커맨드는 `AskUserQuestion` 으로 prompt 합니다. 이 파일이 존재하기 전에는 다른 모든 사용자 스킬이 실행을 거부합니다.
148
+ 둘 다 `<project>/.okstra/project.json` 을 작성합니다. CLI 는 `--project-id` 가 주어지면 non-interactive 로 동작하므로 CI 에서 사용할 수 있고, 슬래시 커맨드는 `AskUserQuestion` 으로 prompt 합니다. 이 파일이 존재하기 전에는 다른 모든 사용자 스킬이 실행을 거부합니다.
149
149
 
150
150
  ### 3.3 일상 명령
151
151
 
@@ -187,12 +187,12 @@ Claude Code 세션 밖에서 task 를 시작하려면:
187
187
 
188
188
  - **모든 task-type 격리 worktree 자동 provisioning** — prepare 단계에서 `okstra-ctl` 이 task-key 당 한 번 `git worktree add ~/.okstra/worktrees/<project-id>/<task-group-segment>/<task-id-segment>` 를 수행해 격리된 working tree 와 브랜치 `<work-category-prefix>-<task-id-segment>` (예: `feat-dev-9436`, `fix-dev-7311`) 를 만듭니다. base ref 는 사용자가 `--base-ref` 로 지정 (release-handoff PR base picker 와 동일한 메뉴: `main` / `dev` / `staging` / `preprod` / `prod` / 직접 입력). 첫 phase 에서는 필수이며, okstra-run skill 이 `AskUserQuestion` 으로 수집합니다 — 비대화형 호출자는 `--base-ref` 플래그를 직접 전달해야 prepare 가 통과합니다. 같은 task-key 의 모든 후속 phase(`requirements-discovery` → `error-analysis` → `implementation-planning` → `implementation` → `final-verification` → `release-handoff`)는 같은 path/branch를 재사용합니다. caller 가 이미 다른 worktree 안에 있거나 project_root 가 git repo 가 아니면 provisioning 은 skip 됩니다. 수동 cleanup: `git worktree remove <path>` → `git branch -D <branch>` + registry 항목 release/remove. 상세: [`docs/kr/architecture.md`](docs/kr/architecture.md) *Task type* 섹션, [`docs/kr/cli.md#--executor`](docs/kr/cli.md#--executor).
189
189
  - **`release-handoff` lifecycle phase** — `final-verification` 이 `verdict=accepted` 를 반환한 직후에 실행되는 신규 phase. lead 가 Claude worker (drafter) 를 통해 commit message · PR body 후보를 만들고, `AskUserQuestion` 으로 사용자에게 (1) action (`commit only` / `commit + PR` / `skip`), (2) PR base branch (`staging` / `preprod` / `prod` / `main` / `dev` / 직접 입력), (3) message handling (`use as-is` / `edit then proceed` / `cancel`) 세 가지를 순서대로 묻습니다. 사용자가 메뉴로 선택한 git / gh 명령만 실행되고, force-push, base 브랜치 직접 push, hook bypass (`--no-verify`), release publish (`gh release`, `npm publish`, ...) 는 금지됩니다. 이 phase 에서는 소스 코드를 수정하지 않습니다. profile: [`prompts/profiles/release-handoff.md`](prompts/profiles/release-handoff.md).
190
- - **PR 본문 템플릿 설정** (release-handoff) — PR 본문은 마크다운 템플릿에서 채워집니다. 해석 우선순위: 1회성 override (`--pr-template-path` 또는 okstra-run Step 6 prompt) → `<project_root>/.project-docs/okstra/project.json` 의 `prTemplatePath` → `~/.okstra/config.json` 의 `prTemplatePath` → 스킬 디폴트 `~/.claude/skills/okstra-run/templates/pr-body.template.md`. 템플릿 등록 명령: `okstra config set pr-template-path <path> [--scope project|global]` (project 스코프는 project root 기준 상대경로 허용, global 스코프는 절대경로 또는 `~/` 시작 경로만 허용). 현재 설정 확인: `okstra config get pr-template-path --scope all` 은 각 스코프 값 + 실제로 우승하는 경로(effective) 까지 보여줍니다. 디폴트 템플릿은 `## Summary` / `## Changes` / `## Test plan` / `## Linked issues` 4 섹션 + HTML 주석으로 lead 작성 가이드를 포함하며, PR 생성 직전에 lead 가 주석을 제거합니다.
190
+ - **PR 본문 템플릿 설정** (release-handoff) — PR 본문은 마크다운 템플릿에서 채워집니다. 해석 우선순위: 1회성 override (`--pr-template-path` 또는 okstra-run Step 6 prompt) → `<project_root>/.okstra/project.json` 의 `prTemplatePath` → `~/.okstra/config.json` 의 `prTemplatePath` → 스킬 디폴트 `~/.claude/skills/okstra-run/templates/pr-body.template.md`. 템플릿 등록 명령: `okstra config set pr-template-path <path> [--scope project|global]` (project 스코프는 project root 기준 상대경로 허용, global 스코프는 절대경로 또는 `~/` 시작 경로만 허용). 현재 설정 확인: `okstra config get pr-template-path --scope all` 은 각 스코프 값 + 실제로 우승하는 경로(effective) 까지 보여줍니다. 디폴트 템플릿은 `## Summary` / `## Changes` / `## Test plan` / `## Linked issues` 4 섹션 + HTML 주석으로 lead 작성 가이드를 포함하며, PR 생성 직전에 lead 가 주석을 제거합니다.
191
191
  - **프로파일 워커 로스터 검증** — `--workers <csv>` 와 okstra-run Step 6 의 워커 prompt 는 해당 프로파일의 `Required workers:` 블록에 선언된 워커 ID 만 허용합니다. 프로파일에 없는 워커 (예: `release-handoff` 에서 `codex` / `gemini`) 를 요청하면 명확한 에러로 거절되고, 인터랙티브 prompt 도 프로파일이 실제로 받는 워커만 보여줍니다.
192
192
  - **다단계 `implementation-planning` / `implementation`** — `implementation-planning` 은 항상 Stage Map + N 개 stage 섹션으로 산출합니다. 각 stage 의 step 은 ≤ 6 이며 `depends-on (none)` 인 stage 들은 별도 `implementation` run 으로 병렬 실행할 수 있습니다. 각 `implementation` 호출은 한 stage 만 실행하고 (`--stage <auto|N>`), 자동 생성되는 evidence sidecar (`carry/stage-<N>.json`) 가 다음 stage 의 carry-in 으로 흡수됩니다. `implementation-planning` run 디렉터리에 `consumers.jsonl` 역링크가 누적되어 어느 run 이 어느 stage 를 소비했는지 추적됩니다.
193
193
  - **Phase 6 plan-body verification (implementation-planning 전용)** — Report writer worker 가 final-report draft 를 작성한 직후, 사용자 승인 gate 직전에 lead 가 1 라운드의 사후 검증을 추가로 돌립니다. 합성된 `## 4.5` plan 본문에서 `P-Opt-*` / `P-Step-*` / `P-Dep-*` / `P-Val-*` / `P-Rb-*` plan-item 을 추출해 모든 analyser 워커에게 `AGREE` / `DISAGREE(a-e)` / `SUPPLEMENT` 평결을 요청합니다. 집계된 gate 결과는 `passed` / `passed-with-dissent` / `blocked-by-disagreement` / `aborted-non-result` 중 하나. frontmatter `approved` 필드는 항상 `false` 로 발행되며, gate 가 `blocked-by-disagreement` 또는 `aborted-non-result` 일 때 writer 는 `approved: false` 를 유지해야 하고 (이런 gate 결과로 `approved: true` 로 ship 된 report 는 validator 가 거부), `majority-disagree` 항목을 `## 5. Clarification Items` 의 `Blocks=approval` row 로 변환합니다. 빠른 반복용 opt-out: `--no-plan-verification` (기본값: 활성). 자세한 라운드 프로토콜은 [`skills/okstra-convergence/SKILL.md`](skills/okstra-convergence/SKILL.md) 의 "Plan-body verification mode" 섹션과 [`docs/kr/cli.md#--no-plan-verification`](docs/kr/cli.md#--no-plan-verification).
194
194
  - **Brief = translation layer + Step 6.5 reporter batch confirmation** — `okstra-brief` 가 외부 입력 (이슈 ticket, 요구사항 문서, 사용자 메시지) 을 verbatim 으로 옮기되 okstra 가 추가한 부분은 labelled augmentation 으로 구분하는 translation layer 가 됐습니다. Step 6.5 가 brief 가 옮기는 과정에서 의미 변화가 발생했는지 사용자에게 일괄 확인받아 `Reporter Confirmations` 섹션에 기록하고, 모든 분석 profile 은 이 섹션의 존재를 phase 분석 진입 precondition 으로 강제합니다 (validator: `validators/validate-brief.py`).
195
- - **Artifact-home rule (`.project-docs/okstra/`)** — okstra 의 project artifact root 는 `<project>/.project-docs/okstra/` 하나뿐입니다. 이 root 밖은 okstra memory 가 아니며, Source Material 또는 Reporter Confirmations 가 명시적으로 cite 한 경우에만 read-only 로 읽습니다. 쓰기는 같은 explicit request path 를 요구합니다. okstra-internal 등가물: 용어집 `glossary.md`, 결정 기록 `decisions/<NNNN>-<slug>.md` (`implementation-planning` phase 에서 평가).
195
+ - **Artifact-home rule (`.okstra/`)** — okstra 의 project artifact root 는 `<project>/.okstra/` 하나뿐입니다. 이 root 밖은 okstra memory 가 아니며, Source Material 또는 Reporter Confirmations 가 명시적으로 cite 한 경우에만 read-only 로 읽습니다. 쓰기는 같은 explicit request path 를 요구합니다. okstra-internal 등가물: 용어집 `glossary.md`, 결정 기록 `decisions/<NNNN>-<slug>.md` (`implementation-planning` phase 에서 평가).
196
196
  - **Dual-format final-report views** — Phase 7 가 `final-report-<task-type>-<seq>.md` 를 쓰면 `okstra render-views` 가 같은 `reports/` 폴더에 두 view 를 자동 생성합니다: AI 다음-phase 입력용 슬림 markdown, 사람 reviewer 용 self-contained HTML (CSS/JS 인라인, 외부 URL 0). HTML 의 `Export user response` 버튼은 `## 5. Clarification Items` 입력을 `runs/<task-type>/user-responses/user-response-<task-type>-<seq>.md` 사이드카로 직렬화해 다음 phase 가 소비합니다. 원본 MD 는 어떤 경우에도 view 생성으로 인해 수정되지 않습니다.
197
197
  - **`improvement-discovery` task-type (sidetrack entry-point)** — 코드베이스 범위 + 우선순위 lens 화이트리스트 안에서 multi-worker 합의 기반 개선 후보 N개 (기본 8, 절대 cap 12) 도출. `PHASE_SEQUENCE` 외부 sidetrack entry-point — 사용자가 후보를 골라 각각 새 task-id 로 `requirements-discovery` / `implementation-planning` / `error-analysis` 진입. lens enum SSOT: [`scripts/okstra_ctl/improvement_lenses.py`](scripts/okstra_ctl/improvement_lenses.py). 출력 섹션: `## 4.9 Improvement Candidates` (10-column 표). validator: [`validators/validate_improvement_report.py`](validators/validate_improvement_report.py).
198
198
 
@@ -203,7 +203,7 @@ Claude Code 세션 밖에서 task 를 시작하려면:
203
203
  | `npx -y okstra@latest paths` | 런타임 경로 출력 (`--field <name>` 또는 `--shell`) |
204
204
  | `npx -y okstra@latest doctor` | 런타임 + 스킬 + python import 진단 |
205
205
  | `npx -y okstra@latest ensure-installed` | Idempotent 체크, stale 이면 자동 재설치 (스킬이 내부적으로 호출) |
206
- | `npx -y okstra@latest setup --project-id <id>` | 현재 프로젝트를 등록 (`.project-docs/okstra/project.json`) |
206
+ | `npx -y okstra@latest setup --project-id <id>` | 현재 프로젝트를 등록 (`.okstra/project.json`) |
207
207
  | `npx -y okstra@latest check-project` | 현재 프로젝트가 `setup` 으로 등록됐는지 검증 |
208
208
  | `npx -y okstra@latest config <get\|set\|unset\|show> [key] [value] [--scope project\|global\|all]` | okstra 설정 읽기/쓰기. 현재 지원 키: `pr-template-path` (project.json 또는 `~/.okstra/config.json` 의 `prTemplatePath` 갱신) |
209
209
  | `npx -y okstra@latest render-views <final-report.md>` | final-report MD 한 본을 입력으로 슬림 MD + HTML 두 view 를 (재)생성 (Phase 7 step 1.5; 멱등) |
package/README.md CHANGED
@@ -78,7 +78,7 @@ okstra/ npm package = repo root
78
78
  └── {claude,codex,gemini,report-writer}-worker.md subagent definitions
79
79
  (required for multi-agent dispatch)
80
80
 
81
- <project-root>/.project-docs/okstra/
81
+ <project-root>/.okstra/
82
82
  ├── project.json {projectId, projectRoot, ...} (written by /okstra-setup)
83
83
  ├── discovery/{task-catalog,latest-task}.json
84
84
  ├── glossary.md okstra-owned project terminology
@@ -94,7 +94,7 @@ okstra/ npm package = repo root
94
94
  | agents/prompts/schemas/templates/validators | npm package's `runtime/` | the `okstra` package (resolved via `okstra paths`) |
95
95
  | Skill markdown | `~/.claude/skills/<name>/SKILL.md` | `okstra install` (tracked in `installed-skills.json`) |
96
96
  | Worker agent markdown | `~/.claude/agents/<worker>.md` | `okstra install` (tracked in `installed-agents.json`) |
97
- | Project metadata | `<project>/.project-docs/okstra/` | `/okstra-setup` + the project itself |
97
+ | Project metadata | `<project>/.okstra/` | `/okstra-setup` + the project itself |
98
98
  | Run index | `~/.okstra/{recent,active}.jsonl` | `prepare_task_bundle` |
99
99
 
100
100
  ## 3. Manual
@@ -144,7 +144,7 @@ Or, inside a Claude Code session, invoke the equivalent slash command:
144
144
  /okstra-setup
145
145
  ```
146
146
 
147
- Both write `<project>/.project-docs/okstra/project.json`. The CLI is non-interactive when `--project-id` is given (use it in CI); the slash command prompts via `AskUserQuestion`. Every other user-facing skill refuses to proceed until that file exists.
147
+ Both write `<project>/.okstra/project.json`. The CLI is non-interactive when `--project-id` is given (use it in CI); the slash command prompts via `AskUserQuestion`. Every other user-facing skill refuses to proceed until that file exists.
148
148
 
149
149
  ### 3.3 Day-to-day commands
150
150
 
@@ -186,12 +186,12 @@ Recent workflow additions (post-0.8.0, on `main`):
186
186
 
187
187
  - **Isolated task worktree for every task-type** — prepare automatically runs `git worktree add ~/.okstra/worktrees/<project>/<group>/<task>/` on a fresh branch `<work-category-prefix>-<task-id-segment>` branched from the **user-chosen base ref** (`--base-ref`, mirroring the `release-handoff` PR-base picker: `main` / `dev` / `staging` / `preprod` / `prod` / any local ref) the first time a task-key is seen. `--base-ref` is required on first phase; the okstra-run skill collects it via `AskUserQuestion`, non-interactive callers must pass the flag explicitly. Every subsequent phase of the same task-key (`requirements-discovery` → `error-analysis` → `implementation-planning` → `implementation` → `final-verification` → `release-handoff`) reuses the same path and branch, so phase N inherits the working-tree state phase N-1 left behind. A global registry at `~/.okstra/worktrees/registry.json` (flock-guarded) reserves task-keys and branches across concurrent runs; all path/branch segments are sanitised (`/`, `:`, etc. → `-`). The worktree is preserved after every run for follow-up phases, PR authoring, and rollback. Skip paths: when the caller is already inside another worktree or `project_root` is not a git repo, provisioning no-ops. Manual cleanup: `git worktree remove <path>` → `git branch -D <branch>` plus releasing/removing the task-key from the registry. Details: [`docs/kr/architecture.md`](docs/kr/architecture.md) (*Task type* section) and [`docs/kr/cli.md#--executor`](docs/kr/cli.md#--executor).
188
188
  - **`release-handoff` lifecycle phase** — runs after `final-verification` returns `verdict=accepted`. The lead drafts a commit message and PR body via a Claude worker, then prompts the user with `AskUserQuestion` for three choices: action (`commit only` / `commit + PR` / `skip`), PR base branch (`staging` / `preprod` / `prod` / `main` / `dev` / free-form), and message handling (`use as-is` / `edit then proceed` / `cancel`). Only user-selected mutating git/gh commands run. Force-push, base-branch direct push, hook bypass (`--no-verify`), and release publishing (`gh release`, `npm publish`, ...) are forbidden. Source code is not edited in this phase. Profile: [`prompts/profiles/release-handoff.md`](prompts/profiles/release-handoff.md).
189
- - **Configurable PR body template** (release-handoff) — the PR body is filled from a markdown template chosen in priority order: per-run override (`--pr-template-path` or the okstra-run Step 6 prompt) → `<project_root>/.project-docs/okstra/project.json` `prTemplatePath` → `~/.okstra/config.json` `prTemplatePath` → bundled skill default at `~/.claude/skills/okstra-run/templates/pr-body.template.md`. Register a template with `okstra config set pr-template-path <path> [--scope project|global]` (project scope accepts paths relative to the project root; global scope requires absolute or `~/`-prefixed). `okstra config get pr-template-path --scope all` reports every scope plus the effective winner. The bundled default ships `## Summary` / `## Changes` / `## Test plan` / `## Linked issues` with HTML comment guidance that the lead strips before opening the PR.
189
+ - **Configurable PR body template** (release-handoff) — the PR body is filled from a markdown template chosen in priority order: per-run override (`--pr-template-path` or the okstra-run Step 6 prompt) → `<project_root>/.okstra/project.json` `prTemplatePath` → `~/.okstra/config.json` `prTemplatePath` → bundled skill default at `~/.claude/skills/okstra-run/templates/pr-body.template.md`. Register a template with `okstra config set pr-template-path <path> [--scope project|global]` (project scope accepts paths relative to the project root; global scope requires absolute or `~/`-prefixed). `okstra config get pr-template-path --scope all` reports every scope plus the effective winner. The bundled default ships `## Summary` / `## Changes` / `## Test plan` / `## Linked issues` with HTML comment guidance that the lead strips before opening the PR.
190
190
  - **Profile-roster worker validation** — `--workers <csv>` (and the okstra-run Step 6 worker prompt) are now restricted to the worker IDs declared by the chosen profile's `Required workers:` block. Asking for `codex` / `gemini` on a profile that does not list them (e.g. `release-handoff`) is rejected with a clear error, and the interactive prompt only offers workers the profile actually accepts.
191
191
  - **Multi-stage `implementation-planning` / `implementation`** — `implementation-planning` always produces a Stage Map plus N stage sections; each stage has ≤6 steps and stages whose `depends-on (none)` can be executed in parallel by separate `implementation` runs. Each `implementation` invocation picks one stage (via `--stage <auto|N>`) and emits an evidence sidecar (`carry/stage-<N>.json`) that the next stage automatically inherits. The `implementation-planning` run directory accumulates a `consumers.jsonl` reverse-link showing which `implementation` runs consumed which stage.
192
192
  - **Phase 6 plan-body verification (implementation-planning only)** — after the Report writer worker authors the final-report draft and before the user approval gate, the lead now runs one additional verification round: it extracts `P-Opt-*` / `P-Step-*` / `P-Dep-*` / `P-Val-*` / `P-Rb-*` items from the consolidated `## 4.5` plan body and dispatches them to every analyser worker as `AGREE` / `DISAGREE(a-e)` / `SUPPLEMENT`. The aggregated gate result is one of `passed` / `passed-with-dissent` / `blocked-by-disagreement` / `aborted-non-result`. The frontmatter `approved` flag is always emitted as `false`; when the gate is `blocked-by-disagreement` or `aborted-non-result` the writer MUST keep it `false` (the validator refuses any report that publishes `approved: true` under such a gate) and convert `majority-disagree` items into `## 5. Clarification Items` rows with `Blocks=approval`. Disable for fast iteration with `--no-plan-verification` (default: enabled). Details: [`skills/okstra-convergence/SKILL.md`](skills/okstra-convergence/SKILL.md) "Plan-body verification mode" and [`docs/kr/cli.md#--no-plan-verification`](docs/kr/cli.md#--no-plan-verification).
193
193
  - **Brief as translation layer + reporter batch confirmation (Step 6.5)** — `okstra-brief` now produces the brief as a translation layer that preserves external inputs (issue ticket, requirements doc, user message) verbatim while labelling okstra augmentations. A new Step 6.5 walks the user through a single batch confirmation of any rewordings, recorded in a `Reporter Confirmations` section. Every analysis profile blocks phase entry until this section exists (validator: `validators/validate-brief.py`).
194
- - **Artifact-home rule (`.project-docs/okstra/`)** — okstra's project artifact root is only `<project>/.project-docs/okstra/`. Anything outside that root is not okstra memory; it may be read only when explicitly cited as Source Material or Reporter Confirmations, and writes require the same explicit request path. okstra-internal equivalents: `glossary.md` for terminology and `decisions/<NNNN>-<slug>.md` for decision records (evaluated in `implementation-planning`).
194
+ - **Artifact-home rule (`.okstra/`)** — okstra's project artifact root is only `<project>/.okstra/`. Anything outside that root is not okstra memory; it may be read only when explicitly cited as Source Material or Reporter Confirmations, and writes require the same explicit request path. okstra-internal equivalents: `glossary.md` for terminology and `decisions/<NNNN>-<slug>.md` for decision records (evaluated in `implementation-planning`).
195
195
  - **Dual-format final-report views** — after Phase 7 writes `final-report-<task-type>-<seq>.md`, `okstra render-views` automatically emits two sibling views in the same `reports/` directory: a slim Markdown for downstream AI input and a self-contained HTML (inline CSS/JS, no external URLs) for human review. The HTML lets a reviewer fill in `## 5. Clarification Items` decisions and export them to `runs/<task-type>/user-responses/user-response-<task-type>-<seq>.md`, which the next phase consumes as input. The original MD is never modified by view generation.
196
196
  - **`improvement-discovery` task-type (sidetrack entry-point)** — Discover ranked improvement candidates within a codebase scope and lens whitelist via multi-worker consensus (default top-8, hard cap 12). Outside `PHASE_SEQUENCE`; the user selects candidates and opens each as a new task with `requirements-discovery`, `implementation-planning`, or `error-analysis`. Lens enum SSOT: [`scripts/okstra_ctl/improvement_lenses.py`](scripts/okstra_ctl/improvement_lenses.py). Output section: `## 4.9 Improvement Candidates` (10-column table). Validator: [`validators/validate_improvement_report.py`](validators/validate_improvement_report.py).
197
197
 
@@ -202,7 +202,7 @@ Recent workflow additions (post-0.8.0, on `main`):
202
202
  | `npx -y okstra@latest paths` | Print runtime paths (`--field <name>` or `--shell`) |
203
203
  | `npx -y okstra@latest doctor` | Diagnose runtime + skills + python import |
204
204
  | `npx -y okstra@latest ensure-installed` | Idempotent check, auto-reinstall if stale (skills call this internally) |
205
- | `npx -y okstra@latest setup --project-id <id>` | Register the current project (`.project-docs/okstra/project.json`) |
205
+ | `npx -y okstra@latest setup --project-id <id>` | Register the current project (`.okstra/project.json`) |
206
206
  | `npx -y okstra@latest check-project` | Verify the current project has been registered with `setup` |
207
207
  | `npx -y okstra@latest config <get\|set\|unset\|show> [key] [value] [--scope project\|global\|all]` | Read / write okstra settings; initial key `pr-template-path` (writes `prTemplatePath` to project.json or `~/.okstra/config.json`) |
208
208
  | `npx -y okstra@latest render-views <final-report.md>` | Regenerate the slim-MD + HTML sibling views from a final-report MD (Phase 7 step 1.5; idempotent) |
package/bin/okstra CHANGED
@@ -10,6 +10,7 @@ const COMMANDS = new Map([
10
10
  ["setup", () => import("../src/setup.mjs").then((m) => m.run)],
11
11
  ["check-project", () => import("../src/check-project.mjs").then((m) => m.run)],
12
12
  ["config", () => import("../src/config.mjs").then((m) => m.run)],
13
+ ["migrate", () => import("../src/migrate.mjs").then((m) => m.run)],
13
14
  ["task-list", () => import("../src/task-list.mjs").then((m) => m.run)],
14
15
  ["task-show", () => import("../src/task-show.mjs").then((m) => m.run)],
15
16
  ["worktree-lookup", () => import("../src/worktree-lookup.mjs").then((m) => m.run)],
@@ -32,7 +33,7 @@ Quick start (CLI):
32
33
  4. open a Claude Code session and run /okstra-run # start a task
33
34
 
34
35
  Inside a Claude Code session you can replace step 3 with /okstra-setup —
35
- both write the same <PROJECT_ROOT>/.project-docs/okstra/project.json.
36
+ both write the same <PROJECT_ROOT>/.okstra/project.json.
36
37
 
37
38
  Usage:
38
39
  okstra <command> [options]
@@ -41,10 +42,11 @@ Admin commands:
41
42
  install Install runtime to ~/.okstra and skills to ~/.claude/skills
42
43
  ensure-installed Verify install is fresh; reinstall if stale (idempotent)
43
44
  uninstall Remove runtime + skills (user data preserved by default)
44
- setup Register the current project (.project-docs/okstra/project.json)
45
+ setup Register the current project (.okstra/project.json)
45
46
  doctor Diagnostic check of the installed runtime
46
47
  check-project Verify the current project has been registered with setup
47
48
  config Read / write okstra settings (e.g. PR template path)
49
+ migrate Move legacy .project-docs/okstra/ to .okstra/ (one-shot)
48
50
  paths Print runtime paths (workspace/agents/pythonpath/bin/home/version)
49
51
 
50
52
  Introspection commands (JSON output, used by skills to avoid python heredocs):
@@ -18,7 +18,7 @@
18
18
  - **Single python authority**: 모든 prepare wiring(profile/workers/model 해소, path 계산, render, central record_start)이 [`okstra_ctl.run.prepare_task_bundle()`](../../scripts/okstra_ctl/run.py) 한 함수에 모여 있습니다. `okstra.sh` 와 `okstra-run` skill 은 같은 함수를 호출하는 thin caller 이며, 환경 변수로 상태를 전달하지 않습니다 — task 정체성·경로·workflow 상태는 모두 디스크 권위 파일에서 매번 계산됩니다.
19
19
  - **Claude handoff (두 모드)**: (a) `okstra.sh` 가 새 `claude` 프로세스를 띄우는 전통 방식, (b) `okstra-run` skill 이 현재 claude 세션 안에서 prepare 후 lead 역할을 그대로 인계받는 in-session 모드. 둘 다 `prepare_task_bundle` 의 산출물(instruction-set 등)을 그대로 사용합니다.
20
20
  - **Required team contract**: 각 phase profile의 `Required workers:` 블록이 roster의 권위입니다. 일반 분석 phase는 Claude/Codex analyser + report-writer를 기본으로 하고, Gemini는 profile과 `--workers`가 허용할 때만 포함됩니다. `release-handoff`처럼 lead-only에 가까운 phase는 별도 roster를 가집니다.
21
- - **User-home install + project-local task bundles**: `npx okstra@latest install` 한 명령이 런타임(`~/.okstra/{lib/python, bin, templates}`), 스킬 13종(`~/.claude/skills/<name>/SKILL.md`), worker agent 4종(`~/.claude/agents/*-worker.md`)을 설치합니다. 대상 프로젝트에는 task bundle 과 discovery metadata 가 `.project-docs/okstra/` 아래 저장되고, **추가로 `<PROJECT_ROOT>/.claude/settings.local.json` 이 `~/.okstra/templates/settings.local.json` 을 가리키는 symlink 로 provisioning** 됩니다 (`okstra setup` 또는 `okstra-ctl` prepare 가 idempotent 하게 관리; 기존에 일반 파일이 있었다면 `.bak.<timestamp>` 로 백업 후 교체). 이 symlink 가 host Claude Code 세션에 자동 로드되어 codex/gemini worker wrapper 호출 권한을 부여하므로, 사용자의 글로벌 `~/.claude/settings.json` 은 건드리지 않습니다. 개발용 `okstra install --link <repo>` 는 설치 파일을 repo source로 symlink합니다.
21
+ - **User-home install + project-local task bundles**: `npx okstra@latest install` 한 명령이 런타임(`~/.okstra/{lib/python, bin, templates}`), 스킬 13종(`~/.claude/skills/<name>/SKILL.md`), worker agent 4종(`~/.claude/agents/*-worker.md`)을 설치합니다. 대상 프로젝트에는 task bundle 과 discovery metadata 가 `.okstra/` 아래 저장되고, **추가로 `<PROJECT_ROOT>/.claude/settings.local.json` 이 `~/.okstra/templates/settings.local.json` 을 가리키는 symlink 로 provisioning** 됩니다 (`okstra setup` 또는 `okstra-ctl` prepare 가 idempotent 하게 관리; 기존에 일반 파일이 있었다면 `.bak.<timestamp>` 로 백업 후 교체). 이 symlink 가 host Claude Code 세션에 자동 로드되어 codex/gemini worker wrapper 호출 권한을 부여하므로, 사용자의 글로벌 `~/.claude/settings.json` 은 건드리지 않습니다. 개발용 `okstra install --link <repo>` 는 설치 파일을 repo source로 symlink합니다.
22
22
  - **Resume and clarification**: `--task-key`, `--resume-clarification`, `--clarification-response`로 같은 task 재개와 lead의 추가 질문 응답 흐름을 지원합니다.
23
23
  - **Derived views and telemetry**: final-report data.json → Markdown → slim MD / self-contained HTML view, worker error sidecar, wrapper log sidecar, token usage / cost accounting을 제공합니다.
24
24
 
@@ -84,7 +84,7 @@
84
84
  okstra 의 prepare 책임은 단일 python 진입점 [`okstra_ctl.run.prepare_task_bundle`](../../scripts/okstra_ctl/run.py) 에 모여 있습니다. 이 함수가 다음을 한 트랜잭션으로 수행합니다.
85
85
 
86
86
  - okstra 설치 자산(`~/.claude/skills/okstra/...`, `~/.claude/agents/...`, `~/.okstra/bin/...`) 존재 확인
87
- - `<PROJECT_ROOT>/.project-docs/okstra/project.json` self-registration (또는 projectId 일치 검증)
87
+ - `<PROJECT_ROOT>/.okstra/project.json` self-registration (또는 projectId 일치 검증)
88
88
  - task type → `prompts/profiles/<task-type>.md` 로드 + 권장 workers 추출
89
89
  - 사용자 worker/model 오버라이드 정규화 (Claude/Codex/Gemini/Report-writer 각각 display ↔ execution-value 매핑)
90
90
  - task brief / clarification response 경로 해석 (cwd 우선 → PROJECT_ROOT fallback)
@@ -140,7 +140,7 @@ okstra 의 prepare 책임은 단일 python 진입점 [`okstra_ctl.run.prepare_ta
140
140
  - `prompts/launch.template.md` — lead 프롬프트 템플릿.
141
141
  - `prompts/profiles/*.md` — 6종 task-type profile (`requirements-discovery`, `error-analysis`, `implementation-planning`, `implementation`, `final-verification`, `release-handoff`).
142
142
  - `templates/project-docs/task-index.template.md` · `templates/reports/final-report.template.md` · `templates/reports/settings.template.json` — 런타임 렌더 입력.
143
- - `<PROJECT_ROOT>/.project-docs/okstra/project.json` — 프로젝트 self-registration. okstra.sh 첫 실행 시 자동 생성/검증되며, `--project-root` 미지정 시 ancestor / `git toplevel` 로 PROJECT_ROOT 해석.
143
+ - `<PROJECT_ROOT>/.okstra/project.json` — 프로젝트 self-registration. okstra.sh 첫 실행 시 자동 생성/검증되며, `--project-root` 미지정 시 ancestor / `git toplevel` 로 PROJECT_ROOT 해석.
144
144
 
145
145
  ### Support assets (런타임 비참조)
146
146
 
@@ -190,10 +190,10 @@ per-process 환경 변수에 task 정체성·경로·workflow 상태를 보관
190
190
 
191
191
  | 데이터 | 권위 파일 |
192
192
  |---|---|
193
- | projectId, projectRoot | `<PROJECT_ROOT>/.project-docs/okstra/project.json` |
193
+ | projectId, projectRoot | `<PROJECT_ROOT>/.okstra/project.json` |
194
194
  | task identity / workflow | `<task-root>/task-manifest.json` |
195
- | task 후보 목록 | `<PROJECT_ROOT>/.project-docs/okstra/discovery/task-catalog.json` |
196
- | 최신 task 포인터 | `<PROJECT_ROOT>/.project-docs/okstra/discovery/latest-task.json` |
195
+ | task 후보 목록 | `<PROJECT_ROOT>/.okstra/discovery/task-catalog.json` |
196
+ | 최신 task 포인터 | `<PROJECT_ROOT>/.okstra/discovery/latest-task.json` |
197
197
  | run 입력값 | `<run-dir>/manifests/run-inputs-<task-type>-<seq>.json` |
198
198
  | run paths / seq | `<run-dir>/manifests/run-context-<task-type>-<seq>.json` |
199
199
  | run 이력 | `<task-root>/history/timeline.json` |
@@ -282,17 +282,17 @@ Claude launch prompt 본문은 항상 `prompts/launch.template.md` 템플릿에
282
282
 
283
283
  ## Project self-registration
284
284
 
285
- `okstra.sh` 는 외부 등록 디렉토리(과거 `examples/projects/*.conf.sh` 모델은 폐기됨) 없이 동작합니다. 매 실행 시작 시 PROJECT_ROOT 를 다음 우선순위로 해석한 뒤 그 위치의 `.project-docs/okstra/project.json` 을 권위 소스로 자기 등록합니다.
285
+ `okstra.sh` 는 외부 등록 디렉토리(과거 `examples/projects/*.conf.sh` 모델은 폐기됨) 없이 동작합니다. 매 실행 시작 시 PROJECT_ROOT 를 다음 우선순위로 해석한 뒤 그 위치의 `.okstra/project.json` 을 권위 소스로 자기 등록합니다.
286
286
 
287
287
  해석 우선순위:
288
288
 
289
289
  1. CLI 인자 `--project-root <path>`.
290
- 2. cwd 또는 그 조상 디렉토리 중 `.project-docs/okstra/project.json` 보유 위치.
290
+ 2. cwd 또는 그 조상 디렉토리 중 `.okstra/project.json` 보유 위치.
291
291
  3. cwd 의 `git rev-parse --show-toplevel`.
292
292
 
293
293
  셋 다 실패하면 `okstra.sh` 는 즉시 에러로 종료합니다 (자동 추정 없음).
294
294
 
295
- `<PROJECT_ROOT>/.project-docs/okstra/project.json` 스키마:
295
+ `<PROJECT_ROOT>/.okstra/project.json` 스키마:
296
296
 
297
297
  ```json
298
298
  {
@@ -306,22 +306,22 @@ Claude launch prompt 본문은 항상 `prompts/launch.template.md` 템플릿에
306
306
 
307
307
  처음 실행이면 위 4-필드(`projectId`, `projectRoot`, `createdAt`, `updatedAt`)를 새로 작성합니다. 이미 존재하면 `--project-id` 인자값과 저장된 `projectId` 가 일치하는지 검증한 뒤 `projectRoot`/`updatedAt` 만 갱신하고, 사용자가 추가한 알 수 없는 필드(`worktreeSyncDirs`, 향후 `mcpServers` 등)는 upsert 과정에서 보존됩니다. 불일치 시 즉시 종료해 동일 디렉토리에서 두 개의 ID 가 혼용되는 것을 막습니다.
308
308
 
309
- `worktreeSyncDirs` (선택) 는 task worktree 로 symlink 할 project-root-relative 디렉토리 목록을 per-project 로 override 합니다. 해석 우선순위는 `OKSTRA_WORKTREE_SYNC_DIRS` 환경변수 → `project.json` → built-in default (`.project-docs`, `.scratch`, `graphify-out`, `.claude`). 빈 배열을 지정하면 sync 자체를 비활성화합니다. sync 는 filesystem continuity 용도일 뿐이며, okstra context/write boundary 는 계속 `<PROJECT_ROOT>/.project-docs/okstra/**` 입니다.
309
+ `worktreeSyncDirs` (선택) 는 task worktree 로 symlink 할 project-root-relative 디렉토리 목록을 per-project 로 override 합니다. 해석 우선순위는 `OKSTRA_WORKTREE_SYNC_DIRS` 환경변수 → `project.json` → built-in default (`.project-docs`, `.scratch`, `graphify-out`, `.claude`). 빈 배열을 지정하면 sync 자체를 비활성화합니다. sync 는 filesystem continuity 용도일 뿐이며, okstra context/write boundary 는 계속 `<PROJECT_ROOT>/.okstra/**` 입니다.
310
310
 
311
311
  `okstra-ctl` 의 reindex/backfill 도 신규 모델에서 권위 소스를 변경했습니다. 과거에는 `examples/projects/*.conf.sh` 를 source 했지만, 지금은 `~/.okstra/projects/<projectId>/meta.json` (record_start 가 위 project.json 정보를 mirror 한 결과) 을 스캔하여 (projectId, projectRoot) 매핑을 복원합니다. `OKSTRA_PROJECT_DEFINITION_DIR_OVERRIDE` 환경변수도 함께 폐기되었습니다.
312
312
 
313
313
  ## Artifact-home rule
314
314
 
315
- okstra 의 project artifact root 는 `<PROJECT_ROOT>/.project-docs/okstra/` 하나뿐입니다. 이 root 밖은 okstra memory 가 아닙니다. brief 의 `Source Material` 또는 `Reporter Confirmations` 가 명시적으로 cite 한 경우에만 read-only source material 로 읽고, 자체 판단으로 root 밖에 쓰지 않습니다.
315
+ okstra 의 project artifact root 는 `<PROJECT_ROOT>/.okstra/` 하나뿐입니다. 이 root 밖은 okstra memory 가 아닙니다. brief 의 `Source Material` 또는 `Reporter Confirmations` 가 명시적으로 cite 한 경우에만 read-only source material 로 읽고, 자체 판단으로 root 밖에 쓰지 않습니다.
316
316
 
317
317
  유일한 예외: brief 의 `Source Material` 또는 `Reporter Confirmations` 섹션에서 사용자가 **verbatim** 으로 특정 non-okstra 파일 편집을 요청한 경우. 해당 편집을 수행하는 phase 는 자신의 final-report 에 사용자 원문 인용을 함께 남겨야 합니다.
318
318
 
319
319
  okstra 는 자기 subtree 안에 자체 institutional memory 를 유지합니다.
320
320
 
321
- - `<PROJECT_ROOT>/.project-docs/okstra/glossary.md` — run 을 가로지르며 누적되는 okstra 용어집.
322
- - `<PROJECT_ROOT>/.project-docs/okstra/decisions/<NNNN>-<slug>.md` — okstra 의 결정 기록. 평가 시점은 `implementation-planning` phase 이며 `okstra-brief` 단계에서는 후보만 표시합니다.
321
+ - `<PROJECT_ROOT>/.okstra/glossary.md` — run 을 가로지르며 누적되는 okstra 용어집.
322
+ - `<PROJECT_ROOT>/.okstra/decisions/<NNNN>-<slug>.md` — okstra 의 결정 기록. 평가 시점은 `implementation-planning` phase 이며 `okstra-brief` 단계에서는 후보만 표시합니다.
323
323
 
324
- okstra phase 는 PRD / issue file 을 직접 쓰지 않습니다. 동등한 결정 산출물은 `requirements-discovery` 와 `implementation-planning` 이 `.project-docs/okstra/` 내부에 만듭니다.
324
+ okstra phase 는 PRD / issue file 을 직접 쓰지 않습니다. 동등한 결정 산출물은 `requirements-discovery` 와 `implementation-planning` 이 `.okstra/` 내부에 만듭니다.
325
325
 
326
326
  ## Task type
327
327
 
@@ -389,7 +389,7 @@ task 자체의 기준 폴더입니다.
389
389
  task manifest, task index, instruction-set, runs, history가 이 루트 아래에 모입니다.
390
390
 
391
391
  ```text
392
- <target-project>/.project-docs/okstra/tasks/<task-group>/<task-id>/
392
+ <target-project>/.okstra/tasks/<task-group>/<task-id>/
393
393
  ├── task-manifest.json
394
394
  ├── task-index.md
395
395
  ├── instruction-set/
@@ -433,7 +433,7 @@ task manifest, task index, instruction-set, runs, history가 이 루트 아래
433
433
  실행별 산출물은 아래 경로에 누적됩니다.
434
434
 
435
435
  ```text
436
- <target-project>/.project-docs/okstra/tasks/<task-group>/<task-id>/runs/<task-type>/
436
+ <target-project>/.okstra/tasks/<task-group>/<task-id>/runs/<task-type>/
437
437
  ```
438
438
 
439
439
  여기에 저장되는 대표 파일:
@@ -469,8 +469,8 @@ worker prompt history는 `/tmp`가 아니라 항상 현재 run의 `prompts/` 아
469
469
  프로젝트 공용 discovery pointer는 아래 경로에 생성합니다.
470
470
 
471
471
  ```text
472
- <target-project>/.project-docs/okstra/discovery/latest-task.json
473
- <target-project>/.project-docs/okstra/discovery/task-catalog.json
472
+ <target-project>/.okstra/discovery/latest-task.json
473
+ <target-project>/.okstra/discovery/task-catalog.json
474
474
  ```
475
475
  scripts/okstra.sh workflow가 사용하는 project-local Claude assets는 아래 경로들에 seed합니다.
476
476
 
@@ -482,8 +482,8 @@ scripts/okstra.sh workflow가 사용하는 project-local Claude assets는 아래
482
482
 
483
483
  역할 구분:
484
484
 
485
- - `.project-docs/okstra/discovery/latest-task.json`: 현재 프로젝트에서 가장 최근에 준비된 okstra task bundle을 가리키는 current-task convenience pointer
486
- - `.project-docs/okstra/discovery/task-catalog.json`: 현재 프로젝트에 준비된 okstra task bundle 목록을 `taskKey`, `taskGroup`, `taskId` 기준으로 유지하는 canonical project-level catalog
485
+ - `.okstra/discovery/latest-task.json`: 현재 프로젝트에서 가장 최근에 준비된 okstra task bundle을 가리키는 current-task convenience pointer
486
+ - `.okstra/discovery/task-catalog.json`: 현재 프로젝트에 준비된 okstra task bundle 목록을 `taskKey`, `taskGroup`, `taskId` 기준으로 유지하는 canonical project-level catalog
487
487
  - `instruction-set/reference-expectations.md`: 현재 task가 참조해야 할 config files, deployment manifests, expected values를 task-level canonical artifact로 정리한 파일
488
488
  - `~/.claude/skills/okstra-*/...`, `~/.claude/agents/...`: `okstra install` 이 사용자 홈에 seed하는 Claude asset (project-local 시딩은 더 이상 발생하지 않음 — `okstra install --refresh` 로 갱신)
489
489
 
@@ -619,8 +619,8 @@ canonical metadata는 항상 `task-manifest.json`을 기준으로 확인합니
619
619
 
620
620
  `okstra` 실행 후 Claude는 아래 순서로 현재 task를 읽는 것을 기본 규칙으로 삼아야 합니다.
621
621
 
622
- 1. task browsing 또는 task-id disambiguation이 필요하면 `.project-docs/okstra/discovery/task-catalog.json`을 먼저 읽습니다.
623
- 2. 현재 task key나 task path가 명시되지 않았다면 `.project-docs/okstra/discovery/latest-task.json`을 current-task pointer로 읽습니다.
622
+ 1. task browsing 또는 task-id disambiguation이 필요하면 `.okstra/discovery/task-catalog.json`을 먼저 읽습니다.
623
+ 2. 현재 task key나 task path가 명시되지 않았다면 `.okstra/discovery/latest-task.json`을 current-task pointer로 읽습니다.
624
624
  3. `task-manifest.json`을 읽습니다.
625
625
  4. `task-index.md`는 quick summary가 필요할 때만 선택적으로 읽습니다.
626
626
  5. `instruction-set/analysis-profile.md`를 읽습니다.
@@ -660,8 +660,8 @@ brief에는 보통 아래를 포함합니다.
660
660
  - worker에게 줄 질문
661
661
  - 기대 출력
662
662
  - 이전 run 또는 연관 task 정보
663
- - (선택) glossary 추가 후보 — okstra-brief Step 4.5 가 `<PROJECT_ROOT>/.project-docs/okstra/glossary.md` 에 직접 기록
664
- - (선택) decisions 후보 — `implementation-planning` phase 에서 평가 후 `.project-docs/okstra/decisions/<NNNN>-<slug>.md` 로 승격
663
+ - (선택) glossary 추가 후보 — okstra-brief Step 4.5 가 `<PROJECT_ROOT>/.okstra/glossary.md` 에 직접 기록
664
+ - (선택) decisions 후보 — `implementation-planning` phase 에서 평가 후 `.okstra/decisions/<NNNN>-<slug>.md` 로 승격
665
665
 
666
666
  okstra-brief 의 Step 6.5 는 **reporter batch confirmation** 입니다. brief 가 외부 입력을 옮기는 도중 의미 변화가 발생했는지를 사용자에게 일괄 확인받고 그 결과를 `Reporter Confirmations` 섹션에 기록합니다. 모든 분석 profile 은 이 섹션의 존재를 phase 분석 진입의 precondition 으로 강제합니다 (validator: `validators/validate-brief.py`).
667
667
 
@@ -820,8 +820,8 @@ scripts/okstra.sh --task-key <project-id>:<task-group>:<task-id> --task-type fin
820
820
  - `workflow.routingStatus`
821
821
  - `workflow.lastSafeCheckpoint`
822
822
 
823
- 프로젝트 전체 상태를 훑을 때는 `.project-docs/okstra/discovery/task-catalog.json`을 사용합니다.
824
- 특정 task의 최신 상태를 볼 때는 `.project-docs/okstra/discovery/latest-task.json`, `task-manifest.json`, 최신 `run-manifest`, `history/timeline.json` 순서로 확인합니다.
823
+ 프로젝트 전체 상태를 훑을 때는 `.okstra/discovery/task-catalog.json`을 사용합니다.
824
+ 특정 task의 최신 상태를 볼 때는 `.okstra/discovery/latest-task.json`, `task-manifest.json`, 최신 `run-manifest`, `history/timeline.json` 순서로 확인합니다.
825
825
 
826
826
  Claude에서는 seeded `okstra-status` skill을 사용해 아래 질문을 직접 처리할 수 있습니다.
827
827
 
@@ -946,8 +946,8 @@ phase 산출물의 출고 가능 여부를 강제하는 진입점:
946
946
  - worker 모델은 `--lead-model`, `--claude-model`, `--codex-model`, `--gemini-model`, `--report-writer-model`로 override할 수 있고, 기본값은 `OKSTRA_DEFAULT_*` 환경 변수에서 중앙 관리합니다. fallback 기본값은 `Claude lead`/`Report writer worker`=`opus-4-6`, `Claude worker`=`sonnet`, `Codex worker`=`gpt-5.5`, `Gemini worker`=`auto`입니다.
947
947
  - `--task-type implementation` 에서는 Executor 역할을 맡을 provider 를 `--executor <claude|codex|gemini>` (또는 `OKSTRA_DEFAULT_EXECUTOR`, fallback `claude`) 로 선택합니다. Executor 만 프로젝트 파일을 mutate 할 수 있고, 나머지 두 provider 와 자기 자신의 provider 가 모두 별도 CLI 세션으로 verifier 로 dispatch 됩니다 (세션 분리만으로도 self-review 안전장치 유지). Executor 의 모델은 선택된 provider 의 worker 모델 플래그(`--claude-model` / `--codex-model` / `--gemini-model`) 를 그대로 재사용하며, run-manifest 의 `teamContract.executor` 블록에 provider / displayName / workerAgent / model 이 기록됩니다.
948
948
  - 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 항목 참고.
949
- - project-level current-task convenience pointer는 `.project-docs/okstra/discovery/latest-task.json`입니다.
950
- - project-level canonical task inventory는 `.project-docs/okstra/discovery/task-catalog.json`입니다.
949
+ - project-level current-task convenience pointer는 `.okstra/discovery/latest-task.json`입니다.
950
+ - project-level canonical task inventory는 `.okstra/discovery/task-catalog.json`입니다.
951
951
  - okstra Claude asset은 `~/.claude/skills/`와 `~/.claude/agents/` 아래에 `okstra install` 시점에 seed되며, `okstra install --refresh` 로 갱신할 수 있습니다 (per-project seeding은 더 이상 수행되지 않음).
952
952
  - seeded okstra Claude assets는 Agent Teams 우선, sequential/background fallback 차선 규칙을 Claude에게 제공합니다.
953
953
  - 최종 판단은 스크립트가 아니라 Claude가 수행합니다.
@@ -957,7 +957,7 @@ phase 산출물의 출고 가능 여부를 강제하는 진입점:
957
957
  - `okstra.sh`는 worker CLI 호출 anchoring을 위해 절대 projectRoot를 강제합니다.
958
958
  - `okstra wizard step` 은 `--answer <val>` 을 **필수** 로 받습니다. 응답을 줄 차례가 아니라 다음 prompt 만 미리 보고 싶다면 `--no-submit` 으로 peek 합니다.
959
959
  - `/okstra-history`는 task manifest fallback / 페이지네이션 / 필터를 지원하고, `--base-ref`는 워크트리 registry에서 해석합니다.
960
- - 사용자 프로젝트에 대한 모든 쓰기는 `<PROJECT_ROOT>/.project-docs/okstra/` 안에만 발생합니다 (Artifact-home rule 참조).
960
+ - 사용자 프로젝트에 대한 모든 쓰기는 `<PROJECT_ROOT>/.okstra/` 안에만 발생합니다 (Artifact-home rule 참조).
961
961
 
962
962
  ## Related documents
963
963
 
package/docs/kr/cli.md CHANGED
@@ -78,7 +78,7 @@ interactive terminal에서 실행하면 다음 규칙이 추가로 적용됩니
78
78
 
79
79
  ### `--project-id`
80
80
 
81
- 전역에서 고유해야 하는 프로젝트 ID입니다. 첫 실행 시 `<PROJECT_ROOT>/.project-docs/okstra/project.json` 에 자기 등록(self-registration)되며, 동일 PROJECT_ROOT 에서 재실행할 때 인자값과 저장된 `projectId` 가 다르면 즉시 에러로 종료합니다.
81
+ 전역에서 고유해야 하는 프로젝트 ID입니다. 첫 실행 시 `<PROJECT_ROOT>/.okstra/project.json` 에 자기 등록(self-registration)되며, 동일 PROJECT_ROOT 에서 재실행할 때 인자값과 저장된 `projectId` 가 다르면 즉시 에러로 종료합니다.
82
82
 
83
83
  예:
84
84
 
@@ -196,7 +196,7 @@ scripts/okstra.sh \
196
196
  --task-type implementation-planning \
197
197
  --project-id jobs --task-group tasks --task-id 8852 \
198
198
  --task-brief .project-docs/tasks/8852/BUG_REPORT.md \
199
- --clarification-response .project-docs/okstra/tasks/tasks/8852/runs/2026-04-29/error-analysis/reports/final-report-2026-04-29_10-15-30.md
199
+ --clarification-response .okstra/tasks/tasks/8852/runs/2026-04-29/error-analysis/reports/final-report-2026-04-29_10-15-30.md
200
200
  ```
201
201
 
202
202
  ### `--resume-clarification`
@@ -226,7 +226,7 @@ EDITOR=code\ -w scripts/okstra.sh --resume-clarification --project-id jobs --tas
226
226
  내부적으로는 다음과 동등합니다.
227
227
 
228
228
  ```bash
229
- $EDITOR <project-root>/.project-docs/okstra/tasks/<group>/<id>/runs/<task-type>/reports/final-report-<latest>.md
229
+ $EDITOR <project-root>/.okstra/tasks/<group>/<id>/runs/<task-type>/reports/final-report-<latest>.md
230
230
  scripts/okstra.sh --task-type <same-type> \
231
231
  --project-id <p> --task-group <g> --task-id <i> \
232
232
  --task-brief <from manifest> \
@@ -237,11 +237,11 @@ scripts/okstra.sh --task-type <same-type> \
237
237
 
238
238
  대상 프로젝트의 절대 경로입니다. 명시하지 않으면 `okstra.sh` 가 다음 우선순위로 자동 해석합니다.
239
239
 
240
- 1. cwd 또는 그 조상 디렉토리 중 `.project-docs/okstra/project.json` 보유 위치를 찾아 PROJECT_ROOT 로 채택합니다.
240
+ 1. cwd 또는 그 조상 디렉토리 중 `.okstra/project.json` 보유 위치를 찾아 PROJECT_ROOT 로 채택합니다.
241
241
  2. 위가 실패하면 `git rev-parse --show-toplevel` 결과를 사용합니다.
242
242
  3. 모두 실패하면 즉시 에러로 종료합니다.
243
243
 
244
- 해석된 PROJECT_ROOT 에서 첫 실행이라면 `<PROJECT_ROOT>/.project-docs/okstra/project.json` 이 다음 스키마로 자동 생성됩니다.
244
+ 해석된 PROJECT_ROOT 에서 첫 실행이라면 `<PROJECT_ROOT>/.okstra/project.json` 이 다음 스키마로 자동 생성됩니다.
245
245
 
246
246
  ```json
247
247
  {
@@ -574,9 +574,10 @@ chmod +x ~/.local/bin/okstra-ctl
574
574
  | `okstra ensure-installed [-q]` | 설치 상태 확인, stale이면 재설치 |
575
575
  | `okstra uninstall [--purge -y]` | 설치 자산 제거. 기본값은 사용자 데이터 보존 |
576
576
  | `okstra doctor` | runtime + Python import + skill/agent 설치 진단 |
577
- | `okstra setup --project-id <id>` | 현재 프로젝트의 `.project-docs/okstra/project.json` 생성/갱신 |
577
+ | `okstra setup --project-id <id>` | 현재 프로젝트의 `.okstra/project.json` 생성/갱신 |
578
578
  | `okstra check-project [--json]` | 현재 프로젝트가 등록되었는지 검증 |
579
579
  | `okstra config <get\|set\|unset\|show> [key] [value] [--scope project\|global\|all]` | 영구 설정 관리 (예: `pr-template-path`). 원자적 JSON 쓰기 |
580
+ | `okstra migrate [--apply] [--cwd <dir>] [--quiet]` | 한 번만 실행: 프로젝트 산출물 루트를 `.project-docs/okstra/` → `.okstra/` 로 이동. 기본 dry-run, `--apply` 로 실제 실행. `git mv` (git worktree) + 빈 `.project-docs/` 제거 + `<PROJECT>/CLAUDE.md` import 라인 + `.gitignore` + `~/.okstra/{recent,active}.jsonl` + `~/.okstra/worktrees/registry.json` 의 해당 프로젝트 row 동기화. 이미 `.okstra/` 가 존재하거나 레거시 디렉토리가 없으면 exit 1 로 거부. v0.x 말까지 유지 후 제거 예정 |
580
581
  | `okstra task-list [--project-root <path>]` | `list_project_tasks` + `read_latest_task` 결과를 합쳐 task 카탈로그 + 최근 task 를 JSON 으로 반환 |
581
582
  | `okstra task-show <task-key> [--project-root <path>]` | task-manifest.json 의 workflow / phase / status 요약 |
582
583
  | `okstra worktree-lookup <task-key>` | `worktree_registry.lookup` 결과 (예약된 path / branch / base ref / 현재 상태) |
@@ -11,7 +11,7 @@
11
11
  | # | source | 위치 | 비고 |
12
12
  |---|--------|------|------|
13
13
  | 1 | **per-run override** | `okstra render-bundle --pr-template-path <path>` 또는 wizard 의 한 번성 입력 | 상대경로는 호출자 cwd 기준 (override) 또는 `project_root` 기준 (project scope 와 동일 함수 사용). |
14
- | 2 | **project scope** | `<project_root>/.project-docs/okstra/project.json` 의 `prTemplatePath` 필드 | 상대경로는 `project_root` 기준으로 해석. |
14
+ | 2 | **project scope** | `<project_root>/.okstra/project.json` 의 `prTemplatePath` 필드 | 상대경로는 `project_root` 기준으로 해석. |
15
15
  | 3 | **global scope** | `~/.okstra/config.json` 의 `prTemplatePath` 필드 | **절대경로 또는 `~/` 시작 경로만** 허용. 상대경로는 모호하므로 거절. |
16
16
  | 4 | **default (skill bundle)** | 후보 경로 중 먼저 존재하는 파일 (아래 §2) | `npx okstra install` 직후의 폴백 경로. |
17
17
 
@@ -35,7 +35,7 @@
35
35
  per-run override 보다 길게 유지하려면 wizard 가 자동 호출하거나 직접 다음 명령으로 기록한다.
36
36
 
37
37
  ```bash
38
- # project scope: <project_root>/.project-docs/okstra/project.json 의 prTemplatePath 갱신
38
+ # project scope: <project_root>/.okstra/project.json 의 prTemplatePath 갱신
39
39
  okstra config set pr-template-path "<path>" --scope project
40
40
 
41
41
  # global scope: ~/.okstra/config.json 의 prTemplatePath 갱신 (절대경로 필수)
@@ -36,7 +36,7 @@
36
36
 
37
37
  1. **Single prepare authority**: slash skill, Bash CLI, Node preview 모두 `prepare_task_bundle()`로 수렴합니다.
38
38
  2. **Stable task identity**: `<project-id>/<task-group>/<task-id>`가 phase, run, worktree, report를 관통합니다.
39
- 3. **Artifact-home rule**: okstra-owned project artifact root는 `<PROJECT_ROOT>/.project-docs/okstra/**` 하나입니다.
39
+ 3. **Artifact-home rule**: okstra-owned project artifact root는 `<PROJECT_ROOT>/.okstra/**` 하나입니다.
40
40
  4. **Template/schema/validator lockstep**: `templates/`, `schemas/`, `validators/`, worker/report-writer 계약이 같은 report shape를 강제합니다.
41
41
 
42
42
  ---
@@ -134,7 +134,7 @@ So `runtime/` is not the only npm-published content. It is the install payload c
134
134
  | `install`, `ensure-installed` | `src/install.mjs` | Install or refresh runtime, skills, agents, templates |
135
135
  | `uninstall` | `src/uninstall.mjs` | Remove managed runtime/skills/agents, optionally purge data |
136
136
  | `doctor` | `src/doctor.mjs` | Diagnose runtime and Python imports |
137
- | `setup` | `src/setup.mjs` | Create/update `<PROJECT_ROOT>/.project-docs/okstra/project.json` |
137
+ | `setup` | `src/setup.mjs` | Create/update `<PROJECT_ROOT>/.okstra/project.json` |
138
138
  | `check-project` | `src/check-project.mjs` | Verify project registration |
139
139
  | `config` | `src/config.mjs` | Read/write project/global settings such as PR template path |
140
140
  | `task-list`, `task-show` | `src/task-list.mjs`, `src/task-show.mjs` | Task/run introspection for skills |
@@ -341,7 +341,7 @@ The Markdown is derived, not the authoring source. The schema is the contract.
341
341
  ~/.claude/skills/okstra-*/SKILL.md
342
342
  ~/.claude/agents/{claude,codex,gemini,report-writer}-worker.md
343
343
 
344
- <PROJECT_ROOT>/.project-docs/okstra/
344
+ <PROJECT_ROOT>/.okstra/
345
345
  ├── project.json
346
346
  ├── CLAUDE.md
347
347
  ├── glossary.md
@@ -366,7 +366,7 @@ The Markdown is derived, not the authoring source. The schema is the contract.
366
366
  └── (consumers.jsonl) # implementation-planning 전용: impl-run 역링크 누적 파일
367
367
  ```
368
368
 
369
- Project-local `<PROJECT_ROOT>/.claude/settings.local.json`, `<PROJECT_ROOT>/.project-docs/okstra/CLAUDE.md`, and `<PROJECT_ROOT>/AGENTS.md` are provisioned as symlink/import helpers so spawned agents can load okstra permissions and guidance.
369
+ Project-local `<PROJECT_ROOT>/.claude/settings.local.json`, `<PROJECT_ROOT>/.okstra/CLAUDE.md`, and `<PROJECT_ROOT>/AGENTS.md` are provisioned as symlink/import helpers so spawned agents can load okstra permissions and guidance.
370
370
 
371
371
  ---
372
372