okstra 0.50.0 → 0.51.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 (57) hide show
  1. package/README.kr.md +8 -7
  2. package/README.md +8 -7
  3. package/bin/okstra +2 -0
  4. package/docs/kr/architecture.md +15 -16
  5. package/docs/kr/cli.md +5 -5
  6. package/docs/project-structure-overview.md +10 -6
  7. package/package.json +1 -1
  8. package/runtime/BUILD.json +2 -2
  9. package/runtime/agents/SKILL.md +15 -11
  10. package/runtime/agents/workers/claude-worker.md +3 -3
  11. package/runtime/agents/workers/codex-worker.md +2 -2
  12. package/runtime/agents/workers/gemini-worker.md +2 -2
  13. package/runtime/bin/lib/okstra/cli.sh +8 -1
  14. package/runtime/bin/lib/okstra/globals.sh +3 -0
  15. package/runtime/bin/lib/okstra/interactive.sh +14 -12
  16. package/runtime/bin/lib/okstra/usage.sh +6 -0
  17. package/runtime/bin/okstra-team-reconcile.sh +28 -0
  18. package/runtime/bin/okstra.sh +2 -0
  19. package/runtime/prompts/launch.template.md +3 -1
  20. package/runtime/prompts/profiles/_common-contract.md +4 -4
  21. package/runtime/prompts/profiles/_implementation-executor.md +2 -2
  22. package/runtime/prompts/profiles/_implementation-verifier.md +1 -1
  23. package/runtime/prompts/profiles/implementation-planning.md +1 -0
  24. package/runtime/prompts/profiles/implementation.md +1 -1
  25. package/runtime/python/okstra_ctl/analysis_packet.py +259 -0
  26. package/runtime/python/okstra_ctl/context_cost.py +308 -0
  27. package/runtime/python/okstra_ctl/migrate.py +2 -12
  28. package/runtime/python/okstra_ctl/paths.py +22 -0
  29. package/runtime/python/okstra_ctl/render.py +284 -125
  30. package/runtime/python/okstra_ctl/render_final_report.py +31 -0
  31. package/runtime/python/okstra_ctl/run.py +507 -245
  32. package/runtime/python/okstra_ctl/sequence.py +2 -5
  33. package/runtime/python/okstra_ctl/team_reconcile.py +131 -0
  34. package/runtime/python/okstra_ctl/wizard.py +129 -133
  35. package/runtime/python/okstra_ctl/worktree.py +13 -5
  36. package/runtime/schemas/final-report-v1.0.schema.json +4 -0
  37. package/runtime/skills/okstra-coding-preflight/SKILL.md +69 -0
  38. package/runtime/skills/okstra-coding-preflight/architecture/hexagonal.md +116 -0
  39. package/runtime/skills/okstra-coding-preflight/clean-code.md +254 -0
  40. package/runtime/skills/okstra-coding-preflight/languages/java.md +64 -0
  41. package/runtime/skills/okstra-coding-preflight/languages/javascript-typescript.md +87 -0
  42. package/runtime/skills/okstra-coding-preflight/languages/kotlin.md +69 -0
  43. package/runtime/skills/okstra-coding-preflight/languages/nodejs.md +66 -0
  44. package/runtime/skills/okstra-coding-preflight/languages/python.md +179 -0
  45. package/runtime/skills/okstra-coding-preflight/languages/rust.md +105 -0
  46. package/runtime/skills/okstra-coding-preflight/languages/sql.md +68 -0
  47. package/runtime/skills/okstra-context-loader/SKILL.md +12 -6
  48. package/runtime/skills/okstra-inspect/SKILL.md +100 -1
  49. package/runtime/skills/okstra-report-writer/SKILL.md +5 -1
  50. package/runtime/skills/okstra-run/SKILL.md +1 -1
  51. package/runtime/skills/okstra-team-contract/SKILL.md +7 -4
  52. package/runtime/templates/reports/final-report.template.md +1 -0
  53. package/runtime/templates/worker-prompt-preamble.md +3 -3
  54. package/src/_python-helper.mjs +3 -3
  55. package/src/context-cost.mjs +27 -0
  56. package/src/install.mjs +1 -0
  57. package/src/uninstall.mjs +1 -0
@@ -1,12 +1,12 @@
1
1
  import { spawn } from "node:child_process";
2
- import { resolvePaths } from "./paths.mjs";
2
+ import { buildPythonpath, resolvePaths } from "./paths.mjs";
3
3
 
4
4
  export async function runPythonSnippet({ script, args = [], extraEnv = {} }) {
5
5
  const paths = await resolvePaths();
6
6
  return new Promise((resolve) => {
7
7
  const child = spawn("python3", ["-c", script, ...args], {
8
8
  stdio: ["ignore", "pipe", "pipe"],
9
- env: { ...process.env, PYTHONPATH: paths.pythonpath, ...extraEnv },
9
+ env: { ...process.env, PYTHONPATH: buildPythonpath(paths), ...extraEnv },
10
10
  });
11
11
  let stdout = "";
12
12
  let stderr = "";
@@ -22,7 +22,7 @@ export async function runPythonModule({ module, args = [], extraEnv = {}, stdio
22
22
  return new Promise((resolve) => {
23
23
  const child = spawn("python3", ["-m", module, ...args], {
24
24
  stdio: stdio === "capture" ? ["ignore", "pipe", "pipe"] : ["ignore", "inherit", "inherit"],
25
- env: { ...process.env, PYTHONPATH: paths.pythonpath, ...extraEnv },
25
+ env: { ...process.env, PYTHONPATH: buildPythonpath(paths), ...extraEnv },
26
26
  });
27
27
  let stdout = "";
28
28
  let stderr = "";
@@ -0,0 +1,27 @@
1
+ import { runPythonModule } from "./_python-helper.mjs";
2
+
3
+ const USAGE = `okstra context-cost — estimate context/read cost for a task bundle
4
+
5
+ Usage:
6
+ okstra context-cost <task-root>
7
+ okstra context-cost <task-key> --project-root <dir>
8
+ okstra context-cost <task-key> --cwd <dir>
9
+
10
+ Output: JSON with task file counts, current-run counts, lead Phase 1 read
11
+ surface, analysis-worker initial read surface, and report-writer synthesis
12
+ surface. This is read-only; it never mutates task artifacts.
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.context_cost",
23
+ args,
24
+ stdio: "inherit-stdout",
25
+ });
26
+ return result.code ?? 0;
27
+ }
package/src/install.mjs CHANGED
@@ -22,6 +22,7 @@ const BIN_ENTRYPOINTS = [
22
22
  "okstra-codex-exec.sh",
23
23
  "okstra-gemini-exec.sh",
24
24
  "okstra-trace-cleanup.sh",
25
+ "okstra-team-reconcile.sh",
25
26
  "okstra-central.sh",
26
27
  "okstra-token-usage.py",
27
28
  "okstra-error-log.py",
package/src/uninstall.mjs CHANGED
@@ -8,6 +8,7 @@ const BIN_ENTRYPOINTS = [
8
8
  "okstra-codex-exec.sh",
9
9
  "okstra-gemini-exec.sh",
10
10
  "okstra-trace-cleanup.sh",
11
+ "okstra-team-reconcile.sh",
11
12
  "okstra-central.sh",
12
13
  "okstra-token-usage.py",
13
14
  "okstra-error-log.py",