okstra 0.1.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 (106) hide show
  1. package/README.md +36 -0
  2. package/bin/okstra +62 -0
  3. package/package.json +30 -0
  4. package/runtime/.gitkeep +0 -0
  5. package/runtime/BUILD.json +5 -0
  6. package/runtime/agents/SKILL.md +243 -0
  7. package/runtime/agents/TODO.md +168 -0
  8. package/runtime/agents/workers/claude-worker.md +106 -0
  9. package/runtime/agents/workers/codex-worker.md +179 -0
  10. package/runtime/agents/workers/gemini-worker.md +179 -0
  11. package/runtime/agents/workers/report-writer-worker.md +116 -0
  12. package/runtime/bin/okstra-central.sh +152 -0
  13. package/runtime/bin/okstra-codex-exec.sh +53 -0
  14. package/runtime/bin/okstra-error-log.py +295 -0
  15. package/runtime/bin/okstra-gemini-exec.sh +55 -0
  16. package/runtime/bin/okstra-token-usage.py +46 -0
  17. package/runtime/bin/okstra.sh +162 -0
  18. package/runtime/prompts/launch.template.md +52 -0
  19. package/runtime/prompts/profiles/error-analysis.md +43 -0
  20. package/runtime/prompts/profiles/final-verification.md +37 -0
  21. package/runtime/prompts/profiles/implementation-planning.md +85 -0
  22. package/runtime/prompts/profiles/implementation.md +71 -0
  23. package/runtime/prompts/profiles/requirements-discovery.md +43 -0
  24. package/runtime/python/lib/okstra/cli.sh +227 -0
  25. package/runtime/python/lib/okstra/globals.sh +157 -0
  26. package/runtime/python/lib/okstra/interactive.sh +411 -0
  27. package/runtime/python/lib/okstra/project-resolver.sh +57 -0
  28. package/runtime/python/lib/okstra/usage.sh +98 -0
  29. package/runtime/python/lib/okstra-ctl/cmd-batch.sh +59 -0
  30. package/runtime/python/lib/okstra-ctl/cmd-list.sh +35 -0
  31. package/runtime/python/lib/okstra-ctl/cmd-open.sh +36 -0
  32. package/runtime/python/lib/okstra-ctl/cmd-projects.sh +26 -0
  33. package/runtime/python/lib/okstra-ctl/cmd-reconcile.sh +27 -0
  34. package/runtime/python/lib/okstra-ctl/cmd-reindex.sh +38 -0
  35. package/runtime/python/lib/okstra-ctl/cmd-rerun.sh +326 -0
  36. package/runtime/python/lib/okstra-ctl/cmd-show.sh +27 -0
  37. package/runtime/python/lib/okstra-ctl/cmd-tail.sh +76 -0
  38. package/runtime/python/lib/okstra-ctl/main.sh +41 -0
  39. package/runtime/python/lib/okstra-ctl/prepare.sh +29 -0
  40. package/runtime/python/lib/okstra-ctl/usage.sh +23 -0
  41. package/runtime/python/okstra_ctl/__init__.py +125 -0
  42. package/runtime/python/okstra_ctl/backfill.py +253 -0
  43. package/runtime/python/okstra_ctl/batch.py +62 -0
  44. package/runtime/python/okstra_ctl/ids.py +84 -0
  45. package/runtime/python/okstra_ctl/index.py +216 -0
  46. package/runtime/python/okstra_ctl/invocation.py +49 -0
  47. package/runtime/python/okstra_ctl/jsonl.py +84 -0
  48. package/runtime/python/okstra_ctl/listing.py +156 -0
  49. package/runtime/python/okstra_ctl/locks.py +42 -0
  50. package/runtime/python/okstra_ctl/material.py +62 -0
  51. package/runtime/python/okstra_ctl/models.py +63 -0
  52. package/runtime/python/okstra_ctl/path_resolve.py +40 -0
  53. package/runtime/python/okstra_ctl/paths.py +251 -0
  54. package/runtime/python/okstra_ctl/project_meta.py +51 -0
  55. package/runtime/python/okstra_ctl/reconcile.py +166 -0
  56. package/runtime/python/okstra_ctl/render.py +1065 -0
  57. package/runtime/python/okstra_ctl/resolver.py +54 -0
  58. package/runtime/python/okstra_ctl/run.py +674 -0
  59. package/runtime/python/okstra_ctl/run_context.py +166 -0
  60. package/runtime/python/okstra_ctl/seeding.py +97 -0
  61. package/runtime/python/okstra_ctl/sequence.py +53 -0
  62. package/runtime/python/okstra_ctl/session.py +33 -0
  63. package/runtime/python/okstra_ctl/tmux.py +27 -0
  64. package/runtime/python/okstra_ctl/workers.py +64 -0
  65. package/runtime/python/okstra_ctl/workflow.py +182 -0
  66. package/runtime/python/okstra_project/__init__.py +41 -0
  67. package/runtime/python/okstra_project/resolver.py +126 -0
  68. package/runtime/python/okstra_project/state.py +170 -0
  69. package/runtime/python/okstra_token_usage/__init__.py +26 -0
  70. package/runtime/python/okstra_token_usage/blocks.py +62 -0
  71. package/runtime/python/okstra_token_usage/claude.py +97 -0
  72. package/runtime/python/okstra_token_usage/cli.py +84 -0
  73. package/runtime/python/okstra_token_usage/codex.py +80 -0
  74. package/runtime/python/okstra_token_usage/collect.py +161 -0
  75. package/runtime/python/okstra_token_usage/gemini.py +77 -0
  76. package/runtime/python/okstra_token_usage/jsonl_io.py +18 -0
  77. package/runtime/python/okstra_token_usage/paths.py +22 -0
  78. package/runtime/python/okstra_token_usage/pricing.py +71 -0
  79. package/runtime/python/okstra_token_usage/report.py +64 -0
  80. package/runtime/templates/prd/brief.template.md +273 -0
  81. package/runtime/templates/project-docs/task-index.template.md +65 -0
  82. package/runtime/templates/reports/error-analysis-input.template.md +80 -0
  83. package/runtime/templates/reports/final-report.template.md +167 -0
  84. package/runtime/templates/reports/final-verification-input.template.md +67 -0
  85. package/runtime/templates/reports/implementation-input.template.md +81 -0
  86. package/runtime/templates/reports/implementation-planning-input.template.md +93 -0
  87. package/runtime/templates/reports/quick-input.template.md +64 -0
  88. package/runtime/templates/reports/schedule.template.md +168 -0
  89. package/runtime/templates/reports/settings.template.json +101 -0
  90. package/runtime/templates/reports/task-brief.template.md +165 -0
  91. package/runtime/validators/lib/common.sh +44 -0
  92. package/runtime/validators/lib/fixtures.sh +322 -0
  93. package/runtime/validators/lib/paths.sh +44 -0
  94. package/runtime/validators/lib/runners.sh +140 -0
  95. package/runtime/validators/lib/summary.sh +15 -0
  96. package/runtime/validators/lib/validate-assets.sh +44 -0
  97. package/runtime/validators/lib/validate-prompt-metadata.sh +267 -0
  98. package/runtime/validators/lib/validate-tasks.sh +335 -0
  99. package/runtime/validators/validate-run.py +568 -0
  100. package/runtime/validators/validate-schedule.py +665 -0
  101. package/runtime/validators/validate-workflow.sh +190 -0
  102. package/src/doctor.mjs +127 -0
  103. package/src/install.mjs +355 -0
  104. package/src/paths.mjs +132 -0
  105. package/src/uninstall.mjs +122 -0
  106. package/src/version.mjs +20 -0
