okstra 0.104.0 → 0.106.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.
- package/README.kr.md +1 -0
- package/README.md +2 -1
- package/docs/contributor-change-matrix.md +3 -0
- package/docs/for-ai/README.md +5 -1
- package/docs/for-ai/skills/okstra-manager.md +62 -0
- package/docs/for-ai/skills/okstra-rollup.md +113 -0
- package/docs/kr/architecture/storage-model.md +29 -8
- package/docs/kr/architecture.md +5 -4
- package/docs/kr/cli.md +3 -3
- package/docs/project-structure-overview.md +36 -8
- package/docs/task-process/README.md +8 -6
- package/docs/task-process/common-flow.md +12 -3
- package/docs/task-process/final-verification.md +37 -26
- package/docs/task-process/implementation.md +28 -14
- package/docs/task-process/release-handoff.md +23 -9
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/python/okstra_ctl/container_registry.py +10 -31
- package/runtime/python/okstra_ctl/json_registry.py +43 -0
- package/runtime/python/okstra_ctl/rollup.py +113 -0
- package/runtime/python/okstra_ctl/worktree_registry.py +6 -32
- package/runtime/skills/okstra-rollup/SKILL.md +73 -0
- package/src/cli-registry.mjs +7 -0
- package/src/commands/inspect/rollup.mjs +27 -0
- package/src/lib/skill-catalog.mjs +1 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: okstra-rollup
|
|
3
|
+
description: |
|
|
4
|
+
Use when the user wants run results from MULTIPLE okstra tasks collected and summarized at once — a task-group digest or a whole-project roll-up, not a single task. Aggregates per-task run count, elapsed time, error count, and latest report path, plus group-level totals and status/category/phase tallies, then synthesizes a cross-task prose summary from the report files. Make sure to use this skill whenever the user mentions "okstra rollup", "롤업", "task-group 요약", "그룹 단위 리포트", "여러 task 결과 모아", "전체 task 현황 요약", "cross-task summary", "그룹 종합 리포트", "모든 task 정리", "run 결과 한꺼번에", even if they don't say "rollup". For a SINGLE task's report/time/errors/recap use okstra-inspect instead; for a forward-looking work plan over non-done tasks use okstra-schedule.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# OKSTRA Rollup
|
|
8
|
+
|
|
9
|
+
Cross-task roll-up: collect every catalog task's run results (optionally scoped to one task-group) and summarize them together. The `rollup` CLI does all deterministic aggregation — counts, time sums, error tallies, status/category/phase distributions. You resolve scope, call it, render the table, and synthesize the prose digest from the report files. **Never recompute totals or re-tally by hand** — the CLI is the SSOT for the numbers.
|
|
10
|
+
|
|
11
|
+
This skill is read-only. It never mutates task artifacts.
|
|
12
|
+
|
|
13
|
+
## Step 0: Verify okstra runtime + project setup
|
|
14
|
+
|
|
15
|
+
Run each command as a **separate Bash tool call**, each starting with the literal token `okstra` so the `Bash(okstra:*)` permission match succeeds. Do **not** wrap any of them in `if`, `eval`, `$(...)`, `VAR=...`, `||`, `&&`, or an `npx` fallback — those defeat the permission match.
|
|
16
|
+
|
|
17
|
+
1. `okstra ensure-installed --runtime claude-code`
|
|
18
|
+
Non-zero exit → tell the user: "okstra not installed — run `/okstra-setup` first." Then stop.
|
|
19
|
+
|
|
20
|
+
2. `okstra check-project --json`
|
|
21
|
+
Parse `{ok, projectRoot, ...}` from stdout. `ok: false` → "this project has no okstra setup. Run `/okstra-setup` first." Then stop. `ok: true` → carry `projectRoot` as a literal string.
|
|
22
|
+
|
|
23
|
+
## Step 1: Resolve scope
|
|
24
|
+
|
|
25
|
+
- User named a task-group (e.g. "alpha 그룹 요약") → use it as `--task-group <group>`.
|
|
26
|
+
- User asked for the whole project ("전체 task", "프로젝트 전체") or named no scope → omit `--task-group` (whole catalog).
|
|
27
|
+
- If genuinely ambiguous, ask once: one task-group, or the whole project? Do not silently guess a specific group.
|
|
28
|
+
|
|
29
|
+
## Step 2: Fetch the roll-up
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
okstra rollup --task-group <group> --project-root <projectRoot> --json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Omit `--task-group` for the whole project. The JSON shape (all durations are **raw milliseconds**):
|
|
36
|
+
|
|
37
|
+
- `taskGroup` — the scope (`null` = whole project), `taskCount` — number of tasks.
|
|
38
|
+
- `tasks[]` — per task: `taskKey, taskGroup, taskId, taskType, workCategory, workStatus, currentPhase, currentPhaseState, nextRecommendedPhase, latestRunStatus, updatedAt, reportPath, runCount, cpuSumMs, wallClockMs, errorCount`.
|
|
39
|
+
- `totals` — `runs, cpuSumMs, wallClockMs, errors`, plus `byWorkStatus`, `byWorkCategory`, `byCurrentPhase`, `byTaskType` (each a `{value: count}` map).
|
|
40
|
+
|
|
41
|
+
`runCount` counts every timeline run; `cpuSumMs`/`wallClockMs` only reflect runs that reached Phase 7 usage, so they can be `0` while `runCount > 0`. `reportPath` is project-relative and may be empty (task not yet reported).
|
|
42
|
+
|
|
43
|
+
If `taskCount` is `0`, tell the user there are no okstra tasks in that scope and stop.
|
|
44
|
+
|
|
45
|
+
## Step 3: Render the roll-up table
|
|
46
|
+
|
|
47
|
+
Convert every `*Ms` to `HH:MM:SS` (zero-pad; never show raw ms). `cpuSumMs` is CPU-sum (lead + workers overlap), not wall-clock — label it "CPU"; only surface `wallClockMs` when the user asks. Sort tasks by `updatedAt` desc.
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
## okstra Rollup — <task-group or "whole project"> (<taskCount> tasks)
|
|
51
|
+
|
|
52
|
+
| Task | Category | workStatus | Phase | Runs | CPU | Errors | Report |
|
|
53
|
+
|------|----------|------------|-------|------|-----|--------|--------|
|
|
54
|
+
| DEV-1 | bugfix | done | final-verification | 2 | 00:25:00 | 2 | ✓ |
|
|
55
|
+
| DEV-2 | feature | in-progress | implementation | 1 | 00:00:00 | 0 | — |
|
|
56
|
+
|
|
57
|
+
**Totals:** 3 runs · CPU 00:25:00 · 2 errors
|
|
58
|
+
**workStatus:** done 1 · in-progress 1 **category:** bugfix 1 · feature 1
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Render `Report` as `✓` when `reportPath` is non-empty, else `—`. Build the status/category lines from the `totals` tally maps verbatim — do not count the `tasks[]` array yourself.
|
|
62
|
+
|
|
63
|
+
## Step 4: Synthesize the digest (the summary)
|
|
64
|
+
|
|
65
|
+
This is the skill's value-add over a bare table. When the user asked to "요약"/"summarize"/"digest"/"정리" (the common case), produce a short cross-task narrative:
|
|
66
|
+
|
|
67
|
+
1. For each task with a non-empty `reportPath` whose file exists under `<projectRoot>/<reportPath>`, read it and write a 1–2 line summary of what it accomplished and its recommended next step.
|
|
68
|
+
2. Above the per-task lines, write a 2–4 sentence group-level synthesis: what was delivered across the group, where the open work sits (use `byWorkStatus`/`byCurrentPhase`), and any error hot-spots (tasks with high `errorCount`).
|
|
69
|
+
3. Cite each per-task claim with the report path as `<reportPath>` so the reader can open it.
|
|
70
|
+
|
|
71
|
+
For tasks with no report, state the current phase/workStatus instead of inventing a summary — do not read non-report artifacts to fill the gap.
|
|
72
|
+
|
|
73
|
+
Keep the digest to what the reports actually say; if a report is missing or empty, say so rather than guessing. For a deeper single-task drill-down (full report, per-worker time, error breakdown, run-to-run recap), point the user to `/okstra-inspect`.
|
package/src/cli-registry.mjs
CHANGED
|
@@ -152,6 +152,13 @@ export const COMMAND_REGISTRY = [
|
|
|
152
152
|
category: "introspection",
|
|
153
153
|
summary: ["Assemble a task's run-to-run phase recap or append a recap log entry"],
|
|
154
154
|
},
|
|
155
|
+
{
|
|
156
|
+
name: "rollup",
|
|
157
|
+
module: "./commands/inspect/rollup.mjs",
|
|
158
|
+
export: "run",
|
|
159
|
+
category: "introspection",
|
|
160
|
+
summary: ["Roll up run results across a task-group's tasks (raw ms + tallies)"],
|
|
161
|
+
},
|
|
155
162
|
{
|
|
156
163
|
name: "container",
|
|
157
164
|
module: "./commands/inspect/container.mjs",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { runPythonModule } from "../../lib/python-helper.mjs";
|
|
2
|
+
|
|
3
|
+
const USAGE = `okstra rollup — roll up run results across a task-group's tasks
|
|
4
|
+
|
|
5
|
+
Usage:
|
|
6
|
+
okstra rollup [--task-group <group>] [--project-root <dir>] [--cwd <dir>]
|
|
7
|
+
|
|
8
|
+
Read-only. Prints a JSON roll-up of every catalog task (optionally scoped to one
|
|
9
|
+
task-group): per-task run count, elapsed time (raw ms), error count, and the
|
|
10
|
+
latest report path, plus group-level totals and status/category/phase tallies.
|
|
11
|
+
With no --task-group it covers the whole project catalog. Time is raw ms; the
|
|
12
|
+
caller formats HH:MM:SS and synthesizes the prose digest from the report files.
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
export async function run(args) {
|
|
16
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
17
|
+
process.stdout.write(USAGE);
|
|
18
|
+
return 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const result = await runPythonModule({
|
|
22
|
+
module: "okstra_ctl.rollup",
|
|
23
|
+
args,
|
|
24
|
+
stdio: "inherit-stdout",
|
|
25
|
+
});
|
|
26
|
+
return result.code;
|
|
27
|
+
}
|