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,162 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # okstra.sh — thin wrapper around python `okstra_ctl.run.prepare_task_bundle`.
4
+ #
5
+ # 책임 분할:
6
+ # - 이 bash 파일: CLI 인자 파싱 / interactive prompt / confirm-execution-plan /
7
+ # resume-clarification 모드 / 최종 `exec claude` 만 담당. 산출물 생성 로직
8
+ # (path 계산, render, manifest, central record_start) 은 일절 보유하지 않는다.
9
+ # - python `okstra_ctl.run.prepare_task_bundle()`: identity / brief / 모델 /
10
+ # 워커 / phase 규칙 / 9개 render / record_start 까지의 단일 진입점.
11
+ #
12
+ # 같은 prepare 함수를 `okstra-run` skill 도 직접 호출하므로 두 caller 가 공유한
13
+ # 단일 권위가 보존된다 (rule-of-two).
14
+
15
+ set -euo pipefail
16
+
17
+ SOURCE_PATH="${BASH_SOURCE[0]}"
18
+ while [[ -L "$SOURCE_PATH" ]]; do
19
+ SOURCE_DIR="$(cd -P "$(dirname "$SOURCE_PATH")" && pwd)"
20
+ SOURCE_PATH="$(readlink "$SOURCE_PATH")"
21
+ [[ "$SOURCE_PATH" != /* ]] && SOURCE_PATH="$SOURCE_DIR/$SOURCE_PATH"
22
+ done
23
+
24
+ SCRIPT_DIR="$(cd -P "$(dirname "$SOURCE_PATH")" && pwd)"
25
+ WORKSPACE_ROOT="$(cd -P "$SCRIPT_DIR/.." && pwd)"
26
+
27
+ # CLI parsing + interactive prompt 만 source. 나머지 lib/okstra/*.sh 는 더 이상
28
+ # 직접 호출되지 않는다 (python 모듈이 권위).
29
+ # shellcheck disable=SC1090
30
+ source "$SCRIPT_DIR/lib/okstra/globals.sh"
31
+ # shellcheck disable=SC1090
32
+ source "$SCRIPT_DIR/lib/okstra/usage.sh"
33
+ # shellcheck disable=SC1090
34
+ source "$SCRIPT_DIR/lib/okstra/cli.sh"
35
+ # shellcheck disable=SC1090
36
+ source "$SCRIPT_DIR/lib/okstra/interactive.sh"
37
+ # shellcheck disable=SC1090
38
+ source "$SCRIPT_DIR/lib/okstra/project-resolver.sh"
39
+
40
+ okstra_py() {
41
+ PYTHONPATH="$WORKSPACE_ROOT/scripts:${PYTHONPATH-}" python3 "$@"
42
+ }
43
+
44
+ parse_cli_arguments "$@"
45
+ split_task_key
46
+
47
+ PROJECT_ROOT="$(resolve_project_root_safe "$PROJECT_ROOT_OVERRIDE")"
48
+ if [[ "$RESUME_CLARIFICATION_MODE" == "true" ]]; then
49
+ if [[ -z "$PROJECT_ROOT" ]]; then
50
+ PROJECT_ROOT="$(resolve_project_root_strict "$PROJECT_ROOT_OVERRIDE")" \
51
+ || { printf 'resume-clarification: %s\n' "$PROJECT_ROOT" >&2; exit 1; }
52
+ fi
53
+ run_resume_clarification
54
+ exit 0
55
+ fi
56
+ autofill_from_manifest
57
+ collect_required_arguments
58
+
59
+ if [[ -z "$PROJECT_ROOT" ]]; then
60
+ if ! PROJECT_ROOT="$(resolve_project_root_strict "$PROJECT_ROOT_OVERRIDE")"; then
61
+ exit 1
62
+ fi
63
+ fi
64
+
65
+ # Interactive 모드의 confirm prompt. 입력값만 보여주고 진행 여부를 묻는다 —
66
+ # 산출물 경로 계산은 python 으로 미루므로 이 단계에서 디스크에 쓰지 않는다.
67
+ if [[ "$ASSUME_YES" != "true" ]] && [[ -t 0 ]] && [[ -t 1 ]]; then
68
+ cat >&2 <<CONFIRM_EOF
69
+ okstra execution summary:
70
+ render only: ${RENDER_ONLY}
71
+ task type: ${ANALYSIS_TYPE}
72
+ project id: ${PROJECT_ID}
73
+ project root: ${PROJECT_ROOT}
74
+ task group: ${TASK_GROUP}
75
+ task id: ${TASK_ID}
76
+ task brief: ${BRIEF_PATH}
77
+ directive: ${DIRECTIVE:-None}
78
+ clarification response: ${CLARIFICATION_RESPONSE_PATH:-None}
79
+ workers override: ${WORKERS_OVERRIDE:-None}
80
+ approved plan: ${APPROVED_PLAN_PATH:-None}
81
+ related tasks: ${RELATED_TASKS_RAW:-None}
82
+ CONFIRM_EOF
83
+ printf 'Continue? [y/yes]: ' >&2
84
+ if ! IFS= read -r _confirmation; then
85
+ printf 'confirmation cancelled\n' >&2
86
+ exit 1
87
+ fi
88
+ _confirmation="$(printf '%s' "$_confirmation" | tr '[:upper:]' '[:lower:]')"
89
+ _confirmation="${_confirmation#"${_confirmation%%[![:space:]]*}"}"
90
+ _confirmation="${_confirmation%"${_confirmation##*[![:space:]]}"}"
91
+ if [[ "$_confirmation" != "y" && "$_confirmation" != "yes" ]]; then
92
+ printf 'okstra cancelled before execution\n' >&2
93
+ exit 1
94
+ fi
95
+ fi
96
+
97
+ # Build python argv and invoke prepare_task_bundle.
98
+ PY_ARGS=(
99
+ --workspace-root "$WORKSPACE_ROOT"
100
+ --project-root "$PROJECT_ROOT"
101
+ --project-id "$PROJECT_ID"
102
+ --task-group "$TASK_GROUP"
103
+ --task-id "$TASK_ID"
104
+ --task-type "$ANALYSIS_TYPE"
105
+ --task-brief "$BRIEF_PATH"
106
+ )
107
+ [[ -n "${DIRECTIVE-}" ]] && PY_ARGS+=(--directive "$DIRECTIVE")
108
+ [[ -n "${WORKERS_OVERRIDE-}" ]] && PY_ARGS+=(--workers "$WORKERS_OVERRIDE")
109
+ [[ -n "${LEAD_MODEL_OVERRIDE-}" ]] && PY_ARGS+=(--lead-model "$LEAD_MODEL_OVERRIDE")
110
+ [[ -n "${CLAUDE_MODEL_OVERRIDE-}" ]] && PY_ARGS+=(--claude-model "$CLAUDE_MODEL_OVERRIDE")
111
+ [[ -n "${CODEX_MODEL_OVERRIDE-}" ]] && PY_ARGS+=(--codex-model "$CODEX_MODEL_OVERRIDE")
112
+ [[ -n "${GEMINI_MODEL_OVERRIDE-}" ]] && PY_ARGS+=(--gemini-model "$GEMINI_MODEL_OVERRIDE")
113
+ [[ -n "${REPORT_WRITER_MODEL_OVERRIDE-}" ]] && PY_ARGS+=(--report-writer-model "$REPORT_WRITER_MODEL_OVERRIDE")
114
+ [[ -n "${RELATED_TASKS_RAW-}" ]] && PY_ARGS+=(--related-tasks "$RELATED_TASKS_RAW")
115
+ [[ -n "${APPROVED_PLAN_PATH-}" ]] && PY_ARGS+=(--approved-plan "$APPROVED_PLAN_PATH")
116
+ [[ -n "${CLARIFICATION_RESPONSE_PATH-}" ]] && PY_ARGS+=(--clarification-response "$CLARIFICATION_RESPONSE_PATH")
117
+ [[ "$RENDER_ONLY" == "true" ]] && PY_ARGS+=(--render-only)
118
+ [[ "$REFRESH_OKSTRA_ASSETS" == "true" ]] && PY_ARGS+=(--refresh-assets)
119
+
120
+ if [[ "$RENDER_ONLY" == "true" ]]; then
121
+ okstra_py -m okstra_ctl.run "${PY_ARGS[@]}"
122
+ exit 0
123
+ fi
124
+
125
+ # Non-render-only: capture summary + launch JSON, then exec claude.
126
+ PREPARE_OUTPUT="$(okstra_py -m okstra_ctl.run "${PY_ARGS[@]}")"
127
+ PY_RC=$?
128
+ if [[ $PY_RC -ne 0 ]]; then
129
+ printf '%s\n' "$PREPARE_OUTPUT"
130
+ exit $PY_RC
131
+ fi
132
+
133
+ # Display summary lines to user (everything except the machine-readable line).
134
+ printf '%s\n' "$PREPARE_OUTPUT" | grep -v '^__OKSTRA_LAUNCH__ '
135
+
136
+ if ! command -v claude >/dev/null 2>&1; then
137
+ printf 'claude command not found\n' >&2
138
+ exit 1
139
+ fi
140
+
141
+ # Parse launch JSON and exec claude.
142
+ LAUNCH_JSON="$(printf '%s\n' "$PREPARE_OUTPUT" | sed -n 's/^__OKSTRA_LAUNCH__ //p' | tail -n1)"
143
+ if [[ -z "$LAUNCH_JSON" ]]; then
144
+ printf 'okstra: prepare_task_bundle did not emit launch metadata\n' >&2
145
+ exit 1
146
+ fi
147
+
148
+ # Read fields via python (jq not assumed available).
149
+ read -r CLAUDE_SESSION_ID LEAD_MODEL_EXECUTION_VALUE PROJECT_ROOT_FROM_PY OKSTRA_RUNTIME_SETTINGS_FILE PROMPT_FILE < <(
150
+ okstra_py - "$LAUNCH_JSON" <<'PY'
151
+ import json, sys
152
+ d = json.loads(sys.argv[1])
153
+ print(d["claudeSessionId"], d["leadModelExecutionValue"], d["projectRoot"], d["runtimeSettingsFile"], d["promptFile"])
154
+ PY
155
+ )
156
+
157
+ PROMPT="$(cat "$PROMPT_FILE")"
158
+ cd "$PROJECT_ROOT_FROM_PY"
159
+ CLAUDE_COMMAND=(claude --model "$LEAD_MODEL_EXECUTION_VALUE" --session-id "$CLAUDE_SESSION_ID")
160
+ [[ -n "$OKSTRA_RUNTIME_SETTINGS_FILE" ]] && CLAUDE_COMMAND+=(--settings "$OKSTRA_RUNTIME_SETTINGS_FILE")
161
+ CLAUDE_COMMAND+=("$PROMPT")
162
+ exec "${CLAUDE_COMMAND[@]}"
@@ -0,0 +1,52 @@
1
+ # okstra — {{TASK_KEY}}
2
+
3
+ You are `Claude lead` for project `{{PROJECT_ID}}`.
4
+ Invoke the `okstra` skill now. Read the manifests below for all task metadata, paths, model assignments, and worker roster.
5
+
6
+ ## Current Phase Boundary
7
+
8
+ - Current lifecycle phase: `{{WORKFLOW_CURRENT_PHASE}}`
9
+ - Allowed outputs in this phase:
10
+ {{PHASE_ALLOWED_OUTPUTS}}
11
+ - Forbidden actions in this phase:
12
+ {{PHASE_FORBIDDEN_ACTIONS}}
13
+ - This run executes `{{WORKFLOW_CURRENT_PHASE}}` only. Do not start `{{WORKFLOW_NEXT_RECOMMENDED_PHASE}}` or any later phase inside this run, even if the user says "다음 단계 진행해" or similar.
14
+ - Phase advancement requires a new okstra invocation launched with `--task-type {{WORKFLOW_NEXT_RECOMMENDED_PHASE}}` after this run's final report is written and approved. The lead must not write source code, run builds/migrations/deployments, or otherwise produce artifacts of a different phase from inside this run.
15
+ - See `Lifecycle Phase Boundaries` in the okstra skill (`agents/SKILL.md`) for the canonical rules and the phase-transition checklist.
16
+
17
+ ## Project Root
18
+
19
+ - Absolute project root: `{{PROJECT_ROOT}}`
20
+ - All other paths in this prompt are relative to this root unless they begin with `/`.
21
+ - When dispatching workers, you MUST include this absolute root in every worker prompt header so that workers do not depend on inherited cwd to resolve relative paths.
22
+
23
+ ## Manifests
24
+
25
+ - Task manifest: `{{TASK_MANIFEST_RELATIVE_PATH}}`
26
+ - Run manifest: `{{RUN_MANIFEST_RELATIVE_PATH}}`
27
+
28
+ ## Session
29
+
30
+ - Session ID: `{{CLAUDE_SESSION_ID}}`
31
+ - Resume: `{{CLAUDE_RESUME_COMMAND_RELATIVE_PATH}}`
32
+
33
+ ## Run Paths
34
+
35
+ - Team state: `{{TEAM_STATE_RELATIVE_PATH}}`
36
+ - Final report: `{{FINAL_REPORT_RELATIVE_PATH}}`
37
+ - Final status: `{{FINAL_STATUS_RELATIVE_PATH}}`
38
+ - Validator: `{{RUN_VALIDATOR_RELATIVE_PATH}}`
39
+
40
+ ## Available MCP Servers
41
+
42
+ - The user-scope MCP registration exposes read-only MySQL servers for the local Docker container: `mcp__mysql-fontsninja-common`, `mcp__mysql-fontsninja-fontradar`, `mcp__mysql-fontsninja-fontsninja`, `mcp__mysql-fontsninja-fonthelper`. Tools per server: `mysql_list_tables`, `mysql_describe_table`, `mysql_select_data` (max 1000 rows; write tools are server-disabled).
43
+ - The full usage policy and per-phase rules live in the task brief's `## Available MCP Servers` section. Read them there before dispatching workers and **forward that section verbatim into every worker prompt** during Phase 2 so workers know they are allowed to call these tools.
44
+ - **Invocation rule (forward to every worker prompt)**: MCP tools are addressed by their tool name through the host's tool interface — **never via `Bash`**. Claude-side workers call the tool directly (e.g. `mcp__mysql-fontsninja-fontsninja__mysql_list_tables`). Codex/Gemini workers call through their CLI's own MCP transport (e.g. `codex mcp call ...`). Running the tool name as a shell command is a contract violation and will always fail regardless of permission grants.
45
+ - Codex worker and Gemini worker run external CLIs; they can only use these MCP servers if their own CLI configs mirror them. If not, instruct the worker to record `MCP not available in this CLI` in its `Missing Information or Assumptions` block rather than guessing or shell-falling-back.
46
+ - MCP queries are evidence-grade. Cite server, table, and the SELECT used in worker output. MCP must NOT be used as a write path in any phase, including `implementation`.
47
+
48
+ ## Clarification Response Carried In
49
+
50
+ - Source path: `{{CLARIFICATION_RESPONSE_RELATIVE_PATH}}`
51
+ - If the source path above is empty, no prior clarification response was attached to this run.
52
+ - If the source path is set, a copy is staged at `{{INSTRUCTION_SET_RELATIVE_PATH}}/clarification-response.md`. Read it before running workers; reconcile each `Q*` row in section 5 of the prior report against new evidence and record the outcome in section 0 of this run's final report.
@@ -0,0 +1,43 @@
1
+ # Error Analysis Profile
2
+
3
+ - Purpose: analyse reported errors or incidents and identify likely causes, missing evidence, and validation paths
4
+ - Required workers:
5
+ - claude
6
+ - codex
7
+ - gemini
8
+ - report-writer
9
+ - Team contract:
10
+ - `Claude lead` is synthesis-only and stays distinct from `Claude worker`
11
+ - required worker roles are `Claude worker`, `Codex worker`, `Gemini worker`, and `Report writer worker`
12
+ - `Report writer worker` is the **author** of the final-report file; `Claude lead` reviews and approves the produced draft and does NOT write the file itself (see `okstra-team-contract` and `okstra-report-writer` for the authoritative contract)
13
+ - default model assignments are resolved from centralized defaults; the fallback values are `Claude lead`/`Report writer worker`=`opus`, `Claude worker`=`sonnet`, `Codex worker`=`gpt-5.5`, `Gemini worker`=`auto`
14
+ - `Gemini worker` must always be attempted for this workflow
15
+ - the final verdict waits until each required worker has either a result or an explicit terminal status
16
+ - unnamed generic parallel workers must not replace the required role roster
17
+ - Tooling — read-only MCP availability:
18
+ - `mcp__mysql-fontsninja-{common,fontradar,fontsninja,fonthelper}` (tools: `mysql_list_tables`, `mysql_describe_table`, `mysql_select_data`) may be queried to confirm symptoms against live schema or to inspect rows that reproduce the failure; the canonical usage policy is in the task brief's `## Available MCP Servers` section, and any MCP-derived hypothesis MUST cite server, table, and the SELECT used
19
+ - Primary focus areas:
20
+ - symptom and trigger clarification
21
+ - root-cause candidates
22
+ - reproduction gaps
23
+ - config files or deployment manifests that violate recorded expected values
24
+ - misleading assumptions in prior analysis
25
+ - validation and rollback risk
26
+ - Expected output emphasis:
27
+ - evidence-backed cause analysis
28
+ - uncertainty boundaries
29
+ - practical next diagnostic steps
30
+ - Clarification request policy:
31
+ - if any blocking uncertainty remains at the time of writing the final report, populate `## 5. Clarification Requests for the Next Run` in `final-report-template.md`
32
+ - section 5 must be split into two distinct sub-sections per the template — `5.1 추가 자료 요청 (Additional Materials Requested)` for files/logs/screenshots the user must attach, and `5.2 사용자 확인 질문 (Questions for the User)` for decisions or facts only the user can confirm. Never mix material requests and decision questions in the same row or list.
33
+ - write every entry in full, descriptive sentences that a non-developer can act on without further context. Avoid abbreviations and internal jargon (e.g. write "초당 평균 요청 수" instead of "QPS", "재현 절차" instead of "repro"). For each material request, state *why* it is needed, *where* the user can find it, and *where* to place it. For each question, state *why* the answer changes the next step, *what* is being asked in a complete sentence, and *what shape of answer* is expected (예/아니오, 보기 중 하나, 숫자/날짜, 짧은 서술 등); supply concrete option choices when applicable.
34
+ - the same `final-report.md` file is the canonical artifact carried into the next run; the user appends answers inline before rerunning. The preferred turn-around is `okstra --resume-clarification --task-key <project-id>:<task-group>:<task-id>` (opens the latest report in `$EDITOR`, then auto-reruns the same phase with `--clarification-response` carry-in). The lower-level form `--clarification-response <path>` remains available for scripted runs.
35
+ - if a clarification response was carried in for this run, reconcile each prior `A*` (material) and `Q*` (question) row in section 0 and update its `Status` (`resolved`, `obsolete`) before deciding the verdict
36
+ - Authority & permissions assumption (HARD RULE — applies to every okstra task-type):
37
+ - **Assume the user (and their team) holds full authority and every permission required for the anticipated work.** Treat external approvals, third-party access grants, role/IAM permissions, organisational sign-off, legal/compliance review, vendor coordination, and "verify access exists" steps as already satisfied unless the user explicitly states otherwise in the task brief.
38
+ - Do NOT add such items to root-cause hypotheses, validation paths, missing-evidence lists, clarification questions, risk lists, or day/effort estimates. They are not legitimate sources of schedule extension.
39
+ - Internal okstra phase handoffs (e.g. the `User Approval Request` block in `implementation-planning`) are unaffected — those are the user themselves approving and proceed without external coordination.
40
+ - Non-goals:
41
+ - implementation details unless they are necessary to validate the cause
42
+ - **source code edits, builds, migrations, or deployments** — this run produces evidence and cause analysis only; the fix belongs to a later `implementation-planning` run followed by an `implementation` run
43
+ - treating "다음 단계 진행해" or equivalent user phrases as authorisation to begin planning or coding — this run stays in `error-analysis` regardless of such phrasing
@@ -0,0 +1,37 @@
1
+ # Final Verification Profile
2
+
3
+ - Purpose: analyse completed work and identify remaining defects, omissions, and delivery risk before final acceptance
4
+ - Required workers:
5
+ - claude
6
+ - codex
7
+ - gemini
8
+ - report-writer
9
+ - Team contract:
10
+ - `Claude lead` is synthesis-only and stays distinct from `Claude worker`
11
+ - required worker roles are `Claude worker`, `Codex worker`, `Gemini worker`, and `Report writer worker`
12
+ - `Report writer worker` is the **author** of the final-report file; `Claude lead` reviews and approves the produced draft and does NOT write the file itself (see `okstra-team-contract` and `okstra-report-writer` for the authoritative contract)
13
+ - default model assignments are resolved from centralized defaults; the fallback values are `Claude lead`/`Report writer worker`=`opus`, `Claude worker`=`sonnet`, `Codex worker`=`gpt-5.5`, `Gemini worker`=`auto`
14
+ - `Gemini worker` must always be attempted for this workflow
15
+ - the final verdict waits until each required worker has either a result or an explicit terminal status
16
+ - unnamed generic parallel workers must not replace the required role roster
17
+ - Tooling — read-only MCP availability:
18
+ - `mcp__mysql-fontsninja-{common,fontradar,fontsninja,fonthelper}` (tools: `mysql_list_tables`, `mysql_describe_table`, `mysql_select_data`) may be queried to verify that the delivered change matches the live schema, that expected rows exist after a migration, or that invariants in `reference-expectations.md` hold against the database; the canonical usage policy is in the task brief's `## Available MCP Servers` section, and any MCP-derived blocker MUST cite server, table, and the SELECT used. MCP MUST NOT be used to perform fixes — defects become inputs to a new run.
19
+ - Primary focus areas:
20
+ - requirement coverage
21
+ - whether delivered config files and deployment manifests satisfy the recorded expected values
22
+ - unresolved edge cases
23
+ - regression risk
24
+ - documentation or rollout gaps
25
+ - reasons the change may still fail in production
26
+ - Expected output emphasis:
27
+ - acceptance blockers
28
+ - residual risk
29
+ - final release recommendations
30
+ - Authority & permissions assumption (HARD RULE — applies to every okstra task-type):
31
+ - **Assume the user (and their team) holds full authority and every permission required for the delivered and follow-up work.** Treat external approvals, third-party access grants, role/IAM permissions, organisational sign-off, legal/compliance review, vendor coordination, and "verify access exists" steps as already satisfied unless the task brief explicitly states otherwise.
32
+ - Do NOT raise such items as acceptance blockers, residual risks, or release recommendations, and do not factor them into any effort/day estimate for follow-up runs. They are not legitimate sources of schedule extension.
33
+ - Non-goals:
34
+ - proposing unrelated refactors beyond the delivered scope
35
+ - **source code edits, follow-up bug fixes, or scope expansion** — this run renders a verdict only; defects detected here become inputs to a new `error-analysis` or `implementation-planning` run
36
+ - read-only execution of pre-existing test or validation commands is permitted, but any command that mutates source, schema, or deployment state is forbidden
37
+ - treating "다음 단계 진행해" or equivalent user phrases as authorisation to fix detected issues inside this run — record the issues and end the run
@@ -0,0 +1,85 @@
1
+ # Implementation Planning Profile
2
+
3
+ - Purpose: analyse requirements and propose a safe implementation direction before coding starts
4
+ - Required workers:
5
+ - claude
6
+ - codex
7
+ - gemini
8
+ - report-writer
9
+ - Team contract:
10
+ - `Claude lead` is synthesis-only and stays distinct from `Claude worker`
11
+ - required worker roles are `Claude worker`, `Codex worker`, `Gemini worker`, and `Report writer worker`
12
+ - `Report writer worker` is the **author** of the final-report file; `Claude lead` reviews and approves the produced draft and does NOT write the file itself (see `okstra-team-contract` and `okstra-report-writer` for the authoritative contract)
13
+ - default model assignments are resolved from centralized defaults; the fallback values are `Claude lead`/`Report writer worker`=`opus`, `Claude worker`=`sonnet`, `Codex worker`=`gpt-5.5`, `Gemini worker`=`auto`
14
+ - `Gemini worker` must always be attempted for this workflow
15
+ - the final verdict waits until each required worker has either a result or an explicit terminal status
16
+ - unnamed generic parallel workers must not replace the required role roster
17
+ - Tooling — read-only MCP availability:
18
+ - `mcp__mysql-fontsninja-{common,fontradar,fontsninja,fonthelper}` (tools: `mysql_list_tables`, `mysql_describe_table`, `mysql_select_data`) may be queried to size the blast radius of an option (table cardinality, column types, foreign-key fan-out, indexes), to validate migration assumptions, or to confirm that a proposed query shape returns the expected rows; the canonical usage policy is in the task brief's `## Available MCP Servers` section, and any MCP-derived figure entering the trade-off matrix or risk assessment MUST cite server, table, and the SELECT used. MCP MUST NOT be used as a write path even when planning a migration — schema changes belong in migration files reviewed by humans.
19
+ - Pre-planning context exploration (mandatory before option drafting):
20
+ - read the task brief, related-task briefs, and any cited spec / design doc end-to-end
21
+ - inspect the current state of every file the task names (or the closest matching files if names are stale) — record current responsibilities, public interfaces, and known coupling points
22
+ - skim recent commits touching those files (`git log -- <path>`) to surface in-flight work or contested areas
23
+ - flag any requirement that is ambiguous, contradictory, or missing success criteria — list these in the report's `Open Questions` block instead of guessing
24
+ - Primary focus areas:
25
+ - requirement gaps
26
+ - affected components and boundaries
27
+ - config files and deployment manifests that must change to reach the expected target state
28
+ - implementation options and trade-offs
29
+ - hidden dependency or migration risk
30
+ - validation and rollout approach
31
+ - Design principles applied when scoring options (borrowed from `brainstorming`):
32
+ - **Isolation & single responsibility**: each unit touched should have one clear purpose, well-defined interface, and be independently testable. Penalize options that widen a unit's responsibility.
33
+ - **Files that change together live together**: split by responsibility, not by technical layer. Penalize options that scatter one logical change across unrelated layers.
34
+ - **Follow established patterns**: in existing codebases, conform to current conventions. Targeted cleanup of a file you are already modifying is acceptable; unrelated refactors are not.
35
+ - **YAGNI ruthlessly**: drop features, abstractions, and configuration knobs that do not serve the stated requirement.
36
+ - Expected output emphasis:
37
+ - feasible plan options
38
+ - dependency and risk visibility
39
+ - recommended execution order
40
+ - Authority & permissions assumption (HARD RULE — applies to every okstra task-type):
41
+ - **Assume the user (and their team) holds full authority and every permission required for the anticipated work.** Treat external approvals, third-party access grants, role/IAM permissions, organisational sign-off, legal/compliance review, vendor coordination, and "verify access exists" steps as already satisfied unless the user explicitly states otherwise in the task brief.
42
+ - Do NOT add such items to option trade-offs, dependency/migration risk, validation checklists, rollout plans, `Open Questions`, or day/effort estimates. They are not legitimate sources of schedule extension; effort sizing must reflect engineering work only.
43
+ - The `User Approval Request` block at the end of the plan is the only authorised approval gate — that gate is the user themselves and is expected to be cleared without external coordination.
44
+ - Non-goals:
45
+ - code-level micro-optimization unless it changes the implementation approach
46
+ - **source code edits of any kind** — this run produces a plan document only; Edit/Write on project source files is forbidden until the plan is approved and a separate `implementation` run starts
47
+ - executing builds, migrations, deployments, or any command that mutates project state outside the run's own artifact directories (`reports/`, `prompts/`, `state/`, `manifests/`, `worker-results/`, `status/`, `sessions/`)
48
+ - treating "다음 단계 진행해" or equivalent user phrases as authorisation to start the implementation phase — this run stays in `implementation-planning` regardless of such phrasing
49
+ - dispatching parallel sub-agents beyond the required worker roster — okstra owns worker fan-out
50
+ - writing artifacts to `docs/superpowers/specs/` or `docs/superpowers/plans/` — the run's `reports/` directory is the canonical location
51
+ - Section heading contract (BLOCKING — validator scans for these literal English substrings):
52
+ - The final report MUST include section headings containing each of the following exact strings: `Option Candidates`, `Trade-off`, `Recommended Option`, `Stepwise Execution Order`, `Dependency`, `Validation Checklist`, `Rollback`, `User Approval Request`.
53
+ - Korean translations are allowed in parentheses (e.g. `### Recommended Option (권장 옵션)`), but the English keyword must be present verbatim in the heading line.
54
+ - The shape and ordering follow `final-report-template.md` section 4.5 (`Implementation Plan Deliverables`). Do NOT translate the heading keywords — `validators/validate-run.py` does substring matching on the raw report text and 7-of-8 missing strings is a real, repeatedly observed failure mode (root cause: writer translated the headings to Korean).
55
+ - Required deliverable shape (final report, in addition to the standard sections):
56
+ - at least two implementation options. **Each option must include**:
57
+ - **File Structure**: an explicit list of files to create / modify / delete with each file's responsibility (one-line each). Use the form `Create: path — responsibility` / `Modify: path:line-range — change summary` / `Delete: path — reason`.
58
+ - affected interfaces / public contracts and downstream consumers
59
+ - estimated blast radius (units, configs, deployment manifests, data migrations)
60
+ - trade-off matrix across options (rows = options, columns at minimum: complexity, risk, reversibility, test coverage cost, rollout cost)
61
+ - recommended option with rationale tied to the design principles above
62
+ - **stepwise execution order for the recommended option**, written as bite-sized tasks:
63
+ - each step is one action completable in roughly 2–5 minutes (e.g. "write the failing test for X", "run it to confirm it fails", "implement minimal code", "run test to confirm pass", "commit")
64
+ - every step names exact file paths and exact commands; for code steps, include the actual code or the diff sketch — not a description
65
+ - prefer TDD ordering (failing test → implementation → green → commit) when the touched area has or can have tests
66
+ - dependency / migration risk assessment (ordering constraints, data backfills, feature-flag prerequisites, cross-team coordination)
67
+ - validation checklist (pre / mid / post) — each item is an exact command or observable outcome
68
+ - rollback strategy — exact revert path (commits, flags, migrations) and the signal that triggers rollback
69
+ - explicit `User Approval Request` block — the next `implementation` run must not begin until the user replies with explicit approval
70
+ - `Open Questions` block listing every ambiguity flagged during pre-planning that the user must resolve before approval
71
+ - No-placeholder rule (plan failures — reject any option or step that contains these):
72
+ - "TBD", "TODO", "implement later", "fill in details", "add appropriate error handling", "handle edge cases", "write tests for the above" without actual test code
73
+ - "similar to Option/Task N" without repeating the concrete content (readers may consume sections out of order)
74
+ - references to types, functions, flags, or files that no other step or option defines
75
+ - steps that describe *what* to do without showing *how* (commands, code, or exact diffs are required for any code-touching step)
76
+ - Self-review pass before finalising the report (`Claude lead` runs this; do not delegate to a generic subagent):
77
+ 1. **Spec coverage** — for every requirement in the task brief, point to the option(s) and step(s) that satisfy it. List gaps explicitly.
78
+ 2. **Placeholder scan** — search the report for the patterns in the No-placeholder rule above and fix inline.
79
+ 3. **Internal consistency** — option file lists, trade-off matrix, and recommended step list must agree on file paths, names, and signatures. A symbol called `clearLayers()` in the matrix and `clearFullLayers()` in the steps is a bug.
80
+ 4. **Ambiguity check** — any requirement that could be read two ways must be made explicit or moved to `Open Questions`.
81
+ 5. **Scope check** — if the recommended plan now spans multiple independent subsystems, recommend splitting into separate planning runs rather than shipping an oversized plan.
82
+ - Skill provenance (for maintainers):
83
+ - "Pre-planning context exploration", "Design principles applied when scoring options", and the self-review pass items 3–5 are adapted from the `brainstorming` skill (clarification + spec self-review portions). The interactive one-question-at-a-time dialogue, visual companion, and `docs/superpowers/specs/` save path from that skill are intentionally **not** adopted — okstra is a non-interactive multi-worker run with its own artifact layout.
84
+ - "File Structure" per option, bite-sized step granularity, the No-placeholder rule, and self-review items 1–2 are adapted from the `writing-plans` skill. The skill's default save path (`docs/superpowers/plans/`), the subagent-vs-inline execution-handoff prompt, and the plan-document header referencing other skills are intentionally **not** adopted — okstra owns artifact paths, worker dispatch, and lifecycle handoff.
85
+ - Skill names above are written without the deprecated `superpowers:` prefix.
@@ -0,0 +1,71 @@
1
+ # Implementation Profile
2
+
3
+ - Purpose: realise the approved `implementation-planning` deliverable as actual source changes, with cross-model verification, while keeping the run reversible
4
+ - Required workers:
5
+ - claude
6
+ - codex
7
+ - gemini
8
+ - report-writer
9
+ - Team contract:
10
+ - `Claude lead` is synthesis-only and stays distinct from `Claude executor`/`Claude verifier`
11
+ - **Executor role:** `Claude executor` is the **only worker permitted to use Edit / Write / state-mutating Bash commands** on project files. All other workers run read-only.
12
+ - **Verifier roles:** `Gemini verifier`, `Codex verifier`, and `Claude verifier` independently review the executor's diff and test output. They MUST NOT call Edit, Write, or any Bash command that mutates files outside the run's artifact directories. If a verifier wants a fix, it records the recommendation in its worker result; it does not apply the fix itself.
13
+ - `Claude verifier` and `Claude executor` MUST be assigned different model variants in the run manifest (executor=opus, verifier=sonnet by default) to avoid self-review of the same checkpoint.
14
+ - `Report writer worker` is the **author** of the final-report file; `Claude lead` reviews and approves the produced draft and does NOT write the file itself (see `okstra-team-contract` and `okstra-report-writer` for the authoritative contract).
15
+ - default model assignments are resolved from centralised defaults; the fallback values are `Claude lead`/`Claude executor`/`Report writer worker`=`opus`, `Claude verifier`=`sonnet`, `Codex verifier`=`gpt-5.5`, `Gemini verifier`=`auto`
16
+ - all three verifier roles (`Gemini verifier`, `Codex verifier`, `Claude verifier`) must be attempted; the final verdict waits until each has either a result or an explicit terminal status
17
+ - unnamed generic parallel workers must not replace the required role roster, and no additional sub-agent dispatch is allowed beyond this roster
18
+ - Tooling — read-only MCP availability:
19
+ - `mcp__mysql-fontsninja-{common,fontradar,fontsninja,fonthelper}` (tools: `mysql_list_tables`, `mysql_describe_table`, `mysql_select_data`) may be queried by both executor and verifiers as a read-only cross-check (sanity-checking row counts after a migration script's dry-run, comparing observed schema against the plan's expectations, etc.); the canonical usage policy is in the task brief's `## Available MCP Servers` section, and any MCP-derived evidence MUST cite server, table, and the SELECT used. MCP MUST NEVER be used as a write path — schema/data mutations go through repository migration files, never through this MCP.
20
+ - Pre-implementation gate (mandatory — refuse to start if any item fails):
21
+ - the run brief MUST cite `--approved-plan <path>` pointing to a `final-report.md` produced by a prior `implementation-planning` run located under `runs/implementation-planning/.../reports/final-report.md`
22
+ - that file MUST contain a `User Approval Request` block AND a recorded user approval marker (e.g. `APPROVED:` line, `[x] Approved`, or equivalent unambiguous evidence). If only the request block exists without an approval marker, refuse to start with status `contract-violated`.
23
+ - the file's `Recommended option` and its bite-sized step list become the authoritative scope for this run; any deviation must be justified in the final report and routed back to a new `implementation-planning` run instead of being silently expanded.
24
+ - Pre-implementation context exploration (executor before first edit):
25
+ - re-read the approved plan end-to-end and extract: file list, step order, validation commands, rollback path
26
+ - inspect the current state of every file the plan names; if any file has changed materially since the plan was written, stop and route to a new `implementation-planning` run instead of editing speculatively
27
+ - confirm the test/build commands referenced in the plan still exist and run from a clean state
28
+ - Allowed actions during the run:
29
+ - **Edit / Write on any project file** (no path whitelist — scope is bounded by the approved plan's file list, not by directory). Editing files outside the plan's list is permitted only when strictly needed to satisfy a step, and MUST be recorded in the final report's `Out-of-plan edits` block with rationale.
30
+ - read-only inspection commands: `git status`, `git diff`, `git log`, `grep`, `rg`, `find`, `cat`, `ls`, file Read tools
31
+ - build, lint, type-check, and test commands (`npm test`, `pytest`, `go build`, `cargo test`, `bash -n`, etc.)
32
+ - **local git operations only**: `git add`, `git commit`. Prefer small commits keyed to plan steps.
33
+ - Authority & permissions assumption (HARD RULE — applies to every okstra task-type):
34
+ - **Assume the user (and their team) holds full authority and every permission required for the approved work.** Treat external approvals, third-party access grants, role/IAM permissions, organisational sign-off, legal/compliance review, vendor coordination, and "verify access exists" steps as already satisfied unless the approved plan or task brief explicitly states otherwise.
35
+ - Do NOT add such items to commit ordering, validation evidence, rollback verification, routing recommendations, or any time/effort accounting. They are not legitimate sources of schedule extension.
36
+ - The pre-implementation gate's recorded user approval marker is the only authorised approval gate at this phase — proceed once it is satisfied without further external coordination. (This rule does NOT relax the existing forbidden-action list below; deploy/publish/push/migrate to shared environments remain blocked for safety, not for permission reasons.)
37
+ - Forbidden actions (any occurrence → terminal status `contract-violated`):
38
+ - **`git push` of any kind**, including `--dry-run` against a real remote that produces side-effects
39
+ - publishing or release commands: `npm publish`, `cargo publish`, `pip publish`, `gh release`, `docker push`
40
+ - real database migrations, schema changes that touch shared environments, or any command that writes to a non-local datastore
41
+ - production credentials, deploy commands, infra mutation (`terraform apply`, `kubectl apply` against non-local cluster, etc.)
42
+ - external API calls that *write* (POST/PUT/PATCH/DELETE) to third-party services other than localhost test fixtures
43
+ - source edits or Bash mutations performed by any verifier role
44
+ - any Edit/Write before the pre-implementation gate has passed
45
+ - dispatching parallel sub-agents beyond the required worker roster
46
+ - silent scope expansion — adding files, dependencies, or features that the approved plan did not list, without recording an `Out-of-plan edits` justification
47
+ - leaving placeholders such as TBD / TODO / "implement later" / "handle edge cases" in committed code
48
+ - Required deliverable shape (final report, in addition to the standard sections):
49
+ - **Plan link & approval evidence**: path to the approved `final-report.md` and the exact quoted approval marker
50
+ - **Commit list**: each commit's SHA (or short SHA), message, and the plan step it satisfies
51
+ - **Diff summary**: `git diff --stat <base>..HEAD` output, plus a per-file one-line summary of changes
52
+ - **Out-of-plan edits block**: every file edited that was not in the approved plan's file list, with rationale (empty block is acceptable and preferred)
53
+ - **Validation evidence**: actual command output (stdout/stderr) for every `pre / mid / post` validation command from the plan. Truncated output is acceptable but the command line and exit code MUST be exact. No paraphrasing of test results.
54
+ - **TDD evidence (when applicable)**: for steps that should be TDD-ordered, show the failing-test output BEFORE the implementation commit and the passing-test output AFTER, with commit SHAs framing the transition.
55
+ - **Verifier results**: a section per verifier (`Gemini verifier`, `Codex verifier`, `Claude verifier`) containing their independent verdict (PASS / CONCERNS / FAIL), their cited diff snippets, and any fix recommendations they declined to apply. `Claude lead` synthesises a unified verdict but MUST preserve dissent — do not collapse three opinions into one paragraph.
56
+ - **Rollback verification**: confirmation that the plan's rollback path is still valid after the changes (e.g. revert SHA exists, feature flag toggle works, migration down step is reachable). Dry-run rollback is preferred when feasible.
57
+ - **Routing recommendation for `final-verification`**: brief note on whether the changes are ready for final-verification phase or need a new error-analysis / planning loop first.
58
+ - Self-review pass before finalising the report (`Claude lead` runs this; do not delegate to a generic subagent):
59
+ 1. **Plan coverage** — every step in the approved plan's recommended option must point to a commit (or an explicit `Skipped: <reason>` entry). List gaps.
60
+ 2. **Evidence completeness** — every `Validation evidence` and `TDD evidence` claim has the actual command line and exit code? No paraphrased "tests pass" without output?
61
+ 3. **Out-of-plan honesty** — files in the diff that are NOT in the plan list must appear in the `Out-of-plan edits` block. Cross-check with `git diff --name-only`.
62
+ 4. **Verifier dissent preserved** — if the three verifiers disagree, the disagreement is visible in the report? Synthesis hides nothing?
63
+ 5. **Forbidden action audit** — `git push`, publish, deploy, migration, third-party write commands: scan the run's session transcripts for any occurrence and confirm none happened.
64
+ 6. **Placeholder scan** — committed code searched for TBD / TODO / "handle edge cases" strings introduced by this run? (Pre-existing TODOs in untouched code are out of scope.)
65
+ - Skill provenance (for maintainers — these skills are referenced as inspiration, NOT invoked at runtime):
66
+ - The pre-implementation gate, "Plan coverage" and "Evidence completeness" self-review items are adapted from the `executing-plans` skill (inline mode). The skill's "subagent-driven vs inline" choice prompt and its plan-document-header conventions are intentionally not adopted — okstra owns lifecycle handoff.
67
+ - The "TDD evidence" requirement and the failing-test-before-implementation ordering preference are adapted from `test-driven-development`. Strict enforcement is relaxed where the touched area has no test infrastructure; in those cases the executor must add at minimum a regression test and record a justification.
68
+ - The "Validation evidence" and "Forbidden action audit" requirements are adapted from `verification-before-completion`. The skill's bare-name principle ("evidence before assertions") is treated as a hard rule.
69
+ - Verifier role behaviour (read-only review, recommendation without application, dissent preservation) is adapted from `receiving-code-review` and `requesting-code-review`. The skills' UI/dialogue framing is replaced by structured worker-result sections.
70
+ - In-phase debugging follows the spirit of `systematic-debugging` (root cause before fix), but the executor must NOT route to a separate `error-analysis` phase mid-run; if a defect blocks plan progress, the executor records findings and routes to a new run after this one ends.
71
+ - Skill names above are written without the deprecated `superpowers:` prefix.
@@ -0,0 +1,43 @@
1
+ # Requirements Discovery Profile
2
+
3
+ - Purpose: classify the work request, identify missing requirement evidence, and route the task to the safest next lifecycle phase before implementation starts
4
+ - Required workers:
5
+ - claude
6
+ - codex
7
+ - gemini
8
+ - report-writer
9
+ - Team contract:
10
+ - `Claude lead` is synthesis-only and stays distinct from `Claude worker`
11
+ - required worker roles are `Claude worker`, `Codex worker`, `Gemini worker`, and `Report writer worker`
12
+ - `Report writer worker` is the **author** of the final-report file; `Claude lead` reviews and approves the produced draft and does NOT write the file itself (see `okstra-team-contract` and `okstra-report-writer` for the authoritative contract)
13
+ - default model assignments are resolved from centralized defaults; the fallback values are `Claude lead`/`Report writer worker`=`opus`, `Claude worker`=`sonnet`, `Codex worker`=`gpt-5.5`, `Gemini worker`=`auto`
14
+ - `Gemini worker` must always be attempted for this workflow
15
+ - the final verdict waits until each required worker has either a result or an explicit terminal status
16
+ - unnamed generic parallel workers must not replace the required role roster
17
+ - Tooling — read-only MCP availability:
18
+ - `mcp__mysql-fontsninja-{common,fontradar,fontsninja,fonthelper}` (tools: `mysql_list_tables`, `mysql_describe_table`, `mysql_select_data`) may be queried when local schema or sample data clarifies the work category or routing decision; the canonical usage policy is in the task brief's `## Available MCP Servers` section, and any MCP-derived finding MUST cite server, table, and the SELECT used
19
+ - Primary focus areas:
20
+ - classify the work as bugfix, feature, improvement, refactor, or ops-change
21
+ - determine whether `error-analysis`, `implementation-planning`, or a direct implementation handoff is the next safe step
22
+ - identify missing materials that block reliable routing
23
+ - define task continuity expectations for long-running work under the same task key
24
+ - capture approval or confirmation points before the next phase starts
25
+ - Expected output emphasis:
26
+ - evidence-backed routing decision
27
+ - uncertainty boundaries and missing inputs
28
+ - next recommended phase and safe resume guidance
29
+ - Clarification request policy:
30
+ - if any blocking input is missing at the time of writing the final report, populate `## 5. Clarification Requests for the Next Run` in `final-report-template.md`
31
+ - section 5 must be split into two distinct sub-sections per the template — `5.1 추가 자료 요청 (Additional Materials Requested)` for files/screenshots/links the user must attach, and `5.2 사용자 확인 질문 (Questions for the User)` for routing or scoping decisions only the user can make. Never mix material requests and decision questions in the same row or list.
32
+ - prefer concrete questions whose answers map directly to a routing decision (`bugfix` vs `feature`, `error-analysis` vs `implementation-planning`, etc.). State each option in plain language with one sentence describing what choosing it would mean for the next phase.
33
+ - write every entry in full, descriptive sentences that a non-developer can act on without further context. Avoid abbreviations and internal jargon. For each material request, state *why* it is needed, *where* the user can find it, and *where* to place it. For each question, state *why* the answer changes the routing decision, *what* is being asked in a complete sentence, and *what shape of answer* is expected (예/아니오, 보기 중 하나, 숫자/날짜, 짧은 서술 등); supply concrete option choices when applicable.
34
+ - the same `final-report.md` file is the canonical artifact carried into the next run; the user appends answers inline before rerunning. The preferred turn-around is `scripts/okstra.sh --resume-clarification --task-key <project-id>:<task-group>:<task-id>` (opens the latest report in `$EDITOR`, then auto-reruns the same phase with `--clarification-response` carry-in). The lower-level form `--clarification-response <path>` remains available for scripted runs.
35
+ - if a clarification response was carried in for this run, reconcile each prior `A*` (material) and `Q*` (question) row in section 0 and update its `Status` (`resolved`, `obsolete`) before issuing the routing decision
36
+ - Authority & permissions assumption (HARD RULE — applies to every okstra task-type):
37
+ - **Assume the user (and their team) holds full authority and every permission required for the anticipated work.** Treat external approvals, third-party access grants, role/IAM permissions, organisational sign-off, legal/compliance review, vendor coordination, and "verify access exists" steps as already satisfied unless the user explicitly states otherwise in the task brief.
38
+ - Do NOT add such items to routing decisions, missing-materials lists, clarification questions, risk lists, dependencies, open questions, or day/effort estimates. They are not legitimate sources of schedule extension.
39
+ - Internal okstra phase handoffs (e.g. the `User Approval Request` block in `implementation-planning`) are unaffected — those are the user themselves approving and proceed without external coordination.
40
+ - Non-goals:
41
+ - full implementation design unless it is required to decide the next phase
42
+ - **source code edits, plan authoring, builds, or deployments** — this run only classifies the work and routes it; deeper analysis and planning belong to subsequent phases
43
+ - treating "다음 단계 진행해" or equivalent user phrases as authorisation to start `error-analysis`, `implementation-planning`, or `implementation` — the next phase begins only in a separate okstra run launched with the new `--task-type`