diff --git a/.claude-config/bin/README.md b/.claude-config/bin/README.md index 614aa79..b6198b2 100644 --- a/.claude-config/bin/README.md +++ b/.claude-config/bin/README.md @@ -369,7 +369,14 @@ hand from three skills run the same way every time. Python standard library only - **Settle (close).** The remainder names T3's own settle tool first (`t3_thread_organize` with action `settle`, as the last tool call of the turn) and `t3-api.sh settle-when-idle ` only as the fallback when that tool is not available, never both. Outside T3 there - is no settle step. + is no settle step: a tmux session registered by `remote-sessions/` is archived or forgotten + and killed by hand, as the last tool call (`remote-sessions/README.md`, "Closing a session + from inside it"); a plain terminal or IDE has nothing to kill. Archiving or settling a thread + in T3's own UI is not a close: none of the ending ran. +- **Cleanup the output lists.** The scratch files, worktrees and Docker objects the thread + created are listed, never removed: remove each by the exact path, name or id the thread's own + commands used (`docker rm -f`, `docker image rm`, `docker volume rm`). Never `docker system + prune` or `docker image prune -a`: other threads' images and containers share the daemon. - **`finish`.** Runs after the agent has saved lessons, fixed documents and written the resume note. It reads the receipt `/session-end/.json`, refuses a receipt of another thread, a failed run, or a GC run still going or failed, and then advances @@ -391,8 +398,18 @@ hand from three skills run the same way every time. Python standard library only and sha256. The report prints the `mv -n ` that restores a file while its live name is free. It archives only a key from the T3 session-id branch (`t3-`, with `ops_backend` saying t3code): a shared-cwd key or a tmux key is refused, and the stamps - are then handled by hand per `SKILLS/session-close/mechanics.md`. If a new work-log appears - during archival, or a step fails after a move, the session-start flag stays live. + are then archived by hand the same way: `mv -n` both files into a fresh + `~/.claude-compact-cycle/reaped/-/`, the work-log first, never `rm`. If a new + work-log appears during archival, or a step fails after a move, the session-start flag stays + live. +- **A leftover stamp the briefing flags.** The briefing's background scan (at most every 30 + minutes) flags another session's stamp only when commits landed in its window and it was never + archived: its work may be unlogged. Read its `session-start-` and `work-log-`, compare + the window with what is already on the tickets, and then: hours already cover it, name the + covering entry and archive the two files as above; real work with zero hours, report the + evidence (start time, repos, commit subjects, narrative) in chat and let the Operator set the + hours, never an automated write; nothing owed (a personal repo, a fixture, a parallel session), + say so in one line and archive them. - **Scope.** Claude sessions only: under Codex or OpenCode the transcript, time and billing steps print "unsupported provider" and `finish` archives nothing. Main thread only: a T3-delegated lane (thread id `thread:delegated-task:` or `thread:provider:`, or `lane-class @@ -561,8 +578,8 @@ header says which event. preview of an oversized hook output that still opens with the heading, and `core.md` tells a foreman with no "Foreman doctrine" block to read the file itself. The root is the script's own checkout, so a worktree reads its own - copy. Test: `hooks/foreman-context-selftest.sh`. `harness-update` syncs - `foreman.md` with `core.md`, which points at it. + copy. Test: `hooks/foreman-context-selftest.sh`. A template sync + (`harness-update-scan.sh`) carries `foreman.md` with `core.md`, which points at it. ## `origin-private-check`: the push gate @@ -709,7 +726,8 @@ context-watch hook never names the cycle to one. `hooks/context-watch.sh` names the cycle in its nags only when the session is a T3 thread on Linux and both scripts and a readable, non-empty token are present; while a fresh (under 30 min) baton for the thread exists it stays silent, since -the agent ended its turn on purpose. Tests: `tests/t3-api-test.sh`, +the agent ended its turn on purpose. A compact is proven only by T3's completion +record for that request; a completed chat reply proves nothing. Tests: `tests/t3-api-test.sh`, `tests/t3-api-v2-safety-test.py` and `tests/compact-cycle-t3-test.sh`, all against loopback stubs and the recorded frames in `tests/fixtures/t3-v2/`; each starts with the sandbox guard and refuses to run unless loopback is its only interface @@ -717,6 +735,14 @@ and 127.0.0.1:3773 (T3 Code's default port) refuses, so it can never reach a live server (`verify-ops.sh` lists them in `OPS_SANDBOX_SUITES`). The hook's route cases are in `hooks/context-watch-selftest.sh`. +Manual compact, everywhere else. T3 Code and a Codex terminal take bare +`/compact`: T3 sends `/compact ` as ordinary chat, so what must survive +goes into the resume note first. A Claude Code terminal takes `/compact +`; give the Operator this text so a manual compact keeps the detail +a default summary drops: + +> Be sure to preserve: (1) any difficulties or problems that came up, and how they were handled or resolved; (2) any possibilities, options, or approaches that were raised, tried, or set aside, and why; (3) anything that was asked for, decided, agreed, ruled out, or established as a preference, constraint, or boundary, stated exactly; (4) exactly where things stand now; (5) anything still open, unresolved, promised, or expected to happen next; (6) specific details that would be hard to reconstruct: names, numbers, dates, exact wording, links or references, kept exactly. Weight the two voices differently: keep what the user said, asked for, shared, or established carefully and close to their own words; your own explanations and reasoning can be condensed much further. + ## `wf-resume`: lanes of a workflow that never returned A usage-limit hold, a crash or a restart ends every running lane of a dynamic @@ -883,6 +909,55 @@ One file, one command: no second copy here to drift. your HOME (nvm, fnm), which the sandbox hides, and says so; run it bare then. In GitHub Actions a missing `node` fails it instead. +## `harness-update-scan.sh`: template sync for a copy + +A copy of OPS shares no git history with the public template, so `git merge` +has no common ancestor; this scan is the safe path across that gap. Run it from +inside the copy (it scans the working directory's repo and refuses any repo that +is not an OPS copy with `ERR_NOREPO`): report only by default, `--apply-safe` +copies the NEW and UPDATE classes, `--verbose` also lists IDENTICAL files. The +header is the full reference (flags, environment overrides, exit codes). An agent +reports first and applies (`--apply-safe`, a hand port, the commit) only after +the Operator says so, each CONFLICT decided on its own. + +| Class | Meaning | Applied by `--apply-safe` | +|---|---|---| +| NEW | upstream has it, the copy does not | yes | +| UPDATE | upstream changed it; the copy still matches the last synced version | yes | +| CONFLICT | changed upstream and locally, or a first sync with no baseline | never: port the mechanic by hand, or skip | +| MODE | same content, the exec bit differs | never: `chmod` by hand if it was not on purpose | +| IDENTICAL | same on both sides | nothing to do | +| REMOVED | upstream deleted it; the copy still has it | never: deleting is the owner's call | + +- **The marker.** `.claude-config/ops-upstream-ref` holds `upstream=` + and `last_synced=`. The scan never writes it: the commit that lands a sync + sets `last_synced` to the fetched sha (`git -C ~/OPS rev-parse + ops-template/main`; the scan prints it). Without a marker every difference is a + CONFLICT; a sync that lands files but not the marker turns the next scan back + into that. A marker from before 2026-10-19 names a commit from before the + template's history rewrite; the scan translates it to its same-tree twin and + prints a NOTE. +- **Never synced, either way, and never named in the report:** the identity files + (`is_excluded` in the script is the list), `CONTEXT/projects/`, `.claude-memory/`, + `.claude-handoffs/`, `NOTES/`, `DELIVERABLES/`, `PROJECTS/` and `ARCHIVE/`. + Local-only files are never listed. +- **A copy older than the scan** runs it straight from the template, from inside + the copy: `git -C ~/OPS remote add ops-template + https://github.com/Exploitacious/OPS.git` (once), `git -C ~/OPS fetch + ops-template`, then `git -C ~/OPS show + ops-template/main:.claude-config/bin/harness-update-scan.sh > "$f"` and `(cd + ~/OPS && bash "$f")`. It loads no helper file, so a temp copy works. +- **A renamed copy** (a root other than `~/OPS`, other `ops-*` names) needs every + applied file swept for `~/OPS`, `ops-template` and `ops-*` names: a verbatim + upstream path is a silent breakage there. +- **Before the commit:** `verify-ops.sh`, `secrets-scan.sh` on the changed files, + and `bash -n` on changed shell scripts, all green. A hand-ported CONFLICT gets a + CHANGELOG line; routine NEW and UPDATE copies do not. A template change the + Operator should hear about is read from the upstream CHANGELOG (`git -C ~/OPS + diff ..ops-template/main -- CHANGELOG.md`). + +Test: `tests/harness-update-scan-test.sh`. + ## `grabit`: file transfer over Tailscale Moves files between a (usually headless) OPS box and whatever machine you're @@ -894,7 +969,7 @@ driving it from, without SFTP or cloud. Everything rides the tailnet grabit FILE... push file(s) to the machine you're SSH'd in from (auto-detected) grabit --to DEVICE FILE... push to a specific tailnet device (name or 100.x IP) grabit --serve PATH... stage path(s) + expose over tailnet HTTPS; prints browser URLs -grabit --serve-off tear the serve endpoint down +grabit --serve-off remove grabit's own serve path (nothing else) grabit --inbox [DIR] pull files someone sent TO this box (default ~/grabit-inbox) grabit --list list tailnet devices grabit -h @@ -911,15 +986,30 @@ in from, the file comes back to you: no flags. - **Push (default):** one-shot, no sudo, lands in your inbox. Best for grabbing a file or two. - **Serve (`--serve`):** stages the named files into `~/.cache/grabit-serve` and - serves *only those* over tailnet HTTPS. Best for browsing/grabbing several + serves *only those* over tailnet HTTPS, under grabit's own path + (`https:///grabit/`). Best for browsing/grabbing several files, or when the target isn't a Tailscale device. Needs sudo (serving a path - is privileged): that's why push is the default. + is privileged): that's why push is the default. It leaves an endpoint + standing until `--serve-off`. ### Safety `--serve` only ever exposes files you explicitly name (staged into a scratch dir), so a neighbouring `.env` or secret can't leak. The serve endpoint is tailnet-scoped (your own devices), not the public internet. +grabit never runs `tailscale serve reset`. Reset removes every serve handler on +the box, and a box that serves T3 Code over the tailnet once lost that endpoint +(its phone app included) when `--serve-off` ran it. So `--serve` mounts under +`/grabit` on port 443, never the root (which would replace another handler), and +`--serve-off` turns off only that path; a refused turn-off prints a WARN and +touches nothing else. Test: `tests/grabit-test.sh` (stub `tailscale` and `sudo`; +it fails if reset is ever invoked). + +### Receiving +`grabit --inbox` pulls everything waiting in this box's Tailscale inbox into +`~/grabit-inbox` and lists it; an empty inbox means nothing arrived. An image +attached in a T3 message is not a receive: it arrives as a saved path to read. + ### One-time setup per new box ``` sudo tailscale set --operator=$USER # lets push run without sudo diff --git a/.claude-config/bin/active-minutes b/.claude-config/bin/active-minutes index de4b9f6..96bacc9 100755 --- a/.claude-config/bin/active-minutes +++ b/.claude-config/bin/active-minutes @@ -56,7 +56,7 @@ by its UTC start, any prefix such as 2026-11-06T22:10) to COUNTED or EXCLUDED when the operator gives evidence the transcript cannot see. --strict drops every gap over --gap with no classification, for a session with no operator in it. -Bill to the minute as decimal hours, two places; never round. +Bill to the minute as decimal hours to the nearest hundredth; never round to a block. The contiguous work blocks print in one display zone, each timestamp converted on its own, so a block that spans a daylight-saving change prints each end with @@ -479,10 +479,11 @@ print("events : %d" % len(ts)) print("first (UTC) : %s" % ts[0].isoformat()) print("last (UTC) : %s" % ts[-1].isoformat()) print("raw span : %.1f min (%.2f h)" % (span/60, span/3600)) -# Truncate the billing display: %.2f alone rounds 40 minutes up to 0.67 hours. -# Keep the measured minutes and higher-precision hours beside it as evidence. -billable_hundredths = int(active // 36) -print("ACTIVE (bill this): %.1f min = %.4f h -> %.2f h" % (active/60, active/3600, billable_hundredths/100)) +# The billing figure is the measured time in hours to the nearest hundredth +# (40 minutes bills as 0.67 h), the same on every copy; the owner ruled on +# 2026-11-17 that hours round. The minutes and four-place hours beside it are +# the evidence. +print("ACTIVE (bill this): %.1f min = %.4f h -> %.2f h" % (active/60, active/3600, active/3600)) print("counted gaps : %d, total %.1f min" % (len(counted), sum(g[2] for g in counted)/60)) print("excluded gaps : %d, total %.1f min" % (len(excluded), sum(g[2] for g in excluded)/60)) diff --git a/.claude-config/bin/compact-cycle.sh b/.claude-config/bin/compact-cycle.sh index 28243b4..22caccd 100755 --- a/.claude-config/bin/compact-cycle.sh +++ b/.claude-config/bin/compact-cycle.sh @@ -6,9 +6,9 @@ # idle, requests native compaction through t3-api.sh (T3's orchestration API, V1 # over HTTP or V2 over a WebSocket: t3-api.sh picks the protocol), verifies it # finished, then dispatches a resume message (the baton) so the session continues -# autonomously. Plain bash, no Claude tokens, no nondeterminism. Pairs with the -# pre-compact-synthesis skill (which does the thoughtful synthesis and writes the -# baton BEFORE spawning this). +# autonomously. Plain bash, no Claude tokens, no nondeterminism. Pairs with +# `session-end pause` and the agent's own work (lessons, documents, the resume +# baton), all done BEFORE spawning this (the harness skill, "Ending a thread"). # # T3 is the only backend. The tmux, herdr and pane backends were removed: those sessions # are run by hand and compacted with a manual /compact, so nothing needs to type into a pane. diff --git a/.claude-config/bin/grabit b/.claude-config/bin/grabit index 270c0df..369807b 100755 --- a/.claude-config/bin/grabit +++ b/.claude-config/bin/grabit @@ -10,7 +10,7 @@ # grabit FILE... push file(s) to the machine you're connected from # grabit --to DEVICE FILE... push to a specific tailnet device (name or 100.x IP) # grabit --serve PATH... stage path(s) + expose over tailnet HTTPS; prints URLs -# grabit --serve-off tear the serve endpoint down +# grabit --serve-off remove grabit's own serve path (nothing else) # grabit --inbox [DIR] pull files sent TO this box (default ~/grabit-inbox) # grabit --list list tailnet devices # grabit -h | --help @@ -21,6 +21,16 @@ set -euo pipefail SERVE_DIR="${GRABIT_SERVE_DIR:-$HOME/.cache/grabit-serve}" +# grabit serves under its own path on the HTTPS port and removes only that path. +# Never `tailscale serve reset` here: reset wipes EVERY serve handler on the box, +# and a box that serves T3 Code (or anything else) over the tailnet lost that +# endpoint, its phone app included, when --serve-off ran reset. Serving at "/" +# would replace another handler the same way, so the path is never the root. +# tests/grabit-test.sh fails if reset is ever invoked. +# Directory mounts end in / in Tailscale's config; removal matches that exact +# path. Without the slash, serve-off reports "handler does not exist". +SERVE_PATH="/grabit/" +SERVE_PORT=443 die(){ echo "grabit: $*" >&2; exit 1; } command -v tailscale >/dev/null 2>&1 || die "tailscale not found on PATH" @@ -74,15 +84,23 @@ serve(){ local p; for p in "$@"; do [ -e "$p" ] || die "no such path: $p"; cp -r "$p" "$SERVE_DIR/"; done # Serving a path is privileged even for an operator; needs (passwordless) sudo. # Taildrop (the default push) does NOT need this, so prefer it where sudo is absent. - sudo tailscale serve --bg "$SERVE_DIR" >/dev/null 2>&1 \ + sudo tailscale serve --bg --https="$SERVE_PORT" --set-path="$SERVE_PATH" "$SERVE_DIR" >/dev/null 2>&1 \ || die "tailscale serve failed (needs sudo + tailnet HTTPS enabled; just use a plain 'grabit FILE' push instead)" - local url; url="https://$(self_dns)/" + local url; url="https://$(self_dns)${SERVE_PATH}" echo "grabit: serving over the tailnet (HTTPS, not public). Open in your browser:" ( cd "$SERVE_DIR" && for f in *; do echo " ${url}${f}"; done ) echo "grabit: tear down when done with -> grabit --serve-off" } -serve_off(){ sudo tailscale serve reset >/dev/null 2>&1 || true; rm -rf "$SERVE_DIR"; echo "grabit: serve torn down."; } +serve_off(){ + # Only grabit's own path; other serve handlers on this box stay up (see SERVE_PATH). + if sudo tailscale serve --https="$SERVE_PORT" --set-path="$SERVE_PATH" off >/dev/null 2>&1; then + echo "grabit: serve path ${SERVE_PATH} removed." + else + echo "grabit: WARN no serve path ${SERVE_PATH} was removed (none was set, or sudo or tailscale refused); other serve handlers were not touched. Check: tailscale serve status" >&2 + fi + rm -rf "$SERVE_DIR" +} inbox(){ local dir="${1:-$HOME/grabit-inbox}"; mkdir -p "$dir" diff --git a/.claude-config/bin/harness-update-scan.sh b/.claude-config/bin/harness-update-scan.sh index bbb0bf1..30549c1 100755 --- a/.claude-config/bin/harness-update-scan.sh +++ b/.claude-config/bin/harness-update-scan.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# harness-update-scan.sh: the mechanical half of the harness-update skill. +# harness-update-scan.sh: the mechanical half of a template sync. # # Classifies how the local (private, personalized) OPS copy differs from the -# PUBLIC upstream template, so the judgment half (SKILLS/harness-update/SKILL.md) -# can decide what to pull. The risk direction is one-way and that shapes every +# PUBLIC upstream template, so the agent and the Operator (the judgment half; +# the facts are in .claude-config/bin/README.md) can decide what to pull. The risk direction is one-way and that shapes every # rule here: this pulls PUBLIC template code INTO a PRIVATE repo, so a wrong copy # breaks the Operator's personalization, which is worse than a missed update. Therefore # identity/memory/handoff surfaces are hard-excluded in BOTH directions, and the @@ -21,8 +21,8 @@ # No marker → first-sync mode: full tree compare, no baseline, so any difference # is a CONFLICT (UPDATE is not computable without a known last-synced version). # -# Never git-commits. Never writes the marker: the skill updates last_synced to -# the fetched sha at commit time, so a report-only run leaves zero state behind. +# Never git-commits. Never writes the marker: the sync's commit updates last_synced to +# the fetched sha, so a report-only run leaves zero state behind. # # Env overrides: OPS_UPSTREAM (owner/repo), OPS_UPSTREAM_BRANCH (default main), # OPS_REMOTE (default ops-template). diff --git a/.claude-config/bin/session-end b/.claude-config/bin/session-end index 10a8483..96cfa57 100755 --- a/.claude-config/bin/session-end +++ b/.claude-config/bin/session-end @@ -372,7 +372,7 @@ def billing_key_ok(idn): branch of work_session_key, else why not. Positive check, fail closed: a shared-cwd fallback key would clear another thread's unbilled-work flag.""" if idn["provider"] != "claude": - return UNSUPPORTED + "; billing stamps are not archived (archive them by hand per session-close mechanics.md)" + return UNSUPPORTED + "; billing stamps are not archived (archive them by hand: .claude-config/bin/README.md, session-end)" if not idn["key"]: return "no stamp key: %s" % (idn["key_error"] or "unknown") want = "t3-" + sanitized_sid(idn["session_id"]) @@ -380,7 +380,7 @@ def billing_key_ok(idn): return None if idn["backend"] == "tmux": # ops_backend's one session-name backend return ("the %s backend keys stamps by session name, which this version does not verify; " - "archive the stamps by hand per session-close mechanics.md" % idn["backend"]) + "archive the stamps by hand (.claude-config/bin/README.md, session-end)" % idn["backend"]) return ("key %s is not this thread's own (the T3 session-id branch did not apply, so " "work_session_key fell back to the shared cwd key); refusing to archive" % idn["key"]) @@ -497,8 +497,8 @@ def load_transcript(path, sid): def named_paths(tx, cwd=None): - """Paths under $HOME named by this thread's tool calls (the candidate logic of - session-close mechanics.md). Transcript text is data: nothing is executed.""" + """Paths under $HOME named by this thread's tool calls (read-only candidates, + never selections). Transcript text is data: nothing is executed.""" home = os.path.expanduser("~") pat = re.compile(re.escape(home) + r"/[\w.@+-]+(?:/[\w.@+-]+)*") out = set() @@ -1603,6 +1603,8 @@ def remainder(rep, mode, idn, tx, pool): cc = sibling("compact-cycle.sh") if tid and cc: out.append("Pause: compact with %s --target %s" % (cc, tid)) + out.append(" It needs this box's T3 harness token (DEPLOYMENT.md, \"T3 Code hosts\"); without one it stops " + "with ERR_T3API before sending anything, and the Operator fires /compact.") else: out.append("Pause: no compact line (%s)" % ("no T3 thread id" if not tid else "compact-cycle.sh not installed")) out.append(" Never compact over an unanswered question.") @@ -1635,7 +1637,8 @@ def remainder(rep, mode, idn, tx, pool): " (a failed turn or a queued message leaves the thread active). Only if that tool is not available: " "%s settle-when-idle %s. Never both." % (sibling("t3-api.sh") or "t3-api.sh", tid)) else: - out.append("Settle: not a T3 thread; no settle step (see session-close teardown for tmux or a plain terminal).") + out.append("Settle: not a T3 thread; no settle step (a tmux session: .claude-config/remote-sessions/README.md, " + "\"Closing a session from inside it\"; a plain terminal has nothing to kill).") def time_block(rep, tx, idn): diff --git a/.claude-config/bin/tests/active-minutes-test.py b/.claude-config/bin/tests/active-minutes-test.py index d7028d0..d76003a 100644 --- a/.claude-config/bin/tests/active-minutes-test.py +++ b/.claude-config/bin/tests/active-minutes-test.py @@ -350,10 +350,10 @@ def test_a_bad_option_exits_2_even_when_the_transcript_is_too_short(self): self.assertEqual(proc.returncode, 2) self.assertIn("--tz-offset: need hours strictly between -24 and 24", proc.stderr) - def test_billable_hours_never_round_up(self): + def test_billable_hours_round_to_the_nearest_hundredth(self): proc = self.run_stamps(["2026-11-06T10:00:00Z", "2026-11-06T10:20:00Z", "2026-11-06T10:40:00Z"]) self.assertEqual(proc.returncode, 0, proc.stderr) - self.assertIn("40.0 min = 0.6667 h -> 0.66 h", active_line(proc)) + self.assertIn("40.0 min = 0.6667 h -> 0.67 h", active_line(proc)) boundary = self.run_stamps(["2026-11-06T10:00:00Z", "2026-11-06T10:06:00Z"]) self.assertIn("6.0 min = 0.1000 h -> 0.10 h", active_line(boundary)) diff --git a/.claude-config/bin/tests/grabit-test.sh b/.claude-config/bin/tests/grabit-test.sh new file mode 100755 index 0000000..ab2e320 --- /dev/null +++ b/.claude-config/bin/tests/grabit-test.sh @@ -0,0 +1,151 @@ +#!/usr/bin/env bash +# grabit-test.sh: grabit's serve mode touches only its own serve path. +# +# What must hold, because a box that serves T3 Code (or anything else) over the +# tailnet lost that endpoint, its phone app included, when `grabit --serve-off` +# ran `tailscale serve reset`, which wipes every serve handler on the box: +# - --serve and --serve-off never invoke `tailscale serve reset`, and no code +# line of grabit names it +# - --serve serves under grabit's own path, never the root, so it cannot +# replace another handler at "/", and prints URLs under that path +# - --serve-off removes only that path, and removes the staging directory +# - a refused --serve-off says so (WARN) instead of printing success +# - the default push still Taildrops the named file to the named device +# `tailscale` and `sudo` are recording stubs on PATH; nothing reaches a real +# tailnet. GRABIT_UNDER_TEST points the suite at another copy (to show it fail +# on the old one). +# grabit clears an environment-selected directory with rm -rf. Keep mutations +# inside the sandbox, and let the rm stub reach only this suite's staging dir. +# Verdict chains intentionally count a failed condition through bad(). +# shellcheck disable=SC2015 +. "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)/../sandbox-guard.sh" && sandbox_guard || exit 97 +set -uo pipefail +TOOL="${GRABIT_UNDER_TEST:-$(cd "$(dirname "$0")/.." && pwd)/grabit}" +T="$(mktemp -d "${TMPDIR:-/tmp}/grabit-test.XXXXXX")" || exit 1 +trap '/bin/rm -rf -- "$T"' EXIT +PASS=0; FAIL=0 +ok() { PASS=$((PASS+1)); echo "PASS: $*"; } +bad() { FAIL=$((FAIL+1)); echo "FAIL: $*"; } + +mkdir -p "$T/bin" "$T/home" +printf 'keep\n' > "$T/home/sibling.txt" +LOG="$T/tailscale.log" +# tailscale stub: one line per call, the arguments joined by single spaces. +cat > "$T/bin/tailscale" <<'SH' +#!/usr/bin/env bash +printf '%s\n' "$*" >> "$GRABIT_TEST_LOG" +case "$1 ${2:-}" in + "status --json") printf '{"Self":{"DNSName":"box.example.invalid."}}\n' ;; + "status "*) printf '192.0.2.10 laptop user@ linux active; direct\n' ;; + "serve "*) + [ -z "${GRABIT_TEST_SERVE_FAIL:-}" ] || exit 1 + shift + mount=/; target= + for arg in "$@"; do + case "$arg" in + --set-path=*) mount="${arg#--set-path=}" ;; + --*) ;; + *) target="$arg" ;; + esac + done + if [ "$target" = off ]; then + [ "$(cat "$GRABIT_TEST_MOUNT" 2>/dev/null)" = "$mount" ] || exit 1 + : > "$GRABIT_TEST_MOUNT" + else + # Tailscale adds a trailing slash to directory mounts, but looks up the + # exact mount on removal. A recording-only stub missed that mismatch. + [ ! -d "$target" ] || mount="${mount%/}/" + printf '%s\n' "$mount" > "$GRABIT_TEST_MOUNT" + fi + ;; +esac +exit 0 +SH +# sudo stub: run the command as is (the stub tailscale records it). +printf '#!/usr/bin/env bash\nexec "$@"\n' > "$T/bin/sudo" +cat > "$T/bin/rm" <<'SH' +#!/usr/bin/env bash +printf '%s\n' "$*" >> "$GRABIT_TEST_REMOVE_LOG" +if [ "$#" -ne 2 ] || [ "$1" != -rf ] || [ "$2" != "$GRABIT_TEST_STAGE" ]; then + printf 'grabit-test: refused removal outside the staging fixture: %s\n' "$*" >&2 + exit 1 +fi +exec /bin/rm -rf -- "$GRABIT_TEST_STAGE" +SH +chmod +x "$T/bin/tailscale" "$T/bin/sudo" "$T/bin/rm" +export PATH="$T/bin:$PATH" HOME="$T/home" GRABIT_TEST_LOG="$LOG" +export GRABIT_SERVE_DIR="$T/home/serve" +export GRABIT_TEST_STAGE="$GRABIT_SERVE_DIR" GRABIT_TEST_REMOVE_LOG="$T/remove.log" +export GRABIT_TEST_MOUNT="$T/mount" +unset SSH_CONNECTION GRABIT_TEST_SERVE_FAIL + +no_reset() { # $1 label: no recorded call was a serve reset + if grep -qE '(^| )serve( .*)? reset( |$)' "$LOG" 2>/dev/null; then + bad "$1: tailscale serve reset was invoked: $(grep -E 'serve.*reset' "$LOG")" + else + ok "$1: no tailscale serve reset" + fi +} + +# --- static: no code line of grabit invokes serve reset ----------------------- +if grep -vE '^[[:space:]]*#' "$TOOL" | grep -qE 'serve[[:space:]]+reset'; then + bad "static: a code line of grabit names 'serve reset': $(grep -nvE '^[[:space:]]*#' "$TOOL" | grep -E 'serve[[:space:]]+reset')" +else + ok "static: no code line of grabit names 'serve reset'" +fi + +# --- --serve: own path, never the root ---------------------------------------- +printf 'report\n' > "$T/report.txt" +: > "$LOG" +out="$(bash "$TOOL" --serve "$T/report.txt" 2>&1)"; rc=$? +[ "$rc" -eq 0 ] && ok "serve: exit 0" || bad "serve: exit $rc: $out" +grep -qxF "serve --bg --https=443 --set-path=/grabit/ $GRABIT_SERVE_DIR" "$LOG" \ + && ok "serve: serves the staging dir under /grabit/ on 443" \ + || bad "serve: expected 'serve --bg --https=443 --set-path=/grabit/ ', got: $(grep '^serve' "$LOG")" +grep -E '^serve' "$LOG" | grep -vq -- '--set-path=/grabit/' \ + && bad "serve: a serve call without grabit's directory mount: $(grep '^serve' "$LOG")" \ + || ok "serve: every serve call names grabit's path" +printf '%s\n' "$out" | grep -qF 'https://box.example.invalid/grabit/report.txt' \ + && ok "serve: prints the URL under /grabit" || bad "serve: URL not under /grabit: $out" +[ -f "$GRABIT_SERVE_DIR/report.txt" ] && ok "serve: staged only the named file" || bad "serve: file not staged" +[ "$(cat "$GRABIT_TEST_MOUNT")" = /grabit/ ] \ + && ok "serve: the directory mount ends in a slash" || bad "serve: unexpected directory mount" +no_reset "serve" + +# --- --serve-off: removes only grabit's path ---------------------------------- +: > "$LOG" +out="$(bash "$TOOL" --serve-off 2>&1)"; rc=$? +[ "$rc" -eq 0 ] && ok "serve-off: exit 0" || bad "serve-off: exit $rc: $out" +grep -qxF "serve --https=443 --set-path=/grabit/ off" "$LOG" \ + && ok "serve-off: turns off /grabit/ only" \ + || bad "serve-off: expected 'serve --https=443 --set-path=/grabit/ off', got: $(cat "$LOG")" +[ "$(grep -c '^serve' "$LOG")" -eq 1 ] && ok "serve-off: exactly one serve call" \ + || bad "serve-off: unexpected serve calls: $(grep '^serve' "$LOG")" +[ ! -e "$GRABIT_SERVE_DIR" ] && ok "serve-off: staging dir removed" || bad "serve-off: staging dir left behind" +[ ! -s "$GRABIT_TEST_MOUNT" ] && ok "serve-off: the directory mount was removed" \ + || bad "serve-off: the directory mount is still configured" +no_reset "serve-off" + +# --- --serve-off refused: a warning, never a success line ---------------------- +: > "$LOG" +out="$(GRABIT_TEST_SERVE_FAIL=1 bash "$TOOL" --serve-off 2>&1)"; rc=$? +printf '%s\n' "$out" | grep -q 'WARN' && ok "serve-off refused: prints WARN" || bad "serve-off refused: no WARN: $out" +printf '%s\n' "$out" | grep -q 'removed\.' && bad "serve-off refused: printed success: $out" || ok "serve-off refused: no success line" +no_reset "serve-off refused" + +# --- push still works ----------------------------------------------------------- +: > "$LOG" +out="$(bash "$TOOL" --to laptop "$T/report.txt" 2>&1)"; rc=$? +[ "$rc" -eq 0 ] && grep -qxF "file cp $T/report.txt laptop:" "$LOG" \ + && ok "push: Taildrops the named file to the named device" || bad "push: rc=$rc log=$(cat "$LOG") out=$out" +no_reset "push" + +[ "$(grep -cxF -- "-rf $GRABIT_TEST_STAGE" "$GRABIT_TEST_REMOVE_LOG")" -eq 3 ] \ + && [ "$(wc -l < "$GRABIT_TEST_REMOVE_LOG")" -eq 3 ] \ + && ok "cleanup: only the three staging-directory removals were attempted" \ + || bad "cleanup: unexpected removals: $(cat "$GRABIT_TEST_REMOVE_LOG")" +[ "$(cat "$T/home/sibling.txt" 2>/dev/null)" = keep ] \ + && ok "cleanup: the sibling file survived" || bad "cleanup: the sibling file changed or disappeared" + +echo; echo "grabit-test: $PASS passed, $FAIL failed" +[ "$FAIL" -eq 0 ] diff --git a/.claude-config/bin/tests/orphan-gate-test.sh b/.claude-config/bin/tests/orphan-gate-test.sh index 42006b6..eba0fea 100755 --- a/.claude-config/bin/tests/orphan-gate-test.sh +++ b/.claude-config/bin/tests/orphan-gate-test.sh @@ -3,7 +3,7 @@ # that runs it off the boot path (hooks/hooklib.sh: orphan_stamp_verdict, # orphan_scan_spawn / _main / _run / _report), with the briefing as the one caller. # -# Why the scan exists: a leftover session-start stamp stays until session-close, and +# Why the scan exists: a leftover session-start stamp stays until a close, and # under T3 every thread that never closes leaves one, so judging them inline made # boot grow with the set. The briefing now only starts a detached scan and reports # what the last one left in the state dir. @@ -25,7 +25,7 @@ # is recovered, a live one never is # failures an unwritable state dir, an unwritable status and a scan that died # are each named at boot until a later scan passes -# report a flagged stamp that session-close has since removed stops counting +# report a flagged stamp that a close has since archived stops counting # at once, and the running session's own stamp never counts # # Every path is under a temp dir; HOME is a fixture. The suite refuses to run @@ -170,7 +170,7 @@ report() { # CUR: prints ORPHAN_SCAN_HYG has "the report counts the flagged stamps that still exist" ' 3 session(s) abandoned without a work-tracking reconciliation' "$(report '')" has "the running session's own stamp never counts" ' 2 session(s) abandoned' "$(report s-flag)" rm -f "$RUN/session-start-s-flag" "$RUN/session-start-s-dead" -has "a flagged stamp that session-close removed stops counting at once" ' 1 session(s) abandoned' "$(report '')" +has "a flagged stamp that a close archived stops counting at once" ' 1 session(s) abandoned' "$(report '')" rm -f "$RUN/session-start-s-alive" eq "with every flagged stamp gone the report is silent" "" "$(report '')" diff --git a/.claude-config/bin/tests/session-end-test.py b/.claude-config/bin/tests/session-end-test.py index 4c72d91..7ef6471 100644 --- a/.claude-config/bin/tests/session-end-test.py +++ b/.claude-config/bin/tests/session-end-test.py @@ -7,7 +7,7 @@ hooks/session-work-init.sh and hooks/hooklib.sh (the stamp names, the key and ops_backend), hooks/handoff-check.sh (the baton directory), hooks/memory-digest.sh (the --ops checkout), verify-ops.sh (its summary line -and --quiet) and SKILLS/session-close/mechanics.md (the stamps a close owns). +and --quiet) and .claude-config/bin/README.md, session-end (the stamps a close owns). Every tool session-end calls (branch-gc, memory-index, verify-ops.sh, asks, active-minutes, lane-class, compact-cycle.sh, t3-api.sh, docker, the timeout diff --git a/.claude-config/bin/tests/t3-html-render-test.py b/.claude-config/bin/tests/t3-html-render-test.py index 29e0ac3..a241271 100644 --- a/.claude-config/bin/tests/t3-html-render-test.py +++ b/.claude-config/bin/tests/t3-html-render-test.py @@ -11,7 +11,7 @@ import unittest from pathlib import Path -ASSETS = Path(__file__).resolve().parents[3] / "SKILLS/t3-html-render/assets" +ASSETS = Path(__file__).resolve().parents[3] / "SKILLS/harness/assets" def node(source, payload): @@ -25,6 +25,10 @@ def node(source, payload): class HtmlRender(unittest.TestCase): def test_inline_scripts_parse(self): + # The harness skill points at both pages; a move that leaves the glob + # empty must fail here, not pass with nothing checked. + pages = sorted(p.name for p in ASSETS.glob("*.html")) + self.assertEqual(pages, ["example-report.html", "starter.html"]) for path in sorted(ASSETS.glob("*.html")): with self.subTest(page=path.name): scripts = re.findall(r"", path.read_text()) diff --git a/.claude-config/bin/tests/work-session-key-test.sh b/.claude-config/bin/tests/work-session-key-test.sh index f1a00c7..bf1eacf 100755 --- a/.claude-config/bin/tests/work-session-key-test.sh +++ b/.claude-config/bin/tests/work-session-key-test.sh @@ -6,7 +6,7 @@ # The defect: under T3 the key fell back to the encoded cwd, so every thread in # one directory shared one session-start-* stamp and one work-log-*. A thread # opened within 7 days inherited the old t0, the work-log mixed several threads -# (an elapsed time of a week), and one thread's session-close deleted its +# (an elapsed time of a week), and one thread's close deleted its # siblings' stamp. # # The invariants: @@ -103,7 +103,7 @@ eq "ops_backend: t3code over bare" t3code "$(backendin "${T3ENV[@]}")" eq "ops_backend: a T3 thread id alone marks T3" t3code "$(backendin T3CODE_THREAD_ID=x)" eq "ops_backend: bare" bare "$(backendin)" -# --- 3b. zsh parity: session-close sources hooklib.sh in the zsh Bash tool ------ +# --- 3b. zsh parity: a close sources hooklib.sh in the zsh Bash tool ----------- if command -v zsh >/dev/null 2>&1; then zk="$( cd "$WORK" && env "${CLEAR[@]}" "${T3ENV[@]}" CLAUDE_CODE_SESSION_ID="$SID_A" \ zsh -c '. "$1"; work_session_key' _ "$HOOKS/hooklib.sh" )" @@ -162,7 +162,7 @@ fi && pass "no work-log is shared with, or written for, the sibling" \ || fail "unexpected work-logs: $(ls "$RUN" | grep '^work-log' | tr '\n' ' ')" -# session-close deletes only its own thread's state (session-close/mechanics.md, step E). +# A close retires only its own thread's state (session-end finish, the billing archive). kA="$(keyin "$WORK" "${T3ENV[@]}" CLAUDE_CODE_SESSION_ID="$SID_A")" rm -f "$RUN/session-start-$kA" "$RUN/work-log-$kA" [ ! -e "$RUN/session-start-t3-$SID_A" ] && [ -f "$RUN/session-start-t3-$SID_B" ] \ diff --git a/.claude-config/bin/verify-ops.sh b/.claude-config/bin/verify-ops.sh index 4ce58a2..9893400 100755 --- a/.claude-config/bin/verify-ops.sh +++ b/.claude-config/bin/verify-ops.sh @@ -12,7 +12,7 @@ # # Exit: 0 = no FAILs (WARNs allowed) · 1 = at least one FAIL # -# Consumers: the pre-compact-synthesis closeout stage runs it before wrap-up; +# Consumers: session-end lints with it (--quiet) at every ending; # a nightly systemd --user timer (ops-verify) writes its output to # ~/.local/state/ops/verify-last.txt which session-briefing.sh surfaces. # Add new checks as functions + a line in main; keep each check independent. @@ -849,11 +849,12 @@ check_identity_exclusion() { # deploy.sh runs memory-init; replaces links, rc lines and units # session-end starts branch-gc --apply on the thread's repos and moves # the thread's billing stamps into an archive +# grabit recursively clears/removes its environment-selected staging dir # Not listed, by the same rule: session-briefing.sh (reads only), # daily-sync.sh (commits and pulls its own checkout; its gc stage is branch-gc, # reached only through a stub in the suites that cover it), and tools that # replace only their own output or state file. -OPS_DESTRUCTIVE_TOOLS=(branch-gc pre-compact.sh memory-init deploy.sh session-end) +OPS_DESTRUCTIVE_TOOLS=(branch-gc pre-compact.sh memory-init deploy.sh session-end grabit) # Suites that must carry the guard although the name check cannot see why. The three # T3 suites: t3-api.sh and compact-cycle.sh delete nothing, but they send messages into # and settle threads on a real T3 server, and the box that runs a suite usually runs one diff --git a/.claude-config/hooks/context-watch.sh b/.claude-config/hooks/context-watch.sh index ae398d3..eba657f 100755 --- a/.claude-config/hooks/context-watch.sh +++ b/.claude-config/hooks/context-watch.sh @@ -4,9 +4,9 @@ # # Modes (first arg): # stop (default) Stop hook: block the stop with an escalating nag telling -# the agent to run the compact ritual (the pre-compact-synthesis -# skill, then compact-cycle.sh on a T3 box with a harness token, else -# tell the Operator a manual /compact is clear to fire). +# the agent to pause (session-end pause and what it lists, the +# harness skill, then compact-cycle.sh on a T3 box with a harness token, +# else tell the Operator a manual /compact is clear to fire). # posttool PostToolUse hook: once usage reaches URGENT, inject a matching # warning MID-TURN via additionalContext. Stop hooks only fire # between turns: a long tool-calling turn once ran from 65% to 98% @@ -137,8 +137,8 @@ # python3-only, so hosts without python3 (e.g. Windows Git Bash) never get the # nag, in ANY mode. This is fail-open BY DESIGN, unlike git-guard/secrets-guard # which fail CLOSED: a missed reminder just means the Operator compacts on their -# own cue instead of this hook's; the compact ritual itself -# (pre-compact-synthesis skill) still works fine without this nag ever firing. +# own cue instead of this hook's; the pause itself (session-end pause, the +# harness skill) still works fine without this nag ever firing. # # A hook must never break the session: every failure path exits 0 silently. set -uo pipefail @@ -518,8 +518,8 @@ def log_silenced(where, ctx_tokens, why): # take a separate lock. The route and the interlock therefore both use the thread id. SELF_COMPACT = bool(os.environ.get("SELF_COMPACT")) T3_SID = os.environ.get("CW_CLASS_SID") or "" -MANUAL_ROUTE = ("run the pre-compact-synthesis skill, then tell the Operator a manual /compact is clear " - "to fire") +MANUAL_ROUTE = ("run session-end pause and finish what it lists (the harness skill, \"Ending a thread\"), " + "then tell the Operator a manual /compact is clear to fire") _t3 = {} @@ -574,13 +574,15 @@ def compact_route(): cycle = shlex.quote(os.path.join(bindir, "compact-cycle.sh")) if tid: baton = f"{rundir}/resume-{cycle_key(tid)}.txt" - return ("run the pre-compact-synthesis skill, then write the resume baton to " + return ("run session-end pause and finish what it lists (the harness skill, \"Ending a thread\"), " + "then write the resume baton to " f"{baton}, run {cycle} --backend t3 --target {shlex.quote(tid)} " f"--baton {shlex.quote(baton)} (it detaches its own worker), then END YOUR TURN " "so the compactor can fire /compact") # Unresolved (no mapping, an ambiguous one, a lookup that failed): hand over the # resolve step instead of a session-id target that would miss the baton. - return ("run the pre-compact-synthesis skill, then resolve this T3 thread with " + return ("run session-end pause and finish what it lists (the harness skill, \"Ending a thread\"), " + "then resolve this T3 thread with " f"{shlex.quote(os.path.join(bindir, 't3-api.sh'))} thread-for-session " f"{shlex.quote(T3_SID) if T3_SID else ''} (it must print one plain " f"thread id), write the resume baton to {rundir}/resume-.txt, run {cycle} " @@ -854,7 +856,7 @@ if mode == "readout": # framing, never pressure: a compact here is hygiene, not scarcity. how = compact_route() print("[context] Natural break point. A compact here hands the next stretch " - "a clean desk, pre-authorized, no ask. Run pre-compact-synthesis, then " + "a clean desk, pre-authorized, no ask. To pause: " f"{how}. Or keep rolling if you'd rather; nothing is at risk either " "way. Pick the next clean seam.") elif ctx >= LONG_TURN: @@ -862,7 +864,7 @@ if mode == "readout": # four artifacts carry the work across a reset, so nothing is at stake. how = compact_route() print("[context] This session has run long; a clean handoff is the kind thing " - f"for the next stretch. Run pre-compact-synthesis, then {how}. Nothing is " + f"for the next stretch. To pause: {how}. Nothing is " "lost either way: git, memory, the task list, and the baton carry the work " "forward as one body.") else: diff --git a/.claude-config/hooks/handoff-check.sh b/.claude-config/hooks/handoff-check.sh index a050f08..6ec6f9b 100755 --- a/.claude-config/hooks/handoff-check.sh +++ b/.claude-config/hooks/handoff-check.sh @@ -8,8 +8,8 @@ # this is the fix for "handoffs picking up another agent's work". # # Notify ONLY. Never auto-loads context (that would re-inject stale state -# every session). The session-handoff skill does the actual pickup and -# archives the baton so this stops firing. Exit 0 always, a surface, not a +# every session). The resuming agent does the actual pickup and +# archives the baton so this stops firing (.claude-handoffs/README.md, Flow). Exit 0 always, a surface, not a # gate. If you run more than one profile via CLAUDE_CONFIG_DIR, this fires in # each of them (settings.json is symlinked into every config dir). # @@ -69,7 +69,7 @@ From: ${writer:-unknown} @ ${when:-unknown} Cwd: ${bcwd:-unknown} Task: ${goal:-} -Pick up: say "resume handoff" (or run /session-handoff) +Pick up: say "resume handoff" (.claude-handoffs/README.md, Flow) Baton: ${BATON} ============================================================ EOF diff --git a/.claude-config/hooks/hooklib.sh b/.claude-config/hooks/hooklib.sh index 25f33d1..f08b6cf 100755 --- a/.claude-config/hooks/hooklib.sh +++ b/.claude-config/hooks/hooklib.sh @@ -141,7 +141,7 @@ hook_core_rule_matches() { # under ~/.claude-compact-cycle/ (session-start stamp, work-log; the directory # name predates the retired tmux typer and is kept so existing state stays # readable). The hooks (session-work-init, pre-compact, session-briefing) and -# the skills (session-close, pre-compact-synthesis) all derive the key here, so +# session-end and the agent's own reads all derive the key here, so # every surface agrees on one name for a session. Every input must be one a hook # and a Bash tool call both see (Claude Code sets CLAUDE_CODE_SESSION_ID in the # environment of hook and Bash subprocesses alike). @@ -152,7 +152,7 @@ hook_core_rule_matches() { # t3: under T3 Code every thread in one directory has the same cwd, so the cwd # key below made all of them share ONE stamp and ONE work-log: a thread opened # within the 7-day refresh window inherited an old t0, one work-log mixed -# several threads (an elapsed time of a week), and one thread's session-close +# several threads (an elapsed time of a week), and one thread's close # deleted its siblings' stamp. CLAUDE_CODE_SESSION_ID is per thread, an env # read, and stable across /compact and resume, so the key is # t3-. Reached only once tmux is ruled out, by @@ -205,7 +205,7 @@ ops_backend() { # Leftover session stamps: judged by evidence, off the boot path. # # session-work-init.sh writes ~/.claude-compact-cycle/session-start- once -# per session and session-close deletes it, so a stamp that is still there after +# per session and a close archives it (session-end finish), so a stamp still there after # its session is gone marks a session that ended without a work-tracking # reconciliation. Counting leftovers is not the check: a chat-only thread leaves # one too, and under T3 every thread (and every delegated lane) leaves its own. @@ -218,7 +218,7 @@ ops_backend() { # housekeeping commits in the window. Nothing is owed; no nag. A quiet # stamp is LEFT IN PLACE: nothing here deletes or moves a stamp. # flag at least one repo with real commits in the window. The boot Hygiene -# line names how many; session-close finishes the judgment, because a +# line names how many; a close finishes the judgment, because a # hook has no work-tracking access and must never block boot on a # network call. # @@ -419,7 +419,7 @@ orphan_stamp_verdict() { # # WHY. Judging every leftover stamp inline made boot grow with the set. A quiet or # flag verdict never removes its stamp, and under T3 every thread that never runs -# session-close leaves one, so the set only grows: on one box 126 stamps cost 49 s +# a close leaves one, so the set only grows: on one box 126 stamps cost 49 s # of a 51 s boot, and every new session waits on the briefing hook before its first # model call. The boot path now only checks a throttle and starts a detached scan; # the scan does the sweep and leaves its result in the state dir: @@ -770,7 +770,7 @@ orphan_scan_report() { [ -e "$RUN/session-start-$k" ] && nflag=$((nflag + 1)) done 2>/dev/null < "$STATE/orphan-flags" fi - [ "$nflag" -gt 0 ] && ORPHAN_SCAN_HYG=" ${nflag} session(s) abandoned without a work-tracking reconciliation; work may be unlogged (run session-close to reconcile) ·" + [ "$nflag" -gt 0 ] && ORPHAN_SCAN_HYG=" ${nflag} session(s) abandoned without a work-tracking reconciliation; work may be unlogged (reconcile it at a close: .claude-config/bin/README.md, session-end) ·" if [ -n "${ORPHAN_SCAN_NOTE:-}" ]; then ORPHAN_SCAN_HYG="$ORPHAN_SCAN_HYG $ORPHAN_SCAN_NOTE ·" elif [ -e "$STATE/orphan-scan.error" ]; then diff --git a/.claude-config/hooks/pre-compact.sh b/.claude-config/hooks/pre-compact.sh index 937c7f7..9340baa 100755 --- a/.claude-config/hooks/pre-compact.sh +++ b/.claude-config/hooks/pre-compact.sh @@ -9,9 +9,9 @@ # env var) so post-compact self-recovery has something to read. # # This is the SAFETY-NET layer: fires no matter what, even if the -# user never says "compact". The thoughtful AI synthesis lives in the -# `pre-compact-synthesis` skill (~/OPS/SKILLS/), which Claude -# invokes when the user signals wrap-up. +# user never says "compact". The thoughtful part (lessons, documents, +# the resume note) is the agent's, after `session-end pause` (the +# harness skill, "Ending a thread"). # # Implements how-i-work.md P2 ("Compaction is a pause, not death") as # automation. Pairs with the post-compact-resume.sh SessionStart hook for @@ -182,13 +182,13 @@ fi dbg "snapshot written: $SNAPSHOT_FILE" -# ── Session work-log (feeds the session-close reconciliation gate) ────────── +# ── Session work-log (feeds the close's time reconciliation) ─────────────── # Append a compact-time segment so a multi-compact session's full activity is # reconstructable at CLOSE for time entry. This is the MECHANICAL spine (git -# delta + elapsed since session start); the pre-compact-synthesis skill adds a -# narrative line separately. Best-effort: a failure here never blocks the +# delta + elapsed since session start); an agent may add a narrative line +# separately. Best-effort: a failure here never blocks the # compact. NOTE: this only records; it never reconciles. WIP/work-tracking -# reconciliation is a session-CLOSE act (session-close skill), never a compact. +# reconciliation is a CLOSE act (session-end close, then finish), never a compact. command -v work_session_key >/dev/null 2>&1 \ || . "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/hooklib.sh" 2>/dev/null || true WORK_KEY="$(work_session_key 2>/dev/null || true)" diff --git a/.claude-config/hooks/session-briefing.sh b/.claude-config/hooks/session-briefing.sh index 3e73331..c5e6dcf 100755 --- a/.claude-config/hooks/session-briefing.sh +++ b/.claude-config/hooks/session-briefing.sh @@ -313,21 +313,21 @@ if [ -f "$CLOSE" ]; then age_days="$(( ( $(date +%s) - $(date -d "$(cat "$CLOSE")" +%s 2>/dev/null || echo 0) ) / 86400 ))" [ "${age_days:-0}" -ge 3 ] && hyg="$hyg last closeout ${age_days}d ago ·" fi -# work-tracking backstop: a session that did work but never ran session-close (so -# its reconciliation gate never fired) leaves a session-start stamp behind: -# session-close deletes it on reconcile. A leftover stamp is judged by evidence, not +# work-tracking backstop: a session that did work but never closed (so its time +# was never reconciled) leaves a session-start stamp behind: a close archives it +# (session-end finish). A leftover stamp is judged by evidence, not # counted: it is flagged only when a repository it touched shows real commits in its # own window (hooklib.sh, orphan_stamp_verdict). Skip this session's own key and any # still-live tmux (paused / parallel sessions are not abandoned). # -# THE SWEEP IS NOT ON THE BOOT PATH. A leftover stamp stays until session-close, and +# THE SWEEP IS NOT ON THE BOOT PATH. A leftover stamp stays until a close, and # under T3 every thread that never closes leaves one, so judging them inline made boot # grow with the set (126 stamps cost 49 s on one box, and every new session waits on # this hook before its first model call). orphan_scan_spawn (hooklib.sh) starts the # sweep detached, under a lock and a 30 min throttle (OPS_ORPHAN_SCAN_INTERVAL, in # seconds); boot pays for a throttle check and a fork, then reports what the last scan # left in the state dir. Flags can be up to one interval old, but a flagged stamp that -# session-close has since deleted stops counting at the next boot. A failed or vanished +# a close has since archived stops counting at the next boot. A failed or vanished # scan is named here every boot until a later scan passes. OPS_ORPHAN_SCAN=sync runs # the sweep inline instead, with no throttle (tests, or a closeout that wants fresh # flags). The sweep never removes or moves a stamp. diff --git a/.claude-config/hooks/session-work-init.sh b/.claude-config/hooks/session-work-init.sh index bc4e157..e8f0bc1 100755 --- a/.claude-config/hooks/session-work-init.sh +++ b/.claude-config/hooks/session-work-init.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # session-work-init.sh: SessionStart hook: stamp the session's start for the -# session-close WIP/work-tracking reconciliation gate. +# close's WIP/work-tracking reconciliation (session-end close). # # Writes ~/.claude-compact-cycle/session-start- ONCE per session so the -# session-close gate can bound "what did this session touch / how long did it +# close can bound "what did this session touch / how long did it # run" for time entry: even for a session that NEVER compacts (the common # case, and the one that gets forgotten). The compact-time work-log is only # bonus context on top of this stamp. @@ -36,7 +36,7 @@ STAMP="$RUNDIR/session-start-$KEY" # must not be re-stamped. A continuing session always still has its original # stamp, so it exits here. Reaching PAST this point means NO stamp exists: a # genuinely new work session: either a fresh startup OR a revived archived -# session (session-close deletes the stamp on close, so a revive starts clean). +# session (a close archives the stamp with session-end finish, so a revive starts clean). # Both MUST be stamped, so we do NOT gate on the SessionStart source. (Gating on # source was a bug: a revived session fires source=resume for its whole life, so # it would never stamp: silently disabling the gate for the Archive close path. diff --git a/.claude-config/hooks/session-work-selftest.sh b/.claude-config/hooks/session-work-selftest.sh index cbf04a7..db67a05 100755 --- a/.claude-config/hooks/session-work-selftest.sh +++ b/.claude-config/hooks/session-work-selftest.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # session-work-selftest.sh: prove the session-start-stamp invariants the -# session-close WIP/work-tracking gate depends on. Run by hand or after deploy +# close's WIP/work-tracking reconciliation depends on. Run by hand or after deploy # alongside guard-selftest.sh. Uses an isolated $HOME so it never touches the # real ~/.claude-compact-cycle. # diff --git a/.claude-config/remote-sessions/README.md b/.claude-config/remote-sessions/README.md index c8bc96b..e5e1d51 100644 --- a/.claude-config/remote-sessions/README.md +++ b/.claude-config/remote-sessions/README.md @@ -109,12 +109,39 @@ warns until it is gone). - **`archive-remote-claude.sh sweep`** flags each row: `GONE` (registered but not running), `STALE` (transcript older than `RC_STALE_DAYS`, a likely finished purpose), `IDLE` (running, detached), `OK`. It also scans for name - **collisions**. Park what is finished; `session-close` does it at the end of a - session's purpose. + **collisions**. Park what is finished; a session's close does it at the end + of its purpose ("Closing a session from inside it" below). - **Collision guard:** names normalize case and separators, so `dev` and `Dev` both map to registry name `Dev`; a stray differently-cased tmux session could otherwise be mistaken for the real one. `sweep` surfaces live collisions. +## Closing a session from inside it + +The last tool call of a close in tmux, after the receipt is printed (nothing +printed after it arrives anywhere). `session-end close` runs first; it has no +settle step outside T3. + +- Capture the name exactly once, before anything dies, and use it for both + steps: `SN="$(tmux display-message -p '#S')" && + ~/OPS/.claude-config/remote-sessions/archive-remote-claude.sh archive "$SN"; + tmux kill-session -t "=$SN" 2>/dev/null` (`archive` kills the session itself; + the second kill covers a session it could not reach). Asked again from a pane + whose session is already gone, `display-message` answers with ANOTHER live session's name, and the + exact-match kill then kills that innocent session (observed once). The `=` is + mandatory too: a bare `-t ` prefix-matches a sibling. +- Before the kill, confirm the captured name is this session and matches the + registry row you mean to park (tmux names are often lowercase, registry names + Title-Case, and names get reused). `archive` matches names in their normalized + form, so trust `sweep` over a hand-written grep of the registry file. If the + mapping looks inconsistent, stop and say so. +- Archive (the default) keeps the row's session id, directory and profile; + `archive-remote-claude.sh revive ` brings it back with full history. + Forget deregisters with no archive row (the "End a session for good" line + above); the transcript stays on disk. A session with no row (`archive` + refuses with `ERR_NOT_FOUND` before touching anything) needs only the kill. +- To close a different session by name, archive or forget its row from here, but + its own close (lessons, time, cleanup) can only run inside it. + ## One owner of the tmux server Nothing may (re)create Claude sessions on its own. Keep these constraints (the diff --git a/.claude-config/workflows/harness-audit.js b/.claude-config/workflows/harness-audit.js index 253a11d..3a7622c 100644 --- a/.claude-config/workflows/harness-audit.js +++ b/.claude-config/workflows/harness-audit.js @@ -79,7 +79,7 @@ Questions: (1) Real bugs: quoting, TOCTOU, races, error swallowing, hardcoded pa key: 'skills-audit', body: `LANE: SKILLS/ portfolio. Files: every file in ~/OPS/SKILLS/ (each skill dir, README.md, THIRD_PARTY_NOTICES.md). Flag any SKILLS/ dir left over from the retired skill mounts (DEPLOYMENT.md, "Leftovers from the skill mounts"). Compare against any installed third-party plugin skills (~/.claude/plugins/: find its skills dir) for overlap. -Questions: (1) Per skill: does SKILL.md frontmatter/trigger description match what actually fires it; are internal file references valid; is the content stale vs current model policy (retired model names, obsolete context-window caps, credit-gate assumptions): quote each stale passage. (2) Does each skill hold only what a capable agent with a fresh context could not know (this copy's systems, house standards), or does it restate procedure the agent already knows? Name each passage that belongs in doctrine, a repo doc or a script instead. (3) session-handoff + pre-compact-synthesis: overlap between them, and vs native session-resume (--resume/--continue works across restarts): is any part now redundant? (4) Does any bundled workflow script use Date.now() or other calls the Workflow runtime bans? (5) Dual-track skills (SKILL.md + 00_System_Prompt.md GUI project): drift between the two tracks? (6) Is each skill's frontmatter current vs today's skill capabilities (allowed-tools, context: fork, agent field, hooks in skills, $ARGUMENTS)? (7) Missing skills the Operator obviously needs but lacks (base this on the doctrine + memory pointers you see, not speculation).`, +Questions: (1) Per skill: does SKILL.md frontmatter/trigger description match what actually fires it; are internal file references valid; is the content stale vs current model policy (retired model names, obsolete context-window caps, credit-gate assumptions): quote each stale passage. (2) Does each skill hold only what a capable agent with a fresh context could not know (this copy's systems, house standards), or does it restate procedure the agent already knows? Name each passage that belongs in doctrine, a repo doc or a script instead. (3) The harness skill against bin/session-end and the hooks: does the skill state anything a command already prints, or claim a command, flag or output the code does not have? (4) Does any bundled workflow script use Date.now() or other calls the Workflow runtime bans? (5) Dual-track skills (SKILL.md + 00_System_Prompt.md GUI project): drift between the two tracks? (6) Is each skill's frontmatter current vs today's skill capabilities (allowed-tools, context: fork, agent field, hooks in skills, $ARGUMENTS)? (7) Missing skills the Operator obviously needs but lacks (base this on the doctrine + memory pointers you see, not speculation).`, }, { key: 'context-coherence', diff --git a/.claude-handoffs/README.md b/.claude-handoffs/README.md index afb8da7..3764add 100644 --- a/.claude-handoffs/README.md +++ b/.claude-handoffs/README.md @@ -16,38 +16,46 @@ too). Batons are keyed by **project** so parallel sessions on different projects never surface or clobber each other's handoffs. The key is the git repo toplevel (or the cwd if not in a repo), computed by `key.sh`, the single -source of truth used by **both** the notifier hook and the skill, so they -never drift. +source of truth used by the notifier hook, `session-end move` (which prints +the baton path) and the agent writing the baton, so they never drift. ## Layout - `key.sh`: emits the project key for the current cwd. Used by - `handoff-check.sh` and the `session-handoff` skill. + `handoff-check.sh` and `.claude-config/bin/session-end`. - `pending/.md`: the in-flight baton for one project. At most one pending per project; concurrent projects each get their own file. YAML frontmatter: `status: pending | consumed`, `project_key`, who wrote it (WORK/PERSONAL), timestamp, machine, cwd, git position, and an optional pointer to a project's own `SESSION_HANDOFF.md`. -- `archive/-.md`: consumed batons, for history. +- `archive/-.md`: consumed batons, for history. `` is + `date -u +%Y-%m-%dT%H-%M-%SZ`, dashes and never colons: NTFS reads a colon in + a file name as a stream separator, so one colon-named baton blocks `git + checkout` on every Windows clone. The `written_at` field inside keeps its ISO + colons (content, not a name). - `ACTIVE_HANDOFF.md`: **legacy** single-baton path. No longer written. `handoff-check.sh` still surfaces one IF its recorded `cwd` matches the current session (graceful migration); resume archives it like any other. ## Flow -1. **Write**: in the leaving session: say *"hand off"* / *"pass to the - next session"* (or `/session-handoff`). Runs the full four-artifact - synthesis (git, memory, tasks), computes the project key, then writes - `pending/.md`, commits it, and pushes it when - `.claude-config/bin/origin-private-check` verifies the OPS origin private - (the git-guard hook blocks the push otherwise). +1. **Write**: the leaving session runs `session-end move`, which prints the + baton path and whether an unread baton already sits there (never overwrite + one; archive it deliberately first). The agent writes `pending/.md` + with the resume note at the top (the `harness` skill, "Ending a thread"), + commits it, and pushes it when `.claude-config/bin/origin-private-check` + verifies the OPS origin private (the git-guard hook blocks the push + otherwise). Until it is pushed, no other machine sees it. 2. **Notify**: the next session in **that same project** (either profile, any machine) fires the shared `handoff-check.sh` SessionStart hook, which prints a one-line banner if a PENDING baton exists for the project's key. Sessions in other projects see nothing. Notify only; it never auto-loads. 3. **Resume**: say *"resume handoff"* / *"pick up where I left off"*. - Reads the project's baton + referenced files + memory, summarizes state, - then moves it to `archive/` (marked consumed) so it won't re-fire. - -Driven by the `session-handoff` skill. See -`~/OPS/SKILLS/session-handoff/SKILL.md`. + Read the project's baton and the files it points at, confirm the repo's + HEAD still matches its `git_head` (if it moved, reconcile first), and treat + its claims as hypotheses to re-check. Then, only on an actual resume, move + it to `archive/` with `status: consumed`, `consumed_by` and `consumed_at`, + commit and push under the same rule, so the banner stops firing. A look + without a resume leaves it pending. +4. **Crossing profiles**: when the baton's writer differs from the current + profile, say so; that profile's MCP connectors may differ. diff --git a/.claude-handoffs/key.sh b/.claude-handoffs/key.sh index 6220f88..6b03e8c 100755 --- a/.claude-handoffs/key.sh +++ b/.claude-handoffs/key.sh @@ -2,8 +2,8 @@ # key.sh: the single source of truth for the handoff PROJECT KEY. # # Emits a stable, filesystem-safe key for the current project so the WRITE -# (session-handoff skill), the READ (same skill), and the notifier -# (handoff-check.sh) all agree on the baton filename and never drift. +# (session-end move prints the path), the READ (the resuming agent), and the +# notifier (handoff-check.sh) all agree on the baton filename and never drift. # # Key = git repo toplevel if inside a repo, else the current working dir; # slashes → dashes, leading dashes stripped. handoff-check.sh inlines this diff --git a/.claude-memory/README.md b/.claude-memory/README.md index 8f40453..6cf7dcc 100644 --- a/.claude-memory/README.md +++ b/.claude-memory/README.md @@ -75,8 +75,8 @@ are read on demand when their `description` matches the work at hand. session digest (`--digest`), the prompt hint (`--hint`), and a search by hand (`--find `); `.claude-config/bin/README.md` has the details. A pool over 60 entries draws a warning and nothing else. -- **Pruning**: the thread that closes prunes the memory it touched - (`session-close`, `pre-compact-synthesis`); deletes of content that has not +- **Pruning**: the thread that ends prunes the memory it touched + (`session-end` lists the entries; the `harness` skill, "Ending a thread"); deletes of content that has not landed elsewhere stay operator-gated. The template retired its periodic `memory-prune` audit skill on 2026-11-17. (The fleet-era `ac-memory-gc` inventory and its weekly `ops-memory-gc` timer are retired too.) diff --git a/AGENTS.md b/AGENTS.md index 5e809e5..5270028 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -72,7 +72,7 @@ current task allows. separately by that organization, not through this repo. - `.claude-config/`, `.claude-memory/`, and `.claude-handoffs/` are literal names; do not rename them. -- Personalization lives only in the files `harness-update` never syncs: +- Personalization lives only in the files the template sync never touches: `USER.md`, `voice.md`, `standing-orders.md`, the `work-tracking.md`, `team.md`, and `tools.md` slots, `.bootstrapped`, and `CONTEXT/projects/`. The doctrine files (`core.md`, `foreman.md`, `how-i-work.md`, @@ -81,7 +81,7 @@ current task allows. edit there. - The template adds and offers; it never takes away what a copy's owner chose (`CONTEXT/how-i-work.md`, "The template and a copy's owner"). A change - to deploy, `harness-update`, or a gate that would delete, cap, or block an + to deploy, the template sync, or a gate that would delete, cap, or block an owner's content (a plugin, a memory pool, a retired skill, a hook, a pin, a remote, a backup) ships as a warning or an offer, never a FAIL, a block, or an automatic removal. Only an unsafe thing is overruled. One stated @@ -110,7 +110,7 @@ current task allows. | What exists, the folder tree | `README.md` | | Deploy (Stage 1 and 2), migration, T3 Code hosts | `DEPLOYMENT.md` | | First launch | `BOOTSTRAP.md` | -| Template sync from upstream | the `harness-update` skill (slash-only: the Operator types `/harness-update`) | +| Template sync from upstream | `.claude-config/bin/harness-update-scan.sh` (`.claude-config/bin/README.md`) | | Scripts, tests, and the gate | `.claude-config/bin/README.md` | | Porting rules, the CI gate, local test commands | `CONTRIBUTING.md`, `.github/workflows/gate.yml` | | Licenses of adapted third-party work | `SKILLS/THIRD_PARTY_NOTICES.md` | diff --git a/ARCHIVE/README.md b/ARCHIVE/README.md index bd70d44..63cd0f8 100644 --- a/ARCHIVE/README.md +++ b/ARCHIVE/README.md @@ -4,8 +4,8 @@ Holding pen for **machine-local archives** you want to keep on this machine but out of git: a tarball of a closed project's working tree, an exported transcript, a snapshot taken before a risky migration. The contents are gitignored (`ARCHIVE/*` in `.gitignore`, with this README the only tracked -file), so nothing here syncs to your other machines, and `harness-update` -never touches the folder. +file), so nothing here syncs to your other machines, and the template sync +(`harness-update-scan.sh`) never touches the folder. Nothing in the harness writes here on its own any more: the retired multi-agent fleet's close-out tool did, and it is gone. If you never use the diff --git a/BOOTSTRAP.md b/BOOTSTRAP.md index 2e0a1e2..e5f9a86 100644 --- a/BOOTSTRAP.md +++ b/BOOTSTRAP.md @@ -14,7 +14,7 @@ replace. The doctrine already ships and stays generic: `core.md` (always loaded), `foreman.md` (the main thread's rules, printed into foreman sessions by a hook), `how-i-work.md` (P1-P15 and the situational rules), `model-roles.md`, -and `project-kata.md`. The template sync (`harness-update`) keeps updating those +and `project-kata.md`. The template sync (`harness-update-scan.sh`) keeps updating those files, so bootstrap never edits them, with one exception named in Stage 1 (the kata's Operator overlays). What is missing is the *who* layer, and it lives only in files no template sync touches: @@ -144,7 +144,7 @@ Constraints, Improvement Kata, and the Phoenix Project lens **Round E: Output defaults.** Confirm or override the default document format (`.docx` / `.md` / other), the conversation register (casual or formal), and the visual page for data and reports: in a T3 Code thread it is -shown inline by default without asking (`t3-html-render`), and elsewhere it is +shown inline by default without asking (the `harness` skill), and elsewhere it is offered first (`how-i-work.md` § Reporting to the Operator). Offer: `Keep the default` · `Only when I ask` · `Always offer first`. Record overrides as standing orders. @@ -282,7 +282,7 @@ threads; the managed-settings option does. 5. **The slots.** `CONTEXT/work-tracking.md`: the Operator's real time, ticket, and board tools (which system, how time is logged), replacing the EXAMPLE blocks and deleting any block for a surface they do not use. This - is the file the `session-close` reconciliation gate reads; leave it + is the file a close's time reconciliation reads (`session-end close`); leave it accurate or empty, never stale EXAMPLE content posing as a real system. `team.md` and `tools.md`: fill what Round A and recon gave you, or leave the templates (every skill that reads them degrades gracefully). diff --git a/CHANGELOG.md b/CHANGELOG.md index e4eff56..60cce3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,48 @@ Notable changes to OPS, newest first. Format: the date, then what changed and wh matters. This file starts fresh at the public release; the harness's private prehistory is deliberately not part of it. +## 2026-11-17: one `harness` skill replaces six + +`active-minutes` bills to the nearest hundredth of an hour again (40 minutes shows 0.67 h), the owner's ruling the same day; the truncation added earlier today is reverted, so every copy reads the same. + +The owner's test for a skill: it holds only what a capable agent with a fresh context could +not know (facts, house rulings, traps), and the machinery lives in hooks and scripts. With +`session-end` doing the mechanical steps of every ending, the three session skills and three +other template skills were mostly procedure. One `harness` skill, the same page on every box, +now carries the facts about the box and T3 Code. + +- **Added `SKILLS/harness/`**: how a thread pauses, moves and closes (`session-end`, the + compact line and the harness-token condition, the baton, the settle route, billing only when + a ticket was worked), talking to the Operator, waiting, helper agents, the second-vendor + review, and the box's guards and commands. The inline-page starter, worked example and + palette moved with it to `SKILLS/harness/assets/` and `references/palette.md`; the T3 + frame rules (fluid width, render height, the saved-page link, theme injection) are a comment + at the top of the starter. `tests/t3-html-render-test.py` reads the new path and now fails + if either page is missing instead of passing with nothing checked. +- **Removed** `pre-compact-synthesis`, `session-close`, `session-handoff`, `grabit`, + `t3-html-render` and `harness-update`. Facts that pass the test and that no command prints + moved beside their commands: `bin/README.md` (session-end: archiving stamps by hand, the + leftover-stamp judgment, cleanup traps, a close outside T3; compact-cycle: the manual + `/compact` per host and its preservation text; a new `harness-update-scan.sh` section: + classes, marker, exclusions, older and renamed copies, apply only on the Operator's word; + grabit: receiving), `remote-sessions/README.md` ("Closing a session from inside it": the + single name capture and the tmux traps) and `.claude-handoffs/README.md` (the flow through + `session-end move`, the colon-free archive name, consuming a baton). Procedure the commands + now run is dropped. A template sync never deletes, so an older copy keeps the six folders + until its owner removes them; `SKILLS/README.md` names them so the skills-index check stays + quiet, and `DEPLOYMENT.md` ("Leftovers from the six retired skills") says what to keep. +- **Fixed `grabit --serve-off`**: it ran `tailscale serve reset`, which removes every serve + handler on the box and once took a box's T3 endpoint (and its phone app) offline. `--serve` + now mounts under `/grabit` on port 443, never the root, and `--serve-off` turns off only + that path, warning when the turn-off is refused. New `tests/grabit-test.sh` (stub + `tailscale` and `sudo`) fails if reset is ever invoked. +- **Repointed** every hook, command and doc that named the six: `context-watch.sh` route text + now says "run session-end pause and finish what it lists (the harness skill)" (text only), + `session-end` prints where the by-hand archive and the tmux close are documented and, on a + pause, that the compact line needs the box's T3 harness token, `handoff-check.sh` and the + briefing's leftover-stamp line no longer name a skill, and `CONTEXT/core.md` "Where to look" + routes pause, move and close to the `harness` skill and `session-end`. + ## 2026-11-17: the skill mounts retire The template mounted no skills once `SKILLS/VENDORED.tsv` lost its last row, yet the @@ -30,6 +72,7 @@ delivered separately by that organization. daily backup does not commit it, and `verify-ops.sh` warns that the clone is missing from `projects-map.md` until it is gone. + ## 2026-11-17: one command starts every thread ending Pause, move and close each assembled their mechanical steps by hand from prose in three diff --git a/CONTEXT/USER.md b/CONTEXT/USER.md index 94953bf..f808ccb 100644 --- a/CONTEXT/USER.md +++ b/CONTEXT/USER.md @@ -5,7 +5,7 @@ USER-TEMPLATE: unfilled. This line is the verify-ops.sh identity canary (check 21): on a bootstrapped copy it must be gone. Remove it once every EXAMPLE block below holds your own facts. -harness-update never syncs this file in either direction +The template sync never touches this file in either direction (harness-update-scan.sh is_excluded): it is your identity, never the public template's. BOOTSTRAP.md writes it on first launch. --> diff --git a/CONTEXT/core.md b/CONTEXT/core.md index a43a365..107846e 100644 --- a/CONTEXT/core.md +++ b/CONTEXT/core.md @@ -149,7 +149,7 @@ gets the AI-tells catalog, `CONTEXT/ai-tells.md`. Writing as a person or on their behalf follows that person's own voice file; the Operator's is `CONTEXT/voice.md`. This writing style is the template's default; each copy's owner may change theirs. Formats follow the task: in T3 Code, -an inline page (`t3-html-render`) for data, reports, and breakdowns, shown +an inline page (the `harness` skill) for data, reports, and breakdowns, shown without asking; `.docx` for client deliverables, `.md` for notes and docs, `.csv` for data, native extensions for code. Outputs land in the active project's directory, never the OPS root; scratch and tool logs go to @@ -162,8 +162,8 @@ in reasoning and then repeat it in the reply. Compaction, batons, rest stops, and teardown are the foreman's: `CONTEXT/foreman.md`. A lane returns its result; it never compacts, closes a -thread, or runs `session-close`: a lane inherits the foreman's session id, so -a close run from a lane settles the foreman's session. +thread, or runs `session-end` (which refuses a lane): a lane inherits the +foreman's session id, so a close run from a lane settles the foreman's session. ## Memory and where knowledge goes @@ -207,7 +207,7 @@ Operator to fetch data. Project repos live under `PROJECTS//`. | Machines, deploy, hooks | `CONTEXT/machines.md` (when the Operator keeps one); `DEPLOYMENT.md` | | The OPS repo itself | `AGENTS.md`, `README.md` | | Delegation or review | `CONTEXT/foreman.md`; `CONTEXT/how-i-work.md` P8, P12, Review pickup | -| Compact, handoff, close | `pre-compact-synthesis`, `session-handoff`, `session-close` | +| Pause, move, close; T3, waiting, helpers, the box | the `harness` skill; `session-end` | The MCP tools and skills in this harness are self-built by the people who use them. A surprising tool result is a defect in that tool: file it with the diff --git a/CONTEXT/foreman.md b/CONTEXT/foreman.md index 8211b01..502fefd 100644 --- a/CONTEXT/foreman.md +++ b/CONTEXT/foreman.md @@ -97,7 +97,7 @@ loses nothing the harness needs. The bans, effort, and retired ids are in ## Rhythm and compaction -A compact is a rest stop (P2). Foremen run `pre-compact-synthesis` at natural +A compact is a rest stop (P2). Foremen run `session-end pause` at natural breaks (a closed task, a merged PR, a settled plan, a branch switch) and when the context-watch hook nudges (about 65% of the window), the Operator fires `/compact` (a T3 thread on a box with a harness token runs `compact-cycle.sh` @@ -118,7 +118,7 @@ On resume, the summary and baton are hypotheses; re-confirm the task and files against the repo and git state. Act on DECIDED work, never an unapproved PROPOSAL or a documented dead end. Durable anchors continue work; do not frame them as a "stopping point", "wind-down", or "pick up later". A session never -closes itself: offer `session-close` when its purpose is complete and wait for +closes itself: offer the close when its purpose is complete and wait for the Operator's word. ## Memory and context files diff --git a/CONTEXT/how-i-work.md b/CONTEXT/how-i-work.md index 43f33eb..380c456 100644 --- a/CONTEXT/how-i-work.md +++ b/CONTEXT/how-i-work.md @@ -3,8 +3,8 @@ Situational rules and the reasoning behind P1-P15. Always-on rules belong to [core.md](core.md), and the rules that bind only the foreman to [foreman.md](foreman.md); references here name their owner instead of -repeating them. This file is generic doctrine that `harness-update` syncs from -the template. The Operator's own rulings live in +repeating them. This file is generic doctrine that the template sync +(`harness-update-scan.sh`) carries from the template. The Operator's own rulings live in [standing-orders.md](standing-orders.md), which no template sync touches, and take precedence over the defaults here. Changes to doctrine follow [core: Memory](core.md#memory-and-where-knowledge-goes). @@ -62,14 +62,15 @@ When preparing a rollup: with what mattered and what is next. - In a T3 Code thread, data, reports, research findings, and comparisons are shown as an inline page by default, without asking first - (`t3-html-render`): one page on the turns where a picture reads faster + (the `harness` skill): one page on the turns where a picture reads faster than prose, never on every turn. Link the saved page so the Operator can download or share it; open a browser preview or a local server only when asked. Why: a format the reader wants by default should not wait behind a question. Outside T3, where no inline page exists, offer a rendered page and wait for a yes; once authorized for a workstream, continue that format without asking again. -- "Send me a file" on a headless box invokes `grabit`, not in-chat delivery. +- "Send me a file" on a headless box invokes `.claude-config/bin/grabit`, not + in-chat delivery. - File praise for a judgment call too, so the successful pattern survives. ## Output and files @@ -285,7 +286,7 @@ file; it never edits this file, so a template sync cannot undo it. ## The template and a copy's owner A copy belongs to its owner. Template changes reach it through -`harness-update`, which classifies every file and keeps what the owner changed +the template sync (`harness-update-scan.sh`), which classifies every file and keeps what the owner changed or chose. The template adds improvements and offers options; it never takes away what the owner chose or built. Anything that would delete, cap, or block the owner's content (a plugin, a memory pool's size, a skill the template @@ -300,7 +301,7 @@ One stated exception, for model pins: the drift gate FAILs on a model id the policy bans or has retired, and on a Haiku pin that is missing or not the one allowed id (`verify-ops.sh` checks 15 and 15b, `model-roles.md` Bans). The FAIL edits nothing and blocks nothing: the pin stays the owner's to change, and -deploy and `harness-update` never touch it. It stays a FAIL, not a WARN, because +deploy and the template sync never touch it. It stays a FAIL, not a WARN, because such a pin fails quietly in use (lanes keep running a model the policy has dropped, and nothing else says so), and because the template's own CI runs the same checks to keep its shipped pins and the Stage-1 settings clean. Every @@ -316,8 +317,8 @@ danger, so the git guard warns about it and lets the commit run. Everything else is the owner's call. Why: a harness that quietly rewrites its owner's own choices (a sync remote, a pin, a layout built to suit their way of working) teaches the owner to stop taking template updates, and then no improvement reaches them. -Contributors apply the same test to every change to deploy, `harness-update`, -and the drift gate: if the owner's own choice would be removed, capped, or +Contributors apply the same test to every change to deploy, the template +sync, and the drift gate: if the owner's own choice would be removed, capped, or blocked, make it advice. ## Framework alignment @@ -357,7 +358,7 @@ wraps that launch, so nothing on the boot path may depend on one: the core loads through `~/.claude/rules/ops-core.md` and the hooks through the Stage-1 settings, the same as in a terminal. Approvals use the T3 UI. A T3 thread on a box with a harness token compacts itself; everything else stays manual. -After `pre-compact-synthesis`, the thread writes its resume baton and runs +After `session-end pause` and what it lists, the thread writes its resume baton and runs `bin/compact-cycle.sh` on its own thread when the context-watch nag names it; the script fires `/compact` through T3's API and sends the baton only once T3 confirms that compaction completed (the token and its limits: diff --git a/CONTEXT/model-roles.md b/CONTEXT/model-roles.md index 76c9c33..ec570d1 100644 --- a/CONTEXT/model-roles.md +++ b/CONTEXT/model-roles.md @@ -56,7 +56,7 @@ Measured, not assumed: a blind comparison in the harness OPS is ported from (tas Never on Haiku: builds, refutation, review, security triage, or other judgment-heavy work. It has no server-side refusal fallback, so a declined Haiku lane simply fails. -How the 100K ceiling holds. Claude Code's own auto-compaction holds it, so a Haiku lane never has to watch its context. The Stage-1 settings turn auto-compaction on harness-wide (`autoCompactEnabled: true` and `DISABLE_AUTO_COMPACT` set to `"0"`; both switches are process-wide, and either one closed stops every compaction) and pin `modelSettings: {"claude-haiku-5-5": {"autoCompactWindow": 100000}}`. The env switch is `"0"` rather than absent because a removed key leaves an old `"1"` in force: a running session keeps it through a settings reload, and a `claude` started from that session inherits it. Opus and Sonnet keep their 1M window; for them auto-compaction near the end of the window is a backstop, and manual compaction at natural breaks stays the norm (`pre-compact-synthesis`). Stage-1 also sets `idleCompaction: false`, so an idle main thread is never compacted early. +How the 100K ceiling holds. Claude Code's own auto-compaction holds it, so a Haiku lane never has to watch its context. The Stage-1 settings turn auto-compaction on harness-wide (`autoCompactEnabled: true` and `DISABLE_AUTO_COMPACT` set to `"0"`; both switches are process-wide, and either one closed stops every compaction) and pin `modelSettings: {"claude-haiku-5-5": {"autoCompactWindow": 100000}}`. The env switch is `"0"` rather than absent because a removed key leaves an old `"1"` in force: a running session keeps it through a settings reload, and a `claude` started from that session inherits it. Opus and Sonnet keep their 1M window; for them auto-compaction near the end of the window is a backstop, and manual compaction at natural breaks stays the norm (`session-end pause`, the `harness` skill). Stage-1 also sets `idleCompaction: false`, so an idle main thread is never compacted early. What would break it: `CLAUDE_CODE_AUTO_COMPACT_WINDOW` outranks every per-model window; `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` lowers every model's threshold; a removed `DISABLE_AUTO_COMPACT` leaves an inherited `"1"` in force; Claude Code drops a malformed per-model value without a word, and `claude doctor` does not flag it; `/autocompact` saves a window for the current model into the user settings file, which on a linuxploitacious host is the shared Stage-1 file; and a top-level `autoCompactWindow` in a higher-precedence settings file (`settings.local.json`, managed settings) replaces the per-model windows of lower files. No OPS check reads these keys today, so when a Haiku lane runs past 100K, read them in that order. @@ -84,7 +84,7 @@ Effort is `xhigh` on every tier, Haiku 5.5 included (`effortLevel` and `CLAUDE_C - The top-level `"model"` pin in `settings.json` is what boots. On Linux and macOS, `~/.claude/settings.json` is a symlink into your linuxploitacious checkout (`~/linuxploitacious/claude/.claude/settings.json`), shared by every profile on the host. A `/model` or `/config` save writes that tracked file: it leaves a diff in the checkout, and a later `git pull --ff-only` that touches the file fails until you resolve it. Nothing in OPS writes that file; deploy and the drift gate only read it. - To change tiers on your own copy, change the `ANTHROPIC_DEFAULT_*_MODEL` and `CLAUDE_CODE_SUBAGENT_MODEL` env keys and the `"model"` pin together, in a fork of linuxploitacious or in managed settings, so a later Stage-1 pull does not undo or conflict with it. The harness layer is model-agnostic: the SessionStart matchers and the skills carry no per-model text, so a tier change is a settings and pin change plus this file, never a rewrite of the harness prose. -- Pins are the owner's. Deploy and `harness-update` never edit a copy's `"model"` pin, its env keys, or an agent pin the owner changed. The drift gate FAILs on a retired or banned id, edits nothing, and says how to fix it (the stated exception in `how-i-work.md`, "The template and a copy's owner"). An administrator who wants every box on the current tiers can set them through managed settings (`/etc/claude-code/managed-settings.json` on Linux), which outrank the user's own settings without editing the user's files. Offer that route; do not impose it on a copy whose owner chose a different pin, and never require a tier the owner's plan lacks (Fable above all). +- Pins are the owner's. Deploy and the template sync never edit a copy's `"model"` pin, its env keys, or an agent pin the owner changed. The drift gate FAILs on a retired or banned id, edits nothing, and says how to fix it (the stated exception in `how-i-work.md`, "The template and a copy's owner"). An administrator who wants every box on the current tiers can set them through managed settings (`/etc/claude-code/managed-settings.json` on Linux), which outrank the user's own settings without editing the user's files. Offer that route; do not impose it on a copy whose owner chose a different pin, and never require a tier the owner's plan lacks (Fable above all). - To check that the models your settings pin answer on your plan, run `.claude-config/bin/model-probe.sh` (one short request per distinct id; `--list` shows what it would probe without calling the API). It reports only; it never edits a settings file. - If a pinned model has genuinely gone unavailable, remove the `"model"` key so Claude Code falls back to the `ANTHROPIC_DEFAULT_*_MODEL` aliases; do not guess a replacement. - T3 Code pickers. List `claude-opus-5-5` and `claude-sonnet-5-5` under `providerInstances..config.customModels` in `~/.t3/userdata/settings.json` (a plain list of id strings, hot-reloaded), so the live tiers stay pickable whatever T3's built-in catalog lists; T3 appends `[1m]` itself when the thread's 1M option is on. Haiku 5.5 is allowed and already in the built-in list, so it needs no entry. Hide the banned and retired ids per instance (`providerModelPreferences..hiddenModels`, set in the T3 UI and kept by the server in the same file since T3 0.1.0). The picker never hides a custom model, so never add a banned or retired id to `customModels`. diff --git a/CONTEXT/slots.md b/CONTEXT/slots.md index d0b27de..dd5cda1 100644 --- a/CONTEXT/slots.md +++ b/CONTEXT/slots.md @@ -16,12 +16,12 @@ Slots live here, in the distribution's `CONTEXT/`, never in a skill repo. Each r | Slot | Holds | Degrade when absent | Filled in this copy by | |---|---|---|---| | `voice.md` | operator register and brand voice | plain professional prose | `voice.md` itself (BOOTSTRAP writes a starter in Stage 1 and the evidence-based profile in Stage 2); who the Operator is stays in `USER.md` | -| `work-tracking.md` | ticketing and billing bindings: which system, which fields | skip the tracking step and say it was skipped | `work-tracking.md` (proven slot; `session-close` reads it) | +| `work-tracking.md` | ticketing and billing bindings: which system, which fields | skip the tracking step and say it was skipped | `work-tracking.md` (proven slot; a close reads it) | | `team.md` | roster, roles, who owns what | address roles generically, no names | `team.md` (stub until filled) | | `tools.md` | which MCP namespaces exist on this host | use only tools the session actually exposes | `tools.md` (stub until filled) | | `doctrine.md` | the engineering-principle registry (the P numbers skills cite by name) | name the exact required behavior instead of a principle number | `how-i-work.md` § Principles (P1-P15), via the `doctrine.md` pointer | -`work-tracking.md` is the proven pattern: `session-close` reads its ticketing binding from context rather than hard-coding a system, which is what lets the same close ritual run for a user on any tracker. On a fresh copy, `BOOTSTRAP.md` (or the first close) fills the empty slots; a slot left blank is a valid state, because every consuming skill states its degrade. +`work-tracking.md` is the proven pattern: a close (`session-end close`) reads its ticketing binding from context rather than hard-coding a system, which is what lets the same close ritual run for a user on any tracker. On a fresh copy, `BOOTSTRAP.md` (or the first close) fills the empty slots; a slot left blank is a valid state, because every consuming skill states its degrade. ## Adding a slot diff --git a/CONTEXT/standing-orders.md b/CONTEXT/standing-orders.md index d42891b..afca604 100644 --- a/CONTEXT/standing-orders.md +++ b/CONTEXT/standing-orders.md @@ -1,7 +1,7 @@ # Standing orders diff --git a/CONTEXT/voice.md b/CONTEXT/voice.md index 06deb3d..0a8ea86 100644 --- a/CONTEXT/voice.md +++ b/CONTEXT/voice.md @@ -5,7 +5,7 @@ The well-known voice slot (CONTEXT/slots.md): portable skills read this file by name for the Operator's register and brand. If it is still the template, or absent, a skill uses plain professional prose instead. -harness-update never syncs this file in either direction +The template sync never touches this file in either direction (harness-update-scan.sh is_excluded): it is the Operator's voice, never the public template's. BOOTSTRAP.md writes a starter in Stage 1 and replaces it with an evidence-based profile in Stage 2. diff --git a/CONTEXT/work-tracking.md b/CONTEXT/work-tracking.md index 0458320..8f36dda 100644 --- a/CONTEXT/work-tracking.md +++ b/CONTEXT/work-tracking.md @@ -10,8 +10,8 @@ > Replace every EXAMPLE block with your own systems, or delete the blocks you > don't need. Delete this banner once the file is real. > -> Why this matters: the `session-close` skill reads this file at close time to -> run its **WIP & work-tracking reconciliation gate**, the step that makes your +> Why this matters: a thread's close (`session-end close`, the `harness` skill) +> reads this file to run its **WIP & work-tracking reconciliation gate**, the step that makes your > tickets / time / board reflect what the session actually did before the > session is gone. This file is the *only* place that gate learns your systems; > it hardcodes nothing. If a section is empty, the gate degrades gracefully for diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4f6fa7f..72176a4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -195,7 +195,7 @@ deleter on `/` and `$HOME` and wiped most of a home directory. A throwaway ≤ 72 chars). Body explains *why* when it isn't obvious. - The template adds and offers; it never takes away what a copy's owner chose (`CONTEXT/how-i-work.md`, "The template and a copy's owner"). A change - to deploy, `harness-update`, or a gate that would delete, cap, or block an + to deploy, the template sync, or a gate that would delete, cap, or block an owner's content (a plugin, a memory pool, a hook, a pin, a remote) ships as a warning or an offer, never a FAIL, a block, or an automatic removal. The one stated exception is the drift gate's FAIL on a banned or retired model diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index 70d17b2..f489596 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -500,7 +500,7 @@ Stage 2 deploy scripts. you enabled it, disable it: `systemctl --user disable --now ops-memory-gc.timer` and remove its links from `~/.config/systemd/user/`. The thread that closes prunes the memory it - touched (`session-close`). + touched (`session-end` lists the entries; the `harness` skill). **SessionStart matchers.** Keep the Stage-1 SessionStart hooks split by source, so a resume or compact does not re-pay the full boot: a `"startup|clear"` group @@ -582,6 +582,16 @@ sources you added yourself. Once you have preserved the files you want and removed unwanted mirrors, the old ledger can be removed too. +### Leftovers from the six retired skills (copies older than 2026-11-17) + +On 2026-11-17 the `harness` skill replaced `pre-compact-synthesis`, +`session-close`, `session-handoff`, `grabit`, `t3-html-render` and +`harness-update`. A template sync lists their files as REMOVED and deletes +nothing, so an updated copy keeps the six folders under `SKILLS/` and they still +load as skills, describing the old hand-run procedure. Nothing in the new tree +reads them. Delete them once you have kept anything you added to them yourself; +the inline-page assets now live in `SKILLS/harness/`. + ### Upgrading from a copy older than 2026-11-07 The 2026-11-07 release split the always-loaded core. The rules that bind only @@ -589,7 +599,7 @@ the main thread (intake and reporting, orchestration, review and merge, model choice, rhythm) moved from `CONTEXT/core.md` to the new `CONTEXT/foreman.md`, and `core.md` shrank to what a lane needs too. Nothing is taken away from a copy: the sync only adds and updates files, and every `core.md#...` anchor -still resolves. After you sync the template (the `harness-update` skill): +still resolves. After you sync the template (`harness-update-scan.sh`): 1. **Read the sync report for `core.md`.** If you never edited it, it arrives as an UPDATE. If you did, it is a CONFLICT, which the sync lists and leaves @@ -611,7 +621,7 @@ The 2026-10-19 release replaced the charter-and-digest boot with layer to new file names. A copy from before it boots through the old `claude()` shim, which fails open once the charter is gone, so it keeps working but without doctrine until you migrate. After you sync the template -(the `harness-update` skill pulls `core.md`, `how-i-work.md`, `AGENTS.md`, and +(`harness-update-scan.sh` pulls `core.md`, `how-i-work.md`, `AGENTS.md`, and the code; it never copies your identity files in either direction): 1. **Re-run Stage 2.** `bash ~/OPS/.claude-config/deploy.sh` links the core @@ -658,7 +668,7 @@ the code; it never copies your identity files in either direction): Copies from before the 2026-10-18 release pinned retired models, ran a deploy step that rewrote the model pin inside your Stage-1 settings, and reinstalled -the caveman plugin. After you sync the template (the `harness-update` skill) +the caveman plugin. After you sync the template (`harness-update-scan.sh`) and re-run Stage 2: 1. **Restore the Stage-1 settings file if an earlier deploy edited it.** Check @@ -695,7 +705,7 @@ Explicitly NOT handled by Stage 2 (`deploy.sh` / `deploy.ps1`): setup (see "T3 Code hosts"). - **Your own choices.** Your git remotes, your backup arrangements, your memory layout and sync, your plugins, your hooks, and your model pins are yours: neither deploy - nor `harness-update` changes them (`CONTEXT/how-i-work.md`, "The template + nor the template sync changes them (`CONTEXT/how-i-work.md`, "The template and a copy's owner"). A shim over a system command, such as the one `safe-pkill --install-shims` places over `pkill` and `pgrep` where that tool ships, is a step you run by hand; deploy never installs one. diff --git a/README.md b/README.md index dc1cf63..c0bc205 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,7 @@ specific to T3: 1. In T3 Code, add `~/OPS` as a project and open a thread on it. The first thread finds no bootstrap marker and runs `BOOTSTRAP.md` (step 3). 2. Run T3's browser setup once per host. T3's page previews and browser tools - (the `t3-html-render` skill checks each inline page with `html_preview`) + (the `harness` skill checks each inline page with `html_preview`) run a headless Chrome that needs system libraries and, on Ubuntu 23.10 and later, an AppArmor profile: @@ -312,10 +312,9 @@ adapts is listed with its license in ## Template sync A copy made from the template shares no git history with it, so `git merge` has -no common ancestor. The `harness-update` skill (type `/harness-update`; it is -slash-only, so an agent never starts a template sync on its own) is the -safe path across that gap, and `.claude-config/bin/harness-update-scan.sh` is -its mechanical half. Run from inside your copy (`cd ~/OPS`), the scan adds an +no common ancestor. `.claude-config/bin/harness-update-scan.sh` is the safe +path across that gap; ask an agent to update the harness, or run it yourself +(its facts are in `.claude-config/bin/README.md`). Run from inside your copy (`cd ~/OPS`), the scan adds an `ops-template` remote, fetches it, and classifies every file as NEW, UPDATE, CONFLICT, MODE, REMOVED, or IDENTICAL. By default it reports and touches nothing. `--apply-safe` copies NEW and UPDATE files only, never a CONFLICT, a @@ -431,7 +430,7 @@ For a forker, this means: - **Your identity is not in the boot.** `USER.md`, `voice.md`, and `standing-orders.md` load on demand, through the core's "Where to look" - table. BOOTSTRAP fills them, and `harness-update` never syncs them, so a + table. BOOTSTRAP fills them, and the template sync never touches them, so a template refresh never clobbers them. - **Keep the core small and generic.** It is paid on every turn of every session and lane, and the template sync updates it. Put your rulings in @@ -442,7 +441,7 @@ For a forker, this means: - **The drift gate checks it.** `verify-ops.sh` fails if the core is missing, over budget, or not linked (check 16), if a root `CLAUDE.md` would hide `AGENTS.md` (1b), if `USER.md` is still the template on a bootstrapped copy - (21), or if `harness-update` stops excluding an identity file (23). + (21), or if `harness-update-scan.sh` stops excluding an identity file (23). ## Posture diff --git a/SKILLS/README.md b/SKILLS/README.md index b4a5685..ee4f146 100644 --- a/SKILLS/README.md +++ b/SKILLS/README.md @@ -65,12 +65,9 @@ Local entries live in this folder. | Entry | Deployed as Skill? | GUI Project? | Notes | |-------|--------------------|--------------|-------| -| `grabit` | yes | no | Claude Code only: SEND direction of the Tailscale file courier off a headless box; a GUI Project can't execute the local binary. It also says an image attached in a T3 message is already a path to read, not a receive. See [[grabit/README.md]]. | -| `pre-compact-synthesis` | yes | no | Claude Code only: durable-state synthesis plus closeout hygiene, taken at natural rest stops and before a manual `/compact`. Context-watch and automatic compaction are safety nets, not the ritual. Also holds the ask card (at most three asks, each with a recommendation and a default, every claim marked) for "what do you need from me" questions and close receipts. No GUI Project half exists. | -| `session-handoff` | yes | no | Claude Code only: write/read baton pair for handing off sessions across profiles and machines; pairs with `pre-compact-synthesis`. No GUI Project half exists. | -| `session-close` | yes | no | Claude Code only: permanent end-to-end close (the session's own cleanup, scoped to what it touched and never another live session's work; the work-tracking reconciliation gate; the receipt as an ask card; then archive or deregister and tear down the backend). Runs only on the operator's explicit word. The terminal counterpart to `pre-compact-synthesis` (pause) and `session-handoff` (move). | -| `harness-update` | yes (slash-only: `/harness-update`) | no | Claude Code only: safe template-sync of a private OPS copy from the public upstream (no shared git history); the scan classifies files NEW/UPDATE/CONFLICT/IDENTICAL, hard-excludes identity, memory, and handoff surfaces, and never auto-applies a CONFLICT. See [[harness-update/SKILL.md]]. | -| `t3-html-render` | yes | no | T3 Code only: builds one self-contained interactive HTML page for data, a report, research findings, a comparison, or a plan, checks it with `html_preview` at two widths and both themes, and shows it inline with `html_render`. Carries a starter page, a worked example (synthetic data), and a palette validated for colorblind safety on T3's surfaces. In a T3 thread the page is the default for data and reports (`CONTEXT/how-i-work.md`, "Reporting to the Operator"). | +| `harness` | yes | no | Claude Code in T3 Code: the facts about the box and T3 an agent cannot work out (how a thread pauses, moves and closes through `session-end`, how to reach the Operator, waiting, helper agents, review, the box's guards and commands). Carries the inline-page starter, a worked example (synthetic data) and a palette validated for colorblind safety on T3's surfaces (`assets/`, `references/palette.md`; `tests/t3-html-render-test.py` checks the pages). | + +On 2026-11-17 the `harness` skill replaced six template skills: `pre-compact-synthesis`, `session-close`, `session-handoff`, `grabit`, `t3-html-render` and `harness-update`. The machinery they described now runs in commands (`session-end`, `grabit`, `harness-update-scan.sh`), and the facts they carried live in the `harness` skill and `.claude-config/bin/README.md`. A template sync never deletes a file, so a copy updated from an older template may still hold those six folders under `SKILLS/`; nothing reads them any more, and deleting them is your call (they still load as skills until you do, and their text describes the old procedure). Domain-partner skills (a vendor-docs assistant, anything tied to your own stack or business) aren't shipped here; they're yours to build, after the @@ -78,9 +75,9 @@ routing test above says a skill is the right home. ## The skill listing budget (an option, never required) -Every model-invocable skill puts its name and description into the listing each session loads, and Claude Code drops descriptions from the tail of that listing above about 30,000 characters (built-in and account skills share the budget). A skill nobody loads can therefore cost a live one its description. The template marks one of its own skills slash-only (below) and never removes a skill from your copy; the other levers are yours, and a team can use them without touching OPS: +Every model-invocable skill puts its name and description into the listing each session loads, and Claude Code drops descriptions from the tail of that listing above about 30,000 characters (built-in and account skills share the budget). A skill nobody loads can therefore cost a live one its description. The template never removes a skill from your copy; the levers are yours, and a team can use them without touching OPS: -- `disable-model-invocation: true` in a skill's frontmatter (a standalone `#` comment line or a trailing comment beside it parses) drops the skill from the model's listing and leaves only the human `/name` command; the model cannot load it through the Skill tool. It suits a skill the operator starts by name. The template ships it on `harness-update`: a template sync starts only when the operator asks, so its description bought nothing in the listing. Type `/harness-update` to run it; asked in plain words, an agent cannot load it through the Skill tool. To give the model that skill back, delete the line in your copy. Probed on Claude Code 2.1.319. An edit to a template skill's frontmatter is a local change: `harness-update` reports that file as a CONFLICT if upstream later changes it too. +- `disable-model-invocation: true` in a skill's frontmatter (a standalone `#` comment line or a trailing comment beside it parses) drops the skill from the model's listing and leaves only the human `/name` command; the model cannot load it through the Skill tool. It suits a skill the operator starts by name. To give the model that skill back, delete the line in your copy. Probed on Claude Code 2.1.319. An edit to a template skill's frontmatter is a local change: the template sync reports that file as a CONFLICT if upstream later changes it too. - The `skillOverrides` setting in your own Claude Code settings (`{"": "on" | "name-only" | "user-invocable-only" | "off"}`) changes how a skill is listed without editing its file, and also covers built-in and account skills. A `Skill(...)` permission deny does not hide a skill from the listing. `deploy.sh` never writes your settings, so this one is entirely yours. - A skill you never load can be deleted from your copy. diff --git a/SKILLS/grabit/README.md b/SKILLS/grabit/README.md deleted file mode 100644 index d8469a8..0000000 --- a/SKILLS/grabit/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# grabit (skill) - -**Purpose:** Move real files between a (usually headless) OPS box and the operator's machine over Tailscale, via the `grabit` binary, not in-chat delivery. Corrects the default reflex to hand files back as chat attachments. - -**One skill, one binary:** `grabit/SKILL.md` covers the SEND direction (push a named file to the operator's Downloads: `grabit FILE...` / `--to` / `--serve` / `--list`) and the RECEIVE direction (`grabit --inbox` pulls what the operator pushed to the box, screenshots included). The separate `grabit-screenshots` skill was retired on 2026-11-17. - -**Deployment:** Claude Code **skills only**. A Claude.ai GUI Project can't execute a local shell binary over the tailnet, so there is no Project half. Picked up automatically via the `~/.claude/skills/` to `OPS/SKILLS/` symlink; no per-entry symlink needed. - -**Depends on:** `~/OPS/.claude-config/bin/grabit` (tracked in OPS, syncs to all machines) plus Tailscale running on both ends. Deep mechanics: `.claude-config/bin/README.md` under grabit. diff --git a/SKILLS/grabit/SKILL.md b/SKILLS/grabit/SKILL.md deleted file mode 100644 index 521d163..0000000 --- a/SKILLS/grabit/SKILL.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -name: grabit -description: "Use when the operator wants a real file off this headless box onto their own machine: send me this, grab this, put it in my downloads. Pushes it over Tailscale to their Downloads with the grabit binary, not in-chat delivery. Not for an image attached in a T3 message (a saved path: read it)." ---- - -# grabit: send a file off the headless box - -Move a real file from this OPS box to the operator's machine with the `grabit` binary. When the operator asks for a file, push it with grabit. Do not hand it back as an in-chat attachment. - -## Why this exists - -This box is usually headless: the operator drives it over SSH and can pull only text out of the terminal. grabit Taildrops actual files to the machine they connected from, where Windows auto-saves them to Downloads (verified, no tray prompt). In-chat delivery like `SendUserFile` does not land a file on the operator's disk where they expect it, so reaching for it on a "send me a file" request is the exact mistake this skill prevents. - -## The command - -grabit is not on `$PATH`. Always call it by full path: - -``` -~/OPS/.claude-config/bin/grabit FILE... -``` - -Every transfer rides the tailnet (WireGuard-encrypted) and is never public: the browser mode uses `tailscale serve`, not funnel. grabit sends only the files you name, never their parent directory, so a neighbouring `.env` cannot leak. - -## Modes - -| Intent | Command | -|---|---| -| Send file(s) to the operator (default) | `grabit FILE...` pushes to the device they connected from, auto-detected via `$SSH_CONNECTION` | -| Send to a specific machine | `grabit --to DEVICE FILE...` with a tailnet name or `100.x` IP | -| Give a browser download link for large or many files | `grabit --serve PATH...` prints a tailnet HTTPS URL; `grabit --serve-off` tears it down (needs passwordless sudo) | -| List tailnet devices | `grabit --list` | - -Default to plain push: one-shot, no sudo, lands in the operator's inbox. Reach for `--serve` only when push will not fit, or the operator explicitly wants a link, since it needs sudo and leaves an endpoint standing. - -The receive direction is the next section. Most "look at this image" requests are not receives at all. - -## Receiving: an image in a T3 message is already a path - -An image attached in a T3 message arrives in the prompt as a saved path (`[User attached one or more files ...]`): read it directly with the Read tool and say what you see. Do not run grabit for it. A receive skill whose description matches ordinary talk about pasted or attached images fires on requests that need no pull at all. - -Pull with `~/OPS/.claude-config/bin/grabit --inbox` only when the operator says they pushed (Taildropped) something to this box. It pulls everything waiting into `~/grabit-inbox` and lists what landed; read each pending image newest first, say what you actually see before interpreting it, and never ask for a path or suggest base64-pasting an image. An empty inbox means nothing arrived: say so rather than guessing. - -## Workflow - -1. Resolve each file to a concrete path and confirm it exists before sending. Absolute is safest. -2. Run `~/OPS/.claude-config/bin/grabit [ ...]`. -3. Report what was sent and where it lands, for example "to your Downloads on ``". -4. If `$SSH_CONNECTION` is unset, a rare non-SSH or cron session, auto-detect fails. Fall back to `--to `; list the tailnet devices with `grabit --list`, and the device list and transfer modes are in `~/OPS/.claude-config/bin/README.md` under grabit. -5. On error, surface the exact message. Do not silently retry in a different mode. - -## Anti-patterns - -1. Do not use in-chat delivery like `SendUserFile` when the operator wants a file on their machine. Push with grabit. -2. Do not pass a directory. grabit sends named files only. -3. Do not assume grabit is on `$PATH`. Always the full path. -4. Do not `--serve` by default. It needs sudo and leaves an endpoint standing; prefer push. -5. Do not send a file the operator did not ask for, and do not push secrets or credentials off-box without an explicit instruction. - -## Deep context - -Full mechanics and one-time box setup (`sudo tailscale set --operator=$USER`, which lets push run sudo-free) live in `~/OPS/.claude-config/bin/README.md` under grabit. Read that only if a transfer misbehaves or you are provisioning a new box. - -## Other agent runtimes - -`grabit` is a plain shell binary, so a Codex or OpenCode thread on the same box sends a file exactly the same way, `~/OPS/.claude-config/bin/grabit `, with the same constraint: local agent sessions only, over the tailnet. The `$SSH_CONNECTION` auto-detect and the `--to ` fallback behave identically on every runtime. diff --git a/SKILLS/harness-update/SKILL.md b/SKILLS/harness-update/SKILL.md deleted file mode 100644 index 78c0008..0000000 --- a/SKILLS/harness-update/SKILL.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -name: harness-update -description: "Use when the Operator says update the harness, sync from the template, or pull upstream OPS changes. Scans, classifies, ports conflicts, lands one commit." -disable-model-invocation: true ---- - -# Harness update - -You pull public template code into a private, personalized OPS copy. That one fact sets every rule below. - -A copy of OPS starts from the template, then diverges: `BOOTSTRAP.md` fills in the Operator's identity, memory accumulates, projects land, hooks and doctrine get tuned. The template keeps evolving too. But a template copy shares no git history with upstream, so `git merge` has no common ancestor. This skill is the safe path across that gap. - -The risk is one-way. It is not "miss an update," it is "break the Operator's personalization." So: - -- Identity, memory, and private working surfaces are hard-excluded in both directions and never named in the scan. -- CONFLICT, a file changed upstream and locally, is never auto-applied. You port it by pattern or skip it. A machine never guesses here. -- Only NEW (upstream-only) and UPDATE (local still matches the last synced version) fast-forward, and only after the Operator says so. - -## The sync-state marker - -`.claude-config/ops-upstream-ref`, two lines per copy: - -``` -upstream=Exploitacious/OPS -last_synced= -``` - -Created on the first successful sync, updated at commit time. Without it the scan runs first-sync mode: a full tree compare with no baseline, so every difference is CONFLICT and UPDATE is not computable. With it, the scan diffs only what upstream changed since `last_synced` and tells an untouched-local UPDATE from a diverged-local CONFLICT. It lives under `.claude-config/` because the repo root is canonical-file-gated (`CONTEXT/project-kata.md` rule 1). - -A marker written before 2026-10-19 names a commit from before the template's history rewrite (a private name removed from one old commit). The scan translates it to its rewritten twin, which has the same tree, prints a NOTE, and stays in delta mode; step 7 then writes the new sha. - -## Updating a copy that predates this skill - -An older copy may have no marker, no `harness-update-scan.sh`, and none of this skill. Run everything straight from the template, from inside the copy: - -``` -git -C ~/OPS remote add ops-template https://github.com/Exploitacious/OPS.git # once -git -C ~/OPS fetch ops-template -git -C ~/OPS show ops-template/main:SKILLS/harness-update/SKILL.md # this procedure -f=$(mktemp); git -C ~/OPS show ops-template/main:.claude-config/bin/harness-update-scan.sh > "$f" -(cd ~/OPS && bash "$f") # report only -``` - -The scanner is self-contained by contract (it finds its root from the working directory and loads no helper file), so a temp copy works in any layout. Because the working directory decides which repo it scans, every command below runs from inside the copy, `(cd ~/OPS && ...)`; run anywhere else, the scan refuses with `ERR_NOREPO` and changes nothing. With no marker it runs a first sync: every file that differs is CONFLICT, so nothing applies itself, and the walk through the flow below is per feature, with the Operator deciding bring in, adapt, or defer. `--apply-safe` from the temp copy only copies NEW files on a first sync. Step 7 writes the first marker, and from then on scans are deltas. - -## The flow - -1. Scan, report-only. Run `(cd ~/OPS && .claude-config/bin/harness-update-scan.sh)`. It ensures the `ops-template` remote exists (HTTPS, no SSH key needed to read a public template), fetches it, and prints a classified report plus a summary line. It touches and commits nothing. Add `--verbose` to list IDENTICAL files too. - -2. Summarize the upstream CHANGELOG for the Operator in plain terms. The scan already fetched `ops-template`, so read what changed and translate it out of repo-speak: - - ``` - git -C ~/OPS diff ..ops-template/main -- CHANGELOG.md # with a marker - git -C ~/OPS show ops-template/main:CHANGELOG.md # first sync - ``` - - Tell the Operator what the update does for them ("remote sessions now resume with history after a reboot"), not "3 files changed." This is the decision input. - -3. Ask the Operator what to apply. Two decisions. Apply the safe classes (NEW + UPDATE) now? For each CONFLICT, how: port by pattern (recommended, carry the mechanic not the bytes), skip (leave the local version), or show the diff first (`git -C ~/OPS diff ops-template/main -- `) then decide. Never bundle conflicts into one yes/no; each is its own judgment. - -4. Apply. Safe classes in one shot: `(cd ~/OPS && .claude-config/bin/harness-update-scan.sh --apply-safe)`. It copies NEW + UPDATE only, never CONFLICT or MODE, never a hard-excluded file, never a deletion, never a commit. For each MODE line, ask the Operator, then run the `chmod` it names if the bit was not set on purpose. Then hand-port each approved CONFLICT: read the upstream version for structure and intent, rewrite it against the local tree's shape, leave unapproved ones alone. This is `CONTRIBUTING.md`'s porting discipline run public to private: port the pattern, do not paste the file. - -5. Translate paths on a renamed fork. Upstream assumes a root of `~/OPS` and `ops-*` unit and agent names. If this copy renamed itself, detected by comparing the checkout root and the local `AGENTS.md` (or `CLAUDE.md`, when present) against upstream's `~/OPS`, every copied and ported file needs a translation pass. After `--apply-safe`, sweep the applied files for `~/OPS`, `ops-template`, and `ops-*` names and rewrite them to the local convention. A verbatim upstream path in a renamed fork is a silent breakage. - -6. Run the gates on what changed, before committing: - - ``` - ~/OPS/.claude-config/bin/verify-ops.sh # drift gate (a renamed copy runs its own equivalent) - ~/OPS/.claude-config/bin/secrets-scan.sh - bash -n - node --check - ``` - - `verify-ops.sh` is this copy's drift gate (a renamed copy runs its renamed equivalent); `secrets-scan.sh` catches a credential riding in on a ported file. All green before step 7. A red gate is a stop, not a note. - -7. One commit, update the marker. Land a single Conventional Commit listing the features pulled, for example `chore(harness): sync upstream OPS (session-close teardown, secrets-scan hardening)`. In the same commit, write the marker's `last_synced` to the fetched sha (`git -C ~/OPS rev-parse ops-template/main`; the scan prints it too), creating `.claude-config/ops-upstream-ref` if this was the first sync. The marker makes the next sync a clean delta. - -8. Ported conflicts earn a CHANGELOG entry. A CONFLICT you ported is a real change to this copy's behavior, so it belongs in the local `CHANGELOG.md` (`CONTEXT/project-kata.md` rule 5, docs match reality). Safe fast-forwards of NEW/UPDATE are the routine sync and need no line each; a hand-port does. - -## Reading the scan report - -| Class | Meaning | Action | -|---|---|---| -| NEW | Upstream has it, local doesn't | Safe copy (`--apply-safe`) | -| UPDATE | Upstream changed it (content, mode, or both); local still matches the last synced copy | Safe fast-forward (`--apply-safe`) | -| CONFLICT | Changed upstream and locally (or first sync, no baseline) | Port by pattern, skip, or diff; never auto-apply | -| MODE | Same content, but the exec bit differs from upstream and from the last synced copy (or first sync) | Ask, then `chmod a+x` or `a-x` by hand; never auto-applied | -| IDENTICAL | Same on both sides | Nothing | -| REMOVED | Upstream deleted it; local still has it | Manual call; the scan never auto-deletes | - -Local-only files, the Operator's own content absent upstream, are never listed. They are none of the sync's business. - -## The exclusion boundary - -These never sync in either direction and never appear in the report, because naming a private file is itself a boundary crossing: - -- `CONTEXT/` identity files: the operator's identity, voice, and standing-orders files, `.bootstrapped`, and everything under `CONTEXT/projects/` (per-project lessons name real projects). The authoritative list is `is_excluded` in `harness-update-scan.sh`, so read that function instead of trusting a copy of the list here: the identity files changed names when the doctrine layout moved (`USER.md`, `voice.md`, and `standing-orders.md` replace `about-me.md`, `brand-voice.md`, and `working-preferences.md`), and a copy that predates the move still carries the old names. The other doctrine files in `CONTEXT/` (`project-kata.md` and the rest) are portable and do sync; they show up as UPDATE or CONFLICT like any template file. -- `.claude-memory/`, `.claude-handoffs/`: memory and in-flight batons. -- `NOTES/`, `DELIVERABLES/`, `PROJECTS/`, `ARCHIVE/`: the Operator's work. - -The scan prints these categories in its header so the boundary is visible on every run. - -## Anti-patterns - -- Auto-applying a CONFLICT. The point of the class is that a machine cannot safely resolve it. Port or skip; `--apply-safe` will not touch it, and neither should a hand-copy that skips reading both sides. -- Pasting a conflicting file wholesale, even public to private. Carry the mechanic and fit it to the local tree. A pasted file re-introduces upstream's assumptions, root path and names, this copy may have changed. -- Skipping the CHANGELOG summary. The Operator decides on what the update does, not on a file count. -- Forgetting the marker. A sync that lands files but does not advance `last_synced` turns the next scan back into a first-sync CONFLICT storm. -- Committing before the gates are green. `verify-ops.sh` and `secrets-scan.sh` are the contract, not a formality. diff --git a/SKILLS/harness/SKILL.md b/SKILLS/harness/SKILL.md new file mode 100644 index 0000000..e24556b --- /dev/null +++ b/SKILLS/harness/SKILL.md @@ -0,0 +1,63 @@ +--- +name: harness +description: "Must always apply when working in a T3 Code thread on an OPS harness box. Facts about the box and T3 that an agent cannot work out: how a thread pauses, moves and closes, how to reach the owner, how waiting and helper agents behave, and the commands the box provides." +--- + +# Harness + +Facts about the box you are running on. The machinery (hooks, scripts, T3's own tools) does the work; this page says what exists and what bites. The harness root is `~/OPS` (or `$OPS_DIR`); commands below live in `/.claude-config/bin/`. + +## What survives + +A conversation is lost at a compact or a close. Three things are not: git, the memory pool for this directory (the session-start digest prints it), and the resume note. Anything worth keeping goes into one of them before either happens. + +## Ending a thread + +Three endings. Pause: the same thread continues after a compact. Move: the work continues in another thread, profile or machine. Close: the purpose is done. + +- Every ending starts with `session-end `. It snapshots git, runs the merged-branch and worktree cleanup (`branch-gc`) on the thread's repos, rebuilds the memory index, lints, and prints what is left for you to decide. +- What only you can do, every time: + - Save the lessons worth keeping: one fact per file in the memory pool. A session with none saves none. + - Leave the memory pool better than you found it: correct an entry this thread proved wrong, merge duplicates you touched, move a lesson that belongs in a repo's docs. The closing thread owns this; nothing else tidies the pool (`verify-ops.sh` only warns when one outgrows its budget). + - Put knowledge where the next person will look. A client or technical fact goes to its page in the documentation system, a repo fact to that repo's docs, a decision to the changelog. Fix any document this thread made untrue. + - Write the resume note at the top of the anchor or baton: NEXT ACTION (one step), VERIFY FIRST, DO NOT (with who said so), DEAD ENDS, ASK THE OWNER. +- Pause: `session-end pause` prints the compact line. On T3, with the box's harness token, the thread compacts itself (`compact-cycle.sh`); without the token the cycle stops with `ERR_T3API` before it sends anything, and the owner fires `/compact`. Never compact over an unanswered question. +- Move: the baton is `/.claude-handoffs/pending/.md`, key from `key.sh`. One pending baton per project; never overwrite an unread one. Commit and push it, or the other machine never sees it. +- Close: only on the owner's word; a thread never closes itself. Also remove what this thread made (scratch files, containers, temporary worktrees), never another thread's. Then settle the way `session-end close` prints it (T3's own settle tool; `t3-api.sh settle-when-idle` only where that tool is missing), and print the receipt first, because nothing after the settle reaches the owner. +- Time: when this thread worked a ticket, log its time before closing. `active-minutes` measures it; read what is already on the ticket first so nothing is billed twice. Ending a thread never changes a ticket's status. Closing a ticket follows `CONTEXT/work-tracking.md` (or your organization's platform skill, when this copy has it), and it does not end the thread. + +## Talking to the owner + +- Text written mid-turn may not be seen until the turn ends. What they must read in full goes through `send_to_user` or the final reply. +- Anything they must click within a time window (an approval link) goes last, with its expiry time, and then the turn ends. +- At most three asks in a reply, each with your recommendation and what happens if they say nothing. A hook checks this. +- They read cold. Say what a thing is before using its name; give a link beside every id. +- Data, comparisons and decisions read better as an inline page: build one HTML file from `assets/starter.html`, check it with `html_preview` at 728 and 390 wide (zero console errors), show it with `html_render`. Colors: `references/palette.md`. One page per reply. +- To put a real file on their computer: `grabit FILE`. An image they attach in T3 is already a saved path: read it. + +## Waiting + +- A thread wakes only on a message, a task notice or a schedule. "I will check later" with nothing armed means it never happens. Arm `schedule_task` bound to this thread, and have its prompt delete the schedule when done. +- A background command stops after 30 minutes unless the call passes a longer `timeout` (2 hours at most). +- To wait on a background command you started, use `t3_background_wait`. To wait on a pull request, `watch_pull_request`. Never a sleep loop. + +## Helper agents and other threads + +- A helper's result is only its last message. Brief it: "your final message is the deliverable, in full". +- A helper that writes files gets its own worktree. One that shares your checkout moves your branch. +- Never message a running workflow agent: it starts a second copy. +- Another thread's worktree, scratch or documents are not yours to clean. Message that thread (`t3_thread_send`). +- No new top-level threads unless the owner asks. + +## Review + +- When the box has an OpenAI subscription (or another vendor's) wired into `OPS_REVIEWER_CMD`, code where a miss is expensive (production writes, guards, secrets, auth) gets a second-vendor review before it lands: `second-vendor-review`. Without one, say so and land on your own verification. + +## The box + +- T3's tools arrive as names only. Fetch a tool's definition before first use. +- Never kill processes by name pattern (`pkill -f`): your own shell and sibling agents match. Use `safe-pkill` or a recorded PID. +- A test of anything that deletes or moves files runs under `sandbox-run`. +- Guards block force-pushes, history rewrites, hook bypasses, secrets written into memory, and a push of this copy to an origin not proven private. A blocked call is a ruling, not an error to route around. +- Scratch goes in `$TMPDIR`, outputs in the project's folder, never the harness root. +- "Update the harness" in a copy of the template: `harness-update-scan.sh` compares the copy with the template. A file changed both upstream and locally is never applied automatically. diff --git a/SKILLS/t3-html-render/assets/example-report.html b/SKILLS/harness/assets/example-report.html similarity index 100% rename from SKILLS/t3-html-render/assets/example-report.html rename to SKILLS/harness/assets/example-report.html diff --git a/SKILLS/t3-html-render/assets/starter.html b/SKILLS/harness/assets/starter.html similarity index 86% rename from SKILLS/t3-html-render/assets/starter.html rename to SKILLS/harness/assets/starter.html index 2b09647..e5d32c0 100644 --- a/SKILLS/t3-html-render/assets/starter.html +++ b/SKILLS/harness/assets/starter.html @@ -1,4 +1,17 @@ + Page title