okstra 0.85.0 → 0.87.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 (101) hide show
  1. package/docs/kr/architecture.md +27 -27
  2. package/docs/kr/cli.md +21 -21
  3. package/docs/kr/performance-improvement-plan-v2.md +4 -4
  4. package/docs/kr/performance-improvement-plan.md +3 -3
  5. package/docs/project-structure-overview.md +6 -6
  6. package/docs/superpowers/plans/2026-06-17-okstra-error-report.md +724 -0
  7. package/docs/superpowers/specs/2026-06-17-okstra-error-report-design.md +123 -0
  8. package/docs/task-process/error-analysis.md +1 -1
  9. package/docs/task-process/final-verification.md +4 -4
  10. package/docs/task-process/implementation-planning.md +2 -2
  11. package/docs/task-process/implementation.md +3 -3
  12. package/docs/task-process/requirements-discovery.md +2 -2
  13. package/package.json +1 -1
  14. package/runtime/BUILD.json +2 -2
  15. package/runtime/agents/workers/{gemini-worker.md → antigravity-worker.md} +56 -56
  16. package/runtime/agents/workers/claude-worker.md +2 -2
  17. package/runtime/agents/workers/codex-worker.md +1 -1
  18. package/runtime/agents/workers/report-writer-worker.md +2 -2
  19. package/runtime/bin/lib/okstra/cli.sh +3 -3
  20. package/runtime/bin/lib/okstra/globals.sh +8 -8
  21. package/runtime/bin/lib/okstra/interactive.sh +1 -1
  22. package/runtime/bin/lib/okstra/usage.sh +7 -7
  23. package/runtime/bin/lib/okstra-ctl/cmd-reconcile.sh +5 -3
  24. package/runtime/bin/lib/okstra-ctl/prepare.sh +4 -2
  25. package/runtime/bin/{okstra-gemini-exec.sh → okstra-antigravity-exec.sh} +67 -60
  26. package/runtime/bin/okstra-error-log.py +2 -1
  27. package/runtime/bin/okstra-token-usage.py +3 -4
  28. package/runtime/bin/okstra-trace-cleanup.sh +4 -4
  29. package/runtime/bin/okstra-wrapper-status.py +3 -3
  30. package/runtime/bin/okstra.sh +1 -1
  31. package/runtime/prompts/launch.template.md +3 -3
  32. package/runtime/prompts/lead/context-loader.md +1 -1
  33. package/runtime/prompts/lead/convergence.md +8 -8
  34. package/runtime/prompts/lead/okstra-lead-contract.md +15 -15
  35. package/runtime/prompts/lead/report-writer.md +6 -6
  36. package/runtime/prompts/lead/team-contract.md +31 -31
  37. package/runtime/prompts/profiles/_coding-conventions-preflight.md +2 -2
  38. package/runtime/prompts/profiles/_common-contract.md +7 -7
  39. package/runtime/prompts/profiles/_implementation-deliverable.md +1 -1
  40. package/runtime/prompts/profiles/_implementation-executor.md +6 -6
  41. package/runtime/prompts/profiles/_implementation-verifier.md +4 -4
  42. package/runtime/prompts/profiles/_stage-discipline.md +1 -1
  43. package/runtime/prompts/profiles/error-analysis.md +1 -1
  44. package/runtime/prompts/profiles/final-verification.md +1 -1
  45. package/runtime/prompts/profiles/forbidden-actions.json +2 -2
  46. package/runtime/prompts/profiles/implementation-planning.md +1 -1
  47. package/runtime/prompts/profiles/implementation.md +3 -3
  48. package/runtime/prompts/profiles/improvement-discovery.md +3 -3
  49. package/runtime/prompts/profiles/requirements-discovery.md +1 -1
  50. package/runtime/prompts/wizard/prompts.ko.json +9 -5
  51. package/runtime/python/okstra_ctl/__init__.py +2 -0
  52. package/runtime/python/okstra_ctl/analysis_packet.py +1 -1
  53. package/runtime/python/okstra_ctl/clarification_items.py +17 -7
  54. package/runtime/python/okstra_ctl/codex_dispatch.py +2 -2
  55. package/runtime/python/okstra_ctl/context_cost.py +10 -44
  56. package/runtime/python/okstra_ctl/doctor.py +1 -1
  57. package/runtime/python/okstra_ctl/error_report.py +185 -0
  58. package/runtime/python/okstra_ctl/improvement_lenses.py +1 -1
  59. package/runtime/python/okstra_ctl/models.py +10 -10
  60. package/runtime/python/okstra_ctl/paths.py +9 -9
  61. package/runtime/python/okstra_ctl/reconcile.py +74 -11
  62. package/runtime/python/okstra_ctl/render.py +21 -21
  63. package/runtime/python/okstra_ctl/run.py +16 -16
  64. package/runtime/python/okstra_ctl/run_context.py +1 -1
  65. package/runtime/python/okstra_ctl/seeding.py +1 -1
  66. package/runtime/python/okstra_ctl/task_target.py +44 -0
  67. package/runtime/python/okstra_ctl/team.py +1 -1
  68. package/runtime/python/okstra_ctl/wizard.py +55 -30
  69. package/runtime/python/okstra_ctl/workers.py +3 -3
  70. package/runtime/python/okstra_ctl/workflow.py +1 -1
  71. package/runtime/python/okstra_ctl/worktree.py +1 -1
  72. package/runtime/python/okstra_token_usage/__init__.py +2 -3
  73. package/runtime/python/okstra_token_usage/antigravity.py +26 -0
  74. package/runtime/python/okstra_token_usage/blocks.py +4 -0
  75. package/runtime/python/okstra_token_usage/collect.py +20 -15
  76. package/runtime/python/okstra_token_usage/paths.py +0 -1
  77. package/runtime/python/okstra_token_usage/pricing.py +6 -3
  78. package/runtime/schemas/final-report-v1.0.schema.json +1 -1
  79. package/runtime/skills/okstra-brief/SKILL.md +1 -1
  80. package/runtime/skills/okstra-inspect/SKILL.md +85 -21
  81. package/runtime/skills/okstra-run/SKILL.md +3 -3
  82. package/runtime/skills/okstra-setup/SKILL.md +2 -2
  83. package/runtime/templates/prd/brief.template.md +2 -2
  84. package/runtime/templates/reports/i18n/en.json +1 -1
  85. package/runtime/templates/reports/i18n/ko.json +1 -1
  86. package/runtime/templates/reports/settings.template.json +2 -2
  87. package/runtime/templates/reports/task-brief.template.md +2 -2
  88. package/runtime/templates/worker-prompt-preamble.md +7 -7
  89. package/runtime/validators/forbidden_actions.py +1 -1
  90. package/runtime/validators/lib/fixtures.sh +3 -3
  91. package/runtime/validators/lib/validate-assets.sh +1 -1
  92. package/runtime/validators/validate-run.py +8 -8
  93. package/src/cli-registry.mjs +7 -0
  94. package/src/codex-dispatch.mjs +3 -3
  95. package/src/codex-run.mjs +2 -2
  96. package/src/doctor.mjs +1 -1
  97. package/src/error-report.mjs +27 -0
  98. package/src/install.mjs +1 -1
  99. package/src/render-bundle.mjs +1 -1
  100. package/src/uninstall.mjs +2 -2
  101. package/runtime/python/okstra_token_usage/gemini.py +0 -82
