Commit Graph

38 Commits

Author SHA1 Message Date
Miguel Palhas e90137b17c fix(pr-daemon): rate-limit and coalesce hints
Every hint costs the receiving session a full model turn. The daemon sent
one per forge event with no quiet period, so a busy PR produced 20+ in a
day and sometimes repeated a payload verbatim.

Reasons are now banked per PR and role until a hint actually goes out, so
a busy pane or a cooldown delays one but never loses it. After a hint,
the next waits hintCooldownSeconds (default 300) and carries everything
that accumulated. A payload identical to the last is dropped, as is a ci
hint to a land session whose worktree already holds that head commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 17:18:50 +01:00
Miguel Palhas e818cfea8b feat(config): one agent roster for daemon and blitz
ci / lint (push) Successful in 1m12s
ci / nix (push) Successful in 18s
The reviewer pool was the only place naming harness+model combos, and
blitz kept its own table inline. `reviewers` becomes `agents`, gains
`roles` and `tiers`, and blitz routes from it via scripts/roster.sh.

Config path moves to ~/.config/agent-skills/; the reviewer path stays
readable so a box migrates with a mv.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-25 12:37:04 +01:00
Miguel Palhas 851f7f7fbe feat(hourlog): default to sonnet
ci / nix (push) Successful in 8s
ci / lint (push) Successful in 11s
Reading session logs into a table is not opus work. HOURLOG_MODEL still
overrides, and an empty value takes the harness default.
2026-08-23 11:04:47 +01:00
Miguel Palhas f61371c74a Merge remote-tracking branch 'origin/main' into reviews 2026-08-23 10:08:16 +01:00
Miguel Palhas dba8416192 feat(pr-daemon): review only when a review is requested
Auto-review paid off on daemon and core PRs and reviewed clean on most
small ones, so spawning a reviewer on every non-draft PR spent tokens for
nothing. A review session now needs github plus one of your logins in the
PR's requested_reviewers; gitea spawns none.
2026-08-23 10:06:44 +01:00
Miguel Palhas a3522051fa feat(pr-daemon): hand review sessions their forge token
ci / nix (push) Successful in 9s
ci / lint (push) Successful in 11s
A sandboxed review session can't read ~/.env.claude, so $GITEA_TOKEN was
never set and reviewers improvised — one of them fell back to `git
credential fill`, another skipped posting.

A forge can now name a second, write-capable variable in reviewTokenEnv.
The daemon passes its value into the session as $GITEA_TOKEN ($GH_TOKEN
on GitHub), through the generated Claude settings file or the codex
profile's shell_environment_policy, both now written 0600. tokenEnv
stays read-only and unchanged. Nothing is injected when reviewTokenEnv
is unset.
2026-08-22 20:01:45 +01:00
Miguel Palhas 0096addb23 fix(install): link skills where codex looks
Codex 0.148 discovers skills under $CODEX_HOME/skills only, so every
skill in this repo was invisible to codex sessions — review sessions run
by a codex reviewer reported review-pr as an unavailable skill and fell
back to improvising a review.

Both installers now link each skill into ~/.codex/skills as well. The
nix module links one symlink per skill dir instead of recursive=true:
codex skips any skill whose SKILL.md is itself a symlink, which is what
a per-file link produces.
2026-08-22 19:50:01 +01:00
Miguel Palhas cf3a75b511 fix: point paths at ~/tea/agent-skills
ci / nix (push) Successful in 7s
ci / lint (push) Successful in 10s
The checkout moved out of ~/tea/yolo. Codex sessions were the visible
casualty: entry/codex-AGENTS.md @imports absolute paths, so operating.md,
writing.md, code-comments.md, intercomms.md and RTK.md all resolved to
nothing and the sessions ran without them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 19:11:04 +01:00
Miguel Palhas 085363e393 feat(pr-daemon): sandbox review sessions instead of prompting
ci / nix (push) Successful in 10s
ci / lint (push) Successful in 11s
Review sessions stopped at a permission prompt on every command, which
parks an unattended reviewer on a dialog nobody answers. They now run
confined: Claude gets a generated settings file (dontAsk + bash sandbox,
writes limited to the worktree and its git dir, network limited to the
forge API hosts, credentials unreadable), Codex gets --sandbox
workspace-write --ask-for-approval never plus a profile declaring the
repo untrusted, which also answers its trust prompt without granting it.

