okstra 0.102.2 → 0.102.4
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.
- package/README.kr.md +5 -5
- package/README.md +5 -5
- package/docs/kr/architecture/storage-model.md +8 -3
- package/docs/kr/architecture.md +12 -13
- package/docs/kr/cli.md +4 -4
- package/docs/kr/container.md +1 -1
- package/docs/kr/performance-improvement-plan-v2.md +2 -2
- package/docs/project-structure-overview.md +2 -2
- package/package.json +7 -2
- package/runtime/BUILD.json +2 -2
- package/runtime/bin/lib/okstra/interactive.sh +12 -0
- package/runtime/bin/okstra-antigravity-exec.sh +1 -2
- package/runtime/bin/okstra-codex-exec.sh +1 -2
- package/runtime/bin/okstra-render-final-report.py +2 -9
- package/runtime/bin/okstra-spawn-followups.py +4 -6
- package/runtime/bin/okstra-trace-cleanup.sh +24 -4
- package/runtime/prompts/lead/okstra-lead-contract.md +2 -2
- package/runtime/prompts/lead/report-writer.md +1 -1
- package/runtime/prompts/profiles/_common-contract.md +9 -11
- package/runtime/python/okstra_ctl/codex_dispatch.py +6 -13
- package/runtime/python/okstra_ctl/consumers.py +35 -0
- package/runtime/python/okstra_ctl/container.py +4 -6
- package/runtime/python/okstra_ctl/dispatch_core.py +8 -13
- package/runtime/python/okstra_ctl/final_report_paths.py +24 -0
- package/runtime/python/okstra_ctl/handoff.py +2 -1
- package/runtime/python/okstra_ctl/implementation_outcome.py +271 -0
- package/runtime/python/okstra_ctl/implementation_stage.py +7 -11
- package/runtime/python/okstra_ctl/path_hints.py +665 -0
- package/runtime/python/okstra_ctl/render.py +4 -3
- package/runtime/python/okstra_ctl/report_view_artifacts.py +14 -0
- package/runtime/python/okstra_ctl/report_views.py +7 -4
- package/runtime/python/okstra_ctl/run.py +3 -10
- package/runtime/python/okstra_ctl/run_context.py +4 -2
- package/runtime/python/okstra_ctl/stage_targets.py +18 -0
- package/runtime/python/okstra_ctl/wizard.py +37 -26
- package/runtime/python/okstra_ctl/wizard_stage_intent.py +54 -0
- package/runtime/python/okstra_project/state.py +40 -2
- package/runtime/python/okstra_token_usage/report.py +2 -5
- package/runtime/validators/validate-report-views.py +2 -1
- package/runtime/validators/validate-run.py +1 -11
- package/src/commands/lifecycle/install.mjs +5 -5
- package/src/commands/lifecycle/uninstall.mjs +4 -4
- package/docs/superpowers/plans/2026-05-12-ticket-id-in-reports.md +0 -638
- package/docs/superpowers/plans/2026-05-14-convergence-queue-pruning.md +0 -1568
- package/docs/superpowers/plans/2026-05-17-dual-format-final-report.md +0 -167
- package/docs/superpowers/plans/2026-05-20-final-report-language.md +0 -1501
- package/docs/superpowers/plans/2026-05-20-implementation-planning-multi-stage.md +0 -1267
- package/docs/superpowers/plans/2026-05-20-okstra-run-prompt-sot-b1.md +0 -1007
- package/docs/superpowers/plans/2026-05-20-wizard-messages-json-sot.md +0 -720
- package/docs/superpowers/plans/2026-05-20-wizard-prompt-json-sot-a1.md +0 -681
- package/docs/superpowers/plans/2026-05-21-improvement-discovery-task-type.md +0 -1691
- package/docs/superpowers/plans/2026-05-24-implementation-lead-context-slimming.md +0 -1700
- package/docs/superpowers/plans/2026-05-25-okstra-project-root-rename.md +0 -158
- package/docs/superpowers/plans/2026-05-26-wizard-3-option-picker.md +0 -860
- package/docs/superpowers/plans/2026-06-02-final-verification-protocol-hardening.md +0 -326
- package/docs/superpowers/plans/2026-06-02-okstra-run-branch-confirm-step.md +0 -337
- package/docs/superpowers/plans/2026-06-02-okstra-run-phase-pane-cleanup.md +0 -410
- package/docs/superpowers/plans/2026-06-02-requirements-discovery-fanout.md +0 -728
- package/docs/superpowers/plans/2026-06-04-adversarial-implementation-planning.md +0 -294
- package/docs/superpowers/plans/2026-06-04-adversarial-verification.md +0 -570
- package/docs/superpowers/plans/2026-06-04-coverage-critic.md +0 -516
- package/docs/superpowers/plans/2026-06-04-stage-cohesion-planner.md +0 -351
- package/docs/superpowers/plans/2026-06-04-stage-run-batching.md +0 -457
- package/docs/superpowers/plans/2026-06-05-acceptance-critic.md +0 -251
- package/docs/superpowers/plans/2026-06-05-compact-markdown-report-tables.md +0 -323
- package/docs/superpowers/plans/2026-06-05-wizard-batch-prompts.md +0 -559
- package/docs/superpowers/plans/2026-06-06-final-verification-whole-task-gate.md +0 -993
- package/docs/superpowers/plans/2026-06-06-stage-parallel-and-pending-fixes.md +0 -93
- package/docs/superpowers/plans/2026-06-06-stage-worktree-isolation-p1.md +0 -447
- package/docs/superpowers/plans/2026-06-06-stage-worktree-isolation-p2.md +0 -289
- package/docs/superpowers/plans/2026-06-06-stage-worktree-isolation-p3.md +0 -774
- package/docs/superpowers/plans/2026-06-06-stage-worktree-isolation-p4.md +0 -303
- package/docs/superpowers/plans/2026-06-06-stage-worktree-isolation-p5-multidep-base.md +0 -387
- package/docs/superpowers/plans/2026-06-07-stage-conformance-qa-phase2.md +0 -275
- package/docs/superpowers/plans/2026-06-07-stage-conformance-qa-phase3.md +0 -282
- package/docs/superpowers/plans/2026-06-07-stage-conformance-qa-phase4a.md +0 -147
- package/docs/superpowers/plans/2026-06-07-stage-conformance-qa-phase4b.md +0 -262
- package/docs/superpowers/plans/2026-06-07-stage-conformance-qa-phase4c.md +0 -184
- package/docs/superpowers/plans/2026-06-07-stage-conformance-qa-phase4d.md +0 -88
- package/docs/superpowers/plans/2026-06-07-stage-conformance-qa-phase4e.md +0 -250
- package/docs/superpowers/plans/2026-06-07-stage-conformance-qa.md +0 -409
- package/docs/superpowers/plans/2026-06-09-implementation-run-artifact-stage-isolation.md +0 -320
- package/docs/superpowers/plans/2026-06-10-concurrent-run-team-guard.md +0 -456
- package/docs/superpowers/plans/2026-06-10-git-reconcile-stale-sha-recovery.md +0 -1408
- package/docs/superpowers/plans/2026-06-10-lead-worker-completion-polling-PROBE.md +0 -42
- package/docs/superpowers/plans/2026-06-10-lead-worker-completion-polling.md +0 -337
- package/docs/superpowers/plans/2026-06-10-p6-token-usage-incremental.md +0 -1029
- package/docs/superpowers/plans/2026-06-10-stage-group-handoff.md +0 -1572
- package/docs/superpowers/plans/2026-06-11-fix-cycle.md +0 -1290
- package/docs/superpowers/plans/2026-06-11-wizard-whole-task-final-verification.md +0 -526
- package/docs/superpowers/plans/2026-06-12-html-plan-approval.md +0 -1000
- package/docs/superpowers/plans/2026-06-13-repo-risk-hardening.md +0 -493
- package/docs/superpowers/plans/2026-06-14-host-runtime-auto-execution.md +0 -1775
- package/docs/superpowers/plans/2026-06-15-coding-preflight-pack-dispatch-path.md +0 -504
- package/docs/superpowers/plans/2026-06-15-internal-skill-migration-final-fixups.md +0 -342
- package/docs/superpowers/plans/2026-06-15-internal-skill-migration-fixups.md +0 -258
- package/docs/superpowers/plans/2026-06-15-internal-skill-migration-remaining-fixups.md +0 -387
- package/docs/superpowers/plans/2026-06-15-internal-skill-resource-migration.md +0 -749
- package/docs/superpowers/plans/2026-06-15-worker-prompt-anchor-final-fixups.md +0 -828
- package/docs/superpowers/plans/2026-06-15-worker-prompt-header-error-contract.md +0 -490
- package/docs/superpowers/plans/2026-06-17-okstra-error-report.md +0 -724
- package/docs/superpowers/plans/2026-06-18-subagent-pane-reclaim.md +0 -483
- package/docs/superpowers/plans/2026-06-19-agent-operating-standard.md +0 -476
- package/docs/superpowers/plans/2026-06-19-okstra-inspect-recap-facet.md +0 -647
- package/docs/superpowers/plans/2026-06-20-error-feedback-loop.md +0 -1019
- package/docs/superpowers/plans/2026-06-20-run-index-row-normalization.md +0 -583
- package/docs/superpowers/plans/2026-06-20-stage-auto-integrate-teardown.md +0 -819
- package/docs/superpowers/plans/2026-06-21-okstra-container-local-user-test.md +0 -714
- package/docs/superpowers/plans/2026-06-21-release-handoff-local-checkout.md +0 -348
- package/docs/superpowers/plans/2026-06-23-implementation-stage-multiselect-chain.md +0 -630
- package/docs/superpowers/plans/2026-06-23-implementation-step-commit-granularity.md +0 -274
- package/docs/superpowers/plans/2026-06-23-phase-batch-cleanup-enforcement.md +0 -409
- package/docs/superpowers/plans/2026-06-24-cross-project-precondition.md +0 -542
- package/docs/superpowers/plans/2026-06-24-decision-drafts-render-gap.md +0 -568
- package/docs/superpowers/plans/2026-06-24-manual-user-test-section.md +0 -203
- package/docs/superpowers/plans/2026-06-24-okstra-container-build-rename.md +0 -525
- package/docs/superpowers/specs/2026-05-12-ticket-id-in-reports-design.md +0 -131
- package/docs/superpowers/specs/2026-05-15-implementation-plan-verification-design.md +0 -254
- package/docs/superpowers/specs/2026-05-20-final-report-language-design.md +0 -383
- package/docs/superpowers/specs/2026-05-20-implementation-planning-multi-stage-design.md +0 -322
- package/docs/superpowers/specs/2026-05-20-okstra-run-prompt-sot-design.md +0 -299
- package/docs/superpowers/specs/2026-05-21-improvement-discovery-task-type-design.md +0 -335
- package/docs/superpowers/specs/2026-06-02-okstra-run-branch-confirm-step-design.md +0 -113
- package/docs/superpowers/specs/2026-06-02-okstra-run-phase-pane-cleanup-design.md +0 -173
- package/docs/superpowers/specs/2026-06-02-requirements-discovery-fanout-design.md +0 -154
- package/docs/superpowers/specs/2026-06-04-adversarial-implementation-planning-design.md +0 -90
- package/docs/superpowers/specs/2026-06-04-adversarial-verification-design.md +0 -176
- package/docs/superpowers/specs/2026-06-04-coverage-critic-design.md +0 -99
- package/docs/superpowers/specs/2026-06-04-stage-splitting-cost-aware-design.md +0 -98
- package/docs/superpowers/specs/2026-06-05-acceptance-critic-design.md +0 -90
- package/docs/superpowers/specs/2026-06-05-compact-markdown-report-tables-design.md +0 -87
- package/docs/superpowers/specs/2026-06-05-wizard-batch-prompts-design.md +0 -121
- package/docs/superpowers/specs/2026-06-06-final-verification-whole-task-gate-design.md +0 -126
- package/docs/superpowers/specs/2026-06-06-stage-worktree-isolation-design.md +0 -180
- package/docs/superpowers/specs/2026-06-06-vertical-slice-tdd-planning-design.md +0 -179
- package/docs/superpowers/specs/2026-06-07-stage-conformance-qa-design.md +0 -169
- package/docs/superpowers/specs/2026-06-09-executor-model-custom-id-cascade-design.md +0 -66
- package/docs/superpowers/specs/2026-06-09-implementation-run-artifact-stage-isolation-design.md +0 -87
- package/docs/superpowers/specs/2026-06-10-blocking-contract-posthoc-conformance-design.md +0 -168
- package/docs/superpowers/specs/2026-06-10-concurrent-run-team-guard-design.md +0 -107
- package/docs/superpowers/specs/2026-06-10-git-reconcile-stale-sha-recovery-design.md +0 -105
- package/docs/superpowers/specs/2026-06-10-lead-worker-completion-polling-design.md +0 -113
- package/docs/superpowers/specs/2026-06-10-stage-group-handoff-design.md +0 -156
- package/docs/superpowers/specs/2026-06-11-brief-entry-only-handoff-stage-entry-design.md +0 -158
- package/docs/superpowers/specs/2026-06-11-fix-cycle-design.md +0 -94
- package/docs/superpowers/specs/2026-06-11-wizard-whole-task-final-verification-design.md +0 -89
- package/docs/superpowers/specs/2026-06-12-codex-lead-adapter-design.md +0 -358
- package/docs/superpowers/specs/2026-06-12-html-plan-approval-design.md +0 -85
- package/docs/superpowers/specs/2026-06-12-stage-discipline-rule-design.md +0 -108
- package/docs/superpowers/specs/2026-06-13-forbidden-actions-ssot-design.md +0 -134
- package/docs/superpowers/specs/2026-06-13-neutral-tmux-lead-adapter-design.md +0 -284
- package/docs/superpowers/specs/2026-06-14-host-runtime-auto-execution-design.md +0 -404
- package/docs/superpowers/specs/2026-06-17-okstra-error-report-design.md +0 -123
- package/docs/superpowers/specs/2026-06-18-subagent-pane-reclaim-design.md +0 -150
- package/docs/superpowers/specs/2026-06-19-agent-operating-standard-design.md +0 -120
- package/docs/superpowers/specs/2026-06-19-okstra-inspect-recap-facet-design.md +0 -96
- package/docs/superpowers/specs/2026-06-20-error-feedback-loop-design.md +0 -171
- package/docs/superpowers/specs/2026-06-20-run-index-row-normalization-design.md +0 -112
- package/docs/superpowers/specs/2026-06-20-stage-auto-integrate-teardown-design.md +0 -145
- package/docs/superpowers/specs/2026-06-21-okstra-container-local-user-test-design.md +0 -125
- package/docs/superpowers/specs/2026-06-21-release-handoff-local-checkout-design.md +0 -113
- package/docs/superpowers/specs/2026-06-23-implementation-stage-multiselect-chain-design.md +0 -138
- package/docs/superpowers/specs/2026-06-23-implementation-step-commit-granularity-design.md +0 -120
- package/docs/superpowers/specs/2026-06-24-cross-project-precondition-design.md +0 -129
- package/docs/superpowers/specs/2026-06-24-decision-drafts-render-gap-design.md +0 -185
- package/docs/superpowers/specs/2026-06-24-manual-user-test-section-design.md +0 -121
- package/docs/superpowers/specs/2026-06-24-okstra-container-build-rename-design.md +0 -110
|
@@ -1,493 +0,0 @@
|
|
|
1
|
-
# repo 유지보수 리스크 하드닝 구현 계획
|
|
2
|
-
|
|
3
|
-
> **For agentic workers:** 이 문서는 `okstra` 저장소 자체의 유지보수 리스크를 줄이기 위한 구현 계획이다. 단계별 체크박스(`- [ ]`)를 갱신하며 진행한다. `runtime/`은 build output이므로 직접 수정하지 않는다.
|
|
4
|
-
|
|
5
|
-
**Goal:** 문서 drift, generated runtime 직접 수정, profile/workflow/worker contract 불일치, 로컬/CI 검증 경로 부재로 생기는 유지보수 리스크를 낮춘다.
|
|
6
|
-
|
|
7
|
-
**Architecture:** 구조를 크게 바꾸지 않는 P0 안정화부터 적용한다. `package.json`을 version SSOT로 두고, `tools/build.mjs`가 `runtime/DO_NOT_EDIT.md`를 생성하며, pytest contract tests가 `workflow.py` ↔ `prompts/profiles/*.md` ↔ `workers.py`의 최소 일관성을 검증한다. CI는 같은 명령을 실행해 regression을 빠르게 잡는다.
|
|
8
|
-
|
|
9
|
-
**Tech Stack:** Node.js 22+, Python 3.11+, pytest, GitHub Actions.
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Scope
|
|
14
|
-
|
|
15
|
-
### P0 — 이번 구현 범위
|
|
16
|
-
|
|
17
|
-
1. 문서의 고정 package version 제거
|
|
18
|
-
2. `runtime/DO_NOT_EDIT.md` build-time 생성
|
|
19
|
-
3. repo contract pytest 추가
|
|
20
|
-
4. `package.json` check scripts 추가
|
|
21
|
-
5. GitHub Actions CI 추가
|
|
22
|
-
6. `CHANGES.md`에 사용자 영향 기록
|
|
23
|
-
|
|
24
|
-
### P1 — 후속 개선
|
|
25
|
-
|
|
26
|
-
1. [x] `okstra doctor --phase <phase>` 추가
|
|
27
|
-
2. [x] contributor change matrix 문서 추가
|
|
28
|
-
3. [x] final-report template/schema/validator contract test 강화
|
|
29
|
-
|
|
30
|
-
### P2 — 구조 개선 후보
|
|
31
|
-
|
|
32
|
-
1. [x] command metadata registry 도입 (P2-1)
|
|
33
|
-
2. [x] profile meta yaml 도입 → forbidden actions JSON SSOT로 구현 (P2-2; spec: docs/superpowers/specs/2026-06-13-forbidden-actions-ssot-design.md). 범위는 forbidden만(allowed/workers/Non-goals 제외).
|
|
34
|
-
3. [x] forbidden action post-run audit 자동화 (P2-3)
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Non-goals
|
|
39
|
-
|
|
40
|
-
- `prepare_task_bundle()` orchestration 구조 변경 없음
|
|
41
|
-
- phase 추가/삭제 없음
|
|
42
|
-
- worker roster 정책 변경 없음
|
|
43
|
-
- `runtime/` 산출물을 git tracked file로 만들지 않음
|
|
44
|
-
- `doctor --phase`는 이번 P0 구현에 포함하지 않음
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## Task 1: 문서 drift 제거
|
|
49
|
-
|
|
50
|
-
**Files:**
|
|
51
|
-
|
|
52
|
-
- Modify: `docs/project-structure-overview.md`
|
|
53
|
-
|
|
54
|
-
**Implementation:**
|
|
55
|
-
|
|
56
|
-
- [x] `package version: \`0.50.0\`` 같은 고정 semver를 제거한다.
|
|
57
|
-
- [x] 다음 중 하나로 변경한다.
|
|
58
|
-
|
|
59
|
-
```md
|
|
60
|
-
- package version: see `package.json`
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
또는 version line 자체를 제거한다.
|
|
64
|
-
|
|
65
|
-
**Rationale:**
|
|
66
|
-
|
|
67
|
-
`package.json`이 version SSOT다. 문서에 release version을 수동으로 넣으면 release마다 drift가 발생한다.
|
|
68
|
-
|
|
69
|
-
**Validation:**
|
|
70
|
-
|
|
71
|
-
- [x] 신규 `tests/test_repo_contracts.py`에서 문서 내 고정 package version을 금지한다.
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## Task 2: generated `runtime/` 경고 파일 생성
|
|
76
|
-
|
|
77
|
-
**Files:**
|
|
78
|
-
|
|
79
|
-
- Modify: `tools/build.mjs`
|
|
80
|
-
|
|
81
|
-
**Implementation:**
|
|
82
|
-
|
|
83
|
-
- [x] `writeDoNotEditNotice()` 함수를 추가한다.
|
|
84
|
-
- [x] build sequence 마지막에 `runtime/DO_NOT_EDIT.md`를 생성한다.
|
|
85
|
-
- [x] 파일 내용은 `runtime/`이 generated output이고 원본 수정 위치가 어디인지 명시한다.
|
|
86
|
-
|
|
87
|
-
Suggested content:
|
|
88
|
-
|
|
89
|
-
```md
|
|
90
|
-
# Do not edit runtime/
|
|
91
|
-
|
|
92
|
-
This directory is generated by `npm run build`.
|
|
93
|
-
|
|
94
|
-
Edit source files under:
|
|
95
|
-
|
|
96
|
-
- scripts/
|
|
97
|
-
- skills/
|
|
98
|
-
- agents/
|
|
99
|
-
- prompts/
|
|
100
|
-
- schemas/
|
|
101
|
-
- templates/
|
|
102
|
-
- validators/
|
|
103
|
-
|
|
104
|
-
Then run:
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
npm run build
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Direct edits under runtime/ are overwritten.
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
**Important:**
|
|
114
|
-
|
|
115
|
-
`runtime/*`은 `.gitignore`로 ignore된다. `runtime/DO_NOT_EDIT.md`를 직접 커밋하지 말고 build 산출물로만 만든다.
|
|
116
|
-
|
|
117
|
-
**Validation:**
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
npm run build
|
|
121
|
-
test -f runtime/DO_NOT_EDIT.md
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
## Task 3: repo contract tests 추가
|
|
127
|
-
|
|
128
|
-
**Files:**
|
|
129
|
-
|
|
130
|
-
- Add: `tests/test_repo_contracts.py`
|
|
131
|
-
|
|
132
|
-
**Implementation:**
|
|
133
|
-
|
|
134
|
-
- [x] repo root를 기준으로 `scripts/`를 `sys.path`에 추가한다.
|
|
135
|
-
- [x] `okstra_ctl.workflow`와 `okstra_ctl.workers`를 import한다.
|
|
136
|
-
- [x] 아래 contract를 검증한다.
|
|
137
|
-
|
|
138
|
-
### Contract 3.1 — workflow phase와 profile 파일 일치
|
|
139
|
-
|
|
140
|
-
- [x] `PHASE_SEQUENCE`의 모든 phase에 `prompts/profiles/<phase>.md`가 존재한다.
|
|
141
|
-
- [x] `PHASE_RULES`의 모든 non-private task type에 profile 파일이 존재한다.
|
|
142
|
-
- [x] `improvement-discovery` profile도 존재한다.
|
|
143
|
-
|
|
144
|
-
### Contract 3.2 — worker roster 일관성
|
|
145
|
-
|
|
146
|
-
- [x] `release-handoff`는 required worker가 없어야 한다.
|
|
147
|
-
- [x] `release-handoff` 외 profile은 required worker가 있어야 한다.
|
|
148
|
-
- [x] required worker는 모두 `ALLOWED_WORKERS` 안에 있어야 한다.
|
|
149
|
-
- [x] optional worker도 모두 `ALLOWED_WORKERS` 안에 있어야 한다.
|
|
150
|
-
- [x] required worker 중복이 없어야 한다.
|
|
151
|
-
- [x] optional worker 중복이 없어야 한다.
|
|
152
|
-
|
|
153
|
-
### Contract 3.3 — docs version drift 방지
|
|
154
|
-
|
|
155
|
-
- [x] `docs/project-structure-overview.md`에 `package version: 0.0.0` 형태의 고정 semver가 남지 않아야 한다.
|
|
156
|
-
|
|
157
|
-
Suggested regex:
|
|
158
|
-
|
|
159
|
-
```python
|
|
160
|
-
r"package version:\s*`?\d+\.\d+\.\d+`?"
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
**Validation:**
|
|
164
|
-
|
|
165
|
-
```bash
|
|
166
|
-
python3 -m pytest tests/test_repo_contracts.py -q
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## Task 4: package scripts 정리
|
|
172
|
-
|
|
173
|
-
**Files:**
|
|
174
|
-
|
|
175
|
-
- Modify: `package.json`
|
|
176
|
-
|
|
177
|
-
**Implementation:**
|
|
178
|
-
|
|
179
|
-
- [x] 아래 scripts를 추가한다.
|
|
180
|
-
|
|
181
|
-
```json
|
|
182
|
-
{
|
|
183
|
-
"test:py": "python3 -m pytest tests/",
|
|
184
|
-
"test:workflow": "bash validators/validate-workflow.sh",
|
|
185
|
-
"check": "npm run build && npm run test:js && npm run test:py && npm run test:workflow"
|
|
186
|
-
}
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
**Rationale:**
|
|
190
|
-
|
|
191
|
-
로컬과 CI가 같은 검증 명령을 사용하게 만든다.
|
|
192
|
-
|
|
193
|
-
**Validation:**
|
|
194
|
-
|
|
195
|
-
```bash
|
|
196
|
-
npm run check
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
## Task 5: CI workflow 추가
|
|
202
|
-
|
|
203
|
-
**Files:**
|
|
204
|
-
|
|
205
|
-
- Add: `.github/workflows/ci.yml`
|
|
206
|
-
|
|
207
|
-
**Implementation:**
|
|
208
|
-
|
|
209
|
-
- [x] `pull_request`와 `main` push에서 실행한다.
|
|
210
|
-
- [x] Node 22와 Python 3.11을 설정한다.
|
|
211
|
-
- [x] pytest를 설치한다.
|
|
212
|
-
- [x] `npm run check`를 실행한다.
|
|
213
|
-
|
|
214
|
-
Suggested workflow:
|
|
215
|
-
|
|
216
|
-
```yaml
|
|
217
|
-
name: CI
|
|
218
|
-
|
|
219
|
-
on:
|
|
220
|
-
pull_request:
|
|
221
|
-
push:
|
|
222
|
-
branches:
|
|
223
|
-
- main
|
|
224
|
-
|
|
225
|
-
permissions:
|
|
226
|
-
contents: read
|
|
227
|
-
|
|
228
|
-
jobs:
|
|
229
|
-
test:
|
|
230
|
-
runs-on: ubuntu-latest
|
|
231
|
-
steps:
|
|
232
|
-
- uses: actions/checkout@v4
|
|
233
|
-
|
|
234
|
-
- uses: actions/setup-node@v4
|
|
235
|
-
with:
|
|
236
|
-
node-version: '22'
|
|
237
|
-
|
|
238
|
-
- uses: actions/setup-python@v5
|
|
239
|
-
with:
|
|
240
|
-
python-version: '3.11'
|
|
241
|
-
|
|
242
|
-
- name: Install Python test dependencies
|
|
243
|
-
run: python -m pip install pytest
|
|
244
|
-
|
|
245
|
-
- name: Run full check
|
|
246
|
-
run: npm run check
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
**Note:**
|
|
250
|
-
|
|
251
|
-
`git diff --exit-code runtime/`는 이 저장소에 적합하지 않다. `runtime/*`은 gitignored build output이므로 CI는 build 성공과 테스트 통과를 검증한다.
|
|
252
|
-
|
|
253
|
-
---
|
|
254
|
-
|
|
255
|
-
## Task 6: 변경 이력 기록
|
|
256
|
-
|
|
257
|
-
**Files:**
|
|
258
|
-
|
|
259
|
-
- Modify: `CHANGES.md`
|
|
260
|
-
|
|
261
|
-
**Implementation:**
|
|
262
|
-
|
|
263
|
-
- [x] `2026-06-13` 섹션에 아래 항목을 추가한다.
|
|
264
|
-
|
|
265
|
-
```md
|
|
266
|
-
### chore(repo): 문서 drift와 runtime 수정 실수 방지 장치 추가
|
|
267
|
-
|
|
268
|
-
- **배경**: package version 같은 수동 문서 값과 generated `runtime/` 경계가 drift / 실수 위험을 만들 수 있었다.
|
|
269
|
-
- **해결**: 문서의 고정 version을 제거하고, build 시 `runtime/DO_NOT_EDIT.md`를 생성하며, workflow/profile contract test와 CI check를 추가했다.
|
|
270
|
-
- 사용자 영향: 기여자가 잘못된 파일을 수정하거나 profile/worker 계약을 깨뜨리는 변경을 더 빨리 발견할 수 있다.
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
---
|
|
274
|
-
|
|
275
|
-
## Final validation
|
|
276
|
-
|
|
277
|
-
Run in order:
|
|
278
|
-
|
|
279
|
-
```bash
|
|
280
|
-
npm run build
|
|
281
|
-
python3 -m pytest tests/test_repo_contracts.py -q
|
|
282
|
-
npm run test:js
|
|
283
|
-
python3 -m pytest tests/
|
|
284
|
-
bash validators/validate-workflow.sh
|
|
285
|
-
npm run check
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
Expected result: all pass.
|
|
289
|
-
|
|
290
|
-
---
|
|
291
|
-
|
|
292
|
-
## Rollback plan
|
|
293
|
-
|
|
294
|
-
If CI/test failures are unrelated or too broad:
|
|
295
|
-
|
|
296
|
-
1. Keep Task 1 and Task 3 if they pass independently.
|
|
297
|
-
2. Revert `.github/workflows/ci.yml` first if GitHub Actions environment issues appear.
|
|
298
|
-
3. Revert `package.json` `check` script only if local command composition is problematic.
|
|
299
|
-
4. Do not modify `runtime/` manually; rerun `npm run build` after any `tools/build.mjs` revert.
|
|
300
|
-
|
|
301
|
-
---
|
|
302
|
-
|
|
303
|
-
## Follow-up design notes
|
|
304
|
-
|
|
305
|
-
### P1. `okstra doctor --phase <phase>`
|
|
306
|
-
|
|
307
|
-
Potential checks:
|
|
308
|
-
|
|
309
|
-
| Phase | Checks |
|
|
310
|
-
|---|---|
|
|
311
|
-
| `implementation` | git repo, worktree support, approved-plan marker, worker agents |
|
|
312
|
-
| `final-verification` | worktree lookup, validation command availability, final-report prerequisites |
|
|
313
|
-
| `release-handoff` | `gh auth status`, clean git tree, remote exists, non-base current branch |
|
|
314
|
-
| `improvement-discovery` | gemini worker installed, lens whitelist importable |
|
|
315
|
-
|
|
316
|
-
### P1. contributor change matrix
|
|
317
|
-
|
|
318
|
-
Add `docs/contributor-change-matrix.md` with rows like:
|
|
319
|
-
|
|
320
|
-
| Change | Must update | Tests |
|
|
321
|
-
|---|---|---|
|
|
322
|
-
| Add CLI flag | `src/*`, `scripts/okstra_ctl/run.py`, `docs/kr/cli.md`, wizard prompts | JS + pytest |
|
|
323
|
-
| Add phase | `workflow.py`, `prompts/profiles`, validators, tests | workflow validator |
|
|
324
|
-
| Change worker roster | profile `Required workers`, `workers.py`, tests | worker contract tests |
|
|
325
|
-
| Change report section | schema, template, renderer, validator | final-report tests |
|
|
326
|
-
|
|
327
|
-
### P2. profile meta yaml
|
|
328
|
-
|
|
329
|
-
Possible future shape:
|
|
330
|
-
|
|
331
|
-
```yaml
|
|
332
|
-
taskType: implementation
|
|
333
|
-
requiredWorkers:
|
|
334
|
-
- claude
|
|
335
|
-
- codex
|
|
336
|
-
- report-writer
|
|
337
|
-
optionalWorkers:
|
|
338
|
-
- gemini
|
|
339
|
-
executorAllowed:
|
|
340
|
-
- claude
|
|
341
|
-
- codex
|
|
342
|
-
- gemini
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
For now, markdown `Required workers:` remains the authority.
|
|
346
|
-
|
|
347
|
-
---
|
|
348
|
-
|
|
349
|
-
## P2 구현 계획 (P2-1 + P2-3 먼저, 이후 P2-2)
|
|
350
|
-
|
|
351
|
-
조사 근거: `agent://CommandRegistryProbe`, `agent://ForbiddenAuditProbe`, `agent://ProfileMetaProbe`.
|
|
352
|
-
P2-2(profile meta yaml)는 파서 3개 + `PHASE_RULES`↔profile 산문의 기존 divergence reconcile 이 필요해 1차에서는 보류했으나, 이후 forbidden 범위로 좁혀 JSON SSOT(docs/superpowers/specs/2026-06-13-forbidden-actions-ssot-design.md)로 구현 완료했다.
|
|
353
|
-
|
|
354
|
-
### P2-1: command metadata registry
|
|
355
|
-
|
|
356
|
-
**Files:**
|
|
357
|
-
- Create: `src/cli-registry.mjs` — `COMMAND_REGISTRY` 배열 + 파생 `COMMANDS`(Map) + 파생 `USAGE`(string).
|
|
358
|
-
- Modify: `bin/okstra` — 인라인 `COMMANDS`/`USAGE` 제거, `src/cli-registry.mjs` 에서 import.
|
|
359
|
-
- Test: `tests-js/cli-registry.test.mjs`.
|
|
360
|
-
|
|
361
|
-
**Registry entry shape:**
|
|
362
|
-
```js
|
|
363
|
-
// { name, module, export: exportName, category, summary }
|
|
364
|
-
// category ∈ { "admin", "introspection" }
|
|
365
|
-
// summary: string[] (1번째=요약 첫 줄, 이후=연속행. 들여쓰기 미포함)
|
|
366
|
-
```
|
|
367
|
-
- 디스플레이 순서 = 현재 USAGE 순서(admin 11개, introspection 16개)를 verbatim 보존.
|
|
368
|
-
- `export` 필드로 install 3종(`runInstall`/`runEnsureInstalled`/`runUninstall`) 흡수, 나머지는 `run`.
|
|
369
|
-
- USAGE 렌더: static preamble/footer 유지, 각 행 `" " + name.padEnd(23) + summary[0]`, 연속행 `" ".repeat(25) + line` (현재 컬럼=25 실측).
|
|
370
|
-
- `COMMANDS` = `new Map(COMMAND_REGISTRY.map(c => [c.name, () => import(c.module).then(m => m[c.export])]))`.
|
|
371
|
-
- per-command `--help`(모듈 소유)와 외부 doc table(Option D)은 범위 밖.
|
|
372
|
-
|
|
373
|
-
**TDD:**
|
|
374
|
-
1. RED `tests-js/cli-registry.test.mjs`:
|
|
375
|
-
- `buildCommandsMap()` 키 집합 == `COMMAND_REGISTRY` name 집합.
|
|
376
|
-
- 모든 registry name 이 `USAGE` 에 등장, admin/introspection 헤더 아래 개수가 category 카운트와 일치.
|
|
377
|
-
- name 중복 없음, 각 name 은 정확히 1개 category.
|
|
378
|
-
- byte-anchor: `USAGE` 에 `codex-run` / `codex-dispatch` 의 현재 요약 첫 줄 정확히 포함(기존 top-level help 테스트와 정합).
|
|
379
|
-
2. GREEN: `src/cli-registry.mjs` 구현 후 `bin/okstra` 가 import 하도록 교체.
|
|
380
|
-
3. 기존 `tests-js/*.test.mjs` (codex-run/codex-dispatch top-level help, cli-script-wrappers) 회귀 통과.
|
|
381
|
-
|
|
382
|
-
### P2-3: forbidden action post-run audit 자동화
|
|
383
|
-
|
|
384
|
-
**Files:**
|
|
385
|
-
- Create: `validators/forbidden_actions.py` — per-phase 구조화 deny-list(regex SSOT) + `scan_forbidden_actions(...)`.
|
|
386
|
-
- Modify: `validators/validate-run.py` — `_validate_session_conformance` 옆(`if task_type:` 블록, line ~2230)에 `_validate_forbidden_actions(...)` hook, 실패는 `forbidden-action: ` 접두로 fold.
|
|
387
|
-
- Test: `tests/test_validate_forbidden_actions.py`.
|
|
388
|
-
|
|
389
|
-
**Deny-list SSOT (보수적 — 맥락 무관 항상 위반만):**
|
|
390
|
-
```python
|
|
391
|
-
# 모든 phase 공통: okstra 어느 phase 도 publish/deploy/force-push 안 함
|
|
392
|
-
_UNIVERSAL = [
|
|
393
|
-
("npm publish", r"\bnpm\s+publish\b"),
|
|
394
|
-
("cargo publish", r"\bcargo\s+publish\b"),
|
|
395
|
-
("pip publish", r"\bpip\s+publish\b"),
|
|
396
|
-
("twine upload", r"\btwine\s+upload\b"),
|
|
397
|
-
("gh release", r"\bgh\s+release\s+(create|edit)\b"),
|
|
398
|
-
("docker push", r"\bdocker\s+push\b"),
|
|
399
|
-
("terraform apply", r"\bterraform\s+apply\b"),
|
|
400
|
-
("kubectl apply", r"\bkubectl\s+apply\b"),
|
|
401
|
-
("git push --force", r"\bgit\s+push\b.*--force(-with-lease)?\b"),
|
|
402
|
-
]
|
|
403
|
-
# release-handoff 는 feature-branch `git push` 허용 → bare push 는 비-handoff phase 에서만 위반
|
|
404
|
-
_NON_HANDOFF_PUSH = ("git push", r"\bgit\s+push\b")
|
|
405
|
-
```
|
|
406
|
-
- phase → 적용 패턴: 모든 phase 에 `_UNIVERSAL`; `release-handoff` 외 phase 에 `_NON_HANDOFF_PUSH` 추가.
|
|
407
|
-
|
|
408
|
-
**Scanner:**
|
|
409
|
-
- `find_claude_team_sessions(project_root, resolve_team_name(team_state), lead_sid, projects_root)` 로 lead+worker 세션 jsonl 발견(conformance seam 재사용).
|
|
410
|
-
- `resolve_run_window` 로 [since, until] 스코프. assistant 레코드 & `not isSidechain` 만, `tool_use` && `name == "Bash"` 의 `input.command` 를 패턴 매칭.
|
|
411
|
-
- 위반 1건당 `f"{label} 명령이 {agent} 세션에서 실행됨: {command[:120]}"`.
|
|
412
|
-
- codex/gemini wrapper 의 셸 명령은 claude jsonl 밖 → 문서화된 한계(스캐너는 claude lead + claude worker 세션만).
|
|
413
|
-
|
|
414
|
-
**TDD:**
|
|
415
|
-
1. RED `tests/test_validate_forbidden_actions.py` (conformance 테스트의 Fixture 패턴 차용 — `claude_projects_dir` 주입, team-needle 태그 jsonl):
|
|
416
|
-
- implementation 세션에 `git push origin x` Bash → 위반 1건.
|
|
417
|
-
- implementation 세션에 `npm publish` → 위반.
|
|
418
|
-
- release-handoff 세션에 `git push -u origin feat` → 위반 없음(허용).
|
|
419
|
-
- release-handoff 세션에 `git push --force origin feat` → 위반(force).
|
|
420
|
-
- 깨끗한 세션(`npm test`, `git status`) → 위반 없음.
|
|
421
|
-
- 패턴이 prompt/text 블록에만 있고 Bash tool_use 가 아니면 → 위반 없음(false-positive 가드).
|
|
422
|
-
2. GREEN: `validators/forbidden_actions.py` 구현 + `validate-run.py` hook.
|
|
423
|
-
3. 회귀: `tests/test_validate_session_conformance.py`, `tests/test_validate_run_*.py` 통과.
|
|
424
|
-
|
|
425
|
-
### Verification
|
|
426
|
-
```bash
|
|
427
|
-
node --test tests-js/cli-registry.test.mjs
|
|
428
|
-
python3 -m pytest tests/test_validate_forbidden_actions.py -q
|
|
429
|
-
npm run check
|
|
430
|
-
```
|
|
431
|
-
|
|
432
|
-
---
|
|
433
|
-
|
|
434
|
-
## Execution notes — 2026-06-13
|
|
435
|
-
|
|
436
|
-
Implemented P0 scope.
|
|
437
|
-
|
|
438
|
-
Initial validation run:
|
|
439
|
-
|
|
440
|
-
```bash
|
|
441
|
-
python3 -m pytest tests/test_repo_contracts.py -q
|
|
442
|
-
npm run build
|
|
443
|
-
npm run test:js
|
|
444
|
-
bash validators/validate-workflow.sh
|
|
445
|
-
```
|
|
446
|
-
|
|
447
|
-
Observed result: all commands above passed. `npm run check` was also started, but the local harness killed it after 600 seconds while the full pytest suite was still progressing; no test failure was observed before timeout.
|
|
448
|
-
|
|
449
|
-
Follow-up validation run:
|
|
450
|
-
|
|
451
|
-
```bash
|
|
452
|
-
python3 -m pytest tests/test_okstra_ctl_show_open.py::test_open_prints_absolute_final_report_path -q
|
|
453
|
-
npm run check
|
|
454
|
-
```
|
|
455
|
-
|
|
456
|
-
Observed result: both commands passed. The first full `npm run check` attempt exposed an ambient `EDITOR` leak in `tests/test_okstra_ctl_show_open.py`; the test helper now removes inherited `EDITOR` unless a test explicitly passes it.
|
|
457
|
-
|
|
458
|
-
P1 follow-up:
|
|
459
|
-
|
|
460
|
-
```bash
|
|
461
|
-
python3 -m pytest tests/test_okstra_doctor_phase.py -q
|
|
462
|
-
node --test tests-js/doctor-runtime.test.mjs
|
|
463
|
-
```
|
|
464
|
-
|
|
465
|
-
Observed result: both targeted checks passed after adding `okstra doctor --phase <phase>` readiness diagnostics.
|
|
466
|
-
|
|
467
|
-
P1 completion:
|
|
468
|
-
|
|
469
|
-
```bash
|
|
470
|
-
python3 -m pytest tests/test_repo_contracts.py tests/test_final_report_contracts.py tests/test_schema_excerpt.py tests/test_final_report_stage_reports_render.py tests/test_validate_final_verification_consistency.py -q
|
|
471
|
-
npm run check
|
|
472
|
-
```
|
|
473
|
-
|
|
474
|
-
Observed result: focused suite reported 51 passed; full `npm run check` completed build, JS tests, Python tests, and workflow validator successfully.
|
|
475
|
-
|
|
476
|
-
P2 completion (P2-1 + P2-3; P2-2 보류):
|
|
477
|
-
|
|
478
|
-
```bash
|
|
479
|
-
node --test tests-js/cli-registry.test.mjs
|
|
480
|
-
python3 -m pytest tests/test_validate_forbidden_actions.py -q
|
|
481
|
-
npm run check
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
Observed result: registry 5 passed, forbidden-actions 8 passed; full `npm run check` = JS 59 passed, Python 1558 passed/2 skipped, workflow validator success. `okstra --help` byte-identical (registry는 단일 SSOT로 COMMANDS/USAGE 파생). Reviewer APPROVED after one CHANGES_REQUESTED round (force-push `-f` 단축 플래그 미탐 등 6건 반영).
|
|
485
|
-
|
|
486
|
-
P2-2 completion (forbidden-actions JSON SSOT):
|
|
487
|
-
|
|
488
|
-
```bash
|
|
489
|
-
python3 -m pytest tests/test_phase_forbidden_ssot.py tests/test_profile_forbidden_placeholder.py tests/test_workflow_phase_sequence.py -q
|
|
490
|
-
bash validators/validate-workflow.sh
|
|
491
|
-
```
|
|
492
|
-
|
|
493
|
-
Observed result: SSOT/placeholder/workflow 단위 30 passed; workflow validator success(렌더된 launch 경계 forbidden이 JSON에서 주입됨 확인); implementation/release-handoff profile placeholder 치환 검증(13/11 bullets, leftover 없음). Reviewer APPROVED (P3 docstring drift 1건 반영). 단, `npm run check`의 `tests/test_context_cost.py` 2건은 **환경성 실패**(codex/gemini-worker가 빌드 생성물이라 repo static 부재 + ~/.claude 미설치) — 이 diff와 무관하며 `okstra install`로 ~/.claude agents를 복구하면 해소된다.
|