@@ -0,0 +1,123 @@
1
+ # okstra-run 에러 집계 리포트 (`okstra error-report` + inspect `errors` facet) 설계
2
+
3
+ - 날짜: 2026-06-17
4
+ - 상태: 설계 초안
5
+ - 대상: 신규 `scripts/okstra_ctl/error_report.py`, 신규 `src/error-report.mjs`, `src/cli-registry.mjs`, `skills/okstra-inspect/SKILL.md`
6
+ - 선행 문서:
7
+ - [`2026-06-06-stage-worktree-isolation-design.md`](2026-06-06-stage-worktree-isolation-design.md) (stage-isolated run 경로)
8
+
9
+ ## 1. 배경
10
+
11
+ okstra-run 은 실행 중 발생한 에러를 이미 구조화된 형태로 적재하고 있다. 그러나 그 데이터를 **읽어서 사람에게 리포트로 보여주는 소비자가 없다.**
12
+
13
+ 확인된 현재 상태:
14
+
15
+ - 에러는 run 별 JSONL 로 적재된다: `runs/<task-type>/logs/errors-<task-type>-<seq>.jsonl` ([paths.py:196](../../../scripts/okstra_ctl/paths.py:196)).
16
+ - 단일 writer 헬퍼가 스키마를 강제한다. 레코드 필드는 `ts / recordedAt / taskKey / phase / agent / agentRole / model / source / errorType / command / commandKind / exitCode / durationMs / message / stderrExcerpt / context` ([okstra-error-log.py:122](../../../scripts/okstra-error-log.py:122)).
17
+ - 두 경로로 수집된다: lead 가 직접 관측한 에러(`append-observed`)와 워커 사이드카(`worker-results/<id>-worker-errors-*.json`)에서 끌어온 에러(`append-from-worker`) ([okstra-error-log.py:96](../../../scripts/okstra-error-log.py:96), [okstra-error-log.py:144](../../../scripts/okstra-error-log.py:144)). `source` 는 각각 `lead-observed` / `worker-reported`.
18
+ - `errorType` 화이트리스트: `tool-failure`, `cli-failure`, `contract-violation` ([okstra-error-log.py:17](../../../scripts/okstra-error-log.py:17)).
19
+ - `_active_error_logs` 는 이 경로들을 **lead 에게 "여기 기록하라"고 알려주는 쓰기 타깃**으로만 노출한다 ([render.py:361](../../../scripts/okstra_ctl/render.py:361), [render.py:430](../../../scripts/okstra_ctl/render.py:430)). errors.jsonl 을 읽어 보고하는 코드는 없다(grep 확인).
20
+ - okstra-inspect 는 현재 `latestRunStatus == error` 라는 **run 단위 거친 상태**만 노출할 뿐, 개별 에러 이벤트(어느 phase 에서 어느 워커가 무슨 command 로 exitCode 몇으로 실패했는지)는 어디서도 리포트하지 않는다 ([skills/okstra-inspect/SKILL.md:206](../../../skills/okstra-inspect/SKILL.md:206)).
21
+
22
+ ## 2. 사용자 결정
23
+
24
+ 브레인스토밍에서 4개 핵심을 확정했다.
25
+
26
+ 1. **리포트 성격 = 파일 산출물.** 화면 출력에 그치지 않고 `.md` 파일로 저장한다.
27
+ 2. **범위 = task 전체 집계.** 한 task 의 모든 run 에 걸친 errors.jsonl 을 합쳐 phase / worker / errorType 별로 집계한다.
28
+ 3. **렌더링 주체 = 신규 CLI `okstra error-report`.** 여러 run 의 JSONL 집계는 결정론적이어야 정확하므로 Python 렌더러가 수행한다. inspect facet 은 이 CLI 를 호출하고 결과를 표시한다 — `cost` facet 이 `okstra context-cost` 를 호출하는 것과 동일한 패턴 ([skills/okstra-inspect/SKILL.md:528](../../../skills/okstra-inspect/SKILL.md:528)).
29
+ 4. **저장 방식 = timestamp 누적.** 매 호출마다 새 파일을 만들어 이력을 파일로 보존한다 — schedule 산출물과 동일한 누적 패턴 ([skills/okstra-schedule/SKILL.md:160](../../../skills/okstra-schedule/SKILL.md:160)).
30
+
31
+ ## 3. 아키텍처
32
+
33
+ 4개 변경. 모두 기존 컴포넌트를 복제하므로 새 패턴을 만들지 않는다.
34
+
35
+ | 컴포넌트 | 역할 | 복제 대상 |
36
+ |---|---|---|
37
+ | `scripts/okstra_ctl/error_report.py` (신규) | task-key → task_root resolve → errors.jsonl glob → 집계 → `.md` 렌더 + stdout JSON 요약 | [`context_cost.py`](../../../scripts/okstra_ctl/context_cost.py) |
38
+ | `src/error-report.mjs` (신규) | Node CLI 래퍼. `runPythonModule({module: "okstra_ctl.error_report"})` | [`src/context-cost.mjs`](../../../src/context-cost.mjs) |
39
+ | `src/cli-registry.mjs` | `error-report` 명령 등록 (`introspection` 카테고리) | [`cli-registry.mjs:100`](../../../src/cli-registry.mjs:100) (context-cost 항목) |
40
+ | `skills/okstra-inspect/SKILL.md` | 신규 `errors` facet 섹션 + dispatch 테이블 1행 + 트리거 phrase | `cost` facet 섹션 |
41
+
42
+ ### 단일 참조점 준수
43
+
44
+ task-key → task_root 해석의 SSOT 는 공유 모듈 `okstra_project` 의 `find_task_root` / `resolve_project_root` 다 ([context_cost.py:16](../../../scripts/okstra_ctl/context_cost.py:16) 가 이를 `_resolve_task_root` 로 감싸 사용, [context_cost.py:92](../../../scripts/okstra_ctl/context_cost.py:92)). `error_report.py` 는 새 해석 경로를 만들지 않고 같은 공유 모듈을 직접 재사용한다 — `context_cost.py` 의 `_resolve_task_root`(target = task-root path / task-key + project-root / task-key + cwd 3형태)와 동일한 입력 계약을 따른다.
45
+
46
+ ## 4. CLI 인터페이스
47
+
48
+ ```
49
+ okstra error-report <task-root>
50
+ okstra error-report <task-key> --project-root <dir>
51
+ okstra error-report <task-key> --cwd <dir>
52
+ ```
53
+
54
+ - 입력 형태는 `context-cost` 와 동일(task-root 직접 / task-key + project-root / task-key + cwd).
55
+ - 동작: errors.jsonl 들을 모아 집계 → `.md` 파일을 쓰고 → **stdout 으로 요약 JSON** 을 낸다.
56
+ - stdout JSON shape(초안):
57
+ ```json
58
+ {
59
+ "taskKey": "<project-id>:<task-group>:<task-id>",
60
+ "reportPath": "<project-root-relative .md path>",
61
+ "totals": { "errorCount": 12, "runCount": 4, "byErrorType": {...}, "bySource": {...} },
62
+ "byPhase": [ { "phase": "...", "count": N } ],
63
+ "byAgent": [ { "agent": "...", "count": N } ]
64
+ }
65
+ ```
66
+ - inspect `errors` facet 은 이 JSON 을 파싱해 생성 경로 + 요약 카운트만 화면에 표시한다(전체 본문은 `.md` 파일이 SSOT).
67
+
68
+ ## 5. 산출물 위치 / 구조
69
+
70
+ - 저장 경로: **`<task_root>/error-reports/error-report-<YYYY-MM-DD_HH-MM-SS>.md`**
71
+ - task 레벨 집계 산출물이므로 task root 하위 전용 디렉터리(`error-reports/`)에 둔다. run 별 산출물(`runs/<type>/reports/`, [paths.py:148](../../../scripts/okstra_ctl/paths.py:148))과 레벨이 다르므로 디렉터리를 분리해 혼동을 막는다.
72
+ - timestamp 형식은 schedule 과 동일한 `<YYYY-MM-DD_HH-MM-SS>`.
73
+ - artifact-home 규칙 준수: 모든 산출물이 `<PROJECT_ROOT>/.okstra/` 하위에 있다.
74
+ - 리포트 `.md` 섹션 구조:
75
+ 1. **요약** — 총 에러 N건, 집계된 run 수, `errorType` 별 카운트, `source`(lead-observed / worker-reported) 별 카운트, 생성 시각.
76
+ 2. **phase 별 집계** — `| Phase | Count |` (lifecycle phase 순).
77
+ 3. **worker(agent) 별 집계** — `| Agent | Role | Count |`.
78
+ 4. **run 별 분해** — `| Run (type/seq) | Errors | 최초 ts | 최종 ts |`.
79
+ 5. **개별 에러 이벤트** — `ts / phase / agent / errorType / command / exitCode / message` 테이블 + `stderrExcerpt` 는 접힌 코드블록. `ts` 오름차순.
80
+
81
+ ## 6. 데이터 흐름
82
+
83
+ 1. task-key → task_root resolve (context_cost 와 동일).
84
+ 2. errors.jsonl glob:
85
+ - flat: `<task_root>/runs/*/logs/errors-*.jsonl`
86
+ - stage-isolated: `<task_root>/runs/*/stage-*/logs/errors-*.jsonl` ([2026-06-06-stage-worktree-isolation-design.md](2026-06-06-stage-worktree-isolation-design.md) 의 stage 경로 규칙)
87
+ 3. 각 파일을 줄 단위 JSON 으로 파싱. 깨진 줄은 건너뛰되 카운트해 리포트 말미에 `parse-skipped: N` 으로 surface(조용한 누락 금지).
88
+ 4. 집계 → `.md` 렌더 + stdout JSON.
89
+
90
+ ## 7. inspect 의 "두 번째 write" 경계
91
+
92
+ 현재 SKILL 첫 줄은 "read-side inspection plus the one write-side mutation (`workStatus`)" ([SKILL.md:9](../../../skills/okstra-inspect/SKILL.md:9)).
93
+
94
+ `errors` facet 은 `task-manifest.json` 같은 **okstra 상태를 mutate 하지 않는다.** CLI 를 호출해 **읽은 에러 데이터에서 파생한 산출물(.md)을 렌더**할 뿐이며, 이는 `cost` 가 추정치를 내는 것과 같은 read-derived 동작이다. 따라서 SKILL 의 정체성 문구를 다음으로 정정한다:
95
+
96
+ > read-side okstra inspection + 상태 mutation 하나(`workStatus`) + read-derived 산출물 렌더(`errors` 리포트).
97
+
98
+ 이로써 "유일한 write 는 workStatus" 라는 기존 불변식과 모순되지 않게 경계를 명시한다(상태 mutation 은 여전히 workStatus 하나뿐).
99
+
100
+ ## 8. 엣지케이스
101
+
102
+ - **glob 결과 0개** (errors.jsonl 자체가 없음): "이 task 에는 기록된 에러 로그가 없습니다" 를 facet 이 보고하고 `.md` 를 생성하지 않는다.
103
+ - **파일은 있으나 레코드 0건**: 빈 결과와 구분해, "에러 0건" 을 명시한 리포트를 생성한다.
104
+ - **깨진 JSONL 줄**: 건너뛰고 `parse-skipped` 카운트로 surface.
105
+ - **stage-isolated + flat 혼재**: 둘 다 glob 해 합산.
106
+
107
+ ## 9. 테스트 계획
108
+
109
+ - `tests/test_okstra_error_report.py` (신규):
110
+ - flat / stage-isolated / 혼재 fixture 에서 errorCount·byPhase·byAgent·bySource 집계 정확성.
111
+ - errors.jsonl 0개 / 빈 파일 / 깨진 줄(parse-skipped) 처리.
112
+ - 생성 `.md` 의 섹션 헤딩·테이블 컬럼 존재.
113
+ - stdout JSON shape.
114
+ - 기존 `tests/test_okstra_error_log.py` 와 충돌하지 않게 별도 모듈.
115
+ - e2e: 기존 시나리오에 에러를 적재한 뒤 `okstra error-report` 를 돌려 `.md` 가 생성되는지 확인하는 시나리오를 선택적으로 추가(범위 밖일 수 있음 — plan 단계에서 판단).
116
+
117
+ ## 10. 범위 밖 (YAGNI)
118
+
119
+ - 단일 run 한정 모드 / `--all` 토글 — 이번엔 task 집계 단일 모드만.
120
+ - task-group 단위 집계.
121
+ - run 종료 훅에서의 자동 생성(on-demand 보고가 의도).
122
+ - HTML / slim-AI 뷰 렌더.
123
+ - errors.jsonl 의 timeline/catalog 경로 노출(facet 이 결정론적 glob 으로 resolve 하므로 불필요).
@@ -32,7 +32,7 @@ flowchart TD
32
32
  Confirm --> Render[render-bundle --render-only]
