The meta-skill that builds and improves all your skills, including itself. Watches your work sessions (autonomous or human-led), captures patterns, corrections and judgement calls, and turns them into skill improvements and new skill candidates for your review. Practical application of the Augmented Expertise methodology. Open source: CC BY 4.0.
Python agent-skillsai-skillsaugmented-expertiseawesome-skillsclaudeclaude-codeclaude-code-skillclaude-code-skillsclaude-coworkclaude-skillsmeta-skillrebelyticsskill-automationskill-builderskill-creationskill-improvementskill-managementskills
Print the hook's observation count at zero, with its path
Eoghan Hennfb377ead7c8c
diff --git a/references/environments.md b/references/environments.mdindex d0e4417..81821d7 100644--- a/references/environments.md+++ b/references/environments.md@@ -524,8 +524,8 @@ d="$OBS_WORKSPACE/skill-observations" # the pinned absolute pathopen=$(find "$d/observation-log" -maxdepth 1 -name '*.md' -exec grep -l '^status: open$' {} + 2>/dev/null | wc -l | tr -d ' ')last=$(tr -d '\r' 2>/dev/null < "$d/last-review-date.txt"); last=${last:-never} # a CRLF file must not carry \r into the JSONmsg="Make the first tool call of this session one batched call that both lists the task-observer workspace ($OBS_WORKSPACE) and invokes the task-observer skill; then run its Session Start Protocol. Observation files are created only by scripts/new-observation.sh in the skill directory, never by copying a header."+msg="$msg $open open observations in $d; last review: $last." # always, zero included: a mispinned path reads 0 tooif [ "$open" -gt 0 ]; then- msg="$msg $open open observations; last review: $last."cutoff=$(date -d '7 days ago' +%F 2>/dev/null || date -v-7d +%F) # GNU, then BSD/macOScase "$last" in(never) msg="$msg Offer the review." ;;@@ -543,7 +543,11 @@ only says "invoke the skill" leaves the probe to a skill not yet read,and a tool whose sessions resolve the root another way (a pin in aninstruction file only some of its sessions load) keeps writing to itsown log while the injected count, read from the shared one, looks-healthy. The path is interpolated into a JSON string, so the last step+healthy. A count of zero is printed, never suppressed, with the path it+was read from: the hook is an instrument over the log and gets the same+guard as every scan, and a message that drops the count at zero makes a+mispinned workspace and a clean backlog read the same. Only the offer is+gated on the count. The path is interpolated into a JSON string, so the last stepescapes the whole message: a Windows path's backslashes and a `"` in afolder name otherwise produce output that does not parse, and a hookwhose output does not parse injects nothing.@@ -568,16 +572,16 @@ Two details that matter when building one: `grep -c` exits 1on zero matches while still printing `0`, so `$(grep -c … || echo 0)`yields two values — capture the output and ignore the exit code; and provethe reminder branch fires by running the hook against fixtures at `never`,-30 days stale and 2 days stale, confirming the third stays silent. A nag+30 days stale, 2 days stale and an empty log, confirming the third stays+silent and the fourth still prints "0 open observations in <path>". A nagthat never fires and a nag that is correctly silent look identical from apassing run.### A stop hook — the per-task backstop as a harness event-The per-task backstop in the activation block is prose in the same file as-the rule it guards, so it fails together with it: a session that skipped-the protocol skipped the backstop at every task boundary too. Where the-harness has a stop event, run the check there instead: *has this session+The per-task backstop fails with the block it lives in (above): a session+that skipped the protocol skipped the backstop at every task boundary too.+Where the harness has a stop event, run the check there instead: *has this sessionused tools, and has anything under `observation-log/` or `checkpoints.log`been written since it started?* If not, block the stop once per sessionwith a one-line instruction; stay silent for conversation, for a session