okstra 0.96.0 → 0.97.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 (121) hide show
  1. package/README.kr.md +1 -1
  2. package/README.md +1 -1
  3. package/bin/okstra +1 -1
  4. package/docs/contributor-change-matrix.md +1 -1
  5. package/docs/kr/architecture/storage-model.md +273 -0
  6. package/docs/kr/architecture.md +6 -277
  7. package/docs/kr/cli.md +1 -1
  8. package/docs/project-structure-overview.md +26 -22
  9. package/docs/superpowers/plans/2026-06-20-error-feedback-loop.md +1019 -0
  10. package/docs/superpowers/plans/2026-06-20-run-index-row-normalization.md +583 -0
  11. package/docs/superpowers/plans/2026-06-20-stage-auto-integrate-teardown.md +819 -0
  12. package/docs/superpowers/plans/2026-06-21-release-handoff-local-checkout.md +348 -0
  13. package/docs/superpowers/specs/2026-06-06-stage-worktree-isolation-design.md +2 -2
  14. package/docs/superpowers/specs/2026-06-20-error-feedback-loop-design.md +171 -0
  15. package/docs/superpowers/specs/2026-06-20-run-index-row-normalization-design.md +112 -0
  16. package/docs/superpowers/specs/2026-06-20-stage-auto-integrate-teardown-design.md +145 -0
  17. package/docs/superpowers/specs/2026-06-21-release-handoff-local-checkout-design.md +113 -0
  18. package/docs/task-process/release-handoff.md +3 -3
  19. package/package.json +1 -1
  20. package/runtime/BUILD.json +2 -2
  21. package/runtime/bin/lib/okstra/cli.sh +1 -1
  22. package/runtime/bin/lib/okstra/interactive.sh +22 -4
  23. package/runtime/bin/lib/okstra-ctl/cmd-tail.sh +18 -5
  24. package/runtime/bin/okstra-render-final-report.py +4 -15
  25. package/runtime/bin/okstra.sh +5 -2
  26. package/runtime/prompts/launch.template.md +1 -0
  27. package/runtime/prompts/lead/report-writer.md +1 -1
  28. package/runtime/prompts/lead/team-contract.md +1 -1
  29. package/runtime/prompts/profiles/final-verification.md +1 -0
  30. package/runtime/prompts/profiles/forbidden-actions.json +1 -1
  31. package/runtime/prompts/profiles/release-handoff.md +10 -4
  32. package/runtime/python/okstra_ctl/__init__.py +3 -2
  33. package/runtime/python/okstra_ctl/backfill.py +12 -21
  34. package/runtime/python/okstra_ctl/codex_dispatch.py +7 -2
  35. package/runtime/python/okstra_ctl/conformance.py +21 -3
  36. package/runtime/python/okstra_ctl/consumers.py +7 -1
  37. package/runtime/python/okstra_ctl/dispatch_core.py +10 -2
  38. package/runtime/python/okstra_ctl/doctor.py +29 -12
  39. package/runtime/python/okstra_ctl/error_log_core.py +72 -0
  40. package/runtime/python/okstra_ctl/error_report.py +8 -58
  41. package/runtime/python/okstra_ctl/error_zip.py +319 -0
  42. package/runtime/python/okstra_ctl/fanout.py +5 -2
  43. package/runtime/python/okstra_ctl/fix_cycles.py +14 -2
  44. package/runtime/python/okstra_ctl/git_reconcile.py +7 -1
  45. package/runtime/python/okstra_ctl/handoff.py +125 -26
  46. package/runtime/python/okstra_ctl/implementation_stage.py +9 -2
  47. package/runtime/python/okstra_ctl/improvement_lenses.py +2 -0
  48. package/runtime/python/okstra_ctl/index.py +34 -91
  49. package/runtime/python/okstra_ctl/jsonl.py +29 -18
  50. package/runtime/python/okstra_ctl/listing.py +30 -5
  51. package/runtime/python/okstra_ctl/md_table.py +1 -1
  52. package/runtime/python/okstra_ctl/migrate.py +17 -7
  53. package/runtime/python/okstra_ctl/paths.py +1 -1
  54. package/runtime/python/okstra_ctl/recap.py +12 -3
  55. package/runtime/python/okstra_ctl/reconcile.py +13 -11
  56. package/runtime/python/okstra_ctl/render.py +49 -12
  57. package/runtime/python/okstra_ctl/render_final_report.py +4 -0
  58. package/runtime/python/okstra_ctl/report_views.py +47 -6
  59. package/runtime/python/okstra_ctl/run.py +128 -100
  60. package/runtime/python/okstra_ctl/run_index_row.py +118 -0
  61. package/runtime/python/okstra_ctl/schema_excerpt.py +8 -2
  62. package/runtime/python/okstra_ctl/sequence.py +2 -2
  63. package/runtime/python/okstra_ctl/stage_integrate.py +193 -0
  64. package/runtime/python/okstra_ctl/stage_targets.py +2 -8
  65. package/runtime/python/okstra_ctl/task_target.py +4 -1
  66. package/runtime/python/okstra_ctl/team_reconcile.py +6 -1
  67. package/runtime/python/okstra_ctl/wizard.py +27 -12
  68. package/runtime/python/okstra_ctl/workflow.py +9 -1
  69. package/runtime/python/okstra_ctl/worktree.py +93 -4
  70. package/runtime/python/okstra_ctl/worktree_registry.py +57 -8
  71. package/runtime/python/okstra_token_usage/collect.py +43 -38
  72. package/runtime/skills/okstra-brief/SKILL.md +43 -12
  73. package/runtime/skills/okstra-inspect/SKILL.md +44 -1
  74. package/runtime/templates/reports/final-report.template.md +2 -2
  75. package/runtime/templates/reports/release-handoff-input.template.md +1 -1
  76. package/runtime/validators/forbidden_actions.py +8 -1
  77. package/runtime/validators/validate-brief.py +13 -2
  78. package/runtime/validators/validate-run.py +27 -6
  79. package/runtime/validators/validate-schedule.py +1 -2
  80. package/runtime/validators/validate_improvement_report.py +14 -0
  81. package/src/cli-registry.mjs +45 -31
  82. package/src/{codex-dispatch.mjs → commands/execute/codex-dispatch.mjs} +3 -3
  83. package/src/{codex-run.mjs → commands/execute/codex-run.mjs} +3 -3
  84. package/src/{error-log.mjs → commands/execute/error-log.mjs} +1 -1
  85. package/src/{git-reconcile.mjs → commands/execute/git-reconcile.mjs} +1 -1
  86. package/src/{handoff.mjs → commands/execute/handoff.mjs} +3 -1
  87. package/src/commands/execute/integrate-stages.mjs +25 -0
  88. package/src/{plan-validate.mjs → commands/execute/plan-validate.mjs} +1 -1
  89. package/src/{render-bundle.mjs → commands/execute/render-bundle.mjs} +4 -4
  90. package/src/{run.mjs → commands/execute/run.mjs} +4 -4
  91. package/src/{spawn-followups.mjs → commands/execute/spawn-followups.mjs} +1 -1
  92. package/src/{team.mjs → commands/execute/team.mjs} +3 -3
  93. package/src/{token-usage.mjs → commands/execute/token-usage.mjs} +1 -1
  94. package/src/{wizard.mjs → commands/execute/wizard.mjs} +15 -6
  95. package/src/{worktree-lookup.mjs → commands/execute/worktree-lookup.mjs} +1 -1
  96. package/src/{context-cost.mjs → commands/inspect/context-cost.mjs} +2 -2
  97. package/src/{error-report.mjs → commands/inspect/error-report.mjs} +2 -2
  98. package/src/commands/inspect/error-zip.mjs +25 -0
  99. package/src/{recap.mjs → commands/inspect/recap.mjs} +2 -2
  100. package/src/{task-list.mjs → commands/inspect/task-list.mjs} +1 -1
  101. package/src/{task-show.mjs → commands/inspect/task-show.mjs} +1 -1
  102. package/src/{check-project.mjs → commands/lifecycle/check-project.mjs} +2 -2
  103. package/src/{config.mjs → commands/lifecycle/config.mjs} +3 -3
  104. package/src/{doctor.mjs → commands/lifecycle/doctor.mjs} +4 -4
  105. package/src/{install.mjs → commands/lifecycle/install.mjs} +18 -13
  106. package/src/{migrate.mjs → commands/lifecycle/migrate.mjs} +1 -1
  107. package/src/{paths.mjs → commands/lifecycle/paths.mjs} +1 -60
  108. package/src/{setup.mjs → commands/lifecycle/setup.mjs} +4 -4
  109. package/src/{uninstall.mjs → commands/lifecycle/uninstall.mjs} +20 -32
  110. package/src/{memory.mjs → commands/memory/memory.mjs} +32 -7
  111. package/src/{inject-report-index.mjs → commands/report/inject-report-index.mjs} +1 -1
  112. package/src/{render-final-report.mjs → commands/report/render-final-report.mjs} +1 -1
  113. package/src/{render-views.mjs → commands/report/render-views.mjs} +1 -1
  114. package/src/lib/paths.mjs +60 -0
  115. package/src/{_python-helper.mjs → lib/python-helper.mjs} +35 -13
  116. package/src/{version.mjs → lib/version.mjs} +2 -2
  117. /package/src/{okstra-dirs.mjs → lib/okstra-dirs.mjs} +0 -0
  118. /package/src/{_proc.mjs → lib/proc.mjs} +0 -0
  119. /package/src/{runtime-manifest.mjs → lib/runtime-manifest.mjs} +0 -0
  120. /package/src/{runtime-resolver.mjs → lib/runtime-resolver.mjs} +0 -0
  121. /package/src/{skill-catalog.mjs → lib/skill-catalog.mjs} +0 -0