33
33
  ```
34
34
 
35
- 기본 required roster는 `claude`, `codex`, `report-writer`다. `gemini`는 optional worker이고, 선택하면 analyser set에 들어간다.
35
+ 기본 required roster는 `claude`, `codex`, `report-writer`다. `antigravity`는 optional worker이고, 선택하면 analyser set에 들어간다.
36
36
 
37
37
  ## 3. prepare_task_bundle 처리
38
38
 
@@ -33,7 +33,7 @@ flowchart TD
33
33
  Confirm --> Render[render-bundle]
34
34
  ```
35
35
 
36
- `final-verification`은 analyser roster가 있는 non-implementation phase다. 따라서 `Use defaults`를 골라도 worker roster prompt는 계속 나온다. 기본 required workers는 `claude`, `codex`, `report-writer`이고, `gemini`는 opt-in이다.
36
+ `final-verification`은 analyser roster가 있는 non-implementation phase다. 따라서 `Use defaults`를 골라도 worker roster prompt는 계속 나온다. 기본 required workers는 `claude`, `codex`, `report-writer`이고, `antigravity`는 opt-in이다.
37
37
 
38
38
  ## 3. entry gate
39
39
 
@@ -69,12 +69,12 @@ flowchart TD
69
69
  Gate[entry gate passed] --> Lead[Claude lead fixes target snapshot]
70
70
  Lead --> CW[Claude verifier<br/>read-only]
71
71
  Lead --> XW[Codex verifier<br/>read-only]
72
- Lead --> GW{Gemini opt-in?}
73
- GW -->|yes| Gemini[Gemini verifier<br/>read-only]
72
+ Lead --> GW{Antigravity opt-in?}
73
+ GW -->|yes| Antigravity[Antigravity verifier<br/>read-only]
74
74
  GW -->|no| Collect
75
75
  CW --> Collect[collect independent findings]
76
76
  XW --> Collect
77
- Gemini --> Collect
77
+ Antigravity --> Collect
78
78
  Collect --> Conv[convergence<br/>default max rounds = 2]
79
79
  Conv --> Writer[report-writer final synthesis]
80
80
  Writer --> SelfReview[lead self-review<br/>verdict, blockers, coverage, no-mutation]
@@ -24,10 +24,10 @@ flowchart TD
24
24
  Worktree -->|yes| Defaults[Use defaults / Customize]
25
25
  Worktree -->|no| BaseRef[base-ref pick/text]
26
26
  BaseRef --> Defaults
27
- Defaults --> Workers[worker multi-pick<br/>claude/codex + optional gemini]
27
+ Defaults --> Workers[worker multi-pick<br/>claude/codex + optional antigravity]
28
28
  Workers --> Branch{customize?}
29
29
  Branch -->|no| Confirm
30
- Branch -->|yes| Models[lead, claude, codex, gemini if selected, report-writer models]
30
+ Branch -->|yes| Models[lead, claude, codex, antigravity if selected, report-writer models]
31
31
  Models --> Extras[directive, related tasks, clarification]
32
32
  Extras --> Confirm
33
33
  Confirm --> Render[render-bundle]
@@ -28,7 +28,7 @@ flowchart TD
28
28
  PlanPick --> Approved{APPROVED marker present?}
29
29
  Approved -->|no| Retry[re-prompt same step]
30
30
  Approved -->|yes| Stage[stage pick<br/>auto or number]
31
- Stage --> Executor[executor pick<br/>claude/codex/gemini]
31
+ Stage --> Executor[executor pick<br/>claude/codex/antigravity]
32
32
  Executor --> Defaults[Use defaults / Customize]
33
33
  Defaults -->|defaults| Confirm
34
34
  Defaults -->|customize| Models[lead + executor model + report-writer model]
@@ -69,8 +69,8 @@ flowchart TD
69
69
  Lead[Claude lead] --> Exec[Executor<br/>selected provider]
70
70
  Lead --> CV[Claude verifier<br/>read-only]
71
71
  Lead --> XV[Codex verifier<br/>read-only]
72
- Lead --> GV{Gemini in roster?}
73
- GV -->|yes| Gem[Gemini verifier<br/>read-only]
72
+ Lead --> GV{Antigravity in roster?}
73
+ GV -->|yes| Gem[Antigravity verifier<br/>read-only]
74
74
  Exec --> Diff[Source edits + local commits]
75
75
  CV --> QA[Independent QA rerun]
76
76
  XV --> QA
@@ -42,7 +42,7 @@ flowchart TD
42
42
  Confirm --> Render[render-bundle]
43
43
  ```
44
44
 
45
- worker multi-pick에서 picker는 `report-writer`를 옵션으로 보여주지 않는다. 사용자가 `claude`만 골라도 wizard가 `report-writer`를 강제 append한다. optional `gemini`는 사용자가 골랐을 때만 포함된다.
45
+ worker multi-pick에서 picker는 `report-writer`를 옵션으로 보여주지 않는다. 사용자가 `claude`만 골라도 wizard가 `report-writer`를 강제 append한다. optional `antigravity`는 사용자가 골랐을 때만 포함된다.
46
46
 
47
47
  ## 3. prepare_task_bundle 처리
48
48
 
@@ -73,7 +73,7 @@ runtime에서 이 phase만을 위한 추가 hard gate는 없다. 중요한 gate
73
73
  flowchart TD
74
74
  P1[Phase 1 intake<br/>manifest, brief, profile, run manifest, team-state] --> P2[Phase 2 prompts]
75
75
  P2 --> P3[Phase 3 TeamCreate]
76
- P3 --> P4[Phase 4/5 dispatch analysers<br/>claude/codex + optional gemini]
76
+ P3 --> P4[Phase 4/5 dispatch analysers<br/>claude/codex + optional antigravity]
77
77
  P4 --> C[Phase 5.5 convergence<br/>default maxRounds = 1]
78
78
  C --> R[Phase 6 report-writer authors final report]
79
79
  R --> P7[Phase 7 token usage, validate, persist]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "okstra",
3
- "version": "0.85.0",
3
+ "version": "0.87.0",
4
4
  "description": "Multi-agent cross-verification orchestrator runtime + Claude Code skills.",
5
5
  "license": "MIT",
6
6
  "author": "devonshin",
@@ -1,5 +1,5 @@
1
1
  {
2
- "package": "0.85.0",
3
- "builtAt": "2026-06-15T19:37:36.878Z",
2
+ "package": "0.87.0",
3
+ "builtAt": "2026-06-16T18:50:52.236Z",
4
4
  "repoRoot": "/home/runner/work/okstra/okstra"
5
5
  }
@@ -1,19 +1,19 @@
1
1
  ---
2
- name: gemini-worker
2
+ name: antigravity-worker
3
3
  description: |
4
- Use this agent when dispatched as a Gemini worker for okstra cross-verification tasks. Executes Google Gemini CLI and returns analysis results.
4
+ Use this agent when dispatched as a Antigravity worker for okstra cross-verification tasks. Executes Google Antigravity CLI and returns analysis results.
5
5
 
6
6
  <example>
7
7
  Context: The okstra skill is orchestrating a multi-agent cross-verification run.
8
8
  user: "okstra this task bundle"
9
- assistant: "Spawning gemini-worker agent to get Gemini analysis."
9
+ assistant: "Spawning antigravity-worker agent to get Antigravity analysis."
10
10
  <commentary>The okstra skill dispatches this agent as part of the worker roster.</commentary>
11
11
  </example>
12
12
 
13
13
  <example>
14
- Context: A cross-verification needs Gemini perspective on analysis.
14
+ Context: A cross-verification needs Antigravity perspective on analysis.
15
15
  user: "cross verify this implementation"
16
- assistant: "Running gemini-worker for independent Gemini analysis."
16
+ assistant: "Running antigravity-worker for independent Antigravity analysis."
17
17
  <commentary>Cross-verification tasks require independent AI worker outputs.</commentary>
18
18
  </example>
19
19
  model: inherit
@@ -21,63 +21,63 @@ color: green
21
21
  tools: ["Bash", "BashOutput", "KillShell", "Read", "Write", "Glob", "Grep"]
22
22
  ---
23
23
 
24
- You are a Gemini worker agent. Your job is to execute the Google Gemini CLI and return the analysis result.
24
+ You are a Antigravity worker agent. Your job is to execute the Google Antigravity CLI and return the analysis result.
25
25
 
26
26
  ## CLI Command
27
27
 
28
28
  **Required form (uses the okstra wrapper to avoid redirect-triggered permission prompts):**
29
29
  ```bash
