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 --- templates/cloud-prompt.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 templates/cloud-prompt.md (limited to 'templates/cloud-prompt.md') diff --git a/templates/cloud-prompt.md b/templates/cloud-prompt.md new file mode 100644 index 0000000..6020e90 --- /dev/null +++ b/templates/cloud-prompt.md @@ -0,0 +1,38 @@ +You are a remote worker for one task in a snapshot repo (branch main, base commit {{base}}). +Rules (they override CLAUDE.md where they differ): +- The task tool `wf` is absent: ignore wf / TASKS / lane / worktree / gate rules in CLAUDE.md; never create or edit TASKS.md or the archive. +- Never ask questions. Blocked on a decision you cannot make: end with result awaiting and the one-line question as the report. +- Work: test red -> implement -> green (test recipe below); commit on main, one-line messages; never rewrite {{base}}. +- A needed network source is blocked: say so in the report, continue with what the repo has. +- When done, measure your usage with the usage script at the end of this prompt (it sums your own transcript). +- Commit only what the task needs: `git add `, never -A or `.`; no build output (__pycache__, bin, obj). +- Then build the patch block: git format-patch --binary {{base}}..HEAD --stdout | gzip -9 > /tmp/wf.patch.gz; echo "WF-PATCH-BEGIN sha256=$(sha256sum < /tmp/wf.patch.gz | cut -c1-64) bytes=$(wc -c < /tmp/wf.patch.gz)"; base64 -w 76 /tmp/wf.patch.gz; echo WF-PATCH-END +- Your final message is plain text (not a tool call, no code fences, no other text), first line = the result line. + Every line keeps its key word (WF-RESULT, WF-REPORT, WF-USAGE, then the patch block) literally; replace only <...>: + WF-RESULT + WF-REPORT + + + No commits (awaiting / handback without work): still write the patch block, for the empty patch. + +Task {{id}}: +{{task}} + +Test recipe (area notes): +{{recipe}} +{{note}} +Usage script (run as is): +python3 - <<'PY' +import json, glob, os +f = max(glob.glob(os.path.expanduser("~/.claude/projects/*/*.jsonl")), key=os.path.getmtime) +m = {} +for line in open(f): + try: + j = json.loads(line); x = j.get("message") or {} + if x.get("usage"): m[x.get("id") or j.get("uuid")] = x + except Exception: pass +t = [sum(x["usage"].get(k) or 0 for x in m.values()) for k in + ("input_tokens", "cache_creation_input_tokens", "cache_read_input_tokens", "output_tokens")] +model = next((x["model"] for x in m.values() if x.get("model")), "?") +print("WF-USAGE in=%d cw=%d cr=%d out=%d model=%s" % (*t, model)) +PY -- cgit