package/README.kr.md CHANGED
@@ -161,7 +161,7 @@ Claude Code 세션 안에서 사용하는 슬래시 커맨드:
161
161
  | `/okstra-brief` | ticket, 요구사항 문서, 링크, 대화 내용을 `okstra-run`용 task brief로 변환 |
162
162
  | `/okstra-run` | 새 task 시작 (또는 기존 task 의 다음 phase 이어가기) |
163
163
  | `/okstra-memory` | `~/.okstra/memory-book` 전역 대화 메모리 저장·검색·보관 |
164
- | `/okstra-inspect` | 통합 read-side 스킬. sub-command: `status` (phase / 상태, workStatus 설정), `history` (과거 task / re-run / resume), `report` (final-report 조회·읽기), `time` (소요 시간 breakdown), `logs` (wrapper log sidecar 조회·정리 제안), `cost` (task bundle 컨텍스트/읽기 비용) |
164
+ | `/okstra-inspect` | 통합 read-side 스킬. sub-command: `status` (phase / 상태, workStatus 설정), `history` (과거 task / re-run / resume), `report` (final-report 조회·읽기), `time` (소요 시간 breakdown), `logs` (wrapper log sidecar 조회·정리 제안), `cost` (task bundle 컨텍스트/읽기 비용), `errors` (run 에러 로그를 리포트로 집계), `recap` (run 간 전/후 요약 + task 의 `.okstra` 산출물 위 자유 Q&A) |
165
165
  | `/okstra-schedule` | task-group 전체에 대한 작업 계획표 생성 |
166
166
  | `/okstra-setup` | 프로젝트별 부트스트랩 (§3.2) |
167
167
 
package/README.md CHANGED
@@ -159,7 +159,7 @@ User-facing slash commands inside a Claude Code session:
159
159
  | `/okstra-brief` | Turn a ticket, requirements doc, link, or conversation into an `okstra-run` task brief |
160
160
  | `/okstra-run` | Start a new task (or resume the next phase of an existing one) |
161
161
  | `/okstra-memory` | Store/search/archive global conversation memory in `~/.okstra/memory-book` |