30
- $HOME/.okstra/bin/okstra-gemini-exec.sh "<absolute-project-root>" "<assigned-model-execution-value>" "<absolute-prompt-history-path>" [<absolute-worktree-path>] [<role>]
30
+ $HOME/.okstra/bin/okstra-antigravity-exec.sh "<absolute-project-root>" "<assigned-model-execution-value>" "<absolute-prompt-history-path>" [<absolute-worktree-path>] [<role>]
31
31
  ```
32
32
 
33
- The fifth argument `<role>` is folded into both the caller (worker) pane title `gemini-<role>` and the sibling trace-pane title `gemini-<role>-tail`. `<role>` carries the dispatched Agent `name` minus the `gemini-` prefix, so the pane title equals the FleetView teammate name (`gemini-worker-reverify-r1`, `gemini-executor`, …) instead of a generic `worker`. Pass the value of the dispatch prompt's `**Pane role:**` line verbatim — Lead injects it on every CLI dispatch: `**Pane role:** worker-reverify-r1` on a convergence reverify, `**Pane role:** worker-critic` on a critic pass, `**Pane role:** executor` on an `implementation` Executor dispatch, `**Pane role:** verifier` on an `implementation` / `final-verification` verifier dispatch, and `**Pane role:** worker` on a plain analysis dispatch. The wrapper defaults to `worker` when the argument is omitted, but pass it explicitly so the pane title is self-describing.
33
+ The fifth argument `<role>` is folded into both the caller (worker) pane title `agy-<role>` and the sibling trace-pane title `agy-<role>-tail`. `<role>` carries the dispatched Agent `name` minus the `agy-` prefix, so the pane title equals the FleetView teammate name (`agy-worker-reverify-r1`, `agy-executor`, …) instead of a generic `worker`. Pass the value of the dispatch prompt's `**Pane role:**` line verbatim — Lead injects it on every CLI dispatch: `**Pane role:** worker-reverify-r1` on a convergence reverify, `**Pane role:** worker-critic` on a critic pass, `**Pane role:** executor` on an `implementation` Executor dispatch, `**Pane role:** verifier` on an `implementation` / `final-verification` verifier dispatch, and `**Pane role:** worker` on a plain analysis dispatch. The wrapper defaults to `worker` when the argument is omitted, but pass it explicitly so the pane title is self-describing.
34
34
 
35
- The fourth argument is **mandatory for implementation phase** and optional otherwise. It must be the literal `EXECUTOR_WORKTREE_PATH` recorded in the run context; the wrapper appends it to gemini's `--include-directories` list so the model can both read and operate on the worktree alongside project-root.
35
+ The fourth argument is **mandatory for implementation phase** and optional otherwise. It must be the literal `EXECUTOR_WORKTREE_PATH` recorded in the run context; the wrapper adds it to agy's `--add-dir` workspace list so the model can both read and operate on the worktree alongside project-root.
36
36
 
37
37
  The wrapper internally runs:
38
38
  ```bash
39
- gemini -p - -m "<model>" -o text --include-directories "<project-root>[,<worktree-path>]" < "<prompt-path>" 2>/dev/null
39
+ agy --print "<prompt>" --model "<model>" --add-dir "<project-root>" [--add-dir "<worktree-path>"] --dangerously-skip-permissions
40
40
  ```
41
41
 
42
- The wrapper exists because Claude Code's Bash permission matcher rejects simple-prefix matches when the command contains stdin/stderr redirects. Calling `gemini -p - ... < <path> 2>/dev/null` directly triggers a permission prompt every dispatch even when `Bash(gemini:*)` is allowlisted. The wrapper folds the redirects inside, so the harness sees a single non-redirect command that matches `Bash($HOME/.okstra/bin/okstra-gemini-exec.sh:*)`.
42
+ The wrapper exists because Claude Code's Bash permission matcher rejects simple-prefix matches when the command contains stdin/stderr redirects. Calling `agy --print ... < <path> 2>/dev/null` directly triggers a permission prompt every dispatch even when `Bash(agy:*)` is allowlisted. The wrapper folds the redirects inside, so the harness sees a single non-redirect command that matches `Bash($HOME/.okstra/bin/okstra-antigravity-exec.sh:*)`.
43
43
 
44
- **Do NOT** invoke `gemini -p - ... < ... 2>/dev/null` directly — always go through the wrapper. Gemini CLI has no `--cd` flag, so the wrapper anchors workspace correctness via `--include-directories <project-root>` regardless of inherited cwd.
44
+ **Do NOT** invoke `agy --print ... 2>>log > >(tee)` directly — always go through the wrapper. agy has no `--cd` flag, so the wrapper anchors workspace correctness via `--add-dir <project-root>` regardless of inherited cwd.
45
45
 
46
46
  ## Execution Rules
47
47
 
48
- 1. Check if gemini CLI is installed:
48
+ 1. Check if agy CLI is installed:
49
49
  ```bash
50
- which gemini 2>/dev/null
50
+ which agy 2>/dev/null
51
51
  ```
52
52
 
53
- 2. If not installed, immediately return: `GEMINI_NOT_INSTALLED: gemini CLI is not installed`
53
+ 2. If not installed, immediately return: `ANTIGRAVITY_NOT_INSTALLED: agy CLI is not installed`
54
54
 
55
55
  3. Extract the absolute `Project Root` from the lead prompt (look for a line starting with `**Project Root:**` or `Project Root:`). If it is missing, immediately return:
56
- `GEMINI_PROJECT_ROOT_MISSING: absolute Project Root was not provided in the lead prompt`
56
+ `ANTIGRAVITY_PROJECT_ROOT_MISSING: absolute Project Root was not provided in the lead prompt`
57
57
 
58
58
  4. Extract the assigned worker prompt history path from the lead prompt (look for a line starting with `Assigned worker prompt history path:`). If it is missing, immediately return:
59
- `GEMINI_PROMPT_PATH_MISSING: assigned worker prompt history path was not provided`
59
+ `ANTIGRAVITY_PROMPT_PATH_MISSING: assigned worker prompt history path was not provided`
60
60
  - If the extracted path is relative (does not start with `/`), resolve it against `Project Root` to get an absolute path. Use the absolute form everywhere below.
61
61
 
62
- 5. Persist the exact worker prompt to the absolute prompt history path before invoking Gemini.
62
+ 5. Persist the exact worker prompt to the absolute prompt history path before invoking Antigravity.
63
63
  - Use the absolute assigned path under the current run `prompts/` directory.
64
64
  - `Write` is allowed for this purpose.
65
65
  - Bash heredoc or redirection is also acceptable if that is more reliable.
66
- - Never use `/tmp/gemini_prompt*.txt` as the canonical storage path.
66
+ - Never use `/tmp/agy_prompt*.txt` as the canonical storage path.
67
67
 
68
- 6. Extract the assigned model execution value for `Gemini worker`.
68
+ 6. Extract the assigned model execution value for `Antigravity worker`.
69
69
  - First, use the value explicitly assigned in the lead prompt.
70
- - If the lead prompt only lists the display model, use the canonical execution value from the referenced task bundle metadata (`task-manifest.json` → `resultContract.requiredWorkerRoles[]` for the gemini role).
71
- - If no assigned model execution value can be determined, immediately return `GEMINI_MODEL_MISSING: assigned Gemini model execution value was not provided`. Do NOT fall back to training-data defaults — historical Gemini defaults like `gemini-1.5-flash` are NOT acceptable substitutes for the assigned model. Returning the sentinel is the correct behavior; the lead is responsible for fixing its prompt and redispatching.
72
- - This rule applies equally to convergence reverify rounds. The reverify prompt MUST carry the same `**Model:**` line as the initial run (see the convergence resource at `prompts/lead/convergence.md`, "Required reverify-prompt anchor headers"). If the line is absent in a reverify prompt, return `GEMINI_MODEL_MISSING` rather than guessing.
70
+ - If the lead prompt only lists the display model, use the canonical execution value from the referenced task bundle metadata (`task-manifest.json` → `resultContract.requiredWorkerRoles[]` for the antigravity role).
71
+ - If no assigned model execution value can be determined, immediately return `ANTIGRAVITY_MODEL_MISSING: assigned Antigravity model execution value was not provided`. Do NOT fall back to training-data defaults — historical Antigravity defaults like `gemini-1.5-flash` are NOT acceptable substitutes for the assigned model. Returning the sentinel is the correct behavior; the lead is responsible for fixing its prompt and redispatching.
72
+ - This rule applies equally to convergence reverify rounds. The reverify prompt MUST carry the same `**Model:**` line as the initial run (see the convergence resource at `prompts/lead/convergence.md`, "Required reverify-prompt anchor headers"). If the line is absent in a reverify prompt, return `ANTIGRAVITY_MODEL_MISSING` rather than guessing.
73
73
 
74
- 7. If installed, dispatch the wrapper as a **background** Bash command and poll for completion. The two-minute foreground Bash timeout is insufficient for implementation-phase Gemini runs and forced workers into ad-hoc background dispatch with lost output. The polling contract below is the formal replacement.
74
+ 7. If installed, dispatch the wrapper as a **background** Bash command and poll for completion. The two-minute foreground Bash timeout is insufficient for implementation-phase Antigravity runs and forced workers into ad-hoc background dispatch with lost output. The polling contract below is the formal replacement.
75
75
 
76
76
  **Dispatch (background, no foreground timeout):**
77
77
  ```bash