Claude Code treats .git as a protected path no allow rule opens, so the
seen and findings files are written with a shell redirect.

review-pr now always posts one review per head SHA, an ack when it has
no findings, so the author side gets a signal either way.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 13:48:55 +01:00
Miguel Palhas 04baf8242a refactor: rename tracker common
ci / nix (push) Successful in 8s
ci / lint (push) Successful in 11s
2026-08-20 15:40:17 +01:00
naps62-yolo 2f092f9ee0 feat(ci): lint skills, refs and installer drift (#15)
ci / nix (push) Successful in 8s
ci / lint (push) Successful in 10s
2026-08-20 14:23:19 +01:00
naps62-yolo cf5518227e feat(intercomms): let sessions find and talk to each other (#14) 2026-08-20 14:22:34 +01:00
Miguel Palhas 7a55c42408 chore(reviewer): drop synthetic-hosted models from reviewer pool
Removes the GLM 5.2 entries that stood in for kimi in the previous commit.
The pool is now claude and gpt-5.6 only, across claude, pi and opencode.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 11:25:18 +01:00
Miguel Palhas 4dd0c9d241 chore(reviewer): drop kimi-k3 from reviewer pool
Kimi K3 subscription is exhausted. Replaces the kimi entries in the
example config and README with GLM 5.2.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 11:19:26 +01:00
Miguel Palhas 7c9b5cf4e0 feat(nix): ship the pr-daemon, hourlog and week-review units
The units ran from nixos-config while the scripts they execute live
here, so a fix like KillMode had to be made in the repo that does not
contain the daemon. They are defined here now and each machine opts in
with programs.agentSkills.<name>.enable, which keeps the property that
nothing starts a session unless a host asks for it.

ExecStart still points at the checkout, not the store: an edit should
take effect on restart rather than needing a flake bump.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 22:19:53 +01:00
Miguel Palhas aaee17b0f9 feat(pr-daemon): outside reviewer on your own PRs, rotated by least use
A PR is never reviewed by the harness that wrote it. With `selfReview`
on, an own PR gets both roles: `land` on the head branch and `review-pr`
on a local pull/N/head checkout, which is what keeps routing unambiguous
with two sessions on one PR.

The reviewer is drawn from a configured roster of harness+model+effort
combinations, excluding the author's harness, picking among the
least-used so every combination keeps getting exercised and a new entry
goes out immediately. Each pick is appended to a JSONL ledger, which is
what makes rating them possible later.

Drafts never get a reviewer; the draft-to-ready flip spawns one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 21:42:38 +01:00
Miguel Palhas 787f133fdc feat: PR daemon + reviewer/author skill split
One systemd daemon watches GitHub and Gitea and routes each PR to an aoe
session: `land` for PRs you authored, `review-pr` for everyone else's.
It reads metadata only and sends a single inert hint line, so untrusted
PR text never passes through the thing that types into agent prompts.

Routing is derived from `aoe list --json --all` by worktree branch, so
no claim files and no daemon database. Dedupe stays in the session via
`pr-<N>-seen`, which makes hints idempotent and a swallowed send
self-healing.

`land` loses its watcher machinery to the daemon and keeps the policy
and per-event handlers; `pr-common` holds what both skills share.

Review sessions run non-yolo without trusted hooks and never run the
branch's code.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 18:51:43 +01:00
Miguel Palhas 6f05756870 docs: document pi and opencode coverage 2026-08-19 15:13:51 +01:00
Miguel Palhas c77171ce2c docs: drop dead crit CLI references, trim rev section
crit CLI and crit-watch.sh don't exist on this machine; rev covers
code-diff reviews entirely now.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 14:39:16 +01:00
naps62 439d3601b4 feat: report measured time, drop the nominal-day fit
Splitting a fixed 8h day by share turned 160 minutes of Friday morning
into "7h Tesser". The number looked measured and was not, and no column
in the table said which.

Cells now carry the time each project was actually active. The total
column is wall-clock presence — the union of active slots — so it reads
lower than the row sum when sessions overlapped. Measured time is a
floor; the skill says so and leaves adding the rest to the user.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 20:33:34 +00:00
naps62 95e98a1e77 refactor: hourlog reports whole days, timer to 18:00
Half-days forced every result into a 4h bucket. Days with hours split by
share give the same answer at finer granularity and drop a concept.

Session minutes are now stated as a floor on real work, not a measure:
the day's length comes from the calendar and only the split between
projects comes from the sessions. Meetings and review leave no
transcript, so a thin day is still a full day.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 18:36:34 +00:00
naps62 e4ffd5d93d feat: hourlog skill + Friday timer
Turns Claude Code and Codex session activity into a half-day-per-project
proposal, reconciles it against the timesheet API, and submits only what
the user approves in-session.

Activity is measured in 5-minute active slots, deduplicated per project,
not message counts — otherwise one overnight autonomous run outweighs a
real morning's work.

The path-to-project mapping and the API credentials stay in
~/.config/hourlog/ and ~/.env.claude. This repo is public.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 17:35:24 +00:00
naps62 5e95a7337f feat(week-review): spawn weekly via systemd timer
Fridays 17:00 Europe/Lisbon, pinned in the unit because the machine
clock is UTC. Creates an Agent of Empires session in a fresh
week-review/<ISO week> worktree, sends it /week-review, notifies ntfy.

Interactive, not `claude -p`: the skill asks which carry-over issues to
take and what to apply, so an unattended run would stall or decide on
its own. link.sh links the units but does not enable them, since
enabling on every machine spawns one session per box for the same week.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SC9zwjErud3jfeYVEkf2Zd
2026-08-01 15:51:34 +00:00
naps62 f6b58e8849 feat: add the week-review skill
Codifies the session-review process: read open issues for carry-over,
scan transcripts, rank by how often the same correction repeated, check
the current model docs before recommending, then apply or file.

scripts/scan-sessions.py enumerates top-level sessions in a window,
drops subagent transcripts, and flags swarm runs so a single 577-session
security scan does not read as 40% of the week's work.
2026-08-01 15:15:14 +00:00
naps62 ad4d14e078 docs: README still described the reverted AGENTS.md design 2026-08-01 15:02:47 +00:00
naps62 60f39cdcbb feat: track both entry files in the repo
~/.claude/CLAUDE.md was in no git repo despite heavy editing, and
~/.codex/AGENTS.md was a hand-synced duplicate of it. Both now live in
entry/ and import the shared fragments; RTK.md moves to claude-md/ so
Codex stops carrying its own copy.

Claude's imports are ~/-anchored so they resolve through the symlink.

Also drops kt from the comment rule scope.
2026-08-01 15:02:28 +00:00
naps62 9023ed3ef9 chore: update vendored skills and record provenance
humanizer 2.2.0 -> 2.9.1 (blader/humanizer, MIT): adds a Voice
Calibration section and a passive-voice pattern, reworks negative
parallelisms and em dashes. Version moved to metadata.version upstream.

impeccable 3.6.0 -> 4.0.4 (pbakaus/impeccable, Apache-2.0): the repo
tags the skill and the npm CLI separately, so 3.6.0 was a real release
and npm's 3.5.0 was never the comparison. Adds native-platform reference
briefs.

Each now carries an UPSTREAM file; bin/check-vendored.sh reports drift.
2026-08-01 14:25:26 +00:00
naps62 ccfb5192f8 refactor: both tools import the same fragments; scope code comments by path
Codex reads ~/.codex/AGENTS.md, not ~/.agents/AGENTS.md, so the file
generated there last commit was inert. Both tools support @path imports,
which removes the generate-and-drift step entirely.

code-comments.md moves to ~/.claude/rules/ with paths frontmatter, so its
24 lines load only when a source file is read.
2026-08-01 14:08:44 +00:00
naps62 36372f85b2 feat: split security and autonomy into operating.md
Nine bullets to six. Cut what the harness now ships by default: the
scope-discipline bullet, "create/modify files freely" (subsumed), and
the standalone refuse-dangerous-tasks bullet (restated the injection
rule with examples, now merged into it).

Adds progress-claim grounding for long unattended runs, per the Fable 5
guide. Codex gets both fragments now — link.sh concatenates them into
~/.agents/AGENTS.md, since Codex has no @import.
2026-08-01 13:09:36 +00:00
naps62 a1f95a1161 feat: one writing contract for Claude Code and Codex
Replaces public-comms.md and code-comments.md (749 words, ~25 rules,
almost all prohibitions, no examples) with a single writing.md that
leads with worked examples.

The rule is selection, not compression: keep output short by cutting
whole ideas that don't change what the reader does next, then write what
survives as plain sentences. Not by dropping articles or writing
fragments, which Anthropic's Fable 5 guide calls out as the wrong lever.
Prompt style leaks into output style, so the file is written in the
voice it asks for.

Drops the BLUF ask-line rule entirely: everyone on a PR already knows
who reviews and who merges, and read literally it produced openers like
"Ask: reviewers please merge".

Links the contract to ~/.agents/AGENTS.md, which Codex had nothing in at
all, and to the nix module for the NixOS machine.
2026-08-01 13:06:38 +00:00
naps62 17677c18df feat(land): never merge, user clicks
Auto-merge burned a client PR meant for manual merge. Human gate
needed on public/client repos; one click on private is cheap, so
rule is universal. Land now stops at green + approved + updated
branch, notifies, and leaves the merge button alone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WLkYHLzszmzq5fMGpFAkHh
2026-07-30 08:33:00 +00:00
naps62 0cdbfb6952 docs: list nightshift in skill table
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaGR6ERGCfzWTtuv2rebGe
2026-07-27 15:07:28 +00:00
naps62 08195c1cd4 feat(hooks): track writing contracts + linters in repo
comms-lint.py and comment-lint.py lived only in ~/.claude, which is not
a git repo. Contract prose lived in ~/.claude/CLAUDE.md. Neither survived
a machine rebuild.

Prose moves to claude-md/ fragments, imported via @name.md. Linters move
to hooks/. link.sh and home.nix distribute both. settings.json wiring
stays manual — it holds machine-local MCP/statusline config this repo
must not own.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaGR6ERGCfzWTtuv2rebGe
2026-07-27 14:34:29 +00:00
naps62 999f759691 feat(skills): machine-wide gate for heavy test runs
Parallel yolo/nightshift/blitz sessions each ran the full suite and OOMed
the box. gate.sh caps concurrency, memory and build parallelism; skills now
run scoped checks in the loop and one gated full run per push.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015YUXS63P1WCdC6bEKWcnAE
2026-07-27 12:41:03 +00:00
naps62 423747b08d docs: local clone path ~/tea/yolo 2026-07-24 18:26:15 +00:00
naps62 bf2d8ced6e chore: repo moved to yolo org; update URLs 2026-07-24 18:01:47 +00:00
naps62 a067cecee1 docs: real repo URL + backup-location note; link.sh backs up outside skills dir 2026-07-24 18:00:57 +00:00
naps62 f83a247de3 init: centralized agent skills for Claude Code + Codex
- skills/ shared by both tools (open Agent Skills standard)
- portable cross-skill refs (root-relative, no ~/.claude hardcode)
- bin/link.sh bootstrap for non-Nix machines
- nix/home.nix + flake.nix for home-manager

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014SK5Lo7LQfwLRVdCv1A8uF
2026-07-24 17:59:44 +00:00