162
- | `/okstra-inspect` | Unified read-side. Sub-commands: `status` (phase / state, workStatus update), `history` (past runs, re-run, resume), `report` (find/read final-report), `time` (elapsed-time breakdown), `logs` (wrapper log sidecar inventory + cleanup), `cost` (task bundle context/read cost) |
162
+ | `/okstra-inspect` | Unified read-side. Sub-commands: `status` (phase / state, workStatus update), `history` (past runs, re-run, resume), `report` (find/read final-report), `time` (elapsed-time breakdown), `logs` (wrapper log sidecar inventory + cleanup), `cost` (task bundle context/read cost), `errors` (aggregate run error logs into a report), `recap` (run-to-run before/after summary + free-form Q&A over a task's `.okstra` artifacts) |
163
163
  | `/okstra-schedule` | Generate a work schedule for an entire task-group |
164
164
  | `/okstra-setup` | Per-project bootstrap (§3.2) |
165
165
 
package/bin/okstra CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { getPackageVersion } from "../src/version.mjs";
2
+ import { getPackageVersion } from "../src/lib/version.mjs";
3
3
  import { COMMANDS, USAGE } from "../src/cli-registry.mjs";
4
4
 
5
5
  async function main(argv) {
@@ -6,7 +6,7 @@ Use this matrix before changing high-risk repo contracts. Update the source file
6
6
  |---|---|---|
7
7
  | Add CLI flag | `src/`, `scripts/okstra_ctl/run.py`, `docs/kr/cli.md`, `prompts/wizard/` | JS CLI tests and pytest CLI contracts |
8
8
  | Add phase | `scripts/okstra_ctl/workflow.py`, `prompts/profiles/`, `validators/`, `tests/` | workflow and validation contract tests |
9
- | Change worker roster | `prompts/profiles/*.md`, `scripts/okstra_ctl/workers.py`, `tests/test_repo_contracts.py` | worker roster contract tests |
9
+ | Change worker roster | `prompts/profiles/*.md`, `scripts/okstra_ctl/workers.py`, `tests/contract/test_repo_contracts.py` | worker roster contract tests |
10
10
  | Change report section | `schemas/final-report-v1.0.schema.json`, `templates/reports/final-report.template.md`, `scripts/okstra_ctl/render_final_report.py`, `validators/validate-run.py` | final-report schema, renderer, and validator tests |
11
11
 
12
12
  `runtime/` is build output. Never edit it directly; change source files and rebuild the runtime payload instead.
@@ -0,0 +1,273 @@
1
+ # Storage model & on-disk contracts
2
+
3
+ > [`docs/kr/architecture.md`](../architecture.md) 의 storage / 계약 상세 절. 본문이 1000 줄을 넘어 이 부분을 분리했습니다.
4
+
5
+ ## Storage model
6
+
7
+ `okstra`가 만드는 파일은 용도에 따라 아래 3개 영역에 나뉘어 저장됩니다.
8
+
9
+ ### 1. Stable task root
10
+
11
+ task 자체의 기준 폴더입니다.
12
+ task manifest, task index, instruction-set, runs, history가 이 루트 아래에 모입니다.
13
+
14
+ ```text
15
+ <target-project>/.okstra/tasks/<task-group>/<task-id>/
16
+ ├── task-manifest.json
17
+ ├── task-index.md
18
+ ├── instruction-set/
19
+ │ ├── analysis-profile.md
20
+ │ ├── analysis-packet.md # analysis worker primary compact input
21
+ │ ├── analysis-material.md
22
+ │ ├── reference-expectations.md
23
+ │ ├── task-brief.md
24
+ │ ├── directive.txt # optional (mirrors --directive)
25
+ │ ├── final-report-schema.json
26
+ │ ├── final-report-template.md
27
+ │ └── claude-execution-prompt.md
28
+ ├── runs/
29
+ │ └── <task-type>/
30
+ │ ├── manifests/
31
+ │ │ └── run-manifest-<task-type>-<seq>.json
32
+ │ ├── state/
33
+ │ │ └── team-state-<task-type>-<seq>.json
34
+ │ ├── prompts/
35
+ │ │ ├── claude-execution-prompt-<task-type>-<seq>.md
36
+ │ │ ├── claude-worker-prompt-<task-type>-<seq>.md
37
+ │ │ ├── codex-worker-prompt-<task-type>-<seq>.md
38
+ │ │ ├── antigravity-worker-prompt-<task-type>-<seq>.md
39
+ │ │ └── report-writer-worker-prompt-<task-type>-<seq>.md
40
+ │ ├── reports/
41
+ │ │ └── final-report-<task-type>-<seq>.md
42
+ │ ├── status/
43
+ │ │ └── final-<task-type>-<seq>.status
44
+ │ ├── sessions/
45
+ │ │ └── claude-resume-<task-type>-<seq>.sh
46
+ │ ├── logs/
47
+ │ │ └── errors-<task-type>-<seq>.jsonl # optional, lead-only writer
48
+ │ └── worker-results/
49
+ ├── history/
50
+ │ ├── timeline.json
51
+ │ └── fix-cycles.jsonl # optional, fix cycle 진입 시에만 생성 (append-only)
52
+ └── recap/
53
+ └── recap-log.jsonl # optional, recap facet 의 전/후 요약·Q&A append-only 로그 (다른 산출물 불변)
54
+ ```
55
+
56
+ 실제 디렉터리 세그먼트는 안전한 경로 생성을 위해 slug 형태로 정규화될 수 있습니다.
57
+ 하지만 논리 task key는 항상 원래 입력값 기준 `project-id:task-group:task-id`를 유지합니다.
58
+
59
+ ### 2. Per-run execution artifacts
60
+
61
+ 실행별 산출물은 아래 경로에 누적됩니다.
62
+
63
+ ```text
64
+ <target-project>/.okstra/tasks/<task-group>/<task-id>/runs/<task-type>/
65
+ ```
66
+
67
+ 여기에 저장되는 대표 파일:
68
+
69
+ - `manifests/run-manifest-<task-type>-<seq>.json`
70
+ - `state/team-state-<task-type>-<seq>.json`
71
+ - `prompts/claude-execution-prompt-<task-type>-<seq>.md`
72
+ - `prompts/<worker>-worker-prompt-<task-type>-<seq>.md`
73
+
74
+ 그리고 `--render-only`가 아니면 handoff된 Claude session이 보통 아래 결과 파일을 현재 run에 추가합니다.
75
+ - `sessions/claude-resume-<task-type>-<seq>.sh`
76
+ - `reports/final-report-<task-type>-<seq>.md`
77
+ - `reports/final-report-<task-type>-<seq>.slim.md` *(Phase 7 결정론적 후처리: AI 다음-phase 입력용 슬림 markdown)*
78
+ - `reports/final-report-<task-type>-<seq>.html` *(Phase 7 결정론적 후처리: 사람 reviewer 용 self-contained HTML, CSS/JS 인라인)*
79
+ - `user-responses/user-response-<task-type>-<seq>.md` *(HTML 의 `Export user response` 버튼이 같은 이름으로 다운로드해 주는 사이드카; 여기 저장해 두면 `--resume-clarification` 이 instruction-set 의 `clarification-response.md` 에 자동 첨부한다 — `clarification_items.clarification_response_with_sidecars`)*
80
+ - `worker-results/<worker>-audit-<task-type>-<seq>.md` *(워커별 Reading Confirmation 사이드카; 본문이 아니라 audit 용)*
81
+ - `status/final-<task-type>-<seq>.status`
82
+ - `carry/stage-<N>.json` *(implementation 전용: stage N 실행 evidence sidecar; 다음 stage 가 자동 carry-in)*
83
+ - `consumers.jsonl` *(implementation-planning 전용: 이 plan 의 각 stage 를 소비한 impl-run 역링크; append-only)*
84
+ 최종 결과 파일 (`final-report` MD / status) 은 `okstra`가 stdout을 저장해서 만드는 파일이 아닙니다.
85
+ `okstra`가 준비한 task bundle을 바탕으로 Claude가 현재 run 안에 직접 작성하는 결과물입니다.
86
+ slim MD / HTML 두 view 는 `okstra render-views <final-report.md>` (Phase 7 step 1.5) 가 final-report MD 한 본을 입력으로 결정론적으로 생성합니다. 원본 MD 는 view 생성으로 인해 수정되지 않습니다.
87
+ 반면 `sessions/claude-resume-<task-type>-<seq>.sh`는 `okstra`가 Claude launch 전에 미리 생성하는 interruption recovery helper입니다.
88
+
89
+ run directory는 task-type 단위로 task 실행 이력을 모으고, 내부를 `manifests/`, `state/`, `prompts/`, `reports/`, `status/`, `sessions/`, `worker-results/`처럼 유형별 하위 폴더로 나눈 뒤 각 run-level artifact와 result 파일을 `-<task-type>-<seq>` suffix(per-category 3-digit zero-padded counter, 예: `001`, `002`)로 구분합니다.
90
+ worker prompt history는 `/tmp`가 아니라 항상 현재 run의 `prompts/` 아래 canonical artifact로 남깁니다.
91
+ 이전처럼 `analysis-profile.md`, `analysis-material.md`, `reference-expectations.md`, `task-brief.md`, skill 복사본, `final-report-template.md`를 run마다 중복 저장하지 않습니다.
92
+ 이 자료들은 stable task root의 `instruction-set/`에 canonical copy를 유지합니다.
93
+ 같은 task-type으로 다시 실행하면 동일한 `runs/<task-type>/` 폴더를 재사용하지만, 유형별 하위 폴더 아래에서 run-level 파일명이 `-<task-type>-<seq>` suffix로 분리되므로 기존 산출물을 덮어쓰지 않습니다. `<seq>`는 카테고리 디렉토리(`manifests/`, `prompts/`, `reports/`, `status/`, `state/`, `sessions/`, `worker-results/`)별로 독립 스캔되므로 같은 run에서도 카테고리별 값이 다를 수 있습니다.
94
+ 이전 flat legacy artifact가 task-type run 폴더 최상위에 남아 있으면 다음 실행 시 해당 유형별 하위 폴더로 자동 정리합니다.
95
+
96
+ ### 3. Project-level discovery and skill documents
97
+ 프로젝트 공용 discovery pointer는 아래 경로에 생성합니다.
98
+
99
+ ```text
100
+ <target-project>/.okstra/discovery/latest-task.json
101
+ <target-project>/.okstra/discovery/task-catalog.json
102
+ ```
103
+ scripts/okstra.sh workflow가 사용하는 project-local Claude assets는 아래 경로들에 seed합니다.
104
+
105
+ ```text
106
+ <target-project>/.claude/skills/okstra/SKILL.md
107
+ <target-project>/.claude/skills/<sub-skill>/SKILL.md
108
+ <target-project>/.claude/agents/<agent>.md
109
+ ```
110
+
111
+ 역할 구분:
112
+
113
+ - `.okstra/discovery/latest-task.json`: 현재 프로젝트에서 가장 최근에 준비된 okstra task bundle을 가리키는 current-task convenience pointer
114
+ - `.okstra/discovery/task-catalog.json`: 현재 프로젝트에 준비된 okstra task bundle 목록을 `taskKey`, `taskGroup`, `taskId` 기준으로 유지하는 canonical project-level catalog
115
+ - `instruction-set/reference-expectations.md`: 현재 task가 참조해야 할 config files, deployment manifests, expected values를 task-level canonical artifact로 정리한 파일
116
+ - `~/.claude/skills/okstra-*/...`, `~/.codex/skills/okstra-*/...`, `~/.omp/agent/skills/okstra-*/...`, `~/.claude/agents/...`: `okstra install` 이 사용자 홈에 seed하는 skill/agent asset (project-local 시딩은 더 이상 발생하지 않음 — `okstra install --refresh` 로 갱신)
117
+
118
+ 이전의 아래 파일들은 더 이상 okstra 생성 대상이 아닙니다.
119
+
120
+ - `CLAUDE.md`
121
+ - `.project-docs/ai/claude-project-guide.md`
122
+ - `.project-docs/ai/claude-skill-index.md`
123
+ - `.project-docs/ai/okstra/okstra-guide.md`
124
+ - `.project-docs/ai/okstra/worker-catalog.md`
125
+
126
+ ## Task manifest contract
127
+
128
+ `task-manifest.json`은 Claude가 task continuity를 이해할 때 기준이 되는 canonical metadata 파일입니다.
129
+ 이 manifest는 `projectRoot` 절대경로를 한 번만 기록하고, 나머지 생성 경로들은 가능한 한 project-relative field로 정리하는 것을 기본 원칙으로 합니다.
130
+
131
+ 핵심 필드 예시:
132
+
133
+ - `projectId`
134
+ - `taskGroup`
135
+ - `taskId`
136
+ - `taskKey`
137
+ - `projectRoot`
138
+ - `taskType`
139
+ - `workCategory`
140
+ - `taskBriefPath`
141
+ - `relatedTasks`
142
+ - `currentStatus`
143
+ - `taskRootPath`
144
+ - `instructionSetPath`
145
+ - `referenceExpectationsPath`
146
+ - `runsPath`
147
+ - `historyTimelinePath`
148
+ - `latestRunPath`
149
+ - `latestRunStatus`
150
+ - `latestRunPromptsPath`
151
+ - `latestReportPath`
152
+ - `latestResumeCommandPath`
153
+ - `workflow.currentPhase`
154
+ - `workflow.currentPhaseState`
155
+ - `workflow.phaseStates`
156
+ - `workflow.lastCompletedPhase`
157
+ - `workflow.nextRecommendedPhase`
158
+ - `workflow.awaitingApproval`
159
+ - `workflow.routingStatus`
160
+ - `workflow.lastSafeCheckpoint`
161
+ - `inputs`
162
+ - `artifacts`
163
+ - `resultContract`
164
+ - `claudeSession`
165
+ - `fixCycles` *(파생 요약 — `{count, openCycleId, latest:{cycle, symptom, targetReport, closedAt}}`; 매 prepare 재계산)*
166
+
167
+ 이 manifest는 아래 목적을 가집니다.
168
+
169
+ - Claude가 brief보다 먼저 task continuity를 이해하게 함
170
+ - 어떤 파일을 우선 읽어야 하는지 고정함
171
+ - 어떤 config files와 deployment manifests를 어떤 expected values로 해석해야 하는지 고정함
172
+ - 어떤 task key 아래 결과가 누적되는지 고정함
173
+ - related task와 latest run 위치를 빠르게 확인하게 함
174
+
175
+ ## Task index contract
176
+
177
+ `task-index.md`는 사람이 빠르게 읽기 위한 요약 문서입니다.
178
+
179
+ 주요 내용:
180
+ - task key
181
+ - current task type
182
+ - work category
183
+ - 현재 task 상태
184
+ - 최신 run 상태
185
+ - current phase
186
+ - current phase state
187
+ - next recommended phase
188
+ - reference expectations
189
+ - latest run
190
+ - latest report
191
+ - resume command
192
+
193
+ 이 문서는 quick summary일 뿐이며 source of truth가 아닙니다.
194
+ canonical metadata는 항상 `task-manifest.json`을 기준으로 확인합니다.
195
+
196
+ ## Run manifest contract
197
+
198
+ 각 실행은 `runs/<task-type>/manifests/run-manifest-<task-type>-<seq>.json`에 현재 run 계약을 남깁니다.
199
+
200
+ `manifests/run-manifest-<task-type>-<seq>.json`의 path 계열 필드는 모두 대상 프로젝트 루트 기준 상대경로만 저장합니다.
201
+ `okstra`가 Claude handoff를 시작한 직후에는 현재 run 상태가 보통 `in-progress`로 기록됩니다.
202
+ 이후 최종 결과 저장과 상태 갱신은 Claude가 이어서 수행합니다.
203
+ 또한 `okstra`는 launch 전에 session ID를 선할당하고, 같은 run의 `sessions/` 아래에 `claude-resume-<task-type>-<seq>.sh`를 생성합니다.
204
+
205
+ 주요 내용:
206
+
207
+ - task key
208
+ - task type
209
+ - work category
210
+ - run datetime segment
211
+ - task brief relative path
212
+ - analysis target
213
+ - related tasks
214
+ - selected workers
215
+ - worker model assignments
216
+ - claude session id
217
+ - resume command relative path
218
+ - expected report relative path
219
+ - expected status relative path
220
+ - prompt snapshot relative path
221
+ - `worker prompt directory relative path`
222
+ - `worker prompt relative path by worker id`
223
+ - current run status
224
+ - workflow snapshot
225
+ - team contract
226
+ - `fixCycleId` *(fix cycle 부착 시에만; 없으면 필드 생략)*
227
+
228
+ ## Timeline contract
229
+
230
+ `history/timeline.json`은 task에 속한 run 이력을 누적합니다.
231
+
232
+ 이력에는 보통 아래가 포함됩니다.
233
+
234
+ - run timestamp
235
+ - run directory relative path
236
+ - run manifest relative path
237
+ - run time segment
238
+ - task type
239
+ - work category
240
+ - status
241
+ - worker prompt directory relative path
242
+ - report relative path
243
+ - resume command relative path
244
+ - related tasks
245
+ - workflow snapshot
246
+ - `fixCycleId` *(fix cycle 부착 시에만; 없으면 필드 생략)*
247
+ 같은 task-type을 다시 실행하면 같은 `runs/<task-type>/` 폴더를 재사용하더라도 `run-manifest-<task-type>-<seq>.json`과 관련 artifact 경로가 per-category sequence suffix(`<task-type>-<seq>`)로 분리되므로 각 실행이 별도 이력으로 누적됩니다. cross-category 식별자는 manifest의 `runDateTimeSegment` ISO timestamp 필드입니다.
248
+
249
+ ## Claude operating contract
250
+
251
+ `okstra` 실행 후 Claude는 아래 순서로 현재 task를 읽는 것을 기본 규칙으로 삼아야 합니다.
252
+
253
+ 1. task browsing 또는 task-id disambiguation이 필요하면 `.okstra/discovery/task-catalog.json`을 먼저 읽습니다.
254
+ 2. 현재 task key나 task path가 명시되지 않았다면 `.okstra/discovery/latest-task.json`을 current-task pointer로 읽습니다.
255
+ 3. `task-manifest.json`을 읽습니다.
256
+ 4. current `state/active-run-context-<task-type>-<seq>.json`이 있으면 lead Phase 1의 1차 입력으로 읽습니다. 없으면 current `manifests/run-manifest-<task-type>-<seq>.json`과 `team-state`로 fallback합니다.
257
+ 5. `instruction-set/analysis-profile.md`와 `instruction-set/analysis-packet.md`를 읽습니다.
258
+ 6. `task-index.md`는 quick summary가 필요할 때만 선택적으로 읽습니다.
259
+ 7. `analysis-material.md`, `reference-expectations.md`, `task-brief.md`, `final-report-template.md`는 packet이 불충분하거나 source citation/보고서 작성에 필요할 때 lazy read합니다.
260
+ 8. 필요하면 `history/timeline.json`과 이전 run 결과를 참고합니다.
261
+ 9. `Claude lead`로서 현재 run의 worker roster (기본 `Claude worker`, `Codex worker`, `Report writer worker`; `Antigravity worker`는 명시 포함된 경우에만)에 따라 역할을 구성합니다.
262
+ 10. 각 selected worker prompt를 assigned worker prompt history path로 현재 run의 `prompts/` 아래에 먼저 저장한 뒤 worker를 dispatch합니다.
263
+ 14. 각 required worker에 대해 결과 또는 terminal status를 수집합니다.
264
+ 15. brief이 더 구체적인 형식을 강제하지 않으면 `final-report-template.md` 구조로 Markdown 최종 보고서를 작성합니다.
265
+ 16. 결과를 현재 run의 `reports/final-report-<task-type>-<seq>.md`에 직접 저장하고, 필요하면 `status/final-<task-type>-<seq>.status`, `manifests/run-manifest-<task-type>-<seq>.json`, `task-manifest.json`, `task-index.md`도 현재 상태에 맞게 갱신합니다.
266
+
267
+ 권장 worker 상태값:
268
+
269
+ - `completed`
270
+ - `timeout`
271
+ - `error`
272
+ - `not-run`
273
+
@@ -40,15 +40,9 @@
40
40
  - [표준 task type](#표준-task-type)
41
41
  - [Phase 간 정보 전달](#phase-간-정보-전달)
42
42
  - (CLI 인자 / 옵션 / 인터랙티브 입력은 [cli.md](cli.md) 참조)
43
- - [Storage model](#storage-model)
44
- - [1. Stable task root](#1-stable-task-root)
45
- - [2. Per-run execution artifacts](#2-per-run-execution-artifacts)
46
- - [3. Project-level discovery and skill documents](#3-project-level-discovery-and-skill-documents)
47
- - [Task manifest contract](#task-manifest-contract)
48
- - [Task index contract](#task-index-contract)
49
- - [Run manifest contract](#run-manifest-contract)
50
- - [Timeline contract](#timeline-contract)
51
- - [Claude operating contract](#claude-operating-contract)
43
+ - [Storage model & contracts](#storage-model--contracts) → [`architecture/storage-model.md`](architecture/storage-model.md)
44
+ - Stable task root / per-run artifacts / `~/.okstra` 인덱스
45
+ - Task manifest · task index · run manifest · timeline · Claude operating 계약
52
46
  - [Task brief usage](#task-brief-usage)
53
47
  - [Recommended workflow](#recommended-workflow)
54
48
  - [1. 초안 작성](#1-초안-작성)
@@ -152,7 +146,7 @@ okstra 의 prepare 책임은 단일 python 진입점 [`okstra_ctl.run.prepare_ta
152
146
  - [`prompts/lead/okstra-lead-contract.md`](../../prompts/lead/okstra-lead-contract.md) — main okstra lead contract. 런타임 리소스(`~/.okstra/prompts/lead/`)이며 agent skill 이 아닙니다.
153
147
  - [`skills/okstra-setup/SKILL.md`](../../skills/okstra-setup/SKILL.md) — **첫 실행 부트스트랩**. `okstra install` + `project.json` 생성.
154
148
  - [`skills/okstra-run/SKILL.md`](../../skills/okstra-run/SKILL.md) — **현재 claude 세션 안에서 okstra task 를 시작**하는 in-session 진입점. `prepare_task_bundle` 직접 호출.
155
- - 사용자 호출 가능 스킬은 `skills/okstra-{setup,brief,run,memory,inspect,schedule}/SKILL.md` 6종뿐이며, 이것만 agent skill home 으로 복사됩니다 — brief 작성, phase 진행, 전역 Memory Book 저장/검색, status/history/report/time/log/cost read-side, schedule 보조. `okstra-inspect logs` 는 codex/antigravity wrapper 가 매 dispatch 마다 `runs/<task-type>/prompts/<worker>-prompt-<phase>-<seq>.log` 로 남기는 live-log sidecar 의 인벤토리·정리 안내(read-only), `okstra-inspect cost` 는 `okstra context-cost` 결과 요약입니다.
149
+ - 사용자 호출 가능 스킬은 `skills/okstra-{setup,brief,run,memory,inspect,schedule}/SKILL.md` 6종뿐이며, 이것만 agent skill home 으로 복사됩니다 — brief 작성, phase 진행, 전역 Memory Book 저장/검색, status/history/report/time/logs/cost/errors/recap read-side, schedule 보조. `okstra-inspect` 의 read-side facet 은 `skills/okstra-inspect/SKILL.md` 의 sub-command 표가 정본인 8종입니다. `okstra-inspect logs` 는 codex/antigravity wrapper 가 매 dispatch 마다 `runs/<task-type>/prompts/<worker>-prompt-<phase>-<seq>.log` 로 남기는 live-log sidecar 의 인벤토리·정리 안내(read-only), `okstra-inspect cost` 는 `okstra context-cost` 결과 요약, `okstra-inspect errors` 는 task 의 okstra-run 에러 로그를 타임스탬프 markdown error-report 로 모아 렌더하고 요약을 출력, `okstra-inspect recap` 은 task 의 run 간 phase 전·후 요약에 더해 `.okstra` 산출물에 대한 자유 Q&A 까지 답합니다.
156
150
  - 내부 운영 계약 — `context-loader` / `team-contract` / `convergence` / `report-writer` 와 lead 계약 — 은 `prompts/lead/*.md` 로, 구현/검증 워커의 언어별 coding preflight 는 `prompts/coding-preflight/*` (overview 라우터 + clean-code + languages/frameworks/architectures 3단계 선택) 로 이동했습니다. 모두 `~/.okstra/prompts/` 에 설치되는 런타임 리소스이며 skill discovery 대상이 아닙니다. generated launch prompt 가 lead 에게 절대 경로를 제공하고, 재설치 시 과거 `okstra-context-loader` / `okstra-team-contract` / `okstra-convergence` / `okstra-report-writer` / `okstra-coding-preflight` / `okstra` skill 디렉터리는 exact-name prune 됩니다.
157
151
  - 플러그인 매니페스트: [`../../.claude-plugin/plugin.json`](../../.claude-plugin/plugin.json) — `npx skills@latest add Devonshin/okstra` 보조 채널이 참조. 일반 셋업에는 `npx okstra@latest install` 을 사용한다. 플러그인 매니페스트는 사용자 진입점 6개(`okstra-setup`, `okstra-brief`, `okstra-run`, `okstra-memory`, `okstra-inspect`, `okstra-schedule`)만 노출한다.
158
152
  - 설치 위치: `~/.claude/skills/<name>/SKILL.md`, `~/.codex/skills/<name>/SKILL.md`, 또는 fallback `~/.omp/agent/skills/<name>/SKILL.md`.
@@ -428,274 +422,9 @@ okstra-run wizard 는 별도 분기 확인 단계를 두지 않고, 최종 `conf
428
422
 
429
423
  ---
430
424
 
431
- ## Storage model
425
+ ## Storage model & contracts
432
426
 
433
- `okstra`가 만드는 파일은 용도에 따라 아래 3개 영역에 나뉘어 저장됩니다.
434
-
435
- ### 1. Stable task root
436
-
437
- task 자체의 기준 폴더입니다.
438
- task manifest, task index, instruction-set, runs, history가 이 루트 아래에 모입니다.
439
-
440
- ```text
441
- <target-project>/.okstra/tasks/<task-group>/<task-id>/
442
- ├── task-manifest.json
443
- ├── task-index.md
444
- ├── instruction-set/
445
- │ ├── analysis-profile.md
446
- │ ├── analysis-packet.md # analysis worker primary compact input
447
- │ ├── analysis-material.md
448
- │ ├── reference-expectations.md
449
- │ ├── task-brief.md
450
- │ ├── directive.txt # optional (mirrors --directive)
451
- │ ├── final-report-schema.json
452
- │ ├── final-report-template.md
453
- │ └── claude-execution-prompt.md
454
- ├── runs/
455
- │ └── <task-type>/
456
- │ ├── manifests/
457
- │ │ └── run-manifest-<task-type>-<seq>.json
458
- │ ├── state/
459
- │ │ └── team-state-<task-type>-<seq>.json
460
- │ ├── prompts/
461
- │ │ ├── claude-execution-prompt-<task-type>-<seq>.md
462
- │ │ ├── claude-worker-prompt-<task-type>-<seq>.md
463
- │ │ ├── codex-worker-prompt-<task-type>-<seq>.md
464
- │ │ ├── antigravity-worker-prompt-<task-type>-<seq>.md
465
- │ │ └── report-writer-worker-prompt-<task-type>-<seq>.md
466
- │ ├── reports/
467
- │ │ └── final-report-<task-type>-<seq>.md
468
- │ ├── status/
469
- │ │ └── final-<task-type>-<seq>.status
470
- │ ├── sessions/
471
- │ │ └── claude-resume-<task-type>-<seq>.sh
472
- │ ├── logs/
473
- │ │ └── errors-<task-type>-<seq>.jsonl # optional, lead-only writer
474
- │ └── worker-results/
475
- ├── history/
476
- │ ├── timeline.json
477
- │ └── fix-cycles.jsonl # optional, fix cycle 진입 시에만 생성 (append-only)
478
- └── recap/
479
- └── recap-log.jsonl # optional, recap facet 의 전/후 요약·Q&A append-only 로그 (다른 산출물 불변)
480
- ```
481
-
482
- 실제 디렉터리 세그먼트는 안전한 경로 생성을 위해 slug 형태로 정규화될 수 있습니다.
483
- 하지만 논리 task key는 항상 원래 입력값 기준 `project-id:task-group:task-id`를 유지합니다.
484
-
485
- ### 2. Per-run execution artifacts
486
-
487
- 실행별 산출물은 아래 경로에 누적됩니다.
488
-
489
- ```text
490
- <target-project>/.okstra/tasks/<task-group>/<task-id>/runs/<task-type>/
491
- ```
492
-
493
- 여기에 저장되는 대표 파일:
494
-
495
- - `manifests/run-manifest-<task-type>-<seq>.json`
496
- - `state/team-state-<task-type>-<seq>.json`
497
- - `prompts/claude-execution-prompt-<task-type>-<seq>.md`
498
- - `prompts/<worker>-worker-prompt-<task-type>-<seq>.md`
499
-
500
- 그리고 `--render-only`가 아니면 handoff된 Claude session이 보통 아래 결과 파일을 현재 run에 추가합니다.
501
- - `sessions/claude-resume-<task-type>-<seq>.sh`
502
- - `reports/final-report-<task-type>-<seq>.md`
503
- - `reports/final-report-<task-type>-<seq>.slim.md` *(Phase 7 결정론적 후처리: AI 다음-phase 입력용 슬림 markdown)*
504
- - `reports/final-report-<task-type>-<seq>.html` *(Phase 7 결정론적 후처리: 사람 reviewer 용 self-contained HTML, CSS/JS 인라인)*
505
- - `user-responses/user-response-<task-type>-<seq>.md` *(HTML 의 `Export user response` 버튼이 같은 이름으로 다운로드해 주는 사이드카; 여기 저장해 두면 `--resume-clarification` 이 instruction-set 의 `clarification-response.md` 에 자동 첨부한다 — `clarification_items.clarification_response_with_sidecars`)*
506
- - `worker-results/<worker>-audit-<task-type>-<seq>.md` *(워커별 Reading Confirmation 사이드카; 본문이 아니라 audit 용)*
507
- - `status/final-<task-type>-<seq>.status`
508
- - `carry/stage-<N>.json` *(implementation 전용: stage N 실행 evidence sidecar; 다음 stage 가 자동 carry-in)*
509
- - `consumers.jsonl` *(implementation-planning 전용: 이 plan 의 각 stage 를 소비한 impl-run 역링크; append-only)*
510
- 최종 결과 파일 (`final-report` MD / status) 은 `okstra`가 stdout을 저장해서 만드는 파일이 아닙니다.
511
- `okstra`가 준비한 task bundle을 바탕으로 Claude가 현재 run 안에 직접 작성하는 결과물입니다.
512
- slim MD / HTML 두 view 는 `okstra render-views <final-report.md>` (Phase 7 step 1.5) 가 final-report MD 한 본을 입력으로 결정론적으로 생성합니다. 원본 MD 는 view 생성으로 인해 수정되지 않습니다.
513
- 반면 `sessions/claude-resume-<task-type>-<seq>.sh`는 `okstra`가 Claude launch 전에 미리 생성하는 interruption recovery helper입니다.
514
-
515
- run directory는 task-type 단위로 task 실행 이력을 모으고, 내부를 `manifests/`, `state/`, `prompts/`, `reports/`, `status/`, `sessions/`, `worker-results/`처럼 유형별 하위 폴더로 나눈 뒤 각 run-level artifact와 result 파일을 `-<task-type>-<seq>` suffix(per-category 3-digit zero-padded counter, 예: `001`, `002`)로 구분합니다.
516
- worker prompt history는 `/tmp`가 아니라 항상 현재 run의 `prompts/` 아래 canonical artifact로 남깁니다.
517
- 이전처럼 `analysis-profile.md`, `analysis-material.md`, `reference-expectations.md`, `task-brief.md`, skill 복사본, `final-report-template.md`를 run마다 중복 저장하지 않습니다.
518
- 이 자료들은 stable task root의 `instruction-set/`에 canonical copy를 유지합니다.
519
- 같은 task-type으로 다시 실행하면 동일한 `runs/<task-type>/` 폴더를 재사용하지만, 유형별 하위 폴더 아래에서 run-level 파일명이 `-<task-type>-<seq>` suffix로 분리되므로 기존 산출물을 덮어쓰지 않습니다. `<seq>`는 카테고리 디렉토리(`manifests/`, `prompts/`, `reports/`, `status/`, `state/`, `sessions/`, `worker-results/`)별로 독립 스캔되므로 같은 run에서도 카테고리별 값이 다를 수 있습니다.
520
- 이전 flat legacy artifact가 task-type run 폴더 최상위에 남아 있으면 다음 실행 시 해당 유형별 하위 폴더로 자동 정리합니다.
521
-
522
- ### 3. Project-level discovery and skill documents
523
- 프로젝트 공용 discovery pointer는 아래 경로에 생성합니다.
524
-
525
- ```text
526
- <target-project>/.okstra/discovery/latest-task.json
527
- <target-project>/.okstra/discovery/task-catalog.json
528
- ```
529
- scripts/okstra.sh workflow가 사용하는 project-local Claude assets는 아래 경로들에 seed합니다.
530
-
531
- ```text
532
- <target-project>/.claude/skills/okstra/SKILL.md
533
- <target-project>/.claude/skills/<sub-skill>/SKILL.md
534
- <target-project>/.claude/agents/<agent>.md
535
- ```
536
-
537
- 역할 구분:
538
-
539
- - `.okstra/discovery/latest-task.json`: 현재 프로젝트에서 가장 최근에 준비된 okstra task bundle을 가리키는 current-task convenience pointer
540
- - `.okstra/discovery/task-catalog.json`: 현재 프로젝트에 준비된 okstra task bundle 목록을 `taskKey`, `taskGroup`, `taskId` 기준으로 유지하는 canonical project-level catalog
541
- - `instruction-set/reference-expectations.md`: 현재 task가 참조해야 할 config files, deployment manifests, expected values를 task-level canonical artifact로 정리한 파일
542
- - `~/.claude/skills/okstra-*/...`, `~/.codex/skills/okstra-*/...`, `~/.omp/agent/skills/okstra-*/...`, `~/.claude/agents/...`: `okstra install` 이 사용자 홈에 seed하는 skill/agent asset (project-local 시딩은 더 이상 발생하지 않음 — `okstra install --refresh` 로 갱신)
543
-
544
- 이전의 아래 파일들은 더 이상 okstra 생성 대상이 아닙니다.
545
-
546
- - `CLAUDE.md`
547
- - `.project-docs/ai/claude-project-guide.md`
548
- - `.project-docs/ai/claude-skill-index.md`
549
- - `.project-docs/ai/okstra/okstra-guide.md`
550
- - `.project-docs/ai/okstra/worker-catalog.md`
551
-
552
- ## Task manifest contract
553
-
554
- `task-manifest.json`은 Claude가 task continuity를 이해할 때 기준이 되는 canonical metadata 파일입니다.
555
- 이 manifest는 `projectRoot` 절대경로를 한 번만 기록하고, 나머지 생성 경로들은 가능한 한 project-relative field로 정리하는 것을 기본 원칙으로 합니다.
556
-
557
- 핵심 필드 예시:
558
-
559
- - `projectId`
560
- - `taskGroup`
561
- - `taskId`
562
- - `taskKey`
563
- - `projectRoot`
564
- - `taskType`
565
- - `workCategory`
566
- - `taskBriefPath`
567
- - `relatedTasks`
568
- - `currentStatus`
569
- - `taskRootPath`
570
- - `instructionSetPath`
571
- - `referenceExpectationsPath`
572
- - `runsPath`
573
- - `historyTimelinePath`
574
- - `latestRunPath`
575
- - `latestRunStatus`
576
- - `latestRunPromptsPath`
577
- - `latestReportPath`
578
- - `latestResumeCommandPath`
579
- - `workflow.currentPhase`
580
- - `workflow.currentPhaseState`
581
- - `workflow.phaseStates`
582
- - `workflow.lastCompletedPhase`
583
- - `workflow.nextRecommendedPhase`
584
- - `workflow.awaitingApproval`
585
- - `workflow.routingStatus`
586
- - `workflow.lastSafeCheckpoint`
587
- - `inputs`
588
- - `artifacts`
589
- - `resultContract`
590
- - `claudeSession`
591
- - `fixCycles` *(파생 요약 — `{count, openCycleId, latest:{cycle, symptom, targetReport, closedAt}}`; 매 prepare 재계산)*
592
-
593
- 이 manifest는 아래 목적을 가집니다.
594
-
595
- - Claude가 brief보다 먼저 task continuity를 이해하게 함
596
- - 어떤 파일을 우선 읽어야 하는지 고정함
597
- - 어떤 config files와 deployment manifests를 어떤 expected values로 해석해야 하는지 고정함
598
- - 어떤 task key 아래 결과가 누적되는지 고정함
599
- - related task와 latest run 위치를 빠르게 확인하게 함
600
-
601
- ## Task index contract
602
-
603
- `task-index.md`는 사람이 빠르게 읽기 위한 요약 문서입니다.
604
-
605
- 주요 내용:
606
- - task key
607
- - current task type
608
- - work category
609
- - 현재 task 상태
610
- - 최신 run 상태
611
- - current phase
612
- - current phase state
613
- - next recommended phase
614
- - reference expectations
615
- - latest run
616
- - latest report
617
- - resume command
618
-
619
- 이 문서는 quick summary일 뿐이며 source of truth가 아닙니다.
620
- canonical metadata는 항상 `task-manifest.json`을 기준으로 확인합니다.
621
-
622
- ## Run manifest contract
623
-
624
- 각 실행은 `runs/<task-type>/manifests/run-manifest-<task-type>-<seq>.json`에 현재 run 계약을 남깁니다.
625
-
626
- `manifests/run-manifest-<task-type>-<seq>.json`의 path 계열 필드는 모두 대상 프로젝트 루트 기준 상대경로만 저장합니다.
627
- `okstra`가 Claude handoff를 시작한 직후에는 현재 run 상태가 보통 `in-progress`로 기록됩니다.
628
- 이후 최종 결과 저장과 상태 갱신은 Claude가 이어서 수행합니다.
629
- 또한 `okstra`는 launch 전에 session ID를 선할당하고, 같은 run의 `sessions/` 아래에 `claude-resume-<task-type>-<seq>.sh`를 생성합니다.
630
-
631
- 주요 내용:
632
-
633
- - task key
634
- - task type
635
- - work category
636
- - run datetime segment
637
- - task brief relative path
638
- - analysis target
639
- - related tasks
640
- - selected workers
641
- - worker model assignments
642
- - claude session id
643
- - resume command relative path
644
- - expected report relative path
645
- - expected status relative path
646
- - prompt snapshot relative path
647
- - `worker prompt directory relative path`
648
- - `worker prompt relative path by worker id`
649
- - current run status
650
- - workflow snapshot
651
- - team contract
652
- - `fixCycleId` *(fix cycle 부착 시에만; 없으면 필드 생략)*
653
-
654
- ## Timeline contract
655
-
656
- `history/timeline.json`은 task에 속한 run 이력을 누적합니다.
657
-
658
- 이력에는 보통 아래가 포함됩니다.
659
-
660
- - run timestamp
661
- - run directory relative path
662
- - run manifest relative path
663
- - run time segment
664
- - task type
665
- - work category
666
- - status
667
- - worker prompt directory relative path
668
- - report relative path
669
- - resume command relative path
670
- - related tasks
671
- - workflow snapshot
672
- - `fixCycleId` *(fix cycle 부착 시에만; 없으면 필드 생략)*
673
- 같은 task-type을 다시 실행하면 같은 `runs/<task-type>/` 폴더를 재사용하더라도 `run-manifest-<task-type>-<seq>.json`과 관련 artifact 경로가 per-category sequence suffix(`<task-type>-<seq>`)로 분리되므로 각 실행이 별도 이력으로 누적됩니다. cross-category 식별자는 manifest의 `runDateTimeSegment` ISO timestamp 필드입니다.
674
-
675
- ## Claude operating contract
676
-
677
- `okstra` 실행 후 Claude는 아래 순서로 현재 task를 읽는 것을 기본 규칙으로 삼아야 합니다.
678
-
679
- 1. task browsing 또는 task-id disambiguation이 필요하면 `.okstra/discovery/task-catalog.json`을 먼저 읽습니다.
680
- 2. 현재 task key나 task path가 명시되지 않았다면 `.okstra/discovery/latest-task.json`을 current-task pointer로 읽습니다.
681
- 3. `task-manifest.json`을 읽습니다.
682
- 4. current `state/active-run-context-<task-type>-<seq>.json`이 있으면 lead Phase 1의 1차 입력으로 읽습니다. 없으면 current `manifests/run-manifest-<task-type>-<seq>.json`과 `team-state`로 fallback합니다.
683
- 5. `instruction-set/analysis-profile.md`와 `instruction-set/analysis-packet.md`를 읽습니다.
684
- 6. `task-index.md`는 quick summary가 필요할 때만 선택적으로 읽습니다.
685
- 7. `analysis-material.md`, `reference-expectations.md`, `task-brief.md`, `final-report-template.md`는 packet이 불충분하거나 source citation/보고서 작성에 필요할 때 lazy read합니다.
686
- 8. 필요하면 `history/timeline.json`과 이전 run 결과를 참고합니다.
687
- 9. `Claude lead`로서 현재 run의 worker roster (기본 `Claude worker`, `Codex worker`, `Report writer worker`; `Antigravity worker`는 명시 포함된 경우에만)에 따라 역할을 구성합니다.
688
- 10. 각 selected worker prompt를 assigned worker prompt history path로 현재 run의 `prompts/` 아래에 먼저 저장한 뒤 worker를 dispatch합니다.
689
- 14. 각 required worker에 대해 결과 또는 terminal status를 수집합니다.
690
- 15. brief이 더 구체적인 형식을 강제하지 않으면 `final-report-template.md` 구조로 Markdown 최종 보고서를 작성합니다.
691
- 16. 결과를 현재 run의 `reports/final-report-<task-type>-<seq>.md`에 직접 저장하고, 필요하면 `status/final-<task-type>-<seq>.status`, `manifests/run-manifest-<task-type>-<seq>.json`, `task-manifest.json`, `task-index.md`도 현재 상태에 맞게 갱신합니다.
692
-
693
- 권장 worker 상태값:
694
-
695
- - `completed`
696
- - `timeout`
697
- - `error`
698
- - `not-run`
427
+ `okstra` 산출물의 3개 저장 영역(stable task root / per-run artifacts / `~/.okstra` 인덱스)과 task manifest · task index · run manifest · timeline · Claude operating 계약의 전체 스펙은 분리된 문서로 옮겼습니다 — [`architecture/storage-model.md`](architecture/storage-model.md).
699
428
 
700
429
  ## Task brief usage
701
430
 
package/docs/kr/cli.md CHANGED
@@ -322,7 +322,7 @@ Lead runtime independence boundary:
322
322
 
323
323
  ### Runtime auto-detection (`auto`)
324
324
 
325
- `okstra run` 의 기본 runtime은 `auto` 입니다. `auto` 는 host 기반으로 `claude-code`, `codex`, `external` 중 하나로 resolve 됩니다 (`src/runtime-resolver.mjs`). 우선순위: 명시 runtime > `OKSTRA_RUNTIME_HOST` env > Claude Code skill handoff > tmux 가용 시 external > 그 외 fail-fast (safe fallback: 의도와 다른 runtime 으로 조용히 넘어가지 않음).
325
+ `okstra run` 의 기본 runtime은 `auto` 입니다. `auto` 는 host 기반으로 `claude-code`, `codex`, `external` 중 하나로 resolve 됩니다 (`src/lib/runtime-resolver.mjs`). 우선순위: 명시 runtime > `OKSTRA_RUNTIME_HOST` env > Claude Code skill handoff > tmux 가용 시 external > 그 외 fail-fast (safe fallback: 의도와 다른 runtime 으로 조용히 넘어가지 않음).
326
326
 
327
327
  - Claude Code 안에서는 `/okstra-run` 이 front door 입니다. bare `okstra run` 은 Claude Code `TeamCreate` / `Agent(...)` 를 호출할 수 없습니다.
328
328
  - Codex host: `okstra run` 이 `codex-run` -> `codex-dispatch` 를 orchestration 합니다.