78
- $HOME/.okstra/bin/okstra-gemini-exec.sh "<absolute-project-root>" "<assigned-model-execution-value>" "<absolute-prompt-history-path>" "<absolute-worktree-path>" "<pane-role>"
78
+ $HOME/.okstra/bin/okstra-antigravity-exec.sh "<absolute-project-root>" "<assigned-model-execution-value>" "<absolute-prompt-history-path>" "<absolute-worktree-path>" "<pane-role>"
79
79
  ```
80
- Call `Bash` with `run_in_background: true`. Capture the returned `bash_id` (a.k.a. `shell_id`). Pass the positional arguments verbatim — do NOT use environment variables, `cd`, `&&` chains, or pipes from `cat`. Substitute the literal extracted Project Root, model execution value, prompt-history path, and worktree path, plus the `**Pane role:**` value (`executor` / `verifier`, or `worker` when the line is absent). The fourth argument is **mandatory for implementation phase** (extract from `EXECUTOR_WORKTREE_PATH` in the lead prompt's run context or the `**Worktree:**` / `cwd for every mutating command:` line) and **may be omitted only for non-implementation analysis phases** that do not mutate the worktree. The wrapper handles `-p -`, `-m`, `-o text`, `--include-directories`, the stdin redirect from the prompt file, and stderr suppression internally. Calling `gemini` directly (without the wrapper) is an error in this skill: the redirect tokens disqualify the prefix match against `Bash(gemini:*)` and produce a permission prompt every dispatch.
80
+ Call `Bash` with `run_in_background: true`. Capture the returned `bash_id` (a.k.a. `shell_id`). Pass the positional arguments verbatim — do NOT use environment variables, `cd`, `&&` chains, or pipes from `cat`. Substitute the literal extracted Project Root, model execution value, prompt-history path, and worktree path, plus the `**Pane role:**` value (`executor` / `verifier`, or `worker` when the line is absent). The fourth argument is **mandatory for implementation phase** (extract from `EXECUTOR_WORKTREE_PATH` in the lead prompt's run context or the `**Worktree:**` / `cwd for every mutating command:` line) and **may be omitted only for non-implementation analysis phases** that do not mutate the worktree. The wrapper handles `--print`, `--model`, the repeatable `--add-dir`, inlining the prompt file as the `--print` argument (agy does not read stdin), `--dangerously-skip-permissions`, and stderr capture internally. Calling `agy` directly (without the wrapper) is an error in this skill: the redirect tokens disqualify the prefix match against `Bash(agy:*)` and produce a permission prompt every dispatch.
81
81
 
82
82
  **Poll loop (BashOutput-only, 30-minute cap):**
83
83
  - Record `start_ts` at dispatch time via a single `Bash` call: `date +%s` (output captured).
@@ -88,7 +88,7 @@ The wrapper exists because Claude Code's Bash permission matcher rejects simple-
88
88
  `log="${prompt_path%.md}.log"; mtime=$(stat -f '%m' "$log" 2>/dev/null || stat -c '%Y' "$log" 2>/dev/null); date +%s`
89
89
  (output captured — first line is `mtime`, second is `current_ts`).
90
90
  - If `current_ts - mtime <= 90` AND grace has NOT yet been applied this polling loop: extend the cap to `2100` seconds (one-shot +5min grace), record the grace internally so it does not re-trigger, and continue polling.
91
- - Otherwise (mtime stale `> 90s`, OR grace already applied): call `KillShell(shell_id: <shell_id>)`, then record a `cli-failure` event with `--error-type cli-failure`, `--exit-code 124`, `--duration-ms <observed_ms>`, `--message "okstra-gemini-exec.sh exceeded polling cap (grace=<applied|not-applied>, last_mtime_age=<n>s)"`, and return `GEMINI_CLI_TIMEOUT: gemini exec exceeded polling cap`.
91
+ - Otherwise (mtime stale `> 90s`, OR grace already applied): call `KillShell(shell_id: <shell_id>)`, then record a `cli-failure` event with `--error-type cli-failure`, `--exit-code 124`, `--duration-ms <observed_ms>`, `--message "okstra-antigravity-exec.sh exceeded polling cap (grace=<applied|not-applied>, last_mtime_age=<n>s)"`, and return `ANTIGRAVITY_CLI_TIMEOUT: agy exec exceeded polling cap`.
92
92
  4. Otherwise continue polling. Read `current_ts` cheaply via another `Bash` call (`date +%s`) at most once per poll iteration.
93
93
  - Do NOT abort the loop on transient `running` status. Only `completed` or the polling cap (initially 30min, optionally extended once to 35min by mtime grace) end it.
94
94
  - **No external timeout from Lead.** This polling loop is the SINGLE timeout authority for this dispatch. Lead MUST NOT impose a separate Agent-call timeout that would terminate this subagent before the polling cap is reached (see team-contract "No external timeout on wrapper subagents").
@@ -97,18 +97,18 @@ The wrapper exists because Claude Code's Bash permission matcher rejects simple-
97
97
 
98
98
  8. After the polling loop exits with `completed`, perform terminal-status determination BEFORE returning:
99
99
 
100
- a. **Extract Result Path.** Read the `**Result Path:** <abs-path>` header line from the lead's dispatch prompt body. If the header is absent, return `GEMINI_RESULT_PATH_MISSING: lead prompt did not include **Result Path:** header` without proceeding. Resolve to absolute against `Project Root` if relative.
100
+ a. **Extract Result Path.** Read the `**Result Path:** <abs-path>` header line from the lead's dispatch prompt body. If the header is absent, return `ANTIGRAVITY_RESULT_PATH_MISSING: lead prompt did not include **Result Path:** header` without proceeding. Resolve to absolute against `Project Root` if relative.
101
101
 
102
102
  b. **CLI failure first.** If the final `BashOutput` reports a non-zero `exit_code`, follow the **CLI failure** rule in §"Error reporting" before returning. Do NOT perform the result-file check on a failed exit — `cli-failure` already covers it.
103
103
 
104
- c. **Result-file existence check (exit 0 only).** If `exit_code == 0` BUT no file exists at the extracted Result Path, the Gemini CLI returned 0 without producing the analysis artifact. Observed failure mode: the CLI streams analysis prose on stdout, hits its token budget or a sandbox EPERM mid-`Write`, and exits 0 with the artifact never persisted. Forwarding the partial stdout silently degrades lead synthesis (the case that motivated this rule), so this path is required.
105
- 1. Capture the final ~10 lines of the wrapper's live log for diagnostics — single Bash call: `tail -n 10 "${prompt_path%.md}.log"` (substitute the literal absolute prompt-history path; the wrapper writes the log next to it per the §"trace pane" comment in `okstra-gemini-exec.sh`). Write the captured lines to a temp file (e.g. `<errors-sidecar-dir>/gemini-result-missing-tail.txt`) so `--stderr-excerpt-file` can reference it.
106
- 2. Record a `cli-failure` event directly to the run-level error log via the exact `okstra error-log append-observed` template in §"Error reporting" — substitute `--exit-code 0`, `--duration-ms <observed-ms>`, `--message "okstra-gemini-exec.sh exited 0 but no result file at <abs-path>"`, and `--stderr-excerpt-file <temp-tail-path>`.
107
- 3. Return `GEMINI_RESULT_MISSING: gemini exited 0 but result file absent at <abs-path>` instead of the raw stdout. The lead is responsible for deciding redispatch per `team-contract` "Lead Redispatch Policy on Result-Missing".
104
+ c. **Result-file existence check (exit 0 only).** If `exit_code == 0` BUT no file exists at the extracted Result Path, the Antigravity CLI returned 0 without producing the analysis artifact. Observed failure mode: the CLI streams analysis prose on stdout, hits its token budget or a sandbox EPERM mid-`Write`, and exits 0 with the artifact never persisted. Forwarding the partial stdout silently degrades lead synthesis (the case that motivated this rule), so this path is required.
105
+ 1. Capture the final ~10 lines of the wrapper's live log for diagnostics — single Bash call: `tail -n 10 "${prompt_path%.md}.log"` (substitute the literal absolute prompt-history path; the wrapper writes the log next to it per the §"trace pane" comment in `okstra-antigravity-exec.sh`). Write the captured lines to a temp file (e.g. `<errors-sidecar-dir>/agy-result-missing-tail.txt`) so `--stderr-excerpt-file` can reference it.
106
+ 2. Record a `cli-failure` event directly to the run-level error log via the exact `okstra error-log append-observed` template in §"Error reporting" — substitute `--exit-code 0`, `--duration-ms <observed-ms>`, `--message "okstra-antigravity-exec.sh exited 0 but no result file at <abs-path>"`, and `--stderr-excerpt-file <temp-tail-path>`.
107
+ 3. Return `ANTIGRAVITY_RESULT_MISSING: agy exited 0 but result file absent at <abs-path>` instead of the raw stdout. The lead is responsible for deciding redispatch per `team-contract` "Lead Redispatch Policy on Result-Missing".
108
108
 
109
- d. **Normal return.** Otherwise (`exit_code == 0` AND result file exists), return the wrapper's accumulated stdout from `BashOutput`, prefixed by exactly one model-identity line copied verbatim from the `**Model:** Gemini worker, <execution-value>` line in the lead prompt (per Worker Preamble → "Return message to the lead"):
109
+ d. **Normal return.** Otherwise (`exit_code == 0` AND result file exists), return the wrapper's accumulated stdout from `BashOutput`, prefixed by exactly one model-identity line copied verbatim from the `**Model:** Antigravity worker, <execution-value>` line in the lead prompt (per Worker Preamble → "Return message to the lead"):
110
110
  ```
