@hecer/yoke 0.2.0 → 0.8.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 (84) hide show
  1. package/CHANGELOG.md +130 -0
  2. package/README.md +583 -494
  3. package/bench/.runs/claude-2026-07-09T22-34-01/.yoke/config.yaml +6 -0
  4. package/bench/.runs/claude-2026-07-09T22-34-01/.yoke/context/DECISIONS.md +9 -0
  5. package/bench/.runs/claude-2026-07-09T22-34-01/.yoke/prd.yaml +38 -0
  6. package/bench/.runs/claude-2026-07-09T22-34-01/bench-verify.mjs +15 -0
  7. package/bench/.runs/claude-2026-07-09T22-34-01/package.json +9 -0
  8. package/bench/.runs/claude-2026-07-09T22-34-01/src/index.mjs +48 -0
  9. package/bench/.runs/claude-2026-07-09T22-34-01/tests/STORY-1.test.mjs +24 -0
  10. package/bench/.runs/claude-2026-07-09T22-34-01/tests/STORY-2.test.mjs +28 -0
  11. package/bench/.runs/claude-2026-07-09T22-34-01/tests/STORY-3.test.mjs +25 -0
  12. package/bench/.runs/gemini-2026-07-09T22-34-02/.yoke/config.yaml +6 -0
  13. package/bench/.runs/gemini-2026-07-09T22-34-02/.yoke/prd.yaml +32 -0
  14. package/bench/.runs/gemini-2026-07-09T22-34-02/bench-verify.mjs +15 -0
  15. package/bench/.runs/gemini-2026-07-09T22-34-02/package.json +9 -0
  16. package/bench/.runs/gemini-2026-07-09T22-34-02/src/index.mjs +3 -0
  17. package/bench/.runs/gemini-2026-07-09T22-34-02/tests/STORY-1.test.mjs +24 -0
  18. package/bench/.runs/gemini-2026-07-09T22-34-02/tests/STORY-2.test.mjs +28 -0
  19. package/bench/.runs/gemini-2026-07-09T22-34-02/tests/STORY-3.test.mjs +25 -0
  20. package/bench/README.md +42 -0
  21. package/bench/RESULTS.md +36 -0
  22. package/bench/fixtures/string-kit/.yoke/config.yaml +6 -0
  23. package/bench/fixtures/string-kit/.yoke/prd.yaml +32 -0
  24. package/bench/fixtures/string-kit/bench-verify.mjs +15 -0
  25. package/bench/fixtures/string-kit/package.json +9 -0
  26. package/bench/fixtures/string-kit/src/index.mjs +3 -0
  27. package/bench/fixtures/string-kit/tests/STORY-1.test.mjs +24 -0
  28. package/bench/fixtures/string-kit/tests/STORY-2.test.mjs +28 -0
  29. package/bench/fixtures/string-kit/tests/STORY-3.test.mjs +25 -0
  30. package/bench/results/claude-2026-07-09T22-34-01.json +40 -0
  31. package/bench/run.mjs +115 -0
  32. package/canon/loop/loop-spec.md +5 -1
  33. package/canon/manifest.yaml +3 -0
  34. package/canon/skills/yoke-retrofit/SKILL.md +1 -0
  35. package/canon/tools/claude-mem.md +15 -0
  36. package/canon/tools/ui-ux-pro-max.md +15 -0
  37. package/dist/cli.js +37 -6
  38. package/dist/loop/cleanup.js +44 -3
  39. package/dist/loop/loop.js +67 -2
  40. package/dist/loop/reporter.js +88 -4
  41. package/dist/loop/run-command.js +25 -8
  42. package/dist/loop/runner.js +133 -14
  43. package/dist/loop/watchdog.js +67 -17
  44. package/dist/retrofit/apply.js +10 -3
  45. package/dist/retrofit/config.js +9 -1
  46. package/dist/retrofit/gitignore.js +4 -0
  47. package/dist/retrofit/planners/claude.js +4 -1
  48. package/dist/retrofit/planners/gemini.js +2 -1
  49. package/dist/retrofit/preserve.js +51 -0
  50. package/dist/update/check.js +86 -0
  51. package/dist/update/refresh.js +28 -0
  52. package/dist/update/upgrade.js +30 -0
  53. package/docs/PUBLISHING.md +41 -0
  54. package/docs/superpowers/plans/2026-06-27-forge-a-canon.md +815 -0
  55. package/docs/superpowers/plans/2026-06-27-forge-b1-retrofit-claude.md +842 -0
  56. package/docs/superpowers/plans/2026-06-27-forge-b2-codex-gemini-tools.md +884 -0
  57. package/docs/superpowers/plans/2026-06-27-forge-c1-loop-engine.md +891 -0
  58. package/docs/superpowers/plans/2026-06-28-baustein-e-context-layer.md +981 -0
  59. package/docs/superpowers/plans/2026-06-28-forge-b3-settings-merge.md +364 -0
  60. package/docs/superpowers/plans/2026-06-28-forge-c2-loop-verify.md +502 -0
  61. package/docs/superpowers/plans/2026-06-28-forge-c3-multi-agent-runners.md +377 -0
  62. package/docs/superpowers/plans/2026-06-28-forge-c4-worktree-isolation.md +413 -0
  63. package/docs/superpowers/plans/2026-06-28-forge-c5-review-iteration.md +419 -0
  64. package/docs/superpowers/plans/2026-06-28-forge-cleanup-dep0190.md +233 -0
  65. package/docs/superpowers/plans/2026-06-28-forge-d-codegraph-choice-minimal-code.md +523 -0
  66. package/docs/superpowers/plans/2026-06-29-baustein-f-routing.md +258 -0
  67. package/docs/superpowers/plans/2026-06-29-baustein-g-loop-observability.md +1006 -0
  68. package/docs/superpowers/plans/2026-06-29-baustein-h-loop-robustness.md +374 -0
  69. package/docs/superpowers/plans/2026-06-30-baustein-i-visual-design-verification.md +450 -0
  70. package/docs/superpowers/plans/2026-07-02-baustein-j-cross-model-review-gstack-compose.md +645 -0
  71. package/docs/superpowers/plans/2026-07-02-baustein-k-zero-to-100-bootstrap.md +1024 -0
  72. package/docs/superpowers/plans/2026-07-02-baustein-m-flow-smoke-proofs.md +574 -0
  73. package/docs/superpowers/specs/2026-06-27-forge-cross-agent-harness-design.md +144 -0
  74. package/docs/superpowers/specs/2026-06-28-baustein-e-context-layer-design.md +146 -0
  75. package/docs/superpowers/specs/2026-06-29-baustein-f-routing-design.md +106 -0
  76. package/docs/superpowers/specs/2026-06-29-baustein-g-loop-observability-design.md +186 -0
  77. package/docs/superpowers/specs/2026-06-29-baustein-h-loop-robustness-design.md +113 -0
  78. package/docs/superpowers/specs/2026-06-30-baustein-i-visual-design-verification-design.md +98 -0
  79. package/docs/superpowers/specs/2026-07-02-baustein-j-cross-model-review-gstack-compose-design.md +137 -0
  80. package/docs/superpowers/specs/2026-07-02-baustein-k-zero-to-100-bootstrap-design.md +200 -0
  81. package/docs/superpowers/specs/2026-07-02-baustein-m-flow-smoke-proofs-design.md +155 -0
  82. package/docs/superpowers/specs/2026-07-10-companion-tools-decision.md +33 -0
  83. package/docs/superpowers/specs/2026-07-10-multi-agent-parallel-loop-design.md +99 -0
  84. package/package.json +8 -2