@@ -0,0 +1,65 @@
1
+ # OKSTRA Task Summary
2
+
3
+ ## Current Snapshot
4
+
5
+ - Task Key: `{{TASK_KEY}}`
6
+ - Task Type: `{{TASK_TYPE}}`
7
+ - Work Category: `{{WORK_CATEGORY}}`
8
+ - Current Task Status: `{{CURRENT_TASK_STATUS}}`
9
+ - Current Run Status: `{{CURRENT_RUN_STATUS}}`
10
+ - Related Tasks: `{{RELATED_TASKS_INLINE}}`
11
+ - Worker Roster: `{{RECOMMENDED_ANALYSERS}}`
12
+ - Lead Model: `{{LEAD_MODEL}}`
13
+ - Latest Run: `{{LATEST_RUN_RELATIVE_PATH}}`
14
+ - Latest Report: `{{LATEST_REPORT_RELATIVE_PATH}}`
15
+ - Team State: `{{TEAM_STATE_RELATIVE_PATH}}`
16
+ - Validation Status: `{{VALIDATION_STATUS}}`
17
+ - Resume Command: `{{CLAUDE_RESUME_COMMAND_RELATIVE_PATH}}`
18
+
19
+ ## Workflow Snapshot
20
+
21
+ - Current Phase: `{{WORKFLOW_CURRENT_PHASE}}`
22
+ - Current Phase State: `{{WORKFLOW_CURRENT_PHASE_STATE}}`
23
+ - Last Completed Phase: `{{WORKFLOW_LAST_COMPLETED_PHASE}}`
24
+ - Next Recommended Phase: `{{WORKFLOW_NEXT_RECOMMENDED_PHASE}}`
25
+ - Awaiting Approval: `{{WORKFLOW_AWAITING_APPROVAL}}`
26
+ - Routing Status: `{{WORKFLOW_ROUTING_STATUS}}`
27
+
28
+ ## Phase States
29
+
30
+ {{WORKFLOW_PHASE_STATE_LINES}}
31
+
32
+ ## Safe Resume Checkpoint
33
+
34
+ {{WORKFLOW_LAST_SAFE_CHECKPOINT_LINES}}
35
+
36
+ ## Model Assignments
37
+
38
+ {{MODEL_ASSIGNMENT_LINES}}
39
+
40
+ ## Canonical Metadata
41
+
42
+ - Source of truth: `{{TASK_MANIFEST_RELATIVE_PATH}}`
43
+ - Project discovery pointer: `{{OKSTRA_LATEST_TASK_RELATIVE_PATH}}`
44
+ - Instruction set: `{{INSTRUCTION_SET_RELATIVE_PATH}}`
45
+ - Reference expectations: `{{REFERENCE_EXPECTATIONS_RELATIVE_PATH}}`
46
+ - Final report template: `{{FINAL_REPORT_TEMPLATE_RELATIVE_PATH}}`
47
+ - Run manifests directory: `{{RUN_MANIFESTS_RELATIVE_PATH}}`
48
+ - Run state directory: `{{RUN_STATE_RELATIVE_PATH}}`
49
+ - Run prompts directory: `{{RUN_PROMPTS_RELATIVE_PATH}}`
50
+ - Run reports directory: `{{RUN_REPORTS_RELATIVE_PATH}}`
51
+ - Run status directory: `{{RUN_STATUS_RELATIVE_PATH}}`
52
+ - Run sessions directory: `{{RUN_SESSIONS_RELATIVE_PATH}}`
53
+ - Worker results directory: `{{WORKER_RESULTS_RELATIVE_PATH}}`
54
+ - Run validator: `{{RUN_VALIDATOR_RELATIVE_PATH}}`
55
+
56
+ ## Notes
57
+
58
+ - 이 문서는 사람용 quick summary입니다.
59
+ - canonical metadata는 항상 `task-manifest.json`을 기준으로 확인합니다.
60
+ - 동일한 버그나 작업을 다시 이어갈 때는 같은 `Task Group`과 `Task ID`를 재사용합니다.
61
+ - `requirements-discovery`는 work category와 다음 phase routing 결정을 남기기 위한 초기 triage 단계입니다.
62
+ - run directory는 `runs/<task-type>/` 규칙을 사용하여 서로 다른 task-type 실행을 경로 수준에서 분리합니다.
63
+ - run directory 내부는 `manifests/`, `state/`, `prompts/`, `reports/`, `status/`, `sessions/`, `worker-results/`처럼 유형별 하위 폴더로 나뉩니다.
64
+ - current run의 `prompts/` 디렉터리는 lead prompt snapshot과 worker prompt history file의 canonical 저장 위치입니다.
65
+ - run-level artifact와 result 파일명은 같은 task-type 재실행을 구분하기 위해 `-YYYY-MM-DD_HH-MM-SS` suffix를 사용합니다.
@@ -0,0 +1,80 @@
1
+ # OKSTRA Error Analysis Input
2
+
3
+ ## Identity
4
+
5
+ - Project ID:
6
+ - Task Group:
7
+ - Task ID:
8
+ - Related Tasks:
9
+ - Issue / Ticket:
10
+ - Task Type: `error-analysis`
11
+ - Requested Outcome:
12
+
13
+ ## Symptom Summary
14
+
15
+ - What is the visible problem?
16
+ - Who is affected?
17
+ - Since when has it been happening?
18
+ - Is it always reproducible or intermittent?
19
+
20
+ ## Expected vs Actual
21
+
22
+ - Expected behavior:
23
+ - Actual behavior:
24
+
25
+ ## Reproduction Context
26
+
27
+ - Reproduction steps:
28
+ - Trigger conditions:
29
+ - Environment or account conditions:
30
+ - Cases that do not reproduce:
31
+
32
+ ## Evidence
33
+
34
+ - Main issue document:
35
+ - Logs:
36
+ - Raw samples:
37
+ - Screenshots or reports:
38
+ - Related code paths:
39
+ - Previous reports in the same task history:
40
+
41
+ ## Current Hypotheses
42
+
43
+ - Current root-cause guess:
44
+ - Why this guess exists:
45
+ - What evidence is still missing:
46
+ - Alternative explanations:
47
+
48
+ ## Config and Deployment References
49
+
50
+ - Relevant config files:
51
+ - Relevant deployment manifests:
52
+ - Expected values or invariants that may be violated:
53
+ - Unknown values that still require confirmation:
54
+
55
+ ## Risk Notes
56
+
57
+ - Risk if the guess is wrong:
58
+ - Risk of changing code too early:
59
+ - Rollback concerns:
60
+
61
+ ## Out of Scope
62
+
63
+ - Adjacent symptoms or subsystems deliberately excluded from this analysis:
64
+ - Items that look related but must be analysed in a separate task:
65
+ - Reason for exclusion (different owner, separate root cause, deferred decision):
66
+
67
+ > Analysers MUST NOT expand the hypothesis space or evidence collection into items listed here. If an analyser believes an excluded item is causally linked to the symptom, it is reported as a recommended follow-up analysis task in the final report — never silently merged into the current root-cause narrative. If this section is left empty, analysers treat any cause beyond what `Symptom Summary` and `Reproduction Context` describe as out of scope by default.
68
+
69
+ ## Questions for Analysers
70
+
71
+ 1. What is the most likely root cause?
72
+ 2. What evidence is still missing before implementation starts?
73
+ 3. What is the safest next step: more investigation, instrumentation, or code change?
74
+ 4. Which adjacent symptoms or subsystems did you consider and **deliberately exclude** from this analysis, and why must each be a separate task instead of being folded in here?
75
+ 5. Did the analysis propose any code-level fix or refactor? If yes, move it out — this phase produces analysis only, not solutions.
76
+
77
+ ## Conversion Note
78
+
79
+ - This input can be used as a starting draft before creating `okstra-task-brief.md`.
80
+ - Reuse the same `Task Group` and `Task ID` if this issue should remain traceable under one stable task.
@@ -0,0 +1,167 @@
1
+ # {{TASK_KEY}} - Multi-Agent Cross Verification Final Report
2
+ - Created at: {{RUN_TIMESTAMP_ISO}}
3
+ - Task Key: {{TASK_KEY}}
4
+ - Task Type: {{TASK_TYPE}}
5
+ - Report Owner: `Claude lead`
6
+ - Lead Model: `{{LEAD_MODEL}}`
7
+ - Clarification Response Carried In: `{{CLARIFICATION_RESPONSE_RELATIVE_PATH}}`
8
+
9
+ ## 0. Clarification Response Carried In From Previous Run
10
+ - Source file: `{{CLARIFICATION_RESPONSE_RELATIVE_PATH}}`
11
+ - If the source path is empty, write `- No prior clarification response was provided for this run.` and skip the rest of this section.
12
+ - If the source path is set, walk through both halves of the prior section 5 — material requests (`A1`, `A2`, ...) from sub-section 5.1 and user questions (`Q1`, `Q2`, ...) from sub-section 5.2 — and summarize how each one was used or invalidated by this run's evidence. Keep the two prefixes separate; do not collapse them into a single list.
13
+ - Cite the entry id (`A*` or `Q*`) and the new evidence (file path, line number, log excerpt, worker finding, etc.) that resolves or refutes the prior answer or material.
14
+
15
+ ## Summary of the Problem or Verification Target
16
+ - Summarize the core problem, requirement, or verification target in 3 to 5 bullets.
17
+ - Base the summary on the brief, source materials, and worker results.
18
+
19
+ ## Execution Status by Agent
20
+ - Summarize the status, assigned model, and key finding for each worker.
21
+ - Do not replace worker outputs with unsupported claims.
22
+ {{EXECUTION_STATUS_TABLE_ROWS}}
23
+
24
+ ## Token Usage Summary
25
+
26
+ | 항목 | 처리 토큰 | 환산 토큰 (input 기준) | 비용 (USD) |
27
+ |------|-----------|------------------------|------------|
28
+ | Lead | `{{LEAD_TOTAL_TOKENS}}` | `{{LEAD_BILLABLE_TOKENS}}` | `{{LEAD_COST_USD}}` |
29
+ | Worker 합계 | `{{WORKER_TOTAL_TOKENS}}` | `{{WORKER_BILLABLE_TOKENS}}` | `{{WORKER_COST_USD}}` |
30
+ | **전체 합계** | **`{{GRAND_TOTAL_TOKENS}}`** | **`{{GRAND_BILLABLE_TOKENS}}`** | **`{{GRAND_COST_USD}}`** |
31
+ | Codex/Gemini CLI 추가 비용 | | | `{{CLI_COST_USD}}` |
32
+
33
+ > 처리 토큰 = input + output + cache_creation + cache_read (raw). 환산 토큰 = cache_read×0.1 + cache_creation×1.25 + output×5 + input (input-등가). 비용은 공시 가격 기준 추정치.
34
+
35
+ ## 1. Cross Verification Results
36
+ ### 1.1 Consensus
37
+ - Record the conclusions and evidence that multiple workers support.
38
+
39
+ ### 1.2 Differences
40
+ - Record meaningful differences in conclusions, interpretation, or evidence handling.
41
+ - If there is no meaningful difference, state that clearly.
42
+
43
+ ## 2. Final Verdict
44
+ - State the final conclusion clearly.
45
+ - Recommend the most appropriate direction: continue investigation, begin implementation, approve, reject, or hold.
46
+
47
+ ## 3. Evidence and Detailed Analysis
48
+ ### 3.1 Primary Evidence
49
+ - Cite concrete evidence such as file paths, line numbers, brief contents, logs, or worker reports.
50
+
51
+ ### 3.2 Secondary Evidence or Alternate Interpretations
52
+ - Record supporting evidence, alternate hypotheses, or lower-confidence interpretations when relevant.
53
+
54
+ ## 4. Missing Information and Risks
55
+ - Explicitly state any item that requires `I don't know` or `uncertain`.
56
+ - Record the missing information and risks that weaken the current conclusion.
57
+
58
+ ## 4.5 Implementation Plan Deliverables (implementation-planning runs only)
59
+
60
+ > **이 섹션은 `task-type` = `implementation-planning` 실행 결과에만 포함하세요. 다른 task-type에서는 섹션 전체를 삭제하고 5번 섹션으로 바로 넘어갑니다.**
61
+ >
62
+ > 아래 8개 하위 섹션의 **영문 제목 키워드는 그대로 유지해야 합니다**. `validate-run.py`가 다음 8개 문자열을 본문에서 찾습니다 — `Option Candidates` / `Trade-off` / `Recommended Option` / `Stepwise Execution Order` / `Dependency` / `Validation Checklist` / `Rollback` / `User Approval Request`. 한국어 번역은 괄호 안에 병기해도 좋지만 영문 키워드는 반드시 보존하세요. 본문은 한국어로 작성합니다.
63
+
64
+ ### 4.5.1 Option Candidates (옵션 후보)
65
+ - 최소 두 개의 구현 옵션을 제시합니다. 각 옵션마다 다음을 포함합니다.
66
+ - **File Structure**: `Create: <path> — <responsibility>` / `Modify: <path>:<line-range> — <change summary>` / `Delete: <path> — <reason>` 형식으로 파일 단위 책임을 한 줄씩 명시합니다.
67
+ - 영향을 받는 인터페이스 / 공개 계약 / 다운스트림 소비자.
68
+ - 폭발 반경 추정(units, configs, deployment manifests, data migrations).
69
+
70
+ ### 4.5.2 Trade-off Matrix (트레이드오프 매트릭스)
71
+ | Option | Complexity | Risk | Reversibility | Test Coverage Cost | Rollout Cost |
72
+ |--------|-----------|------|---------------|--------------------|--------------|
73
+ | <Option A> | <…> | <…> | <…> | <…> | <…> |
74
+
75
+ ### 4.5.3 Recommended Option (권장 옵션)
76
+ - 어떤 옵션을 권장하는지와 이유를 작성합니다. 근거는 `4.5.2`의 비교 결과 + 디자인 원칙(isolation, files-that-change-together, follow-established-patterns, YAGNI)에 묶어 설명합니다.
77
+
78
+ ### 4.5.4 Stepwise Execution Order (단계별 실행 순서)
79
+ 1. 한 단계는 약 2~5분 안에 완료할 수 있는 작은 작업이어야 합니다(예: "X에 실패하는 테스트 작성", "테스트 실행해 실패 확인", "최소 구현", "테스트 통과 확인", "commit").
80
+ 2. 모든 단계는 정확한 파일 경로와 정확한 명령어를 포함해야 합니다. 코드 단계라면 실제 코드 또는 diff 스케치를 함께 적습니다.
81
+ 3. TDD 순서(failing test → implementation → green → commit)가 가능한 영역이라면 이 순서를 따릅니다.
82
+
83
+ ### 4.5.5 Dependency / Migration Risk (의존성·마이그레이션 위험)
84
+ - 순서 제약, 데이터 백필, feature-flag 선행 조건, 팀 간 조율 등을 모두 나열합니다.
85
+
86
+ ### 4.5.6 Validation Checklist (검증 체크리스트)
87
+ - pre / mid / post 검증 항목을 각각 정확한 명령어 또는 관찰 가능한 결과로 적습니다. 추상적 서술은 금지.
88
+
89
+ ### 4.5.7 Rollback Strategy (롤백 전략)
90
+ - 정확한 revert 경로(commits, flags, migrations 등)와 롤백을 트리거하는 신호(에러율, latency, 사용자 보고 등)를 명시합니다.
91
+
92
+ ### 4.5.8 User Approval Request (사용자 승인 요청)
93
+ - 다음 `implementation` run을 시작해도 되는지에 대한 명시적 승인 요청 블록입니다. 사용자가 명시적으로 승인하기 전까지는 이 plan을 코드로 옮기지 않습니다.
94
+ - 승인 시 사용할 명령어 한 줄을 함께 적습니다: `okstra --task-key {{TASK_KEY}} --task-type implementation --approved-plan <이 보고서 경로>`
95
+
96
+ ### 4.5.9 Open Questions
97
+ - pre-planning에서 발견된 모든 모호점을 항목으로 남겨, 사용자가 승인 전에 해소해야 할 질문 목록으로 사용합니다.
98
+
99
+ ## 5. Clarification Requests for the Next Run
100
+
101
+ 이 섹션은 다음 run으로 넘어가기 전에 사용자에게 받아야 할 입력을 정리하는 자리입니다. `task-type`이 `error-analysis` 또는 `requirements-discovery`이고 지금까지의 증거만으로는 확신 있는 최종 판단이 어려울 때 반드시 채웁니다. 그 외의 `task-type`에서는 lead가 추가 run이 필요하다고 판단했을 때만 채우고, 그렇지 않다면 `- 추가 정보 요청 없음. Section 2의 최종 판단이 그대로 유효합니다.` 라고만 한 줄 적은 뒤 Section 6으로 넘어갑니다.
102
+
103
+ 작성 원칙:
104
+
105
+ - 개발자가 아닌 사람도 한 번 읽고 무엇을 어디서 가져와야 하는지 이해할 수 있게, 줄임말과 내부 용어 대신 풀어 쓴 문장으로 작성합니다. (예: "QPS" 대신 "초당 평균 요청 수", "AC 미정" 대신 "합격 기준이 아직 정의되지 않았습니다")
106
+ - 한 항목은 "왜 묻는지", "구체적으로 무엇을 묻는지", "어떤 형태의 답을 기대하는지"가 모두 분명히 드러나야 합니다. 한 줄짜리 단답형 질문은 피하고, 필요한 배경을 1~2문장으로 함께 적습니다.
107
+ - 사용자에게 추가로 부탁드리는 자료(로그, 스크린샷, 설정 파일 사본, 재현 절차 등)와, 사용자에게 답을 받아야 하는 질문은 **반드시 두 개의 별도 하위 섹션으로 나누어 적습니다.** 같은 표나 같은 항목 안에 섞지 않습니다.
108
+ - run 사이에 일관된 추적이 가능하도록 항목별 ID(`A1`, `A2` / `Q1`, `Q2`)는 한 번 부여한 뒤 다음 run에서도 유지합니다. 이미 답변된 항목은 다음 run에서도 삭제하지 말고 `Status`만 `resolved` 또는 `obsolete`로 갱신합니다.
109
+ - Status 값의 의미는 다음과 같습니다.
110
+ - `open`: 요청했지만 아직 받지 못했습니다.
111
+ - `answered`: 사용자가 아래 답변 칸을 채워 두었습니다(다음 run의 lead가 검증해야 합니다).
112
+ - `resolved`: 다음 run에서 lead가 답변을 받아 검증을 마쳤습니다.
113
+ - `obsolete`: 이후 분석 결과로 더 이상 필요 없어진 항목입니다.
114
+
115
+ 이 보고서에 답을 채우신 뒤에는 `okstra --resume-clarification --task-key {{TASK_KEY}}` 한 줄로 같은 phase를 다시 실행하실 수 있습니다(자동으로 `$EDITOR`가 이 파일을 열고, 저장하면 같은 phase가 `--clarification-response`로 carry-in 되어 재실행됩니다). 스크립트로 자동화하실 때는 기존 형식 `okstra --task-key {{TASK_KEY}} --task-type {{TASK_TYPE}} --clarification-response <이 파일 경로>`도 그대로 사용하실 수 있습니다.
116
+
117
+ ### 5.1 추가 자료 요청 (Additional Materials Requested)
118
+
119
+ 이 하위 섹션에는 **사용자가 다음 run 전에 첨부 또는 공유해 주셨으면 하는 자료**만 적습니다. 질문이 아니라 자료 요청입니다. 자료가 어디에 있는지(파일 경로, 페이지 URL, 데이터베이스 쿼리 결과 등), 어떤 시점/조건의 데이터를 받아야 하는지, 받은 자료를 어디에 두면 되는지(예: `<project-root>/.project-docs/<task-group>/<task-id>/` 아래)를 함께 적습니다. 받을 자료가 없다면 `- 추가로 요청드릴 자료가 없습니다.` 한 줄만 남깁니다.
120
+
121
+ | 자료 ID | 무엇을 / 왜 필요한지 (문장으로 서술) | 어디에서 가져올 수 있는지 (파일 경로, 시스템 이름, URL 등) | 어디에 두면 되는지 / 어떻게 전달해 주실지 | Status | 사용자가 첨부한 위치 또는 메모 (다음 run 전에 사용자가 채움) |
122
+ |---------|--------------------------------------|------------------------------------------------------------|--------------------------------------------|--------|---------------------------------------------------------------|
123
+ | A1 | <어떤 자료를 왜 받아야 하는지를 1~2문장으로. 예: "오류가 처음 보고된 시각 전후 30분 동안의 worker 로그가 필요합니다. 어떤 task가 실패했고 그때 큐에 무엇이 쌓여 있었는지를 함께 확인해야 root cause 가설을 좁힐 수 있기 때문입니다." > | <예: "Datadog 로그에서 `service:worker env:prod` 필터, 시각 범위 2026-04-30 09:30~10:30 KST" / 또는 정확한 파일 경로> | <예: "`.project-docs/tasks/8852/logs/` 아래에 `worker-2026-04-30.log` 라는 이름으로 저장해 주시면 됩니다."> | open | <빈칸으로 두고 다음 run 전에 사용자가 채움> |
124
+
125
+ ### 5.2 사용자 확인 질문 (Questions for the User)
126
+
127
+ 이 하위 섹션에는 **사용자가 직접 결정해 주시거나 확인해 주셔야만 다음 단계로 진행할 수 있는 질문**만 적습니다. 자료 요청은 위 5.1에 두고 여기에는 의사결정/확인 질문만 둡니다. 질문이 없다면 `- 추가로 확인이 필요한 질문이 없습니다.` 한 줄만 남깁니다.
128
+
129
+ 각 질문은 다음을 분명히 보여주어야 합니다.
130
+
131
+ - **왜 이 답이 필요한가**: 이 답에 따라 무엇이 어떻게 달라지는지 한 두 문장으로.
132
+ - **무엇을 묻는가**: 약어 없이 풀어 쓴 완전한 문장의 질문.
133
+ - **어떤 형태의 답을 기대하는가**: 예/아니오인지, 둘 중 하나를 고르는 선택인지, 숫자/날짜/파일경로인지, 아니면 짧은 자유서술인지. 가능하면 보기를 함께 제시합니다.
134
+
135
+ | 질문 ID | 이 답이 필요한 이유 (왜) | 질문 본문 (무엇을 묻는지, 풀어 쓴 문장) | 기대하는 답의 형태 / 보기 | Blocking (예 / 아니오) | Status | 사용자 답변 (다음 run 전에 사용자가 채움) |
136
+ |---------|--------------------------|-----------------------------------------|----------------------------|------------------------|--------|--------------------------------------------|
137
+ | Q1 | <예: "이 결정에 따라 `bugfix`로 이어갈지 `feature`로 이어갈지가 갈리며, 다음 run에서 사용할 task-type이 달라집니다."> | <예: "지난 주 새벽에 보고된 결제 실패가 일회성 사고였는지, 아니면 같은 증상이 다시 발생한 적이 있는지 알려주실 수 있을까요? 같은 증상이 다시 발생했다면 가장 최근 발생 시각과 영향 받은 사용자 수도 함께 부탁드립니다."> | <예: "다음 중 한 줄로 답해 주시면 됩니다 — (a) 일회성으로 그 후 재발 없음, (b) 재발 있음, 가장 최근 시각: YYYY-MM-DD HH:MM, 영향 사용자 수 약 N명"> | 예 | open | <빈칸으로 두고 다음 run 전에 사용자가 채움> |
138
+
139
+ ## 6. Recommended Next Steps
140
+
141
+ This section is **always present** in every final report — never omit the heading. If there are no concrete actions to take, write the single line `- No further action required. Final verdict in section 2 stands.` under the heading and stop.
142
+
143
+ When concrete actions exist, list them as a numbered list using the rules below. Each item must include the exact command(s) the user can copy-paste. Prefer the `--task-key` shorthand for follow-up runs and `--resume-clarification` for clarification answer turn-arounds; show the equivalent full-args form only when useful.
144
+
145
+ 1. **Highest-priority next action.** State what to do and why in one sentence, then the command. Example shortcut forms:
146
+ - Same phase rerun: `okstra --task-key {{TASK_KEY}} --task-type {{TASK_TYPE}}`
147
+ - Next phase: `okstra --task-key {{TASK_KEY}} --task-type <next-phase>` (omit `--task-type` to use the manifest's `workflow.nextRecommendedPhase` automatically when it is a concrete phase, not `pending-routing-decision` / `done-or-follow-up`).
148
+ 2. **Additional verification needed before implementation or release.** List read-only checks (test commands, log queries, dashboard URLs) that the user should run before moving to the next phase. No state-mutating commands here.
149
+ 3. **Follow-up tasks or related tasks if needed.** Reference them by `task-key` when they already exist; otherwise describe the new brief to draft.
150
+ 4. **If section 5 has any `open` rows**, the highest-priority next step MUST be the clarification turn-around. Show both forms:
151
+ - Preferred (interactive): `okstra --resume-clarification --task-key {{TASK_KEY}}` — opens this file in `$EDITOR`, then auto-reruns the same phase with `--clarification-response` carry-in.
152
+ - Scripted: `okstra --task-key {{TASK_KEY}} --task-type {{TASK_TYPE}} --clarification-response <path-to-this-file-after-editing>`.
153
+
154
+ Empty-state placeholder, copy verbatim when nothing else applies:
155
+
156
+ ```
157
+ - No further action required. Final verdict in section 2 stands.
158
+ ```
159
+
160
+ ## Writing Rules
161
+ - Write the final report in Markdown.
162
+ - Write the final report body in Korean.
163
+ - Keep technical identifiers such as file paths, code symbols, model names, and status values in their original form when needed.
164
+ - Keep the section structure unless the brief explicitly requires a different structure.
165
+ - Prioritize evidence-based statements over speculation.
166
+ - Do not replace the report body with meta commentary about storage, session limits, or prior messages.
167
+ - This document is the final synthesis by `Claude lead`, not a raw dump of worker outputs.
@@ -0,0 +1,67 @@
1
+ # OKSTRA Final Verification Input
2
+
3
+ ## Identity
4
+
5
+ - Project ID:
6
+ - Task Group:
7
+ - Task ID:
8
+ - Related Tasks:
9
+ - Issue / Ticket:
10
+ - Task Type: `final-verification`
11
+ - Requested Outcome:
12
+
13
+ ## Delivery Summary
14
+
15
+ - What was implemented?
16
+ - What was supposed to be delivered?
17
+ - What is the intended acceptance decision?
18
+
19
+ ## Verification Evidence
20
+
21
+ - PR or change summary:
22
+ - Test results:
23
+ - Manual verification notes:
24
+ - Related code paths:
25
+ - Release or rollout notes:
26
+ - Previous reports in the same task history:
27
+
28
+ ## Remaining Concerns
29
+
30
+ - Known issues:
31
+ - Edge cases still not fully verified:
32
+ - Regression concerns:
33
+ - Documentation gaps:
34
+
35
+ ## Acceptance Criteria
36
+
37
+ - Must-pass acceptance points:
38
+ - Optional quality improvements:
39
+ - Conditions that should block release:
40
+
41
+ ## Out of Scope
42
+
43
+ - Acceptance areas deliberately excluded from this verification:
44
+ - Items that look related but belong to a separate verification task:
45
+ - Reason for exclusion (different release, separate owner, deferred decision):
46
+
47
+ > Verifiers MUST NOT extend acceptance checks, regression scans, or sign-off recommendations into items listed here. If a verifier believes an excluded item must pass before release, it is reported as a recommended follow-up verification task in the final report — never silently included in the pass/fail decision of this run. If this section is left empty, verifiers treat any check beyond what `Acceptance Criteria` enumerates as out of scope by default.
48
+
49
+ ## Config and Deployment Verification Targets
50
+
51
+ - Relevant config files:
52
+ - Relevant deployment manifests:
53
+ - Expected final values or invariants:
54
+ - Values that still require explicit verification:
55
+
56
+ ## Questions for Analysers
57
+
58
+ 1. Are there any acceptance blockers?
59
+ 2. What residual risks remain?
60
+ 3. Is additional validation needed before release?
61
+ 4. Which acceptance checks did you consider and **deliberately exclude** from this verification, and why must each be a separate verification task instead of being folded in here?
62
+ 5. Did any check go beyond `Acceptance Criteria` (e.g., quality improvements, unrelated regressions)? If yes, separate them from the pass/fail decision and report as follow-up only.
63
+
64
+ ## Conversion Note
65
+
66
+ - This input can be used as a final verification draft before creating `okstra-task-brief.md`.
67
+ - Reuse the same `Task Group` and `Task ID` if verification should remain attached to the same task history.
@@ -0,0 +1,81 @@
1
+ # OKSTRA Implementation Input
2
+
3
+ ## Identity
4
+
5
+ - Project ID:
6
+ - Task Group:
7
+ - Task ID:
8
+ - Related Tasks:
9
+ - Issue / Ticket:
10
+ - Task Type: `implementation`
11
+ - Requested Outcome:
12
+
13
+ ## Approved Plan Reference (mandatory)
14
+
15
+ - Approved plan path: `runs/implementation-planning/<run-id>/reports/final-report.md`
16
+ - Approval evidence (quoted exactly from the plan's `User Approval Request` resolution):
17
+ - Recommended option name selected from the plan:
18
+ - Plan's bite-sized step list (paste or reference by anchor):
19
+
20
+ > The run MUST refuse to start (status `contract-violated`) if the approved plan path does not exist or does not contain an explicit user approval marker.
21
+
22
+ ## Scope From Plan
23
+
24
+ - File list authoritative for this run (copy from plan's File Structure section):
25
+ - Out-of-plan edits anticipated (leave empty if none — record rationale here in advance if known):
26
+ - Dependencies introduced by the plan:
27
+ - Migrations / schema changes referenced by the plan (must remain dry-run only in this phase if any):
28
+
29
+ ## Out of Scope
30
+
31
+ - Adjacent areas deliberately excluded from this run (even if they appear in the plan's surrounding context):
32
+ - Items that look related but must be handled in a separate task:
33
+ - Reason for exclusion (deadline, risk, separate owner, distinct decision):
34
+
35
+ > The executor MUST NOT modify items listed here, even when an edit looks "trivial" or "while I'm in this file". Excluded items that block plan execution are reported back as a recommended follow-up task and the run halts for re-planning rather than silently expanding scope. This section is enforced together with `Forbidden In This Run` below.
36
+
37
+ ## Validation Commands (must be runnable from clean state)
38
+
39
+ - Pre-execution checks:
40
+ - Mid-execution checks (per step or per commit):
41
+ - Post-execution checks:
42
+ - TDD-applicable steps (list step indices that should produce a failing test before implementation):
43
+
44
+ ## Rollback Plan
45
+
46
+ - Revert path (commits, feature flags, migrations):
47
+ - Trigger signal that warrants rollback:
48
+ - Rollback dry-run command (if available):
49
+
50
+ ## Forbidden In This Run (reminder)
51
+
52
+ - `git push`, publish, deploy, migration execution, third-party write APIs, production credentials
53
+ - Edits or Bash mutations performed by any verifier role
54
+ - Sub-agent dispatch beyond the required worker roster
55
+ - Silent scope expansion — every file touched outside the plan's list MUST be recorded in `Out-of-plan edits`
56
+
57
+ ## Verifier Worker Inputs
58
+
59
+ - Diff scope hint: `git diff <base>..HEAD -- <plan-files>`
60
+ - Test output paths verifiers should consult:
61
+ - Specific risks the plan flagged that verifiers must check explicitly:
62
+
63
+ ## Questions for Workers
64
+
65
+ 1. (Executor) Can every plan step be satisfied without out-of-plan edits? If not, list each deviation with rationale.
66
+ 2. (Executor) Did any change touch a file or symbol that appears in `Out of Scope`? If yes, halt and report — do not silently include it.
67
+ 3. (Verifiers) Does the diff match the plan's File Structure and step ordering?
68
+ 4. (Verifiers) Does the validation evidence include actual command output and exit codes for every plan checkpoint?
69
+ 5. (Verifiers) Is the rollback path still valid after the changes?
70
+ 6. (Verifiers) Does the diff contain any "while I'm here" edits (rename, reformat, comment cleanup, adjacent refactor) that the plan did not authorise? Flag each such hunk explicitly.
71
+
72
+ ## Phase Boundary
73
+
74
+ - This task type modifies source code. Edits are bounded by the approved plan's file list; deviations must be recorded.
75
+ - The run must NOT push to any remote, publish artefacts, deploy, run real migrations, or call write APIs against third-party services.
76
+ - Final-verification phase, not this phase, owns acceptance assessment. Do not declare overall success here — only "ready for final-verification" or "needs new planning loop".
77
+
78
+ ## Conversion Note
79
+
80
+ - This input is paired with the approved `final-report.md` from the immediately preceding `implementation-planning` run.
81
+ - Reuse the same `Task Group` and `Task ID` as the planning run for traceability.
@@ -0,0 +1,93 @@
1
+ # OKSTRA Implementation Planning Input
2
+
3
+ ## Identity
4
+
5
+ - Project ID:
6
+ - Task Group:
7
+ - Task ID:
8
+ - Related Tasks:
9
+ - Issue / Ticket:
10
+ - Task Type: `implementation-planning`
11
+ - Requested Outcome:
12
+
13
+ ## Requirement Summary
14
+
15
+ - What needs to change?
16
+ - Why is this work required?
17
+ - What result must be achieved?
18
+
19
+ ## Current State
20
+
21
+ - Current behavior:
22
+ - Known limitations:
23
+ - Existing related implementation:
24
+ - Related code paths:
25
+ - Previous reports in the same task history:
26
+
27
+ ## Constraints
28
+
29
+ - Business constraints:
30
+ - Technical constraints:
31
+ - Delivery constraints:
32
+ - Backward compatibility concerns:
33
+
34
+ ## Out of Scope
35
+
36
+ - Adjacent areas deliberately excluded from this plan:
37
+ - Items that look related but must be planned in a separate task:
38
+ - Reason for exclusion (deadline, risk, separate owner, distinct decision):
39
+
40
+ > Analysers MUST NOT expand option candidates, file lists, or step plans into items listed here. If an analyser believes an excluded item must be addressed to satisfy the requirement, it is reported as a recommended follow-up task in the final report — never silently folded into a candidate option. If this section is left empty, analysers treat any change beyond what `Requirement Summary` explicitly demands as out of scope by default.
41
+
42
+ ## Planning Concerns
43
+
44
+ - Possible implementation options:
45
+ - Expected trade-offs:
46
+ - Dependencies or migrations:
47
+ - Validation approach:
48
+ - Rollback approach:
49
+
50
+ ## Config and Deployment Expectations
51
+
52
+ - Relevant config files:
53
+ - Relevant deployment manifests:
54
+ - Expected target values or invariants:
55
+ - Values that must remain unchanged:
56
+
57
+ ## Open Questions
58
+
59
+ - What is still unclear in the requirement?
60
+ - What could block implementation?
61
+ - What must be confirmed before coding?
62
+
63
+ ## Questions for Analysers
64
+
65
+ 1. What is the safest implementation direction?
66
+ 2. What are the main trade-offs between options?
67
+ 3. What should be validated before, during, and after implementation?
68
+ 4. Which adjacent changes did you consider and **deliberately exclude** from this plan, and why must each be a separate task instead of being folded in here?
69
+ 5. If a candidate option's file list grew beyond the explicit requirement, justify each extra file or remove it.
70
+
71
+ ## Required Plan Deliverable
72
+
73
+ The final report of an `implementation-planning` run MUST contain every section below. Missing any one of them is a contract violation.
74
+
75
+ 1. **Option Candidates** — at least two viable options, each with the exact list of files to create or modify and the principal change per file.
76
+ 2. **Trade-off Matrix** — comparison of the candidates across complexity, risk, reversibility, performance impact, scope, and required test surface.
77
+ 3. **Recommended Option** — selected option with explicit rationale referencing the trade-off matrix.
78
+ 4. **Stepwise Execution Order** — ordered steps where each step is independently verifiable; each step lists the files it touches and the test/command that proves it works.
79
+ 5. **Dependency and Migration Risk** — schema, data, ordering, feature-flag, and cross-service risks that the recommended option introduces.
80
+ 6. **Validation Checklist** — pre-execution, mid-execution, and post-execution checks (commands, expected outputs, observability points).
81
+ 7. **Rollback Strategy** — exact reverse procedure or compensating action for each significant step.
82
+ 8. **Scope Boundary** — an explicit list of adjacent areas, files, refactors, or quality improvements that this plan **does NOT** cover, each with a one-line reason (deferred, separate owner, separate decision, out of requirement). Any item the analysers were tempted to fold in but chose to exclude MUST appear here. An empty list is allowed only when the analysers explicitly state "no adjacent expansion was considered" — silence is not acceptable.
83
+ 9. **User Approval Request** — a labelled block stating that the plan is awaiting explicit user approval. The next `implementation` run MUST NOT begin until the user has replied with explicit approval to this block.
84
+
85
+ ## Phase Boundary
86
+
87
+ - This task type produces a plan only. Source code MUST NOT be modified, builds/migrations/deployments MUST NOT be executed, and follow-up phases MUST NOT be started inside the same run.
88
+ - If workers detect that the plan cannot be completed without further error analysis or new requirements, record that in the final report and recommend re-routing to `error-analysis` or `requirements-discovery` rather than guessing.
89
+
90
+ ## Conversion Note
91
+
92
+ - This input can be used as a planning draft before creating `okstra-task-brief.md`.
93
+ - Reuse the same `Task Group` and `Task ID` if this plan belongs to the same long-lived task.
@@ -0,0 +1,64 @@
1
+ # OKSTRA Quick Input
2
+
3
+ ## Basic Identity
4
+
5
+ - Project ID:
6
+ - Task Group:
7
+ - Task ID:
8
+ - Related Tasks:
9
+ - Issue / Ticket:
10
+ - Requested Task Type:
11
+ - Requested Outcome:
12
+
13
+ ## Current Context Summary
14
+
15
+ - What is the current state or request?
16
+ - What should happen instead?
17
+ - Why do you want cross verify now?
18
+ - Should this continue an existing task or start a new one?
19
+
20
+ ## Current Evidence
21
+
22
+ - Main note or issue document:
23
+ - Existing analysis:
24
+ - Logs or raw samples:
25
+ - Related code paths:
26
+
27
+ ## Constraints
28
+
29
+ - Known constraints:
30
+ - Known assumptions:
31
+ - Still uncertain:
32
+
33
+ - Adjacent areas deliberately excluded from this run:
34
+ - Items that look related but must be handled in a separate task:
35
+ - Reason for exclusion:
36
+
37
+ > Workers MUST NOT expand into items listed here.
38
+ > If left blank, any changes beyond the explicit requirements of the input will be treated as out of scope by default.
39
+ > Any exclusions that appear necessary will be recorded only as follow-up recommendations in the final report, and no further action will be taken.
40
+
41
+ ## Config and Deployment References
42
+
43
+ - Related config files:
44
+ - Related deployment manifests:
45
+ - Expected values or invariants:
46
+ - What is still uncertain:
47
+
48
+ ## Questions to Answer
49
+
50
+ 1.
51
+ 2.
52
+ 3.
53
+
54
+ ### Standing Scope-Discipline Questions (always answered)
55
+
56
+ - Which adjacent changes did you consider and **deliberately exclude** from this run? List each with a one-line reason.
57
+ - Did any part of your output go beyond what `Current Context Summary` and the `Out of Scope` block define? If yes, move it to follow-up recommendations and remove it from the main answer.
58
+
59
+ ## Recommended Next Step
60
+
61
+ - Should this be converted into a full cross verify task brief?
62
+ - Is `requirements-discovery` the right first phase?
63
+ - If yes, what materials still need to be added?
64
+ - If this is a reopened task, should the same `Task Group` and `Task ID` be reused?