111
- **Model:** Gemini worker, <assigned-model-execution-value>
111
+ **Model:** Antigravity worker, <assigned-model-execution-value>
112
112
  ```
113
113
  Emit that line first, then the stdout unmodified. The model line is the ONLY addition permitted — do not otherwise summarize or alter the CLI output. This applies to convergence reverify dispatches too.
114
114
 
@@ -116,49 +116,49 @@ The wrapper exists because Claude Code's Bash permission matcher rejects simple-
116
116
 
117
117
  ## Stop Condition
118
118
 
119
- This wrapper is a thin Bash-execution shell over the Gemini CLI (via `okstra-gemini-exec.sh`). The CLI process itself is the analysis engine; this subagent's only job is to dispatch it and forward output. Therefore:
119
+ This wrapper is a thin Bash-execution shell over the Antigravity CLI (via `okstra-antigravity-exec.sh`). The CLI process itself is the analysis engine; this subagent's only job is to dispatch it and forward output. Therefore:
120
120
 
121
121
  - Return immediately after the polling loop exits with `completed` (or after recording any required `cli-failure` event for a non-zero exit / 30-minute cap / rate-limit).
122
122
  - The only tool calls permitted during the polling loop are `BashOutput`, a single `Bash` call per iteration for `date +%s` (timeout bookkeeping only — no `sleep`), and — on the timeout path only — `KillShell`. Do NOT perform additional `Read`, `Grep`, `Glob` calls between polls; do NOT inspect intermediate wrapper output mid-run.
123
123
  - Outside the polling loop, no `Read`, `Grep`, or `Glob` beyond what is strictly required by steps 1–8 (prompt persistence, Project Root extraction, model resolution, and the step 8 result-file check). The step 8 result-file existence check is explicitly permitted: at most one `Bash` call for `tail -n 10 <log-path>` and one `Read`/test of the Result Path.
124
- - Do NOT re-invoke `okstra-gemini-exec.sh` to "double-check" or "rerun for safety" — convergence (Phase 5.5) handles cross-worker reconciliation. A single CLI dispatch per dispatched-prompt is the contract.
124
+ - Do NOT re-invoke `okstra-antigravity-exec.sh` to "double-check" or "rerun for safety" — convergence (Phase 5.5) handles cross-worker reconciliation. A single CLI dispatch per dispatched-prompt is the contract.
125
125
 
126
- The Gemini CLI's own exit terminates the underlying analysis; this wrapper terminates by returning its captured output (or sentinel).
126
+ The Antigravity CLI's own exit terminates the underlying analysis; this wrapper terminates by returning its captured output (or sentinel).
127
127
 
128
128
  ## MCP Scope
129
129
 
130
- This wrapper does NOT invoke MCP tools directly. MCP availability inside the Gemini CLI is governed by the underlying CLI's own configuration. The `## Available MCP Servers` block from the lead prompt is forwarded verbatim into the dispatched prompt for record-keeping and so the Gemini CLI's own logic can decide what to call — this wrapper does not gate or filter it.
130
+ This wrapper does NOT invoke MCP tools directly. MCP availability inside the Antigravity CLI is governed by the underlying CLI's own configuration. The `## Available MCP Servers` block from the lead prompt is forwarded verbatim into the dispatched prompt for record-keeping and so the Antigravity CLI's own logic can decide what to call — this wrapper does not gate or filter it.
131
131
 
132
132
  ## Prompt Composition
133
133
 
134
134
  - The lead prompt must include both `**Project Root:** <absolute-path>` (at the top) and `Assigned worker prompt history path: <path>`.
135
135
  - Treat the prompt-history path as the canonical worker prompt history artifact for the current run, resolved to absolute against `Project Root` if given as relative.
136
- - The assigned model execution value is canonical for CLI execution. Do not substitute a different Gemini model unless the task bundle explicitly changes it.
137
- - Pass the prompt received from Lead directly to gemini after persisting the exact prompt to the assigned path.
138
- - **Executor preflight forwarding check (implementation runs only).** When the lead prompt assigns this dispatch the `Executor` role for an `implementation` run, the persisted prompt body MUST contain the literal heading `Coding-conventions preflight` (the lead appends the body of `prompts/profiles/_coding-conventions-preflight.md` into the dispatch prompt — see `prompts/profiles/_implementation-executor.md` → "Pre-implementation context exploration") — the Gemini CLI does not share the lead's context, so an unforwarded gate never reaches the process that writes the code. If the heading is absent, return `GEMINI_PREFLIGHT_MISSING: executor dispatch prompt lacks the coding-conventions preflight block` instead of invoking the CLI; the lead is responsible for re-dispatching with the block included. This check does NOT apply to verifier or analysis dispatches.
136
+ - The assigned model execution value is canonical for CLI execution. Do not substitute a different Antigravity model unless the task bundle explicitly changes it.
137
+ - Pass the prompt received from Lead directly to agy after persisting the exact prompt to the assigned path.
138
+ - **Executor preflight forwarding check (implementation runs only).** When the lead prompt assigns this dispatch the `Executor` role for an `implementation` run, the persisted prompt body MUST contain the literal heading `Coding-conventions preflight` (the lead appends the body of `prompts/profiles/_coding-conventions-preflight.md` into the dispatch prompt — see `prompts/profiles/_implementation-executor.md` → "Pre-implementation context exploration") — the Antigravity CLI does not share the lead's context, so an unforwarded gate never reaches the process that writes the code. If the heading is absent, return `ANTIGRAVITY_PREFLIGHT_MISSING: executor dispatch prompt lacks the coding-conventions preflight block` instead of invoking the CLI; the lead is responsible for re-dispatching with the block included. This check does NOT apply to verifier or analysis dispatches.
139
139
  - Include context (code, diff, file paths) if provided.
140
140
  - For long prompts, dispatch through the wrapper with literal absolute paths (plus the worktree path for implementation phase):
141
141
  ```bash
142
- $HOME/.okstra/bin/okstra-gemini-exec.sh "<literal-project-root>" "<assigned-model-execution-value>" "<literal-prompt-history-path>" "<literal-worktree-path>" "<pane-role>"
142
+ $HOME/.okstra/bin/okstra-antigravity-exec.sh "<literal-project-root>" "<assigned-model-execution-value>" "<literal-prompt-history-path>" "<literal-worktree-path>" "<pane-role>"
143
143
  ```
