From 81d4e80fd5aabe4e80f58e960affa795cf7d34ec Mon Sep 17 00:00:00 2001 From: godosa Date: Wed, 7 Oct 2026 07:27:17 +0200 Subject: workflow: initial public history --- .gitattributes | 1 + .gitignore | 5 + CHANGES.md | 184 +++ CLAUDE.md | 30 + CREDITS.md | 8 + LICENSE | 21 + README.md | 156 ++ docs/cloud-lane.md | 195 +++ docs/design.md | 329 ++++ docs/lanes.md | 115 ++ docs/manual.md | 239 +++ docs/multi-session.md | 46 + docs/orchestrator.md | 152 ++ docs/resource-ledger.md | 304 ++++ scripts/publish_snapshot.py | 159 ++ shared/CLAUDE.md | 70 + shared/agents/wf-worker.md | 53 + shared/skills/wf-design/SKILL.md | 30 + shared/skills/wf-orchestrate-loop/SKILL.md | 8 + shared/skills/wf-orchestrate/SKILL.md | 42 + shared/skills/wf-pilot/SKILL.md | 44 + templates/CLAUDE.md | 21 + templates/TASKS.md | 12 + templates/archive.md | 1 + templates/batch-prompt.md | 1 + templates/cloud-prompt.md | 38 + templates/prep-prompt.md | 1 + templates/workflow.toml | 36 + tests/test_areas.py | 319 ++++ tests/test_batch.py | 534 +++++++ tests/test_check.py | 304 ++++ tests/test_claims.py | 182 +++ tests/test_cli.py | 752 ++++++++++ tests/test_cloud.py | 1174 +++++++++++++++ tests/test_config.py | 134 ++ tests/test_ctx_hint.py | 98 ++ tests/test_finish.py | 210 +++ tests/test_gate.py | 74 + tests/test_human_done.py | 40 + tests/test_lanes.py | 408 +++++ tests/test_ledgers.py | 26 + tests/test_lock.py | 30 + tests/test_merge.py | 159 ++ tests/test_migrate.py | 160 ++ tests/test_model.py | 247 +++ tests/test_orch.py | 227 +++ tests/test_publish_snapshot.py | 122 ++ tests/test_refs.py | 109 ++ tests/test_res.py | 751 ++++++++++ tests/test_res_io.py | 815 ++++++++++ tests/test_runner.py | 81 + tests/test_search.py | 78 + tests/test_sessions_field.py | 197 +++ tests/test_setup.py | 164 ++ tests/test_start.py | 109 ++ tests/test_tasks.py | 523 +++++++ tests/test_usage.py | 337 +++++ wf.py | 2239 ++++++++++++++++++++++++++++ wf_cloud.py | 720 +++++++++ wf_res.py | 1208 +++++++++++++++ wflib/__init__.py | 0 wflib/areas.py | 199 +++ wflib/check.py | 378 +++++ wflib/cloud.py | 442 ++++++ wflib/config.py | 225 +++ wflib/lanes.py | 297 ++++ wflib/ledgers.py | 35 + wflib/migrate.py | 237 +++ wflib/refs.py | 107 ++ wflib/res.py | 993 ++++++++++++ wflib/search.py | 82 + wflib/tasks.py | 728 +++++++++ wflib/usage.py | 375 +++++ 73 files changed, 18930 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 CHANGES.md create mode 100644 CLAUDE.md create mode 100644 CREDITS.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 docs/cloud-lane.md create mode 100644 docs/design.md create mode 100644 docs/lanes.md create mode 100644 docs/manual.md create mode 100644 docs/multi-session.md create mode 100644 docs/orchestrator.md create mode 100644 docs/resource-ledger.md create mode 100755 scripts/publish_snapshot.py create mode 100644 shared/CLAUDE.md create mode 100644 shared/agents/wf-worker.md create mode 100644 shared/skills/wf-design/SKILL.md create mode 100644 shared/skills/wf-orchestrate-loop/SKILL.md create mode 100644 shared/skills/wf-orchestrate/SKILL.md create mode 100644 shared/skills/wf-pilot/SKILL.md create mode 100644 templates/CLAUDE.md create mode 100644 templates/TASKS.md create mode 100644 templates/archive.md create mode 100644 templates/batch-prompt.md create mode 100644 templates/cloud-prompt.md create mode 100644 templates/prep-prompt.md create mode 100644 templates/workflow.toml create mode 100644 tests/test_areas.py create mode 100644 tests/test_batch.py create mode 100644 tests/test_check.py create mode 100644 tests/test_claims.py create mode 100644 tests/test_cli.py create mode 100644 tests/test_cloud.py create mode 100644 tests/test_config.py create mode 100644 tests/test_ctx_hint.py create mode 100644 tests/test_finish.py create mode 100644 tests/test_gate.py create mode 100644 tests/test_human_done.py create mode 100644 tests/test_lanes.py create mode 100644 tests/test_ledgers.py create mode 100644 tests/test_lock.py create mode 100644 tests/test_merge.py create mode 100644 tests/test_migrate.py create mode 100644 tests/test_model.py create mode 100644 tests/test_orch.py create mode 100644 tests/test_publish_snapshot.py create mode 100644 tests/test_refs.py create mode 100644 tests/test_res.py create mode 100644 tests/test_res_io.py create mode 100644 tests/test_runner.py create mode 100644 tests/test_search.py create mode 100644 tests/test_sessions_field.py create mode 100644 tests/test_setup.py create mode 100644 tests/test_start.py create mode 100644 tests/test_tasks.py create mode 100644 tests/test_usage.py create mode 100755 wf.py create mode 100644 wf_cloud.py create mode 100644 wf_res.py create mode 100644 wflib/__init__.py create mode 100644 wflib/areas.py create mode 100644 wflib/check.py create mode 100644 wflib/cloud.py create mode 100644 wflib/config.py create mode 100644 wflib/lanes.py create mode 100644 wflib/ledgers.py create mode 100644 wflib/migrate.py create mode 100644 wflib/refs.py create mode 100644 wflib/res.py create mode 100644 wflib/search.py create mode 100644 wflib/tasks.py create mode 100644 wflib/usage.py diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7ac043d --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +CHANGES.md merge=union diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..30e97e5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +__pycache__/ +inbox.md +.worktrees/ +.superpowers/ +publish-denylist.local diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..5f02c1e --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,184 @@ +# Changes (newest first) +- 2026-10-07 Tests use generic fixtures (/h/u, 10.0.0.x) instead of real home-dir and LAN paths (publish-scan clean). Projects: nothing. + +- 2026-10-06 Tool path is now `/projects/public/workflow` (was `/projects/workflow`): docs, shared CLAUDE.md, skills, wf-worker agent, messages. `wf projects` / `wf usage --report` scan the grandparent when the parent holds no project. Projects: point `~/.claude` symlinks/settings, `wf-res.service` and any script calling `wf.py` at the new path. +- 2026-10-06 New `scripts/publish_snapshot.py [DEST]`: scrubbed fresh-history snapshot of the master tree into a separate local repo (default ~/src/wf-public; drops inbox.md, .worktrees/, __pycache__/, out/); refuses on any word of the git-ignored `publish-denylist.local` in a path or file; one commit per run (new CHANGES lines as message); never pushes or adds a remote (docs/manual.md). Projects: nothing. +- 2026-10-06 docs/manual.md: owner-facing manual (setup, daily use per session type, writing good tasks, best practices, troubleshooting); linked from the README top (replaces 'no installation guide'). Projects: nothing. +- 2026-10-06 `wf orch post`: `--duration 0` (orchestrator lacked duration_ms) falls back to the time since the pick like an omitted one (was logged `0m00s`, starving the task p90 of `wf batch --left/--time-left`); a post-check-red post keeps the orch record, so the re-post after the fix logs the real duration. Projects: nothing. +- 2026-10-06 `wf res` entry project = main tree name (git common dir's parent), not the lane worktree dir (was 'slow'/'fast-2': history kinds split per worktree); `wf res hist`, history hints, `wf batch --status` use it too. Older history records keep their worktree name. Projects: nothing. +- 2026-10-06 `wf batch K --left DURATION`: K' = min(K, floor(left / task p90)) (p90 of done/handback durations in `out/wf-orch.log`, local lanes, > 0; < 3 runs → 30 min), prints `fit: K' of K tasks (…)`, K' = 0 → nothing started (rc 0); `--for` defaults to left. New `wf batch --time-left DEADLINE` → `time left X, task p90 Y (n runs): spawn|stop`; batch prompt runs it before each round (deadline = start + ceiling) and stops with 'stopped: deadline (…)'. wf-pilot launches with `--left