package/CHANGELOG.md ADDED
@@ -0,0 +1,130 @@
1
+ # Changelog
2
+
3
+ ## 0.8.0 — 2026-07-20
4
+
5
+ ### Added
6
+ - **Live progress + ETA.** Story completions are now first-class events: the console shows
7
+ `✓ S6 done in 4m28s — 20/45 (44%) · ~1h40m left`, every status (file, NDJSON stream,
8
+ `yoke loop status`) carries `percent` and an `eta` block. The estimate averages the
9
+ durations of stories completed **in this run** (current velocity) and falls back to the
10
+ persisted history of previous runs (`.yoke/story-durations.json`, last 50, gitignored).
11
+ No data → no estimate, never an invented one.
12
+ - **Ambiguity policy** (`loop.onAmbiguity` / `--on-ambiguity=<resolve|abort>`). The runner
13
+ prompt now always forbids asking questions (a loop run has nobody to answer). Default
14
+ `resolve`: the agent settles ambiguous criteria itself, states the interpretation, and the
15
+ loop never stops. Opt-in `abort`: the agent writes its open questions to
16
+ `.yoke/ambiguity.md` and stops; the loop consumes the file, skips verify (an unimplemented
17
+ story would otherwise pass on pre-existing green tests), and blocks with the question as
18
+ the reason. Companion principle: clarifying questions belong in the planning round, before
19
+ the loop starts.
20
+
21
+ ## 0.7.0 — 2026-07-17
22
+
23
+ ### Added
24
+ - **Update check + `yoke upgrade`.** Every CLI invocation ends with a non-blocking
25
+ version hint (npm/gh-style): a detached background refresher caches the registry's
26
+ latest at most once a day; when it is newer, a one-line stderr hint suggests
27
+ `yoke upgrade` (which runs `npm install -g @hecer/yoke@latest`). Silent in CI,
28
+ `--json` runs, non-TTY pipes, and under `YOKE_NO_UPDATE_CHECK=1`.
29
+ - **Opt-in auto-upgrade** (`update.auto: true` in `.yoke/config.yaml`): evaluated at
30
+ loop START only — never mid-run; the running process finishes on its version and
31
+ the upgrade applies from the next invocation. Deliberately NOT the default:
32
+ a gate harness must not change itself mid-project (determinism), and unreviewed
33
+ auto-installs are a supply-chain hazard.
34
+
35
+ ## 0.6.0 — 2026-07-17
36
+
37
+ ### Added
38
+ - **Project-scoped orphan reaping.** The watchdog now records its pids in the project's
39
+ `.yoke/runner.pid` (main dir and per-story worktrees; removed on clean exit), and
40
+ `yoke loop cleanup` kills exactly those recorded process trees — and only while no
41
+ live loop holds the lock. Background: without a scoped mechanism, users and agents
42
+ resorted to machine-wide pattern kills (every process matching
43
+ `dangerously-skip-permissions`), which took down *healthy* runners of other projects
44
+ mid-story and stalled their loops. Never kill by pattern; `yoke loop cleanup` is the
45
+ safe path. `.yoke/runner.pid` is gitignored by retrofit.
46
+
47
+ ## 0.5.0 — 2026-07-17
48
+
49
+ Root-cause fixes for the two "yoke keeps hanging" failure modes observed in the field
50
+ (orphaned `claude.exe` runners piling up, healthy long stories dying at exactly the
51
+ idle window):
52
+
53
+ ### Fixed
54
+ - **Watchdog now kills the whole process tree on Windows** (`taskkill /T /F`).
55
+ Previously it killed only the spawned shell (`shell: true`), orphaning the actual
56
+ agent process — which kept writing to the worktree (dirty-tree blocks, failing
57
+ worktree removal) and kept burning API tokens. Observed in the field as ~10
58
+ zombie `claude.exe` per machine plus surviving dev servers.
59
+ - **Claude runner always runs in stream-json mode.** Plain `-p` prints nothing until
60
+ the run finishes, so the idle watchdog mistook healthy >20-minute stories for dead
61
+ processes and killed them at exactly the idle timeout — while the user saw dead air.
62
+ The stream doubles as liveness; token usage is now reported on every run (not just
63
+ `--json` mode).
64
+
65
+ ### Changed
66
+ - README: operating notes for driving the loop from inside an agent session
67
+ (background execution, small `--max` batches, `yoke loop cleanup` after interrupts) —
68
+ outer shell-tool timeouts killing a foreground `yoke loop run` were the third
69
+ observed "hang" pattern.
70
+
71
+ ## 0.4.0 — 2026-07-17
72
+
73
+ ### Added
74
+ - **Hardened runner prompts** — distilled agent-harness patterns for headless runs:
75
+ scope discipline (nothing beyond the story), no unsolicited summary/plan/analysis
76
+ documents, root-cause fixes instead of gate bypasses, faithful outcome reporting,
77
+ bounded final messages (cuts output-token waste). Review prompts now ground verdicts
78
+ in observed evidence only and keep them brief.
79
+
80
+ ### Fixed
81
+ - `.yoke/loop.pause` is now gitignored by retrofit. Previously the loop's own
82
+ `git add -A` story commit swept the pause control file into history in
83
+ un-retrofitted targets; removing it dirtied the tree and the clean-tree gate
84
+ blocked the resume run — the loop locked itself out.
85
+
86
+ > Note: 0.3.0 was tagged and released on GitHub but never reached npm (2FA re-login
87
+ > was pending), so for npm users 0.4.0 is the first release with the 0.3.0 changes below.
88
+
89
+ ## 0.3.0 — 2026-07-10
90
+
91
+ ### Added
92
+ - **Claude Code plugin packaging** — the repo is now its own plugin marketplace
93
+ (`.claude-plugin/plugin.json` + `marketplace.json`): `/plugin marketplace add HECer/yoke`,
94
+ then `/plugin install yoke@yoke` installs the full canon under the `yoke:` skill namespace.
95
+ - **Gemini CLI extension manifest** (`gemini-extension.json` + `GEMINI-EXTENSION.md`) —
96
+ installable via `gemini extensions install https://github.com/HECer/yoke`, listed in the
97
+ daily-crawled extensions gallery.
98
+ - **Benchmark harness** (`bench/`) — reproducible cross-runner benchmark (tokens · speed ·
99
+ quality) with a fixed fixture, pre-written objective tests, and committed result data.
100
+ - **Companion tool docs** — `canon/tools/claude-mem.md` (persistent memory; interactive
101
+ sessions only, explicitly kept out of loop runs) and `canon/tools/ui-ux-pro-max.md`
102
+ (design generation paired with Yoke's design verification gates).
103
+ - **Multi-agent parallel loop design** — evaluation + phased design for distributing PRD
104
+ stories across parallel workers (`needs` dependency field, claim files, merge queue,
105
+ heterogeneous cross-agent dispatch): `docs/superpowers/specs/2026-07-10-multi-agent-parallel-loop-design.md`.
106
+
107
+ ### Fixed
108
+ - Agent-availability probe timeout raised 5s → 20s: Gemini CLI cold-starts in ~6s on
109
+ Windows, so the loop misreported an installed `gemini` as "not found on PATH"
110
+ (found by the new benchmark harness).
111
+ - Gemini runner invocation: dropped the bare `-p` flag — current Gemini CLI (0.33+)
112
+ requires a value after `-p` and errored with "Not enough arguments following: p".
113
+ Piped stdin selects headless mode by itself, so the runner now passes only `--yolo`
114
+ (also found by the benchmark harness).
115
+
116
+ ### Changed
117
+ - README: npm install is now the primary quickstart path; documented plugin/extension
118
+ installs and optional companions.
119
+ - npm package now ships `CHANGELOG.md`, `bench/` (harness + result data), and
120
+ `docs/superpowers/` (all specs and plans, including the multi-agent parallel loop design).
121
+
122
+ ## 0.2.0 — 2026-07-09
123
+
124
+ - First npm release as `@hecer/yoke`.
125
+ - Hyperflow integration surface: `yoke loop run --json` NDJSON stream, pause signal,
126
+ token-usage + model-id reporting for the claude runner.
127
+ - `yoke new` greenfield bootstrap, `yoke prd draft`, cross-model `yoke review`,
128
+ `yoke flow-smoke` browser gate with proof artifacts, `yoke design-scan`.
129
+ - Retrofit planners for Claude Code, Codex CLI, Gemini CLI; canon of 26 skills;
130
+ loop with worktree isolation, watchdog, single-flight lock, commit integrity.