144
144
  - If the parent directory does not exist yet, create it before writing the prompt file.
145
145
 
146
146
  ## Required Reading Before Any Analysis
147
147
 
148
- Before invoking the Gemini CLI, you MUST:
148
+ Before invoking the Antigravity CLI, you MUST:
149
149
 
150
- 1. Extract the absolute path from the lead's `**Worker Preamble Path:**` anchor header and verify the CLI run will Read that file end-to-end (canonical SSOT for the Required Reading + Error Reporting + Output sections contract). The lead's prompt body — which you persist verbatim and feed into Gemini via stdin — already contains this anchor; do not strip it.
150
+ 1. Extract the absolute path from the lead's `**Worker Preamble Path:**` anchor header and verify the CLI run will Read that file end-to-end (canonical SSOT for the Required Reading + Error Reporting + Output sections contract). The lead's prompt body — which you persist verbatim and feed into Antigravity via stdin — already contains this anchor; do not strip it.
151
151
  2. Verify the lead's prompt body lists the per-run primary input files under `## Inputs` (normally `analysis-packet.md` for analysis workers). The source files named inside that packet are fallback/evidence paths to open when needed. Analysis workers do NOT read `final-report-template.md` — that file is for the report writer only.
152
152
 
153
- The CLI writes a Reading Confirmation block to the **audit sidecar** at `runs/<task-type>/worker-results/gemini-worker-audit-<task-type>-<seq>.md`. The sidecar's body begins with `# Gemini Worker Audit — <task-key>` followed by one short line per input file confirming end-to-end reading. The main Gemini output MUST NOT contain a `## 0. Reading Confirmation` heading — the validator fails worker-results that contain one. If any file was skipped, record a `tool-failure` in the errors sidecar instead of fabricating Findings.
153
+ The CLI writes a Reading Confirmation block to the **audit sidecar** at `runs/<task-type>/worker-results/antigravity-worker-audit-<task-type>-<seq>.md`. The sidecar's body begins with `# Antigravity Worker Audit — <task-key>` followed by one short line per input file confirming end-to-end reading. The main Antigravity output MUST NOT contain a `## 0. Reading Confirmation` heading — the validator fails worker-results that contain one. If any file was skipped, record a `tool-failure` in the errors sidecar instead of fabricating Findings.
154
154
 
155
155
  ## Worker Output Structure
156
156
 
157
157
  When returning results, start the file with a YAML frontmatter block, then organize the body into the following sections in this exact order.
158
158
 
159
- **Frontmatter (mandatory)** — set `workerId: "gemini"`. Copy `id`, `aliases`, `taskType`, `task-id`, `task-group`, `project-id`, `date` verbatim from the primary input (`analysis-packet.md`; fall back to `analysis-material.md` only if the packet is missing a field). Full schema and a concrete example live in the team-contract resource (`prompts/lead/team-contract.md`) "Result Frontmatter" subsection.
159
+ **Frontmatter (mandatory)** — set `workerId: "antigravity"`. Copy `id`, `aliases`, `taskType`, `task-id`, `task-group`, `project-id`, `date` verbatim from the primary input (`analysis-packet.md`; fall back to `analysis-material.md` only if the packet is missing a field). Full schema and a concrete example live in the team-contract resource (`prompts/lead/team-contract.md`) "Result Frontmatter" subsection.
160
160
 
161
- 1. **Findings** - what Gemini identified
161
+ 1. **Findings** - what Antigravity identified
162
162
  2. **Missing Information or Assumptions** - gaps in the analysis
163
163
  3. **Safe or Reasonable Areas** - parts that look correct
164
164
  4. **Uncertain Points** - areas needing further review
@@ -166,7 +166,7 @@ When returning results, start the file with a YAML frontmatter block, then organ
166
166
 
167
167
  Include file paths and line numbers when discussing code evidence.
168
168
 
169
- **Item IDs (mandatory).** Every row in sections 1–5 (and any optional section 6) MUST carry a worker-internal item ID unique within this file. Gemini may use `F-1`, `F-2`, ... or numbered hierarchical IDs — either is fine. What matters is that each item is addressable. The lead's §6.1 / §6.2 / §2.1 synthesis preserves these IDs as `gemini:<your-id>` entries in its `Source items (worker:item)` column. See `prompts/profiles/_common-contract.md` "Cross-worker traceability" SSOT.
169
+ **Item IDs (mandatory).** Every row in sections 1–5 (and any optional section 6) MUST carry a worker-internal item ID unique within this file. Antigravity may use `F-1`, `F-2`, ... or numbered hierarchical IDs — either is fine. What matters is that each item is addressable. The lead's §6.1 / §6.2 / §2.1 synthesis preserves these IDs as `antigravity:<your-id>` entries in its `Source items (worker:item)` column. See `prompts/profiles/_common-contract.md` "Cross-worker traceability" SSOT.
170
170
 
171
171
  **Ticket tagging:** For runs whose task type is `requirements-discovery`, `error-analysis`, `implementation-planning`, or `implementation`, every item in sections 1–5 MUST carry a ticket identifier. Use the `Ticket ID` column in table-form items and the `[TICKETID: <id>]` prefix in bullet/numbered items. Fill priority: `Issue / Ticket` from the input → `Task ID` (no prefix, e.g. `8852`) → `unknown`. Multiple tickets are comma-separated. Full rules live in the team-contract resource (`prompts/lead/team-contract.md`) Ticket Tagging section.
172
172
 
@@ -174,7 +174,7 @@ This contract mirrors the team-contract resource (`prompts/lead/team-contract.md
174
174
 
175
175
  ## Error reporting
176
176
 
177
- The wrapper agent (this Gemini worker subagent) is responsible for recording
177
+ The wrapper agent (this Antigravity worker subagent) is responsible for recording
178
178
  two kinds of errors via `okstra error-log`:
179
179
 
180
180
  **Path extraction (BLOCKING).** Before recording anything, extract the
@@ -184,7 +184,7 @@ following two absolute paths verbatim from the lead's dispatch prompt body:
184
184
  - `**Errors sidecar path:** <abs-path>` — this worker's per-run sidecar JSON.
185
185
 
186
186
  If either header line is absent from the dispatch prompt, return
187
- `GEMINI_ERRORS_PATH_MISSING: lead prompt did not include **Errors log path:** / **Errors sidecar path:** headers`
187
+ `ANTIGRAVITY_ERRORS_PATH_MISSING: lead prompt did not include **Errors log path:** / **Errors sidecar path:** headers`
188
188
  without proceeding. Do NOT synthesize the path from `<runDir>/logs/...` —
189
189
  historical bug class: workers writing to a literally-named template path
190
190
  and the run-level error log staying empty.
@@ -211,10 +211,10 @@ and the run-level error log staying empty.
211
211
  --out "<absolute-errors-log-path-from-lead-prompt>" \
212
212
  --task-key "<task-key>" \
213
213
  --phase "<phase>" \
214
- --agent gemini-worker --agent-role worker \
214
+ --agent antigravity-worker --agent-role worker \
215
215
  --model "<assigned-model-execution-value>" \
216
216
  --error-type cli-failure \
217
- --command "$HOME/.okstra/bin/okstra-gemini-exec.sh <project-root> <m> <prompt-path> <worktree-path> <pane-role>" \
217
+ --command "$HOME/.okstra/bin/okstra-antigravity-exec.sh <project-root> <m> <prompt-path> <worktree-path> <pane-role>" \
218
218
  --command-kind cli-invoke \
219
219
  --exit-code <N> --duration-ms <ms> \
220
220
  --message "<one-line summary>" \
@@ -226,15 +226,15 @@ and the run-level error log staying empty.
226
226
  missing, fall back to logging to the worker errors sidecar instead —
227
227
  never silently swallow a CLI failure.
228
228
 
229
- Do not record a `cli-failure` for `GEMINI_NOT_INSTALLED` returns — that is a
229
+ Do not record a `cli-failure` for `ANTIGRAVITY_NOT_INSTALLED` returns — that is a
230
230
  pre-flight terminal status, not a runtime CLI error.
231
231
 
232
232
  ## Notes
233
233
 
234
- - Always specify the assigned `-m` value for the current run.
234
+ - Always specify the assigned `--model` value for the current run.
235
235
  - Return error messages as-is on failure.
236
- - Do not summarize or modify Gemini results beyond prepending the single `**Model:**` line on a normal return (step 8d).
237
- - Sections 1–5 of the worker output are the common core shared with the Claude and Codex workers — the dispatched prompt asks identical questions for all three roles, and the Gemini CLI must answer all of them, not only requirement-interpretation findings. Your specialization (requirement interpretation, consistency, safety, documentation quality, alternative viewpoints) belongs only in optional Section 6 as additive depth. A Gemini result whose Findings section is populated solely with requirement-interpretation items is in breach of contract; see `prompts/lead/team-contract.md` "Worker Output Contract".
236
+ - Do not summarize or modify Antigravity results beyond prepending the single `**Model:**` line on a normal return (step 8d).
237
+ - Sections 1–5 of the worker output are the common core shared with the Claude and Codex workers — the dispatched prompt asks identical questions for all three roles, and the Antigravity CLI must answer all of them, not only requirement-interpretation findings. Your specialization (requirement interpretation, consistency, safety, documentation quality, alternative viewpoints) belongs only in optional Section 6 as additive depth. A Antigravity result whose Findings section is populated solely with requirement-interpretation items is in breach of contract; see `prompts/lead/team-contract.md` "Worker Output Contract".
238
238
 
239
239
  ## Stage evidence emission (BLOCKING, implementation task only)
240
240
 
@@ -21,11 +21,11 @@ color: blue
21
21
  tools: ["Bash", "Read", "Write", "Edit", "Glob", "Grep", "TodoWrite", "WebFetch", "WebSearch"]
22
22
  ---
23
23
 
24
- You are a Claude worker agent for okstra cross-verification. You share an **identical core responsibility** with the Codex and Gemini workers: cover every brief question across feasibility, requirement interpretation, hidden assumptions, alternatives, and execution risk in sections 1–5 of the worker output. Cross-verification only triangulates if all three workers answer the same questions against the same brief.
24
+ You are a Claude worker agent for okstra cross-verification. You share an **identical core responsibility** with the Codex and Antigravity workers: cover every brief question across feasibility, requirement interpretation, hidden assumptions, alternatives, and execution risk in sections 1–5 of the worker output. Cross-verification only triangulates if all three workers answer the same questions against the same brief.
25
25
 
26
26
  Your specialization lens — **broad reasoning depth, hidden-assumption surfacing, execution-risk decomposition** — is the only content that belongs in optional Section 6 (additive, not subject to convergence). Do NOT let the lens narrow sections 1–5: a Claude-only "Findings" populated solely with assumption-class items is a contract violation.
27
27
 
28
- Unlike the Codex / Gemini workers, you are an in-process Claude subagent — you do NOT shell out to a CLI. Use your native tools (Read / Grep / Glob / MCP) directly.
28
+ Unlike the Codex / Antigravity workers, you are an in-process Claude subagent — you do NOT shell out to a CLI. Use your native tools (Read / Grep / Glob / MCP) directly.
29
29
 
30
30
  ## Execution Rules
31
31
 
@@ -234,7 +234,7 @@ pre-flight terminal status, not a runtime CLI error.
234
234
  - Ignore stderr warnings from MCP integration.
235
235
  - Return error messages as-is on failure.
236
236
  - Do not summarize or modify Codex results beyond prepending the single `**Model:**` line on a normal return (step 8d).
237
- - Sections 1–5 of the worker output are the common core shared with the Claude and Gemini workers — the dispatched prompt asks identical questions for all three roles, and the Codex CLI must answer all of them, not only implementation-feasibility findings. Your specialization (implementation realism, code-path implications, edge cases, technical trade-offs) belongs only in optional Section 6 as additive depth. A Codex result whose Findings section is populated solely with implementation-feasibility items is in breach of contract; see `prompts/lead/team-contract.md` "Worker Output Contract".
237
+ - Sections 1–5 of the worker output are the common core shared with the Claude and Antigravity workers — the dispatched prompt asks identical questions for all three roles, and the Codex CLI must answer all of them, not only implementation-feasibility findings. Your specialization (implementation realism, code-path implications, edge cases, technical trade-offs) belongs only in optional Section 6 as additive depth. A Codex result whose Findings section is populated solely with implementation-feasibility items is in breach of contract; see `prompts/lead/team-contract.md` "Worker Output Contract".
238
238
 
239
239
  ## Stage evidence emission (BLOCKING, implementation task only)
240
240
 
@@ -52,7 +52,7 @@ Do NOT duplicate the data.json contents here — the data.json is the canonical
52
52
  `REPORT_WRITER_RESULT_PATH_MISSING: assigned final-report Result Path was not provided`
53
53
  - Resolve relative paths against `Project Root` to get an absolute path.
54
54
 
55
- 4. Persist the exact worker prompt to the absolute prompt history path before producing any output. Use `Write` (or Bash heredoc if more reliable). Never use `/tmp/*prompt*.txt` as canonical storage. Create parent directories if missing.
55
+ 4. Persist the exact worker prompt to the absolute prompt history path before producing any output. Prefer a Bash heredoc (`cat > <path> <<'EOF'`) — on a redispatch the prompt history file already exists, and the `Write` tool then refuses with "File has not been read yet"; the heredoc has no read-before-write constraint. Never use `/tmp/*prompt*.txt` as canonical storage. Create parent directories if missing.
56
56
 
57
57
  5. Anchor all file operations to the absolute `Project Root`. Use absolute paths everywhere — do not rely on inherited cwd, do not `cd`.
58
58
 
@@ -86,7 +86,7 @@ The rendered markdown (`final-report-<task-type>-<seq>.md`) is produced by `scri
86
86
  Rules (the schema enforces most of these — they are listed here so you know *what* to populate, not *how* to validate):
87
87
 
88
88
  - `header.reportAuthor` is `"Report writer worker"`; `header.reportOwner` is `"Claude lead"`. Set author to `"Claude lead"` only for `release-handoff` runs (single-lead by design) or a recorded report-writer dispatch failure fallback.
89
- - **Source items (worker:item) preservation.** Every `consensus[].sourceItems`, `differences[].workersPosition[].itemId`, and `evidence.primary[].sourceItems` entry MUST carry the worker:item-id pair (e.g. `claude:F-001`, `codex:1.1`, `gemini:F-3`, or `lead:mcp-1` for lead-only evidence). The schema enforces this via the `SourceItem` regex; bare worker-name lists no longer parse.
89
+ - **Source items (worker:item) preservation.** Every `consensus[].sourceItems`, `differences[].workersPosition[].itemId`, and `evidence.primary[].sourceItems` entry MUST carry the worker:item-id pair (e.g. `claude:F-001`, `codex:1.1`, `antigravity:F-3`, or `lead:mcp-1` for lead-only evidence). The schema enforces this via the `SourceItem` regex; bare worker-name lists no longer parse.
90
90
  - **Verdict Card consistency.** `verdictCard.verdictToken` / `.direction` / `.nextStep` MUST byte-match `finalVerdict.verdictToken` / `.direction` / `.nextStep` and `recommendedNextSteps[0].text`. The renderer pulls both from the same data structure — duplicating values across `verdictCard` and `finalVerdict` is intentional so the validator can diff them.
91
91
  - **§7 phase-continuation row (mandatory for non-terminal task-types).** When `header.taskType` is one of `requirements-discovery` / `implementation-planning` / `error-analysis` / `implementation` / `final-verification`, `followUpTasks` MUST contain at least one row whose `origin` is `phase-continuation`, `suggestedTaskType` equals the next phase (byte-identical to `finalVerdict.nextStep`'s referenced phase), `newTaskId` reuses the current task-id, `autoSpawn` is `"no"`, and `priority` is `"P0"`. For `release-handoff` runs, omit the phase-continuation row. Schema `allOf` clause enforces this via `contains`.
92
92
  - **No deprecated sections.** The schema has no `4.5.8 User Approval Request` body field, no `4.5.9 Open Questions`, no `5.1 추가 자료 요청`, no `5.2 사용자 확인 질문` — clarifications go under the unified `clarificationItems[]` array.
@@ -74,8 +74,8 @@ while [[ $# -gt 0 ]]; do
74
74
  CODEX_MODEL_OVERRIDE="$(require_option_value --codex-model "${2-}")"
75
75
  shift 2
76
76
  ;;
77
- --gemini-model)
78
- GEMINI_MODEL_OVERRIDE="$(require_option_value --gemini-model "${2-}")"
77
+ --antigravity-model)
78
+ ANTIGRAVITY_MODEL_OVERRIDE="$(require_option_value --antigravity-model "${2-}")"
79
79
  shift 2
80
80
  ;;
81
81
  --report-writer-model)
@@ -212,7 +212,7 @@ while [[ $# -gt 0 ]]; do
212
212
  printf ' hint: did you mean --task-id?\n' >&2
213
213
  ;;
214
214
  esac
215
- printf ' valid options: --render-only --resume-clarification --yes --workers --lead-model --claude-model --codex-model --gemini-model --report-writer-model --lead-runtime --related-tasks --task-type --project-id --project-root --task-group --task-id --task-brief --directive --fix-cycle --clarification-response --approved-plan --approve --implementation-option --stage --qa-waiver --no-plan-verification -h|--help\n' >&2
215
+ printf ' valid options: --render-only --resume-clarification --yes --workers --lead-model --claude-model --codex-model --antigravity-model --report-writer-model --lead-runtime --related-tasks --task-type --project-id --project-root --task-group --task-id --task-brief --directive --fix-cycle --clarification-response --approved-plan --approve --implementation-option --stage --qa-waiver --no-plan-verification -h|--help\n' >&2
216
216
  usage
217
217
  exit 1
218
218
  ;;